define("icywildsGameController", ["icyWildsComponentsAnimationPort", "icyWildsWinLinesPort", "componentmodelComponentApi", "translationmanagerApi", "clientkernelLoaderApi", "icyWildsComponentsGameControllerDeclaration", "slotModelApi", "winMeterApi", "icyWildsComponentsExpandingWildsPort", "reelsApi", "soundManagerApi", "gameLayoutApi", "clientkernelEventbusApi", "stateMachineEngine", "infoBarApi", "clientkernelModulesApi", "icywildsComponentsTensionPort", "paytableApi", "betPanelApi", "clientkernelLoggerApi", "moneyApi"],
    function(icyWildsComponentsAnimationPort, icyWildsWinLinesPort, componentmodelComponentApi, translationmanagerApi, clientkernelLoaderApi, icyWildsComponentsGameControllerDeclaration, slotModelApi, winMeterApi, icyWildsComponentsExpandingWildsPort, reelsApi, soundManagerApi, gameLayoutApi, clientkernelEventbusApi, stateMachineEngine, infoBarApi, clientkernelModulesApi, icywildsComponentsTensionPort, paytableApi, betPanelApi, clientkernelLoggerApi, moneyApi) {
        "use strict";

        function $iterator(o) {
            if (o instanceof Array) return function() {
                return {
                    cur: 0,
                    arr: o,
                    hasNext: function() {
                        return this.cur < this.arr.length;
                    },
                    next: function() {
                        return this.arr[this.cur++];
                    }
                };
            };
            return typeof(o.iterator) == 'function' ? $bind(o, o.iterator) : o.iterator;
        };;
        var $fid = 0;

        function $bind(o, m) {
            if (m == null) return null;
            if (m.__id__ == null) m.__id__ = $fid++;
            var f;
            if (o.hx__closures__ == null) o.hx__closures__ = {};
            else f = o.hx__closures__[m.__id__];
            if (f == null) {
                f = function() {
                    return f.method.apply(f.scope, arguments);
                };
                f.scope = o;
                f.method = m;
                o.hx__closures__[m.__id__] = f;
            }
            return f;
        };
        var $_;
        var $estr = function() {
            return _hcmn_.js_Boot.__string_rec(this, '');
        };
        if (typeof haxe == 'undefined') {
            var haxe = {};
        };

        haxe.IMap = function() {}
        haxe.IMap.prototype = {

            get: function(k) {
                return {
                    arguments: ["*"],
                    returns: "null"
                };
            },
            set: function(k, v) {
                return {
                    arguments: ["*", "*"],
                    returns: "void"
                };
            }
        };
        if (typeof icywildsGameController == 'undefined') {
            var icywildsGameController = {};
        };
        icywildsGameController.Activator = function() {};
        icywildsGameController.Activator = ck_implements(icywildsGameController.Activator, clientkernelModulesApi.IModuleActivator);
        icywildsGameController.Activator.__interfaces__ = [clientkernelModulesApi.IModuleActivator];
        icywildsGameController.Activator.__name__ = ["icywildsGameController", "Activator"];
        icywildsGameController.Activator.prototype.start = function(context) {
            context.getServiceTracker([translationmanagerApi.ITranslationManager, moneyApi.IMoneyFormatter]).then(function(context1) {
                icywildsGameController.ExternalService.initialize(context1);
                context1.registerService(new icywildsGameController.Factory(), icyWildsComponentsGameControllerDeclaration.GameControllerDeclaration, null);
            });
        };
        icywildsGameController.Activator.prototype.stop = function(context) {};
        icywildsGameController.Activator.main = function() {};
        icywildsGameController.Activator.prototype.__class__ = icywildsGameController.Activator;
        icywildsGameController.ExternalService = function() {};
        icywildsGameController.ExternalService.__name__ = ["icywildsGameController", "ExternalService"];
        icywildsGameController.ExternalService.bus = null;
        icywildsGameController.ExternalService.assetRegistry = null;
        icywildsGameController.ExternalService.moneyFormatter = null;
        icywildsGameController.ExternalService.variableRegistry = null;
        icywildsGameController.ExternalService._moduleContext = null;
        icywildsGameController.ExternalService.initialize = function(context) {
            icywildsGameController.ExternalService._moduleContext = context;
            icywildsGameController.ExternalService.bus = context.getAnyService(clientkernelEventbusApi.IEventBus, null);
            icywildsGameController.ExternalService.assetRegistry = context.getAnyService(clientkernelLoaderApi.IAssetRegistry, null);
            icywildsGameController.ExternalService.moneyFormatter = context.getAnyService(moneyApi.IMoneyFormatter, null);
            icywildsGameController.ExternalService.variableRegistry = context.getAnyService(clientkernelLoaderApi.IVariableRegistry, null);
        };
        icywildsGameController.ExternalService.getTranslationService = function() {
            return icywildsGameController.ExternalService._moduleContext.getAnyService(translationmanagerApi.ITranslationManager);
        };
        icywildsGameController.ExternalService.isMobile = function() {
            return icywildsGameController.ExternalService.variableRegistry.get("skin") == "mobile" || icywildsGameController.ExternalService.variableRegistry.get("assetPack") == "mobile";
        };
        icywildsGameController.ExternalService.checkIsIE = function() {
            var ua = window.navigator.userAgent;
            var trident = ua.indexOf("Trident/");
            if (trident > -1) return true;
            else return false;
        };
        icywildsGameController.ExternalService.prototype.__class__ = icywildsGameController.ExternalService;
        icywildsGameController.Factory = function() {};
        icywildsGameController.Factory = ck_implements(icywildsGameController.Factory, clientkernelModulesApi.IService);
        icywildsGameController.Factory = ck_implements(icywildsGameController.Factory, componentmodelComponentApi.IComponentFactory);
        icywildsGameController.Factory.__interfaces__ = [clientkernelModulesApi.IService, componentmodelComponentApi.IComponentFactory];
        icywildsGameController.Factory.__name__ = ["icywildsGameController", "Factory"];
        icywildsGameController.Factory.prototype.createComponent = function(context) {
            new icywildsGameController.GameController(context);
        };
        icywildsGameController.Factory.prototype.getComponentDeclaration = function() {
            return icyWildsComponentsGameControllerDeclaration.GameControllerDeclaration;
        };
        icywildsGameController.Factory.prototype.__class__ = icywildsGameController.Factory;
        icywildsGameController.GameController = function(context) {
            this.resultPresentedPublished = false;
            this.paytableOpened = false;
            this.promotionalSpinsActive = false;
            var _g = this;
            console.log("[LN] GC STARTED");
            this.model = new icywildsGameController.GameModel();
            this.betPanelPort = context.getUsedPort(betPanelApi.IBetPanelPort);
            this.reelsPort = context.getUsedPort(reelsApi.IReelsPort);
            this.winlinesPort = context.getUsedPort(icyWildsWinLinesPort.IWinLinesPort);
            this.tensionPort = context.getUsedPort(icywildsComponentsTensionPort.ITensionPort);
            this.slotModelPort = context.getUsedPort(slotModelApi.ISlotModelPort);
            this.expandingWildsPort = context.getUsedPort(icyWildsComponentsExpandingWildsPort.IExpandingWildsPort);
            this.paytablePort = context.getUsedPort(paytableApi.IPaytablePort);
            this.gameLayoutPort = context.getUsedPort(gameLayoutApi.IGameLayoutPort);
            this.soundPort = context.getUsedPort(soundManagerApi.ISoundManagerPort);
            this.soundController = new icywildsGameController.SoundController(context, this.soundPort);
            this.infoBarPort = context.getUsedPort(infoBarApi.IInfoBarPort);
            this.winMeterPort = context.getUsedPort(winMeterApi.IWinMeterPort);
            this.freespinPanelPort = context.getUsedPort(icyWildsComponentsAnimationPort.IAnimationPort);
            this.setupStateMachine();
            context.getStarted().then(function(a) {
                _g.assemblyStarted = true;
                _g.checkGameLoaded();
            });
            icywildsGameController.ExternalService.assetRegistry.getAsset("game-config_json").getContent().then(function(data) {
                _g.config = data.gameControllerConfig;
                _g.checkGameLoaded();
            });
            ((function($this) {
                var $r;
                var this1 = context.getReferredComponents("animation");
                $r = this1.get("freespin");
                return $r;
            }(this))).then(function(fsp) {
                _g.freeSpinsPanel = fsp;
                _g.freespinPanelPort.getShown().subscribeForComponentInstance(_g.freeSpinsPanel, $bind(_g, _g.freeSpinsPanelAnimationShown));
                _g.freespinPanelPort.getTriggered().subscribeForComponentInstance(_g.freeSpinsPanel, $bind(_g, _g.freeSpinsPanelButtonClicked));
                _g.checkGameLoaded();
            });
            this.translationManager = icywildsGameController.ExternalService.getTranslationService();
            this.moneyFormatter = icywildsGameController.ExternalService.moneyFormatter;
        };
        icywildsGameController.GameController.__name__ = ["icywildsGameController", "GameController"];
        icywildsGameController.GameController.prototype.stateMachine = null;
        icywildsGameController.GameController.prototype.smDispatcher = null;
        icywildsGameController.GameController.prototype.smContext = null;
        icywildsGameController.GameController.prototype.model = null;
        icywildsGameController.GameController.prototype.config = null;
        icywildsGameController.GameController.prototype.translationManager = null;
        icywildsGameController.GameController.prototype.moneyFormatter = null;
        icywildsGameController.GameController.prototype.assemblyStarted = null;
        icywildsGameController.GameController.prototype.layoutUpdated = null;
        icywildsGameController.GameController.prototype.stopSpinRecieved = null;
        icywildsGameController.GameController.prototype.abortSpinPayload = null;
        icywildsGameController.GameController.prototype.freeSpinsPanel = null;
        icywildsGameController.GameController.prototype.betPanelPort = null;
        icywildsGameController.GameController.prototype.reelsPort = null;
        icywildsGameController.GameController.prototype.winlinesPort = null;
        icywildsGameController.GameController.prototype.tensionPort = null;
        icywildsGameController.GameController.prototype.slotModelPort = null;
        icywildsGameController.GameController.prototype.expandingWildsPort = null;
        icywildsGameController.GameController.prototype.paytablePort = null;
        icywildsGameController.GameController.prototype.gameLayoutPort = null;
        icywildsGameController.GameController.prototype.soundPort = null;
        icywildsGameController.GameController.prototype.infoBarPort = null;
        icywildsGameController.GameController.prototype.winMeterPort = null;
        icywildsGameController.GameController.prototype.resultPayload = null;
        icywildsGameController.GameController.prototype.promotionalSpinsActive = null;
        icywildsGameController.GameController.prototype.promotionalSpinsCount = null;
        icywildsGameController.GameController.prototype.paytableOpened = null;
        icywildsGameController.GameController.prototype.soundController = null;
        icywildsGameController.GameController.prototype.resultPresentedPublished = null;
        icywildsGameController.GameController.prototype.infoBarPlayingLinesAtBetTimer = null;
        icywildsGameController.GameController.prototype.freespinPanelPort = null;
        icywildsGameController.GameController.prototype.minRTP = null;
        icywildsGameController.GameController.prototype.maxRTP = null;
        icywildsGameController.GameController.prototype.singleRTP = null;
        icywildsGameController.GameController.prototype.maxSingleRTP = null;
        icywildsGameController.GameController.prototype.awardCap = null;
        icywildsGameController.GameController.prototype.Iframe = null;
        icywildsGameController.GameController.prototype.payLines = null;
        icywildsGameController.GameController.prototype.setupStateMachine = function() {
            this.smDispatcher = new stateMachineEngine.EventDispatcher();
            this.smContext = new icywildsGameController.StateMachineContext(this.smDispatcher);
            this.smContext.setupContextData(this);
            this.stateMachine = new stateMachineEngine.StateMachine(this.smDispatcher, icywildsGameController.StateMachineDef.ID);
            this.stateMachine.setContext(this.smContext);
            this.stateMachine.logLevel = 3;
            this.stateMachine.logPrefix = "[GAME_CONTROLLER]";
            this.stateMachine.dispatchGlobalStateChange = false;
            stateMachineEngine.FSMInjector.registerSM(this.stateMachine, icywildsGameController.StateMachineDef.FSM);
        };
        icywildsGameController.GameController.prototype.dispatchEvent = function(action) {
            this.smDispatcher.dispatchEvent(new stateMachineEngine.StateEvent(icywildsGameController.StateMachineDef.ID + stateMachineEngine.StateEvent.ACTION, action));
        };
        icywildsGameController.GameController.prototype.checkGameLoaded = function() {
            if (!this.assemblyStarted) return;
            if (!this.layoutUpdated) return;
            if (this.config == null) return;
            if (this.freeSpinsPanel == null) return;
            console.log("[LNX] [GAMECONTROLLER] [getGameLoaded]");
            this.slotModelPort.getStages().getInitStage().getGameLoaded().publish(null);
        };
        icywildsGameController.GameController.prototype.attachComponents = function() {
            console.log("[LN] attachComponents ");
            this.slotModelPort.getGameContext().getBalance().subscribe($bind(this, this.handleBalanceUpdate));
            this.slotModelPort.getGameContext().getGameOptionChangedFromPf().subscribe($bind(this, this.handleGameOptionChanged));
            this.slotModelPort.getStages().getInitStage().getInitializeGamePhase().getInitializeGame().subscribe($bind(this, this.handleSlotModelInitGame));
            this.slotModelPort.getStages().getResumeStage().getPrepareResume().subscribe($bind(this, this.handlePrepareResume));
            this.slotModelPort.getStages().getIdleStage().getConfirmSelectedStake().subscribe($bind(this, this.handleConfirmSelectedStake));
            this.slotModelPort.getStages().getIdleStage().getOpenPaytable().subscribe($bind(this, this.handleOpenPaytable));
            this.slotModelPort.getStages().getIdleStage().getOpenHelp().subscribe($bind(this, this.handleOpenHelp));
            this.slotModelPort.getStages().getSpinStage().getStartReelSpin().subscribe($bind(this, this.handleModelSpinStart));
            this.slotModelPort.getStages().getSpinStage().getOutcomePhase().getSpinOutcome().subscribe($bind(this, this.handleSpinOutcome));
            this.slotModelPort.getStages().getSpinStage().getStopReelSpin().subscribe($bind(this, this.handleModelSpinStop));
            this.slotModelPort.getStages().getSpinStage().getOutcomePhase().getPresentSpinOutcome().subscribe($bind(this, this.handleSpinOutcomePresent));
            this.slotModelPort.getStages().getAbortStage().getAbortSpin().subscribe($bind(this, this.handleAbortSpin));
            this.slotModelPort.getStages().getResultStage().getPresentResult().subscribe($bind(this, this.handlePresentResult));
            this.slotModelPort.getGameCommands().getSpinCommandAvailable().subscribe($bind(this, this.handleSpinCommandAvailable));
            this.slotModelPort.getGameCommands().getContinueCommandAvailable().subscribe($bind(this, this.handleContinueCommandAvailable));
            this.slotModelPort.getGameCommands().getPaytableCommandAvailable().subscribe($bind(this, this.handlePaytableCommandAvailable));
            this.slotModelPort.getGameCommands().getStakeCommandAvailable().subscribe($bind(this, this.handleStakeCommandAvailable));
            this.betPanelPort.onButtonPressed().subscribe($bind(this, this.onBetPanelButtonPressed));
            this.betPanelPort.onStakeChanged().subscribe($bind(this, this.onBetPanelStakeChanged));
            this.reelsPort.onReelStopped().subscribe($bind(this, this.onReelStopped));
            this.reelsPort.onSpinStopped().subscribe($bind(this, this.onSpinStopped));
            this.reelsPort.onStoppingStarted().subscribe($bind(this, this.onReelStoppingStarted));
            this.reelsPort.onStartSpinReelPictureExit().subscribe($bind(this, this.onReelOutcomeExit));
            this.winlinesPort.getCurrentWin().subscribe($bind(this, this.onWinLineAnimated));
            this.winlinesPort.getWinLineCycleAnimated().subscribe($bind(this, this.onWinLineCycleAnimated));
            this.winlinesPort.getWinSymbolsCreated().subscribe($bind(this, this.onWinLinesReady));
            this.gameLayoutPort.getGameLayoutUpdated().subscribe($bind(this, this.onGameLayoutUpdated));
            this.paytablePort.onCloseButtonPressed().subscribe($bind(this, this.onPaytableClose));
            this.paytablePort.onPageChanged().subscribe($bind(this, this.onPaytablePageChanged));
            this.winMeterPort.onDisplayWinFinished().subscribe($bind(this, this.onDisplayWinMeterFinished));
            window.addEventListener("closePaytable", $bind(this, this.onHTMLPaytableClose));
        };
        icywildsGameController.GameController.prototype.initGame = function() {
            this.betPanelPort.hideButton().publish(betPanelApi.EButton.SKIP);
            this.slotModelPort.getStages().getInitStage().getGameInitialized().publish(null);
        };
        icywildsGameController.GameController.prototype.showIntro = function() {
            this.dispatchEvent(icywildsGameController.StateMachineDef.INTRO_FINISHED_ACTION);
        };
        icywildsGameController.GameController.prototype.prepareResume = function() {
            var _g = this;
            this.betPanelPort.showButton().publish(betPanelApi.EButton.SPIN);
            this.betPanelPort.disableButton().publish(betPanelApi.EButton.SPIN);
            this.betPanelPort.disableButton().publish(betPanelApi.EButton.TOTAL_BET);
            this.betPanelPort.disableButton().publish(betPanelApi.EButton.PAYTABLE);
            this.soundController.setupResume();
            this.soundController.setGameMode(soundManagerApi.EGameMode.FreeSpin);
            this.updateBetPanelFS();
            _hcmn_.haxe_Timer.delay(function() {
                _g.slotModelPort.getStages().getResumeStage().getResumePrepared().publish(null);
            }, this.config.fs_NoWinSpinDelay);
        };
        icywildsGameController.GameController.prototype.onBaseGameIdle = function() {
            this.model.isBonusEnd = false;
            this.showSpinButton();
            this.betPanelPort.enableButton().publish(betPanelApi.EButton.SPIN);
            this.betPanelPort.hideButton().publish(betPanelApi.EButton.SKIP);
            this.resultPresentedPublished = false;
            this.showSpinInfoLabel();
        };
        icywildsGameController.GameController.prototype.updateBetPanel = function() {
            var _g = this;
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.RIGHT);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.LEFT);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.CENTRAL);
            this.winMeterPort.showMessage().publish(this.translationManager.stringLookup("GoodLuck"));
            this.infoBarPlayingLinesAtBetTimer = _hcmn_.haxe_Timer.delay(function() {
                _g.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.CENTRAL, _g.translationManager.stringLookup("PlayingLinesAtBet", [_g.model.stakeState.stakeItems.lineCount, _g.moneyFormatter.format(_g.model.stakeState.stakeItems.betPerLine)])));
            }, this.config.playingLinesAtBetMessageDelay);
        };
        icywildsGameController.GameController.prototype.updateBetPanelFS = function() {
            var current = this.model.spinOutcome.freeSpin.current + 1;
            var total = this.model.spinOutcome.freeSpin.total;
            this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.CENTRAL, this.translationManager.stringLookup("FreeSpinsOfTotal", [current, total])));
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.RIGHT);
            this.winMeterPort.showMessage().publish("");
            if (!this.moneyFormatter.isZero(this.model.spinOutcome.acumulatedPayout)) this.displayWin(this.model.spinOutcome.acumulatedPayout, this.model.spinOutcome.freeSpin.outcome.bigWin.winSegments, true, null, true);
        };
        icywildsGameController.GameController.prototype.clearAllWins = function() {
            this.abortSpinPayload = null;
            this.stopSpinRecieved = false;
            this.freespinPanelPort.getHide().publishForComponentInstance(this.freeSpinsPanel, null);
            this.winlinesPort.getHideOutcome().publish(null);
            this.infoBarPort.hideWinLineSummary().publish(null);
            this.model.oldWildReels = this.model.wildReels;
        };
        icywildsGameController.GameController.prototype.clearLowWins = function() {
            this.abortSpinPayload = null;
            this.stopSpinRecieved = false;
            this.winlinesPort.getHideOutcome().publish(null);
            this.infoBarPort.hideWinLineSummary().publish(null);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.RIGHT);
        };
        icywildsGameController.GameController.prototype.startSpin = function() {
            this.forcePaytableClose();
            this.reelsPort.startSpin().publish(new reelsApi.StartSpinPayload(this.model.startSpinPayload));
        };
        icywildsGameController.GameController.prototype.checkForStopOrAbort = function() {
            if (this.abortSpinPayload != null) this.dispatchEvent(icywildsGameController.StateMachineDef.ABORT_SPIN);
            else if (this.stopSpinRecieved) this.dispatchEvent(icywildsGameController.StateMachineDef.STOP_REEL_SPIN);
        };
        icywildsGameController.GameController.prototype.applyAbortData = function() {
            this.reelsPort.setReelPicture().publish(this.model.outcome.reelStop.reels);
            this.expandingWildsPort.getShow().publish(new icyWildsComponentsExpandingWildsPort.ShowPayload(this.model.wildReels, true, null, false));
            this.tensionPort.getShow().publish(new icywildsComponentsTensionPort.ShowTensionPayload(this.model.tensionReels, null, null, true));
            this.slotModelPort.getStages().getAbortStage().getSpinAborted().publish(null);
            this.winMeterPort.showMessage().publish("");
            if (this.infoBarPlayingLinesAtBetTimer != null) this.infoBarPlayingLinesAtBetTimer.stop();
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.RIGHT);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.LEFT);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.CENTRAL);
            this.infoBarPort.hideWinLineSummary().publish(null);
        };
        icywildsGameController.GameController.prototype.stopReels = function() {
            var _g = this;
            _hcmn_.haxe_Timer.delay(function() {
                _g.reelsPort.stopSpin().publish(new reelsApi.StopSpinPayload(_g.model.outcome.reelStop.reels, _g.model.tensionReels));
                _g.tensionPort.getShow().publish(new icywildsComponentsTensionPort.ShowTensionPayload(_g.model.tensionReels, null, true));
            }, 7);
        };
        icywildsGameController.GameController.prototype.showBaseGameWins = function() {
            this.freespinPanelPort.getHide().publishForComponentInstance(this.freeSpinsPanel, null);
            var loop = true;
            var showOutcomeOptions = new icyWildsWinLinesPort.ShowOutcomeOptions(this.config.winlineInterval, this.model.outcome, loop, null, {
                isReg: this.model.rgPresentation,
                isHighWin: this.model.isHighWin()
            });
            this.winlinesPort.getShowOutcome().publish(showOutcomeOptions);
        };
        icywildsGameController.GameController.prototype.displayBaseGameWin = function() {
            this.showWins(this.model.spinOutcome.baseGame.outcome.totalPayout, this.model.spinOutcome.baseGame.outcome.bigWin);
        };
        icywildsGameController.GameController.prototype.displayTotalWin = function() {
            this.soundController.stopSound("bg_loop");
            this.soundController.stopSound("fg_loop");
            this.showWins(this.resultPayload.totalWin, this.resultPayload.bigWin);
        };
        icywildsGameController.GameController.prototype.showWins = function(payout, bigWin, instantShow, startAmmount) {
            if (instantShow == null) instantShow = false;
            if (this.moneyFormatter.isZero(payout)) {
                this.winMeterPort.showMessage().publish("");
                return;
            }
            var isFS = false;
            if (this.model.spinOutcome.stage == "FreeSpin" && this.model.spinOutcome.nextStage == "BaseGame") isFS = true;
            this.displayWin(payout, bigWin.winSegments, instantShow, startAmmount, isFS);
            this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.RIGHT, this.translationManager.stringLookup("InfoTextRight", [this.moneyFormatter.format(payout)])));
        };
        icywildsGameController.GameController.prototype.showScatterWins = function() {
            var outcome = new slotModelApi.Outcome(this.model.outcome.reelStop, null, this.model.outcome.scatterWins, null, null, null);
            var showOutcomeOptions = new icyWildsWinLinesPort.ShowOutcomeOptions(this.config.winlineInterval, outcome, false, null, {
                isReg: this.model.rgPresentation,
                isHighWin: this.model.isHighWin()
            });
            this.winlinesPort.getShowOutcome().publish(showOutcomeOptions);
            this.model.lastAccumulatedPayout = this.model.spinOutcome.acumulatedPayout;
            if (this.moneyFormatter.isZero(this.model.spinOutcome.acumulatedPayout)) this.winMeterPort.showMessage().publish("");
            else this.displayWin(this.model.spinOutcome.acumulatedPayout, this.model.outcome.bigWin.winSegments, true);
            this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.LEFT, this.translationManager.stringLookup("FreeSpinsTriggered")));
            this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.CENTRAL, this.translationManager.stringLookup("FreeSpinsAwarded")));
        };
        icywildsGameController.GameController.prototype.startFSIntroAnim = function() {
            var _g = this;
            var introScreenData = new _hcmn_.haxe_ds_StringMap();
            var value = this.translationManager.stringLookup("Congratulations");
            if (_hcmn_.__map_reserved.FS_title != null) introScreenData.setReserved("FS_title", value);
            else introScreenData.h["FS_title"] = value;
            var value1 = this.translationManager.stringLookup("YouWin");
            if (_hcmn_.__map_reserved.FS_label1 != null) introScreenData.setReserved("FS_label1", value1);
            else introScreenData.h["FS_label1"] = value1;
            introScreenData.set("FS_label2", this.model.spinOutcome.freeSpin.awarded);
            var value2 = this.translationManager.stringLookup("FreeGames");
            if (_hcmn_.__map_reserved.FS_label3 != null) introScreenData.setReserved("FS_label3", value2);
            else introScreenData.h["FS_label3"] = value2;
            var value3 = this.translationManager.stringLookup("Start");
            if (_hcmn_.__map_reserved.startButtonLabel != null) introScreenData.setReserved("startButtonLabel", value3);
            else introScreenData.h["startButtonLabel"] = value3;
            this.freespinPanelPort.getShow().publishForComponentInstance(this.freeSpinsPanel, new icyWildsComponentsAnimationPort.ShowAnimationPayload("FREE_GAME_INTRO", "play_in", introScreenData));
            console.log("[am]startFSIntroAnim");
            this.soundController.setGameMode(soundManagerApi.EGameMode.FreeSpin);
            _hcmn_.haxe_Timer.delay(function() {
                _g.dispatchEvent(icywildsGameController.StateMachineDef.FS_INTRO_ENDED);
            }, this.config.fs_IntroScreenDuration);
            this.winlinesPort.getHideOutcome().publish(null);
            this.reelsPort.hide().publish(null);
            this.expandingWildsPort.getShow().publish(new icyWildsComponentsExpandingWildsPort.ShowPayload([0, 0, 0, 0, 0]));
        };
        icywildsGameController.GameController.prototype.prepareFreeSpin = function() {
            this.reelsPort.show().publish(null);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.LEFT);
            this.expandingWildsPort.getShow().publish(new icyWildsComponentsExpandingWildsPort.ShowPayload([0, 0, 0, 0, 0], true));
            this.model.setOutcome(this.model.spinOutcome.freeSpin.outcome);
            var showOutcomeOptions = new icyWildsWinLinesPort.ShowOutcomeOptions(this.config.fs_winlineInterval, this.model.outcome, false, null, {
                isReg: this.model.rgPresentation,
                isHighWin: this.model.isHighWin()
            });
            this.winlinesPort.getShowOutcome().publish(showOutcomeOptions);
            this.expandingWildsPort.getShow().publish(new icyWildsComponentsExpandingWildsPort.ShowPayload(this.model.wildReels, true));
            this.reelsPort.setReelPicture().publish(this.model.spinOutcome.freeSpin.outcome.reelStop.reels);
            this.freespinPanelPort.getHide().publishForComponentInstance(this.freeSpinsPanel, null);
        };
        icywildsGameController.GameController.prototype.displayFreeSpinWin = function() {
            var accumulatedPayout = this.model.spinOutcome.acumulatedPayout;
            var payout = this.model.spinOutcome.freeSpin.outcome.totalPayout;
            if (!this.moneyFormatter.isZero(payout)) {
                this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.RIGHT, this.translationManager.stringLookup("FreeSpinPays", [this.moneyFormatter.format(payout)])));
                var winSegments = this.model.spinOutcome.freeSpin.outcome.bigWin.winSegments;
                if (winSegments.length > 4) winSegments = [{
                    totalWin: payout,
                    winGroup: 6
                }];
                else if (winSegments.length > 2 && (function($this) {
                        var $r;
                        var this1 = $this.smContext.get_contextValues();
                        $r = this1.get("retrigger");
                        return $r;
                    }(this)) == true) {} else this.dispatchEvent(icywildsGameController.StateMachineDef.CONTINUE);
                this.displayWin(accumulatedPayout, winSegments, false, this.model.lastAccumulatedPayout, true);
            } else this.dispatchEvent(icywildsGameController.StateMachineDef.CONTINUE);
            this.model.lastAccumulatedPayout = accumulatedPayout;
        };
        icywildsGameController.GameController.prototype.showFreeSpinWins = function() {
            var showOutcomeOptions = new icyWildsWinLinesPort.ShowOutcomeOptions(this.config.fs_winlineInterval, this.model.outcome, false, null, {
                isReg: this.model.rgPresentation,
                isHighWin: this.model.isHighWin()
            });
            this.winlinesPort.getShowOutcome().publish(showOutcomeOptions);
        };
        icywildsGameController.GameController.prototype.showRetriggerScreen = function() {
            var _g = this;
            this.infoBarPort.hideWinLineSummary().publish(null);
            var retriggerData = new _hcmn_.haxe_ds_StringMap();
            var popupTime;
            if (this.model.spinOutcome.freeSpin.isMaxAwarded && this.model.spinOutcome.freeSpin.awarded == 0) {
                var value = this.translationManager.stringLookup("MaximumNumber");
                if (_hcmn_.__map_reserved.FS_title != null) retriggerData.setReserved("FS_title", value);
                else retriggerData.h["FS_title"] = value;
                var value1 = this.translationManager.stringLookup("OfFreeSpinsIs");
                if (_hcmn_.__map_reserved.FS_label1 != null) retriggerData.setReserved("FS_label1", value1);
                else retriggerData.h["FS_label1"] = value1;
                retriggerData.set("FS_label2", _hcmn_.Std.string(this.model.spinOutcome.freeSpin.total));
                var value2 = this.translationManager.stringLookup("NoMoreFreeSpins");
                if (_hcmn_.__map_reserved.FS_label3 != null) retriggerData.setReserved("FS_label3", value2);
                else retriggerData.h["FS_label3"] = value2;
                this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.CENTRAL, this.translationManager.stringLookup("MaximumAmountOfFreeSpins")));
                this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.RIGHT);
                this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.LEFT);
                popupTime = this.config.fs_MaxRetriggerScreenDuration;
            } else {
                var value3 = this.translationManager.stringLookup("Congratulations");
                if (_hcmn_.__map_reserved.FS_title != null) retriggerData.setReserved("FS_title", value3);
                else retriggerData.h["FS_title"] = value3;
                var value4 = this.translationManager.stringLookup("YouWinAdditional");
                if (_hcmn_.__map_reserved.FS_label1 != null) retriggerData.setReserved("FS_label1", value4);
                else retriggerData.h["FS_label1"] = value4;
                retriggerData.set("FS_label2", _hcmn_.Std.string(this.model.spinOutcome.freeSpin.awarded));
                var value5 = this.translationManager.stringLookup("FreeGames");
                if (_hcmn_.__map_reserved.FS_label3 != null) retriggerData.setReserved("FS_label3", value5);
                else retriggerData.h["FS_label3"] = value5;
                this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.LEFT, this.translationManager.stringLookup("FreeSpinsRetriggered")));
                this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.RIGHT, this.translationManager.stringLookup("AwardedFreespins", [this.model.spinOutcome.freeSpin.awarded])));
                popupTime = this.config.fs_RetriggerScreenDuration;
            }
            this.freespinPanelPort.getShow().publishForComponentInstance(this.freeSpinsPanel, new icyWildsComponentsAnimationPort.ShowAnimationPayload("FREE_GAME_INTRO", "play_retrigger", retriggerData));
            _hcmn_.haxe_Timer.delay(function() {
                _g.reelsPort.show().publish(null);
                _g.reelsPort.setReelPicture().publish(_g.model.outcome.reelStop.reels);
                _g.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.LEFT);
                _g.freespinPanelPort.getHide().publishForComponentInstance(_g.freeSpinsPanel, null);
                _g.dispatchEvent(icywildsGameController.StateMachineDef.RETRIGGER_SHOWN);
            }, popupTime);
            this.winlinesPort.getHideOutcome().publish(null);
            this.reelsPort.hide().publish(null);
            if (!this.moneyFormatter.isZero(this.model.spinOutcome.freeSpin.outcome.totalPayout)) this.displayWin(this.model.spinOutcome.acumulatedPayout, this.model.spinOutcome.freeSpin.outcome.bigWin.winSegments, true, null, true);
        };
        icywildsGameController.GameController.prototype.startFSOutroAnim = function() {
            var _g = this;
            _hcmn_.haxe_Timer.delay(function() {
                var outroScreenData = new _hcmn_.haxe_ds_StringMap();
                if (_g.moneyFormatter.isZero(_g.model.spinOutcome.acumulatedFreeSpinPayout)) {
                    var value = _g.translationManager.stringLookup("GameOver");
                    if (_hcmn_.__map_reserved.FS_title != null) outroScreenData.setReserved("FS_title", value);
                    else outroScreenData.h["FS_title"] = value;
                    if (_hcmn_.__map_reserved.FS_label1 != null) outroScreenData.setReserved("FS_label1", "");
                    else outroScreenData.h["FS_label1"] = "";
                    if (_hcmn_.__map_reserved.FS_label2 != null) outroScreenData.setReserved("FS_label2", "");
                    else outroScreenData.h["FS_label2"] = "";
                    if (_hcmn_.__map_reserved.FS_label3 != null) outroScreenData.setReserved("FS_label3", "");
                    else outroScreenData.h["FS_label3"] = "";
                } else {
                    var value1 = _g.translationManager.stringLookup("Congratulations");
                    if (_hcmn_.__map_reserved.FS_title != null) outroScreenData.setReserved("FS_title", value1);
                    else outroScreenData.h["FS_title"] = value1;
                    var value2 = _g.translationManager.stringLookup("YouWin");
                    if (_hcmn_.__map_reserved.FS_label1 != null) outroScreenData.setReserved("FS_label1", value2);
                    else outroScreenData.h["FS_label1"] = value2;
                    var value3 = _g.moneyFormatter.format(_g.model.spinOutcome.acumulatedFreeSpinPayout);
                    if (_hcmn_.__map_reserved.FS_label2 != null) outroScreenData.setReserved("FS_label2", value3);
                    else outroScreenData.h["FS_label2"] = value3;
                    if (_hcmn_.__map_reserved.FS_label3 != null) outroScreenData.setReserved("FS_label3", "");
                    else outroScreenData.h["FS_label3"] = "";
                    _g.displayWin(_g.model.spinOutcome.acumulatedPayout, null, true, null, true);
                }
                _g.freespinPanelPort.getShow().publishForComponentInstance(_g.freeSpinsPanel, new icyWildsComponentsAnimationPort.ShowAnimationPayload("FREE_GAME_INTRO", "play_out", outroScreenData));
                _g.infoBarPort.hideWinLineSummary().publish(null);
                _g.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.RIGHT);
                _g.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.LEFT);
                _g.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.CENTRAL, _g.translationManager.stringLookup("FreeSpinsEnded")));
                _g.model.isBonusEnd = true;
                _hcmn_.haxe_Timer.delay(function() {
                    _g.reelsPort.show().publish(null);
                    _g.freespinPanelPort.getHide().publishForComponentInstance(_g.freeSpinsPanel, null);
                    _g.dispatchEvent(icywildsGameController.StateMachineDef.FS_OUTRO_END);
                }, _g.config.fs_SummaryDuration);
                _g.winlinesPort.getHideOutcome().publish(null);
                _g.reelsPort.hide().publish(null);
                _g.expandingWildsPort.getShow().publish(new icyWildsComponentsExpandingWildsPort.ShowPayload([0, 0, 0, 0, 0]));
            }, this.moneyFormatter.isZero(this.model.outcome.totalPayout) ? this.config.fs_NoWinSpinDelay : 0);
        };
        icywildsGameController.GameController.prototype.setBaseGameOutcome = function() {
            var _g = this;
            if ((function($this) {
                    var $r;
                    var this1 = $this.smContext.get_contextValues();
                    $r = this1.get("awardCapExceeded");
                    return $r;
                }(this)) == true) _hcmn_.haxe_Timer.delay(function() {
                _g.model.setOutcome(_g.model.spinOutcome.baseGame.outcome);
                console.log("[GAME_CONTROLLER] setBaseGameOutcome.expandingWildsPort.delayed");
                _g.expandingWildsPort.getShow().publish(new icyWildsComponentsExpandingWildsPort.ShowPayload(_g.model.wildReels, true));
                _g.reelsPort.setReelPicture().publish(_g.model.outcome.reelStop.reels);
                _g.soundController.setGameMode(soundManagerApi.EGameMode.BaseGame);
            }, 300);
            else {
                this.model.setOutcome(this.model.spinOutcome.baseGame.outcome);
                console.log("[GAME_CONTROLLER] setBaseGameOutcome.expandingWildsPort");
                this.expandingWildsPort.getShow().publish(new icyWildsComponentsExpandingWildsPort.ShowPayload(this.model.wildReels, true));
                this.reelsPort.setReelPicture().publish(this.model.outcome.reelStop.reels);
                this.soundController.setGameMode(soundManagerApi.EGameMode.BaseGame);
            }
        };
        icywildsGameController.GameController.prototype.showSkipButton = function() {
            this.betPanelPort.showButton().publish(betPanelApi.EButton.SKIP);
        };
        icywildsGameController.GameController.prototype.showSpinButton = function() {
            this.betPanelPort.showButton().publish(betPanelApi.EButton.SPIN);
        };
        icywildsGameController.GameController.prototype.publishSpinOutcomePresented = function() {
            this.slotModelPort.getStages().getSpinStage().getOutcomePhase().getSpinOutcomePresented().publish(null);
        };
        icywildsGameController.GameController.prototype.executeContinueCommand = function() {
            var _g = this;
            console.log("[GAME_CONTROLLER] executeContinueCommand:stage:" + this.model.spinOutcome.stage);
            if (this.model.spinOutcome.stage == "FreeSpin") {
                var payout = this.model.spinOutcome.freeSpin.outcome.totalPayout;
                if (this.moneyFormatter.isZero(payout) || this.abortSpinPayload != null) _hcmn_.haxe_Timer.delay(function() {
                    _g.slotModelPort.getGameCommands().getContinueCommandExecuted().publish(null);
                }, this.config.fs_NoWinSpinDelay);
                else this.slotModelPort.getGameCommands().getContinueCommandExecuted().publish(null);
            } else _hcmn_.haxe_Timer.delay(function() {
                _g.slotModelPort.getGameCommands().getContinueCommandExecuted().publish(null);
            }, this.config.fs_FirstSpinDelay);
        };
        icywildsGameController.GameController.prototype.publishResultPresented = function() {
            if ((function($this) {
                    var $r;
                    var this1 = $this.smContext.get_contextValues();
                    $r = this1.get("awardCapExceeded");
                    return $r;
                }(this)) == true || this.moneyFormatter.isZero(this.resultPayload.totalWin)) this.publishResultPresented2();
            else if (this.model.rgPresentation) {
                if (!this.model.isHighWin()) this.publishResultPresented2();
                else this.showSkipButton();
            } else this.showSkipButton();
        };
        icywildsGameController.GameController.prototype.publishResultPresented2 = function() {
            if (this.resultPresentedPublished) return;
            this.slotModelPort.getStages().getResultStage().getResultPresented().publish(null);
            this.resultPresentedPublished = true;
        };
        icywildsGameController.GameController.prototype.showAwardCapScreen = function() {
            var _g = this;
            console.log("MAX_AWARDEDED");
            this.soundController.handleMaxAward();
            var awardCapScreenData = new _hcmn_.haxe_ds_StringMap();
            var value = this.translationManager.stringLookup("AwardCapTitle");
            if (_hcmn_.__map_reserved.FS_title != null) awardCapScreenData.setReserved("FS_title", value);
            else awardCapScreenData.h["FS_title"] = value;
            var value1 = this.translationManager.stringLookup("AwardCapText");
            if (_hcmn_.__map_reserved.FS_label1 != null) awardCapScreenData.setReserved("FS_label1", value1);
            else awardCapScreenData.h["FS_label1"] = value1;
            var value2 = this.moneyFormatter.format(this.resultPayload.totalWin);
            if (_hcmn_.__map_reserved.FS_label2 != null) awardCapScreenData.setReserved("FS_label2", value2);
            else awardCapScreenData.h["FS_label2"] = value2;
            if (this.model.spinOutcome.stage == "FreeSpin") {
                var value3 = this.translationManager.stringLookup("AwardCapFreeSpins");
                if (_hcmn_.__map_reserved.FS_label3 != null) awardCapScreenData.setReserved("FS_label3", value3);
                else awardCapScreenData.h["FS_label3"] = value3;
            } else if (_hcmn_.__map_reserved.FS_label3 != null) awardCapScreenData.setReserved("FS_label3", "");
            else awardCapScreenData.h["FS_label3"] = "";
            var value4 = this.translationManager.stringLookup("AwardCapButton");
            if (_hcmn_.__map_reserved.startButtonLabel != null) awardCapScreenData.setReserved("startButtonLabel", value4);
            else awardCapScreenData.h["startButtonLabel"] = value4;
            this.freespinPanelPort.getShow().publishForComponentInstance(this.freeSpinsPanel, new icyWildsComponentsAnimationPort.ShowAnimationPayload("FREE_GAME_INTRO", "play_retrigger", awardCapScreenData));
            this.displayWin(this.resultPayload.totalWin, this.resultPayload.bigWin.winSegments, true);
            this.winlinesPort.getHideOutcome().publish(null);
            _hcmn_.haxe_Timer.delay(function() {
                _g.dispatchEvent(icywildsGameController.StateMachineDef.CONTINUE);
            }, this.config.maxAwardSpinEnabledDelay);
        };
        icywildsGameController.GameController.prototype.handleBalanceUpdate = function(e) {
            console.log("[GAME_CONTROLLER] handleBalanceUpdate");
            var payload = e.getPayload();
            if (payload.freespin != null) {
                console.log("GAME_CONTORLLER -> PROMOFREESPINS AWARDED:" + payload.freespin);
                this.promotionalSpinsActive = true;
                this.promotionalSpinsCount = payload.freespin;
                this.betPanelPort.setBalance().publish(this.translationManager.stringLookup("BalanceValueNotAvailable"));
                this.betPanelPort.disableButton().publish(betPanelApi.EButton.TOTAL_BET);
            } else this.betPanelPort.setBalance().publish(payload.balance);
        };
        icywildsGameController.GameController.prototype.handleGameOptionChanged = function(e) {
            var type = e.getPayload().key;
            var value = _hcmn_.Std.parseInt(e.getPayload().value);
            if (type == "sound") {
                if (value == 0) this.betPanelPort.enableButton().publish(betPanelApi.EButton.SOUND_ON);
                else this.betPanelPort.disableButton().publish(betPanelApi.EButton.SOUND_OFF);
            }
        };
        icywildsGameController.GameController.prototype.handleSlotModelInitGame = function(e) {
            var _g = this;
            console.log("[LN] handleSlotModelInitGame ");
            this.model.rgPresentation = e.getPayload().riskControlSettings.rgPresentation;
            this.applyPresentationInitialization(e.getPayload());
            this.betPanelPort.hideButton().publish(betPanelApi.EButton.SKIP);
            this.minRTP = e.getPayload().slotDefinition.rtp.minRTP;
            this.maxRTP = e.getPayload().slotDefinition.rtp.maxRTP;
            this.maxSingleRTP = e.getPayload().slotDefinition.rtp.maxSingleRTP;
            this.singleRTP = e.getPayload().slotDefinition.rtp.singleRTP;
            this.awardCap = e.getPayload().riskControlSettings.awardCap;
            var decimalSeparator = icywildsGameController.ExternalService.getTranslationService().stringLookup("rtpDecimalSeparator");
            if (decimalSeparator != null && decimalSeparator != "rtpDecimalSeparator") {
                if (this.minRTP != null) this.minRTP = _hcmn_.StringTools.replace(this.minRTP, ".", decimalSeparator);
                else this.minRTP = null;
                if (this.maxRTP != null) this.maxRTP = _hcmn_.StringTools.replace(this.maxRTP, ".", decimalSeparator);
                else this.maxRTP = null;
                if (this.maxSingleRTP != null) this.maxSingleRTP = _hcmn_.StringTools.replace(this.maxSingleRTP, ".", decimalSeparator);
                else this.maxSingleRTP = null;
            }
            this.payLines = this.model.parsePayLines(icywildsGameController.Data.PatternInfo);
            var iframe = window.document.getElementById("paytableInstance").firstChild;
            iframe.onload = function() {
                _g.Iframe = iframe;
                _g.placePaytableTexts();
                _g.createPaylinesTables("baseGame", "bg", 4, 5, 1);
            };
            this.dispatchEvent(icywildsGameController.StateMachineDef.INIT_ACTION);
        };
        icywildsGameController.GameController.prototype.placePaytableTexts = function() {
            this.setRTPValues();
            this.setAwardCapValue();
        };
        icywildsGameController.GameController.prototype.setRTPValues = function() {
            if (this.singleRTP != null && this.singleRTP) {
                this.setPaytableText("multipleRTP", "", "display:none;");
                this.setPaytableText("maxSingleRTP", this.maxSingleRTP);
            } else {
                this.setPaytableText("singleRTP", "", "display:none;");
                this.setPaytableText("minRTP", this.minRTP);
                this.setPaytableText("maxRTP", this.maxRTP);
            }
        };
        icywildsGameController.GameController.prototype.setAwardCapValue = function() {
            var showDecimalValueInAwardCap = false;
            var formattedAwardCap = icywildsGameController.ExternalService.moneyFormatter.format(this.awardCap);
            this.setPaytableText("awardcap", formattedAwardCap);
        };
        icywildsGameController.GameController.prototype.setPaytableText = function(div, texts, style) {
            var paytableDiv = this.Iframe.contentDocument.getElementById(div);
            if (paytableDiv != null) {
                paytableDiv.innerText = texts;
                if (style != null) paytableDiv.setAttribute("style", style);
            }
        };
        icywildsGameController.GameController.prototype.handlePrepareResume = function(e) {
            console.log("[GAME_CONTROLLER] handlePrepareResume");
            var resumePayload = e.getPayload();
            this.applyPresentationInitialization(resumePayload.initializationProperties);
            this.model.setSpinOutcome(resumePayload.spinOutcome);
            this.applyStakeItemsWithTotalBet(resumePayload.stake);
            this.model.rgPresentation = e.getPayload().initializationProperties.riskControlSettings.rgPresentation;
            this.dispatchEvent(icywildsGameController.StateMachineDef.PREPARE_RESUME);
        };
        icywildsGameController.GameController.prototype.applyPresentationInitialization = function(payload) {
            this.applyStakeItemsWithTotalBet(payload.defaultStake);
        };
        icywildsGameController.GameController.prototype.handleConfirmSelectedStake = function(e) {
            this.winMeterPort.showMessage().publish("");
            this.freespinPanelPort.getHide().publishForComponentInstance(this.freeSpinsPanel, null);
            this.applyStakeItemsWithTotalBet(e.getPayload());
        };
        icywildsGameController.GameController.prototype.applyStakeItemsWithTotalBet = function(stakeState) {
            console.log("[GAME_CONTROLLER] applyStakeItemsWithTotalBet");
            this.winlinesPort.getHideOutcome().publish(null);
            this.expandingWildsPort.getShow().publish(new icyWildsComponentsExpandingWildsPort.ShowPayload([0, 0, 0, 0, 0], true));
            this.model.setOutcome(stakeState.outcome);
            this.model.setCurrentStake(stakeState);
            console.log("[GAME_CONTROLLER] applyStakeItemsWithTotalBet.expandingWildsPort");
            this.expandingWildsPort.getShow().publish(new icyWildsComponentsExpandingWildsPort.ShowPayload(this.model.wildReels, true));
            this.reelsPort.setReelPicture().publish(this.model.outcome.reelStop.reels);
            this.betPanelPort.setStake().publish(stakeState);
            this.winMeterPort.showMessage().publish("");
            this.resultPayload = null;
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.RIGHT);
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.LEFT);
            this.infoBarPort.hideWinLineSummary().publish(null);
        };
        icywildsGameController.GameController.prototype.handleSpinCommandAvailable = function(e) {
            if (e.getPayload()) this.dispatchEvent(icywildsGameController.StateMachineDef.SPIN_ENABLED);
            else this.betPanelPort.disableButton().publish(betPanelApi.EButton.SPIN);
        };
        icywildsGameController.GameController.prototype.handleStakeCommandAvailable = function(e) {
            if (e.getPayload()) {
                if (!this.promotionalSpinsActive) this.betPanelPort.enableButton().publish(betPanelApi.EButton.TOTAL_BET);
            } else this.betPanelPort.disableButton().publish(betPanelApi.EButton.TOTAL_BET);
        };
        icywildsGameController.GameController.prototype.handleModelSpinStart = function(e) {
            this.model.startSpinPayload = e.getPayload();
            this.dispatchEvent(icywildsGameController.StateMachineDef.START_REEL_SPIN);
        };
        icywildsGameController.GameController.prototype.handleSpinOutcome = function(e) {
            this.model.setSpinOutcome(e.getPayload());
            this.smContext.setContextValue("Stage", e.getPayload().stage);
            this.smContext.setContextValue("NextStage", e.getPayload().nextStage);
            this.smContext.setContextValue("awardCapExceeded", e.getPayload().awardCapExceeded);
            if (e.getPayload().stage == "FreeSpin") this.smContext.setContextValue("retrigger", this.model.spinOutcome.freeSpin.isIncrementTriggered);
        };
        icywildsGameController.GameController.prototype.handleModelSpinStop = function(e) {
            if (this.stateMachine.isInState(icywildsGameController.StateMachineDef.SPINNING_STATE)) this.dispatchEvent(icywildsGameController.StateMachineDef.STOP_REEL_SPIN);
            else this.stopSpinRecieved = true;
        };
        icywildsGameController.GameController.prototype.handleAbortSpin = function(e) {
            this.abortSpinPayload = e.getPayload();
            if (this.stateMachine.isInState(icywildsGameController.StateMachineDef.SPINNING_STATE)) this.dispatchEvent(icywildsGameController.StateMachineDef.ABORT_SPIN);
        };
        icywildsGameController.GameController.prototype.handleSpinOutcomePresent = function(e) {
            this.dispatchEvent(icywildsGameController.StateMachineDef.PRESENT_SPIN_OUTCOME);
        };
        icywildsGameController.GameController.prototype.handlePresentResult = function(e) {
            this.resultPayload = e.getPayload();
            this.dispatchEvent(icywildsGameController.StateMachineDef.PRESENT_RESULT);
        };
        icywildsGameController.GameController.prototype.handleContinueCommandAvailable = function(e) {
            if (e.getPayload()) this.dispatchEvent(icywildsGameController.StateMachineDef.CONTINUE_ENABLED);
        };
        icywildsGameController.GameController.prototype.handlePaytableCommandAvailable = function(e) {
            if (!e.getPayload()) this.betPanelPort.disableButton().publish(betPanelApi.EButton.PAYTABLE);
            else this.betPanelPort.enableButton().publish(betPanelApi.EButton.PAYTABLE);
        };
        icywildsGameController.GameController.prototype.handleOpenPaytable = function(e) {
            if (this.paytableOpened) {
                this.onPaytableClose();
                return;
            }
            this.paytableOpened = true;
            this.freespinPanelPort.getHide().publishForComponentInstance(this.freeSpinsPanel, null);
            this.paytablePort.show().publish(null);
            this.reelsPort.hide().publish(null);
            this.winlinesPort.setVisible().publish(false);
            this.expandingWildsPort.getShow().publish(new icyWildsComponentsExpandingWildsPort.ShowPayload([0, 0, 0, 0, 0]));
            if (this.resultPayload != null && this.abortSpinPayload == null && !this.moneyFormatter.isZero(this.resultPayload.totalWin)) this.displayWin(this.resultPayload.totalWin, this.resultPayload.bigWin.winSegments, true);
            this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.CENTRAL, ""));
        };
        icywildsGameController.GameController.prototype.handleOpenHelp = function(e) {
            var _g = this;
            this.soundController.closePaytable();
            if (this.paytableOpened) {
                this.onPaytableClose();
                return;
            }
            _hcmn_.Reflect.setProperty(window, "closeHelp", function() {
                var frame = window.document.getElementById("rulesInstance");
                frame.style.display = "none";
                _g.soundController.closePaytable();
                var node = frame.parentNode;
                node.removeChild(frame);
                node = null;
            });
        };
        icywildsGameController.GameController.prototype.onGameLayoutUpdated = function(event) {
            if (this.layoutUpdated) return;
            this.layoutUpdated = true;
            this.checkGameLoaded();
        };
        icywildsGameController.GameController.prototype.onBetPanelButtonPressed = function(e) {
            var button = e.getPayload();
            switch (button[1]) {
                case 1:
                    this.slotModelPort.getGameCommands().getSpinCommandExecuted().publish(null);
                    break;
                case 3:
                    if (this.stateMachine.get_currentStateName() == icywildsGameController.StateMachineDef.BET_CONFIRM) {
                        this.betPanelPort.showButton().publish(betPanelApi.EButton.SPIN);
                        this.betPanelPort.disableButton().publish(betPanelApi.EButton.SPIN);
                        this.betPanelPort.hideButton().publish(betPanelApi.EButton.SKIP);
                        this.publishResultPresented2();
                        this.displayWin(this.resultPayload.totalWin, this.resultPayload.bigWin.winSegments, true);
                    } else this.dispatchEvent(icywildsGameController.StateMachineDef.FS_OUTCOME_DONE);
                    break;
                case 5:
                    this.slotModelPort.getGameCommands().getPaytableCommandExecuted().publish(null);
                    break;
                case 6:
                    this.paytablePort.setNextPage().publish(null);
                    break;
                case 7:
                    this.paytablePort.setPreviousPage().publish(null);
                    break;
                case 8:
                    this.onPaytableClose(null);
                    break;
                case 9:
                    this.slotModelPort.getGameContext().getGameOptionChangedFromGf().publish(new slotModelApi.Pair("sound", "1"));
                    break;
                case 10:
                    this.slotModelPort.getGameContext().getGameOptionChangedFromGf().publish(new slotModelApi.Pair("sound", "0"));
                    break;
                default:
                    console.log("Not Implemented");
            }
        };
        icywildsGameController.GameController.prototype.onPaytableClose = function(e) {
            this.paytableOpened = false;
            this.paytablePort.hide().publish(null);
            this.betPanelPort.hidePaytableControl().publish(null);
            this.reelsPort.show().publish(null);
            this.winlinesPort.setVisible().publish(true);
            console.log("[GAME_CONTROLLER] onPaytableClose.expandingWildsPort");
            this.expandingWildsPort.getShow().publish(new icyWildsComponentsExpandingWildsPort.ShowPayload(this.model.wildReels, true));
            this.showSpinInfoLabel();
        };
        icywildsGameController.GameController.prototype.forcePaytableClose = function() {
            this.paytableOpened = false;
            this.paytablePort.hide().publish(null);
            this.betPanelPort.hidePaytableControl().publish(null);
            this.reelsPort.show().publish(null);
            this.expandingWildsPort.getShow().publish(new icyWildsComponentsExpandingWildsPort.ShowPayload(this.model.wildReels, true));
        };
        icywildsGameController.GameController.prototype.onPaytablePageChanged = function(e) {
            this.betPanelPort.showPaytableControl().publish(e.getPayload());
        };
        icywildsGameController.GameController.prototype.onHTMLPaytableClose = function(e) {
            this.onPaytableClose(null);
            this.soundController.closePaytable();
        };
        icywildsGameController.GameController.prototype.onDisplayWinMeterFinished = function(e) {
            if (this.stateMachine.get_currentStateName() == icywildsGameController.StateMachineDef.SHOW_WIN_STATE) this.dispatchEvent(icywildsGameController.StateMachineDef.CONTINUE);
            else if (this.stateMachine.get_currentStateName() == icywildsGameController.StateMachineDef.BET_CONFIRM) this.publishResultPresented2();
        };
        icywildsGameController.GameController.prototype.onBetPanelStakeChanged = function(e) {
            this.slotModelPort.getGameCommands().getStakeCommandExecuted().publish(e.getPayload());
        };
        icywildsGameController.GameController.prototype.onReelOutcomeExit = function(e) {
            console.log("[GAME_CONTROLLER] onReelOutcomeExit");
            if (e.getPayload() == 0) {
                var wildsOff = [];
                var _g1 = 0;
                var _g = this.model.wildReels.length;
                while (_g1 < _g) {
                    var i = _g1++;
                    wildsOff[i] = this.model.oldWildReels[i];
                    if (wildsOff[i] == icyWildsComponentsExpandingWildsPort.ShowType.expandingwild || wildsOff[i] == icyWildsComponentsExpandingWildsPort.ShowType.expandingwildgold) wildsOff[i] = icyWildsComponentsExpandingWildsPort.ShowType.none;
                }
                console.log("[GAME_CONTROLLER] onReelOutcomeExit.expandingWildsPort.wildsOff:" + _hcmn_.Std.string(wildsOff));
                this.expandingWildsPort.getShow().publish(new icyWildsComponentsExpandingWildsPort.ShowPayload(wildsOff));
                this.dispatchEvent(icywildsGameController.StateMachineDef.SPIN_STARTING_ENDED);
            }
        };
        icywildsGameController.GameController.prototype.onReelStoppingStarted = function(e) {
            if (this.model.hasWilds) this.soundController.playWild();
            var spinningWildOutcome = [];
            var _g1 = 0;
            var _g = this.model.wildReels.length;
            while (_g1 < _g) {
                var i = _g1++;
                spinningWildOutcome[i] = this.model.wildReels[i];
                if (spinningWildOutcome[i] == icyWildsComponentsExpandingWildsPort.ShowType.expandingwildgold) spinningWildOutcome[i] = icyWildsComponentsExpandingWildsPort.ShowType.expandingwild;
                else if (spinningWildOutcome[i] == icyWildsComponentsExpandingWildsPort.ShowType.announcement) spinningWildOutcome[i] = icyWildsComponentsExpandingWildsPort.ShowType.none;
            }
            console.log("[GAME_CONTROLLER] onReelStoppingStarted.expandingWildsPort");
            this.expandingWildsPort.getShow().publish(new icyWildsComponentsExpandingWildsPort.ShowPayload(spinningWildOutcome));
        };
        icywildsGameController.GameController.prototype.onReelStopped = function(e) {
            console.log("[GAME_CONTROLLER] onReelStopped");
            var reelId = e.getPayload();
            var showOutcomeOptions = new icyWildsWinLinesPort.ShowOutcomeOptions(1000, this.model.outcome, false, this.model.landingSymbols, null);
            showOutcomeOptions.reelStopped = reelId;
            this.winlinesPort.getHandleLandingSymbols().publish(showOutcomeOptions);
            console.log("[GAME_CONTROLLER] onReelStopped.expandingWildsPort");
            this.expandingWildsPort.getShow().publish(new icyWildsComponentsExpandingWildsPort.ShowPayload(this.model.wildReels, false, reelId, true));
            if (this.model.hasTension) {
                this.tensionPort.getShow().publish(new icywildsComponentsTensionPort.ShowTensionPayload(this.model.tensionReels, reelId));
                if (this.model.tensionReels[reelId + 1] != null && this.model.tensionReels[reelId + 1] == 1) this.soundController.playTension();
            }
            if (this.model.spinOutcome != null && this.model.spinOutcome.stage == "BaseGame" && reelId == 0) this.winMeterPort.showMessage().publish("");
        };
        icywildsGameController.GameController.prototype.onSpinStopped = function(e) {
            console.log("GAME CONTROLLER --> onReelSpinStopped -->");
            if (this.stateMachine.isInState(icywildsGameController.StateMachineDef.STOPPING_STATE)) {
                console.log("[GAME_CONTROLLER] onSpinStopped.ifIsInStoppingState.expandingWildsPort");
                this.expandingWildsPort.getShow().publish(new icyWildsComponentsExpandingWildsPort.ShowPayload(this.model.wildReels, true, null, false));
                this.tensionPort.getShow().publish(new icywildsComponentsTensionPort.ShowTensionPayload(this.model.tensionReels, null, null, true));
                if (this.model.hasAnnouncement) this.soundController.playWildSparkle();
                this.slotModelPort.getStages().getSpinStage().getReelSpinFinished().publish(null);
            } else this.slotModelPort.getStages().getAbortStage().getSpinAborted().publish(null);
        };
        icywildsGameController.GameController.prototype.freeSpinsPanelAnimationShown = function(e) {
            console.log("::im GAME_CONTROLLER --> freeSpinsPanelAnimationShown:" + e.getPayload());
            if (this.stateMachine.get_currentStateName() == icywildsGameController.StateMachineDef.FS_INTRO) {
                if (e.getPayload() == "FREE_GAME_INTRO:intro_created") {
                    console.log("::im GAME_CONTROLLER --> freeSpinsPanelAnimationShown:" + e.getPayload() + " - HIDE ALL");
                    this.winlinesPort.getHideOutcome().publish(null);
                    this.reelsPort.hide().publish(null);
                    this.expandingWildsPort.getShow().publish(new icyWildsComponentsExpandingWildsPort.ShowPayload([0, 0, 0, 0, 0]));
                }
            }
        };
        icywildsGameController.GameController.prototype.freeSpinsPanelButtonClicked = function(e) {
            console.log("GAME_CONTROLLER --> freeSpinsPanelButtonClicked:" + e.getPayload());
            if (this.stateMachine.get_currentStateName() == icywildsGameController.StateMachineDef.FS_INTRO) this.dispatchEvent(icywildsGameController.StateMachineDef.FS_INTRO_ENDED);
        };
        icywildsGameController.GameController.prototype.onWinLineCycleAnimated = function(e) {
            var _g = this.stateMachine.get_currentStateName();
            switch (_g) {
                case "SHOW_FS_WIN":
                    this.dispatchEvent(icywildsGameController.StateMachineDef.FS_WIN_SHOWN);
                    break;
                case "FS_OUTCOME":
                    this.dispatchEvent(icywildsGameController.StateMachineDef.FS_OUTCOME_DONE);
                    break;
                case "IDLE_STATE":
                    if (this.model.rgPresentation) {
                        if (!this.model.isHighWin()) this.clearLowWins();
                    }
                    break;
            }
        };
        icywildsGameController.GameController.prototype.onWinLineAnimated = function(e) {
            var win = e.getPayload();
            if (win.type == "Scatter") {
                this.infoBarPort.hideWinLineSummary().publish(null);
                var acumulatedFreeSpinsPayout = this.model.spinOutcome.acumulatedFreeSpinPayout;
                if ((function($this) {
                        var $r;
                        var this1 = $this.smContext.get_contextValues();
                        $r = this1.get("retrigger");
                        return $r;
                    }(this)) == false) {
                    if (!this.moneyFormatter.isZero(acumulatedFreeSpinsPayout)) this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.LEFT, this.translationManager.stringLookup("FreeSpinsWin", [this.moneyFormatter.format(acumulatedFreeSpinsPayout)])));
                } else this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.LEFT, this.translationManager.stringLookup("FreeSpinsRetriggered")));
                return;
            }
            this.infoBarPort.hideLabel().publish(infoBarApi.InfoBarLabelEnum.LEFT);
            var linePicture;
            var _g = [];
            var _g1 = 0;
            while (_g1 < 5) {
                var i = _g1++;
                _g.push("-");
            }
            linePicture = _g;
            var _g2 = 0;
            var _g11 = win.symbolCount;
            while (_g2 < _g11) {
                var k = _g2++;
                linePicture[win.position + k] = win.winningSymbol;
            }
            this.infoBarPort.showWinLineSummary().publish(new infoBarApi.WinLineSummaryPayload(linePicture, win.lineId == null ? "null" : "" + win.lineId, this.moneyFormatter.format(win.payout)));
        };
        icywildsGameController.GameController.prototype.onWinLinesReady = function(e) {
            if (this.stateMachine.get_currentStateName() == icywildsGameController.StateMachineDef.SHOW_FS_WIN) this.reelsPort.setReelCellsVisibility().publish(this.model.getVisibilityForScatterWins());
            else this.reelsPort.setReelCellsVisibility().publish(this.model.getVisibilityForAllWins());
        };
        icywildsGameController.GameController.prototype.showSpinInfoLabel = function() {
            if (this.promotionalSpinsActive) this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.CENTRAL, this.translationManager.stringLookup("PromotionalSpinsLeft") + " " + this.promotionalSpinsCount));
            else this.infoBarPort.showLabel().publish(new infoBarApi.LabelContentPayload(infoBarApi.InfoBarLabelEnum.CENTRAL, this.translationManager.stringLookup("SpinInfoLabel")));
        };
        icywildsGameController.GameController.prototype.displayWin = function(winAmount, winSegments, instant, startingAmount, isFS) {
            if (isFS == null) isFS = false;
            if (instant == null) instant = false;
            var instantShow = instant;
            if (this.model.rgPresentation) {
                if (!this.model.isHighWin()) instantShow = true;
            }
            var payload = new winMeterApi.WinMeterPayload(winAmount, winSegments, instantShow, startingAmount);
            this.winMeterPort.displayWin().publish(payload);
        };
        icywildsGameController.GameController.prototype.createPaylinesTables = function(elementId, type, rows, columns, offset) {
            var lineOffset = offset;
            var $it0 = this.payLines.keys();
            while ($it0.hasNext()) {
                var key = $it0.next();
                if (_hcmn_.StringTools.startsWith(key, type)) {
                    var div = this.Iframe.contentDocument.getElementById(elementId);
                    var tbl = this.Iframe.contentDocument.createElement("table");
                    tbl.setAttribute("border", "1");
                    var th = this.Iframe.contentDocument.createElement("th");
                    tbl.appendChild(th);
                    var _g = 0;
                    while (_g < rows) {
                        var k = _g++;
                        var tr = this.Iframe.contentDocument.createElement("tr");
                        var _g1 = 0;
                        while (_g1 < columns) {
                            var j = _g1++;
                            var td = this.Iframe.contentDocument.createElement("td");
                            tr.appendChild(td);
                            var _g2 = 0;
                            while (_g2 < columns) {
                                var z = _g2++;
                                var xx = this.payLines.get(key)[z].x;
                                var yy = this.payLines.get(key)[z].y - lineOffset;
                                if (xx == j && yy == k) td.setAttribute("class", "payline-color");
                            }
                        }
                        tbl.appendChild(tr);
                    }
                    th.setAttribute("colspan", "5");
                    div.appendChild(tbl);
                    th.setAttribute("id", "tHead" + key);
                    tbl.setAttribute("id", "table" + key);
                    th.appendChild(window.document.createTextNode(_hcmn_.Std.string(_hcmn_.HxOverrides.substr(key, 3, null))));
                }
            }
        };
        icywildsGameController.GameController.prototype.__class__ = icywildsGameController.GameController;
        icywildsGameController.GameControllerConfig = function() {};
        icywildsGameController.GameControllerConfig.__name__ = ["icywildsGameController", "GameControllerConfig"];
        icywildsGameController.GameControllerConfig.prototype.winlineInterval = null;
        icywildsGameController.GameControllerConfig.prototype.playingLinesAtBetMessageDelay = null;
        icywildsGameController.GameControllerConfig.prototype.fs_winlineInterval = null;
        icywildsGameController.GameControllerConfig.prototype.fs_IntroScreenDuration = null;
        icywildsGameController.GameControllerConfig.prototype.fs_FirstSpinDelay = null;
        icywildsGameController.GameControllerConfig.prototype.fs_WinSpinDelay = null;
        icywildsGameController.GameControllerConfig.prototype.fs_NoWinSpinDelay = null;
        icywildsGameController.GameControllerConfig.prototype.fs_RetriggerScreenDuration = null;
        icywildsGameController.GameControllerConfig.prototype.fs_MaxRetriggerScreenDuration = null;
        icywildsGameController.GameControllerConfig.prototype.fs_SummaryDuration = null;
        icywildsGameController.GameControllerConfig.prototype.maxAwardSpinEnabledDelay = null;
        icywildsGameController.GameControllerConfig.prototype.__class__ = icywildsGameController.GameControllerConfig;
        icywildsGameController.GameModel = function() {
            this.isBonusEnd = false;
            this.rgPresentation = false;
            this.reelsNum = 5;
            this.cellsNum = 4;
        };
        icywildsGameController.GameModel.__name__ = ["icywildsGameController", "GameModel"];
        icywildsGameController.GameModel.prototype.spinOutcome = null;
        icywildsGameController.GameModel.prototype.outcome = null;
        icywildsGameController.GameModel.prototype.startSpinPayload = null;
        icywildsGameController.GameModel.prototype.tensionReels = null;
        icywildsGameController.GameModel.prototype.landingSymbols = null;
        icywildsGameController.GameModel.prototype.scatterWinMatrix = null;
        icywildsGameController.GameModel.prototype.lineWinMatrix = null;
        icywildsGameController.GameModel.prototype.bonusWinMatrix = null;
        icywildsGameController.GameModel.prototype.wildReels = null;
        icywildsGameController.GameModel.prototype.oldWildReels = null;
        icywildsGameController.GameModel.prototype.hasAnnouncement = null;
        icywildsGameController.GameModel.prototype.hasWilds = null;
        icywildsGameController.GameModel.prototype.hasTension = null;
        icywildsGameController.GameModel.prototype.cellsNum = null;
        icywildsGameController.GameModel.prototype.reelsNum = null;
        icywildsGameController.GameModel.prototype.stakeState = null;
        icywildsGameController.GameModel.prototype.lastAccumulatedPayout = null;
        icywildsGameController.GameModel.prototype.rgPresentation = null;
        icywildsGameController.GameModel.prototype.totalBet = null;
        icywildsGameController.GameModel.prototype.isBonusEnd = null;
        icywildsGameController.GameModel.prototype.setSpinOutcome = function(spinOutcome) {
            this.spinOutcome = spinOutcome;
            if (this.spinOutcome.stage == "BaseGame") this.setOutcome(this.spinOutcome.baseGame.outcome);
            else this.setOutcome(this.spinOutcome.freeSpin.outcome);
        };
        icywildsGameController.GameModel.prototype.setOutcome = function(outcome) {
            console.log("[GAME_CONTROLLER] setOutcome -> ");
            this.outcome = outcome;
            var _g = [];
            var _g2 = 0;
            var _g1 = this.reelsNum;
            while (_g2 < _g1) {
                var i = _g2++;
                _g.push((function($this) {
                    var $r;
                    var _g3 = []; {
                        var _g5 = 0;
                        var _g4 = $this.cellsNum;
                        while (_g5 < _g4) {
                            var j = _g5++;
                            _g3.push(outcome.reelStop.reels[i][j + 1] == "27" ? 1 : 0);
                        }
                    }
                    $r = _g3;
                    return $r;
                }(this)));
            }
            this.landingSymbols = _g;
            var _g11 = [];
            var _g31 = 0;
            var _g21 = this.reelsNum;
            while (_g31 < _g21) {
                var i1 = _g31++;
                _g11.push((function($this) {
                    var $r;
                    var _g41 = []; {
                        var _g6 = 0;
                        var _g51 = $this.cellsNum;
                        while (_g6 < _g51) {
                            var j1 = _g6++;
                            _g41.push(0);
                        }
                    }
                    $r = _g41;
                    return $r;
                }(this)));
            }
            this.lineWinMatrix = _g11;
            if (outcome.lineWins != null) {
                var _g22 = 0;
                var _g32 = outcome.lineWins;
                while (_g22 < _g32.length) {
                    var lw = _g32[_g22];
                    ++_g22;
                    var _g52 = 0;
                    var _g42 = this.reelsNum;
                    while (_g52 < _g42) {
                        var i2 = _g52++;
                        var _g7 = 0;
                        var _g61 = this.cellsNum;
                        while (_g7 < _g61) {
                            var j2 = _g7++;
                            if (lw.winPath.reelsInfo[i2][j2 + 1] == 1) this.lineWinMatrix[i2][j2] = 1;
                        }
                    }
                }
            }
            var _g23 = [];
            var _g43 = 0;
            var _g33 = this.reelsNum;
            while (_g43 < _g33) {
                var i3 = _g43++;
                _g23.push((function($this) {
                    var $r;
                    var _g53 = []; {
                        var _g71 = 0;
                        var _g62 = $this.cellsNum;
                        while (_g71 < _g62) {
                            var j3 = _g71++;
                            _g53.push(0);
                        }
                    }
                    $r = _g53;
                    return $r;
                }(this)));
            }
            this.bonusWinMatrix = _g23;
            if (outcome.bonusWins != null) {
                var _g34 = 0;
                var _g44 = outcome.bonusWins;
                while (_g34 < _g44.length) {
                    var bw = _g44[_g34];
                    ++_g34;
                    if (bw.type != "Princess") continue;
                    var _g63 = 0;
                    var _g54 = this.reelsNum;
                    while (_g63 < _g54) {
                        var i4 = _g63++;
                        var _g8 = 0;
                        var _g72 = this.cellsNum;
                        while (_g8 < _g72) {
                            var j4 = _g8++;
                            if (bw.winPath.reelsInfo[i4][j4 + 1] == 1) this.bonusWinMatrix[i4][j4] = 1;
                        }
                    }
                }
            }
            var _g35 = [];
            var _g55 = 0;
            var _g45 = this.reelsNum;
            while (_g55 < _g45) {
                var i5 = _g55++;
                _g35.push((function($this) {
                    var $r;
                    var _g64 = []; {
                        var _g81 = 0;
                        var _g73 = $this.cellsNum;
                        while (_g81 < _g73) {
                            var j5 = _g81++;
                            _g64.push(0);
                        }
                    }
                    $r = _g64;
                    return $r;
                }(this)));
            }
            this.scatterWinMatrix = _g35;
            if (outcome.scatterWins != null) {
                var _g46 = 0;
                var _g56 = outcome.scatterWins;
                while (_g46 < _g56.length) {
                    var sw = _g56[_g46];
                    ++_g46;
                    var _g74 = 0;
                    var _g65 = this.reelsNum;
                    while (_g74 < _g65) {
                        var i6 = _g74++;
                        var _g9 = 0;
                        var _g82 = this.cellsNum;
                        while (_g9 < _g82) {
                            var j6 = _g9++;
                            if (sw.winPath.reelsInfo[i6][j6 + 1] == 1) this.lineWinMatrix[i6][j6] = 1;
                        }
                    }
                }
            }
            var _g47 = [];
            var _g66 = 0;
            var _g57 = this.reelsNum;
            while (_g66 < _g57) {
                var i7 = _g66++;
                _g47.push(icyWildsComponentsExpandingWildsPort.ShowType.none);
            }
            this.wildReels = _g47;
            var wildShowType;
            if (outcome.bigWin.customGroups.get("GoldBigWin") == 1) wildShowType = icyWildsComponentsExpandingWildsPort.ShowType.expandingwildgold;
            else wildShowType = icyWildsComponentsExpandingWildsPort.ShowType.expandingwild;
            if (outcome.bonusWins != null) {
                var _g67 = 0;
                var _g58 = outcome.bonusWins.length;
                while (_g67 < _g58) {
                    var i8 = _g67++;
                    var bw1 = outcome.bonusWins[i8];
                    if (bw1.type == "Princess") continue;
                    var _g83 = 0;
                    var _g75 = this.reelsNum;
                    while (_g83 < _g75) {
                        var j7 = _g83++;
                        if (bw1.winPath.reelsInfo[j7][1] == 1) {
                            if (bw1.type == "Wilds") this.wildReels[j7] = wildShowType;
                            else this.wildReels[j7] = icyWildsComponentsExpandingWildsPort.ShowType.announcement;
                        }
                    }
                }
            }
            var _g59 = [];
            var _g76 = 0;
            var _g68 = this.reelsNum;
            while (_g76 < _g68) {
                var i9 = _g76++;
                _g59.push(0);
            }
            this.tensionReels = _g59;
            var scatterCount = 0;
            if (this.outcome.scatterWins != null) {
                var scatterWinInfo = this.outcome.scatterWins[0].winPath.reelsInfo;
                var _g77 = 0;
                var _g69 = scatterWinInfo.length;
                while (_g77 < _g69) {
                    var i10 = _g77++;
                    if (scatterCount >= 2) {
                        if (this.wildReels[i10] == icyWildsComponentsExpandingWildsPort.ShowType.none || this.wildReels[i10] == icyWildsComponentsExpandingWildsPort.ShowType.announcement) this.tensionReels[i10] = 1;
                        continue;
                    }
                    if (_hcmn_.HxOverrides.indexOf(scatterWinInfo[i10], 1, 0) >= 0 || _hcmn_.HxOverrides.indexOf(scatterWinInfo[i10], 2, 0) >= 0) scatterCount++;
                }
            }
            console.log("[GAME_CONTROLLER] setOutcome -> oldWildReels:" + _hcmn_.Std.string(this.oldWildReels));
            console.log("[GAME_CONTROLLER] setOutcome -> wildReels:" + _hcmn_.Std.string(this.wildReels));
            if (_hcmn_.HxOverrides.indexOf(this.wildReels, icyWildsComponentsExpandingWildsPort.ShowType.announcement, 0) >= 0) this.hasAnnouncement = true;
            else this.hasAnnouncement = false;
            if (_hcmn_.HxOverrides.indexOf(this.wildReels, icyWildsComponentsExpandingWildsPort.ShowType.expandingwild, 0) >= 0 || _hcmn_.HxOverrides.indexOf(this.wildReels, icyWildsComponentsExpandingWildsPort.ShowType.expandingwildgold, 0) >= 0) this.hasWilds = true;
            else this.hasWilds = false;
            if (_hcmn_.HxOverrides.indexOf(this.tensionReels, 1, 0) >= 0) this.hasTension = true;
            else this.hasTension = false;
            console.log("[GAME_CONTROLLER] setOutcome -> hasWilds:" + _hcmn_.Std.string(this.hasWilds));
            console.log("[GAME_CONTROLLER] setOutcome -> hasTension:" + _hcmn_.Std.string(this.hasTension));
            console.log("[GAME_CONTROLLER] setOutcome -> hasTension:" + _hcmn_.Std.string(this.hasTension));
        };
        icywildsGameController.GameModel.prototype.getVisibilityForAllWins = function() {
            var visibility;
            var _g = [];
            var _g2 = 0;
            var _g1 = this.reelsNum;
            while (_g2 < _g1) {
                var i = _g2++;
                _g.push((function($this) {
                    var $r;
                    var _g3 = []; {
                        var _g5 = 0;
                        var _g4 = $this.cellsNum;
                        while (_g5 < _g4) {
                            var j = _g5++;
                            _g3.push(0);
                        }
                    }
                    $r = _g3;
                    return $r;
                }(this)));
            }
            visibility = _g;
            var _g21 = 0;
            var _g11 = this.reelsNum;
            while (_g21 < _g11) {
                var i1 = _g21++;
                var _g41 = 0;
                var _g31 = this.cellsNum;
                while (_g41 < _g31) {
                    var j1 = _g41++;
                    if (this.lineWinMatrix[i1][j1] == 1) {
                        visibility[i1][j1] = 1;
                        continue;
                    }
                    if (this.bonusWinMatrix[i1][j1] == 1) {
                        visibility[i1][j1] = 1;
                        continue;
                    }
                    if (this.scatterWinMatrix[i1][j1] == 1) {
                        visibility[i1][j1] = 1;
                        continue;
                    }
                }
            }
            return visibility;
        };
        icywildsGameController.GameModel.prototype.getVisibilityForScatterWins = function() {
            return this.scatterWinMatrix;
        };
        icywildsGameController.GameModel.prototype.setCurrentStake = function(stakeState) {
            this.stakeState = stakeState;
            this.totalBet = stakeState.totalBet;
        };
        icywildsGameController.GameModel.prototype.isHighWin = function() {
            var totalPayout = parseFloat(this.spinOutcome.baseGame.outcome.totalPayout);
            if (this.spinOutcome.stage == "FreeSpin" && this.spinOutcome.nextStage == "BaseGame" && this.isBonusEnd) totalPayout = parseFloat(this.spinOutcome.acumulatedPayout);
            else if (this.spinOutcome.stage == "FreeSpin" && this.spinOutcome.nextStage == "BaseGame" && !this.isBonusEnd) totalPayout = parseFloat(this.spinOutcome.freeSpin.outcome.totalPayout);
            else if (this.spinOutcome.stage == "FreeSpin" && this.spinOutcome.nextStage == "FreeSpin") totalPayout = parseFloat(this.spinOutcome.freeSpin.outcome.totalPayout);
            var totalBetValue = parseFloat(this.totalBet);
            if (totalPayout > totalBetValue) return true;
            return false;
        };
        icywildsGameController.GameModel.prototype.parsePayLines = function(response) {
            var payLines = new _hcmn_.haxe_ds_StringMap();
            var patterns = icywildsGameController.HelpingHand.getArrayField(response, "PatternInfo");
            var _g = 0;
            while (_g < patterns.length) {
                var pattern = patterns[_g];
                ++_g;
                var isPayline = icywildsGameController.HelpingHand.getField(pattern, "@name");
                if (isPayline == "Paylines") {
                    var lines = icywildsGameController.HelpingHand.getArrayField(pattern, "Pattern");
                    var _g1 = 0;
                    while (_g1 < lines.length) {
                        var line = lines[_g1];
                        ++_g1;
                        var lineId = icywildsGameController.HelpingHand.getField(line, "@name").split("Line ")[1];
                        var cells = icywildsGameController.HelpingHand.getArrayField(line, "Cell");
                        var linePositions = [];
                        var position = null;
                        var _g2 = 0;
                        while (_g2 < cells.length) {
                            var cell = cells[_g2];
                            ++_g2;
                            var name = icywildsGameController.HelpingHand.getField(cell, "@name");
                            position = this.parsePosition(name);
                            linePositions.push(position);
                        }
                        payLines.set("bg_" + lineId, linePositions);
                    }
                }
            }
            return payLines;
        };
        icywildsGameController.GameModel.prototype.parsePosition = function(name) {
            var pos = {
                x: _hcmn_.Std.parseInt(name.split("C")[1].split("R")[0]),
                y: _hcmn_.Std.parseInt(name.split("R")[1])
            };
            return pos;
        };
        icywildsGameController.GameModel.prototype.__class__ = icywildsGameController.GameModel;
        icywildsGameController.HelpingHand = function() {};
        icywildsGameController.HelpingHand.__name__ = ["icywildsGameController", "HelpingHand"];
        icywildsGameController.HelpingHand.isEmpty = function(value) {
            if (value == null) return true;
            if (value == "") return true;
            return false;
        };
        icywildsGameController.HelpingHand.getArray = function(object) {
            var result = null;
            if (object == null) return null;
            if ((object instanceof Array) && object.__enum__ == null) result = object;
            else if (Object.prototype.hasOwnProperty.call(object, "#text")) result = [_hcmn_.Reflect.field(object, "#text")];
            else result = [object];
            return result;
        };
        icywildsGameController.HelpingHand.getStringArray = function(object) {
            if (object == null) return null;
            var dynamicResult = null;
            if ((object instanceof Array) && object.__enum__ == null) dynamicResult = object;
            else dynamicResult = [object];
            var result = [];
            var item;
            var _g = 0;
            while (_g < dynamicResult.length) {
                var item1 = dynamicResult[_g];
                ++_g;
                result.push(_hcmn_.Std.string(item1));
            }
            return result;
        };
        icywildsGameController.HelpingHand.getIntArray = function(object) {
            if (object == null) return null;
            var dynamicResult = null;
            if ((object instanceof Array) && object.__enum__ == null) dynamicResult = object;
            else dynamicResult = [object];
            var result = [];
            var item;
            var _g = 0;
            while (_g < dynamicResult.length) {
                var item1 = dynamicResult[_g];
                ++_g;
                result.push(_hcmn_.js_Boot.__cast(item1, _hcmn_.Int));
            }
            return result;
        };
        icywildsGameController.HelpingHand.getField = function(object, path) {
            if (object == null) return null;
            var pathArray = path.split(".");
            var fieldName = pathArray.shift();
            var remainingPath = pathArray.join(".");
            var field;
            if (Object.prototype.hasOwnProperty.call(object, fieldName)) {
                field = _hcmn_.Reflect.field(object, fieldName);
                if (pathArray.length == 0) return field;
                else return icywildsGameController.HelpingHand.getField(field, remainingPath);
            }
            return null;
        };
        icywildsGameController.HelpingHand.getBoolField = function(object, name, defaultValue) {
            var dynammicValue = icywildsGameController.HelpingHand.getField(object, name);
            if (dynammicValue == null) return defaultValue;
            return _hcmn_.Std.string(dynammicValue).toLowerCase() == "true";
        };
        icywildsGameController.HelpingHand.getArrayField = function(object, name) {
            var field = icywildsGameController.HelpingHand.getField(object, name);
            return icywildsGameController.HelpingHand.getArray(field);
        };
        icywildsGameController.HelpingHand.getIntArrayField = function(object, name) {
            if (object == null) return null;
            var resultDynamicArray = icywildsGameController.HelpingHand.getArrayField(object, name);
            if (resultDynamicArray == null) return null;
            var result = [];
            var resultItem;
            var _g = 0;
            while (_g < resultDynamicArray.length) {
                var resultItem1 = resultDynamicArray[_g];
                ++_g;
                result.push(_hcmn_.js_Boot.__cast(resultItem1, _hcmn_.Int));
            }
            return result;
        };
        icywildsGameController.HelpingHand.getArrayInJsonString = function(jsonString, namePath, onError) {
            var json;
            try {
                json = JSON.parse(jsonString);
            } catch (exception) {
                if (exception instanceof js._Boot.HaxeError) exception = exception.val;
                if (onError != null) onError(_hcmn_.Std.string(exception));
                return null;
            }
            return icywildsGameController.HelpingHand.getArray(icywildsGameController.HelpingHand.getField(json, namePath));
        };
        icywildsGameController.HelpingHand.getObjectInJsonString = function(jsonString, namePath, onError) {
            var json;
            try {
                json = JSON.parse(jsonString);
            } catch (exception) {
                if (exception instanceof js._Boot.HaxeError) exception = exception.val;
                if (onError != null) onError(_hcmn_.Std.string(exception));
                return null;
            }
            return icywildsGameController.HelpingHand.getField(json, namePath);
        };
        icywildsGameController.HelpingHand.parseInt = function(object, onError) {
            var result = null;
            try {
                result = _hcmn_.Std.parseInt(_hcmn_.Std.string(object));
            } catch (exception) {
                if (exception instanceof js._Boot.HaxeError) exception = exception.val;
                if (onError != null) onError(_hcmn_.Std.string(exception));
                return null;
            }
            return result;
        };
        icywildsGameController.HelpingHand.parseIntField = function(object, name, onError) {
            var dynamicValue = icywildsGameController.HelpingHand.getField(object, name);
            if (dynamicValue == null) return null;
            return icywildsGameController.HelpingHand.parseInt(dynamicValue, onError);
        };
        icywildsGameController.HelpingHand.parseIntArrayField = function(object, name, onError) {
            if (object == null) return null;
            var resultDynamicArray = icywildsGameController.HelpingHand.getArrayField(object, name);
            if (resultDynamicArray == null) return null;
            var result = [];
            var resultItem;
            var _g = 0;
            while (_g < resultDynamicArray.length) {
                var resultItem1 = resultDynamicArray[_g];
                ++_g;
                var item = icywildsGameController.HelpingHand.parseInt(resultItem1, onError);
                if (item == null) return null;
                result.push(item);
            }
            return result;
        };
        icywildsGameController.HelpingHand.prototype.__class__ = icywildsGameController.HelpingHand;
        icywildsGameController.SoundController = function(context, port) {
            this.playedSounds = [];
            this.muted = false;
            this.reelSpinning = false;
            this.isResuming = false;
            this.inactivityPeriod = 10000;
            this.winJingle = "";
            this.reelsWithWild = [];
            this.freespinEndWinGroup = 0;
            var _g = this;
            this.bus = icywildsGameController.ExternalService.bus;
            this.ccontext = context;
            this.soundPort = port;
            this.bus.getChannel("GFBus").subscribe("*", $bind(this, this.onAllEvents));
            Visibility.change($bind(this, this.handleVisibilityChange));
            var soundAssetId = "sounds";
            if (icywildsGameController.ExternalService.checkIsIE()) soundAssetId = "soundsIE";
            icywildsGameController.ExternalService.assetRegistry.getAsset(soundAssetId).getContent().then(function(data) {
                _g.sound = data;
            });
        };
        icywildsGameController.SoundController.__name__ = ["icywildsGameController", "SoundController"];
        icywildsGameController.SoundController.prototype.ccontext = null;
        icywildsGameController.SoundController.prototype.bus = null;
        icywildsGameController.SoundController.prototype.freegameOn = null;
        icywildsGameController.SoundController.prototype.freespinEndWinGroup = null;
        icywildsGameController.SoundController.prototype.soundPort = null;
        icywildsGameController.SoundController.prototype.reelsWithWild = null;
        icywildsGameController.SoundController.prototype.winJingle = null;
        icywildsGameController.SoundController.prototype.bgMusicTimeoutId = null;
        icywildsGameController.SoundController.prototype.timeoutId = null;
        icywildsGameController.SoundController.prototype.explosionTimeoutId = null;
        icywildsGameController.SoundController.prototype.bgMusicIsPlaying = null;
        icywildsGameController.SoundController.prototype.inactivityPeriod = null;
        icywildsGameController.SoundController.prototype.fadeTimeout = null;
        icywildsGameController.SoundController.prototype.bgMusicFading = null;
        icywildsGameController.SoundController.prototype.isResuming = null;
        icywildsGameController.SoundController.prototype.reelSpinning = null;
        icywildsGameController.SoundController.prototype.sound = null;
        icywildsGameController.SoundController.prototype.muted = null;
        icywildsGameController.SoundController.prototype.playedSounds = null;
        icywildsGameController.SoundController.prototype.handleVisibilityChange = function(e, state) {
            if (this.sound != null) {
                if (state == "hidden") {
                    this.sound.mute(true);
                    if (this.bgMusicIsPlaying) {
                        window.clearTimeout(this.bgMusicTimeoutId);
                        this.bgMusicTimeoutId = null;
                        window.clearTimeout(this.fadeTimeout);
                        this.fadeTimeout = null;
                    }
                    if (this.winJingle != "") {
                        window.clearTimeout(this.explosionTimeoutId);
                        this.explosionTimeoutId = null;
                    }
                } else if (state == "visible" && !this.muted) {
                    this.sound.mute(false);
                    this.checkBackgroundMusic();
                }
            }
        };
        icywildsGameController.SoundController.prototype.setGameMode = function(mode) {
            this.soundPort.setGameMode().publish(mode);
            if (_hcmn_.Type.enumEq(mode, soundManagerApi.EGameMode.FreeSpin)) {
                this.freegameOn = true;
                if (this.isResuming) {
                    this.isResuming = false;
                    this.playSound("fg_loop");
                    return;
                }
                this.stopSound("bg_loop");
                this.bgMusicIsPlaying = false;
                this.playSound("fg_loop");
            } else this.freegameOn = false;
        };
        icywildsGameController.SoundController.prototype.onAllEvents = function(e) {
            var topic = e.getTopic();
            console.log("[am]topic" + topic);
            var payload = e.getPayload();
            if (payload) {
                if (payload.key) {
                    var _g = payload.key;
                    switch (_g) {
                        case "sound":
                            if (payload.value == "1") this.turnOffSounds();
                            else {
                                this.turnOnSounds();
                                if (!this.bgMusicIsPlaying) this.stopSound("bg_loop");
                            }
                            break;
                    }
                }
            }
            if (this.freegameOn && topic == "slotmodel:presentResult") this.freespinEndWinGroup = payload.bigWin.winGroup;
            if (topic == "expandingWilds:show") this.reelsWithWild = payload.data;
            else if (topic == "winMeter:displayWin") {
                if (payload.instantShow == true) {
                    this.playSound("win_jingle_end");
                    if (this.winJingle != "") {
                        this.stopSound(this.winJingle);
                        window.clearTimeout(this.timeoutId);
                        window.clearTimeout(this.explosionTimeoutId);
                        this.winJingle = "";
                    }
                    return;
                }
                if (this.freespinEndWinGroup > 0) {
                    this.freegameOn = false;
                    this.winJingle = "";
                    this.playWinSound(this.freespinEndWinGroup, true);
                    this.freespinEndWinGroup = 0;
                } else {
                    this.winJingle = "";
                    this.playWinSound(payload, false);
                }
            } else if (topic == "reels:startSpin" || topic == "betpanel:setStake" || topic == "slotmodel:paytableCommandExecuted" || topic == "slotmodel:paytableCommandExecuted" || topic == "betpanel:onButtonPressed" && payload == betPanelApi.EButton.SKIP) {
                if (this.winJingle != "") {
                    this.stopSound(this.winJingle);
                    window.clearTimeout(this.timeoutId);
                    window.clearTimeout(this.explosionTimeoutId);
                    this.winJingle = "";
                }
                this.stopSound("bell");
                if (topic == "reels:startSpin") {
                    if (!this.freegameOn) {
                        if (this.bgMusicFading) {
                            this.playSound("bg_loop");
                            this.bgMusicIsPlaying = true;
                            this.bgMusicFading = false;
                        } else {
                            this.reelSpinning = true;
                            this.checkBackgroundMusic();
                        }
                    }
                }
            }
            if (topic == "soundplayer:onLoaded") {
                if (this.isResuming) this.playSound("fg_loop");
                else {
                    this.bgMusicIsPlaying = false;
                    this.bgMusicFading = false;
                }
            }
            if (topic == "reels:reelStopped") {
                if (this.reelSpinning && payload == 4) {
                    this.reelSpinning = false;
                    if (!this.freegameOn) this.checkBackgroundMusic();
                }
                if (this.reelsWithWild[payload] == 2 || this.reelsWithWild[payload] == 3) {} else this.playSound("stop_" + _hcmn_.Std.string(payload + 1));
                if (payload == 4) this.reelsWithWild = [];
            }
        };
        icywildsGameController.SoundController.prototype.playTension = function() {
            this.playSound("tension_spin");
        };
        icywildsGameController.SoundController.prototype.playWild = function() {
            this.playSound("wild");
        };
        icywildsGameController.SoundController.prototype.playWildSparkle = function() {
            this.playSound("wild_sparkle");
        };
        icywildsGameController.SoundController.prototype.closePaytable = function() {
            this.playSound("stop_1");
        };
        icywildsGameController.SoundController.prototype.handleMaxAward = function() {
            if (this.freegameOn) this.stopSound("fg_loop");
            else {
                this.stopSound("bg_loop");
                window.clearTimeout(this.bgMusicTimeoutId);
                this.bgMusicIsPlaying = false;
            }
        };
        icywildsGameController.SoundController.prototype.setupResume = function() {
            this.isResuming = true;
        };
        icywildsGameController.SoundController.prototype.checkBackgroundMusic = function() {
            var _g = this;
            if (!this.bgMusicIsPlaying) {
                this.playSound("bg_loop");
                this.bgMusicIsPlaying = true;
                this.bgMusicTimeoutId = window.setTimeout(function() {
                    if (!_g.reelSpinning) {
                        _g.soundPort.fadeOut().publish(new soundManagerApi.SoundActionProperties("bg_loop", 1000));
                        _g.fadeTimeout = window.setTimeout(function() {
                            _g.bgMusicIsPlaying = false;
                            _g.stopSound("bg_loop");
                            _g.bgMusicFading = false;
                        }, 1000);
                        _g.bgMusicFading = true;
                    } else window.clearTimeout(_g.bgMusicTimeoutId);
                }, this.inactivityPeriod);
            } else {
                window.clearTimeout(this.bgMusicTimeoutId);
                this.bgMusicTimeoutId = window.setTimeout(function() {
                    _g.soundPort.fadeOut().publish(new soundManagerApi.SoundActionProperties("bg_loop", 500));
                    _g.fadeTimeout = window.setTimeout(function() {
                        _g.bgMusicIsPlaying = false;
                        _g.bgMusicFading = false;
                    }, 500);
                    _g.bgMusicFading = true;
                }, this.inactivityPeriod);
            }
        };
        icywildsGameController.SoundController.prototype.playWinSound = function(winMeterPayload, isFreeGame) {
            if (isFreeGame == null) isFreeGame = false;
            var _g = this;
            var winType;
            if (isFreeGame) winType = winMeterPayload;
            else {
                var winLength = winMeterPayload.winSegments.length;
                winType = winMeterPayload.winSegments[winLength - 1].winGroup;
            }
            switch (winType) {
                case 0:
                    return;
                case 1:
                    this.winJingle = "win_jingle_end";
                    this.playSound("win_jingle_end");
                    break;
                case 2:
                    this.winJingle = "win_jingle";
                    this.playSound("win_jingle");
                    this.timeoutId = window.setTimeout(function() {
                        _g.stopSound("win_jingle");
                        _g.playSound("win_jingle_end");
                        _g.winJingle = "";
                    }, 1697);
                    break;
                case 3:
                    this.winJingle = "win_jingle";
                    this.playSound("win_jingle");
                    this.timeoutId = window.setTimeout(function() {
                        _g.stopSound("win_jingle");
                        _g.playSound("win_jingle_end");
                        _g.winJingle = "";
                    }, 4000);
                    break;
                case 4:
                    this.winJingle = "win_jingle";
                    this.playSound("win_jingle");
                    this.timeoutId = window.setTimeout(function() {
                        _g.stopSound("win_jingle");
                        _g.playSound("win_jingle_end");
                        _g.winJingle = "";
                    }, 4000);
                    break;
                case 5:
                    this.playSound("bell");
                    this.winJingle = "win_jingle";
                    this.playSound("win_jingle");
                    this.timeoutId = window.setTimeout(function() {
                        _g.stopSound("win_jingle");
                        _g.winJingle = "";
                    }, this.freegameOn ? 5000 : 10000);
                    this.explosionTimeoutId = window.setTimeout(function() {
                        _g.playSound("explosion");
                    }, this.freegameOn ? 4000 : 8500);
                    break;
                case 6:
                    this.playSound("bell");
                    this.winJingle = "win_jingle";
                    this.playSound("win_jingle");
                    this.timeoutId = window.setTimeout(function() {
                        _g.stopSound("win_jingle");
                        _g.winJingle = "";
                    }, this.freegameOn ? 5000 : 10000);
                    this.explosionTimeoutId = window.setTimeout(function() {
                        _g.playSound("explosion");
                    }, this.freegameOn ? 4000 : 8500);
                    break;
            }
        };
        icywildsGameController.SoundController.prototype.playSound = function(id) {
            if (_hcmn_.HxOverrides.indexOf(this.playedSounds, id, 0) > -1) {
                this.soundPort.stop().publish(id);
                this.soundPort.play().publish(id);
            } else {
                this.soundPort.play().publish(id);
                this.playedSounds.push(id);
            }
        };
        icywildsGameController.SoundController.prototype.stopSound = function(id) {
            _hcmn_.HxOverrides.remove(this.playedSounds, id);
            this.soundPort.stop().publish(id);
        };
        icywildsGameController.SoundController.prototype.turnOnSounds = function() {
            if (this.sound != null) {
                this.muted = false;
                this.sound.mute(false);
                this.sound.volume(1);
            }
        };
        icywildsGameController.SoundController.prototype.turnOffSounds = function() {
            if (this.sound != null) {
                this.muted = true;
                this.sound.mute(true);
                this.sound.volume(0);
            }
        };
        icywildsGameController.SoundController.prototype.__class__ = icywildsGameController.SoundController;
        icywildsGameController.StateMachineContext = function(dispatcher) {
            stateMachineEngine.SMContext.call(this, dispatcher);
        };
        icywildsGameController.StateMachineContext.__name__ = ["icywildsGameController", "StateMachineContext"];
        icywildsGameController.StateMachineContext.__super__ = stateMachineEngine.SMContext;
        for (var k in stateMachineEngine.SMContext.prototype) icywildsGameController.StateMachineContext.prototype[k] = stateMachineEngine.SMContext.prototype[k];
        icywildsGameController.StateMachineContext.prototype.setupContextData = function(game) {
            this.set_contextValues(new _hcmn_.haxe_ds_StringMap());
            var this1 = this.get_contextValues();
            this1.set("Stage", "");
            var this2 = this.get_contextValues();
            this2.set("retrigger", false);
            var this3 = this.get_contextValues();
            this3.set("NextStage", "");
            var this4 = this.get_contextValues();
            this4.set("awardCapExceeded", false);
            this.set_contextMethods(new _hcmn_.haxe_ds_StringMap());
            var this5 = this.get_contextMethods();
            this5.set("initGame", $bind(game, game.initGame));
            var this6 = this.get_contextMethods();
            this6.set("showIntro", $bind(game, game.showIntro));
            var this7 = this.get_contextMethods();
            this7.set("attachComponents", $bind(game, game.attachComponents));
            var this8 = this.get_contextMethods();
            this8.set("prepareResume", $bind(game, game.prepareResume));
            var this9 = this.get_contextMethods();
            this9.set("onBaseGameIdle", $bind(game, game.onBaseGameIdle));
            var this10 = this.get_contextMethods();
            this10.set("startSpin", $bind(game, game.startSpin));
            var this11 = this.get_contextMethods();
            this11.set("clearAllWins", $bind(game, game.clearAllWins));
            var this12 = this.get_contextMethods();
            this12.set("checkForStopOrAbort", $bind(game, game.checkForStopOrAbort));
            var this13 = this.get_contextMethods();
            this13.set("applyAbortData", $bind(game, game.applyAbortData));
            var this14 = this.get_contextMethods();
            this14.set("stopReels", $bind(game, game.stopReels));
            var this15 = this.get_contextMethods();
            this15.set("showBaseGameWins", $bind(game, game.showBaseGameWins));
            var this16 = this.get_contextMethods();
            this16.set("showScatterWins", $bind(game, game.showScatterWins));
            var this17 = this.get_contextMethods();
            this17.set("showFreeSpinWins", $bind(game, game.showFreeSpinWins));
            var this18 = this.get_contextMethods();
            this18.set("displayBaseGameWin", $bind(game, game.displayBaseGameWin));
            var this19 = this.get_contextMethods();
            this19.set("displayTotalWin", $bind(game, game.displayTotalWin));
            var this20 = this.get_contextMethods();
            this20.set("displayFreeSpinWin", $bind(game, game.displayFreeSpinWin));
            var this21 = this.get_contextMethods();
            this21.set("updateBetPanel", $bind(game, game.updateBetPanel));
            var this22 = this.get_contextMethods();
            this22.set("updateBetPanelFS", $bind(game, game.updateBetPanelFS));
            var this23 = this.get_contextMethods();
            this23.set("setBaseGameOutcome", $bind(game, game.setBaseGameOutcome));
            var this24 = this.get_contextMethods();
            this24.set("prepareFreeSpin", $bind(game, game.prepareFreeSpin));
            var this25 = this.get_contextMethods();
            this25.set("showSpinButton", $bind(game, game.showSpinButton));
            var this26 = this.get_contextMethods();
            this26.set("showSkipButton", $bind(game, game.showSkipButton));
            var this27 = this.get_contextMethods();
            this27.set("showRetriggerScreen", $bind(game, game.showRetriggerScreen));
            var this28 = this.get_contextMethods();
            this28.set("executeContinueCommand", $bind(game, game.executeContinueCommand));
            var this29 = this.get_contextMethods();
            this29.set("startFSIntroAnim", $bind(game, game.startFSIntroAnim));
            var this30 = this.get_contextMethods();
            this30.set("startFSOutroAnim", $bind(game, game.startFSOutroAnim));
            var this31 = this.get_contextMethods();
            this31.set("showAwardCapScreen", $bind(game, game.showAwardCapScreen));
            var this32 = this.get_contextMethods();
            this32.set("publishSpinOutcomePresented", $bind(game, game.publishSpinOutcomePresented));
            var this33 = this.get_contextMethods();
            this33.set("publishResultPresented", $bind(game, game.publishResultPresented));
        };
        icywildsGameController.StateMachineContext.prototype.__class__ = icywildsGameController.StateMachineContext;
        icywildsGameController.StateMachineDef = function() {};
        icywildsGameController.StateMachineDef.__name__ = ["icywildsGameController", "StateMachineDef"];
        icywildsGameController.StateMachineDef.prototype.__class__ = icywildsGameController.StateMachineDef;
        icywildsGameController.Data = function() {};
        icywildsGameController.Data.__name__ = ["icywildsGameController", "Data"];
        icywildsGameController.Data.prototype.__class__ = icywildsGameController.Data;
        if (typeof js == 'undefined') {
            var js = {};
        };
        if (!js._Boot) {
            js._Boot = {};
        };
        js._Boot.HaxeError = function(val) {
            Error.call(this);
            this.val = val;
            this.message = String(val);
            if (Error.captureStackTrace) Error.captureStackTrace(this, js._Boot.HaxeError);
        };
        js._Boot.HaxeError.__name__ = ["js", "_Boot", "HaxeError"];
        js._Boot.HaxeError.__super__ = Error;
        for (var k in Error.prototype) js._Boot.HaxeError.prototype[k] = Error.prototype[k];
        js._Boot.HaxeError.prototype.val = null;
        js._Boot.HaxeError.prototype.__class__ = js._Boot.HaxeError;
        icywildsGameController.SoundController.BACKGROUND_LOOP = "bg_loop";;
        icywildsGameController.SoundController.FREESPINS_LOOP = "fg_loop";;
        icywildsGameController.StateMachineDef.ID = "GAMECONTROLLERSM_";;
        icywildsGameController.StateMachineDef.FS_INTRO_ENDED = "FS_INTRO_ENDED";;
        icywildsGameController.StateMachineDef.START_REEL_SPIN = "START_REEL_SPIN";;
        icywildsGameController.StateMachineDef.PRESENT_SPIN_OUTCOME = "PRESENT_SPIN_OUTCOME";;
        icywildsGameController.StateMachineDef.INTRO_FINISHED_ACTION = "INTRO_FINISHED_ACTION";;
        icywildsGameController.StateMachineDef.FS_OUTRO_END = "FS_OUTRO_END";;
        icywildsGameController.StateMachineDef.CONTINUE_ENABLED = "CONTINUE_ENABLED";;
        icywildsGameController.StateMachineDef.ABORT_SPIN = "ABORT_SPIN";;
        icywildsGameController.StateMachineDef.SPIN_ENABLED = "SPIN_ENABLED";;
        icywildsGameController.StateMachineDef.PRESENT_RESULT = "PRESENT_RESULT";;
        icywildsGameController.StateMachineDef.INIT_ACTION = "INIT_ACTION";;
        icywildsGameController.StateMachineDef.FS_OUTCOME_DONE = "FS_OUTCOME_DONE";;
        icywildsGameController.StateMachineDef.STOP_REEL_SPIN = "STOP_REEL_SPIN";;
        icywildsGameController.StateMachineDef.RETRIGGER_SHOWN = "RETRIGGER_SHOWN";;
        icywildsGameController.StateMachineDef.PREPARE_RESUME = "PREPARE_RESUME";;
        icywildsGameController.StateMachineDef.FS_WIN_SHOWN = "FS_WIN_SHOWN";;
        icywildsGameController.StateMachineDef.CONTINUE = "CONTINUE";;
        icywildsGameController.StateMachineDef.SPIN_STARTING_ENDED = "SPIN_STARTING_ENDED";;
        icywildsGameController.StateMachineDef.LOADING_STATE = "LOADING_STATE";;
        icywildsGameController.StateMachineDef.PREPARE_RESUME_STATE = "PREPARE_RESUME_STATE";;
        icywildsGameController.StateMachineDef.INIT_STATE = "INIT_STATE";;
        icywildsGameController.StateMachineDef.INTRO_STATE = "INTRO_STATE";;
        icywildsGameController.StateMachineDef.IDLE_STATE = "IDLE_STATE";;
        icywildsGameController.StateMachineDef.SPINNING_STATE = "SPINNING_STATE";;
        icywildsGameController.StateMachineDef.FS_IDLE = "FS_IDLE";;
        icywildsGameController.StateMachineDef.ABORT_SPIN_STATE = "ABORT_SPIN_STATE";;
        icywildsGameController.StateMachineDef.STOPPING_STATE = "STOPPING_STATE";;
        icywildsGameController.StateMachineDef.AWARD_CAP_STATE = "AWARD_CAP_STATE";;
        icywildsGameController.StateMachineDef.AWARD_CAP_PREPARE = "AWARD_CAP_PREPARE";;
        icywildsGameController.StateMachineDef.SHOW_FS_WIN = "SHOW_FS_WIN";;
        icywildsGameController.StateMachineDef.BASEGAME_OUTCOME = "BASEGAME_OUTCOME";;
        icywildsGameController.StateMachineDef.FS_OUTCOME = "FS_OUTCOME";;
        icywildsGameController.StateMachineDef.FS_INTRO = "FS_INTRO";;
        icywildsGameController.StateMachineDef.RETRIGGER_STATE = "RETRIGGER_STATE";;
        icywildsGameController.StateMachineDef.FS_OUTCOME_PRESENTED = "FS_OUTCOME_PRESENTED";;
        icywildsGameController.StateMachineDef.FS_SUMMARY = "FS_SUMMARY";;
        icywildsGameController.StateMachineDef.BET_CONFIRM = "BET_CONFIRM";;
        icywildsGameController.StateMachineDef.SHOW_WIN_STATE = "SHOW_WIN_STATE";;
        icywildsGameController.StateMachineDef.SPIN_STARTING_STATE = "SPIN_STARTING_STATE";;
        icywildsGameController.StateMachineDef.FSM = "<fsm initial='LOADING_STATE'>\r\n  <state name='LOADING_STATE'>\r\n    <transition target='PREPARE_RESUME_STATE' action='PREPARE_RESUME'/>\r\n    <transition target='INIT_STATE' action='INIT_ACTION'/>\r\n    <operation type='do' method='attachComponents'/>\r\n  </state>\r\n  <state name='PREPARE_RESUME_STATE'>\r\n    <transition target='FS_IDLE' action='CONTINUE_ENABLED'/>\r\n    <operation type='do' method='prepareResume'/>\r\n  </state>\r\n  <state name='INIT_STATE'>\r\n    <transition target='INTRO_STATE' action='SPIN_ENABLED'/>\r\n    <operation type='do' method='initGame'/>\r\n  </state>\r\n  <state name='INTRO_STATE'>\r\n    <transition target='IDLE_STATE' action='INTRO_FINISHED_ACTION'/>\r\n    <operation type='do' method='showIntro'/>\r\n  </state>\r\n  <state name='IDLE_STATE'>\r\n    <transition target='SPIN_STARTING_STATE' action='START_REEL_SPIN'/>\r\n    <operation type='do' method='onBaseGameIdle'/>\r\n    <operation type='exit' method='updateBetPanel'/>\r\n  </state>\r\n  <state name='SPIN_STARTING_STATE'>\r\n    <transition target='SPINNING_STATE' action='SPIN_STARTING_ENDED'/>\r\n    <operation type='do' method='clearAllWins'/>\r\n    <operation type='do' method='startSpin'/>\r\n  </state>\r\n  <state name='SPINNING_STATE'>\r\n    <transition target='STOPPING_STATE' action='STOP_REEL_SPIN'/>\r\n    <transition target='ABORT_SPIN_STATE' action='ABORT_SPIN'/>\r\n    <operation type='do' method='checkForStopOrAbort'/>\r\n  </state>\r\n  <state name='FS_IDLE'>\r\n    <transition target='SPIN_STARTING_STATE' action='START_REEL_SPIN'/>\r\n    <operation type='do' method='executeContinueCommand'/>\r\n    <operation type='exit' method='updateBetPanelFS'/>\r\n  </state>\r\n  <state name='ABORT_SPIN_STATE'>\r\n    <transition target='IDLE_STATE' action='SPIN_ENABLED'/>\r\n\t<transition target='FS_IDLE' action='CONTINUE_ENABLED'/>\r\n\t<operation type='entry' method='applyAbortData'/>\r\n  </state>\r\n  <state name='STOPPING_STATE'>\r\n    <transition target='SHOW_FS_WIN' condition='!awardCapExceeded,Stage==BaseGame,NextStage==FreeSpin' action='PRESENT_SPIN_OUTCOME'/>\r\n    <transition target='BASEGAME_OUTCOME' condition='!awardCapExceeded,Stage==BaseGame,NextStage==BaseGame' action='PRESENT_SPIN_OUTCOME'/>\r\n    <transition target='SHOW_WIN_STATE' condition='!awardCapExceeded,Stage==FreeSpin' action='PRESENT_SPIN_OUTCOME'/>\r\n    <transition target='AWARD_CAP_PREPARE' condition='awardCapExceeded' action='PRESENT_SPIN_OUTCOME'/>\r\n    <operation type='do' method='stopReels'/>\r\n  </state>\r\n  <state name='AWARD_CAP_PREPARE'>\r\n    <transition target='AWARD_CAP_STATE' action='PRESENT_RESULT'/>\r\n    <operation type='do' method='publishSpinOutcomePresented'/>\r\n    <operation type='do' method='setBaseGameOutcome'/>\r\n  </state>\r\n  <state name='AWARD_CAP_STATE'>\r\n    <transition target='BET_CONFIRM' action='CONTINUE'/>\r\n    <operation type='do' method='showAwardCapScreen'/>\r\n  </state>\r\n  <state name='SHOW_FS_WIN'>\r\n    <transition target='FS_INTRO' action='FS_WIN_SHOWN'/>\r\n    <operation type='do' method='showScatterWins'/>\r\n  </state>\r\n  <state name='BASEGAME_OUTCOME'>\r\n    <transition target='BET_CONFIRM' action='PRESENT_RESULT'/>\r\n    <operation type='entry' method='showBaseGameWins'/>\r\n    <operation type='entry' method='displayBaseGameWin'/>\r\n    <operation type='do' method='publishSpinOutcomePresented'/>\r\n  </state>\r\n  <state name='SHOW_WIN_STATE'>\r\n    <transition target='FS_OUTCOME' action='CONTINUE'/>\r\n    <operation type='do' method='displayFreeSpinWin'/>\r\n  </state>\r\n  <state name='FS_OUTCOME'>\r\n    <transition target='RETRIGGER_STATE' condition='retrigger' action='FS_OUTCOME_DONE'/>\r\n    <transition target='FS_OUTCOME_PRESENTED' condition='!retrigger' action='FS_OUTCOME_DONE'/>\r\n    <operation type='do' method='showSkipButton'/>\r\n    <operation type='do' method='showFreeSpinWins'/>\r\n    <operation type='exit' method='showSpinButton'/>\r\n  </state>\r\n  <state name='FS_INTRO'>\r\n    <transition target='FS_OUTCOME_PRESENTED' action='FS_INTRO_ENDED'/>\r\n    <operation type='entry' method='startFSIntroAnim'/>\r\n    <operation type='exit' method='prepareFreeSpin'/>\r\n  </state>\r\n  <state name='RETRIGGER_STATE'>\r\n    <transition target='FS_OUTCOME_PRESENTED' action='RETRIGGER_SHOWN'/>\r\n    <operation type='do' method='showRetriggerScreen'/>\r\n  </state>\r\n  <state name='FS_OUTCOME_PRESENTED'>\r\n    <transition target='FS_IDLE' action='CONTINUE_ENABLED'/>\r\n    <transition target='FS_SUMMARY' action='PRESENT_RESULT'/>\r\n    <operation type='do' method='publishSpinOutcomePresented'/>\r\n  </state>\r\n  <state name='FS_SUMMARY'>\r\n    <transition target='BET_CONFIRM' action='FS_OUTRO_END'/>\r\n    <operation type='do' method='startFSOutroAnim'/>\r\n    <operation type='exit' method='setBaseGameOutcome'/>\r\n    <operation type='exit' method='showBaseGameWins'/>\r\n    <operation type='exit' method='displayTotalWin'/>\r\n  </state>\r\n  <state name='BET_CONFIRM'>\r\n    <transition target='IDLE_STATE' action='SPIN_ENABLED'/>\r\n    <operation type='do' method='publishResultPresented'/>\r\n  </state>\r\n</fsm>";;
        icywildsGameController.Data.PatternInfo = {
            'PatternInfo': {
                '@name': "Paylines",
                'Pattern': [{
                    '@name': "Line 1",
                    'Cell': [{
                        '@name': "L0C0R2"
                    }, {
                        '@name': "L0C1R2"
                    }, {
                        '@name': "L0C2R2"
                    }, {
                        '@name': "L0C3R2"
                    }, {
                        '@name': "L0C4R2"
                    }]
                }, {
                    '@name': "Line 2",
                    'Cell': [{
                        '@name': "L0C0R3"
                    }, {
                        '@name': "L0C1R3"
                    }, {
                        '@name': "L0C2R3"
                    }, {
                        '@name': "L0C3R3"
                    }, {
                        '@name': "L0C4R3"
                    }]
                }, {
                    '@name': "Line 3",
                    'Cell': [{
                        '@name': "L0C0R1"
                    }, {
                        '@name': "L0C1R1"
                    }, {
                        '@name': "L0C2R1"
                    }, {
                        '@name': "L0C3R1"
                    }, {
                        '@name': "L0C4R1"
                    }]
                }, {
                    '@name': "Line 4",
                    'Cell': [{
                        '@name': "L0C0R4"
                    }, {
                        '@name': "L0C1R4"
                    }, {
                        '@name': "L0C2R4"
                    }, {
                        '@name': "L0C3R4"
                    }, {
                        '@name': "L0C4R4"
                    }]
                }, {
                    '@name': "Line 5",
                    'Cell': [{
                        '@name': "L0C0R2"
                    }, {
                        '@name': "L0C1R3"
                    }, {
                        '@name': "L0C2R4"
                    }, {
                        '@name': "L0C3R3"
                    }, {
                        '@name': "L0C4R2"
                    }]
                }, {
                    '@name': "Line 6",
                    'Cell': [{
                        '@name': "L0C0R3"
                    }, {
                        '@name': "L0C1R2"
                    }, {
                        '@name': "L0C2R1"
                    }, {
                        '@name': "L0C3R2"
                    }, {
                        '@name': "L0C4R3"
                    }]
                }, {
                    '@name': "Line 7",
                    'Cell': [{
                        '@name': "L0C0R2"
                    }, {
                        '@name': "L0C1R1"
                    }, {
                        '@name': "L0C2R1"
                    }, {
                        '@name': "L0C3R1"
                    }, {
                        '@name': "L0C4R2"
                    }]
                }, {
                    '@name': "Line 8",
                    'Cell': [{
                        '@name': "L0C0R3"
                    }, {
                        '@name': "L0C1R4"
                    }, {
                        '@name': "L0C2R4"
                    }, {
                        '@name': "L0C3R4"
                    }, {
                        '@name': "L0C4R3"
                    }]
                }, {
                    '@name': "Line 9",
                    'Cell': [{
                        '@name': "L0C0R1"
                    }, {
                        '@name': "L0C1R2"
                    }, {
                        '@name': "L0C2R3"
                    }, {
                        '@name': "L0C3R4"
                    }, {
                        '@name': "L0C4R4"
                    }]
                }, {
                    '@name': "Line 10",
                    'Cell': [{
                        '@name': "L0C0R4"
                    }, {
                        '@name': "L0C1R3"
                    }, {
                        '@name': "L0C2R2"
                    }, {
                        '@name': "L0C3R1"
                    }, {
                        '@name': "L0C4R1"
                    }]
                }, {
                    '@name': "Line 11",
                    'Cell': [{
                        '@name': "L0C0R2"
                    }, {
                        '@name': "L0C1R2"
                    }, {
                        '@name': "L0C2R3"
                    }, {
                        '@name': "L0C3R2"
                    }, {
                        '@name': "L0C4R2"
                    }]
                }, {
                    '@name': "Line 12",
                    'Cell': [{
                        '@name': "L0C0R3"
                    }, {
                        '@name': "L0C1R3"
                    }, {
                        '@name': "L0C2R2"
                    }, {
                        '@name': "L0C3R3"
                    }, {
                        '@name': "L0C4R3"
                    }]
                }, {
                    '@name': "Line 13",
                    'Cell': [{
                        '@name': "L0C0R1"
                    }, {
                        '@name': "L0C1R1"
                    }, {
                        '@name': "L0C2R2"
                    }, {
                        '@name': "L0C3R1"
                    }, {
                        '@name': "L0C4R1"
                    }]
                }, {
                    '@name': "Line 14",
                    'Cell': [{
                        '@name': "L0C0R4"
                    }, {
                        '@name': "L0C1R4"
                    }, {
                        '@name': "L0C2R3"
                    }, {
                        '@name': "L0C3R4"
                    }, {
                        '@name': "L0C4R4"
                    }]
                }, {
                    '@name': "Line 15",
                    'Cell': [{
                        '@name': "L0C0R2"
                    }, {
                        '@name': "L0C1R2"
                    }, {
                        '@name': "L0C2R3"
                    }, {
                        '@name': "L0C3R3"
                    }, {
                        '@name': "L0C4R2"
                    }]
                }, {
                    '@name': "Line 16",
                    'Cell': [{
                        '@name': "L0C0R3"
                    }, {
                        '@name': "L0C1R3"
                    }, {
                        '@name': "L0C2R2"
                    }, {
                        '@name': "L0C3R2"
                    }, {
                        '@name': "L0C4R3"
                    }]
                }, {
                    '@name': "Line 17",
                    'Cell': [{
                        '@name': "L0C0R1"
                    }, {
                        '@name': "L0C1R1"
                    }, {
                        '@name': "L0C2R1"
                    }, {
                        '@name': "L0C3R2"
                    }, {
                        '@name': "L0C4R1"
                    }]
                }, {
                    '@name': "Line 18",
                    'Cell': [{
                        '@name': "L0C0R4"
                    }, {
                        '@name': "L0C1R4"
                    }, {
                        '@name': "L0C2R4"
                    }, {
                        '@name': "L0C3R3"
                    }, {
                        '@name': "L0C4R4"
                    }]
                }, {
                    '@name': "Line 19",
                    'Cell': [{
                        '@name': "L0C0R1"
                    }, {
                        '@name': "L0C1R2"
                    }, {
                        '@name': "L0C2R3"
                    }, {
                        '@name': "L0C3R2"
                    }, {
                        '@name': "L0C4R1"
                    }]
                }, {
                    '@name': "Line 20",
                    'Cell': [{
                        '@name': "L0C0R4"
                    }, {
                        '@name': "L0C1R3"
                    }, {
                        '@name': "L0C2R2"
                    }, {
                        '@name': "L0C3R3"
                    }, {
                        '@name': "L0C4R4"
                    }]
                }, {
                    '@name': "Line 21",
                    'Cell': [{
                        '@name': "L0C0R1"
                    }, {
                        '@name': "L0C1R1"
                    }, {
                        '@name': "L0C2R2"
                    }, {
                        '@name': "L0C3R2"
                    }, {
                        '@name': "L0C4R1"
                    }]
                }, {
                    '@name': "Line 22",
                    'Cell': [{
                        '@name': "L0C0R4"
                    }, {
                        '@name': "L0C1R4"
                    }, {
                        '@name': "L0C2R3"
                    }, {
                        '@name': "L0C3R3"
                    }, {
                        '@name': "L0C4R4"
                    }]
                }, {
                    '@name': "Line 23",
                    'Cell': [{
                        '@name': "L0C0R1"
                    }, {
                        '@name': "L0C1R2"
                    }, {
                        '@name': "L0C2R1"
                    }, {
                        '@name': "L0C3R2"
                    }, {
                        '@name': "L0C4R1"
                    }]
                }, {
                    '@name': "Line 24",
                    'Cell': [{
                        '@name': "L0C0R4"
                    }, {
                        '@name': "L0C1R3"
                    }, {
                        '@name': "L0C2R4"
                    }, {
                        '@name': "L0C3R3"
                    }, {
                        '@name': "L0C4R4"
                    }]
                }, {
                    '@name': "Line 25",
                    'Cell': [{
                        '@name': "L0C0R2"
                    }, {
                        '@name': "L0C1R3"
                    }, {
                        '@name': "L0C2R3"
                    }, {
                        '@name': "L0C3R2"
                    }, {
                        '@name': "L0C4R2"
                    }]
                }, {
                    '@name': "Line 26",
                    'Cell': [{
                        '@name': "L0C0R3"
                    }, {
                        '@name': "L0C1R2"
                    }, {
                        '@name': "L0C2R2"
                    }, {
                        '@name': "L0C3R3"
                    }, {
                        '@name': "L0C4R3"
                    }]
                }, {
                    '@name': "Line 27",
                    'Cell': [{
                        '@name': "L0C0R2"
                    }, {
                        '@name': "L0C1R2"
                    }, {
                        '@name': "L0C2R1"
                    }, {
                        '@name': "L0C3R2"
                    }, {
                        '@name': "L0C4R2"
                    }]
                }, {
                    '@name': "Line 28",
                    'Cell': [{
                        '@name': "L0C0R3"
                    }, {
                        '@name': "L0C1R3"
                    }, {
                        '@name': "L0C2R4"
                    }, {
                        '@name': "L0C3R3"
                    }, {
                        '@name': "L0C4R3"
                    }]
                }, {
                    '@name': "Line 29",
                    'Cell': [{
                        '@name': "L0C0R2"
                    }, {
                        '@name': "L0C1R1"
                    }, {
                        '@name': "L0C2R2"
                    }, {
                        '@name': "L0C3R1"
                    }, {
                        '@name': "L0C4R2"
                    }]
                }, {
                    '@name': "Line 30",
                    'Cell': [{
                        '@name': "L0C0R3"
                    }, {
                        '@name': "L0C1R4"
                    }, {
                        '@name': "L0C2R3"
                    }, {
                        '@name': "L0C3R4"
                    }, {
                        '@name': "L0C4R3"
                    }]
                }, {
                    '@name': "Line 31",
                    'Cell': [{
                        '@name': "L0C0R1"
                    }, {
                        '@name': "L0C1R2"
                    }, {
                        '@name': "L0C2R2"
                    }, {
                        '@name': "L0C3R2"
                    }, {
                        '@name': "L0C4R1"
                    }]
                }, {
                    '@name': "Line 32",
                    'Cell': [{
                        '@name': "L0C0R4"
                    }, {
                        '@name': "L0C1R3"
                    }, {
                        '@name': "L0C2R3"
                    }, {
                        '@name': "L0C3R3"
                    }, {
                        '@name': "L0C4R4"
                    }]
                }, {
                    '@name': "Line 33",
                    'Cell': [{
                        '@name': "L0C0R2"
                    }, {
                        '@name': "L0C1R3"
                    }, {
                        '@name': "L0C2R2"
                    }, {
                        '@name': "L0C3R1"
                    }, {
                        '@name': "L0C4R2"
                    }]
                }, {
                    '@name': "Line 34",
                    'Cell': [{
                        '@name': "L0C0R3"
                    }, {
                        '@name': "L0C1R2"
                    }, {
                        '@name': "L0C2R3"
                    }, {
                        '@name': "L0C3R4"
                    }, {
                        '@name': "L0C4R3"
                    }]
                }, {
                    '@name': "Line 35",
                    'Cell': [{
                        '@name': "L0C0R4"
                    }, {
                        '@name': "L0C1R4"
                    }, {
                        '@name': "L0C2R3"
                    }, {
                        '@name': "L0C3R2"
                    }, {
                        '@name': "L0C4R1"
                    }]
                }, {
                    '@name': "Line 36",
                    'Cell': [{
                        '@name': "L0C0R1"
                    }, {
                        '@name': "L0C1R1"
                    }, {
                        '@name': "L0C2R2"
                    }, {
                        '@name': "L0C3R3"
                    }, {
                        '@name': "L0C4R4"
                    }]
                }, {
                    '@name': "Line 37",
                    'Cell': [{
                        '@name': "L0C0R1"
                    }, {
                        '@name': "L0C1R2"
                    }, {
                        '@name': "L0C2R2"
                    }, {
                        '@name': "L0C3R1"
                    }, {
                        '@name': "L0C4R1"
                    }]
                }, {
                    '@name': "Line 38",
                    'Cell': [{
                        '@name': "L0C0R4"
                    }, {
                        '@name': "L0C1R3"
                    }, {
                        '@name': "L0C2R3"
                    }, {
                        '@name': "L0C3R4"
                    }, {
                        '@name': "L0C4R4"
                    }]
                }, {
                    '@name': "Line 39",
                    'Cell': [{
                        '@name': "L0C0R1"
                    }, {
                        '@name': "L0C1R1"
                    }, {
                        '@name': "L0C2R3"
                    }, {
                        '@name': "L0C3R1"
                    }, {
                        '@name': "L0C4R1"
                    }]
                }, {
                    '@name': "Line 40",
                    'Cell': [{
                        '@name': "L0C0R4"
                    }, {
                        '@name': "L0C1R4"
                    }, {
                        '@name': "L0C2R2"
                    }, {
                        '@name': "L0C3R4"
                    }, {
                        '@name': "L0C4R4"
                    }]
                }, {
                    '@name': "Line 41",
                    'Cell': [{
                        '@name': "L0C0R1"
                    }, {
                        '@name': "L0C1R2"
                    }, {
                        '@name': "L0C2R1"
                    }, {
                        '@name': "L0C3R1"
                    }, {
                        '@name': "L0C4R1"
                    }]
                }, {
                    '@name': "Line 42",
                    'Cell': [{
                        '@name': "L0C0R4"
                    }, {
                        '@name': "L0C1R3"
                    }, {
                        '@name': "L0C2R4"
                    }, {
                        '@name': "L0C3R4"
                    }, {
                        '@name': "L0C4R4"
                    }]
                }, {
                    '@name': "Line 43",
                    'Cell': [{
                        '@name': "L0C0R2"
                    }, {
                        '@name': "L0C1R3"
                    }, {
                        '@name': "L0C2R3"
                    }, {
                        '@name': "L0C3R3"
                    }, {
                        '@name': "L0C4R2"
                    }]
                }, {
                    '@name': "Line 44",
                    'Cell': [{
                        '@name': "L0C0R3"
                    }, {
                        '@name': "L0C1R2"
                    }, {
                        '@name': "L0C2R2"
                    }, {
                        '@name': "L0C3R2"
                    }, {
                        '@name': "L0C4R3"
                    }]
                }, {
                    '@name': "Line 45",
                    'Cell': [{
                        '@name': "L0C0R2"
                    }, {
                        '@name': "L0C1R3"
                    }, {
                        '@name': "L0C2R2"
                    }, {
                        '@name': "L0C3R3"
                    }, {
                        '@name': "L0C4R2"
                    }]
                }, {
                    '@name': "Line 46",
                    'Cell': [{
                        '@name': "L0C0R3"
                    }, {
                        '@name': "L0C1R2"
                    }, {
                        '@name': "L0C2R3"
                    }, {
                        '@name': "L0C3R2"
                    }, {
                        '@name': "L0C4R3"
                    }]
                }, {
                    '@name': "Line 47",
                    'Cell': [{
                        '@name': "L0C0R2"
                    }, {
                        '@name': "L0C1R2"
                    }, {
                        '@name': "L0C2R4"
                    }, {
                        '@name': "L0C3R2"
                    }, {
                        '@name': "L0C4R2"
                    }]
                }, {
                    '@name': "Line 48",
                    'Cell': [{
                        '@name': "L0C0R3"
                    }, {
                        '@name': "L0C1R3"
                    }, {
                        '@name': "L0C2R1"
                    }, {
                        '@name': "L0C3R3"
                    }, {
                        '@name': "L0C4R3"
                    }]
                }, {
                    '@name': "Line 49",
                    'Cell': [{
                        '@name': "L0C0R2"
                    }, {
                        '@name': "L0C1R1"
                    }, {
                        '@name': "L0C2R2"
                    }, {
                        '@name': "L0C3R3"
                    }, {
                        '@name': "L0C4R2"
                    }]
                }, {
                    '@name': "Line 50",
                    'Cell': [{
                        '@name': "L0C0R3"
                    }, {
                        '@name': "L0C1R4"
                    }, {
                        '@name': "L0C2R3"
                    }, {
                        '@name': "L0C3R2"
                    }, {
                        '@name': "L0C4R3"
                    }]
                }]
            }
        };;
        return {
            exports: icywildsGameController,
            activator: icywildsGameController.Activator
        };
    });
//# sourceURL=icyWildsGameController.js