define("icyWildsAnimation", ["icyWildsComponentsAnimationPort", "viewBuilderApi", "componentmodelComponentApi", "clientkernelLoaderApi", "displayEngineApi", "gameLayoutApi", "clientkernelEventbusApi", "clientkernelModulesApi", "icywildsComponentsAnimationDeclaration"],
    function(icyWildsComponentsAnimationPort, viewBuilderApi, componentmodelComponentApi, clientkernelLoaderApi, displayEngineApi, gameLayoutApi, clientkernelEventbusApi, clientkernelModulesApi, icywildsComponentsAnimationDeclaration) {
        "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"
                };
            },
            keys: function() {
                return {
                    arguments: [],
                    returns: "null"
                };
            }
        };
        if (!haxe._Int64) {
            haxe._Int64 = {};
        };
        haxe._Int64.___Int64 = function(high, low) {
            this.high = high;
            this.low = low;
        };
        haxe._Int64.___Int64.__name__ = ["haxe", "_Int64", "___Int64"];
        haxe._Int64.___Int64.prototype.high = null;
        haxe._Int64.___Int64.prototype.low = null;
        haxe._Int64.___Int64.prototype.__class__ = haxe._Int64.___Int64;
        haxe.Log = function() {};
        haxe.Log.__name__ = ["haxe", "Log"];
        haxe.Log.trace = function(v, infos) {
            _hcmn_.js_Boot.__trace(v, infos);
        };
        haxe.Log.prototype.__class__ = haxe.Log;
        if (!haxe.io) {
            haxe.io = {};
        };
        haxe.io.Error = {
            __ename__: ["haxe", "io", "Error"],
            __constructs__: ["Blocked", "Overflow", "OutsideBounds", "Custom"]
        };
        haxe.io.Error.Custom = function(e) {
            var $x = ["Custom", 3, e];
            $x.__enum__ = haxe.io.Error;
            $x.toString = $estr;
            return $x;
        };
        haxe.io.Error.Blocked = ["Blocked", 0];
        haxe.io.Error.Blocked.toString = $estr;
        haxe.io.Error.Blocked.__enum__ = haxe.io.Error;
        haxe.io.Error.Overflow = ["Overflow", 1];
        haxe.io.Error.Overflow.toString = $estr;
        haxe.io.Error.Overflow.__enum__ = haxe.io.Error;
        haxe.io.Error.OutsideBounds = ["OutsideBounds", 2];
        haxe.io.Error.OutsideBounds.toString = $estr;
        haxe.io.Error.OutsideBounds.__enum__ = haxe.io.Error;
        haxe.io.FPHelper = function() {};
        haxe.io.FPHelper.__name__ = ["haxe", "io", "FPHelper"];
        haxe.io.FPHelper.i32ToFloat = function(i) {
            var sign = 1 - (i >>> 31 << 1);
            var exp = i >>> 23 & 255;
            var sig = i & 8388607;
            if (sig == 0 && exp == 0) return 0.0;
            return sign * (1 + _hcmn_.Math.pow(2, -23) * sig) * _hcmn_.Math.pow(2, exp - 127);
        };
        haxe.io.FPHelper.floatToI32 = function(f) {
            if (f == 0) return 0;
            var af;
            if (f < 0) af = -f;
            else af = f;
            var exp = _hcmn_.Math.floor(_hcmn_.Math.log(af) / 0.6931471805599453);
            if (exp < -127) exp = -127;
            else if (exp > 128) exp = 128;
            var sig = _hcmn_.Math.round((af / _hcmn_.Math.pow(2, exp) - 1) * 8388608) & 8388607;
            return (f < 0 ? -2147483648 : 0) | exp + 127 << 23 | sig;
        };
        haxe.io.FPHelper.i64ToDouble = function(low, high) {
            var sign = 1 - (high >>> 31 << 1);
            var exp = (high >> 20 & 2047) - 1023;
            var sig = (high & 1048575) * 4294967296. + (low >>> 31) * 2147483648. + (low & 2147483647);
            if (sig == 0 && exp == -1023) return 0.0;
            return sign * (1.0 + _hcmn_.Math.pow(2, -52) * sig) * _hcmn_.Math.pow(2, exp);
        };
        haxe.io.FPHelper.doubleToI64 = function(v) {
            var i64 = haxe.io.FPHelper.i64tmp;
            if (v == 0) {
                i64.low = 0;
                i64.high = 0;
            } else {
                var av;
                if (v < 0) av = -v;
                else av = v;
                var exp = _hcmn_.Math.floor(_hcmn_.Math.log(av) / 0.6931471805599453);
                var sig;
                var v1 = (av / _hcmn_.Math.pow(2, exp) - 1) * 4503599627370496.;
                sig = _hcmn_.Math.round(v1);
                var sig_l = sig | 0;
                var sig_h = sig / 4294967296.0 | 0;
                i64.low = sig_l;
                i64.high = (v < 0 ? -2147483648 : 0) | exp + 1023 << 20 | sig_h;
            }
            return i64;
        };
        haxe.io.FPHelper.prototype.__class__ = haxe.io.FPHelper;
        if (typeof icyWildsAnimation == 'undefined') {
            var icyWildsAnimation = {};
        };
        icyWildsAnimation.Activator = function(context) {};
        icyWildsAnimation.Activator = ck_implements(icyWildsAnimation.Activator, clientkernelModulesApi.IModuleActivator);
        icyWildsAnimation.Activator.__interfaces__ = [clientkernelModulesApi.IModuleActivator];
        icyWildsAnimation.Activator.__name__ = ["icyWildsAnimation", "Activator"];
        icyWildsAnimation.Activator.prototype.start = function(context) {
            context.getServiceTracker([viewBuilderApi.IViewBuilderFactory, clientkernelLoaderApi.IAssetRegistry, displayEngineApi.IDisplayProvider]).then(function(context1) {
                icyWildsAnimation.ExternalService.initialize(context1);
                var vbf = context1.getAnyService(viewBuilderApi.IViewBuilderFactory, null);
                icyWildsAnimation.ExternalService.viewBuilderFactory = vbf;
                context1.registerService(new icyWildsAnimation.AnimationFactory(vbf, context1), icywildsComponentsAnimationDeclaration.AnimationDeclaration, null);
            });
        };
        icyWildsAnimation.Activator.prototype.stop = function(context) {};
        icyWildsAnimation.Activator.main = function() {};
        icyWildsAnimation.Activator.prototype.__class__ = icyWildsAnimation.Activator;
        icyWildsAnimation.Animation = function(context, vbf, cfgId) {
            this.initialized = false;
            this.layoutPayload = null;
            this.vba = null;
            var _g = this;
            this.vbf = vbf;
            this.cfgId = cfgId;
            this.context = context;
            this.port = context.getImplementedPort(icyWildsComponentsAnimationPort.IAnimationImplementationPort);
            this.layoutPort = context.getUsedPort(gameLayoutApi.IGameLayoutPort);
            this.layoutPort.getUpdateComponentLayout().subscribe($bind(this, this.updateLayout));
            if (cfgId.indexOf("free_spin") != -1) {
                icyWildsAnimation.ExternalService.loadVBAssets("FREE_GAME_INTRO_VB", $bind(this, this.loadMainAsset));
                icyWildsAnimation.ExternalService.loadVBAssets("START_BUTTON_VB", $bind(this, this.loadMainAsset));
            } else icyWildsAnimation.ExternalService.assetRegistry.getAsset(cfgId).getContent().then(function(vba) {
                _g.vba = vba;
                _g.initialize();
            });
        };
        icyWildsAnimation.Animation.__name__ = ["icyWildsAnimation", "Animation"];
        icyWildsAnimation.Animation.prototype.view = null;
        icyWildsAnimation.Animation.prototype.component = null;
        icyWildsAnimation.Animation.prototype.componentId = null;
        icyWildsAnimation.Animation.prototype.cfgId = null;
        icyWildsAnimation.Animation.prototype.context = null;
        icyWildsAnimation.Animation.prototype.vba = null;
        icyWildsAnimation.Animation.prototype.vbf = null;
        icyWildsAnimation.Animation.prototype.controller = null;
        icyWildsAnimation.Animation.prototype.layoutPayload = null;
        icyWildsAnimation.Animation.prototype.initialized = null;
        icyWildsAnimation.Animation.prototype.port = null;
        icyWildsAnimation.Animation.prototype.layoutPort = null;
        icyWildsAnimation.Animation.prototype.loadMainAsset = function() {
            var _g = this;
            icyWildsAnimation.ExternalService.assetRegistry.getAsset(this.cfgId).getContent().then(function(vba) {
                _g.vba = vba;
                if (!_g.initialized) _g.initialize();
            });
        };
        icyWildsAnimation.Animation.prototype.updateLayout = function(e) {
            this.layoutPayload = e.getPayload();
            if (!this.initialized) this.initialize();
            else {
                this.controller.updateLayout(this.layoutPayload);
                this.layoutPort.getComponentLayoutUpdated().publish(this.context.getInstance());
            }
        };
        icyWildsAnimation.Animation.prototype.initialize = function() {
            if (!this.initialized && this.vba != null && this.layoutPayload != null) {
                this.controller = new icyWildsAnimation.AnimationController(this);
                this.view = this.vbf.createView(this.vba);
                this.registerAllComponents();
                this.controller.init();
                this.controller.updateLayout(this.layoutPayload);
                this.layoutPort.getComponentLayoutUpdated().publish(this.context.getInstance());
                this.initialized = true;
            }
        };
        icyWildsAnimation.Animation.prototype.registerAllComponents = function() {
            var $it0 = (function($this) {
                var $r;
                var this1 = $this.view.getChildComponents();
                $r = this1.keys();
                return $r;
            }(this));
            while ($it0.hasNext()) {
                var compId = $it0.next();
                var constructorIndex;
                var _this = _hcmn_.Type.getEnumConstructs(icyWildsAnimation.ComponentsEnum);
                constructorIndex = _hcmn_.HxOverrides.indexOf(_this, compId, 0);
                if (constructorIndex < 0) continue;
                var componentEnum = _hcmn_.Type.createEnum(icyWildsAnimation.ComponentsEnum, compId, null);
                this.registerComponent(componentEnum);
            }
        };
        icyWildsAnimation.Animation.prototype.registerComponent = function(componentEnum) {
            this.component = null;
            switch (componentEnum[1]) {
                case 0:
                    this.registerContainerComponent(icyWildsAnimation.ComponentsEnum.INTRO_IN_CONTAINER, icyWildsAnimation.FreeGameIntro);
                    break;
                case 1:
                    this.registerContainerComponent(icyWildsAnimation.ComponentsEnum.REEL_FRAMES_CONTAINER, icyWildsAnimation.ReelFrames);
                    break;
                case 2:
                    this.registerContainerComponent(icyWildsAnimation.ComponentsEnum.ICY_WILDS_LOGO, icyWildsAnimation.Logo);
                    break;
                default:
                    return false;
            }
            return true;
        };
        icyWildsAnimation.Animation.prototype.registerContainerComponent = function(componentEnum, componentClass) {
            var container = this.view.getComponentById(componentEnum[0]);
            if (container == null) return;
            this.component = _hcmn_.Type.createInstance(componentClass, [container]);
            this.componentId = componentEnum;
        };
        icyWildsAnimation.Animation.prototype.getComponent = function() {
            return this.component;
        };
        icyWildsAnimation.Animation.prototype.__class__ = icyWildsAnimation.Animation;
        icyWildsAnimation.AnimationController = function(animation) {
            this.flag_addedToStage = false;
            this.animation = animation;
        };
        icyWildsAnimation.AnimationController.__name__ = ["icyWildsAnimation", "AnimationController"];
        icyWildsAnimation.AnimationController.prototype.flag_addedToStage = null;
        icyWildsAnimation.AnimationController.prototype.animation = null;
        icyWildsAnimation.AnimationController.prototype.init = function() {
            this.animation.port.getShow().subscribe($bind(this, this.handleShow));
            this.animation.port.getHide().subscribe($bind(this, this.handleHide));
            this.animation.port.getCount().subscribe($bind(this, this.handleCount));
            if (this.animation.componentId == icyWildsAnimation.ComponentsEnum.INTRO_IN_CONTAINER) {
                var introInContainer = this.animation.getComponent();
                introInContainer.getEvents().ANIMATION_ENDED().addListener($bind(this, this.onFreeGameIntroAnimationComplete));
                introInContainer.getEvents().COUNTER_FINISHED().addListener($bind(this, this.onFreeGameCounterFinished));
                introInContainer.getEvents().BUTTON_CLICKED().addListener($bind(this, this.onFreeGameIntroButtonClicked));
            }
        };
        icyWildsAnimation.AnimationController.prototype.updateLayout = function(layoutPayload) {
            var $it0 = layoutPayload.containers.keys();
            while ($it0.hasNext()) {
                var layerId = $it0.next();
                var layerPayload = layoutPayload.containers.get(layerId);
                var cfg = layerPayload.configuration;
                var stage;
                var this1 = icyWildsAnimation.ExternalService.displayProvider.getStages();
                stage = this1.get(layerPayload.stage);
                var container;
                container = (function($this) {
                    var $r;
                    var this2 = $this.animation.view.getChildComponents();
                    $r = this2.get(layerId);
                    return $r;
                }(this));
                var containerDO = container.getDisplayObject();
                if (!this.flag_addedToStage) stage.addChild(containerDO);
                containerDO.setX(layerPayload.left);
                containerDO.setY(layerPayload.top);
                containerDO.setScaleX(layerPayload.width / containerDO.getUserData().viewBuilderW);
                containerDO.setScaleY(layerPayload.height / containerDO.getUserData().viewBuilderH);
                containerDO.setZIndex(layerPayload.zIndex);
                if (cfg == null) continue;
                this.animation.getComponent().configure(cfg);
            }
            if (!this.flag_addedToStage) this.flag_addedToStage = true;
        };
        icyWildsAnimation.AnimationController.prototype.onFreeGameIntroAnimationComplete = function(e) {
            this.animation.port.getShown().publishForThis(e);
        };
        icyWildsAnimation.AnimationController.prototype.onFreeGameCounterFinished = function(e) {
            haxe.Log.trace("[ng3]onFreeGameCounterFinished" + e, {
                fileName: "AnimationController.hx",
                lineNumber: 93,
                className: "icywilds.components.animation.AnimationController",
                methodName: "onFreeGameCounterFinished"
            });
            this.animation.port.getCountFinished().publishForThis(e);
        };
        icyWildsAnimation.AnimationController.prototype.onFreeGameIntroButtonClicked = function(e) {
            haxe.Log.trace("[im] (Animation) onFreeGameIntroButtonClicked" + e, {
                fileName: "AnimationController.hx",
                lineNumber: 98,
                className: "icywilds.components.animation.AnimationController",
                methodName: "onFreeGameIntroButtonClicked"
            });
            this.animation.port.getTriggered().publishForThis(e);
        };
        icyWildsAnimation.AnimationController.prototype.handleHide = function(e) {
            haxe.Log.trace("[im] (Animation) hide", {
                fileName: "AnimationController.hx",
                lineNumber: 103,
                className: "icywilds.components.animation.AnimationController",
                methodName: "handleHide",
                customParams: [this.animation.componentId]
            });
            this.animation.getComponent().hide();
        };
        icyWildsAnimation.AnimationController.prototype.handleShow = function(e) {
            haxe.Log.trace("[im] (Animation) show", {
                fileName: "AnimationController.hx",
                lineNumber: 108,
                className: "icywilds.components.animation.AnimationController",
                methodName: "handleShow",
                customParams: [this.animation.componentId]
            });
            this.animation.getComponent().show(e.getPayload());
        };
        icyWildsAnimation.AnimationController.prototype.handleCount = function(e) {
            var freeGameIntro = this.animation.getComponent();
            freeGameIntro.count(e.getPayload());
        };
        icyWildsAnimation.AnimationController.prototype.__class__ = icyWildsAnimation.AnimationController;
        icyWildsAnimation.AnimationFactory = function(vbf, context) {
            this.context = context;
            this.vbf = vbf;
        };
        icyWildsAnimation.AnimationFactory = ck_implements(icyWildsAnimation.AnimationFactory, clientkernelModulesApi.IService);
        icyWildsAnimation.AnimationFactory = ck_implements(icyWildsAnimation.AnimationFactory, componentmodelComponentApi.IComponentFactory);
        icyWildsAnimation.AnimationFactory.__interfaces__ = [clientkernelModulesApi.IService, componentmodelComponentApi.IComponentFactory];
        icyWildsAnimation.AnimationFactory.__name__ = ["icyWildsAnimation", "AnimationFactory"];
        icyWildsAnimation.AnimationFactory.prototype.vbf = null;
        icyWildsAnimation.AnimationFactory.prototype.context = null;
        icyWildsAnimation.AnimationFactory.prototype.getComponentDeclaration = function() {
            return icywildsComponentsAnimationDeclaration.AnimationDeclaration;
        };
        icyWildsAnimation.AnimationFactory.prototype.createComponent = function(context) {
            var cfgId = context.getConfiguration();
            new icyWildsAnimation.Animation(context, this.vbf, cfgId);
        };
        icyWildsAnimation.AnimationFactory.prototype.__class__ = icyWildsAnimation.AnimationFactory;
        icyWildsAnimation.ExternalService = function() {};
        icyWildsAnimation.ExternalService.__name__ = ["icyWildsAnimation", "ExternalService"];
        icyWildsAnimation.ExternalService.displayProvider = null;
        icyWildsAnimation.ExternalService.assetRegistry = null;
        icyWildsAnimation.ExternalService.viewBuilderFactory = null;
        icyWildsAnimation.ExternalService.loadedCallback = null;
        icyWildsAnimation.ExternalService.initialize = function(context) {
            icyWildsAnimation.ExternalService.displayProvider = context.getAnyService(displayEngineApi.IDisplayProvider, null);
            icyWildsAnimation.ExternalService.assetRegistry = context.getAnyService(clientkernelLoaderApi.IAssetRegistry, null);
        };
        icyWildsAnimation.ExternalService.loadVBAssets = function(id, loadedCallback) {
            icyWildsAnimation.ExternalService.loadedCallback = loadedCallback;
            icyWildsAnimation.ExternalService.loading++;
            icyWildsAnimation.ExternalService.assetRegistry.getAsset(id).getContent().then(function(vba) {
                icyWildsAnimation.ExternalService.loadedAssets.set(id, vba);
                icyWildsAnimation.ExternalService.ceheckLoaded();
            });
        };
        icyWildsAnimation.ExternalService.ceheckLoaded = function() {
            icyWildsAnimation.ExternalService.totalLoaded++;
            if (icyWildsAnimation.ExternalService.totalLoaded == icyWildsAnimation.ExternalService.loading) icyWildsAnimation.ExternalService.loadedCallback();
        };
        icyWildsAnimation.ExternalService.prototype.__class__ = icyWildsAnimation.ExternalService;
        icyWildsAnimation.Counter = function() {
            this.counterOn = true;
            this._stepincrement = 0;
            this._stepTimeLenght = 1;
            this._stepNo = 1;
            this._numOfSteps = 0;
            this._duration = 0;
        };
        icyWildsAnimation.Counter.__name__ = ["icyWildsAnimation", "Counter"];
        icyWildsAnimation.Counter.prototype.animationPort = null;
        icyWildsAnimation.Counter.prototype._startValue = null;
        icyWildsAnimation.Counter.prototype._endValue = null;
        icyWildsAnimation.Counter.prototype._currentValue = null;
        icyWildsAnimation.Counter.prototype._duration = null;
        icyWildsAnimation.Counter.prototype._numOfSteps = null;
        icyWildsAnimation.Counter.prototype._stepFunction = null;
        icyWildsAnimation.Counter.prototype._finishFunction = null;
        icyWildsAnimation.Counter.prototype._stepNo = null;
        icyWildsAnimation.Counter.prototype._stepTimeLenght = null;
        icyWildsAnimation.Counter.prototype._stepincrement = null;
        icyWildsAnimation.Counter.prototype.counterOn = null;
        icyWildsAnimation.Counter.prototype.startCounter = function(counterPayload, stepFunction, finishFunction) {
            this._startValue = counterPayload.startValue;
            this._endValue = counterPayload.endValue;
            this._duration = counterPayload.duration;
            this._numOfSteps = counterPayload.numOfSteps;
            this._stepFunction = stepFunction;
            this._finishFunction = finishFunction;
            this._stepTimeLenght = this._duration / this._numOfSteps;
            this._stepincrement = (this._endValue - this._startValue) / this._numOfSteps;
            this._currentValue = this._startValue;
            this.counterOn = true;
            if (this._startValue == this._endValue) this._finishFunction(this._endValue);
            else {
                this._stepFunction(this._startValue);
                this.step();
            }
        };
        icyWildsAnimation.Counter.prototype.step = function() {
            if (!this.counterOn) return;
            this._currentValue = this._currentValue + this._stepincrement;
            this._stepFunction(this._currentValue);
            this._stepNo++;
            if (this._stepNo == this._numOfSteps) _hcmn_.haxe_Timer.delay($bind(this, this.callFinishFunction), this._stepTimeLenght | 0);
            else _hcmn_.haxe_Timer.delay($bind(this, this.step), this._stepTimeLenght | 0);
        };
        icyWildsAnimation.Counter.prototype.callFinishFunction = function() {
            this._finishFunction(this._endValue);
            this._stepNo = 1;
            this._stepTimeLenght = 1;
            this._stepincrement = 0;
        };
        icyWildsAnimation.Counter.prototype.turnOffCounter = function() {
            this.counterOn = false;
        };
        icyWildsAnimation.Counter.prototype.__class__ = icyWildsAnimation.Counter;

        icyWildsAnimation.IAnimationComponent = function() {}
        icyWildsAnimation.IAnimationComponent.prototype = {

            show: function(state) {
                return {
                    arguments: ["*"],
                    returns: "void"
                };
            },
            hide: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            },
            configure: function(cfg) {
                return {
                    arguments: ["*"],
                    returns: "void"
                };
            }
        };

        icyWildsAnimation.IFreeGameIntro = function() {}
        icyWildsAnimation.IFreeGameIntro.prototype = {

            count: function(payload) {
                return {
                    arguments: ["*"],
                    returns: "void"
                };
            },
            getEvents: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            }
        };
        icyWildsAnimation.FreeGameIntro = function(container) {
            this.startCounter = false;
            this.endAnim = false;
            this.loopCount = 0;
            this.container = container;
            container.show();
            this._events = new icyWildsAnimation.TransitionScreenEvents();
            this.actionShownId = null;
            this.counter = new icyWildsAnimation.Counter();
        };
        icyWildsAnimation.FreeGameIntro = ck_implements(icyWildsAnimation.FreeGameIntro, icyWildsAnimation.IFreeGameIntro);
        icyWildsAnimation.FreeGameIntro.__interfaces__ = [icyWildsAnimation.IFreeGameIntro];
        icyWildsAnimation.FreeGameIntro.__name__ = ["icyWildsAnimation", "FreeGameIntro"];
        icyWildsAnimation.FreeGameIntro.prototype.container = null;
        icyWildsAnimation.FreeGameIntro.prototype._events = null;
        icyWildsAnimation.FreeGameIntro.prototype.startBtnSkin = null;
        icyWildsAnimation.FreeGameIntro.prototype.startBtnContainer = null;
        icyWildsAnimation.FreeGameIntro.prototype.freeGameIntroContainer = null;
        icyWildsAnimation.FreeGameIntro.prototype.freeGameIntroContainerContent = null;
        icyWildsAnimation.FreeGameIntro.prototype.freeGameIntroAnimationHolder = null;
        icyWildsAnimation.FreeGameIntro.prototype.freeGameIntroAnimation = null;
        icyWildsAnimation.FreeGameIntro.prototype.actionShownId = null;
        icyWildsAnimation.FreeGameIntro.prototype.loopCount = null;
        icyWildsAnimation.FreeGameIntro.prototype.endAnim = null;
        icyWildsAnimation.FreeGameIntro.prototype.counterpayload = null;
        icyWildsAnimation.FreeGameIntro.prototype.startCounter = null;
        icyWildsAnimation.FreeGameIntro.prototype.counter = null;
        icyWildsAnimation.FreeGameIntro.prototype.show = function(payload) {
            this.startCounter = false;
            this.endAnim = false;
            this.actionShownId = payload.action;
            this.freeGameIntroContainer = this.container.createContainerFromStoredConfig("FreeGameIntroContainer");
            this.container.addChildComponent(this.freeGameIntroContainer, "FreeGameIntroContainer");
            this.freeGameIntroAnimationHolder = _hcmn_.js_Boot.__cast(this.freeGameIntroContainer.getComponentById("FREE_GAME_INTRO"), viewBuilderApi.IViewBuilderContainer);
            var vbAsset = icyWildsAnimation.ExternalService.loadedAssets.get("FREE_GAME_INTRO" + "_VB");
            if (vbAsset != null) {
                var vbAnimView = icyWildsAnimation.ExternalService.viewBuilderFactory.createView(vbAsset);
                var vbdbAniamtionHolder;
                vbdbAniamtionHolder = _hcmn_.js_Boot.__cast(vbAnimView.createContainerFromStoredConfig("ANIMATION_HOLDER"), viewBuilderApi.IViewBuilderContainer);
                this.freeGameIntroAnimation = _hcmn_.js_Boot.__cast(vbdbAniamtionHolder.getComponentById("ANIMATION_CONTENT"), viewBuilderApi.IVBAnimationComponent);
                this.freeGameIntroAnimationHolder.addChildComponent(this.freeGameIntroAnimation, "FREE_GAME_INTRO" + "VB");
                this.freeGameIntroAnimation.addEventListener("evIntroComplete", $bind(this, this.onIntroAnimEnd), ["loop", false]);
                this.freeGameIntroAnimation.addEventListener("evOutroComplete", $bind(this, this.onOutroAnimEnd), [null, false]);
                this.freeGameIntroAnimation.addEventListener("evOneLoopComplete", $bind(this, this.onOneLoopEnd), ["loop", false]);
                this.loopCount = 0;
                this.freeGameIntroAnimation.gotoAndPlay(false, "intro");
            }
            this.freeGameIntroContainerContent = _hcmn_.js_Boot.__cast(this.freeGameIntroContainer.getComponentById("PanelContentContainer"), viewBuilderApi.IViewBuilderContainer);
            this.freeGameIntroContainerContent.hide();
            var labelsContainer = this.freeGameIntroContainerContent.getComponentById("Labels");
            this.setLabelData(labelsContainer, payload.data);
            this.startBtnContainer = _hcmn_.js_Boot.__cast(this.freeGameIntroContainerContent.getComponentById("StartButtonContainer"), viewBuilderApi.IViewBuilderContainer);
            var vbAsset1 = icyWildsAnimation.ExternalService.loadedAssets.get("START_BUTTON" + "_VB");
            if (vbAsset1 != null) {
                var startBtnAnimHolder;
                startBtnAnimHolder = _hcmn_.js_Boot.__cast(this.startBtnContainer.getComponentById("StartButtonSkin"), viewBuilderApi.IViewBuilderContainer);
                var vbAnimView1 = icyWildsAnimation.ExternalService.viewBuilderFactory.createView(vbAsset1);
                var vbdbAniamtionHolder1;
                vbdbAniamtionHolder1 = _hcmn_.js_Boot.__cast(vbAnimView1.createContainerFromStoredConfig("ANIMATION_HOLDER"), viewBuilderApi.IViewBuilderContainer);
                this.startBtnSkin = _hcmn_.js_Boot.__cast(vbdbAniamtionHolder1.getComponentById("ANIMATION_CONTENT"), viewBuilderApi.IVBAnimationComponent);
                startBtnAnimHolder.addChildComponent(this.startBtnSkin, "START_BUTTON" + "_VB");
                var btn;
                btn = _hcmn_.js_Boot.__cast(this.startBtnContainer.getComponentById("StartButtonMask"), viewBuilderApi.IButton);
                btn.getEvents().DOWN().addListener($bind(this, this.onStartClicked));
                btn.getEvents().OVER().addListener($bind(this, this.onStartOver));
                btn.getEvents().OUT().addListener($bind(this, this.onStartOut));
                this.startBtnSkin.gotoAndPlay(false, "enabled");
                if (this.actionShownId == "play_in") this.startBtnContainer.show();
                else this.startBtnContainer.hide();
            }
        };
        icyWildsAnimation.FreeGameIntro.prototype.introScreenCreatedAndShown = function() {
            this._events.ANIMATION_ENDED().dispatch("FREE_GAME_INTRO" + ":" + "intro_created");
        };
        icyWildsAnimation.FreeGameIntro.prototype.setLabelData = function(labelsContainer, data) {
            var $it0 = (function($this) {
                var $r;
                var this1 = labelsContainer.getChildComponents();
                $r = this1.keys();
                return $r;
            }(this));
            while ($it0.hasNext()) {
                var key = $it0.next();
                var label = labelsContainer.getComponentById(key);
                if ((_hcmn_.__map_reserved[key] != null ? data.getReserved(key) : data.h[key]) != null) {
                    var text = _hcmn_.Std.string(_hcmn_.__map_reserved[key] != null ? data.getReserved(key) : data.h[key]);
                    label.setText(text);
                }
            }
        };
        icyWildsAnimation.FreeGameIntro.prototype.count = function(counterpayload) {
            this.counterpayload = counterpayload;
            this.startCounter = true;
        };
        icyWildsAnimation.FreeGameIntro.prototype.setText = function(value) {
            var labelsContainer = this.freeGameIntroContainerContent.getComponentById("Labels");
            var label = labelsContainer.getComponentById("FS_label2");
            label.setText(value == null ? "null" : "" + value);
        };
        icyWildsAnimation.FreeGameIntro.prototype.finishCounter = function(value) {
            var labelsContainer = this.freeGameIntroContainerContent.getComponentById("Labels");
            var label = labelsContainer.getComponentById("FS_label2");
            label.setText(value == null ? "null" : "" + value);
            this.endAnim = true;
            this._events.COUNTER_FINISHED().dispatch("FREE_GAME_INTRO" + ":" + this.actionShownId);
        };
        icyWildsAnimation.FreeGameIntro.prototype.onIntroAnimEnd = function(data) {
            var _g = this;
            this.freeGameIntroContainerContent.show();
            if (this.startCounter) {
                this.startCounter = false;
                _hcmn_.haxe_Timer.delay(function() {
                    _g.counter.startCounter(_g.counterpayload, $bind(_g, _g.setText), $bind(_g, _g.finishCounter));
                }, 1000);
            }
        };
        icyWildsAnimation.FreeGameIntro.prototype.onOutroAnimEnd = function() {
            this.freeGameIntroAnimation.hide();
            this.freeGameIntroAnimation.stop();
            this._events.ANIMATION_ENDED().dispatch("FREE_GAME_INTRO" + ":" + this.actionShownId);
        };
        icyWildsAnimation.FreeGameIntro.prototype.onOneLoopEnd = function(data) {
            var frameLabel = data[0];
            var offscreen = data[1];
            if (this.startCounter) {
                var counter = new icyWildsAnimation.Counter();
                counter.startCounter(this.counterpayload, $bind(this, this.setText), $bind(this, this.finishCounter));
                this.startCounter = false;
            }
            if (this.endAnim) {
                this.freeGameIntroContainerContent.hide();
                this.freeGameIntroAnimation.gotoAndPlay(false, "outro");
                this.endAnim = false;
            } else this.freeGameIntroAnimation.gotoAndPlay(offscreen, "loop");
        };
        icyWildsAnimation.FreeGameIntro.prototype.onStartClicked = function(e) {
            this.startBtnSkin.gotoAndStop(false, "down");
            this.freeGameIntroContainerContent.hide();
            this.freeGameIntroAnimation.gotoAndPlay(false, "outro");
            this.counter.turnOffCounter();
            this.endAnim = false;
            this._events.BUTTON_CLICKED().dispatch("START_BUTTON");
        };
        icyWildsAnimation.FreeGameIntro.prototype.onStartOver = function(e) {
            this.startBtnSkin.gotoAndStop(false, "over");
        };
        icyWildsAnimation.FreeGameIntro.prototype.onStartOut = function(e) {
            this.startBtnSkin.gotoAndStop(false, "enabled");
        };
        icyWildsAnimation.FreeGameIntro.prototype.hide = function() {
            var _g = this;
            _hcmn_.haxe_Timer.delay(function() {
                _g.container.disposeChildComponent("FreeGameIntroContainer");
            }, 0);
        };
        icyWildsAnimation.FreeGameIntro.prototype.dispose = function() {
            this.freeGameIntroContainerContent.hide();
            this.freeGameIntroAnimation.stop();
            this.startBtnSkin.stop();
            this.endAnim = false;
            this.freeGameIntroContainer = null;
            this.freeGameIntroContainerContent = null;
            this.freeGameIntroAnimationHolder = null;
            this.freeGameIntroAnimation = null;
            this.startBtnContainer = null;
            this.startBtnSkin = null;
        };
        icyWildsAnimation.FreeGameIntro.prototype.getEvents = function() {
            return this._events;
        };
        icyWildsAnimation.FreeGameIntro.prototype.configure = function(config) {};
        icyWildsAnimation.FreeGameIntro.prototype.__class__ = icyWildsAnimation.FreeGameIntro;
        icyWildsAnimation.Logo = function(container) {
            this.container = container;
            container.show();
            this.hLogo = container.getComponentById("logo_horizontal").getDisplayObject();
            this.vLogo = container.getComponentById("logo_vertical").getDisplayObject();
            this.companyLogo = container.getComponentById("logo_static").getDisplayObject();
            this.hLogo.setVisible(true);
            this.vLogo.setVisible(false);
            this.companyLogo.setVisible(false);
        };
        icyWildsAnimation.Logo = ck_implements(icyWildsAnimation.Logo, icyWildsAnimation.IAnimationComponent);
        icyWildsAnimation.Logo.__interfaces__ = [icyWildsAnimation.IAnimationComponent];
        icyWildsAnimation.Logo.__name__ = ["icyWildsAnimation", "Logo"];
        icyWildsAnimation.Logo.prototype.container = null;
        icyWildsAnimation.Logo.prototype.hLogo = null;
        icyWildsAnimation.Logo.prototype.vLogo = null;
        icyWildsAnimation.Logo.prototype.companyLogo = null;
        icyWildsAnimation.Logo.prototype.show = function(payload) {
            this.container.show();
        };
        icyWildsAnimation.Logo.prototype.hide = function() {
            this.container.hide();
        };
        icyWildsAnimation.Logo.prototype.configure = function(config) {
            if (config.type == 1) {
                this.hLogo.setVisible(true);
                this.vLogo.setVisible(false);
            } else if (config.type == 2) {
                this.vLogo.setVisible(true);
                this.hLogo.setVisible(false);
            }
            if (config.companyLogo != null) {
                this.companyLogo.setVisible(true);
                var left = config.companyLogo.left;
                var top = config.companyLogo.top;
                this.companyLogo.setX(left);
                this.companyLogo.setY(top);
            } else this.companyLogo.setVisible(false);
        };
        icyWildsAnimation.Logo.prototype.__class__ = icyWildsAnimation.Logo;
        icyWildsAnimation.ReelFrames = function(container) {
            this.container = container;
            container.show();
        };
        icyWildsAnimation.ReelFrames = ck_implements(icyWildsAnimation.ReelFrames, icyWildsAnimation.IAnimationComponent);
        icyWildsAnimation.ReelFrames.__interfaces__ = [icyWildsAnimation.IAnimationComponent];
        icyWildsAnimation.ReelFrames.__name__ = ["icyWildsAnimation", "ReelFrames"];
        icyWildsAnimation.ReelFrames.prototype.container = null;
        icyWildsAnimation.ReelFrames.prototype.show = function(state) {
            this.container.show();
        };
        icyWildsAnimation.ReelFrames.prototype.hide = function() {
            this.container.hide();
        };
        icyWildsAnimation.ReelFrames.prototype.configure = function(config) {};
        icyWildsAnimation.ReelFrames.prototype.__class__ = icyWildsAnimation.ReelFrames;
        icyWildsAnimation.ComponentsEnum = {
            __ename__: ["icyWildsAnimation", "ComponentsEnum"],
            __constructs__: ["INTRO_IN_CONTAINER", "REEL_FRAMES_CONTAINER", "ICY_WILDS_LOGO", "COMPANY_LOGO", "BIG_WIN_ANIMATION"]
        };
        icyWildsAnimation.ComponentsEnum.ICY_WILDS_LOGO = ["ICY_WILDS_LOGO", 2];
        icyWildsAnimation.ComponentsEnum.ICY_WILDS_LOGO.toString = $estr;
        icyWildsAnimation.ComponentsEnum.ICY_WILDS_LOGO.__enum__ = icyWildsAnimation.ComponentsEnum;
        icyWildsAnimation.ComponentsEnum.INTRO_IN_CONTAINER = ["INTRO_IN_CONTAINER", 0];
        icyWildsAnimation.ComponentsEnum.INTRO_IN_CONTAINER.toString = $estr;
        icyWildsAnimation.ComponentsEnum.INTRO_IN_CONTAINER.__enum__ = icyWildsAnimation.ComponentsEnum;
        icyWildsAnimation.ComponentsEnum.BIG_WIN_ANIMATION = ["BIG_WIN_ANIMATION", 4];
        icyWildsAnimation.ComponentsEnum.BIG_WIN_ANIMATION.toString = $estr;
        icyWildsAnimation.ComponentsEnum.BIG_WIN_ANIMATION.__enum__ = icyWildsAnimation.ComponentsEnum;
        icyWildsAnimation.ComponentsEnum.COMPANY_LOGO = ["COMPANY_LOGO", 3];
        icyWildsAnimation.ComponentsEnum.COMPANY_LOGO.toString = $estr;
        icyWildsAnimation.ComponentsEnum.COMPANY_LOGO.__enum__ = icyWildsAnimation.ComponentsEnum;
        icyWildsAnimation.ComponentsEnum.REEL_FRAMES_CONTAINER = ["REEL_FRAMES_CONTAINER", 1];
        icyWildsAnimation.ComponentsEnum.REEL_FRAMES_CONTAINER.toString = $estr;
        icyWildsAnimation.ComponentsEnum.REEL_FRAMES_CONTAINER.__enum__ = icyWildsAnimation.ComponentsEnum;
        icyWildsAnimation.BaseEvent = function() {
            this._signal = new _hcmn_.msignal_Signal1();
        };
        icyWildsAnimation.BaseEvent.__name__ = ["icyWildsAnimation", "BaseEvent"];
        icyWildsAnimation.BaseEvent.prototype._signal = null;
        icyWildsAnimation.BaseEvent.prototype.addListener = function(listener) {
            this._signal.add(listener);
        };
        icyWildsAnimation.BaseEvent.prototype.removeListener = function(listener) {
            this._signal.remove(listener);
        };
        icyWildsAnimation.BaseEvent.prototype.dispatch = function(data) {
            this._signal.dispatch(data);
        };
        icyWildsAnimation.BaseEvent.prototype.__class__ = icyWildsAnimation.BaseEvent;
        icyWildsAnimation.TransitionScreenEvents = function() {
            this.buttonClicked = new icyWildsAnimation.BaseEvent();
            this.animationEnded = new icyWildsAnimation.BaseEvent();
            this.counterFinished = new icyWildsAnimation.BaseEvent();
        };
        icyWildsAnimation.TransitionScreenEvents.__name__ = ["icyWildsAnimation", "TransitionScreenEvents"];
        icyWildsAnimation.TransitionScreenEvents.prototype.buttonClicked = null;
        icyWildsAnimation.TransitionScreenEvents.prototype.animationEnded = null;
        icyWildsAnimation.TransitionScreenEvents.prototype.counterFinished = null;
        icyWildsAnimation.TransitionScreenEvents.prototype.BUTTON_CLICKED = function() {
            return this.buttonClicked;
        };
        icyWildsAnimation.TransitionScreenEvents.prototype.ANIMATION_ENDED = function() {
            return this.animationEnded;
        };
        icyWildsAnimation.TransitionScreenEvents.prototype.COUNTER_FINISHED = function() {
            return this.counterFinished;
        };
        icyWildsAnimation.TransitionScreenEvents.prototype.__class__ = icyWildsAnimation.TransitionScreenEvents;
        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;
        if (!js.html) {
            js.html = {};
        };
        if (!js.html.compat) {
            js.html.compat = {};
        };
        js.html.compat.ArrayBuffer = function(a) {
            if ((a instanceof Array) && a.__enum__ == null) {
                this.a = a;
                this.byteLength = a.length;
            } else {
                var len = a;
                this.a = [];
                var _g = 0;
                while (_g < len) {
                    var i = _g++;
                    this.a[i] = 0;
                }
                this.byteLength = len;
            }
        };
        js.html.compat.ArrayBuffer.__name__ = ["js", "html", "compat", "ArrayBuffer"];
        js.html.compat.ArrayBuffer.prototype.byteLength = null;
        js.html.compat.ArrayBuffer.prototype.a = null;
        js.html.compat.ArrayBuffer.prototype.slice = function(begin, end) {
            return new js.html.compat.ArrayBuffer(this.a.slice(begin, end));
        };
        js.html.compat.ArrayBuffer.sliceImpl = function(begin, end) {
            var u = new Uint8Array(this, begin, end == null ? null : end - begin);
            var result = new ArrayBuffer(u.byteLength);
            var resultArray = new Uint8Array(result);
            resultArray.set(u);
            return result;
        };
        js.html.compat.ArrayBuffer.prototype.__class__ = js.html.compat.ArrayBuffer;
        js.html.compat.DataView = function(buffer, byteOffset, byteLength) {
            this.buf = buffer;
            if (byteOffset == null) this.offset = 0;
            else this.offset = byteOffset;
            if (byteLength == null) this.length = buffer.byteLength - this.offset;
            else this.length = byteLength;
            if (this.offset < 0 || this.length < 0 || this.offset + this.length > buffer.byteLength) throw new js._Boot.HaxeError(haxe.io.Error.OutsideBounds);
        };
        js.html.compat.DataView.__name__ = ["js", "html", "compat", "DataView"];
        js.html.compat.DataView.prototype.buf = null;
        js.html.compat.DataView.prototype.offset = null;
        js.html.compat.DataView.prototype.length = null;
        js.html.compat.DataView.prototype.getInt8 = function(byteOffset) {
            var v = this.buf.a[this.offset + byteOffset];
            if (v >= 128) return v - 256;
            else return v;
        };
        js.html.compat.DataView.prototype.getUint8 = function(byteOffset) {
            return this.buf.a[this.offset + byteOffset];
        };
        js.html.compat.DataView.prototype.getInt16 = function(byteOffset, littleEndian) {
            var v = this.getUint16(byteOffset, littleEndian);
            if (v >= 32768) return v - 65536;
            else return v;
        };
        js.html.compat.DataView.prototype.getUint16 = function(byteOffset, littleEndian) {
            if (littleEndian) return this.buf.a[this.offset + byteOffset] | this.buf.a[this.offset + byteOffset + 1] << 8;
            else return this.buf.a[this.offset + byteOffset] << 8 | this.buf.a[this.offset + byteOffset + 1];
        };
        js.html.compat.DataView.prototype.getInt32 = function(byteOffset, littleEndian) {
            var p = this.offset + byteOffset;
            var a = this.buf.a[p++];
            var b = this.buf.a[p++];
            var c = this.buf.a[p++];
            var d = this.buf.a[p++];
            if (littleEndian) return a | b << 8 | c << 16 | d << 24;
            else return d | c << 8 | b << 16 | a << 24;
        };
        js.html.compat.DataView.prototype.getUint32 = function(byteOffset, littleEndian) {
            var v = this.getInt32(byteOffset, littleEndian);
            if (v < 0) return v + 4294967296.;
            else return v;
        };
        js.html.compat.DataView.prototype.getFloat32 = function(byteOffset, littleEndian) {
            return haxe.io.FPHelper.i32ToFloat(this.getInt32(byteOffset, littleEndian));
        };
        js.html.compat.DataView.prototype.getFloat64 = function(byteOffset, littleEndian) {
            var a = this.getInt32(byteOffset, littleEndian);
            var b = this.getInt32(byteOffset + 4, littleEndian);
            return haxe.io.FPHelper.i64ToDouble(littleEndian ? a : b, littleEndian ? b : a);
        };
        js.html.compat.DataView.prototype.setInt8 = function(byteOffset, value) {
            if (value < 0) this.buf.a[byteOffset + this.offset] = value + 128 & 255;
            else this.buf.a[byteOffset + this.offset] = value & 255;
        };
        js.html.compat.DataView.prototype.setUint8 = function(byteOffset, value) {
            this.buf.a[byteOffset + this.offset] = value & 255;
        };
        js.html.compat.DataView.prototype.setInt16 = function(byteOffset, value, littleEndian) {
            this.setUint16(byteOffset, value < 0 ? value + 65536 : value, littleEndian);
        };
        js.html.compat.DataView.prototype.setUint16 = function(byteOffset, value, littleEndian) {
            var p = byteOffset + this.offset;
            if (littleEndian) {
                this.buf.a[p] = value & 255;
                this.buf.a[p++] = value >> 8 & 255;
            } else {
                this.buf.a[p++] = value >> 8 & 255;
                this.buf.a[p] = value & 255;
            }
        };
        js.html.compat.DataView.prototype.setInt32 = function(byteOffset, value, littleEndian) {
            this.setUint32(byteOffset, value, littleEndian);
        };
        js.html.compat.DataView.prototype.setUint32 = function(byteOffset, value, littleEndian) {
            var p = byteOffset + this.offset;
            if (littleEndian) {
                this.buf.a[p++] = value & 255;
                this.buf.a[p++] = value >> 8 & 255;
                this.buf.a[p++] = value >> 16 & 255;
                this.buf.a[p++] = value >>> 24;
            } else {
                this.buf.a[p++] = value >>> 24;
                this.buf.a[p++] = value >> 16 & 255;
                this.buf.a[p++] = value >> 8 & 255;
                this.buf.a[p++] = value & 255;
            }
        };
        js.html.compat.DataView.prototype.setFloat32 = function(byteOffset, value, littleEndian) {
            this.setUint32(byteOffset, haxe.io.FPHelper.floatToI32(value), littleEndian);
        };
        js.html.compat.DataView.prototype.setFloat64 = function(byteOffset, value, littleEndian) {
            var i64 = haxe.io.FPHelper.doubleToI64(value);
            if (littleEndian) {
                this.setUint32(byteOffset, i64.low);
                this.setUint32(byteOffset, i64.high);
            } else {
                this.setUint32(byteOffset, i64.high);
                this.setUint32(byteOffset, i64.low);
            }
        };
        js.html.compat.DataView.prototype.__class__ = js.html.compat.DataView;
        js.html.compat.Uint8Array = function() {};
        js.html.compat.Uint8Array.__name__ = ["js", "html", "compat", "Uint8Array"];
        js.html.compat.Uint8Array._new = function(arg1, offset, length) {
            var arr;
            if (typeof(arg1) == "number") {
                arr = [];
                var _g = 0;
                while (_g < arg1) {
                    var i = _g++;
                    arr[i] = 0;
                }
                arr.byteLength = arr.length;
                arr.byteOffset = 0;
                arr.buffer = new js.html.compat.ArrayBuffer(arr);
            } else if (_hcmn_.js_Boot.__instanceof(arg1, js.html.compat.ArrayBuffer)) {
                var buffer = arg1;
                if (offset == null) offset = 0;
                if (length == null) length = buffer.byteLength - offset;
                if (offset == 0) arr = buffer.a;
                else arr = buffer.a.slice(offset, offset + length);
                arr.byteLength = arr.length;
                arr.byteOffset = offset;
                arr.buffer = buffer;
            } else if ((arg1 instanceof Array) && arg1.__enum__ == null) {
                arr = arg1.slice();
                arr.byteLength = arr.length;
                arr.byteOffset = 0;
                arr.buffer = new js.html.compat.ArrayBuffer(arr);
            } else throw new js._Boot.HaxeError("TODO " + _hcmn_.Std.string(arg1));
            arr.subarray = js.html.compat.Uint8Array._subarray;
            arr.set = js.html.compat.Uint8Array._set;
            return arr;
        };
        js.html.compat.Uint8Array._set = function(arg, offset) {
            var t = this;
            if (_hcmn_.js_Boot.__instanceof(arg.buffer, js.html.compat.ArrayBuffer)) {
                var a = arg;
                if (arg.byteLength + offset > t.byteLength) throw new js._Boot.HaxeError("set() outside of range");
                var _g1 = 0;
                var _g = arg.byteLength;
                while (_g1 < _g) {
                    var i = _g1++;
                    t[i + offset] = a[i];
                }
            } else if ((arg instanceof Array) && arg.__enum__ == null) {
                var a1 = arg;
                if (a1.length + offset > t.byteLength) throw new js._Boot.HaxeError("set() outside of range");
                var _g11 = 0;
                var _g2 = a1.length;
                while (_g11 < _g2) {
                    var i1 = _g11++;
                    t[i1 + offset] = a1[i1];
                }
            } else throw new js._Boot.HaxeError("TODO");
        };
        js.html.compat.Uint8Array._subarray = function(start, end) {
            var t = this;
            var a = js.html.compat.Uint8Array._new(t.slice(start, end));
            a.byteOffset = start;
            return a;
        };
        js.html.compat.Uint8Array.prototype.__class__ = js.html.compat.Uint8Array; {
            var ArrayBuffer = (Function("return typeof ArrayBuffer != 'undefined' ? ArrayBuffer : null"))() || js.html.compat.ArrayBuffer;
            if (ArrayBuffer.prototype.slice == null) ArrayBuffer.prototype.slice = js.html.compat.ArrayBuffer.sliceImpl;
        };
        var DataView = (Function("return typeof DataView != 'undefined' ? DataView : null"))() || js.html.compat.DataView;
        var Uint8Array = (Function("return typeof Uint8Array != 'undefined' ? Uint8Array : null"))() || js.html.compat.Uint8Array._new;
        haxe.io.FPHelper.i64tmp = (function($this) {
            var $r;
            var x = new haxe._Int64.___Int64(0, 0);
            $r = x;
            return $r;
        }(this));;
        icyWildsAnimation.ExternalService.loadedAssets = new _hcmn_.haxe_ds_StringMap();;
        icyWildsAnimation.ExternalService.loading = 0;;
        icyWildsAnimation.ExternalService.totalLoaded = 0;;
        icyWildsAnimation.FreeGameIntro.ANIMATION_ID = "FREE_GAME_INTRO";;
        icyWildsAnimation.FreeGameIntro.START_BUTTON_ID = "START_BUTTON";;
        js.html.compat.Uint8Array.BYTES_PER_ELEMENT = 1;;
        return {
            exports: icyWildsAnimation,
            activator: icyWildsAnimation.Activator
        };
    });
//# sourceURL=icyWildsAnimation.js