UNPKG

ember-source

Version:

A JavaScript framework for creating ambitious web applications

1 lines 745 kB
{"version":3,"sources":["license.js","loader.js","@ember/-internals/browser-environment/index.js","@ember/-internals/environment/index.js","@ember/-internals/utils/index.js","@ember/canary-features/index.js","@ember/debug/container-debug-adapter.js","@ember/debug/data-adapter.js","@ember/debug/index.js","@ember/debug/lib/capture-render-tree.js","@ember/debug/lib/deprecate.js","@ember/debug/lib/handlers.js","@ember/debug/lib/inspect.js","@ember/debug/lib/testing.js","@ember/debug/lib/warn.js","@ember/deprecated-features/index.js","@glimmer/compiler.js","@glimmer/env.js","@glimmer/syntax.js","@glimmer/util.js","@glimmer/vm.js","@glimmer/wire-format.js","@handlebars/parser/index.js","ember-babel.js","ember-template-compiler/index.js","ember-template-compiler/lib/plugins/assert-against-attrs.js","ember-template-compiler/lib/plugins/assert-against-named-outlets.js","ember-template-compiler/lib/plugins/assert-input-helper-without-block.js","ember-template-compiler/lib/plugins/assert-reserved-named-arguments.js","ember-template-compiler/lib/plugins/index.js","ember-template-compiler/lib/plugins/transform-action-syntax.js","ember-template-compiler/lib/plugins/transform-each-in-into-each.js","ember-template-compiler/lib/plugins/transform-each-track-array.js","ember-template-compiler/lib/plugins/transform-in-element.js","ember-template-compiler/lib/plugins/transform-quoted-bindings-into-just-bindings.js","ember-template-compiler/lib/plugins/transform-resolutions.js","ember-template-compiler/lib/plugins/transform-wrap-mount-and-outlet.js","ember-template-compiler/lib/plugins/utils.js","ember-template-compiler/lib/public-api.js","ember-template-compiler/lib/system/bootstrap.js","ember-template-compiler/lib/system/calculate-location-display.js","ember-template-compiler/lib/system/compile-options.js","ember-template-compiler/lib/system/compile.js","ember-template-compiler/lib/system/dasherize-component-name.js","ember-template-compiler/lib/system/initializer.js","ember-template-compiler/lib/system/precompile.js","ember-template-compiler/lib/types.js","ember-template-compiler/minimal.js","ember/version.js","simple-html-tokenizer.js"],"sourcesContent":["/*!\n * @overview Ember - JavaScript Application Framework\n * @copyright Copyright 2011 Tilde Inc. and contributors\n * Portions Copyright 2006-2011 Strobe Inc.\n * Portions Copyright 2008-2011 Apple Inc. All rights reserved.\n * @license Licensed under MIT license\n * See https://raw.github.com/emberjs/ember.js/master/LICENSE\n * @version 5.10.0-alpha.4\n */\n","/* eslint-disable no-var */\n/* globals global globalThis self */\n/* eslint-disable-next-line no-unused-vars */\nvar define, require;\n\n(function () {\n var globalObj =\n typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : null;\n\n if (globalObj === null) {\n throw new Error('unable to locate global object');\n }\n\n if (typeof globalObj.define === 'function' && typeof globalObj.require === 'function') {\n define = globalObj.define;\n require = globalObj.require;\n\n return;\n }\n\n var registry = Object.create(null);\n var seen = Object.create(null);\n\n function missingModule(name, referrerName) {\n if (referrerName) {\n throw new Error('Could not find module ' + name + ' required by: ' + referrerName);\n } else {\n throw new Error('Could not find module ' + name);\n }\n }\n\n function internalRequire(_name, referrerName) {\n var name = _name;\n var mod = registry[name];\n\n if (!mod) {\n name = name + '/index';\n mod = registry[name];\n }\n\n var exports = seen[name];\n\n if (exports !== undefined) {\n return exports;\n }\n\n exports = seen[name] = {};\n\n if (!mod) {\n missingModule(_name, referrerName);\n }\n\n var deps = mod.deps;\n var callback = mod.callback;\n var reified = new Array(deps.length);\n\n for (var i = 0; i < deps.length; i++) {\n if (deps[i] === 'exports') {\n reified[i] = exports;\n } else if (deps[i] === 'require') {\n reified[i] = require;\n } else {\n reified[i] = require(deps[i], name);\n }\n }\n\n callback.apply(this, reified);\n\n return exports;\n }\n\n require = function (name) {\n return internalRequire(name, null);\n };\n\n define = function (name, deps, callback) {\n registry[name] = { deps: deps, callback: callback };\n };\n\n // setup `require` module\n require['default'] = require;\n\n require.has = function registryHas(moduleName) {\n return Boolean(registry[moduleName]) || Boolean(registry[moduleName + '/index']);\n };\n\n require._eak_seen = require.entries = registry;\n})();\n","define(\"@ember/-internals/browser-environment/index\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.window = _exports.userAgent = _exports.location = _exports.isFirefox = _exports.isChrome = _exports.history = _exports.hasDOM = void 0;\n // check if window exists and actually is the global\n var hasDom = _exports.hasDOM = typeof self === 'object' && self !== null && self.Object === Object && typeof Window !== 'undefined' && self.constructor === Window && typeof document === 'object' && document !== null && self.document === document && typeof location === 'object' && location !== null && self.location === location && typeof history === 'object' && history !== null && self.history === history && typeof navigator === 'object' && navigator !== null && self.navigator === navigator && typeof navigator.userAgent === 'string';\n const window = _exports.window = hasDom ? self : null;\n const location$1 = _exports.location = hasDom ? self.location : null;\n const history$1 = _exports.history = hasDom ? self.history : null;\n const userAgent = _exports.userAgent = hasDom ? self.navigator.userAgent : 'Lynx (textmode)';\n const isChrome = _exports.isChrome = hasDom ? typeof chrome === 'object' && !(typeof opera === 'object') : false;\n const isFirefox = _exports.isFirefox = hasDom ? /Firefox|FxiOS/.test(userAgent) : false;\n});","define(\"@ember/-internals/environment/index\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.context = _exports.ENV = void 0;\n _exports.getENV = getENV;\n _exports.getLookup = getLookup;\n _exports.global = void 0;\n _exports.setLookup = setLookup;\n // from lodash to catch fake globals\n function checkGlobal(value) {\n return value && value.Object === Object ? value : undefined;\n }\n // element ids can ruin global miss checks\n function checkElementIdShadowing(value) {\n return value && value.nodeType === undefined ? value : undefined;\n }\n // export real global\n var global$1 = _exports.global = checkGlobal(checkElementIdShadowing(typeof global === 'object' && global)) || checkGlobal(typeof self === 'object' && self) || checkGlobal(typeof window === 'object' && window) || typeof mainContext !== 'undefined' && mainContext ||\n // set before strict mode in Ember loader/wrapper\n new Function('return this')(); // eval outside of strict mode\n\n // legacy imports/exports/lookup stuff (should we keep this??)\n const context = _exports.context = function (global, Ember) {\n return Ember === undefined ? {\n imports: global,\n exports: global,\n lookup: global\n } : {\n // import jQuery\n imports: Ember.imports || global,\n // export Ember\n exports: Ember.exports || global,\n // search for Namespaces\n lookup: Ember.lookup || global\n };\n }(global$1, global$1.Ember);\n function getLookup() {\n return context.lookup;\n }\n function setLookup(value) {\n context.lookup = value;\n }\n\n /**\n The hash of environment variables used to control various configuration\n settings. To specify your own or override default settings, add the\n desired properties to a global hash named `EmberENV` (or `ENV` for\n backwards compatibility with earlier versions of Ember). The `EmberENV`\n hash must be created before loading Ember.\n \n @class EmberENV\n @type Object\n @public\n */\n const ENV = _exports.ENV = {\n ENABLE_OPTIONAL_FEATURES: false,\n /**\n Determines whether Ember should add to `Array`\n native object prototypes, a few extra methods in order to provide a more\n friendly API.\n We generally recommend leaving this option set to true however, if you need\n to turn it off, you can add the configuration property\n `EXTEND_PROTOTYPES` to `EmberENV` and set it to `false`.\n Note, when disabled (the default configuration for Ember Addons), you will\n instead have to access all methods and functions from the Ember\n namespace.\n @property EXTEND_PROTOTYPES\n @type Boolean\n @default true\n @for EmberENV\n @public\n */\n EXTEND_PROTOTYPES: {\n Array: true\n },\n /**\n The `LOG_STACKTRACE_ON_DEPRECATION` property, when true, tells Ember to log\n a full stack trace during deprecation warnings.\n @property LOG_STACKTRACE_ON_DEPRECATION\n @type Boolean\n @default true\n @for EmberENV\n @public\n */\n LOG_STACKTRACE_ON_DEPRECATION: true,\n /**\n The `LOG_VERSION` property, when true, tells Ember to log versions of all\n dependent libraries in use.\n @property LOG_VERSION\n @type Boolean\n @default true\n @for EmberENV\n @public\n */\n LOG_VERSION: true,\n RAISE_ON_DEPRECATION: false,\n STRUCTURED_PROFILE: false,\n /**\n Whether to perform extra bookkeeping needed to make the `captureRenderTree`\n API work.\n This has to be set before the ember JavaScript code is evaluated. This is\n usually done by setting `window.EmberENV = { _DEBUG_RENDER_TREE: true };`\n before the \"vendor\" `<script>` tag in `index.html`.\n Setting the flag after Ember is already loaded will not work correctly. It\n may appear to work somewhat, but fundamentally broken.\n This is not intended to be set directly. Ember Inspector will enable the\n flag on behalf of the user as needed.\n This flag is always on in development mode.\n The flag is off by default in production mode, due to the cost associated\n with the the bookkeeping work.\n The expected flow is that Ember Inspector will ask the user to refresh the\n page after enabling the feature. It could also offer a feature where the\n user add some domains to the \"always on\" list. In either case, Ember\n Inspector will inject the code on the page to set the flag if needed.\n @property _DEBUG_RENDER_TREE\n @for EmberENV\n @type Boolean\n @default false\n @private\n */\n _DEBUG_RENDER_TREE: true /* DEBUG */,\n /**\n Whether to force all deprecations to be enabled. This is used internally by\n Ember to enable deprecations in tests. It is not intended to be set in\n projects.\n @property _ALL_DEPRECATIONS_ENABLED\n @for EmberENV\n @type Boolean\n @default false\n @private\n */\n _ALL_DEPRECATIONS_ENABLED: false,\n /**\n Override the version of ember-source used to determine when deprecations \"break\".\n This is used internally by Ember to test with deprecated features \"removed\".\n This is never intended to be set by projects.\n @property _OVERRIDE_DEPRECATION_VERSION\n @for EmberENV\n @type string | null\n @default null\n @private\n */\n _OVERRIDE_DEPRECATION_VERSION: null,\n /**\n Whether the app defaults to using async observers.\n This is not intended to be set directly, as the implementation may change in\n the future. Use `@ember/optional-features` instead.\n @property _DEFAULT_ASYNC_OBSERVERS\n @for EmberENV\n @type Boolean\n @default false\n @private\n */\n _DEFAULT_ASYNC_OBSERVERS: false,\n /**\n Whether the app still has default record-loading behavior in the model\n hook from RFC https://rfcs.emberjs.com/id/0774-implicit-record-route-loading\n This will also remove the default store property from the route.\n This is not intended to be set directly, as the implementation may change in\n the future. Use `@ember/optional-features` instead.\n @property _NO_IMPLICIT_ROUTE_MODEL\n @for EmberENV\n @type Boolean\n @default false\n @private\n */\n _NO_IMPLICIT_ROUTE_MODEL: false,\n /**\n Controls the maximum number of scheduled rerenders without \"settling\". In general,\n applications should not need to modify this environment variable, but please\n open an issue so that we can determine if a better default value is needed.\n @property _RERENDER_LOOP_LIMIT\n @for EmberENV\n @type number\n @default 1000\n @private\n */\n _RERENDER_LOOP_LIMIT: 1000,\n EMBER_LOAD_HOOKS: {},\n FEATURES: {}\n };\n (EmberENV => {\n if (typeof EmberENV !== 'object' || EmberENV === null) return;\n for (let flag in EmberENV) {\n if (!Object.prototype.hasOwnProperty.call(EmberENV, flag) || flag === 'EXTEND_PROTOTYPES' || flag === 'EMBER_LOAD_HOOKS') continue;\n let defaultValue = ENV[flag];\n if (defaultValue === true) {\n ENV[flag] = EmberENV[flag] !== false;\n } else if (defaultValue === false) {\n ENV[flag] = EmberENV[flag] === true;\n } else {\n ENV[flag] = EmberENV[flag];\n }\n }\n let {\n EXTEND_PROTOTYPES\n } = EmberENV;\n if (EXTEND_PROTOTYPES !== undefined) {\n if (typeof EXTEND_PROTOTYPES === 'object' && EXTEND_PROTOTYPES !== null) {\n ENV.EXTEND_PROTOTYPES.Array = EXTEND_PROTOTYPES.Array !== false;\n } else {\n ENV.EXTEND_PROTOTYPES.Array = EXTEND_PROTOTYPES !== false;\n }\n }\n // TODO this does not seem to be used by anything,\n // can we remove it? do we need to deprecate it?\n let {\n EMBER_LOAD_HOOKS\n } = EmberENV;\n if (typeof EMBER_LOAD_HOOKS === 'object' && EMBER_LOAD_HOOKS !== null) {\n for (let hookName in EMBER_LOAD_HOOKS) {\n if (!Object.prototype.hasOwnProperty.call(EMBER_LOAD_HOOKS, hookName)) continue;\n let hooks = EMBER_LOAD_HOOKS[hookName];\n if (Array.isArray(hooks)) {\n ENV.EMBER_LOAD_HOOKS[hookName] = hooks.filter(hook => typeof hook === 'function');\n }\n }\n }\n let {\n FEATURES\n } = EmberENV;\n if (typeof FEATURES === 'object' && FEATURES !== null) {\n for (let feature in FEATURES) {\n if (!Object.prototype.hasOwnProperty.call(FEATURES, feature)) continue;\n ENV.FEATURES[feature] = FEATURES[feature] === true;\n }\n }\n if (true /* DEBUG */) {\n ENV._DEBUG_RENDER_TREE = true;\n }\n })(global$1.EmberENV);\n function getENV() {\n return ENV;\n }\n});","define(\"@ember/-internals/utils/index\", [\"exports\", \"@ember/debug\"], function (_exports, _debug) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.ROOT = _exports.GUID_KEY = _exports.Cache = void 0;\n _exports.canInvoke = canInvoke;\n _exports.checkHasSuper = void 0;\n _exports.dictionary = makeDictionary;\n _exports.enumerableSymbol = enumerableSymbol;\n _exports.generateGuid = generateGuid;\n _exports.getDebugName = void 0;\n _exports.getName = getName;\n _exports.guidFor = guidFor;\n _exports.intern = intern;\n _exports.isInternalSymbol = isInternalSymbol;\n _exports.isObject = isObject;\n _exports.isProxy = isProxy;\n _exports.lookupDescriptor = lookupDescriptor;\n _exports.observerListenerMetaFor = observerListenerMetaFor;\n _exports.setListeners = setListeners;\n _exports.setName = setName;\n _exports.setObservers = setObservers;\n _exports.setProxy = setProxy;\n _exports.teardownMandatorySetter = _exports.symbol = _exports.setupMandatorySetter = _exports.setWithMandatorySetter = void 0;\n _exports.toString = toString;\n _exports.uuid = uuid;\n _exports.wrap = wrap;\n /**\n Strongly hint runtimes to intern the provided string.\n \n When do I need to use this function?\n \n For the most part, never. Pre-mature optimization is bad, and often the\n runtime does exactly what you need it to, and more often the trade-off isn't\n worth it.\n \n Why?\n \n Runtimes store strings in at least 2 different representations:\n Ropes and Symbols (interned strings). The Rope provides a memory efficient\n data-structure for strings created from concatenation or some other string\n manipulation like splitting.\n \n Unfortunately checking equality of different ropes can be quite costly as\n runtimes must resort to clever string comparison algorithms. These\n algorithms typically cost in proportion to the length of the string.\n Luckily, this is where the Symbols (interned strings) shine. As Symbols are\n unique by their string content, equality checks can be done by pointer\n comparison.\n \n How do I know if my string is a rope or symbol?\n \n Typically (warning general sweeping statement, but truthy in runtimes at\n present) static strings created as part of the JS source are interned.\n Strings often used for comparisons can be interned at runtime if some\n criteria are met. One of these criteria can be the size of the entire rope.\n For example, in chrome 38 a rope longer then 12 characters will not\n intern, nor will segments of that rope.\n \n Some numbers: http://jsperf.com/eval-vs-keys/8\n \n Known Trick™\n \n @private\n @return {String} interned version of the provided string\n */\n function intern(str) {\n let obj = Object.create(null);\n obj[str] = 1;\n for (let key in obj) {\n if (key === str) {\n return key;\n }\n }\n return str;\n }\n\n /**\n Returns whether Type(value) is Object.\n \n Useful for checking whether a value is a valid WeakMap key.\n \n Refs: https://tc39.github.io/ecma262/#sec-typeof-operator-runtime-semantics-evaluation\n https://tc39.github.io/ecma262/#sec-weakmap.prototype.set\n \n @private\n @function isObject\n */\n function isObject(value) {\n return value !== null && (typeof value === 'object' || typeof value === 'function');\n }\n\n /**\n @module @ember/object\n */\n /**\n @private\n @return {Number} the uuid\n */\n let _uuid = 0;\n /**\n Generates a universally unique identifier. This method\n is used internally by Ember for assisting with\n the generation of GUID's and other unique identifiers.\n \n @public\n @return {Number} [description]\n */\n function uuid() {\n return ++_uuid;\n }\n /**\n Prefix used for guids through out Ember.\n @private\n @property GUID_PREFIX\n @for Ember\n @type String\n @final\n */\n const GUID_PREFIX = 'ember';\n // Used for guid generation...\n const OBJECT_GUIDS = new WeakMap();\n const NON_OBJECT_GUIDS = new Map();\n /**\n A unique key used to assign guids and other private metadata to objects.\n If you inspect an object in your browser debugger you will often see these.\n They can be safely ignored.\n \n On browsers that support it, these properties are added with enumeration\n disabled so they won't show up when you iterate over your properties.\n \n @private\n @property GUID_KEY\n @for Ember\n @type String\n @final\n */\n const GUID_KEY = _exports.GUID_KEY = intern(\"__ember\" + Date.now());\n /**\n Generates a new guid, optionally saving the guid to the object that you\n pass in. You will rarely need to use this method. Instead you should\n call `guidFor(obj)`, which return an existing guid if available.\n \n @private\n @method generateGuid\n @static\n @for @ember/object/internals\n @param {Object} [obj] Object the guid will be used for. If passed in, the guid will\n be saved on the object and reused whenever you pass the same object\n again.\n \n If no object is passed, just generate a new guid.\n @param {String} [prefix] Prefix to place in front of the guid. Useful when you want to\n separate the guid into separate namespaces.\n @return {String} the guid\n */\n function generateGuid(obj, prefix) {\n if (prefix === void 0) {\n prefix = GUID_PREFIX;\n }\n let guid = prefix + uuid().toString();\n if (isObject(obj)) {\n OBJECT_GUIDS.set(obj, guid);\n }\n return guid;\n }\n /**\n Returns a unique id for the object. If the object does not yet have a guid,\n one will be assigned to it. You can call this on any object,\n `EmberObject`-based or not.\n \n You can also use this method on DOM Element objects.\n \n @public\n @static\n @method guidFor\n @for @ember/object/internals\n @param {Object} obj any object, string, number, Element, or primitive\n @return {String} the unique guid for this instance.\n */\n function guidFor(value) {\n let guid;\n if (isObject(value)) {\n guid = OBJECT_GUIDS.get(value);\n if (guid === undefined) {\n guid = \"\" + GUID_PREFIX + uuid();\n OBJECT_GUIDS.set(value, guid);\n }\n } else {\n guid = NON_OBJECT_GUIDS.get(value);\n if (guid === undefined) {\n let type = typeof value;\n if (type === 'string') {\n guid = \"st\" + uuid();\n } else if (type === 'number') {\n guid = \"nu\" + uuid();\n } else if (type === 'symbol') {\n guid = \"sy\" + uuid();\n } else {\n guid = \"(\" + value + \")\";\n }\n NON_OBJECT_GUIDS.set(value, guid);\n }\n }\n return guid;\n }\n const GENERATED_SYMBOLS = [];\n function isInternalSymbol(possibleSymbol) {\n return GENERATED_SYMBOLS.indexOf(possibleSymbol) !== -1;\n }\n // Some legacy symbols still need to be enumerable for a variety of reasons.\n // This code exists for that, and as a fallback in IE11. In general, prefer\n // `symbol` below when creating a new symbol.\n function enumerableSymbol(debugName) {\n // TODO: Investigate using platform symbols, but we do not\n // want to require non-enumerability for this API, which\n // would introduce a large cost.\n let id = GUID_KEY + Math.floor(Math.random() * Date.now()).toString();\n let symbol = intern(\"__\" + debugName + id + \"__\");\n if (true /* DEBUG */) {\n GENERATED_SYMBOLS.push(symbol);\n }\n return symbol;\n }\n const symbol = _exports.symbol = Symbol;\n\n // the delete is meant to hint at runtimes that this object should remain in\n // dictionary mode. This is clearly a runtime specific hack, but currently it\n // appears worthwhile in some usecases. Please note, these deletes do increase\n // the cost of creation dramatically over a plain Object.create. And as this\n // only makes sense for long-lived dictionaries that aren't instantiated often.\n function makeDictionary(parent) {\n let dict = Object.create(parent);\n dict['_dict'] = null;\n delete dict['_dict'];\n return dict;\n }\n let getDebugName;\n if (true /* DEBUG */) {\n let getFunctionName = fn => {\n let functionName = fn.name;\n if (functionName === undefined) {\n let match = Function.prototype.toString.call(fn).match(/function (\\w+)\\s*\\(/);\n functionName = match && match[1] || '';\n }\n return functionName.replace(/^bound /, '');\n };\n let getObjectName = obj => {\n let name;\n let className;\n if (obj.constructor && obj.constructor !== Object) {\n className = getFunctionName(obj.constructor);\n }\n if ('toString' in obj && obj.toString !== Object.prototype.toString && obj.toString !== Function.prototype.toString) {\n name = obj.toString();\n }\n // If the class has a decent looking name, and the `toString` is one of the\n // default Ember toStrings, replace the constructor portion of the toString\n // with the class name. We check the length of the class name to prevent doing\n // this when the value is minified.\n if (name && name.match(/<.*:ember\\d+>/) && className && className[0] !== '_' && className.length > 2 && className !== 'Class') {\n return name.replace(/<.*:/, \"<\" + className + \":\");\n }\n return name || className;\n };\n let getPrimitiveName = value => {\n return String(value);\n };\n getDebugName = value => {\n if (typeof value === 'function') {\n return getFunctionName(value) || \"(unknown function)\";\n } else if (typeof value === 'object' && value !== null) {\n return getObjectName(value) || \"(unknown object)\";\n } else {\n return getPrimitiveName(value);\n }\n };\n }\n var getDebugName$1 = _exports.getDebugName = getDebugName;\n const HAS_SUPER_PATTERN = /\\.(_super|call\\(this|apply\\(this)/;\n const fnToString = Function.prototype.toString;\n const checkHasSuper = _exports.checkHasSuper = (() => {\n let sourceAvailable = fnToString.call(function () {\n return this;\n }).indexOf('return this') > -1;\n if (sourceAvailable) {\n return function checkHasSuper(func) {\n return HAS_SUPER_PATTERN.test(fnToString.call(func));\n };\n }\n return function checkHasSuper() {\n return true;\n };\n })();\n const HAS_SUPER_MAP = new WeakMap();\n const ROOT = _exports.ROOT = Object.freeze(function () {});\n HAS_SUPER_MAP.set(ROOT, false);\n function hasSuper(func) {\n let hasSuper = HAS_SUPER_MAP.get(func);\n if (hasSuper === undefined) {\n hasSuper = checkHasSuper(func);\n HAS_SUPER_MAP.set(func, hasSuper);\n }\n return hasSuper;\n }\n class ObserverListenerMeta {\n constructor() {\n this.listeners = undefined;\n this.observers = undefined;\n }\n }\n const OBSERVERS_LISTENERS_MAP = new WeakMap();\n function createObserverListenerMetaFor(fn) {\n let meta = OBSERVERS_LISTENERS_MAP.get(fn);\n if (meta === undefined) {\n meta = new ObserverListenerMeta();\n OBSERVERS_LISTENERS_MAP.set(fn, meta);\n }\n return meta;\n }\n function observerListenerMetaFor(fn) {\n return OBSERVERS_LISTENERS_MAP.get(fn);\n }\n function setObservers(func, observers) {\n let meta = createObserverListenerMetaFor(func);\n meta.observers = observers;\n }\n function setListeners(func, listeners) {\n let meta = createObserverListenerMetaFor(func);\n meta.listeners = listeners;\n }\n const IS_WRAPPED_FUNCTION_SET = new WeakSet();\n /**\n Wraps the passed function so that `this._super` will point to the superFunc\n when the function is invoked. This is the primitive we use to implement\n calls to super.\n \n @private\n @method wrap\n @for Ember\n @param {Function} func The function to call\n @param {Function} superFunc The super function.\n @return {Function} wrapped function.\n */\n function wrap(func, superFunc) {\n if (!hasSuper(func)) {\n return func;\n }\n // ensure an unwrapped super that calls _super is wrapped with a terminal _super\n if (!IS_WRAPPED_FUNCTION_SET.has(superFunc) && hasSuper(superFunc)) {\n return _wrap(func, _wrap(superFunc, ROOT));\n }\n return _wrap(func, superFunc);\n }\n function _wrap(func, superFunc) {\n function superWrapper() {\n let orig = this._super;\n this._super = superFunc;\n let ret = func.apply(this, arguments);\n this._super = orig;\n return ret;\n }\n IS_WRAPPED_FUNCTION_SET.add(superWrapper);\n let meta = OBSERVERS_LISTENERS_MAP.get(func);\n if (meta !== undefined) {\n OBSERVERS_LISTENERS_MAP.set(superWrapper, meta);\n }\n return superWrapper;\n }\n function lookupDescriptor(obj, keyName) {\n let current = obj;\n do {\n let descriptor = Object.getOwnPropertyDescriptor(current, keyName);\n if (descriptor !== undefined) {\n return descriptor;\n }\n current = Object.getPrototypeOf(current);\n } while (current !== null);\n return null;\n }\n\n /**\n Checks to see if the `methodName` exists on the `obj`.\n \n ```javascript\n let foo = { bar: function() { return 'bar'; }, baz: null };\n \n Ember.canInvoke(foo, 'bar'); // true\n Ember.canInvoke(foo, 'baz'); // false\n Ember.canInvoke(foo, 'bat'); // false\n ```\n \n @method canInvoke\n @for Ember\n @param {Object} obj The object to check for the method\n @param {String} methodName The method name to check for\n @return {Boolean}\n @private\n */\n function canInvoke(obj, methodName) {\n return obj != null && typeof obj[methodName] === 'function';\n }\n /**\n @module @ember/utils\n */\n\n const NAMES = new WeakMap();\n function setName(obj, name) {\n if (isObject(obj)) NAMES.set(obj, name);\n }\n function getName(obj) {\n return NAMES.get(obj);\n }\n const objectToString = Object.prototype.toString;\n function isNone(obj) {\n return obj === null || obj === undefined;\n }\n /*\n A `toString` util function that supports objects without a `toString`\n method, e.g. an object created with `Object.create(null)`.\n */\n function toString(obj) {\n if (typeof obj === 'string') {\n return obj;\n }\n if (null === obj) return 'null';\n if (undefined === obj) return 'undefined';\n if (Array.isArray(obj)) {\n // Reimplement Array.prototype.join according to spec (22.1.3.13)\n // Changing ToString(element) with this safe version of ToString.\n let r = '';\n for (let k = 0; k < obj.length; k++) {\n if (k > 0) {\n r += ',';\n }\n if (!isNone(obj[k])) {\n r += toString(obj[k]);\n }\n }\n return r;\n }\n if (typeof obj.toString === 'function') {\n return obj.toString();\n }\n return objectToString.call(obj);\n }\n const PROXIES = new WeakSet();\n function isProxy(value) {\n if (isObject(value)) {\n return PROXIES.has(value);\n }\n return false;\n }\n function setProxy(object) {\n if (isObject(object)) {\n PROXIES.add(object);\n }\n }\n class Cache {\n constructor(limit, func, store) {\n if (store === void 0) {\n store = new Map();\n }\n this.limit = limit;\n this.func = func;\n this.store = store;\n this.size = 0;\n this.misses = 0;\n this.hits = 0;\n }\n get(key) {\n if (this.store.has(key)) {\n this.hits++;\n // SAFETY: we know the value is present because `.has(key)` was `true`.\n return this.store.get(key);\n } else {\n this.misses++;\n return this.set(key, this.func(key));\n }\n }\n set(key, value) {\n if (this.limit > this.size) {\n this.size++;\n this.store.set(key, value);\n }\n return value;\n }\n purge() {\n this.store.clear();\n this.size = 0;\n this.hits = 0;\n this.misses = 0;\n }\n }\n _exports.Cache = Cache;\n let setupMandatorySetter = _exports.setupMandatorySetter = void 0;\n let teardownMandatorySetter = _exports.teardownMandatorySetter = void 0;\n let setWithMandatorySetter = _exports.setWithMandatorySetter = void 0;\n function isElementKey(key) {\n return typeof key === 'number' ? isPositiveInt(key) : isStringInt(key);\n }\n function isStringInt(str) {\n let num = parseInt(str, 10);\n return isPositiveInt(num) && str === String(num);\n }\n function isPositiveInt(num) {\n return num >= 0 && num % 1 === 0;\n }\n if (true /* DEBUG */) {\n let SEEN_TAGS = new WeakSet();\n let MANDATORY_SETTERS = new WeakMap();\n let propertyIsEnumerable = function (obj, key) {\n return Object.prototype.propertyIsEnumerable.call(obj, key);\n };\n _exports.setupMandatorySetter = setupMandatorySetter = function (tag, obj, keyName) {\n if (SEEN_TAGS.has(tag)) {\n return;\n }\n SEEN_TAGS.add(tag);\n if (Array.isArray(obj) && isElementKey(keyName)) {\n return;\n }\n let desc = lookupDescriptor(obj, keyName) || {};\n if (desc.get || desc.set) {\n // if it has a getter or setter, we can't install the mandatory setter.\n // native setters are allowed, we have to assume that they will resolve\n // to tracked properties.\n return;\n }\n if (desc && (!desc.configurable || !desc.writable)) {\n // if it isn't writable anyways, so we shouldn't provide the setter.\n // if it isn't configurable, we can't overwrite it anyways.\n return;\n }\n let setters = MANDATORY_SETTERS.get(obj);\n if (setters === undefined) {\n setters = {};\n MANDATORY_SETTERS.set(obj, setters);\n }\n desc.hadOwnProperty = Object.hasOwnProperty.call(obj, keyName);\n setters[keyName] = desc;\n Object.defineProperty(obj, keyName, {\n configurable: true,\n enumerable: propertyIsEnumerable(obj, keyName),\n get() {\n if (desc.get) {\n return desc.get.call(this);\n } else {\n return desc.value;\n }\n },\n set(value) {\n (true && !(false) && (0, _debug.assert)(\"You attempted to update \" + this + \".\" + String(keyName) + \" to \\\"\" + String(value) + \"\\\", but it is being tracked by a tracking context, such as a template, computed property, or observer. In order to make sure the context updates properly, you must invalidate the property when updating it. You can mark the property as `@tracked`, or use `@ember/object#set` to do this.\"));\n }\n });\n };\n _exports.teardownMandatorySetter = teardownMandatorySetter = function (obj, keyName) {\n let setters = MANDATORY_SETTERS.get(obj);\n if (setters !== undefined && setters[keyName] !== undefined) {\n Object.defineProperty(obj, keyName, setters[keyName]);\n delete setters[keyName];\n }\n };\n _exports.setWithMandatorySetter = setWithMandatorySetter = function (obj, keyName, value) {\n let setters = MANDATORY_SETTERS.get(obj);\n if (setters !== undefined && setters[keyName] !== undefined) {\n let setter = setters[keyName];\n if (setter.set) {\n setter.set.call(obj, value);\n } else {\n setter.value = value;\n // If the object didn't have own property before, it would have changed\n // the enumerability after setting the value the first time.\n if (!setter.hadOwnProperty) {\n let desc = lookupDescriptor(obj, keyName);\n desc.enumerable = true;\n Object.defineProperty(obj, keyName, desc);\n }\n }\n } else {\n obj[keyName] = value;\n }\n };\n }\n});","define(\"@ember/canary-features/index\", [\"exports\", \"@ember/-internals/environment\"], function (_exports, _environment) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.FEATURES = _exports.DEFAULT_FEATURES = void 0;\n _exports.isEnabled = isEnabled;\n /**\n Set `EmberENV.FEATURES` in your application's `config/environment.js` file\n to enable canary features in your application.\n \n See the [feature flag guide](https://guides.emberjs.com/release/configuring-ember/feature-flags/)\n for more details.\n \n @module @ember/canary-features\n @public\n */\n const DEFAULT_FEATURES = _exports.DEFAULT_FEATURES = {\n // FLAG_NAME: true/false\n };\n /**\n The hash of enabled Canary features. Add to this, any canary features\n before creating your application.\n \n @class FEATURES\n @static\n @since 1.1.0\n @public\n */\n const FEATURES = _exports.FEATURES = Object.assign(DEFAULT_FEATURES, _environment.ENV.FEATURES);\n /**\n Determine whether the specified `feature` is enabled. Used by Ember's\n build tools to exclude experimental features from beta/stable builds.\n \n You can define the following configuration options:\n \n * `EmberENV.ENABLE_OPTIONAL_FEATURES` - enable any features that have not been explicitly\n enabled/disabled.\n \n @method isEnabled\n @param {String} feature The feature to check\n @return {Boolean}\n @since 1.1.0\n @public\n */\n function isEnabled(feature) {\n let value = FEATURES[feature];\n if (value === true || value === false) {\n return value;\n } else if (_environment.ENV.ENABLE_OPTIONAL_FEATURES) {\n return true;\n } else {\n return false;\n }\n }\n // Uncomment the below when features are present:\n // function featureValue(value: null | boolean) {\n // if (ENV.ENABLE_OPTIONAL_FEATURES && value === null) {\n // return true;\n // }\n // return value;\n // }\n //\n // export const FLAG_NAME = featureValue(FEATURES.FLAG_NAME);\n});","define(\"@ember/debug/container-debug-adapter\", [\"exports\", \"@ember/-internals/string\", \"@ember/object\", \"@ember/utils\", \"@ember/-internals/owner\", \"@ember/application/namespace\"], function (_exports, _string, _object, _utils, _owner, _namespace) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n /**\n @module @ember/debug/container-debug-adapter\n */\n /**\n The `ContainerDebugAdapter` helps the container and resolver interface\n with tools that debug Ember such as the\n [Ember Inspector](https://github.com/emberjs/ember-inspector)\n for Chrome and Firefox.\n \n This class can be extended by a custom resolver implementer\n to override some of the methods with library-specific code.\n \n The methods likely to be overridden are:\n \n * `canCatalogEntriesByType`\n * `catalogEntriesByType`\n \n The adapter will need to be registered\n in the application's container as `container-debug-adapter:main`.\n \n Example:\n \n ```javascript\n Application.initializer({\n name: \"containerDebugAdapter\",\n \n initialize(application) {\n application.register('container-debug-adapter:main', require('app/container-debug-adapter'));\n }\n });\n ```\n \n @class ContainerDebugAdapter\n @extends EmberObject\n @since 1.5.0\n @public\n */\n class ContainerDebugAdapter extends _object.default {\n constructor(owner) {\n super(owner);\n this.resolver = (0, _owner.getOwner)(this).lookup('resolver-for-debugging:main');\n }\n /**\n Returns true if it is possible to catalog a list of available\n classes in the resolver for a given type.\n @method canCatalogEntriesByType\n @param {String} type The type. e.g. \"model\", \"controller\", \"route\".\n @return {boolean} whether a list is available for this type.\n @public\n */\n canCatalogEntriesByType(type) {\n if (type === 'model' || type === 'template') {\n return false;\n }\n return true;\n }\n /**\n Returns the available classes a given type.\n @method catalogEntriesByType\n @param {String} type The type. e.g. \"model\", \"controller\", \"route\".\n @return {Array} An array of strings.\n @public\n */\n catalogEntriesByType(type) {\n let namespaces = _namespace.default.NAMESPACES;\n let types = [];\n let typeSuffixRegex = new RegExp((0, _string.classify)(type) + \"$\");\n namespaces.forEach(namespace => {\n for (let key in namespace) {\n if (!Object.prototype.hasOwnProperty.call(namespace, key)) {\n continue;\n }\n if (typeSuffixRegex.test(key)) {\n let klass = namespace[key];\n if ((0, _utils.typeOf)(klass) === 'class') {\n types.push((0, _string.dasherize)(key.replace(typeSuffixRegex, '')));\n }\n }\n }\n });\n return types;\n }\n }\n _exports.default = ContainerDebugAdapter;\n});","define(\"@ember/debug/data-adapter\", [\"exports\", \"@ember/-internals/owner\", \"@ember/runloop\", \"@ember/object\", \"@ember/-internals/string\", \"@ember/application/namespace\", \"@ember/array\", \"@glimmer/validator\", \"@ember/debug\"], function (_exports, _owner, _runloop, _object, _string, _namespace, _array, _validator, _debug) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n function iterate(arr, fn) {\n if (Symbol.iterator in arr) {\n for (let item of arr) {\n fn(item);\n }\n } else {\n // SAFETY: this cast required to work this way to interop between TS 4.8\n // and 4.9. When we drop support for 4.8, it will narrow correctly via the\n // use of the `in` operator above. (Preferably we will solve this by just\n // switching to require `Symbol.iterator` instead.)\n (0, _debug.assert)('', typeof arr.forEach === 'function');\n arr.forEach(fn);\n }\n }\n class RecordsWatcher {\n getCacheForItem(record) {\n let recordCache = this.recordCaches.get(record);\n if (!recordCache) {\n let hasBeenAdded = false;\n recordCache = (0, _validator.createCache)(() => {\n if (!hasBeenAdded) {\n this.added.push(this.wrapRecord(record));\n hasBeenAdded = true;\n } else {\n this.updated.push(this.wrapRecord(record));\n }\n });\n this.recordCaches.set(record, recordCache);\n }\n return recordCache;\n }\n constructor(records, recordsAdded, recordsUpdated, recordsRemoved, wrapRecord, release) {\n this.wrapRecord = wrapRecord;\n this.release = release;\n this.recordCaches = new Map();\n this.added = [];\n this.updated = [];\n this.removed = [];\n this.recordArrayCache = (0, _validator.createCache)(() => {\n let seen = new Set();\n // Track `[]` for legacy support\n (0, _validator.consumeTag)((0, _validator.tagFor)(records, '[]'));\n iterate(records, record => {\n (0, _validator.getValue)(this.getCacheForItem(record));\n seen.add(record);\n });\n // Untrack this operation because these records are being removed, they\n // should not be polled again in the future\n (0, _validator.untrack)(() => {\n this.recordCaches.forEach((_cache, record) => {\n if (!seen.has(record)) {\n this.removed.push(wrapRecord(record));\n this.recordCaches.delete(record);\n }\n });\n });\n if (this.added.length > 0) {\n recordsAdded(this.added);\n this.added = [];\n }\n if (this.updated.length > 0) {\n recordsUpdated(this.updated);\n this.updated = [];\n }\n if (this.removed.length > 0) {\n recordsRemoved(this.removed);\n this.removed = [];\n }\n });\n }\n revalidate() {\n (0, _validator.getValue)(this.recordArrayCache);\n }\n }\n class TypeWatcher {\n constructor(records, onChange, release) {\n this.release = release;\n let hasBeenAccessed = false;\n this.cache = (0, _validator.createCache)(() => {\n // Empty iteration, we're doing this just\n // to track changes to the records array\n iterate(records, () => {});\n // Also track `[]` for legacy support\n (0, _validator.consumeTag)((0, _validator.tagFor)(records, '[]'));\n if (hasBeenAccessed === true) {\n (0, _runloop.next)(onChange);\n } else {\n hasBeenAccessed = true;\n }\n });\n this.release = release;\n }\n revalidate() {\n (0, _validator.getValue)(this.cache);\n }\n }\n /**\n The `DataAdapter` helps a data persistence library\n interface with tools that debug Ember such\n as the [Ember Inspector](https://github.com/emberjs/ember-inspector)\n for Chrome and Firefox.\n \n This class will be extended by a persistence library\n which will override some of the methods with\n library-specific code.\n \n The methods likely to be overridden are:\n \n * `getFilters`\n * `detect`\n * `columnsForType`\n * `getRecords`\n * `getRecordColumnValues`\n * `getRecordKeywords`\n * `getRecordFilterValues`\n * `getRecordColor`\n \n The adapter will need to be registered\n in the application's container as `dataAdapter:main`.\n \n Example:\n \n ```javascript\n Application.initializer({\n name: \"data-adapter\",\n \n initialize: function(application) {\n application.register('data-adapter:main', DS.DataAdapter);\n }\n });\n ```\n \n @class DataAdapter\n @extends EmberObject\n @public\n */\n class DataAdapter extends _object.default {\n constructor(owner) {\n super(owner);\n this.releaseMethods = (0, _array.A)();\n this.recordsWatchers = new Map();\n this.typeWatchers = new Map();\n this.flushWatchers = null;\n /**\n The container-debug-adapter which is used\n to list all models.\n @property containerDebugAdapter\n @default undefined\n @since 1.5.0\n @public\n **/\n /**\n The number of attributes to send\n as columns. (Enough to make the record\n identifiable).\n @private\n @property attributeLimit\n @default 3\n @since 1.3.0\n */\n this.attributeLimit = 3;\n /**\n Ember Data > v1.0.0-beta.18\n requires string model names to be passed\n around instead of the actual factories.\n This is a stamp for the Ember Inspector\n to differentiate between the versions\n to be able to support older versions too.\n @public\n @property acceptsModelName\n */\n this.acceptsModelName = true;\n this.containerDebugAdapter = (0, _owner.getOwner)(this).lookup('container-debug-adapter:main');\n }\n /**\n Map from records arrays to RecordsWatcher instances\n @private\n @property recordsWatchers\n @since 3.26.0\n */\n /**\n Map from records arrays to TypeWatcher instances\n @private\n @property typeWatchers\n @since 3.26.0\n */\n /**\n Callback that is currently scheduled on backburner end to flush and check\n all active watchers.\n @private\n @property flushWatchers\n @since 3.26.0\n */\n /**\n Stores all methods that clear observers.\n These methods will be called on destruction.\n @private\n @property releaseMethods\n @since 1.3.0\n */\n /**\n Specifies how records can be filtered.\n Records returned will need to have a `filterValues`\n property with a key for every name in the returned array.\n @public\n @method getFilters\n @return {Array} List of objects defining filters.\n The object should have a `name` and `desc` property.\n */\n getFilters() {\n return (0, _array.A)();\n }\n /**\n Fetch the model types and observe them for changes.\n @public\n @method watchModelTypes\n @param {Function} typesAdded Callback to call to add types.\n Takes an array of objects containing wrapped types (returned from `wrapModelType`).\n @param {Function} typesUpdated Callback to call when a type has changed.\n Takes an array of objects containing wrapped types.\n @return {Function} Method to call to remove all observers\n */\n watchModelTypes(typesAdded, typesUpdated) {\n let modelTypes = this.getModelTypes();\n let releaseMethods = (0, _array.A)();\n let typesToSend;\n typesToSend = modelTypes.map(type => {\n let klass = type.klass;\n let wrapped = this.wrapModelType(klass, type.name);\n releaseMethods.push(this.observeModelType(type.name, typesUpdated));\n return wrapped;\n });\n typesAdded(typesToSend);\n let release = () => {\n releaseMethods.forEach(fn => fn());\n this.releaseMethods.removeObject(release);\n };\n this.releaseMethods.pushObject(release);\n return release;\n }\n _nameToClass(type) {\n if (typeof type === 'string') {\n let owner = (0, _owner.getOwner)(this);\n let Factory = owner.factoryFor(\"model:\" + type);\n type = Factory && Factory.class;\n }\n return type;\n }\n /**\n Fetch the records of a given type and observe them for changes.\n @public\n @method watchRecords\n @param {String} modelName The model name.\n @param {Function} recordsAdded Callback to call to add records.\n Takes an array of objects containing wrapped records.\n The object should have the following properties:\n columnValues: {Object} The key and value of a table cell.\n object: {Object} The actual record object.\n @param {Function} recordsUpdated Callback to call when a record has changed.\n Takes an array of objects containing wrapped records.\n @param {Function} recordsRemoved Callback to call when a record has removed.\n Takes an array of objects containing wrapped records.\n @return {Function} Method to call to remove all observers.\n */\n watchRecords(modelName