define("icyWildsSlotModelGamePluginGle", ["clientkernelLoaderApi", "slotModelApi", "slotmodelGamePluginCommonGle", "money", "clientkernelEventbusApi", "clientkernelModulesApi", "slotmodelGamePluginApi", "clientkernelLoggerApi"],
    function(clientkernelLoaderApi, slotModelApi, slotmodelGamePluginCommonGle, money, clientkernelEventbusApi, clientkernelModulesApi, slotmodelGamePluginApi, clientkernelLoggerApi) {
        "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 = {

        };
        if (typeof icyWildsSlotModelGamePluginGle == 'undefined') {
            var icyWildsSlotModelGamePluginGle = {};
        };
        icyWildsSlotModelGamePluginGle.GamePlugin = function() {
            this.commonParser = new slotmodelGamePluginCommonGle.PfPluginCommonResponseParser(icyWildsSlotModelGamePluginGle.GamePlugin.GAME_ID, $bind(this, this.onError), icyWildsSlotModelGamePluginGle.GamePlugin.PF_RESPONSE_PARSER_ERROR_ID);
            this.localParser = new icyWildsSlotModelGamePluginGle.PfPluginResponseParser(icyWildsSlotModelGamePluginGle.GamePlugin.GAME_ID, $bind(this, this.onError), icyWildsSlotModelGamePluginGle.GamePlugin.PF_RESPONSE_PARSER_ERROR_ID, this.commonParser);
        };
        icyWildsSlotModelGamePluginGle.GamePlugin = ck_implements(icyWildsSlotModelGamePluginGle.GamePlugin, clientkernelModulesApi.IService);
        icyWildsSlotModelGamePluginGle.GamePlugin = ck_implements(icyWildsSlotModelGamePluginGle.GamePlugin, slotmodelGamePluginApi.IGamePlugin);
        icyWildsSlotModelGamePluginGle.GamePlugin.__interfaces__ = [clientkernelModulesApi.IService, slotmodelGamePluginApi.IGamePlugin];
        icyWildsSlotModelGamePluginGle.GamePlugin.__name__ = ["icyWildsSlotModelGamePluginGle", "GamePlugin"];
        icyWildsSlotModelGamePluginGle.GamePlugin.prototype.context = null;
        icyWildsSlotModelGamePluginGle.GamePlugin.prototype.commonParser = null;
        icyWildsSlotModelGamePluginGle.GamePlugin.prototype.localParser = null;
        icyWildsSlotModelGamePluginGle.GamePlugin.prototype.start = function(context) {};
        icyWildsSlotModelGamePluginGle.GamePlugin.prototype.stop = function(context) {};
        icyWildsSlotModelGamePluginGle.GamePlugin.prototype.getImplementedFeatures = function() {
            return icyWildsSlotModelGamePluginGle.GamePlugin.IMPLEMENTED;
        };
        icyWildsSlotModelGamePluginGle.GamePlugin.prototype.getBonusWins = function(platformResponse, stage, slotDefinition) {
            var bonusWins = [];
            var parseError = false;
            var reelPictureSize = slotDefinition.reelPictureSize;
            var reelPictureVisibility = slotDefinition.reelPictureVisibility;
            parseError = this.commonParser.parseBonus_PrizeOutcomes(bonusWins, icyWildsSlotModelGamePluginGle.GamePlugin.BONUS_WILD_ANNOUNCEMENT_TYPE, icyWildsSlotModelGamePluginGle.GamePlugin.BONUS_WILD_ANNOUNCEMENT_TYPE, platformResponse, stage, slotDefinition, null, null, null, $bind(this, this.calcWildAndWildAnnouncement_position));
            if (parseError) return null;
            parseError = this.commonParser.parseBonus_PrizeOutcomes(bonusWins, icyWildsSlotModelGamePluginGle.GamePlugin.BONUS_WILDS_TYPE, icyWildsSlotModelGamePluginGle.GamePlugin.BONUS_WILDS_TYPE, platformResponse, stage, slotDefinition, null, null, null, $bind(this, this.calcWildAndWildAnnouncement_position));
            if (parseError) return null;
            parseError = this.commonParser.parseBonus_LinePrizeOutcomes(bonusWins, icyWildsSlotModelGamePluginGle.GamePlugin.BONUS_PRINCESS_SEARCH_TYPE, icyWildsSlotModelGamePluginGle.GamePlugin.BONUS_PRINCESS_TYPE, platformResponse, stage, slotDefinition, null, $bind(this, this.calcLineWin_lineId), null, null);
            if (parseError) return null;
            if (bonusWins.length == 0) return null;
            return bonusWins;
        };
        icyWildsSlotModelGamePluginGle.GamePlugin.prototype.getScatterWins = function(platformResponse, stage, slotDefinition) {
            var isFreeSpinTrigger = false;
            var reelPictureSize = slotDefinition.reelPictureSize;
            var reelPictureVisibility = slotDefinition.reelPictureVisibility;
            var freeSpinInfo = this.commonParser.parseFreeSpinInfo(platformResponse);
            if (freeSpinInfo != null) {
                if (stage == "BaseGame") isFreeSpinTrigger = freeSpinInfo.total > 0;
                else isFreeSpinTrigger = freeSpinInfo.awarded > 0;
            }
            var winPathSymbolInfo = icyWildsSlotModelGamePluginGle.PfPluginResponseParser.DISABLED_WINNING_SYMBOL_INFO;
            if (isFreeSpinTrigger) winPathSymbolInfo = icyWildsSlotModelGamePluginGle.PfPluginResponseParser.WINNING_SYMBOL_INFO;
            var scatterWins = [];
            var parseError = false;
            parseError = this.commonParser.parseScatterWins(scatterWins, platformResponse, stage, slotDefinition, winPathSymbolInfo, null);
            if (parseError) return null;
            if (scatterWins.length == 0) return null;
            return scatterWins;
        };
        icyWildsSlotModelGamePluginGle.GamePlugin.prototype.getAdditionalLineWins = function(platformResponse, stage, slotDefinition) {
            return null;
        };
        icyWildsSlotModelGamePluginGle.GamePlugin.prototype.getResumePerStake = function(platformResponse, slotDefinition) {
            return this.localParser.parseResumePerStake(platformResponse, slotDefinition);
        };
        icyWildsSlotModelGamePluginGle.GamePlugin.prototype.getNextSpinStripeLayers = function(platformResponse, slotDefinition) {
            return this.localParser.parseNextSpinStripeLayers(platformResponse, slotDefinition);
        };
        icyWildsSlotModelGamePluginGle.GamePlugin.prototype.getCustomBigWin = function(totalStakeCredit, totalWinCredit) {
            var winMultiplier = totalWinCredit / totalStakeCredit;
            var result = new _hcmn_.haxe_ds_StringMap();
            if (winMultiplier >= icyWildsSlotModelGamePluginGle.GamePlugin.BIG_WIN_GOLD_MULTIPLIER) result.set(icyWildsSlotModelGamePluginGle.GamePlugin.BIG_WIN_GOLD, 1);
            else result.set(icyWildsSlotModelGamePluginGle.GamePlugin.BIG_WIN_GOLD, 0);
            if (winMultiplier >= icyWildsSlotModelGamePluginGle.GamePlugin.BIG_WIN_COINS_MULTIPLIER) result.set(icyWildsSlotModelGamePluginGle.GamePlugin.BIG_WIN_COINS, 1);
            else result.set(icyWildsSlotModelGamePluginGle.GamePlugin.BIG_WIN_COINS, 0);
            return result;
        };
        icyWildsSlotModelGamePluginGle.GamePlugin.prototype.onError = function(error) {
            slotmodelGamePluginCommonGle.Log.getLogger(this).error("[GamePlugin][" + error.id + "] " + error.message);
            throw new js._Boot.HaxeError(error);
        };
        icyWildsSlotModelGamePluginGle.GamePlugin.prototype.calcWildAndWildAnnouncement_position = function(params) {
            var name = params[0];
            var payName = params[1];
            var nameParts = name.split("Reel");
            if (nameParts.length > 0) return _hcmn_.Std.parseInt(nameParts[1]);
            return null;
        };
        icyWildsSlotModelGamePluginGle.GamePlugin.prototype.calcLineWin_lineId = function(name) {
            if (name == null) return null;
            var nameParts = name.split(" ");
            if (nameParts.length > 0) return _hcmn_.Std.parseInt(nameParts[1]);
            return null;
        };
        icyWildsSlotModelGamePluginGle.GamePlugin.main = function() {};
        icyWildsSlotModelGamePluginGle.GamePlugin.getKeyValuePairBonusWin = function(type, reelIndex, winningSymbol, symbolCount, winPath) {
            var id = type;
            id = "Reel" + (reelIndex == null ? "null" : "" + reelIndex);
            var lineId = 0;
            var name = "" + symbolCount + " " + winningSymbol;
            var result = new slotmodelGamePluginCommonGle.BonusWin(type, id, name, lineId);
            result.setPayProperties(1, new money.Money("0"), 1, 0);
            var position = reelIndex;
            result.setWinPath(winPath);
            result.setRenderProperties(winningSymbol, position, symbolCount);
            return result;
        };
        icyWildsSlotModelGamePluginGle.GamePlugin.prototype.__class__ = icyWildsSlotModelGamePluginGle.GamePlugin;
        icyWildsSlotModelGamePluginGle.ModuleActivator = function() {};
        icyWildsSlotModelGamePluginGle.ModuleActivator = ck_implements(icyWildsSlotModelGamePluginGle.ModuleActivator, clientkernelModulesApi.IModuleActivator);
        icyWildsSlotModelGamePluginGle.ModuleActivator.__interfaces__ = [clientkernelModulesApi.IModuleActivator];
        icyWildsSlotModelGamePluginGle.ModuleActivator.__name__ = ["icyWildsSlotModelGamePluginGle", "ModuleActivator"];
        icyWildsSlotModelGamePluginGle.ModuleActivator.prototype.gamePlugin = null;
        icyWildsSlotModelGamePluginGle.ModuleActivator.prototype.registration = null;
        icyWildsSlotModelGamePluginGle.ModuleActivator.prototype.start = function(context) {
            var _g = this;
            slotmodelGamePluginCommonGle.Log.init(context);
            context.getServiceTracker([clientkernelLoaderApi.IAssetRegistry, clientkernelLoggerApi.ILoggerFactory, clientkernelEventbusApi.IEventBus]).then(function(context1) {
                _g.gamePlugin = new icyWildsSlotModelGamePluginGle.GamePlugin();
                _g.registration = context1.registerService(_g.gamePlugin, slotmodelGamePluginApi.IGamePlugin, null);
            });
        };
        icyWildsSlotModelGamePluginGle.ModuleActivator.prototype.stop = function(context) {
            if (this.gamePlugin != null) this.gamePlugin.stop(context);
            if (this.registration != null) this.registration.unregister();
        };
        icyWildsSlotModelGamePluginGle.ModuleActivator.main = function() {};
        icyWildsSlotModelGamePluginGle.ModuleActivator.prototype.__class__ = icyWildsSlotModelGamePluginGle.ModuleActivator;
        icyWildsSlotModelGamePluginGle.PfPluginResponseParser = function(gameId, onError, payloadErrorId, commonParser) {
            this.parseError = false;
            this.gameId = gameId;
            this.onError = onError;
            this.payloadErrorId = payloadErrorId;
            this.commonParser = commonParser;
        };
        icyWildsSlotModelGamePluginGle.PfPluginResponseParser.__name__ = ["icyWildsSlotModelGamePluginGle", "PfPluginResponseParser"];
        icyWildsSlotModelGamePluginGle.PfPluginResponseParser.prototype.commonParser = null;
        icyWildsSlotModelGamePluginGle.PfPluginResponseParser.prototype.onError = null;
        icyWildsSlotModelGamePluginGle.PfPluginResponseParser.prototype.payloadErrorId = null;
        icyWildsSlotModelGamePluginGle.PfPluginResponseParser.prototype.gameId = null;
        icyWildsSlotModelGamePluginGle.PfPluginResponseParser.prototype.parseError = null;
        icyWildsSlotModelGamePluginGle.PfPluginResponseParser.prototype.onParseFatalError = function(message) {
            slotmodelGamePluginCommonGle.Log.getLoggerBykey("PfPluginResponseParser").error("[ParseFatalError]" + message);
            this.parseError = true;
            this.onError(this.getFatalError("ParseFatalError", message));
        };
        icyWildsSlotModelGamePluginGle.PfPluginResponseParser.prototype.getFatalError = function(source, message) {
            return new slotModelApi.Error(this.payloadErrorId, true, "[" + this.gameId + "][" + source + "] " + message);
        };
        icyWildsSlotModelGamePluginGle.PfPluginResponseParser.prototype.parseResumePerStake = function(response, slotDefinition) {
            var defaultBaseOutcome = slotmodelGamePluginCommonGle.Outcome.create2("BaseGame", this.getBaseGameStartReelPicture(response, slotDefinition));
            var defaultFreeSpinOutcome = slotmodelGamePluginCommonGle.Outcome.create2("FreeSpin", this.getFreeSpinStartReelPicture(response, slotDefinition));
            var baseOutcomes = this.parseKeyValuePairOutcomes(response, slotDefinition, "BaseGame");
            var freeSpinOutcomes = this.parseKeyValuePairOutcomes(response, slotDefinition, "FreeSpin");
            return new icyWildsSlotModelGamePluginGle.ResumePerStake(defaultBaseOutcome, baseOutcomes, defaultFreeSpinOutcome, freeSpinOutcomes);
        };
        icyWildsSlotModelGamePluginGle.PfPluginResponseParser.prototype.parseNextSpinStripeLayers = function(response, slotDefinition) {
            var reelCount = slotDefinition.reelPictureSize.reelCount;
            var defaultBaseNextSpinStripeLayer = icyWildsSlotModelGamePluginGle.PfPluginResponseParser.createIntArray(reelCount, icyWildsSlotModelGamePluginGle.GamePlugin.BASE_GAME_DEFAULT_STRIPE_LAYER);
            var defaultFreeSpinNextSpinStripeLayer = icyWildsSlotModelGamePluginGle.PfPluginResponseParser.createIntArray(reelCount, icyWildsSlotModelGamePluginGle.GamePlugin.FREE_SPIN_DEFAULT_STRIPE_LAYER);
            var baseNextSpinStripeLayer = this.parseKeyValuePairNextSpinStripeLayers(response, slotDefinition, "BaseGame");
            var freeSpinNextSpinStripeLayer = this.parseKeyValuePairNextSpinStripeLayers(response, slotDefinition, "FreeSpin");
            return new icyWildsSlotModelGamePluginGle.NextSpinStripeLayers(defaultBaseNextSpinStripeLayer, baseNextSpinStripeLayer, defaultFreeSpinNextSpinStripeLayer, freeSpinNextSpinStripeLayer);
        };
        icyWildsSlotModelGamePluginGle.PfPluginResponseParser.prototype.getBaseGameStartReelPicture = function(response, slotDefinition) {
            var reelPicture = this.parseStartReelPicture(response, "BaseGame", slotDefinition);
            if (reelPicture != null) return reelPicture;
            else return slotDefinition.startReelPicture;
        };
        icyWildsSlotModelGamePluginGle.PfPluginResponseParser.prototype.getFreeSpinStartReelPicture = function(response, slotDefinition) {
            var reelPicture = this.parseStartReelPicture(response, "FreeSpin", slotDefinition);
            if (reelPicture != null) return reelPicture;
            else return slotDefinition.startFSReelPicture;
        };
        icyWildsSlotModelGamePluginGle.PfPluginResponseParser.prototype.parseStartReelPicture = function(response, stage, slotDefinition) {
            var reelPictureMappings = this.parseKeyValuePairOutcomeMappings(response, stage + ".ReelPicture");
            if (reelPictureMappings == null) return null;
            var startReelPictureString = this.getMapValue("default", reelPictureMappings);
            var startReelPicture = this.getReelPicture(startReelPictureString, slotDefinition.reelPictureSize);
            return startReelPicture;
        };
        icyWildsSlotModelGamePluginGle.PfPluginResponseParser.prototype.parseKeyValuePairOutcomes = function(response, slotDefinition, stage) {
            var reelPictureMappings = this.parseKeyValuePairOutcomeMappings(response, stage + ".ReelPicture");
            var wildAnnouncementMappings = this.parseKeyValuePairOutcomeMappings(response, stage + "." + icyWildsSlotModelGamePluginGle.GamePlugin.BONUS_WILD_ANNOUNCEMENT_TYPE);
            var wildsMappings = this.parseKeyValuePairOutcomeMappings(response, stage + "." + icyWildsSlotModelGamePluginGle.GamePlugin.BONUS_WILDS_TYPE);
            var allKeys = this.getAllKeys(reelPictureMappings, wildAnnouncementMappings, wildsMappings);
            if (allKeys == null) return null;
            var result = new _hcmn_.haxe_ds_IntMap();
            var key;
            var _g = 0;
            while (_g < allKeys.length) {
                var key1 = allKeys[_g];
                ++_g;
                var outcome = this.getKeyValuePairOutcome(key1, reelPictureMappings, wildAnnouncementMappings, wildsMappings, slotDefinition, stage);
                if (outcome != null) {
                    var key2 = this.getKeyValuePairBetPerLineCredit(key1);
                    result.h[key2] = outcome;
                }
            }
            return result;
        };
        icyWildsSlotModelGamePluginGle.PfPluginResponseParser.prototype.parseKeyValuePairNextSpinStripeLayers = function(response, slotDefinition, stage) {
            var sectionMappings = this.parseKeyValuePairOutcomeMappings(response, stage + ".Section");
            var result = new _hcmn_.haxe_ds_IntMap();
            if (sectionMappings == null) return null;
            var reelCount = slotDefinition.reelPictureSize.reelCount;
            var key;
            var $it0 = sectionMappings.keys();
            while ($it0.hasNext()) {
                var key1 = $it0.next();
                var sectionId = slotmodelGamePluginCommonGle.StdHelper.parseInt(_hcmn_.__map_reserved[key1] != null ? sectionMappings.getReserved(key1) : sectionMappings.h[key1], $bind(this, this.onParseFatalError));
                if (this.parseError) return null;
                var key2 = this.getKeyValuePairBetPerLineCredit(key1);
                var value = icyWildsSlotModelGamePluginGle.PfPluginResponseParser.createIntArray(reelCount, sectionId);
                result.h[key2] = value;
            }
            return result;
        };
        icyWildsSlotModelGamePluginGle.PfPluginResponseParser.prototype.parseKeyValuePairOutcomeMappings = function(response, fieldName) {
            var keyValuePairOutcomes = slotmodelGamePluginCommonGle.StdHelper.getArrayField(response, "KeyValuePairOutcome");
            if (keyValuePairOutcomes == null) return null;
            var mappings = null;
            var _g = 0;
            while (_g < keyValuePairOutcomes.length) {
                var keyValuePairOutcome = keyValuePairOutcomes[_g];
                ++_g;
                var name = slotmodelGamePluginCommonGle.StdHelper.getField(keyValuePairOutcome, "@name");
                if (name == fieldName) {
                    mappings = slotmodelGamePluginCommonGle.StdHelper.getArrayField(keyValuePairOutcome, "Mapping");
                    break;
                }
            }
            if (mappings == null) return null;
            var result = new _hcmn_.haxe_ds_StringMap();
            var mapping;
            var _g1 = 0;
            while (_g1 < mappings.length) {
                var mapping1 = mappings[_g1];
                ++_g1;
                var key = slotmodelGamePluginCommonGle.StdHelper.getField(mapping1, "@key");
                var value = slotmodelGamePluginCommonGle.StdHelper.getField(mapping1, "@value");
                if (_hcmn_.__map_reserved[key] != null) result.setReserved(key, value);
                else result.h[key] = value;
            }
            return result;
        };
        icyWildsSlotModelGamePluginGle.PfPluginResponseParser.prototype.getAllKeys = function(map1, map2, map3) {
            var result = [];
            var key;
            if (map1 != null) {
                var $it0 = map1.keys();
                while ($it0.hasNext()) {
                    var key1 = $it0.next();
                    result.push(key1);
                }
            }
            if (map2 != null) {
                var $it1 = map2.keys();
                while ($it1.hasNext()) {
                    var key2 = $it1.next();
                    if (map1 != null) {
                        if (_hcmn_.__map_reserved[key2] != null ? map1.existsReserved(key2) : map1.h.hasOwnProperty(key2)) continue;
                    }
                    result.push(key2);
                }
            }
            if (map3 != null) {
                var $it2 = map3.keys();
                while ($it2.hasNext()) {
                    var key3 = $it2.next();
                    if (map1 != null) {
                        if (_hcmn_.__map_reserved[key3] != null ? map1.existsReserved(key3) : map1.h.hasOwnProperty(key3)) continue;
                    }
                    if (map2 != null) {
                        if (_hcmn_.__map_reserved[key3] != null ? map2.existsReserved(key3) : map2.h.hasOwnProperty(key3)) continue;
                    }
                    result.push(key3);
                }
            }
            if (result.length == 0) return null;
            return result;
        };
        icyWildsSlotModelGamePluginGle.PfPluginResponseParser.prototype.getKeyValuePairBetPerLineCredit = function(key) {
            var keyInt = _hcmn_.Std.parseInt(key);
            return keyInt;
        };
        icyWildsSlotModelGamePluginGle.PfPluginResponseParser.prototype.getReelPicture = function(reelPictureString, reelPictureSize) {
            if (slotmodelGamePluginCommonGle.StdHelper.isEmpty(reelPictureString)) return null;
            if (reelPictureSize == null) return null;
            var reelPictureStringTrunc = reelPictureString.split(" ").join("");
            var symbols = reelPictureStringTrunc.split(icyWildsSlotModelGamePluginGle.PfPluginResponseParser.REELPICTURE_SEPARATOR);
            var reels = [];
            var reelIndex;
            var cellIndex;
            var _g1 = 0;
            var _g = reelPictureSize.reelCount;
            while (_g1 < _g) {
                var reelIndex1 = _g1++;
                reels[reelIndex1] = [];
                var _g3 = 0;
                var _g2 = reelPictureSize.reelLength;
                while (_g3 < _g2) {
                    var cellIndex1 = _g3++;
                    var symbol = symbols.splice(0, 1)[0];
                    reels[reelIndex1][cellIndex1] = symbol;
                }
            }
            return new slotModelApi.ReelPicture(reels);
        };
        icyWildsSlotModelGamePluginGle.PfPluginResponseParser.prototype.getKeyValuePairReelPictureInfo = function(reelPictureInfoString, reelPictureSize, reelPictureVisibility) {
            if (slotmodelGamePluginCommonGle.StdHelper.isEmpty(reelPictureInfoString)) return null;
            var reelPictureInfoStringTrunc = reelPictureInfoString.split(" ").join("");
            var cellsInfo = reelPictureInfoStringTrunc.split(icyWildsSlotModelGamePluginGle.PfPluginResponseParser.REELPICTURE_SEPARATOR);
            var reelPictureInfo = this.commonParser.getDefaultReelPictureInfo(reelPictureSize, 0);
            this.commonParser.updateReelPictureInfo(reelPictureInfo, cellsInfo, reelPictureVisibility, icyWildsSlotModelGamePluginGle.PfPluginResponseParser.WINNING_SYMBOL_INFO);
            return new slotModelApi.ReelPictureInfo(reelPictureInfo);
        };
        icyWildsSlotModelGamePluginGle.PfPluginResponseParser.prototype.getKeyValuePairOutcome = function(key, reelPictureMappings, wildAnnouncementMappings, wildsMappings, slotDefinition, stage) {
            var betPerLineCredit = this.getKeyValuePairBetPerLineCredit(key);
            var reelPictureSize = slotDefinition.reelPictureSize;
            var reelPictureVisibility = slotDefinition.reelPictureVisibility;
            var reelStopString = this.getMapValue(key, reelPictureMappings);
            var reelStop = this.getReelPicture(reelStopString, slotDefinition.reelPictureSize);
            var wildAnnouncementString = this.getMapValue(key, wildAnnouncementMappings);
            var wildAnnouncementBonusInfo = this.getKeyValuePairReelPictureInfo(wildAnnouncementString, reelPictureSize, reelPictureVisibility);
            var wildAnnouncementBonus = icyWildsSlotModelGamePluginGle.PfPluginResponseParser.getKeyValuePairBonusWins(icyWildsSlotModelGamePluginGle.GamePlugin.BONUS_WILD_ANNOUNCEMENT_TYPE, reelStop, wildAnnouncementBonusInfo, slotDefinition);
            var wildString = this.getMapValue(key, wildsMappings);
            var wildBonusInfo = this.getKeyValuePairReelPictureInfo(wildString, reelPictureSize, reelPictureVisibility);
            var wildBonus = icyWildsSlotModelGamePluginGle.PfPluginResponseParser.getKeyValuePairBonusWins(icyWildsSlotModelGamePluginGle.GamePlugin.BONUS_WILDS_TYPE, reelStop, wildBonusInfo, slotDefinition);
            var bonusWins = null;
            if (wildAnnouncementBonus != null || wildBonus != null) {
                bonusWins = [];
                if (wildAnnouncementBonus != null) bonusWins = bonusWins.concat(wildAnnouncementBonus);
                if (wildBonus != null) bonusWins = bonusWins.concat(wildBonus);
            }
            return slotmodelGamePluginCommonGle.Outcome.create(stage, reelStop, null, null, bonusWins);
        };
        icyWildsSlotModelGamePluginGle.PfPluginResponseParser.prototype.getMapValue = function(key, map) {
            if (map != null) {
                if (_hcmn_.__map_reserved[key] != null ? map.existsReserved(key) : map.h.hasOwnProperty(key)) return _hcmn_.__map_reserved[key] != null ? map.getReserved(key) : map.h[key];
            }
            return null;
        };
        icyWildsSlotModelGamePluginGle.PfPluginResponseParser.getKeyValuePairBonusWins = function(type, reelStop, bonusInfo, slotDefinition) {
            if (bonusInfo == null) return null;
            if (bonusInfo.reelsInfo == null) return null;
            if (reelStop == null) return null;
            if (reelStop.reels == null) return null;
            var reelsAffected = [];
            var reelSymbolCount = new _hcmn_.haxe_ds_IntMap();
            var reelWinningSymbol = new _hcmn_.haxe_ds_IntMap();
            var totalSymbolCount = 0;
            var reelIndex;
            var _g1 = 0;
            var _g = bonusInfo.reelsInfo.length;
            while (_g1 < _g) {
                var reelIndex1 = _g1++;
                var reelInfo = bonusInfo.reelsInfo[reelIndex1];
                if (reelInfo == null) continue;
                var winningSymbol = null;
                var symbolCount = 0;
                var cellIndex;
                var _g3 = 0;
                var _g2 = reelInfo.length;
                while (_g3 < _g2) {
                    var cellIndex1 = _g3++;
                    var cellInfo = reelInfo[cellIndex1];
                    if (cellInfo > 0) {
                        if (symbolCount == 0) winningSymbol = reelStop.reels[reelIndex1][cellIndex1];
                        symbolCount++;
                    }
                }
                if (symbolCount > 0) {
                    reelsAffected.push(reelIndex1);
                    totalSymbolCount += symbolCount;
                    reelSymbolCount.h[reelIndex1] = symbolCount;
                    reelWinningSymbol.h[reelIndex1] = winningSymbol;
                }
            }
            var result = null;
            if (reelsAffected.length > 0) {
                result = [];
                var reelIndex2;
                var $it0 = reelSymbolCount.keys();
                while ($it0.hasNext()) {
                    var reelIndex3 = $it0.next();
                    var reelBonusInfo = icyWildsSlotModelGamePluginGle.PfPluginResponseParser.getDefaultReelPictureInfo(slotDefinition.reelPictureSize, 0);
                    reelBonusInfo.reelsInfo[reelIndex3] = bonusInfo.reelsInfo[reelIndex3];
                    result.push(icyWildsSlotModelGamePluginGle.GamePlugin.getKeyValuePairBonusWin(type, reelIndex3, reelWinningSymbol.h[reelIndex3], reelSymbolCount.h[reelIndex3], reelBonusInfo));
                }
            }
            return result;
        };
        icyWildsSlotModelGamePluginGle.PfPluginResponseParser.getDefaultReelPictureInfo = function(reelPictureSize, defaultValue) {
            var reelsInfo = [];
            var reelIndex;
            var symbolIndex;
            var _g1 = 0;
            var _g = reelPictureSize.reelCount;
            while (_g1 < _g) {
                var reelIndex1 = _g1++;
                var reelInfo = [];
                var _g3 = 0;
                var _g2 = reelPictureSize.reelLength;
                while (_g3 < _g2) {
                    var symbolIndex1 = _g3++;
                    reelInfo.push(defaultValue);
                }
                reelsInfo.push(reelInfo);
            }
            return new slotModelApi.ReelPictureInfo(reelsInfo);
        };
        icyWildsSlotModelGamePluginGle.PfPluginResponseParser.createIntArray = function(size, value) {
            if (size == 0) return null;
            var result = [];
            var i;
            var _g = 0;
            while (_g < size) {
                var i1 = _g++;
                result.push(value);
            }
            return result;
        };
        icyWildsSlotModelGamePluginGle.PfPluginResponseParser.prototype.__class__ = icyWildsSlotModelGamePluginGle.PfPluginResponseParser;
        icyWildsSlotModelGamePluginGle.NextSpinStripeLayers = function(defaultBaseStripeLayer, baseStripeLayers, defaultFreeSpinStripeLayer, freeSpinStripeLayers) {
            this.defaultBaseStripeLayer = defaultBaseStripeLayer;
            this.baseStripeLayers = baseStripeLayers;
            this.defaultFreeSpinStripeLayer = defaultFreeSpinStripeLayer;
            this.freeSpinStripeLayers = freeSpinStripeLayers;
        };
        icyWildsSlotModelGamePluginGle.NextSpinStripeLayers = ck_implements(icyWildsSlotModelGamePluginGle.NextSpinStripeLayers, slotmodelGamePluginApi.INextSpinStripeLayers);
        icyWildsSlotModelGamePluginGle.NextSpinStripeLayers.__interfaces__ = [slotmodelGamePluginApi.INextSpinStripeLayers];
        icyWildsSlotModelGamePluginGle.NextSpinStripeLayers.__name__ = ["icyWildsSlotModelGamePluginGle", "NextSpinStripeLayers"];
        icyWildsSlotModelGamePluginGle.NextSpinStripeLayers.prototype.defaultBaseStripeLayer = null;
        icyWildsSlotModelGamePluginGle.NextSpinStripeLayers.prototype.baseStripeLayers = null;
        icyWildsSlotModelGamePluginGle.NextSpinStripeLayers.prototype.defaultFreeSpinStripeLayer = null;
        icyWildsSlotModelGamePluginGle.NextSpinStripeLayers.prototype.freeSpinStripeLayers = null;
        icyWildsSlotModelGamePluginGle.NextSpinStripeLayers.prototype.getNextSpinStripeLayers = function(stage, lineCount, betPerLineCredit) {
            if (stage.toLowerCase() == "freespin") return this.getFreeSpinStripeLayers(lineCount, betPerLineCredit);
            return this.getBaseStripeLayers(lineCount, betPerLineCredit);
        };
        icyWildsSlotModelGamePluginGle.NextSpinStripeLayers.prototype.getBaseStripeLayers = function(lineCount, betPerLineCredit) {
            if (this.baseStripeLayers != null) {
                if (this.baseStripeLayers.h.hasOwnProperty(betPerLineCredit)) return this.baseStripeLayers.h[betPerLineCredit];
            }
            return this.defaultBaseStripeLayer;
        };
        icyWildsSlotModelGamePluginGle.NextSpinStripeLayers.prototype.getFreeSpinStripeLayers = function(lineCount, betPerLineCredit) {
            if (this.freeSpinStripeLayers != null) {
                if (this.freeSpinStripeLayers.h.hasOwnProperty(betPerLineCredit)) return this.freeSpinStripeLayers.h[betPerLineCredit];
            }
            return this.defaultFreeSpinStripeLayer;
        };
        icyWildsSlotModelGamePluginGle.NextSpinStripeLayers.prototype.__class__ = icyWildsSlotModelGamePluginGle.NextSpinStripeLayers;
        icyWildsSlotModelGamePluginGle.ResumePerStake = function(defaultBaseOutcome, baseOutcomes, defaultFreeSpinOutcome, freeSpinOutcomes) {
            this.defaultBaseOutcome = defaultBaseOutcome;
            this.baseOutcomes = baseOutcomes;
            this.defaultFreeSpinOutcome = defaultFreeSpinOutcome;
            this.freeSpinOutcomes = freeSpinOutcomes;
        };
        icyWildsSlotModelGamePluginGle.ResumePerStake = ck_implements(icyWildsSlotModelGamePluginGle.ResumePerStake, slotmodelGamePluginApi.IResumePerStake);
        icyWildsSlotModelGamePluginGle.ResumePerStake.__interfaces__ = [slotmodelGamePluginApi.IResumePerStake];
        icyWildsSlotModelGamePluginGle.ResumePerStake.__name__ = ["icyWildsSlotModelGamePluginGle", "ResumePerStake"];
        icyWildsSlotModelGamePluginGle.ResumePerStake.prototype.defaultBaseOutcome = null;
        icyWildsSlotModelGamePluginGle.ResumePerStake.prototype.baseOutcomes = null;
        icyWildsSlotModelGamePluginGle.ResumePerStake.prototype.defaultFreeSpinOutcome = null;
        icyWildsSlotModelGamePluginGle.ResumePerStake.prototype.freeSpinOutcomes = null;
        icyWildsSlotModelGamePluginGle.ResumePerStake.prototype.getResumeOutcome = function(stage, lineCount, betPerLineCredit) {
            if (stage.toLowerCase() == "freespin") return this.getFreeSpinResumeOutcome(lineCount, betPerLineCredit);
            return this.getBaseResumeOutcome(lineCount, betPerLineCredit);
        };
        icyWildsSlotModelGamePluginGle.ResumePerStake.prototype.getBaseResumeOutcome = function(lineCount, betPerLineCredit) {
            if (this.baseOutcomes != null) {
                if (this.baseOutcomes.h.hasOwnProperty(betPerLineCredit)) return this.baseOutcomes.h[betPerLineCredit];
            }
            return this.defaultBaseOutcome;
        };
        icyWildsSlotModelGamePluginGle.ResumePerStake.prototype.getFreeSpinResumeOutcome = function(lineCount, betPerLineCredit) {
            if (this.freeSpinOutcomes != null) {
                if (this.freeSpinOutcomes.h.hasOwnProperty(betPerLineCredit)) return this.freeSpinOutcomes.h[betPerLineCredit];
            }
            return this.defaultFreeSpinOutcome;
        };
        icyWildsSlotModelGamePluginGle.ResumePerStake.prototype.__class__ = icyWildsSlotModelGamePluginGle.ResumePerStake;
        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;
        icyWildsSlotModelGamePluginGle.GamePlugin.IMPLEMENTED = [slotmodelGamePluginApi.EPluginFeature.SCATTER_OUTCOMES, slotmodelGamePluginApi.EPluginFeature.BONUS_OUTCOMES, slotmodelGamePluginApi.EPluginFeature.RESUME_PER_STAKE, slotmodelGamePluginApi.EPluginFeature.CUSTOM_SPIN_STRIPE_LAYER, slotmodelGamePluginApi.EPluginFeature.CUSTOM_BIG_WIN];;
        icyWildsSlotModelGamePluginGle.GamePlugin.GAME_ID = "IcyWilds";;
        icyWildsSlotModelGamePluginGle.GamePlugin.PF_RESPONSE_PARSER_ERROR_ID = 9999;;
        icyWildsSlotModelGamePluginGle.GamePlugin.BONUS_WILD_ANNOUNCEMENT_TYPE = "WildAnnouncement";;
        icyWildsSlotModelGamePluginGle.GamePlugin.BONUS_WILDS_TYPE = "Wilds";;
        icyWildsSlotModelGamePluginGle.GamePlugin.BONUS_PRINCESS_SEARCH_TYPE = "LinesAny";;
        icyWildsSlotModelGamePluginGle.GamePlugin.BONUS_PRINCESS_TYPE = "Princess";;
        icyWildsSlotModelGamePluginGle.GamePlugin.BASE_GAME_DEFAULT_STRIPE_LAYER = 4;;
        icyWildsSlotModelGamePluginGle.GamePlugin.FREE_SPIN_DEFAULT_STRIPE_LAYER = 22;;
        icyWildsSlotModelGamePluginGle.GamePlugin.BIG_WIN_GOLD = "GoldBigWin";;
        icyWildsSlotModelGamePluginGle.GamePlugin.BIG_WIN_COINS = "CoinsBigWin";;
        icyWildsSlotModelGamePluginGle.GamePlugin.BIG_WIN_GOLD_MULTIPLIER = 10;;
        icyWildsSlotModelGamePluginGle.GamePlugin.BIG_WIN_COINS_MULTIPLIER = 50;;
        icyWildsSlotModelGamePluginGle.PfPluginResponseParser.WINNING_SYMBOL_INFO = 1;;
        icyWildsSlotModelGamePluginGle.PfPluginResponseParser.DISABLED_WINNING_SYMBOL_INFO = 2;;
        icyWildsSlotModelGamePluginGle.PfPluginResponseParser.REELPICTURE_SEPARATOR = ",";;
        return {
            exports: icyWildsSlotModelGamePluginGle,
            activator: icyWildsSlotModelGamePluginGle.ModuleActivator
        };
    });
//# sourceURL=icyWildsSlotModelGamePluginGle.js