-
Notifications
You must be signed in to change notification settings - Fork 53
/
ember-data.map
1 lines (1 loc) · 726 KB
/
ember-data.map
1
{"version":3,"sources":["license.js","loader.js","ember-data/-debug/index.js","ember-data/-private/adapters/build-url-mixin.js","ember-data/-private/adapters/errors.js","ember-data/-private/core.js","ember-data/-private/features.js","ember-data/-private/index.js","ember-data/-private/system/clone-null.js","ember-data/-private/system/coerce-id.js","ember-data/-private/system/debug/debug-adapter.js","ember-data/-private/system/diff-array.js","ember-data/-private/system/identity-map.js","ember-data/-private/system/internal-model-map.js","ember-data/-private/system/is-array-like.js","ember-data/-private/system/many-array.js","ember-data/-private/system/model/errors.js","ember-data/-private/system/model/internal-model.js","ember-data/-private/system/model/model.js","ember-data/-private/system/model/states.js","ember-data/-private/system/normalize-link.js","ember-data/-private/system/normalize-model-name.js","ember-data/-private/system/ordered-set.js","ember-data/-private/system/promise-proxies.js","ember-data/-private/system/record-array-manager.js","ember-data/-private/system/record-arrays.js","ember-data/-private/system/record-arrays/adapter-populated-record-array.js","ember-data/-private/system/record-arrays/filtered-record-array.js","ember-data/-private/system/record-arrays/record-array.js","ember-data/-private/system/references.js","ember-data/-private/system/references/belongs-to.js","ember-data/-private/system/references/has-many.js","ember-data/-private/system/references/record.js","ember-data/-private/system/references/reference.js","ember-data/-private/system/relationship-meta.js","ember-data/-private/system/relationships/belongs-to.js","ember-data/-private/system/relationships/ext.js","ember-data/-private/system/relationships/has-many.js","ember-data/-private/system/relationships/relationship-payloads-manager.js","ember-data/-private/system/relationships/relationship-payloads.js","ember-data/-private/system/relationships/state/belongs-to.js","ember-data/-private/system/relationships/state/create.js","ember-data/-private/system/relationships/state/has-many.js","ember-data/-private/system/relationships/state/relationship.js","ember-data/-private/system/snapshot-record-array.js","ember-data/-private/system/snapshot.js","ember-data/-private/system/store.js","ember-data/-private/system/store/common.js","ember-data/-private/system/store/finders.js","ember-data/-private/system/store/serializer-response.js","ember-data/-private/system/store/serializers.js","ember-data/-private/utils.js","ember-data/-private/utils/parse-response-headers.js","ember-data/adapter.js","ember-data/adapters/errors.js","ember-data/adapters/json-api.js","ember-data/adapters/rest.js","ember-data/attr.js","ember-data/index.js","ember-data/initialize-store-service.js","ember-data/initializers/ember-data.js","ember-data/instance-initializers/ember-data.js","ember-data/model.js","ember-data/relationships.js","ember-data/serializer.js","ember-data/serializers/embedded-records-mixin.js","ember-data/serializers/json-api.js","ember-data/serializers/json.js","ember-data/serializers/rest.js","ember-data/setup-container.js","ember-data/store.js","ember-data/transform.js","ember-data/transforms/boolean.js","ember-data/transforms/date.js","ember-data/transforms/number.js","ember-data/transforms/string.js","ember-data/transforms/transform.js","ember-data/version.js","ember-inflector/index.js","ember-inflector/lib/ext/string.js","ember-inflector/lib/helpers/pluralize.js","ember-inflector/lib/helpers/singularize.js","ember-inflector/lib/system.js","ember-inflector/lib/system/inflections.js","ember-inflector/lib/system/inflector.js","ember-inflector/lib/system/string.js","ember-inflector/lib/utils/make-helper.js","ember-load-initializers/index.js","ember-shim.js"],"sourcesContent":["/*!\n * @overview Ember Data\n * @copyright Copyright 2011-2017 Tilde Inc. and contributors.\n * Portions Copyright 2011 LivingSocial Inc.\n * @license Licensed under MIT license (see license.js)\n * @version 3.0.2\n */\n","var loader, define, requireModule, require, requirejs;\n\n(function (global) {\n 'use strict';\n\n function dict() {\n var obj = Object.create(null);\n obj['__'] = undefined;\n delete obj['__'];\n return obj;\n }\n\n // Save off the original values of these globals, so we can restore them if someone asks us to\n var oldGlobals = {\n loader: loader,\n define: define,\n requireModule: requireModule,\n require: require,\n requirejs: requirejs\n };\n\n requirejs = require = requireModule = function (id) {\n var pending = [];\n var mod = findModule(id, '(require)', pending);\n\n for (var i = pending.length - 1; i >= 0; i--) {\n pending[i].exports();\n }\n\n return mod.module.exports;\n };\n\n loader = {\n noConflict: function (aliases) {\n var oldName, newName;\n\n for (oldName in aliases) {\n if (aliases.hasOwnProperty(oldName)) {\n if (oldGlobals.hasOwnProperty(oldName)) {\n newName = aliases[oldName];\n\n global[newName] = global[oldName];\n global[oldName] = oldGlobals[oldName];\n }\n }\n }\n },\n // Option to enable or disable the generation of default exports\n makeDefaultExport: true\n };\n\n var registry = dict();\n var seen = dict();\n\n var uuid = 0;\n\n function unsupportedModule(length) {\n throw new Error('an unsupported module was defined, expected `define(id, deps, module)` instead got: `' + length + '` arguments to define`');\n }\n\n var defaultDeps = ['require', 'exports', 'module'];\n\n function Module(id, deps, callback, alias) {\n this.uuid = uuid++;\n this.id = id;\n this.deps = !deps.length && callback.length ? defaultDeps : deps;\n this.module = { exports: {} };\n this.callback = callback;\n this.hasExportsAsDep = false;\n this.isAlias = alias;\n this.reified = new Array(deps.length);\n\n /*\n Each module normally passes through these states, in order:\n new : initial state\n pending : this module is scheduled to be executed\n reifying : this module's dependencies are being executed\n reified : this module's dependencies finished executing successfully\n errored : this module's dependencies failed to execute\n finalized : this module executed successfully\n */\n this.state = 'new';\n }\n\n Module.prototype.makeDefaultExport = function () {\n var exports = this.module.exports;\n if (exports !== null && (typeof exports === 'object' || typeof exports === 'function') && exports['default'] === undefined && Object.isExtensible(exports)) {\n exports['default'] = exports;\n }\n };\n\n Module.prototype.exports = function () {\n // if finalized, there is no work to do. If reifying, there is a\n // circular dependency so we must return our (partial) exports.\n if (this.state === 'finalized' || this.state === 'reifying') {\n return this.module.exports;\n }\n\n\n if (loader.wrapModules) {\n this.callback = loader.wrapModules(this.id, this.callback);\n }\n\n this.reify();\n\n var result = this.callback.apply(this, this.reified);\n this.reified.length = 0;\n this.state = 'finalized';\n\n if (!(this.hasExportsAsDep && result === undefined)) {\n this.module.exports = result;\n }\n if (loader.makeDefaultExport) {\n this.makeDefaultExport();\n }\n return this.module.exports;\n };\n\n Module.prototype.unsee = function () {\n this.state = 'new';\n this.module = { exports: {} };\n };\n\n Module.prototype.reify = function () {\n if (this.state === 'reified') {\n return;\n }\n this.state = 'reifying';\n try {\n this.reified = this._reify();\n this.state = 'reified';\n } finally {\n if (this.state === 'reifying') {\n this.state = 'errored';\n }\n }\n };\n\n Module.prototype._reify = function () {\n var reified = this.reified.slice();\n for (var i = 0; i < reified.length; i++) {\n var mod = reified[i];\n reified[i] = mod.exports ? mod.exports : mod.module.exports();\n }\n return reified;\n };\n\n Module.prototype.findDeps = function (pending) {\n if (this.state !== 'new') {\n return;\n }\n\n this.state = 'pending';\n\n var deps = this.deps;\n\n for (var i = 0; i < deps.length; i++) {\n var dep = deps[i];\n var entry = this.reified[i] = { exports: undefined, module: undefined };\n if (dep === 'exports') {\n this.hasExportsAsDep = true;\n entry.exports = this.module.exports;\n } else if (dep === 'require') {\n entry.exports = this.makeRequire();\n } else if (dep === 'module') {\n entry.exports = this.module;\n } else {\n entry.module = findModule(resolve(dep, this.id), this.id, pending);\n }\n }\n };\n\n Module.prototype.makeRequire = function () {\n var id = this.id;\n var r = function (dep) {\n return require(resolve(dep, id));\n };\n r['default'] = r;\n r.moduleId = id;\n r.has = function (dep) {\n return has(resolve(dep, id));\n };\n return r;\n };\n\n define = function (id, deps, callback) {\n var module = registry[id];\n\n // If a module for this id has already been defined and is in any state\n // other than `new` (meaning it has been or is currently being required),\n // then we return early to avoid redefinition.\n if (module && module.state !== 'new') {\n return;\n }\n\n if (arguments.length < 2) {\n unsupportedModule(arguments.length);\n }\n\n if (!Array.isArray(deps)) {\n callback = deps;\n deps = [];\n }\n\n if (callback instanceof Alias) {\n registry[id] = new Module(callback.id, deps, callback, true);\n } else {\n registry[id] = new Module(id, deps, callback, false);\n }\n };\n\n define.exports = function (name, defaultExport) {\n var module = registry[name];\n\n // If a module for this name has already been defined and is in any state\n // other than `new` (meaning it has been or is currently being required),\n // then we return early to avoid redefinition.\n if (module && module.state !== 'new') {\n return;\n }\n\n module = new Module(name, [], noop, null);\n module.module.exports = defaultExport;\n module.state = 'finalized';\n registry[name] = module;\n\n return module;\n };\n\n function noop() {}\n // we don't support all of AMD\n // define.amd = {};\n\n function Alias(id) {\n this.id = id;\n }\n\n define.alias = function (id, target) {\n if (arguments.length === 2) {\n return define(target, new Alias(id));\n }\n\n return new Alias(id);\n };\n\n function missingModule(id, referrer) {\n throw new Error('Could not find module `' + id + '` imported from `' + referrer + '`');\n }\n\n function findModule(id, referrer, pending) {\n var mod = registry[id] || registry[id + '/index'];\n\n while (mod && mod.isAlias) {\n mod = registry[mod.id];\n }\n\n if (!mod) {\n missingModule(id, referrer);\n }\n\n if (pending && mod.state !== 'pending' && mod.state !== 'finalized') {\n mod.findDeps(pending);\n pending.push(mod);\n }\n return mod;\n }\n\n function resolve(child, id) {\n if (child.charAt(0) !== '.') {\n return child;\n }\n\n\n var parts = child.split('/');\n var nameParts = id.split('/');\n var parentBase = nameParts.slice(0, -1);\n\n for (var i = 0, l = parts.length; i < l; i++) {\n var part = parts[i];\n\n if (part === '..') {\n if (parentBase.length === 0) {\n throw new Error('Cannot access parent module of root');\n }\n parentBase.pop();\n } else if (part === '.') {\n continue;\n } else {\n parentBase.push(part);\n }\n }\n\n return parentBase.join('/');\n }\n\n function has(id) {\n return !!(registry[id] || registry[id + '/index']);\n }\n\n requirejs.entries = requirejs._eak_seen = registry;\n requirejs.has = has;\n requirejs.unsee = function (id) {\n findModule(id, '(unsee)', false).unsee();\n };\n\n requirejs.clear = function () {\n requirejs.entries = requirejs._eak_seen = registry = dict();\n seen = dict();\n };\n\n // This code primes the JS engine for good performance by warming the\n // JIT compiler for these functions.\n define('foo', function () {});\n define('foo/bar', [], function () {});\n define('foo/asdf', ['module', 'exports', 'require'], function (module, exports, require) {\n if (require.has('foo/bar')) {\n require('foo/bar');\n }\n });\n define('foo/baz', [], define.alias('foo'));\n define('foo/quz', define.alias('foo'));\n define.alias('foo', 'foo/qux');\n define('foo/bar', ['foo', './quz', './baz', './asdf', './bar', '../foo'], function () {});\n define('foo/main', ['foo/bar'], function () {});\n define.exports('foo/exports', {});\n\n require('foo/exports');\n require('foo/main');\n require.unsee('foo/bar');\n\n requirejs.clear();\n\n if (typeof exports === 'object' && typeof module === 'object' && module.exports) {\n module.exports = { require: require, define: define };\n }\n})(this);","define('ember-data/-debug', ['exports'], function (exports) {\n 'use strict';\n\n exports.__esModule = true;\n exports.instrument = instrument;\n function instrument(method) {\n return method();\n }\n\n /*\n Assert that `addedRecord` has a valid type so it can be added to the\n relationship of the `record`.\n \n The assert basically checks if the `addedRecord` can be added to the\n relationship (specified via `relationshipMeta`) of the `record`.\n \n This utility should only be used internally, as both record parameters must\n be an InternalModel and the `relationshipMeta` needs to be the meta\n information about the relationship, retrieved via\n `record.relationshipFor(key)`.\n \n @method assertPolymorphicType\n @param {InternalModel} internalModel\n @param {RelationshipMeta} relationshipMeta retrieved via\n `record.relationshipFor(key)`\n @param {InternalModel} addedRecord record which\n should be added/set for the relationship\n */\n var assertPolymorphicType = void 0;\n\n if (false) {\n var checkPolymorphic = function checkPolymorphic(modelClass, addedModelClass) {\n if (modelClass.__isMixin) {\n //TODO Need to do this in order to support mixins, should convert to public api\n //once it exists in Ember\n return modelClass.__mixin.detect(addedModelClass.PrototypeMixin);\n }\n if (Ember.MODEL_FACTORY_INJECTIONS) {\n modelClass = modelClass.superclass;\n }\n return modelClass.detect(addedModelClass);\n };\n\n exports.assertPolymorphicType = assertPolymorphicType = function assertPolymorphicType(parentInternalModel, relationshipMeta, addedInternalModel) {\n var addedModelName = addedInternalModel.modelName;\n var parentModelName = parentInternalModel.modelName;\n var key = relationshipMeta.key;\n var relationshipModelName = relationshipMeta.type;\n var relationshipClass = parentInternalModel.store.modelFor(relationshipModelName);\n var assertionMessage = 'You cannot add a record of modelClass \\'' + addedModelName + '\\' to the \\'' + parentModelName + '.' + key + '\\' relationship (only \\'' + relationshipModelName + '\\' allowed)';\n\n (false && Ember.assert(assertionMessage, checkPolymorphic(relationshipClass, addedInternalModel.modelClass)));\n };\n }\n\n exports.assertPolymorphicType = assertPolymorphicType;\n});","define('ember-data/-private/adapters/build-url-mixin', ['exports', 'ember-inflector'], function (exports, _emberInflector) {\n 'use strict';\n\n exports.__esModule = true;\n var camelize = Ember.String.camelize;\n var Mixin = Ember.Mixin;\n var get = Ember.get;\n exports.default = Mixin.create({\n /**\n Builds a URL for a given type and optional ID.\n By default, it pluralizes the type's name (for example, 'post'\n becomes 'posts' and 'person' becomes 'people'). To override the\n pluralization see [pathForType](#method_pathForType).\n If an ID is specified, it adds the ID to the path generated\n for the type, separated by a `/`.\n When called by RESTAdapter.findMany() the `id` and `snapshot` parameters\n will be arrays of ids and snapshots.\n @method buildURL\n @param {String} modelName\n @param {(String|Array|Object)} id single id or array of ids or query\n @param {(DS.Snapshot|Array)} snapshot single snapshot or array of snapshots\n @param {String} requestType\n @param {Object} query object of query parameters to send for query requests.\n @return {String} url\n */\n buildURL: function (modelName, id, snapshot, requestType, query) {\n switch (requestType) {\n case 'findRecord':\n return this.urlForFindRecord(id, modelName, snapshot);\n case 'findAll':\n return this.urlForFindAll(modelName, snapshot);\n case 'query':\n return this.urlForQuery(query, modelName);\n case 'queryRecord':\n return this.urlForQueryRecord(query, modelName);\n case 'findMany':\n return this.urlForFindMany(id, modelName, snapshot);\n case 'findHasMany':\n return this.urlForFindHasMany(id, modelName, snapshot);\n case 'findBelongsTo':\n return this.urlForFindBelongsTo(id, modelName, snapshot);\n case 'createRecord':\n return this.urlForCreateRecord(modelName, snapshot);\n case 'updateRecord':\n return this.urlForUpdateRecord(id, modelName, snapshot);\n case 'deleteRecord':\n return this.urlForDeleteRecord(id, modelName, snapshot);\n default:\n return this._buildURL(modelName, id);\n }\n },\n\n\n /**\n @method _buildURL\n @private\n @param {String} modelName\n @param {String} id\n @return {String} url\n */\n _buildURL: function (modelName, id) {\n var path = void 0;\n var url = [];\n var host = get(this, 'host');\n var prefix = this.urlPrefix();\n\n if (modelName) {\n path = this.pathForType(modelName);\n if (path) {\n url.push(path);\n }\n }\n\n if (id) {\n url.push(encodeURIComponent(id));\n }\n if (prefix) {\n url.unshift(prefix);\n }\n\n url = url.join('/');\n if (!host && url && url.charAt(0) !== '/') {\n url = '/' + url;\n }\n\n return url;\n },\n\n\n /**\n Builds a URL for a `store.findRecord(type, id)` call.\n Example:\n ```app/adapters/user.js\n import DS from 'ember-data';\n export default DS.JSONAPIAdapter.extend({\n urlForFindRecord(id, modelName, snapshot) {\n let baseUrl = this.buildURL(modelName, id, snapshot);\n return `${baseUrl}/users/${snapshot.adapterOptions.user_id}/playlists/${id}`;\n }\n });\n ```\n @method urlForFindRecord\n @param {String} id\n @param {String} modelName\n @param {DS.Snapshot} snapshot\n @return {String} url\n */\n urlForFindRecord: function (id, modelName, snapshot) {\n return this._buildURL(modelName, id);\n },\n\n\n /**\n Builds a URL for a `store.findAll(type)` call.\n Example:\n ```app/adapters/comment.js\n import DS from 'ember-data';\n export default DS.JSONAPIAdapter.extend({\n urlForFindAll(modelName, snapshot) {\n return 'data/comments.json';\n }\n });\n ```\n @method urlForFindAll\n @param {String} modelName\n @param {DS.SnapshotRecordArray} snapshot\n @return {String} url\n */\n urlForFindAll: function (modelName, snapshot) {\n return this._buildURL(modelName);\n },\n\n\n /**\n Builds a URL for a `store.query(type, query)` call.\n Example:\n ```app/adapters/application.js\n import DS from 'ember-data';\n export default DS.RESTAdapter.extend({\n host: 'https://api.github.com',\n urlForQuery (query, modelName) {\n switch(modelName) {\n case 'repo':\n return `https://api.github.com/orgs/${query.orgId}/repos`;\n default:\n return this._super(...arguments);\n }\n }\n });\n ```\n @method urlForQuery\n @param {Object} query\n @param {String} modelName\n @return {String} url\n */\n urlForQuery: function (query, modelName) {\n return this._buildURL(modelName);\n },\n\n\n /**\n Builds a URL for a `store.queryRecord(type, query)` call.\n Example:\n ```app/adapters/application.js\n import DS from 'ember-data';\n export default DS.RESTAdapter.extend({\n urlForQueryRecord({ slug }, modelName) {\n let baseUrl = this.buildURL();\n return `${baseUrl}/${encodeURIComponent(slug)}`;\n }\n });\n ```\n @method urlForQueryRecord\n @param {Object} query\n @param {String} modelName\n @return {String} url\n */\n urlForQueryRecord: function (query, modelName) {\n return this._buildURL(modelName);\n },\n\n\n /**\n Builds a URL for coalesceing multiple `store.findRecord(type, id)`\n records into 1 request when the adapter's `coalesceFindRequests`\n property is true.\n Example:\n ```app/adapters/application.js\n import DS from 'ember-data';\n export default DS.RESTAdapter.extend({\n urlForFindMany(ids, modelName) {\n let baseUrl = this.buildURL();\n return `${baseUrl}/coalesce`;\n }\n });\n ```\n @method urlForFindMany\n @param {Array} ids\n @param {String} modelName\n @param {Array} snapshots\n @return {String} url\n */\n urlForFindMany: function (ids, modelName, snapshots) {\n return this._buildURL(modelName);\n },\n\n\n /**\n Builds a URL for fetching a async hasMany relationship when a url\n is not provided by the server.\n Example:\n ```app/adapters/application.js\n import DS from 'ember-data';\n export default DS.JSONAPIAdapter.extend({\n urlForFindHasMany(id, modelName, snapshot) {\n let baseUrl = this.buildURL(id, modelName);\n return `${baseUrl}/relationships`;\n }\n });\n ```\n @method urlForFindHasMany\n @param {String} id\n @param {String} modelName\n @param {DS.Snapshot} snapshot\n @return {String} url\n */\n urlForFindHasMany: function (id, modelName, snapshot) {\n return this._buildURL(modelName, id);\n },\n\n\n /**\n Builds a URL for fetching a async belongsTo relationship when a url\n is not provided by the server.\n Example:\n ```app/adapters/application.js\n import DS from 'ember-data';\n export default DS.JSONAPIAdapter.extend({\n urlForFindBelongsTo(id, modelName, snapshot) {\n let baseUrl = this.buildURL(id, modelName);\n return `${baseUrl}/relationships`;\n }\n });\n ```\n @method urlForFindBelongsTo\n @param {String} id\n @param {String} modelName\n @param {DS.Snapshot} snapshot\n @return {String} url\n */\n urlForFindBelongsTo: function (id, modelName, snapshot) {\n return this._buildURL(modelName, id);\n },\n\n\n /**\n Builds a URL for a `record.save()` call when the record was created\n locally using `store.createRecord()`.\n Example:\n ```app/adapters/application.js\n import DS from 'ember-data';\n export default DS.RESTAdapter.extend({\n urlForCreateRecord(modelName, snapshot) {\n return this._super(...arguments) + '/new';\n }\n });\n ```\n @method urlForCreateRecord\n @param {String} modelName\n @param {DS.Snapshot} snapshot\n @return {String} url\n */\n urlForCreateRecord: function (modelName, snapshot) {\n return this._buildURL(modelName);\n },\n\n\n /**\n Builds a URL for a `record.save()` call when the record has been update locally.\n Example:\n ```app/adapters/application.js\n import DS from 'ember-data';\n export default DS.RESTAdapter.extend({\n urlForUpdateRecord(id, modelName, snapshot) {\n return `/${id}/feed?access_token=${snapshot.adapterOptions.token}`;\n }\n });\n ```\n @method urlForUpdateRecord\n @param {String} id\n @param {String} modelName\n @param {DS.Snapshot} snapshot\n @return {String} url\n */\n urlForUpdateRecord: function (id, modelName, snapshot) {\n return this._buildURL(modelName, id);\n },\n\n\n /**\n Builds a URL for a `record.save()` call when the record has been deleted locally.\n Example:\n ```app/adapters/application.js\n import DS from 'ember-data';\n export default DS.RESTAdapter.extend({\n urlForDeleteRecord(id, modelName, snapshot) {\n return this._super(...arguments) + '/destroy';\n }\n });\n ```\n @method urlForDeleteRecord\n @param {String} id\n @param {String} modelName\n @param {DS.Snapshot} snapshot\n @return {String} url\n */\n urlForDeleteRecord: function (id, modelName, snapshot) {\n return this._buildURL(modelName, id);\n },\n\n\n /**\n @method urlPrefix\n @private\n @param {String} path\n @param {String} parentURL\n @return {String} urlPrefix\n */\n urlPrefix: function (path, parentURL) {\n var host = get(this, 'host');\n var namespace = get(this, 'namespace');\n\n if (!host || host === '/') {\n host = '';\n }\n\n if (path) {\n // Protocol relative url\n if (/^\\/\\//.test(path) || /http(s)?:\\/\\//.test(path)) {\n // Do nothing, the full host is already included.\n return path;\n\n // Absolute path\n } else if (path.charAt(0) === '/') {\n return '' + host + path;\n // Relative path\n } else {\n return parentURL + '/' + path;\n }\n }\n\n // No path provided\n var url = [];\n if (host) {\n url.push(host);\n }\n if (namespace) {\n url.push(namespace);\n }\n return url.join('/');\n },\n\n\n /**\n Determines the pathname for a given type.\n By default, it pluralizes the type's name (for example,\n 'post' becomes 'posts' and 'person' becomes 'people').\n ### Pathname customization\n For example if you have an object LineItem with an\n endpoint of \"/line_items/\".\n ```app/adapters/application.js\n import DS from 'ember-data';\n import { decamelize } from '@ember/string';\n import { pluralize } from 'ember-inflector';\n export default DS.RESTAdapter.extend({\n pathForType: function(modelName) {\n var decamelized = decamelize(modelName);\n return pluralize(decamelized);\n }\n });\n ```\n @method pathForType\n @param {String} modelName\n @return {String} path\n **/\n pathForType: function (modelName) {\n var camelized = camelize(modelName);\n return (0, _emberInflector.pluralize)(camelized);\n }\n });\n});","define('ember-data/-private/adapters/errors', ['exports'], function (exports) {\n 'use strict';\n\n exports.__esModule = true;\n exports.AdapterError = AdapterError;\n exports.errorsHashToArray = errorsHashToArray;\n exports.errorsArrayToHash = errorsArrayToHash;\n var makeArray = Ember.makeArray;\n var isPresent = Ember.isPresent;\n var EmberError = Ember.Error;\n\n\n var SOURCE_POINTER_REGEXP = /^\\/?data\\/(attributes|relationships)\\/(.*)/;\n var SOURCE_POINTER_PRIMARY_REGEXP = /^\\/?data/;\n var PRIMARY_ATTRIBUTE_KEY = 'base';\n\n /**\n A `DS.AdapterError` is used by an adapter to signal that an error occurred\n during a request to an external API. It indicates a generic error, and\n subclasses are used to indicate specific error states. The following\n subclasses are provided:\n \n - `DS.InvalidError`\n - `DS.TimeoutError`\n - `DS.AbortError`\n - `DS.UnauthorizedError`\n - `DS.ForbiddenError`\n - `DS.NotFoundError`\n - `DS.ConflictError`\n - `DS.ServerError`\n \n To create a custom error to signal a specific error state in communicating\n with an external API, extend the `DS.AdapterError`. For example if the\n external API exclusively used HTTP `503 Service Unavailable` to indicate\n it was closed for maintenance:\n \n ```app/adapters/maintenance-error.js\n import DS from 'ember-data';\n \n export default DS.AdapterError.extend({ message: \"Down for maintenance.\" });\n ```\n \n This error would then be returned by an adapter's `handleResponse` method:\n \n ```app/adapters/application.js\n import DS from 'ember-data';\n import MaintenanceError from './maintenance-error';\n \n export default DS.JSONAPIAdapter.extend({\n handleResponse(status) {\n if (503 === status) {\n return new MaintenanceError();\n }\n \n return this._super(...arguments);\n }\n });\n ```\n \n And can then be detected in an application and used to send the user to an\n `under-maintenance` route:\n \n ```app/routes/application.js\n import Route from '@ember/routing/route';\n import MaintenanceError from '../adapters/maintenance-error';\n \n export default Route.extend({\n actions: {\n error(error, transition) {\n if (error instanceof MaintenanceError) {\n this.transitionTo('under-maintenance');\n return;\n }\n \n // ...other error handling logic\n }\n }\n });\n ```\n \n @class AdapterError\n @namespace DS\n */\n function AdapterError(errors) {\n var message = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'Adapter operation failed';\n\n this.isAdapterError = true;\n EmberError.call(this, message);\n\n this.errors = errors || [{\n title: 'Adapter Error',\n detail: message\n }];\n }\n\n function extendFn(ErrorClass) {\n return function () {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n defaultMessage = _ref.message;\n\n return extend(ErrorClass, defaultMessage);\n };\n }\n\n function extend(ParentErrorClass, defaultMessage) {\n var ErrorClass = function (errors, message) {\n (false && Ember.assert('`AdapterError` expects json-api formatted errors array.', Array.isArray(errors || [])));\n\n ParentErrorClass.call(this, errors, message || defaultMessage);\n };\n ErrorClass.prototype = Object.create(ParentErrorClass.prototype);\n ErrorClass.extend = extendFn(ErrorClass);\n\n return ErrorClass;\n }\n\n AdapterError.prototype = Object.create(EmberError.prototype);\n\n AdapterError.extend = extendFn(AdapterError);\n\n /**\n A `DS.InvalidError` is used by an adapter to signal the external API\n was unable to process a request because the content was not\n semantically correct or meaningful per the API. Usually this means a\n record failed some form of server side validation. When a promise\n from an adapter is rejected with a `DS.InvalidError` the record will\n transition to the `invalid` state and the errors will be set to the\n `errors` property on the record.\n \n For Ember Data to correctly map errors to their corresponding\n properties on the model, Ember Data expects each error to be\n a valid json-api error object with a `source/pointer` that matches\n the property name. For example if you had a Post model that\n looked like this.\n \n ```app/models/post.js\n import DS from 'ember-data';\n \n export default DS.Model.extend({\n title: DS.attr('string'),\n content: DS.attr('string')\n });\n ```\n \n To show an error from the server related to the `title` and\n `content` properties your adapter could return a promise that\n rejects with a `DS.InvalidError` object that looks like this:\n \n ```app/adapters/post.js\n import RSVP from 'RSVP';\n import DS from 'ember-data';\n \n export default DS.RESTAdapter.extend({\n updateRecord() {\n // Fictional adapter that always rejects\n return RSVP.reject(new DS.InvalidError([\n {\n detail: 'Must be unique',\n source: { pointer: '/data/attributes/title' }\n },\n {\n detail: 'Must not be blank',\n source: { pointer: '/data/attributes/content'}\n }\n ]));\n }\n });\n ```\n \n Your backend may use different property names for your records the\n store will attempt extract and normalize the errors using the\n serializer's `extractErrors` method before the errors get added to\n the the model. As a result, it is safe for the `InvalidError` to\n wrap the error payload unaltered.\n \n @class InvalidError\n @namespace DS\n */\n var InvalidError = exports.InvalidError = extend(AdapterError, 'The adapter rejected the commit because it was invalid');\n\n /**\n A `DS.TimeoutError` is used by an adapter to signal that a request\n to the external API has timed out. I.e. no response was received from\n the external API within an allowed time period.\n \n An example use case would be to warn the user to check their internet\n connection if an adapter operation has timed out:\n \n ```app/routes/application.js\n import Route from '@ember/routing/route';\n import DS from 'ember-data';\n \n const { TimeoutError } = DS;\n \n export default Route.extend({\n actions: {\n error(error, transition) {\n if (error instanceof TimeoutError) {\n // alert the user\n alert('Are you still connected to the internet?');\n return;\n }\n \n // ...other error handling logic\n }\n }\n });\n ```\n \n @class TimeoutError\n @namespace DS\n */\n var TimeoutError = exports.TimeoutError = extend(AdapterError, 'The adapter operation timed out');\n\n /**\n A `DS.AbortError` is used by an adapter to signal that a request to\n the external API was aborted. For example, this can occur if the user\n navigates away from the current page after a request to the external API\n has been initiated but before a response has been received.\n \n @class AbortError\n @namespace DS\n */\n var AbortError = exports.AbortError = extend(AdapterError, 'The adapter operation was aborted');\n\n /**\n A `DS.UnauthorizedError` equates to a HTTP `401 Unauthorized` response\n status. It is used by an adapter to signal that a request to the external\n API was rejected because authorization is required and has failed or has not\n yet been provided.\n \n An example use case would be to redirect the user to a log in route if a\n request is unauthorized:\n \n ```app/routes/application.js\n import Route from '@ember/routing/route';\n import DS from 'ember-data';\n \n const { UnauthorizedError } = DS;\n \n export default Route.extend({\n actions: {\n error(error, transition) {\n if (error instanceof UnauthorizedError) {\n // go to the sign in route\n this.transitionTo('login');\n return;\n }\n \n // ...other error handling logic\n }\n }\n });\n ```\n \n @class UnauthorizedError\n @namespace DS\n */\n var UnauthorizedError = exports.UnauthorizedError = extend(AdapterError, 'The adapter operation is unauthorized');\n\n /**\n A `DS.ForbiddenError` equates to a HTTP `403 Forbidden` response status.\n It is used by an adapter to signal that a request to the external API was\n valid but the server is refusing to respond to it. If authorization was\n provided and is valid, then the authenticated user does not have the\n necessary permissions for the request.\n \n @class ForbiddenError\n @namespace DS\n */\n var ForbiddenError = exports.ForbiddenError = extend(AdapterError, 'The adapter operation is forbidden');\n\n /**\n A `DS.NotFoundError` equates to a HTTP `404 Not Found` response status.\n It is used by an adapter to signal that a request to the external API\n was rejected because the resource could not be found on the API.\n \n An example use case would be to detect if the user has entered a route\n for a specific model that does not exist. For example:\n \n ```app/routes/post.js\n import Route from '@ember/routing/route';\n import DS from 'ember-data';\n \n const { NotFoundError } = DS;\n \n export default Route.extend({\n model(params) {\n return this.get('store').findRecord('post', params.post_id);\n },\n \n actions: {\n error(error, transition) {\n if (error instanceof NotFoundError) {\n // redirect to a list of all posts instead\n this.transitionTo('posts');\n } else {\n // otherwise let the error bubble\n return true;\n }\n }\n }\n });\n ```\n \n @class NotFoundError\n @namespace DS\n */\n var NotFoundError = exports.NotFoundError = extend(AdapterError, 'The adapter could not find the resource');\n\n /**\n A `DS.ConflictError` equates to a HTTP `409 Conflict` response status.\n It is used by an adapter to indicate that the request could not be processed\n because of a conflict in the request. An example scenario would be when\n creating a record with a client generated id but that id is already known\n to the external API.\n \n @class ConflictError\n @namespace DS\n */\n var ConflictError = exports.ConflictError = extend(AdapterError, 'The adapter operation failed due to a conflict');\n\n /**\n A `DS.ServerError` equates to a HTTP `500 Internal Server Error` response\n status. It is used by the adapter to indicate that a request has failed\n because of an error in the external API.\n \n @class ServerError\n @namespace DS\n */\n var ServerError = exports.ServerError = extend(AdapterError, 'The adapter operation failed due to a server error');\n\n /**\n Convert an hash of errors into an array with errors in JSON-API format.\n \n ```javascript\n import DS from 'ember-data';\n \n const { errorsHashToArray } = DS;\n \n let errors = {\n base: 'Invalid attributes on saving this record',\n name: 'Must be present',\n age: ['Must be present', 'Must be a number']\n };\n \n let errorsArray = errorsHashToArray(errors);\n // [\n // {\n // title: \"Invalid Document\",\n // detail: \"Invalid attributes on saving this record\",\n // source: { pointer: \"/data\" }\n // },\n // {\n // title: \"Invalid Attribute\",\n // detail: \"Must be present\",\n // source: { pointer: \"/data/attributes/name\" }\n // },\n // {\n // title: \"Invalid Attribute\",\n // detail: \"Must be present\",\n // source: { pointer: \"/data/attributes/age\" }\n // },\n // {\n // title: \"Invalid Attribute\",\n // detail: \"Must be a number\",\n // source: { pointer: \"/data/attributes/age\" }\n // }\n // ]\n ```\n \n @method errorsHashToArray\n @public\n @namespace\n @for DS\n @param {Object} errors hash with errors as properties\n @return {Array} array of errors in JSON-API format\n */\n function errorsHashToArray(errors) {\n var out = [];\n\n if (isPresent(errors)) {\n Object.keys(errors).forEach(function (key) {\n var messages = makeArray(errors[key]);\n for (var i = 0; i < messages.length; i++) {\n var title = 'Invalid Attribute';\n var pointer = '/data/attributes/' + key;\n if (key === PRIMARY_ATTRIBUTE_KEY) {\n title = 'Invalid Document';\n pointer = '/data';\n }\n out.push({\n title: title,\n detail: messages[i],\n source: {\n pointer: pointer\n }\n });\n }\n });\n }\n\n return out;\n }\n\n /**\n Convert an array of errors in JSON-API format into an object.\n \n ```javascript\n import DS from 'ember-data';\n \n const { errorsArrayToHash } = DS;\n \n let errorsArray = [\n {\n title: 'Invalid Attribute',\n detail: 'Must be present',\n source: { pointer: '/data/attributes/name' }\n },\n {\n title: 'Invalid Attribute',\n detail: 'Must be present',\n source: { pointer: '/data/attributes/age' }\n },\n {\n title: 'Invalid Attribute',\n detail: 'Must be a number',\n source: { pointer: '/data/attributes/age' }\n }\n ];\n \n let errors = errorsArrayToHash(errorsArray);\n // {\n // \"name\": [\"Must be present\"],\n // \"age\": [\"Must be present\", \"must be a number\"]\n // }\n ```\n \n @method errorsArrayToHash\n @public\n @namespace\n @for DS\n @param {Array} errors array of errors in JSON-API format\n @return {Object}\n */\n function errorsArrayToHash(errors) {\n var out = {};\n\n if (isPresent(errors)) {\n errors.forEach(function (error) {\n if (error.source && error.source.pointer) {\n var key = error.source.pointer.match(SOURCE_POINTER_REGEXP);\n\n if (key) {\n key = key[2];\n } else if (error.source.pointer.search(SOURCE_POINTER_PRIMARY_REGEXP) !== -1) {\n key = PRIMARY_ATTRIBUTE_KEY;\n }\n\n if (key) {\n out[key] = out[key] || [];\n out[key].push(error.detail || error.title);\n }\n }\n });\n }\n\n return out;\n }\n});","define('ember-data/-private/core', ['exports', 'ember-data/version'], function (exports, _version) {\n 'use strict';\n\n exports.__esModule = true;\n\n\n /**\n @module ember-data\n */\n\n /**\n All Ember Data classes, methods and functions are defined inside of this namespace.\n \n @class DS\n @static\n */\n\n /**\n @property VERSION\n @type String\n @static\n */\n var DS = Ember.Namespace.create({\n VERSION: _version.default,\n name: \"DS\"\n });\n\n if (Ember.libraries) {\n Ember.libraries.registerCoreLibrary('Ember Data', DS.VERSION);\n }\n\n exports.default = DS;\n});","define('ember-data/-private/features', ['exports'], function (exports) {\n 'use strict';\n\n exports.__esModule = true;\n exports.default = isEnabled;\n function isEnabled() {\n var _Ember$FEATURES;\n\n return (_Ember$FEATURES = Ember.FEATURES).isEnabled.apply(_Ember$FEATURES, arguments);\n }\n});","define('ember-data/-private', ['exports', 'ember-data/-private/system/model/model', 'ember-data/-private/system/model/errors', 'ember-data/-private/system/store', 'ember-data/-private/core', 'ember-data/-private/system/relationships/belongs-to', 'ember-data/-private/system/relationships/has-many', 'ember-data/-private/adapters/build-url-mixin', 'ember-data/-private/system/snapshot', 'ember-data/-private/adapters/errors', 'ember-data/-private/system/normalize-model-name', 'ember-data/-private/utils', 'ember-data/-private/system/coerce-id', 'ember-data/-private/utils/parse-response-headers', 'ember-data/-private/features', 'ember-data/-private/system/model/states', 'ember-data/-private/system/model/internal-model', 'ember-data/-private/system/promise-proxies', 'ember-data/-private/system/record-arrays', 'ember-data/-private/system/many-array', 'ember-data/-private/system/record-array-manager', 'ember-data/-private/system/relationships/state/relationship', 'ember-data/-private/system/debug/debug-adapter', 'ember-data/-private/system/diff-array', 'ember-data/-private/system/relationships/relationship-payloads-manager', 'ember-data/-private/system/relationships/relationship-payloads', 'ember-data/-private/system/snapshot-record-array'], function (exports, _model, _errors, _store, _core, _belongsTo, _hasMany, _buildUrlMixin, _snapshot, _errors2, _normalizeModelName, _utils, _coerceId, _parseResponseHeaders, _features, _states, _internalModel, _promiseProxies, _recordArrays, _manyArray, _recordArrayManager, _relationship, _debugAdapter, _diffArray, _relationshipPayloadsManager, _relationshipPayloads, _snapshotRecordArray) {\n 'use strict';\n\n exports.__esModule = true;\n Object.defineProperty(exports, 'Model', {\n enumerable: true,\n get: function () {\n return _model.default;\n }\n });\n Object.defineProperty(exports, 'Errors', {\n enumerable: true,\n get: function () {\n return _errors.default;\n }\n });\n Object.defineProperty(exports, 'Store', {\n enumerable: true,\n get: function () {\n return _store.default;\n }\n });\n Object.defineProperty(exports, 'DS', {\n enumerable: true,\n get: function () {\n return _core.default;\n }\n });\n Object.defineProperty(exports, 'belongsTo', {\n enumerable: true,\n get: function () {\n return _belongsTo.default;\n }\n });\n Object.defineProperty(exports, 'hasMany', {\n enumerable: true,\n get: function () {\n return _hasMany.default;\n }\n });\n Object.defineProperty(exports, 'BuildURLMixin', {\n enumerable: true,\n get: function () {\n return _buildUrlMixin.default;\n }\n });\n Object.defineProperty(exports, 'Snapshot', {\n enumerable: true,\n get: function () {\n return _snapshot.default;\n }\n });\n Object.defineProperty(exports, 'AdapterError', {\n enumerable: true,\n get: function () {\n return _errors2.AdapterError;\n }\n });\n Object.defineProperty(exports, 'InvalidError', {\n enumerable: true,\n get: function () {\n return _errors2.InvalidError;\n }\n });\n Object.defineProperty(exports, 'UnauthorizedError', {\n enumerable: true,\n get: function () {\n return _errors2.UnauthorizedError;\n }\n });\n Object.defineProperty(exports, 'ForbiddenError', {\n enumerable: true,\n get: function () {\n return _errors2.ForbiddenError;\n }\n });\n Object.defineProperty(exports, 'NotFoundError', {\n enumerable: true,\n get: function () {\n return _errors2.NotFoundError;\n }\n });\n Object.defineProperty(exports, 'ConflictError', {\n enumerable: true,\n get: function () {\n return _errors2.ConflictError;\n }\n });\n Object.defineProperty(exports, 'ServerError', {\n enumerable: true,\n get: function () {\n return _errors2.ServerError;\n }\n });\n Object.defineProperty(exports, 'TimeoutError', {\n enumerable: true,\n get: function () {\n return _errors2.TimeoutError;\n }\n });\n Object.defineProperty(exports, 'AbortError', {\n enumerable: true,\n get: function () {\n return _errors2.AbortError;\n }\n });\n Object.defineProperty(exports, 'errorsHashToArray', {\n enumerable: true,\n get: function () {\n return _errors2.errorsHashToArray;\n }\n });\n Object.defineProperty(exports, 'errorsArrayToHash', {\n enumerable: true,\n get: function () {\n return _errors2.errorsArrayToHash;\n }\n });\n Object.defineProperty(exports, 'normalizeModelName', {\n enumerable: true,\n get: function () {\n return _normalizeModelName.default;\n }\n });\n Object.defineProperty(exports, 'getOwner', {\n enumerable: true,\n get: function () {\n return _utils.getOwner;\n }\n });\n Object.defineProperty(exports, 'modelHasAttributeOrRelationshipNamedType', {\n enumerable: true,\n get: function () {\n return _utils.modelHasAttributeOrRelationshipNamedType;\n }\n });\n Object.defineProperty(exports, 'coerceId', {\n enumerable: true,\n get: function () {\n return _coerceId.default;\n }\n });\n Object.defineProperty(exports, 'parseResponseHeaders', {\n enumerable: true,\n get: function () {\n return _parseResponseHeaders.default;\n }\n });\n Object.defineProperty(exports, 'isEnabled', {\n enumerable: true,\n get: function () {\n return _features.default;\n }\n });\n Object.defineProperty(exports, 'RootState', {\n enumerable: true,\n get: function () {\n return _states.default;\n }\n });\n Object.defineProperty(exports, 'InternalModel', {\n enumerable: true,\n get: function () {\n return _internalModel.default;\n }\n });\n Object.defineProperty(exports, 'PromiseArray', {\n enumerable: true,\n get: function () {\n return _promiseProxies.PromiseArray;\n }\n });\n Object.defineProperty(exports, 'PromiseObject', {\n enumerable: true,\n get: function () {\n return _promiseProxies.PromiseObject;\n }\n });\n Object.defineProperty(exports, 'PromiseManyArray', {\n enumerable: true,\n get: function () {\n return _promiseProxies.PromiseManyArray;\n }\n });\n Object.defineProperty(exports, 'RecordArray', {\n enumerable: true,\n get: function () {\n return _recordArrays.RecordArray;\n }\n });\n Object.defineProperty(exports, 'FilteredRecordArray', {\n enumerable: true,\n get: function () {\n return _recordArrays.FilteredRecordArray;\n }\n });\n Object.defineProperty(exports, 'AdapterPopulatedRecordArray', {\n enumerable: true,\n get: function () {\n return _recordArrays.AdapterPopulatedRecordArray;\n }\n });\n Object.defineProperty(exports, 'ManyArray', {\n enumerable: true,\n get: function () {\n return _manyArray.default;\n }\n });\n Object.defineProperty(exports, 'RecordArrayManager', {\n enumerable: true,\n get: function () {\n return _recordArrayManager.default;\n }\n });\n Object.defineProperty(exports, 'Relationship', {\n enumerable: true,\n get: function () {\n return _relationship.default;\n }\n });\n Object.defineProperty(exports, 'DebugAdapter', {\n enumerable: true,\n get: function () {\n return _debugAdapter.default;\n }\n });\n Object.defineProperty(exports, 'diffArray', {\n enumerable: true,\n get: function () {\n return _diffArray.default;\n }\n });\n Object.defineProperty(exports, 'RelationshipPayloadsManager', {\n enumerable: true,\n get: function () {\n return _relationshipPayloadsManager.default;\n }\n });\n Object.defineProperty(exports, 'RelationshipPayloads', {\n enumerable: true,\n get: function () {\n return _relationshipPayloads.default;\n }\n });\n Object.defineProperty(exports, 'SnapshotRecordArray', {\n enumerable: true,\n get: function () {\n return _snapshotRecordArray.default;\n }\n });\n});","define(\"ember-data/-private/system/clone-null\", [\"exports\"], function (exports) {\n \"use strict\";\n\n exports.__esModule = true;\n exports.default = cloneNull;\n function cloneNull(source) {\n var clone = Object.create(null);\n for (var key in source) {\n clone[key] = source[key];\n }\n return clone;\n }\n});","define('ember-data/-private/system/coerce-id', ['exports'], function (exports) {\n 'use strict';\n\n exports.__esModule = true;\n exports.default = coerceId;\n // Used by the store to normalize IDs entering the store. Despite the fact\n // that developers may provide IDs as numbers (e.g., `store.findRecord('person', 1)`),\n // it is important that internally we use strings, since IDs may be serialized\n // and lose type information. For example, Ember's router may put a record's\n // ID into the URL, and if we later try to deserialize that URL and find the\n // corresponding record, we will not know if it is a string or a number.\n function coerceId(id) {\n if (id === null || id === undefined || id === '') {\n return null;\n }\n if (typeof id === 'string') {\n return id;\n }\n return '' + id;\n }\n});","define('ember-data/-private/system/debug/debug-adapter', ['exports', 'ember-data/-private/system/model/model'], function (exports, _model) {\n 'use strict';\n\n exports.__esModule = true;\n var addObserver = Ember.addObserver;\n var removeObserver = Ember.removeObserver;\n var A = Ember.A;\n var DataAdapter = Ember.DataAdapter;\n var capitalize = Ember.String.capitalize;\n var underscore = Ember.String.underscore;\n var get = Ember.get;\n exports.default = DataAdapter.extend({\n getFilters: function () {\n return [{ name: 'isNew', desc: 'New' }, { name: 'isModified', desc: 'Modified' }, { name: 'isClean', desc: 'Clean' }];\n },\n detect: function (typeClass) {\n return typeClass !== _model.default && _model.default.detect(typeClass);\n },\n columnsForType: function (typeClass) {\n var columns = [{\n name: 'id',\n desc: 'Id'\n }];\n var count = 0;\n var self = this;\n get(typeClass, 'attributes').forEach(function (meta, name) {\n if (count++ > self.attributeLimit) {\n return false;\n }\n var desc = capitalize(underscore(name).replace('_', ' '));\n columns.push({ name: name, desc: desc });\n });\n return columns;\n },\n getRecords: function (modelClass, modelName) {\n if (arguments.length < 2) {\n // Legacy Ember.js < 1.13 support\n var containerKey = modelClass._debugContainerKey;\n if (containerKey) {\n var match = containerKey.match(/model:(.*)/);\n if (match !== null) {\n modelName = match[1];\n }\n }\n }\n (false && Ember.assert(\"Cannot find model name. Please upgrade to Ember.js >= 1.13 for Ember Inspector support\", !!modelName));\n\n return this.get('store').peekAll(modelName);\n },\n getRecordColumnValues: function (record) {\n var _this = this;\n\n var count = 0;\n var columnValues = { id: get(record, 'id') };\n\n record.eachAttribute(function (key) {\n if (count++ > _this.attributeLimit) {\n return false;\n }\n columnValues[key] = get(record, key);\n });\n return columnValues;\n },\n getRecordKeywords: function (record) {\n var keywords = [];\n var keys = A(['id']);\n record.eachAttribute(function (key) {\n return keys.push(key);\n });\n keys.forEach(function (key) {\n return keywords.push(get(record, key));\n });\n return keywords;\n },\n getRecordFilterValues: function (record) {\n return {\n isNew: record.get('isNew'),\n isModified: record.get('hasDirtyAttributes') && !record.get('isNew'),\n isClean: !record.get('hasDirtyAttributes')\n };\n },\n getRecordColor: function (record) {\n var color = 'black';\n if (record.get('isNew')) {\n color = 'green';\n } else if (record.get('hasDirtyAttributes')) {\n color = 'blue';\n }\n return color;\n },\n observeRecord: function (record, recordUpdated) {\n var releaseMethods = A();\n var keysToObserve = A(['id', 'isNew', 'hasDirtyAttributes']);\n\n record.eachAttribute(function (key) {\n return keysToObserve.push(key);\n });\n var adapter = this;\n\n keysToObserve.forEach(function (key) {\n var handler = function () {\n recordUpdated(adapter.wrapRecord(record));\n };\n addObserver(record, key, handler);\n releaseMethods.push(function () {\n removeObserver(record, key, handler);\n });\n });\n\n var release = function () {\n releaseMethods.forEach(function (fn) {\n return fn();\n });\n };\n\n return release;\n }\n });\n});","define(\"ember-data/-private/system/diff-array\", [\"exports\"], function (exports) {\n \"use strict\";\n\n exports.__esModule = true;\n exports.default = diffArray;\n /**\n @namespace\n @method diffArray\n @private\n @param {Array} oldArray the old array\n @param {Array} newArray the new array\n @return {hash} {\n firstChangeIndex: <integer>, // null if no change\n addedCount: <integer>, // 0 if no change\n removedCount: <integer> // 0 if no change\n }\n */\n function diffArray(oldArray, newArray) {\n var oldLength = oldArray.length;\n var newLength = newArray.length;\n\n var shortestLength = Math.min(oldLength, newLength);\n var firstChangeIndex = null; // null signifies no changes\n\n // find the first change\n for (var i = 0; i < shortestLength; i++) {\n // compare each item in the array\n if (oldArray[i] !== newArray[i]) {\n firstChangeIndex = i;\n break;\n }\n }\n\n if (firstChangeIndex === null && newLength !== oldLength) {\n // no change found in the overlapping block\n // and array lengths differ,\n // so change starts at end of overlap\n firstChangeIndex = shortestLength;\n }\n\n var addedCount = 0;\n var removedCount = 0;\n if (firstChangeIndex !== null) {\n // we found a change, find the end of the change\n var unchangedEndBlockLength = shortestLength - firstChangeIndex;\n // walk back from the end of both arrays until we find a change\n for (var _i = 1; _i <= shortestLength; _i++) {\n // compare each item in the array\n if (oldArray[oldLength - _i] !== newArray[newLength - _i]) {\n unchangedEndBlockLength = _i - 1;\n break;\n }\n }\n addedCount = newLength - unchangedEndBlockLength - firstChangeIndex;\n removedCount = oldLength - unchangedEndBlockLength - firstChangeIndex;\n }\n\n return {\n firstChangeIndex: firstChangeIndex,\n addedCount: addedCount,\n removedCount: removedCount\n };\n }\n});","define('ember-data/-private/system/identity-map', ['exports', 'ember-data/-private/system/internal-model-map'], function (exports, _internalModelMap) {\n 'use strict';\n\n exports.__esModule = true;\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var IdentityMap = function () {\n function IdentityMap() {\n _classCallCheck(this, IdentityMap);\n\n this._map = Object.create(null);\n }\n\n /**\n Retrieves the `InternalModelMap` for a given modelName,\n creating one if one did not already exist. This is\n similar to `getWithDefault` or `get` on a `MapWithDefault`\n @method retrieve\n @param modelName a previously normalized modelName\n @returns {InternalModelMap} the InternalModelMap for the given modelName\n */\n\n\n IdentityMap.prototype.retrieve = function retrieve(modelName) {\n var map = this._map[modelName];\n\n if (map === undefined) {\n map = this._map[modelName] = new _internalModelMap.default(modelName);\n }\n\n return map;\n };\n\n IdentityMap.prototype.clear = function clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n };\n\n return IdentityMap;\n }();\n\n exports.default = IdentityMap;\n});","define('ember-data/-private/system/internal-model-map', ['exports', 'ember-data/-private/system/model/internal-model'], function (exports, _internalModel) {\n 'use strict';\n\n exports.__esModule = true;\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n }();\n\n var InternalModelMap = function () {\n function InternalModelMap(modelName) {\n _classCallCheck(this, InternalModelMap);\n\n this.modelName = modelName;\n this._idToModel = Object.create(null);\n this._models = [];\n this._metadata = null;\n }\n\n /**\n *\n * @param id\n * @returns {InternalModel}\n */\n\n\n InternalModelMap.prototype.get = function get(id) {\n return this._idToModel[id];\n };\n\n InternalModelMap.prototype.has = function has(id) {\n return !!this._idToModel[id];\n };\n\n InternalModelMap.prototype.set = function set(id, internalModel) {\n (false && Ember.assert('You cannot index an internalModel by an empty id\\'', id));\n (false && Ember.assert('You cannot set an index for an internalModel to something other than an internalModel', internalModel instanceof _internalModel.default));\n (false && Ember.assert('You cannot set an index for an internalModel that is not in the InternalModelMap', this.contains(internalModel)));\n (false && Ember.assert('You cannot update the id index of an InternalModel once set. Attempted to update ' + id + '.', !this.has(id) || this.get(id) === internalModel));\n\n\n this._idToModel[id] = internalModel;\n };\n\n InternalModelMap.prototype.add = function add(internalModel, id) {\n (false && Ember.assert('You cannot re-add an already present InternalModel to the InternalModelMap.', !this.contains(internalModel)));\n\n\n if (id) {\n this._idToModel[id] = internalModel;\n }\n\n this._models.push(internalModel);\n };\n\n InternalModelMap.prototype.remove = function remove(internalModel, id) {\n delete this._idToModel[id];\n\n var loc = this._models.indexOf(internalModel);\n\n if (loc !== -1) {\n this._models.splice(loc, 1);\n }\n };\n\n InternalModelMap.prototype.contains = function contains(internalModel) {\n return this._models.indexOf(internalModel) !== -1;\n };\n\n InternalModelMap.prototype.clear = function clear() {\n var models = this._models;\n this._models = [];\n\n for (var i = 0; i < models.length; i++) {\n var model = models[i];\n model.unloadRecord();\n }\n\n this._metadata = null;\n };\n\n _createClass(InternalModelMap, [{\n key: 'length',\n get: function () {\n return this._models.length;\n }\n }, {\n key: 'models',\n get: function () {\n return this._models;\n }\n }, {\n key: 'metadata',\n get: function () {\n return this._metadata || (this._metadata = Object.create(null));\n }\n }, {\n key: 'type',\n get: function () {\n throw new Error('InternalModelMap.type is no longer available');\n }\n }]);\n\n return InternalModelMap;\n }();\n\n exports.default = InternalModelMap;\n});","define('ember-data/-private/system/is-array-like', ['exports'], function (exports) {\n 'use strict';\n\n exports.__esModule = true;\n exports.default = isArrayLike;\n var typeOf = Ember.typeOf;\n var EmberArray = Ember.Array;\n\n\n /*\n We're using this to detect arrays and \"array-like\" objects.\n \n This is a copy of the `isArray` method found in `ember-runtime/utils` as we're\n currently unable to import non-exposed modules.\n \n This method was previously exposed as `Ember.isArray` but since\n https://github.com/emberjs/ember.js/pull/11463 `Ember.isArray` is an alias of\n `Array.isArray` hence removing the \"array-like\" part.\n */\n function isArrayLike(obj) {\n if (!obj || obj.setInterval) {\n return false;\n }\n if (Array.isArray(obj)) {\n return true;\n }\n if (EmberArray.detect(obj)) {\n return true;\n }\n\n var type = typeOf(obj);\n if ('array' === type) {\n return true;\n }\n if (obj.length !== undefined && 'object' === type) {\n return true;\n }\n return false;\n }\n});","define('ember-data/-private/system/many-array', ['exports', 'ember-data/-private/system/promise-proxies', 'ember-data/-private/system/store/common', 'ember-data/-private/system/diff-array'], function (exports, _promiseProxies, _common, _diffArray) {\n 'use strict';\n\n exports.__esModule = true;\n var all = Ember.RSVP.all;\n var Evented = Ember.Evented;\n var MutableArray = Ember.MutableArray;\n var EmberObject = Ember.Object;\n var get = Ember.get;\n exports.default = EmberObject.extend(MutableArray, Evented, {\n init: function () {\n this._super.apply(this, arguments);\n\n /**\n The loading state of this array\n @property {Boolean} isLoaded\n */\n this.isLoaded = false;\n this.length = 0;\n\n /**\n Used for async `hasMany` arrays\n to keep track of when they will resolve.\n @property {Ember.RSVP.Promise} promise\n @private\n */\n this.promise = null;\n\n /**\n Metadata associated with the request for async hasMany relationships.\n Example\n Given that the server returns the following JSON payload when fetching a\n hasMany relationship:\n ```js\n {\n \"comments\": [{\n \"id\": 1,\n \"comment\": \"This is the first comment\",\n }, {\n // ...\n }],\n \"meta\": {\n \"page\": 1,\n \"total\": 5\n }\n }\n ```\n You can then access the metadata via the `meta` property:\n ```js\n post.get('comments').then(function(comments) {\n var meta = comments.get('meta');\n // meta.page => 1\n // meta.total => 5\n });\n ```\n @property {Object} meta\n @public\n */\n this.meta = this.meta || null;\n\n /**\n `true` if the relationship is polymorphic, `false` otherwise.\n @property {Boolean} isPolymorphic\n @private\n */\n this.isPolymorphic = this.isPolymorphic || false;\n\n /**\n The relationship which manages this array.\n @property {ManyRelationship} relationship\n @private\n */\n this.relationship = this.relationship || null;\n\n this.currentState = [];\n this.flushCanonical(false);\n },\n objectAt: function (index) {\n var internalModel = this.currentState[index];\n if (internalModel === undefined) {\n return;\n }\n\n return internalModel.getRecord();\n },\n flushCanonical: function () {\n var isInitialized = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\n // It’s possible the parent side of the relationship may have been unloaded by this point\n if (!(0, _common._objectIsAlive)(this)) {\n return;\n }\n var toSet = this.canonicalState;\n\n //a hack for not removing new records\n //TODO remove once we have proper diffing\n var newInternalModels = this.currentState.filter(\n // only add new internalModels which are not yet in the canonical state of this\n // relationship (a new internalModel can be in the canonical state if it has\n // been 'acknowleged' to be in the relationship via a store.push)\n function (internalModel) {\n return internalModel.isNew() && toSet.indexOf(internalModel) === -1;\n });\n toSet = toSet.concat(newInternalModels);\n\n // diff to find changes\n var diff = (0, _diffArray.default)(this.currentState, toSet);\n\n if (diff.firstChangeIndex !== null) {\n // it's null if no change found\n // we found a change\n this.arrayContentWillChange(diff.firstChangeIndex, diff.removedCount, diff.addedCount);\n this.set('length', toSet.length);\n this.currentState = toSet;\n this.arrayContentDidChange(diff.firstChangeIndex, diff.removedCount, diff.addedCount);\n if (isInitialized && diff.addedCount > 0) {\n //notify only on additions\n //TODO only notify if unloaded\n this.relationship.notifyHasManyChanged();\n }\n }\n },\n internalReplace: function (idx, amt, objects) {\n if (!objects) {\n objects = [];\n }\n this.arrayContentWillChange(idx, amt, objects.length);\n this.currentState.splice.apply(this.currentState, [idx, amt].concat(objects));\n this.set('length', this.currentState.length);\n this.arrayContentDidChange(idx, amt, objects.length);\n },\n\n\n //TODO(Igor) optimize\n _removeInternalModels: function (internalModels) {\n for (var i = 0; i < internalModels.length; i++) {\n var index = this.currentState.indexOf(internalModels[i]);\n this.internalReplace(index, 1);\n }\n },\n\n\n //TODO(Igor) optimize\n _addInternalModels: function (internalModels, idx) {\n if (idx === undefined) {\n idx = this.currentState.length;\n }\n this.internalReplace(idx, 0, internalModels);\n },\n replace: function (idx, amt, objects) {\n var internalModels = void 0;\n if (amt > 0) {\n internalModels = this.currentState.slice(idx, idx + amt);\n this.get('relationship').removeInternalModels(internalModels);\n }\n if (objects) {\n this.get('relationship').addInternalModels(objects.map(function (obj) {\n return obj._internalModel;\n }), idx);\n }\n },\n\n\n /**\n Reloads all of the records in the manyArray. If the manyArray\n holds a relationship that was originally fetched using a links url\n Ember Data will revisit the original links url to repopulate the\n relationship.\n If the manyArray holds the result of a `store.query()` reload will\n re-run the original query.\n Example\n ```javascript\n var user = store.peekRecord('user', 1)\n user.login().then(function() {\n user.get('permissions').then(function(permissions) {\n return permissions.reload();\n });\n });\n ```\n @method reload\n @public\n */\n reload: function () {\n return this.relationship.reload();\n },\n\n\n /**\n Saves all of the records in the `ManyArray`.\n Example\n ```javascript\n store.findRecord('inbox', 1).then(function(inbox) {\n inbox.get('messages').then(function(messages) {\n messages.forEach(function(message) {\n message.set('isRead', true);\n });\n messages.save()\n });\n });\n ```\n @method save\n @return {DS.PromiseArray} promise\n */\n save: function () {\n var manyArray = this;\n var promiseLabel = 'DS: ManyArray#save ' + get(this, 'type');\n var promise = all(this.invoke(\"save\"), promiseLabel).then(function () {\n return manyArray;\n }, null, 'DS: ManyArray#save return ManyArray');\n\n return _promiseProxies.PromiseArray.create({ promise: promise });\n },\n\n\n /**\n Create a child record within the owner\n @method createRecord\n @private\n @param {Object} hash\n @return {DS.Model} record\n */\n createRecord: function (hash) {\n var store = get(this, 'store');\n var type = get(this, 'type');\n\n (false && Ember.assert('You cannot add \\'' + type.modelName + '\\' records to this polymorphic relationship.', !get(this, 'isPolymorphic')));\n\n var record = store.createRecord(type.modelName, hash);\n this.pushObject(record);\n\n return record;\n }\n });\n});","define('ember-data/-private/system/model/errors', ['exports'], function (exports) {\n 'use strict';\n\n exports.__esModule = true;\n var mapBy = Ember.computed.mapBy;\n var not = Ember.computed.not;\n var Evented = Ember.Evented;\n var ArrayProxy = Ember.ArrayProxy;\n var set = Ember.set;\n var get = Ember.get;\n var computed = Ember.computed;\n var isEmpty = Ember.isEmpty;\n var makeArray = Ember.makeArray;\n var A = Ember.A;\n var MapWithDefault = Ember.MapWithDefault;\n exports.default = ArrayProxy.extend(Evented, {\n /**\n Register with target handler\n @method registerHandlers\n @param {Object} target\n @param {Function} becameInvalid\n @param {Function} becameValid\n @deprecated\n */\n registerHandlers: function (target, becameInvalid, becameValid) {\n (false && !(false) && Ember.deprecate('Record errors will no longer be evented.', false, {\n id: 'ds.errors.registerHandlers',\n until: '3.0.0'\n }));\n\n\n this._registerHandlers(target, becameInvalid, becameValid);\n },\n\n\n /**\n Register with target handler\n @method _registerHandlers\n @private\n */\n _registerHandlers: function (target, becameInvalid, becameValid) {\n this.on('becameInvalid', target, becameInvalid);\n this.on('becameValid', target, becameValid);\n },\n\n\n /**\n @property errorsByAttributeName\n @type {Ember.MapWithDefault}\n @private\n */\n errorsByAttributeName: computed(function () {\n return MapWithDefault.create({\n defaultValue: function () {\n return A();\n }\n });\n }),\n\n /**\n Returns errors for a given attribute\n ```javascript\n let user = store.createRecord('user', {\n username: 'tomster',\n email: 'invalidEmail'\n });\n user.save().catch(function(){\n user.get('errors').errorsFor('email'); // returns:\n // [{attribute: \"email\", message: \"Doesn't look like a valid email.\"}]\n });\n ```\n @method errorsFor\n @param {String} attribute\n @return {Array}\n */\n errorsFor: function (attribute) {\n return get(this, 'errorsByAttributeName').get(attribute);\n },\n\n\n /**\n An array containing all of the error messages for this\n record. This is useful for displaying all errors to the user.\n ```handlebars\n {{#each model.errors.messages as |message|}}\n <div class=\"error\">\n {{message}}\n </div>\n {{/each}}\n ```\n @property messages\n @type {Array}\n */\n messages: mapBy('content', 'message'),\n\n /**\n @property content\n @type {Array}\n @private\n */\n content: computed(function () {\n return A();\n }),\n\n /**\n @method unknownProperty\n @private\n */\n unknownProperty: function (attribute) {\n var errors = this.errorsFor(attribute);\n if (isEmpty(errors)) {\n return undefined;\n }\n return errors;\n },\n\n\n /**\n Total number of errors.\n @property length\n @type {Number}\n @readOnly\n */\n\n /**\n @property isEmpty\n @type {Boolean}\n @readOnly\n */\n isEmpty: not('length').readOnly(),\n\n /**\n Adds error messages to a given attribute and sends\n `becameInvalid` event to the record.\n Example:\n ```javascript\n if (!user.get('username') {\n user.get('errors').add('username', 'This field is required');\n }\n ```\n @method add\n @param {String} attribute\n @param {(Array|String)} messages\n @deprecated\n */\n add: function (attribute, messages) {\n (false && Ember.warn('Interacting with a record errors object will no longer change the record state.', false, {\n id: 'ds.errors.add'\n }));\n\n\n var wasEmpty = get(this, 'isEmpty');\n\n this._add(attribute, messages);\n\n if (wasEmpty && !get(this, 'isEmpty')) {\n this.trigger('becameInvalid');\n }\n },\n\n\n /**\n Adds error messages to a given attribute without sending event.\n @method _add\n @private\n */\n _add: function (attribute, messages) {\n messages = this._findOrCreateMessages(attribute, messages);\n this.addObjects(messages);\n get(this, 'errorsByAttributeName').get(attribute).addObjects(messages);\n\n this.notifyPropertyChange(attribute);\n },\n\n\n /**\n @method _findOrCreateMessages\n @private\n */\n _findOrCreateMessages: function (attribute, messages) {\n var errors = this.errorsFor(attribute);\n var messagesArray = makeArray(messages);\n var _messages = new Array(messagesArray.length);\n\n for (var i = 0; i < messagesArray.length; i++) {\n var message = messagesArray[i];\n var err = errors.findBy('message', message);\n if (err) {\n _messages[i] = err;\n } else {\n _messages[i] = {\n attribute: attribute,\n message: message\n };\n }\n }\n\n return _messages;\n },\n\n\n /**\n Removes all error messages from the given attribute and sends\n `becameValid` event to the record if there no more errors left.\n Example:\n ```app/models/user.js\n import DS from 'ember-data';\n export default DS.Model.extend({\n email: DS.attr('string'),\n twoFactorAuth: DS.attr('boolean'),\n phone: DS.attr('string')\n });\n ```\n ```app/routes/user/edit.js\n import Route from '@ember/routing/route';\n export default Route.extend({\n actions: {\n save: function(user) {\n if (!user.get('twoFactorAuth')) {\n user.get('errors').remove('phone');\n }\n user.save();\n }\n }\n });\n ```\n @method remove\n @param {String} attribute\n @deprecated\n */\n remove: function (attribute) {\n (false && Ember.warn('Interacting with a record errors object will no longer change the record state.', false, {\n id: 'ds.errors.remove'\n }));\n\n\n if (get(this, 'isEmpty')) {\n return;\n }\n\n this._remove(attribute);\n\n if (get(this, 'isEmpty')) {\n this.trigger('becameValid');\n }\n },\n\n\n /**\n Removes all error messages from the given attribute without sending event.\n @method _remove\n @private\n */\n _remove: function (attribute) {\n if (get(this, 'isEmpty')) {\n return;\n }\n\n var content = this.rejectBy('attribute', attribute);\n set(this, 'content', content);\n get(this, 'errorsByAttributeName').delete(attribute);\n\n this.notifyPropertyChange(attribute);\n this.notifyPropertyChange('length');\n },\n\n\n /**\n Removes all error messages and sends `becameValid` event\n to the record.\n Example:\n ```app/routes/user/edit.js\n import Route from '@ember/routing/route';\n export default Route.extend({\n actions: {\n retrySave: function(user) {\n user.get('errors').clear();\n user.save();\n }\n }\n });\n ```\n @method clear\n @deprecated\n */\n clear: function () {\n (false && Ember.warn('Interacting with a record errors object will no longer change the record state.', false, {\n id: 'ds.errors.clear'\n }));\n\n\n if (get(this, 'isEmpty')) {\n return;\n }\n\n this._clear();\n this.trigger('becameValid');\n },\n\n\n /**\n Removes all error messages.\n to the record.\n @method _clear\n @private\n */\n _clear: function () {\n if (get(this, 'isEmpty')) {\n return;\n }\n\n var errorsByAttributeName = get(this, 'errorsByAttributeName');\n var attributes = A();\n\n errorsByAttributeName.forEach(function (_, attribute) {\n attributes.push(attribute);\n });\n\n errorsByAttributeName.clear();\n attributes.forEach(function (attribute) {\n this.notifyPropertyChange(attribute);\n }, this);\n\n ArrayProxy.prototype.clear.call(this);\n },\n\n\n /**\n Checks if there is error messages for the given attribute.\n ```app/routes/user/edit.js\n import Route from '@ember/routing/route';\n export default Route.extend({\n actions: {\n save: function(user) {\n if (user.get('errors').has('email')) {\n return alert('Please update your email before attempting to save.');\n }\n user.save();\n }\n }\n });\n ```\n @method has\n @param {String} attribute\n @return {Boolean} true if there some errors on given attribute\n */\n has: function (attribute) {\n return !isEmpty(this.errorsFor(attribute));\n }\n });\n});","define('ember-data/-private/system/model/internal-model', ['exports', 'ember-data/-private/system/model/states', 'ember-data/-private/system/relationships/state/create', 'ember-data/-private/system/snapshot', 'ember-data/-private/features', 'ember-data/-private/system/ordered-set', 'ember-data/-private/utils', 'ember-data/-private/system/references'], function (exports, _states, _create, _snapshot, _features, _orderedSet, _utils, _references) {\n 'use strict';\n\n exports.__esModule = true;\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n }();\n\n var assign = Ember.assign;\n var merge = Ember.merge;\n var set = Ember.set;\n var get = Ember.get;\n var copy = Ember.copy;\n var EmberError = Ember.Error;\n var isEqual = Ember.isEqual;\n var isEmpty = Ember.isEmpty;\n var setOwner = Ember.setOwner;\n var run = Ember.run;\n var RSVP = Ember.RSVP;\n var Promise = Ember.RSVP.Promise;\n var inspect = Ember.inspect;\n\n\n var emberAssign = assign || merge;\n\n /*\n The TransitionChainMap caches the `state.enters`, `state.setups`, and final state reached\n when transitioning from one state to another, so that future transitions can replay the\n transition without needing to walk the state tree, collect these hook calls and determine\n the state to transition into.\n \n A future optimization would be to build a single chained method out of the collected enters\n and setups. It may also be faster to do a two level cache (from: { to }) instead of caching based\n on a key that adds the two together.\n */\n var TransitionChainMap = Object.create(null);\n\n var _extractPivotNameCache = Object.create(null);\n var _splitOnDotCache = Object.create(null);\n\n function splitOnDot(name) {\n return _splitOnDotCache[name] || (_splitOnDotCache[name] = name.split('.'));\n }\n\n function extractPivotName(name) {\n return _extractPivotNameCache[name] || (_extractPivotNameCache[name] = splitOnDot(name)[0]);\n }\n\n function areAllModelsUnloaded(internalModels) {\n for (var i = 0; i < internalModels.length; ++i) {\n var record = internalModels[i]._record;\n if (record && !(record.get('isDestroyed') || record.get('isDestroying'))) {\n return false;\n }\n }\n return true;\n }\n\n // Handle dematerialization for relationship `rel`. In all cases, notify the\n // relatinoship of the dematerialization: this is done so the relationship can\n // notify its inverse which needs to update state\n //\n // If the inverse is sync, unloading this record is treated as a client-side\n // delete, so we remove the inverse records from this relationship to\n // disconnect the graph. Because it's not async, we don't need to keep around\n // the internalModel as an id-wrapper for references and because the graph is\n // disconnected we can actually destroy the internalModel when checking for\n // orphaned models.\n function destroyRelationship(rel) {\n rel.internalModelDidDematerialize();\n\n if (rel._inverseIsSync()) {\n // disconnect the graph so that the sync inverse relationship does not\n // prevent us from cleaning up during `_cleanupOrphanedInternalModels`\n rel.removeAllInternalModelsFromOwn();\n rel.removeAllCanonicalInternalModelsFromOwn();\n }\n }\n // this (and all heimdall instrumentation) will be stripped by a babel transform\n // https://github.com/heimdalljs/babel5-plugin-strip-heimdall\n\n\n var InternalModelReferenceId = 1;\n var nextBfsId = 1;\n\n /*\n `InternalModel` is the Model class that we use internally inside Ember Data to represent models.\n Internal ED methods should only deal with `InternalModel` objects. It is a fast, plain Javascript class.\n \n We expose `DS.Model` to application code, by materializing a `DS.Model` from `InternalModel` lazily, as\n a performance optimization.\n \n `InternalModel` should never be exposed to application code. At the boundaries of the system, in places\n like `find`, `push`, etc. we convert between Models and InternalModels.\n \n We need to make sure that the properties from `InternalModel` are correctly exposed/proxied on `Model`\n if they are needed.\n \n @private\n @class InternalModel\n */\n\n var InternalModel = function () {\n function InternalModel(modelName, id, store, data) {\n _classCallCheck(this, InternalModel);\n\n this.id = id;\n\n // this ensure ordered set can quickly identify this as unique\n this[Ember.GUID_KEY] = InternalModelReferenceId++ + 'internal-model';\n\n this.store = store;\n this.modelName = modelName;\n this._loadingPromise = null;\n this._record = null;\n this._isDestroyed = false;\n this.isError = false;\n this._isUpdatingRecordArrays = false; // used by the recordArrayManager\n\n // During dematerialization we don't want to rematerialize the record. The\n // reason this might happen is that dematerialization removes records from\n // record arrays, and Ember arrays will always `objectAt(0)` and\n // `objectAt(len - 1)` to test whether or not `firstObject` or `lastObject`\n // have changed.\n this._isDematerializing = false;\n this._scheduledDestroy = null;\n\n this.resetRecord();\n\n if (data) {\n this.__data = data;\n }\n\n // caches for lazy getters\n this._modelClass = null;\n this.__deferredTriggers = null;\n this.__recordArrays = null;\n this._references = null;\n this._recordReference = null;\n this.__relationships = null;\n this.__implicitRelationships = null;\n\n // Used during the mark phase of unloading to avoid checking the same internal\n // model twice in the same scan\n this._bfsId = 0;\n }\n\n InternalModel.prototype.isHiddenFromRecordArrays = function isHiddenFromRecordArrays() {\n // During dematerialization we don't want to rematerialize the record.\n // recordWasDeleted can cause other records to rematerialize because it\n // removes the internal model from the array and Ember arrays will always\n // `objectAt(0)` and `objectAt(len -1)` to check whether `firstObject` or\n // `lastObject` have changed. When this happens we don't want those\n // models to rematerialize their records.\n\n return this._isDematerializing || this.isDestroyed || this.currentState.stateName === 'root.deleted.saved' || this.isEmpty();\n };\n\n InternalModel.prototype.isEmpty = function isEmpty() {\n return this.currentState.isEmpty;\n };\n\n InternalModel.prototype.isLoading = function isLoading() {\n return this.currentState.isLoading;\n };\n\n InternalModel.prototype.isLoaded = function isLoaded() {\n return this.currentState.isLoaded;\n };\n\n InternalModel.prototype.hasDirtyAttributes = function hasDirtyAttributes() {\n return this.currentState.hasDirtyAttributes;\n };\n\n InternalModel.prototype.isSaving = function isSaving() {\n return this.currentState.isSaving;\n };\n\n InternalModel.prototype.isDeleted = function isDeleted() {\n return this.currentState.isDeleted;\n };\n\n InternalModel.prototype.isNew = function isNew() {\n return this.currentState.isNew;\n };\n\n InternalModel.prototype.isValid = function isValid() {\n return this.currentState.isValid;\n };\n\n InternalModel.prototype.dirtyType = function dirtyType() {\n return this.currentState.dirtyType;\n };\n\n InternalModel.prototype.getRecord = function getRecord(properties) {\n if (!this._record && !this._isDematerializing) {\n\n // lookupFactory should really return an object that creates\n // instances with the injections applied\n var createOptions = {\n store: this.store,\n _internalModel: this,\n id: this.id,\n currentState: this.currentState,\n isError: this.isError,\n adapterError: this.error\n };\n\n if (typeof properties === 'object' && properties !== null) {\n emberAssign(createOptions, properties);\n }\n\n if (setOwner) {\n // ensure that `getOwner(this)` works inside a model instance\n setOwner(createOptions, (0, _utils.getOwner)(this.store));\n } else {\n createOptions.container = this.store.container;\n }\n\n this._record = this.store.modelFactoryFor(this.modelName).create(createOptions);\n\n this._triggerDeferredTriggers();\n }\n\n return this._record;\n };\n\n InternalModel.prototype.resetRecord = function resetRecord() {\n this._record = null;\n this.isReloading = false;\n this.error = null;\n this.currentState = _states.default.empty;\n this.__attributes = null;\n this.__inFlightAttributes = null;\n this._data = null;\n };\n\n InternalModel.prototype.dematerializeRecord = function dematerializeRecord() {\n if (this._record) {\n this._isDematerializing = true;\n this._record.destroy();\n this.destroyRelationships();\n this.updateRecordArrays();\n this.resetRecord();\n }\n };\n\n InternalModel.prototype.deleteRecord = function deleteRecord() {\n this.send('deleteRecord');\n };\n\n InternalModel.prototype.save = function save(options) {\n var promiseLabel = \"DS: Model#save \" + this;\n var resolver = RSVP.defer(promiseLabel);\n\n this.store.scheduleSave(this, resolver, options);\n return resolver.promise;\n };\n\n InternalModel.prototype.startedReloading = function startedReloading() {\n this.isReloading = true;\n if (this.hasRecord) {\n set(this._record, 'isReloading', true);\n }\n };\n\n InternalModel.prototype.finishedReloading = function finishedReloading() {\n this.isReloading = false;\n if (this.hasRecord) {\n set(this._record, 'isReloading', false);\n }\n };\n\n InternalModel.prototype.reload = function reload() {\n this.startedReloading();\n var internalModel = this;\n var promiseLabel = \"DS: Model#reload of \" + this;\n\n return new Promise(function (resolve) {\n internalModel.send('reloadRecord', resolve);\n }, promiseLabel).then(function () {\n internalModel.didCleanError();\n return internalModel;\n }, function (error) {\n internalModel.didError(error);\n throw error;\n }, \"DS: Model#reload complete, update flags\").finally(function () {\n internalModel.finishedReloading();\n internalModel.updateRecordArrays();\n });\n };\n\n InternalModel.prototype._directlyRelatedInternalModels = function _directlyRelatedInternalModels() {\n var array = [];\n\n this._relationships.forEach(function (name, rel) {\n array = array.concat(rel.members.list, rel.canonicalMembers.list);\n });\n return array;\n };\n\n InternalModel.prototype._allRelatedInternalModels = function _allRelatedInternalModels() {\n var array = [];\n var queue = [];\n var bfsId = nextBfsId++;\n queue.push(this);\n this._bfsId = bfsId;\n while (queue.length > 0) {\n var node = queue.shift();\n array.push(node);\n var related = node._directlyRelatedInternalModels();\n for (var i = 0; i < related.length; ++i) {\n var internalModel = related[i];\n (false && Ember.assert('Internal Error: seen a future bfs iteration', internalModel._bfsId <= bfsId));\n\n if (internalModel._bfsId < bfsId) {\n queue.push(internalModel);\n internalModel._bfsId = bfsId;\n }\n }\n }\n return array;\n };\n\n InternalModel.prototype.unloadRecord = function unloadRecord() {\n if (this.isDestroyed) {\n return;\n }\n this.send('unloadRecord');\n this.dematerializeRecord();\n\n if (this._scheduledDestroy === null) {\n // TODO: use run.schedule once we drop 1.13\n if (!run.currentRunLoop) {\n (false && Ember.assert('You have turned on testing mode, which disabled the run-loop\\'s autorun.\\n You will need to wrap any code with asynchronous side-effects in a run', Ember.testing));\n }\n this._scheduledDestroy = run.backburner.schedule('destroy', this, '_checkForOrphanedInternalModels');\n }\n };\n\n InternalModel.prototype.hasScheduledDestroy = function hasScheduledDestroy() {\n return !!this._scheduledDestroy;\n };\n\n InternalModel.prototype.cancelDestroy = function cancelDestroy() {\n (false && Ember.assert('You cannot cancel the destruction of an InternalModel once it has already been destroyed', !this.isDestroyed));\n\n\n this._isDematerializing = false;\n run.cancel(this._scheduledDestroy);\n this._scheduledDestroy = null;\n };\n\n InternalModel.prototype.destroySync = function destroySync() {\n if (this._isDematerializing) {\n this.cancelDestroy();\n }\n this._checkForOrphanedInternalModels();\n if (this.isDestroyed || this.isDestroying) {\n return;\n }\n\n // just in-case we are not one of the orphaned, we should still\n // still destroy ourselves\n this.destroy();\n };\n\n InternalModel.prototype._checkForOrphanedInternalModels = function _checkForOrphanedInternalModels() {\n this._isDematerializing = false;\n this._scheduledDestroy = null;\n if (this.isDestroyed) {\n return;\n }\n\n this._cleanupOrphanedInternalModels();\n };\n\n InternalModel.prototype._cleanupOrphanedInternalModels = function _cleanupOrphanedInternalModels() {\n var relatedInternalModels = this._allRelatedInternalModels();\n if (areAllModelsUnloaded(relatedInternalModels)) {\n for (var i = 0; i < relatedInternalModels.length; ++i) {\n var internalModel = relatedInternalModels[i];\n if (!internalModel.isDestroyed) {\n internalModel.destroy();\n }\n }\n }\n };\n\n InternalModel.prototype.eachRelationship = function eachRelationship(callback, binding) {\n return this.modelClass.eachRelationship(callback, binding);\n };\n\n InternalModel.prototype.destroy = function destroy() {\n (false && Ember.assert(\"Cannot destroy an internalModel while its record is materialized\", !this._record || this._record.get('isDestroyed') || this._record.get('isDestroying')));\n\n\n this.store._internalModelDestroyed(this);\n\n this._relationships.forEach(function (name, rel) {\n return rel.destroy();\n });\n\n this._isDestroyed = true;\n };\n\n InternalModel.prototype.eachAttribute = function eachAttribute(callback, binding) {\n return this.modelClass.eachAttribute(callback, binding);\n };\n\n InternalModel.prototype.inverseFor = function inverseFor(key) {\n return this.modelClass.inverseFor(key);\n };\n\n InternalModel.prototype.setupData = function setupData(data) {\n this.store._internalModelDidReceiveRelationshipData(this.modelName, this.id, data.relationships);\n\n var changedKeys = void 0;\n\n if (this.hasRecord) {\n changedKeys = this._changedKeys(data.attributes);\n }\n\n emberAssign(this._data, data.attributes);\n this.pushedData();\n\n if (this.hasRecord) {\n this._record._notifyProperties(changedKeys);\n }\n };\n\n InternalModel.prototype.createSnapshot = function createSnapshot(options) {\n return new _snapshot.default(this, options);\n };\n\n InternalModel.prototype.loadingData = function loadingData(promise) {\n this.send('loadingData', promise);\n };\n\n InternalModel.prototype.loadedData = function loadedData() {\n this.send('loadedData');\n };\n\n InternalModel.prototype.notFound = function notFound() {\n this.send('notFound');\n };\n\n InternalModel.prototype.pushedData = function pushedData() {\n this.send('pushedData');\n };\n\n InternalModel.prototype.flushChangedAttributes = function flushChangedAttributes() {\n this._inFlightAttributes = this._attributes;\n this._attributes = null;\n };\n\n InternalModel.prototype.hasChangedAttributes = function hasChangedAttributes() {\n return this.__attributes !== null && Object.keys(this.__attributes).length > 0;\n };\n\n InternalModel.prototype.updateChangedAttributes = function updateChangedAttributes() {\n var changedAttributes = this.changedAttributes();\n var changedAttributeNames = Object.keys(changedAttributes);\n var attrs = this._attributes;\n\n for (var i = 0, length = changedAttributeNames.length; i < length; i++) {\n var attribute = changedAttributeNames[i];\n var data = changedAttributes[attribute];\n var oldData = data[0];\n var newData = data[1];\n\n if (oldData === newData) {\n delete attrs[attribute];\n }\n }\n };\n\n InternalModel.prototype.changedAttributes = function changedAttributes() {\n var oldData = this._data;\n var currentData = this._attributes;\n var inFlightData = this._inFlightAttributes;\n var newData = emberAssign(copy(inFlightData), currentData);\n var diffData = Object.create(null);\n var newDataKeys = Object.keys(newData);\n\n for (var i = 0, length = newDataKeys.length; i < length; i++) {\n var key = newDataKeys[i];\n diffData[key] = [oldData[key], newData[key]];\n }\n\n return diffData;\n };\n\n InternalModel.prototype.adapterWillCommit = function adapterWillCommit() {\n this.send('willCommit');\n };\n\n InternalModel.prototype.adapterDidDirty = function adapterDidDirty() {\n this.send('becomeDirty');\n this.updateRecordArrays();\n };\n\n InternalModel.prototype.send = function send(name, context) {\n var currentState = this.currentState;\n\n if (!currentState[name]) {\n this._unhandledEvent(currentState, name, context);\n }\n\n return currentState[name](this, context);\n };\n\n InternalModel.prototype.notifyHasManyAdded = function notifyHasManyAdded(key, record, idx) {\n if (this.hasRecord) {\n this._record.notifyHasManyAdded(key, record, idx);\n }\n };\n\n InternalModel.prototype.notifyBelongsToChanged = function notifyBelongsToChanged(key, record) {\n if (this.hasRecord) {\n this._record.notifyBelongsToChanged(key, record);\n }\n };\n\n InternalModel.prototype.notifyPropertyChange = function notifyPropertyChange(key) {\n if (this.hasRecord) {\n this._record.notifyPropertyChange(key);\n }\n };\n\n InternalModel.prototype.rollbackAttributes = function rollbackAttributes() {\n var dirtyKeys = void 0;\n if (this.hasChangedAttributes()) {\n dirtyKeys = Object.keys(this._attributes);\n this._attributes = null;\n }\n\n if (get(this, 'isError')) {\n this._inFlightAttributes = null;\n this.didCleanError();\n }\n\n if (this.isNew()) {\n this.removeFromInverseRelationships();\n }\n\n if (this.isValid()) {\n this._inFlightAttributes = null;\n }\n\n this.send('rolledBack');\n\n if (dirtyKeys && dirtyKeys.length > 0) {\n this._record._notifyProperties(dirtyKeys);\n }\n };\n\n InternalModel.prototype.transitionTo = function transitionTo(name) {\n // POSSIBLE TODO: Remove this code and replace with\n // always having direct reference to state objects\n\n var pivotName = extractPivotName(name);\n var state = this.currentState;\n var transitionMapId = state.stateName + '->' + name;\n\n do {\n if (state.exit) {\n state.exit(this);\n }\n state = state.parentState;\n } while (!state[pivotName]);\n\n var setups = void 0;\n var enters = void 0;\n var i = void 0;\n var l = void 0;\n var map = TransitionChainMap[transitionMapId];\n\n if (map) {\n setups = map.setups;\n enters = map.enters;\n state = map.state;\n } else {\n setups = [];\n enters = [];\n\n var path = splitOnDot(name);\n\n for (i = 0, l = path.length; i < l; i++) {\n state = state[path[i]];\n\n if (state.enter) {\n enters.push(state);\n }\n if (state.setup) {\n setups.push(state);\n }\n }\n\n TransitionChainMap[transitionMapId] = { setups: setups, enters: enters, state: state };\n }\n\n for (i = 0, l = enters.length; i < l; i++) {\n enters[i].enter(this);\n }\n\n this.currentState = state;\n if (this.hasRecord) {\n set(this._record, 'currentState', state);\n }\n\n for (i = 0, l = setups.length; i < l; i++) {\n setups[i].setup(this);\n }\n\n this.updateRecordArrays();\n };\n\n InternalModel.prototype._unhandledEvent = function _unhandledEvent(state, name, context) {\n var errorMessage = \"Attempted to handle event `\" + name + \"` \";\n errorMessage += \"on \" + String(this) + \" while in state \";\n errorMessage += state.stateName + \". \";\n\n if (context !== undefined) {\n errorMessage += \"Called with \" + inspect(context) + \".\";\n }\n\n throw new EmberError(errorMessage);\n };\n\n InternalModel.prototype.triggerLater = function triggerLater() {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (this._deferredTriggers.push(args) !== 1) {\n return;\n }\n\n this.store._updateInternalModel(this);\n };\n\n InternalModel.prototype._triggerDeferredTriggers = function _triggerDeferredTriggers() {\n //TODO: Before 1.0 we want to remove all the events that happen on the pre materialized record,\n //but for now, we queue up all the events triggered before the record was materialized, and flush\n //them once we have the record\n if (!this.hasRecord) {\n return;\n }\n var triggers = this._deferredTriggers;\n var record = this._record;\n var trigger = record.trigger;\n for (var i = 0, l = triggers.length; i < l; i++) {\n trigger.apply(record, triggers[i]);\n }\n\n triggers.length = 0;\n };\n\n InternalModel.prototype.removeFromInverseRelationships = function removeFromInverseRelationships() {\n this._relationships.forEach(function (name, rel) {\n rel.removeCompletelyFromInverse();\n rel.clear();\n });\n\n var implicitRelationships = this._implicitRelationships;\n this.__implicitRelationships = null;\n\n Object.keys(implicitRelationships).forEach(function (key) {\n var rel = implicitRelationships[key];\n\n rel.removeCompletelyFromInverse();\n rel.clear();\n });\n };\n\n InternalModel.prototype.destroyRelationships = function destroyRelationships() {\n var relationships = this._relationships;\n relationships.forEach(function (name, rel) {\n return destroyRelationship(rel);\n });\n\n var implicitRelationships = this._implicitRelationships;\n this.__implicitRelationships = null;\n Object.keys(implicitRelationships).forEach(function (key) {\n var rel = implicitRelationships[key];\n destroyRelationship(rel);\n });\n };\n\n InternalModel.prototype.preloadData = function preloadData(preload) {\n var _this = this;\n\n //TODO(Igor) consider the polymorphic case\n Object.keys(preload).forEach(function (key) {\n var preloadValue = get(preload, key);\n var relationshipMeta = _this.modelClass.metaForProperty(key);\n if (relationshipMeta.isRelationship) {\n _this._preloadRelationship(key, preloadValue);\n } else {\n _this._data[key] = preloadValue;\n }\n });\n };\n\n InternalModel.prototype._preloadRelationship = function _preloadRelationship(key, preloadValue) {\n var relationshipMeta = this.modelClass.metaForProperty(key);\n var modelClass = relationshipMeta.type;\n if (relationshipMeta.kind === 'hasMany') {\n this._preloadHasMany(key, preloadValue, modelClass);\n } else {\n this._preloadBelongsTo(key, preloadValue, modelClass);\n }\n };\n\n InternalModel.prototype._preloadHasMany = function _preloadHasMany(key, preloadValue, modelClass) {\n (false && Ember.assert(\"You need to pass in an array to set a hasMany property on a record\", Array.isArray(preloadValue)));\n\n var recordsToSet = new Array(preloadValue.length);\n\n for (var i = 0; i < preloadValue.length; i++) {\n var recordToPush = preloadValue[i];\n recordsToSet[i] = this._convertStringOrNumberIntoInternalModel(recordToPush, modelClass);\n }\n\n //We use the pathway of setting the hasMany as if it came from the adapter\n //because the user told us that they know this relationships exists already\n this._relationships.get(key).updateInternalModelsFromAdapter(recordsToSet);\n };\n\n InternalModel.prototype._preloadBelongsTo = function _preloadBelongsTo(key, preloadValue, modelClass) {\n var internalModelToSet = this._convertStringOrNumberIntoInternalModel(preloadValue, modelClass);\n\n //We use the pathway of setting the hasMany as if it came from the adapter\n //because the user told us that they know this relationships exists already\n this._relationships.get(key).setInternalModel(internalModelToSet);\n };\n\n InternalModel.prototype._convertStringOrNumberIntoInternalModel = function _convertStringOrNumberIntoInternalModel(value, modelClass) {\n if (typeof value === 'string' || typeof value === 'number') {\n return this.store._internalModelForId(modelClass, value);\n }\n if (value._internalModel) {\n return value._internalModel;\n }\n return value;\n };\n\n InternalModel.prototype.updateRecordArrays = function updateRecordArrays() {\n this.store.recordArrayManager.recordDidChange(this);\n };\n\n InternalModel.prototype.setId = function setId(id) {\n (false && Ember.assert('A record\\'s id cannot be changed once it is in the loaded state', this.id === null || this.id === id || this.isNew()));\n\n this.id = id;\n if (this._record.get('id') !== id) {\n this._record.set('id', id);\n }\n };\n\n InternalModel.prototype.didError = function didError(error) {\n this.error = error;\n this.isError = true;\n\n if (this.hasRecord) {\n this._record.setProperties({\n isError: true,\n adapterError: error\n });\n }\n };\n\n InternalModel.prototype.didCleanError = function didCleanError() {\n this.error = null;\n this.isError = false;\n\n if (this.hasRecord) {\n this._record.setProperties({\n isError: false,\n adapterError: null\n });\n }\n };\n\n InternalModel.prototype.adapterDidCommit = function adapterDidCommit(data) {\n if (data) {\n this.store._internalModelDidReceiveRelationshipData(this.modelName, this.id, data.relationships);\n\n data = data.attributes;\n }\n\n this.didCleanError();\n var changedKeys = this._changedKeys(data);\n\n emberAssign(this._data, this._inFlightAttributes);\n if (data) {\n emberAssign(this._data, data);\n }\n\n this._inFlightAttributes = null;\n\n this.send('didCommit');\n this.updateRecordArrays();\n\n if (!data) {\n return;\n }\n\n this._record._notifyProperties(changedKeys);\n };\n\n InternalModel.prototype.addErrorMessageToAttribute = function addErrorMessageToAttribute(attribute, message) {\n get(this.getRecord(), 'errors')._add(attribute, message);\n };\n\n InternalModel.prototype.removeErrorMessageFromAttribute = function removeErrorMessageFromAttribute(attribute) {\n get(this.getRecord(), 'errors')._remove(attribute);\n };\n\n InternalModel.prototype.clearErrorMessages = function clearErrorMessages() {\n get(this.getRecord(), 'errors')._clear();\n };\n\n InternalModel.prototype.hasErrors = function hasErrors() {\n var errors = get(this.getRecord(), 'errors');\n\n return !isEmpty(errors);\n };\n\n InternalModel.prototype.adapterDidInvalidate = function adapterDidInvalidate(errors) {\n var attribute = void 0;\n\n for (attribute in errors) {\n if (errors.hasOwnProperty(attribute)) {\n this.addErrorMessageToAttribute(attribute, errors[attribute]);\n }\n }\n\n this.send('becameInvalid');\n\n this._saveWasRejected();\n };\n\n InternalModel.prototype.adapterDidError = function adapterDidError(error) {\n this.send('becameError');\n this.didError(error);\n this._saveWasRejected();\n };\n\n InternalModel.prototype._saveWasRejected = function _saveWasRejected() {\n var keys = Object.keys(this._inFlightAttributes);\n if (keys.length > 0) {\n var attrs = this._attributes;\n for (var i = 0; i < keys.length; i++) {\n if (attrs[keys[i]] === undefined) {\n attrs[keys[i]] = this._inFlightAttributes[keys[i]];\n }\n }\n }\n this._inFlightAttributes = null;\n };\n\n InternalModel.prototype._changedKeys = function _changedKeys(updates) {\n var changedKeys = [];\n\n if (updates) {\n var original = void 0,\n i = void 0,\n value = void 0,\n key = void 0;\n var keys = Object.keys(updates);\n var length = keys.length;\n var hasAttrs = this.hasChangedAttributes();\n var attrs = void 0;\n if (hasAttrs) {\n attrs = this._attributes;\n }\n\n original = emberAssign(Object.create(null), this._data);\n original = emberAssign(original, this._inFlightAttributes);\n\n for (i = 0; i < length; i++) {\n key = keys[i];\n value = updates[key];\n\n // A value in _attributes means the user has a local change to\n // this attributes. We never override this value when merging\n // updates from the backend so we should not sent a change\n // notification if the server value differs from the original.\n if (hasAttrs === true && attrs[key] !== undefined) {\n continue;\n }\n\n if (!isEqual(original[key], value)) {\n changedKeys.push(key);\n }\n }\n }\n\n return changedKeys;\n };\n\n InternalModel.prototype.toString = function toString() {\n return '<' + this.modelName + ':' + this.id + '>';\n };\n\n InternalModel.prototype.referenceFor = function referenceFor(kind, name) {\n var reference = this.references[name];\n\n if (!reference) {\n var relationship = this._relationships.get(name);\n\n if (false) {\n var modelName = this.modelName;\n (false && Ember.assert('There is no ' + kind + ' relationship named \\'' + name + '\\' on a model of modelClass \\'' + modelName + '\\'', relationship));\n\n\n var actualRelationshipKind = relationship.relationshipMeta.kind;\n (false && Ember.assert('You tried to get the \\'' + name + '\\' relationship on a \\'' + modelName + '\\' via record.' + kind + '(\\'' + name + '\\'), but the relationship is of kind \\'' + actualRelationshipKind + '\\'. Use record.' + actualRelationshipKind + '(\\'' + name + '\\') instead.', actualRelationshipKind === kind));\n }\n\n if (kind === \"belongsTo\") {\n reference = new _references.BelongsToReference(this.store, this, relationship);\n } else if (kind === \"hasMany\") {\n reference = new _references.HasManyReference(this.store, this, relationship);\n }\n\n this.references[name] = reference;\n }\n\n return reference;\n };\n\n _createClass(InternalModel, [{\n key: 'modelClass',\n get: function () {\n return this._modelClass || (this._modelClass = this.store._modelFor(this.modelName));\n }\n }, {\n key: 'type',\n get: function () {\n return this.modelClass;\n }\n }, {\n key: 'recordReference',\n get: function () {\n if (this._recordReference === null) {\n this._recordReference = new _references.RecordReference(this.store, this);\n }\n return this._recordReference;\n }\n }, {\n key: '_recordArrays',\n get: function () {\n if (this.__recordArrays === null) {\n this.__recordArrays = _orderedSet.default.create();\n }\n return this.__recordArrays;\n }\n }, {\n key: 'references',\n get: function () {\n if (this._references === null) {\n this._references = Object.create(null);\n }\n return this._references;\n }\n }, {\n key: '_deferredTriggers',\n get: function () {\n if (this.__deferredTriggers === null) {\n this.__deferredTriggers = [];\n }\n return this.__deferredTriggers;\n }\n }, {\n key: '_attributes',\n get: function () {\n if (this.__attributes === null) {\n this.__attributes = Object.create(null);\n }\n return this.__attributes;\n },\n set: function (v) {\n this.__attributes = v;\n }\n }, {\n key: '_relationships',\n get: function () {\n if (this.__relationships === null) {\n this.__relationships = new _create.default(this);\n }\n\n return this.__relationships;\n }\n }, {\n key: '_inFlightAttributes',\n get: function () {\n if (this.__inFlightAttributes === null) {\n this.__inFlightAttributes = Object.create(null);\n }\n return this.__inFlightAttributes;\n },\n set: function (v) {\n this.__inFlightAttributes = v;\n }\n }, {\n key: '_data',\n get: function () {\n if (this.__data === null) {\n this.__data = Object.create(null);\n }\n return this.__data;\n },\n set: function (v) {\n this.__data = v;\n }\n }, {\n key: '_implicitRelationships',\n get: function () {\n if (this.__implicitRelationships === null) {\n this.__implicitRelationships = Object.create(null);\n }\n return this.__implicitRelationships;\n }\n }, {\n key: 'isDestroyed',\n get: function () {\n return this._isDestroyed;\n }\n }, {\n key: 'hasRecord',\n get: function () {\n return !!this._record;\n }\n }]);\n\n return InternalModel;\n }();\n\n exports.default = InternalModel;\n\n\n if ((0, _features.default)('ds-rollback-attribute')) {\n /*\n Returns the latest truth for an attribute - the canonical value, or the\n in-flight value.\n @method lastAcknowledgedValue\n @private\n */\n InternalModel.prototype.lastAcknowledgedValue = function lastAcknowledgedValue(key) {\n if (key in this._inFlightAttributes) {\n return this._inFlightAttributes[key];\n } else {\n return this._data[key];\n }\n };\n }\n});","define('ember-data/-private/system/model/model', ['exports', 'ember-data/-private/system/promise-proxies', 'ember-data/-private/system/model/errors', 'ember-data/-private/features', 'ember-data/-private/system/model/states', 'ember-data/-private/system/relationships/ext'], function (exports, _promiseProxies, _errors, _features, _states, _ext) {\n 'use strict';\n\n exports.__esModule = true;\n var ComputedProperty = Ember.ComputedProperty;\n var isNone = Ember.isNone;\n var EmberError = Ember.Error;\n var Evented = Ember.Evented;\n var EmberObject = Ember.Object;\n var computed = Ember.computed;\n var get = Ember.get;\n var observer = Ember.observer;\n var Map = Ember.Map;\n\n\n /**\n @module ember-data\n */\n\n function findPossibleInverses(type, inverseType, name, relationshipsSoFar) {\n var possibleRelationships = relationshipsSoFar || [];\n\n var relationshipMap = get(inverseType, 'relationships');\n if (!relationshipMap) {\n return possibleRelationships;\n }\n\n var relationships = relationshipMap.get(type.modelName).filter(function (relationship) {\n var optionsForRelationship = inverseType.metaForProperty(relationship.name).options;\n\n if (!optionsForRelationship.inverse && optionsForRelationship.inverse !== null) {\n return true;\n }\n\n return name === optionsForRelationship.inverse;\n });\n\n if (relationships) {\n possibleRelationships.push.apply(possibleRelationships, relationships);\n }\n\n //Recurse to support polymorphism\n if (type.superclass) {\n findPossibleInverses(type.superclass, inverseType, name, possibleRelationships);\n }\n\n return possibleRelationships;\n }\n\n function intersection(array1, array2) {\n var result = [];\n array1.forEach(function (element) {\n if (array2.indexOf(element) >= 0) {\n result.push(element);\n }\n });\n\n return result;\n }\n\n var RESERVED_MODEL_PROPS = ['currentState', 'data', 'store'];\n\n var retrieveFromCurrentState = computed('currentState', function (key) {\n return get(this._internalModel.currentState, key);\n }).readOnly();\n\n /**\n \n The model class that all Ember Data records descend from.\n This is the public API of Ember Data models. If you are using Ember Data\n in your application, this is the class you should use.\n If you are working on Ember Data internals, you most likely want to be dealing\n with `InternalModel`\n \n @class Model\n @namespace DS\n @extends Ember.Object\n @uses Ember.Evented\n */\n var Model = EmberObject.extend(Evented, {\n _internalModel: null,\n store: null,\n __defineNonEnumerable: function (property) {\n this[property.name] = property.descriptor.value;\n },\n\n\n /**\n If this property is `true` the record is in the `empty`\n state. Empty is the first state all records enter after they have\n been created. Most records created by the store will quickly\n transition to the `loading` state if data needs to be fetched from\n the server or the `created` state if the record is created on the\n client. A record can also enter the empty state if the adapter is\n unable to locate the record.\n @property isEmpty\n @type {Boolean}\n @readOnly\n */\n isEmpty: retrieveFromCurrentState,\n /**\n If this property is `true` the record is in the `loading` state. A\n record enters this state when the store asks the adapter for its\n data. It remains in this state until the adapter provides the\n requested data.\n @property isLoading\n @type {Boolean}\n @readOnly\n */\n isLoading: retrieveFromCurrentState,\n /**\n If this property is `true` the record is in the `loaded` state. A\n record enters this state when its data is populated. Most of a\n record's lifecycle is spent inside substates of the `loaded`\n state.\n Example\n ```javascript\n let record = store.createRecord('model');\n record.get('isLoaded'); // true\n store.findRecord('model', 1).then(function(model) {\n model.get('isLoaded'); // true\n });\n ```\n @property isLoaded\n @type {Boolean}\n @readOnly\n */\n isLoaded: retrieveFromCurrentState,\n /**\n If this property is `true` the record is in the `dirty` state. The\n record has local changes that have not yet been saved by the\n adapter. This includes records that have been created (but not yet\n saved) or deleted.\n Example\n ```javascript\n let record = store.createRecord('model');\n record.get('hasDirtyAttributes'); // true\n store.findRecord('model', 1).then(function(model) {\n model.get('hasDirtyAttributes'); // false\n model.set('foo', 'some value');\n model.get('hasDirtyAttributes'); // true\n });\n ```\n @since 1.13.0\n @property hasDirtyAttributes\n @type {Boolean}\n @readOnly\n */\n hasDirtyAttributes: computed('currentState.isDirty', function () {\n return this.get('currentState.isDirty');\n }),\n /**\n If this property is `true` the record is in the `saving` state. A\n record enters the saving state when `save` is called, but the\n adapter has not yet acknowledged that the changes have been\n persisted to the backend.\n Example\n ```javascript\n let record = store.createRecord('model');\n record.get('isSaving'); // false\n let promise = record.save();\n record.get('isSaving'); // true\n promise.then(function() {\n record.get('isSaving'); // false\n });\n ```\n @property isSaving\n @type {Boolean}\n @readOnly\n */\n isSaving: retrieveFromCurrentState,\n /**\n If this property is `true` the record is in the `deleted` state\n and has been marked for deletion. When `isDeleted` is true and\n `hasDirtyAttributes` is true, the record is deleted locally but the deletion\n was not yet persisted. When `isSaving` is true, the change is\n in-flight. When both `hasDirtyAttributes` and `isSaving` are false, the\n change has persisted.\n Example\n ```javascript\n let record = store.createRecord('model');\n record.get('isDeleted'); // false\n record.deleteRecord();\n // Locally deleted\n record.get('isDeleted'); // true\n record.get('hasDirtyAttributes'); // true\n record.get('isSaving'); // false\n // Persisting the deletion\n let promise = record.save();\n record.get('isDeleted'); // true\n record.get('isSaving'); // true\n // Deletion Persisted\n promise.then(function() {\n record.get('isDeleted'); // true\n record.get('isSaving'); // false\n record.get('hasDirtyAttributes'); // false\n });\n ```\n @property isDeleted\n @type {Boolean}\n @readOnly\n */\n isDeleted: retrieveFromCurrentState,\n /**\n If this property is `true` the record is in the `new` state. A\n record will be in the `new` state when it has been created on the\n client and the adapter has not yet report that it was successfully\n saved.\n Example\n ```javascript\n let record = store.createRecord('model');\n record.get('isNew'); // true\n record.save().then(function(model) {\n model.get('isNew'); // false\n });\n ```\n @property isNew\n @type {Boolean}\n @readOnly\n */\n isNew: retrieveFromCurrentState,\n /**\n If this property is `true` the record is in the `valid` state.\n A record will be in the `valid` state when the adapter did not report any\n server-side validation failures.\n @property isValid\n @type {Boolean}\n @readOnly\n */\n isValid: retrieveFromCurrentState,\n /**\n If the record is in the dirty state this property will report what\n kind of change has caused it to move into the dirty\n state. Possible values are:\n - `created` The record has been created by the client and not yet saved to the adapter.\n - `updated` The record has been updated by the client and not yet saved to the adapter.\n - `deleted` The record has been deleted by the client and not yet saved to the adapter.\n Example\n ```javascript\n let record = store.createRecord('model');\n record.get('dirtyType'); // 'created'\n ```\n @property dirtyType\n @type {String}\n @readOnly\n */\n dirtyType: retrieveFromCurrentState,\n\n /**\n If `true` the adapter reported that it was unable to save local\n changes to the backend for any reason other than a server-side\n validation error.\n Example\n ```javascript\n record.get('isError'); // false\n record.set('foo', 'valid value');\n record.save().then(null, function() {\n record.get('isError'); // true\n });\n ```\n @property isError\n @type {Boolean}\n @readOnly\n */\n isError: false,\n\n /**\n If `true` the store is attempting to reload the record from the adapter.\n Example\n ```javascript\n record.get('isReloading'); // false\n record.reload();\n record.get('isReloading'); // true\n ```\n @property isReloading\n @type {Boolean}\n @readOnly\n */\n isReloading: false,\n\n /**\n All ember models have an id property. This is an identifier\n managed by an external source. These are always coerced to be\n strings before being used internally. Note when declaring the\n attributes for a model it is an error to declare an id\n attribute.\n ```javascript\n let record = store.createRecord('model');\n record.get('id'); // null\n store.findRecord('model', 1).then(function(model) {\n model.get('id'); // '1'\n });\n ```\n @property id\n @type {String}\n */\n id: null,\n\n /**\n @property currentState\n @private\n @type {Object}\n */\n currentState: _states.default.empty,\n\n /**\n When the record is in the `invalid` state this object will contain\n any errors returned by the adapter. When present the errors hash\n contains keys corresponding to the invalid property names\n and values which are arrays of Javascript objects with two keys:\n - `message` A string containing the error message from the backend\n - `attribute` The name of the property associated with this error message\n ```javascript\n record.get('errors.length'); // 0\n record.set('foo', 'invalid value');\n record.save().catch(function() {\n record.get('errors').get('foo');\n // [{message: 'foo should be a number.', attribute: 'foo'}]\n });\n ```\n The `errors` property us useful for displaying error messages to\n the user.\n ```handlebars\n <label>Username: {{input value=username}} </label>\n {{#each model.errors.username as |error|}}\n <div class=\"error\">\n {{error.message}}\n </div>\n {{/each}}\n <label>Email: {{input value=email}} </label>\n {{#each model.errors.email as |error|}}\n <div class=\"error\">\n {{error.message}}\n </div>\n {{/each}}\n ```\n You can also access the special `messages` property on the error\n object to get an array of all the error strings.\n ```handlebars\n {{#each model.errors.messages as |message|}}\n <div class=\"error\">\n {{message}}\n </div>\n {{/each}}\n ```\n @property errors\n @type {DS.Errors}\n */\n errors: computed(function () {\n var errors = _errors.default.create();\n\n errors._registerHandlers(this._internalModel, function () {\n this.send('becameInvalid');\n }, function () {\n this.send('becameValid');\n });\n return errors;\n }).readOnly(),\n\n /**\n This property holds the `DS.AdapterError` object with which\n last adapter operation was rejected.\n @property adapterError\n @type {DS.AdapterError}\n */\n adapterError: null,\n\n serialize: function (options) {\n return this._internalModel.createSnapshot().serialize(options);\n },\n toJSON: function (options) {\n // container is for lazy transform lookups\n var serializer = this.store.serializerFor('-default');\n var snapshot = this._internalModel.createSnapshot();\n\n return serializer.serialize(snapshot, options);\n },\n\n\n /**\n Fired when the record is ready to be interacted with,\n that is either loaded from the server or created locally.\n @event ready\n */\n ready: null,\n\n /**\n Fired when the record is loaded from the server.\n @event didLoad\n */\n didLoad: null,\n\n /**\n Fired when the record is updated.\n @event didUpdate\n */\n didUpdate: null,\n\n /**\n Fired when a new record is commited to the server.\n @event didCreate\n */\n didCreate: null,\n\n /**\n Fired when the record is deleted.\n @event didDelete\n */\n didDelete: null,\n\n /**\n Fired when the record becomes invalid.\n @event becameInvalid\n */\n becameInvalid: null,\n\n /**\n Fired when the record enters the error state.\n @event becameError\n */\n becameError: null,\n\n /**\n Fired when the record is rolled back.\n @event rolledBack\n */\n rolledBack: null,\n\n send: function (name, context) {\n return this._internalModel.send(name, context);\n },\n transitionTo: function (name) {\n return this._internalModel.transitionTo(name);\n },\n deleteRecord: function () {\n this._internalModel.deleteRecord();\n },\n destroyRecord: function (options) {\n this.deleteRecord();\n return this.save(options);\n },\n unloadRecord: function () {\n if (this.isDestroyed) {\n return;\n }\n this._internalModel.unloadRecord();\n },\n _notifyProperties: function (keys) {\n Ember.beginPropertyChanges();\n var key = void 0;\n for (var i = 0, length = keys.length; i < length; i++) {\n key = keys[i];\n this.notifyPropertyChange(key);\n }\n Ember.endPropertyChanges();\n },\n changedAttributes: function () {\n return this._internalModel.changedAttributes();\n },\n rollbackAttributes: function () {\n this._internalModel.rollbackAttributes();\n },\n _createSnapshot: function () {\n return this._internalModel.createSnapshot();\n },\n toStringExtension: function () {\n return get(this, 'id');\n },\n save: function (options) {\n var _this = this;\n\n return _promiseProxies.PromiseObject.create({\n promise: this._internalModel.save(options).then(function () {\n return _this;\n })\n });\n },\n reload: function () {\n var _this2 = this;\n\n return _promiseProxies.PromiseObject.create({\n promise: this._internalModel.reload().then(function () {\n return _this2;\n })\n });\n },\n trigger: function (name) {\n var fn = this[name];\n\n if (typeof fn === 'function') {\n var length = arguments.length;\n var args = new Array(length - 1);\n\n for (var i = 1; i < length; i++) {\n args[i - 1] = arguments[i];\n }\n fn.apply(this, args);\n }\n\n this._super.apply(this, arguments);\n },\n attr: function () {\n (false && Ember.assert(\"The `attr` method is not available on DS.Model, a DS.Snapshot was probably expected. Are you passing a DS.Model instead of a DS.Snapshot to your serializer?\", false));\n },\n belongsTo: function (name) {\n return this._internalModel.referenceFor('belongsTo', name);\n },\n hasMany: function (name) {\n return this._internalModel.referenceFor('hasMany', name);\n },\n\n\n setId: observer('id', function () {\n this._internalModel.setId(this.get('id'));\n }),\n\n _debugInfo: function () {\n var attributes = ['id'];\n var relationships = {};\n var expensiveProperties = [];\n\n this.eachAttribute(function (name, meta) {\n return attributes.push(name);\n });\n\n var groups = [{\n name: 'Attributes',\n properties: attributes,\n expand: true\n }];\n\n this.eachRelationship(function (name, relationship) {\n var properties = relationships[relationship.kind];\n\n if (properties === undefined) {\n properties = relationships[relationship.kind] = [];\n groups.push({\n name: relationship.name,\n properties: properties,\n expand: true\n });\n }\n properties.push(name);\n expensiveProperties.push(name);\n });\n\n groups.push({\n name: 'Flags',\n properties: ['isLoaded', 'hasDirtyAttributes', 'isSaving', 'isDeleted', 'isError', 'isNew', 'isValid']\n });\n\n return {\n propertyInfo: {\n // include all other mixins / properties (not just the grouped ones)\n includeOtherProperties: true,\n groups: groups,\n // don't pre-calculate unless cached\n expensiveProperties: expensiveProperties\n }\n };\n },\n notifyBelongsToChanged: function (key) {\n this.notifyPropertyChange(key);\n },\n eachRelationship: function (callback, binding) {\n this.constructor.eachRelationship(callback, binding);\n },\n relationshipFor: function (name) {\n return get(this.constructor, 'relationshipsByName').get(name);\n },\n inverseFor: function (key) {\n return this.constructor.inverseFor(key, this.store);\n },\n notifyHasManyAdded: function (key) {\n //We need to notifyPropertyChange in the adding case because we need to make sure\n //we fetch the newly added record in case it is unloaded\n //TODO(Igor): Consider whether we could do this only if the record state is unloaded\n\n //Goes away once hasMany is double promisified\n this.notifyPropertyChange(key);\n },\n eachAttribute: function (callback, binding) {\n this.constructor.eachAttribute(callback, binding);\n }\n });\n\n /**\n @property data\n @private\n @type {Object}\n */\n Object.defineProperty(Model.prototype, 'data', {\n get: function () {\n return this._internalModel._data;\n }\n });\n\n if (false) {\n Model.reopen({\n init: function () {\n this._super.apply(this, arguments);\n\n if (!this._internalModel) {\n throw new EmberError('You should not call `create` on a model. Instead, call `store.createRecord` with the attributes you would like to set.');\n }\n }\n });\n }\n\n Model.reopenClass({\n isModel: true,\n\n /**\n Override the class' `create()` method to raise an error. This\n prevents end users from inadvertently calling `create()` instead\n of `createRecord()`. The store is still able to create instances\n by calling the `_create()` method. To create an instance of a\n `DS.Model` use [store.createRecord](DS.Store.html#method_createRecord).\n @method create\n @private\n @static\n */\n /**\n Represents the model's class name as a string. This can be used to look up the model's class name through\n `DS.Store`'s modelFor method.\n `modelName` is generated for you by Ember Data. It will be a lowercased, dasherized string.\n For example:\n ```javascript\n store.modelFor('post').modelName; // 'post'\n store.modelFor('blog-post').modelName; // 'blog-post'\n ```\n The most common place you'll want to access `modelName` is in your serializer's `payloadKeyFromModelName` method. For example, to change payload\n keys to underscore (instead of dasherized), you might use the following code:\n ```javascript\n import { underscore } from '@ember/string';\n export default const PostSerializer = DS.RESTSerializer.extend({\n payloadKeyFromModelName(modelName) {\n return underscore(modelName);\n }\n });\n ```\n @property modelName\n @type String\n @readonly\n @static\n */\n modelName: null,\n\n typeForRelationship: function (name, store) {\n var relationship = get(this, 'relationshipsByName').get(name);\n return relationship && store.modelFor(relationship.type);\n },\n\n\n inverseMap: computed(function () {\n return Object.create(null);\n }),\n\n inverseFor: function (name, store) {\n var inverseMap = get(this, 'inverseMap');\n if (inverseMap[name] !== undefined) {\n return inverseMap[name];\n } else {\n var relationship = get(this, 'relationshipsByName').get(name);\n if (!relationship) {\n inverseMap[name] = null;\n return null;\n }\n\n var options = relationship.options;\n if (options && options.inverse === null) {\n // populate the cache with a miss entry so we can skip getting and going\n // through `relationshipsByName`\n inverseMap[name] = null;\n return null;\n }\n\n return inverseMap[name] = this._findInverseFor(name, store);\n }\n },\n _findInverseFor: function (name, store) {\n\n var inverseType = this.typeForRelationship(name, store);\n if (!inverseType) {\n return null;\n }\n\n var propertyMeta = this.metaForProperty(name);\n //If inverse is manually specified to be null, like `comments: DS.hasMany('message', { inverse: null })`\n var options = propertyMeta.options;\n if (options.inverse === null) {\n return null;\n }\n\n var inverseName = void 0,\n inverseKind = void 0,\n inverse = void 0;\n\n //If inverse is specified manually, return the inverse\n if (options.inverse) {\n inverseName = options.inverse;\n inverse = get(inverseType, 'relationshipsByName').get(inverseName);\n\n (false && Ember.assert(\"We found no inverse relationships by the name of '\" + inverseName + \"' on the '\" + inverseType.modelName + \"' model. This is most likely due to a missing attribute on your model definition.\", !isNone(inverse)));\n\n\n inverseKind = inverse.kind;\n } else {\n //No inverse was specified manually, we need to use a heuristic to guess one\n if (propertyMeta.parentType && propertyMeta.type === propertyMeta.parentType.modelName) {\n (false && Ember.warn('Detected a reflexive relationship by the name of \\'' + name + '\\' without an inverse option. Look at https://guides.emberjs.com/current/models/relationships/#toc_reflexive-relations for how to explicitly specify inverses.', false, {\n id: 'ds.model.reflexive-relationship-without-inverse'\n }));\n }\n\n var possibleRelationships = findPossibleInverses(this, inverseType, name);\n\n if (possibleRelationships.length === 0) {\n return null;\n }\n\n var filteredRelationships = possibleRelationships.filter(function (possibleRelationship) {\n var optionsForRelationship = inverseType.metaForProperty(possibleRelationship.name).options;\n return name === optionsForRelationship.inverse;\n });\n\n (false && Ember.assert(\"You defined the '\" + name + \"' relationship on \" + this + \", but you defined the inverse relationships of type \" + inverseType.toString() + \" multiple times. Look at https://guides.emberjs.com/current/models/relationships/#toc_explicit-inverses for how to explicitly specify inverses\", filteredRelationships.length < 2));\n\n\n if (filteredRelationships.length === 1) {\n possibleRelationships = filteredRelationships;\n }\n\n (false && Ember.assert(\"You defined the '\" + name + \"' relationship on \" + this + \", but multiple possible inverse relationships of type \" + this + \" were found on \" + inverseType + \". Look at https://guides.emberjs.com/current/models/relationships/#toc_explicit-inverses for how to explicitly specify inverses\", possibleRelationships.length === 1));\n\n\n inverseName = possibleRelationships[0].name;\n inverseKind = possibleRelationships[0].kind;\n }\n\n return {\n type: inverseType,\n name: inverseName,\n kind: inverseKind\n };\n },\n\n\n /**\n The model's relationships as a map, keyed on the type of the\n relationship. The value of each entry is an array containing a descriptor\n for each relationship with that type, describing the name of the relationship\n as well as the type.\n For example, given the following model definition:\n ```app/models/blog.js\n import DS from 'ember-data';\n export default DS.Model.extend({\n users: DS.hasMany('user'),\n owner: DS.belongsTo('user'),\n posts: DS.hasMany('post')\n });\n ```\n This computed property would return a map describing these\n relationships, like this:\n ```javascript\n import Ember from 'ember';\n import Blog from 'app/models/blog';\n import User from 'app/models/user';\n import Post from 'app/models/post';\n let relationships = Ember.get(Blog, 'relationships');\n relationships.get(User);\n //=> [ { name: 'users', kind: 'hasMany' },\n // { name: 'owner', kind: 'belongsTo' } ]\n relationships.get(Post);\n //=> [ { name: 'posts', kind: 'hasMany' } ]\n ```\n @property relationships\n @static\n @type Ember.Map\n @readOnly\n */\n\n relationships: _ext.relationshipsDescriptor,\n\n /**\n A hash containing lists of the model's relationships, grouped\n by the relationship kind. For example, given a model with this\n definition:\n ```app/models/blog.js\n import DS from 'ember-data';\n export default DS.Model.extend({\n users: DS.hasMany('user'),\n owner: DS.belongsTo('user'),\n posts: DS.hasMany('post')\n });\n ```\n This property would contain the following:\n ```javascript\n import Ember from 'ember';\n import Blog from 'app/models/blog';\n let relationshipNames = Ember.get(Blog, 'relationshipNames');\n relationshipNames.hasMany;\n //=> ['users', 'posts']\n relationshipNames.belongsTo;\n //=> ['owner']\n ```\n @property relationshipNames\n @static\n @type Object\n @readOnly\n */\n relationshipNames: computed(function () {\n var names = {\n hasMany: [],\n belongsTo: []\n };\n\n this.eachComputedProperty(function (name, meta) {\n if (meta.isRelationship) {\n names[meta.kind].push(name);\n }\n });\n\n return names;\n }),\n\n /**\n An array of types directly related to a model. Each type will be\n included once, regardless of the number of relationships it has with\n the model.\n For example, given a model with this definition:\n ```app/models/blog.js\n import DS from 'ember-data';\n export default DS.Model.extend({\n users: DS.hasMany('user'),\n owner: DS.belongsTo('user'),\n posts: DS.hasMany('post')\n });\n ```\n This property would contain the following:\n ```javascript\n import Ember from 'ember';\n import Blog from 'app/models/blog';\n let relatedTypes = Ember.get(Blog, 'relatedTypes');\n //=> [ User, Post ]\n ```\n @property relatedTypes\n @static\n @type Ember.Array\n @readOnly\n */\n relatedTypes: _ext.relatedTypesDescriptor,\n\n /**\n A map whose keys are the relationships of a model and whose values are\n relationship descriptors.\n For example, given a model with this\n definition:\n ```app/models/blog.js\n import DS from 'ember-data';\n export default DS.Model.extend({\n users: DS.hasMany('user'),\n owner: DS.belongsTo('user'),\n posts: DS.hasMany('post')\n });\n ```\n This property would contain the following:\n ```javascript\n import Ember from 'ember';\n import Blog from 'app/models/blog';\n let relationshipsByName = Ember.get(Blog, 'relationshipsByName');\n relationshipsByName.get('users');\n //=> { key: 'users', kind: 'hasMany', type: 'user', options: Object, isRelationship: true }\n relationshipsByName.get('owner');\n //=> { key: 'owner', kind: 'belongsTo', type: 'user', options: Object, isRelationship: true }\n ```\n @property relationshipsByName\n @static\n @type Ember.Map\n @readOnly\n */\n relationshipsByName: _ext.relationshipsByNameDescriptor,\n\n /**\n A map whose keys are the fields of the model and whose values are strings\n describing the kind of the field. A model's fields are the union of all of its\n attributes and relationships.\n For example:\n ```app/models/blog.js\n import DS from 'ember-data';\n export default DS.Model.extend({\n users: DS.hasMany('user'),\n owner: DS.belongsTo('user'),\n posts: DS.hasMany('post'),\n title: DS.attr('string')\n });\n ```\n ```js\n import Ember from 'ember';\n import Blog from 'app/models/blog';\n let fields = Ember.get(Blog, 'fields');\n fields.forEach(function(kind, field) {\n console.log(field, kind);\n });\n // prints:\n // users, hasMany\n // owner, belongsTo\n // posts, hasMany\n // title, attribute\n ```\n @property fields\n @static\n @type Ember.Map\n @readOnly\n */\n fields: computed(function () {\n var map = Map.create();\n\n this.eachComputedProperty(function (name, meta) {\n if (meta.isRelationship) {\n map.set(name, meta.kind);\n } else if (meta.isAttribute) {\n map.set(name, 'attribute');\n }\n });\n\n return map;\n }).readOnly(),\n\n eachRelationship: function (callback, binding) {\n get(this, 'relationshipsByName').forEach(function (relationship, name) {\n callback.call(binding, name, relationship);\n });\n },\n eachRelatedType: function (callback, binding) {\n var relationshipTypes = get(this, 'relatedTypes');\n\n for (var i = 0; i < relationshipTypes.length; i++) {\n var type = relationshipTypes[i];\n callback.call(binding, type);\n }\n },\n determineRelationshipType: function (knownSide, store) {\n var knownKey = knownSide.key;\n var knownKind = knownSide.kind;\n var inverse = this.inverseFor(knownKey, store);\n // let key;\n var otherKind = void 0;\n\n if (!inverse) {\n return knownKind === 'belongsTo' ? 'oneToNone' : 'manyToNone';\n }\n\n // key = inverse.name;\n otherKind = inverse.kind;\n\n if (otherKind === 'belongsTo') {\n return knownKind === 'belongsTo' ? 'oneToOne' : 'manyToOne';\n } else {\n return knownKind === 'belongsTo' ? 'oneToMany' : 'manyToMany';\n }\n },\n\n\n /**\n A map whose keys are the attributes of the model (properties\n described by DS.attr) and whose values are the meta object for the\n property.\n Example\n ```app/models/person.js\n import DS from 'ember-data';\n export default DS.Model.extend({\n firstName: DS.attr('string'),\n lastName: DS.attr('string'),\n birthday: DS.attr('date')\n });\n ```\n ```javascript\n import Ember from 'ember';\n import Person from 'app/models/person';\n let attributes = Ember.get(Person, 'attributes')\n attributes.forEach(function(meta, name) {\n console.log(name, meta);\n });\n // prints:\n // firstName {type: \"string\", isAttribute: true, options: Object, parentType: function, name: \"firstName\"}\n // lastName {type: \"string\", isAttribute: true, options: Object, parentType: function, name: \"lastName\"}\n // birthday {type: \"date\", isAttribute: true, options: Object, parentType: function, name: \"birthday\"}\n ```\n @property attributes\n @static\n @type {Ember.Map}\n @readOnly\n */\n attributes: computed(function () {\n var _this3 = this;\n\n var map = Map.create();\n\n this.eachComputedProperty(function (name, meta) {\n if (meta.isAttribute) {\n (false && Ember.assert(\"You may not set `id` as an attribute on your model. Please remove any lines that look like: `id: DS.attr('<type>')` from \" + _this3.toString(), name !== 'id'));\n\n\n meta.name = name;\n map.set(name, meta);\n }\n });\n\n return map;\n }).readOnly(),\n\n /**\n A map whose keys are the attributes of the model (properties\n described by DS.attr) and whose values are type of transformation\n applied to each attribute. This map does not include any\n attributes that do not have an transformation type.\n Example\n ```app/models/person.js\n import DS from 'ember-data';\n export default DS.Model.extend({\n firstName: DS.attr(),\n lastName: DS.attr('string'),\n birthday: DS.attr('date')\n });\n ```\n ```javascript\n import Ember from 'ember';\n import Person from 'app/models/person';\n let transformedAttributes = Ember.get(Person, 'transformedAttributes')\n transformedAttributes.forEach(function(field, type) {\n console.log(field, type);\n });\n // prints:\n // lastName string\n // birthday date\n ```\n @property transformedAttributes\n @static\n @type {Ember.Map}\n @readOnly\n */\n transformedAttributes: computed(function () {\n var map = Map.create();\n\n this.eachAttribute(function (key, meta) {\n if (meta.type) {\n map.set(key, meta.type);\n }\n });\n\n return map;\n }).readOnly(),\n\n eachAttribute: function (callback, binding) {\n get(this, 'attributes').forEach(function (meta, name) {\n callback.call(binding, name, meta);\n });\n },\n eachTransformedAttribute: function (callback, binding) {\n get(this, 'transformedAttributes').forEach(function (type, name) {\n callback.call(binding, name, type);\n });\n }\n });\n\n if ((0, _features.default)('ds-rollback-attribute')) {\n Model.reopen({\n rollbackAttribute: function (attributeName) {\n if (attributeName in this._internalModel._attributes) {\n this.set(attributeName, this._internalModel.lastAcknowledgedValue(attributeName));\n }\n }\n });\n }\n\n if (false) {\n Model.reopen({\n willMergeMixin: function (props) {\n var constructor = this.constructor;\n (false && Ember.assert('`' + intersection(Object.keys(props), RESERVED_MODEL_PROPS)[0] + '` is a reserved property name on DS.Model objects. Please choose a different property name for ' + constructor.toString(), !intersection(Object.keys(props), RESERVED_MODEL_PROPS)[0]));\n (false && Ember.assert(\"You may not set `id` as an attribute on your model. Please remove any lines that look like: `id: DS.attr('<type>')` from \" + constructor.toString(), Object.keys(props).indexOf('id') === -1));\n },\n didDefineProperty: function (proto, key, value) {\n // Check if the value being set is a computed property.\n if (value instanceof ComputedProperty) {\n\n // If it is, get the metadata for the relationship. This is\n // populated by the `DS.belongsTo` helper when it is creating\n // the computed property.\n var meta = value.meta();\n\n /*\n This is buggy because if the parent has never been looked up\n via `modelFor` it will not have `modelName` set.\n */\n meta.parentType = proto.constructor;\n }\n }\n });\n }\n\n exports.default = Model;\n});","define('ember-data/-private/system/model/states', ['exports'], function (exports) {\n 'use strict';\n\n exports.__esModule = true;\n\n\n /*\n This file encapsulates the various states that a record can transition\n through during its lifecycle.\n */\n /**\n ### State\n \n Each record has a `currentState` property that explicitly tracks what\n state a record is in at any given time. For instance, if a record is\n newly created and has not yet been sent to the adapter to be saved,\n it would be in the `root.loaded.created.uncommitted` state. If a\n record has had local modifications made to it that are in the\n process of being saved, the record would be in the\n `root.loaded.updated.inFlight` state. (This state paths will be\n explained in more detail below.)\n \n Events are sent by the record or its store to the record's\n `currentState` property. How the state reacts to these events is\n dependent on which state it is in. In some states, certain events\n will be invalid and will cause an exception to be raised.\n \n States are hierarchical and every state is a substate of the\n `RootState`. For example, a record can be in the\n `root.deleted.uncommitted` state, then transition into the\n `root.deleted.inFlight` state. If a child state does not implement\n an event handler, the state manager will attempt to invoke the event\n on all parent states until the root state is reached. The state\n hierarchy of a record is described in terms of a path string. You\n can determine a record's current state by getting the state's\n `stateName` property:\n \n ```javascript\n record.get('currentState.stateName');\n //=> \"root.created.uncommitted\"\n ```\n \n The hierarchy of valid states that ship with ember data looks like\n this:\n \n ```text\n * root\n * deleted\n * saved\n * uncommitted\n * inFlight\n * empty\n * loaded\n * created\n * uncommitted\n * inFlight\n * saved\n * updated\n * uncommitted\n * inFlight\n * loading\n ```\n \n The `DS.Model` states are themselves stateless. What that means is\n that, the hierarchical states that each of *those* points to is a\n shared data structure. For performance reasons, instead of each\n record getting its own copy of the hierarchy of states, each record\n points to this global, immutable shared instance. How does a state\n know which record it should be acting on? We pass the record\n instance into the state's event handlers as the first argument.\n \n The record passed as the first parameter is where you should stash\n state about the record if needed; you should never store data on the state\n object itself.\n \n ### Events and Flags\n \n A state may implement zero or more events and flags.\n \n #### Events\n \n Events are named functions that are invoked when sent to a record. The\n record will first look for a method with the given name on the\n current state. If no method is found, it will search the current\n state's parent, and then its grandparent, and so on until reaching\n the top of the hierarchy. If the root is reached without an event\n handler being found, an exception will be raised. This can be very\n helpful when debugging new features.\n \n Here's an example implementation of a state with a `myEvent` event handler:\n \n ```javascript\n aState: DS.State.create({\n myEvent: function(manager, param) {\n console.log(\"Received myEvent with\", param);\n }\n })\n ```\n \n To trigger this event:\n \n ```javascript\n record.send('myEvent', 'foo');\n //=> \"Received myEvent with foo\"\n ```\n \n Note that an optional parameter can be sent to a record's `send()` method,\n which will be passed as the second parameter to the event handler.\n \n Events should transition to a different state if appropriate. This can be\n done by calling the record's `transitionTo()` method with a path to the\n desired state. The state manager will attempt to resolve the state path\n relative to the current state. If no state is found at that path, it will\n attempt to resolve it relative to the current state's parent, and then its\n parent, and so on until the root is reached. For example, imagine a hierarchy\n like this:\n \n * created\n * uncommitted <-- currentState\n * inFlight\n * updated\n * inFlight\n \n If we are currently in the `uncommitted` state, calling\n `transitionTo('inFlight')` would transition to the `created.inFlight` state,\n while calling `transitionTo('updated.inFlight')` would transition to\n the `updated.inFlight` state.\n \n Remember that *only events* should ever cause a state transition. You should\n never call `transitionTo()` from outside a state's event handler. If you are\n tempted to do so, create a new event and send that to the state manager.\n \n #### Flags\n \n Flags are Boolean values that can be used to introspect a record's current\n state in a more user-friendly way than examining its state path. For example,\n instead of doing this:\n \n ```javascript\n var statePath = record.get('stateManager.currentPath');\n if (statePath === 'created.inFlight') {\n doSomething();\n }\n ```\n \n You can say:\n \n ```javascript\n if (record.get('isNew') && record.get('isSaving')) {\n doSomething();\n }\n ```\n \n If your state does not set a value for a given flag, the value will\n be inherited from its parent (or the first place in the state hierarchy\n where it is defined).\n \n The current set of flags are defined below. If you want to add a new flag,\n in addition to the area below, you will also need to declare it in the\n `DS.Model` class.\n \n \n * [isEmpty](DS.Model.html#property_isEmpty)\n * [isLoading](DS.Model.html#property_isLoading)\n * [isLoaded](DS.Model.html#property_isLoaded)\n * [hasDirtyAttributes](DS.Model.html#property_hasDirtyAttributes)\n * [isSaving](DS.Model.html#property_isSaving)\n * [isDeleted](DS.Model.html#property_isDeleted)\n * [isNew](DS.Model.html#property_isNew)\n * [isValid](DS.Model.html#property_isValid)\n \n @namespace DS\n @class RootState\n */\n\n function didSetProperty(internalModel, context) {\n if (context.value === context.originalValue) {\n delete internalModel._attributes[context.name];\n internalModel.send('propertyWasReset', context.name);\n } else if (context.value !== context.oldValue) {\n internalModel.send('becomeDirty');\n }\n\n internalModel.updateRecordArrays();\n }\n\n // Implementation notes:\n //\n // Each state has a boolean value for all of the following flags:\n //\n // * isLoaded: The record has a populated `data` property. When a\n // record is loaded via `store.find`, `isLoaded` is false\n // until the adapter sets it. When a record is created locally,\n // its `isLoaded` property is always true.\n // * isDirty: The record has local changes that have not yet been\n // saved by the adapter. This includes records that have been\n // created (but not yet saved) or deleted.\n // * isSaving: The record has been committed, but\n // the adapter has not yet acknowledged that the changes have\n // been persisted to the backend.\n // * isDeleted: The record was marked for deletion. When `isDeleted`\n // is true and `isDirty` is true, the record is deleted locally\n // but the deletion was not yet persisted. When `isSaving` is\n // true, the change is in-flight. When both `isDirty` and\n // `isSaving` are false, the change has persisted.\n // * isNew: The record was created on the client and the adapter\n // did not yet report that it was successfully saved.\n // * isValid: The adapter did not report any server-side validation\n // failures.\n\n // The dirty state is a abstract state whose functionality is\n // shared between the `created` and `updated` states.\n //\n // The deleted state shares the `isDirty` flag with the\n // subclasses of `DirtyState`, but with a very different\n // implementation.\n //\n // Dirty states have three child states:\n //\n // `uncommitted`: the store has not yet handed off the record\n // to be saved.\n // `inFlight`: the store has handed off the record to be saved,\n // but the adapter has not yet acknowledged success.\n // `invalid`: the record has invalid information and cannot be\n // sent to the adapter yet.\n /**\n @module ember-data\n */\n var DirtyState = {\n initialState: 'uncommitted',\n\n // FLAGS\n isDirty: true,\n\n // SUBSTATES\n\n // When a record first becomes dirty, it is `uncommitted`.\n // This means that there are local pending changes, but they\n // have not yet begun to be saved, and are not invalid.\n uncommitted: {\n // EVENTS\n didSetProperty: didSetProperty,\n\n loadingData: function () {},\n propertyWasReset: function (internalModel, name) {\n if (!internalModel.hasChangedAttributes()) {\n internalModel.send('rolledBack');\n }\n },\n pushedData: function (internalModel) {\n internalModel.updateChangedAttributes();\n\n if (!internalModel.hasChangedAttributes()) {\n internalModel.transitionTo('loaded.saved');\n }\n },\n becomeDirty: function () {},\n willCommit: function (internalModel) {\n internalModel.transitionTo('inFlight');\n },\n reloadRecord: function (internalModel, resolve) {\n resolve(internalModel.store._reloadRecord(internalModel));\n },\n rolledBack: function (internalModel) {\n internalModel.transitionTo('loaded.saved');\n },\n becameInvalid: function (internalModel) {\n internalModel.transitionTo('invalid');\n },\n rollback: function (internalModel) {\n internalModel.rollbackAttributes();\n internalModel.triggerLater('ready');\n }\n },\n\n // Once a record has been handed off to the adapter to be\n // saved, it is in the 'in flight' state. Changes to the\n // record cannot be made during this window.\n inFlight: {\n // FLAGS\n isSaving: true,\n\n // EVENTS\n didSetProperty: didSetProperty,\n becomeDirty: function () {},\n pushedData: function () {},\n\n\n unloadRecord: assertAgainstUnloadRecord,\n\n willCommit: function () {},\n didCommit: function (internalModel) {\n internalModel.transitionTo('saved');\n internalModel.send('invokeLifecycleCallbacks', this.dirtyType);\n },\n becameInvalid: function (internalModel) {\n internalModel.transitionTo('invalid');\n internalModel.send('invokeLifecycleCallbacks');\n },\n becameError: function (internalModel) {\n internalModel.transitionTo('uncommitted');\n internalModel.triggerLater('becameError', internalModel);\n }\n },\n\n // A record is in the `invalid` if the adapter has indicated\n // the the record failed server-side invalidations.\n invalid: {\n // FLAGS\n isValid: false,\n\n deleteRecord: function (internalModel) {\n internalModel.transitionTo('deleted.uncommitted');\n },\n didSetProperty: function (internalModel, context) {\n internalModel.removeErrorMessageFromAttribute(context.name);\n\n didSetProperty(internalModel, context);\n\n if (!internalModel.hasErrors()) {\n this.becameValid(internalModel);\n }\n },\n becameInvalid: function () {},\n becomeDirty: function () {},\n pushedData: function () {},\n willCommit: function (internalModel) {\n internalModel.clearErrorMessages();\n internalModel.transitionTo('inFlight');\n },\n rolledBack: function (internalModel) {\n internalModel.clearErrorMessages();\n internalModel.transitionTo('loaded.saved');\n internalModel.triggerLater('ready');\n },\n becameValid: function (internalModel) {\n internalModel.transitionTo('uncommitted');\n },\n invokeLifecycleCallbacks: function (internalModel) {\n internalModel.triggerLater('becameInvalid', internalModel);\n }\n }\n };\n\n // The created and updated states are created outside the state\n // chart so we can reopen their substates and add mixins as\n // necessary.\n\n function deepClone(object) {\n var clone = {};\n var value = void 0;\n\n for (var prop in object) {\n value = object[prop];\n if (value && typeof value === 'object') {\n clone[prop] = deepClone(value);\n } else {\n clone[prop] = value;\n }\n }\n\n return clone;\n }\n\n function mixin(original, hash) {\n for (var prop in hash) {\n original[prop] = hash[prop];\n }\n\n return original;\n }\n\n function dirtyState(options) {\n var newState = deepClone(DirtyState);\n return mixin(newState, options);\n }\n\n var createdState = dirtyState({\n dirtyType: 'created',\n // FLAGS\n isNew: true\n });\n\n createdState.invalid.rolledBack = function (internalModel) {\n internalModel.transitionTo('deleted.saved');\n };\n\n createdState.uncommitted.rolledBack = function (internalModel) {\n internalModel.transitionTo('deleted.saved');\n };\n\n var updatedState = dirtyState({\n dirtyType: 'updated'\n });\n\n function createdStateDeleteRecord(internalModel) {\n internalModel.transitionTo('deleted.saved');\n internalModel.send('invokeLifecycleCallbacks');\n }\n\n createdState.uncommitted.deleteRecord = createdStateDeleteRecord;\n\n createdState.invalid.deleteRecord = createdStateDeleteRecord;\n\n createdState.uncommitted.rollback = function (internalModel) {\n DirtyState.uncommitted.rollback.apply(this, arguments);\n internalModel.transitionTo('deleted.saved');\n };\n\n createdState.uncommitted.pushedData = function (internalModel) {\n internalModel.transitionTo('loaded.updated.uncommitted');\n internalModel.triggerLater('didLoad');\n };\n\n createdState.uncommitted.propertyWasReset = function () {};\n\n function assertAgainstUnloadRecord(internalModel) {\n (false && Ember.assert(\"You can only unload a record which is not inFlight. `\" + internalModel + \"`\", false));\n }\n\n updatedState.invalid.becameValid = function (internalModel) {\n // we're eagerly transition into the loaded.saved state, even though we could\n // be still dirty; but the setup hook of the loaded.saved state checks for\n // dirty attributes and transitions into the corresponding dirty state\n internalModel.transitionTo('loaded.saved');\n };\n\n updatedState.inFlight.unloadRecord = assertAgainstUnloadRecord;\n\n updatedState.uncommitted.deleteRecord = function (internalModel) {\n internalModel.transitionTo('deleted.uncommitted');\n };\n\n var RootState = {\n // FLAGS\n isEmpty: false,\n isLoading: false,\n isLoaded: false,\n isDirty: false,\n isSaving: false,\n isDeleted: false,\n isNew: false,\n isValid: true,\n\n rolledBack: function () {},\n unloadRecord: function (internalModel) {},\n propertyWasReset: function () {},\n\n\n // SUBSTATES\n\n // A record begins its lifecycle in the `empty` state.\n // If its data will come from the adapter, it will\n // transition into the `loading` state. Otherwise, if\n // the record is being created on the client, it will\n // transition into the `created` state.\n empty: {\n isEmpty: true,\n\n loadingData: function (internalModel, promise) {\n internalModel._loadingPromise = promise;\n internalModel.transitionTo('loading');\n },\n loadedData: function (internalModel) {\n internalModel.transitionTo('loaded.created.uncommitted');\n internalModel.triggerLater('ready');\n },\n pushedData: function (internalModel) {\n internalModel.transitionTo('loaded.saved');\n internalModel.triggerLater('didLoad');\n internalModel.triggerLater('ready');\n }\n },\n\n // A record enters this state when the store asks\n // the adapter for its data. It remains in this state\n // until the adapter provides the requested data.\n //\n // Usually, this process is asynchronous, using an\n // XHR to retrieve the data.\n loading: {\n // FLAGS\n isLoading: true,\n\n exit: function (internalModel) {\n internalModel._loadingPromise = null;\n },\n pushedData: function (internalModel) {\n internalModel.transitionTo('loaded.saved');\n internalModel.triggerLater('didLoad');\n internalModel.triggerLater('ready');\n //TODO this seems out of place here\n internalModel.didCleanError();\n },\n becameError: function (internalModel) {\n internalModel.triggerLater('becameError', internalModel);\n },\n notFound: function (internalModel) {\n internalModel.transitionTo('empty');\n }\n },\n\n // A record enters this state when its data is populated.\n // Most of a record's lifecycle is spent inside substates\n // of the `loaded` state.\n loaded: {\n initialState: 'saved',\n\n // FLAGS\n isLoaded: true,\n\n loadingData: function () {},\n\n\n // SUBSTATES\n\n // If there are no local changes to a record, it remains\n // in the `saved` state.\n saved: {\n setup: function (internalModel) {\n if (internalModel.hasChangedAttributes()) {\n internalModel.adapterDidDirty();\n }\n },\n\n\n // EVENTS\n didSetProperty: didSetProperty,\n\n pushedData: function () {},\n becomeDirty: function (internalModel) {\n internalModel.transitionTo('updated.uncommitted');\n },\n willCommit: function (internalModel) {\n internalModel.transitionTo('updated.inFlight');\n },\n reloadRecord: function (internalModel, resolve) {\n resolve(internalModel.store._reloadRecord(internalModel));\n },\n deleteRecord: function (internalModel) {\n internalModel.transitionTo('deleted.uncommitted');\n },\n unloadRecord: function (internalModel) {},\n didCommit: function () {},\n notFound: function () {}\n },\n\n // A record is in this state after it has been locally\n // created but before the adapter has indicated that\n // it has been saved.\n created: createdState,\n\n // A record is in this state if it has already been\n // saved to the server, but there are new local changes\n // that have not yet been saved.\n updated: updatedState\n },\n\n // A record is in this state if it was deleted from the store.\n deleted: {\n initialState: 'uncommitted',\n dirtyType: 'deleted',\n\n // FLAGS\n isDeleted: true,\n isLoaded: true,\n isDirty: true,\n\n setup: function (internalModel) {\n internalModel.updateRecordArrays();\n },\n\n\n // SUBSTATES\n\n // When a record is deleted, it enters the `start`\n // state. It will exit this state when the record\n // starts to commit.\n uncommitted: {\n willCommit: function (internalModel) {\n internalModel.transitionTo('inFlight');\n },\n rollback: function (internalModel) {\n internalModel.rollbackAttributes();\n internalModel.triggerLater('ready');\n },\n pushedData: function () {},\n becomeDirty: function () {},\n deleteRecord: function () {},\n rolledBack: function (internalModel) {\n internalModel.transitionTo('loaded.saved');\n internalModel.triggerLater('ready');\n }\n },\n\n // After a record starts committing, but\n // before the adapter indicates that the deletion\n // has saved to the server, a record is in the\n // `inFlight` substate of `deleted`.\n inFlight: {\n // FLAGS\n isSaving: true,\n\n // EVENTS\n\n unloadRecord: assertAgainstUnloadRecord,\n\n willCommit: function () {},\n didCommit: function (internalModel) {\n internalModel.transitionTo('saved');\n\n internalModel.send('invokeLifecycleCallbacks');\n },\n becameError: function (internalModel) {\n internalModel.transitionTo('uncommitted');\n internalModel.triggerLater('becameError', internalModel);\n },\n becameInvalid: function (internalModel) {\n internalModel.transitionTo('invalid');\n internalModel.triggerLater('becameInvalid', internalModel);\n }\n },\n\n // Once the adapter indicates that the deletion has\n // been saved, the record enters the `saved` substate\n // of `deleted`.\n saved: {\n // FLAGS\n isDirty: false,\n\n setup: function (internalModel) {\n internalModel.removeFromInverseRelationships();\n },\n invokeLifecycleCallbacks: function (internalModel) {\n internalModel.triggerLater('didDelete', internalModel);\n internalModel.triggerLater('didCommit', internalModel);\n },\n willCommit: function () {},\n didCommit: function () {}\n },\n\n invalid: {\n isValid: false,\n\n didSetProperty: function (internalModel, context) {\n internalModel.removeErrorMessageFromAttribute(context.name);\n\n didSetProperty(internalModel, context);\n\n if (!internalModel.hasErrors()) {\n this.becameValid(internalModel);\n }\n },\n becameInvalid: function () {},\n becomeDirty: function () {},\n deleteRecord: function () {},\n willCommit: function () {},\n rolledBack: function (internalModel) {\n internalModel.clearErrorMessages();\n internalModel.transitionTo('loaded.saved');\n internalModel.triggerLater('ready');\n },\n becameValid: function (internalModel) {\n internalModel.transitionTo('uncommitted');\n }\n }\n },\n\n invokeLifecycleCallbacks: function (internalModel, dirtyType) {\n if (dirtyType === 'created') {\n internalModel.triggerLater('didCreate', internalModel);\n } else {\n internalModel.triggerLater('didUpdate', internalModel);\n }\n\n internalModel.triggerLater('didCommit', internalModel);\n }\n };\n\n function wireState(object, parent, name) {\n // TODO: Use Object.create and copy instead\n object = mixin(parent ? Object.create(parent) : {}, object);\n object.parentState = parent;\n object.stateName = name;\n\n for (var prop in object) {\n if (!object.hasOwnProperty(prop) || prop === 'parentState' || prop === 'stateName') {\n continue;\n }\n if (typeof object[prop] === 'object') {\n object[prop] = wireState(object[prop], object, name + '.' + prop);\n }\n }\n\n return object;\n }\n\n exports.default = wireState(RootState, null, 'root');\n});","define('ember-data/-private/system/normalize-link', ['exports'], function (exports) {\n 'use strict';\n\n exports.__esModule = true;\n exports.default = _normalizeLink;\n /*\n This method normalizes a link to an \"links object\". If the passed link is\n already an object it's returned without any modifications.\n \n See http://jsonapi.org/format/#document-links for more information.\n \n @method _normalizeLink\n @private\n @param {String} link\n @return {Object|null}\n @for DS\n */\n function _normalizeLink(link) {\n switch (typeof link) {\n case 'object':\n return link;\n case 'string':\n return { href: link };\n }\n return null;\n }\n});","define('ember-data/-private/system/normalize-model-name', ['exports'], function (exports) {\n 'use strict';\n\n exports.__esModule = true;\n exports.default = normalizeModelName;\n var dasherize = Ember.String.dasherize;\n\n\n // All modelNames are dasherized internally. Changing this function may\n // require changes to other normalization hooks (such as typeForRoot).\n\n /**\n This method normalizes a modelName into the format Ember Data uses\n internally.\n \n @method normalizeModelName\n @public\n @param {String} modelName\n @return {String} normalizedModelName\n @for DS\n */\n function normalizeModelName(modelName) {\n return dasherize(modelName);\n }\n});","define('ember-data/-private/system/ordered-set', ['exports'], function (exports) {\n 'use strict';\n\n exports.__esModule = true;\n exports.default = OrderedSet;\n var guidFor = Ember.guidFor;\n\n\n var EmberOrderedSet = Ember.OrderedSet;\n\n function OrderedSet() {\n this._super$constructor();\n }\n\n OrderedSet.create = function () {\n var Constructor = this;\n return new Constructor();\n };\n\n OrderedSet.prototype = Object.create(EmberOrderedSet.prototype);\n OrderedSet.prototype.constructor = OrderedSet;\n OrderedSet.prototype._super$constructor = EmberOrderedSet;\n\n OrderedSet.prototype.addWithIndex = function (obj, idx) {\n var guid = guidFor(obj);\n var presenceSet = this.presenceSet;\n var list = this.list;\n\n if (presenceSet[guid] === true) {\n return;\n }\n\n presenceSet[guid] = true;\n\n if (idx === undefined || idx === null) {\n list.push(obj);\n } else {\n list.splice(idx, 0, obj);\n }\n\n this.size += 1;\n\n return this;\n };\n});","define('ember-data/-private/system/promise-proxies', ['exports'], function (exports) {\n 'use strict';\n\n exports.__esModule = true;\n exports.promiseObject = promiseObject;\n exports.promiseArray = promiseArray;\n exports.proxyToContent = proxyToContent;\n exports.promiseManyArray = promiseManyArray;\n var ObjectProxy = Ember.ObjectProxy;\n var PromiseProxyMixin = Ember.PromiseProxyMixin;\n var ArrayProxy = Ember.ArrayProxy;\n var get = Ember.get;\n var reads = Ember.computed.reads;\n var Promise = Ember.RSVP.Promise;\n\n\n /**\n A `PromiseArray` is an object that acts like both an `Ember.Array`\n and a promise. When the promise is resolved the resulting value\n will be set to the `PromiseArray`'s `content` property. This makes\n it easy to create data bindings with the `PromiseArray` that will be\n updated when the promise resolves.\n \n For more information see the [Ember.PromiseProxyMixin\n documentation](/api/classes/Ember.PromiseProxyMixin.html).\n \n Example\n \n ```javascript\n let promiseArray = DS.PromiseArray.create({\n promise: $.getJSON('/some/remote/data.json')\n });\n \n promiseArray.get('length'); // 0\n \n promiseArray.then(function() {\n promiseArray.get('length'); // 100\n });\n ```\n \n @class PromiseArray\n @namespace DS\n @extends Ember.ArrayProxy\n @uses Ember.PromiseProxyMixin\n */\n var PromiseArray = exports.PromiseArray = ArrayProxy.extend(PromiseProxyMixin, {\n meta: reads('content.meta')\n });\n\n /**\n A `PromiseObject` is an object that acts like both an `Ember.Object`\n and a promise. When the promise is resolved, then the resulting value\n will be set to the `PromiseObject`'s `content` property. This makes\n it easy to create data bindings with the `PromiseObject` that will\n be updated when the promise resolves.\n \n For more information see the [Ember.PromiseProxyMixin\n documentation](/api/classes/Ember.PromiseProxyMixin.html).\n \n Example\n \n ```javascript\n let promiseObject = DS.PromiseObject.create({\n promise: $.getJSON('/some/remote/data.json')\n });\n \n promiseObject.get('name'); // null\n \n promiseObject.then(function() {\n promiseObject.get('name'); // 'Tomster'\n });\n ```\n \n @class PromiseObject\n @namespace DS\n @extends Ember.ObjectProxy\n @uses Ember.PromiseProxyMixin\n */\n var PromiseObject = exports.PromiseObject = ObjectProxy.extend(PromiseProxyMixin);\n\n function promiseObject(promise, label) {\n return PromiseObject.create({\n promise: Promise.resolve(promise, label)\n });\n }\n\n function promiseArray(promise, label) {\n return PromiseArray.create({\n promise: Promise.resolve(promise, label)\n });\n }\n\n /**\n A PromiseManyArray is a PromiseArray that also proxies certain method calls\n to the underlying manyArray.\n Right now we proxy:\n \n * `reload()`\n * `createRecord()`\n * `on()`\n * `one()`\n * `trigger()`\n * `off()`\n * `has()`\n \n @class PromiseManyArray\n @namespace DS\n @extends Ember.ArrayProxy\n */\n\n function proxyToContent(method) {\n return function () {\n var _get;\n\n return (_get = get(this, 'content'))[method].apply(_get, arguments);\n };\n }\n\n var PromiseManyArray = exports.PromiseManyArray = PromiseArray.extend({\n reload: function () {\n (false && Ember.assert('You are trying to reload an async manyArray before it has been created', get(this, 'content')));\n\n this.set('promise', this.get('content').reload());\n return this;\n },\n\n\n createRecord: proxyToContent('createRecord'),\n\n on: proxyToContent('on'),\n\n one: proxyToContent('one'),\n\n trigger: proxyToContent('trigger'),\n\n off: proxyToContent('off'),\n\n has: proxyToContent('has')\n });\n\n function promiseManyArray(promise, label) {\n return PromiseManyArray.create({\n promise: Promise.resolve(promise, label)\n });\n }\n});","define('ember-data/-private/system/record-array-manager', ['exports', 'ember-data/-private/system/record-arrays', 'ember-data/-private/system/clone-null'], function (exports, _recordArrays, _cloneNull) {\n 'use strict';\n\n exports.__esModule = true;\n exports.associateWithRecordArray = associateWithRecordArray;\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var A = Ember.A;\n var set = Ember.set;\n var get = Ember.get;\n var emberRun = Ember.run;\n\n var RecordArrayManager = function () {\n function RecordArrayManager(options) {\n _classCallCheck(this, RecordArrayManager);\n\n this.store = options.store;\n this.isDestroying = false;\n this.isDestroyed = false;\n this._filteredRecordArrays = Object.create(null);\n this._liveRecordArrays = Object.create(null);\n this._pending = Object.create(null);\n this._adapterPopulatedRecordArrays = [];\n }\n\n RecordArrayManager.prototype.recordDidChange = function recordDidChange(internalModel) {\n // TODO: change name\n // TODO: track that it was also a change\n this.internalModelDidChange(internalModel);\n };\n\n RecordArrayManager.prototype.recordWasLoaded = function recordWasLoaded(internalModel) {\n // TODO: change name\n // TODO: track that it was also that it was first loaded\n this.internalModelDidChange(internalModel);\n };\n\n RecordArrayManager.prototype.internalModelDidChange = function internalModelDidChange(internalModel) {\n\n var modelName = internalModel.modelName;\n\n if (internalModel._pendingRecordArrayManagerFlush) {\n return;\n }\n\n internalModel._pendingRecordArrayManagerFlush = true;\n\n var pending = this._pending;\n var models = pending[modelName] = pending[modelName] || [];\n if (models.push(internalModel) !== 1) {\n return;\n }\n\n emberRun.schedule('actions', this, this._flush);\n };\n\n RecordArrayManager.prototype._flush = function _flush() {\n\n var pending = this._pending;\n this._pending = Object.create(null);\n var modelsToRemove = [];\n\n for (var modelName in pending) {\n var internalModels = pending[modelName];\n for (var j = 0; j < internalModels.length; j++) {\n var internalModel = internalModels[j];\n // mark internalModels, so they can once again be processed by the\n // recordArrayManager\n internalModel._pendingRecordArrayManagerFlush = false;\n // build up a set of models to ensure we have purged correctly;\n if (internalModel.isHiddenFromRecordArrays()) {\n modelsToRemove.push(internalModel);\n }\n }\n\n // process filteredRecordArrays\n if (this._filteredRecordArrays[modelName]) {\n var recordArrays = this.filteredRecordArraysFor(modelName);\n for (var i = 0; i < recordArrays.length; i++) {\n this.updateFilterRecordArray(recordArrays[i], modelName, internalModels);\n }\n }\n\n var array = this._liveRecordArrays[modelName];\n if (array) {\n // TODO: skip if it only changed\n // process liveRecordArrays\n this.updateLiveRecordArray(array, internalModels);\n }\n\n // process adapterPopulatedRecordArrays\n if (modelsToRemove.length > 0) {\n removeFromAdapterPopulatedRecordArrays(modelsToRemove);\n }\n }\n };\n\n RecordArrayManager.prototype.updateLiveRecordArray = function updateLiveRecordArray(array, internalModels) {\n return _updateLiveRecordArray(array, internalModels);\n };\n\n RecordArrayManager.prototype.updateFilterRecordArray = function updateFilterRecordArray(array, modelName, internalModels) {\n\n var filter = get(array, 'filterFunction');\n\n var shouldBeInAdded = [];\n var shouldBeRemoved = [];\n\n for (var i = 0; i < internalModels.length; i++) {\n var internalModel = internalModels[i];\n if (internalModel.isHiddenFromRecordArrays() === false && filter(internalModel.getRecord())) {\n if (internalModel._recordArrays.has(array)) {\n continue;\n }\n shouldBeInAdded.push(internalModel);\n internalModel._recordArrays.add(array);\n } else {\n if (internalModel._recordArrays.delete(array)) {\n shouldBeRemoved.push(internalModel);\n }\n }\n }\n\n if (shouldBeInAdded.length > 0) {\n array._pushInternalModels(shouldBeInAdded);\n }\n if (shouldBeRemoved.length > 0) {\n array._removeInternalModels(shouldBeRemoved);\n }\n };\n\n RecordArrayManager.prototype._syncLiveRecordArray = function _syncLiveRecordArray(array, modelName) {\n (false && Ember.assert('recordArrayManger.syncLiveRecordArray expects modelName not modelClass as the second param', typeof modelName === 'string'));\n\n var hasNoPotentialDeletions = Object.keys(this._pending).length === 0;\n var map = this.store._internalModelsFor(modelName);\n var hasNoInsertionsOrRemovals = get(map, 'length') === get(array, 'length');\n\n /*\n Ideally the recordArrayManager has knowledge of the changes to be applied to\n liveRecordArrays, and is capable of strategically flushing those changes and applying\n small diffs if desired. However, until we've refactored recordArrayManager, this dirty\n check prevents us from unnecessarily wiping out live record arrays returned by peekAll.\n */\n if (hasNoPotentialDeletions && hasNoInsertionsOrRemovals) {\n return;\n }\n\n var internalModels = this._visibleInternalModelsByType(modelName);\n var modelsToAdd = [];\n for (var i = 0; i < internalModels.length; i++) {\n var internalModel = internalModels[i];\n var recordArrays = internalModel._recordArrays;\n if (recordArrays.has(array) === false) {\n recordArrays.add(array);\n modelsToAdd.push(internalModel);\n }\n }\n\n array._pushInternalModels(modelsToAdd);\n };\n\n RecordArrayManager.prototype.updateFilter = function updateFilter(array, modelName, filter) {\n (false && Ember.assert('recordArrayManger.updateFilter expects modelName not modelClass as the second param, received ' + modelName, typeof modelName === 'string'));\n\n var modelMap = this.store._internalModelsFor(modelName);\n var internalModels = modelMap.models;\n\n this.updateFilterRecordArray(array, filter, internalModels);\n };\n\n RecordArrayManager.prototype._didUpdateAll = function _didUpdateAll(modelName) {\n var recordArray = this._liveRecordArrays[modelName];\n if (recordArray) {\n set(recordArray, 'isUpdating', false);\n }\n };\n\n RecordArrayManager.prototype.liveRecordArrayFor = function liveRecordArrayFor(modelName) {\n (false && Ember.assert('recordArrayManger.liveRecordArrayFor expects modelName not modelClass as the param', typeof modelName === 'string'));\n\n\n var array = this._liveRecordArrays[modelName];\n\n if (array) {\n // if the array already exists, synchronize\n this._syncLiveRecordArray(array, modelName);\n } else {\n // if the array is being newly created merely create it with its initial\n // content already set. This prevents unneeded change events.\n var internalModels = this._visibleInternalModelsByType(modelName);\n array = this.createRecordArray(modelName, internalModels);\n this._liveRecordArrays[modelName] = array;\n }\n\n return array;\n };\n\n RecordArrayManager.prototype._visibleInternalModelsByType = function _visibleInternalModelsByType(modelName) {\n var all = this.store._internalModelsFor(modelName)._models;\n var visible = [];\n for (var i = 0; i < all.length; i++) {\n var model = all[i];\n if (model.isHiddenFromRecordArrays() === false) {\n visible.push(model);\n }\n }\n return visible;\n };\n\n RecordArrayManager.prototype.filteredRecordArraysFor = function filteredRecordArraysFor(modelName) {\n (false && Ember.assert('recordArrayManger.filteredRecordArraysFor expects modelName not modelClass as the param', typeof modelName === 'string'));\n\n\n return this._filteredRecordArrays[modelName] || (this._filteredRecordArrays[modelName] = []);\n };\n\n RecordArrayManager.prototype.createRecordArray = function createRecordArray(modelName, content) {\n (false && Ember.assert('recordArrayManger.createRecordArray expects modelName not modelClass as the param', typeof modelName === 'string'));\n\n\n var array = _recordArrays.RecordArray.create({\n modelName: modelName,\n content: A(content || []),\n store: this.store,\n isLoaded: true,\n manager: this\n });\n\n if (Array.isArray(content)) {\n associateWithRecordArray(content, array);\n }\n\n return array;\n };\n\n RecordArrayManager.prototype.createFilteredRecordArray = function createFilteredRecordArray(modelName, filter, query) {\n (false && Ember.assert('recordArrayManger.createFilteredRecordArray expects modelName not modelClass as the first param, received ' + modelName, typeof modelName === 'string'));\n\n var array = _recordArrays.FilteredRecordArray.create({\n query: query,\n modelName: modelName,\n content: A(),\n store: this.store,\n manager: this,\n filterFunction: filter\n });\n\n this.registerFilteredRecordArray(array, modelName, filter);\n\n return array;\n };\n\n RecordArrayManager.prototype.createAdapterPopulatedRecordArray = function createAdapterPopulatedRecordArray(modelName, query, internalModels, payload) {\n (false && Ember.assert('recordArrayManger.createAdapterPopulatedRecordArray expects modelName not modelClass as the first param, received ' + modelName, typeof modelName === 'string'));\n\n\n var array = void 0;\n if (Array.isArray(internalModels)) {\n array = _recordArrays.AdapterPopulatedRecordArray.create({\n modelName: modelName,\n query: query,\n content: A(internalModels),\n store: this.store,\n manager: this,\n isLoaded: true,\n isUpdating: false,\n meta: (0, _cloneNull.default)(payload.meta),\n links: (0, _cloneNull.default)(payload.links)\n });\n\n associateWithRecordArray(internalModels, array);\n } else {\n array = _recordArrays.AdapterPopulatedRecordArray.create({\n modelName: modelName,\n query: query,\n content: A(),\n store: this.store,\n manager: this\n });\n }\n\n this._adapterPopulatedRecordArrays.push(array);\n\n return array;\n };\n\n RecordArrayManager.prototype.registerFilteredRecordArray = function registerFilteredRecordArray(array, modelName, filter) {\n (false && Ember.assert('recordArrayManger.registerFilteredRecordArray expects modelName not modelClass as the second param, received ' + modelName, typeof modelName === 'string'));\n\n\n this.filteredRecordArraysFor(modelName).push(array);\n this.updateFilter(array, modelName, filter);\n };\n\n RecordArrayManager.prototype.unregisterRecordArray = function unregisterRecordArray(array) {\n\n var modelName = array.modelName;\n\n // unregister filtered record array\n var recordArrays = this.filteredRecordArraysFor(modelName);\n var removedFromFiltered = remove(recordArrays, array);\n\n // remove from adapter populated record array\n var removedFromAdapterPopulated = remove(this._adapterPopulatedRecordArrays, array);\n\n if (!removedFromFiltered && !removedFromAdapterPopulated) {\n\n var liveRecordArrayForType = this._liveRecordArrays[modelName];\n // unregister live record array\n if (liveRecordArrayForType) {\n if (array === liveRecordArrayForType) {\n delete this._liveRecordArrays[modelName];\n }\n }\n }\n };\n\n RecordArrayManager.prototype.willDestroy = function willDestroy() {\n var _this = this;\n\n Object.keys(this._filteredRecordArrays).forEach(function (modelName) {\n return flatten(_this._filteredRecordArrays[modelName]).forEach(destroy);\n });\n Object.keys(this._liveRecordArrays).forEach(function (modelName) {\n return _this._liveRecordArrays[modelName].destroy();\n });\n this._adapterPopulatedRecordArrays.forEach(destroy);\n this.isDestroyed = true;\n };\n\n RecordArrayManager.prototype.destroy = function destroy() {\n this.isDestroying = true;\n emberRun.schedule('actions', this, this.willDestroy);\n };\n\n return RecordArrayManager;\n }();\n\n exports.default = RecordArrayManager;\n\n\n function destroy(entry) {\n entry.destroy();\n }\n\n function flatten(list) {\n var length = list.length;\n var result = [];\n\n for (var i = 0; i < length; i++) {\n result = result.concat(list[i]);\n }\n\n return result;\n }\n\n function remove(array, item) {\n var index = array.indexOf(item);\n\n if (index !== -1) {\n array.splice(index, 1);\n return true;\n }\n\n return false;\n }\n\n function _updateLiveRecordArray(array, internalModels) {\n var modelsToAdd = [];\n var modelsToRemove = [];\n\n for (var i = 0; i < internalModels.length; i++) {\n var internalModel = internalModels[i];\n var isDeleted = internalModel.isHiddenFromRecordArrays();\n var recordArrays = internalModel._recordArrays;\n\n if (!isDeleted && !internalModel.isEmpty()) {\n if (!recordArrays.has(array)) {\n modelsToAdd.push(internalModel);\n recordArrays.add(array);\n }\n }\n\n if (isDeleted) {\n modelsToRemove.push(internalModel);\n recordArrays.delete(array);\n }\n }\n\n if (modelsToAdd.length > 0) {\n array._pushInternalModels(modelsToAdd);\n }\n if (modelsToRemove.length > 0) {\n array._removeInternalModels(modelsToRemove);\n }\n }\n\n function removeFromAdapterPopulatedRecordArrays(internalModels) {\n for (var i = 0; i < internalModels.length; i++) {\n var internalModel = internalModels[i];\n var list = internalModel._recordArrays.list;\n\n for (var j = 0; j < list.length; j++) {\n // TODO: group by arrays, so we can batch remove\n list[j]._removeInternalModels([internalModel]);\n }\n\n internalModel._recordArrays.clear();\n }\n }\n\n function associateWithRecordArray(internalModels, array) {\n for (var i = 0, l = internalModels.length; i < l; i++) {\n var internalModel = internalModels[i];\n internalModel._recordArrays.add(array);\n }\n }\n});","define(\"ember-data/-private/system/record-arrays\", [\"exports\", \"ember-data/-private/system/record-arrays/record-array\", \"ember-data/-private/system/record-arrays/filtered-record-array\", \"ember-data/-private/system/record-arrays/adapter-populated-record-array\"], function (exports, _recordArray, _filteredRecordArray, _adapterPopulatedRecordArray) {\n \"use strict\";\n\n exports.__esModule = true;\n exports.AdapterPopulatedRecordArray = exports.FilteredRecordArray = exports.RecordArray = undefined;\n exports.RecordArray = _recordArray.default;\n exports.FilteredRecordArray = _filteredRecordArray.default;\n exports.AdapterPopulatedRecordArray = _adapterPopulatedRecordArray.default;\n});","define('ember-data/-private/system/record-arrays/adapter-populated-record-array', ['exports', 'ember-data/-private/system/record-arrays/record-array', 'ember-data/-private/system/clone-null', 'ember-data/-private/system/record-array-manager'], function (exports, _recordArray, _cloneNull, _recordArrayManager) {\n 'use strict';\n\n exports.__esModule = true;\n var once = Ember.run.once;\n var A = Ember.A;\n var get = Ember.get;\n exports.default = _recordArray.default.extend({\n init: function () {\n // yes we are touching `this` before super, but ArrayProxy has a bug that requires this.\n this.set('content', this.get('content') || A());\n\n this._super.apply(this, arguments);\n this.query = this.query || null;\n this.links = this.links || null;\n },\n replace: function () {\n throw new Error('The result of a server query (on ' + this.modelName + ') is immutable.');\n },\n _update: function () {\n var store = get(this, 'store');\n var query = get(this, 'query');\n\n return store._query(this.modelName, query, this);\n },\n\n\n /**\n @method _setInternalModels\n @param {Array} internalModels\n @param {Object} payload normalized payload\n @private\n */\n _setInternalModels: function (internalModels, payload) {\n\n // TODO: initial load should not cause change events at all, only\n // subsequent. This requires changing the public api of adapter.query, but\n // hopefully we can do that soon.\n this.get('content').setObjects(internalModels);\n\n this.setProperties({\n isLoaded: true,\n isUpdating: false,\n meta: (0, _cloneNull.default)(payload.meta),\n links: (0, _cloneNull.default)(payload.links)\n });\n\n (0, _recordArrayManager.associateWithRecordArray)(internalModels, this);\n\n // TODO: should triggering didLoad event be the last action of the runLoop?\n once(this, 'trigger', 'didLoad');\n }\n });\n});","define('ember-data/-private/system/record-arrays/filtered-record-array', ['exports', 'ember-data/-private/system/record-arrays/record-array'], function (exports, _recordArray) {\n 'use strict';\n\n exports.__esModule = true;\n var once = Ember.run.once;\n var get = Ember.get;\n var observer = Ember.observer;\n exports.default = _recordArray.default.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n this.set('filterFunction', this.get('filterFunction') || null);\n this.isLoaded = true;\n },\n\n /**\n The filterFunction is a function used to test records from the store to\n determine if they should be part of the record array.\n Example\n ```javascript\n var allPeople = store.peekAll('person');\n allPeople.mapBy('name'); // [\"Tom Dale\", \"Yehuda Katz\", \"Trek Glowacki\"]\n var people = store.filter('person', function(person) {\n if (person.get('name').match(/Katz$/)) { return true; }\n });\n people.mapBy('name'); // [\"Yehuda Katz\"]\n var notKatzFilter = function(person) {\n return !person.get('name').match(/Katz$/);\n };\n people.set('filterFunction', notKatzFilter);\n people.mapBy('name'); // [\"Tom Dale\", \"Trek Glowacki\"]\n ```\n @method filterFunction\n @param {DS.Model} record\n @return {Boolean} `true` if the record should be in the array\n */\n\n replace: function () {\n throw new Error('The result of a client-side filter (on ' + this.modelName + ') is immutable.');\n },\n\n\n /**\n @method updateFilter\n @private\n */\n _updateFilter: function () {\n if (get(this, 'isDestroying') || get(this, 'isDestroyed')) {\n return;\n }\n get(this, 'manager').updateFilter(this, this.modelName, get(this, 'filterFunction'));\n },\n\n\n updateFilter: observer('filterFunction', function () {\n once(this, this._updateFilter);\n })\n });\n});","define('ember-data/-private/system/record-arrays/record-array', ['exports', 'ember-data/-private/system/promise-proxies', 'ember-data/-private/system/snapshot-record-array'], function (exports, _promiseProxies, _snapshotRecordArray) {\n 'use strict';\n\n exports.__esModule = true;\n var Evented = Ember.Evented;\n var ArrayProxy = Ember.ArrayProxy;\n var set = Ember.set;\n var get = Ember.get;\n var computed = Ember.computed;\n var Promise = Ember.RSVP.Promise;\n exports.default = ArrayProxy.extend(Evented, {\n init: function () {\n this._super.apply(this, arguments);\n\n /**\n The array of client ids backing the record array. When a\n record is requested from the record array, the record\n for the client id at the same index is materialized, if\n necessary, by the store.\n @property content\n @private\n @type Ember.Array\n */\n this.set('content', this.content || null);\n\n /**\n The flag to signal a `RecordArray` is finished loading data.\n Example\n ```javascript\n var people = store.peekAll('person');\n people.get('isLoaded'); // true\n ```\n @property isLoaded\n @type Boolean\n */\n this.isLoaded = this.isLoaded || false;\n /**\n The flag to signal a `RecordArray` is currently loading data.\n Example\n ```javascript\n var people = store.peekAll('person');\n people.get('isUpdating'); // false\n people.update();\n people.get('isUpdating'); // true\n ```\n @property isUpdating\n @type Boolean\n */\n this.isUpdating = false;\n\n /**\n The store that created this record array.\n @property store\n @private\n @type DS.Store\n */\n this.store = this.store || null;\n this._updatingPromise = null;\n },\n replace: function () {\n throw new Error('The result of a server query (for all ' + this.modelName + ' types) is immutable. To modify contents, use toArray()');\n },\n\n\n /**\n The modelClass represented by this record array.\n @property type\n @type DS.Model\n */\n type: computed('modelName', function () {\n if (!this.modelName) {\n return null;\n }\n return this.store._modelFor(this.modelName);\n }).readOnly(),\n\n /**\n Retrieves an object from the content by index.\n @method objectAtContent\n @private\n @param {Number} index\n @return {DS.Model} record\n */\n objectAtContent: function (index) {\n var internalModel = get(this, 'content').objectAt(index);\n return internalModel && internalModel.getRecord();\n },\n\n\n /**\n Used to get the latest version of all of the records in this array\n from the adapter.\n Example\n ```javascript\n var people = store.peekAll('person');\n people.get('isUpdating'); // false\n people.update().then(function() {\n people.get('isUpdating'); // false\n });\n people.get('isUpdating'); // true\n ```\n @method update\n */\n update: function () {\n var _this = this;\n\n if (get(this, 'isUpdating')) {\n return this._updatingPromise;\n }\n\n this.set('isUpdating', true);\n\n var updatingPromise = this._update().finally(function () {\n _this._updatingPromise = null;\n if (_this.get('isDestroying') || _this.get('isDestroyed')) {\n return;\n }\n _this.set('isUpdating', false);\n });\n\n this._updatingPromise = updatingPromise;\n\n return updatingPromise;\n },\n\n\n /*\n Update this RecordArray and return a promise which resolves once the update\n is finished.\n */\n _update: function () {\n return this.store.findAll(this.modelName, { reload: true });\n },\n\n\n /**\n Adds an internal model to the `RecordArray` without duplicates\n @method _pushInternalModels\n @private\n @param {InternalModel} internalModel\n */\n _pushInternalModels: function (internalModels) {\n // pushObjects because the internalModels._recordArrays set was already\n // consulted for inclusion, so addObject and its on .contains call is not\n // required.\n get(this, 'content').pushObjects(internalModels);\n },\n\n\n /**\n Removes an internalModel to the `RecordArray`.\n @method removeInternalModel\n @private\n @param {InternalModel} internalModel\n */\n _removeInternalModels: function (internalModels) {\n get(this, 'content').removeObjects(internalModels);\n },\n\n\n /**\n Saves all of the records in the `RecordArray`.\n Example\n ```javascript\n var messages = store.peekAll('message');\n messages.forEach(function(message) {\n message.set('hasBeenSeen', true);\n });\n messages.save();\n ```\n @method save\n @return {DS.PromiseArray} promise\n */\n save: function () {\n var _this2 = this;\n\n var promiseLabel = 'DS: RecordArray#save ' + this.modelName;\n var promise = Promise.all(this.invoke('save'), promiseLabel).then(function () {\n return _this2;\n }, null, 'DS: RecordArray#save return RecordArray');\n\n return _promiseProxies.PromiseArray.create({ promise: promise });\n },\n _dissociateFromOwnRecords: function () {\n var _this3 = this;\n\n this.get('content').forEach(function (internalModel) {\n var recordArrays = internalModel.__recordArrays;\n\n if (recordArrays) {\n recordArrays.delete(_this3);\n }\n });\n },\n\n\n /**\n @method _unregisterFromManager\n @private\n */\n _unregisterFromManager: function () {\n this.manager.unregisterRecordArray(this);\n },\n willDestroy: function () {\n this._unregisterFromManager();\n this._dissociateFromOwnRecords();\n // TODO: we should not do work during destroy:\n // * when objects are destroyed, they should simply be left to do\n // * if logic errors do to this, that logic needs to be more careful during\n // teardown (ember provides isDestroying/isDestroyed) for this reason\n // * the exception being: if an dominator has a reference to this object,\n // and must be informed to release e.g. e.g. removing itself from th\n // recordArrayMananger\n set(this, 'content', null);\n set(this, 'length', 0);\n this._super.apply(this, arguments);\n },\n\n\n /*\n @method _createSnapshot\n @private\n */\n _createSnapshot: function (options) {\n // this is private for users, but public for ember-data internals\n return new _snapshotRecordArray.default(this, this.get('meta'), options);\n },\n\n\n /*\n @method _takeSnapshot\n @private\n */\n _takeSnapshot: function () {\n return get(this, 'content').map(function (internalModel) {\n return internalModel.createSnapshot();\n });\n }\n });\n});","define('ember-data/-private/system/references', ['exports', 'ember-data/-private/system/references/record', 'ember-data/-private/system/references/belongs-to', 'ember-data/-private/system/references/has-many'], function (exports, _record, _belongsTo, _hasMany) {\n 'use strict';\n\n exports.__esModule = true;\n exports.HasManyReference = exports.BelongsToReference = exports.RecordReference = undefined;\n exports.RecordReference = _record.default;\n exports.BelongsToReference = _belongsTo.default;\n exports.HasManyReference = _hasMany.default;\n});","define('ember-data/-private/system/references/belongs-to', ['exports', 'ember-data/-private/system/model/model', 'ember-data/-private/system/references/reference', 'ember-data/-private/features', 'ember-data/-debug'], function (exports, _model, _reference, _features, _debug) {\n 'use strict';\n\n exports.__esModule = true;\n var resolve = Ember.RSVP.resolve;\n\n\n /**\n A BelongsToReference is a low level API that allows users and\n addon author to perform meta-operations on a belongs-to\n relationship.\n \n @class BelongsToReference\n @namespace DS\n @extends DS.Reference\n */\n var BelongsToReference = function (store, parentInternalModel, belongsToRelationship) {\n this._super$constructor(store, parentInternalModel);\n this.belongsToRelationship = belongsToRelationship;\n this.type = belongsToRelationship.relationshipMeta.type;\n this.parent = parentInternalModel.recordReference;\n\n // TODO inverse\n };\n\n BelongsToReference.prototype = Object.create(_reference.default.prototype);\n BelongsToReference.prototype.constructor = BelongsToReference;\n BelongsToReference.prototype._super$constructor = _reference.default;\n\n /**\n This returns a string that represents how the reference will be\n looked up when it is loaded. If the relationship has a link it will\n use the \"link\" otherwise it defaults to \"id\".\n \n Example\n \n ```javascript\n // models/blog.js\n export default DS.Model.extend({\n user: DS.belongsTo({ async: true })\n });\n \n let blog = store.push({\n type: 'blog',\n id: 1,\n relationships: {\n user: {\n data: { type: 'user', id: 1 }\n }\n }\n });\n let userRef = blog.belongsTo('user');\n \n // get the identifier of the reference\n if (userRef.remoteType() === \"id\") {\n let id = userRef.id();\n } else if (userRef.remoteType() === \"link\") {\n let link = userRef.link();\n }\n ```\n \n @method remoteType\n @return {String} The name of the remote type. This should either be \"link\" or \"id\"\n */\n BelongsToReference.prototype.remoteType = function () {\n if (this.belongsToRelationship.link) {\n return \"link\";\n }\n\n return \"id\";\n };\n\n /**\n The `id` of the record that this reference refers to. Together, the\n `type()` and `id()` methods form a composite key for the identity\n map. This can be used to access the id of an async relationship\n without triggering a fetch that would normally happen if you\n attempted to use `record.get('relationship.id')`.\n \n Example\n \n ```javascript\n // models/blog.js\n export default DS.Model.extend({\n user: DS.belongsTo({ async: true })\n });\n \n let blog = store.push({\n data: {\n type: 'blog',\n id: 1,\n relationships: {\n user: {\n data: { type: 'user', id: 1 }\n }\n }\n }\n });\n let userRef = blog.belongsTo('user');\n \n // get the identifier of the reference\n if (userRef.remoteType() === \"id\") {\n let id = userRef.id();\n }\n ```\n \n @method id\n @return {String} The id of the record in this belongsTo relationship.\n */\n BelongsToReference.prototype.id = function () {\n var inverseInternalModel = this.belongsToRelationship.inverseInternalModel;\n return inverseInternalModel && inverseInternalModel.id;\n };\n\n /**\n The link Ember Data will use to fetch or reload this belongs-to\n relationship.\n \n Example\n \n ```javascript\n // models/blog.js\n export default DS.Model.extend({\n user: DS.belongsTo({ async: true })\n });\n \n let blog = store.push({\n data: {\n type: 'blog',\n id: 1,\n relationships: {\n user: {\n links: {\n related: '/articles/1/author'\n }\n }\n }\n }\n });\n let userRef = blog.belongsTo('user');\n \n // get the identifier of the reference\n if (userRef.remoteType() === \"link\") {\n let link = userRef.link();\n }\n ```\n \n @method link\n @return {String} The link Ember Data will use to fetch or reload this belongs-to relationship.\n */\n BelongsToReference.prototype.link = function () {\n return this.belongsToRelationship.link;\n };\n\n /**\n The meta data for the belongs-to relationship.\n \n Example\n \n ```javascript\n // models/blog.js\n export default DS.Model.extend({\n user: DS.belongsTo({ async: true })\n });\n \n let blog = store.push({\n data: {\n type: 'blog',\n id: 1,\n relationships: {\n user: {\n links: {\n related: {\n href: '/articles/1/author',\n meta: {\n lastUpdated: 1458014400000\n }\n }\n }\n }\n }\n }\n });\n \n let userRef = blog.belongsTo('user');\n \n userRef.meta() // { lastUpdated: 1458014400000 }\n ```\n \n @method meta\n @return {Object} The meta information for the belongs-to relationship.\n */\n BelongsToReference.prototype.meta = function () {\n return this.belongsToRelationship.meta;\n };\n\n /**\n `push` can be used to update the data in the relationship and Ember\n Data will treat the new data as the conanical value of this\n relationship on the backend.\n \n Example\n \n ```javascript\n // models/blog.js\n export default DS.Model.extend({\n user: DS.belongsTo({ async: true })\n });\n \n let blog = store.push({\n data: {\n type: 'blog',\n id: 1,\n relationships: {\n user: {\n data: { type: 'user', id: 1 }\n }\n }\n }\n });\n let userRef = blog.belongsTo('user');\n \n // provide data for reference\n userRef.push({\n data: {\n type: 'user',\n id: 1,\n attributes: {\n username: \"@user\"\n }\n }\n }).then(function(user) {\n userRef.value() === user;\n });\n ```\n \n @method push\n @param {Object|Promise} objectOrPromise a promise that resolves to a JSONAPI document object describing the new value of this relationship.\n @return {Promise<record>} A promise that resolves with the new value in this belongs-to relationship.\n */\n BelongsToReference.prototype.push = function (objectOrPromise) {\n var _this = this;\n\n return resolve(objectOrPromise).then(function (data) {\n var record = void 0;\n\n if (data instanceof _model.default) {\n if ((0, _features.default)('ds-overhaul-references')) {\n (false && !(false) && Ember.deprecate(\"BelongsToReference#push(DS.Model) is deprecated. Update relationship via `model.set('relationshipName', value)` instead.\", false, {\n id: 'ds.references.belongs-to.push-record',\n until: '4.0.0'\n }));\n }\n record = data;\n } else {\n record = _this.store.push(data);\n }\n\n (0, _debug.assertPolymorphicType)(_this.internalModel, _this.belongsToRelationship.relationshipMeta, record._internalModel);\n\n _this.belongsToRelationship.setCanonicalInternalModel(record._internalModel);\n\n return record;\n });\n };\n\n /**\n `value()` synchronously returns the current value of the belongs-to\n relationship. Unlike `record.get('relationshipName')`, calling\n `value()` on a reference does not trigger a fetch if the async\n relationship is not yet loaded. If the relationship is not loaded\n it will always return `null`.\n \n Example\n \n ```javascript\n // models/blog.js\n export default DS.Model.extend({\n user: DS.belongsTo({ async: true })\n });\n \n let blog = store.push({\n data: {\n type: 'blog',\n id: 1,\n relationships: {\n user: {\n data: { type: 'user', id: 1 }\n }\n }\n }\n });\n let userRef = blog.belongsTo('user');\n \n userRef.value(); // null\n \n // provide data for reference\n userRef.push({\n data: {\n type: 'user',\n id: 1,\n attributes: {\n username: \"@user\"\n }\n }\n }).then(function(user) {\n userRef.value(); // user\n });\n ```\n \n @method value\n @return {DS.Model} the record in this relationship\n */\n BelongsToReference.prototype.value = function () {\n var inverseInternalModel = this.belongsToRelationship.inverseInternalModel;\n\n if (inverseInternalModel && inverseInternalModel.isLoaded()) {\n return inverseInternalModel.getRecord();\n }\n\n return null;\n };\n\n /**\n Loads a record in a belongs to relationship if it is not already\n loaded. If the relationship is already loaded this method does not\n trigger a new load.\n \n Example\n \n ```javascript\n // models/blog.js\n export default DS.Model.extend({\n user: DS.belongsTo({ async: true })\n });\n \n let blog = store.push({\n data: {\n type: 'blog',\n id: 1,\n relationships: {\n user: {\n data: { type: 'user', id: 1 }\n }\n }\n }\n });\n let userRef = blog.belongsTo('user');\n \n userRef.value(); // null\n \n userRef.load().then(function(user) {\n userRef.value() === user\n });\n ```\n \n @method load\n @return {Promise} a promise that resolves with the record in this belongs-to relationship.\n */\n BelongsToReference.prototype.load = function () {\n var _this2 = this;\n\n if (this.remoteType() === \"id\") {\n return this.belongsToRelationship.getRecord();\n }\n\n if (this.remoteType() === \"link\") {\n return this.belongsToRelationship.findLink().then(function (internalModel) {\n return _this2.value();\n });\n }\n };\n\n /**\n Triggers a reload of the value in this relationship. If the\n remoteType is `\"link\"` Ember Data will use the relationship link to\n reload the relationship. Otherwise it will reload the record by its\n id.\n \n Example\n \n ```javascript\n // models/blog.js\n export default DS.Model.extend({\n user: DS.belongsTo({ async: true })\n });\n \n let blog = store.push({\n data: {\n type: 'blog',\n id: 1,\n relationships: {\n user: {\n data: { type: 'user', id: 1 }\n }\n }\n }\n });\n let userRef = blog.belongsTo('user');\n \n userRef.reload().then(function(user) {\n userRef.value() === user\n });\n ```\n \n @method reload\n @return {Promise} a promise that resolves with the record in this belongs-to relationship after the reload has completed.\n */\n BelongsToReference.prototype.reload = function () {\n var _this3 = this;\n\n return this.belongsToRelationship.reload().then(function (internalModel) {\n return _this3.value();\n });\n };\n\n exports.default = BelongsToReference;\n});","define('ember-data/-private/system/references/has-many', ['exports', 'ember-data/-private/system/references/reference', 'ember-data/-debug', 'ember-data/-private/features'], function (exports, _reference, _debug, _features) {\n 'use strict';\n\n exports.__esModule = true;\n var A = Ember.A;\n var resolve = Ember.RSVP.resolve;\n var get = Ember.get;\n\n\n /**\n A HasManyReference is a low level API that allows users and addon\n author to perform meta-operations on a has-many relationship.\n \n @class HasManyReference\n @namespace DS\n */\n var HasManyReference = function (store, parentInternalModel, hasManyRelationship) {\n this._super$constructor(store, parentInternalModel);\n this.hasManyRelationship = hasManyRelationship;\n this.type = hasManyRelationship.relationshipMeta.type;\n this.parent = parentInternalModel.recordReference;\n\n // TODO inverse\n };\n\n HasManyReference.prototype = Object.create(_reference.default.prototype);\n HasManyReference.prototype.constructor = HasManyReference;\n HasManyReference.prototype._super$constructor = _reference.default;\n\n /**\n This returns a string that represents how the reference will be\n looked up when it is loaded. If the relationship has a link it will\n use the \"link\" otherwise it defaults to \"id\".\n \n Example\n \n ```app/models/post.js\n export default DS.Model.extend({\n comments: DS.hasMany({ async: true })\n });\n ```\n \n ```javascript\n let post = store.push({\n data: {\n type: 'post',\n id: 1,\n relationships: {\n comments: {\n data: [{ type: 'comment', id: 1 }]\n }\n }\n }\n });\n \n let commentsRef = post.hasMany('comments');\n \n // get the identifier of the reference\n if (commentsRef.remoteType() === \"ids\") {\n let ids = commentsRef.ids();\n } else if (commentsRef.remoteType() === \"link\") {\n let link = commentsRef.link();\n }\n ```\n \n @method remoteType\n @return {String} The name of the remote type. This should either be \"link\" or \"ids\"\n */\n HasManyReference.prototype.remoteType = function () {\n if (this.hasManyRelationship.link) {\n return \"link\";\n }\n\n return \"ids\";\n };\n\n /**\n The link Ember Data will use to fetch or reload this has-many\n relationship.\n \n Example\n \n ```app/models/post.js\n export default DS.Model.extend({\n comments: DS.hasMany({ async: true })\n });\n ```\n \n ```javascript\n let post = store.push({\n data: {\n type: 'post',\n id: 1,\n relationships: {\n comments: {\n links: {\n related: '/posts/1/comments'\n }\n }\n }\n }\n });\n \n let commentsRef = post.hasMany('comments');\n \n commentsRef.link(); // '/posts/1/comments'\n ```\n \n @method link\n @return {String} The link Ember Data will use to fetch or reload this has-many relationship.\n */\n HasManyReference.prototype.link = function () {\n return this.hasManyRelationship.link;\n };\n\n /**\n `ids()` returns an array of the record ids in this relationship.\n \n Example\n \n ```app/models/post.js\n export default DS.Model.extend({\n comments: DS.hasMany({ async: true })\n });\n ```\n \n ```javascript\n let post = store.push({\n data: {\n type: 'post',\n id: 1,\n relationships: {\n comments: {\n data: [{ type: 'comment', id: 1 }]\n }\n }\n }\n });\n \n let commentsRef = post.hasMany('comments');\n \n commentsRef.ids(); // ['1']\n ```\n \n @method ids\n @return {Array} The ids in this has-many relationship\n */\n HasManyReference.prototype.ids = function () {\n var members = this.hasManyRelationship.members.toArray();\n\n return members.map(function (internalModel) {\n return internalModel.id;\n });\n };\n\n /**\n The meta data for the has-many relationship.\n \n Example\n \n ```app/models/post.js\n export default DS.Model.extend({\n comments: DS.hasMany({ async: true })\n });\n ```\n \n ```javascript\n let post = store.push({\n data: {\n type: 'post',\n id: 1,\n relationships: {\n comments: {\n links: {\n related: {\n href: '/posts/1/comments',\n meta: {\n count: 10\n }\n }\n }\n }\n }\n }\n });\n \n let commentsRef = post.hasMany('comments');\n \n commentsRef.meta(); // { count: 10 }\n ```\n \n @method meta\n @return {Object} The meta information for the has-many relationship.\n */\n HasManyReference.prototype.meta = function () {\n return this.hasManyRelationship.meta;\n };\n\n /**\n `push` can be used to update the data in the relationship and Ember\n Data will treat the new data as the canonical value of this\n relationship on the backend.\n \n Example\n \n ```app/models/post.js\n export default DS.Model.extend({\n comments: DS.hasMany({ async: true })\n });\n ```\n \n ```\n let post = store.push({\n data: {\n type: 'post',\n id: 1,\n relationships: {\n comments: {\n data: [{ type: 'comment', id: 1 }]\n }\n }\n }\n });\n \n let commentsRef = post.hasMany('comments');\n \n commentsRef.ids(); // ['1']\n \n commentsRef.push([\n [{ type: 'comment', id: 2 }],\n [{ type: 'comment', id: 3 }],\n ])\n \n commentsRef.ids(); // ['2', '3']\n ```\n \n @method push\n @param {Array|Promise} objectOrPromise a promise that resolves to a JSONAPI document object describing the new value of this relationship.\n @return {DS.ManyArray}\n */\n HasManyReference.prototype.push = function (objectOrPromise) {\n var _this = this;\n\n return resolve(objectOrPromise).then(function (payload) {\n var array = payload;\n\n if ((0, _features.default)(\"ds-overhaul-references\")) {\n (false && !(!Array.isArray(payload)) && Ember.deprecate(\"HasManyReference#push(array) is deprecated. Push a JSON-API document instead.\", !Array.isArray(payload), {\n id: 'ds.references.has-many.push-array',\n until: '4.0.0'\n }));\n }\n\n var useLegacyArrayPush = true;\n if (typeof payload === \"object\" && payload.data) {\n array = payload.data;\n useLegacyArrayPush = array.length && array[0].data;\n\n if ((0, _features.default)('ds-overhaul-references')) {\n (false && !(!useLegacyArrayPush) && Ember.deprecate(\"HasManyReference#push() expects a valid JSON-API document.\", !useLegacyArrayPush, {\n id: 'ds.references.has-many.push-invalid-json-api',\n until: '4.0.0'\n }));\n }\n }\n\n if (!(0, _features.default)('ds-overhaul-references')) {\n useLegacyArrayPush = true;\n }\n\n var internalModels = void 0;\n if (useLegacyArrayPush) {\n internalModels = array.map(function (obj) {\n var record = _this.store.push(obj);\n\n if (false) {\n var relationshipMeta = _this.hasManyRelationship.relationshipMeta;\n (0, _debug.assertPolymorphicType)(_this.internalModel, relationshipMeta, record._internalModel);\n }\n\n return record._internalModel;\n });\n } else {\n var records = _this.store.push(payload);\n internalModels = A(records).mapBy('_internalModel');\n\n if (false) {\n internalModels.forEach(function (internalModel) {\n var relationshipMeta = _this.hasManyRelationship.relationshipMeta;\n (0, _debug.assertPolymorphicType)(_this.internalModel, relationshipMeta, internalModel);\n });\n }\n }\n\n _this.hasManyRelationship.computeChanges(internalModels);\n\n return _this.hasManyRelationship.manyArray;\n });\n };\n\n HasManyReference.prototype._isLoaded = function () {\n var hasData = get(this.hasManyRelationship, 'hasData');\n if (!hasData) {\n return false;\n }\n\n var members = this.hasManyRelationship.members.toArray();\n\n return members.every(function (internalModel) {\n return internalModel.isLoaded() === true;\n });\n };\n\n /**\n `value()` synchronously returns the current value of the has-many\n relationship. Unlike `record.get('relationshipName')`, calling\n `value()` on a reference does not trigger a fetch if the async\n relationship is not yet loaded. If the relationship is not loaded\n it will always return `null`.\n \n Example\n \n ```app/models/post.js\n export default DS.Model.extend({\n comments: DS.hasMany({ async: true })\n });\n ```\n \n ```javascript\n let post = store.push({\n data: {\n type: 'post',\n id: 1,\n relationships: {\n comments: {\n data: [{ type: 'comment', id: 1 }]\n }\n }\n }\n });\n \n let commentsRef = post.hasMany('comments');\n \n post.get('comments').then(function(comments) {\n commentsRef.value() === comments\n })\n ```\n \n @method value\n @return {DS.ManyArray}\n */\n HasManyReference.prototype.value = function () {\n if (this._isLoaded()) {\n return this.hasManyRelationship.manyArray;\n }\n\n return null;\n };\n\n /**\n Loads the relationship if it is not already loaded. If the\n relationship is already loaded this method does not trigger a new\n load.\n \n Example\n \n ```app/models/post.js\n export default DS.Model.extend({\n comments: DS.hasMany({ async: true })\n });\n ```\n \n ```javascript\n let post = store.push({\n data: {\n type: 'post',\n id: 1,\n relationships: {\n comments: {\n data: [{ type: 'comment', id: 1 }]\n }\n }\n }\n });\n \n let commentsRef = post.hasMany('comments');\n \n commentsRef.load().then(function(comments) {\n //...\n });\n ```\n \n @method load\n @return {Promise} a promise that resolves with the ManyArray in\n this has-many relationship.\n */\n HasManyReference.prototype.load = function () {\n if (!this._isLoaded()) {\n return this.hasManyRelationship.getRecords();\n }\n\n return resolve(this.hasManyRelationship.manyArray);\n };\n\n /**\n Reloads this has-many relationship.\n \n Example\n \n ```app/models/post.js\n export default DS.Model.extend({\n comments: DS.hasMany({ async: true })\n });\n ```\n \n ```javascript\n let post = store.push({\n data: {\n type: 'post',\n id: 1,\n relationships: {\n comments: {\n data: [{ type: 'comment', id: 1 }]\n }\n }\n }\n });\n \n let commentsRef = post.hasMany('comments');\n \n commentsRef.reload().then(function(comments) {\n //...\n });\n ```\n \n @method reload\n @return {Promise} a promise that resolves with the ManyArray in this has-many relationship.\n */\n HasManyReference.prototype.reload = function () {\n return this.hasManyRelationship.reload();\n };\n\n exports.default = HasManyReference;\n});","define('ember-data/-private/system/references/record', ['exports', 'ember-data/-private/system/references/reference'], function (exports, _reference) {\n 'use strict';\n\n exports.__esModule = true;\n var resolve = Ember.RSVP.resolve;\n\n\n /**\n An RecordReference is a low level API that allows users and\n addon author to perform meta-operations on a record.\n \n @class RecordReference\n @namespace DS\n */\n var RecordReference = function (store, internalModel) {\n this._super$constructor(store, internalModel);\n this.type = internalModel.modelName;\n this._id = internalModel.id;\n };\n\n RecordReference.prototype = Object.create(_reference.default.prototype);\n RecordReference.prototype.constructor = RecordReference;\n RecordReference.prototype._super$constructor = _reference.default;\n\n /**\n The `id` of the record that this reference refers to.\n \n Together, the `type` and `id` properties form a composite key for\n the identity map.\n \n Example\n \n ```javascript\n let userRef = store.getReference('user', 1);\n \n userRef.id(); // '1'\n ```\n \n @method id\n @return {String} The id of the record.\n */\n RecordReference.prototype.id = function () {\n return this._id;\n };\n\n /**\n How the reference will be looked up when it is loaded: Currently\n this always return `identity` to signifying that a record will be\n loaded by the `type` and `id`.\n \n Example\n \n ```javascript\n const userRef = store.getReference('user', 1);\n \n userRef.remoteType(); // 'identity'\n ```\n \n @method remoteType\n @return {String} 'identity'\n */\n RecordReference.prototype.remoteType = function () {\n return 'identity';\n };\n\n /**\n This API allows you to provide a reference with new data. The\n simplest usage of this API is similar to `store.push`: you provide a\n normalized hash of data and the object represented by the reference\n will update.\n \n If you pass a promise to `push`, Ember Data will not ask the adapter\n for the data if another attempt to fetch it is made in the\n interim. When the promise resolves, the underlying object is updated\n with the new data, and the promise returned by *this function* is resolved\n with that object.\n \n For example, `recordReference.push(promise)` will be resolved with a\n record.\n \n Example\n \n ```javascript\n let userRef = store.getReference('user', 1);\n \n // provide data for reference\n userRef.push({ data: { id: 1, username: \"@user\" }}).then(function(user) {\n userRef.value() === user;\n });\n ```\n \n @method push\n @param {Promise|Object}\n @return Promise<record> a promise for the value (record or relationship)\n */\n RecordReference.prototype.push = function (objectOrPromise) {\n var _this = this;\n\n return resolve(objectOrPromise).then(function (data) {\n return _this.store.push(data);\n });\n };\n\n /**\n If the entity referred to by the reference is already loaded, it is\n present as `reference.value`. Otherwise the value returned by this function\n is `null`.\n \n Example\n \n ```javascript\n let userRef = store.getReference('user', 1);\n \n userRef.value(); // user\n ```\n \n @method value\n @return {DS.Model} the record for this RecordReference\n */\n RecordReference.prototype.value = function () {\n if (this.internalModel.hasRecord) {\n return this.internalModel.getRecord();\n }\n return null;\n };\n\n /**\n Triggers a fetch for the backing entity based on its `remoteType`\n (see `remoteType` definitions per reference type).\n \n Example\n \n ```javascript\n let userRef = store.getReference('user', 1);\n \n // load user (via store.find)\n userRef.load().then(...)\n ```\n \n @method load\n @return {Promise<record>} the record for this RecordReference\n */\n RecordReference.prototype.load = function () {\n return this.store.findRecord(this.type, this._id);\n };\n\n /**\n Reloads the record if it is already loaded. If the record is not\n loaded it will load the record via `store.findRecord`\n \n Example\n \n ```javascript\n let userRef = store.getReference('user', 1);\n \n // or trigger a reload\n userRef.reload().then(...)\n ```\n \n @method reload\n @return {Promise<record>} the record for this RecordReference\n */\n RecordReference.prototype.reload = function () {\n var record = this.value();\n if (record) {\n return record.reload();\n }\n\n return this.load();\n };\n\n exports.default = RecordReference;\n});","define(\"ember-data/-private/system/references/reference\", [\"exports\"], function (exports) {\n \"use strict\";\n\n exports.__esModule = true;\n var Reference = function (store, internalModel) {\n this.store = store;\n this.internalModel = internalModel;\n };\n\n Reference.prototype = {\n constructor: Reference\n };\n\n exports.default = Reference;\n});","define('ember-data/-private/system/relationship-meta', ['exports', 'ember-inflector', 'ember-data/-private/system/normalize-model-name'], function (exports, _emberInflector, _normalizeModelName) {\n 'use strict';\n\n exports.__esModule = true;\n exports.typeForRelationshipMeta = typeForRelationshipMeta;\n exports.relationshipFromMeta = relationshipFromMeta;\n function typeForRelationshipMeta(meta) {\n var modelName = void 0;\n\n modelName = meta.type || meta.key;\n if (meta.kind === 'hasMany') {\n modelName = (0, _emberInflector.singularize)((0, _normalizeModelName.default)(modelName));\n }\n return modelName;\n }\n\n function relationshipFromMeta(meta) {\n return {\n key: meta.key,\n kind: meta.kind,\n type: typeForRelationshipMeta(meta),\n options: meta.options,\n name: meta.name,\n parentType: meta.parentType,\n isRelationship: true\n };\n }\n});","define('ember-data/-private/system/relationships/belongs-to', ['exports', 'ember-data/-private/system/normalize-model-name'], function (exports, _normalizeModelName) {\n 'use strict';\n\n exports.__esModule = true;\n exports.default = belongsTo;\n var computed = Ember.computed;\n var inspect = Ember.inspect;\n\n\n /**\n `DS.belongsTo` is used to define One-To-One and One-To-Many\n relationships on a [DS.Model](/api/data/classes/DS.Model.html).\n \n \n `DS.belongsTo` takes an optional hash as a second parameter, currently\n supported options are:\n \n - `async`: A boolean value used to explicitly declare this to be an async relationship.\n - `inverse`: A string used to identify the inverse property on a\n related model in a One-To-Many relationship. See [Explicit Inverses](#toc_explicit-inverses)\n \n #### One-To-One\n To declare a one-to-one relationship between two models, use\n `DS.belongsTo`:\n \n ```app/models/user.js\n import DS from 'ember-data';\n \n export default DS.Model.extend({\n profile: DS.belongsTo('profile')\n });\n ```\n \n ```app/models/profile.js\n import DS from 'ember-data';\n \n export default DS.Model.extend({\n user: DS.belongsTo('user')\n });\n ```\n \n #### One-To-Many\n To declare a one-to-many relationship between two models, use\n `DS.belongsTo` in combination with `DS.hasMany`, like this:\n \n ```app/models/post.js\n import DS from 'ember-data';\n \n export default DS.Model.extend({\n comments: DS.hasMany('comment')\n });\n ```\n \n ```app/models/comment.js\n import DS from 'ember-data';\n \n export default DS.Model.extend({\n post: DS.belongsTo('post')\n });\n ```\n \n You can avoid passing a string as the first parameter. In that case Ember Data\n will infer the type from the key name.\n \n ```app/models/comment.js\n import DS from 'ember-data';\n \n export default DS.Model.extend({\n post: DS.belongsTo()\n });\n ```\n \n will lookup for a Post type.\n \n @namespace\n @method belongsTo\n @for DS\n @param {String} modelName (optional) type of the relationship\n @param {Object} options (optional) a hash of options\n @return {Ember.computed} relationship\n */\n function belongsTo(modelName, options) {\n var opts = void 0,\n userEnteredModelName = void 0;\n if (typeof modelName === 'object') {\n opts = modelName;\n userEnteredModelName = undefined;\n } else {\n opts = options;\n userEnteredModelName = modelName;\n }\n\n if (typeof userEnteredModelName === 'string') {\n userEnteredModelName = (0, _normalizeModelName.default)(userEnteredModelName);\n }\n\n (false && Ember.assert(\"The first argument to DS.belongsTo must be a string representing a model type key, not an instance of \" + inspect(userEnteredModelName) + \". E.g., to define a relation to the Person model, use DS.belongsTo('person')\", typeof userEnteredModelName === 'string' || typeof userEnteredModelName === 'undefined'));\n\n\n opts = opts || {};\n\n var meta = {\n type: userEnteredModelName,\n isRelationship: true,\n options: opts,\n kind: 'belongsTo',\n name: 'Belongs To',\n key: null\n };\n\n return computed({\n get: function (key) {\n if (opts.hasOwnProperty('serialize')) {\n (false && Ember.warn('You provided a serialize option on the \"' + key + '\" property in the \"' + this._internalModel.modelName + '\" class, this belongs in the serializer. See DS.Serializer and it\\'s implementations https://emberjs.com/api/data/classes/DS.Serializer.html', false, {\n id: 'ds.model.serialize-option-in-belongs-to'\n }));\n }\n\n if (opts.hasOwnProperty('embedded')) {\n (false && Ember.warn('You provided an embedded option on the \"' + key + '\" property in the \"' + this._internalModel.modelName + '\" class, this belongs in the serializer. See DS.EmbeddedRecordsMixin https://emberjs.com/api/data/classes/DS.EmbeddedRecordsMixin.html', false, {\n id: 'ds.model.embedded-option-in-belongs-to'\n }));\n }\n\n return this._internalModel._relationships.get(key).getRecord();\n },\n set: function (key, value) {\n if (value === undefined) {\n value = null;\n }\n if (value && value.then) {\n this._internalModel._relationships.get(key).setRecordPromise(value);\n } else if (value) {\n this._internalModel._relationships.get(key).setInternalModel(value._internalModel);\n } else {\n this._internalModel._relationships.get(key).setInternalModel(value);\n }\n\n return this._internalModel._relationships.get(key).getRecord();\n }\n }).meta(meta);\n }\n});","define('ember-data/-private/system/relationships/ext', ['exports', 'ember-data/-private/system/relationship-meta'], function (exports, _relationshipMeta) {\n 'use strict';\n\n exports.__esModule = true;\n exports.relationshipsByNameDescriptor = exports.relatedTypesDescriptor = exports.relationshipsDescriptor = undefined;\n var A = Ember.A;\n var computed = Ember.computed;\n var MapWithDefault = Ember.MapWithDefault;\n var Map = Ember.Map;\n var relationshipsDescriptor = exports.relationshipsDescriptor = computed(function () {\n var map = new MapWithDefault({\n defaultValue: function () {\n return [];\n }\n });\n\n // Loop through each computed property on the class\n this.eachComputedProperty(function (name, meta) {\n // If the computed property is a relationship, add\n // it to the map.\n if (meta.isRelationship) {\n meta.key = name;\n var relationshipsForType = map.get((0, _relationshipMeta.typeForRelationshipMeta)(meta));\n\n relationshipsForType.push({\n name: name,\n kind: meta.kind\n });\n }\n });\n\n return map;\n }).readOnly();\n\n var relatedTypesDescriptor = exports.relatedTypesDescriptor = computed(function () {\n var _this = this;\n\n var modelName = void 0;\n var types = A();\n\n // Loop through each computed property on the class,\n // and create an array of the unique types involved\n // in relationships\n this.eachComputedProperty(function (name, meta) {\n if (meta.isRelationship) {\n meta.key = name;\n modelName = (0, _relationshipMeta.typeForRelationshipMeta)(meta);\n\n (false && Ember.assert('You specified a hasMany (' + meta.type + ') on ' + meta.parentType + ' but ' + meta.type + ' was not found.', modelName));\n\n\n if (!types.includes(modelName)) {\n (false && Ember.assert('Trying to sideload ' + name + ' on ' + _this.toString() + ' but the type doesn\\'t exist.', !!modelName));\n\n types.push(modelName);\n }\n }\n });\n\n return types;\n }).readOnly();\n\n var relationshipsByNameDescriptor = exports.relationshipsByNameDescriptor = computed(function () {\n var map = Map.create();\n\n this.eachComputedProperty(function (name, meta) {\n if (meta.isRelationship) {\n meta.key = name;\n var relationship = (0, _relationshipMeta.relationshipFromMeta)(meta);\n relationship.type = (0, _relationshipMeta.typeForRelationshipMeta)(meta);\n map.set(name, relationship);\n }\n });\n\n return map;\n }).readOnly();\n});","define('ember-data/-private/system/relationships/has-many', ['exports', 'ember-data/-private/system/normalize-model-name', 'ember-data/-private/system/is-array-like'], function (exports, _normalizeModelName, _isArrayLike) {\n 'use strict';\n\n exports.__esModule = true;\n exports.default = hasMany;\n var A = Ember.A;\n var get = Ember.get;\n var computed = Ember.computed;\n var inspect = Ember.inspect;\n\n\n /**\n `DS.hasMany` is used to define One-To-Many and Many-To-Many\n relationships on a [DS.Model](/api/data/classes/DS.Model.html).\n \n `DS.hasMany` takes an optional hash as a second parameter, currently\n supported options are:\n \n - `async`: A boolean value used to explicitly declare this to be an async relationship.\n - `inverse`: A string used to identify the inverse property on a related model.\n \n #### One-To-Many\n To declare a one-to-many relationship between two models, use\n `DS.belongsTo` in combination with `DS.hasMany`, like this:\n \n ```app/models/post.js\n import DS from 'ember-data';\n \n export default DS.Model.extend({\n comments: DS.hasMany('comment')\n });\n ```\n \n ```app/models/comment.js\n import DS from 'ember-data';\n \n export default DS.Model.extend({\n post: DS.belongsTo('post')\n });\n ```\n \n #### Many-To-Many\n To declare a many-to-many relationship between two models, use\n `DS.hasMany`:\n \n ```app/models/post.js\n import DS from 'ember-data';\n \n export default DS.Model.extend({\n tags: DS.hasMany('tag')\n });\n ```\n \n ```app/models/tag.js\n import DS from 'ember-data';\n \n export default DS.Model.extend({\n posts: DS.hasMany('post')\n });\n ```\n \n You can avoid passing a string as the first parameter. In that case Ember Data\n will infer the type from the singularized key name.\n \n ```app/models/post.js\n import DS from 'ember-data';\n \n export default DS.Model.extend({\n tags: DS.hasMany()\n });\n ```\n \n will lookup for a Tag type.\n \n #### Explicit Inverses\n \n Ember Data will do its best to discover which relationships map to\n one another. In the one-to-many code above, for example, Ember Data\n can figure out that changing the `comments` relationship should update\n the `post` relationship on the inverse because post is the only\n relationship to that model.\n \n However, sometimes you may have multiple `belongsTo`/`hasMany` for the\n same type. You can specify which property on the related model is\n the inverse using `DS.hasMany`'s `inverse` option:\n \n ```app/models/comment.js\n import DS from 'ember-data';\n \n export default DS.Model.extend({\n onePost: DS.belongsTo('post'),\n twoPost: DS.belongsTo('post'),\n redPost: DS.belongsTo('post'),\n bluePost: DS.belongsTo('post')\n });\n ```\n \n ```app/models/post.js\n import DS from 'ember-data';\n \n export default DS.Model.extend({\n comments: DS.hasMany('comment', {\n inverse: 'redPost'\n })\n });\n ```\n \n You can also specify an inverse on a `belongsTo`, which works how\n you'd expect.\n \n @namespace\n @method hasMany\n @for DS\n @param {String} type (optional) type of the relationship\n @param {Object} options (optional) a hash of options\n @return {Ember.computed} relationship\n */\n function hasMany(type, options) {\n if (typeof type === 'object') {\n options = type;\n type = undefined;\n }\n\n (false && Ember.assert('The first argument to DS.hasMany must be a string representing a model type key, not an instance of ' + inspect(type) + '. E.g., to define a relation to the Comment model, use DS.hasMany(\\'comment\\')', typeof type === 'string' || typeof type === 'undefined'));\n\n\n options = options || {};\n\n if (typeof type === 'string') {\n type = (0, _normalizeModelName.default)(type);\n }\n\n // Metadata about relationships is stored on the meta of\n // the relationship. This is used for introspection and\n // serialization. Note that `key` is populated lazily\n // the first time the CP is called.\n var meta = {\n type: type,\n options: options,\n isRelationship: true,\n kind: 'hasMany',\n name: 'Has Many',\n key: null\n };\n\n return computed({\n get: function (key) {\n return this._internalModel._relationships.get(key).getRecords();\n },\n set: function (key, records) {\n (false && Ember.assert('You must pass an array of records to set a hasMany relationship', (0, _isArrayLike.default)(records)));\n (false && Ember.assert('All elements of a hasMany relationship must be instances of DS.Model, you passed ' + inspect(records), function () {\n return A(records).every(function (record) {\n return record.hasOwnProperty('_internalModel') === true;\n });\n }()));\n\n\n var relationship = this._internalModel._relationships.get(key);\n relationship.clear();\n relationship.addInternalModels(records.map(function (record) {\n return get(record, '_internalModel');\n }));\n return relationship.getRecords();\n }\n }).meta(meta);\n }\n});","define('ember-data/-private/system/relationships/relationship-payloads-manager', ['exports', 'ember-data/-private/system/relationships/relationship-payloads'], function (exports, _relationshipPayloads) {\n 'use strict';\n\n exports.__esModule = true;\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var get = Ember.get;\n\n var RelationshipPayloadsManager = function () {\n function RelationshipPayloadsManager(store) {\n _classCallCheck(this, RelationshipPayloadsManager);\n\n this._store = store;\n // cache of `RelationshipPayload`s\n this._cache = Object.create(null);\n this._inverseLookupCache = new _relationshipPayloads.TypeCache();\n }\n\n /**\n Find the payload for the given relationship of the given model.\n Returns the payload for the given relationship, whether raw or computed from\n the payload of the inverse relationship.\n @example\n relationshipPayloadsManager.get('hobby', 2, 'user') === {\n {\n data: {\n id: 1,\n type: 'user'\n }\n }\n }\n @method\n */\n\n\n RelationshipPayloadsManager.prototype.get = function get(modelName, id, relationshipName) {\n var relationshipPayloads = this._getRelationshipPayloads(modelName, relationshipName, false);\n return relationshipPayloads && relationshipPayloads.get(modelName, id, relationshipName);\n };\n\n RelationshipPayloadsManager.prototype.push = function push(modelName, id, relationshipsData) {\n var _this = this;\n\n if (!relationshipsData) {\n return;\n }\n\n Object.keys(relationshipsData).forEach(function (key) {\n var relationshipPayloads = _this._getRelationshipPayloads(modelName, key, true);\n if (relationshipPayloads) {\n relationshipPayloads.push(modelName, id, key, relationshipsData[key]);\n }\n });\n };\n\n RelationshipPayloadsManager.prototype.unload = function unload(modelName, id) {\n var _this2 = this;\n\n var modelClass = this._store._modelFor(modelName);\n var relationshipsByName = get(modelClass, 'relationshipsByName');\n relationshipsByName.forEach(function (_, relationshipName) {\n var relationshipPayloads = _this2._getRelationshipPayloads(modelName, relationshipName, false);\n if (relationshipPayloads) {\n relationshipPayloads.unload(modelName, id, relationshipName);\n }\n });\n };\n\n RelationshipPayloadsManager.prototype._getRelationshipPayloads = function _getRelationshipPayloads(modelName, relationshipName, init) {\n var relInfo = this.getRelationshipInfo(modelName, relationshipName);\n\n if (relInfo === null) {\n return;\n }\n\n var cache = this._cache[relInfo.lhs_key];\n\n if (!cache && init) {\n return this._initializeRelationshipPayloads(relInfo);\n }\n\n return cache;\n };\n\n RelationshipPayloadsManager.prototype.getRelationshipInfo = function getRelationshipInfo(modelName, relationshipName) {\n var inverseCache = this._inverseLookupCache;\n var store = this._store;\n var cached = inverseCache.get(modelName, relationshipName);\n\n // CASE: We have a cached resolution (null if no relationship exists)\n if (cached !== undefined) {\n return cached;\n }\n\n var modelClass = store._modelFor(modelName);\n var relationshipsByName = get(modelClass, 'relationshipsByName');\n\n // CASE: We don't have a relationship at all\n if (!relationshipsByName.has(relationshipName)) {\n inverseCache.set(modelName, relationshipName, null);\n return null;\n }\n\n var inverseMeta = modelClass.inverseFor(relationshipName, store);\n var relationshipMeta = relationshipsByName.get(relationshipName);\n var selfIsPolymorphic = relationshipMeta.options !== undefined && relationshipMeta.options.polymorphic === true;\n var inverseBaseModelName = relationshipMeta.type;\n\n // CASE: We have no inverse\n if (!inverseMeta) {\n var _info = {\n lhs_key: modelName + ':' + relationshipName,\n lhs_modelNames: [modelName],\n lhs_baseModelName: modelName,\n lhs_relationshipName: relationshipName,\n lhs_relationshipMeta: relationshipMeta,\n lhs_isPolymorphic: selfIsPolymorphic,\n rhs_key: '',\n rhs_modelNames: [],\n rhs_baseModelName: inverseBaseModelName,\n rhs_relationshipName: '',\n rhs_relationshipMeta: null,\n rhs_isPolymorphic: false,\n hasInverse: false,\n isSelfReferential: false, // modelName === inverseBaseModelName,\n isReflexive: false\n };\n\n inverseCache.set(modelName, relationshipName, _info);\n\n return _info;\n }\n\n // CASE: We do have an inverse\n\n var inverseRelationshipName = inverseMeta.name;\n var inverseRelationshipMeta = get(inverseMeta.type, 'relationshipsByName').get(inverseRelationshipName);\n var baseModelName = inverseRelationshipMeta.type;\n var isSelfReferential = baseModelName === inverseBaseModelName;\n\n // TODO we want to assert this but this breaks all of our shoddily written tests\n /*\n if (DEBUG) {\n let inverseDoubleCheck = inverseMeta.type.inverseFor(inverseRelationshipName, store);\n assert(`The ${inverseBaseModelName}:${inverseRelationshipName} relationship declares 'inverse: null', but it was resolved as the inverse for ${baseModelName}:${relationshipName}.`, inverseDoubleCheck);\n }\n */\n\n // CASE: We may have already discovered the inverse for the baseModelName\n // CASE: We have already discovered the inverse\n cached = inverseCache.get(baseModelName, relationshipName) || inverseCache.get(inverseBaseModelName, inverseRelationshipName);\n if (cached) {\n (false && Ember.assert('The ' + inverseBaseModelName + ':' + inverseRelationshipName + ' relationship declares \\'inverse: null\\', but it was resolved as the inverse for ' + baseModelName + ':' + relationshipName + '.', cached.hasInverse !== false));\n\n\n var isLHS = cached.lhs_baseModelName === baseModelName;\n var modelNames = isLHS ? cached.lhs_modelNames : cached.rhs_modelNames;\n // make this lookup easier in the future by caching the key\n modelNames.push(modelName);\n inverseCache.set(modelName, relationshipName, cached);\n\n return cached;\n }\n\n var info = {\n lhs_key: baseModelName + ':' + relationshipName,\n lhs_modelNames: [modelName],\n lhs_baseModelName: baseModelName,\n lhs_relationshipName: relationshipName,\n lhs_relationshipMeta: relationshipMeta,\n lhs_isPolymorphic: selfIsPolymorphic,\n rhs_key: inverseBaseModelName + ':' + inverseRelationshipName,\n rhs_modelNames: [],\n rhs_baseModelName: inverseBaseModelName,\n rhs_relationshipName: inverseRelationshipName,\n rhs_relationshipMeta: inverseRelationshipMeta,\n rhs_isPolymorphic: inverseRelationshipMeta.options !== undefined && inverseRelationshipMeta.options.polymorphic === true,\n hasInverse: true,\n isSelfReferential: isSelfReferential,\n isReflexive: isSelfReferential && relationshipName === inverseRelationshipName\n };\n\n // Create entries for the baseModelName as well as modelName to speed up\n // inverse lookups\n inverseCache.set(baseModelName, relationshipName, info);\n inverseCache.set(modelName, relationshipName, info);\n\n // Greedily populate the inverse\n inverseCache.set(inverseBaseModelName, inverseRelationshipName, info);\n\n return info;\n };\n\n RelationshipPayloadsManager.prototype._initializeRelationshipPayloads = function _initializeRelationshipPayloads(relInfo) {\n var lhsKey = relInfo.lhs_key;\n var rhsKey = relInfo.rhs_key;\n var existingPayloads = this._cache[lhsKey];\n\n if (relInfo.hasInverse === true && relInfo.rhs_isPolymorphic === true) {\n existingPayloads = this._cache[rhsKey];\n\n if (existingPayloads !== undefined) {\n this._cache[lhsKey] = existingPayloads;\n return existingPayloads;\n }\n }\n\n // populate the cache for both sides of the relationship, as they both use\n // the same `RelationshipPayloads`.\n //\n // This works out better than creating a single common key, because to\n // compute that key we would need to do work to look up the inverse\n //\n var cache = this._cache[lhsKey] = new _relationshipPayloads.default(relInfo);\n\n if (relInfo.hasInverse === true) {\n this._cache[rhsKey] = cache;\n }\n\n return cache;\n };\n\n return RelationshipPayloadsManager;\n }();\n\n exports.default = RelationshipPayloadsManager;\n});","define('ember-data/-private/system/relationships/relationship-payloads', ['exports'], function (exports) {\n 'use strict';\n\n exports.__esModule = true;\n\n var _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n }();\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var TypeCache = exports.TypeCache = function () {\n function TypeCache() {\n _classCallCheck(this, TypeCache);\n\n this.types = Object.create(null);\n }\n\n TypeCache.prototype.get = function get(modelName, id) {\n var types = this.types;\n\n\n if (types[modelName] !== undefined) {\n return types[modelName][id];\n }\n };\n\n TypeCache.prototype.set = function set(modelName, id, payload) {\n var types = this.types;\n\n var typeMap = types[modelName];\n\n if (typeMap === undefined) {\n typeMap = types[modelName] = Object.create(null);\n }\n\n typeMap[id] = payload;\n };\n\n TypeCache.prototype.delete = function _delete(modelName, id) {\n var types = this.types;\n\n\n if (types[modelName] !== undefined) {\n delete types[modelName][id];\n }\n };\n\n return TypeCache;\n }();\n\n var RelationshipPayloads = function () {\n function RelationshipPayloads(relInfo) {\n _classCallCheck(this, RelationshipPayloads);\n\n this._relInfo = relInfo;\n\n // a map of id -> payloads for the left hand side of the relationship.\n this.lhs_payloads = new TypeCache();\n this.rhs_payloads = relInfo.isReflexive ? this.lhs_payloads : new TypeCache();\n\n // When we push relationship payloads, just stash them in a queue until\n // somebody actually asks for one of them.\n //\n // This is a queue of the relationship payloads that have been pushed for\n // either side of this relationship\n this._pendingPayloads = [];\n }\n\n /**\n Get the payload for the relationship of an individual record.\n This might return the raw payload as pushed into the store, or one computed\n from the payload of the inverse relationship.\n @method\n */\n\n\n RelationshipPayloads.prototype.get = function get(modelName, id, relationshipName) {\n this._flushPending();\n\n if (this._isLHS(modelName, relationshipName)) {\n return this.lhs_payloads.get(modelName, id);\n } else {\n (false && Ember.assert(modelName + ':' + relationshipName + ' is not either side of this relationship, ' + this._relInfo.lhs_key + '<->' + this._relInfo.rhs_key, this._isRHS(modelName, relationshipName)));\n\n return this.rhs_payloads.get(modelName, id);\n }\n };\n\n RelationshipPayloads.prototype.push = function push(modelName, id, relationshipName, relationshipData) {\n this._pendingPayloads.push([modelName, id, relationshipName, relationshipData]);\n };\n\n RelationshipPayloads.prototype.unload = function unload(modelName, id, relationshipName) {\n this._flushPending();\n\n if (this._isLHS(modelName, relationshipName)) {\n delete this.lhs_payloads.delete(modelName, id);\n } else {\n (false && Ember.assert(modelName + ':' + relationshipName + ' is not either side of this relationship, ' + this._relInfo.lhs_baseModelName + ':' + this._relInfo.lhs_relationshipName + '<->' + this._relInfo.rhs_baseModelName + ':' + this._relInfo.rhs_relationshipName, this._isRHS(modelName, relationshipName)));\n\n delete this.rhs_payloads.delete(modelName, id);\n }\n };\n\n RelationshipPayloads.prototype._isLHS = function _isLHS(modelName, relationshipName) {\n var relInfo = this._relInfo;\n var isSelfReferential = relInfo.isSelfReferential;\n var isRelationship = relationshipName === relInfo.lhs_relationshipName;\n\n if (isRelationship === true) {\n return isSelfReferential === true || // itself\n modelName === relInfo.lhs_baseModelName || // base or non-polymorphic\n relInfo.lhs_modelNames.indexOf(modelName) !== -1; // polymorphic\n }\n\n return false;\n };\n\n RelationshipPayloads.prototype._isRHS = function _isRHS(modelName, relationshipName) {\n var relInfo = this._relInfo;\n var isSelfReferential = relInfo.isSelfReferential;\n var isRelationship = relationshipName === relInfo.rhs_relationshipName;\n\n if (isRelationship === true) {\n return isSelfReferential === true || // itself\n modelName === relInfo.rhs_baseModelName || // base or non-polymorphic\n relInfo.rhs_modelNames.indexOf(modelName) !== -1; // polymorphic\n }\n\n return false;\n };\n\n RelationshipPayloads.prototype._flushPending = function _flushPending() {\n if (this._pendingPayloads.length === 0) {\n return;\n }\n\n var payloadsToBeProcessed = this._pendingPayloads.splice(0, this._pendingPayloads.length);\n for (var i = 0; i < payloadsToBeProcessed.length; ++i) {\n var modelName = payloadsToBeProcessed[i][0];\n var id = payloadsToBeProcessed[i][1];\n var relationshipName = payloadsToBeProcessed[i][2];\n var relationshipData = payloadsToBeProcessed[i][3];\n\n // TODO: maybe delay this allocation slightly?\n var inverseRelationshipData = {\n data: {\n id: id,\n type: modelName\n }\n };\n\n // start flushing this individual payload. The logic is the same whether\n // it's for the left hand side of the relationship or the right hand side,\n // except the role of primary and inverse idToPayloads is reversed\n //\n var previousPayload = void 0;\n var payloadMap = void 0;\n var inversePayloadMap = void 0;\n var inverseIsMany = void 0;\n\n if (this._isLHS(modelName, relationshipName)) {\n previousPayload = this.lhs_payloads.get(modelName, id);\n payloadMap = this.lhs_payloads;\n inversePayloadMap = this.rhs_payloads;\n inverseIsMany = this._rhsRelationshipIsMany;\n } else {\n (false && Ember.assert(modelName + ':' + relationshipName + ' is not either side of this relationship, ' + this._relInfo.lhs_key + '<->' + this._relInfo.rhs_key, this._isRHS(modelName, relationshipName)));\n\n previousPayload = this.rhs_payloads.get(modelName, id);\n payloadMap = this.rhs_payloads;\n inversePayloadMap = this.lhs_payloads;\n inverseIsMany = this._lhsRelationshipIsMany;\n }\n\n // actually flush this individual payload\n //\n // We remove the previous inverse before populating our current one\n // because we may have multiple payloads for the same relationship, in\n // which case the last one wins.\n //\n // eg if user hasMany helicopters, and helicopter belongsTo user and we see\n //\n // [{\n // data: {\n // id: 1,\n // type: 'helicopter',\n // relationships: {\n // user: {\n // id: 2,\n // type: 'user'\n // }\n // }\n // }\n // }, {\n // data: {\n // id: 1,\n // type: 'helicopter',\n // relationships: {\n // user: {\n // id: 4,\n // type: 'user'\n // }\n // }\n // }\n // }]\n //\n // Then we will initially have set user:2 as having helicopter:1, which we\n // need to remove before adding helicopter:1 to user:4\n //\n // only remove relationship information before adding if there is relationshipData.data\n // * null is considered new information \"empty\", and it should win\n // * undefined is NOT considered new information, we should keep original state\n // * anything else is considered new information, and it should win\n if (relationshipData.data !== undefined) {\n this._removeInverse(id, previousPayload, inversePayloadMap);\n }\n payloadMap.set(modelName, id, relationshipData);\n this._populateInverse(relationshipData, inverseRelationshipData, inversePayloadMap, inverseIsMany);\n }\n };\n\n RelationshipPayloads.prototype._populateInverse = function _populateInverse(relationshipData, inversePayload, inversePayloadMap, inverseIsMany) {\n if (!relationshipData.data) {\n // This id doesn't have an inverse, eg a belongsTo with a payload\n // { data: null }, so there's nothing to populate\n return;\n }\n\n if (Array.isArray(relationshipData.data)) {\n for (var i = 0; i < relationshipData.data.length; ++i) {\n var resourceIdentifier = relationshipData.data[i];\n this._addToInverse(inversePayload, resourceIdentifier, inversePayloadMap, inverseIsMany);\n }\n } else {\n var _resourceIdentifier = relationshipData.data;\n this._addToInverse(inversePayload, _resourceIdentifier, inversePayloadMap, inverseIsMany);\n }\n };\n\n RelationshipPayloads.prototype._addToInverse = function _addToInverse(inversePayload, resourceIdentifier, inversePayloadMap, inverseIsMany) {\n var relInfo = this._relInfo;\n\n if (relInfo.isReflexive && inversePayload.data.id === resourceIdentifier.id) {\n // eg <user:1>.friends = [{ id: 1, type: 'user' }]\n return;\n }\n\n var existingPayload = inversePayloadMap.get(resourceIdentifier.type, resourceIdentifier.id);\n var existingData = existingPayload && existingPayload.data;\n\n if (existingData) {\n // There already is an inverse, either add or overwrite depehnding on\n // whether the inverse is a many relationship or not\n //\n if (Array.isArray(existingData)) {\n existingData.push(inversePayload.data);\n } else {\n inversePayloadMap.set(resourceIdentifier.type, resourceIdentifier.id, inversePayload);\n }\n } else {\n // first time we're populating the inverse side\n //\n if (inverseIsMany) {\n inversePayloadMap.set(resourceIdentifier.type, resourceIdentifier.id, {\n data: [inversePayload.data]\n });\n } else {\n inversePayloadMap.set(resourceIdentifier.type, resourceIdentifier.id, inversePayload);\n }\n }\n };\n\n RelationshipPayloads.prototype._removeInverse = function _removeInverse(id, previousPayload, inversePayloadMap) {\n var data = previousPayload && previousPayload.data;\n if (!data) {\n // either this is the first time we've seen a payload for this id, or its\n // previous payload indicated that it had no inverse, eg a belongsTo\n // relationship with payload { data: null }\n //\n // In either case there's nothing that needs to be removed from the\n // inverse map of payloads\n return;\n }\n\n if (Array.isArray(data)) {\n // TODO: diff rather than removeall addall?\n for (var i = 0; i < data.length; ++i) {\n var resourceIdentifier = data[i];\n this._removeFromInverse(id, resourceIdentifier, inversePayloadMap);\n }\n } else {\n this._removeFromInverse(id, data, inversePayloadMap);\n }\n };\n\n RelationshipPayloads.prototype._removeFromInverse = function _removeFromInverse(id, resourceIdentifier, inversePayloads) {\n var inversePayload = inversePayloads.get(resourceIdentifier.type, resourceIdentifier.id);\n var data = inversePayload && inversePayload.data;\n\n if (!data) {\n return;\n }\n\n if (Array.isArray(data)) {\n inversePayload.data = data.filter(function (x) {\n return x.id !== id;\n });\n } else {\n inversePayloads.set(resourceIdentifier.type, resourceIdentifier.id, {\n data: null\n });\n }\n };\n\n _createClass(RelationshipPayloads, [{\n key: '_lhsRelationshipIsMany',\n get: function () {\n var meta = this._relInfo.lhs_relationshipMeta;\n return meta !== null && meta.kind === 'hasMany';\n }\n }, {\n key: '_rhsRelationshipIsMany',\n get: function () {\n var meta = this._relInfo.rhs_relationshipMeta;\n return meta !== null && meta.kind === 'hasMany';\n }\n }]);\n\n return RelationshipPayloads;\n }();\n\n exports.default = RelationshipPayloads;\n});","define('ember-data/-private/system/relationships/state/belongs-to', ['exports', 'ember-data/-debug', 'ember-data/-private/system/promise-proxies', 'ember-data/-private/system/relationships/state/relationship'], function (exports, _debug, _promiseProxies, _relationship) {\n 'use strict';\n\n exports.__esModule = true;\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n }\n\n function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n }\n\n var EmberPromise = Ember.RSVP.Promise;\n var inspect = Ember.inspect;\n\n var BelongsToRelationship = function (_Relationship) {\n _inherits(BelongsToRelationship, _Relationship);\n\n function BelongsToRelationship(store, internalModel, inverseKey, relationshipMeta) {\n _classCallCheck(this, BelongsToRelationship);\n\n var _this = _possibleConstructorReturn(this, _Relationship.call(this, store, internalModel, inverseKey, relationshipMeta));\n\n _this.internalModel = internalModel;\n _this.key = relationshipMeta.key;\n _this.inverseInternalModel = null;\n _this.canonicalState = null;\n return _this;\n }\n\n BelongsToRelationship.prototype.setInternalModel = function setInternalModel(internalModel) {\n if (internalModel) {\n this.addInternalModel(internalModel);\n } else if (this.inverseInternalModel) {\n this.removeInternalModel(this.inverseInternalModel);\n }\n this.setHasData(true);\n this.setHasLoaded(true);\n };\n\n BelongsToRelationship.prototype.setCanonicalInternalModel = function setCanonicalInternalModel(internalModel) {\n if (internalModel) {\n this.addCanonicalInternalModel(internalModel);\n } else if (this.canonicalState) {\n this.removeCanonicalInternalModel(this.canonicalState);\n }\n this.flushCanonicalLater();\n };\n\n BelongsToRelationship.prototype.setInitialCanonicalInternalModel = function setInitialCanonicalInternalModel(internalModel) {\n if (!internalModel) {\n return;\n }\n\n // When we initialize a belongsTo relationship, we want to avoid work like\n // notifying our internalModel that we've \"changed\" and excessive thrash on\n // setting up inverse relationships\n this.canonicalMembers.add(internalModel);\n this.members.add(internalModel);\n this.inverseInternalModel = this.canonicalState = internalModel;\n this.setupInverseRelationship(internalModel);\n };\n\n BelongsToRelationship.prototype.addCanonicalInternalModel = function addCanonicalInternalModel(internalModel) {\n if (this.canonicalMembers.has(internalModel)) {\n return;\n }\n\n if (this.canonicalState) {\n this.removeCanonicalInternalModel(this.canonicalState);\n }\n\n this.canonicalState = internalModel;\n _Relationship.prototype.addCanonicalInternalModel.call(this, internalModel);\n };\n\n BelongsToRelationship.prototype.inverseDidDematerialize = function inverseDidDematerialize() {\n _Relationship.prototype.inverseDidDematerialize.call(this, this.inverseInternalModel);\n this.notifyBelongsToChanged();\n };\n\n BelongsToRelationship.prototype.removeCompletelyFromOwn = function removeCompletelyFromOwn(internalModel) {\n _Relationship.prototype.removeCompletelyFromOwn.call(this, internalModel);\n\n if (this.canonicalState === internalModel) {\n this.canonicalState = null;\n }\n\n if (this.inverseInternalModel === internalModel) {\n this.inverseInternalModel = null;\n this.notifyBelongsToChanged();\n }\n };\n\n BelongsToRelationship.prototype.removeCompletelyFromInverse = function removeCompletelyFromInverse() {\n _Relationship.prototype.removeCompletelyFromInverse.call(this);\n\n this.inverseInternalModel = null;\n };\n\n BelongsToRelationship.prototype.flushCanonical = function flushCanonical() {\n //temporary fix to not remove newly created records if server returned null.\n //TODO remove once we have proper diffing\n if (this.inverseInternalModel && this.inverseInternalModel.isNew() && !this.canonicalState) {\n return;\n }\n if (this.inverseInternalModel !== this.canonicalState) {\n this.inverseInternalModel = this.canonicalState;\n this.notifyBelongsToChanged();\n }\n\n _Relationship.prototype.flushCanonical.call(this);\n };\n\n BelongsToRelationship.prototype.addInternalModel = function addInternalModel(internalModel) {\n if (this.members.has(internalModel)) {\n return;\n }\n\n (0, _debug.assertPolymorphicType)(this.internalModel, this.relationshipMeta, internalModel);\n\n if (this.inverseInternalModel) {\n this.removeInternalModel(this.inverseInternalModel);\n }\n\n this.inverseInternalModel = internalModel;\n _Relationship.prototype.addInternalModel.call(this, internalModel);\n this.notifyBelongsToChanged();\n };\n\n BelongsToRelationship.prototype.setRecordPromise = function setRecordPromise(newPromise) {\n var content = newPromise.get && newPromise.get('content');\n (false && Ember.assert(\"You passed in a promise that did not originate from an EmberData relationship. You can only pass promises that come from a belongsTo or hasMany relationship to the get call.\", content !== undefined));\n\n this.setInternalModel(content ? content._internalModel : content);\n };\n\n BelongsToRelationship.prototype.removeInternalModelFromOwn = function removeInternalModelFromOwn(internalModel) {\n if (!this.members.has(internalModel)) {\n return;\n }\n this.inverseInternalModel = null;\n _Relationship.prototype.removeInternalModelFromOwn.call(this, internalModel);\n this.notifyBelongsToChanged();\n };\n\n BelongsToRelationship.prototype.removeAllInternalModelsFromOwn = function removeAllInternalModelsFromOwn() {\n _Relationship.prototype.removeAllInternalModelsFromOwn.call(this);\n this.inverseInternalModel = null;\n this.notifyBelongsToChanged();\n };\n\n BelongsToRelationship.prototype.notifyBelongsToChanged = function notifyBelongsToChanged() {\n this.internalModel.notifyBelongsToChanged(this.key);\n };\n\n BelongsToRelationship.prototype.removeCanonicalInternalModelFromOwn = function removeCanonicalInternalModelFromOwn(internalModel) {\n if (!this.canonicalMembers.has(internalModel)) {\n return;\n }\n this.canonicalState = null;\n _Relationship.prototype.removeCanonicalInternalModelFromOwn.call(this, internalModel);\n };\n\n BelongsToRelationship.prototype.removeAllCanonicalInternalModelsFromOwn = function removeAllCanonicalInternalModelsFromOwn() {\n _Relationship.prototype.removeAllCanonicalInternalModelsFromOwn.call(this);\n this.canonicalState = null;\n };\n\n BelongsToRelationship.prototype.findRecord = function findRecord() {\n if (this.inverseInternalModel) {\n return this.store._findByInternalModel(this.inverseInternalModel);\n } else {\n return EmberPromise.resolve(null);\n }\n };\n\n BelongsToRelationship.prototype.fetchLink = function fetchLink() {\n var _this2 = this;\n\n return this.store.findBelongsTo(this.internalModel, this.link, this.relationshipMeta).then(function (internalModel) {\n if (internalModel) {\n _this2.addInternalModel(internalModel);\n }\n return internalModel;\n });\n };\n\n BelongsToRelationship.prototype.getRecord = function getRecord() {\n var _this3 = this;\n\n //TODO(Igor) flushCanonical here once our syncing is not stupid\n if (this.isAsync) {\n var promise = void 0;\n if (this.link) {\n if (this.hasLoaded) {\n promise = this.findRecord();\n } else {\n promise = this.findLink().then(function () {\n return _this3.findRecord();\n });\n }\n } else {\n promise = this.findRecord();\n }\n\n return _promiseProxies.PromiseObject.create({\n promise: promise,\n content: this.inverseInternalModel ? this.inverseInternalModel.getRecord() : null\n });\n } else {\n if (this.inverseInternalModel === null) {\n return null;\n }\n var toReturn = this.inverseInternalModel.getRecord();\n (false && Ember.assert(\"You looked up the '\" + this.key + \"' relationship on a '\" + this.internalModel.modelName + \"' with id \" + this.internalModel.id + \" but some of the associated records were not loaded. Either make sure they are all loaded together with the parent record, or specify that the relationship is async (`DS.belongsTo({ async: true })`)\", toReturn === null || !toReturn.get('isEmpty')));\n\n return toReturn;\n }\n };\n\n BelongsToRelationship.prototype.reload = function reload() {\n // TODO handle case when reload() is triggered multiple times\n\n if (this.link) {\n return this.fetchLink();\n }\n\n // reload record, if it is already loaded\n if (this.inverseInternalModel && this.inverseInternalModel.hasRecord) {\n return this.inverseInternalModel.getRecord().reload();\n }\n\n return this.findRecord();\n };\n\n BelongsToRelationship.prototype.updateData = function updateData(data, initial) {\n (false && Ember.assert('Ember Data expected the data for the ' + this.key + ' relationship on a ' + this.internalModel.toString() + ' to be in a JSON API format and include an `id` and `type` property but it found ' + inspect(data) + '. Please check your serializer and make sure it is serializing the relationship payload into a JSON API format.', data === null || data.id !== undefined && data.type !== undefined));\n\n var internalModel = this.store._pushResourceIdentifier(this, data);\n if (initial) {\n this.setInitialCanonicalInternalModel(internalModel);\n } else {\n this.setCanonicalInternalModel(internalModel);\n }\n };\n\n return BelongsToRelationship;\n }(_relationship.default);\n\n exports.default = BelongsToRelationship;\n});","define(\"ember-data/-private/system/relationships/state/create\", [\"exports\", \"ember-data/-private/system/relationships/state/has-many\", \"ember-data/-private/system/relationships/state/belongs-to\"], function (exports, _hasMany, _belongsTo) {\n \"use strict\";\n\n exports.__esModule = true;\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n }();\n\n var _get = Ember.get;\n\n\n function shouldFindInverse(relationshipMeta) {\n var options = relationshipMeta.options;\n return !(options && options.inverse === null);\n }\n\n function createRelationshipFor(internalModel, relationshipMeta, store) {\n var inverseKey = void 0;\n var inverse = null;\n\n if (shouldFindInverse(relationshipMeta)) {\n inverse = internalModel.type.inverseFor(relationshipMeta.key, store);\n } else if (false) {\n internalModel.type.typeForRelationship(relationshipMeta.key, store);\n }\n\n if (inverse) {\n inverseKey = inverse.name;\n }\n\n if (relationshipMeta.kind === 'hasMany') {\n return new _hasMany.default(store, internalModel, inverseKey, relationshipMeta);\n } else {\n return new _belongsTo.default(store, internalModel, inverseKey, relationshipMeta);\n }\n }\n\n var Relationships = function () {\n function Relationships(internalModel) {\n _classCallCheck(this, Relationships);\n\n this.internalModel = internalModel;\n this.initializedRelationships = Object.create(null);\n }\n\n // TODO @runspired deprecate this as it was never truly a record instance\n\n\n Relationships.prototype.has = function has(key) {\n return !!this.initializedRelationships[key];\n };\n\n Relationships.prototype.forEach = function forEach(cb) {\n var rels = this.initializedRelationships;\n Object.keys(rels).forEach(function (name) {\n cb(name, rels[name]);\n });\n };\n\n Relationships.prototype.get = function get(key) {\n var relationships = this.initializedRelationships;\n var relationship = relationships[key];\n var internalModel = this.internalModel;\n\n if (!relationship) {\n var relationshipsByName = _get(internalModel.type, 'relationshipsByName');\n var rel = relationshipsByName.get(key);\n\n if (!rel) {\n return undefined;\n }\n\n var relationshipPayload = internalModel.store._relationshipsPayloads.get(internalModel.modelName, internalModel.id, key);\n\n relationship = relationships[key] = createRelationshipFor(internalModel, rel, internalModel.store);\n\n if (relationshipPayload) {\n relationship.push(relationshipPayload, true);\n }\n }\n\n return relationship;\n };\n\n _createClass(Relationships, [{\n key: \"record\",\n get: function () {\n return this.internalModel;\n }\n }]);\n\n return Relationships;\n }();\n\n exports.default = Relationships;\n});","define('ember-data/-private/system/relationships/state/has-many', ['exports', 'ember-data/-debug', 'ember-data/-private/system/promise-proxies', 'ember-data/-private/system/relationships/state/relationship', 'ember-data/-private/system/ordered-set', 'ember-data/-private/system/many-array'], function (exports, _debug, _promiseProxies, _relationship, _orderedSet, _manyArray) {\n 'use strict';\n\n exports.__esModule = true;\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n }();\n\n function _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n }\n\n function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n }\n\n var ManyRelationship = function (_Relationship) {\n _inherits(ManyRelationship, _Relationship);\n\n function ManyRelationship(store, internalModel, inverseKey, relationshipMeta) {\n _classCallCheck(this, ManyRelationship);\n\n var _this = _possibleConstructorReturn(this, _Relationship.call(this, store, internalModel, inverseKey, relationshipMeta));\n\n _this.belongsToType = relationshipMeta.type;\n _this.canonicalState = [];\n _this.isPolymorphic = relationshipMeta.options.polymorphic;\n // The ManyArray for this relationship\n _this._manyArray = null;\n // The previous ManyArray for this relationship. It will be destroyed when\n // we create a new many array, but in the interim it will be updated if\n // inverse internal models are unloaded.\n _this._retainedManyArray = null;\n _this.__loadingPromise = null;\n return _this;\n }\n\n ManyRelationship.prototype._updateLoadingPromise = function _updateLoadingPromise(promise, content) {\n if (this.__loadingPromise) {\n if (content) {\n this.__loadingPromise.set('content', content);\n }\n this.__loadingPromise.set('promise', promise);\n } else {\n this.__loadingPromise = _promiseProxies.PromiseManyArray.create({\n promise: promise,\n content: content\n });\n }\n\n return this.__loadingPromise;\n };\n\n ManyRelationship.prototype.removeInverseRelationships = function removeInverseRelationships() {\n _Relationship.prototype.removeInverseRelationships.call(this);\n if (this._manyArray) {\n this._manyArray.destroy();\n this._manyArray = null;\n }\n\n if (this._loadingPromise) {\n this._loadingPromise.destroy();\n }\n };\n\n ManyRelationship.prototype.updateMeta = function updateMeta(meta) {\n _Relationship.prototype.updateMeta.call(this, meta);\n if (this._manyArray) {\n this._manyArray.set('meta', meta);\n }\n };\n\n ManyRelationship.prototype.addCanonicalInternalModel = function addCanonicalInternalModel(internalModel, idx) {\n if (this.canonicalMembers.has(internalModel)) {\n return;\n }\n if (idx !== undefined) {\n this.canonicalState.splice(idx, 0, internalModel);\n } else {\n this.canonicalState.push(internalModel);\n }\n _Relationship.prototype.addCanonicalInternalModel.call(this, internalModel, idx);\n };\n\n ManyRelationship.prototype.inverseDidDematerialize = function inverseDidDematerialize(inverseInternalModel) {\n _Relationship.prototype.inverseDidDematerialize.call(this, inverseInternalModel);\n if (this.isAsync) {\n if (this._manyArray) {\n this._retainedManyArray = this._manyArray;\n this._manyArray = null;\n }\n this._removeInternalModelFromManyArray(this._retainedManyArray, inverseInternalModel);\n }\n this.notifyHasManyChanged();\n };\n\n ManyRelationship.prototype.addInternalModel = function addInternalModel(internalModel, idx) {\n if (this.members.has(internalModel)) {\n return;\n }\n\n (0, _debug.assertPolymorphicType)(this.internalModel, this.relationshipMeta, internalModel);\n _Relationship.prototype.addInternalModel.call(this, internalModel, idx);\n // make lazy later\n this.manyArray._addInternalModels([internalModel], idx);\n };\n\n ManyRelationship.prototype.removeCanonicalInternalModelFromOwn = function removeCanonicalInternalModelFromOwn(internalModel, idx) {\n var i = idx;\n if (!this.canonicalMembers.has(internalModel)) {\n return;\n }\n if (i === undefined) {\n i = this.canonicalState.indexOf(internalModel);\n }\n if (i > -1) {\n this.canonicalState.splice(i, 1);\n }\n _Relationship.prototype.removeCanonicalInternalModelFromOwn.call(this, internalModel, idx);\n };\n\n ManyRelationship.prototype.removeAllCanonicalInternalModelsFromOwn = function removeAllCanonicalInternalModelsFromOwn() {\n _Relationship.prototype.removeAllCanonicalInternalModelsFromOwn.call(this);\n this.canonicalMembers.clear();\n this.canonicalState.splice(0, this.canonicalState.length);\n };\n\n ManyRelationship.prototype.removeCompletelyFromOwn = function removeCompletelyFromOwn(internalModel) {\n _Relationship.prototype.removeCompletelyFromOwn.call(this, internalModel);\n\n var canonicalIndex = this.canonicalState.indexOf(internalModel);\n\n if (canonicalIndex !== -1) {\n this.canonicalState.splice(canonicalIndex, 1);\n }\n\n var manyArray = this._manyArray;\n\n if (manyArray) {\n var idx = manyArray.currentState.indexOf(internalModel);\n\n if (idx !== -1) {\n manyArray.internalReplace(idx, 1);\n }\n }\n };\n\n ManyRelationship.prototype.flushCanonical = function flushCanonical() {\n if (this._manyArray) {\n this._manyArray.flushCanonical();\n }\n _Relationship.prototype.flushCanonical.call(this);\n };\n\n ManyRelationship.prototype.removeInternalModelFromOwn = function removeInternalModelFromOwn(internalModel, idx) {\n if (!this.members.has(internalModel)) {\n return;\n }\n _Relationship.prototype.removeInternalModelFromOwn.call(this, internalModel, idx);\n // note that ensuring the many array is created, via `this.manyArray`\n // (instead of `this._manyArray`) is intentional.\n //\n // Because we're removing from local, and not canonical, state, it is\n // important that the many array is initialized now with those changes,\n // otherwise it will be initialized with canonical state and we'll have\n // lost the fact that this internalModel was removed.\n this._removeInternalModelFromManyArray(this.manyArray, internalModel, idx);\n this._removeInternalModelFromManyArray(this._retainedManyArray, internalModel, idx);\n };\n\n ManyRelationship.prototype.removeAllInternalModelsFromOwn = function removeAllInternalModelsFromOwn() {\n _Relationship.prototype.removeAllInternalModelsFromOwn.call(this);\n // as with removeInternalModelFromOwn, we make sure the many array is\n // instantiated, or we'll lose local removals, as we're not updating\n // canonical state here.\n this.manyArray.clear();\n if (this._retainedManyArray) {\n this._retainedManyArray.clear();\n }\n };\n\n ManyRelationship.prototype._removeInternalModelFromManyArray = function _removeInternalModelFromManyArray(manyArray, internalModel, idx) {\n if (manyArray === null) {\n return;\n }\n\n if (idx !== undefined) {\n //TODO(Igor) not used currently, fix\n manyArray.currentState.removeAt(idx);\n } else {\n manyArray._removeInternalModels([internalModel]);\n }\n };\n\n ManyRelationship.prototype.notifyRecordRelationshipAdded = function notifyRecordRelationshipAdded(internalModel, idx) {\n this.internalModel.notifyHasManyAdded(this.key, internalModel, idx);\n };\n\n ManyRelationship.prototype.reload = function reload() {\n var manyArray = this.manyArray;\n var manyArrayLoadedState = manyArray.get('isLoaded');\n\n if (this._loadingPromise) {\n if (this._loadingPromise.get('isPending')) {\n return this._loadingPromise;\n }\n if (this._loadingPromise.get('isRejected')) {\n manyArray.set('isLoaded', manyArrayLoadedState);\n }\n }\n\n var promise = void 0;\n if (this.link) {\n promise = this.fetchLink();\n } else {\n promise = this.store._scheduleFetchMany(manyArray.currentState).then(function () {\n return manyArray;\n });\n }\n\n this._updateLoadingPromise(promise);\n return this._loadingPromise;\n };\n\n ManyRelationship.prototype.computeChanges = function computeChanges() {\n var internalModels = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\n var members = this.canonicalMembers;\n var internalModelsToRemove = [];\n var internalModelSet = setForArray(internalModels);\n\n members.forEach(function (member) {\n if (internalModelSet.has(member)) {\n return;\n }\n\n internalModelsToRemove.push(member);\n });\n\n this.removeCanonicalInternalModels(internalModelsToRemove);\n\n for (var i = 0, l = internalModels.length; i < l; i++) {\n var internalModel = internalModels[i];\n this.removeCanonicalInternalModel(internalModel);\n this.addCanonicalInternalModel(internalModel, i);\n }\n };\n\n ManyRelationship.prototype.setInitialInternalModels = function setInitialInternalModels(internalModels) {\n if (Array.isArray(internalModels) === false || internalModels.length === 0) {\n return;\n }\n\n for (var i = 0; i < internalModels.length; i++) {\n var internalModel = internalModels[i];\n if (this.canonicalMembers.has(internalModel)) {\n continue;\n }\n\n this.canonicalMembers.add(internalModel);\n this.members.add(internalModel);\n this.setupInverseRelationship(internalModel);\n }\n\n this.canonicalState = this.canonicalMembers.toArray();\n };\n\n ManyRelationship.prototype.fetchLink = function fetchLink() {\n var _this2 = this;\n\n return this.store.findHasMany(this.internalModel, this.link, this.relationshipMeta).then(function (records) {\n if (records.hasOwnProperty('meta')) {\n _this2.updateMeta(records.meta);\n }\n _this2.store._backburner.join(function () {\n _this2.updateInternalModelsFromAdapter(records);\n _this2.manyArray.set('isLoaded', true);\n _this2.setHasData(true);\n });\n return _this2.manyArray;\n });\n };\n\n ManyRelationship.prototype.findRecords = function findRecords() {\n var manyArray = this.manyArray;\n var internalModels = manyArray.currentState;\n\n //TODO CLEANUP\n return this.store.findMany(internalModels).then(function () {\n if (!manyArray.get('isDestroyed')) {\n //Goes away after the manyArray refactor\n manyArray.set('isLoaded', true);\n }\n return manyArray;\n });\n };\n\n ManyRelationship.prototype.notifyHasManyChanged = function notifyHasManyChanged() {\n this.internalModel.notifyHasManyAdded(this.key);\n };\n\n ManyRelationship.prototype.getRecords = function getRecords() {\n var _this3 = this;\n\n //TODO(Igor) sync server here, once our syncing is not stupid\n var manyArray = this.manyArray;\n if (this.isAsync) {\n var promise = void 0;\n if (this.link) {\n if (this.hasLoaded) {\n promise = this.findRecords();\n } else {\n promise = this.findLink().then(function () {\n return _this3.findRecords();\n });\n }\n } else {\n promise = this.findRecords();\n }\n return this._updateLoadingPromise(promise, manyArray);\n } else {\n (false && Ember.assert('You looked up the \\'' + this.key + '\\' relationship on a \\'' + this.internalModel.type.modelName + '\\' with id ' + this.internalModel.id + ' but some of the associated records were not loaded. Either make sure they are all loaded together with the parent record, or specify that the relationship is async (\\'DS.hasMany({ async: true })\\')', manyArray.isEvery('isEmpty', false)));\n\n\n //TODO(Igor) WTF DO I DO HERE?\n // TODO @runspired equal WTFs to Igor\n if (!manyArray.get('isDestroyed')) {\n manyArray.set('isLoaded', true);\n }\n return manyArray;\n }\n };\n\n ManyRelationship.prototype.updateData = function updateData(data, initial) {\n var internalModels = this.store._pushResourceIdentifiers(this, data);\n if (initial) {\n this.setInitialInternalModels(internalModels);\n } else {\n this.updateInternalModelsFromAdapter(internalModels);\n }\n };\n\n ManyRelationship.prototype.destroy = function destroy() {\n _Relationship.prototype.destroy.call(this);\n var manyArray = this._manyArray;\n if (manyArray) {\n manyArray.destroy();\n this._manyArray = null;\n }\n\n var proxy = this.__loadingPromise;\n\n if (proxy) {\n proxy.destroy();\n this.__loadingPromise = null;\n }\n };\n\n _createClass(ManyRelationship, [{\n key: '_loadingPromise',\n get: function () {\n return this.__loadingPromise;\n }\n }, {\n key: 'manyArray',\n get: function () {\n (false && Ember.assert('Error: relationship ' + this.parentType + ':' + this.key + ' has both many array and retained many array', this._manyArray === null || this._retainedManyArray === null));\n\n\n if (!this._manyArray) {\n this._manyArray = _manyArray.default.create({\n canonicalState: this.canonicalState,\n store: this.store,\n relationship: this,\n type: this.store.modelFor(this.belongsToType),\n record: this.internalModel,\n meta: this.meta,\n isPolymorphic: this.isPolymorphic\n });\n\n if (this._retainedManyArray !== null) {\n this._retainedManyArray.destroy();\n this._retainedManyArray = null;\n }\n }\n\n return this._manyArray;\n }\n }]);\n\n return ManyRelationship;\n }(_relationship.default);\n\n exports.default = ManyRelationship;\n\n\n function setForArray(array) {\n var set = new _orderedSet.default();\n\n if (array) {\n for (var i = 0, l = array.length; i < l; i++) {\n set.add(array[i]);\n }\n }\n\n return set;\n }\n});","define('ember-data/-private/system/relationships/state/relationship', ['exports', 'ember-data/-private/system/ordered-set', 'ember-data/-private/system/normalize-link'], function (exports, _orderedSet, _normalizeLink2) {\n 'use strict';\n\n exports.__esModule = true;\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n }();\n\n var guidFor = Ember.guidFor;\n var get = Ember.get;\n\n var Relationship = function () {\n function Relationship(store, internalModel, inverseKey, relationshipMeta) {\n _classCallCheck(this, Relationship);\n\n var async = relationshipMeta.options.async;\n var polymorphic = relationshipMeta.options.polymorphic;\n this.members = new _orderedSet.default();\n this.canonicalMembers = new _orderedSet.default();\n this.store = store;\n this.key = relationshipMeta.key;\n this.inverseKey = inverseKey;\n this.internalModel = internalModel;\n this.isAsync = typeof async === 'undefined' ? true : async;\n this.isPolymorphic = typeof polymorphic === 'undefined' ? true : polymorphic;\n this.relationshipMeta = relationshipMeta;\n //This probably breaks for polymorphic relationship in complex scenarios, due to\n //multiple possible modelNames\n this.inverseKeyForImplicit = this.internalModel.modelName + this.key;\n this.linkPromise = null;\n this.meta = null;\n this.hasData = false;\n this.hasLoaded = false;\n this.__inverseMeta = undefined;\n }\n\n Relationship.prototype._inverseIsAsync = function _inverseIsAsync() {\n var inverseMeta = this._inverseMeta;\n if (!inverseMeta) {\n return false;\n }\n\n var inverseAsync = inverseMeta.options.async;\n return typeof inverseAsync === 'undefined' ? true : inverseAsync;\n };\n\n Relationship.prototype._inverseIsSync = function _inverseIsSync() {\n var inverseMeta = this._inverseMeta;\n if (!inverseMeta) {\n return false;\n }\n\n var inverseAsync = inverseMeta.options.async;\n return typeof inverseAsync === 'undefined' ? false : !inverseAsync;\n };\n\n Relationship.prototype.internalModelDidDematerialize = function internalModelDidDematerialize() {\n var _this = this;\n\n if (!this.inverseKey) {\n return;\n }\n\n this.forAllMembers(function (inverseInternalModel) {\n var relationship = inverseInternalModel._relationships.get(_this.inverseKey);\n relationship.inverseDidDematerialize(_this.internalModel);\n });\n };\n\n Relationship.prototype.inverseDidDematerialize = function inverseDidDematerialize(inverseInternalModel) {\n if (!this.isAsync) {\n // unloading inverse of a sync relationship is treated as a client-side\n // delete, so actually remove the models don't merely invalidate the cp\n // cache.\n this.removeInternalModelFromOwn(inverseInternalModel);\n this.removeCanonicalInternalModelFromOwn(inverseInternalModel);\n }\n };\n\n Relationship.prototype.updateMeta = function updateMeta(meta) {\n this.meta = meta;\n };\n\n Relationship.prototype.clear = function clear() {\n\n var members = this.members.list;\n while (members.length > 0) {\n var member = members[0];\n this.removeInternalModel(member);\n }\n\n var canonicalMembers = this.canonicalMembers.list;\n while (canonicalMembers.length > 0) {\n var _member = canonicalMembers[0];\n this.removeCanonicalInternalModel(_member);\n }\n };\n\n Relationship.prototype.removeAllInternalModelsFromOwn = function removeAllInternalModelsFromOwn() {\n this.members.clear();\n this.internalModel.updateRecordArrays();\n };\n\n Relationship.prototype.removeAllCanonicalInternalModelsFromOwn = function removeAllCanonicalInternalModelsFromOwn() {\n this.canonicalMembers.clear();\n this.flushCanonicalLater();\n };\n\n Relationship.prototype.removeInternalModels = function removeInternalModels(internalModels) {\n var _this2 = this;\n\n internalModels.forEach(function (internalModel) {\n return _this2.removeInternalModel(internalModel);\n });\n };\n\n Relationship.prototype.addInternalModels = function addInternalModels(internalModels, idx) {\n var _this3 = this;\n\n internalModels.forEach(function (internalModel) {\n _this3.addInternalModel(internalModel, idx);\n if (idx !== undefined) {\n idx++;\n }\n });\n };\n\n Relationship.prototype.addCanonicalInternalModels = function addCanonicalInternalModels(internalModels, idx) {\n for (var i = 0; i < internalModels.length; i++) {\n if (idx !== undefined) {\n this.addCanonicalInternalModel(internalModels[i], i + idx);\n } else {\n this.addCanonicalInternalModel(internalModels[i]);\n }\n }\n };\n\n Relationship.prototype.addCanonicalInternalModel = function addCanonicalInternalModel(internalModel, idx) {\n if (!this.canonicalMembers.has(internalModel)) {\n this.canonicalMembers.add(internalModel);\n this.setupInverseRelationship(internalModel);\n }\n this.flushCanonicalLater();\n this.setHasData(true);\n };\n\n Relationship.prototype.setupInverseRelationship = function setupInverseRelationship(internalModel) {\n if (this.inverseKey) {\n var relationships = internalModel._relationships;\n var relationshipExisted = relationships.has(this.inverseKey);\n var relationship = relationships.get(this.inverseKey);\n if (relationshipExisted || this.isPolymorphic) {\n // if we have only just initialized the inverse relationship, then it\n // already has this.internalModel in its canonicalMembers, so skip the\n // unnecessary work. The exception to this is polymorphic\n // relationships whose members are determined by their inverse, as those\n // relationships cannot efficiently find their inverse payloads.\n relationship.addCanonicalInternalModel(this.internalModel);\n }\n } else {\n var _relationships = internalModel._implicitRelationships;\n var _relationship = _relationships[this.inverseKeyForImplicit];\n if (!_relationship) {\n _relationship = _relationships[this.inverseKeyForImplicit] = new Relationship(this.store, internalModel, this.key, { options: { async: this.isAsync }, type: this.parentType });\n }\n _relationship.addCanonicalInternalModel(this.internalModel);\n }\n };\n\n Relationship.prototype.removeCanonicalInternalModels = function removeCanonicalInternalModels(internalModels, idx) {\n for (var i = 0; i < internalModels.length; i++) {\n if (idx !== undefined) {\n this.removeCanonicalInternalModel(internalModels[i], i + idx);\n } else {\n this.removeCanonicalInternalModel(internalModels[i]);\n }\n }\n };\n\n Relationship.prototype.removeCanonicalInternalModel = function removeCanonicalInternalModel(internalModel, idx) {\n if (this.canonicalMembers.has(internalModel)) {\n this.removeCanonicalInternalModelFromOwn(internalModel);\n if (this.inverseKey) {\n this.removeCanonicalInternalModelFromInverse(internalModel);\n } else {\n if (internalModel._implicitRelationships[this.inverseKeyForImplicit]) {\n internalModel._implicitRelationships[this.inverseKeyForImplicit].removeCanonicalInternalModel(this.internalModel);\n }\n }\n }\n this.flushCanonicalLater();\n };\n\n Relationship.prototype.addInternalModel = function addInternalModel(internalModel, idx) {\n if (!this.members.has(internalModel)) {\n this.members.addWithIndex(internalModel, idx);\n this.notifyRecordRelationshipAdded(internalModel, idx);\n if (this.inverseKey) {\n internalModel._relationships.get(this.inverseKey).addInternalModel(this.internalModel);\n } else {\n if (!internalModel._implicitRelationships[this.inverseKeyForImplicit]) {\n internalModel._implicitRelationships[this.inverseKeyForImplicit] = new Relationship(this.store, internalModel, this.key, { options: { async: this.isAsync }, type: this.parentType });\n }\n internalModel._implicitRelationships[this.inverseKeyForImplicit].addInternalModel(this.internalModel);\n }\n this.internalModel.updateRecordArrays();\n }\n this.setHasData(true);\n };\n\n Relationship.prototype.removeInternalModel = function removeInternalModel(internalModel) {\n if (this.members.has(internalModel)) {\n this.removeInternalModelFromOwn(internalModel);\n if (this.inverseKey) {\n this.removeInternalModelFromInverse(internalModel);\n } else {\n if (internalModel._implicitRelationships[this.inverseKeyForImplicit]) {\n internalModel._implicitRelationships[this.inverseKeyForImplicit].removeInternalModel(this.internalModel);\n }\n }\n }\n };\n\n Relationship.prototype.removeInternalModelFromInverse = function removeInternalModelFromInverse(internalModel) {\n var inverseRelationship = internalModel._relationships.get(this.inverseKey);\n //Need to check for existence, as the record might unloading at the moment\n if (inverseRelationship) {\n inverseRelationship.removeInternalModelFromOwn(this.internalModel);\n }\n };\n\n Relationship.prototype.removeInternalModelFromOwn = function removeInternalModelFromOwn(internalModel) {\n this.members.delete(internalModel);\n this.internalModel.updateRecordArrays();\n };\n\n Relationship.prototype.removeCanonicalInternalModelFromInverse = function removeCanonicalInternalModelFromInverse(internalModel) {\n var inverseRelationship = internalModel._relationships.get(this.inverseKey);\n //Need to check for existence, as the record might unloading at the moment\n if (inverseRelationship) {\n inverseRelationship.removeCanonicalInternalModelFromOwn(this.internalModel);\n }\n };\n\n Relationship.prototype.removeCanonicalInternalModelFromOwn = function removeCanonicalInternalModelFromOwn(internalModel) {\n this.canonicalMembers.delete(internalModel);\n this.flushCanonicalLater();\n };\n\n Relationship.prototype.removeCompletelyFromInverse = function removeCompletelyFromInverse() {\n var _this4 = this;\n\n if (!this.inverseKey) {\n return;\n }\n\n // we actually want a union of members and canonicalMembers\n // they should be disjoint but currently are not due to a bug\n var seen = Object.create(null);\n var internalModel = this.internalModel;\n\n var unload = function (inverseInternalModel) {\n var id = guidFor(inverseInternalModel);\n\n if (seen[id] === undefined) {\n var relationship = inverseInternalModel._relationships.get(_this4.inverseKey);\n relationship.removeCompletelyFromOwn(internalModel);\n seen[id] = true;\n }\n };\n\n this.members.forEach(unload);\n this.canonicalMembers.forEach(unload);\n\n if (!this.isAsync) {\n this.clear();\n }\n };\n\n Relationship.prototype.forAllMembers = function forAllMembers(callback) {\n var seen = Object.create(null);\n\n for (var i = 0; i < this.members.list.length; i++) {\n var inverseInternalModel = this.members.list[i];\n var id = guidFor(inverseInternalModel);\n if (!seen[id]) {\n seen[id] = true;\n callback(inverseInternalModel);\n }\n }\n\n for (var _i = 0; _i < this.canonicalMembers.list.length; _i++) {\n var _inverseInternalModel = this.canonicalMembers.list[_i];\n var _id = guidFor(_inverseInternalModel);\n if (!seen[_id]) {\n seen[_id] = true;\n callback(_inverseInternalModel);\n }\n }\n };\n\n Relationship.prototype.removeCompletelyFromOwn = function removeCompletelyFromOwn(internalModel) {\n this.canonicalMembers.delete(internalModel);\n this.members.delete(internalModel);\n this.internalModel.updateRecordArrays();\n };\n\n Relationship.prototype.flushCanonical = function flushCanonical() {\n var list = this.members.list;\n this.willSync = false;\n //a hack for not removing new internalModels\n //TODO remove once we have proper diffing\n var newInternalModels = [];\n for (var i = 0; i < list.length; i++) {\n if (list[i].isNew()) {\n newInternalModels.push(list[i]);\n }\n }\n\n //TODO(Igor) make this less abysmally slow\n this.members = this.canonicalMembers.copy();\n for (var _i2 = 0; _i2 < newInternalModels.length; _i2++) {\n this.members.add(newInternalModels[_i2]);\n }\n };\n\n Relationship.prototype.flushCanonicalLater = function flushCanonicalLater() {\n if (this.willSync) {\n return;\n }\n this.willSync = true;\n this.store._updateRelationshipState(this);\n };\n\n Relationship.prototype.updateLink = function updateLink(link, initial) {\n (false && Ember.warn('You pushed a record of type \\'' + this.internalModel.modelName + '\\' with a relationship \\'' + this.key + '\\' configured as \\'async: false\\'. You\\'ve included a link but no primary data, this may be an error in your payload.', this.isAsync || this.hasData, {\n id: 'ds.store.push-link-for-sync-relationship'\n }));\n (false && Ember.assert('You have pushed a record of type \\'' + this.internalModel.modelName + '\\' with \\'' + this.key + '\\' as a link, but the value of that link is not a string.', typeof link === 'string' || link === null));\n\n\n this.link = link;\n this.linkPromise = null;\n\n if (!initial) {\n this.internalModel.notifyPropertyChange(this.key);\n }\n };\n\n Relationship.prototype.findLink = function findLink() {\n if (this.linkPromise) {\n return this.linkPromise;\n } else {\n var promise = this.fetchLink();\n this.linkPromise = promise;\n return promise.then(function (result) {\n return result;\n });\n }\n };\n\n Relationship.prototype.updateInternalModelsFromAdapter = function updateInternalModelsFromAdapter(internalModels) {\n this.setHasData(true);\n //TODO(Igor) move this to a proper place\n //TODO Once we have adapter support, we need to handle updated and canonical changes\n this.computeChanges(internalModels);\n };\n\n Relationship.prototype.notifyRecordRelationshipAdded = function notifyRecordRelationshipAdded() {};\n\n Relationship.prototype.setHasData = function setHasData(value) {\n this.hasData = value;\n };\n\n Relationship.prototype.setHasLoaded = function setHasLoaded(value) {\n this.hasLoaded = value;\n };\n\n Relationship.prototype.push = function push(payload, initial) {\n\n var hasData = false;\n var hasLink = false;\n\n if (payload.meta) {\n this.updateMeta(payload.meta);\n }\n\n if (payload.data !== undefined) {\n hasData = true;\n this.updateData(payload.data, initial);\n }\n\n if (payload.links && payload.links.related) {\n var relatedLink = (0, _normalizeLink2.default)(payload.links.related);\n if (relatedLink && relatedLink.href && relatedLink.href !== this.link) {\n hasLink = true;\n this.updateLink(relatedLink.href, initial);\n }\n }\n\n /*\n Data being pushed into the relationship might contain only data or links,\n or a combination of both.\n If we got data we want to set both hasData and hasLoaded to true since\n this would indicate that we should prefer the local state instead of\n trying to fetch the link or call findRecord().\n If we have no data but a link is present we want to set hasLoaded to false\n without modifying the hasData flag. This will ensure we fetch the updated\n link next time the relationship is accessed.\n */\n if (hasData) {\n this.setHasData(true);\n this.setHasLoaded(true);\n } else if (hasLink) {\n this.setHasLoaded(false);\n }\n };\n\n Relationship.prototype.updateData = function updateData() {};\n\n Relationship.prototype.destroy = function destroy() {};\n\n _createClass(Relationship, [{\n key: '_inverseMeta',\n get: function () {\n if (this.__inverseMeta === undefined) {\n var inverseMeta = null;\n\n if (this.inverseKey) {\n var inverseModelClass = this.store.modelFor(this.relationshipMeta.type);\n var inverseRelationships = get(inverseModelClass, 'relationshipsByName');\n inverseMeta = inverseRelationships.get(this.inverseKey);\n }\n\n this.__inverseMeta = inverseMeta;\n }\n\n return this.__inverseMeta;\n }\n }, {\n key: 'parentType',\n get: function () {\n return this.internalModel.modelName;\n }\n }]);\n\n return Relationship;\n }();\n\n exports.default = Relationship;\n});","define('ember-data/-private/system/snapshot-record-array', ['exports'], function (exports) {\n 'use strict';\n\n exports.__esModule = true;\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n }();\n\n var SnapshotRecordArray = function () {\n function SnapshotRecordArray(recordArray, meta) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n _classCallCheck(this, SnapshotRecordArray);\n\n /**\n An array of snapshots\n @private\n @property _snapshots\n @type {Array}\n */\n this._snapshots = null;\n\n /**\n An array of records\n @private\n @property _recordArray\n @type {Array}\n */\n this._recordArray = recordArray;\n\n /**\n Number of records in the array\n Example\n ```app/adapters/post.js\n import DS from 'ember-data'\n export default DS.JSONAPIAdapter.extend({\n shouldReloadAll(store, snapshotRecordArray) {\n return !snapshotRecordArray.length;\n },\n });\n ```\n @property length\n @type {Number}\n */\n this.length = recordArray.get('length');\n\n this._type = null;\n\n /**\n Meta objects for the record array.\n Example\n ```app/adapters/post.js\n import DS from 'ember-data'\n export default DS.JSONAPIAdapter.extend({\n shouldReloadAll(store, snapshotRecordArray) {\n var lastRequestTime = snapshotRecordArray.meta.lastRequestTime;\n var twentyMinutes = 20 * 60 * 1000;\n return Date.now() > lastRequestTime + twentyMinutes;\n },\n });\n ```\n @property meta\n @type {Object}\n */\n this.meta = meta;\n\n /**\n A hash of adapter options passed into the store method for this request.\n Example\n ```app/adapters/post.js\n import MyCustomAdapter from './custom-adapter';\n export default MyCustomAdapter.extend({\n findAll(store, type, sinceToken, snapshotRecordArray) {\n if (snapshotRecordArray.adapterOptions.subscribe) {\n // ...\n }\n // ...\n }\n });\n ```\n @property adapterOptions\n @type {Object}\n */\n this.adapterOptions = options.adapterOptions;\n\n /**\n The relationships to include for this request.\n Example\n ```app/adapters/application.js\n import DS from 'ember-data';\n export default DS.Adapter.extend({\n findAll(store, type, snapshotRecordArray) {\n var url = `/${type.modelName}?include=${encodeURIComponent(snapshotRecordArray.include)}`;\n return fetch(url).then((response) => response.json())\n }\n });\n @property include\n @type {String|Array}\n */\n this.include = options.include;\n }\n\n /**\n The type of the underlying records for the snapshots in the array, as a DS.Model\n @property type\n @type {DS.Model}\n */\n\n\n SnapshotRecordArray.prototype.snapshots = function snapshots() {\n if (this._snapshots !== null) {\n return this._snapshots;\n }\n\n this._snapshots = this._recordArray._takeSnapshot();\n\n return this._snapshots;\n };\n\n _createClass(SnapshotRecordArray, [{\n key: 'type',\n get: function () {\n return this._type || (this._type = this._recordArray.get('type'));\n }\n }]);\n\n return SnapshotRecordArray;\n }();\n\n exports.default = SnapshotRecordArray;\n});","define('ember-data/-private/system/snapshot', ['exports'], function (exports) {\n 'use strict';\n\n exports.__esModule = true;\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n }();\n\n var copy = Ember.copy;\n var inspect = Ember.inspect;\n var EmberError = Ember.Error;\n var get = Ember.get;\n\n var Snapshot = function () {\n function Snapshot(internalModel) {\n var _this = this;\n\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n _classCallCheck(this, Snapshot);\n\n this._attributes = Object.create(null);\n this._belongsToRelationships = Object.create(null);\n this._belongsToIds = Object.create(null);\n this._hasManyRelationships = Object.create(null);\n this._hasManyIds = Object.create(null);\n this._internalModel = internalModel;\n\n var record = internalModel.getRecord();\n\n /**\n The underlying record for this snapshot. Can be used to access methods and\n properties defined on the record.\n Example\n ```javascript\n let json = snapshot.record.toJSON();\n ```\n @property record\n @type {DS.Model}\n */\n this.record = record;\n record.eachAttribute(function (keyName) {\n return _this._attributes[keyName] = get(record, keyName);\n });\n\n /**\n The id of the snapshot's underlying record\n Example\n ```javascript\n // store.push('post', { id: 1, author: 'Tomster', title: 'Ember.js rocks' });\n postSnapshot.id; // => '1'\n ```\n @property id\n @type {String}\n */\n this.id = internalModel.id;\n\n /**\n A hash of adapter options\n @property adapterOptions\n @type {Object}\n */\n this.adapterOptions = options.adapterOptions;\n this.include = options.include;\n\n /**\n The name of the type of the underlying record for this snapshot, as a string.\n @property modelName\n @type {String}\n */\n this.modelName = internalModel.modelName;\n\n this._changedAttributes = record.changedAttributes();\n }\n\n /**\n The type of the underlying record for this snapshot, as a DS.Model.\n @property type\n @type {DS.Model}\n */\n\n\n Snapshot.prototype.attr = function attr(keyName) {\n if (keyName in this._attributes) {\n return this._attributes[keyName];\n }\n throw new EmberError(\"Model '\" + inspect(this.record) + \"' has no attribute named '\" + keyName + \"' defined.\");\n };\n\n Snapshot.prototype.attributes = function attributes() {\n return copy(this._attributes);\n };\n\n Snapshot.prototype.changedAttributes = function changedAttributes() {\n var changedAttributes = Object.create(null);\n var changedAttributeKeys = Object.keys(this._changedAttributes);\n\n for (var i = 0, length = changedAttributeKeys.length; i < length; i++) {\n var key = changedAttributeKeys[i];\n changedAttributes[key] = copy(this._changedAttributes[key]);\n }\n\n return changedAttributes;\n };\n\n Snapshot.prototype.belongsTo = function belongsTo(keyName, options) {\n var id = options && options.id;\n var relationship = void 0,\n inverseInternalModel = void 0,\n hasData = void 0;\n var result = void 0;\n\n if (id && keyName in this._belongsToIds) {\n return this._belongsToIds[keyName];\n }\n\n if (!id && keyName in this._belongsToRelationships) {\n return this._belongsToRelationships[keyName];\n }\n\n relationship = this._internalModel._relationships.get(keyName);\n if (!(relationship && relationship.relationshipMeta.kind === 'belongsTo')) {\n throw new EmberError(\"Model '\" + inspect(this.record) + \"' has no belongsTo relationship named '\" + keyName + \"' defined.\");\n }\n\n hasData = get(relationship, 'hasData');\n inverseInternalModel = get(relationship, 'inverseInternalModel');\n\n if (hasData) {\n if (inverseInternalModel && !inverseInternalModel.isDeleted()) {\n if (id) {\n result = get(inverseInternalModel, 'id');\n } else {\n result = inverseInternalModel.createSnapshot();\n }\n } else {\n result = null;\n }\n }\n\n if (id) {\n this._belongsToIds[keyName] = result;\n } else {\n this._belongsToRelationships[keyName] = result;\n }\n\n return result;\n };\n\n Snapshot.prototype.hasMany = function hasMany(keyName, options) {\n var ids = options && options.ids;\n var relationship = void 0,\n members = void 0,\n hasData = void 0;\n var results = void 0;\n\n if (ids && keyName in this._hasManyIds) {\n return this._hasManyIds[keyName];\n }\n\n if (!ids && keyName in this._hasManyRelationships) {\n return this._hasManyRelationships[keyName];\n }\n\n relationship = this._internalModel._relationships.get(keyName);\n if (!(relationship && relationship.relationshipMeta.kind === 'hasMany')) {\n throw new EmberError(\"Model '\" + inspect(this.record) + \"' has no hasMany relationship named '\" + keyName + \"' defined.\");\n }\n\n hasData = get(relationship, 'hasData');\n members = get(relationship, 'members');\n\n if (hasData) {\n results = [];\n members.forEach(function (member) {\n if (!member.isDeleted()) {\n if (ids) {\n results.push(member.id);\n } else {\n results.push(member.createSnapshot());\n }\n }\n });\n }\n\n if (ids) {\n this._hasManyIds[keyName] = results;\n } else {\n this._hasManyRelationships[keyName] = results;\n }\n\n return results;\n };\n\n Snapshot.prototype.eachAttribute = function eachAttribute(callback, binding) {\n this.record.eachAttribute(callback, binding);\n };\n\n Snapshot.prototype.eachRelationship = function eachRelationship(callback, binding) {\n this.record.eachRelationship(callback, binding);\n };\n\n Snapshot.prototype.serialize = function serialize(options) {\n return this.record.store.serializerFor(this.modelName).serialize(this, options);\n };\n\n _createClass(Snapshot, [{\n key: 'type',\n get: function () {\n // TODO @runspired we should deprecate this in favor of modelClass but only once\n // we've cleaned up the internals enough that a public change to follow suite is\n // uncontroversial.\n return this._internalModel.modelClass;\n }\n }]);\n\n return Snapshot;\n }();\n\n exports.default = Snapshot;\n});","define('ember-data/-private/system/store', ['exports', 'ember-data/-private/adapters/errors', 'ember-data/-private/system/model/model', 'ember-data/-private/system/normalize-model-name', 'ember-data/-private/system/identity-map', 'ember-data/-private/system/promise-proxies', 'ember-data/-private/system/store/common', 'ember-data/-private/system/store/serializer-response', 'ember-data/-private/system/store/serializers', 'ember-data/-private/system/relationships/relationship-payloads-manager', 'ember-data/-private/system/store/finders', 'ember-data/-private/utils', 'ember-data/-private/system/coerce-id', 'ember-data/-private/system/record-array-manager', 'ember-data/-private/system/model/internal-model', 'ember-data/-private/features'], function (exports, _errors, _model, _normalizeModelName, _identityMap, _promiseProxies, _common, _serializerResponse, _serializers, _relationshipPayloadsManager, _finders, _utils, _coerceId, _recordArrayManager, _internalModel5, _features) {\n 'use strict';\n\n exports.__esModule = true;\n exports.Store = undefined;\n var A = Ember.A;\n var copy = Ember.copy;\n var EmberError = Ember.Error;\n var MapWithDefault = Ember.MapWithDefault;\n var emberRun = Ember.run;\n var set = Ember.set;\n var get = Ember.get;\n var computed = Ember.computed;\n var RSVP = Ember.RSVP;\n var Service = Ember.Service;\n var typeOf = Ember.typeOf;\n var isPresent = Ember.isPresent;\n var isNone = Ember.isNone;\n var inspect = Ember.inspect;\n\n\n var badIdFormatAssertion = '`id` passed to `findRecord()` has to be non-empty string or number';\n\n var Backburner = Ember._Backburner,\n ENV = Ember.ENV;\n var Promise = RSVP.Promise;\n\n\n //Get the materialized model from the internalModel/promise that returns\n //an internal model and return it in a promiseObject. Useful for returning\n //from find methods\n function promiseRecord(internalModelPromise, label) {\n var toReturn = internalModelPromise.then(function (internalModel) {\n return internalModel.getRecord();\n });\n\n return (0, _promiseProxies.promiseObject)(toReturn, label);\n }\n\n var Store = void 0;\n\n // Implementors Note:\n //\n // The variables in this file are consistently named according to the following\n // scheme:\n //\n // * +id+ means an identifier managed by an external source, provided inside\n // the data provided by that source. These are always coerced to be strings\n // before being used internally.\n // * +clientId+ means a transient numerical identifier generated at runtime by\n // the data store. It is important primarily because newly created objects may\n // not yet have an externally generated id.\n // * +internalModel+ means a record internalModel object, which holds metadata about a\n // record, even if it has not yet been fully materialized.\n // * +type+ means a DS.Model.\n\n /**\n The store contains all of the data for records loaded from the server.\n It is also responsible for creating instances of `DS.Model` that wrap\n the individual data for a record, so that they can be bound to in your\n Handlebars templates.\n \n Define your application's store like this:\n \n ```app/services/store.js\n import DS from 'ember-data';\n \n export default DS.Store.extend({\n });\n ```\n \n Most Ember.js applications will only have a single `DS.Store` that is\n automatically created by their `Ember.Application`.\n \n You can retrieve models from the store in several ways. To retrieve a record\n for a specific id, use `DS.Store`'s `findRecord()` method:\n \n ```javascript\n store.findRecord('person', 123).then(function (person) {\n });\n ```\n \n By default, the store will talk to your backend using a standard\n REST mechanism. You can customize how the store talks to your\n backend by specifying a custom adapter:\n \n ```app/adapters/application.js\n import DS from 'ember-data';\n \n export default DS.Adapter.extend({\n });\n ```\n \n You can learn more about writing a custom adapter by reading the `DS.Adapter`\n documentation.\n \n ### Store createRecord() vs. push() vs. pushPayload()\n \n The store provides multiple ways to create new record objects. They have\n some subtle differences in their use which are detailed below:\n \n [createRecord](#method_createRecord) is used for creating new\n records on the client side. This will return a new record in the\n `created.uncommitted` state. In order to persist this record to the\n backend you will need to call `record.save()`.\n \n [push](#method_push) is used to notify Ember Data's store of new or\n updated records that exist in the backend. This will return a record\n in the `loaded.saved` state. The primary use-case for `store#push` is\n to notify Ember Data about record updates (full or partial) that happen\n outside of the normal adapter methods (for example\n [SSE](http://dev.w3.org/html5/eventsource/) or [Web\n Sockets](http://www.w3.org/TR/2009/WD-websockets-20091222/)).\n \n [pushPayload](#method_pushPayload) is a convenience wrapper for\n `store#push` that will deserialize payloads if the\n Serializer implements a `pushPayload` method.\n \n Note: When creating a new record using any of the above methods\n Ember Data will update `DS.RecordArray`s such as those returned by\n `store#peekAll()` or `store#findAll()`. This means any\n data bindings or computed properties that depend on the RecordArray\n will automatically be synced to include the new or updated record\n values.\n \n @class Store\n @namespace DS\n @extends Ember.Service\n */\n exports.Store = Store = Service.extend({\n\n /**\n @method init\n @private\n */\n init: function () {\n this._super.apply(this, arguments);\n this._backburner = new Backburner(['normalizeRelationships', 'syncRelationships', 'finished']);\n // internal bookkeeping; not observable\n this.recordArrayManager = new _recordArrayManager.default({ store: this });\n this._identityMap = new _identityMap.default();\n this._pendingSave = [];\n this._modelFactoryCache = Object.create(null);\n this._relationshipsPayloads = new _relationshipPayloadsManager.default(this);\n\n /*\n Ember Data uses several specialized micro-queues for organizing\n and coalescing similar async work.\n These queues are currently controlled by a flush scheduled into\n ember-data's custom backburner instance.\n */\n // used for coalescing record save requests\n this._pendingSave = [];\n // used for coalescing relationship updates\n this._updatedRelationships = [];\n // used for coalescing relationship setup needs\n this._pushedInternalModels = [];\n // used for coalescing internal model updates\n this._updatedInternalModels = [];\n\n // used to keep track of all the find requests that need to be coalesced\n this._pendingFetch = MapWithDefault.create({\n defaultValue: function () {\n return [];\n }\n });\n\n this._adapterCache = Object.create(null);\n this._serializerCache = Object.create(null);\n },\n\n\n /**\n The default adapter to use to communicate to a backend server or\n other persistence layer. This will be overridden by an application\n adapter if present.\n If you want to specify `app/adapters/custom.js` as a string, do:\n ```js\n import DS from 'ember-data';\n export default DS.Store.extend({\n adapter: 'custom',\n });\n ```\n @property adapter\n @default '-json-api'\n @type {String}\n */\n adapter: '-json-api',\n\n /**\n Returns a JSON representation of the record using a custom\n type-specific serializer, if one exists.\n The available options are:\n * `includeId`: `true` if the record's ID should be included in\n the JSON representation\n @method serialize\n @private\n @deprecated\n @param {DS.Model} record the record to serialize\n @param {Object} options an options hash\n */\n serialize: function (record, options) {\n if (true) {\n (false && !(false) && Ember.deprecate('Use of store.serialize is deprecated, use record.serialize instead.', false, {\n id: 'ds.store.serialize',\n until: '3.0'\n }));\n }\n var snapshot = record._internalModel.createSnapshot();\n return snapshot.serialize(options);\n },\n\n\n /**\n This property returns the adapter, after resolving a possible\n string key.\n If the supplied `adapter` was a class, or a String property\n path resolved to a class, this property will instantiate the\n class.\n This property is cacheable, so the same instance of a specified\n adapter class should be used for the lifetime of the store.\n @property defaultAdapter\n @private\n @return DS.Adapter\n */\n defaultAdapter: computed('adapter', function () {\n var adapter = get(this, 'adapter');\n\n (false && Ember.assert('You tried to set `adapter` property to an instance of `DS.Adapter`, where it should be a name', typeof adapter === 'string'));\n\n\n return this.adapterFor(adapter);\n }),\n\n // .....................\n // . CREATE NEW RECORD .\n // .....................\n\n /**\n Create a new record in the current store. The properties passed\n to this method are set on the newly created record.\n To create a new instance of a `Post`:\n ```js\n store.createRecord('post', {\n title: 'Rails is omakase'\n });\n ```\n To create a new instance of a `Post` that has a relationship with a `User` record:\n ```js\n let user = this.store.peekRecord('user', 1);\n store.createRecord('post', {\n title: 'Rails is omakase',\n user: user\n });\n ```\n @method createRecord\n @param {String} modelName\n @param {Object} inputProperties a hash of properties to set on the\n newly created record.\n @return {DS.Model} record\n */\n createRecord: function (modelName, inputProperties) {\n (false && Ember.assert('You need to pass a model name to the store\\'s createRecord method', isPresent(modelName)));\n (false && Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of ' + modelName, typeof modelName === 'string'));\n\n var normalizedModelName = (0, _normalizeModelName.default)(modelName);\n var properties = copy(inputProperties) || Object.create(null);\n\n // If the passed properties do not include a primary key,\n // give the adapter an opportunity to generate one. Typically,\n // client-side ID generators will use something like uuid.js\n // to avoid conflicts.\n\n if (isNone(properties.id)) {\n properties.id = this._generateId(normalizedModelName, properties);\n }\n\n // Coerce ID to a string\n properties.id = (0, _coerceId.default)(properties.id);\n\n var internalModel = this._buildInternalModel(normalizedModelName, properties.id);\n internalModel.loadedData();\n var record = internalModel.getRecord(properties);\n\n // TODO @runspired this should also be coalesced into some form of internalModel.setState()\n internalModel.eachRelationship(function (key, descriptor) {\n if (properties[key] !== undefined) {\n internalModel._relationships.get(key).setHasData(true);\n }\n });\n\n return record;\n },\n\n\n /**\n If possible, this method asks the adapter to generate an ID for\n a newly created record.\n @method _generateId\n @private\n @param {String} modelName\n @param {Object} properties from the new record\n @return {String} if the adapter can generate one, an ID\n */\n _generateId: function (modelName, properties) {\n var adapter = this.adapterFor(modelName);\n\n if (adapter && adapter.generateIdForRecord) {\n return adapter.generateIdForRecord(this, modelName, properties);\n }\n\n return null;\n },\n\n\n // .................\n // . DELETE RECORD .\n // .................\n\n /**\n For symmetry, a record can be deleted via the store.\n Example\n ```javascript\n let post = store.createRecord('post', {\n title: 'Rails is omakase'\n });\n store.deleteRecord(post);\n ```\n @method deleteRecord\n @param {DS.Model} record\n */\n deleteRecord: function (record) {\n record.deleteRecord();\n },\n\n\n /**\n For symmetry, a record can be unloaded via the store.\n This will cause the record to be destroyed and freed up for garbage collection.\n Example\n ```javascript\n store.findRecord('post', 1).then(function(post) {\n store.unloadRecord(post);\n });\n ```\n @method unloadRecord\n @param {DS.Model} record\n */\n unloadRecord: function (record) {\n record.unloadRecord();\n },\n\n\n // ................\n // . FIND RECORDS .\n // ................\n\n /**\n @method find\n @param {String} modelName\n @param {String|Integer} id\n @param {Object} options\n @return {Promise} promise\n @private\n */\n find: function (modelName, id, options) {\n // The default `model` hook in Route calls `find(modelName, id)`,\n // that's why we have to keep this method around even though `findRecord` is\n // the public way to get a record by modelName and id.\n (false && Ember.assert('Using store.find(type) has been removed. Use store.findAll(modelName) to retrieve all records for a given type.', arguments.length !== 1));\n (false && Ember.assert('Calling store.find(modelName, id, { preload: preload }) is no longer supported. Use store.findRecord(modelName, id, { preload: preload }) instead.', !options));\n (false && Ember.assert('You need to pass the model name and id to the store\\'s find method', arguments.length === 2));\n (false && Ember.assert('You cannot pass \\'' + id + '\\' as id to the store\\'s find method', typeof id === 'string' || typeof id === 'number'));\n (false && Ember.assert('Calling store.find() with a query object is no longer supported. Use store.query() instead.', typeof id !== 'object'));\n (false && Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of ' + modelName, typeof modelName === 'string'));\n\n\n var normalizedModelName = (0, _normalizeModelName.default)(modelName);\n\n return this.findRecord(normalizedModelName, id);\n },\n\n\n /**\n This method returns a record for a given type and id combination.\n The `findRecord` method will always resolve its promise with the same\n object for a given type and `id`.\n The `findRecord` method will always return a **promise** that will be\n resolved with the record.\n Example\n ```app/routes/post.js\n import Route from '@ember/routing/route';\n export default Route.extend({\n model(params) {\n return this.store.findRecord('post', params.post_id);\n }\n });\n ```\n If the record is not yet available, the store will ask the adapter's `find`\n method to find the necessary data. If the record is already present in the\n store, it depends on the reload behavior _when_ the returned promise\n resolves.\n ### Preloading\n You can optionally `preload` specific attributes and relationships that you know of\n by passing them via the passed `options`.\n For example, if your Ember route looks like `/posts/1/comments/2` and your API route\n for the comment also looks like `/posts/1/comments/2` if you want to fetch the comment\n without fetching the post you can pass in the post to the `findRecord` call:\n ```javascript\n store.findRecord('comment', 2, { preload: { post: 1 } });\n ```\n If you have access to the post model you can also pass the model itself:\n ```javascript\n store.findRecord('post', 1).then(function (myPostModel) {\n store.findRecord('comment', 2, { post: myPostModel });\n });\n ```\n ### Reloading\n The reload behavior is configured either via the passed `options` hash or\n the result of the adapter's `shouldReloadRecord`.\n If `{ reload: true }` is passed or `adapter.shouldReloadRecord` evaluates\n to `true`, then the returned promise resolves once the adapter returns\n data, regardless if the requested record is already in the store:\n ```js\n store.push({\n data: {\n id: 1,\n type: 'post',\n revision: 1\n }\n });\n // adapter#findRecord resolves with\n // [\n // {\n // id: 1,\n // type: 'post',\n // revision: 2\n // }\n // ]\n store.findRecord('post', 1, { reload: true }).then(function(post) {\n post.get('revision'); // 2\n });\n ```\n If no reload is indicated via the abovementioned ways, then the promise\n immediately resolves with the cached version in the store.\n ### Background Reloading\n Optionally, if `adapter.shouldBackgroundReloadRecord` evaluates to `true`,\n then a background reload is started, which updates the records' data, once\n it is available:\n ```js\n // app/adapters/post.js\n import ApplicationAdapter from \"./application\";\n export default ApplicationAdapter.extend({\n shouldReloadRecord(store, snapshot) {\n return false;\n },\n shouldBackgroundReloadRecord(store, snapshot) {\n return true;\n }\n });\n // ...\n store.push({\n data: {\n id: 1,\n type: 'post',\n revision: 1\n }\n });\n let blogPost = store.findRecord('post', 1).then(function(post) {\n post.get('revision'); // 1\n });\n // later, once adapter#findRecord resolved with\n // [\n // {\n // id: 1,\n // type: 'post',\n // revision: 2\n // }\n // ]\n blogPost.get('revision'); // 2\n ```\n If you would like to force or prevent background reloading, you can set a\n boolean value for `backgroundReload` in the options object for\n `findRecord`.\n ```app/routes/post/edit.js\n import Route from '@ember/routing/route';\n export default Route.extend({\n model(params) {\n return this.store.findRecord('post', params.post_id, { backgroundReload: false });\n }\n });\n ```\n If you pass an object on the `adapterOptions` property of the options\n argument it will be passed to you adapter via the snapshot\n ```app/routes/post/edit.js\n import Route from '@ember/routing/route';\n export default Route.extend({\n model(params) {\n return this.store.findRecord('post', params.post_id, {\n adapterOptions: { subscribe: false }\n });\n }\n });\n ```\n ```app/adapters/post.js\n import MyCustomAdapter from './custom-adapter';\n export default MyCustomAdapter.extend({\n findRecord(store, type, id, snapshot) {\n if (snapshot.adapterOptions.subscribe) {\n // ...\n }\n // ...\n }\n });\n ```\n See [peekRecord](#method_peekRecord) to get the cached version of a record.\n ### Retrieving Related Model Records\n If you use an adapter such as Ember's default\n [`JSONAPIAdapter`](https://emberjs.com/api/data/classes/DS.JSONAPIAdapter.html)\n that supports the [JSON API specification](http://jsonapi.org/) and if your server\n endpoint supports the use of an\n ['include' query parameter](http://jsonapi.org/format/#fetching-includes),\n you can use `findRecord()` to automatically retrieve additional records related to\n the one you request by supplying an `include` parameter in the `options` object.\n For example, given a `post` model that has a `hasMany` relationship with a `comment`\n model, when we retrieve a specific post we can have the server also return that post's\n comments in the same request:\n ```app/routes/post.js\n import Route from '@ember/routing/route';\n export default Route.extend({\n model(params) {\n return this.store.findRecord('post', params.post_id, { include: 'comments' });\n }\n });\n ```\n In this case, the post's comments would then be available in your template as\n `model.comments`.\n Multiple relationships can be requested using an `include` parameter consisting of a\n comma-separated list (without white-space) while nested relationships can be specified\n using a dot-separated sequence of relationship names. So to request both the post's\n comments and the authors of those comments the request would look like this:\n ```app/routes/post.js\n import Route from '@ember/routing/route';\n export default Route.extend({\n model(params) {\n return this.store.findRecord('post', params.post_id, { include: 'comments,comments.author' });\n }\n });\n ```\n @since 1.13.0\n @method findRecord\n @param {String} modelName\n @param {(String|Integer)} id\n @param {Object} options\n @return {Promise} promise\n */\n findRecord: function (modelName, id, options) {\n (false && Ember.assert('You need to pass a model name to the store\\'s findRecord method', isPresent(modelName)));\n (false && Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of ' + modelName, typeof modelName === 'string'));\n (false && Ember.assert(badIdFormatAssertion, typeof id === 'string' && id.length > 0 || typeof id === 'number' && !isNaN(id)));\n\n\n var normalizedModelName = (0, _normalizeModelName.default)(modelName);\n\n var internalModel = this._internalModelForId(normalizedModelName, id);\n options = options || {};\n\n if (!this.hasRecordForId(normalizedModelName, id)) {\n return this._findByInternalModel(internalModel, options);\n }\n\n var fetchedInternalModel = this._findRecord(internalModel, options);\n\n return promiseRecord(fetchedInternalModel, 'DS: Store#findRecord ' + normalizedModelName + ' with id: ' + id);\n },\n _findRecord: function (internalModel, options) {\n // Refetch if the reload option is passed\n if (options.reload) {\n return this._scheduleFetch(internalModel, options);\n }\n\n var snapshot = internalModel.createSnapshot(options);\n var adapter = this.adapterFor(internalModel.modelName);\n\n // Refetch the record if the adapter thinks the record is stale\n if (adapter.shouldReloadRecord(this, snapshot)) {\n return this._scheduleFetch(internalModel, options);\n }\n\n if (options.backgroundReload === false) {\n return Promise.resolve(internalModel);\n }\n\n // Trigger the background refetch if backgroundReload option is passed\n if (options.backgroundReload || adapter.shouldBackgroundReloadRecord(this, snapshot)) {\n this._scheduleFetch(internalModel, options);\n }\n\n // Return the cached record\n return Promise.resolve(internalModel);\n },\n _findByInternalModel: function (internalModel) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (options.preload) {\n internalModel.preloadData(options.preload);\n }\n\n var fetchedInternalModel = this._findEmptyInternalModel(internalModel, options);\n\n return promiseRecord(fetchedInternalModel, 'DS: Store#findRecord ' + internalModel.modelName + ' with id: ' + internalModel.id);\n },\n _findEmptyInternalModel: function (internalModel, options) {\n if (internalModel.isEmpty()) {\n return this._scheduleFetch(internalModel, options);\n }\n\n //TODO double check about reloading\n if (internalModel.isLoading()) {\n return internalModel._loadingPromise;\n }\n\n return Promise.resolve(internalModel);\n },\n\n\n /**\n This method makes a series of requests to the adapter's `find` method\n and returns a promise that resolves once they are all loaded.\n @private\n @method findByIds\n @param {String} modelName\n @param {Array} ids\n @return {Promise} promise\n */\n findByIds: function (modelName, ids) {\n (false && Ember.assert('You need to pass a model name to the store\\'s findByIds method', isPresent(modelName)));\n (false && Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of ' + modelName, typeof modelName === 'string'));\n\n\n var promises = new Array(ids.length);\n\n var normalizedModelName = (0, _normalizeModelName.default)(modelName);\n\n for (var i = 0; i < ids.length; i++) {\n promises[i] = this.findRecord(normalizedModelName, ids[i]);\n }\n\n return (0, _promiseProxies.promiseArray)(RSVP.all(promises).then(A, null, 'DS: Store#findByIds of ' + normalizedModelName + ' complete'));\n },\n\n\n /**\n This method is called by `findRecord` if it discovers that a particular\n type/id pair hasn't been loaded yet to kick off a request to the\n adapter.\n @method _fetchRecord\n @private\n @param {InternalModel} internalModel model\n @return {Promise} promise\n */\n _fetchRecord: function (internalModel, options) {\n var modelName = internalModel.modelName;\n var adapter = this.adapterFor(modelName);\n\n (false && Ember.assert('You tried to find a record but you have no adapter (for ' + modelName + ')', adapter));\n (false && Ember.assert('You tried to find a record but your adapter (for ' + modelName + ') does not implement \\'findRecord\\'', typeof adapter.findRecord === 'function'));\n\n\n return (0, _finders._find)(adapter, this, internalModel.type, internalModel.id, internalModel, options);\n },\n _scheduleFetchMany: function (internalModels) {\n var fetches = new Array(internalModels.length);\n\n for (var i = 0; i < internalModels.length; i++) {\n fetches[i] = this._scheduleFetch(internalModels[i]);\n }\n\n return Promise.all(fetches);\n },\n _scheduleFetch: function (internalModel, options) {\n if (internalModel._loadingPromise) {\n return internalModel._loadingPromise;\n }\n\n var id = internalModel.id,\n modelName = internalModel.modelName;\n\n var resolver = RSVP.defer('Fetching ' + modelName + '\\' with id: ' + id);\n var pendingFetchItem = {\n internalModel: internalModel,\n resolver: resolver,\n options: options\n };\n\n var promise = resolver.promise;\n\n internalModel.loadingData(promise);\n if (this._pendingFetch.size === 0) {\n emberRun.schedule('afterRender', this, this.flushAllPendingFetches);\n }\n\n this._pendingFetch.get(modelName).push(pendingFetchItem);\n\n return promise;\n },\n flushAllPendingFetches: function () {\n if (this.isDestroyed || this.isDestroying) {\n return;\n }\n\n this._pendingFetch.forEach(this._flushPendingFetchForType, this);\n this._pendingFetch.clear();\n },\n _flushPendingFetchForType: function (pendingFetchItems, modelName) {\n var store = this;\n var adapter = store.adapterFor(modelName);\n var shouldCoalesce = !!adapter.findMany && adapter.coalesceFindRequests;\n var totalItems = pendingFetchItems.length;\n var internalModels = new Array(totalItems);\n var seeking = Object.create(null);\n\n for (var _i = 0; _i < totalItems; _i++) {\n var pendingItem = pendingFetchItems[_i];\n var _internalModel = pendingItem.internalModel;\n internalModels[_i] = _internalModel;\n seeking[_internalModel.id] = pendingItem;\n }\n\n function _fetchRecord(recordResolverPair) {\n var recordFetch = store._fetchRecord(recordResolverPair.internalModel, recordResolverPair.options); // TODO adapter options\n\n recordResolverPair.resolver.resolve(recordFetch);\n }\n\n function handleFoundRecords(foundInternalModels, expectedInternalModels) {\n // resolve found records\n var found = Object.create(null);\n for (var _i2 = 0, _l = foundInternalModels.length; _i2 < _l; _i2++) {\n var _internalModel2 = foundInternalModels[_i2];\n var _pair = seeking[_internalModel2.id];\n found[_internalModel2.id] = _internalModel2;\n\n if (_pair) {\n var resolver = _pair.resolver;\n resolver.resolve(_internalModel2);\n }\n }\n\n // reject missing records\n var missingInternalModels = [];\n\n for (var _i3 = 0, _l2 = expectedInternalModels.length; _i3 < _l2; _i3++) {\n var _internalModel3 = expectedInternalModels[_i3];\n\n if (!found[_internalModel3.id]) {\n missingInternalModels.push(_internalModel3);\n }\n }\n\n if (missingInternalModels.length) {\n (false && Ember.warn('Ember Data expected to find records with the following ids in the adapter response but they were missing: ' + inspect(missingInternalModels.map(function (r) {\n return r.id;\n })), false, {\n id: 'ds.store.missing-records-from-adapter'\n }));\n\n rejectInternalModels(missingInternalModels);\n }\n }\n\n function rejectInternalModels(internalModels, error) {\n for (var _i4 = 0, _l3 = internalModels.length; _i4 < _l3; _i4++) {\n var _internalModel4 = internalModels[_i4];\n var _pair2 = seeking[_internalModel4.id];\n\n if (_pair2) {\n _pair2.resolver.reject(error || new Error('Expected: \\'' + _internalModel4 + '\\' to be present in the adapter provided payload, but it was not found.'));\n }\n }\n }\n\n if (shouldCoalesce) {\n // TODO: Improve records => snapshots => records => snapshots\n //\n // We want to provide records to all store methods and snapshots to all\n // adapter methods. To make sure we're doing that we're providing an array\n // of snapshots to adapter.groupRecordsForFindMany(), which in turn will\n // return grouped snapshots instead of grouped records.\n //\n // But since the _findMany() finder is a store method we need to get the\n // records from the grouped snapshots even though the _findMany() finder\n // will once again convert the records to snapshots for adapter.findMany()\n var snapshots = new Array(totalItems);\n for (var _i5 = 0; _i5 < totalItems; _i5++) {\n snapshots[_i5] = internalModels[_i5].createSnapshot();\n }\n\n var groups = adapter.groupRecordsForFindMany(this, snapshots);\n\n for (var i = 0, l = groups.length; i < l; i++) {\n var group = groups[i];\n var totalInGroup = groups[i].length;\n var ids = new Array(totalInGroup);\n var groupedInternalModels = new Array(totalInGroup);\n\n for (var j = 0; j < totalInGroup; j++) {\n var internalModel = group[j]._internalModel;\n\n groupedInternalModels[j] = internalModel;\n ids[j] = internalModel.id;\n }\n\n if (totalInGroup > 1) {\n (function (groupedInternalModels) {\n (0, _finders._findMany)(adapter, store, modelName, ids, groupedInternalModels).then(function (foundInternalModels) {\n handleFoundRecords(foundInternalModels, groupedInternalModels);\n }).catch(function (error) {\n rejectInternalModels(groupedInternalModels, error);\n });\n })(groupedInternalModels);\n } else if (ids.length === 1) {\n var pair = seeking[groupedInternalModels[0].id];\n _fetchRecord(pair);\n } else {\n (false && Ember.assert(\"You cannot return an empty array from adapter's method groupRecordsForFindMany\", false));\n }\n }\n } else {\n for (var _i6 = 0; _i6 < totalItems; _i6++) {\n _fetchRecord(pendingFetchItems[_i6]);\n }\n }\n },\n\n\n /**\n Get the reference for the specified record.\n Example\n ```javascript\n let userRef = store.getReference('user', 1);\n // check if the user is loaded\n let isLoaded = userRef.value() !== null;\n // get the record of the reference (null if not yet available)\n let user = userRef.value();\n // get the identifier of the reference\n if (userRef.remoteType() === 'id') {\n let id = userRef.id();\n }\n // load user (via store.find)\n userRef.load().then(...)\n // or trigger a reload\n userRef.reload().then(...)\n // provide data for reference\n userRef.push({ id: 1, username: '@user' }).then(function(user) {\n userRef.value() === user;\n });\n ```\n @method getReference\n @param {String} modelName\n @param {String|Integer} id\n @since 2.5.0\n @return {RecordReference}\n */\n getReference: function (modelName, id) {\n var normalizedModelName = (0, _normalizeModelName.default)(modelName);\n\n return this._internalModelForId(normalizedModelName, id).recordReference;\n },\n\n\n /**\n Get a record by a given type and ID without triggering a fetch.\n This method will synchronously return the record if it is available in the store,\n otherwise it will return `null`. A record is available if it has been fetched earlier, or\n pushed manually into the store.\n See [findRecord](#method_findRecord) if you would like to request this record from the backend.\n _Note: This is a synchronous method and does not return a promise._\n ```js\n let post = store.peekRecord('post', 1);\n post.get('id'); // 1\n ```\n @since 1.13.0\n @method peekRecord\n @param {String} modelName\n @param {String|Integer} id\n @return {DS.Model|null} record\n */\n peekRecord: function (modelName, id) {\n (false && Ember.assert('You need to pass a model name to the store\\'s peekRecord method', isPresent(modelName)));\n (false && Ember.assert('You need to pass both a model name and id to the store\\'s peekRecord method', isPresent(modelName) && isPresent(id)));\n (false && Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of ' + modelName, typeof modelName === 'string'));\n\n var normalizedModelName = (0, _normalizeModelName.default)(modelName);\n\n if (this.hasRecordForId(normalizedModelName, id)) {\n return this._internalModelForId(normalizedModelName, id).getRecord();\n } else {\n return null;\n }\n },\n\n\n /**\n This method is called by the record's `reload` method.\n This method calls the adapter's `find` method, which returns a promise. When\n **that** promise resolves, `reloadRecord` will resolve the promise returned\n by the record's `reload`.\n @method reloadRecord\n @private\n @param {DS.Model} internalModel\n @return {Promise} promise\n */\n _reloadRecord: function (internalModel) {\n var id = internalModel.id,\n modelName = internalModel.modelName;\n\n var adapter = this.adapterFor(modelName);\n\n (false && Ember.assert('You cannot reload a record without an ID', id));\n (false && Ember.assert('You tried to reload a record but you have no adapter (for ' + modelName + ')', adapter));\n (false && Ember.assert('You tried to reload a record but your adapter does not implement \\'findRecord\\'', typeof adapter.findRecord === 'function' || typeof adapter.find === 'function'));\n\n\n return this._scheduleFetch(internalModel);\n },\n\n\n /**\n This method returns true if a record for a given modelName and id is already\n loaded in the store. Use this function to know beforehand if a findRecord()\n will result in a request or that it will be a cache hit.\n Example\n ```javascript\n store.hasRecordForId('post', 1); // false\n store.findRecord('post', 1).then(function() {\n store.hasRecordForId('post', 1); // true\n });\n ```\n @method hasRecordForId\n @param {String} modelName\n @param {(String|Integer)} id\n @return {Boolean}\n */\n hasRecordForId: function (modelName, id) {\n (false && Ember.assert('You need to pass a model name to the store\\'s hasRecordForId method', isPresent(modelName)));\n (false && Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of ' + modelName, typeof modelName === 'string'));\n\n\n var normalizedModelName = (0, _normalizeModelName.default)(modelName);\n\n var trueId = (0, _coerceId.default)(id);\n var internalModel = this._internalModelsFor(normalizedModelName).get(trueId);\n\n return !!internalModel && internalModel.isLoaded();\n },\n\n\n /**\n Returns id record for a given type and ID. If one isn't already loaded,\n it builds a new record and leaves it in the `empty` state.\n @method recordForId\n @private\n @param {String} modelName\n @param {(String|Integer)} id\n @return {DS.Model} record\n */\n recordForId: function (modelName, id) {\n (false && Ember.assert('You need to pass a model name to the store\\'s recordForId method', isPresent(modelName)));\n (false && Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of ' + modelName, typeof modelName === 'string'));\n\n\n return this._internalModelForId(modelName, id).getRecord();\n },\n _internalModelForId: function (modelName, id) {\n var trueId = (0, _coerceId.default)(id);\n var internalModel = this._internalModelsFor(modelName).get(trueId);\n\n if (internalModel) {\n if (internalModel.hasScheduledDestroy()) {\n internalModel.destroySync();\n return this._buildInternalModel(modelName, trueId);\n } else {\n return internalModel;\n }\n } else {\n return this._buildInternalModel(modelName, trueId);\n }\n },\n _internalModelDidReceiveRelationshipData: function (modelName, id, relationshipData) {\n this._relationshipsPayloads.push(modelName, id, relationshipData);\n },\n _internalModelDestroyed: function (internalModel) {\n this._removeFromIdMap(internalModel);\n this._relationshipsPayloads.unload(internalModel.modelName, internalModel.id);\n },\n\n\n /**\n @method findMany\n @private\n @param {Array} internalModels\n @return {Promise} promise\n */\n findMany: function (internalModels) {\n var finds = new Array(internalModels.length);\n\n for (var i = 0; i < internalModels.length; i++) {\n finds[i] = this._findEmptyInternalModel(internalModels[i]);\n }\n\n return Promise.all(finds);\n },\n\n\n /**\n If a relationship was originally populated by the adapter as a link\n (as opposed to a list of IDs), this method is called when the\n relationship is fetched.\n The link (which is usually a URL) is passed through unchanged, so the\n adapter can make whatever request it wants.\n The usual use-case is for the server to register a URL as a link, and\n then use that URL in the future to make a request for the relationship.\n @method findHasMany\n @private\n @param {InternalModel} internalModel\n @param {any} link\n @param {(Relationship)} relationship\n @return {Promise} promise\n */\n findHasMany: function (internalModel, link, relationship) {\n var adapter = this.adapterFor(internalModel.modelName);\n\n (false && Ember.assert('You tried to load a hasMany relationship but you have no adapter (for ' + internalModel.modelName + ')', adapter));\n (false && Ember.assert('You tried to load a hasMany relationship from a specified \\'link\\' in the original payload but your adapter does not implement \\'findHasMany\\'', typeof adapter.findHasMany === 'function'));\n\n\n return (0, _finders._findHasMany)(adapter, this, internalModel, link, relationship);\n },\n\n\n /**\n @method findBelongsTo\n @private\n @param {InternalModel} internalModel\n @param {any} link\n @param {Relationship} relationship\n @return {Promise} promise\n */\n findBelongsTo: function (internalModel, link, relationship) {\n var adapter = this.adapterFor(internalModel.modelName);\n\n (false && Ember.assert('You tried to load a belongsTo relationship but you have no adapter (for ' + internalModel.modelName + ')', adapter));\n (false && Ember.assert('You tried to load a belongsTo relationship from a specified \\'link\\' in the original payload but your adapter does not implement \\'findBelongsTo\\'', typeof adapter.findBelongsTo === 'function'));\n\n\n return (0, _finders._findBelongsTo)(adapter, this, internalModel, link, relationship);\n },\n\n\n /**\n This method delegates a query to the adapter. This is the one place where\n adapter-level semantics are exposed to the application.\n Each time this method is called a new request is made through the adapter.\n Exposing queries this way seems preferable to creating an abstract query\n language for all server-side queries, and then require all adapters to\n implement them.\n ---\n If you do something like this:\n ```javascript\n store.query('person', { page: 1 });\n ```\n The call made to the server, using a Rails backend, will look something like this:\n ```\n Started GET \"/api/v1/person?page=1\"\n Processing by Api::V1::PersonsController#index as HTML\n Parameters: { \"page\"=>\"1\" }\n ```\n ---\n If you do something like this:\n ```javascript\n store.query('person', { ids: [1, 2, 3] });\n ```\n The call to the server, using a Rails backend, will look something like this:\n ```\n Started GET \"/api/v1/person?ids%5B%5D=1&ids%5B%5D=2&ids%5B%5D=3\"\n Processing by Api::V1::PersonsController#index as HTML\n Parameters: { \"ids\" => [\"1\", \"2\", \"3\"] }\n ```\n This method returns a promise, which is resolved with an\n [`AdapterPopulatedRecordArray`](https://emberjs.com/api/data/classes/DS.AdapterPopulatedRecordArray.html)\n once the server returns.\n @since 1.13.0\n @method query\n @param {String} modelName\n @param {any} query an opaque query to be used by the adapter\n @return {Promise} promise\n */\n query: function (modelName, query) {\n (false && Ember.assert('You need to pass a model name to the store\\'s query method', isPresent(modelName)));\n (false && Ember.assert('You need to pass a query hash to the store\\'s query method', query));\n (false && Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of ' + modelName, typeof modelName === 'string'));\n\n\n var normalizedModelName = (0, _normalizeModelName.default)(modelName);\n return this._query(normalizedModelName, query);\n },\n _query: function (modelName, query, array) {\n (false && Ember.assert('You need to pass a model name to the store\\'s query method', isPresent(modelName)));\n (false && Ember.assert('You need to pass a query hash to the store\\'s query method', query));\n (false && Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of ' + modelName, typeof modelName === 'string'));\n\n var adapter = this.adapterFor(modelName);\n (false && Ember.assert('You tried to load a query but you have no adapter (for ' + modelName + ')', adapter));\n (false && Ember.assert('You tried to load a query but your adapter does not implement \\'query\\'', typeof adapter.query === 'function'));\n\n\n var pA = (0, _promiseProxies.promiseArray)((0, _finders._query)(adapter, this, modelName, query, array));\n\n return pA;\n },\n\n\n /**\n This method makes a request for one record, where the `id` is not known\n beforehand (if the `id` is known, use [`findRecord`](#method_findRecord)\n instead).\n This method can be used when it is certain that the server will return a\n single object for the primary data.\n Each time this method is called a new request is made through the adapter.\n Let's assume our API provides an endpoint for the currently logged in user\n via:\n ```\n // GET /api/current_user\n {\n user: {\n id: 1234,\n username: 'admin'\n }\n }\n ```\n Since the specific `id` of the `user` is not known beforehand, we can use\n `queryRecord` to get the user:\n ```javascript\n store.queryRecord('user', {}).then(function(user) {\n let username = user.get('username');\n console.log(`Currently logged in as ${username}`);\n });\n ```\n The request is made through the adapters' `queryRecord`:\n ```app/adapters/user.js\n import $ from 'jquery';\n import DS from 'ember-data';\n export default DS.Adapter.extend({\n queryRecord(modelName, query) {\n return $.getJSON('/api/current_user');\n }\n });\n ```\n Note: the primary use case for `store.queryRecord` is when a single record\n is queried and the `id` is not known beforehand. In all other cases\n `store.query` and using the first item of the array is likely the preferred\n way:\n ```\n // GET /users?username=unique\n {\n data: [{\n id: 1234,\n type: 'user',\n attributes: {\n username: \"unique\"\n }\n }]\n }\n ```\n ```javascript\n store.query('user', { username: 'unique' }).then(function(users) {\n return users.get('firstObject');\n }).then(function(user) {\n let id = user.get('id');\n });\n ```\n This method returns a promise, which resolves with the found record.\n If the adapter returns no data for the primary data of the payload, then\n `queryRecord` resolves with `null`:\n ```\n // GET /users?username=unique\n {\n data: null\n }\n ```\n ```javascript\n store.queryRecord('user', { username: 'unique' }).then(function(user) {\n console.log(user); // null\n });\n ```\n @since 1.13.0\n @method queryRecord\n @param {String} modelName\n @param {any} query an opaque query to be used by the adapter\n @return {Promise} promise which resolves with the found record or `null`\n */\n queryRecord: function (modelName, query) {\n (false && Ember.assert('You need to pass a model name to the store\\'s queryRecord method', isPresent(modelName)));\n (false && Ember.assert('You need to pass a query hash to the store\\'s queryRecord method', query));\n (false && Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of ' + modelName, typeof modelName === 'string'));\n\n\n var normalizedModelName = (0, _normalizeModelName.default)(modelName);\n\n var adapter = this.adapterFor(normalizedModelName);\n\n (false && Ember.assert('You tried to make a query but you have no adapter (for ' + normalizedModelName + ')', adapter));\n (false && Ember.assert('You tried to make a query but your adapter does not implement \\'queryRecord\\'', typeof adapter.queryRecord === 'function'));\n\n\n return (0, _promiseProxies.promiseObject)((0, _finders._queryRecord)(adapter, this, modelName, query).then(function (internalModel) {\n // the promise returned by store.queryRecord is expected to resolve with\n // an instance of DS.Model\n if (internalModel) {\n return internalModel.getRecord();\n }\n\n return null;\n }));\n },\n\n\n /**\n `findAll` asks the adapter's `findAll` method to find the records for the\n given type, and returns a promise which will resolve with all records of\n this type present in the store, even if the adapter only returns a subset\n of them.\n ```app/routes/authors.js\n import Route from '@ember/routing/route';\n export default Route.extend({\n model(params) {\n return this.store.findAll('author');\n }\n });\n ```\n _When_ the returned promise resolves depends on the reload behavior,\n configured via the passed `options` hash and the result of the adapter's\n `shouldReloadAll` method.\n ### Reloading\n If `{ reload: true }` is passed or `adapter.shouldReloadAll` evaluates to\n `true`, then the returned promise resolves once the adapter returns data,\n regardless if there are already records in the store:\n ```js\n store.push({\n data: {\n id: 'first',\n type: 'author'\n }\n });\n // adapter#findAll resolves with\n // [\n // {\n // id: 'second',\n // type: 'author'\n // }\n // ]\n store.findAll('author', { reload: true }).then(function(authors) {\n authors.getEach('id'); // ['first', 'second']\n });\n ```\n If no reload is indicated via the abovementioned ways, then the promise\n immediately resolves with all the records currently loaded in the store.\n ### Background Reloading\n Optionally, if `adapter.shouldBackgroundReloadAll` evaluates to `true`,\n then a background reload is started. Once this resolves, the array with\n which the promise resolves, is updated automatically so it contains all the\n records in the store:\n ```app/adapters/application.js\n import DS from 'ember-data';\n export default DS.Adapter.extend({\n shouldReloadAll(store, snapshotsArray) {\n return false;\n },\n shouldBackgroundReloadAll(store, snapshotsArray) {\n return true;\n }\n });\n // ...\n store.push({\n data: {\n id: 'first',\n type: 'author'\n }\n });\n let allAuthors;\n store.findAll('author').then(function(authors) {\n authors.getEach('id'); // ['first']\n allAuthors = authors;\n });\n // later, once adapter#findAll resolved with\n // [\n // {\n // id: 'second',\n // type: 'author'\n // }\n // ]\n allAuthors.getEach('id'); // ['first', 'second']\n ```\n If you would like to force or prevent background reloading, you can set a\n boolean value for `backgroundReload` in the options object for\n `findAll`.\n ```app/routes/post/edit.js\n import Route from '@ember/routing/route';\n export default Route.extend({\n model() {\n return this.store.findAll('post', { backgroundReload: false });\n }\n });\n ```\n If you pass an object on the `adapterOptions` property of the options\n argument it will be passed to you adapter via the `snapshotRecordArray`\n ```app/routes/posts.js\n import Route from '@ember/routing/route';\n export default Route.extend({\n model(params) {\n return this.store.findAll('post', {\n adapterOptions: { subscribe: false }\n });\n }\n });\n ```\n ```app/adapters/post.js\n import MyCustomAdapter from './custom-adapter';\n export default MyCustomAdapter.extend({\n findAll(store, type, sinceToken, snapshotRecordArray) {\n if (snapshotRecordArray.adapterOptions.subscribe) {\n // ...\n }\n // ...\n }\n });\n ```\n See [peekAll](#method_peekAll) to get an array of current records in the\n store, without waiting until a reload is finished.\n ### Retrieving Related Model Records\n If you use an adapter such as Ember's default\n [`JSONAPIAdapter`](https://emberjs.com/api/data/classes/DS.JSONAPIAdapter.html)\n that supports the [JSON API specification](http://jsonapi.org/) and if your server\n endpoint supports the use of an\n ['include' query parameter](http://jsonapi.org/format/#fetching-includes),\n you can use `findAll()` to automatically retrieve additional records related to\n those requested by supplying an `include` parameter in the `options` object.\n For example, given a `post` model that has a `hasMany` relationship with a `comment`\n model, when we retrieve all of the post records we can have the server also return\n all of the posts' comments in the same request:\n ```app/routes/posts.js\n import Route from '@ember/routing/route';\n export default Route.extend({\n model() {\n return this.store.findAll('post', { include: 'comments' });\n }\n });\n ```\n Multiple relationships can be requested using an `include` parameter consisting of a\n comma-separated list (without white-space) while nested relationships can be specified\n using a dot-separated sequence of relationship names. So to request both the posts'\n comments and the authors of those comments the request would look like this:\n ```app/routes/posts.js\n import Route from '@ember/routing/route';\n export default Route.extend({\n model() {\n return this.store.findAll('post', { include: 'comments,comments.author' });\n }\n });\n ```\n See [query](#method_query) to only get a subset of records from the server.\n @since 1.13.0\n @method findAll\n @param {String} modelName\n @param {Object} options\n @return {Promise} promise\n */\n findAll: function (modelName, options) {\n (false && Ember.assert('You need to pass a model name to the store\\'s findAll method', isPresent(modelName)));\n (false && Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of ' + modelName, typeof modelName === 'string'));\n\n var normalizedModelName = (0, _normalizeModelName.default)(modelName);\n var fetch = this._fetchAll(normalizedModelName, this.peekAll(normalizedModelName), options);\n\n return fetch;\n },\n\n\n /**\n @method _fetchAll\n @private\n @param {DS.Model} modelName\n @param {DS.RecordArray} array\n @return {Promise} promise\n */\n _fetchAll: function (modelName, array) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n var adapter = this.adapterFor(modelName);\n var sinceToken = this._internalModelsFor(modelName).metadata.since;\n\n (false && Ember.assert('You tried to load all records but you have no adapter (for ' + modelName + ')', adapter));\n (false && Ember.assert('You tried to load all records but your adapter does not implement \\'findAll\\'', typeof adapter.findAll === 'function'));\n\n\n if (options.reload) {\n set(array, 'isUpdating', true);\n return (0, _promiseProxies.promiseArray)((0, _finders._findAll)(adapter, this, modelName, sinceToken, options));\n }\n\n var snapshotArray = array._createSnapshot(options);\n\n if (adapter.shouldReloadAll(this, snapshotArray)) {\n set(array, 'isUpdating', true);\n return (0, _promiseProxies.promiseArray)((0, _finders._findAll)(adapter, this, modelName, sinceToken, options));\n }\n\n if (options.backgroundReload === false) {\n return (0, _promiseProxies.promiseArray)(Promise.resolve(array));\n }\n\n if (options.backgroundReload || adapter.shouldBackgroundReloadAll(this, snapshotArray)) {\n set(array, 'isUpdating', true);\n (0, _finders._findAll)(adapter, this, modelName, sinceToken, options);\n }\n\n return (0, _promiseProxies.promiseArray)(Promise.resolve(array));\n },\n\n\n /**\n @method _didUpdateAll\n @param {String} modelName\n @private\n */\n _didUpdateAll: function (modelName) {\n this.recordArrayManager._didUpdateAll(modelName);\n },\n didUpdateAll: function (modelName) {\n (false && !(false) && Ember.deprecate('didUpdateAll was documented as private and will be removed in the next version of Ember Data.', false, { id: 'ember-data.didUpdateAll', until: '2.17.0' }));\n\n return this._didUpdateAll(modelName);\n },\n\n\n /**\n This method returns a filtered array that contains all of the\n known records for a given type in the store.\n Note that because it's just a filter, the result will contain any\n locally created records of the type, however, it will not make a\n request to the backend to retrieve additional records. If you\n would like to request all the records from the backend please use\n [store.findAll](#method_findAll).\n Also note that multiple calls to `peekAll` for a given type will always\n return the same `RecordArray`.\n Example\n ```javascript\n let localPosts = store.peekAll('post');\n ```\n @since 1.13.0\n @method peekAll\n @param {String} modelName\n @return {DS.RecordArray}\n */\n peekAll: function (modelName) {\n (false && Ember.assert('You need to pass a model name to the store\\'s peekAll method', isPresent(modelName)));\n (false && Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of ' + modelName, typeof modelName === 'string'));\n\n var normalizedModelName = (0, _normalizeModelName.default)(modelName);\n return this.recordArrayManager.liveRecordArrayFor(normalizedModelName);\n },\n\n\n /**\n This method unloads all records in the store.\n It schedules unloading to happen during the next run loop.\n Optionally you can pass a type which unload all records for a given type.\n ```javascript\n store.unloadAll();\n store.unloadAll('post');\n ```\n @method unloadAll\n @param {String} modelName\n */\n unloadAll: function (modelName) {\n (false && Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of ' + modelName, !modelName || typeof modelName === 'string'));\n\n\n if (arguments.length === 0) {\n this._identityMap.clear();\n } else {\n var normalizedModelName = (0, _normalizeModelName.default)(modelName);\n this._internalModelsFor(normalizedModelName).clear();\n }\n },\n\n\n /**\n Takes a type and filter function, and returns a live RecordArray that\n remains up to date as new records are loaded into the store or created\n locally.\n The filter function takes a materialized record, and returns true\n if the record should be included in the filter and false if it should\n not.\n Example\n ```javascript\n store.filter('post', function(post) {\n return post.get('unread');\n });\n ```\n The filter function is called once on all records for the type when\n it is created, and then once on each newly loaded or created record.\n If any of a record's properties change, or if it changes state, the\n filter function will be invoked again to determine whether it should\n still be in the array.\n Optionally you can pass a query, which is the equivalent of calling\n [query](#method_query) with that same query, to fetch additional records\n from the server. The results returned by the server could then appear\n in the filter if they match the filter function.\n The query itself is not used to filter records, it's only sent to your\n server for you to be able to do server-side filtering. The filter\n function will be applied on the returned results regardless.\n Example\n ```javascript\n store.filter('post', { unread: true }, function(post) {\n return post.get('unread');\n }).then(function(unreadPosts) {\n unreadPosts.get('length'); // 5\n let unreadPost = unreadPosts.objectAt(0);\n unreadPost.set('unread', false);\n unreadPosts.get('length'); // 4\n });\n ```\n @method filter\n @private\n @param {String} modelName\n @param {Object} query optional query\n @param {Function} filter\n @return {DS.PromiseArray}\n @deprecated\n */\n filter: function (modelName, query, filter) {\n (false && Ember.assert('You need to pass a model name to the store\\'s filter method', isPresent(modelName)));\n (false && Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of ' + modelName, typeof modelName === 'string'));\n\n\n if (!ENV.ENABLE_DS_FILTER) {\n (false && Ember.assert('The filter API has been moved to a plugin. To enable store.filter using an environment flag, or to use an alternative, you can visit the ember-data-filter addon page. https://github.com/ember-data/ember-data-filter', false));\n }\n\n var promise = void 0;\n var length = arguments.length;\n var array = void 0;\n var hasQuery = length === 3;\n\n var normalizedModelName = (0, _normalizeModelName.default)(modelName);\n\n // allow an optional server query\n if (hasQuery) {\n promise = this.query(normalizedModelName, query);\n } else if (arguments.length === 2) {\n filter = query;\n }\n\n if (hasQuery) {\n array = this.recordArrayManager.createFilteredRecordArray(normalizedModelName, filter, query);\n } else {\n array = this.recordArrayManager.createFilteredRecordArray(normalizedModelName, filter);\n }\n\n promise = promise || Promise.resolve(array);\n\n return (0, _promiseProxies.promiseArray)(promise.then(function () {\n return array;\n }, null, 'DS: Store#filter of ' + normalizedModelName));\n },\n\n\n /**\n This method has been deprecated and is an alias for store.hasRecordForId, which should\n be used instead.\n @deprecated\n @method recordIsLoaded\n @param {String} modelName\n @param {string} id\n @return {boolean}\n */\n recordIsLoaded: function (modelName, id) {\n (false && !(false) && Ember.deprecate('Use of recordIsLoaded is deprecated, use hasRecordForId instead.', false, {\n id: 'ds.store.recordIsLoaded',\n until: '3.0'\n }));\n\n return this.hasRecordForId(modelName, id);\n },\n\n\n // ..............\n // . PERSISTING .\n // ..............\n\n /**\n This method is called by `record.save`, and gets passed a\n resolver for the promise that `record.save` returns.\n It schedules saving to happen at the end of the run loop.\n @method scheduleSave\n @private\n @param {InternalModel} internalModel\n @param {Resolver} resolver\n @param {Object} options\n */\n scheduleSave: function (internalModel, resolver, options) {\n var snapshot = internalModel.createSnapshot(options);\n internalModel.flushChangedAttributes();\n internalModel.adapterWillCommit();\n this._pendingSave.push({\n snapshot: snapshot,\n resolver: resolver\n });\n emberRun.once(this, this.flushPendingSave);\n },\n\n\n /**\n This method is called at the end of the run loop, and\n flushes any records passed into `scheduleSave`\n @method flushPendingSave\n @private\n */\n flushPendingSave: function () {\n var pending = this._pendingSave.slice();\n this._pendingSave = [];\n\n for (var i = 0, j = pending.length; i < j; i++) {\n var pendingItem = pending[i];\n var snapshot = pendingItem.snapshot;\n var resolver = pendingItem.resolver;\n var internalModel = snapshot._internalModel;\n var adapter = this.adapterFor(internalModel.modelName);\n var operation = void 0;\n\n if (internalModel.currentState.stateName === 'root.deleted.saved') {\n resolver.resolve();\n continue;\n } else if (internalModel.isNew()) {\n operation = 'createRecord';\n } else if (internalModel.isDeleted()) {\n operation = 'deleteRecord';\n } else {\n operation = 'updateRecord';\n }\n\n resolver.resolve(_commit(adapter, this, operation, snapshot));\n }\n },\n\n\n /**\n This method is called once the promise returned by an\n adapter's `createRecord`, `updateRecord` or `deleteRecord`\n is resolved.\n If the data provides a server-generated ID, it will\n update the record and the store's indexes.\n @method didSaveRecord\n @private\n @param {InternalModel} internalModel the in-flight internal model\n @param {Object} data optional data (see above)\n */\n didSaveRecord: function (internalModel, dataArg) {\n var data = void 0;\n if (dataArg) {\n data = dataArg.data;\n }\n if (data) {\n // normalize relationship IDs into records\n this.updateId(internalModel, data);\n this._setupRelationshipsForModel(internalModel, data);\n } else {\n (false && Ember.assert('Your ' + internalModel.modelName + ' record was saved to the server, but the response does not have an id and no id has been set client side. Records must have ids. Please update the server response to provide an id in the response or generate the id on the client side either before saving the record or while normalizing the response.', internalModel.id));\n }\n\n //We first make sure the primary data has been updated\n //TODO try to move notification to the user to the end of the runloop\n internalModel.adapterDidCommit(data);\n },\n\n\n /**\n This method is called once the promise returned by an\n adapter's `createRecord`, `updateRecord` or `deleteRecord`\n is rejected with a `DS.InvalidError`.\n @method recordWasInvalid\n @private\n @param {InternalModel} internalModel\n @param {Object} errors\n */\n recordWasInvalid: function (internalModel, errors) {\n internalModel.adapterDidInvalidate(errors);\n },\n\n\n /**\n This method is called once the promise returned by an\n adapter's `createRecord`, `updateRecord` or `deleteRecord`\n is rejected (with anything other than a `DS.InvalidError`).\n @method recordWasError\n @private\n @param {InternalModel} internalModel\n @param {Error} error\n */\n recordWasError: function (internalModel, error) {\n internalModel.adapterDidError(error);\n },\n\n\n /**\n When an adapter's `createRecord`, `updateRecord` or `deleteRecord`\n resolves with data, this method extracts the ID from the supplied\n data.\n @method updateId\n @private\n @param {InternalModel} internalModel\n @param {Object} data\n */\n updateId: function (internalModel, data) {\n var oldId = internalModel.id;\n var modelName = internalModel.modelName;\n var id = (0, _coerceId.default)(data.id);\n\n // ID absolutely can't be missing if the oldID is empty (missing Id in response for a new record)\n (false && Ember.assert('\\'' + modelName + '\\' was saved to the server, but the response does not have an id and your record does not either.', !(id === null && oldId === null)));\n\n // ID absolutely can't be different than oldID if oldID is not null\n\n (false && Ember.assert('\\'' + modelName + ':' + oldId + '\\' was saved to the server, but the response returned the new id \\'' + id + '\\'. The store cannot assign a new id to a record that already has an id.', !(oldId !== null && id !== oldId)));\n\n // ID can be null if oldID is not null (altered ID in response for a record)\n // however, this is more than likely a developer error.\n\n if (oldId !== null && id === null) {\n (false && Ember.warn('Your ' + modelName + ' record was saved to the server, but the response does not have an id.', !(oldId !== null && id === null)));\n\n return;\n }\n\n var existingInternalModel = this._existingInternalModelForId(modelName, id);\n\n (false && Ember.assert('\\'' + modelName + '\\' was saved to the server, but the response returned the new id \\'' + id + '\\', which has already been used with another record.\\'', isNone(existingInternalModel) || existingInternalModel === internalModel));\n\n\n this._internalModelsFor(internalModel.modelName).set(id, internalModel);\n\n internalModel.setId(id);\n },\n\n\n /**\n Returns a map of IDs to client IDs for a given modelName.\n @method _internalModelsFor\n @private\n @param {String} modelName\n @return {Object} recordMap\n */\n _internalModelsFor: function (modelName) {\n return this._identityMap.retrieve(modelName);\n },\n\n\n // ................\n // . LOADING DATA .\n // ................\n\n /**\n This internal method is used by `push`.\n @method _load\n @private\n @param {Object} data\n */\n _load: function (data) {\n var modelName = (0, _normalizeModelName.default)(data.type);\n var internalModel = this._internalModelForId(modelName, data.id);\n\n var isUpdate = internalModel.currentState.isEmpty === false;\n\n internalModel.setupData(data);\n\n if (isUpdate) {\n this.recordArrayManager.recordDidChange(internalModel);\n } else {\n this.recordArrayManager.recordWasLoaded(internalModel);\n }\n\n return internalModel;\n },\n\n\n /*\n In case someone defined a relationship to a mixin, for example:\n ```\n let Comment = DS.Model.extend({\n owner: belongsTo('commentable'. { polymorphic: true })\n });\n let Commentable = Ember.Mixin.create({\n comments: hasMany('comment')\n });\n ```\n we want to look up a Commentable class which has all the necessary\n relationship metadata. Thus, we look up the mixin and create a mock\n DS.Model, so we can access the relationship CPs of the mixin (`comments`)\n in this case\n @private\n */\n _modelForMixin: function (normalizedModelName) {\n // container.registry = 2.1\n // container._registry = 1.11 - 2.0\n // container = < 1.11\n var owner = (0, _utils.getOwner)(this);\n var mixin = void 0;\n\n if (owner.factoryFor) {\n var MaybeMixin = owner.factoryFor('mixin:' + normalizedModelName);\n mixin = MaybeMixin && MaybeMixin.class;\n } else {\n mixin = owner._lookupFactory('mixin:' + normalizedModelName);\n }\n\n if (mixin) {\n var ModelForMixin = _model.default.extend(mixin);\n ModelForMixin.reopenClass({\n __isMixin: true,\n __mixin: mixin\n });\n\n //Cache the class as a model\n owner.register('model:' + normalizedModelName, ModelForMixin);\n }\n\n return this.modelFactoryFor(normalizedModelName);\n },\n\n\n /**\n Returns the model class for the particular `modelName`.\n The class of a model might be useful if you want to get a list of all the\n relationship names of the model, see\n [`relationshipNames`](https://emberjs.com/api/data/classes/DS.Model.html#property_relationshipNames)\n for example.\n @method modelFor\n @param {String} modelName\n @return {DS.Model}\n */\n modelFor: function (modelName) {\n (false && Ember.assert('You need to pass a model name to the store\\'s modelFor method', isPresent(modelName)));\n (false && Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of ' + modelName, typeof modelName === 'string'));\n\n\n var normalizedModelName = (0, _normalizeModelName.default)(modelName);\n\n return this._modelFor(normalizedModelName);\n },\n\n\n /*\n @private\n */\n _modelFor: function (modelName) {\n var maybeFactory = this._modelFactoryFor(modelName);\n // for factorFor factory/class split\n return maybeFactory.class ? maybeFactory.class : maybeFactory;\n },\n _modelFactoryFor: function (modelName) {\n var factory = this._modelFactoryCache[modelName];\n\n if (!factory) {\n factory = this.modelFactoryFor(modelName);\n\n if (!factory) {\n //Support looking up mixins as base types for polymorphic relationships\n factory = this._modelForMixin(modelName);\n }\n if (!factory) {\n throw new EmberError('No model was found for \\'' + modelName + '\\'');\n }\n\n // interopt with the future\n var klass = (0, _utils.getOwner)(this).factoryFor ? factory.class : factory;\n\n (false && Ember.assert('\\'' + inspect(klass) + '\\' does not appear to be an ember-data model', klass.isModel));\n\n // TODO: deprecate this\n\n klass.modelName = klass.modelName || modelName;\n\n this._modelFactoryCache[modelName] = factory;\n }\n\n return factory;\n },\n\n\n /*\n @private\n */\n modelFactoryFor: function (modelName) {\n (false && Ember.assert('You need to pass a model name to the store\\'s modelFactoryFor method', isPresent(modelName)));\n (false && Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of ' + modelName, typeof modelName === 'string'));\n\n\n var normalizedModelName = (0, _normalizeModelName.default)(modelName);\n var owner = (0, _utils.getOwner)(this);\n\n if (owner.factoryFor) {\n return owner.factoryFor('model:' + normalizedModelName);\n } else {\n return owner._lookupFactory('model:' + normalizedModelName);\n }\n },\n\n\n /**\n Push some data for a given type into the store.\n This method expects normalized [JSON API](http://jsonapi.org/) document. This means you have to follow [JSON API specification](http://jsonapi.org/format/) with few minor adjustments:\n - record's `type` should always be in singular, dasherized form\n - members (properties) should be camelCased\n [Your primary data should be wrapped inside `data` property](http://jsonapi.org/format/#document-top-level):\n ```js\n store.push({\n data: {\n // primary data for single record of type `Person`\n id: '1',\n type: 'person',\n attributes: {\n firstName: 'Daniel',\n lastName: 'Kmak'\n }\n }\n });\n ```\n [Demo.](http://ember-twiddle.com/fb99f18cd3b4d3e2a4c7)\n `data` property can also hold an array (of records):\n ```js\n store.push({\n data: [\n // an array of records\n {\n id: '1',\n type: 'person',\n attributes: {\n firstName: 'Daniel',\n lastName: 'Kmak'\n }\n },\n {\n id: '2',\n type: 'person',\n attributes: {\n firstName: 'Tom',\n lastName: 'Dale'\n }\n }\n ]\n });\n ```\n [Demo.](http://ember-twiddle.com/69cdbeaa3702159dc355)\n There are some typical properties for `JSONAPI` payload:\n * `id` - mandatory, unique record's key\n * `type` - mandatory string which matches `model`'s dasherized name in singular form\n * `attributes` - object which holds data for record attributes - `DS.attr`'s declared in model\n * `relationships` - object which must contain any of the following properties under each relationships' respective key (example path is `relationships.achievements.data`):\n - [`links`](http://jsonapi.org/format/#document-links)\n - [`data`](http://jsonapi.org/format/#document-resource-object-linkage) - place for primary data\n - [`meta`](http://jsonapi.org/format/#document-meta) - object which contains meta-information about relationship\n For this model:\n ```app/models/person.js\n import DS from 'ember-data';\n export default DS.Model.extend({\n firstName: DS.attr('string'),\n lastName: DS.attr('string'),\n children: DS.hasMany('person')\n });\n ```\n To represent the children as IDs:\n ```js\n {\n data: {\n id: '1',\n type: 'person',\n attributes: {\n firstName: 'Tom',\n lastName: 'Dale'\n },\n relationships: {\n children: {\n data: [\n {\n id: '2',\n type: 'person'\n },\n {\n id: '3',\n type: 'person'\n },\n {\n id: '4',\n type: 'person'\n }\n ]\n }\n }\n }\n }\n ```\n [Demo.](http://ember-twiddle.com/343e1735e034091f5bde)\n To represent the children relationship as a URL:\n ```js\n {\n data: {\n id: '1',\n type: 'person',\n attributes: {\n firstName: 'Tom',\n lastName: 'Dale'\n },\n relationships: {\n children: {\n links: {\n related: '/people/1/children'\n }\n }\n }\n }\n }\n ```\n If you're streaming data or implementing an adapter, make sure\n that you have converted the incoming data into this form. The\n store's [normalize](#method_normalize) method is a convenience\n helper for converting a json payload into the form Ember Data\n expects.\n ```js\n store.push(store.normalize('person', data));\n ```\n This method can be used both to push in brand new\n records, as well as to update existing records.\n @method push\n @param {Object} data\n @return {DS.Model|Array} the record(s) that was created or\n updated.\n */\n push: function (data) {\n var pushed = this._push(data);\n\n if (Array.isArray(pushed)) {\n var records = pushed.map(function (internalModel) {\n return internalModel.getRecord();\n });\n\n return records;\n }\n\n if (pushed === null) {\n return null;\n }\n\n var record = pushed.getRecord();\n\n return record;\n },\n\n\n /*\n Push some data in the form of a json-api document into the store,\n without creating materialized records.\n @method _push\n @private\n @param {Object} jsonApiDoc\n @return {DS.InternalModel|Array<DS.InternalModel>} pushed InternalModel(s)\n */\n _push: function (jsonApiDoc) {\n var _this = this;\n\n var internalModelOrModels = this._backburner.join(function () {\n var included = jsonApiDoc.included;\n var i = void 0,\n length = void 0;\n\n if (included) {\n for (i = 0, length = included.length; i < length; i++) {\n _this._pushInternalModel(included[i]);\n }\n }\n\n if (Array.isArray(jsonApiDoc.data)) {\n length = jsonApiDoc.data.length;\n var internalModels = new Array(length);\n\n for (i = 0; i < length; i++) {\n internalModels[i] = _this._pushInternalModel(jsonApiDoc.data[i]);\n }\n return internalModels;\n }\n\n if (jsonApiDoc.data === null) {\n return null;\n }\n\n (false && Ember.assert('Expected an object in the \\'data\\' property in a call to \\'push\\' for ' + jsonApiDoc.type + ', but was ' + typeOf(jsonApiDoc.data), typeOf(jsonApiDoc.data) === 'object'));\n\n\n return _this._pushInternalModel(jsonApiDoc.data);\n });\n\n return internalModelOrModels;\n },\n _hasModelFor: function (modelName) {\n var owner = (0, _utils.getOwner)(this);\n modelName = (0, _normalizeModelName.default)(modelName);\n\n if (owner.factoryFor) {\n return !!owner.factoryFor('model:' + modelName);\n } else {\n return !!owner._lookupFactory('model:' + modelName);\n }\n },\n _pushInternalModel: function (data) {\n var modelName = data.type;\n (false && Ember.assert('You must include an \\'id\\' for ' + modelName + ' in an object passed to \\'push\\'', data.id !== null && data.id !== undefined && data.id !== ''));\n (false && Ember.assert('You tried to push data with a type \\'' + modelName + '\\' but no model could be found with that name.', this._hasModelFor(modelName)));\n\n\n if (false) {\n // If ENV.DS_WARN_ON_UNKNOWN_KEYS is set to true and the payload\n // contains unknown attributes or relationships, log a warning.\n\n if (ENV.DS_WARN_ON_UNKNOWN_KEYS) {\n var modelClass = this._modelFor(modelName);\n\n // Check unknown attributes\n var unknownAttributes = Object.keys(data.attributes || {}).filter(function (key) {\n return !get(modelClass, 'fields').has(key);\n });\n var unknownAttributesMessage = 'The payload for \\'' + modelName + '\\' contains these unknown attributes: ' + unknownAttributes + '. Make sure they\\'ve been defined in your model.';\n (false && Ember.warn(unknownAttributesMessage, unknownAttributes.length === 0, { id: 'ds.store.unknown-keys-in-payload' }));\n\n // Check unknown relationships\n\n var unknownRelationships = Object.keys(data.relationships || {}).filter(function (key) {\n return !get(modelClass, 'fields').has(key);\n });\n var unknownRelationshipsMessage = 'The payload for \\'' + modelName + '\\' contains these unknown relationships: ' + unknownRelationships + '. Make sure they\\'ve been defined in your model.';\n (false && Ember.warn(unknownRelationshipsMessage, unknownRelationships.length === 0, { id: 'ds.store.unknown-keys-in-payload' }));\n }\n }\n\n // Actually load the record into the store.\n var internalModel = this._load(data);\n\n this._setupRelationshipsForModel(internalModel, data);\n\n return internalModel;\n },\n _setupRelationshipsForModel: function (internalModel, data) {\n if (data.relationships === undefined) {\n return;\n }\n\n if (this._pushedInternalModels.push(internalModel, data) !== 2) {\n return;\n }\n\n this._backburner.schedule('normalizeRelationships', this, this._setupRelationships);\n },\n _setupRelationships: function () {\n var pushed = this._pushedInternalModels;\n\n // Cache the inverse maps for each modelClass that we visit during this\n // payload push. In the common case where we are pushing many more\n // instances than types we want to minimize the cost of looking up the\n // inverse map and the overhead of Ember.get adds up.\n var modelNameToInverseMap = void 0;\n\n for (var i = 0, l = pushed.length; i < l; i += 2) {\n modelNameToInverseMap = modelNameToInverseMap || Object.create(null);\n // This will convert relationships specified as IDs into DS.Model instances\n // (possibly unloaded) and also create the data structures used to track\n // relationships.\n var internalModel = pushed[i];\n var data = pushed[i + 1];\n setupRelationships(this, internalModel, data, modelNameToInverseMap);\n }\n\n pushed.length = 0;\n },\n\n\n /**\n Push some raw data into the store.\n This method can be used both to push in brand new\n records, as well as to update existing records. You\n can push in more than one type of object at once.\n All objects should be in the format expected by the\n serializer.\n ```app/serializers/application.js\n import DS from 'ember-data';\n export default DS.ActiveModelSerializer;\n ```\n ```js\n let pushData = {\n posts: [\n { id: 1, post_title: \"Great post\", comment_ids: [2] }\n ],\n comments: [\n { id: 2, comment_body: \"Insightful comment\" }\n ]\n }\n store.pushPayload(pushData);\n ```\n By default, the data will be deserialized using a default\n serializer (the application serializer if it exists).\n Alternatively, `pushPayload` will accept a model type which\n will determine which serializer will process the payload.\n ```app/serializers/application.js\n import DS from 'ember-data';\n export default DS.ActiveModelSerializer;\n ```\n ```app/serializers/post.js\n import DS from 'ember-data';\n export default DS.JSONSerializer;\n ```\n ```js\n store.pushPayload(pushData); // Will use the application serializer\n store.pushPayload('post', pushData); // Will use the post serializer\n ```\n @method pushPayload\n @param {String} modelName Optionally, a model type used to determine which serializer will be used\n @param {Object} inputPayload\n */\n pushPayload: function (modelName, inputPayload) {\n var serializer = void 0;\n var payload = void 0;\n if (!inputPayload) {\n payload = modelName;\n serializer = defaultSerializer(this);\n (false && Ember.assert('You cannot use \\'store#pushPayload\\' without a modelName unless your default serializer defines \\'pushPayload\\'', typeof serializer.pushPayload === 'function'));\n } else {\n payload = inputPayload;\n (false && Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of ' + modelName, typeof modelName === 'string'));\n\n var normalizedModelName = (0, _normalizeModelName.default)(modelName);\n serializer = this.serializerFor(normalizedModelName);\n }\n if ((0, _features.default)('ds-pushpayload-return')) {\n return serializer.pushPayload(this, payload);\n } else {\n serializer.pushPayload(this, payload);\n }\n },\n\n\n /**\n `normalize` converts a json payload into the normalized form that\n [push](#method_push) expects.\n Example\n ```js\n socket.on('message', function(message) {\n let modelName = message.model;\n let data = message.data;\n store.push(store.normalize(modelName, data));\n });\n ```\n @method normalize\n @param {String} modelName The name of the model type for this payload\n @param {Object} payload\n @return {Object} The normalized payload\n */\n normalize: function (modelName, payload) {\n (false && Ember.assert('You need to pass a model name to the store\\'s normalize method', isPresent(modelName)));\n (false && Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of ' + inspect(modelName), typeof modelName === 'string'));\n\n var normalizedModelName = (0, _normalizeModelName.default)(modelName);\n var serializer = this.serializerFor(normalizedModelName);\n var model = this._modelFor(normalizedModelName);\n return serializer.normalize(model, payload);\n },\n\n\n /**\n Build a brand new record for a given type, ID, and\n initial data.\n @method _buildInternalModel\n @private\n @param {String} modelName\n @param {String} id\n @param {Object} data\n @return {InternalModel} internal model\n */\n _buildInternalModel: function (modelName, id, data) {\n (false && Ember.assert('You can no longer pass a modelClass as the first argument to store._buildInternalModel. Pass modelName instead.', typeof modelName === 'string'));\n\n\n var existingInternalModel = this._existingInternalModelForId(modelName, id);\n\n (false && Ember.assert('The id ' + id + ' has already been used with another record for modelClass \\'' + modelName + '\\'.', !existingInternalModel));\n\n // lookupFactory should really return an object that creates\n // instances with the injections applied\n\n var internalModel = new _internalModel5.default(modelName, id, this, data);\n\n this._internalModelsFor(modelName).add(internalModel, id);\n\n return internalModel;\n },\n _existingInternalModelForId: function (modelName, id) {\n var internalModel = this._internalModelsFor(modelName).get(id);\n\n if (internalModel && internalModel.hasScheduledDestroy()) {\n // unloadRecord is async, if one attempts to unload + then sync create,\n // we must ensure the unload is complete before starting the create\n internalModel.destroySync();\n internalModel = null;\n }\n return internalModel;\n },\n buildInternalModel: function (modelName, id, data) {\n (false && !(false) && Ember.deprecate('buildInternalModel was documented as private and will be removed in the next version of Ember Data.', false, { id: 'ember-data.buildInternalModel', until: '2.17.0' }));\n\n return this._buildInternalModel(modelName, id, data);\n },\n\n\n //Called by the state machine to notify the store that the record is ready to be interacted with\n recordWasLoaded: function (record) {\n this.recordArrayManager.recordWasLoaded(record);\n },\n\n\n // ...............\n // . DESTRUCTION .\n // ...............\n\n /**\n When a record is destroyed, this un-indexes it and\n removes it from any record arrays so it can be GCed.\n @method _removeFromIdMap\n @private\n @param {InternalModel} internalModel\n */\n _removeFromIdMap: function (internalModel) {\n var recordMap = this._internalModelsFor(internalModel.modelName);\n var id = internalModel.id;\n\n recordMap.remove(internalModel, id);\n },\n\n\n // ......................\n // . PER-TYPE ADAPTERS\n // ......................\n\n /**\n Returns an instance of the adapter for a given type. For\n example, `adapterFor('person')` will return an instance of\n `App.PersonAdapter`.\n If no `App.PersonAdapter` is found, this method will look\n for an `App.ApplicationAdapter` (the default adapter for\n your entire application).\n If no `App.ApplicationAdapter` is found, it will return\n the value of the `defaultAdapter`.\n @method adapterFor\n @public\n @param {String} modelName\n @return DS.Adapter\n */\n adapterFor: function (modelName) {\n (false && Ember.assert('You need to pass a model name to the store\\'s adapterFor method', isPresent(modelName)));\n (false && Ember.assert('Passing classes to store.adapterFor has been removed. Please pass a dasherized string instead of ' + modelName, typeof modelName === 'string'));\n\n var normalizedModelName = (0, _normalizeModelName.default)(modelName);\n\n var _adapterCache = this._adapterCache;\n\n var adapter = _adapterCache[normalizedModelName];\n if (adapter) {\n return adapter;\n }\n\n var owner = (0, _utils.getOwner)(this);\n\n adapter = owner.lookup('adapter:' + normalizedModelName);\n if (adapter !== undefined) {\n set(adapter, 'store', this);\n _adapterCache[normalizedModelName] = adapter;\n return adapter;\n }\n\n // no adapter found for the specific model, fallback and check for application adapter\n adapter = _adapterCache.application || owner.lookup('adapter:application');\n if (adapter !== undefined) {\n set(adapter, 'store', this);\n _adapterCache[normalizedModelName] = adapter;\n _adapterCache.application = adapter;\n return adapter;\n }\n\n // no model specific adapter or application adapter, check for an `adapter`\n // property defined on the store\n var adapterName = this.get('adapter');\n adapter = _adapterCache[adapterName] || owner.lookup('adapter:' + adapterName);\n if (adapter !== undefined) {\n set(adapter, 'store', this);\n _adapterCache[normalizedModelName] = adapter;\n _adapterCache[adapterName] = adapter;\n return adapter;\n }\n\n // final fallback, no model specific adapter, no application adapter, no\n // `adapter` property on store: use json-api adapter\n adapter = _adapterCache['-json-api'] || owner.lookup('adapter:-json-api');\n set(adapter, 'store', this);\n _adapterCache[normalizedModelName] = adapter;\n _adapterCache['-json-api'] = adapter;\n return adapter;\n },\n\n\n // ..............................\n // . RECORD CHANGE NOTIFICATION .\n // ..............................\n\n /**\n Returns an instance of the serializer for a given type. For\n example, `serializerFor('person')` will return an instance of\n `App.PersonSerializer`.\n If no `App.PersonSerializer` is found, this method will look\n for an `App.ApplicationSerializer` (the default serializer for\n your entire application).\n if no `App.ApplicationSerializer` is found, it will attempt\n to get the `defaultSerializer` from the `PersonAdapter`\n (`adapterFor('person')`).\n If a serializer cannot be found on the adapter, it will fall back\n to an instance of `DS.JSONSerializer`.\n @method serializerFor\n @public\n @param {String} modelName the record to serialize\n @return {DS.Serializer}\n */\n serializerFor: function (modelName) {\n (false && Ember.assert('You need to pass a model name to the store\\'s serializerFor method', isPresent(modelName)));\n (false && Ember.assert('Passing classes to store.serializerFor has been removed. Please pass a dasherized string instead of ' + modelName, typeof modelName === 'string'));\n\n var normalizedModelName = (0, _normalizeModelName.default)(modelName);\n\n var _serializerCache = this._serializerCache;\n\n var serializer = _serializerCache[normalizedModelName];\n if (serializer) {\n return serializer;\n }\n\n var owner = (0, _utils.getOwner)(this);\n\n serializer = owner.lookup('serializer:' + normalizedModelName);\n if (serializer !== undefined) {\n set(serializer, 'store', this);\n _serializerCache[normalizedModelName] = serializer;\n return serializer;\n }\n\n // no serializer found for the specific model, fallback and check for application serializer\n serializer = _serializerCache.application || owner.lookup('serializer:application');\n if (serializer !== undefined) {\n set(serializer, 'store', this);\n _serializerCache[normalizedModelName] = serializer;\n _serializerCache.application = serializer;\n return serializer;\n }\n\n // no model specific serializer or application serializer, check for the `defaultSerializer`\n // property defined on the adapter\n var adapter = this.adapterFor(modelName);\n var serializerName = get(adapter, 'defaultSerializer');\n serializer = _serializerCache[serializerName] || owner.lookup('serializer:' + serializerName);\n if (serializer !== undefined) {\n set(serializer, 'store', this);\n _serializerCache[normalizedModelName] = serializer;\n _serializerCache[serializerName] = serializer;\n return serializer;\n }\n\n // final fallback, no model specific serializer, no application serializer, no\n // `serializer` property on store: use json-api serializer\n serializer = _serializerCache['-default'] || owner.lookup('serializer:-default');\n set(serializer, 'store', this);\n _serializerCache[normalizedModelName] = serializer;\n _serializerCache['-default'] = serializer;\n\n return serializer;\n },\n lookupAdapter: function (name) {\n (false && !(false) && Ember.deprecate('Use of lookupAdapter is deprecated, use adapterFor instead.', false, {\n id: 'ds.store.lookupAdapter',\n until: '3.0'\n }));\n\n return this.adapterFor(name);\n },\n lookupSerializer: function (name) {\n (false && !(false) && Ember.deprecate('Use of lookupSerializer is deprecated, use serializerFor instead.', false, {\n id: 'ds.store.lookupSerializer',\n until: '3.0'\n }));\n\n return this.serializerFor(name);\n },\n willDestroy: function () {\n this._super.apply(this, arguments);\n this._pushedInternalModels = null;\n this.recordArrayManager.destroy();\n\n this._adapterCache = null;\n this._serializerCache = null;\n\n this.unloadAll();\n },\n _updateRelationshipState: function (relationship) {\n var _this2 = this;\n\n if (this._updatedRelationships.push(relationship) !== 1) {\n return;\n }\n\n this._backburner.join(function () {\n _this2._backburner.schedule('syncRelationships', _this2, _this2._flushUpdatedRelationships);\n });\n },\n _flushUpdatedRelationships: function () {\n var updated = this._updatedRelationships;\n\n for (var i = 0, l = updated.length; i < l; i++) {\n updated[i].flushCanonical();\n }\n\n updated.length = 0;\n },\n _updateInternalModel: function (internalModel) {\n if (this._updatedInternalModels.push(internalModel) !== 1) {\n return;\n }\n\n emberRun.schedule('actions', this, this._flushUpdatedInternalModels);\n },\n _flushUpdatedInternalModels: function () {\n var updated = this._updatedInternalModels;\n\n for (var i = 0, l = updated.length; i < l; i++) {\n updated[i]._triggerDeferredTriggers();\n }\n\n updated.length = 0;\n },\n _pushResourceIdentifier: function (relationship, resourceIdentifier) {\n if (isNone(resourceIdentifier)) {\n return;\n }\n\n (false && Ember.assert('A ' + relationship.internalModel.modelName + ' record was pushed into the store with the value of ' + relationship.key + ' being ' + inspect(resourceIdentifier) + ', but ' + relationship.key + ' is a belongsTo relationship so the value must not be an array. You should probably check your data payload or serializer.', !Array.isArray(resourceIdentifier)));\n\n //TODO:Better asserts\n\n return this._internalModelForId(resourceIdentifier.type, resourceIdentifier.id);\n },\n _pushResourceIdentifiers: function (relationship, resourceIdentifiers) {\n if (isNone(resourceIdentifiers)) {\n return;\n }\n\n (false && Ember.assert('A ' + relationship.internalModel.modelName + ' record was pushed into the store with the value of ' + relationship.key + ' being \\'' + inspect(resourceIdentifiers) + '\\', but ' + relationship.key + ' is a hasMany relationship so the value must be an array. You should probably check your data payload or serializer.', Array.isArray(resourceIdentifiers)));\n\n\n var _internalModels = new Array(resourceIdentifiers.length);\n for (var i = 0; i < resourceIdentifiers.length; i++) {\n _internalModels[i] = this._pushResourceIdentifier(relationship, resourceIdentifiers[i]);\n }\n return _internalModels;\n }\n });\n\n // Delegation to the adapter and promise management\n\n\n function defaultSerializer(store) {\n return store.serializerFor('application');\n }\n\n function _commit(adapter, store, operation, snapshot) {\n var internalModel = snapshot._internalModel;\n var modelName = snapshot.modelName;\n var modelClass = store._modelFor(modelName);\n (false && Ember.assert('You tried to update a record but you have no adapter (for ' + modelName + ')', adapter));\n (false && Ember.assert('You tried to update a record but your adapter (for ' + modelName + ') does not implement \\'' + operation + '\\'', typeof adapter[operation] === 'function'));\n\n var promise = adapter[operation](store, modelClass, snapshot);\n var serializer = (0, _serializers.serializerForAdapter)(store, adapter, modelName);\n var label = 'DS: Extract and notify about ' + operation + ' completion of ' + internalModel;\n\n (false && Ember.assert('Your adapter\\'s \\'' + operation + '\\' method must return a value, but it returned \\'undefined\\'', promise !== undefined));\n\n\n promise = Promise.resolve(promise, label);\n promise = (0, _common._guard)(promise, (0, _common._bind)(_common._objectIsAlive, store));\n promise = (0, _common._guard)(promise, (0, _common._bind)(_common._objectIsAlive, internalModel));\n\n return promise.then(function (adapterPayload) {\n /*\n Note to future spelunkers hoping to optimize.\n We rely on this `run` to create a run loop if needed\n that `store._push` and `store.didSaveRecord` will both share.\n We use `join` because it is often the case that we\n have an outer run loop available still from the first\n call to `store._push`;\n */\n store._backburner.join(function () {\n var payload = void 0,\n data = void 0;\n if (adapterPayload) {\n payload = (0, _serializerResponse.normalizeResponseHelper)(serializer, store, modelClass, adapterPayload, snapshot.id, operation);\n if (payload.included) {\n store._push({ data: null, included: payload.included });\n }\n data = payload.data;\n }\n store.didSaveRecord(internalModel, { data: data });\n });\n\n return internalModel;\n }, function (error) {\n if (error instanceof _errors.InvalidError) {\n var errors = serializer.extractErrors(store, modelClass, error, snapshot.id);\n\n store.recordWasInvalid(internalModel, errors);\n } else {\n store.recordWasError(internalModel, error);\n }\n\n throw error;\n }, label);\n }\n\n function isInverseRelationshipInitialized(store, internalModel, data, key, modelNameToInverseMap) {\n var relationshipData = data.relationships[key].data;\n\n if (!relationshipData) {\n // can't check inverse for eg { comments: { links: { related: URL }}}\n return false;\n }\n\n var inverseMap = modelNameToInverseMap[internalModel.modelName];\n if (!inverseMap) {\n inverseMap = modelNameToInverseMap[internalModel.modelName] = get(internalModel.type, 'inverseMap');\n }\n var inverseRelationshipMetadata = inverseMap[key];\n if (inverseRelationshipMetadata === undefined) {\n inverseRelationshipMetadata = internalModel.type.inverseFor(key, store);\n }\n\n if (!inverseRelationshipMetadata) {\n return false;\n }\n\n var _inverseRelationshipM = inverseRelationshipMetadata,\n inverseRelationshipName = _inverseRelationshipM.name;\n\n\n if (Array.isArray(relationshipData)) {\n for (var i = 0; i < relationshipData.length; ++i) {\n var inverseInternalModel = store._internalModelsFor(relationshipData[i].type).get(relationshipData[i].id);\n if (inverseInternalModel && inverseInternalModel._relationships.has(inverseRelationshipName)) {\n return true;\n }\n }\n\n return false;\n } else {\n var _inverseInternalModel = store._internalModelsFor(relationshipData.type).get(relationshipData.id);\n return _inverseInternalModel && _inverseInternalModel._relationships.has(inverseRelationshipName);\n }\n }\n\n function setupRelationships(store, internalModel, data, modelNameToInverseMap) {\n Object.keys(data.relationships).forEach(function (relationshipName) {\n var relationships = internalModel._relationships;\n var relationshipRequiresNotification = relationships.has(relationshipName) || isInverseRelationshipInitialized(store, internalModel, data, relationshipName, modelNameToInverseMap);\n\n if (relationshipRequiresNotification) {\n var relationshipData = data.relationships[relationshipName];\n relationships.get(relationshipName).push(relationshipData, false);\n }\n\n // in debug, assert payload validity eagerly\n if (false) {\n var relationshipMeta = get(internalModel.type, 'relationshipsByName').get(relationshipName);\n var _relationshipData = data.relationships[relationshipName];\n if (!_relationshipData || !relationshipMeta) {\n return;\n }\n\n if (_relationshipData.links) {\n var isAsync = relationshipMeta.options && relationshipMeta.options.async !== false;\n (false && Ember.warn('You pushed a record of type \\'' + internalModel.type.modelName + '\\' with a relationship \\'' + relationshipName + '\\' configured as \\'async: false\\'. You\\'ve included a link but no primary data, this may be an error in your payload.', isAsync || _relationshipData.data, {\n id: 'ds.store.push-link-for-sync-relationship'\n }));\n } else if (_relationshipData.data) {\n if (relationshipMeta.kind === 'belongsTo') {\n (false && Ember.assert('A ' + internalModel.type.modelName + ' record was pushed into the store with the value of ' + relationshipName + ' being ' + inspect(_relationshipData.data) + ', but ' + relationshipName + ' is a belongsTo relationship so the value must not be an array. You should probably check your data payload or serializer.', !Array.isArray(_relationshipData.data)));\n } else if (relationshipMeta.kind === 'hasMany') {\n (false && Ember.assert('A ' + internalModel.type.modelName + ' record was pushed into the store with the value of ' + relationshipName + ' being \\'' + inspect(_relationshipData.data) + '\\', but ' + relationshipName + ' is a hasMany relationship so the value must be an array. You should probably check your data payload or serializer.', Array.isArray(_relationshipData.data)));\n }\n }\n }\n });\n }\n\n exports.Store = Store;\n exports.default = Store;\n});","define('ember-data/-private/system/store/common', ['exports'], function (exports) {\n 'use strict';\n\n exports.__esModule = true;\n exports._bind = _bind;\n exports._guard = _guard;\n exports._objectIsAlive = _objectIsAlive;\n var get = Ember.get;\n function _bind(fn) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return function () {\n return fn.apply(undefined, args);\n };\n }\n\n function _guard(promise, test) {\n var guarded = promise['finally'](function () {\n if (!test()) {\n guarded._subscribers.length = 0;\n }\n });\n\n return guarded;\n }\n\n function _objectIsAlive(object) {\n return !(get(object, \"isDestroyed\") || get(object, \"isDestroying\"));\n }\n});","define('ember-data/-private/system/store/finders', ['exports', 'ember-data/-private/system/store/common', 'ember-data/-private/system/store/serializer-response', 'ember-data/-private/system/store/serializers'], function (exports, _common, _serializerResponse, _serializers) {\n 'use strict';\n\n exports.__esModule = true;\n exports._find = _find;\n exports._findMany = _findMany;\n exports._findHasMany = _findHasMany;\n exports._findBelongsTo = _findBelongsTo;\n exports._findAll = _findAll;\n exports._query = _query;\n exports._queryRecord = _queryRecord;\n var A = Ember.A;\n var Promise = Ember.RSVP.Promise;\n\n\n function payloadIsNotBlank(adapterPayload) {\n if (Array.isArray(adapterPayload)) {\n return true;\n } else {\n return Object.keys(adapterPayload || {}).length;\n }\n }\n\n function _find(adapter, store, modelClass, id, internalModel, options) {\n var snapshot = internalModel.createSnapshot(options);\n var modelName = internalModel.modelName;\n\n var promise = adapter.findRecord(store, modelClass, id, snapshot);\n var label = 'DS: Handle Adapter#findRecord of \\'' + modelName + '\\' with id: \\'' + id + '\\'';\n\n promise = Promise.resolve(promise, label);\n promise = (0, _common._guard)(promise, (0, _common._bind)(_common._objectIsAlive, store));\n\n return promise.then(function (adapterPayload) {\n (false && Ember.assert('You made a \\'findRecord\\' request for a \\'' + modelName + '\\' with id \\'' + id + '\\', but the adapter\\'s response did not have any data', payloadIsNotBlank(adapterPayload)));\n\n var serializer = (0, _serializers.serializerForAdapter)(store, adapter, modelName);\n var payload = (0, _serializerResponse.normalizeResponseHelper)(serializer, store, modelClass, adapterPayload, id, 'findRecord');\n (false && Ember.assert('Ember Data expected the primary data returned from a \\'findRecord\\' response to be an object but instead it found an array.', !Array.isArray(payload.data)));\n (false && Ember.warn('You requested a record of type \\'' + modelName + '\\' with id \\'' + id + '\\' but the adapter returned a payload with primary data having an id of \\'' + payload.data.id + '\\'. Use \\'store.findRecord()\\' when the requested id is the same as the one returned by the adapter. In other cases use \\'store.queryRecord()\\' instead https://emberjs.com/api/data/classes/DS.Store.html#method_queryRecord', payload.data.id === id, {\n id: 'ds.store.findRecord.id-mismatch'\n }));\n\n\n return store._push(payload);\n }, function (error) {\n internalModel.notFound();\n if (internalModel.isEmpty()) {\n internalModel.unloadRecord();\n }\n\n throw error;\n }, 'DS: Extract payload of \\'' + modelName + '\\'');\n }\n\n function _findMany(adapter, store, modelName, ids, internalModels) {\n var snapshots = A(internalModels).invoke('createSnapshot');\n var modelClass = store.modelFor(modelName); // `adapter.findMany` gets the modelClass still\n var promise = adapter.findMany(store, modelClass, ids, snapshots);\n var label = 'DS: Handle Adapter#findMany of \\'' + modelName + '\\'';\n\n if (promise === undefined) {\n throw new Error('adapter.findMany returned undefined, this was very likely a mistake');\n }\n\n promise = Promise.resolve(promise, label);\n promise = (0, _common._guard)(promise, (0, _common._bind)(_common._objectIsAlive, store));\n\n return promise.then(function (adapterPayload) {\n (false && Ember.assert('You made a \\'findMany\\' request for \\'' + modelName + '\\' records with ids \\'[' + ids + ']\\', but the adapter\\'s response did not have any data', payloadIsNotBlank(adapterPayload)));\n\n var serializer = (0, _serializers.serializerForAdapter)(store, adapter, modelName);\n var payload = (0, _serializerResponse.normalizeResponseHelper)(serializer, store, modelClass, adapterPayload, null, 'findMany');\n return store._push(payload);\n }, null, 'DS: Extract payload of ' + modelName);\n }\n\n function _findHasMany(adapter, store, internalModel, link, relationship) {\n var snapshot = internalModel.createSnapshot();\n var modelClass = store.modelFor(relationship.type);\n var promise = adapter.findHasMany(store, snapshot, link, relationship);\n var label = 'DS: Handle Adapter#findHasMany of \\'' + internalModel.modelName + '\\' : \\'' + relationship.type + '\\'';\n\n promise = Promise.resolve(promise, label);\n promise = (0, _common._guard)(promise, (0, _common._bind)(_common._objectIsAlive, store));\n promise = (0, _common._guard)(promise, (0, _common._bind)(_common._objectIsAlive, internalModel));\n\n return promise.then(function (adapterPayload) {\n (false && Ember.assert('You made a \\'findHasMany\\' request for a ' + internalModel.modelName + '\\'s \\'' + relationship.key + '\\' relationship, using link \\'' + link + '\\' , but the adapter\\'s response did not have any data', payloadIsNotBlank(adapterPayload)));\n\n var serializer = (0, _serializers.serializerForAdapter)(store, adapter, relationship.type);\n var payload = (0, _serializerResponse.normalizeResponseHelper)(serializer, store, modelClass, adapterPayload, null, 'findHasMany');\n var internalModelArray = store._push(payload);\n\n internalModelArray.meta = payload.meta;\n return internalModelArray;\n }, null, 'DS: Extract payload of \\'' + internalModel.modelName + '\\' : hasMany \\'' + relationship.type + '\\'');\n }\n\n function _findBelongsTo(adapter, store, internalModel, link, relationship) {\n var snapshot = internalModel.createSnapshot();\n var modelClass = store.modelFor(relationship.type);\n var promise = adapter.findBelongsTo(store, snapshot, link, relationship);\n var label = 'DS: Handle Adapter#findBelongsTo of ' + internalModel.modelName + ' : ' + relationship.type;\n\n promise = Promise.resolve(promise, label);\n promise = (0, _common._guard)(promise, (0, _common._bind)(_common._objectIsAlive, store));\n promise = (0, _common._guard)(promise, (0, _common._bind)(_common._objectIsAlive, internalModel));\n\n return promise.then(function (adapterPayload) {\n var serializer = (0, _serializers.serializerForAdapter)(store, adapter, relationship.type);\n var payload = (0, _serializerResponse.normalizeResponseHelper)(serializer, store, modelClass, adapterPayload, null, 'findBelongsTo');\n\n if (!payload.data) {\n return null;\n }\n\n return store._push(payload);\n }, null, 'DS: Extract payload of ' + internalModel.modelName + ' : ' + relationship.type);\n }\n\n function _findAll(adapter, store, modelName, sinceToken, options) {\n var modelClass = store.modelFor(modelName); // adapter.findAll depends on the class\n var recordArray = store.peekAll(modelName);\n var snapshotArray = recordArray._createSnapshot(options);\n var promise = adapter.findAll(store, modelClass, sinceToken, snapshotArray);\n var label = \"DS: Handle Adapter#findAll of \" + modelClass;\n\n promise = Promise.resolve(promise, label);\n promise = (0, _common._guard)(promise, (0, _common._bind)(_common._objectIsAlive, store));\n\n return promise.then(function (adapterPayload) {\n (false && Ember.assert('You made a \\'findAll\\' request for \\'' + modelName + '\\' records, but the adapter\\'s response did not have any data', payloadIsNotBlank(adapterPayload)));\n\n var serializer = (0, _serializers.serializerForAdapter)(store, adapter, modelName);\n var payload = (0, _serializerResponse.normalizeResponseHelper)(serializer, store, modelClass, adapterPayload, null, 'findAll');\n\n store._push(payload);\n store._didUpdateAll(modelName);\n\n return recordArray;\n }, null, 'DS: Extract payload of findAll ${modelName}');\n }\n\n function _query(adapter, store, modelName, query, recordArray) {\n var modelClass = store.modelFor(modelName); // adapter.query needs the class\n\n var promise = void 0;\n if (adapter.query.length > 3) {\n recordArray = recordArray || store.recordArrayManager.createAdapterPopulatedRecordArray(modelName, query);\n promise = adapter.query(store, modelClass, query, recordArray);\n } else {\n promise = adapter.query(store, modelClass, query);\n }\n\n var label = 'DS: Handle Adapter#query of ' + modelClass;\n\n promise = Promise.resolve(promise, label);\n promise = (0, _common._guard)(promise, (0, _common._bind)(_common._objectIsAlive, store));\n\n return promise.then(function (adapterPayload) {\n var serializer = (0, _serializers.serializerForAdapter)(store, adapter, modelName);\n\n var payload = (0, _serializerResponse.normalizeResponseHelper)(serializer, store, modelClass, adapterPayload, null, 'query');\n\n var internalModels = store._push(payload);\n\n (false && Ember.assert('The response to store.query is expected to be an array but it was a single record. Please wrap your response in an array or use `store.queryRecord` to query for a single record.', Array.isArray(internalModels)));\n\n if (recordArray) {\n recordArray._setInternalModels(internalModels, payload);\n } else {\n recordArray = store.recordArrayManager.createAdapterPopulatedRecordArray(modelName, query, internalModels, payload);\n }\n\n return recordArray;\n }, null, 'DS: Extract payload of query ' + modelName);\n }\n\n function _queryRecord(adapter, store, modelName, query) {\n var modelClass = store.modelFor(modelName); // adapter.queryRecord needs the class\n var promise = adapter.queryRecord(store, modelClass, query);\n var label = 'DS: Handle Adapter#queryRecord of ' + modelName;\n\n promise = Promise.resolve(promise, label);\n promise = (0, _common._guard)(promise, (0, _common._bind)(_common._objectIsAlive, store));\n\n return promise.then(function (adapterPayload) {\n var serializer = (0, _serializers.serializerForAdapter)(store, adapter, modelName);\n var payload = (0, _serializerResponse.normalizeResponseHelper)(serializer, store, modelClass, adapterPayload, null, 'queryRecord');\n\n (false && Ember.assert('Expected the primary data returned by the serializer for a \\'queryRecord\\' response to be a single object or null but instead it was an array.', !Array.isArray(payload.data), {\n id: 'ds.store.queryRecord-array-response'\n }));\n\n\n return store._push(payload);\n }, null, 'DS: Extract payload of queryRecord ' + modelName);\n }\n});","define('ember-data/-private/system/store/serializer-response', ['exports'], function (exports) {\n 'use strict';\n\n exports.__esModule = true;\n exports.validateDocumentStructure = validateDocumentStructure;\n exports.normalizeResponseHelper = normalizeResponseHelper;\n var isEmpty = Ember.isEmpty;\n\n\n /*\n This is a helper method that validates a JSON API top-level document\n \n The format of a document is described here:\n http://jsonapi.org/format/#document-top-level\n \n @method validateDocumentStructure\n @param {Object} doc JSON API document\n @return {array} An array of errors found in the document structure\n */\n function validateDocumentStructure(doc) {\n var errors = [];\n if (!doc || typeof doc !== 'object') {\n errors.push('Top level of a JSON API document must be an object');\n } else {\n if (!('data' in doc) && !('errors' in doc) && !('meta' in doc)) {\n errors.push('One or more of the following keys must be present: \"data\", \"errors\", \"meta\".');\n } else {\n if ('data' in doc && 'errors' in doc) {\n errors.push('Top level keys \"errors\" and \"data\" cannot both be present in a JSON API document');\n }\n }\n if ('data' in doc) {\n if (!(doc.data === null || Array.isArray(doc.data) || typeof doc.data === 'object')) {\n errors.push('data must be null, an object, or an array');\n }\n }\n if ('meta' in doc) {\n if (typeof doc.meta !== 'object') {\n errors.push('meta must be an object');\n }\n }\n if ('errors' in doc) {\n if (!Array.isArray(doc.errors)) {\n errors.push('errors must be an array');\n }\n }\n if ('links' in doc) {\n if (typeof doc.links !== 'object') {\n errors.push('links must be an object');\n }\n }\n if ('jsonapi' in doc) {\n if (typeof doc.jsonapi !== 'object') {\n errors.push('jsonapi must be an object');\n }\n }\n if ('included' in doc) {\n if (typeof doc.included !== 'object') {\n errors.push('included must be an array');\n }\n }\n }\n\n return errors;\n }\n\n /*\n This is a helper method that always returns a JSON-API Document.\n \n @method normalizeResponseHelper\n @param {DS.Serializer} serializer\n @param {DS.Store} store\n @param {subclass of DS.Model} modelClass\n @param {Object} payload\n @param {String|Number} id\n @param {String} requestType\n @return {Object} JSON-API Document\n */\n function normalizeResponseHelper(serializer, store, modelClass, payload, id, requestType) {\n var normalizedResponse = serializer.normalizeResponse(store, modelClass, payload, id, requestType);\n var validationErrors = [];\n if (false) {\n validationErrors = validateDocumentStructure(normalizedResponse);\n }\n (false && Ember.assert('normalizeResponse must return a valid JSON API document:\\n\\t* ' + validationErrors.join('\\n\\t* '), isEmpty(validationErrors)));\n\n\n return normalizedResponse;\n }\n});","define(\"ember-data/-private/system/store/serializers\", [\"exports\"], function (exports) {\n \"use strict\";\n\n exports.__esModule = true;\n exports.serializerForAdapter = serializerForAdapter;\n function serializerForAdapter(store, adapter, modelName) {\n var serializer = adapter.serializer;\n\n if (serializer === undefined) {\n serializer = store.serializerFor(modelName);\n }\n\n if (serializer === null || serializer === undefined) {\n serializer = {\n extract: function (store, type, payload) {\n return payload;\n }\n };\n }\n\n return serializer;\n }\n});","define('ember-data/-private/utils', ['exports'], function (exports) {\n 'use strict';\n\n exports.__esModule = true;\n var emberGetOwner = Ember.getOwner;\n var get = Ember.get;\n\n\n /*\n Check if the passed model has a `type` attribute or a relationship named `type`.\n \n @method modelHasAttributeOrRelationshipNamedType\n @param modelClass\n */\n function modelHasAttributeOrRelationshipNamedType(modelClass) {\n return get(modelClass, 'attributes').has('type') || get(modelClass, 'relationshipsByName').has('type');\n }\n\n /*\n ember-container-inject-owner is a new feature in Ember 2.3 that finally provides a public\n API for looking items up. This function serves as a super simple polyfill to avoid\n triggering deprecations.\n */\n function getOwner(context) {\n var owner = void 0;\n\n if (emberGetOwner) {\n owner = emberGetOwner(context);\n } else if (context.container) {\n owner = context.container;\n }\n\n if (owner && owner.lookupFactory && !owner._lookupFactory) {\n // `owner` is a container, we are just making this work\n owner._lookupFactory = function () {\n var _owner;\n\n return (_owner = owner).lookupFactory.apply(_owner, arguments);\n };\n\n owner.register = function () {\n var registry = owner.registry || owner._registry || owner;\n\n return registry.register.apply(registry, arguments);\n };\n }\n\n return owner;\n }\n\n exports.modelHasAttributeOrRelationshipNamedType = modelHasAttributeOrRelationshipNamedType;\n exports.getOwner = getOwner;\n});","define('ember-data/-private/utils/parse-response-headers', ['exports'], function (exports) {\n 'use strict';\n\n exports.__esModule = true;\n exports.default = parseResponseHeaders;\n var CLRF = '\\u000d\\u000a';\n\n function parseResponseHeaders(headersString) {\n var headers = Object.create(null);\n\n if (!headersString) {\n return headers;\n }\n\n var headerPairs = headersString.split(CLRF);\n for (var i = 0; i < headerPairs.length; i++) {\n var header = headerPairs[i];\n var j = 0;\n var foundSep = false;\n\n for (; j < header.length; j++) {\n if (header.charCodeAt(j) === 58 /* ':' */) {\n foundSep = true;\n break;\n }\n }\n\n if (foundSep === false) {\n continue;\n }\n\n var field = header.substring(0, j).trim();\n var value = header.substring(j + 1, header.length).trim();\n\n if (value) {\n headers[field] = value;\n }\n }\n\n return headers;\n }\n});","define('ember-data/adapter', ['exports'], function (exports) {\n 'use strict';\n\n exports.__esModule = true;\n var EmberObject = Ember.Object;\n exports.default = EmberObject.extend({\n\n /**\n If you would like your adapter to use a custom serializer you can\n set the `defaultSerializer` property to be the name of the custom\n serializer.\n Note the `defaultSerializer` serializer has a lower priority than\n a model specific serializer (i.e. `PostSerializer`) or the\n `application` serializer.\n ```app/adapters/django.js\n import DS from 'ember-data';\n export default DS.Adapter.extend({\n defaultSerializer: 'django'\n });\n ```\n @property defaultSerializer\n @type {String}\n */\n defaultSerializer: '-default',\n\n /**\n The `findRecord()` method is invoked when the store is asked for a record that\n has not previously been loaded. In response to `findRecord()` being called, you\n should query your persistence layer for a record with the given ID. The `findRecord`\n method should return a promise that will resolve to a JavaScript object that will be\n normalized by the serializer.\n Here is an example `findRecord` implementation:\n ```app/adapters/application.js\n import DS from 'ember-data';\n import RSVP from 'RSVP';\n import $ from 'jquery';\n export default DS.Adapter.extend({\n findRecord(store, type, id, snapshot) {\n return new RSVP.Promise(function(resolve, reject) {\n $.getJSON(`/${type.modelName}/${id}`).then(function(data) {\n resolve(data);\n }, function(jqXHR) {\n reject(jqXHR);\n });\n });\n }\n });\n ```\n @method findRecord\n @param {DS.Store} store\n @param {DS.Model} type\n @param {String} id\n @param {DS.Snapshot} snapshot\n @return {Promise} promise\n */\n findRecord: null,\n\n /**\n The `findAll()` method is used to retrieve all records for a given type.\n Example\n ```app/adapters/application.js\n import DS from 'ember-data';\n import RSVP from 'RSVP';\n import $ from 'jquery';\n export default DS.Adapter.extend({\n findAll(store, type, sinceToken) {\n let query = { since: sinceToken };\n return new RSVP.Promise(function(resolve, reject) {\n $.getJSON(`/${type.modelName}`, query).then(function(data) {\n resolve(data);\n }, function(jqXHR) {\n reject(jqXHR);\n });\n });\n }\n });\n ```\n @method findAll\n @param {DS.Store} store\n @param {DS.Model} type\n @param {String} sinceToken\n @param {DS.SnapshotRecordArray} snapshotRecordArray\n @return {Promise} promise\n */\n findAll: null,\n\n /**\n This method is called when you call `query` on the store.\n Example\n ```app/adapters/application.js\n import DS from 'ember-data';\n import RSVP from 'RSVP';\n import $ from 'jquery';\n export default DS.Adapter.extend({\n query(store, type, query) {\n return new RSVP.Promise(function(resolve, reject) {\n $.getJSON(`/${type.modelName}`, query).then(function(data) {\n resolve(data);\n }, function(jqXHR) {\n reject(jqXHR);\n });\n });\n }\n });\n ```\n @method query\n @param {DS.Store} store\n @param {DS.Model} type\n @param {Object} query\n @param {DS.AdapterPopulatedRecordArray} recordArray\n @return {Promise} promise\n */\n query: null,\n\n /**\n The `queryRecord()` method is invoked when the store is asked for a single\n record through a query object.\n In response to `queryRecord()` being called, you should always fetch fresh\n data. Once found, you can asynchronously call the store's `push()` method\n to push the record into the store.\n Here is an example `queryRecord` implementation:\n Example\n ```app/adapters/application.js\n import DS from 'ember-data';\n import RSVP from 'RSVP';\n import $ from 'jquery';\n export default DS.Adapter.extend(DS.BuildURLMixin, {\n queryRecord(store, type, query) {\n return new RSVP.Promise(function(resolve, reject) {\n $.getJSON(`/${type.modelName}`, query).then(function(data) {\n resolve(data);\n }, function(jqXHR) {\n reject(jqXHR);\n });\n });\n }\n });\n ```\n @method queryRecord\n @param {DS.Store} store\n @param {subclass of DS.Model} type\n @param {Object} query\n @return {Promise} promise\n */\n queryRecord: null,\n\n /**\n If the globally unique IDs for your records should be generated on the client,\n implement the `generateIdForRecord()` method. This method will be invoked\n each time you create a new record, and the value returned from it will be\n assigned to the record's `primaryKey`.\n Most traditional REST-like HTTP APIs will not use this method. Instead, the ID\n of the record will be set by the server, and your adapter will update the store\n with the new ID when it calls `didCreateRecord()`. Only implement this method if\n you intend to generate record IDs on the client-side.\n The `generateIdForRecord()` method will be invoked with the requesting store as\n the first parameter and the newly created record as the second parameter:\n ```javascript\n import DS from 'ember-data';\n import { v4 } from 'uuid';\n export default DS.Adapter.extend({\n generateIdForRecord(store, inputProperties) {\n return v4();\n }\n });\n ```\n @method generateIdForRecord\n @param {DS.Store} store\n @param {DS.Model} type the DS.Model class of the record\n @param {Object} inputProperties a hash of properties to set on the\n newly created record.\n @return {(String|Number)} id\n */\n generateIdForRecord: null,\n\n /**\n Proxies to the serializer's `serialize` method.\n Example\n ```app/adapters/application.js\n import DS from 'ember-data';\n export default DS.Adapter.extend({\n createRecord(store, type, snapshot) {\n let data = this.serialize(snapshot, { includeId: true });\n let url = `/${type.modelName}`;\n // ...\n }\n });\n ```\n @method serialize\n @param {DS.Snapshot} snapshot\n @param {Object} options\n @return {Object} serialized snapshot\n */\n serialize: function (snapshot, options) {\n return snapshot.serialize(options);\n },\n\n\n /**\n Implement this method in a subclass to handle the creation of\n new records.\n Serializes the record and sends it to the server.\n Example\n ```app/adapters/application.js\n import DS from 'ember-data';\n import { run } from '@ember/runloop';\n import RSVP from 'RSVP';\n import $ from 'jquery';\n export default DS.Adapter.extend({\n createRecord(store, type, snapshot) {\n let data = this.serialize(snapshot, { includeId: true });\n return new RSVP.Promise(function(resolve, reject) {\n $.ajax({\n type: 'POST',\n url: `/${type.modelName}`,\n dataType: 'json',\n data: data\n }).then(function(data) {\n run(null, resolve, data);\n }, function(jqXHR) {\n jqXHR.then = null; // tame jQuery's ill mannered promises\n run(null, reject, jqXHR);\n });\n });\n }\n });\n ```\n @method createRecord\n @param {DS.Store} store\n @param {DS.Model} type the DS.Model class of the record\n @param {DS.Snapshot} snapshot\n @return {Promise} promise\n */\n createRecord: null,\n\n /**\n Implement this method in a subclass to handle the updating of\n a record.\n Serializes the record update and sends it to the server.\n The updateRecord method is expected to return a promise that will\n resolve with the serialized record. This allows the backend to\n inform the Ember Data store the current state of this record after\n the update. If it is not possible to return a serialized record\n the updateRecord promise can also resolve with `undefined` and the\n Ember Data store will assume all of the updates were successfully\n applied on the backend.\n Example\n ```app/adapters/application.js\n import DS from 'ember-data';\n import { run } from '@ember/runloop';\n import RSVP from 'RSVP';\n import $ from 'jquery';\n export default DS.Adapter.extend({\n updateRecord(store, type, snapshot) {\n let data = this.serialize(snapshot, { includeId: true });\n let id = snapshot.id;\n return new RSVP.Promise(function(resolve, reject) {\n $.ajax({\n type: 'PUT',\n url: `/${type.modelName}/${id}`,\n dataType: 'json',\n data: data\n }).then(function(data) {\n run(null, resolve, data);\n }, function(jqXHR) {\n jqXHR.then = null; // tame jQuery's ill mannered promises\n run(null, reject, jqXHR);\n });\n });\n }\n });\n ```\n @method updateRecord\n @param {DS.Store} store\n @param {DS.Model} type the DS.Model class of the record\n @param {DS.Snapshot} snapshot\n @return {Promise} promise\n */\n updateRecord: null,\n\n /**\n Implement this method in a subclass to handle the deletion of\n a record.\n Sends a delete request for the record to the server.\n Example\n ```app/adapters/application.js\n import DS from 'ember-data';\n import { run } from '@ember/runloop';\n import RSVP from 'RSVP';\n import $ from 'jquery';\n export default DS.Adapter.extend({\n deleteRecord(store, type, snapshot) {\n let data = this.serialize(snapshot, { includeId: true });\n let id = snapshot.id;\n return new RSVP.Promise(function(resolve, reject) {\n $.ajax({\n type: 'DELETE',\n url: `/${type.modelName}/${id}`,\n dataType: 'json',\n data: data\n }).then(function(data) {\n run(null, resolve, data);\n }, function(jqXHR) {\n jqXHR.then = null; // tame jQuery's ill mannered promises\n run(null, reject, jqXHR);\n });\n });\n }\n });\n ```\n @method deleteRecord\n @param {DS.Store} store\n @param {DS.Model} type the DS.Model class of the record\n @param {DS.Snapshot} snapshot\n @return {Promise} promise\n */\n deleteRecord: null,\n\n /**\n By default the store will try to coalesce all `fetchRecord` calls within the same runloop\n into as few requests as possible by calling groupRecordsForFindMany and passing it into a findMany call.\n You can opt out of this behaviour by either not implementing the findMany hook or by setting\n coalesceFindRequests to false.\n @property coalesceFindRequests\n @type {boolean}\n */\n coalesceFindRequests: true,\n\n /**\n The store will call `findMany` instead of multiple `findRecord`\n requests to find multiple records at once if coalesceFindRequests\n is true.\n ```app/adapters/application.js\n import DS from 'ember-data';\n import { run } from '@ember/runloop';\n import RSVP from 'RSVP';\n import $ from 'jquery';\n export default DS.Adapter.extend({\n findMany(store, type, ids, snapshots) {\n return new RSVP.Promise(function(resolve, reject) {\n $.ajax({\n type: 'GET',\n url: `/${type.modelName}/`,\n dataType: 'json',\n data: { filter: { id: ids.join(',') } }\n }).then(function(data) {\n run(null, resolve, data);\n }, function(jqXHR) {\n jqXHR.then = null; // tame jQuery's ill mannered promises\n run(null, reject, jqXHR);\n });\n });\n }\n });\n ```\n @method findMany\n @param {DS.Store} store\n @param {DS.Model} type the DS.Model class of the records\n @param {Array} ids\n @param {Array} snapshots\n @return {Promise} promise\n */\n findMany: null,\n\n /**\n Organize records into groups, each of which is to be passed to separate\n calls to `findMany`.\n For example, if your api has nested URLs that depend on the parent, you will\n want to group records by their parent.\n The default implementation returns the records as a single group.\n @method groupRecordsForFindMany\n @param {DS.Store} store\n @param {Array} snapshots\n @return {Array} an array of arrays of records, each of which is to be\n loaded separately by `findMany`.\n */\n groupRecordsForFindMany: function (store, snapshots) {\n return [snapshots];\n },\n\n\n /**\n This method is used by the store to determine if the store should\n reload a record from the adapter when a record is requested by\n `store.findRecord`.\n If this method returns `true`, the store will re-fetch a record from\n the adapter. If this method returns `false`, the store will resolve\n immediately using the cached record.\n For example, if you are building an events ticketing system, in which users\n can only reserve tickets for 20 minutes at a time, and want to ensure that\n in each route you have data that is no more than 20 minutes old you could\n write:\n ```javascript\n shouldReloadRecord(store, ticketSnapshot) {\n let lastAccessedAt = ticketSnapshot.attr('lastAccessedAt');\n let timeDiff = moment().diff(lastAccessedAt, 'minutes');\n if (timeDiff > 20) {\n return true;\n } else {\n return false;\n }\n }\n ```\n This method would ensure that whenever you do `store.findRecord('ticket',\n id)` you will always get a ticket that is no more than 20 minutes old. In\n case the cached version is more than 20 minutes old, `findRecord` will not\n resolve until you fetched the latest version.\n By default this hook returns `false`, as most UIs should not block user\n interactions while waiting on data update.\n Note that, with default settings, `shouldBackgroundReloadRecord` will always\n re-fetch the records in the background even if `shouldReloadRecord` returns\n `false`. You can override `shouldBackgroundReloadRecord` if this does not\n suit your use case.\n @since 1.13.0\n @method shouldReloadRecord\n @param {DS.Store} store\n @param {DS.Snapshot} snapshot\n @return {Boolean}\n */\n shouldReloadRecord: function (store, snapshot) {\n return false;\n },\n\n\n /**\n This method is used by the store to determine if the store should\n reload all records from the adapter when records are requested by\n `store.findAll`.\n If this method returns `true`, the store will re-fetch all records from\n the adapter. If this method returns `false`, the store will resolve\n immediately using the cached records.\n For example, if you are building an events ticketing system, in which users\n can only reserve tickets for 20 minutes at a time, and want to ensure that\n in each route you have data that is no more than 20 minutes old you could\n write:\n ```javascript\n shouldReloadAll(store, snapshotArray) {\n let snapshots = snapshotArray.snapshots();\n return snapshots.any((ticketSnapshot) => {\n let lastAccessedAt = ticketSnapshot.attr('lastAccessedAt');\n let timeDiff = moment().diff(lastAccessedAt, 'minutes');\n if (timeDiff > 20) {\n return true;\n } else {\n return false;\n }\n });\n }\n ```\n This method would ensure that whenever you do `store.findAll('ticket')` you\n will always get a list of tickets that are no more than 20 minutes old. In\n case a cached version is more than 20 minutes old, `findAll` will not\n resolve until you fetched the latest versions.\n By default this methods returns `true` if the passed `snapshotRecordArray`\n is empty (meaning that there are no records locally available yet),\n otherwise it returns `false`.\n Note that, with default settings, `shouldBackgroundReloadAll` will always\n re-fetch all the records in the background even if `shouldReloadAll` returns\n `false`. You can override `shouldBackgroundReloadAll` if this does not suit\n your use case.\n @since 1.13.0\n @method shouldReloadAll\n @param {DS.Store} store\n @param {DS.SnapshotRecordArray} snapshotRecordArray\n @return {Boolean}\n */\n shouldReloadAll: function (store, snapshotRecordArray) {\n return !snapshotRecordArray.length;\n },\n\n\n /**\n This method is used by the store to determine if the store should\n reload a record after the `store.findRecord` method resolves a\n cached record.\n This method is *only* checked by the store when the store is\n returning a cached record.\n If this method returns `true` the store will re-fetch a record from\n the adapter.\n For example, if you do not want to fetch complex data over a mobile\n connection, or if the network is down, you can implement\n `shouldBackgroundReloadRecord` as follows:\n ```javascript\n shouldBackgroundReloadRecord(store, snapshot) {\n let connection = window.navigator.connection;\n if (connection === 'cellular' || connection === 'none') {\n return false;\n } else {\n return true;\n }\n }\n ```\n By default this hook returns `true` so the data for the record is updated\n in the background.\n @since 1.13.0\n @method shouldBackgroundReloadRecord\n @param {DS.Store} store\n @param {DS.Snapshot} snapshot\n @return {Boolean}\n */\n shouldBackgroundReloadRecord: function (store, snapshot) {\n return true;\n },\n\n\n /**\n This method is used by the store to determine if the store should\n reload a record array after the `store.findAll` method resolves\n with a cached record array.\n This method is *only* checked by the store when the store is\n returning a cached record array.\n If this method returns `true` the store will re-fetch all records\n from the adapter.\n For example, if you do not want to fetch complex data over a mobile\n connection, or if the network is down, you can implement\n `shouldBackgroundReloadAll` as follows:\n ```javascript\n shouldBackgroundReloadAll(store, snapshotArray) {\n let connection = window.navigator.connection;\n if (connection === 'cellular' || connection === 'none') {\n return false;\n } else {\n return true;\n }\n }\n ```\n By default this method returns `true`, indicating that a background reload\n should always be triggered.\n @since 1.13.0\n @method shouldBackgroundReloadAll\n @param {DS.Store} store\n @param {DS.SnapshotRecordArray} snapshotRecordArray\n @return {Boolean}\n */\n shouldBackgroundReloadAll: function (store, snapshotRecordArray) {\n return true;\n }\n });\n});","define('ember-data/adapters/errors', ['exports', 'ember-data/-private'], function (exports, _private) {\n 'use strict';\n\n exports.__esModule = true;\n Object.defineProperty(exports, 'AdapterError', {\n enumerable: true,\n get: function () {\n return _private.AdapterError;\n }\n });\n Object.defineProperty(exports, 'InvalidError', {\n enumerable: true,\n get: function () {\n return _private.InvalidError;\n }\n });\n Object.defineProperty(exports, 'UnauthorizedError', {\n enumerable: true,\n get: function () {\n return _private.UnauthorizedError;\n }\n });\n Object.defineProperty(exports, 'ForbiddenError', {\n enumerable: true,\n get: function () {\n return _private.ForbiddenError;\n }\n });\n Object.defineProperty(exports, 'NotFoundError', {\n enumerable: true,\n get: function () {\n return _private.NotFoundError;\n }\n });\n Object.defineProperty(exports, 'ConflictError', {\n enumerable: true,\n get: function () {\n return _private.ConflictError;\n }\n });\n Object.defineProperty(exports, 'ServerError', {\n enumerable: true,\n get: function () {\n return _private.ServerError;\n }\n });\n Object.defineProperty(exports, 'TimeoutError', {\n enumerable: true,\n get: function () {\n return _private.TimeoutError;\n }\n });\n Object.defineProperty(exports, 'AbortError', {\n enumerable: true,\n get: function () {\n return _private.AbortError;\n }\n });\n Object.defineProperty(exports, 'errorsHashToArray', {\n enumerable: true,\n get: function () {\n return _private.errorsHashToArray;\n }\n });\n Object.defineProperty(exports, 'errorsArrayToHash', {\n enumerable: true,\n get: function () {\n return _private.errorsArrayToHash;\n }\n });\n});","define('ember-data/adapters/json-api', ['exports', 'ember-data/adapters/rest', 'ember-data/-private', 'ember-inflector'], function (exports, _rest, _private, _emberInflector) {\n 'use strict';\n\n exports.__esModule = true;\n var dasherize = Ember.String.dasherize;\n var $ = Ember.$;\n\n\n /**\n The `JSONAPIAdapter` is the default adapter used by Ember Data. It\n is responsible for transforming the store's requests into HTTP\n requests that follow the [JSON API](http://jsonapi.org/format/)\n format.\n \n ## JSON API Conventions\n \n The JSONAPIAdapter uses JSON API conventions for building the url\n for a record and selecting the HTTP verb to use with a request. The\n actions you can take on a record map onto the following URLs in the\n JSON API adapter:\n \n <table>\n <tr>\n <th>\n Action\n </th>\n <th>\n HTTP Verb\n </th>\n <th>\n URL\n </th>\n </tr>\n <tr>\n <th>\n `store.findRecord('post', 123)`\n </th>\n <td>\n GET\n </td>\n <td>\n /posts/123\n </td>\n </tr>\n <tr>\n <th>\n `store.findAll('post')`\n </th>\n <td>\n GET\n </td>\n <td>\n /posts\n </td>\n </tr>\n <tr>\n <th>\n Update `postRecord.save()`\n </th>\n <td>\n PATCH\n </td>\n <td>\n /posts/123\n </td>\n </tr>\n <tr>\n <th>\n Create `store.createRecord('post').save()`\n </th>\n <td>\n POST\n </td>\n <td>\n /posts\n </td>\n </tr>\n <tr>\n <th>\n Delete `postRecord.destroyRecord()`\n </th>\n <td>\n DELETE\n </td>\n <td>\n /posts/123\n </td>\n </tr>\n </table>\n \n ## Success and failure\n \n The JSONAPIAdapter will consider a success any response with a\n status code of the 2xx family (\"Success\"), as well as 304 (\"Not\n Modified\"). Any other status code will be considered a failure.\n \n On success, the request promise will be resolved with the full\n response payload.\n \n Failed responses with status code 422 (\"Unprocessable Entity\") will\n be considered \"invalid\". The response will be discarded, except for\n the `errors` key. The request promise will be rejected with a\n `DS.InvalidError`. This error object will encapsulate the saved\n `errors` value.\n \n Any other status codes will be treated as an adapter error. The\n request promise will be rejected, similarly to the invalid case,\n but with an instance of `DS.AdapterError` instead.\n \n ### Endpoint path customization\n \n Endpoint paths can be prefixed with a `namespace` by setting the\n namespace property on the adapter:\n \n ```app/adapters/application.js\n import DS from 'ember-data';\n \n export default DS.JSONAPIAdapter.extend({\n namespace: 'api/1'\n });\n ```\n Requests for the `person` model would now target `/api/1/people/1`.\n \n ### Host customization\n \n An adapter can target other hosts by setting the `host` property.\n \n ```app/adapters/application.js\n import DS from 'ember-data';\n \n export default DS.JSONAPIAdapter.extend({\n host: 'https://api.example.com'\n });\n ```\n \n Requests for the `person` model would now target\n `https://api.example.com/people/1`.\n \n @since 1.13.0\n @class JSONAPIAdapter\n @constructor\n @namespace DS\n @extends DS.RESTAdapter\n */\n var JSONAPIAdapter = _rest.default.extend({\n defaultSerializer: '-json-api',\n\n ajaxOptions: function (url, type, options) {\n var hash = this._super.apply(this, arguments);\n\n if (hash.contentType) {\n hash.contentType = 'application/vnd.api+json';\n }\n\n var beforeSend = hash.beforeSend;\n hash.beforeSend = function (xhr) {\n xhr.setRequestHeader('Accept', 'application/vnd.api+json');\n if (beforeSend) {\n beforeSend(xhr);\n }\n };\n\n return hash;\n },\n\n\n /**\n By default the JSONAPIAdapter will send each find request coming from a `store.find`\n or from accessing a relationship separately to the server. If your server supports passing\n ids as a query string, you can set coalesceFindRequests to true to coalesce all find requests\n within a single runloop.\n For example, if you have an initial payload of:\n ```javascript\n {\n data: {\n id: 1,\n type: 'post',\n relationship: {\n comments: {\n data: [\n { id: 1, type: 'comment' },\n { id: 2, type: 'comment' }\n ]\n }\n }\n }\n }\n ```\n By default calling `post.get('comments')` will trigger the following requests(assuming the\n comments haven't been loaded before):\n ```\n GET /comments/1\n GET /comments/2\n ```\n If you set coalesceFindRequests to `true` it will instead trigger the following request:\n ```\n GET /comments?filter[id]=1,2\n ```\n Setting coalesceFindRequests to `true` also works for `store.find` requests and `belongsTo`\n relationships accessed within the same runloop. If you set `coalesceFindRequests: true`\n ```javascript\n store.findRecord('comment', 1);\n store.findRecord('comment', 2);\n ```\n will also send a request to: `GET /comments?filter[id]=1,2`\n Note: Requests coalescing rely on URL building strategy. So if you override `buildURL` in your app\n `groupRecordsForFindMany` more likely should be overridden as well in order for coalescing to work.\n @property coalesceFindRequests\n @type {boolean}\n */\n coalesceFindRequests: false,\n\n findMany: function (store, type, ids, snapshots) {\n if ((0, _private.isEnabled)('ds-improved-ajax') && !this._hasCustomizedAjax()) {\n return this._super.apply(this, arguments);\n } else {\n var url = this.buildURL(type.modelName, ids, snapshots, 'findMany');\n return this.ajax(url, 'GET', { data: { filter: { id: ids.join(',') } } });\n }\n },\n pathForType: function (modelName) {\n var dasherized = dasherize(modelName);\n return (0, _emberInflector.pluralize)(dasherized);\n },\n updateRecord: function (store, type, snapshot) {\n if ((0, _private.isEnabled)('ds-improved-ajax') && !this._hasCustomizedAjax()) {\n return this._super.apply(this, arguments);\n } else {\n var data = {};\n var serializer = store.serializerFor(type.modelName);\n\n serializer.serializeIntoHash(data, type, snapshot, { includeId: true });\n\n var url = this.buildURL(type.modelName, snapshot.id, snapshot, 'updateRecord');\n\n return this.ajax(url, 'PATCH', { data: data });\n }\n },\n _hasCustomizedAjax: function () {\n if (this.ajax !== JSONAPIAdapter.prototype.ajax) {\n (false && !(false) && Ember.deprecate('JSONAPIAdapter#ajax has been deprecated please use. `methodForRequest`, `urlForRequest`, `headersForRequest` or `dataForRequest` instead.', false, {\n id: 'ds.json-api-adapter.ajax',\n until: '3.0.0'\n }));\n\n return true;\n }\n\n if (this.ajaxOptions !== JSONAPIAdapter.prototype.ajaxOptions) {\n (false && !(false) && Ember.deprecate('JSONAPIAdapterr#ajaxOptions has been deprecated please use. `methodForRequest`, `urlForRequest`, `headersForRequest` or `dataForRequest` instead.', false, {\n id: 'ds.json-api-adapter.ajax-options',\n until: '3.0.0'\n }));\n\n return true;\n }\n\n return false;\n }\n });\n\n if ((0, _private.isEnabled)('ds-improved-ajax')) {\n\n JSONAPIAdapter.reopen({\n methodForRequest: function (params) {\n if (params.requestType === 'updateRecord') {\n return 'PATCH';\n }\n\n return this._super.apply(this, arguments);\n },\n dataForRequest: function (params) {\n var requestType = params.requestType,\n ids = params.ids;\n\n\n if (requestType === 'findMany') {\n return {\n filter: { id: ids.join(',') }\n };\n }\n\n if (requestType === 'updateRecord') {\n var store = params.store,\n type = params.type,\n snapshot = params.snapshot;\n\n var data = {};\n var serializer = store.serializerFor(type.modelName);\n\n serializer.serializeIntoHash(data, type, snapshot, { includeId: true });\n\n return data;\n }\n\n return this._super.apply(this, arguments);\n },\n headersForRequest: function () {\n var headers = this._super.apply(this, arguments) || {};\n\n headers['Accept'] = 'application/vnd.api+json';\n\n return headers;\n },\n _requestToJQueryAjaxHash: function () {\n var hash = this._super.apply(this, arguments);\n\n if (hash.contentType) {\n hash.contentType = 'application/vnd.api+json';\n }\n\n return hash;\n }\n });\n }\n\n exports.default = JSONAPIAdapter;\n});","define('ember-data/adapters/rest', ['exports', 'ember-data/adapter', 'ember-data/-private'], function (exports, _adapter, _private) {\n 'use strict';\n\n exports.__esModule = true;\n var $ = Ember.$;\n var EmberPromise = Ember.RSVP.Promise;\n var MapWithDefault = Ember.MapWithDefault;\n var get = Ember.get;\n var run = Ember.run;\n\n\n var Promise = EmberPromise;\n\n /**\n The REST adapter allows your store to communicate with an HTTP server by\n transmitting JSON via XHR. Most Ember.js apps that consume a JSON API\n should use the REST adapter.\n \n This adapter is designed around the idea that the JSON exchanged with\n the server should be conventional.\n \n ## Success and failure\n \n The REST adapter will consider a success any response with a status code\n of the 2xx family (\"Success\"), as well as 304 (\"Not Modified\"). Any other\n status code will be considered a failure.\n \n On success, the request promise will be resolved with the full response\n payload.\n \n Failed responses with status code 422 (\"Unprocessable Entity\") will be\n considered \"invalid\". The response will be discarded, except for the\n `errors` key. The request promise will be rejected with a `DS.InvalidError`.\n This error object will encapsulate the saved `errors` value.\n \n Any other status codes will be treated as an \"adapter error\". The request\n promise will be rejected, similarly to the \"invalid\" case, but with\n an instance of `DS.AdapterError` instead.\n \n ## JSON Structure\n \n The REST adapter expects the JSON returned from your server to follow\n these conventions.\n \n ### Object Root\n \n The JSON payload should be an object that contains the record inside a\n root property. For example, in response to a `GET` request for\n `/posts/1`, the JSON should look like this:\n \n ```js\n {\n \"posts\": {\n \"id\": 1,\n \"title\": \"I'm Running to Reform the W3C's Tag\",\n \"author\": \"Yehuda Katz\"\n }\n }\n ```\n \n Similarly, in response to a `GET` request for `/posts`, the JSON should\n look like this:\n \n ```js\n {\n \"posts\": [\n {\n \"id\": 1,\n \"title\": \"I'm Running to Reform the W3C's Tag\",\n \"author\": \"Yehuda Katz\"\n },\n {\n \"id\": 2,\n \"title\": \"Rails is omakase\",\n \"author\": \"D2H\"\n }\n ]\n }\n ```\n \n Note that the object root can be pluralized for both a single-object response\n and an array response: the REST adapter is not strict on this. Further, if the\n HTTP server responds to a `GET` request to `/posts/1` (e.g. the response to a\n `findRecord` query) with more than one object in the array, Ember Data will\n only display the object with the matching ID.\n \n ### Conventional Names\n \n Attribute names in your JSON payload should be the camelCased versions of\n the attributes in your Ember.js models.\n \n For example, if you have a `Person` model:\n \n ```app/models/person.js\n import DS from 'ember-data';\n \n export default DS.Model.extend({\n firstName: DS.attr('string'),\n lastName: DS.attr('string'),\n occupation: DS.attr('string')\n });\n ```\n \n The JSON returned should look like this:\n \n ```js\n {\n \"people\": {\n \"id\": 5,\n \"firstName\": \"Zaphod\",\n \"lastName\": \"Beeblebrox\",\n \"occupation\": \"President\"\n }\n }\n ```\n \n #### Relationships\n \n Relationships are usually represented by ids to the record in the\n relationship. The related records can then be sideloaded in the\n response under a key for the type.\n \n ```js\n {\n \"posts\": {\n \"id\": 5,\n \"title\": \"I'm Running to Reform the W3C's Tag\",\n \"author\": \"Yehuda Katz\",\n \"comments\": [1, 2]\n },\n \"comments\": [{\n \"id\": 1,\n \"author\": \"User 1\",\n \"message\": \"First!\",\n }, {\n \"id\": 2,\n \"author\": \"User 2\",\n \"message\": \"Good Luck!\",\n }]\n }\n ```\n \n If the records in the relationship are not known when the response\n is serialized its also possible to represent the relationship as a\n url using the `links` key in the response. Ember Data will fetch\n this url to resolve the relationship when it is accessed for the\n first time.\n \n ```js\n {\n \"posts\": {\n \"id\": 5,\n \"title\": \"I'm Running to Reform the W3C's Tag\",\n \"author\": \"Yehuda Katz\",\n \"links\": {\n \"comments\": \"/posts/5/comments\"\n }\n }\n }\n ```\n \n ### Errors\n \n If a response is considered a failure, the JSON payload is expected to include\n a top-level key `errors`, detailing any specific issues. For example:\n \n ```js\n {\n \"errors\": {\n \"msg\": \"Something went wrong\"\n }\n }\n ```\n \n This adapter does not make any assumptions as to the format of the `errors`\n object. It will simply be passed along as is, wrapped in an instance\n of `DS.InvalidError` or `DS.AdapterError`. The serializer can interpret it\n afterwards.\n \n ## Customization\n \n ### Endpoint path customization\n \n Endpoint paths can be prefixed with a `namespace` by setting the namespace\n property on the adapter:\n \n ```app/adapters/application.js\n import DS from 'ember-data';\n \n export default DS.RESTAdapter.extend({\n namespace: 'api/1'\n });\n ```\n Requests for the `Person` model would now target `/api/1/people/1`.\n \n ### Host customization\n \n An adapter can target other hosts by setting the `host` property.\n \n ```app/adapters/application.js\n import DS from 'ember-data';\n \n export default DS.RESTAdapter.extend({\n host: 'https://api.example.com'\n });\n ```\n \n ### Headers customization\n \n Some APIs require HTTP headers, e.g. to provide an API key. Arbitrary\n headers can be set as key/value pairs on the `RESTAdapter`'s `headers`\n object and Ember Data will send them along with each ajax request.\n \n \n ```app/adapters/application.js\n import DS from 'ember-data';\n import { computed } from '@ember/object';\n \n export default DS.RESTAdapter.extend({\n headers: computed(function() {\n return {\n 'API_KEY': 'secret key',\n 'ANOTHER_HEADER': 'Some header value'\n };\n }\n });\n ```\n \n `headers` can also be used as a computed property to support dynamic\n headers. In the example below, the `session` object has been\n injected into an adapter by Ember's container.\n \n ```app/adapters/application.js\n import DS from 'ember-data';\n import { computed } from '@ember/object';\n \n export default DS.RESTAdapter.extend({\n headers: computed('session.authToken', function() {\n return {\n 'API_KEY': this.get('session.authToken'),\n 'ANOTHER_HEADER': 'Some header value'\n };\n })\n });\n ```\n \n In some cases, your dynamic headers may require data from some\n object outside of Ember's observer system (for example\n `document.cookie`). You can use the\n [volatile](/api/classes/Ember.ComputedProperty.html#method_volatile)\n function to set the property into a non-cached mode causing the headers to\n be recomputed with every request.\n \n ```app/adapters/application.js\n import DS from 'ember-data';\n import { get } from '@ember/object';\n import { computed } from '@ember/object';\n \n export default DS.RESTAdapter.extend({\n headers: computed(function() {\n return {\n 'API_KEY': get(document.cookie.match(/apiKey\\=([^;]*)/), '1'),\n 'ANOTHER_HEADER': 'Some header value'\n };\n }).volatile()\n });\n ```\n \n @class RESTAdapter\n @constructor\n @namespace DS\n @extends DS.Adapter\n @uses DS.BuildURLMixin\n */\n var RESTAdapter = _adapter.default.extend(_private.BuildURLMixin, {\n defaultSerializer: '-rest',\n\n sortQueryParams: function (obj) {\n var keys = Object.keys(obj);\n var len = keys.length;\n if (len < 2) {\n return obj;\n }\n var newQueryParams = {};\n var sortedKeys = keys.sort();\n\n for (var i = 0; i < len; i++) {\n newQueryParams[sortedKeys[i]] = obj[sortedKeys[i]];\n }\n return newQueryParams;\n },\n\n\n /**\n By default the RESTAdapter will send each find request coming from a `store.find`\n or from accessing a relationship separately to the server. If your server supports passing\n ids as a query string, you can set coalesceFindRequests to true to coalesce all find requests\n within a single runloop.\n For example, if you have an initial payload of:\n ```javascript\n {\n post: {\n id: 1,\n comments: [1, 2]\n }\n }\n ```\n By default calling `post.get('comments')` will trigger the following requests(assuming the\n comments haven't been loaded before):\n ```\n GET /comments/1\n GET /comments/2\n ```\n If you set coalesceFindRequests to `true` it will instead trigger the following request:\n ```\n GET /comments?ids[]=1&ids[]=2\n ```\n Setting coalesceFindRequests to `true` also works for `store.find` requests and `belongsTo`\n relationships accessed within the same runloop. If you set `coalesceFindRequests: true`\n ```javascript\n store.findRecord('comment', 1);\n store.findRecord('comment', 2);\n ```\n will also send a request to: `GET /comments?ids[]=1&ids[]=2`\n Note: Requests coalescing rely on URL building strategy. So if you override `buildURL` in your app\n `groupRecordsForFindMany` more likely should be overridden as well in order for coalescing to work.\n @property coalesceFindRequests\n @type {boolean}\n */\n coalesceFindRequests: false,\n\n findRecord: function (store, type, id, snapshot) {\n if ((0, _private.isEnabled)('ds-improved-ajax') && !this._hasCustomizedAjax()) {\n var request = this._requestFor({\n store: store, type: type, id: id, snapshot: snapshot,\n requestType: 'findRecord'\n });\n\n return this._makeRequest(request);\n } else {\n var url = this.buildURL(type.modelName, id, snapshot, 'findRecord');\n var query = this.buildQuery(snapshot);\n\n return this.ajax(url, 'GET', { data: query });\n }\n },\n findAll: function (store, type, sinceToken, snapshotRecordArray) {\n var query = this.buildQuery(snapshotRecordArray);\n\n if ((0, _private.isEnabled)('ds-improved-ajax') && !this._hasCustomizedAjax()) {\n var request = this._requestFor({\n store: store, type: type, sinceToken: sinceToken, query: query,\n snapshots: snapshotRecordArray,\n requestType: 'findAll'\n });\n\n return this._makeRequest(request);\n } else {\n var url = this.buildURL(type.modelName, null, snapshotRecordArray, 'findAll');\n\n if (sinceToken) {\n query.since = sinceToken;\n }\n\n return this.ajax(url, 'GET', { data: query });\n }\n },\n query: function (store, type, query) {\n if ((0, _private.isEnabled)('ds-improved-ajax') && !this._hasCustomizedAjax()) {\n var request = this._requestFor({\n store: store, type: type, query: query,\n requestType: 'query'\n });\n\n return this._makeRequest(request);\n } else {\n var url = this.buildURL(type.modelName, null, null, 'query', query);\n\n if (this.sortQueryParams) {\n query = this.sortQueryParams(query);\n }\n\n return this.ajax(url, 'GET', { data: query });\n }\n },\n queryRecord: function (store, type, query) {\n if ((0, _private.isEnabled)('ds-improved-ajax') && !this._hasCustomizedAjax()) {\n var request = this._requestFor({\n store: store, type: type, query: query,\n requestType: 'queryRecord'\n });\n\n return this._makeRequest(request);\n } else {\n var url = this.buildURL(type.modelName, null, null, 'queryRecord', query);\n\n if (this.sortQueryParams) {\n query = this.sortQueryParams(query);\n }\n\n return this.ajax(url, 'GET', { data: query });\n }\n },\n findMany: function (store, type, ids, snapshots) {\n if ((0, _private.isEnabled)('ds-improved-ajax') && !this._hasCustomizedAjax()) {\n var request = this._requestFor({\n store: store, type: type, ids: ids, snapshots: snapshots,\n requestType: 'findMany'\n });\n\n return this._makeRequest(request);\n } else {\n var url = this.buildURL(type.modelName, ids, snapshots, 'findMany');\n return this.ajax(url, 'GET', { data: { ids: ids } });\n }\n },\n findHasMany: function (store, snapshot, url, relationship) {\n if ((0, _private.isEnabled)('ds-improved-ajax') && !this._hasCustomizedAjax()) {\n var request = this._requestFor({\n store: store, snapshot: snapshot, url: url, relationship: relationship,\n requestType: 'findHasMany'\n });\n\n return this._makeRequest(request);\n } else {\n var id = snapshot.id;\n var type = snapshot.modelName;\n\n url = this.urlPrefix(url, this.buildURL(type, id, snapshot, 'findHasMany'));\n\n return this.ajax(url, 'GET');\n }\n },\n findBelongsTo: function (store, snapshot, url, relationship) {\n if ((0, _private.isEnabled)('ds-improved-ajax') && !this._hasCustomizedAjax()) {\n var request = this._requestFor({\n store: store, snapshot: snapshot, url: url, relationship: relationship,\n requestType: 'findBelongsTo'\n });\n\n return this._makeRequest(request);\n } else {\n var id = snapshot.id;\n var type = snapshot.modelName;\n\n url = this.urlPrefix(url, this.buildURL(type, id, snapshot, 'findBelongsTo'));\n return this.ajax(url, 'GET');\n }\n },\n createRecord: function (store, type, snapshot) {\n if ((0, _private.isEnabled)('ds-improved-ajax') && !this._hasCustomizedAjax()) {\n var request = this._requestFor({\n store: store, type: type, snapshot: snapshot,\n requestType: 'createRecord'\n });\n\n return this._makeRequest(request);\n } else {\n var data = {};\n var serializer = store.serializerFor(type.modelName);\n var url = this.buildURL(type.modelName, null, snapshot, 'createRecord');\n\n serializer.serializeIntoHash(data, type, snapshot, { includeId: true });\n\n return this.ajax(url, \"POST\", { data: data });\n }\n },\n updateRecord: function (store, type, snapshot) {\n if ((0, _private.isEnabled)('ds-improved-ajax') && !this._hasCustomizedAjax()) {\n var request = this._requestFor({\n store: store, type: type, snapshot: snapshot,\n requestType: 'updateRecord'\n });\n\n return this._makeRequest(request);\n } else {\n var data = {};\n var serializer = store.serializerFor(type.modelName);\n\n serializer.serializeIntoHash(data, type, snapshot);\n\n var id = snapshot.id;\n var url = this.buildURL(type.modelName, id, snapshot, 'updateRecord');\n\n return this.ajax(url, \"PUT\", { data: data });\n }\n },\n deleteRecord: function (store, type, snapshot) {\n if ((0, _private.isEnabled)('ds-improved-ajax') && !this._hasCustomizedAjax()) {\n var request = this._requestFor({\n store: store, type: type, snapshot: snapshot,\n requestType: 'deleteRecord'\n });\n\n return this._makeRequest(request);\n } else {\n var id = snapshot.id;\n\n return this.ajax(this.buildURL(type.modelName, id, snapshot, 'deleteRecord'), \"DELETE\");\n }\n },\n _stripIDFromURL: function (store, snapshot) {\n var url = this.buildURL(snapshot.modelName, snapshot.id, snapshot);\n\n var expandedURL = url.split('/');\n // Case when the url is of the format ...something/:id\n // We are decodeURIComponent-ing the lastSegment because if it represents\n // the id, it has been encodeURIComponent-ified within `buildURL`. If we\n // don't do this, then records with id having special characters are not\n // coalesced correctly (see GH #4190 for the reported bug)\n var lastSegment = expandedURL[expandedURL.length - 1];\n var id = snapshot.id;\n if (decodeURIComponent(lastSegment) === id) {\n expandedURL[expandedURL.length - 1] = \"\";\n } else if (endsWith(lastSegment, '?id=' + id)) {\n //Case when the url is of the format ...something?id=:id\n expandedURL[expandedURL.length - 1] = lastSegment.substring(0, lastSegment.length - id.length - 1);\n }\n\n return expandedURL.join('/');\n },\n\n\n // http://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers\n maxURLLength: 2048,\n\n groupRecordsForFindMany: function (store, snapshots) {\n var groups = MapWithDefault.create({\n defaultValue: function () {\n return [];\n }\n });\n var adapter = this;\n var maxURLLength = this.maxURLLength;\n\n snapshots.forEach(function (snapshot) {\n var baseUrl = adapter._stripIDFromURL(store, snapshot);\n groups.get(baseUrl).push(snapshot);\n });\n\n function splitGroupToFitInUrl(group, maxURLLength, paramNameLength) {\n var idsSize = 0;\n var baseUrl = adapter._stripIDFromURL(store, group[0]);\n var splitGroups = [[]];\n\n group.forEach(function (snapshot) {\n var additionalLength = encodeURIComponent(snapshot.id).length + paramNameLength;\n if (baseUrl.length + idsSize + additionalLength >= maxURLLength) {\n idsSize = 0;\n splitGroups.push([]);\n }\n\n idsSize += additionalLength;\n\n var lastGroupIndex = splitGroups.length - 1;\n splitGroups[lastGroupIndex].push(snapshot);\n });\n\n return splitGroups;\n }\n\n var groupsArray = [];\n groups.forEach(function (group, key) {\n var paramNameLength = '&ids%5B%5D='.length;\n var splitGroups = splitGroupToFitInUrl(group, maxURLLength, paramNameLength);\n\n splitGroups.forEach(function (splitGroup) {\n return groupsArray.push(splitGroup);\n });\n });\n\n return groupsArray;\n },\n handleResponse: function (status, headers, payload, requestData) {\n if (this.isSuccess(status, headers, payload)) {\n return payload;\n } else if (this.isInvalid(status, headers, payload)) {\n return new _private.InvalidError(payload.errors);\n }\n\n var errors = this.normalizeErrorResponse(status, headers, payload);\n var detailedMessage = this.generatedDetailedMessage(status, headers, payload, requestData);\n\n switch (status) {\n case 401:\n return new _private.UnauthorizedError(errors, detailedMessage);\n case 403:\n return new _private.ForbiddenError(errors, detailedMessage);\n case 404:\n return new _private.NotFoundError(errors, detailedMessage);\n case 409:\n return new _private.ConflictError(errors, detailedMessage);\n default:\n if (status >= 500) {\n return new _private.ServerError(errors, detailedMessage);\n }\n }\n\n return new _private.AdapterError(errors, detailedMessage);\n },\n isSuccess: function (status, headers, payload) {\n return status >= 200 && status < 300 || status === 304;\n },\n isInvalid: function (status, headers, payload) {\n return status === 422;\n },\n ajax: function (url, type, options) {\n var adapter = this;\n\n var requestData = {\n url: url,\n method: type\n };\n\n return new Promise(function (resolve, reject) {\n var hash = adapter.ajaxOptions(url, type, options);\n\n hash.success = function (payload, textStatus, jqXHR) {\n var response = ajaxSuccess(adapter, jqXHR, payload, requestData);\n run.join(null, resolve, response);\n };\n\n hash.error = function (jqXHR, textStatus, errorThrown) {\n var responseData = {\n textStatus: textStatus,\n errorThrown: errorThrown\n };\n var error = ajaxError(adapter, jqXHR, requestData, responseData);\n run.join(null, reject, error);\n };\n\n adapter._ajaxRequest(hash);\n }, 'DS: RESTAdapter#ajax ' + type + ' to ' + url);\n },\n _ajaxRequest: function (options) {\n $.ajax(options);\n },\n ajaxOptions: function (url, type, options) {\n var hash = options || {};\n hash.url = url;\n hash.type = type;\n hash.dataType = 'json';\n hash.context = this;\n\n if (hash.data && type !== 'GET') {\n hash.contentType = 'application/json; charset=utf-8';\n hash.data = JSON.stringify(hash.data);\n }\n\n var headers = get(this, 'headers');\n if (headers !== undefined) {\n hash.beforeSend = function (xhr) {\n Object.keys(headers).forEach(function (key) {\n return xhr.setRequestHeader(key, headers[key]);\n });\n };\n }\n\n return hash;\n },\n parseErrorResponse: function (responseText) {\n var json = responseText;\n\n try {\n json = $.parseJSON(responseText);\n } catch (e) {\n // ignored\n }\n\n return json;\n },\n normalizeErrorResponse: function (status, headers, payload) {\n if (payload && typeof payload === 'object' && payload.errors) {\n return payload.errors;\n } else {\n return [{\n status: '' + status,\n title: \"The backend responded with an error\",\n detail: '' + payload\n }];\n }\n },\n\n\n /**\n Generates a detailed (\"friendly\") error message, with plenty\n of information for debugging (good luck!)\n @method generatedDetailedMessage\n @private\n @param {Number} status\n @param {Object} headers\n @param {Object} payload\n @param {Object} requestData\n @return {String} detailed error message\n */\n generatedDetailedMessage: function (status, headers, payload, requestData) {\n var shortenedPayload = void 0;\n var payloadContentType = headers[\"Content-Type\"] || \"Empty Content-Type\";\n\n if (payloadContentType === \"text/html\" && payload.length > 250) {\n shortenedPayload = \"[Omitted Lengthy HTML]\";\n } else {\n shortenedPayload = payload;\n }\n\n var requestDescription = requestData.method + ' ' + requestData.url;\n var payloadDescription = 'Payload (' + payloadContentType + ')';\n\n return ['Ember Data Request ' + requestDescription + ' returned a ' + status, payloadDescription, shortenedPayload].join('\\n');\n },\n\n buildQuery: function (snapshot) {\n var query = {};\n\n if (snapshot) {\n var include = snapshot.include;\n\n\n if (include) {\n query.include = include;\n }\n }\n\n return query;\n },\n _hasCustomizedAjax: function () {\n if (this.ajax !== RESTAdapter.prototype.ajax) {\n (false && !(false) && Ember.deprecate('RESTAdapter#ajax has been deprecated please use. `methodForRequest`, `urlForRequest`, `headersForRequest` or `dataForRequest` instead.', false, {\n id: 'ds.rest-adapter.ajax',\n until: '3.0.0'\n }));\n\n return true;\n }\n\n if (this.ajaxOptions !== RESTAdapter.prototype.ajaxOptions) {\n (false && !(false) && Ember.deprecate('RESTAdapter#ajaxOptions has been deprecated please use. `methodForRequest`, `urlForRequest`, `headersForRequest` or `dataForRequest` instead.', false, {\n id: 'ds.rest-adapter.ajax-options',\n until: '3.0.0'\n }));\n\n return true;\n }\n\n return false;\n }\n });\n\n if ((0, _private.isEnabled)('ds-improved-ajax')) {\n\n RESTAdapter.reopen({\n dataForRequest: function (params) {\n var store = params.store,\n type = params.type,\n snapshot = params.snapshot,\n requestType = params.requestType,\n query = params.query;\n\n\n // type is not passed to findBelongsTo and findHasMany\n type = type || snapshot && snapshot.type;\n\n var serializer = store.serializerFor(type.modelName);\n var data = {};\n\n switch (requestType) {\n case 'createRecord':\n serializer.serializeIntoHash(data, type, snapshot, { includeId: true });\n break;\n\n case 'updateRecord':\n serializer.serializeIntoHash(data, type, snapshot);\n break;\n\n case 'findRecord':\n data = this.buildQuery(snapshot);\n break;\n\n case 'findAll':\n if (params.sinceToken) {\n query = query || {};\n query.since = params.sinceToken;\n }\n data = query;\n break;\n\n case 'query':\n case 'queryRecord':\n if (this.sortQueryParams) {\n query = this.sortQueryParams(query);\n }\n data = query;\n break;\n\n case 'findMany':\n data = { ids: params.ids };\n break;\n\n default:\n data = undefined;\n break;\n }\n\n return data;\n },\n methodForRequest: function (params) {\n var requestType = params.requestType;\n\n\n switch (requestType) {\n case 'createRecord':\n return 'POST';\n case 'updateRecord':\n return 'PUT';\n case 'deleteRecord':\n return 'DELETE';\n }\n\n return 'GET';\n },\n urlForRequest: function (params) {\n var type = params.type,\n id = params.id,\n ids = params.ids,\n snapshot = params.snapshot,\n snapshots = params.snapshots,\n requestType = params.requestType,\n query = params.query;\n\n\n // type and id are not passed from updateRecord and deleteRecord, hence they\n // are defined if not set\n type = type || snapshot && snapshot.type;\n id = id || snapshot && snapshot.id;\n\n switch (requestType) {\n case 'findAll':\n return this.buildURL(type.modelName, null, snapshots, requestType);\n\n case 'query':\n case 'queryRecord':\n return this.buildURL(type.modelName, null, null, requestType, query);\n\n case 'findMany':\n return this.buildURL(type.modelName, ids, snapshots, requestType);\n\n case 'findHasMany':\n case 'findBelongsTo':\n {\n var url = this.buildURL(type.modelName, id, snapshot, requestType);\n return this.urlPrefix(params.url, url);\n }\n }\n\n return this.buildURL(type.modelName, id, snapshot, requestType, query);\n },\n headersForRequest: function (params) {\n return this.get('headers');\n },\n _requestFor: function (params) {\n var method = this.methodForRequest(params);\n var url = this.urlForRequest(params);\n var headers = this.headersForRequest(params);\n var data = this.dataForRequest(params);\n\n return { method: method, url: url, headers: headers, data: data };\n },\n _requestToJQueryAjaxHash: function (request) {\n var hash = {};\n\n hash.type = request.method;\n hash.url = request.url;\n hash.dataType = 'json';\n hash.context = this;\n\n if (request.data) {\n if (request.method !== 'GET') {\n hash.contentType = 'application/json; charset=utf-8';\n hash.data = JSON.stringify(request.data);\n } else {\n hash.data = request.data;\n }\n }\n\n var headers = request.headers;\n if (headers !== undefined) {\n hash.beforeSend = function (xhr) {\n Object.keys(headers).forEach(function (key) {\n return xhr.setRequestHeader(key, headers[key]);\n });\n };\n }\n\n return hash;\n },\n _makeRequest: function (request) {\n var adapter = this;\n var hash = this._requestToJQueryAjaxHash(request);\n\n var method = request.method,\n url = request.url;\n\n var requestData = { method: method, url: url };\n\n return new Promise(function (resolve, reject) {\n\n hash.success = function (payload, textStatus, jqXHR) {\n var response = ajaxSuccess(adapter, jqXHR, payload, requestData);\n run.join(null, resolve, response);\n };\n\n hash.error = function (jqXHR, textStatus, errorThrown) {\n var responseData = {\n textStatus: textStatus,\n errorThrown: errorThrown\n };\n var error = ajaxError(adapter, jqXHR, requestData, responseData);\n run.join(null, reject, error);\n };\n\n adapter._ajaxRequest(hash);\n }, 'DS: RESTAdapter#makeRequest: ' + method + ' ' + url);\n }\n });\n }\n\n function ajaxSuccess(adapter, jqXHR, payload, requestData) {\n var response = void 0;\n try {\n response = adapter.handleResponse(jqXHR.status, (0, _private.parseResponseHeaders)(jqXHR.getAllResponseHeaders()), payload, requestData);\n } catch (error) {\n return Promise.reject(error);\n }\n\n if (response && response.isAdapterError) {\n return Promise.reject(response);\n } else {\n return response;\n }\n }\n\n function ajaxError(adapter, jqXHR, requestData, responseData) {\n if (false) {\n var message = 'The server returned an empty string for ' + requestData.method + ' ' + requestData.url + ', which cannot be parsed into a valid JSON. Return either null or {}.';\n var validJSONString = !(responseData.textStatus === \"parsererror\" && jqXHR.responseText === \"\");\n (false && Ember.warn(message, validJSONString, {\n id: 'ds.adapter.returned-empty-string-as-JSON'\n }));\n }\n\n var error = void 0;\n\n if (responseData.errorThrown instanceof Error) {\n error = responseData.errorThrown;\n } else if (responseData.textStatus === 'timeout') {\n error = new _private.TimeoutError();\n } else if (responseData.textStatus === 'abort' || jqXHR.status === 0) {\n error = new _private.AbortError();\n } else {\n try {\n error = adapter.handleResponse(jqXHR.status, (0, _private.parseResponseHeaders)(jqXHR.getAllResponseHeaders()), adapter.parseErrorResponse(jqXHR.responseText) || responseData.errorThrown, requestData);\n } catch (e) {\n error = e;\n }\n }\n\n return error;\n }\n\n //From http://stackoverflow.com/questions/280634/endswith-in-javascript\n function endsWith(string, suffix) {\n if (typeof String.prototype.endsWith !== 'function') {\n return string.indexOf(suffix, string.length - suffix.length) !== -1;\n } else {\n return string.endsWith(suffix);\n }\n }\n\n exports.default = RESTAdapter;\n});","define('ember-data/attr', ['exports'], function (exports) {\n 'use strict';\n\n exports.__esModule = true;\n exports.default = attr;\n var computed = Ember.computed;\n\n\n /**\n @module ember-data\n */\n\n function getDefaultValue(record, options, key) {\n if (typeof options.defaultValue === 'function') {\n return options.defaultValue.apply(null, arguments);\n } else {\n var defaultValue = options.defaultValue;\n (false && Ember.assert('Non primitive defaultValues are not supported because they are shared between all instances. If you would like to use a complex object as a default value please provide a function that returns the complex object.', typeof defaultValue !== 'object' || defaultValue === null));\n\n return defaultValue;\n }\n }\n\n function hasValue(record, key) {\n return key in record._attributes || key in record._inFlightAttributes || key in record._data;\n }\n\n function getValue(record, key) {\n if (key in record._attributes) {\n return record._attributes[key];\n } else if (key in record._inFlightAttributes) {\n return record._inFlightAttributes[key];\n } else {\n return record._data[key];\n }\n }\n\n /**\n `DS.attr` defines an attribute on a [DS.Model](/api/data/classes/DS.Model.html).\n By default, attributes are passed through as-is, however you can specify an\n optional type to have the value automatically transformed.\n Ember Data ships with four basic transform types: `string`, `number`,\n `boolean` and `date`. You can define your own transforms by subclassing\n [DS.Transform](/api/data/classes/DS.Transform.html).\n \n Note that you cannot use `attr` to define an attribute of `id`.\n \n `DS.attr` takes an optional hash as a second parameter, currently\n supported options are:\n \n - `defaultValue`: Pass a string or a function to be called to set the attribute\n to a default value if none is supplied.\n \n Example\n \n ```app/models/user.js\n import DS from 'ember-data';\n \n export default DS.Model.extend({\n username: DS.attr('string'),\n email: DS.attr('string'),\n verified: DS.attr('boolean', { defaultValue: false })\n });\n ```\n \n Default value can also be a function. This is useful it you want to return\n a new object for each attribute.\n \n ```app/models/user.js\n import DS from 'ember-data';\n \n export default DS.Model.extend({\n username: DS.attr('string'),\n email: DS.attr('string'),\n settings: DS.attr({\n defaultValue() {\n return {};\n }\n })\n });\n ```\n \n The `options` hash is passed as second argument to a transforms'\n `serialize` and `deserialize` method. This allows to configure a\n transformation and adapt the corresponding value, based on the config:\n \n ```app/models/post.js\n import DS from 'ember-data';\n \n export default DS.Model.extend({\n text: DS.attr('text', {\n uppercase: true\n })\n });\n ```\n \n ```app/transforms/text.js\n import DS from 'ember-data';\n \n export default DS.Transform.extend({\n serialize(value, options) {\n if (options.uppercase) {\n return value.toUpperCase();\n }\n \n return value;\n },\n \n deserialize(value) {\n return value;\n }\n })\n ```\n \n @namespace\n @method attr\n @for DS\n @param {String|Object} type the attribute type\n @param {Object} options a hash of options\n @return {Attribute}\n */\n\n function attr(type, options) {\n if (typeof type === 'object') {\n options = type;\n type = undefined;\n } else {\n options = options || {};\n }\n\n var meta = {\n type: type,\n isAttribute: true,\n options: options\n };\n\n return computed({\n get: function (key) {\n var internalModel = this._internalModel;\n if (hasValue(internalModel, key)) {\n return getValue(internalModel, key);\n } else {\n return getDefaultValue(this, options, key);\n }\n },\n set: function (key, value) {\n var internalModel = this._internalModel;\n var oldValue = getValue(internalModel, key);\n var originalValue = void 0;\n\n if (value !== oldValue) {\n // Add the new value to the changed attributes hash; it will get deleted by\n // the 'didSetProperty' handler if it is no different from the original value\n internalModel._attributes[key] = value;\n\n if (key in internalModel._inFlightAttributes) {\n originalValue = internalModel._inFlightAttributes[key];\n } else {\n originalValue = internalModel._data[key];\n }\n\n this._internalModel.send('didSetProperty', {\n name: key,\n oldValue: oldValue,\n originalValue: originalValue,\n value: value\n });\n }\n\n return value;\n }\n }).meta(meta);\n }\n});","define(\"ember-data\", [\"exports\", \"ember-data/-private\", \"ember-data/setup-container\", \"ember-data/initialize-store-service\", \"ember-data/transforms/transform\", \"ember-data/transforms/number\", \"ember-data/transforms/date\", \"ember-data/transforms/string\", \"ember-data/transforms/boolean\", \"ember-data/adapter\", \"ember-data/adapters/json-api\", \"ember-data/adapters/rest\", \"ember-data/serializer\", \"ember-data/serializers/json-api\", \"ember-data/serializers/json\", \"ember-data/serializers/rest\", \"ember-data/serializers/embedded-records-mixin\", \"ember-data/attr\", \"ember-inflector\"], function (exports, _private, _setupContainer, _initializeStoreService, _transform, _number, _date, _string, _boolean, _adapter, _jsonApi, _rest, _serializer, _jsonApi2, _json, _rest2, _embeddedRecordsMixin, _attr) {\n \"use strict\";\n\n exports.__esModule = true;\n var EmberError = Ember.Error;\n\n\n /**\n Ember Data\n @module ember-data\n @main ember-data\n */\n\n if (Ember.VERSION.match(/^1\\.([0-9]|1[0-2])\\./)) {\n throw new EmberError(\"Ember Data requires at least Ember 1.13.0, but you have \" + Ember.VERSION + \". Please upgrade your version of Ember, then upgrade Ember Data.\");\n }\n\n _private.DS.Store = _private.Store;\n _private.DS.PromiseArray = _private.PromiseArray;\n _private.DS.PromiseObject = _private.PromiseObject;\n\n _private.DS.PromiseManyArray = _private.PromiseManyArray;\n\n _private.DS.Model = _private.Model;\n _private.DS.RootState = _private.RootState;\n _private.DS.attr = _attr.default;\n _private.DS.Errors = _private.Errors;\n\n _private.DS.InternalModel = _private.InternalModel;\n _private.DS.Snapshot = _private.Snapshot;\n\n _private.DS.Adapter = _adapter.default;\n\n _private.DS.AdapterError = _private.AdapterError;\n _private.DS.InvalidError = _private.InvalidError;\n _private.DS.TimeoutError = _private.TimeoutError;\n _private.DS.AbortError = _private.AbortError;\n\n _private.DS.UnauthorizedError = _private.UnauthorizedError;\n _private.DS.ForbiddenError = _private.ForbiddenError;\n _private.DS.NotFoundError = _private.NotFoundError;\n _private.DS.ConflictError = _private.ConflictError;\n _private.DS.ServerError = _private.ServerError;\n\n _private.DS.errorsHashToArray = _private.errorsHashToArray;\n _private.DS.errorsArrayToHash = _private.errorsArrayToHash;\n\n _private.DS.Serializer = _serializer.default;\n\n _private.DS.DebugAdapter = _private.DebugAdapter;\n\n _private.DS.RecordArray = _private.RecordArray;\n _private.DS.FilteredRecordArray = _private.FilteredRecordArray;\n _private.DS.AdapterPopulatedRecordArray = _private.AdapterPopulatedRecordArray;\n _private.DS.ManyArray = _private.ManyArray;\n\n _private.DS.RecordArrayManager = _private.RecordArrayManager;\n\n _private.DS.RESTAdapter = _rest.default;\n _private.DS.BuildURLMixin = _private.BuildURLMixin;\n\n _private.DS.RESTSerializer = _rest2.default;\n _private.DS.JSONSerializer = _json.default;\n\n _private.DS.JSONAPIAdapter = _jsonApi.default;\n _private.DS.JSONAPISerializer = _jsonApi2.default;\n\n _private.DS.Transform = _transform.default;\n _private.DS.DateTransform = _date.default;\n _private.DS.StringTransform = _string.default;\n _private.DS.NumberTransform = _number.default;\n _private.DS.BooleanTransform = _boolean.default;\n\n _private.DS.EmbeddedRecordsMixin = _embeddedRecordsMixin.default;\n\n _private.DS.belongsTo = _private.belongsTo;\n _private.DS.hasMany = _private.hasMany;\n\n _private.DS.Relationship = _private.Relationship;\n\n _private.DS._setupContainer = _setupContainer.default;\n _private.DS._initializeStoreService = _initializeStoreService.default;\n\n Object.defineProperty(_private.DS, 'normalizeModelName', {\n enumerable: true,\n writable: false,\n configurable: false,\n value: _private.normalizeModelName\n });\n\n exports.default = _private.DS;\n});","define('ember-data/initialize-store-service', ['exports'], function (exports) {\n 'use strict';\n\n exports.__esModule = true;\n exports.default = initializeStoreService;\n /*\n Configures a registry for use with an Ember-Data\n store.\n \n @method initializeStoreService\n @param {Ember.ApplicationInstance | Ember.EngineInstance} instance\n */\n function initializeStoreService(instance) {\n // instance.lookup supports Ember 2.1 and higher\n // instance.container supports Ember 1.11 - 2.0\n var container = instance.lookup ? instance : instance.container;\n\n // Eagerly generate the store so defaultStore is populated.\n container.lookup('service:store');\n }\n});","define('ember-data/initializers/ember-data', ['exports', 'ember-data/setup-container', 'ember-data'], function (exports, _setupContainer) {\n 'use strict';\n\n exports.__esModule = true;\n exports.default = {\n name: 'ember-data',\n initialize: _setupContainer.default\n };\n});","define(\"ember-data/instance-initializers/ember-data\", [\"exports\", \"ember-data/initialize-store-service\"], function (exports, _initializeStoreService) {\n \"use strict\";\n\n exports.__esModule = true;\n exports.default = {\n name: \"ember-data\",\n initialize: _initializeStoreService.default\n };\n});","define('ember-data/model', ['exports', 'ember-data/-private'], function (exports, _private) {\n 'use strict';\n\n exports.__esModule = true;\n Object.defineProperty(exports, 'default', {\n enumerable: true,\n get: function () {\n return _private.Model;\n }\n });\n});","define('ember-data/relationships', ['exports', 'ember-data/-private'], function (exports, _private) {\n 'use strict';\n\n exports.__esModule = true;\n Object.defineProperty(exports, 'belongsTo', {\n enumerable: true,\n get: function () {\n return _private.belongsTo;\n }\n });\n Object.defineProperty(exports, 'hasMany', {\n enumerable: true,\n get: function () {\n return _private.hasMany;\n }\n });\n});","define('ember-data/serializer', ['exports'], function (exports) {\n 'use strict';\n\n exports.__esModule = true;\n var EmberObject = Ember.Object;\n exports.default = EmberObject.extend({\n\n /**\n The `store` property is the application's `store` that contains\n all records. It can be used to look up serializers for other model\n types that may be nested inside the payload response.\n Example:\n ```js\n Serializer.extend({\n extractRelationship(relationshipModelName, relationshipHash) {\n var modelClass = this.store.modelFor(relationshipModelName);\n var relationshipSerializer = this.store.serializerFor(relationshipModelName);\n return relationshipSerializer.normalize(modelClass, relationshipHash);\n }\n });\n ```\n @property store\n @type {DS.Store}\n @public\n */\n\n /**\n The `normalizeResponse` method is used to normalize a payload from the\n server to a JSON-API Document.\n http://jsonapi.org/format/#document-structure\n Example:\n ```js\n Serializer.extend({\n normalizeResponse(store, primaryModelClass, payload, id, requestType) {\n if (requestType === 'findRecord') {\n return this.normalize(primaryModelClass, payload);\n } else {\n return payload.reduce(function(documentHash, item) {\n let { data, included } = this.normalize(primaryModelClass, item);\n documentHash.included.push(...included);\n documentHash.data.push(data);\n return documentHash;\n }, { data: [], included: [] })\n }\n }\n });\n ```\n @since 1.13.0\n @method normalizeResponse\n @param {DS.Store} store\n @param {DS.Model} primaryModelClass\n @param {Object} payload\n @param {String|Number} id\n @param {String} requestType\n @return {Object} JSON-API Document\n */\n normalizeResponse: null,\n\n /**\n The `serialize` method is used when a record is saved in order to convert\n the record into the form that your external data source expects.\n `serialize` takes an optional `options` hash with a single option:\n - `includeId`: If this is `true`, `serialize` should include the ID\n in the serialized object it builds.\n Example:\n ```js\n Serializer.extend({\n serialize(snapshot, options) {\n var json = {\n id: snapshot.id\n };\n snapshot.eachAttribute((key, attribute) => {\n json[key] = snapshot.attr(key);\n });\n snapshot.eachRelationship((key, relationship) => {\n if (relationship.kind === 'belongsTo') {\n json[key] = snapshot.belongsTo(key, { id: true });\n } else if (relationship.kind === 'hasMany') {\n json[key] = snapshot.hasMany(key, { ids: true });\n }\n });\n return json;\n },\n });\n ```\n @method serialize\n @param {DS.Snapshot} snapshot\n @param {Object} [options]\n @return {Object}\n */\n serialize: null,\n\n /**\n The `normalize` method is used to convert a payload received from your\n external data source into the normalized form `store.push()` expects. You\n should override this method, munge the hash and return the normalized\n payload.\n Example:\n ```js\n Serializer.extend({\n normalize(modelClass, resourceHash) {\n var data = {\n id: resourceHash.id,\n type: modelClass.modelName,\n attributes: resourceHash\n };\n return { data: data };\n }\n })\n ```\n @method normalize\n @param {DS.Model} typeClass\n @param {Object} hash\n @return {Object}\n */\n normalize: function (typeClass, hash) {\n return hash;\n }\n });\n});","define('ember-data/serializers/embedded-records-mixin', ['exports'], function (exports) {\n 'use strict';\n\n exports.__esModule = true;\n\n function _toConsumableArray(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n } else {\n return Array.from(arr);\n }\n }\n\n var typeOf = Ember.typeOf;\n var A = Ember.A;\n var Mixin = Ember.Mixin;\n var camelize = Ember.String.camelize;\n var set = Ember.set;\n var get = Ember.get;\n exports.default = Mixin.create({\n\n /**\n Normalize the record and recursively normalize/extract all the embedded records\n while pushing them into the store as they are encountered\n A payload with an attr configured for embedded records needs to be extracted:\n ```js\n {\n \"post\": {\n \"id\": \"1\"\n \"title\": \"Rails is omakase\",\n \"comments\": [{\n \"id\": \"1\",\n \"body\": \"Rails is unagi\"\n }, {\n \"id\": \"2\",\n \"body\": \"Omakase O_o\"\n }]\n }\n }\n ```\n @method normalize\n @param {DS.Model} typeClass\n @param {Object} hash to be normalized\n @param {String} prop the hash has been referenced by\n @return {Object} the normalized hash\n **/\n normalize: function (typeClass, hash, prop) {\n var normalizedHash = this._super(typeClass, hash, prop);\n return this._extractEmbeddedRecords(this, this.store, typeClass, normalizedHash);\n },\n keyForRelationship: function (key, typeClass, method) {\n if (method === 'serialize' && this.hasSerializeRecordsOption(key) || method === 'deserialize' && this.hasDeserializeRecordsOption(key)) {\n return this.keyForAttribute(key, method);\n } else {\n return this._super(key, typeClass, method) || key;\n }\n },\n\n\n /**\n Serialize `belongsTo` relationship when it is configured as an embedded object.\n This example of an author model belongs to a post model:\n ```js\n Post = DS.Model.extend({\n title: DS.attr('string'),\n body: DS.attr('string'),\n author: DS.belongsTo('author')\n });\n Author = DS.Model.extend({\n name: DS.attr('string'),\n post: DS.belongsTo('post')\n });\n ```\n Use a custom (type) serializer for the post model to configure embedded author\n ```app/serializers/post.js\n import DS from 'ember-data';\n export default DS.RESTSerializer.extend(DS.EmbeddedRecordsMixin, {\n attrs: {\n author: { embedded: 'always' }\n }\n })\n ```\n A payload with an attribute configured for embedded records can serialize\n the records together under the root attribute's payload:\n ```js\n {\n \"post\": {\n \"id\": \"1\"\n \"title\": \"Rails is omakase\",\n \"author\": {\n \"id\": \"2\"\n \"name\": \"dhh\"\n }\n }\n }\n ```\n @method serializeBelongsTo\n @param {DS.Snapshot} snapshot\n @param {Object} json\n @param {Object} relationship\n */\n serializeBelongsTo: function (snapshot, json, relationship) {\n var attr = relationship.key;\n if (this.noSerializeOptionSpecified(attr)) {\n this._super(snapshot, json, relationship);\n return;\n }\n var includeIds = this.hasSerializeIdsOption(attr);\n var includeRecords = this.hasSerializeRecordsOption(attr);\n var embeddedSnapshot = snapshot.belongsTo(attr);\n if (includeIds) {\n var serializedKey = this._getMappedKey(relationship.key, snapshot.type);\n if (serializedKey === relationship.key && this.keyForRelationship) {\n serializedKey = this.keyForRelationship(relationship.key, relationship.kind, \"serialize\");\n }\n\n if (!embeddedSnapshot) {\n json[serializedKey] = null;\n } else {\n json[serializedKey] = embeddedSnapshot.id;\n\n if (relationship.options.polymorphic) {\n this.serializePolymorphicType(snapshot, json, relationship);\n }\n }\n } else if (includeRecords) {\n this._serializeEmbeddedBelongsTo(snapshot, json, relationship);\n }\n },\n _serializeEmbeddedBelongsTo: function (snapshot, json, relationship) {\n var embeddedSnapshot = snapshot.belongsTo(relationship.key);\n var serializedKey = this._getMappedKey(relationship.key, snapshot.type);\n if (serializedKey === relationship.key && this.keyForRelationship) {\n serializedKey = this.keyForRelationship(relationship.key, relationship.kind, \"serialize\");\n }\n\n if (!embeddedSnapshot) {\n json[serializedKey] = null;\n } else {\n json[serializedKey] = embeddedSnapshot.serialize({ includeId: true });\n this.removeEmbeddedForeignKey(snapshot, embeddedSnapshot, relationship, json[serializedKey]);\n\n if (relationship.options.polymorphic) {\n this.serializePolymorphicType(snapshot, json, relationship);\n }\n }\n },\n\n\n /**\n Serializes `hasMany` relationships when it is configured as embedded objects.\n This example of a post model has many comments:\n ```js\n Post = DS.Model.extend({\n title: DS.attr('string'),\n body: DS.attr('string'),\n comments: DS.hasMany('comment')\n });\n Comment = DS.Model.extend({\n body: DS.attr('string'),\n post: DS.belongsTo('post')\n });\n ```\n Use a custom (type) serializer for the post model to configure embedded comments\n ```app/serializers/post.js\n import DS from 'ember-data;\n export default DS.RESTSerializer.extend(DS.EmbeddedRecordsMixin, {\n attrs: {\n comments: { embedded: 'always' }\n }\n })\n ```\n A payload with an attribute configured for embedded records can serialize\n the records together under the root attribute's payload:\n ```js\n {\n \"post\": {\n \"id\": \"1\"\n \"title\": \"Rails is omakase\",\n \"body\": \"I want this for my ORM, I want that for my template language...\"\n \"comments\": [{\n \"id\": \"1\",\n \"body\": \"Rails is unagi\"\n }, {\n \"id\": \"2\",\n \"body\": \"Omakase O_o\"\n }]\n }\n }\n ```\n The attrs options object can use more specific instruction for extracting and\n serializing. When serializing, an option to embed `ids`, `ids-and-types` or `records` can be set.\n When extracting the only option is `records`.\n So `{ embedded: 'always' }` is shorthand for:\n `{ serialize: 'records', deserialize: 'records' }`\n To embed the `ids` for a related object (using a hasMany relationship):\n ```app/serializers/post.js\n import DS from 'ember-data;\n export default DS.RESTSerializer.extend(DS.EmbeddedRecordsMixin, {\n attrs: {\n comments: { serialize: 'ids', deserialize: 'records' }\n }\n })\n ```\n ```js\n {\n \"post\": {\n \"id\": \"1\"\n \"title\": \"Rails is omakase\",\n \"body\": \"I want this for my ORM, I want that for my template language...\"\n \"comments\": [\"1\", \"2\"]\n }\n }\n ```\n To embed the relationship as a collection of objects with `id` and `type` keys, set\n `ids-and-types` for the related object.\n This is particularly useful for polymorphic relationships where records don't share\n the same table and the `id` is not enough information.\n By example having a user that has many pets:\n ```js\n User = DS.Model.extend({\n name: DS.attr('string'),\n pets: DS.hasMany('pet', { polymorphic: true })\n });\n Pet = DS.Model.extend({\n name: DS.attr('string'),\n });\n Cat = Pet.extend({\n // ...\n });\n Parrot = Pet.extend({\n // ...\n });\n ```\n ```app/serializers/user.js\n import DS from 'ember-data;\n export default DS.RESTSerializer.extend(DS.EmbeddedRecordsMixin, {\n attrs: {\n pets: { serialize: 'ids-and-types', deserialize: 'records' }\n }\n });\n ```\n ```js\n {\n \"user\": {\n \"id\": \"1\"\n \"name\": \"Bertin Osborne\",\n \"pets\": [\n { \"id\": \"1\", \"type\": \"Cat\" },\n { \"id\": \"1\", \"type\": \"Parrot\"}\n ]\n }\n }\n ```\n @method serializeHasMany\n @param {DS.Snapshot} snapshot\n @param {Object} json\n @param {Object} relationship\n */\n serializeHasMany: function (snapshot, json, relationship) {\n var attr = relationship.key;\n if (this.noSerializeOptionSpecified(attr)) {\n this._super(snapshot, json, relationship);\n return;\n }\n\n if (this.hasSerializeIdsOption(attr)) {\n var serializedKey = this._getMappedKey(relationship.key, snapshot.type);\n if (serializedKey === relationship.key && this.keyForRelationship) {\n serializedKey = this.keyForRelationship(relationship.key, relationship.kind, \"serialize\");\n }\n\n json[serializedKey] = snapshot.hasMany(attr, { ids: true });\n } else if (this.hasSerializeRecordsOption(attr)) {\n this._serializeEmbeddedHasMany(snapshot, json, relationship);\n } else {\n if (this.hasSerializeIdsAndTypesOption(attr)) {\n this._serializeHasManyAsIdsAndTypes(snapshot, json, relationship);\n }\n }\n },\n\n\n /*\n Serializes a hasMany relationship as an array of objects containing only `id` and `type`\n keys.\n This has its use case on polymorphic hasMany relationships where the server is not storing\n all records in the same table using STI, and therefore the `id` is not enough information\n TODO: Make the default in Ember-data 3.0??\n */\n _serializeHasManyAsIdsAndTypes: function (snapshot, json, relationship) {\n var serializedKey = this.keyForAttribute(relationship.key, 'serialize');\n var hasMany = snapshot.hasMany(relationship.key);\n\n json[serializedKey] = A(hasMany).map(function (recordSnapshot) {\n //\n // I'm sure I'm being utterly naive here. Propably id is a configurate property and\n // type too, and the modelName has to be normalized somehow.\n //\n return { id: recordSnapshot.id, type: recordSnapshot.modelName };\n });\n },\n _serializeEmbeddedHasMany: function (snapshot, json, relationship) {\n var serializedKey = this._getMappedKey(relationship.key, snapshot.type);\n if (serializedKey === relationship.key && this.keyForRelationship) {\n serializedKey = this.keyForRelationship(relationship.key, relationship.kind, \"serialize\");\n }\n\n (false && Ember.warn('The embedded relationship \\'' + serializedKey + '\\' is undefined for \\'' + snapshot.modelName + '\\' with id \\'' + snapshot.id + '\\'. Please include it in your original payload.', typeOf(snapshot.hasMany(relationship.key)) !== 'undefined', { id: 'ds.serializer.embedded-relationship-undefined' }));\n\n\n json[serializedKey] = this._generateSerializedHasMany(snapshot, relationship);\n },\n\n\n /*\n Returns an array of embedded records serialized to JSON\n */\n _generateSerializedHasMany: function (snapshot, relationship) {\n var hasMany = snapshot.hasMany(relationship.key);\n var manyArray = A(hasMany);\n var ret = new Array(manyArray.length);\n\n for (var i = 0; i < manyArray.length; i++) {\n var embeddedSnapshot = manyArray[i];\n var embeddedJson = embeddedSnapshot.serialize({ includeId: true });\n this.removeEmbeddedForeignKey(snapshot, embeddedSnapshot, relationship, embeddedJson);\n ret[i] = embeddedJson;\n }\n\n return ret;\n },\n\n\n /**\n When serializing an embedded record, modify the property (in the json payload)\n that refers to the parent record (foreign key for relationship).\n Serializing a `belongsTo` relationship removes the property that refers to the\n parent record\n Serializing a `hasMany` relationship does not remove the property that refers to\n the parent record.\n @method removeEmbeddedForeignKey\n @param {DS.Snapshot} snapshot\n @param {DS.Snapshot} embeddedSnapshot\n @param {Object} relationship\n @param {Object} json\n */\n removeEmbeddedForeignKey: function (snapshot, embeddedSnapshot, relationship, json) {\n if (relationship.kind === 'belongsTo') {\n var parentRecord = snapshot.type.inverseFor(relationship.key, this.store);\n if (parentRecord) {\n var name = parentRecord.name;\n var embeddedSerializer = this.store.serializerFor(embeddedSnapshot.modelName);\n var parentKey = embeddedSerializer.keyForRelationship(name, parentRecord.kind, 'deserialize');\n if (parentKey) {\n delete json[parentKey];\n }\n }\n } /*else if (relationship.kind === 'hasMany') {\n return;\n }*/\n },\n\n\n // checks config for attrs option to embedded (always) - serialize and deserialize\n hasEmbeddedAlwaysOption: function (attr) {\n var option = this.attrsOption(attr);\n return option && option.embedded === 'always';\n },\n\n\n // checks config for attrs option to serialize ids\n hasSerializeRecordsOption: function (attr) {\n var alwaysEmbed = this.hasEmbeddedAlwaysOption(attr);\n var option = this.attrsOption(attr);\n return alwaysEmbed || option && option.serialize === 'records';\n },\n\n\n // checks config for attrs option to serialize records\n hasSerializeIdsOption: function (attr) {\n var option = this.attrsOption(attr);\n return option && (option.serialize === 'ids' || option.serialize === 'id');\n },\n\n\n // checks config for attrs option to serialize records as objects containing id and types\n hasSerializeIdsAndTypesOption: function (attr) {\n var option = this.attrsOption(attr);\n return option && (option.serialize === 'ids-and-types' || option.serialize === 'id-and-type');\n },\n\n\n // checks config for attrs option to serialize records\n noSerializeOptionSpecified: function (attr) {\n var option = this.attrsOption(attr);\n return !(option && (option.serialize || option.embedded));\n },\n\n\n // checks config for attrs option to deserialize records\n // a defined option object for a resource is treated the same as\n // `deserialize: 'records'`\n hasDeserializeRecordsOption: function (attr) {\n var alwaysEmbed = this.hasEmbeddedAlwaysOption(attr);\n var option = this.attrsOption(attr);\n return alwaysEmbed || option && option.deserialize === 'records';\n },\n attrsOption: function (attr) {\n var attrs = this.get('attrs');\n return attrs && (attrs[camelize(attr)] || attrs[attr]);\n },\n\n\n /**\n @method _extractEmbeddedRecords\n @private\n */\n _extractEmbeddedRecords: function (serializer, store, typeClass, partial) {\n var _this = this;\n\n typeClass.eachRelationship(function (key, relationship) {\n if (serializer.hasDeserializeRecordsOption(key)) {\n if (relationship.kind === \"hasMany\") {\n _this._extractEmbeddedHasMany(store, key, partial, relationship);\n }\n if (relationship.kind === \"belongsTo\") {\n _this._extractEmbeddedBelongsTo(store, key, partial, relationship);\n }\n }\n });\n return partial;\n },\n\n\n /**\n @method _extractEmbeddedHasMany\n @private\n */\n _extractEmbeddedHasMany: function (store, key, hash, relationshipMeta) {\n var relationshipHash = get(hash, 'data.relationships.' + key + '.data');\n\n if (!relationshipHash) {\n return;\n }\n\n var hasMany = new Array(relationshipHash.length);\n\n for (var i = 0; i < relationshipHash.length; i++) {\n var item = relationshipHash[i];\n\n var _normalizeEmbeddedRel = this._normalizeEmbeddedRelationship(store, relationshipMeta, item),\n data = _normalizeEmbeddedRel.data,\n included = _normalizeEmbeddedRel.included;\n\n hash.included = hash.included || [];\n hash.included.push(data);\n if (included) {\n var _hash$included;\n\n (_hash$included = hash.included).push.apply(_hash$included, _toConsumableArray(included));\n }\n\n hasMany[i] = { id: data.id, type: data.type };\n }\n\n var relationship = { data: hasMany };\n set(hash, 'data.relationships.' + key, relationship);\n },\n\n\n /**\n @method _extractEmbeddedBelongsTo\n @private\n */\n _extractEmbeddedBelongsTo: function (store, key, hash, relationshipMeta) {\n var relationshipHash = get(hash, 'data.relationships.' + key + '.data');\n if (!relationshipHash) {\n return;\n }\n\n var _normalizeEmbeddedRel2 = this._normalizeEmbeddedRelationship(store, relationshipMeta, relationshipHash),\n data = _normalizeEmbeddedRel2.data,\n included = _normalizeEmbeddedRel2.included;\n\n hash.included = hash.included || [];\n hash.included.push(data);\n if (included) {\n var _hash$included2;\n\n (_hash$included2 = hash.included).push.apply(_hash$included2, _toConsumableArray(included));\n }\n\n var belongsTo = { id: data.id, type: data.type };\n var relationship = { data: belongsTo };\n\n set(hash, 'data.relationships.' + key, relationship);\n },\n\n\n /**\n @method _normalizeEmbeddedRelationship\n @private\n */\n _normalizeEmbeddedRelationship: function (store, relationshipMeta, relationshipHash) {\n var modelName = relationshipMeta.type;\n if (relationshipMeta.options.polymorphic) {\n modelName = relationshipHash.type;\n }\n var modelClass = store.modelFor(modelName);\n var serializer = store.serializerFor(modelName);\n\n return serializer.normalize(modelClass, relationshipHash, null);\n },\n\n isEmbeddedRecordsMixin: true\n });\n});","define('ember-data/serializers/json-api', ['exports', 'ember-inflector', 'ember-data/serializers/json', 'ember-data/-private'], function (exports, _emberInflector, _json, _private) {\n 'use strict';\n\n exports.__esModule = true;\n var typeOf = Ember.typeOf;\n var isNone = Ember.isNone;\n var dasherize = Ember.String.dasherize;\n\n\n /**\n Ember Data 2.0 Serializer:\n \n In Ember Data a Serializer is used to serialize and deserialize\n records when they are transferred in and out of an external source.\n This process involves normalizing property names, transforming\n attribute values and serializing relationships.\n \n `JSONAPISerializer` supports the http://jsonapi.org/ spec and is the\n serializer recommended by Ember Data.\n \n This serializer normalizes a JSON API payload that looks like:\n \n ```app/models/player.js\n import DS from 'ember-data';\n \n export default DS.Model.extend({\n name: DS.attr('string'),\n skill: DS.attr('string'),\n gamesPlayed: DS.attr('number'),\n club: DS.belongsTo('club')\n });\n ```\n \n ```app/models/club.js\n import DS from 'ember-data';\n \n export default DS.Model.extend({\n name: DS.attr('string'),\n location: DS.attr('string'),\n players: DS.hasMany('player')\n });\n ```\n \n ```js\n {\n \"data\": [\n {\n \"attributes\": {\n \"name\": \"Benfica\",\n \"location\": \"Portugal\"\n },\n \"id\": \"1\",\n \"relationships\": {\n \"players\": {\n \"data\": [\n {\n \"id\": \"3\",\n \"type\": \"players\"\n }\n ]\n }\n },\n \"type\": \"clubs\"\n }\n ],\n \"included\": [\n {\n \"attributes\": {\n \"name\": \"Eusebio Silva Ferreira\",\n \"skill\": \"Rocket shot\",\n \"games-played\": 431\n },\n \"id\": \"3\",\n \"relationships\": {\n \"club\": {\n \"data\": {\n \"id\": \"1\",\n \"type\": \"clubs\"\n }\n }\n },\n \"type\": \"players\"\n }\n ]\n }\n ```\n \n to the format that the Ember Data store expects.\n \n ### Customizing meta\n \n Since a JSON API Document can have meta defined in multiple locations you can\n use the specific serializer hooks if you need to customize the meta.\n \n One scenario would be to camelCase the meta keys of your payload. The example\n below shows how this could be done using `normalizeArrayResponse` and\n `extractRelationship`.\n \n ```app/serializers/application.js\n export default JSONAPISerializer.extend({\n normalizeArrayResponse(store, primaryModelClass, payload, id, requestType) {\n let normalizedDocument = this._super(...arguments);\n \n // Customize document meta\n normalizedDocument.meta = camelCaseKeys(normalizedDocument.meta);\n \n return normalizedDocument;\n },\n \n extractRelationship(relationshipHash) {\n let normalizedRelationship = this._super(...arguments);\n \n // Customize relationship meta\n normalizedRelationship.meta = camelCaseKeys(normalizedRelationship.meta);\n \n return normalizedRelationship;\n }\n });\n ```\n \n @since 1.13.0\n @class JSONAPISerializer\n @namespace DS\n @extends DS.JSONSerializer\n */\n var JSONAPISerializer = _json.default.extend({\n _normalizeDocumentHelper: function (documentHash) {\n\n if (typeOf(documentHash.data) === 'object') {\n documentHash.data = this._normalizeResourceHelper(documentHash.data);\n } else if (Array.isArray(documentHash.data)) {\n var ret = new Array(documentHash.data.length);\n\n for (var i = 0; i < documentHash.data.length; i++) {\n var data = documentHash.data[i];\n ret[i] = this._normalizeResourceHelper(data);\n }\n\n documentHash.data = ret;\n }\n\n if (Array.isArray(documentHash.included)) {\n var _ret = new Array();\n for (var _i = 0; _i < documentHash.included.length; _i++) {\n var included = documentHash.included[_i];\n var normalized = this._normalizeResourceHelper(included);\n if (normalized !== null) {\n // can be null when unknown type is encountered\n _ret.push(normalized);\n }\n }\n\n documentHash.included = _ret;\n }\n\n return documentHash;\n },\n _normalizeRelationshipDataHelper: function (relationshipDataHash) {\n if ((0, _private.isEnabled)(\"ds-payload-type-hooks\")) {\n var modelName = this.modelNameFromPayloadType(relationshipDataHash.type);\n var deprecatedModelNameLookup = this.modelNameFromPayloadKey(relationshipDataHash.type);\n\n if (modelName !== deprecatedModelNameLookup && this._hasCustomModelNameFromPayloadKey()) {\n (false && !(false) && Ember.deprecate(\"You are using modelNameFromPayloadKey to normalize the type for a relationship. This has been deprecated in favor of modelNameFromPayloadType\", false, {\n id: 'ds.json-api-serializer.deprecated-model-name-for-relationship',\n until: '4.0.0'\n }));\n\n\n modelName = deprecatedModelNameLookup;\n }\n\n relationshipDataHash.type = modelName;\n } else {\n relationshipDataHash.type = this.modelNameFromPayloadKey(relationshipDataHash.type);\n }\n\n return relationshipDataHash;\n },\n _normalizeResourceHelper: function (resourceHash) {\n (false && Ember.assert(this.warnMessageForUndefinedType(), !isNone(resourceHash.type), {\n id: 'ds.serializer.type-is-undefined'\n }));\n\n\n var modelName = void 0,\n usedLookup = void 0;\n\n if ((0, _private.isEnabled)(\"ds-payload-type-hooks\")) {\n modelName = this.modelNameFromPayloadType(resourceHash.type);\n var deprecatedModelNameLookup = this.modelNameFromPayloadKey(resourceHash.type);\n\n usedLookup = 'modelNameFromPayloadType';\n\n if (modelName !== deprecatedModelNameLookup && this._hasCustomModelNameFromPayloadKey()) {\n (false && !(false) && Ember.deprecate(\"You are using modelNameFromPayloadKey to normalize the type for a resource. This has been deprecated in favor of modelNameFromPayloadType\", false, {\n id: 'ds.json-api-serializer.deprecated-model-name-for-resource',\n until: '4.0.0'\n }));\n\n\n modelName = deprecatedModelNameLookup;\n usedLookup = 'modelNameFromPayloadKey';\n }\n } else {\n modelName = this.modelNameFromPayloadKey(resourceHash.type);\n usedLookup = 'modelNameFromPayloadKey';\n }\n\n if (!this.store._hasModelFor(modelName)) {\n (false && Ember.warn(this.warnMessageNoModelForType(modelName, resourceHash.type, usedLookup), false, {\n id: 'ds.serializer.model-for-type-missing'\n }));\n\n return null;\n }\n\n var modelClass = this.store._modelFor(modelName);\n var serializer = this.store.serializerFor(modelName);\n\n var _serializer$normalize = serializer.normalize(modelClass, resourceHash),\n data = _serializer$normalize.data;\n\n return data;\n },\n pushPayload: function (store, payload) {\n var normalizedPayload = this._normalizeDocumentHelper(payload);\n if ((0, _private.isEnabled)('ds-pushpayload-return')) {\n return store.push(normalizedPayload);\n } else {\n store.push(normalizedPayload);\n }\n },\n _normalizeResponse: function (store, primaryModelClass, payload, id, requestType, isSingle) {\n var normalizedPayload = this._normalizeDocumentHelper(payload);\n return normalizedPayload;\n },\n normalizeQueryRecordResponse: function () {\n var normalized = this._super.apply(this, arguments);\n\n (false && Ember.assert('Expected the primary data returned by the serializer for a `queryRecord` response to be a single object but instead it was an array.', !Array.isArray(normalized.data), {\n id: 'ds.serializer.json-api.queryRecord-array-response'\n }));\n\n\n return normalized;\n },\n extractAttributes: function (modelClass, resourceHash) {\n var _this = this;\n\n var attributes = {};\n\n if (resourceHash.attributes) {\n modelClass.eachAttribute(function (key) {\n var attributeKey = _this.keyForAttribute(key, 'deserialize');\n if (resourceHash.attributes[attributeKey] !== undefined) {\n attributes[key] = resourceHash.attributes[attributeKey];\n }\n if (false) {\n if (resourceHash.attributes[attributeKey] === undefined && resourceHash.attributes[key] !== undefined) {\n (false && Ember.assert('Your payload for \\'' + modelClass.modelName + '\\' contains \\'' + key + '\\', but your serializer is setup to look for \\'' + attributeKey + '\\'. This is most likely because Ember Data\\'s JSON API serializer dasherizes attribute keys by default. You should subclass JSONAPISerializer and implement \\'keyForAttribute(key) { return key; }\\' to prevent Ember Data from customizing your attribute keys.', false));\n }\n }\n });\n }\n\n return attributes;\n },\n extractRelationship: function (relationshipHash) {\n\n if (typeOf(relationshipHash.data) === 'object') {\n relationshipHash.data = this._normalizeRelationshipDataHelper(relationshipHash.data);\n }\n\n if (Array.isArray(relationshipHash.data)) {\n var ret = new Array(relationshipHash.data.length);\n\n for (var i = 0; i < relationshipHash.data.length; i++) {\n var data = relationshipHash.data[i];\n ret[i] = this._normalizeRelationshipDataHelper(data);\n }\n\n relationshipHash.data = ret;\n }\n\n return relationshipHash;\n },\n extractRelationships: function (modelClass, resourceHash) {\n var _this2 = this;\n\n var relationships = {};\n\n if (resourceHash.relationships) {\n modelClass.eachRelationship(function (key, relationshipMeta) {\n var relationshipKey = _this2.keyForRelationship(key, relationshipMeta.kind, 'deserialize');\n if (resourceHash.relationships[relationshipKey] !== undefined) {\n\n var relationshipHash = resourceHash.relationships[relationshipKey];\n relationships[key] = _this2.extractRelationship(relationshipHash);\n }\n if (false) {\n if (resourceHash.relationships[relationshipKey] === undefined && resourceHash.relationships[key] !== undefined) {\n (false && Ember.assert('Your payload for \\'' + modelClass.modelName + '\\' contains \\'' + key + '\\', but your serializer is setup to look for \\'' + relationshipKey + '\\'. This is most likely because Ember Data\\'s JSON API serializer dasherizes relationship keys by default. You should subclass JSONAPISerializer and implement \\'keyForRelationship(key) { return key; }\\' to prevent Ember Data from customizing your relationship keys.', false));\n }\n }\n });\n }\n\n return relationships;\n },\n _extractType: function (modelClass, resourceHash) {\n if ((0, _private.isEnabled)(\"ds-payload-type-hooks\")) {\n var modelName = this.modelNameFromPayloadType(resourceHash.type);\n var deprecatedModelNameLookup = this.modelNameFromPayloadKey(resourceHash.type);\n\n if (modelName !== deprecatedModelNameLookup && this._hasCustomModelNameFromPayloadKey()) {\n (false && !(false) && Ember.deprecate(\"You are using modelNameFromPayloadKey to normalize the type for a polymorphic relationship. This has been deprecated in favor of modelNameFromPayloadType\", false, {\n id: 'ds.json-api-serializer.deprecated-model-name-for-polymorphic-type',\n until: '3.0.0'\n }));\n\n\n modelName = deprecatedModelNameLookup;\n }\n\n return modelName;\n } else {\n return this.modelNameFromPayloadKey(resourceHash.type);\n }\n },\n modelNameFromPayloadKey: function (key) {\n return (0, _emberInflector.singularize)((0, _private.normalizeModelName)(key));\n },\n payloadKeyFromModelName: function (modelName) {\n return (0, _emberInflector.pluralize)(modelName);\n },\n normalize: function (modelClass, resourceHash) {\n if (resourceHash.attributes) {\n this.normalizeUsingDeclaredMapping(modelClass, resourceHash.attributes);\n }\n\n if (resourceHash.relationships) {\n this.normalizeUsingDeclaredMapping(modelClass, resourceHash.relationships);\n }\n\n var data = {\n id: this.extractId(modelClass, resourceHash),\n type: this._extractType(modelClass, resourceHash),\n attributes: this.extractAttributes(modelClass, resourceHash),\n relationships: this.extractRelationships(modelClass, resourceHash)\n };\n\n this.applyTransforms(modelClass, data.attributes);\n\n return { data: data };\n },\n keyForAttribute: function (key, method) {\n return dasherize(key);\n },\n keyForRelationship: function (key, typeClass, method) {\n return dasherize(key);\n },\n serialize: function (snapshot, options) {\n var data = this._super.apply(this, arguments);\n\n var payloadType = void 0;\n if ((0, _private.isEnabled)(\"ds-payload-type-hooks\")) {\n payloadType = this.payloadTypeFromModelName(snapshot.modelName);\n var deprecatedPayloadTypeLookup = this.payloadKeyFromModelName(snapshot.modelName);\n\n if (payloadType !== deprecatedPayloadTypeLookup && this._hasCustomPayloadKeyFromModelName()) {\n (false && !(false) && Ember.deprecate(\"You used payloadKeyFromModelName to customize how a type is serialized. Use payloadTypeFromModelName instead.\", false, {\n id: 'ds.json-api-serializer.deprecated-payload-type-for-model',\n until: '4.0.0'\n }));\n\n\n payloadType = deprecatedPayloadTypeLookup;\n }\n } else {\n payloadType = this.payloadKeyFromModelName(snapshot.modelName);\n }\n\n data.type = payloadType;\n return { data: data };\n },\n serializeAttribute: function (snapshot, json, key, attribute) {\n var type = attribute.type;\n\n if (this._canSerialize(key)) {\n json.attributes = json.attributes || {};\n\n var value = snapshot.attr(key);\n if (type) {\n var transform = this.transformFor(type);\n value = transform.serialize(value, attribute.options);\n }\n\n var payloadKey = this._getMappedKey(key, snapshot.type);\n\n if (payloadKey === key) {\n payloadKey = this.keyForAttribute(key, 'serialize');\n }\n\n json.attributes[payloadKey] = value;\n }\n },\n serializeBelongsTo: function (snapshot, json, relationship) {\n var key = relationship.key;\n\n if (this._canSerialize(key)) {\n var belongsTo = snapshot.belongsTo(key);\n if (belongsTo !== undefined) {\n\n json.relationships = json.relationships || {};\n\n var payloadKey = this._getMappedKey(key, snapshot.type);\n if (payloadKey === key) {\n payloadKey = this.keyForRelationship(key, 'belongsTo', 'serialize');\n }\n\n var data = null;\n if (belongsTo) {\n var payloadType = void 0;\n\n if ((0, _private.isEnabled)(\"ds-payload-type-hooks\")) {\n payloadType = this.payloadTypeFromModelName(belongsTo.modelName);\n var deprecatedPayloadTypeLookup = this.payloadKeyFromModelName(belongsTo.modelName);\n\n if (payloadType !== deprecatedPayloadTypeLookup && this._hasCustomPayloadKeyFromModelName()) {\n (false && !(false) && Ember.deprecate(\"You used payloadKeyFromModelName to serialize type for belongs-to relationship. Use payloadTypeFromModelName instead.\", false, {\n id: 'ds.json-api-serializer.deprecated-payload-type-for-belongs-to',\n until: '4.0.0'\n }));\n\n\n payloadType = deprecatedPayloadTypeLookup;\n }\n } else {\n payloadType = this.payloadKeyFromModelName(belongsTo.modelName);\n }\n\n data = {\n type: payloadType,\n id: belongsTo.id\n };\n }\n\n json.relationships[payloadKey] = { data: data };\n }\n }\n },\n serializeHasMany: function (snapshot, json, relationship) {\n var key = relationship.key;\n\n if (this.shouldSerializeHasMany(snapshot, key, relationship)) {\n var hasMany = snapshot.hasMany(key);\n if (hasMany !== undefined) {\n\n json.relationships = json.relationships || {};\n\n var payloadKey = this._getMappedKey(key, snapshot.type);\n if (payloadKey === key && this.keyForRelationship) {\n payloadKey = this.keyForRelationship(key, 'hasMany', 'serialize');\n }\n\n var data = new Array(hasMany.length);\n\n for (var i = 0; i < hasMany.length; i++) {\n var item = hasMany[i];\n\n var payloadType = void 0;\n\n if ((0, _private.isEnabled)(\"ds-payload-type-hooks\")) {\n payloadType = this.payloadTypeFromModelName(item.modelName);\n var deprecatedPayloadTypeLookup = this.payloadKeyFromModelName(item.modelName);\n\n if (payloadType !== deprecatedPayloadTypeLookup && this._hasCustomPayloadKeyFromModelName()) {\n (false && !(false) && Ember.deprecate(\"You used payloadKeyFromModelName to serialize type for belongs-to relationship. Use payloadTypeFromModelName instead.\", false, {\n id: 'ds.json-api-serializer.deprecated-payload-type-for-has-many',\n until: '4.0.0'\n }));\n\n\n payloadType = deprecatedPayloadTypeLookup;\n }\n } else {\n payloadType = this.payloadKeyFromModelName(item.modelName);\n }\n\n data[i] = {\n type: payloadType,\n id: item.id\n };\n }\n\n json.relationships[payloadKey] = { data: data };\n }\n }\n }\n });\n\n if ((0, _private.isEnabled)(\"ds-payload-type-hooks\")) {\n\n JSONAPISerializer.reopen({\n modelNameFromPayloadType: function (type) {\n return (0, _emberInflector.singularize)((0, _private.normalizeModelName)(type));\n },\n payloadTypeFromModelName: function (modelName) {\n return (0, _emberInflector.pluralize)(modelName);\n },\n _hasCustomModelNameFromPayloadKey: function () {\n return this.modelNameFromPayloadKey !== JSONAPISerializer.prototype.modelNameFromPayloadKey;\n },\n _hasCustomPayloadKeyFromModelName: function () {\n return this.payloadKeyFromModelName !== JSONAPISerializer.prototype.payloadKeyFromModelName;\n }\n });\n }\n\n if (false) {\n JSONAPISerializer.reopen({\n willMergeMixin: function (props) {\n var constructor = this.constructor;\n (false && Ember.warn('You\\'ve defined \\'extractMeta\\' in ' + constructor.toString() + ' which is not used for serializers extending JSONAPISerializer. Read more at https://emberjs.com/api/data/classes/DS.JSONAPISerializer.html#toc_customizing-meta on how to customize meta when using JSON API.', isNone(props.extractMeta) || props.extractMeta === _json.default.prototype.extractMeta, {\n id: 'ds.serializer.json-api.extractMeta'\n }));\n (false && Ember.warn('The JSONAPISerializer does not work with the EmbeddedRecordsMixin because the JSON API spec does not describe how to format embedded resources.', !props.isEmbeddedRecordsMixin, {\n id: 'ds.serializer.embedded-records-mixin-not-supported'\n }));\n },\n warnMessageForUndefinedType: function () {\n return 'Encountered a resource object with an undefined type (resolved resource using ' + this.constructor.toString() + ')';\n },\n warnMessageNoModelForType: function (modelName, originalType, usedLookup) {\n return 'Encountered a resource object with type \"' + originalType + '\", but no model was found for model name \"' + modelName + '\" (resolved model name using \\'' + this.constructor.toString() + '.' + usedLookup + '(\"' + originalType + '\")\\').';\n }\n });\n }\n\n exports.default = JSONAPISerializer;\n});","define('ember-data/serializers/json', ['exports', 'ember-data/serializer', 'ember-data/-private'], function (exports, _serializer, _private) {\n 'use strict';\n\n exports.__esModule = true;\n\n function _toConsumableArray(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n } else {\n return Array.from(arr);\n }\n }\n\n var assign = Ember.assign;\n var merge = Ember.merge;\n var isNone = Ember.isNone;\n var typeOf = Ember.typeOf;\n var get = Ember.get;\n\n\n var emberAssign = assign || merge;\n\n /**\n Ember Data 2.0 Serializer:\n \n In Ember Data a Serializer is used to serialize and deserialize\n records when they are transferred in and out of an external source.\n This process involves normalizing property names, transforming\n attribute values and serializing relationships.\n \n By default, Ember Data uses and recommends the `JSONAPISerializer`.\n \n `JSONSerializer` is useful for simpler or legacy backends that may\n not support the http://jsonapi.org/ spec.\n \n For example, given the following `User` model and JSON payload:\n \n ```app/models/user.js\n import DS from 'ember-data';\n \n export default DS.Model.extend({\n friends: DS.hasMany('user'),\n house: DS.belongsTo('location'),\n \n name: DS.attr('string')\n });\n ```\n \n ```js\n {\n id: 1,\n name: 'Sebastian',\n friends: [3, 4],\n links: {\n house: '/houses/lefkada'\n }\n }\n ```\n \n `JSONSerializer` will normalize the JSON payload to the JSON API format that the\n Ember Data store expects.\n \n You can customize how JSONSerializer processes its payload by passing options in\n the `attrs` hash or by subclassing the `JSONSerializer` and overriding hooks:\n \n - To customize how a single record is normalized, use the `normalize` hook.\n - To customize how `JSONSerializer` normalizes the whole server response, use the\n `normalizeResponse` hook.\n - To customize how `JSONSerializer` normalizes a specific response from the server,\n use one of the many specific `normalizeResponse` hooks.\n - To customize how `JSONSerializer` normalizes your id, attributes or relationships,\n use the `extractId`, `extractAttributes` and `extractRelationships` hooks.\n \n The `JSONSerializer` normalization process follows these steps:\n \n - `normalizeResponse` - entry method to the serializer.\n - `normalizeCreateRecordResponse` - a `normalizeResponse` for a specific operation is called.\n - `normalizeSingleResponse`|`normalizeArrayResponse` - for methods like `createRecord` we expect\n a single record back, while for methods like `findAll` we expect multiple records back.\n - `normalize` - `normalizeArray` iterates and calls `normalize` for each of its records while `normalizeSingle`\n calls it once. This is the method you most likely want to subclass.\n - `extractId` | `extractAttributes` | `extractRelationships` - `normalize` delegates to these methods to\n turn the record payload into the JSON API format.\n \n @class JSONSerializer\n @namespace DS\n @extends DS.Serializer\n */\n var JSONSerializer = _serializer.default.extend({\n\n /**\n The `primaryKey` is used when serializing and deserializing\n data. Ember Data always uses the `id` property to store the id of\n the record. The external source may not always follow this\n convention. In these cases it is useful to override the\n `primaryKey` property to match the `primaryKey` of your external\n store.\n Example\n ```app/serializers/application.js\n import DS from 'ember-data';\n export default DS.JSONSerializer.extend({\n primaryKey: '_id'\n });\n ```\n @property primaryKey\n @type {String}\n @default 'id'\n */\n primaryKey: 'id',\n\n /**\n The `attrs` object can be used to declare a simple mapping between\n property names on `DS.Model` records and payload keys in the\n serialized JSON object representing the record. An object with the\n property `key` can also be used to designate the attribute's key on\n the response payload.\n Example\n ```app/models/person.js\n import DS from 'ember-data';\n export default DS.Model.extend({\n firstName: DS.attr('string'),\n lastName: DS.attr('string'),\n occupation: DS.attr('string'),\n admin: DS.attr('boolean')\n });\n ```\n ```app/serializers/person.js\n import DS from 'ember-data';\n export default DS.JSONSerializer.extend({\n attrs: {\n admin: 'is_admin',\n occupation: { key: 'career' }\n }\n });\n ```\n You can also remove attributes by setting the `serialize` key to\n `false` in your mapping object.\n Example\n ```app/serializers/person.js\n import DS from 'ember-data';\n export default DS.JSONSerializer.extend({\n attrs: {\n admin: { serialize: false },\n occupation: { key: 'career' }\n }\n });\n ```\n When serialized:\n ```javascript\n {\n \"firstName\": \"Harry\",\n \"lastName\": \"Houdini\",\n \"career\": \"magician\"\n }\n ```\n Note that the `admin` is now not included in the payload.\n @property attrs\n @type {Object}\n */\n mergedProperties: ['attrs'],\n\n applyTransforms: function (typeClass, data) {\n var _this = this;\n\n var attributes = get(typeClass, 'attributes');\n\n typeClass.eachTransformedAttribute(function (key, typeClass) {\n if (data[key] === undefined) {\n return;\n }\n\n var transform = _this.transformFor(typeClass);\n var transformMeta = attributes.get(key);\n data[key] = transform.deserialize(data[key], transformMeta.options);\n });\n\n return data;\n },\n normalizeResponse: function (store, primaryModelClass, payload, id, requestType) {\n switch (requestType) {\n case 'findRecord':\n return this.normalizeFindRecordResponse.apply(this, arguments);\n case 'queryRecord':\n return this.normalizeQueryRecordResponse.apply(this, arguments);\n case 'findAll':\n return this.normalizeFindAllResponse.apply(this, arguments);\n case 'findBelongsTo':\n return this.normalizeFindBelongsToResponse.apply(this, arguments);\n case 'findHasMany':\n return this.normalizeFindHasManyResponse.apply(this, arguments);\n case 'findMany':\n return this.normalizeFindManyResponse.apply(this, arguments);\n case 'query':\n return this.normalizeQueryResponse.apply(this, arguments);\n case 'createRecord':\n return this.normalizeCreateRecordResponse.apply(this, arguments);\n case 'deleteRecord':\n return this.normalizeDeleteRecordResponse.apply(this, arguments);\n case 'updateRecord':\n return this.normalizeUpdateRecordResponse.apply(this, arguments);\n }\n },\n normalizeFindRecordResponse: function (store, primaryModelClass, payload, id, requestType) {\n return this.normalizeSingleResponse.apply(this, arguments);\n },\n normalizeQueryRecordResponse: function (store, primaryModelClass, payload, id, requestType) {\n return this.normalizeSingleResponse.apply(this, arguments);\n },\n normalizeFindAllResponse: function (store, primaryModelClass, payload, id, requestType) {\n return this.normalizeArrayResponse.apply(this, arguments);\n },\n normalizeFindBelongsToResponse: function (store, primaryModelClass, payload, id, requestType) {\n return this.normalizeSingleResponse.apply(this, arguments);\n },\n normalizeFindHasManyResponse: function (store, primaryModelClass, payload, id, requestType) {\n return this.normalizeArrayResponse.apply(this, arguments);\n },\n normalizeFindManyResponse: function (store, primaryModelClass, payload, id, requestType) {\n return this.normalizeArrayResponse.apply(this, arguments);\n },\n normalizeQueryResponse: function (store, primaryModelClass, payload, id, requestType) {\n return this.normalizeArrayResponse.apply(this, arguments);\n },\n normalizeCreateRecordResponse: function (store, primaryModelClass, payload, id, requestType) {\n return this.normalizeSaveResponse.apply(this, arguments);\n },\n normalizeDeleteRecordResponse: function (store, primaryModelClass, payload, id, requestType) {\n return this.normalizeSaveResponse.apply(this, arguments);\n },\n normalizeUpdateRecordResponse: function (store, primaryModelClass, payload, id, requestType) {\n return this.normalizeSaveResponse.apply(this, arguments);\n },\n normalizeSaveResponse: function (store, primaryModelClass, payload, id, requestType) {\n return this.normalizeSingleResponse.apply(this, arguments);\n },\n normalizeSingleResponse: function (store, primaryModelClass, payload, id, requestType) {\n return this._normalizeResponse(store, primaryModelClass, payload, id, requestType, true);\n },\n normalizeArrayResponse: function (store, primaryModelClass, payload, id, requestType) {\n return this._normalizeResponse(store, primaryModelClass, payload, id, requestType, false);\n },\n _normalizeResponse: function (store, primaryModelClass, payload, id, requestType, isSingle) {\n var documentHash = {\n data: null,\n included: []\n };\n\n var meta = this.extractMeta(store, primaryModelClass, payload);\n if (meta) {\n (false && Ember.assert('The `meta` returned from `extractMeta` has to be an object, not \"' + typeOf(meta) + '\".', typeOf(meta) === 'object'));\n\n documentHash.meta = meta;\n }\n\n if (isSingle) {\n var _normalize = this.normalize(primaryModelClass, payload),\n data = _normalize.data,\n included = _normalize.included;\n\n documentHash.data = data;\n if (included) {\n documentHash.included = included;\n }\n } else {\n var ret = new Array(payload.length);\n for (var i = 0, l = payload.length; i < l; i++) {\n var item = payload[i];\n\n var _normalize2 = this.normalize(primaryModelClass, item),\n _data = _normalize2.data,\n _included = _normalize2.included;\n\n if (_included) {\n var _documentHash$include;\n\n (_documentHash$include = documentHash.included).push.apply(_documentHash$include, _toConsumableArray(_included));\n }\n ret[i] = _data;\n }\n\n documentHash.data = ret;\n }\n\n return documentHash;\n },\n normalize: function (modelClass, resourceHash) {\n var data = null;\n\n if (resourceHash) {\n this.normalizeUsingDeclaredMapping(modelClass, resourceHash);\n if (typeOf(resourceHash.links) === 'object') {\n this.normalizeUsingDeclaredMapping(modelClass, resourceHash.links);\n }\n\n data = {\n id: this.extractId(modelClass, resourceHash),\n type: modelClass.modelName,\n attributes: this.extractAttributes(modelClass, resourceHash),\n relationships: this.extractRelationships(modelClass, resourceHash)\n };\n\n this.applyTransforms(modelClass, data.attributes);\n }\n\n return { data: data };\n },\n extractId: function (modelClass, resourceHash) {\n var primaryKey = get(this, 'primaryKey');\n var id = resourceHash[primaryKey];\n return (0, _private.coerceId)(id);\n },\n extractAttributes: function (modelClass, resourceHash) {\n var _this2 = this;\n\n var attributeKey = void 0;\n var attributes = {};\n\n modelClass.eachAttribute(function (key) {\n attributeKey = _this2.keyForAttribute(key, 'deserialize');\n if (resourceHash[attributeKey] !== undefined) {\n attributes[key] = resourceHash[attributeKey];\n }\n });\n\n return attributes;\n },\n extractRelationship: function (relationshipModelName, relationshipHash) {\n if (isNone(relationshipHash)) {\n return null;\n }\n /*\n When `relationshipHash` is an object it usually means that the relationship\n is polymorphic. It could however also be embedded resources that the\n EmbeddedRecordsMixin has be able to process.\n */\n if (typeOf(relationshipHash) === 'object') {\n if (relationshipHash.id) {\n relationshipHash.id = (0, _private.coerceId)(relationshipHash.id);\n }\n\n var modelClass = this.store.modelFor(relationshipModelName);\n if (relationshipHash.type && !(0, _private.modelHasAttributeOrRelationshipNamedType)(modelClass)) {\n\n if ((0, _private.isEnabled)(\"ds-payload-type-hooks\")) {\n var modelName = this.modelNameFromPayloadType(relationshipHash.type);\n var deprecatedModelNameLookup = this.modelNameFromPayloadKey(relationshipHash.type);\n\n if (modelName !== deprecatedModelNameLookup && this._hasCustomModelNameFromPayloadKey()) {\n (false && !(false) && Ember.deprecate(\"You used modelNameFromPayloadKey to customize how a type is normalized. Use modelNameFromPayloadType instead\", false, {\n id: 'ds.json-serializer.deprecated-type-for-polymorphic-relationship',\n until: '3.0.0'\n }));\n\n\n modelName = deprecatedModelNameLookup;\n }\n\n relationshipHash.type = modelName;\n } else {\n relationshipHash.type = this.modelNameFromPayloadKey(relationshipHash.type);\n }\n }\n return relationshipHash;\n }\n return { id: (0, _private.coerceId)(relationshipHash), type: relationshipModelName };\n },\n extractPolymorphicRelationship: function (relationshipModelName, relationshipHash, relationshipOptions) {\n return this.extractRelationship(relationshipModelName, relationshipHash);\n },\n extractRelationships: function (modelClass, resourceHash) {\n var _this3 = this;\n\n var relationships = {};\n\n modelClass.eachRelationship(function (key, relationshipMeta) {\n var relationship = null;\n var relationshipKey = _this3.keyForRelationship(key, relationshipMeta.kind, 'deserialize');\n if (resourceHash[relationshipKey] !== undefined) {\n var data = null;\n var relationshipHash = resourceHash[relationshipKey];\n if (relationshipMeta.kind === 'belongsTo') {\n if (relationshipMeta.options.polymorphic) {\n // extracting a polymorphic belongsTo may need more information\n // than the type and the hash (which might only be an id) for the\n // relationship, hence we pass the key, resource and\n // relationshipMeta too\n data = _this3.extractPolymorphicRelationship(relationshipMeta.type, relationshipHash, { key: key, resourceHash: resourceHash, relationshipMeta: relationshipMeta });\n } else {\n data = _this3.extractRelationship(relationshipMeta.type, relationshipHash);\n }\n } else if (relationshipMeta.kind === 'hasMany') {\n if (!isNone(relationshipHash)) {\n data = new Array(relationshipHash.length);\n for (var i = 0, l = relationshipHash.length; i < l; i++) {\n var item = relationshipHash[i];\n data[i] = _this3.extractRelationship(relationshipMeta.type, item);\n }\n }\n }\n relationship = { data: data };\n }\n\n var linkKey = _this3.keyForLink(key, relationshipMeta.kind);\n if (resourceHash.links && resourceHash.links[linkKey] !== undefined) {\n var related = resourceHash.links[linkKey];\n relationship = relationship || {};\n relationship.links = { related: related };\n }\n\n if (relationship) {\n relationships[key] = relationship;\n }\n });\n\n return relationships;\n },\n modelNameFromPayloadKey: function (key) {\n return (0, _private.normalizeModelName)(key);\n },\n normalizeRelationships: function (typeClass, hash) {\n var _this4 = this;\n\n var payloadKey = void 0;\n\n if (this.keyForRelationship) {\n typeClass.eachRelationship(function (key, relationship) {\n payloadKey = _this4.keyForRelationship(key, relationship.kind, 'deserialize');\n if (key === payloadKey) {\n return;\n }\n if (hash[payloadKey] === undefined) {\n return;\n }\n\n hash[key] = hash[payloadKey];\n delete hash[payloadKey];\n });\n }\n },\n normalizeUsingDeclaredMapping: function (modelClass, hash) {\n var attrs = get(this, 'attrs');\n var normalizedKey = void 0;\n var payloadKey = void 0;\n\n if (attrs) {\n for (var key in attrs) {\n normalizedKey = payloadKey = this._getMappedKey(key, modelClass);\n\n if (hash[payloadKey] === undefined) {\n continue;\n }\n\n if (get(modelClass, 'attributes').has(key)) {\n normalizedKey = this.keyForAttribute(key);\n }\n\n if (get(modelClass, 'relationshipsByName').has(key)) {\n normalizedKey = this.keyForRelationship(key);\n }\n\n if (payloadKey !== normalizedKey) {\n hash[normalizedKey] = hash[payloadKey];\n delete hash[payloadKey];\n }\n }\n }\n },\n _getMappedKey: function (key, modelClass) {\n (false && Ember.warn('There is no attribute or relationship with the name `' + key + '` on `' + modelClass.modelName + '`. Check your serializers attrs hash.', get(modelClass, 'attributes').has(key) || get(modelClass, 'relationshipsByName').has(key), {\n id: 'ds.serializer.no-mapped-attrs-key'\n }));\n\n\n var attrs = get(this, 'attrs');\n var mappedKey = void 0;\n if (attrs && attrs[key]) {\n mappedKey = attrs[key];\n //We need to account for both the { title: 'post_title' } and\n //{ title: { key: 'post_title' }} forms\n if (mappedKey.key) {\n mappedKey = mappedKey.key;\n }\n if (typeof mappedKey === 'string') {\n key = mappedKey;\n }\n }\n\n return key;\n },\n _canSerialize: function (key) {\n var attrs = get(this, 'attrs');\n\n return !attrs || !attrs[key] || attrs[key].serialize !== false;\n },\n _mustSerialize: function (key) {\n var attrs = get(this, 'attrs');\n\n return attrs && attrs[key] && attrs[key].serialize === true;\n },\n shouldSerializeHasMany: function (snapshot, key, relationship) {\n var relationshipType = snapshot.type.determineRelationshipType(relationship, this.store);\n if (this._mustSerialize(key)) {\n return true;\n }\n return this._canSerialize(key) && (relationshipType === 'manyToNone' || relationshipType === 'manyToMany');\n },\n serialize: function (snapshot, options) {\n var _this5 = this;\n\n var json = {};\n\n if (options && options.includeId) {\n if ((0, _private.isEnabled)('ds-serialize-id')) {\n this.serializeId(snapshot, json, get(this, 'primaryKey'));\n } else {\n var id = snapshot.id;\n if (id) {\n json[get(this, 'primaryKey')] = id;\n }\n }\n }\n\n snapshot.eachAttribute(function (key, attribute) {\n _this5.serializeAttribute(snapshot, json, key, attribute);\n });\n\n snapshot.eachRelationship(function (key, relationship) {\n if (relationship.kind === 'belongsTo') {\n _this5.serializeBelongsTo(snapshot, json, relationship);\n } else if (relationship.kind === 'hasMany') {\n _this5.serializeHasMany(snapshot, json, relationship);\n }\n });\n\n return json;\n },\n serializeIntoHash: function (hash, typeClass, snapshot, options) {\n emberAssign(hash, this.serialize(snapshot, options));\n },\n serializeAttribute: function (snapshot, json, key, attribute) {\n\n if (this._canSerialize(key)) {\n var type = attribute.type;\n var value = snapshot.attr(key);\n if (type) {\n var transform = this.transformFor(type);\n value = transform.serialize(value, attribute.options);\n }\n\n // if provided, use the mapping provided by `attrs` in\n // the serializer\n var payloadKey = this._getMappedKey(key, snapshot.type);\n\n if (payloadKey === key && this.keyForAttribute) {\n payloadKey = this.keyForAttribute(key, 'serialize');\n }\n\n json[payloadKey] = value;\n }\n },\n serializeBelongsTo: function (snapshot, json, relationship) {\n var key = relationship.key;\n\n if (this._canSerialize(key)) {\n var belongsToId = snapshot.belongsTo(key, { id: true });\n\n // if provided, use the mapping provided by `attrs` in\n // the serializer\n var payloadKey = this._getMappedKey(key, snapshot.type);\n if (payloadKey === key && this.keyForRelationship) {\n payloadKey = this.keyForRelationship(key, \"belongsTo\", \"serialize\");\n }\n\n //Need to check whether the id is there for new&async records\n if (isNone(belongsToId)) {\n json[payloadKey] = null;\n } else {\n json[payloadKey] = belongsToId;\n }\n\n if (relationship.options.polymorphic) {\n this.serializePolymorphicType(snapshot, json, relationship);\n }\n }\n },\n serializeHasMany: function (snapshot, json, relationship) {\n var key = relationship.key;\n\n if (this.shouldSerializeHasMany(snapshot, key, relationship)) {\n var hasMany = snapshot.hasMany(key, { ids: true });\n if (hasMany !== undefined) {\n // if provided, use the mapping provided by `attrs` in\n // the serializer\n var payloadKey = this._getMappedKey(key, snapshot.type);\n if (payloadKey === key && this.keyForRelationship) {\n payloadKey = this.keyForRelationship(key, \"hasMany\", \"serialize\");\n }\n\n json[payloadKey] = hasMany;\n // TODO support for polymorphic manyToNone and manyToMany relationships\n }\n }\n },\n serializePolymorphicType: function () {},\n extractMeta: function (store, modelClass, payload) {\n if (payload && payload['meta'] !== undefined) {\n var meta = payload.meta;\n delete payload.meta;\n return meta;\n }\n },\n extractErrors: function (store, typeClass, payload, id) {\n var _this6 = this;\n\n if (payload && typeof payload === 'object' && payload.errors) {\n payload = (0, _private.errorsArrayToHash)(payload.errors);\n\n this.normalizeUsingDeclaredMapping(typeClass, payload);\n\n typeClass.eachAttribute(function (name) {\n var key = _this6.keyForAttribute(name, 'deserialize');\n if (key !== name && payload[key] !== undefined) {\n payload[name] = payload[key];\n delete payload[key];\n }\n });\n\n typeClass.eachRelationship(function (name) {\n var key = _this6.keyForRelationship(name, 'deserialize');\n if (key !== name && payload[key] !== undefined) {\n payload[name] = payload[key];\n delete payload[key];\n }\n });\n }\n\n return payload;\n },\n keyForAttribute: function (key, method) {\n return key;\n },\n keyForRelationship: function (key, typeClass, method) {\n return key;\n },\n keyForLink: function (key, kind) {\n return key;\n },\n transformFor: function (attributeType, skipAssertion) {\n var transform = (0, _private.getOwner)(this).lookup('transform:' + attributeType);\n\n (false && Ember.assert(\"Unable to find transform for '\" + attributeType + \"'\", skipAssertion || !!transform));\n\n\n return transform;\n }\n });\n\n if ((0, _private.isEnabled)(\"ds-payload-type-hooks\")) {\n\n JSONSerializer.reopen({\n modelNameFromPayloadType: function (type) {\n return (0, _private.normalizeModelName)(type);\n },\n _hasCustomModelNameFromPayloadKey: function () {\n return this.modelNameFromPayloadKey !== JSONSerializer.prototype.modelNameFromPayloadKey;\n }\n });\n }\n\n if ((0, _private.isEnabled)(\"ds-serialize-id\")) {\n\n JSONSerializer.reopen({\n serializeId: function (snapshot, json, primaryKey) {\n var id = snapshot.id;\n\n if (id) {\n json[primaryKey] = id;\n }\n }\n });\n }\n\n exports.default = JSONSerializer;\n});","define('ember-data/serializers/rest', ['exports', 'ember-inflector', 'ember-data/serializers/json', 'ember-data/-private'], function (exports, _emberInflector, _json, _private) {\n 'use strict';\n\n exports.__esModule = true;\n\n function _toConsumableArray(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n } else {\n return Array.from(arr);\n }\n }\n\n var typeOf = Ember.typeOf;\n var isNone = Ember.isNone;\n var makeArray = Ember.makeArray;\n var camelize = Ember.String.camelize;\n\n\n /**\n Normally, applications will use the `RESTSerializer` by implementing\n the `normalize` method.\n \n This allows you to do whatever kind of munging you need, and is\n especially useful if your server is inconsistent and you need to\n do munging differently for many different kinds of responses.\n \n See the `normalize` documentation for more information.\n \n ## Across the Board Normalization\n \n There are also a number of hooks that you might find useful to define\n across-the-board rules for your payload. These rules will be useful\n if your server is consistent, or if you're building an adapter for\n an infrastructure service, like Firebase, and want to encode service\n conventions.\n \n For example, if all of your keys are underscored and all-caps, but\n otherwise consistent with the names you use in your models, you\n can implement across-the-board rules for how to convert an attribute\n name in your model to a key in your JSON.\n \n ```app/serializers/application.js\n import DS from 'ember-data';\n import { underscore } from '@ember/string';\n \n export default DS.RESTSerializer.extend({\n keyForAttribute(attr, method) {\n return underscore(attr).toUpperCase();\n }\n });\n ```\n \n You can also implement `keyForRelationship`, which takes the name\n of the relationship as the first parameter, the kind of\n relationship (`hasMany` or `belongsTo`) as the second parameter, and\n the method (`serialize` or `deserialize`) as the third parameter.\n \n @class RESTSerializer\n @namespace DS\n @extends DS.JSONSerializer\n */\n var RESTSerializer = _json.default.extend({\n keyForPolymorphicType: function (key, typeClass, method) {\n var relationshipKey = this.keyForRelationship(key);\n\n return relationshipKey + 'Type';\n },\n _normalizeArray: function (store, modelName, arrayHash, prop) {\n var _this = this;\n\n var documentHash = {\n data: [],\n included: []\n };\n\n var modelClass = store.modelFor(modelName);\n var serializer = store.serializerFor(modelName);\n\n makeArray(arrayHash).forEach(function (hash) {\n var _normalizePolymorphic = _this._normalizePolymorphicRecord(store, hash, prop, modelClass, serializer),\n data = _normalizePolymorphic.data,\n included = _normalizePolymorphic.included;\n\n documentHash.data.push(data);\n if (included) {\n var _documentHash$include;\n\n (_documentHash$include = documentHash.included).push.apply(_documentHash$include, _toConsumableArray(included));\n }\n });\n\n return documentHash;\n },\n _normalizePolymorphicRecord: function (store, hash, prop, primaryModelClass, primarySerializer) {\n var serializer = primarySerializer;\n var modelClass = primaryModelClass;\n\n var primaryHasTypeAttribute = (0, _private.modelHasAttributeOrRelationshipNamedType)(primaryModelClass);\n\n if (!primaryHasTypeAttribute && hash.type) {\n // Support polymorphic records in async relationships\n var modelName = void 0;\n if ((0, _private.isEnabled)(\"ds-payload-type-hooks\")) {\n modelName = this.modelNameFromPayloadType(hash.type);\n var deprecatedModelNameLookup = this.modelNameFromPayloadKey(hash.type);\n\n if (modelName !== deprecatedModelNameLookup && !this._hasCustomModelNameFromPayloadType() && this._hasCustomModelNameFromPayloadKey()) {\n (false && !(false) && Ember.deprecate(\"You are using modelNameFromPayloadKey to normalize the type for a polymorphic relationship. This is has been deprecated in favor of modelNameFromPayloadType\", false, {\n id: 'ds.rest-serializer.deprecated-model-name-for-polymorphic-type',\n until: '3.0.0'\n }));\n\n\n modelName = deprecatedModelNameLookup;\n }\n } else {\n modelName = this.modelNameFromPayloadKey(hash.type);\n }\n\n if (store._hasModelFor(modelName)) {\n serializer = store.serializerFor(modelName);\n modelClass = store.modelFor(modelName);\n }\n }\n\n return serializer.normalize(modelClass, hash, prop);\n },\n _normalizeResponse: function (store, primaryModelClass, payload, id, requestType, isSingle) {\n var documentHash = {\n data: null,\n included: []\n };\n\n var meta = this.extractMeta(store, primaryModelClass, payload);\n if (meta) {\n (false && Ember.assert('The `meta` returned from `extractMeta` has to be an object, not \"' + typeOf(meta) + '\".', typeOf(meta) === 'object'));\n\n documentHash.meta = meta;\n }\n\n var keys = Object.keys(payload);\n\n for (var i = 0, length = keys.length; i < length; i++) {\n var prop = keys[i];\n var modelName = prop;\n var forcedSecondary = false;\n\n /*\n If you want to provide sideloaded records of the same type that the\n primary data you can do that by prefixing the key with `_`.\n Example\n ```\n {\n users: [\n { id: 1, title: 'Tom', manager: 3 },\n { id: 2, title: 'Yehuda', manager: 3 }\n ],\n _users: [\n { id: 3, title: 'Tomster' }\n ]\n }\n ```\n This forces `_users` to be added to `included` instead of `data`.\n */\n if (prop.charAt(0) === '_') {\n forcedSecondary = true;\n modelName = prop.substr(1);\n }\n\n var typeName = this.modelNameFromPayloadKey(modelName);\n if (!store.modelFactoryFor(typeName)) {\n (false && Ember.warn(this.warnMessageNoModelForKey(modelName, typeName), false, {\n id: 'ds.serializer.model-for-key-missing'\n }));\n\n continue;\n }\n\n var isPrimary = !forcedSecondary && this.isPrimaryType(store, typeName, primaryModelClass);\n var value = payload[prop];\n\n if (value === null) {\n continue;\n }\n\n if (false) {\n var isQueryRecordAnArray = requestType === 'queryRecord' && isPrimary && Array.isArray(value);\n var message = \"The adapter returned an array for the primary data of a `queryRecord` response. This is deprecated as `queryRecord` should return a single record.\";\n\n (false && !(!isQueryRecordAnArray) && Ember.deprecate(message, !isQueryRecordAnArray, {\n id: 'ds.serializer.rest.queryRecord-array-response',\n until: '3.0'\n }));\n }\n\n /*\n Support primary data as an object instead of an array.\n Example\n ```\n {\n user: { id: 1, title: 'Tom', manager: 3 }\n }\n ```\n */\n if (isPrimary && !Array.isArray(value)) {\n var _normalizePolymorphic2 = this._normalizePolymorphicRecord(store, value, prop, primaryModelClass, this),\n _data = _normalizePolymorphic2.data,\n _included = _normalizePolymorphic2.included;\n\n documentHash.data = _data;\n if (_included) {\n var _documentHash$include2;\n\n (_documentHash$include2 = documentHash.included).push.apply(_documentHash$include2, _toConsumableArray(_included));\n }\n continue;\n }\n\n var _normalizeArray = this._normalizeArray(store, typeName, value, prop),\n data = _normalizeArray.data,\n included = _normalizeArray.included;\n\n if (included) {\n var _documentHash$include3;\n\n (_documentHash$include3 = documentHash.included).push.apply(_documentHash$include3, _toConsumableArray(included));\n }\n\n if (isSingle) {\n data.forEach(function (resource) {\n\n /*\n Figures out if this is the primary record or not.\n It's either:\n 1. The record with the same ID as the original request\n 2. If it's a newly created record without an ID, the first record\n in the array\n */\n var isUpdatedRecord = isPrimary && (0, _private.coerceId)(resource.id) === id;\n var isFirstCreatedRecord = isPrimary && !id && !documentHash.data;\n\n if (isFirstCreatedRecord || isUpdatedRecord) {\n documentHash.data = resource;\n } else {\n documentHash.included.push(resource);\n }\n });\n } else {\n if (isPrimary) {\n documentHash.data = data;\n } else {\n if (data) {\n var _documentHash$include4;\n\n (_documentHash$include4 = documentHash.included).push.apply(_documentHash$include4, _toConsumableArray(data));\n }\n }\n }\n }\n\n return documentHash;\n },\n isPrimaryType: function (store, typeName, primaryTypeClass) {\n return store.modelFor(typeName) === primaryTypeClass;\n },\n pushPayload: function (store, payload) {\n var documentHash = {\n data: [],\n included: []\n };\n\n for (var prop in payload) {\n var modelName = this.modelNameFromPayloadKey(prop);\n if (!store.modelFactoryFor(modelName)) {\n (false && Ember.warn(this.warnMessageNoModelForKey(prop, modelName), false, {\n id: 'ds.serializer.model-for-key-missing'\n }));\n\n continue;\n }\n var type = store.modelFor(modelName);\n var typeSerializer = store.serializerFor(type.modelName);\n\n makeArray(payload[prop]).forEach(function (hash) {\n var _typeSerializer$norma = typeSerializer.normalize(type, hash, prop),\n data = _typeSerializer$norma.data,\n included = _typeSerializer$norma.included;\n\n documentHash.data.push(data);\n if (included) {\n var _documentHash$include5;\n\n (_documentHash$include5 = documentHash.included).push.apply(_documentHash$include5, _toConsumableArray(included));\n }\n });\n }\n\n if ((0, _private.isEnabled)('ds-pushpayload-return')) {\n return store.push(documentHash);\n } else {\n store.push(documentHash);\n }\n },\n modelNameFromPayloadKey: function (key) {\n return (0, _emberInflector.singularize)((0, _private.normalizeModelName)(key));\n },\n serialize: function (snapshot, options) {\n return this._super.apply(this, arguments);\n },\n serializeIntoHash: function (hash, typeClass, snapshot, options) {\n var normalizedRootKey = this.payloadKeyFromModelName(typeClass.modelName);\n hash[normalizedRootKey] = this.serialize(snapshot, options);\n },\n payloadKeyFromModelName: function (modelName) {\n return camelize(modelName);\n },\n serializePolymorphicType: function (snapshot, json, relationship) {\n var key = relationship.key;\n var typeKey = this.keyForPolymorphicType(key, relationship.type, 'serialize');\n var belongsTo = snapshot.belongsTo(key);\n\n if (isNone(belongsTo)) {\n json[typeKey] = null;\n } else {\n if ((0, _private.isEnabled)(\"ds-payload-type-hooks\")) {\n json[typeKey] = this.payloadTypeFromModelName(belongsTo.modelName);\n } else {\n json[typeKey] = camelize(belongsTo.modelName);\n }\n }\n },\n extractPolymorphicRelationship: function (relationshipType, relationshipHash, relationshipOptions) {\n var key = relationshipOptions.key,\n resourceHash = relationshipOptions.resourceHash,\n relationshipMeta = relationshipOptions.relationshipMeta;\n\n\n // A polymorphic belongsTo relationship can be present in the payload\n // either in the form where the `id` and the `type` are given:\n //\n // {\n // message: { id: 1, type: 'post' }\n // }\n //\n // or by the `id` and a `<relationship>Type` attribute:\n //\n // {\n // message: 1,\n // messageType: 'post'\n // }\n //\n // The next code checks if the latter case is present and returns the\n // corresponding JSON-API representation. The former case is handled within\n // the base class JSONSerializer.\n var isPolymorphic = relationshipMeta.options.polymorphic;\n var typeProperty = this.keyForPolymorphicType(key, relationshipType, 'deserialize');\n\n if (isPolymorphic && resourceHash[typeProperty] !== undefined && typeof relationshipHash !== 'object') {\n\n if ((0, _private.isEnabled)(\"ds-payload-type-hooks\")) {\n\n var payloadType = resourceHash[typeProperty];\n var type = this.modelNameFromPayloadType(payloadType);\n var deprecatedTypeLookup = this.modelNameFromPayloadKey(payloadType);\n\n if (payloadType !== deprecatedTypeLookup && !this._hasCustomModelNameFromPayloadType() && this._hasCustomModelNameFromPayloadKey()) {\n (false && !(false) && Ember.deprecate(\"You are using modelNameFromPayloadKey to normalize the type for a polymorphic relationship. This has been deprecated in favor of modelNameFromPayloadType\", false, {\n id: 'ds.rest-serializer.deprecated-model-name-for-polymorphic-type',\n until: '3.0.0'\n }));\n\n\n type = deprecatedTypeLookup;\n }\n\n return {\n id: relationshipHash,\n type: type\n };\n } else {\n\n var _type = this.modelNameFromPayloadKey(resourceHash[typeProperty]);\n return {\n id: relationshipHash,\n type: _type\n };\n }\n }\n\n return this._super.apply(this, arguments);\n }\n });\n\n if ((0, _private.isEnabled)(\"ds-payload-type-hooks\")) {\n\n RESTSerializer.reopen({\n modelNameFromPayloadType: function (payloadType) {\n return (0, _emberInflector.singularize)((0, _private.normalizeModelName)(payloadType));\n },\n payloadTypeFromModelName: function (modelName) {\n return camelize(modelName);\n },\n _hasCustomModelNameFromPayloadKey: function () {\n return this.modelNameFromPayloadKey !== RESTSerializer.prototype.modelNameFromPayloadKey;\n },\n _hasCustomModelNameFromPayloadType: function () {\n return this.modelNameFromPayloadType !== RESTSerializer.prototype.modelNameFromPayloadType;\n },\n _hasCustomPayloadTypeFromModelName: function () {\n return this.payloadTypeFromModelName !== RESTSerializer.prototype.payloadTypeFromModelName;\n },\n _hasCustomPayloadKeyFromModelName: function () {\n return this.payloadKeyFromModelName !== RESTSerializer.prototype.payloadKeyFromModelName;\n }\n });\n }\n\n if (false) {\n RESTSerializer.reopen({\n warnMessageNoModelForKey: function (prop, typeKey) {\n return 'Encountered \"' + prop + '\" in payload, but no model was found for model name \"' + typeKey + '\" (resolved model name using ' + this.constructor.toString() + '.modelNameFromPayloadKey(\"' + prop + '\"))';\n }\n });\n }\n\n exports.default = RESTSerializer;\n});","define('ember-data/setup-container', ['exports', 'ember-data/-private', 'ember-data/serializers/json-api', 'ember-data/serializers/json', 'ember-data/serializers/rest', 'ember-data/adapters/json-api', 'ember-data/adapters/rest', 'ember-data/transforms/number', 'ember-data/transforms/date', 'ember-data/transforms/string', 'ember-data/transforms/boolean'], function (exports, _private, _jsonApi, _json, _rest, _jsonApi2, _rest2, _number, _date, _string, _boolean) {\n 'use strict';\n\n exports.__esModule = true;\n exports.default = setupContainer;\n\n\n function has(applicationOrRegistry, fullName) {\n if (applicationOrRegistry.has) {\n // < 2.1.0\n return applicationOrRegistry.has(fullName);\n } else {\n // 2.1.0+\n return applicationOrRegistry.hasRegistration(fullName);\n }\n }\n\n /*\n Configures a registry for use with an Ember-Data\n store. Accepts an optional namespace argument.\n \n @method initializeStore\n @param {Ember.Registry} registry\n */\n function initializeStore(registry) {\n var registerOptionsForType = registry.registerOptionsForType || registry.optionsForType;\n registerOptionsForType.call(registry, 'serializer', { singleton: false });\n registerOptionsForType.call(registry, 'adapter', { singleton: false });\n registry.register('serializer:-default', _json.default);\n registry.register('serializer:-rest', _rest.default);\n registry.register('adapter:-rest', _rest2.default);\n\n registry.register('adapter:-json-api', _jsonApi2.default);\n registry.register('serializer:-json-api', _jsonApi.default);\n\n if (!has(registry, 'service:store')) {\n registry.register('service:store', _private.Store);\n }\n }\n\n /*\n Configures a registry with injections on Ember applications\n for the Ember-Data store. Accepts an optional namespace argument.\n \n @method initializeDebugAdapter\n @param {Ember.Registry} registry\n */\n function initializeDataAdapter(registry) {\n registry.register('data-adapter:main', _private.DebugAdapter);\n }\n\n /*\n Configures a registry with injections on Ember applications\n for the Ember-Data store. Accepts an optional namespace argument.\n \n @method initializeStoreInjections\n @param {Ember.Registry} registry\n */\n function initializeStoreInjections(registry) {\n // registry.injection for Ember < 2.1.0\n // application.inject for Ember 2.1.0+\n var inject = registry.inject || registry.injection;\n inject.call(registry, 'controller', 'store', 'service:store');\n inject.call(registry, 'route', 'store', 'service:store');\n inject.call(registry, 'data-adapter', 'store', 'service:store');\n }\n\n /*\n Configures a registry for use with Ember-Data\n transforms.\n \n @method initializeTransforms\n @param {Ember.Registry} registry\n */\n function initializeTransforms(registry) {\n registry.register('transform:boolean', _boolean.default);\n registry.register('transform:date', _date.default);\n registry.register('transform:number', _number.default);\n registry.register('transform:string', _string.default);\n }\n\n function setupContainer(application) {\n initializeDataAdapter(application);\n initializeTransforms(application);\n initializeStoreInjections(application);\n initializeStore(application);\n }\n});","define('ember-data/store', ['exports', 'ember-data/-private'], function (exports, _private) {\n 'use strict';\n\n exports.__esModule = true;\n Object.defineProperty(exports, 'default', {\n enumerable: true,\n get: function () {\n return _private.Store;\n }\n });\n});","define('ember-data/transform', ['exports', 'ember-data/transforms/transform'], function (exports, _transform) {\n 'use strict';\n\n exports.__esModule = true;\n Object.defineProperty(exports, 'default', {\n enumerable: true,\n get: function () {\n return _transform.default;\n }\n });\n});","define('ember-data/transforms/boolean', ['exports', 'ember-data/transforms/transform'], function (exports, _transform) {\n 'use strict';\n\n exports.__esModule = true;\n var isNone = Ember.isNone;\n exports.default = _transform.default.extend({\n deserialize: function (serialized, options) {\n if (isNone(serialized) && options.allowNull === true) {\n return null;\n }\n\n var type = typeof serialized;\n if (type === \"boolean\") {\n return serialized;\n } else if (type === \"string\") {\n return (/^(true|t|1)$/i.test(serialized)\n );\n } else if (type === \"number\") {\n return serialized === 1;\n } else {\n return false;\n }\n },\n serialize: function (deserialized, options) {\n if (isNone(deserialized) && options.allowNull === true) {\n return null;\n }\n\n return Boolean(deserialized);\n }\n });\n});","define('ember-data/transforms/date', ['exports', 'ember-data/transforms/transform'], function (exports, _transform) {\n 'use strict';\n\n exports.__esModule = true;\n exports.default = _transform.default.extend({\n deserialize: function (serialized) {\n var type = typeof serialized;\n\n if (type === \"string\") {\n var offset = serialized.indexOf('+');\n\n if (offset !== -1 && serialized.length - 5 === offset) {\n offset += 3;\n return new Date(serialized.slice(0, offset) + ':' + serialized.slice(offset));\n }\n return new Date(serialized);\n } else if (type === \"number\") {\n return new Date(serialized);\n } else if (serialized === null || serialized === undefined) {\n // if the value is null return null\n // if the value is not present in the data return undefined\n return serialized;\n } else {\n return null;\n }\n },\n serialize: function (date) {\n if (date instanceof Date && !isNaN(date)) {\n return date.toISOString();\n } else {\n return null;\n }\n }\n });\n});","define('ember-data/transforms/number', ['exports', 'ember-data/transforms/transform'], function (exports, _transform) {\n 'use strict';\n\n exports.__esModule = true;\n var empty = Ember.isEmpty;\n\n\n function isNumber(value) {\n return value === value && value !== Infinity && value !== -Infinity;\n }\n\n /**\n The `DS.NumberTransform` class is used to serialize and deserialize\n numeric attributes on Ember Data record objects. This transform is\n used when `number` is passed as the type parameter to the\n [DS.attr](../../data#method_attr) function.\n \n Usage\n \n ```app/models/score.js\n import DS from 'ember-data';\n \n export default DS.Model.extend({\n value: DS.attr('number'),\n player: DS.belongsTo('player'),\n date: DS.attr('date')\n });\n ```\n \n @class NumberTransform\n @extends DS.Transform\n @namespace DS\n */\n exports.default = _transform.default.extend({\n deserialize: function (serialized) {\n var transformed = void 0;\n\n if (empty(serialized)) {\n return null;\n } else {\n transformed = Number(serialized);\n\n return isNumber(transformed) ? transformed : null;\n }\n },\n serialize: function (deserialized) {\n var transformed = void 0;\n\n if (empty(deserialized)) {\n return null;\n } else {\n transformed = Number(deserialized);\n\n return isNumber(transformed) ? transformed : null;\n }\n }\n });\n});","define('ember-data/transforms/string', ['exports', 'ember-data/transforms/transform'], function (exports, _transform) {\n 'use strict';\n\n exports.__esModule = true;\n var none = Ember.isNone;\n exports.default = _transform.default.extend({\n deserialize: function (serialized) {\n return none(serialized) ? null : String(serialized);\n },\n serialize: function (deserialized) {\n return none(deserialized) ? null : String(deserialized);\n }\n });\n});","define('ember-data/transforms/transform', ['exports'], function (exports) {\n 'use strict';\n\n exports.__esModule = true;\n var EmberObject = Ember.Object;\n exports.default = EmberObject.extend({\n /**\n When given a deserialized value from a record attribute this\n method must return the serialized value.\n Example\n ```javascript\n import { isEmpty } from '@ember/utils';\n serialize(deserialized, options) {\n return isEmpty(deserialized) ? null : Number(deserialized);\n }\n ```\n @method serialize\n @param deserialized The deserialized value\n @param options hash of options passed to `DS.attr`\n @return The serialized value\n */\n serialize: null,\n\n /**\n When given a serialize value from a JSON object this method must\n return the deserialized value for the record attribute.\n Example\n ```javascript\n deserialize(serialized, options) {\n return empty(serialized) ? null : Number(serialized);\n }\n ```\n @method deserialize\n @param serialized The serialized value\n @param options hash of options passed to `DS.attr`\n @return The deserialized value\n */\n deserialize: null\n });\n});","define(\"ember-data/version\", [\"exports\"], function (exports) {\n \"use strict\";\n\n exports.__esModule = true;\n exports.default = \"3.0.2\";\n});","define(\"ember-inflector\", [\"module\", \"exports\", \"ember-inflector/lib/system\", \"ember-inflector/lib/ext/string\"], function (module, exports, _system) {\n \"use strict\";\n\n exports.__esModule = true;\n exports.defaultRules = exports.singularize = exports.pluralize = undefined;\n\n\n _system.Inflector.defaultRules = _system.defaultRules;\n Ember.Inflector = _system.Inflector;\n\n Ember.String.pluralize = _system.pluralize;\n Ember.String.singularize = _system.singularize;\n\n exports.default = _system.Inflector;\n exports.pluralize = _system.pluralize;\n exports.singularize = _system.singularize;\n exports.defaultRules = _system.defaultRules;\n\n\n if (typeof define !== 'undefined' && define.amd) {\n define('ember-inflector', ['exports'], function (__exports__) {\n __exports__['default'] = _system.Inflector;\n __exports__.pluralize = _system.pluralize;\n __exports__.singularize = _system.singularize;\n\n return __exports__;\n });\n } else if (typeof module !== 'undefined' && module['exports']) {\n module['exports'] = _system.Inflector;\n _system.Inflector.singularize = _system.singularize;\n _system.Inflector.pluralize = _system.pluralize;\n }\n});","define('ember-inflector/lib/ext/string', ['ember-inflector/lib/system/string'], function (_string) {\n 'use strict';\n\n if (Ember.EXTEND_PROTOTYPES === true || Ember.EXTEND_PROTOTYPES.String) {\n /**\n See {{#crossLink \"Ember.String/pluralize\"}}{{/crossLink}}\n @method pluralize\n @for String\n */\n String.prototype.pluralize = function () {\n return (0, _string.pluralize)(this);\n };\n\n /**\n See {{#crossLink \"Ember.String/singularize\"}}{{/crossLink}}\n @method singularize\n @for String\n */\n String.prototype.singularize = function () {\n return (0, _string.singularize)(this);\n };\n }\n});","define('ember-inflector/lib/helpers/pluralize', ['exports', 'ember-inflector', 'ember-inflector/lib/utils/make-helper'], function (exports, _emberInflector, _makeHelper) {\n 'use strict';\n\n exports.__esModule = true;\n exports.default = (0, _makeHelper.default)(function (params, hash) {\n var count = void 0,\n word = void 0,\n withoutCount = false;\n\n if (params.length === 1) {\n word = params[0];\n return (0, _emberInflector.pluralize)(word);\n } else {\n count = params[0];\n word = params[1];\n\n if (hash[\"without-count\"]) {\n withoutCount = hash[\"without-count\"];\n }\n\n if (parseFloat(count) !== 1) {\n word = (0, _emberInflector.pluralize)(word);\n }\n\n return withoutCount ? word : count + \" \" + word;\n }\n });\n});","define('ember-inflector/lib/helpers/singularize', ['exports', 'ember-inflector', 'ember-inflector/lib/utils/make-helper'], function (exports, _emberInflector, _makeHelper) {\n 'use strict';\n\n exports.__esModule = true;\n exports.default = (0, _makeHelper.default)(function (params) {\n return (0, _emberInflector.singularize)(params[0]);\n });\n});","define(\"ember-inflector/lib/system\", [\"exports\", \"ember-inflector/lib/system/inflector\", \"ember-inflector/lib/system/string\", \"ember-inflector/lib/system/inflections\"], function (exports, _inflector, _string, _inflections) {\n \"use strict\";\n\n exports.__esModule = true;\n exports.defaultRules = exports.pluralize = exports.singularize = exports.Inflector = undefined;\n\n\n _inflector.default.inflector = new _inflector.default(_inflections.default);\n\n exports.Inflector = _inflector.default;\n exports.singularize = _string.singularize;\n exports.pluralize = _string.pluralize;\n exports.defaultRules = _inflections.default;\n});","define('ember-inflector/lib/system/inflections', ['exports'], function (exports) {\n 'use strict';\n\n exports.__esModule = true;\n exports.default = {\n plurals: [[/$/, 's'], [/s$/i, 's'], [/^(ax|test)is$/i, '$1es'], [/(octop|vir)us$/i, '$1i'], [/(octop|vir)i$/i, '$1i'], [/(alias|status|bonus)$/i, '$1es'], [/(bu)s$/i, '$1ses'], [/(buffal|tomat)o$/i, '$1oes'], [/([ti])um$/i, '$1a'], [/([ti])a$/i, '$1a'], [/sis$/i, 'ses'], [/(?:([^f])fe|([lr])f)$/i, '$1$2ves'], [/(hive)$/i, '$1s'], [/([^aeiouy]|qu)y$/i, '$1ies'], [/(x|ch|ss|sh)$/i, '$1es'], [/(matr|vert|ind)(?:ix|ex)$/i, '$1ices'], [/^(m|l)ouse$/i, '$1ice'], [/^(m|l)ice$/i, '$1ice'], [/^(ox)$/i, '$1en'], [/^(oxen)$/i, '$1'], [/(quiz)$/i, '$1zes']],\n\n singular: [[/s$/i, ''], [/(ss)$/i, '$1'], [/(n)ews$/i, '$1ews'], [/([ti])a$/i, '$1um'], [/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)(sis|ses)$/i, '$1sis'], [/(^analy)(sis|ses)$/i, '$1sis'], [/([^f])ves$/i, '$1fe'], [/(hive)s$/i, '$1'], [/(tive)s$/i, '$1'], [/([lr])ves$/i, '$1f'], [/([^aeiouy]|qu)ies$/i, '$1y'], [/(s)eries$/i, '$1eries'], [/(m)ovies$/i, '$1ovie'], [/(x|ch|ss|sh)es$/i, '$1'], [/^(m|l)ice$/i, '$1ouse'], [/(bus)(es)?$/i, '$1'], [/(o)es$/i, '$1'], [/(shoe)s$/i, '$1'], [/(cris|test)(is|es)$/i, '$1is'], [/^(a)x[ie]s$/i, '$1xis'], [/(octop|vir)(us|i)$/i, '$1us'], [/(alias|status|bonus)(es)?$/i, '$1'], [/^(ox)en/i, '$1'], [/(vert|ind)ices$/i, '$1ex'], [/(matr)ices$/i, '$1ix'], [/(quiz)zes$/i, '$1'], [/(database)s$/i, '$1']],\n\n irregularPairs: [['person', 'people'], ['man', 'men'], ['child', 'children'], ['sex', 'sexes'], ['move', 'moves'], ['cow', 'kine'], ['zombie', 'zombies']],\n\n uncountable: ['equipment', 'information', 'rice', 'money', 'species', 'series', 'fish', 'sheep', 'jeans', 'police']\n };\n});","define('ember-inflector/lib/system/inflector', ['exports'], function (exports) {\n 'use strict';\n\n exports.__esModule = true;\n\n\n var capitalize = Ember.String.capitalize;\n\n var BLANK_REGEX = /^\\s*$/;\n var LAST_WORD_DASHED_REGEX = /([\\w/-]+[_/\\s-])([a-z\\d]+$)/;\n var LAST_WORD_CAMELIZED_REGEX = /([\\w/\\s-]+)([A-Z][a-z\\d]*$)/;\n var CAMELIZED_REGEX = /[A-Z][a-z\\d]*$/;\n\n function loadUncountable(rules, uncountable) {\n for (var i = 0, length = uncountable.length; i < length; i++) {\n rules.uncountable[uncountable[i].toLowerCase()] = true;\n }\n }\n\n function loadIrregular(rules, irregularPairs) {\n var pair;\n\n for (var i = 0, length = irregularPairs.length; i < length; i++) {\n pair = irregularPairs[i];\n\n //pluralizing\n rules.irregular[pair[0].toLowerCase()] = pair[1];\n rules.irregular[pair[1].toLowerCase()] = pair[1];\n\n //singularizing\n rules.irregularInverse[pair[1].toLowerCase()] = pair[0];\n rules.irregularInverse[pair[0].toLowerCase()] = pair[0];\n }\n }\n\n /**\n Inflector.Ember provides a mechanism for supplying inflection rules for your\n application. Ember includes a default set of inflection rules, and provides an\n API for providing additional rules.\n \n Examples:\n \n Creating an inflector with no rules.\n \n ```js\n var inflector = new Ember.Inflector();\n ```\n \n Creating an inflector with the default ember ruleset.\n \n ```js\n var inflector = new Ember.Inflector(Ember.Inflector.defaultRules);\n \n inflector.pluralize('cow'); //=> 'kine'\n inflector.singularize('kine'); //=> 'cow'\n ```\n \n Creating an inflector and adding rules later.\n \n ```javascript\n var inflector = Ember.Inflector.inflector;\n \n inflector.pluralize('advice'); // => 'advices'\n inflector.uncountable('advice');\n inflector.pluralize('advice'); // => 'advice'\n \n inflector.pluralize('formula'); // => 'formulas'\n inflector.irregular('formula', 'formulae');\n inflector.pluralize('formula'); // => 'formulae'\n \n // you would not need to add these as they are the default rules\n inflector.plural(/$/, 's');\n inflector.singular(/s$/i, '');\n ```\n \n Creating an inflector with a nondefault ruleset.\n \n ```javascript\n var rules = {\n plurals: [\n [ /$/, 's' ]\n ],\n singular: [\n [ /\\s$/, '' ]\n ],\n irregularPairs: [\n [ 'cow', 'kine' ]\n ],\n uncountable: [ 'fish' ]\n };\n \n var inflector = new Ember.Inflector(rules);\n ```\n \n @class Inflector\n @namespace Ember\n */\n function Inflector(ruleSet) {\n ruleSet = ruleSet || {};\n ruleSet.uncountable = ruleSet.uncountable || makeDictionary();\n ruleSet.irregularPairs = ruleSet.irregularPairs || makeDictionary();\n\n var rules = this.rules = {\n plurals: ruleSet.plurals || [],\n singular: ruleSet.singular || [],\n irregular: makeDictionary(),\n irregularInverse: makeDictionary(),\n uncountable: makeDictionary()\n };\n\n loadUncountable(rules, ruleSet.uncountable);\n loadIrregular(rules, ruleSet.irregularPairs);\n\n this.enableCache();\n }\n\n if (!Object.create && !Object.create(null).hasOwnProperty) {\n throw new Error(\"This browser does not support Object.create(null), please polyfil with es5-sham: http://git.io/yBU2rg\");\n }\n\n function makeDictionary() {\n var cache = Object.create(null);\n cache['_dict'] = null;\n delete cache['_dict'];\n return cache;\n }\n\n Inflector.prototype = {\n /**\n @public\n As inflections can be costly, and commonly the same subset of words are repeatedly\n inflected an optional cache is provided.\n @method enableCache\n */\n enableCache: function () {\n this.purgeCache();\n\n this.singularize = function (word) {\n this._cacheUsed = true;\n return this._sCache[word] || (this._sCache[word] = this._singularize(word));\n };\n\n this.pluralize = function (word) {\n this._cacheUsed = true;\n return this._pCache[word] || (this._pCache[word] = this._pluralize(word));\n };\n },\n\n /**\n @public\n @method purgedCache\n */\n purgeCache: function () {\n this._cacheUsed = false;\n this._sCache = makeDictionary();\n this._pCache = makeDictionary();\n },\n\n /**\n @public\n disable caching\n @method disableCache;\n */\n disableCache: function () {\n this._sCache = null;\n this._pCache = null;\n this.singularize = function (word) {\n return this._singularize(word);\n };\n\n this.pluralize = function (word) {\n return this._pluralize(word);\n };\n },\n\n /**\n @method plural\n @param {RegExp} regex\n @param {String} string\n */\n plural: function (regex, string) {\n if (this._cacheUsed) {\n this.purgeCache();\n }\n this.rules.plurals.push([regex, string.toLowerCase()]);\n },\n\n /**\n @method singular\n @param {RegExp} regex\n @param {String} string\n */\n singular: function (regex, string) {\n if (this._cacheUsed) {\n this.purgeCache();\n }\n this.rules.singular.push([regex, string.toLowerCase()]);\n },\n\n /**\n @method uncountable\n @param {String} regex\n */\n uncountable: function (string) {\n if (this._cacheUsed) {\n this.purgeCache();\n }\n loadUncountable(this.rules, [string.toLowerCase()]);\n },\n\n /**\n @method irregular\n @param {String} singular\n @param {String} plural\n */\n irregular: function (singular, plural) {\n if (this._cacheUsed) {\n this.purgeCache();\n }\n loadIrregular(this.rules, [[singular, plural]]);\n },\n\n /**\n @method pluralize\n @param {String} word\n */\n pluralize: function (word) {\n return this._pluralize(word);\n },\n\n _pluralize: function (word) {\n return this.inflect(word, this.rules.plurals, this.rules.irregular);\n },\n /**\n @method singularize\n @param {String} word\n */\n singularize: function (word) {\n return this._singularize(word);\n },\n\n _singularize: function (word) {\n return this.inflect(word, this.rules.singular, this.rules.irregularInverse);\n },\n\n /**\n @protected\n @method inflect\n @param {String} word\n @param {Object} typeRules\n @param {Object} irregular\n */\n inflect: function (word, typeRules, irregular) {\n var inflection, substitution, result, lowercase, wordSplit, firstPhrase, lastWord, isBlank, isCamelized, rule, isUncountable;\n\n isBlank = !word || BLANK_REGEX.test(word);\n\n isCamelized = CAMELIZED_REGEX.test(word);\n firstPhrase = \"\";\n\n if (isBlank) {\n return word;\n }\n\n lowercase = word.toLowerCase();\n wordSplit = LAST_WORD_DASHED_REGEX.exec(word) || LAST_WORD_CAMELIZED_REGEX.exec(word);\n\n if (wordSplit) {\n firstPhrase = wordSplit[1];\n lastWord = wordSplit[2].toLowerCase();\n }\n\n isUncountable = this.rules.uncountable[lowercase] || this.rules.uncountable[lastWord];\n\n if (isUncountable) {\n return word;\n }\n\n for (rule in irregular) {\n if (lowercase.match(rule + \"$\")) {\n substitution = irregular[rule];\n\n if (isCamelized && irregular[lastWord]) {\n substitution = capitalize(substitution);\n rule = capitalize(rule);\n }\n\n return word.replace(new RegExp(rule, 'i'), substitution);\n }\n }\n\n for (var i = typeRules.length, min = 0; i > min; i--) {\n inflection = typeRules[i - 1];\n rule = inflection[0];\n\n if (rule.test(word)) {\n break;\n }\n }\n\n inflection = inflection || [];\n\n rule = inflection[0];\n substitution = inflection[1];\n\n result = word.replace(rule, substitution);\n\n return result;\n }\n };\n\n exports.default = Inflector;\n});","define('ember-inflector/lib/system/string', ['exports', 'ember-inflector/lib/system/inflector'], function (exports, _inflector) {\n 'use strict';\n\n exports.__esModule = true;\n exports.singularize = exports.pluralize = undefined;\n\n\n function pluralize(word) {\n return _inflector.default.inflector.pluralize(word);\n }\n\n function singularize(word) {\n return _inflector.default.inflector.singularize(word);\n }\n\n exports.pluralize = pluralize;\n exports.singularize = singularize;\n});","define('ember-inflector/lib/utils/make-helper', ['exports'], function (exports) {\n 'use strict';\n\n exports.__esModule = true;\n exports.default = makeHelper;\n function makeHelper(helperFunction) {\n if (Ember.Helper) {\n return Ember.Helper.helper(helperFunction);\n }\n if (Ember.HTMLBars) {\n return Ember.HTMLBars.makeBoundHelper(helperFunction);\n }\n return Ember.Handlebars.makeBoundHelper(helperFunction);\n }\n});","define('ember-load-initializers', ['exports'], function (exports) {\n 'use strict';\n\n exports.__esModule = true;\n\n exports.default = function (app, prefix) {\n var initializerPrefix = prefix + '/initializers/';\n var instanceInitializerPrefix = prefix + '/instance-initializers/';\n var initializers = [];\n var instanceInitializers = [];\n // this is 2 pass because generally the first pass is the problem\n // and is reduced, and resolveInitializer has potential to deopt\n var moduleNames = Object.keys(requirejs._eak_seen);\n for (var i = 0; i < moduleNames.length; i++) {\n var moduleName = moduleNames[i];\n if (moduleName.lastIndexOf(initializerPrefix, 0) === 0) {\n initializers.push(moduleName);\n } else if (moduleName.lastIndexOf(instanceInitializerPrefix, 0) === 0) {\n instanceInitializers.push(moduleName);\n }\n }\n registerInitializers(app, initializers);\n registerInstanceInitializers(app, instanceInitializers);\n };\n\n function resolveInitializer(moduleName) {\n var module = require(moduleName, null, null, true);\n if (!module) {\n throw new Error(moduleName + ' must export an initializer.');\n }\n var initializer = module['default'];\n if (!initializer.name) {\n initializer.name = moduleName.slice(moduleName.lastIndexOf('/') + 1);\n }\n return initializer;\n }\n\n function registerInitializers(app, moduleNames) {\n for (var i = 0; i < moduleNames.length; i++) {\n app.initializer(resolveInitializer(moduleNames[i]));\n }\n }\n\n function registerInstanceInitializers(app, moduleNames) {\n for (var i = 0; i < moduleNames.length; i++) {\n app.instanceInitializer(resolveInitializer(moduleNames[i]));\n }\n }\n});","define('ember', [], function() {\n return {\n default: Ember\n };\n});\n\n"],"names":[],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7VA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9kCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1bA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/VA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3bA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpqFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzhBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5TA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACl9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5hBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9qBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9aA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtCA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/CA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","file":"ember-data.js"}