System.register([], function (_export, _context) {
    "use strict";

    return {
        setters: [],
        execute: function () {
            const __SystemJSRewritingHack = {};
            _recorder_._src_client_reactive_active_group_utils_js = _recorder_._src_client_reactive_active_group_utils_js || {};
            Object.defineProperty(_recorder_._src_client_reactive_active_group_utils_js, 'identity', {
                get() {
                    return identity;
                },

                set(thisIsVererySecretVariableName) {
                    _export('identity', identity = thisIsVererySecretVariableName);

                    return true;
                },

                enumerable: true,
                configurable: true
            });
            Object.defineProperty(_recorder_._src_client_reactive_active_group_utils_js, 'isPrimitive', {
                get() {
                    return isPrimitive;
                },

                set(thisIsVererySecretVariableName) {
                    _export('isPrimitive', isPrimitive = thisIsVererySecretVariableName);

                    return true;
                },

                enumerable: true,
                configurable: true
            });
            Object.defineProperty(_recorder_._src_client_reactive_active_group_utils_js, 'removeIfExisting', {
                get() {
                    return removeIfExisting;
                },

                set(thisIsVererySecretVariableName) {
                    _export('removeIfExisting', removeIfExisting = thisIsVererySecretVariableName);

                    return true;
                },

                enumerable: true,
                configurable: true
            });
            Object.defineProperty(_recorder_._src_client_reactive_active_group_utils_js, 'pushIfMissing', {
                get() {
                    return pushIfMissing;
                },

                set(thisIsVererySecretVariableName) {
                    _export('pushIfMissing', pushIfMissing = thisIsVererySecretVariableName);

                    return true;
                },

                enumerable: true,
                configurable: true
            });
            function pushIfMissing(array, item) {
                // check for already existing.
                var exists = false;
                var len = array.length;
                for (var i = 0; i < len; i++) if (array[i] == item) {
                    exists = true;
                    break;
                }

                // do not add an already existing item
                if (!exists) {
                    array.push(item);
                }

                // return true if the given element was pushed, otherwise false
                return !exists;
            }

            _export('pushIfMissing', pushIfMissing);

            function removeIfExisting(array, item) {
                var index = array.indexOf(item);
                if (index !== -1) {
                    array.splice(index, 1);
                    // return true if the given element was actually removed
                    return true;
                }
                return false;
            }

            _export('removeIfExisting', removeIfExisting);

            class Stack {
                constructor() {
                    this.arr = [];
                }

                push(el) {
                    this.arr.push(el);
                }

                pop() {
                    this.arr.length--;
                }

                top() {
                    return this.arr.last();
                }
            }

            _export('Stack', Stack);

            Object.defineProperty(_recorder_._src_client_reactive_active_group_utils_js, 'Stack', {
                get() {
                    return Stack;
                },

                set(thisIsVererySecretVariableName) {
                    _export('Stack', Stack = thisIsVererySecretVariableName);

                    return true;
                },

                enumerable: true,
                configurable: true
            });
            function isPrimitive(elem) {
                var getType = function (elem) {
                    return Object.prototype.toString.call(elem).slice(8, -1);
                };

                var type = getType(elem);

                return type === 'String' || type === 'RegExp' || type === 'Boolean' || type === 'Number' || type === 'Null' || type === 'Undefined';
            }

            _export('isPrimitive', isPrimitive);

            function identity(x) {
                return x;
            }

            _export('identity', identity);
        }
    };
});