var loader, define, requireModule, require, requirejs; (function (global) { 'use strict'; function dict() { var obj = Object.create(null); obj['__'] = undefined; delete obj['__']; return obj; } // Save off the original values of these globals, so we can restore them if someone asks us to var oldGlobals = { loader: loader, define: define, requireModule: requireModule, require: require, requirejs: requirejs }; requirejs = require = requireModule = function (id) { var pending = []; var mod = findModule(id, '(require)', pending); for (var i = pending.length - 1; i >= 0; i--) { pending[i].exports(); } return mod.module.exports; }; loader = { noConflict: function (aliases) { var oldName, newName; for (oldName in aliases) { if (aliases.hasOwnProperty(oldName)) { if (oldGlobals.hasOwnProperty(oldName)) { newName = aliases[oldName]; global[newName] = global[oldName]; global[oldName] = oldGlobals[oldName]; } } } }, // Option to enable or disable the generation of default exports makeDefaultExport: true }; var registry = dict(); var seen = dict(); var uuid = 0; function unsupportedModule(length) { throw new Error('an unsupported module was defined, expected `define(id, deps, module)` instead got: `' + length + '` arguments to define`'); } var defaultDeps = ['require', 'exports', 'module']; function Module(id, deps, callback, alias) { this.uuid = uuid++; this.id = id; this.deps = !deps.length && callback.length ? defaultDeps : deps; this.module = { exports: {} }; this.callback = callback; this.hasExportsAsDep = false; this.isAlias = alias; this.reified = new Array(deps.length); /* Each module normally passes through these states, in order: new : initial state pending : this module is scheduled to be executed reifying : this module's dependencies are being executed reified : this module's dependencies finished executing successfully errored : this module's dependencies failed to execute finalized : this module executed successfully */ this.state = 'new'; } Module.prototype.makeDefaultExport = function () { var exports = this.module.exports; if (exports !== null && (typeof exports === 'object' || typeof exports === 'function') && exports['default'] === undefined && Object.isExtensible(exports)) { exports['default'] = exports; } }; Module.prototype.exports = function () { // if finalized, there is no work to do. If reifying, there is a // circular dependency so we must return our (partial) exports. if (this.state === 'finalized' || this.state === 'reifying') { return this.module.exports; } if (loader.wrapModules) { this.callback = loader.wrapModules(this.id, this.callback); } this.reify(); var result = this.callback.apply(this, this.reified); this.reified.length = 0; this.state = 'finalized'; if (!(this.hasExportsAsDep && result === undefined)) { this.module.exports = result; } if (loader.makeDefaultExport) { this.makeDefaultExport(); } return this.module.exports; }; Module.prototype.unsee = function () { this.state = 'new'; this.module = { exports: {} }; }; Module.prototype.reify = function () { if (this.state === 'reified') { return; } this.state = 'reifying'; try { this.reified = this._reify(); this.state = 'reified'; } finally { if (this.state === 'reifying') { this.state = 'errored'; } } }; Module.prototype._reify = function () { var reified = this.reified.slice(); for (var i = 0; i < reified.length; i++) { var mod = reified[i]; reified[i] = mod.exports ? mod.exports : mod.module.exports(); } return reified; }; Module.prototype.findDeps = function (pending) { if (this.state !== 'new') { return; } this.state = 'pending'; var deps = this.deps; for (var i = 0; i < deps.length; i++) { var dep = deps[i]; var entry = this.reified[i] = { exports: undefined, module: undefined }; if (dep === 'exports') { this.hasExportsAsDep = true; entry.exports = this.module.exports; } else if (dep === 'require') { entry.exports = this.makeRequire(); } else if (dep === 'module') { entry.exports = this.module; } else { entry.module = findModule(resolve(dep, this.id), this.id, pending); } } }; Module.prototype.makeRequire = function () { var id = this.id; var r = function (dep) { return require(resolve(dep, id)); }; r['default'] = r; r.moduleId = id; r.has = function (dep) { return has(resolve(dep, id)); }; return r; }; define = function (id, deps, callback) { var module = registry[id]; // If a module for this id has already been defined and is in any state // other than `new` (meaning it has been or is currently being required), // then we return early to avoid redefinition. if (module && module.state !== 'new') { return; } if (arguments.length < 2) { unsupportedModule(arguments.length); } if (!Array.isArray(deps)) { callback = deps; deps = []; } if (callback instanceof Alias) { registry[id] = new Module(callback.id, deps, callback, true); } else { registry[id] = new Module(id, deps, callback, false); } }; define.exports = function (name, defaultExport) { var module = registry[name]; // If a module for this name has already been defined and is in any state // other than `new` (meaning it has been or is currently being required), // then we return early to avoid redefinition. if (module && module.state !== 'new') { return; } module = new Module(name, [], noop, null); module.module.exports = defaultExport; module.state = 'finalized'; registry[name] = module; return module; }; function noop() {} // we don't support all of AMD // define.amd = {}; function Alias(id) { this.id = id; } define.alias = function (id, target) { if (arguments.length === 2) { return define(target, new Alias(id)); } return new Alias(id); }; function missingModule(id, referrer) { throw new Error('Could not find module `' + id + '` imported from `' + referrer + '`'); } function findModule(id, referrer, pending) { var mod = registry[id] || registry[id + '/index']; while (mod && mod.isAlias) { mod = registry[mod.id] || registry[mod.id + '/index']; } if (!mod) { missingModule(id, referrer); } if (pending && mod.state !== 'pending' && mod.state !== 'finalized') { mod.findDeps(pending); pending.push(mod); } return mod; } function resolve(child, id) { if (child.charAt(0) !== '.') { return child; } var parts = child.split('/'); var nameParts = id.split('/'); var parentBase = nameParts.slice(0, -1); for (var i = 0, l = parts.length; i < l; i++) { var part = parts[i]; if (part === '..') { if (parentBase.length === 0) { throw new Error('Cannot access parent module of root'); } parentBase.pop(); } else if (part === '.') { continue; } else { parentBase.push(part); } } return parentBase.join('/'); } function has(id) { return !!(registry[id] || registry[id + '/index']); } requirejs.entries = requirejs._eak_seen = registry; requirejs.has = has; requirejs.unsee = function (id) { findModule(id, '(unsee)', false).unsee(); }; requirejs.clear = function () { requirejs.entries = requirejs._eak_seen = registry = dict(); seen = dict(); }; // This code primes the JS engine for good performance by warming the // JIT compiler for these functions. define('foo', function () {}); define('foo/bar', [], function () {}); define('foo/asdf', ['module', 'exports', 'require'], function (module, exports, require) { if (require.has('foo/bar')) { require('foo/bar'); } }); define('foo/baz', [], define.alias('foo')); define('foo/quz', define.alias('foo')); define.alias('foo', 'foo/qux'); define('foo/bar', ['foo', './quz', './baz', './asdf', './bar', '../foo'], function () {}); define('foo/main', ['foo/bar'], function () {}); define.exports('foo/exports', {}); require('foo/exports'); require('foo/main'); require.unsee('foo/bar'); requirejs.clear(); if (typeof exports === 'object' && typeof module === 'object' && module.exports) { module.exports = { require: require, define: define }; } })(this); define("ember-compatibility-helpers", ["exports"], function (_exports) { "use strict"; Object.defineProperty(_exports, "__esModule", { value: true }); _exports.default = void 0; }); define("@glimmer/resolver/index", ["exports", "@glimmer/resolver/resolver", "@glimmer/resolver/module-registries/basic-registry"], function (_exports, _resolver, _basicRegistry) { "use strict"; Object.defineProperty(_exports, "__esModule", { value: true }); Object.defineProperty(_exports, "default", { enumerable: true, get: function () { return _resolver.default; } }); Object.defineProperty(_exports, "BasicModuleRegistry", { enumerable: true, get: function () { return _basicRegistry.default; } }); }); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kdWxlLXJlZ2lzdHJ5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsic3JjL21vZHVsZS1yZWdpc3RyeS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGludGVyZmFjZSBNb2R1bGVSZWdpc3RyeSB7XG4gIGhhcyhzcGVjaWZpZXI6IHN0cmluZyk6IGJvb2xlYW47XG5cbiAgZ2V0KHNwZWNpZmllcjogc3RyaW5nKTogYW55O1xufVxuIl19 define("@glimmer/resolver/module-registry", [], function () { "use strict"; }); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzb2x2ZXItY29uZmlndXJhdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInNyYy9yZXNvbHZlci1jb25maWd1cmF0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBEaWN0IH0gZnJvbSAnQGdsaW1tZXIvZGknO1xuXG5leHBvcnQgaW50ZXJmYWNlIFBhY2thZ2VEZWZpbml0aW9uIHtcbiAgLyoqXG4gICAqIFRoZSBuYW1lIG9mIHRoZSBwYWNrYWdlLCBhcyBkZWZpbmVkIGluIGBwYWNrYWdlLmpzb25gLlxuICAgKlxuICAgKiBGb3IgZXhhbXBsZSwgYSBwYWNrYWdlIHB1Ymxpc2hlZCB0byBucG0gYXMgYGVtYmVyLXN1cGVyLWlucHV0YCBtdXN0XG4gICAqIGFsc28gdXNlIHRoaXMgYG5hbWVgLlxuICAgKi9cbiAgbmFtZTogc3RyaW5nO1xuX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O1xuICB0eXBlcz86IHN0cmluZ1tdO1xuICBkZWZhdWx0VHlwZT86IHN0cmluZztcbiAgcHJpdmF0ZUNvbGxlY3Rpb25zPzogc3RyaW5nW107XG4gIHVucmVzb2x2YWJsZT86IGJvb2xlYW47XG59XG5cbmV4cG9ydCBpbnRlcmZhY2UgUmVzb2x2ZXJDb25maWd1cmF0aW9uIHtcbiAgYXBwPzogUGFja2FnZURlZmluaXRpb247XG4gIHR5cGVzOiBEaWN0PE1vZHVsZVR5cGVEZWZpbml0aW9uPjtcbiAgY29sbGVjdGlvbnM6IERpY3Q8TW9kdWxlQ29sbGVjdGlvbkRlZmluaXRpb24+O1xufVxuIl19 define("@glimmer/resolver/resolver-configuration", [], function () { "use strict"; }); define("@glimmer/resolver/resolver", ["exports", "@glimmer/di", "@glimmer/resolver/utils/debug", "@glimmer/resolver/utils/specifiers"], function (_exports, _di, _debug, _specifiers) { "use strict"; Object.defineProperty(_exports, "__esModule", { value: true }); _exports.default = void 0; class Resolver { constructor(config, registry) { this.config = config; this.registry = registry; } identify(specifier, referrer) { if ((0, _di.isSpecifierStringAbsolute)(specifier)) { return specifier; } let s = (0, _di.deserializeSpecifier)(specifier); let result; if (referrer) { let r = (0, _di.deserializeSpecifier)(referrer); if ((0, _di.isSpecifierObjectAbsolute)(r)) { (0, _debug.assert)('Specifier must not include a rootName, collection, or namespace when combined with an absolute referrer', s.rootName === undefined && s.collection === undefined && s.namespace === undefined); s.rootName = r.rootName; s.collection = r.collection; let definitiveCollection = this._definitiveCollection(s.type); if (!s.name) { /* * For specifiers without a name use the referrer's name and * do not fallback to any other resolution rules. */ s.namespace = r.namespace; s.name = r.name; return this._serializeAndVerify(s); } s.namespace = r.namespace ? r.namespace + '/' + r.name : r.name; if ((0, _specifiers.detectLocalResolutionCollection)(s) === definitiveCollection) { /* * For specifiers with a name, try local resolution. Based on * the referrer. */ if (result = this._serializeAndVerify(s)) { return result; } } // Look for a private collection in the referrer's namespace if (definitiveCollection) { s.namespace += '/-' + definitiveCollection; if (result = this._serializeAndVerify(s)) { return result; } } // Because local and private resolution has failed, clear all but `name` and `type` // to proceed with top-level resolution s.rootName = s.collection = s.namespace = undefined; } else { (0, _debug.assert)('Referrer must either be "absolute" or include a `type` to determine the associated type', r.type); // Look in the definitive collection for the associated type s.collection = this._definitiveCollection(r.type); if (!s.namespace) { s.namespace = r.rootName; } (0, _debug.assert)("'".concat(r.type, "' does not have a definitive collection"), s.collection); } } // If the collection is unspecified, use the definitive collection for the `type` if (!s.collection) { s.collection = this._definitiveCollection(s.type); (0, _debug.assert)("'".concat(s.type, "' does not have a definitive collection"), s.collection); } if (!s.rootName) { // If the root name is unspecified, try the app's `rootName` first s.rootName = this.config.app.rootName || 'app'; if (result = this._serializeAndVerify(s)) { return result; } // Then look for an addon with a matching `rootName` if (s.namespace) { s.rootName = s.namespace; s.namespace = undefined; } else { s.rootName = s.name; s.name = 'main'; } } if (result = this._serializeAndVerify(s)) { return result; } } retrieve(specifier) { return this.registry.get(specifier); } resolve(specifier, referrer) { let id = this.identify(specifier, referrer); if (id) { return this.retrieve(id); } } _definitiveCollection(type) { let typeDef = this.config.types[type]; (0, _debug.assert)("'".concat(type, "' is not a recognized type"), typeDef); return typeDef.definitiveCollection; } _serializeAndVerify(specifier) { let serialized = (0, _di.serializeSpecifier)(specifier); if (this.registry.has(serialized)) { return serialized; } } } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzb2x2ZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJzcmMvcmVzb2x2ZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUdMLHlCQUF5QixFQUN6Qix5QkFBeUIsRUFDekIsb0JBQW9CLEVBQ3BCLGtCQUFrQixFQUNuQixNQUFNLGFBQWEsQ0FBQztBQUNyQixPQUFPLEVBQUUsTUFBTSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3ZDLE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4gICAgaWYgKHRoaXMucmVnaXN0cnkuaGFzKHNlcmlhbGl6ZWQpKSB7XG4gICAgICByZXR1cm4gc2VyaWFsaXplZDtcbiAgICB9XG4gIH1cbn1cbiJdfQ== _exports.default = Resolver; }); define("@glimmer/resolver/module-registries/basic-registry", ["exports"], function (_exports) { "use strict"; Object.defineProperty(_exports, "__esModule", { value: true }); _exports.default = void 0; class BasicRegistry { constructor(entries = {}) { this._entries = entries; } has(specifier) { return specifier in this._entries; } get(specifier) { return this._entries[specifier]; } } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzaWMtcmVnaXN0cnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvbW9kdWxlLXJlZ2lzdHJpZXMvYmFzaWMtcmVnaXN0cnkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBR0EsTUFBTSxDQUFDLE9BQU87SUFHWixZQUFZLFVBQXFCLEVBQUU7UUFDakMsSUFBSSxDQUFDLFFBQVEsR0FBRyxPQUFPLENBQUM7SUFDMUIsQ0FBQztJQUVELEdBQUcsQ0FBQyxTQUFpQjtRQUNuQixNQUFNLENBQUMsU0FBUyxJQUFJLElBQUksQ0FBQyxRQUFRLENBQUM7SUFDcEMsQ0FBQztJQUVELEdBQUcsQ0FBQyxTQUFpQjtRQUNuQixNQUFNLENBQUMsSUFBSSxDQUFDLFFBQVEsQ0FBQyxTQUFTLENBQUMsQ0FBQztJQUNsQyxDQUFDO0NBQ0YiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBNb2R1bGVSZWdpc3RyeSB9IGZyb20gJy4uL21vZHVsZS1yZWdpc3RyeSc7XG5pbXBvcnQgeyBEaWN0IH0gZnJvbSAnQGdsaW1tZXIvZGknO1xuXG5leHBvcnQgZGVmYXVsdCBjbGFzcyBCYXNpY1JlZ2lzdHJ5IGltcGxlbWVudHMgTW9kdWxlUmVnaXN0cnkge1xuICBwcml2YXRlIF9lbnRyaWVzOiBEaWN0PGFueT47XG5cbiAgY29uc3RydWN0b3IoZW50cmllczogRGljdDxhbnk+ID0ge30pIHtcbiAgICB0aGlzLl9lbnRyaWVzID0gZW50cmllcztcbiAgfVxuXG4gIGhhcyhzcGVjaWZpZXI6IHN0cmluZyk6IGJvb2xlYW4ge1xuICAgIHJldHVybiBzcGVjaWZpZXIgaW4gdGhpcy5fZW50cmllcztcbiAgfVxuXG4gIGdldChzcGVjaWZpZXI6IHN0cmluZyk6IGFueSB7XG4gICAgcmV0dXJuIHRoaXMuX2VudHJpZXNbc3BlY2lmaWVyXTtcbiAgfVxufVxuIl19 _exports.default = BasicRegistry; }); define("@glimmer/resolver/utils/debug", ["exports"], function (_exports) { "use strict"; Object.defineProperty(_exports, "__esModule", { value: true }); _exports.assert = assert; function assert(description, test) { if (!test) { throw new Error('Assertion Failed: ' + description); } } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVidWcuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvdXRpbHMvZGVidWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxpQkFBaUIsV0FBbUIsRUFBRSxJQUFTO0lBQ25ELEVBQUUsQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQztRQUNWLE1BQU0sSUFBSSxLQUFLLENBQUMsb0JBQW9CLEdBQUcsV0FBVyxDQUFDLENBQUM7SUFDdEQsQ0FBQztBQUNILENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZnVuY3Rpb24gYXNzZXJ0KGRlc2NyaXB0aW9uOiBzdHJpbmcsIHRlc3Q6IGFueSkge1xuICBpZiAoIXRlc3QpIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoJ0Fzc2VydGlvbiBGYWlsZWQ6ICcgKyBkZXNjcmlwdGlvbik7XG4gIH1cbn1cbiJdfQ== }); define("@glimmer/resolver/utils/specifiers", ["exports"], function (_exports) { "use strict"; Object.defineProperty(_exports, "__esModule", { value: true }); _exports.detectLocalResolutionCollection = detectLocalResolutionCollection; function detectLocalResolutionCollection(specifier) { let { namespace, collection } = specifier; // Look for the local-most private collection contained in the namespace // (which will appear closest to the end of the string) let startPos = namespace.lastIndexOf('/-'); if (startPos > -1) { startPos += 2; let endPos = namespace.indexOf('/', startPos); collection = namespace.slice(startPos, endPos > -1 ? endPos : undefined); } return collection; } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3BlY2lmaWVycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy91dGlscy9zcGVjaWZpZXJzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE1BQU0sMENBQTBDLFNBQW9CO0lBQ2xFLElBQUksRUFBRSxTQUFTLEVBQUUsVUFBVSxFQUFFLEdBQUcsU0FBUyxDQUFDO0lBRTFDLHdFQUF3RTtJQUN4RSx1REFBdUQ7SUFDdkQsSUFBSSxRQUFRLEdBQUcsU0FBUyxDQUFDLFdBQVcsQ0FBQyxJQUFJLENBQUMsQ0FBQztJQUMzQyxFQUFFLENBQUMsQ0FBQyxRQUFRLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBQ2xCLFFBQVEsSUFBSSxDQUFDLENBQUM7UUFDZCxJQUFJLE1BQU0sR0FBRyxTQUFTLENBQUMsT0FBTyxDQUFDLEdBQUcsRUFBRSxRQUFRLENBQUMsQ0FBQztRQUM5QyxVQUFVLEdBQUcsU0FBUyxDQUFDLEtBQUssQ0FBQyxRQUFRLEVBQUUsTUFBTSxHQUFHLENBQUMsQ0FBQyxHQUFHLE1BQU0sR0FBRyxTQUFTLENBQUMsQ0FBQztJQUMzRSxDQUFDO0lBRUQsTUFBTSxDQUFDLFVBQVUsQ0FBQztBQUNwQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgU3BlY2lmaWVyIH0gZnJvbSAnQGdsaW1tZXIvZGknO1xuXG5leHBvcnQgZnVuY3Rpb24gZGV0ZWN0TG9jYWxSZXNvbHV0aW9uQ29sbGVjdGlvbihzcGVjaWZpZXI6IFNwZWNpZmllcik6IHN0cmluZyB7XG4gIGxldCB7IG5hbWVzcGFjZSwgY29sbGVjdGlvbiB9ID0gc3BlY2lmaWVyO1xuXG4gIC8vIExvb2sgZm9yIHRoZSBsb2NhbC1tb3N0IHByaXZhdGUgY29sbGVjdGlvbiBjb250YWluZWQgaW4gdGhlIG5hbWVzcGFjZVxuICAvLyAod2hpY2ggd2lsbCBhcHBlYXIgY2xvc2VzdCB0byB0aGUgZW5kIG9mIHRoZSBzdHJpbmcpXG4gIGxldCBzdGFydFBvcyA9IG5hbWVzcGFjZS5sYXN0SW5kZXhPZignLy0nKTtcbiAgaWYgKHN0YXJ0UG9zID4gLTEpIHtcbiAgICBzdGFydFBvcyArPSAyO1xuICAgIGxldCBlbmRQb3MgPSBuYW1lc3BhY2UuaW5kZXhPZignLycsIHN0YXJ0UG9zKTtcbiAgICBjb2xsZWN0aW9uID0gbmFtZXNwYWNlLnNsaWNlKHN0YXJ0UG9zLCBlbmRQb3MgPiAtMSA/IGVuZFBvcyA6IHVuZGVmaW5lZCk7XG4gIH1cblxuICByZXR1cm4gY29sbGVjdGlvbjtcbn1cbiJdfQ== }); define('@glimmer/di', ['exports'], function (exports) { 'use strict'; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var Container = function () { function Container(registry) { var resolver = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; _classCallCheck(this, Container); this._registry = registry; this._resolver = resolver; this._lookups = {}; this._factoryDefinitionLookups = {}; } Container.prototype.factoryFor = function factoryFor(specifier) { var factoryDefinition = this._factoryDefinitionLookups[specifier]; if (!factoryDefinition) { if (this._resolver) { factoryDefinition = this._resolver.retrieve(specifier); } if (!factoryDefinition) { factoryDefinition = this._registry.registration(specifier); } if (factoryDefinition) { this._factoryDefinitionLookups[specifier] = factoryDefinition; } } if (!factoryDefinition) { return; } return this.buildFactory(specifier, factoryDefinition); }; Container.prototype.lookup = function lookup(specifier) { var singleton = this._registry.registeredOption(specifier, 'singleton') !== false; if (singleton) { var lookup = this._lookups[specifier]; if (lookup) { return lookup.instance; } } var factory = this.factoryFor(specifier); if (!factory) { return; } if (this._registry.registeredOption(specifier, 'instantiate') === false) { return factory.class; } var instance = factory.create(); if (singleton && instance) { this._lookups[specifier] = { factory: factory, instance: instance }; } return instance; }; Container.prototype.defaultInjections = function defaultInjections(specifier) { return {}; }; Container.prototype.teardown = function teardown() { var specifiers = Object.keys(this._lookups); for (var i = 0; i < specifiers.length; i++) { var specifier = specifiers[i]; var _lookups$specifier = this._lookups[specifier], factory = _lookups$specifier.factory, instance = _lookups$specifier.instance; factory.teardown(instance); } }; Container.prototype.defaultTeardown = function defaultTeardown(instance) {}; Container.prototype.buildInjections = function buildInjections(specifier) { var hash = this.defaultInjections(specifier); var injections = this._registry.registeredInjections(specifier); var injection = void 0; for (var i = 0; i < injections.length; i++) { injection = injections[i]; hash[injection.property] = this.lookup(injection.source); } return hash; }; Container.prototype.buildFactory = function buildFactory(specifier, factoryDefinition) { var _this = this; var injections = this.buildInjections(specifier); return { class: factoryDefinition, teardown: function (instance) { if (factoryDefinition.teardown) { factoryDefinition.teardown(instance); } else { _this.defaultTeardown(instance); } }, create: function (options) { var mergedOptions = Object.assign({}, injections, options); return factoryDefinition.create(mergedOptions); } }; }; return Container; }(); function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var Registry = function () { function Registry(options) { _classCallCheck$1(this, Registry); this._registrations = {}; this._registeredOptions = {}; this._registeredInjections = {}; if (options && options.fallback) { this._fallback = options.fallback; } } Registry.prototype.register = function register(specifier, factoryDefinition, options) { this._registrations[specifier] = factoryDefinition; if (options) { this._registeredOptions[specifier] = options; } }; Registry.prototype.registration = function registration(specifier) { var registration = this._registrations[specifier]; if (registration === undefined && this._fallback) { registration = this._fallback.registration(specifier); } return registration; }; Registry.prototype.unregister = function unregister(specifier) { delete this._registrations[specifier]; delete this._registeredOptions[specifier]; delete this._registeredInjections[specifier]; }; Registry.prototype.registerOption = function registerOption(specifier, option, value) { var options = this._registeredOptions[specifier]; if (!options) { options = {}; this._registeredOptions[specifier] = options; } options[option] = value; }; Registry.prototype.registeredOption = function registeredOption(specifier, option) { var result = void 0; var options = this.registeredOptions(specifier); if (options) { result = options[option]; } if (result === undefined && this._fallback !== undefined) { result = this._fallback.registeredOption(specifier, option); } return result; }; Registry.prototype.registeredOptions = function registeredOptions(specifier) { var options = this._registeredOptions[specifier]; if (options === undefined) { var type = specifier.split(':')[0]; options = this._registeredOptions[type]; } return options; }; Registry.prototype.unregisterOption = function unregisterOption(specifier, option) { var options = this._registeredOptions[specifier]; if (options) { delete options[option]; } }; Registry.prototype.registerInjection = function registerInjection(specifier, property, source) { var injections = this._registeredInjections[specifier]; if (injections === undefined) { this._registeredInjections[specifier] = injections = []; } injections.push({ property: property, source: source }); }; Registry.prototype.registeredInjections = function registeredInjections(specifier) { var type = specifier.split(':')[0]; var injections = this._fallback ? this._fallback.registeredInjections(specifier) : []; Array.prototype.push.apply(injections, this._registeredInjections[type]); Array.prototype.push.apply(injections, this._registeredInjections[specifier]); return injections; }; return Registry; }(); // TODO - use symbol var OWNER = '__owner__'; function getOwner(object) { return object[OWNER]; } function setOwner(object, owner) { object[OWNER] = owner; } function isSpecifierStringAbsolute(specifier) { var split = specifier.split(':'); var type = split[0]; var path = split[1]; return !!(type && path && path.indexOf('/') === 0 && path.split('/').length > 3); } function isSpecifierObjectAbsolute(specifier) { return specifier.rootName !== undefined && specifier.collection !== undefined && specifier.name !== undefined && specifier.type !== undefined; } function serializeSpecifier(specifier) { var type = specifier.type; var path = serializeSpecifierPath(specifier); if (path) { return type + ':' + path; } else { return type; } } function serializeSpecifierPath(specifier) { var path = []; if (specifier.rootName) { path.push(specifier.rootName); } if (specifier.collection) { path.push(specifier.collection); } if (specifier.namespace) { path.push(specifier.namespace); } if (specifier.name) { path.push(specifier.name); } if (path.length > 0) { var fullPath = path.join('/'); if (isSpecifierObjectAbsolute(specifier)) { fullPath = '/' + fullPath; } return fullPath; } } function deserializeSpecifier(specifier) { var obj = {}; if (specifier.indexOf(':') > -1) { var split = specifier.split(':'); var type = split[0]; var path = split[1]; obj.type = type; var pathSegments = void 0; if (path.indexOf('/') === 0) { pathSegments = path.substr(1).split('/'); if (path.substr(1).startsWith('@')) { obj.rootName = pathSegments.shift() + '/' + pathSegments.shift(); } else { obj.rootName = pathSegments.shift(); } obj.collection = pathSegments.shift(); } else { pathSegments = path.split('/'); } if (pathSegments.length > 0) { obj.name = pathSegments.pop(); if (pathSegments.length > 0) { obj.namespace = pathSegments.join('/'); } } } else { obj.type = specifier; } return obj; } exports.Container = Container; exports.Registry = Registry; exports.getOwner = getOwner; exports.setOwner = setOwner; exports.OWNER = OWNER; exports.isSpecifierStringAbsolute = isSpecifierStringAbsolute; exports.isSpecifierObjectAbsolute = isSpecifierObjectAbsolute; exports.serializeSpecifier = serializeSpecifier; exports.deserializeSpecifier = deserializeSpecifier; Object.defineProperty(exports, '__esModule', { value: true }); }); (function() { /*! * @overview Ember - JavaScript Application Framework * @copyright Copyright 2011-2019 Tilde Inc. and contributors * Portions Copyright 2006-2011 Strobe Inc. * Portions Copyright 2008-2011 Apple Inc. All rights reserved. * @license Licensed under MIT license * See https://raw.github.com/emberjs/ember.js/master/LICENSE * @version 3.13.2 */ /*globals process */ var define, require, Ember; // Used in @ember/-internals/environment/lib/global.js mainContext = this; // eslint-disable-line no-undef (function() { function missingModule(name, referrerName) { if (referrerName) { throw new Error('Could not find module ' + name + ' required by: ' + referrerName); } else { throw new Error('Could not find module ' + name); } } function internalRequire(_name, referrerName) { var name = _name; var mod = registry[name]; if (!mod) { name = name + '/index'; mod = registry[name]; } var exports = seen[name]; if (exports !== undefined) { return exports; } exports = seen[name] = {}; if (!mod) { missingModule(_name, referrerName); } var deps = mod.deps; var callback = mod.callback; var reified = new Array(deps.length); for (var i = 0; i < deps.length; i++) { if (deps[i] === 'exports') { reified[i] = exports; } else if (deps[i] === 'require') { reified[i] = require; } else { reified[i] = internalRequire(deps[i], name); } } callback.apply(this, reified); return exports; } var isNode = typeof window === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]'; if (!isNode) { Ember = this.Ember = this.Ember || {}; } if (typeof Ember === 'undefined') { Ember = {}; } if (typeof Ember.__loader === 'undefined') { var registry = Object.create(null); var seen = Object.create(null); define = function(name, deps, callback) { var value = {}; if (!callback) { value.deps = []; value.callback = deps; } else { value.deps = deps; value.callback = callback; } registry[name] = value; }; require = function(name) { return internalRequire(name, null); }; // setup `require` module require['default'] = require; require.has = function registryHas(moduleName) { return Boolean(registry[moduleName]) || Boolean(registry[moduleName + '/index']); }; require._eak_seen = registry; Ember.__loader = { define: define, require: require, registry: registry, }; } else { define = Ember.__loader.define; require = Ember.__loader.require; } })(); define("@ember/-internals/browser-environment/index", ["exports"], function (_exports) { "use strict"; Object.defineProperty(_exports, "__esModule", { value: true }); _exports.hasDOM = _exports.isFirefox = _exports.isChrome = _exports.userAgent = _exports.history = _exports.location = _exports.window = void 0; // check if window exists and actually is the global var 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'; _exports.hasDOM = hasDom; var window = hasDom ? self : null; _exports.window = window; var location$1 = hasDom ? self.location : null; _exports.location = location$1; var history$1 = hasDom ? self.history : null; _exports.history = history$1; var userAgent = hasDom ? self.navigator.userAgent : 'Lynx (textmode)'; _exports.userAgent = userAgent; var isChrome = hasDom ? Boolean(window.chrome) && !window.opera : false; _exports.isChrome = isChrome; var isFirefox = hasDom ? typeof InstallTrigger !== 'undefined' : false; _exports.isFirefox = isFirefox; }); define("@ember/-internals/console/index", ["exports", "@ember/debug", "@ember/deprecated-features"], function (_exports, _debug, _deprecatedFeatures) { "use strict"; Object.defineProperty(_exports, "__esModule", { value: true }); _exports.default = void 0; // Deliver message that the function is deprecated var DEPRECATION_MESSAGE = 'Use of Ember.Logger is deprecated. Please use `console` for logging.'; var DEPRECATION_ID = 'ember-console.deprecate-logger'; var DEPRECATION_URL = 'https://emberjs.com/deprecations/v3.x#toc_use-console-rather-than-ember-logger'; /** @module ember */ /** Inside Ember-Metal, simply uses the methods from `imports.console`. Override this to provide more robust logging functionality. @class Logger @deprecated Use 'console' instead @namespace Ember @public */ var DEPRECATED_LOGGER; if (_deprecatedFeatures.LOGGER) { DEPRECATED_LOGGER = { /** Logs the arguments to the console. You can pass as many arguments as you want and they will be joined together with a space. ```javascript var foo = 1; Ember.Logger.log('log value of foo:', foo); // "log value of foo: 1" will be printed to the console ``` @method log @for Ember.Logger @param {*} arguments @public */ log() { (true && !(false) && (0, _debug.deprecate)(DEPRECATION_MESSAGE, false, { id: DEPRECATION_ID, until: '4.0.0', url: DEPRECATION_URL })); return console.log(...arguments); // eslint-disable-line no-console }, /** Prints the arguments to the console with a warning icon. You can pass as many arguments as you want and they will be joined together with a space. ```javascript Ember.Logger.warn('Something happened!'); // "Something happened!" will be printed to the console with a warning icon. ``` @method warn @for Ember.Logger @param {*} arguments @public */ warn() { (true && !(false) && (0, _debug.deprecate)(DEPRECATION_MESSAGE, false, { id: DEPRECATION_ID, until: '4.0.0', url: DEPRECATION_URL })); return console.warn(...arguments); // eslint-disable-line no-console }, /** Prints the arguments to the console with an error icon, red text and a stack trace. You can pass as many arguments as you want and they will be joined together with a space. ```javascript Ember.Logger.error('Danger! Danger!'); // "Danger! Danger!" will be printed to the console in red text. ``` @method error @for Ember.Logger @param {*} arguments @public */ error() { (true && !(false) && (0, _debug.deprecate)(DEPRECATION_MESSAGE, false, { id: DEPRECATION_ID, until: '4.0.0', url: DEPRECATION_URL })); return console.error(...arguments); // eslint-disable-line no-console }, /** Logs the arguments to the console. You can pass as many arguments as you want and they will be joined together with a space. ```javascript var foo = 1; Ember.Logger.info('log value of foo:', foo); // "log value of foo: 1" will be printed to the console ``` @method info @for Ember.Logger @param {*} arguments @public */ info() { (true && !(false) && (0, _debug.deprecate)(DEPRECATION_MESSAGE, false, { id: DEPRECATION_ID, until: '4.0.0', url: DEPRECATION_URL })); return console.info(...arguments); // eslint-disable-line no-console }, /** Logs the arguments to the console in blue text. You can pass as many arguments as you want and they will be joined together with a space. ```javascript var foo = 1; Ember.Logger.debug('log value of foo:', foo); // "log value of foo: 1" will be printed to the console ``` @method debug @for Ember.Logger @param {*} arguments @public */ debug() { (true && !(false) && (0, _debug.deprecate)(DEPRECATION_MESSAGE, false, { id: DEPRECATION_ID, until: '4.0.0', url: DEPRECATION_URL })); /* eslint-disable no-console */ if (console.debug) { return console.debug(...arguments); } return console.info(...arguments); /* eslint-enable no-console */ }, /** If the value passed into `Ember.Logger.assert` is not truthy it will throw an error with a stack trace. ```javascript Ember.Logger.assert(true); // undefined Ember.Logger.assert(true === false); // Throws an Assertion failed error. Ember.Logger.assert(true === false, 'Something invalid'); // Throws an Assertion failed error with message. ``` @method assert @for Ember.Logger @param {Boolean} bool Value to test @param {String} message Assertion message on failed @public */ assert() { (true && !(false) && (0, _debug.deprecate)(DEPRECATION_MESSAGE, false, { id: DEPRECATION_ID, until: '4.0.0', url: DEPRECATION_URL })); return console.assert(...arguments); // eslint-disable-line no-console } }; } var _default = DEPRECATED_LOGGER; _exports.default = _default; }); define("@ember/-internals/container/index", ["exports", "@ember/-internals/owner", "@ember/-internals/utils", "@ember/debug", "@ember/polyfills"], function (_exports, _owner, _utils, _debug, _polyfills) { "use strict"; Object.defineProperty(_exports, "__esModule", { value: true }); _exports.privatize = privatize; _exports.FACTORY_FOR = _exports.Container = _exports.Registry = void 0; var leakTracking; var containers; if (true /* DEBUG */ ) { // requires v8 // chrome --js-flags="--allow-natives-syntax --expose-gc" // node --allow-natives-syntax --expose-gc try { if (typeof gc === 'function') { leakTracking = (() => { // avoid syntax errors when --allow-natives-syntax not present var GetWeakSetValues = new Function('weakSet', 'return %GetWeakSetValues(weakSet, 0)'); containers = new WeakSet(); return { hasContainers() { gc(); return GetWeakSetValues(containers).length > 0; }, reset() { var values = GetWeakSetValues(containers); for (var i = 0; i < values.length; i++) { containers.delete(values[i]); } } }; })(); } } catch (e) {// ignore } } /** A container used to instantiate and cache objects. Every `Container` must be associated with a `Registry`, which is referenced to determine the factory and options that should be used to instantiate objects. The public API for `Container` is still in flux and should not be considered stable. @private @class Container */ class Container { constructor(registry, options = {}) { this.registry = registry; this.owner = options.owner || null; this.cache = (0, _utils.dictionary)(options.cache || null); this.factoryManagerCache = (0, _utils.dictionary)(options.factoryManagerCache || null); this.isDestroyed = false; this.isDestroying = false; if (true /* DEBUG */ ) { this.validationCache = (0, _utils.dictionary)(options.validationCache || null); if (containers !== undefined) { containers.add(this); } } } /** @private @property registry @type Registry @since 1.11.0 */ /** @private @property cache @type InheritingDict */ /** @private @property validationCache @type InheritingDict */ /** Given a fullName return a corresponding instance. The default behavior is for lookup to return a singleton instance. The singleton is scoped to the container, allowing multiple containers to all have their own locally scoped singletons. ```javascript let registry = new Registry(); let container = registry.container(); registry.register('api:twitter', Twitter); let twitter = container.lookup('api:twitter'); twitter instanceof Twitter; // => true // by default the container will return singletons let twitter2 = container.lookup('api:twitter'); twitter2 instanceof Twitter; // => true twitter === twitter2; //=> true ``` If singletons are not wanted, an optional flag can be provided at lookup. ```javascript let registry = new Registry(); let container = registry.container(); registry.register('api:twitter', Twitter); let twitter = container.lookup('api:twitter', { singleton: false }); let twitter2 = container.lookup('api:twitter', { singleton: false }); twitter === twitter2; //=> false ``` @private @method lookup @param {String} fullName @param {Object} [options] @param {String} [options.source] The fullname of the request source (used for local lookup) @return {any} */ lookup(fullName, options) { (true && !(!this.isDestroyed) && (0, _debug.assert)('expected container not to be destroyed', !this.isDestroyed)); (true && !(this.registry.isValidFullName(fullName)) && (0, _debug.assert)('fullName must be a proper full name', this.registry.isValidFullName(fullName))); return lookup(this, this.registry.normalize(fullName), options); } /** A depth first traversal, destroying the container, its descendant containers and all their managed objects. @private @method destroy */ destroy() { destroyDestroyables(this); this.isDestroying = true; } finalizeDestroy() { resetCache(this); this.isDestroyed = true; } /** Clear either the entire cache or just the cache for a particular key. @private @method reset @param {String} fullName optional key to reset; if missing, resets everything */ reset(fullName) { if (this.isDestroyed) return; if (fullName === undefined) { destroyDestroyables(this); resetCache(this); } else { resetMember(this, this.registry.normalize(fullName)); } } /** Returns an object that can be used to provide an owner to a manually created instance. @private @method ownerInjection @returns { Object } */ ownerInjection() { return { [_owner.OWNER]: this.owner }; } /** Given a fullName, return the corresponding factory. The consumer of the factory is responsible for the destruction of any factory instances, as there is no way for the container to ensure instances are destroyed when it itself is destroyed. @public @method factoryFor @param {String} fullName @param {Object} [options] @param {String} [options.source] The fullname of the request source (used for local lookup) @return {any} */ factoryFor(fullName, options = {}) { (true && !(!this.isDestroyed) && (0, _debug.assert)('expected container not to be destroyed', !this.isDestroyed)); var normalizedName = this.registry.normalize(fullName); (true && !(this.registry.isValidFullName(normalizedName)) && (0, _debug.assert)('fullName must be a proper full name', this.registry.isValidFullName(normalizedName))); (true && !(false /* EMBER_MODULE_UNIFICATION */ || !options.namespace) && (0, _debug.assert)('EMBER_MODULE_UNIFICATION must be enabled to pass a namespace option to factoryFor', false || !options.namespace)); if (options.source || options.namespace) { normalizedName = this.registry.expandLocalLookup(fullName, options); if (!normalizedName) { return; } } return factoryFor(this, normalizedName, fullName); } } _exports.Container = Container; if (true /* DEBUG */ ) { Container._leakTracking = leakTracking; } /* * Wrap a factory manager in a proxy which will not permit properties to be * set on the manager. */ function wrapManagerInDeprecationProxy(manager) { if (_utils.HAS_NATIVE_PROXY) { var validator = { set(_obj, prop) { throw new Error(`You attempted to set "${prop}" on a factory manager created by container#factoryFor. A factory manager is a read-only construct.`); } }; // Note: // We have to proxy access to the manager here so that private property // access doesn't cause the above errors to occur. var m = manager; var proxiedManager = { class: m.class, create(props) { return m.create(props); } }; var proxy = new Proxy(proxiedManager, validator); FACTORY_FOR.set(proxy, manager); } return manager; } function isSingleton(container, fullName) { return container.registry.getOption(fullName, 'singleton') !== false; } function isInstantiatable(container, fullName) { return container.registry.getOption(fullName, 'instantiate') !== false; } function lookup(container, fullName, options = {}) { (true && !(false /* EMBER_MODULE_UNIFICATION */ || !options.namespace) && (0, _debug.assert)('EMBER_MODULE_UNIFICATION must be enabled to pass a namespace option to lookup', false || !options.namespace)); var normalizedName = fullName; if (options.source || options.namespace) { normalizedName = container.registry.expandLocalLookup(fullName, options); if (!normalizedName) { return; } } if (options.singleton !== false) { var cached = container.cache[normalizedName]; if (cached !== undefined) { return cached; } } return instantiateFactory(container, normalizedName, fullName, options); } function factoryFor(container, normalizedName, fullName) { var cached = container.factoryManagerCache[normalizedName]; if (cached !== undefined) { return cached; } var factory = container.registry.resolve(normalizedName); if (factory === undefined) { return; } if (true /* DEBUG */ && factory && typeof factory._onLookup === 'function') { factory._onLookup(fullName); } var manager = new FactoryManager(container, factory, fullName, normalizedName); if (true /* DEBUG */ ) { manager = wrapManagerInDeprecationProxy(manager); } container.factoryManagerCache[normalizedName] = manager; return manager; } function isSingletonClass(container, fullName, { instantiate, singleton }) { return singleton !== false && !instantiate && isSingleton(container, fullName) && !isInstantiatable(container, fullName); } function isSingletonInstance(container, fullName, { instantiate, singleton }) { return singleton !== false && instantiate !== false && isSingleton(container, fullName) && isInstantiatable(container, fullName); } function isFactoryClass(container, fullname, { instantiate, singleton }) { return instantiate === false && (singleton === false || !isSingleton(container, fullname)) && !isInstantiatable(container, fullname); } function isFactoryInstance(container, fullName, { instantiate, singleton }) { return instantiate !== false && (singleton !== false || isSingleton(container, fullName)) && isInstantiatable(container, fullName); } function instantiateFactory(container, normalizedName, fullName, options) { var factoryManager = factoryFor(container, normalizedName, fullName); if (factoryManager === undefined) { return; } // SomeClass { singleton: true, instantiate: true } | { singleton: true } | { instantiate: true } | {} // By default majority of objects fall into this case if (isSingletonInstance(container, fullName, options)) { return container.cache[normalizedName] = factoryManager.create(); } // SomeClass { singleton: false, instantiate: true } if (isFactoryInstance(container, fullName, options)) { return factoryManager.create(); } // SomeClass { singleton: true, instantiate: false } | { instantiate: false } | { singleton: false, instantiation: false } if (isSingletonClass(container, fullName, options) || isFactoryClass(container, fullName, options)) { return factoryManager.class; } throw new Error('Could not create factory'); } function processInjections(container, injections, result) { if (true /* DEBUG */ ) { container.registry.validateInjections(injections); } var hash = result.injections; if (hash === undefined) { hash = result.injections = {}; } for (var i = 0; i < injections.length; i++) { var { property, specifier, source } = injections[i]; if (source) { hash[property] = lookup(container, specifier, { source }); } else { hash[property] = lookup(container, specifier); } if (!result.isDynamic) { result.isDynamic = !isSingleton(container, specifier); } } } function buildInjections(container, typeInjections, injections) { var result = { injections: undefined, isDynamic: false }; if (typeInjections !== undefined) { processInjections(container, typeInjections, result); } if (injections !== undefined) { processInjections(container, injections, result); } return result; } function injectionsFor(container, fullName) { var registry = container.registry; var [type] = fullName.split(':'); var typeInjections = registry.getTypeInjections(type); var injections = registry.getInjections(fullName); return buildInjections(container, typeInjections, injections); } function destroyDestroyables(container) { var cache = container.cache; var keys = Object.keys(cache); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = cache[key]; if (value.destroy) { value.destroy(); } } } function resetCache(container) { container.cache = (0, _utils.dictionary)(null); container.factoryManagerCache = (0, _utils.dictionary)(null); } function resetMember(container, fullName) { var member = container.cache[fullName]; delete container.factoryManagerCache[fullName]; if (member) { delete container.cache[fullName]; if (member.destroy) { member.destroy(); } } } var FACTORY_FOR = new WeakMap(); _exports.FACTORY_FOR = FACTORY_FOR; class FactoryManager { constructor(container, factory, fullName, normalizedName) { this.container = container; this.owner = container.owner; this.class = factory; this.fullName = fullName; this.normalizedName = normalizedName; this.madeToString = undefined; this.injections = undefined; FACTORY_FOR.set(this, this); } toString() { if (this.madeToString === undefined) { this.madeToString = this.container.registry.makeToString(this.class, this.fullName); } return this.madeToString; } create(options) { var injectionsCache = this.injections; if (injectionsCache === undefined) { var { injections, isDynamic } = injectionsFor(this.container, this.normalizedName); injectionsCache = injections; if (!isDynamic) { this.injections = injections; } } var props = injectionsCache; if (options !== undefined) { props = (0, _polyfills.assign)({}, injectionsCache, options); } if (true /* DEBUG */ ) { var lazyInjections; var validationCache = this.container.validationCache; // Ensure that all lazy injections are valid at instantiation time if (!validationCache[this.fullName] && this.class && typeof this.class._lazyInjections === 'function') { lazyInjections = this.class._lazyInjections(); lazyInjections = this.container.registry.normalizeInjectionsHash(lazyInjections); this.container.registry.validateInjections(lazyInjections); } validationCache[this.fullName] = true; } if (!this.class.create) { throw new Error(`Failed to create an instance of '${this.normalizedName}'. Most likely an improperly defined class or an invalid module export.`); } // required to allow access to things like // the customized toString, _debugContainerKey, // owner, etc. without a double extend and without // modifying the objects properties if (typeof this.class._initFactory === 'function') { this.class._initFactory(this); } else { // in the non-EmberObject case we need to still setOwner // this is required for supporting glimmer environment and // template instantiation which rely heavily on // `options[OWNER]` being passed into `create` // TODO: clean this up, and remove in future versions if (options === undefined || props === undefined) { // avoid mutating `props` here since they are the cached injections props = (0, _polyfills.assign)({}, props); } (0, _owner.setOwner)(props, this.owner); } var instance = this.class.create(props); FACTORY_FOR.set(instance, this); return instance; } } var VALID_FULL_NAME_REGEXP = /^[^:]+:[^:]+$/; /** A registry used to store factory and option information keyed by type. A `Registry` stores the factory and option information needed by a `Container` to instantiate and cache objects. The API for `Registry` is still in flux and should not be considered stable. @private @class Registry @since 1.11.0 */ class Registry { constructor(options = {}) { this.fallback = options.fallback || null; this.resolver = options.resolver || null; this.registrations = (0, _utils.dictionary)(options.registrations || null); this._typeInjections = (0, _utils.dictionary)(null); this._injections = (0, _utils.dictionary)(null); this._localLookupCache = Object.create(null); this._normalizeCache = (0, _utils.dictionary)(null); this._resolveCache = (0, _utils.dictionary)(null); this._failSet = new Set(); this._options = (0, _utils.dictionary)(null); this._typeOptions = (0, _utils.dictionary)(null); } /** A backup registry for resolving registrations when no matches can be found. @private @property fallback @type Registry */ /** An object that has a `resolve` method that resolves a name. @private @property resolver @type Resolver */ /** @private @property registrations @type InheritingDict */ /** @private @property _typeInjections @type InheritingDict */ /** @private @property _injections @type InheritingDict */ /** @private @property _normalizeCache @type InheritingDict */ /** @private @property _resolveCache @type InheritingDict */ /** @private @property _options @type InheritingDict */ /** @private @property _typeOptions @type InheritingDict */ /** Creates a container based on this registry. @private @method container @param {Object} options @return {Container} created container */ container(options) { return new Container(this, options); } /** Registers a factory for later injection. Example: ```javascript let registry = new Registry(); registry.register('model:user', Person, {singleton: false }); registry.register('fruit:favorite', Orange); registry.register('communication:main', Email, {singleton: false}); ``` @private @method register @param {String} fullName @param {Function} factory @param {Object} options */ register(fullName, factory, options = {}) { (true && !(this.isValidFullName(fullName)) && (0, _debug.assert)('fullName must be a proper full name', this.isValidFullName(fullName))); (true && !(factory !== undefined) && (0, _debug.assert)(`Attempting to register an unknown factory: '${fullName}'`, factory !== undefined)); var normalizedName = this.normalize(fullName); (true && !(!this._resolveCache[normalizedName]) && (0, _debug.assert)(`Cannot re-register: '${fullName}', as it has already been resolved.`, !this._resolveCache[normalizedName])); this._failSet.delete(normalizedName); this.registrations[normalizedName] = factory; this._options[normalizedName] = options; } /** Unregister a fullName ```javascript let registry = new Registry(); registry.register('model:user', User); registry.resolve('model:user').create() instanceof User //=> true registry.unregister('model:user') registry.resolve('model:user') === undefined //=> true ``` @private @method unregister @param {String} fullName */ unregister(fullName) { (true && !(this.isValidFullName(fullName)) && (0, _debug.assert)('fullName must be a proper full name', this.isValidFullName(fullName))); var normalizedName = this.normalize(fullName); this._localLookupCache = Object.create(null); delete this.registrations[normalizedName]; delete this._resolveCache[normalizedName]; delete this._options[normalizedName]; this._failSet.delete(normalizedName); } /** Given a fullName return the corresponding factory. By default `resolve` will retrieve the factory from the registry. ```javascript let registry = new Registry(); registry.register('api:twitter', Twitter); registry.resolve('api:twitter') // => Twitter ``` Optionally the registry can be provided with a custom resolver. If provided, `resolve` will first provide the custom resolver the opportunity to resolve the fullName, otherwise it will fallback to the registry. ```javascript let registry = new Registry(); registry.resolver = function(fullName) { // lookup via the module system of choice }; // the twitter factory is added to the module system registry.resolve('api:twitter') // => Twitter ``` @private @method resolve @param {String} fullName @param {Object} [options] @param {String} [options.source] the fullname of the request source (used for local lookups) @return {Function} fullName's factory */ resolve(fullName, options) { var factory = resolve(this, this.normalize(fullName), options); if (factory === undefined && this.fallback !== null) { factory = this.fallback.resolve(...arguments); } return factory; } /** A hook that can be used to describe how the resolver will attempt to find the factory. For example, the default Ember `.describe` returns the full class name (including namespace) where Ember's resolver expects to find the `fullName`. @private @method describe @param {String} fullName @return {string} described fullName */ describe(fullName) { if (this.resolver !== null && this.resolver.lookupDescription) { return this.resolver.lookupDescription(fullName); } else if (this.fallback !== null) { return this.fallback.describe(fullName); } else { return fullName; } } /** A hook to enable custom fullName normalization behavior @private @method normalizeFullName @param {String} fullName @return {string} normalized fullName */ normalizeFullName(fullName) { if (this.resolver !== null && this.resolver.normalize) { return this.resolver.normalize(fullName); } else if (this.fallback !== null) { return this.fallback.normalizeFullName(fullName); } else { return fullName; } } /** Normalize a fullName based on the application's conventions @private @method normalize @param {String} fullName @return {string} normalized fullName */ normalize(fullName) { return this._normalizeCache[fullName] || (this._normalizeCache[fullName] = this.normalizeFullName(fullName)); } /** @method makeToString @private @param {any} factory @param {string} fullName @return {function} toString function */ makeToString(factory, fullName) { if (this.resolver !== null && this.resolver.makeToString) { return this.resolver.makeToString(factory, fullName); } else if (this.fallback !== null) { return this.fallback.makeToString(factory, fullName); } else { return factory.toString(); } } /** Given a fullName check if the container is aware of its factory or singleton instance. @private @method has @param {String} fullName @param {Object} [options] @param {String} [options.source] the fullname of the request source (used for local lookups) @return {Boolean} */ has(fullName, options) { if (!this.isValidFullName(fullName)) { return false; } var source = options && options.source && this.normalize(options.source); var namespace = options && options.namespace || undefined; return has(this, this.normalize(fullName), source, namespace); } /** Allow registering options for all factories of a type. ```javascript let registry = new Registry(); let container = registry.container(); // if all of type `connection` must not be singletons registry.optionsForType('connection', { singleton: false }); registry.register('connection:twitter', TwitterConnection); registry.register('connection:facebook', FacebookConnection); let twitter = container.lookup('connection:twitter'); let twitter2 = container.lookup('connection:twitter'); twitter === twitter2; // => false let facebook = container.lookup('connection:facebook'); let facebook2 = container.lookup('connection:facebook'); facebook === facebook2; // => false ``` @private @method optionsForType @param {String} type @param {Object} options */ optionsForType(type, options) { this._typeOptions[type] = options; } getOptionsForType(type) { var optionsForType = this._typeOptions[type]; if (optionsForType === undefined && this.fallback !== null) { optionsForType = this.fallback.getOptionsForType(type); } return optionsForType; } /** @private @method options @param {String} fullName @param {Object} options */ options(fullName, options) { var normalizedName = this.normalize(fullName); this._options[normalizedName] = options; } getOptions(fullName) { var normalizedName = this.normalize(fullName); var options = this._options[normalizedName]; if (options === undefined && this.fallback !== null) { options = this.fallback.getOptions(fullName); } return options; } getOption(fullName, optionName) { var options = this._options[fullName]; if (options !== undefined && options[optionName] !== undefined) { return options[optionName]; } var type = fullName.split(':')[0]; options = this._typeOptions[type]; if (options && options[optionName] !== undefined) { return options[optionName]; } else if (this.fallback !== null) { return this.fallback.getOption(fullName, optionName); } return undefined; } /** Used only via `injection`. Provides a specialized form of injection, specifically enabling all objects of one type to be injected with a reference to another object. For example, provided each object of type `controller` needed a `router`. one would do the following: ```javascript let registry = new Registry(); let container = registry.container(); registry.register('router:main', Router); registry.register('controller:user', UserController); registry.register('controller:post', PostController); registry.typeInjection('controller', 'router', 'router:main'); let user = container.lookup('controller:user'); let post = container.lookup('controller:post'); user.router instanceof Router; //=> true post.router instanceof Router; //=> true // both controllers share the same router user.router === post.router; //=> true ``` @private @method typeInjection @param {String} type @param {String} property @param {String} fullName */ typeInjection(type, property, fullName) { (true && !(this.isValidFullName(fullName)) && (0, _debug.assert)('fullName must be a proper full name', this.isValidFullName(fullName))); var fullNameType = fullName.split(':')[0]; (true && !(fullNameType !== type) && (0, _debug.assert)(`Cannot inject a '${fullName}' on other ${type}(s).`, fullNameType !== type)); var injections = this._typeInjections[type] || (this._typeInjections[type] = []); injections.push({ property, specifier: fullName }); } /** Defines injection rules. These rules are used to inject dependencies onto objects when they are instantiated. Two forms of injections are possible: * Injecting one fullName on another fullName * Injecting one fullName on a type Example: ```javascript let registry = new Registry(); let container = registry.container(); registry.register('source:main', Source); registry.register('model:user', User); registry.register('model:post', Post); // injecting one fullName on another fullName // eg. each user model gets a post model registry.injection('model:user', 'post', 'model:post'); // injecting one fullName on another type registry.injection('model', 'source', 'source:main'); let user = container.lookup('model:user'); let post = container.lookup('model:post'); user.source instanceof Source; //=> true post.source instanceof Source; //=> true user.post instanceof Post; //=> true // and both models share the same source user.source === post.source; //=> true ``` @private @method injection @param {String} factoryName @param {String} property @param {String} injectionName */ injection(fullName, property, injectionName) { (true && !(this.isValidFullName(injectionName)) && (0, _debug.assert)(`Invalid injectionName, expected: 'type:name' got: ${injectionName}`, this.isValidFullName(injectionName))); var normalizedInjectionName = this.normalize(injectionName); if (fullName.indexOf(':') === -1) { return this.typeInjection(fullName, property, normalizedInjectionName); } (true && !(this.isValidFullName(fullName)) && (0, _debug.assert)('fullName must be a proper full name', this.isValidFullName(fullName))); var normalizedName = this.normalize(fullName); var injections = this._injections[normalizedName] || (this._injections[normalizedName] = []); injections.push({ property, specifier: normalizedInjectionName }); } /** @private @method knownForType @param {String} type the type to iterate over */ knownForType(type) { var localKnown = (0, _utils.dictionary)(null); var registeredNames = Object.keys(this.registrations); for (var index = 0; index < registeredNames.length; index++) { var fullName = registeredNames[index]; var itemType = fullName.split(':')[0]; if (itemType === type) { localKnown[fullName] = true; } } var fallbackKnown, resolverKnown; if (this.fallback !== null) { fallbackKnown = this.fallback.knownForType(type); } if (this.resolver !== null && this.resolver.knownForType) { resolverKnown = this.resolver.knownForType(type); } return (0, _polyfills.assign)({}, fallbackKnown, localKnown, resolverKnown); } isValidFullName(fullName) { return VALID_FULL_NAME_REGEXP.test(fullName); } getInjections(fullName) { var injections = this._injections[fullName]; if (this.fallback !== null) { var fallbackInjections = this.fallback.getInjections(fullName); if (fallbackInjections !== undefined) { injections = injections === undefined ? fallbackInjections : injections.concat(fallbackInjections); } } return injections; } getTypeInjections(type) { var injections = this._typeInjections[type]; if (this.fallback !== null) { var fallbackInjections = this.fallback.getTypeInjections(type); if (fallbackInjections !== undefined) { injections = injections === undefined ? fallbackInjections : injections.concat(fallbackInjections); } } return injections; } /** Given a fullName and a source fullName returns the fully resolved fullName. Used to allow for local lookup. ```javascript let registry = new Registry(); // the twitter factory is added to the module system registry.expandLocalLookup('component:post-title', { source: 'template:post' }) // => component:post/post-title ``` @private @method expandLocalLookup @param {String} fullName @param {Object} [options] @param {String} [options.source] the fullname of the request source (used for local lookups) @return {String} fullName */ expandLocalLookup(fullName, options) { if (this.resolver !== null && this.resolver.expandLocalLookup) { (true && !(this.isValidFullName(fullName)) && (0, _debug.assert)('fullName must be a proper full name', this.isValidFullName(fullName))); (true && !(!options.source || this.isValidFullName(options.source)) && (0, _debug.assert)('options.source must be a proper full name', !options.source || this.isValidFullName(options.source))); var normalizedFullName = this.normalize(fullName); var normalizedSource = this.normalize(options.source); return expandLocalLookup(this, normalizedFullName, normalizedSource, options.namespace); } else if (this.fallback !== null) { return this.fallback.expandLocalLookup(fullName, options); } else { return null; } } } _exports.Registry = Registry; if (true /* DEBUG */ ) { var proto = Registry.prototype; proto.normalizeInjectionsHash = function (hash) { var injections = []; for (var key in hash) { if (hash.hasOwnProperty(key)) { var { specifier, source, namespace } = hash[key]; (true && !(this.isValidFullName(specifier)) && (0, _debug.assert)(`Expected a proper full name, given '${specifier}'`, this.isValidFullName(specifier))); injections.push({ property: key, specifier, source, namespace }); } } return injections; }; proto.validateInjections = function (injections) { if (!injections) { return; } for (var i = 0; i < injections.length; i++) { var { specifier, source, namespace } = injections[i]; (true && !(this.has(specifier, { source, namespace })) && (0, _debug.assert)(`Attempting to inject an unknown injection: '${specifier}'`, this.has(specifier, { source, namespace }))); } }; } function expandLocalLookup(registry, normalizedName, normalizedSource, namespace) { var cache = registry._localLookupCache; var normalizedNameCache = cache[normalizedName]; if (!normalizedNameCache) { normalizedNameCache = cache[normalizedName] = Object.create(null); } var cacheKey = namespace || normalizedSource; var cached = normalizedNameCache[cacheKey]; if (cached !== undefined) { return cached; } var expanded = registry.resolver.expandLocalLookup(normalizedName, normalizedSource, namespace); return normalizedNameCache[cacheKey] = expanded; } function resolve(registry, _normalizedName, options) { var normalizedName = _normalizedName; // when `source` is provided expand normalizedName // and source into the full normalizedName if (options !== undefined && (options.source || options.namespace)) { normalizedName = registry.expandLocalLookup(_normalizedName, options); if (!normalizedName) { return; } } var cached = registry._resolveCache[normalizedName]; if (cached !== undefined) { return cached; } if (registry._failSet.has(normalizedName)) { return; } var resolved; if (registry.resolver) { resolved = registry.resolver.resolve(normalizedName); } if (resolved === undefined) { resolved = registry.registrations[normalizedName]; } if (resolved === undefined) { registry._failSet.add(normalizedName); } else { registry._resolveCache[normalizedName] = resolved; } return resolved; } function has(registry, fullName, source, namespace) { return registry.resolve(fullName, { source, namespace }) !== undefined; } var privateNames = (0, _utils.dictionary)(null); var privateSuffix = `${Math.random()}${Date.now()}`.replace('.', ''); function privatize([fullName]) { var name = privateNames[fullName]; if (name) { return name; } var [type, rawName] = fullName.split(':'); return privateNames[fullName] = (0, _utils.intern)(`${type}:${rawName}-${privateSuffix}`); } /* Public API for the container is still in flux. The public API, specified on the application namespace should be considered the stable API. // @module container @private */ }); define("@ember/-internals/environment/index", ["exports", "@ember/deprecated-features"], function (_exports, _deprecatedFeatures) { "use strict"; Object.defineProperty(_exports, "__esModule", { value: true }); _exports.getLookup = getLookup; _exports.setLookup = setLookup; _exports.getENV = getENV; _exports.ENV = _exports.context = _exports.global = void 0; // from lodash to catch fake globals function checkGlobal(value) { return value && value.Object === Object ? value : undefined; } // element ids can ruin global miss checks function checkElementIdShadowing(value) { return value && value.nodeType === undefined ? value : undefined; } // export real global var global$1 = checkGlobal(checkElementIdShadowing(typeof global === 'object' && global)) || checkGlobal(typeof self === 'object' && self) || checkGlobal(typeof window === 'object' && window) || typeof mainContext !== 'undefined' && mainContext || // set before strict mode in Ember loader/wrapper new Function('return this')(); // eval outside of strict mode _exports.global = global$1; var context = function (global, Ember) { return Ember === undefined ? { imports: global, exports: global, lookup: global } : { // import jQuery imports: Ember.imports || global, // export Ember exports: Ember.exports || global, // search for Namespaces lookup: Ember.lookup || global }; }(global$1, global$1.Ember); _exports.context = context; function getLookup() { return context.lookup; } function setLookup(value) { context.lookup = value; } /** The hash of environment variables used to control various configuration settings. To specify your own or override default settings, add the desired properties to a global hash named `EmberENV` (or `ENV` for backwards compatibility with earlier versions of Ember). The `EmberENV` hash must be created before loading Ember. @class EmberENV @type Object @public */ var ENV = { ENABLE_OPTIONAL_FEATURES: false, /** Determines whether Ember should add to `Array`, `Function`, and `String` native object prototypes, a few extra methods in order to provide a more friendly API. We generally recommend leaving this option set to true however, if you need to turn it off, you can add the configuration property `EXTEND_PROTOTYPES` to `EmberENV` and set it to `false`. Note, when disabled (the default configuration for Ember Addons), you will instead have to access all methods and functions from the Ember namespace. @property EXTEND_PROTOTYPES @type Boolean @default true @for EmberENV @public */ EXTEND_PROTOTYPES: { Array: true, Function: true, String: true }, /** The `LOG_STACKTRACE_ON_DEPRECATION` property, when true, tells Ember to log a full stack trace during deprecation warnings. @property LOG_STACKTRACE_ON_DEPRECATION @type Boolean @default true @for EmberENV @public */ LOG_STACKTRACE_ON_DEPRECATION: true, /** The `LOG_VERSION` property, when true, tells Ember to log versions of all dependent libraries in use. @property LOG_VERSION @type Boolean @default true @for EmberENV @public */ LOG_VERSION: true, RAISE_ON_DEPRECATION: false, STRUCTURED_PROFILE: false, /** Whether to insert a `
` wrapper around the application template. See RFC #280. This is not intended to be set directly, as the implementation may change in the future. Use `@ember/optional-features` instead. @property _APPLICATION_TEMPLATE_WRAPPER @for EmberENV @type Boolean @default true @private */ _APPLICATION_TEMPLATE_WRAPPER: true, /** Whether to use Glimmer Component semantics (as opposed to the classic "Curly" components semantics) for template-only components. See RFC #278. This is not intended to be set directly, as the implementation may change in the future. Use `@ember/optional-features` instead. @property _TEMPLATE_ONLY_GLIMMER_COMPONENTS @for EmberENV @type Boolean @default false @private */ _TEMPLATE_ONLY_GLIMMER_COMPONENTS: false, /** Whether the app is using jQuery. See RFC #294. This is not intended to be set directly, as the implementation may change in the future. Use `@ember/optional-features` instead. @property _JQUERY_INTEGRATION @for EmberENV @type Boolean @default true @private */ _JQUERY_INTEGRATION: true, /** Whether the app defaults to using async observers. This is not intended to be set directly, as the implementation may change in the future. Use `@ember/optional-features` instead. @property _DEFAULT_ASYNC_OBSERVERS @for EmberENV @type Boolean @default false @private */ _DEFAULT_ASYNC_OBSERVERS: false, /** Controls the maximum number of scheduled rerenders without "settling". In general, applications should not need to modify this environment variable, but please open an issue so that we can determine if a better default value is needed. @property _RERENDER_LOOP_LIMIT @for EmberENV @type number @default 1000 @private */ _RERENDER_LOOP_LIMIT: 1000, EMBER_LOAD_HOOKS: {}, FEATURES: {} }; _exports.ENV = ENV; (EmberENV => { if (typeof EmberENV !== 'object' || EmberENV === null) return; for (var flag in EmberENV) { if (!EmberENV.hasOwnProperty(flag) || flag === 'EXTEND_PROTOTYPES' || flag === 'EMBER_LOAD_HOOKS') continue; var defaultValue = ENV[flag]; if (defaultValue === true) { ENV[flag] = EmberENV[flag] !== false; } else if (defaultValue === false) { ENV[flag] = EmberENV[flag] === true; } } var { EXTEND_PROTOTYPES } = EmberENV; if (EXTEND_PROTOTYPES !== undefined) { if (typeof EXTEND_PROTOTYPES === 'object' && EXTEND_PROTOTYPES !== null) { ENV.EXTEND_PROTOTYPES.String = EXTEND_PROTOTYPES.String !== false; if (_deprecatedFeatures.FUNCTION_PROTOTYPE_EXTENSIONS) { ENV.EXTEND_PROTOTYPES.Function = EXTEND_PROTOTYPES.Function !== false; } ENV.EXTEND_PROTOTYPES.Array = EXTEND_PROTOTYPES.Array !== false; } else { var isEnabled = EXTEND_PROTOTYPES !== false; ENV.EXTEND_PROTOTYPES.String = isEnabled; if (_deprecatedFeatures.FUNCTION_PROTOTYPE_EXTENSIONS) { ENV.EXTEND_PROTOTYPES.Function = isEnabled; } ENV.EXTEND_PROTOTYPES.Array = isEnabled; } } // TODO this does not seem to be used by anything, // can we remove it? do we need to deprecate it? var { EMBER_LOAD_HOOKS } = EmberENV; if (typeof EMBER_LOAD_HOOKS === 'object' && EMBER_LOAD_HOOKS !== null) { for (var hookName in EMBER_LOAD_HOOKS) { if (!EMBER_LOAD_HOOKS.hasOwnProperty(hookName)) continue; var hooks = EMBER_LOAD_HOOKS[hookName]; if (Array.isArray(hooks)) { ENV.EMBER_LOAD_HOOKS[hookName] = hooks.filter(hook => typeof hook === 'function'); } } } var { FEATURES } = EmberENV; if (typeof FEATURES === 'object' && FEATURES !== null) { for (var feature in FEATURES) { if (!FEATURES.hasOwnProperty(feature)) continue; ENV.FEATURES[feature] = FEATURES[feature] === true; } } })(global$1.EmberENV || global$1.ENV); function getENV() { return ENV; } }); define("@ember/-internals/error-handling/index", ["exports"], function (_exports) { "use strict"; Object.defineProperty(_exports, "__esModule", { value: true }); _exports.getOnerror = getOnerror; _exports.setOnerror = setOnerror; _exports.getDispatchOverride = getDispatchOverride; _exports.setDispatchOverride = setDispatchOverride; _exports.onErrorTarget = void 0; var onerror; var onErrorTarget = { get onerror() { return onerror; } }; // Ember.onerror getter _exports.onErrorTarget = onErrorTarget; function getOnerror() { return onerror; } // Ember.onerror setter function setOnerror(handler) { onerror = handler; } var dispatchOverride; // allows testing adapter to override dispatch function getDispatchOverride() { return dispatchOverride; } function setDispatchOverride(handler) { dispatchOverride = handler; } }); define("@ember/-internals/extension-support/index", ["exports", "@ember/-internals/extension-support/lib/data_adapter", "@ember/-internals/extension-support/lib/container_debug_adapter"], function (_exports, _data_adapter, _container_debug_adapter) { "use strict"; Object.defineProperty(_exports, "__esModule", { value: true }); Object.defineProperty(_exports, "DataAdapter", { enumerable: true, get: function () { return _data_adapter.default; } }); Object.defineProperty(_exports, "ContainerDebugAdapter", { enumerable: true, get: function () { return _container_debug_adapter.default; } }); }); define("@ember/-internals/extension-support/lib/container_debug_adapter", ["exports", "@ember/string", "@ember/-internals/runtime"], function (_exports, _string, _runtime) { "use strict"; Object.defineProperty(_exports, "__esModule", { value: true }); _exports.default = void 0; /** @module @ember/debug */ /** The `ContainerDebugAdapter` helps the container and resolver interface with tools that debug Ember such as the [Ember Inspector](https://github.com/emberjs/ember-inspector) for Chrome and Firefox. This class can be extended by a custom resolver implementer to override some of the methods with library-specific code. The methods likely to be overridden are: * `canCatalogEntriesByType` * `catalogEntriesByType` The adapter will need to be registered in the application's container as `container-debug-adapter:main`. Example: ```javascript Application.initializer({ name: "containerDebugAdapter", initialize(application) { application.register('container-debug-adapter:main', require('app/container-debug-adapter')); } }); ``` @class ContainerDebugAdapter @extends EmberObject @since 1.5.0 @public */ var _default = _runtime.Object.extend({ /** The resolver instance of the application being debugged. This property will be injected on creation. @property resolver @default null @public */ resolver: null, /** Returns true if it is possible to catalog a list of available classes in the resolver for a given type. @method canCatalogEntriesByType @param {String} type The type. e.g. "model", "controller", "route". @return {boolean} whether a list is available for this type. @public */ canCatalogEntriesByType(type) { if (type === 'model' || type === 'template') { return false; } return true; }, /** Returns the available classes a given type. @method catalogEntriesByType @param {String} type The type. e.g. "model", "controller", "route". @return {Array} An array of strings. @public */ catalogEntriesByType(type) { var namespaces = (0, _runtime.A)(_runtime.Namespace.NAMESPACES); var types = (0, _runtime.A)(); var typeSuffixRegex = new RegExp(`${(0, _string.classify)(type)}$`); namespaces.forEach(namespace => { for (var key in namespace) { if (!namespace.hasOwnProperty(key)) { continue; } if (typeSuffixRegex.test(key)) { var klass = namespace[key]; if ((0, _runtime.typeOf)(klass) === 'class') { types.push((0, _string.dasherize)(key.replace(typeSuffixRegex, ''))); } } } }); return types; } }); _exports.default = _default; }); define("@ember/-internals/extension-support/lib/data_adapter", ["exports", "@ember/-internals/owner", "@ember/runloop", "@ember/-internals/metal", "@ember/string", "@ember/-internals/runtime"], function (_exports, _owner, _runloop, _metal, _string, _runtime) { "use strict"; Object.defineProperty(_exports, "__esModule", { value: true }); _exports.default = void 0; /** @module @ember/debug */ /** The `DataAdapter` helps a data persistence library interface with tools that debug Ember such as the [Ember Inspector](https://github.com/emberjs/ember-inspector) for Chrome and Firefox. This class will be extended by a persistence library which will override some of the methods with library-specific code. The methods likely to be overridden are: * `getFilters` * `detect` * `columnsForType` * `getRecords` * `getRecordColumnValues` * `getRecordKeywords` * `getRecordFilterValues` * `getRecordColor` * `observeRecord` The adapter will need to be registered in the application's container as `dataAdapter:main`. Example: ```javascript Application.initializer({ name: "data-adapter", initialize: function(application) { application.register('data-adapter:main', DS.DataAdapter); } }); ``` @class DataAdapter @extends EmberObject @public */ var _default = _runtime.Object.extend({ init() { this._super(...arguments); this.releaseMethods = (0, _runtime.A)(); }, /** The container-debug-adapter which is used to list all models. @property containerDebugAdapter @default undefined @since 1.5.0 @public **/ containerDebugAdapter: undefined, /** The number of attributes to send as columns. (Enough to make the record identifiable). @private @property attributeLimit @default 3 @since 1.3.0 */ attributeLimit: 3, /** Ember Data > v1.0.0-beta.18 requires string model names to be passed around instead of the actual factories. This is a stamp for the Ember Inspector to differentiate between the versions to be able to support older versions too. @public @property acceptsModelName */ acceptsModelName: true, /** Stores all methods that clear observers. These methods will be called on destruction. @private @property releaseMethods @since 1.3.0 */ releaseMethods: (0, _runtime.A)(), /** Specifies how records can be filtered. Records returned will need to have a `filterValues` property with a key for every name in the returned array. @public @method getFilters @return {Array} List of objects defining filters. The object should have a `name` and `desc` property. */ getFilters() { return (0, _runtime.A)(); }, /** Fetch the model types and observe them for changes. @public @method watchModelTypes @param {Function} typesAdded Callback to call to add types. Takes an array of objects containing wrapped types (returned from `wrapModelType`). @param {Function} typesUpdated Callback to call when a type has changed. Takes an array of objects containing wrapped types. @return {Function} Method to call to remove all observers */ watchModelTypes(typesAdded, typesUpdated) { var modelTypes = this.getModelTypes(); var releaseMethods = (0, _runtime.A)(); var typesToSend; typesToSend = modelTypes.map(type => { var klass = type.klass; var wrapped = this.wrapModelType(klass, type.name); releaseMethods.push(this.observeModelType(type.name, typesUpdated)); return wrapped; }); typesAdded(typesToSend); var release = () => { releaseMethods.forEach(fn => fn()); this.releaseMethods.removeObject(release); }; this.releaseMethods.pushObject(release); return release; }, _nameToClass(type) { if (typeof type === 'string') { var owner = (0, _owner.getOwner)(this); var Factory = owner.factoryFor(`model:${type}`); type = Factory && Factory.class; } return type; }, /** Fetch the records of a given type and observe them for changes. @public @method watchRecords @param {String} modelName The model name. @param {Function} recordsAdded Callback to call to add records. Takes an array of objects containing wrapped records. The object should have the following properties: columnValues: {Object} The key and value of a table cell. object: {Object} The actual record object. @param {Function} recordsUpdated Callback to call when a record has changed. Takes an array of objects containing wrapped records. @param {Function} recordsRemoved Callback to call when a record has removed. Takes the following parameters: index: The array index where the records were removed. count: The number of records removed. @return {Function} Method to call to remove all observers. */ watchRecords(modelName, recordsAdded, recordsUpdated, recordsRemoved) { var releaseMethods = (0, _runtime.A)(); var klass = this._nameToClass(modelName); var records = this.getRecords(klass, modelName); var release; function recordUpdated(updatedRecord) { recordsUpdated([updatedRecord]); } var recordsToSend = records.map(record => { releaseMethods.push(this.observeRecord(record, recordUpdated)); return this.wrapRecord(record); }); var contentDidChange = (array, idx, removedCount, addedCount) => { for (var i = idx; i < idx + addedCount; i++) { var record = (0, _metal.objectAt)(array, i); var wrapped = this.wrapRecord(record); releaseMethods.push(this.observeRecord(record, recordUpdated)); recordsAdded([wrapped]); } if (removedCount) { recordsRemoved(idx, removedCount); } }; var observer = { didChange: contentDidChange, willChange() { return this; } }; (0, _metal.addArrayObserver)(records, this, observer); release = () => { releaseMethods.forEach(fn => fn()); (0, _metal.removeArrayObserver)(records, this, observer); this.releaseMethods.removeObject(release); }; recordsAdded(recordsToSend); this.releaseMethods.pushObject(release); return release; }, /** Clear all observers before destruction @private @method willDestroy */ willDestroy() { this._super(...arguments); this.releaseMethods.forEach(fn => fn()); }, /** Detect whether a class is a model. Test that against the model class of your persistence library. @public @method detect @return boolean Whether the class is a model class or not. */ detect() { return false; }, /** Get the columns for a given model type. @public @method columnsForType @return {Array} An array of columns of the following format: name: {String} The name of the column. desc: {String} Humanized description (what would show in a table column name). */ columnsForType() { return (0, _runtime.A)(); }, /** Adds observers to a model type class. @private @method observeModelType @param {String} modelName The model type name. @param {Function} typesUpdated Called when a type is modified. @return {Function} The function to call to remove observers. */ observeModelType(modelName, typesUpdated) { var klass = this._nameToClass(modelName); var records = this.getRecords(klass, modelName); function onChange() { typesUpdated([this.wrapModelType(klass, modelName)]); } var observer = { didChange(array, idx, removedCount, addedCount) { // Only re-fetch records if the record count changed // (which is all we care about as far as model types are concerned). if (removedCount > 0 || addedCount > 0) { (0, _runloop.scheduleOnce)('actions', this, onChange); } }, willChange() { return this; } }; (0, _metal.addArrayObserver)(records, this, observer); var release = () => (0, _metal.removeArrayObserver)(records, this, observer); return release; }, /** Wraps a given model type and observes changes to it. @private @method wrapModelType @param {Class} klass A model class. @param {String} modelName Name of the class. @return {Object} Contains the wrapped type and the function to remove observers Format: type: {Object} The wrapped type. The wrapped type has the following format: name: {String} The name of the type. count: {Integer} The number of records available. columns: {Columns} An array of columns to describe the record. object: {Class} The actual Model type class. release: {Function} The function to remove observers. */ wrapModelType(klass, name) { var records = this.getRecords(klass, name); var typeToSend; typeToSend = { name, count: (0, _metal.get)(records, 'length'), columns: this.columnsForType(klass), object: klass }; return typeToSend; }, /** Fetches all models defined in the application. @private @method getModelTypes @return {Array} Array of model types. */ getModelTypes() { var containerDebugAdapter = this.get('containerDebugAdapter'); var types; if (containerDebugAdapter.canCatalogEntriesByType('model')) { types = containerDebugAdapter.catalogEntriesByType('model'); } else { types = this._getObjectsOnNamespaces(); } // New adapters return strings instead of classes. types = (0, _runtime.A)(types).map(name => { return { klass: this._nameToClass(name), name }; }); types = (0, _runtime.A)(types).filter(type => this.detect(type.klass)); return (0, _runtime.A)(types); }, /** Loops over all namespaces and all objects attached to them. @private @method _getObjectsOnNamespaces @return {Array} Array of model type strings. */ _getObjectsOnNamespaces() { var namespaces = (0, _runtime.A)(_runtime.Namespace.NAMESPACES); var types = (0, _runtime.A)(); namespaces.forEach(namespace => { for (var key in namespace) { if (!namespace.hasOwnProperty(key)) { continue; } // Even though we will filter again in `getModelTypes`, // we should not call `lookupFactory` on non-models if (!this.detect(namespace[key])) { continue; } var name = (0, _string.dasherize)(key); types.push(name); } }); return types; }, /** Fetches all loaded records for a given type. @public @method getRecords @return {Array} An array of records. This array will be observed for changes, so it should update when new records are added/removed. */ getRecords() { return (0, _runtime.A)(); }, /** Wraps a record and observers changes to it. @private @method wrapRecord @param {Object} record The record instance. @return {Object} The wrapped record. Format: columnValues: {Array} searchKeywords: {Array} */ wrapRecord(record) { var recordToSend = { object: record }; recordToSend.columnValues = this.getRecordColumnValues(record); recordToSend.searchKeywords = this.getRecordKeywords(record); recordToSend.filterValues = this.getRecordFilterValues(record); recordToSend.color = this.getRecordColor(record); return recordToSend; }, /** Gets the values for each column. @public @method getRecordColumnValues @return {Object} Keys should match column names defined by the model type. */ getRecordColumnValues() { return {}; }, /** Returns keywords to match when searching records. @public @method getRecordKeywords @return {Array} Relevant keywords for search. */ getRecordKeywords() { return (0, _runtime.A)(); }, /** Returns the values of filters defined by `getFilters`. @public @method getRecordFilterValues @param {Object} record The record instance. @return {Object} The filter values. */ getRecordFilterValues() { return {}; }, /** Each record can have a color that represents its state. @public @method getRecordColor @param {Object} record The record instance @return {String} The records color. Possible options: black, red, blue, green. */ getRecordColor() { return null; }, /** Observes all relevant properties and re-sends the wrapped record when a change occurs. @public @method observerRecord @return {Function} The function to call to remove all observers. */ observeRecord() { return function () {}; } }); _exports.default = _default; }); define("@ember/-internals/glimmer/index", ["exports", "@ember/polyfills", "@ember/-internals/container", "@glimmer/opcode-compiler", "@ember/-internals/runtime", "@ember/-internals/utils", "@ember/runloop", "@glimmer/reference", "@ember/-internals/metal", "@ember/debug", "@glimmer/runtime", "@glimmer/util", "@ember/-internals/owner", "@ember/-internals/views", "@ember/-internals/browser-environment", "@ember/instrumentation", "@ember/service", "@ember/-internals/environment", "@ember/string", "@glimmer/wire-format", "rsvp", "@glimmer/node", "@ember/-internals/routing", "@ember/component/template-only", "@ember/deprecated-features"], function (_exports, _polyfills, _container, _opcodeCompiler, _runtime, _utils, _runloop, _reference, _metal, _debug, _runtime2, _util, _owner, _views, _browserEnvironment, _instrumentation, _service, _environment2, _string, _wireFormat, _rsvp, _node, _routing, _templateOnly, _deprecatedFeatures) { "use strict"; Object.defineProperty(_exports, "__esModule", { value: true }); _exports.template = template; _exports.helper = helper; _exports.escapeExpression = escapeExpression; _exports.htmlSafe = htmlSafe; _exports.isHTMLSafe = isHTMLSafe; _exports._resetRenderers = _resetRenderers; _exports.renderSettled = renderSettled; _exports.getTemplate = getTemplate; _exports.setTemplate = setTemplate; _exports.hasTemplate = hasTemplate; _exports.getTemplates = getTemplates; _exports.setTemplates = setTemplates; _exports.setupEngineRegistry = setupEngineRegistry; _exports.setupApplicationRegistry = setupApplicationRegistry; _exports._registerMacros = registerMacros; _exports.iterableFor = iterableFor; _exports.capabilities = capabilities; _exports.setComponentManager = setComponentManager; _exports.getComponentManager = getComponentManager; _exports.setModifierManager = setModifierManager; _exports.getModifierManager = getModifierManager; _exports.modifierCapabilities = capabilities$1; _exports.setComponentTemplate = setComponentTemplate; _exports.getComponentTemplate = getComponentTemplate; Object.defineProperty(_exports, "DOMChanges", { enumerable: true, get: function () { return _runtime2.DOMChanges; } }); Object.defineProperty(_exports, "DOMTreeConstruction", { enumerable: true, get: function () { return _runtime2.DOMTreeConstruction; } }); Object.defineProperty(_exports, "isSerializationFirstNode", { enumerable: true, get: function () { return _runtime2.isSerializationFirstNode; } }); Object.defineProperty(_exports, "NodeDOMTreeConstruction", { enumerable: true, get: function () { return _node.NodeDOMTreeConstruction; } }); _exports.OutletView = _exports.DebugStack = _exports.INVOKE = _exports.UpdatableReference = _exports.AbstractComponentManager = _exports._experimentalMacros = _exports.InteractiveRenderer = _exports.InertRenderer = _exports.Renderer = _exports.SafeString = _exports.Environment = _exports.Helper = _exports.ROOT_REF = _exports.Component = _exports.LinkComponent = _exports.TextArea = _exports.TextField = _exports.Checkbox = _exports.templateCacheCounters = _exports.RootTemplate = void 0; function isTemplateFactory(template) { return typeof template === 'function'; } var counters = { cacheHit: 0, cacheMiss: 0 }; _exports.templateCacheCounters = counters; var TEMPLATE_COMPILER_MAIN = _container.privatize`template-compiler:main`; function template(json) { var glimmerFactory = (0, _opcodeCompiler.templateFactory)(json); var cache = new WeakMap(); var factory = owner => { var result = cache.get(owner); if (result === undefined) { counters.cacheMiss++; var compiler = owner.lookup(TEMPLATE_COMPILER_MAIN); result = glimmerFactory.create(compiler, { owner }); cache.set(owner, result); } else { counters.cacheHit++; } return result; }; factory.__id = glimmerFactory.id; factory.__meta = glimmerFactory.meta; return factory; } var RootTemplate = template({ "id": "hjhxUoru", "block": "{\"symbols\":[],\"statements\":[[1,[28,\"component\",[[23,0,[]]],null],false]],\"hasEval\":false}", "meta": { "moduleName": "packages/@ember/-internals/glimmer/lib/templates/root.hbs" } }); /** @module @ember/component */ _exports.RootTemplate = RootTemplate; var RECOMPUTE_TAG = (0, _utils.symbol)('RECOMPUTE_TAG'); function isHelperFactory(helper) { return typeof helper === 'object' && helper !== null && helper.class && helper.class.isHelperFactory; } function isSimpleHelper(helper) { return helper.destroy === undefined; } /** Ember Helpers are functions that can compute values, and are used in templates. For example, this code calls a helper named `format-currency`: ```handlebars
{{format-currency cents currency="$"}}
``` Additionally a helper can be called as a nested helper (sometimes called a subexpression). In this example, the computed value of a helper is passed to a component named `show-money`: ```handlebars {{show-money amount=(format-currency cents currency="$")}} ``` Helpers defined using a class must provide a `compute` function. For example: ```app/helpers/format-currency.js import Helper from '@ember/component/helper'; export default Helper.extend({ compute([cents], { currency }) { return `${currency}${cents * 0.01}`; } }); ``` Each time the input to a helper changes, the `compute` function will be called again. As instances, these helpers also have access to the container and will accept injected dependencies. Additionally, class helpers can call `recompute` to force a new computation. @class Helper @public @since 1.13.0 */ var Helper = _runtime.FrameworkObject.extend({ init() { this._super(...arguments); this[RECOMPUTE_TAG] = (0, _reference.createTag)(); }, /** On a class-based helper, it may be useful to force a recomputation of that helpers value. This is akin to `rerender` on a component. For example, this component will rerender when the `currentUser` on a session service changes: ```app/helpers/current-user-email.js import Helper from '@ember/component/helper' import { inject as service } from '@ember/service' import { observer } from '@ember/object' export default Helper.extend({ session: service(), onNewUser: observer('session.currentUser', function() { this.recompute(); }), compute() { return this.get('session.currentUser.email'); } }); ``` @method recompute @public @since 1.13.0 */ recompute() { (0, _runloop.join)(() => (0, _reference.dirty)(this[RECOMPUTE_TAG])); } }); _exports.Helper = Helper; Helper.isHelperFactory = true; { (0, _runtime.setFrameworkClass)(Helper); } class Wrapper { constructor(compute) { this.compute = compute; this.isHelperFactory = true; } create() { // needs new instance or will leak containers return { compute: this.compute }; } } /** In many cases, the ceremony of a full `Helper` class is not required. The `helper` method create pure-function helpers without instances. For example: ```app/helpers/format-currency.js import { helper } from '@ember/component/helper'; export default helper(function(params, hash) { let cents = params[0]; let currency = hash.currency; return `${currency}${cents * 0.01}`; }); ``` @static @param {Function} helper The helper function @method helper @for @ember/component/helper @public @since 1.13.0 */ function helper(helperFn) { return new Wrapper(helperFn); } function toBool(predicate) { if ((0, _runtime.isArray)(predicate)) { return predicate.length !== 0; } else { return Boolean(predicate); } } var UPDATE = (0, _utils.symbol)('UPDATE'); var INVOKE = (0, _utils.symbol)('INVOKE'); _exports.INVOKE = INVOKE; var ACTION = (0, _utils.symbol)('ACTION'); class EmberPathReference { get(key) { return PropertyReference.create(this, key); } } class CachedReference$1 extends EmberPathReference { constructor() { super(); this.lastRevision = null; this.lastValue = null; } value() { var { tag, lastRevision, lastValue } = this; if (lastRevision === null || !(0, _reference.validate)(tag, lastRevision)) { lastValue = this.lastValue = this.compute(); this.lastRevision = (0, _reference.value)(tag); } return lastValue; } } class RootReference extends _reference.ConstReference { constructor(value$$1) { super(value$$1); this.children = Object.create(null); } static create(value$$1) { return valueToRef(value$$1); } get(propertyKey) { var ref = this.children[propertyKey]; if (ref === undefined) { ref = this.children[propertyKey] = new RootPropertyReference(this.inner, propertyKey); } return ref; } } var TwoWayFlushDetectionTag; if (true /* DEBUG */ ) { TwoWayFlushDetectionTag = class TwoWayFlushDetectionTag { constructor(tag, key, ref) { this.tag = tag; this.key = key; this.ref = ref; } static create(tag, key, ref) { return new TwoWayFlushDetectionTag(tag, key, ref); } [_reference.COMPUTE]() { return this.tag[_reference.COMPUTE](); } didCompute(parent) { (0, _metal.didRender)(parent, this.key, this.ref); } }; } class PropertyReference extends CachedReference$1 { static create(parentReference, propertyKey) { if ((0, _reference.isConst)(parentReference)) { return valueKeyToRef(parentReference.value(), propertyKey); } else { return new NestedPropertyReference(parentReference, propertyKey); } } get(key) { return new NestedPropertyReference(this, key); } } class RootPropertyReference extends PropertyReference { constructor(parentValue, propertyKey) { super(); this.parentValue = parentValue; this.propertyKey = propertyKey; { this.propertyTag = (0, _reference.createUpdatableTag)(); } if (true /* DEBUG */ ) { this.tag = TwoWayFlushDetectionTag.create(this.propertyTag, propertyKey, this); } else { this.tag = this.propertyTag; } if (true /* DEBUG */ && !true /* EMBER_METAL_TRACKED_PROPERTIES */ ) { (0, _metal.watchKey)(parentValue, propertyKey); } } compute() { var { parentValue, propertyKey } = this; if (true /* DEBUG */ ) { this.tag.didCompute(parentValue); } var ret; { var tag = (0, _metal.track)(() => { ret = (0, _metal.get)(parentValue, propertyKey); }); (0, _metal.consume)(tag); (0, _reference.update)(this.propertyTag, tag); } return ret; } [UPDATE](value$$1) { (0, _metal.set)(this.parentValue, this.propertyKey, value$$1); } } class NestedPropertyReference extends PropertyReference { constructor(parentReference, propertyKey) { super(); this.parentReference = parentReference; this.propertyKey = propertyKey; var parentReferenceTag = parentReference.tag; var propertyTag = this.propertyTag = (0, _reference.createUpdatableTag)(); if (true /* DEBUG */ ) { var tag = (0, _reference.combine)([parentReferenceTag, propertyTag]); this.tag = TwoWayFlushDetectionTag.create(tag, propertyKey, this); } else { this.tag = (0, _reference.combine)([parentReferenceTag, propertyTag]); } } compute() { var { parentReference, propertyTag, propertyKey } = this; var _parentValue = parentReference.value(); var parentValueType = typeof _parentValue; if (parentValueType === 'string' && propertyKey === 'length') { return _parentValue.length; } if (parentValueType === 'object' && _parentValue !== null || parentValueType === 'function') { var parentValue = _parentValue; if (true /* DEBUG */ && !true /* EMBER_METAL_TRACKED_PROPERTIES */ ) { (0, _metal.watchKey)(parentValue, propertyKey); } if (true /* DEBUG */ ) { this.tag.didCompute(parentValue); } var ret; { var tag = (0, _metal.track)(() => { ret = (0, _metal.get)(parentValue, propertyKey); }); (0, _metal.consume)(tag); (0, _reference.update)(propertyTag, tag); } return ret; } else { return undefined; } } [UPDATE](value$$1) { (0, _metal.set)(this.parentReference.value() /* let the other side handle the error */ , this.propertyKey, value$$1); } } class UpdatableReference extends EmberPathReference { constructor(value$$1) { super(); this.tag = (0, _reference.createTag)(); this._value = value$$1; } value() { return this._value; } update(value$$1) { var { _value } = this; if (value$$1 !== _value) { (0, _reference.dirty)(this.tag); this._value = value$$1; } } } _exports.UpdatableReference = UpdatableReference; class ConditionalReference$1 extends _runtime2.ConditionalReference { static create(reference) { if ((0, _reference.isConst)(reference)) { var value$$1 = reference.value(); if (!(0, _utils.isProxy)(value$$1)) { return _runtime2.PrimitiveReference.create(toBool(value$$1)); } } return new ConditionalReference$1(reference); } constructor(reference) { super(reference); this.objectTag = (0, _reference.createUpdatableTag)(); this.tag = (0, _reference.combine)([reference.tag, this.objectTag]); } toBool(predicate) { if ((0, _utils.isProxy)(predicate)) { (0, _reference.update)(this.objectTag, (0, _metal.tagForProperty)(predicate, 'isTruthy')); return Boolean((0, _metal.get)(predicate, 'isTruthy')); } else { (0, _reference.update)(this.objectTag, (0, _metal.tagFor)(predicate)); return toBool(predicate); } } } class SimpleHelperReference extends CachedReference$1 { constructor(helper$$1, args) { super(); this.helper = helper$$1; this.args = args; var computeTag = this.computeTag = (0, _reference.createUpdatableTag)(); this.tag = (0, _reference.combine)([args.tag, computeTag]); } static create(helper$$1, args) { if ((0, _reference.isConst)(args)) { var { positional, named } = args; var positionalValue = positional.value(); var namedValue = named.value(); if (true /* DEBUG */ ) { (0, _debug.debugFreeze)(positionalValue); (0, _debug.debugFreeze)(namedValue); } var result = helper$$1(positionalValue, namedValue); return valueToRef(result); } else { return new SimpleHelperReference(helper$$1, args); } } compute() { var { helper: helper$$1, computeTag, args: { positional, named } } = this; var positionalValue = positional.value(); var namedValue = named.value(); if (true /* DEBUG */ ) { (0, _debug.debugFreeze)(positionalValue); (0, _debug.debugFreeze)(namedValue); } var computedValue; var combinedTrackingTag = (0, _metal.track)(() => computedValue = helper$$1(positionalValue, namedValue)); (0, _reference.update)(computeTag, combinedTrackingTag); return computedValue; } } class ClassBasedHelperReference extends CachedReference$1 { constructor(instance, args) { super(); this.instance = instance; this.args = args; var computeTag = this.computeTag = (0, _reference.createUpdatableTag)(); this.tag = (0, _reference.combine)([instance[RECOMPUTE_TAG], args.tag, computeTag]); } static create(instance, args) { return new ClassBasedHelperReference(instance, args); } compute() { var { instance, computeTag, args: { positional, named } } = this; var positionalValue = positional.value(); var namedValue = named.value(); if (true /* DEBUG */ ) { (0, _debug.debugFreeze)(positionalValue); (0, _debug.debugFreeze)(namedValue); } var computedValue; var combinedTrackingTag = (0, _metal.track)(() => computedValue = instance.compute(positionalValue, namedValue)); (0, _reference.update)(computeTag, combinedTrackingTag); return computedValue; } } class InternalHelperReference extends CachedReference$1 { constructor(helper$$1, args) { super(); this.helper = helper$$1; this.args = args; this.tag = args.tag; } compute() { var { helper: helper$$1, args } = this; return helper$$1(args); } } class UnboundReference extends _reference.ConstReference { static create(value$$1) { return valueToRef(value$$1, false); } get(key) { return valueToRef(this.inner[key], false); } } class ReadonlyReference extends CachedReference$1 { constructor(inner) { super(); this.inner = inner; this.tag = inner.tag; } get [INVOKE]() { return this.inner[INVOKE]; } compute() { return this.inner.value(); } get(key) { return this.inner.get(key); } } function referenceFromParts(root, parts) { var reference = root; for (var i = 0; i < parts.length; i++) { reference = reference.get(parts[i]); } return reference; } function isObject(value$$1) { return value$$1 !== null && typeof value$$1 === 'object'; } function isFunction(value$$1) { return typeof value$$1 === 'function'; } function isPrimitive(value$$1) { if (true /* DEBUG */ ) { var type = typeof value$$1; return value$$1 === undefined || value$$1 === null || type === 'boolean' || type === 'number' || type === 'string'; } else { return true; } } function valueToRef(value$$1, bound = true) { if (isObject(value$$1)) { // root of interop with ember objects return bound ? new RootReference(value$$1) : new UnboundReference(value$$1); } else if (isFunction(value$$1)) { // ember doesn't do observing with functions return new UnboundReference(value$$1); } else if (isPrimitive(value$$1)) { return _runtime2.PrimitiveReference.create(value$$1); } else if (true /* DEBUG */ ) { var type = typeof value$$1; var output; try { output = String(value$$1); } catch (e) { output = null; } if (output) { throw (0, _util.unreachable)(`[BUG] Unexpected ${type} (${output})`); } else { throw (0, _util.unreachable)(`[BUG] Unexpected ${type}`); } } else { throw (0, _util.unreachable)(); } } function valueKeyToRef(value$$1, key) { if (isObject(value$$1)) { // root of interop with ember objects return new RootPropertyReference(value$$1, key); } else if (isFunction(value$$1)) { // ember doesn't do observing with functions return new UnboundReference(value$$1[key]); } else if (isPrimitive(value$$1)) { return _runtime2.UNDEFINED_REFERENCE; } else if (true /* DEBUG */ ) { var type = typeof value$$1; var output; try { output = String(value$$1); } catch (e) { output = null; } if (output) { throw (0, _util.unreachable)(`[BUG] Unexpected ${type} (${output})`); } else { throw (0, _util.unreachable)(`[BUG] Unexpected ${type}`); } } else { throw (0, _util.unreachable)(); } } var DIRTY_TAG = (0, _utils.symbol)('DIRTY_TAG'); var ARGS = (0, _utils.symbol)('ARGS'); var ROOT_REF = (0, _utils.symbol)('ROOT_REF'); _exports.ROOT_REF = ROOT_REF; var IS_DISPATCHING_ATTRS = (0, _utils.symbol)('IS_DISPATCHING_ATTRS'); var HAS_BLOCK = (0, _utils.symbol)('HAS_BLOCK'); var BOUNDS = (0, _utils.symbol)('BOUNDS'); /** @module @ember/component */ /** A component is an isolated piece of UI, represented by a template and an optional class. When a component has a class, its template's `this` value is an instance of the component class. ## Template-only Components The simplest way to create a component is to create a template file in `app/templates/components`. For example, if you name a template `app/templates/components/person-profile.hbs`: ```app/templates/components/person-profile.hbs

{{@person.name}}

{{@person.signature}}

``` You will be able to use `` to invoke this component elsewhere in your application: ```app/templates/application.hbs ``` Note that component names are capitalized here in order to distinguish them from regular HTML elements, but they are dasherized in the file system. While the angle bracket invocation form is generally preferred, it is also possible to invoke the same component with the `{{person-profile}}` syntax: ```app/templates/application.hbs {{person-profile person=this.currentUser}} ``` Note that with this syntax, you use dashes in the component name and arguments are passed without the `@` sign. In both cases, Ember will render the content of the component template we created above. The end result will be something like this: ```html

Tomster

Out of office this week

``` ## File System Nesting Components can be nested inside sub-folders for logical groupping. For example, if we placed our template in `app/templates/components/person/short-profile.hbs`, we can invoke it as ``: ```app/templates/application.hbs ``` Or equivalently, `{{person/short-profile}}`: ```app/templates/application.hbs {{person/short-profile person=this.currentUser}} ``` ## Yielding Contents You can use `yield` inside a template to include the **contents** of any block attached to the component. The block will be executed in its original context: ```handlebars

Admin mode

{{! Executed in the current context. }}
``` or ```handlebars {{#person-profile person=this.currentUser}}

Admin mode

{{! Executed in the current context. }} {{/person-profile}} ``` ```app/templates/components/person-profile.hbs

{{@person.name}}

{{yield}} ``` ## Customizing Components With JavaScript If you want to customize the component in order to handle events, transform arguments or maintain internal state, you implement a subclass of `Component`. One example is to add computed properties to your component: ```app/components/person-profile.js import Component from '@ember/component'; export default Component.extend({ displayName: computed('person.title', 'person.firstName', 'person.lastName', function() { let { title, firstName, lastName } = this; if (title) { return `${title} ${lastName}`; } else { return `${firstName} ${lastName}`; } }) }); ``` And then use it in the component's template: ```app/templates/components/person-profile.hbs

{{this.displayName}}

{{yield}} ``` ## Customizing a Component's HTML Element in JavaScript ### HTML Tag The default HTML tag name used for a component's HTML representation is `div`. This can be customized by setting the `tagName` property. Consider the following component class: ```app/components/emphasized-paragraph.js import Component from '@ember/component'; export default Component.extend({ tagName: 'em' }); ``` When invoked, this component would produce output that looks something like this: ```html ``` ### HTML `class` Attribute The HTML `class` attribute of a component's tag can be set by providing a `classNames` property that is set to an array of strings: ```app/components/my-widget.js import Component from '@ember/component'; export default Component.extend({ classNames: ['my-class', 'my-other-class'] }); ``` Invoking this component will produce output that looks like this: ```html
``` `class` attribute values can also be set by providing a `classNameBindings` property set to an array of properties names for the component. The return value of these properties will be added as part of the value for the components's `class` attribute. These properties can be computed properties: ```app/components/my-widget.js import Component from '@ember/component'; import { computed } from '@ember/object'; export default Component.extend({ classNames: ['my-class', 'my-other-class'], classNameBindings: ['propertyA', 'propertyB'], propertyA: 'from-a', propertyB: computed(function() { if (someLogic) { return 'from-b'; } }) }); ``` Invoking this component will produce HTML that looks like: ```html
``` Note that `classNames` and `classNameBindings` is in addition to the `class` attribute passed with the angle bracket invocation syntax. Therefore, if this component was invoked like so: ```handlebars ``` The resulting HTML will look similar to this: ```html
``` If the value of a class name binding returns a boolean the property name itself will be used as the class name if the property is true. The class name will not be added if the value is `false` or `undefined`. ```app/components/my-widget.js import Component from '@ember/component'; export default Component.extend({ classNameBindings: ['hovered'], hovered: true }); ``` Invoking this component will produce HTML that looks like: ```html
``` ### Custom Class Names for Boolean Values When using boolean class name bindings you can supply a string value other than the property name for use as the `class` HTML attribute by appending the preferred value after a ":" character when defining the binding: ```app/components/my-widget.js import Component from '@ember/component'; export default Component.extend({ classNameBindings: ['awesome:so-very-cool'], awesome: true }); ``` Invoking this component will produce HTML that looks like: ```html
``` Boolean value class name bindings whose property names are in a camelCase-style format will be converted to a dasherized format: ```app/components/my-widget.js import Component from '@ember/component'; export default Component.extend({ classNameBindings: ['isUrgent'], isUrgent: true }); ``` Invoking this component will produce HTML that looks like: ```html
``` Class name bindings can also refer to object values that are found by traversing a path relative to the component itself: ```app/components/my-widget.js import Component from '@ember/component'; import EmberObject from '@ember/object'; export default Component.extend({ classNameBindings: ['messages.empty'], messages: EmberObject.create({ empty: true }) }); ``` Invoking this component will produce HTML that looks like: ```html
``` If you want to add a class name for a property which evaluates to true and and a different class name if it evaluates to false, you can pass a binding like this: ```app/components/my-widget.js import Component from '@ember/component'; export default Component.extend({ classNameBindings: ['isEnabled:enabled:disabled'], isEnabled: true }); ``` Invoking this component will produce HTML that looks like: ```html
``` When isEnabled is `false`, the resulting HTML representation looks like this: ```html
``` This syntax offers the convenience to add a class if a property is `false`: ```app/components/my-widget.js import Component from '@ember/component'; // Applies no class when isEnabled is true and class 'disabled' when isEnabled is false export default Component.extend({ classNameBindings: ['isEnabled::disabled'], isEnabled: true }); ``` Invoking this component when the `isEnabled` property is true will produce HTML that looks like: ```html
``` Invoking it when the `isEnabled` property on the component is `false` will produce HTML that looks like: ```html
``` Updates to the value of a class name binding will result in automatic update of the HTML `class` attribute in the component's rendered HTML representation. If the value becomes `false` or `undefined` the class name will be removed. Both `classNames` and `classNameBindings` are concatenated properties. See [EmberObject](/ember/release/classes/EmberObject) documentation for more information about concatenated properties. ### Other HTML Attributes The HTML attribute section of a component's tag can be set by providing an `attributeBindings` property set to an array of property names on the component. The return value of these properties will be used as the value of the component's HTML associated attribute: ```app/components/my-anchor.js import Component from '@ember/component'; export default Component.extend({ tagName: 'a', attributeBindings: ['href'], href: 'http://google.com' }); ``` Invoking this component will produce HTML that looks like: ```html ``` One property can be mapped on to another by placing a ":" between the source property and the destination property: ```app/components/my-anchor.js import Component from '@ember/component'; export default Component.extend({ tagName: 'a', attributeBindings: ['url:href'], url: 'http://google.com' }); ``` Invoking this component will produce HTML that looks like: ```html ``` HTML attributes passed with angle bracket invocations will take precedence over those specified in `attributeBindings`. Therefore, if this component was invoked like so: ```handlebars ``` The resulting HTML will looks like this: ```html ``` Note that the `href` attribute is ultimately set to `http://bing.com`, despite it having attribute binidng to the `url` property, which was set to `http://google.com`. Namespaced attributes (e.g. `xlink:href`) are supported, but have to be mapped, since `:` is not a valid character for properties in Javascript: ```app/components/my-use.js import Component from '@ember/component'; export default Component.extend({ tagName: 'use', attributeBindings: ['xlinkHref:xlink:href'], xlinkHref: '#triangle' }); ``` Invoking this component will produce HTML that looks like: ```html ``` If the value of a property monitored by `attributeBindings` is a boolean, the attribute will be present or absent depending on the value: ```app/components/my-text-input.js import Component from '@ember/component'; export default Component.extend({ tagName: 'input', attributeBindings: ['disabled'], disabled: false }); ``` Invoking this component will produce HTML that looks like: ```html ``` `attributeBindings` can refer to computed properties: ```app/components/my-text-input.js import Component from '@ember/component'; import { computed } from '@ember/object'; export default Component.extend({ tagName: 'input', attributeBindings: ['disabled'], disabled: computed(function() { if (someLogic) { return true; } else { return false; } }) }); ``` To prevent setting an attribute altogether, use `null` or `undefined` as the value of the property used in `attributeBindings`: ```app/components/my-text-input.js import Component from '@ember/component'; export default Component.extend({ tagName: 'form', attributeBindings: ['novalidate'], novalidate: null }); ``` Updates to the property of an attribute binding will result in automatic update of the HTML attribute in the component's HTML output. `attributeBindings` is a concatenated property. See [EmberObject](/ember/release/classes/EmberObject) documentation for more information about concatenated properties. ## Layouts The `layout` property can be used to dynamically specify a template associated with a component class, instead of relying on Ember to link together a component class and a template based on file names. In general, applications should not use this feature, but it's commonly used in addons for historical reasons. The `layout` property should be set to the default export of a template module, which is the name of a template file without the `.hbs` extension. ```app/templates/components/person-profile.hbs

Person's Title

{{yield}}
``` ```app/components/person-profile.js import Component from '@ember/component'; import layout from '../templates/components/person-profile'; export default Component.extend({ layout }); ``` If you invoke the component: ```handlebars

Chief Basket Weaver

Fisherman Industries

``` or ```handlebars {{#person-profile}}

Chief Basket Weaver

Fisherman Industries

{{/person-profile}} ``` It will result in the following HTML output: ```html

Person's Title

Chief Basket Weaver

Fisherman Industries

``` ## Handling Browser Events Components can respond to user-initiated events in one of three ways: passing actions with angle bracket invocation, adding event handler methods to the component's class, or adding actions to the component's template. ### Passing Actions With Angle Bracket Invoation For one-off events specific to particular instance of a component, it is possible to pass actions to the component's element using angle bracket invoation syntax. ```handlebars ``` In this case, when the first component is clicked on, Ember will invoke the `firstWidgetClicked` action. When the second component is clicked on, Ember will invoke the `secondWidgetClicked` action instead. Besides `{{action}}`, it is also possible to pass any arbitrary element modifiers using the angle bracket invocation syntax. ### Event Handler Methods Components can also respond to user-initiated events by implementing a method that matches the event name. This approach is appropiate when the same event should be handled by all instances of the same component. An event object will be passed as the argument to the event handler method. ```app/components/my-widget.js import Component from '@ember/component'; export default Component.extend({ click(event) { // `event.target` is either the component's element or one of its children let tag = event.target.tagName.toLowerCase(); console.log('clicked on a `<${tag}>` HTML element!'); } }); ``` In this example, whenever the user clicked anywhere inside the component, it will log a message to the console. It is possible to handle event types other than `click` by implementing the following event handler methods. In addition, custom events can be registered by using `Application.customEvents`. Touch events: * `touchStart` * `touchMove` * `touchEnd` * `touchCancel` Keyboard events: * `keyDown` * `keyUp` * `keyPress` Mouse events: * `mouseDown` * `mouseUp` * `contextMenu` * `click` * `doubleClick` * `focusIn` * `focusOut` Form events: * `submit` * `change` * `focusIn` * `focusOut` * `input` Drag and drop events: * `dragStart` * `drag` * `dragEnter` * `dragLeave` * `dragOver` * `dragEnd` * `drop` ### `{{action}}` Helper Instead of handling all events of a particular type anywhere inside the component's element, you may instead want to limit it to a particular element in the component's template. In this case, it would be more convenient to implement an action instead. For example, you could implement the action `hello` for the `person-profile` component: ```app/components/person-profile.js import Component from '@ember/component'; export default Component.extend({ actions: { hello(name) { console.log("Hello", name); } } }); ``` And then use it in the component's template: ```app/templates/components/person-profile.hbs

{{@person.name}}

``` When the user clicks the button, Ember will invoke the `hello` action, passing in the current value of `@person.name` as an argument. See [Ember.Templates.helpers.action](/ember/release/classes/Ember.Templates.helpers/methods/action?anchor=action). @class Component @extends Ember.CoreView @uses Ember.TargetActionSupport @uses Ember.ClassNamesSupport @uses Ember.ActionSupport @uses Ember.ViewMixin @uses Ember.ViewStateSupport @public */ var Component = _views.CoreView.extend(_views.ChildViewsSupport, _views.ViewStateSupport, _views.ClassNamesSupport, _runtime.TargetActionSupport, _views.ActionSupport, _views.ViewMixin, { isComponent: true, init() { this._super(...arguments); this[IS_DISPATCHING_ATTRS] = false; this[DIRTY_TAG] = (0, _reference.createTag)(); this[ROOT_REF] = new RootReference(this); this[BOUNDS] = null; if (true /* DEBUG */ && this.renderer._destinedForDOM && this.tagName === '') { var eventNames = []; var eventDispatcher = (0, _owner.getOwner)(this).lookup('event_dispatcher:main'); var events = eventDispatcher && eventDispatcher._finalEvents || {}; // tslint:disable-next-line:forin for (var key in events) { var methodName = events[key]; if (typeof this[methodName] === 'function') { eventNames.push(methodName); } } // If in a tagless component, assert that no event handlers are defined (true && !(!eventNames.length) && (0, _debug.assert)( // tslint:disable-next-line:max-line-length `You can not define \`${eventNames}\` function(s) to handle DOM event in the \`${this}\` tagless component since it doesn't have any DOM element.`, !eventNames.length)); } (true && !(this.mouseEnter === undefined) && (0, _debug.deprecate)(`Using \`mouseEnter\` event handler methods in components has been deprecated.`, this.mouseEnter === undefined, { id: 'ember-views.event-dispatcher.mouseenter-leave-move', until: '4.0.0', url: 'https://emberjs.com/deprecations/v3.x#toc_component-mouseenter-leave-move' })); (true && !(this.mouseLeave === undefined) && (0, _debug.deprecate)(`Using \`mouseLeave\` event handler methods in components has been deprecated.`, this.mouseLeave === undefined, { id: 'ember-views.event-dispatcher.mouseenter-leave-move', until: '4.0.0', url: 'https://emberjs.com/deprecations/v3.x#toc_component-mouseenter-leave-move' })); (true && !(this.mouseMove === undefined) && (0, _debug.deprecate)(`Using \`mouseMove\` event handler methods in components has been deprecated.`, this.mouseMove === undefined, { id: 'ember-views.event-dispatcher.mouseenter-leave-move', until: '4.0.0', url: 'https://emberjs.com/deprecations/v3.x#toc_component-mouseenter-leave-move' })); }, rerender() { (0, _reference.dirty)(this[DIRTY_TAG]); this._super(); }, [_metal.PROPERTY_DID_CHANGE](key) { if (this[IS_DISPATCHING_ATTRS]) { return; } var args = this[ARGS]; var reference = args !== undefined ? args[key] : undefined; if (reference !== undefined && reference[UPDATE] !== undefined) { reference[UPDATE]((0, _metal.get)(this, key)); } }, getAttr(key) { // TODO Intimate API should be deprecated return this.get(key); }, /** Normally, Ember's component model is "write-only". The component takes a bunch of attributes that it got passed in, and uses them to render its template. One nice thing about this model is that if you try to set a value to the same thing as last time, Ember (through HTMLBars) will avoid doing any work on the DOM. This is not just a performance optimization. If an attribute has not changed, it is important not to clobber the element's "hidden state". For example, if you set an input's `value` to the same value as before, it will clobber selection state and cursor position. In other words, setting an attribute is not **always** idempotent. This method provides a way to read an element's attribute and also update the last value Ember knows about at the same time. This makes setting an attribute idempotent. In particular, what this means is that if you get an `` element's `value` attribute and then re-render the template with the same value, it will avoid clobbering the cursor and selection position. Since most attribute sets are idempotent in the browser, you typically can get away with reading attributes using jQuery, but the most reliable way to do so is through this method. @method readDOMAttr @param {String} name the name of the attribute @return String @public */ readDOMAttr(name) { // TODO revisit this var _element = (0, _views.getViewElement)(this); (true && !(_element !== null) && (0, _debug.assert)(`Cannot call \`readDOMAttr\` on ${this} which does not have an element`, _element !== null)); var element = _element; var isSVG = element.namespaceURI === _runtime2.SVG_NAMESPACE; var { type, normalized } = (0, _runtime2.normalizeProperty)(element, name); if (isSVG || type === 'attr') { return element.getAttribute(normalized); } return element[normalized]; }, /** The WAI-ARIA role of the control represented by this view. For example, a button may have a role of type 'button', or a pane may have a role of type 'alertdialog'. This property is used by assistive software to help visually challenged users navigate rich web applications. The full list of valid WAI-ARIA roles is available at: [https://www.w3.org/TR/wai-aria/#roles_categorization](https://www.w3.org/TR/wai-aria/#roles_categorization) @property ariaRole @type String @default null @public */ /** Enables components to take a list of parameters as arguments. For example, a component that takes two parameters with the names `name` and `age`: ```app/components/my-component.js import Component from '@ember/component'; let MyComponent = Component.extend(); MyComponent.reopenClass({ positionalParams: ['name', 'age'] }); export default MyComponent; ``` It can then be invoked like this: ```hbs {{my-component "John" 38}} ``` The parameters can be referred to just like named parameters: ```hbs Name: {{name}}, Age: {{age}}. ``` Using a string instead of an array allows for an arbitrary number of parameters: ```app/components/my-component.js import Component from '@ember/component'; let MyComponent = Component.extend(); MyComponent.reopenClass({ positionalParams: 'names' }); export default MyComponent; ``` It can then be invoked like this: ```hbs {{my-component "John" "Michael" "Scott"}} ``` The parameters can then be referred to by enumerating over the list: ```hbs {{#each names as |name|}}{{name}}{{/each}} ``` @static @public @property positionalParams @since 1.13.0 */ /** Called when the attributes passed into the component have been updated. Called both during the initial render of a container and during a rerender. Can be used in place of an observer; code placed here will be executed every time any attribute updates. @method didReceiveAttrs @public @since 1.13.0 */ didReceiveAttrs() {}, /** Called when the attributes passed into the component have been updated. Called both during the initial render of a container and during a rerender. Can be used in place of an observer; code placed here will be executed every time any attribute updates. @event didReceiveAttrs @public @since 1.13.0 */ /** Called after a component has been rendered, both on initial render and in subsequent rerenders. @method didRender @public @since 1.13.0 */ didRender() {}, /** Called after a component has been rendered, both on initial render and in subsequent rerenders. @event didRender @public @since 1.13.0 */ /** Called before a component has been rendered, both on initial render and in subsequent rerenders. @method willRender @public @since 1.13.0 */ willRender() {}, /** Called before a component has been rendered, both on initial render and in subsequent rerenders. @event willRender @public @since 1.13.0 */ /** Called when the attributes passed into the component have been changed. Called only during a rerender, not during an initial render. @method didUpdateAttrs @public @since 1.13.0 */ didUpdateAttrs() {}, /** Called when the attributes passed into the component have been changed. Called only during a rerender, not during an initial render. @event didUpdateAttrs @public @since 1.13.0 */ /** Called when the component is about to update and rerender itself. Called only during a rerender, not during an initial render. @method willUpdate @public @since 1.13.0 */ willUpdate() {}, /** Called when the component is about to update and rerender itself. Called only during a rerender, not during an initial render. @event willUpdate @public @since 1.13.0 */ /** Called when the component has updated and rerendered itself. Called only during a rerender, not during an initial render. @method didUpdate @public @since 1.13.0 */ didUpdate() {} }); _exports.Component = Component; Component.toString = () => '@ember/component'; Component.reopenClass({ isComponentFactory: true, positionalParams: [] }); { (0, _runtime.setFrameworkClass)(Component); } var layout = template({ "id": "hvtsz7RF", "block": "{\"symbols\":[],\"statements\":[],\"hasEval\":false}", "meta": { "moduleName": "packages/@ember/-internals/glimmer/lib/templates/empty.hbs" } }); /** @module @ember/component */ /** The internal class used to create text inputs when the `{{input}}` helper is used with `type` of `checkbox`. See [Ember.Templates.helpers.input](/ember/release/classes/Ember.Templates.helpers/methods/input?anchor=input) for usage details. ## Direct manipulation of `checked` The `checked` attribute of an `Checkbox` object should always be set through the Ember object or by interacting with its rendered element representation via the mouse, keyboard, or touch. Updating the value of the checkbox via jQuery will result in the checked value of the object and its element losing synchronization. ## Layout and LayoutName properties Because HTML `input` elements are self closing `layout` and `layoutName` properties will not be applied. @class Checkbox @extends Component @public */ var Checkbox = Component.extend({ layout, /** By default, this component will add the `ember-checkbox` class to the component's element. @property classNames @type Array | String @default ['ember-checkbox'] @public */ classNames: ['ember-checkbox'], tagName: 'input', /** By default this component will forward a number of arguments to attributes on the the component's element: * indeterminate * disabled * tabindex * name * autofocus * required * form When invoked with curly braces, this is the exhaustive list of HTML attributes you can customize (i.e. `{{input type="checkbox" disabled=true}}`). When invoked with angle bracket invocation, this list is irrelevant, because you can use HTML attribute syntax to customize the element (i.e. ``). However, `@type` and `@checked` must be passed as named arguments, not attributes. @property attributeBindings @type Array | String @default ['type', 'checked', 'indeterminate', 'disabled', 'tabindex', 'name', 'autofocus', 'required', 'form'] @public */ attributeBindings: ['type', 'checked', 'indeterminate', 'disabled', 'tabindex', 'name', 'autofocus', 'required', 'form'], /** Sets the `type` attribute of the `Checkbox`'s element @property disabled @default false @private */ type: 'checkbox', /** Sets the `disabled` attribute of the `Checkbox`'s element @property disabled @default false @public */ disabled: false, /** Corresponds to the `indeterminate` property of the `Checkbox`'s element @property disabled @default false @public */ indeterminate: false, /** Whenever the checkbox is inserted into the DOM, perform initialization steps, which include setting the indeterminate property if needed. If this method is overridden, `super` must be called. @method @public */ didInsertElement() { this._super(...arguments); this.element.indeterminate = Boolean(this.indeterminate); }, /** Whenever the `change` event is fired on the checkbox, update its `checked` property to reflect whether the checkbox is checked. If this method is overridden, `super` must be called. @method @public */ change() { (0, _metal.set)(this, 'checked', this.element.checked); } }); _exports.Checkbox = Checkbox; if (true /* DEBUG */ ) { var UNSET = {}; Checkbox.reopen({ value: UNSET, didReceiveAttrs() { this._super(); (true && !(!(this.type === 'checkbox' && this.value !== UNSET)) && (0, _debug.assert)("`` is not supported; " + "please use `` instead.", !(this.type === 'checkbox' && this.value !== UNSET))); } }); } Checkbox.toString = () => '@ember/component/checkbox'; /** @module @ember/component */ var inputTypes = _browserEnvironment.hasDOM ? Object.create(null) : null; function canSetTypeOfInput(type) { // if running in outside of a browser always return // the original type if (!_browserEnvironment.hasDOM) { return Boolean(type); } if (type in inputTypes) { return inputTypes[type]; } var inputTypeTestElement = document.createElement('input'); try { inputTypeTestElement.type = type; } catch (e) {// ignored } return inputTypes[type] = inputTypeTestElement.type === type; } /** The internal class used to create text inputs when the `Input` component is used with `type` of `text`. See [Ember.Templates.components.Input](/ember/release/classes/Ember.Templates.components/methods/Input?anchor=Input) for usage details. ## Layout and LayoutName properties Because HTML `input` elements are self closing `layout` and `layoutName` properties will not be applied. @class TextField @extends Component @uses Ember.TextSupport @public */ var TextField = Component.extend(_views.TextSupport, { layout, /** By default, this component will add the `ember-text-field` class to the component's element. @property classNames @type Array | String @default ['ember-text-field'] @public */ classNames: ['ember-text-field'], tagName: 'input', /** By default this component will forward a number of arguments to attributes on the the component's element: * accept * autocomplete * autosave * dir * formaction * formenctype * formmethod * formnovalidate * formtarget * height * inputmode * lang * list * type * max * min * multiple * name * pattern * size * step * value * width When invoked with `{{input type="text"}}`, you can only customize these attributes. When invoked with ``, you can just use HTML attributes directly. @property attributeBindings @type Array | String @default ['accept', 'autocomplete', 'autosave', 'dir', 'formaction', 'formenctype', 'formmethod', 'formnovalidate', 'formtarget', 'height', 'inputmode', 'lang', 'list', 'type', 'max', 'min', 'multiple', 'name', 'pattern', 'size', 'step', 'value', 'width'] @public */ attributeBindings: ['accept', 'autocomplete', 'autosave', 'dir', 'formaction', 'formenctype', 'formmethod', 'formnovalidate', 'formtarget', 'height', 'inputmode', 'lang', 'list', 'type', 'max', 'min', 'multiple', 'name', 'pattern', 'size', 'step', 'value', 'width'], /** As the user inputs text, this property is updated to reflect the `value` property of the HTML element. @property value @type String @default "" @public */ value: '', /** The `type` attribute of the input element. @property type @type String @default "text" @public */ type: (0, _metal.computed)({ get() { return 'text'; }, set(_key, value$$1) { var type = 'text'; if (canSetTypeOfInput(value$$1)) { type = value$$1; } return type; } }), /** The `size` of the text field in characters. @property size @type String @default null @public */ size: null, /** The `pattern` attribute of input element. @property pattern @type String @default null @public */ pattern: null, /** The `min` attribute of input element used with `type="number"` or `type="range"`. @property min @type String @default null @since 1.4.0 @public */ min: null, /** The `max` attribute of input element used with `type="number"` or `type="range"`. @property max @type String @default null @since 1.4.0 @public */ max: null }); _exports.TextField = TextField; TextField.toString = () => '@ember/component/text-field'; /** @module @ember/component */ /** The `Textarea` component inserts a new instance of ` ``` The `@value` argument is two-way bound. If the user types text into the textarea, the `@value` argument is updated. If the `@value` argument is updated, the text in the textarea is updated. In the following example, the `writtenWords` property on the component will be updated as the user types 'Lots of text' into the text area of their browser's window. ```app/components/word-editor.js import Component from '@glimmer/component'; import { tracked } from '@glimmer/tracking'; export default class extends Component { @tracked writtenWords = "Lots of text that IS bound"; } ``` ```handlebars ``` If you wanted a one way binding, you could use the `