{"version":3,"sources":["vendor/ember-cli/vendor-prefix.js","vendor/loader/loader.js","bower_components/jquery/dist/jquery.js","bower_components/ember/ember.debug.js","bower_components/ember-cli-shims/app-shims.js","bower_components/hammer.js/hammer.js","bower_components/matchMedia/matchMedia.js","vendor/propagating.js","vendor/ember-load-initializers/legacy-shims.js","vendor/ember-resolver/legacy-shims.js","ember-ajax/ajax-request.js","ember-ajax/errors.js","ember-ajax/index.js","ember-ajax/mixins/ajax-request.js","ember-ajax/raw.js","ember-ajax/request.js","ember-ajax/services/ajax.js","ember-ajax/utils/ajax.js","ember-ajax/utils/is-fastboot.js","ember-ajax/utils/parse-response-headers.js","ember-ajax/utils/url-helpers.js","ember-cli-app-version/components/app-version.js","ember-cli-app-version/initializer-factory.js","ember-cli-app-version/templates/app-version.js","ember-css-transitions/components/transition-group.js","ember-css-transitions/mixins/transition-mixin.js","ember-css-transitions/services/transition-events.js","ember-css-transitions/utils/execution-environment.js","ember-data/-private/adapters/build-url-mixin.js","ember-data/-private/adapters.js","ember-data/-private/core.js","ember-data/-private/debug.js","ember-data/-private/ext/date.js","ember-data/-private/features.js","ember-data/-private/initializers/data-adapter.js","ember-data/-private/initializers/store-injections.js","ember-data/-private/initializers/store.js","ember-data/-private/initializers/transforms.js","ember-data/-private/instance-initializers/initialize-store-service.js","ember-data/-private/serializers.js","ember-data/-private/system/clone-null.js","ember-data/-private/system/coerce-id.js","ember-data/-private/system/container-proxy.js","ember-data/-private/system/debug/debug-adapter.js","ember-data/-private/system/debug/debug-info.js","ember-data/-private/system/debug.js","ember-data/-private/system/empty-object.js","ember-data/-private/system/is-array-like.js","ember-data/-private/system/many-array.js","ember-data/-private/system/model/attr.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/model.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/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/record-arrays.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/references.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/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/common.js","ember-data/-private/system/store/container-instance-cache.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/system/store.js","ember-data/-private/transforms/boolean.js","ember-data/-private/transforms/date.js","ember-data/-private/transforms/number.js","ember-data/-private/transforms/string.js","ember-data/-private/transforms.js","ember-data/-private/utils/parse-response-headers.js","ember-data/-private/utils.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/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/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/inflections.js","ember-inflector/lib/system/inflector.js","ember-inflector/lib/system/string.js","ember-inflector/lib/system.js","ember-inflector/lib/utils/make-helper.js","ember-load-initializers/index.js","ember-paper/components/base-focusable.js","ember-paper/components/paper-autocomplete-highlight.js","ember-paper/components/paper-autocomplete-item.js","ember-paper/components/paper-autocomplete-list.js","ember-paper/components/paper-autocomplete.js","ember-paper/components/paper-backdrop.js","ember-paper/components/paper-button.js","ember-paper/components/paper-card-actions.js","ember-paper/components/paper-card-avatar.js","ember-paper/components/paper-card-content.js","ember-paper/components/paper-card-header-headline.js","ember-paper/components/paper-card-header-subhead.js","ember-paper/components/paper-card-header-text.js","ember-paper/components/paper-card-header-title.js","ember-paper/components/paper-card-header.js","ember-paper/components/paper-card-icon-actions.js","ember-paper/components/paper-card-image.js","ember-paper/components/paper-card-media.js","ember-paper/components/paper-card-title-media.js","ember-paper/components/paper-card-title-text.js","ember-paper/components/paper-card-title.js","ember-paper/components/paper-card.js","ember-paper/components/paper-checkbox.js","ember-paper/components/paper-content.js","ember-paper/components/paper-dialog-actions.js","ember-paper/components/paper-dialog-container.js","ember-paper/components/paper-dialog-content.js","ember-paper/components/paper-dialog-inner.js","ember-paper/components/paper-dialog.js","ember-paper/components/paper-divider.js","ember-paper/components/paper-grid-list.js","ember-paper/components/paper-grid-tile-footer.js","ember-paper/components/paper-grid-tile.js","ember-paper/components/paper-icon.js","ember-paper/components/paper-input.js","ember-paper/components/paper-item.js","ember-paper/components/paper-list.js","ember-paper/components/paper-menu-abstract.js","ember-paper/components/paper-menu-container-abstract.js","ember-paper/components/paper-menu-container.js","ember-paper/components/paper-menu-content-pane.js","ember-paper/components/paper-menu-content.js","ember-paper/components/paper-menu-item.js","ember-paper/components/paper-menu.js","ember-paper/components/paper-optgroup.js","ember-paper/components/paper-option.js","ember-paper/components/paper-progress-circular.js","ember-paper/components/paper-progress-linear.js","ember-paper/components/paper-radio-group.js","ember-paper/components/paper-radio.js","ember-paper/components/paper-select-container.js","ember-paper/components/paper-select-core.js","ember-paper/components/paper-select-header.js","ember-paper/components/paper-select-menu.js","ember-paper/components/paper-select-value.js","ember-paper/components/paper-select.js","ember-paper/components/paper-sidenav-container.js","ember-paper/components/paper-sidenav-inner.js","ember-paper/components/paper-sidenav-toggle.js","ember-paper/components/paper-sidenav.js","ember-paper/components/paper-slider.js","ember-paper/components/paper-subheader.js","ember-paper/components/paper-switch.js","ember-paper/components/paper-toolbar-tools.js","ember-paper/components/paper-toolbar.js","ember-paper/helpers/underscore.js","ember-paper/initializers/paper-wormhole.js","ember-paper/mixins/color-mixin.js","ember-paper/mixins/events-mixin.js","ember-paper/mixins/flex-mixin.js","ember-paper/mixins/proxiable-mixin.js","ember-paper/mixins/proxy-mixin.js","ember-paper/mixins/ripple-mixin.js","ember-paper/mixins/translate3d-mixin.js","ember-paper/services/paper-sidenav.js","ember-paper/utils/grid-layout.js","ember-paper/utils/promise-proxies.js","ember-paper/validators/max.js","ember-paper/validators/maxlength.js","ember-paper/validators/min.js","ember-paper/validators/minlength.js","ember-paper/validators/required.js","ember-resolver/container-debug-adapter.js","ember-resolver/index.js","ember-resolver/resolver.js","ember-resolver/utils/class-factory.js","ember-resolver/utils/create.js","ember-resolver/utils/make-dictionary.js","ember-resolver/utils/module-registry.js","ember-wormhole/components/ember-wormhole.js","lodash/array/chunk.js","lodash/array/compact.js","lodash/array/difference.js","lodash/array/drop.js","lodash/array/dropRight.js","lodash/array/dropRightWhile.js","lodash/array/dropWhile.js","lodash/array/fill.js","lodash/array/findIndex.js","lodash/array/findLastIndex.js","lodash/array/first.js","lodash/array/flatten.js","lodash/array/flattenDeep.js","lodash/array/head.js","lodash/array/indexOf.js","lodash/array/initial.js","lodash/array/intersection.js","lodash/array/last.js","lodash/array/lastIndexOf.js","lodash/array/object.js","lodash/array/pull.js","lodash/array/pullAt.js","lodash/array/remove.js","lodash/array/rest.js","lodash/array/slice.js","lodash/array/sortedIndex.js","lodash/array/sortedLastIndex.js","lodash/array/tail.js","lodash/array/take.js","lodash/array/takeRight.js","lodash/array/takeRightWhile.js","lodash/array/takeWhile.js","lodash/array/union.js","lodash/array/uniq.js","lodash/array/unique.js","lodash/array/unzip.js","lodash/array/unzipWith.js","lodash/array/without.js","lodash/array/xor.js","lodash/array/zip.js","lodash/array/zipObject.js","lodash/array/zipWith.js","lodash/array.js","lodash/chain/chain.js","lodash/chain/commit.js","lodash/chain/concat.js","lodash/chain/lodash.js","lodash/chain/plant.js","lodash/chain/reverse.js","lodash/chain/run.js","lodash/chain/tap.js","lodash/chain/thru.js","lodash/chain/toJSON.js","lodash/chain/toString.js","lodash/chain/value.js","lodash/chain/valueOf.js","lodash/chain/wrapperChain.js","lodash/chain/wrapperCommit.js","lodash/chain/wrapperConcat.js","lodash/chain/wrapperPlant.js","lodash/chain/wrapperReverse.js","lodash/chain/wrapperToString.js","lodash/chain/wrapperValue.js","lodash/chain.js","lodash/collection/all.js","lodash/collection/any.js","lodash/collection/at.js","lodash/collection/collect.js","lodash/collection/contains.js","lodash/collection/countBy.js","lodash/collection/detect.js","lodash/collection/each.js","lodash/collection/eachRight.js","lodash/collection/every.js","lodash/collection/filter.js","lodash/collection/find.js","lodash/collection/findLast.js","lodash/collection/findWhere.js","lodash/collection/foldl.js","lodash/collection/foldr.js","lodash/collection/forEach.js","lodash/collection/forEachRight.js","lodash/collection/groupBy.js","lodash/collection/include.js","lodash/collection/includes.js","lodash/collection/indexBy.js","lodash/collection/inject.js","lodash/collection/invoke.js","lodash/collection/map.js","lodash/collection/max.js","lodash/collection/min.js","lodash/collection/partition.js","lodash/collection/pluck.js","lodash/collection/reduce.js","lodash/collection/reduceRight.js","lodash/collection/reject.js","lodash/collection/sample.js","lodash/collection/select.js","lodash/collection/shuffle.js","lodash/collection/size.js","lodash/collection/some.js","lodash/collection/sortBy.js","lodash/collection/sortByAll.js","lodash/collection/sortByOrder.js","lodash/collection/sum.js","lodash/collection/where.js","lodash/collection.js","lodash/date/now.js","lodash/date.js","lodash/function/after.js","lodash/function/ary.js","lodash/function/backflow.js","lodash/function/before.js","lodash/function/bind.js","lodash/function/bindAll.js","lodash/function/bindKey.js","lodash/function/compose.js","lodash/function/curry.js","lodash/function/curryRight.js","lodash/function/debounce.js","lodash/function/defer.js","lodash/function/delay.js","lodash/function/flow.js","lodash/function/flowRight.js","lodash/function/memoize.js","lodash/function/modArgs.js","lodash/function/negate.js","lodash/function/once.js","lodash/function/partial.js","lodash/function/partialRight.js","lodash/function/rearg.js","lodash/function/restParam.js","lodash/function/spread.js","lodash/function/throttle.js","lodash/function/wrap.js","lodash/function.js","lodash/index.js","lodash/internal/LazyWrapper.js","lodash/internal/LodashWrapper.js","lodash/internal/MapCache.js","lodash/internal/SetCache.js","lodash/internal/arrayConcat.js","lodash/internal/arrayCopy.js","lodash/internal/arrayEach.js","lodash/internal/arrayEachRight.js","lodash/internal/arrayEvery.js","lodash/internal/arrayExtremum.js","lodash/internal/arrayFilter.js","lodash/internal/arrayMap.js","lodash/internal/arrayPush.js","lodash/internal/arrayReduce.js","lodash/internal/arrayReduceRight.js","lodash/internal/arraySome.js","lodash/internal/arraySum.js","lodash/internal/assignDefaults.js","lodash/internal/assignOwnDefaults.js","lodash/internal/assignWith.js","lodash/internal/baseAssign.js","lodash/internal/baseAt.js","lodash/internal/baseCallback.js","lodash/internal/baseClone.js","lodash/internal/baseCompareAscending.js","lodash/internal/baseCopy.js","lodash/internal/baseCreate.js","lodash/internal/baseDelay.js","lodash/internal/baseDifference.js","lodash/internal/baseEach.js","lodash/internal/baseEachRight.js","lodash/internal/baseEvery.js","lodash/internal/baseExtremum.js","lodash/internal/baseFill.js","lodash/internal/baseFilter.js","lodash/internal/baseFind.js","lodash/internal/baseFindIndex.js","lodash/internal/baseFlatten.js","lodash/internal/baseFor.js","lodash/internal/baseForIn.js","lodash/internal/baseForOwn.js","lodash/internal/baseForOwnRight.js","lodash/internal/baseForRight.js","lodash/internal/baseFunctions.js","lodash/internal/baseGet.js","lodash/internal/baseIndexOf.js","lodash/internal/baseIsEqual.js","lodash/internal/baseIsEqualDeep.js","lodash/internal/baseIsFunction.js","lodash/internal/baseIsMatch.js","lodash/internal/baseLodash.js","lodash/internal/baseMap.js","lodash/internal/baseMatches.js","lodash/internal/baseMatchesProperty.js","lodash/internal/baseMerge.js","lodash/internal/baseMergeDeep.js","lodash/internal/baseProperty.js","lodash/internal/basePropertyDeep.js","lodash/internal/basePullAt.js","lodash/internal/baseRandom.js","lodash/internal/baseReduce.js","lodash/internal/baseSetData.js","lodash/internal/baseSlice.js","lodash/internal/baseSome.js","lodash/internal/baseSortBy.js","lodash/internal/baseSortByOrder.js","lodash/internal/baseSum.js","lodash/internal/baseToString.js","lodash/internal/baseUniq.js","lodash/internal/baseValues.js","lodash/internal/baseWhile.js","lodash/internal/baseWrapperValue.js","lodash/internal/binaryIndex.js","lodash/internal/binaryIndexBy.js","lodash/internal/bindCallback.js","lodash/internal/bufferClone.js","lodash/internal/cacheIndexOf.js","lodash/internal/cachePush.js","lodash/internal/charsLeftIndex.js","lodash/internal/charsRightIndex.js","lodash/internal/compareAscending.js","lodash/internal/compareMultiple.js","lodash/internal/composeArgs.js","lodash/internal/composeArgsRight.js","lodash/internal/createAggregator.js","lodash/internal/createAssigner.js","lodash/internal/createBaseEach.js","lodash/internal/createBaseFor.js","lodash/internal/createBindWrapper.js","lodash/internal/createCache.js","lodash/internal/createCompounder.js","lodash/internal/createCtorWrapper.js","lodash/internal/createCurry.js","lodash/internal/createDefaults.js","lodash/internal/createExtremum.js","lodash/internal/createFind.js","lodash/internal/createFindIndex.js","lodash/internal/createFindKey.js","lodash/internal/createFlow.js","lodash/internal/createForEach.js","lodash/internal/createForIn.js","lodash/internal/createForOwn.js","lodash/internal/createHybridWrapper.js","lodash/internal/createObjectMapper.js","lodash/internal/createPadDir.js","lodash/internal/createPadding.js","lodash/internal/createPartial.js","lodash/internal/createPartialWrapper.js","lodash/internal/createReduce.js","lodash/internal/createRound.js","lodash/internal/createSortedIndex.js","lodash/internal/createWrapper.js","lodash/internal/deburrLetter.js","lodash/internal/equalArrays.js","lodash/internal/equalByTag.js","lodash/internal/equalObjects.js","lodash/internal/escapeHtmlChar.js","lodash/internal/escapeRegExpChar.js","lodash/internal/escapeStringChar.js","lodash/internal/getData.js","lodash/internal/getFuncName.js","lodash/internal/getLength.js","lodash/internal/getMatchData.js","lodash/internal/getNative.js","lodash/internal/getView.js","lodash/internal/indexOfNaN.js","lodash/internal/initCloneArray.js","lodash/internal/initCloneByTag.js","lodash/internal/initCloneObject.js","lodash/internal/invokePath.js","lodash/internal/isArrayLike.js","lodash/internal/isIndex.js","lodash/internal/isIterateeCall.js","lodash/internal/isKey.js","lodash/internal/isLaziable.js","lodash/internal/isLength.js","lodash/internal/isObjectLike.js","lodash/internal/isSpace.js","lodash/internal/isStrictComparable.js","lodash/internal/lazyClone.js","lodash/internal/lazyReverse.js","lodash/internal/lazyValue.js","lodash/internal/mapDelete.js","lodash/internal/mapGet.js","lodash/internal/mapHas.js","lodash/internal/mapSet.js","lodash/internal/mergeData.js","lodash/internal/mergeDefaults.js","lodash/internal/metaMap.js","lodash/internal/pickByArray.js","lodash/internal/pickByCallback.js","lodash/internal/reEscape.js","lodash/internal/reEvaluate.js","lodash/internal/reInterpolate.js","lodash/internal/realNames.js","lodash/internal/reorder.js","lodash/internal/replaceHolders.js","lodash/internal/root.js","lodash/internal/setData.js","lodash/internal/shimKeys.js","lodash/internal/sortedUniq.js","lodash/internal/toIterable.js","lodash/internal/toObject.js","lodash/internal/toPath.js","lodash/internal/trimmedLeftIndex.js","lodash/internal/trimmedRightIndex.js","lodash/internal/unescapeHtmlChar.js","lodash/internal/wrapperClone.js","lodash/lang/clone.js","lodash/lang/cloneDeep.js","lodash/lang/eq.js","lodash/lang/gt.js","lodash/lang/gte.js","lodash/lang/isArguments.js","lodash/lang/isArray.js","lodash/lang/isBoolean.js","lodash/lang/isDate.js","lodash/lang/isElement.js","lodash/lang/isEmpty.js","lodash/lang/isEqual.js","lodash/lang/isError.js","lodash/lang/isFinite.js","lodash/lang/isFunction.js","lodash/lang/isMatch.js","lodash/lang/isNaN.js","lodash/lang/isNative.js","lodash/lang/isNull.js","lodash/lang/isNumber.js","lodash/lang/isObject.js","lodash/lang/isPlainObject.js","lodash/lang/isRegExp.js","lodash/lang/isString.js","lodash/lang/isTypedArray.js","lodash/lang/isUndefined.js","lodash/lang/lt.js","lodash/lang/lte.js","lodash/lang/toArray.js","lodash/lang/toPlainObject.js","lodash/lang.js","lodash/lodash.js","lodash/math/add.js","lodash/math/ceil.js","lodash/math/floor.js","lodash/math/max.js","lodash/math/min.js","lodash/math/round.js","lodash/math/sum.js","lodash/math.js","lodash/number/inRange.js","lodash/number/random.js","lodash/number.js","lodash/object/assign.js","lodash/object/create.js","lodash/object/defaults.js","lodash/object/defaultsDeep.js","lodash/object/extend.js","lodash/object/findKey.js","lodash/object/findLastKey.js","lodash/object/forIn.js","lodash/object/forInRight.js","lodash/object/forOwn.js","lodash/object/forOwnRight.js","lodash/object/functions.js","lodash/object/get.js","lodash/object/has.js","lodash/object/invert.js","lodash/object/keys.js","lodash/object/keysIn.js","lodash/object/mapKeys.js","lodash/object/mapValues.js","lodash/object/merge.js","lodash/object/methods.js","lodash/object/omit.js","lodash/object/pairs.js","lodash/object/pick.js","lodash/object/result.js","lodash/object/set.js","lodash/object/transform.js","lodash/object/values.js","lodash/object/valuesIn.js","lodash/object.js","lodash/string/camelCase.js","lodash/string/capitalize.js","lodash/string/deburr.js","lodash/string/endsWith.js","lodash/string/escape.js","lodash/string/escapeRegExp.js","lodash/string/kebabCase.js","lodash/string/pad.js","lodash/string/padLeft.js","lodash/string/padRight.js","lodash/string/parseInt.js","lodash/string/repeat.js","lodash/string/snakeCase.js","lodash/string/startCase.js","lodash/string/startsWith.js","lodash/string/template.js","lodash/string/templateSettings.js","lodash/string/trim.js","lodash/string/trimLeft.js","lodash/string/trimRight.js","lodash/string/trunc.js","lodash/string/unescape.js","lodash/string/words.js","lodash/string.js","lodash/support.js","lodash/utility/attempt.js","lodash/utility/callback.js","lodash/utility/constant.js","lodash/utility/identity.js","lodash/utility/iteratee.js","lodash/utility/matches.js","lodash/utility/matchesProperty.js","lodash/utility/method.js","lodash/utility/methodOf.js","lodash/utility/mixin.js","lodash/utility/noop.js","lodash/utility/property.js","lodash/utility/propertyOf.js","lodash/utility/range.js","lodash/utility/times.js","lodash/utility/uniqueId.js","lodash/utility.js","vendor/ember-cli/vendor-suffix.js"],"sourcesContent":["/* jshint ignore:start */\n\nwindow.EmberENV = {\"FEATURES\":{}};\nvar runningTests = false;\n\n\n\n/* jshint ignore:end */\n","var loader, define, requireModule, require, requirejs;\n\n(function(global) {\n 'use strict';\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(name) {\n stats.require++;\n var pending = [];\n var mod = findModule(name, '(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 function resetStats() {\n stats = {\n define: 0,\n require: 0,\n reify: 0,\n findDeps: 0,\n modules: 0,\n exports: 0,\n resolve: 0,\n resolveRelative: 0,\n findModule: 0,\n pendingQueueLength: 0\n };\n requirejs._stats = stats;\n }\n\n var stats;\n\n resetStats();\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 };\n\n var _isArray;\n if (!Array.isArray) {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n } else {\n _isArray = Array.isArray;\n }\n\n var registry = {};\n var seen = {};\n\n var uuid = 0;\n\n function unsupportedModule(length) {\n throw new Error('an unsupported module was defined, expected `define(name, deps, module)` instead got: `' +\n length + '` arguments to define`');\n }\n\n var defaultDeps = ['require', 'exports', 'module'];\n\n function Module(name, deps, callback, alias) {\n stats.modules++;\n this.id = uuid++;\n this.name = name;\n this.deps = !deps.length && callback.length ? defaultDeps : deps;\n this.module = { exports: {} };\n this.callback = callback;\n this.finalized = false;\n this.hasExportsAsDep = false;\n this.isAlias = alias;\n this.reified = new Array(deps.length);\n this._foundDeps = false;\n this.isPending = false;\n }\n\n Module.prototype.makeDefaultExport = function() {\n var exports = this.module.exports;\n if (exports !== null &&\n (typeof exports === 'object' || typeof exports === 'function') &&\n exports['default'] === undefined) {\n exports['default'] = exports;\n }\n };\n\n Module.prototype.exports = function() {\n if (this.finalized) { return this.module.exports; }\n stats.exports++;\n\n this.finalized = true;\n this.isPending = false;\n\n if (loader.wrapModules) {\n this.callback = loader.wrapModules(this.name, this.callback);\n }\n\n this.reify();\n\n var result = this.callback.apply(this, this.reified);\n\n if (!(this.hasExportsAsDep && result === undefined)) {\n this.module.exports = result;\n }\n this.makeDefaultExport();\n return this.module.exports;\n };\n\n Module.prototype.unsee = function() {\n this.finalized = false;\n this._foundDeps = false;\n this.isPending = false;\n this.module = { exports: {}};\n };\n\n Module.prototype.reify = function() {\n stats.reify++;\n var reified = this.reified;\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 };\n\n Module.prototype.findDeps = function(pending) {\n if (this._foundDeps) {\n return;\n }\n\n stats.findDeps++;\n this._foundDeps = true;\n this.isPending = true;\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.name), this.name, pending);\n }\n }\n };\n\n Module.prototype.makeRequire = function() {\n var name = this.name;\n var r = function(dep) {\n return require(resolve(dep, name));\n };\n r['default'] = r;\n r.has = function(dep) {\n return has(resolve(dep, name));\n }\n return r;\n };\n\n define = function(name, deps, callback) {\n stats.define++;\n if (arguments.length < 2) {\n unsupportedModule(arguments.length);\n }\n\n if (!_isArray(deps)) {\n callback = deps;\n deps = [];\n }\n\n if (callback instanceof Alias) {\n registry[name] = new Module(callback.name, deps, callback, true);\n } else {\n registry[name] = new Module(name, deps, callback, false);\n }\n };\n\n // we don't support all of AMD\n // define.amd = {};\n // we will support petals...\n define.petal = { };\n\n function Alias(path) {\n this.name = path;\n }\n\n define.alias = function(path) {\n return new Alias(path);\n };\n\n function missingModule(name, referrer) {\n throw new Error('Could not find module `' + name + '` imported from `' + referrer + '`');\n }\n\n function findModule(name, referrer, pending) {\n stats.findModule++;\n var mod = registry[name] || registry[name + '/index'];\n\n while (mod && mod.isAlias) {\n mod = registry[mod.name];\n }\n\n if (!mod) { missingModule(name, referrer); }\n\n if (pending && !mod.finalized && !mod.isPending) {\n mod.findDeps(pending);\n pending.push(mod);\n stats.pendingQueueLength++;\n }\n return mod;\n }\n\n function resolve(child, name) {\n stats.resolve++;\n if (child.charAt(0) !== '.') { return child; }\n stats.resolveRelative++;\n\n var parts = child.split('/');\n var nameParts = name.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 { parentBase.push(part); }\n }\n\n return parentBase.join('/');\n }\n\n function has(name) {\n return !!(registry[name] || registry[name + '/index']);\n }\n\n requirejs.entries = requirejs._eak_seen = registry;\n requirejs.has = has;\n requirejs.unsee = function(moduleName) {\n findModule(moduleName, '(unsee)', false).unsee();\n };\n\n requirejs.clear = function() {\n resetStats();\n requirejs.entries = requirejs._eak_seen = registry = {};\n seen = {};\n };\n\n // prime\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('foo/bar', ['foo', './quz', './baz', './asdf', './bar', '../foo'], function() {});\n define('foo/main', ['foo/bar'], function() {});\n\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);\n","/*!\n * jQuery JavaScript Library v2.2.4\n * http://jquery.com/\n *\n * Includes Sizzle.js\n * http://sizzlejs.com/\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2016-05-20T17:23Z\n */\n\n(function( global, factory ) {\n\n\tif ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\n\t\t// is present, execute the factory and get jQuery.\n\t\t// For environments that do not have a `window` with a `document`\n\t\t// (such as Node.js), expose a factory as module.exports.\n\t\t// This accentuates the need for the creation of a real `window`.\n\t\t// e.g. var jQuery = require(\"jquery\")(window);\n\t\t// See ticket #14549 for more info.\n\t\tmodule.exports = global.document ?\n\t\t\tfactory( global, true ) :\n\t\t\tfunction( w ) {\n\t\t\t\tif ( !w.document ) {\n\t\t\t\t\tthrow new Error( \"jQuery requires a window with a document\" );\n\t\t\t\t}\n\t\t\t\treturn factory( w );\n\t\t\t};\n\t} else {\n\t\tfactory( global );\n\t}\n\n// Pass this if window is not defined yet\n}(typeof window !== \"undefined\" ? window : this, function( window, noGlobal ) {\n\n// Support: Firefox 18+\n// Can't be in strict mode, several libs including ASP.NET trace\n// the stack via arguments.caller.callee and Firefox dies if\n// you try to trace through \"use strict\" call chains. (#13335)\n//\"use strict\";\nvar arr = [];\n\nvar document = window.document;\n\nvar slice = arr.slice;\n\nvar concat = arr.concat;\n\nvar push = arr.push;\n\nvar indexOf = arr.indexOf;\n\nvar class2type = {};\n\nvar toString = class2type.toString;\n\nvar hasOwn = class2type.hasOwnProperty;\n\nvar support = {};\n\n\n\nvar\n\tversion = \"2.2.4\",\n\n\t// Define a local copy of jQuery\n\tjQuery = function( selector, context ) {\n\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\t// Need init if jQuery is called (just allow error to be thrown if not included)\n\t\treturn new jQuery.fn.init( selector, context );\n\t},\n\n\t// Support: Android<4.1\n\t// Make sure we trim BOM and NBSP\n\trtrim = /^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,\n\n\t// Matches dashed string for camelizing\n\trmsPrefix = /^-ms-/,\n\trdashAlpha = /-([\\da-z])/gi,\n\n\t// Used by jQuery.camelCase as callback to replace()\n\tfcamelCase = function( all, letter ) {\n\t\treturn letter.toUpperCase();\n\t};\n\njQuery.fn = jQuery.prototype = {\n\n\t// The current version of jQuery being used\n\tjquery: version,\n\n\tconstructor: jQuery,\n\n\t// Start with an empty selector\n\tselector: \"\",\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\ttoArray: function() {\n\t\treturn slice.call( this );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\t\treturn num != null ?\n\n\t\t\t// Return just the one element from the set\n\t\t\t( num < 0 ? this[ num + this.length ] : this[ num ] ) :\n\n\t\t\t// Return all the elements in a clean array\n\t\t\tslice.call( this );\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\t\tret.context = this.context;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\teach: function( callback ) {\n\t\treturn jQuery.each( this, callback );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map( this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t} ) );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ) );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\teq: function( i ) {\n\t\tvar len = this.length,\n\t\t\tj = +i + ( i < 0 ? len : 0 );\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor();\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: push,\n\tsort: arr.sort,\n\tsplice: arr.splice\n};\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[ 0 ] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\n\t\t// Skip the boolean and the target\n\t\ttarget = arguments[ i ] || {};\n\t\ti++;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !jQuery.isFunction( target ) ) {\n\t\ttarget = {};\n\t}\n\n\t// Extend jQuery itself if only one argument is passed\n\tif ( i === length ) {\n\t\ttarget = this;\n\t\ti--;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\n\t\t// Only deal with non-null/undefined values\n\t\tif ( ( options = arguments[ i ] ) != null ) {\n\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tsrc = target[ name ];\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject( copy ) ||\n\t\t\t\t\t( copyIsArray = jQuery.isArray( copy ) ) ) ) {\n\n\t\t\t\t\tif ( copyIsArray ) {\n\t\t\t\t\t\tcopyIsArray = false;\n\t\t\t\t\t\tclone = src && jQuery.isArray( src ) ? src : [];\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src && jQuery.isPlainObject( src ) ? src : {};\n\t\t\t\t\t}\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend( {\n\n\t// Unique for each copy of jQuery on the page\n\texpando: \"jQuery\" + ( version + Math.random() ).replace( /\\D/g, \"\" ),\n\n\t// Assume jQuery is ready without the ready module\n\tisReady: true,\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\tnoop: function() {},\n\n\tisFunction: function( obj ) {\n\t\treturn jQuery.type( obj ) === \"function\";\n\t},\n\n\tisArray: Array.isArray,\n\n\tisWindow: function( obj ) {\n\t\treturn obj != null && obj === obj.window;\n\t},\n\n\tisNumeric: function( obj ) {\n\n\t\t// parseFloat NaNs numeric-cast false positives (null|true|false|\"\")\n\t\t// ...but misinterprets leading-number strings, particularly hex literals (\"0x...\")\n\t\t// subtraction forces infinities to NaN\n\t\t// adding 1 corrects loss of precision from parseFloat (#15100)\n\t\tvar realStringObj = obj && obj.toString();\n\t\treturn !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0;\n\t},\n\n\tisPlainObject: function( obj ) {\n\t\tvar key;\n\n\t\t// Not plain objects:\n\t\t// - Any object or value whose internal [[Class]] property is not \"[object Object]\"\n\t\t// - DOM nodes\n\t\t// - window\n\t\tif ( jQuery.type( obj ) !== \"object\" || obj.nodeType || jQuery.isWindow( obj ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Not own constructor property must be Object\n\t\tif ( obj.constructor &&\n\t\t\t\t!hasOwn.call( obj, \"constructor\" ) &&\n\t\t\t\t!hasOwn.call( obj.constructor.prototype || {}, \"isPrototypeOf\" ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Own properties are enumerated firstly, so to speed up,\n\t\t// if last one is own, then all properties are own\n\t\tfor ( key in obj ) {}\n\n\t\treturn key === undefined || hasOwn.call( obj, key );\n\t},\n\n\tisEmptyObject: function( obj ) {\n\t\tvar name;\n\t\tfor ( name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\ttype: function( obj ) {\n\t\tif ( obj == null ) {\n\t\t\treturn obj + \"\";\n\t\t}\n\n\t\t// Support: Android<4.0, iOS<6 (functionish RegExp)\n\t\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\n\t\t\tclass2type[ toString.call( obj ) ] || \"object\" :\n\t\t\ttypeof obj;\n\t},\n\n\t// Evaluates a script in a global context\n\tglobalEval: function( code ) {\n\t\tvar script,\n\t\t\tindirect = eval;\n\n\t\tcode = jQuery.trim( code );\n\n\t\tif ( code ) {\n\n\t\t\t// If the code includes a valid, prologue position\n\t\t\t// strict mode pragma, execute code by injecting a\n\t\t\t// script tag into the document.\n\t\t\tif ( code.indexOf( \"use strict\" ) === 1 ) {\n\t\t\t\tscript = document.createElement( \"script\" );\n\t\t\t\tscript.text = code;\n\t\t\t\tdocument.head.appendChild( script ).parentNode.removeChild( script );\n\t\t\t} else {\n\n\t\t\t\t// Otherwise, avoid the DOM node creation, insertion\n\t\t\t\t// and removal by using an indirect global eval\n\n\t\t\t\tindirect( code );\n\t\t\t}\n\t\t}\n\t},\n\n\t// Convert dashed to camelCase; used by the css and data modules\n\t// Support: IE9-11+\n\t// Microsoft forgot to hump their vendor prefix (#9572)\n\tcamelCase: function( string ) {\n\t\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n\t},\n\n\tnodeName: function( elem, name ) {\n\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n\t},\n\n\teach: function( obj, callback ) {\n\t\tvar length, i = 0;\n\n\t\tif ( isArrayLike( obj ) ) {\n\t\t\tlength = obj.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i in obj ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t},\n\n\t// Support: Android<4.1\n\ttrim: function( text ) {\n\t\treturn text == null ?\n\t\t\t\"\" :\n\t\t\t( text + \"\" ).replace( rtrim, \"\" );\n\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( arr, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( arr != null ) {\n\t\t\tif ( isArrayLike( Object( arr ) ) ) {\n\t\t\t\tjQuery.merge( ret,\n\t\t\t\t\ttypeof arr === \"string\" ?\n\t\t\t\t\t[ arr ] : arr\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tpush.call( ret, arr );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, arr, i ) {\n\t\treturn arr == null ? -1 : indexOf.call( arr, elem, i );\n\t},\n\n\tmerge: function( first, second ) {\n\t\tvar len = +second.length,\n\t\t\tj = 0,\n\t\t\ti = first.length;\n\n\t\tfor ( ; j < len; j++ ) {\n\t\t\tfirst[ i++ ] = second[ j ];\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, invert ) {\n\t\tvar callbackInverse,\n\t\t\tmatches = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tcallbackExpect = !invert;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( ; i < length; i++ ) {\n\t\t\tcallbackInverse = !callback( elems[ i ], i );\n\t\t\tif ( callbackInverse !== callbackExpect ) {\n\t\t\t\tmatches.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn matches;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar length, value,\n\t\t\ti = 0,\n\t\t\tret = [];\n\n\t\t// Go through the array, translating each of the items to their new values\n\t\tif ( isArrayLike( elems ) ) {\n\t\t\tlength = elems.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( i in elems ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn concat.apply( [], ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// Bind a function to a context, optionally partially applying any\n\t// arguments.\n\tproxy: function( fn, context ) {\n\t\tvar tmp, args, proxy;\n\n\t\tif ( typeof context === \"string\" ) {\n\t\t\ttmp = fn[ context ];\n\t\t\tcontext = fn;\n\t\t\tfn = tmp;\n\t\t}\n\n\t\t// Quick check to determine if target is callable, in the spec\n\t\t// this throws a TypeError, but we will just return undefined.\n\t\tif ( !jQuery.isFunction( fn ) ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// Simulated bind\n\t\targs = slice.call( arguments, 2 );\n\t\tproxy = function() {\n\t\t\treturn fn.apply( context || this, args.concat( slice.call( arguments ) ) );\n\t\t};\n\n\t\t// Set the guid of unique handler to the same of original handler, so it can be removed\n\t\tproxy.guid = fn.guid = fn.guid || jQuery.guid++;\n\n\t\treturn proxy;\n\t},\n\n\tnow: Date.now,\n\n\t// jQuery.support is not used in Core but other projects attach their\n\t// properties to it so it needs to exist.\n\tsupport: support\n} );\n\n// JSHint would error on this code due to the Symbol not being defined in ES5.\n// Defining this global in .jshintrc would create a danger of using the global\n// unguarded in another place, it seems safer to just disable JSHint for these\n// three lines.\n/* jshint ignore: start */\nif ( typeof Symbol === \"function\" ) {\n\tjQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];\n}\n/* jshint ignore: end */\n\n// Populate the class2type map\njQuery.each( \"Boolean Number String Function Array Date RegExp Object Error Symbol\".split( \" \" ),\nfunction( i, name ) {\n\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n} );\n\nfunction isArrayLike( obj ) {\n\n\t// Support: iOS 8.2 (not reproducible in simulator)\n\t// `in` check used to prevent JIT error (gh-2145)\n\t// hasOwn isn't used here due to false negatives\n\t// regarding Nodelist length in IE\n\tvar length = !!obj && \"length\" in obj && obj.length,\n\t\ttype = jQuery.type( obj );\n\n\tif ( type === \"function\" || jQuery.isWindow( obj ) ) {\n\t\treturn false;\n\t}\n\n\treturn type === \"array\" || length === 0 ||\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj;\n}\nvar Sizzle =\n/*!\n * Sizzle CSS Selector Engine v2.2.1\n * http://sizzlejs.com/\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2015-10-17\n */\n(function( window ) {\n\nvar i,\n\tsupport,\n\tExpr,\n\tgetText,\n\tisXML,\n\ttokenize,\n\tcompile,\n\tselect,\n\toutermostContext,\n\tsortInput,\n\thasDuplicate,\n\n\t// Local document vars\n\tsetDocument,\n\tdocument,\n\tdocElem,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\trbuggyMatches,\n\tmatches,\n\tcontains,\n\n\t// Instance-specific data\n\texpando = \"sizzle\" + 1 * new Date(),\n\tpreferredDoc = window.document,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn 0;\n\t},\n\n\t// General-purpose constants\n\tMAX_NEGATIVE = 1 << 31,\n\n\t// Instance methods\n\thasOwn = ({}).hasOwnProperty,\n\tarr = [],\n\tpop = arr.pop,\n\tpush_native = arr.push,\n\tpush = arr.push,\n\tslice = arr.slice,\n\t// Use a stripped-down indexOf as it's faster than native\n\t// http://jsperf.com/thor-indexof-vs-for/5\n\tindexOf = function( list, elem ) {\n\t\tvar i = 0,\n\t\t\tlen = list.length;\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( list[i] === elem ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// http://www.w3.org/TR/css3-selectors/#whitespace\n\twhitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",\n\n\t// http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier\n\tidentifier = \"(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+\",\n\n\t// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\n\t\t// Operator (capture 2)\n\t\t\"*([*^$|!~]?=)\" + whitespace +\n\t\t// \"Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]\"\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" + whitespace +\n\t\t\"*\\\\]\",\n\n\tpseudos = \":(\" + identifier + \")(?:\\\\((\" +\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\n\t\t\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\n\t\t// 2. simple (capture 6)\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\n\t\t// 3. anything else (capture 2)\n\t\t\".*\" +\n\t\t\")\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trwhitespace = new RegExp( whitespace + \"+\", \"g\" ),\n\trtrim = new RegExp( \"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trcombinators = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" + whitespace + \"*\" ),\n\n\trattributeQuotes = new RegExp( \"=\" + whitespace + \"*([^\\\\]'\\\"]*?)\" + whitespace + \"*\\\\]\", \"g\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\t\"ID\": new RegExp( \"^#(\" + identifier + \")\" ),\n\t\t\"CLASS\": new RegExp( \"^\\\\.(\" + identifier + \")\" ),\n\t\t\"TAG\": new RegExp( \"^(\" + identifier + \"|[*])\" ),\n\t\t\"ATTR\": new RegExp( \"^\" + attributes ),\n\t\t\"PSEUDO\": new RegExp( \"^\" + pseudos ),\n\t\t\"CHILD\": new RegExp( \"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" + whitespace +\n\t\t\t\"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" + whitespace +\n\t\t\t\"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\t\"bool\": new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\t\"needsContext\": new RegExp( \"^\" + whitespace + \"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" +\n\t\t\twhitespace + \"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\trnative = /^[^{]+\\{\\s*\\[native \\w/,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trsibling = /[+~]/,\n\trescape = /'|\\\\/g,\n\n\t// CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\([\\\\da-f]{1,6}\" + whitespace + \"?|(\" + whitespace + \")|.)\", \"ig\" ),\n\tfunescape = function( _, escaped, escapedWhitespace ) {\n\t\tvar high = \"0x\" + escaped - 0x10000;\n\t\t// NaN means non-codepoint\n\t\t// Support: Firefox<24\n\t\t// Workaround erroneous numeric interpretation of +\"0x\"\n\t\treturn high !== high || escapedWhitespace ?\n\t\t\tescaped :\n\t\t\thigh < 0 ?\n\t\t\t\t// BMP codepoint\n\t\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\t\t// Supplemental Plane codepoint (surrogate pair)\n\t\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t},\n\n\t// Used for iframes\n\t// See setDocument()\n\t// Removing the function wrapper causes a \"Permission Denied\"\n\t// error in IE\n\tunloadHandler = function() {\n\t\tsetDocument();\n\t};\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t(arr = slice.call( preferredDoc.childNodes )),\n\t\tpreferredDoc.childNodes\n\t);\n\t// Support: Android<4.0\n\t// Detect silently failing push.apply\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = { apply: arr.length ?\n\n\t\t// Leverage slice if possible\n\t\tfunction( target, els ) {\n\t\t\tpush_native.apply( target, slice.call(els) );\n\t\t} :\n\n\t\t// Support: IE<9\n\t\t// Otherwise append directly\n\t\tfunction( target, els ) {\n\t\t\tvar j = target.length,\n\t\t\t\ti = 0;\n\t\t\t// Can't trust NodeList.length\n\t\t\twhile ( (target[j++] = els[i++]) ) {}\n\t\t\ttarget.length = j - 1;\n\t\t}\n\t};\n}\n\nfunction Sizzle( selector, context, results, seed ) {\n\tvar m, i, elem, nid, nidselect, match, groups, newSelector,\n\t\tnewContext = context && context.ownerDocument,\n\n\t\t// nodeType defaults to 9, since context defaults to document\n\t\tnodeType = context ? context.nodeType : 9;\n\n\tresults = results || [];\n\n\t// Return early from calls with invalid selector or context\n\tif ( typeof selector !== \"string\" || !selector ||\n\t\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\n\n\t\treturn results;\n\t}\n\n\t// Try to shortcut find operations (as opposed to filters) in HTML documents\n\tif ( !seed ) {\n\n\t\tif ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {\n\t\t\tsetDocument( context );\n\t\t}\n\t\tcontext = context || document;\n\n\t\tif ( documentIsHTML ) {\n\n\t\t\t// If the selector is sufficiently simple, try using a \"get*By*\" DOM method\n\t\t\t// (excepting DocumentFragment context, where the methods don't exist)\n\t\t\tif ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {\n\n\t\t\t\t// ID selector\n\t\t\t\tif ( (m = match[1]) ) {\n\n\t\t\t\t\t// Document context\n\t\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\t\tif ( (elem = context.getElementById( m )) ) {\n\n\t\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// Element context\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\tif ( newContext && (elem = newContext.getElementById( m )) &&\n\t\t\t\t\t\t\tcontains( context, elem ) &&\n\t\t\t\t\t\t\telem.id === m ) {\n\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// Type selector\n\t\t\t\t} else if ( match[2] ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\t\treturn results;\n\n\t\t\t\t// Class selector\n\t\t\t\t} else if ( (m = match[3]) && support.getElementsByClassName &&\n\t\t\t\t\tcontext.getElementsByClassName ) {\n\n\t\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\t\treturn results;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Take advantage of querySelectorAll\n\t\t\tif ( support.qsa &&\n\t\t\t\t!compilerCache[ selector + \" \" ] &&\n\t\t\t\t(!rbuggyQSA || !rbuggyQSA.test( selector )) ) {\n\n\t\t\t\tif ( nodeType !== 1 ) {\n\t\t\t\t\tnewContext = context;\n\t\t\t\t\tnewSelector = selector;\n\n\t\t\t\t// qSA looks outside Element context, which is not what we want\n\t\t\t\t// Thanks to Andrew Dupont for this workaround technique\n\t\t\t\t// Support: IE <=8\n\t\t\t\t// Exclude object elements\n\t\t\t\t} else if ( context.nodeName.toLowerCase() !== \"object\" ) {\n\n\t\t\t\t\t// Capture the context ID, setting it first if necessary\n\t\t\t\t\tif ( (nid = context.getAttribute( \"id\" )) ) {\n\t\t\t\t\t\tnid = nid.replace( rescape, \"\\\\$&\" );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcontext.setAttribute( \"id\", (nid = expando) );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prefix every selector in the list\n\t\t\t\t\tgroups = tokenize( selector );\n\t\t\t\t\ti = groups.length;\n\t\t\t\t\tnidselect = ridentifier.test( nid ) ? \"#\" + nid : \"[id='\" + nid + \"']\";\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tgroups[i] = nidselect + \" \" + toSelector( groups[i] );\n\t\t\t\t\t}\n\t\t\t\t\tnewSelector = groups.join( \",\" );\n\n\t\t\t\t\t// Expand context for sibling selectors\n\t\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext;\n\t\t\t\t}\n\n\t\t\t\tif ( newSelector ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t} catch ( qsaError ) {\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif ( nid === expando ) {\n\t\t\t\t\t\t\tcontext.removeAttribute( \"id\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrim, \"$1\" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\t\t// Use (key + \" \") to avoid collision with native prototype properties (see Issue #157)\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn (cache[ key + \" \" ] = value);\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by Sizzle\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created div and expects a boolean result\n */\nfunction assert( fn ) {\n\tvar div = document.createElement(\"div\");\n\n\ttry {\n\t\treturn !!fn( div );\n\t} catch (e) {\n\t\treturn false;\n\t} finally {\n\t\t// Remove from its parent by default\n\t\tif ( div.parentNode ) {\n\t\t\tdiv.parentNode.removeChild( div );\n\t\t}\n\t\t// release memory in IE\n\t\tdiv = null;\n\t}\n}\n\n/**\n * Adds the same handler for all of the specified attrs\n * @param {String} attrs Pipe-separated list of attributes\n * @param {Function} handler The method that will be applied\n */\nfunction addHandle( attrs, handler ) {\n\tvar arr = attrs.split(\"|\"),\n\t\ti = arr.length;\n\n\twhile ( i-- ) {\n\t\tExpr.attrHandle[ arr[i] ] = handler;\n\t}\n}\n\n/**\n * Checks document order of two siblings\n * @param {Element} a\n * @param {Element} b\n * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b\n */\nfunction siblingCheck( a, b ) {\n\tvar cur = b && a,\n\t\tdiff = cur && a.nodeType === 1 && b.nodeType === 1 &&\n\t\t\t( ~b.sourceIndex || MAX_NEGATIVE ) -\n\t\t\t( ~a.sourceIndex || MAX_NEGATIVE );\n\n\t// Use IE sourceIndex if available on both nodes\n\tif ( diff ) {\n\t\treturn diff;\n\t}\n\n\t// Check if b follows a\n\tif ( cur ) {\n\t\twhile ( (cur = cur.nextSibling) ) {\n\t\t\tif ( cur === b ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn a ? 1 : -1;\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn name === \"input\" && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn (name === \"input\" || name === \"button\") && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction(function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction(function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ (j = matchIndexes[i]) ] ) {\n\t\t\t\t\tseed[j] = !(matches[j] = seed[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n}\n\n/**\n * Checks a node for validity as a Sizzle context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\nfunction testContext( context ) {\n\treturn context && typeof context.getElementsByTagName !== \"undefined\" && context;\n}\n\n// Expose support vars for convenience\nsupport = Sizzle.support = {};\n\n/**\n * Detects XML nodes\n * @param {Element|Object} elem An element or a document\n * @returns {Boolean} True iff elem is a non-HTML XML node\n */\nisXML = Sizzle.isXML = function( elem ) {\n\t// documentElement is verified for cases where it doesn't yet exist\n\t// (such as loading iframes in IE - #4833)\n\tvar documentElement = elem && (elem.ownerDocument || elem).documentElement;\n\treturn documentElement ? documentElement.nodeName !== \"HTML\" : false;\n};\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [doc] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nsetDocument = Sizzle.setDocument = function( node ) {\n\tvar hasCompare, parent,\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc;\n\n\t// Return early if doc is invalid or already selected\n\tif ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Update global variables\n\tdocument = doc;\n\tdocElem = document.documentElement;\n\tdocumentIsHTML = !isXML( document );\n\n\t// Support: IE 9-11, Edge\n\t// Accessing iframe documents after unload throws \"permission denied\" errors (jQuery #13936)\n\tif ( (parent = document.defaultView) && parent.top !== parent ) {\n\t\t// Support: IE 11\n\t\tif ( parent.addEventListener ) {\n\t\t\tparent.addEventListener( \"unload\", unloadHandler, false );\n\n\t\t// Support: IE 9 - 10 only\n\t\t} else if ( parent.attachEvent ) {\n\t\t\tparent.attachEvent( \"onunload\", unloadHandler );\n\t\t}\n\t}\n\n\t/* Attributes\n\t---------------------------------------------------------------------- */\n\n\t// Support: IE<8\n\t// Verify that getAttribute really returns attributes and not properties\n\t// (excepting IE8 booleans)\n\tsupport.attributes = assert(function( div ) {\n\t\tdiv.className = \"i\";\n\t\treturn !div.getAttribute(\"className\");\n\t});\n\n\t/* getElement(s)By*\n\t---------------------------------------------------------------------- */\n\n\t// Check if getElementsByTagName(\"*\") returns only elements\n\tsupport.getElementsByTagName = assert(function( div ) {\n\t\tdiv.appendChild( document.createComment(\"\") );\n\t\treturn !div.getElementsByTagName(\"*\").length;\n\t});\n\n\t// Support: IE<9\n\tsupport.getElementsByClassName = rnative.test( document.getElementsByClassName );\n\n\t// Support: IE<10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don't pick up programatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert(function( div ) {\n\t\tdocElem.appendChild( div ).id = expando;\n\t\treturn !document.getElementsByName || !document.getElementsByName( expando ).length;\n\t});\n\n\t// ID find and filter\n\tif ( support.getById ) {\n\t\tExpr.find[\"ID\"] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar m = context.getElementById( id );\n\t\t\t\treturn m ? [ m ] : [];\n\t\t\t}\n\t\t};\n\t\tExpr.filter[\"ID\"] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute(\"id\") === attrId;\n\t\t\t};\n\t\t};\n\t} else {\n\t\t// Support: IE6/7\n\t\t// getElementById is not reliable as a find shortcut\n\t\tdelete Expr.find[\"ID\"];\n\n\t\tExpr.filter[\"ID\"] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" &&\n\t\t\t\t\telem.getAttributeNode(\"id\");\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find[\"TAG\"] = support.getElementsByTagName ?\n\t\tfunction( tag, context ) {\n\t\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\t\t\treturn context.getElementsByTagName( tag );\n\n\t\t\t// DocumentFragment nodes don't have gEBTN\n\t\t\t} else if ( support.qsa ) {\n\t\t\t\treturn context.querySelectorAll( tag );\n\t\t\t}\n\t\t} :\n\n\t\tfunction( tag, context ) {\n\t\t\tvar elem,\n\t\t\t\ttmp = [],\n\t\t\t\ti = 0,\n\t\t\t\t// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too\n\t\t\t\tresults = context.getElementsByTagName( tag );\n\n\t\t\t// Filter out possible comments\n\t\t\tif ( tag === \"*\" ) {\n\t\t\t\twhile ( (elem = results[i++]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\ttmp.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn tmp;\n\t\t\t}\n\t\t\treturn results;\n\t\t};\n\n\t// Class\n\tExpr.find[\"CLASS\"] = support.getElementsByClassName && function( className, context ) {\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\t// matchesSelector(:active) reports false when true (IE9/Opera 11.5)\n\trbuggyMatches = [];\n\n\t// qSa(:focus) reports false when true (Chrome 21)\n\t// We allow this because of a bug in IE8/9 that throws an error\n\t// whenever `document.activeElement` is accessed on an iframe\n\t// So, we allow :focus to pass through QSA all the time to avoid the IE error\n\t// See http://bugs.jquery.com/ticket/13378\n\trbuggyQSA = [];\n\n\tif ( (support.qsa = rnative.test( document.querySelectorAll )) ) {\n\t\t// Build QSA regex\n\t\t// Regex strategy adopted from Diego Perini\n\t\tassert(function( div ) {\n\t\t\t// Select is set to empty string on purpose\n\t\t\t// This is to test IE's treatment of not explicitly\n\t\t\t// setting a boolean content attribute,\n\t\t\t// since its presence should be enough\n\t\t\t// http://bugs.jquery.com/ticket/12359\n\t\t\tdocElem.appendChild( div ).innerHTML = \"\" +\n\t\t\t\t\"\" +\n\t\t\t\t\"\";\n\n\t\t\t// Support: IE8, Opera 11-12.16\n\t\t\t// Nothing should be selected when empty strings follow ^= or $= or *=\n\t\t\t// The test attribute must be unknown in Opera but \"safe\" for WinRT\n\t\t\t// http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section\n\t\t\tif ( div.querySelectorAll(\"[msallowcapture^='']\").length ) {\n\t\t\t\trbuggyQSA.push( \"[*^$]=\" + whitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// Support: IE8\n\t\t\t// Boolean attributes and \"value\" are not treated correctly\n\t\t\tif ( !div.querySelectorAll(\"[selected]\").length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t\t}\n\n\t\t\t// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+\n\t\t\tif ( !div.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\n\t\t\t\trbuggyQSA.push(\"~=\");\n\t\t\t}\n\n\t\t\t// Webkit/Opera - :checked should return selected option elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !div.querySelectorAll(\":checked\").length ) {\n\t\t\t\trbuggyQSA.push(\":checked\");\n\t\t\t}\n\n\t\t\t// Support: Safari 8+, iOS 8+\n\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\n\t\t\t// In-page `selector#id sibing-combinator selector` fails\n\t\t\tif ( !div.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\n\t\t\t\trbuggyQSA.push(\".#.+[+~]\");\n\t\t\t}\n\t\t});\n\n\t\tassert(function( div ) {\n\t\t\t// Support: Windows 8 Native Apps\n\t\t\t// The type and name attributes are restricted during .innerHTML assignment\n\t\t\tvar input = document.createElement(\"input\");\n\t\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\t\tdiv.appendChild( input ).setAttribute( \"name\", \"D\" );\n\n\t\t\t// Support: IE8\n\t\t\t// Enforce case-sensitivity of name attribute\n\t\t\tif ( div.querySelectorAll(\"[name=d]\").length ) {\n\t\t\t\trbuggyQSA.push( \"name\" + whitespace + \"*[*^$|!~]?=\" );\n\t\t\t}\n\n\t\t\t// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !div.querySelectorAll(\":enabled\").length ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Opera 10-11 does not throw on post-comma invalid pseudos\n\t\t\tdiv.querySelectorAll(\"*,:x\");\n\t\t\trbuggyQSA.push(\",.*:\");\n\t\t});\n\t}\n\n\tif ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||\n\t\tdocElem.webkitMatchesSelector ||\n\t\tdocElem.mozMatchesSelector ||\n\t\tdocElem.oMatchesSelector ||\n\t\tdocElem.msMatchesSelector) )) ) {\n\n\t\tassert(function( div ) {\n\t\t\t// Check to see if it's possible to do matchesSelector\n\t\t\t// on a disconnected node (IE 9)\n\t\t\tsupport.disconnectedMatch = matches.call( div, \"div\" );\n\n\t\t\t// This should fail with an exception\n\t\t\t// Gecko does not error, returns false instead\n\t\t\tmatches.call( div, \"[s!='']:x\" );\n\t\t\trbuggyMatches.push( \"!=\", pseudos );\n\t\t});\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join(\"|\") );\n\trbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join(\"|\") );\n\n\t/* Contains\n\t---------------------------------------------------------------------- */\n\thasCompare = rnative.test( docElem.compareDocumentPosition );\n\n\t// Element contains another\n\t// Purposefully self-exclusive\n\t// As in, an element does not contain itself\n\tcontains = hasCompare || rnative.test( docElem.contains ) ?\n\t\tfunction( a, b ) {\n\t\t\tvar adown = a.nodeType === 9 ? a.documentElement : a,\n\t\t\t\tbup = b && b.parentNode;\n\t\t\treturn a === bup || !!( bup && bup.nodeType === 1 && (\n\t\t\t\tadown.contains ?\n\t\t\t\t\tadown.contains( bup ) :\n\t\t\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n\t\t\t));\n\t\t} :\n\t\tfunction( a, b ) {\n\t\t\tif ( b ) {\n\t\t\t\twhile ( (b = b.parentNode) ) {\n\t\t\t\t\tif ( b === a ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\n\t/* Sorting\n\t---------------------------------------------------------------------- */\n\n\t// Document order sorting\n\tsortOrder = hasCompare ?\n\tfunction( a, b ) {\n\n\t\t// Flag for duplicate removal\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Sort on method existence if only one input has compareDocumentPosition\n\t\tvar compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\n\t\tif ( compare ) {\n\t\t\treturn compare;\n\t\t}\n\n\t\t// Calculate position if both inputs belong to the same document\n\t\tcompare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?\n\t\t\ta.compareDocumentPosition( b ) :\n\n\t\t\t// Otherwise we know they are disconnected\n\t\t\t1;\n\n\t\t// Disconnected nodes\n\t\tif ( compare & 1 ||\n\t\t\t(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {\n\n\t\t\t// Choose the first element that is related to our preferred document\n\t\t\tif ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\tif ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t// Maintain original order\n\t\t\treturn sortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\t\t}\n\n\t\treturn compare & 4 ? -1 : 1;\n\t} :\n\tfunction( a, b ) {\n\t\t// Exit early if the nodes are identical\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\taup = a.parentNode,\n\t\t\tbup = b.parentNode,\n\t\t\tap = [ a ],\n\t\t\tbp = [ b ];\n\n\t\t// Parentless nodes are either documents or disconnected\n\t\tif ( !aup || !bup ) {\n\t\t\treturn a === document ? -1 :\n\t\t\t\tb === document ? 1 :\n\t\t\t\taup ? -1 :\n\t\t\t\tbup ? 1 :\n\t\t\t\tsortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\n\t\t// If the nodes are siblings, we can do a quick check\n\t\t} else if ( aup === bup ) {\n\t\t\treturn siblingCheck( a, b );\n\t\t}\n\n\t\t// Otherwise we need full lists of their ancestors for comparison\n\t\tcur = a;\n\t\twhile ( (cur = cur.parentNode) ) {\n\t\t\tap.unshift( cur );\n\t\t}\n\t\tcur = b;\n\t\twhile ( (cur = cur.parentNode) ) {\n\t\t\tbp.unshift( cur );\n\t\t}\n\n\t\t// Walk down the tree looking for a discrepancy\n\t\twhile ( ap[i] === bp[i] ) {\n\t\t\ti++;\n\t\t}\n\n\t\treturn i ?\n\t\t\t// Do a sibling check if the nodes have a common ancestor\n\t\t\tsiblingCheck( ap[i], bp[i] ) :\n\n\t\t\t// Otherwise nodes in our document sort first\n\t\t\tap[i] === preferredDoc ? -1 :\n\t\t\tbp[i] === preferredDoc ? 1 :\n\t\t\t0;\n\t};\n\n\treturn document;\n};\n\nSizzle.matches = function( expr, elements ) {\n\treturn Sizzle( expr, null, null, elements );\n};\n\nSizzle.matchesSelector = function( elem, expr ) {\n\t// Set document vars if needed\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\n\t\tsetDocument( elem );\n\t}\n\n\t// Make sure that attribute selectors are quoted\n\texpr = expr.replace( rattributeQuotes, \"='$1']\" );\n\n\tif ( support.matchesSelector && documentIsHTML &&\n\t\t!compilerCache[ expr + \" \" ] &&\n\t\t( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&\n\t\t( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {\n\n\t\ttry {\n\t\t\tvar ret = matches.call( elem, expr );\n\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\n\t\t\tif ( ret || support.disconnectedMatch ||\n\t\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t\t// fragment in IE 9\n\t\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t} catch (e) {}\n\t}\n\n\treturn Sizzle( expr, document, null, [ elem ] ).length > 0;\n};\n\nSizzle.contains = function( context, elem ) {\n\t// Set document vars if needed\n\tif ( ( context.ownerDocument || context ) !== document ) {\n\t\tsetDocument( context );\n\t}\n\treturn contains( context, elem );\n};\n\nSizzle.attr = function( elem, name ) {\n\t// Set document vars if needed\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\n\t\t// Don't get fooled by Object.prototype properties (jQuery #13807)\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\n\t\t\tfn( elem, name, !documentIsHTML ) :\n\t\t\tundefined;\n\n\treturn val !== undefined ?\n\t\tval :\n\t\tsupport.attributes || !documentIsHTML ?\n\t\t\telem.getAttribute( name ) :\n\t\t\t(val = elem.getAttributeNode(name)) && val.specified ?\n\t\t\t\tval.value :\n\t\t\t\tnull;\n};\n\nSizzle.error = function( msg ) {\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\n};\n\n/**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\nSizzle.uniqueSort = function( results ) {\n\tvar elem,\n\t\tduplicates = [],\n\t\tj = 0,\n\t\ti = 0;\n\n\t// Unless we *know* we can detect duplicates, assume their presence\n\thasDuplicate = !support.detectDuplicates;\n\tsortInput = !support.sortStable && results.slice( 0 );\n\tresults.sort( sortOrder );\n\n\tif ( hasDuplicate ) {\n\t\twhile ( (elem = results[i++]) ) {\n\t\t\tif ( elem === results[ i ] ) {\n\t\t\t\tj = duplicates.push( i );\n\t\t\t}\n\t\t}\n\t\twhile ( j-- ) {\n\t\t\tresults.splice( duplicates[ j ], 1 );\n\t\t}\n\t}\n\n\t// Clear input after sorting to release objects\n\t// See https://github.com/jquery/sizzle/pull/225\n\tsortInput = null;\n\n\treturn results;\n};\n\n/**\n * Utility function for retrieving the text value of an array of DOM nodes\n * @param {Array|Element} elem\n */\ngetText = Sizzle.getText = function( elem ) {\n\tvar node,\n\t\tret = \"\",\n\t\ti = 0,\n\t\tnodeType = elem.nodeType;\n\n\tif ( !nodeType ) {\n\t\t// If no nodeType, this is expected to be an array\n\t\twhile ( (node = elem[i++]) ) {\n\t\t\t// Do not traverse comment nodes\n\t\t\tret += getText( node );\n\t\t}\n\t} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\n\t\t// Use textContent for elements\n\t\t// innerText usage removed for consistency of new lines (jQuery #11153)\n\t\tif ( typeof elem.textContent === \"string\" ) {\n\t\t\treturn elem.textContent;\n\t\t} else {\n\t\t\t// Traverse its children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tret += getText( elem );\n\t\t\t}\n\t\t}\n\t} else if ( nodeType === 3 || nodeType === 4 ) {\n\t\treturn elem.nodeValue;\n\t}\n\t// Do not include comment or processing instruction nodes\n\n\treturn ret;\n};\n\nExpr = Sizzle.selectors = {\n\n\t// Can be adjusted by the user\n\tcacheLength: 50,\n\n\tcreatePseudo: markFunction,\n\n\tmatch: matchExpr,\n\n\tattrHandle: {},\n\n\tfind: {},\n\n\trelative: {\n\t\t\">\": { dir: \"parentNode\", first: true },\n\t\t\" \": { dir: \"parentNode\" },\n\t\t\"+\": { dir: \"previousSibling\", first: true },\n\t\t\"~\": { dir: \"previousSibling\" }\n\t},\n\n\tpreFilter: {\n\t\t\"ATTR\": function( match ) {\n\t\t\tmatch[1] = match[1].replace( runescape, funescape );\n\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\n\t\t\tmatch[3] = ( match[3] || match[4] || match[5] || \"\" ).replace( runescape, funescape );\n\n\t\t\tif ( match[2] === \"~=\" ) {\n\t\t\t\tmatch[3] = \" \" + match[3] + \" \";\n\t\t\t}\n\n\t\t\treturn match.slice( 0, 4 );\n\t\t},\n\n\t\t\"CHILD\": function( match ) {\n\t\t\t/* matches from matchExpr[\"CHILD\"]\n\t\t\t\t1 type (only|nth|...)\n\t\t\t\t2 what (child|of-type)\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\n\t\t\t\t5 sign of xn-component\n\t\t\t\t6 x of xn-component\n\t\t\t\t7 sign of y-component\n\t\t\t\t8 y of y-component\n\t\t\t*/\n\t\t\tmatch[1] = match[1].toLowerCase();\n\n\t\t\tif ( match[1].slice( 0, 3 ) === \"nth\" ) {\n\t\t\t\t// nth-* requires argument\n\t\t\t\tif ( !match[3] ) {\n\t\t\t\t\tSizzle.error( match[0] );\n\t\t\t\t}\n\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\n\t\t\t\t// remember that false/true cast respectively to 0/1\n\t\t\t\tmatch[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === \"even\" || match[3] === \"odd\" ) );\n\t\t\t\tmatch[5] = +( ( match[7] + match[8] ) || match[3] === \"odd\" );\n\n\t\t\t// other types prohibit arguments\n\t\t\t} else if ( match[3] ) {\n\t\t\t\tSizzle.error( match[0] );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\t\"PSEUDO\": function( match ) {\n\t\t\tvar excess,\n\t\t\t\tunquoted = !match[6] && match[2];\n\n\t\t\tif ( matchExpr[\"CHILD\"].test( match[0] ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Accept quoted arguments as-is\n\t\t\tif ( match[3] ) {\n\t\t\t\tmatch[2] = match[4] || match[5] || \"\";\n\n\t\t\t// Strip excess characters from unquoted arguments\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\n\t\t\t\t// Get excess from tokenize (recursively)\n\t\t\t\t(excess = tokenize( unquoted, true )) &&\n\t\t\t\t// advance to the next closing parenthesis\n\t\t\t\t(excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length) ) {\n\n\t\t\t\t// excess is a negative index\n\t\t\t\tmatch[0] = match[0].slice( 0, excess );\n\t\t\t\tmatch[2] = unquoted.slice( 0, excess );\n\t\t\t}\n\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\n\t\t\treturn match.slice( 0, 3 );\n\t\t}\n\t},\n\n\tfilter: {\n\n\t\t\"TAG\": function( nodeNameSelector ) {\n\t\t\tvar nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn nodeNameSelector === \"*\" ?\n\t\t\t\tfunction() { return true; } :\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === nodeName;\n\t\t\t\t};\n\t\t},\n\n\t\t\"CLASS\": function( className ) {\n\t\t\tvar pattern = classCache[ className + \" \" ];\n\n\t\t\treturn pattern ||\n\t\t\t\t(pattern = new RegExp( \"(^|\" + whitespace + \")\" + className + \"(\" + whitespace + \"|$)\" )) &&\n\t\t\t\tclassCache( className, function( elem ) {\n\t\t\t\t\treturn pattern.test( typeof elem.className === \"string\" && elem.className || typeof elem.getAttribute !== \"undefined\" && elem.getAttribute(\"class\") || \"\" );\n\t\t\t\t});\n\t\t},\n\n\t\t\"ATTR\": function( name, operator, check ) {\n\t\t\treturn function( elem ) {\n\t\t\t\tvar result = Sizzle.attr( elem, name );\n\n\t\t\t\tif ( result == null ) {\n\t\t\t\t\treturn operator === \"!=\";\n\t\t\t\t}\n\t\t\t\tif ( !operator ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tresult += \"\";\n\n\t\t\t\treturn operator === \"=\" ? result === check :\n\t\t\t\t\toperator === \"!=\" ? result !== check :\n\t\t\t\t\toperator === \"^=\" ? check && result.indexOf( check ) === 0 :\n\t\t\t\t\toperator === \"*=\" ? check && result.indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"$=\" ? check && result.slice( -check.length ) === check :\n\t\t\t\t\toperator === \"~=\" ? ( \" \" + result.replace( rwhitespace, \" \" ) + \" \" ).indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"|=\" ? result === check || result.slice( 0, check.length + 1 ) === check + \"-\" :\n\t\t\t\t\tfalse;\n\t\t\t};\n\t\t},\n\n\t\t\"CHILD\": function( type, what, argument, first, last ) {\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\n\t\t\t\tofType = what === \"of-type\";\n\n\t\t\treturn first === 1 && last === 0 ?\n\n\t\t\t\t// Shortcut for :nth-*(n)\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn !!elem.parentNode;\n\t\t\t\t} :\n\n\t\t\t\tfunction( elem, context, xml ) {\n\t\t\t\t\tvar cache, uniqueCache, outerCache, node, nodeIndex, start,\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\n\t\t\t\t\t\tparent = elem.parentNode,\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\n\t\t\t\t\t\tuseCache = !xml && !ofType,\n\t\t\t\t\t\tdiff = false;\n\n\t\t\t\t\tif ( parent ) {\n\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\n\t\t\t\t\t\tif ( simple ) {\n\t\t\t\t\t\t\twhile ( dir ) {\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\twhile ( (node = node[ dir ]) ) {\n\t\t\t\t\t\t\t\t\tif ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) {\n\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\n\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\n\t\t\t\t\t\tif ( forward && useCache ) {\n\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\n\n\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\tnode = parent;\n\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\tdiff = nodeIndex && cache[ 2 ];\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\n\n\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\n\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\n\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\n\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\n\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, nodeIndex, diff ];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Use previously-cached element index if available\n\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\t\tdiff = nodeIndex;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// xml :nth-child(...)\n\t\t\t\t\t\t\t// or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\t\t\t\t\t\t\tif ( diff === false ) {\n\t\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\n\t\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\n\t\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\n\n\t\t\t\t\t\t\t\t\tif ( ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) &&\n\t\t\t\t\t\t\t\t\t\t++diff ) {\n\n\t\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\n\t\t\t\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, diff ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif ( node === elem ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\n\t\t\t\t\t\tdiff -= last;\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t},\n\n\t\t\"PSEUDO\": function( pseudo, argument ) {\n\t\t\t// pseudo-class names are case-insensitive\n\t\t\t// http://www.w3.org/TR/selectors/#pseudo-classes\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n\t\t\t// Remember that setFilters inherits from pseudos\n\t\t\tvar args,\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\n\t\t\t\t\tSizzle.error( \"unsupported pseudo: \" + pseudo );\n\n\t\t\t// The user may use createPseudo to indicate that\n\t\t\t// arguments are needed to create the filter function\n\t\t\t// just as Sizzle does\n\t\t\tif ( fn[ expando ] ) {\n\t\t\t\treturn fn( argument );\n\t\t\t}\n\n\t\t\t// But maintain support for old signatures\n\t\t\tif ( fn.length > 1 ) {\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\n\t\t\t\t\tmarkFunction(function( seed, matches ) {\n\t\t\t\t\t\tvar idx,\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\n\t\t\t\t\t\t\ti = matched.length;\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tidx = indexOf( seed, matched[i] );\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[i] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}) :\n\t\t\t\t\tfunction( elem ) {\n\t\t\t\t\t\treturn fn( elem, 0, args );\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn fn;\n\t\t}\n\t},\n\n\tpseudos: {\n\t\t// Potentially complex pseudos\n\t\t\"not\": markFunction(function( selector ) {\n\t\t\t// Trim the selector passed to compile\n\t\t\t// to avoid treating leading and trailing\n\t\t\t// spaces as combinators\n\t\t\tvar input = [],\n\t\t\t\tresults = [],\n\t\t\t\tmatcher = compile( selector.replace( rtrim, \"$1\" ) );\n\n\t\t\treturn matcher[ expando ] ?\n\t\t\t\tmarkFunction(function( seed, matches, context, xml ) {\n\t\t\t\t\tvar elem,\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\n\t\t\t\t\t\ti = seed.length;\n\n\t\t\t\t\t// Match elements unmatched by `matcher`\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( (elem = unmatched[i]) ) {\n\t\t\t\t\t\t\tseed[i] = !(matches[i] = elem);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}) :\n\t\t\t\tfunction( elem, context, xml ) {\n\t\t\t\t\tinput[0] = elem;\n\t\t\t\t\tmatcher( input, null, xml, results );\n\t\t\t\t\t// Don't keep the element (issue #299)\n\t\t\t\t\tinput[0] = null;\n\t\t\t\t\treturn !results.pop();\n\t\t\t\t};\n\t\t}),\n\n\t\t\"has\": markFunction(function( selector ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn Sizzle( selector, elem ).length > 0;\n\t\t\t};\n\t\t}),\n\n\t\t\"contains\": markFunction(function( text ) {\n\t\t\ttext = text.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;\n\t\t\t};\n\t\t}),\n\n\t\t// \"Whether an element is represented by a :lang() selector\n\t\t// is based solely on the element's language value\n\t\t// being equal to the identifier C,\n\t\t// or beginning with the identifier C immediately followed by \"-\".\n\t\t// The matching of C against the element's language value is performed case-insensitively.\n\t\t// The identifier C does not have to be a valid language name.\"\n\t\t// http://www.w3.org/TR/selectors/#lang-pseudo\n\t\t\"lang\": markFunction( function( lang ) {\n\t\t\t// lang value must be a valid identifier\n\t\t\tif ( !ridentifier.test(lang || \"\") ) {\n\t\t\t\tSizzle.error( \"unsupported lang: \" + lang );\n\t\t\t}\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn function( elem ) {\n\t\t\t\tvar elemLang;\n\t\t\t\tdo {\n\t\t\t\t\tif ( (elemLang = documentIsHTML ?\n\t\t\t\t\t\telem.lang :\n\t\t\t\t\t\telem.getAttribute(\"xml:lang\") || elem.getAttribute(\"lang\")) ) {\n\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\n\t\t\t\t\t}\n\t\t\t\t} while ( (elem = elem.parentNode) && elem.nodeType === 1 );\n\t\t\t\treturn false;\n\t\t\t};\n\t\t}),\n\n\t\t// Miscellaneous\n\t\t\"target\": function( elem ) {\n\t\t\tvar hash = window.location && window.location.hash;\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\n\t\t},\n\n\t\t\"root\": function( elem ) {\n\t\t\treturn elem === docElem;\n\t\t},\n\n\t\t\"focus\": function( elem ) {\n\t\t\treturn elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);\n\t\t},\n\n\t\t// Boolean properties\n\t\t\"enabled\": function( elem ) {\n\t\t\treturn elem.disabled === false;\n\t\t},\n\n\t\t\"disabled\": function( elem ) {\n\t\t\treturn elem.disabled === true;\n\t\t},\n\n\t\t\"checked\": function( elem ) {\n\t\t\t// In CSS3, :checked should return both checked and selected elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\tvar nodeName = elem.nodeName.toLowerCase();\n\t\t\treturn (nodeName === \"input\" && !!elem.checked) || (nodeName === \"option\" && !!elem.selected);\n\t\t},\n\n\t\t\"selected\": function( elem ) {\n\t\t\t// Accessing this property makes selected-by-default\n\t\t\t// options in Safari work properly\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\t// Contents\n\t\t\"empty\": function( elem ) {\n\t\t\t// http://www.w3.org/TR/selectors/#empty-pseudo\n\t\t\t// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\n\t\t\t// but not by others (comment: 8; processing instruction: 7; etc.)\n\t\t\t// nodeType < 6 works because attributes (2) do not appear as children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tif ( elem.nodeType < 6 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\t\"parent\": function( elem ) {\n\t\t\treturn !Expr.pseudos[\"empty\"]( elem );\n\t\t},\n\n\t\t// Element/input types\n\t\t\"header\": function( elem ) {\n\t\t\treturn rheader.test( elem.nodeName );\n\t\t},\n\n\t\t\"input\": function( elem ) {\n\t\t\treturn rinputs.test( elem.nodeName );\n\t\t},\n\n\t\t\"button\": function( elem ) {\n\t\t\tvar name = elem.nodeName.toLowerCase();\n\t\t\treturn name === \"input\" && elem.type === \"button\" || name === \"button\";\n\t\t},\n\n\t\t\"text\": function( elem ) {\n\t\t\tvar attr;\n\t\t\treturn elem.nodeName.toLowerCase() === \"input\" &&\n\t\t\t\telem.type === \"text\" &&\n\n\t\t\t\t// Support: IE<8\n\t\t\t\t// New HTML5 attribute values (e.g., \"search\") appear with elem.type === \"text\"\n\t\t\t\t( (attr = elem.getAttribute(\"type\")) == null || attr.toLowerCase() === \"text\" );\n\t\t},\n\n\t\t// Position-in-collection\n\t\t\"first\": createPositionalPseudo(function() {\n\t\t\treturn [ 0 ];\n\t\t}),\n\n\t\t\"last\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\treturn [ length - 1 ];\n\t\t}),\n\n\t\t\"eq\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\n\t\t}),\n\n\t\t\"even\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"odd\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\tvar i = 1;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"lt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; --i >= 0; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"gt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; ++i < length; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t})\n\t}\n};\n\nExpr.pseudos[\"nth\"] = Expr.pseudos[\"eq\"];\n\n// Add button/input type pseudos\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\n\tExpr.pseudos[ i ] = createInputPseudo( i );\n}\nfor ( i in { submit: true, reset: true } ) {\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\n}\n\n// Easy API for creating new setFilters\nfunction setFilters() {}\nsetFilters.prototype = Expr.filters = Expr.pseudos;\nExpr.setFilters = new setFilters();\n\ntokenize = Sizzle.tokenize = function( selector, parseOnly ) {\n\tvar matched, match, tokens, type,\n\t\tsoFar, groups, preFilters,\n\t\tcached = tokenCache[ selector + \" \" ];\n\n\tif ( cached ) {\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\n\t}\n\n\tsoFar = selector;\n\tgroups = [];\n\tpreFilters = Expr.preFilter;\n\n\twhile ( soFar ) {\n\n\t\t// Comma and first run\n\t\tif ( !matched || (match = rcomma.exec( soFar )) ) {\n\t\t\tif ( match ) {\n\t\t\t\t// Don't consume trailing commas as valid\n\t\t\t\tsoFar = soFar.slice( match[0].length ) || soFar;\n\t\t\t}\n\t\t\tgroups.push( (tokens = []) );\n\t\t}\n\n\t\tmatched = false;\n\n\t\t// Combinators\n\t\tif ( (match = rcombinators.exec( soFar )) ) {\n\t\t\tmatched = match.shift();\n\t\t\ttokens.push({\n\t\t\t\tvalue: matched,\n\t\t\t\t// Cast descendant combinators to space\n\t\t\t\ttype: match[0].replace( rtrim, \" \" )\n\t\t\t});\n\t\t\tsoFar = soFar.slice( matched.length );\n\t\t}\n\n\t\t// Filters\n\t\tfor ( type in Expr.filter ) {\n\t\t\tif ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||\n\t\t\t\t(match = preFilters[ type ]( match ))) ) {\n\t\t\t\tmatched = match.shift();\n\t\t\t\ttokens.push({\n\t\t\t\t\tvalue: matched,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tmatches: match\n\t\t\t\t});\n\t\t\t\tsoFar = soFar.slice( matched.length );\n\t\t\t}\n\t\t}\n\n\t\tif ( !matched ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return the length of the invalid excess\n\t// if we're just parsing\n\t// Otherwise, throw an error or return tokens\n\treturn parseOnly ?\n\t\tsoFar.length :\n\t\tsoFar ?\n\t\t\tSizzle.error( selector ) :\n\t\t\t// Cache the tokens\n\t\t\ttokenCache( selector, groups ).slice( 0 );\n};\n\nfunction toSelector( tokens ) {\n\tvar i = 0,\n\t\tlen = tokens.length,\n\t\tselector = \"\";\n\tfor ( ; i < len; i++ ) {\n\t\tselector += tokens[i].value;\n\t}\n\treturn selector;\n}\n\nfunction addCombinator( matcher, combinator, base ) {\n\tvar dir = combinator.dir,\n\t\tcheckNonElements = base && dir === \"parentNode\",\n\t\tdoneName = done++;\n\n\treturn combinator.first ?\n\t\t// Check against closest ancestor/preceding element\n\t\tfunction( elem, context, xml ) {\n\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\treturn matcher( elem, context, xml );\n\t\t\t\t}\n\t\t\t}\n\t\t} :\n\n\t\t// Check against all ancestor/preceding elements\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar oldCache, uniqueCache, outerCache,\n\t\t\t\tnewCache = [ dirruns, doneName ];\n\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching\n\t\t\tif ( xml ) {\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\touterCache = elem[ expando ] || (elem[ expando ] = {});\n\n\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\tuniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});\n\n\t\t\t\t\t\tif ( (oldCache = uniqueCache[ dir ]) &&\n\t\t\t\t\t\t\toldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {\n\n\t\t\t\t\t\t\t// Assign to newCache so results back-propagate to previous elements\n\t\t\t\t\t\t\treturn (newCache[ 2 ] = oldCache[ 2 ]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Reuse newcache so results back-propagate to previous elements\n\t\t\t\t\t\t\tuniqueCache[ dir ] = newCache;\n\n\t\t\t\t\t\t\t// A match means we're done; a fail means we have to keep checking\n\t\t\t\t\t\t\tif ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n}\n\nfunction elementMatcher( matchers ) {\n\treturn matchers.length > 1 ?\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar i = matchers.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( !matchers[i]( elem, context, xml ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} :\n\t\tmatchers[0];\n}\n\nfunction multipleContexts( selector, contexts, results ) {\n\tvar i = 0,\n\t\tlen = contexts.length;\n\tfor ( ; i < len; i++ ) {\n\t\tSizzle( selector, contexts[i], results );\n\t}\n\treturn results;\n}\n\nfunction condense( unmatched, map, filter, context, xml ) {\n\tvar elem,\n\t\tnewUnmatched = [],\n\t\ti = 0,\n\t\tlen = unmatched.length,\n\t\tmapped = map != null;\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( (elem = unmatched[i]) ) {\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\n\t\t\t\tnewUnmatched.push( elem );\n\t\t\t\tif ( mapped ) {\n\t\t\t\t\tmap.push( i );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn newUnmatched;\n}\n\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\n\tif ( postFilter && !postFilter[ expando ] ) {\n\t\tpostFilter = setMatcher( postFilter );\n\t}\n\tif ( postFinder && !postFinder[ expando ] ) {\n\t\tpostFinder = setMatcher( postFinder, postSelector );\n\t}\n\treturn markFunction(function( seed, results, context, xml ) {\n\t\tvar temp, i, elem,\n\t\t\tpreMap = [],\n\t\t\tpostMap = [],\n\t\t\tpreexisting = results.length,\n\n\t\t\t// Get initial elements from seed or context\n\t\t\telems = seed || multipleContexts( selector || \"*\", context.nodeType ? [ context ] : context, [] ),\n\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\n\t\t\t\telems,\n\n\t\t\tmatcherOut = matcher ?\n\t\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,\n\t\t\t\tpostFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n\t\t\t\t\t// ...intermediate processing is necessary\n\t\t\t\t\t[] :\n\n\t\t\t\t\t// ...otherwise use results directly\n\t\t\t\t\tresults :\n\t\t\t\tmatcherIn;\n\n\t\t// Find primary matches\n\t\tif ( matcher ) {\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\n\t\t}\n\n\t\t// Apply postFilter\n\t\tif ( postFilter ) {\n\t\t\ttemp = condense( matcherOut, postMap );\n\t\t\tpostFilter( temp, [], context, xml );\n\n\t\t\t// Un-match failing elements by moving them back to matcherIn\n\t\t\ti = temp.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( (elem = temp[i]) ) {\n\t\t\t\t\tmatcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( seed ) {\n\t\t\tif ( postFinder || preFilter ) {\n\t\t\t\tif ( postFinder ) {\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\n\t\t\t\t\ttemp = [];\n\t\t\t\t\ti = matcherOut.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( (elem = matcherOut[i]) ) {\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\n\t\t\t\t\t\t\ttemp.push( (matcherIn[i] = elem) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpostFinder( null, (matcherOut = []), temp, xml );\n\t\t\t\t}\n\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\n\t\t\t\ti = matcherOut.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tif ( (elem = matcherOut[i]) &&\n\t\t\t\t\t\t(temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {\n\n\t\t\t\t\t\tseed[temp] = !(results[temp] = elem);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Add elements to results, through postFinder if defined\n\t\t} else {\n\t\t\tmatcherOut = condense(\n\t\t\t\tmatcherOut === results ?\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\n\t\t\t\t\tmatcherOut\n\t\t\t);\n\t\t\tif ( postFinder ) {\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\n\t\t\t} else {\n\t\t\t\tpush.apply( results, matcherOut );\n\t\t\t}\n\t\t}\n\t});\n}\n\nfunction matcherFromTokens( tokens ) {\n\tvar checkContext, matcher, j,\n\t\tlen = tokens.length,\n\t\tleadingRelative = Expr.relative[ tokens[0].type ],\n\t\timplicitRelative = leadingRelative || Expr.relative[\" \"],\n\t\ti = leadingRelative ? 1 : 0,\n\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\n\t\tmatchContext = addCombinator( function( elem ) {\n\t\t\treturn elem === checkContext;\n\t\t}, implicitRelative, true ),\n\t\tmatchAnyContext = addCombinator( function( elem ) {\n\t\t\treturn indexOf( checkContext, elem ) > -1;\n\t\t}, implicitRelative, true ),\n\t\tmatchers = [ function( elem, context, xml ) {\n\t\t\tvar ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (\n\t\t\t\t(checkContext = context).nodeType ?\n\t\t\t\t\tmatchContext( elem, context, xml ) :\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\n\t\t\t// Avoid hanging onto element (issue #299)\n\t\t\tcheckContext = null;\n\t\t\treturn ret;\n\t\t} ];\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( (matcher = Expr.relative[ tokens[i].type ]) ) {\n\t\t\tmatchers = [ addCombinator(elementMatcher( matchers ), matcher) ];\n\t\t} else {\n\t\t\tmatcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );\n\n\t\t\t// Return special upon seeing a positional matcher\n\t\t\tif ( matcher[ expando ] ) {\n\t\t\t\t// Find the next relative operator (if any) for proper handling\n\t\t\t\tj = ++i;\n\t\t\t\tfor ( ; j < len; j++ ) {\n\t\t\t\t\tif ( Expr.relative[ tokens[j].type ] ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn setMatcher(\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\n\t\t\t\t\ti > 1 && toSelector(\n\t\t\t\t\t\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\n\t\t\t\t\t\ttokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" })\n\t\t\t\t\t).replace( rtrim, \"$1\" ),\n\t\t\t\t\tmatcher,\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\n\t\t\t\t\tj < len && matcherFromTokens( (tokens = tokens.slice( j )) ),\n\t\t\t\t\tj < len && toSelector( tokens )\n\t\t\t\t);\n\t\t\t}\n\t\t\tmatchers.push( matcher );\n\t\t}\n\t}\n\n\treturn elementMatcher( matchers );\n}\n\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\n\tvar bySet = setMatchers.length > 0,\n\t\tbyElement = elementMatchers.length > 0,\n\t\tsuperMatcher = function( seed, context, xml, results, outermost ) {\n\t\t\tvar elem, j, matcher,\n\t\t\t\tmatchedCount = 0,\n\t\t\t\ti = \"0\",\n\t\t\t\tunmatched = seed && [],\n\t\t\t\tsetMatched = [],\n\t\t\t\tcontextBackup = outermostContext,\n\t\t\t\t// We must always have either seed elements or outermost context\n\t\t\t\telems = seed || byElement && Expr.find[\"TAG\"]( \"*\", outermost ),\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\n\t\t\t\tdirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),\n\t\t\t\tlen = elems.length;\n\n\t\t\tif ( outermost ) {\n\t\t\t\toutermostContext = context === document || context || outermost;\n\t\t\t}\n\n\t\t\t// Add elements passing elementMatchers directly to results\n\t\t\t// Support: IE<9, Safari\n\t\t\t// Tolerate NodeList properties (IE: \"length\"; Safari: ) matching elements by id\n\t\t\tfor ( ; i !== len && (elem = elems[i]) != null; i++ ) {\n\t\t\t\tif ( byElement && elem ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\tif ( !context && elem.ownerDocument !== document ) {\n\t\t\t\t\t\tsetDocument( elem );\n\t\t\t\t\t\txml = !documentIsHTML;\n\t\t\t\t\t}\n\t\t\t\t\twhile ( (matcher = elementMatchers[j++]) ) {\n\t\t\t\t\t\tif ( matcher( elem, context || document, xml) ) {\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( outermost ) {\n\t\t\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Track unmatched elements for set filters\n\t\t\t\tif ( bySet ) {\n\t\t\t\t\t// They will have gone through all possible matchers\n\t\t\t\t\tif ( (elem = !matcher && elem) ) {\n\t\t\t\t\t\tmatchedCount--;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Lengthen the array for every element, matched or not\n\t\t\t\t\tif ( seed ) {\n\t\t\t\t\t\tunmatched.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// `i` is now the count of elements visited above, and adding it to `matchedCount`\n\t\t\t// makes the latter nonnegative.\n\t\t\tmatchedCount += i;\n\n\t\t\t// Apply set filters to unmatched elements\n\t\t\t// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`\n\t\t\t// equals `i`), unless we didn't visit _any_ elements in the above loop because we have\n\t\t\t// no element matchers and no seed.\n\t\t\t// Incrementing an initially-string \"0\" `i` allows `i` to remain a string only in that\n\t\t\t// case, which will result in a \"00\" `matchedCount` that differs from `i` but is also\n\t\t\t// numerically zero.\n\t\t\tif ( bySet && i !== matchedCount ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( (matcher = setMatchers[j++]) ) {\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\n\t\t\t\t}\n\n\t\t\t\tif ( seed ) {\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\n\t\t\t\t\tif ( matchedCount > 0 ) {\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tif ( !(unmatched[i] || setMatched[i]) ) {\n\t\t\t\t\t\t\t\tsetMatched[i] = pop.call( results );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\n\t\t\t\t\tsetMatched = condense( setMatched );\n\t\t\t\t}\n\n\t\t\t\t// Add matches to results\n\t\t\t\tpush.apply( results, setMatched );\n\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\n\n\t\t\t\t\tSizzle.uniqueSort( results );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Override manipulation of globals by nested matchers\n\t\t\tif ( outermost ) {\n\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\toutermostContext = contextBackup;\n\t\t\t}\n\n\t\t\treturn unmatched;\n\t\t};\n\n\treturn bySet ?\n\t\tmarkFunction( superMatcher ) :\n\t\tsuperMatcher;\n}\n\ncompile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {\n\tvar i,\n\t\tsetMatchers = [],\n\t\telementMatchers = [],\n\t\tcached = compilerCache[ selector + \" \" ];\n\n\tif ( !cached ) {\n\t\t// Generate a function of recursive functions that can be used to check each element\n\t\tif ( !match ) {\n\t\t\tmatch = tokenize( selector );\n\t\t}\n\t\ti = match.length;\n\t\twhile ( i-- ) {\n\t\t\tcached = matcherFromTokens( match[i] );\n\t\t\tif ( cached[ expando ] ) {\n\t\t\t\tsetMatchers.push( cached );\n\t\t\t} else {\n\t\t\t\telementMatchers.push( cached );\n\t\t\t}\n\t\t}\n\n\t\t// Cache the compiled function\n\t\tcached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );\n\n\t\t// Save selector and tokenization\n\t\tcached.selector = selector;\n\t}\n\treturn cached;\n};\n\n/**\n * A low-level selection function that works with Sizzle's compiled\n * selector functions\n * @param {String|Function} selector A selector or a pre-compiled\n * selector function built with Sizzle.compile\n * @param {Element} context\n * @param {Array} [results]\n * @param {Array} [seed] A set of elements to match against\n */\nselect = Sizzle.select = function( selector, context, results, seed ) {\n\tvar i, tokens, token, type, find,\n\t\tcompiled = typeof selector === \"function\" && selector,\n\t\tmatch = !seed && tokenize( (selector = compiled.selector || selector) );\n\n\tresults = results || [];\n\n\t// Try to minimize operations if there is only one selector in the list and no seed\n\t// (the latter of which guarantees us context)\n\tif ( match.length === 1 ) {\n\n\t\t// Reduce context if the leading compound selector is an ID\n\t\ttokens = match[0] = match[0].slice( 0 );\n\t\tif ( tokens.length > 2 && (token = tokens[0]).type === \"ID\" &&\n\t\t\t\tsupport.getById && context.nodeType === 9 && documentIsHTML &&\n\t\t\t\tExpr.relative[ tokens[1].type ] ) {\n\n\t\t\tcontext = ( Expr.find[\"ID\"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];\n\t\t\tif ( !context ) {\n\t\t\t\treturn results;\n\n\t\t\t// Precompiled matchers will still verify ancestry, so step up a level\n\t\t\t} else if ( compiled ) {\n\t\t\t\tcontext = context.parentNode;\n\t\t\t}\n\n\t\t\tselector = selector.slice( tokens.shift().value.length );\n\t\t}\n\n\t\t// Fetch a seed set for right-to-left matching\n\t\ti = matchExpr[\"needsContext\"].test( selector ) ? 0 : tokens.length;\n\t\twhile ( i-- ) {\n\t\t\ttoken = tokens[i];\n\n\t\t\t// Abort if we hit a combinator\n\t\t\tif ( Expr.relative[ (type = token.type) ] ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( (find = Expr.find[ type ]) ) {\n\t\t\t\t// Search, expanding context for leading sibling combinators\n\t\t\t\tif ( (seed = find(\n\t\t\t\t\ttoken.matches[0].replace( runescape, funescape ),\n\t\t\t\t\trsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context\n\t\t\t\t)) ) {\n\n\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\n\t\t\t\t\ttokens.splice( i, 1 );\n\t\t\t\t\tselector = seed.length && toSelector( tokens );\n\t\t\t\t\tif ( !selector ) {\n\t\t\t\t\t\tpush.apply( results, seed );\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compile and execute a filtering function if one is not provided\n\t// Provide `match` to avoid retokenization if we modified the selector above\n\t( compiled || compile( selector, match ) )(\n\t\tseed,\n\t\tcontext,\n\t\t!documentIsHTML,\n\t\tresults,\n\t\t!context || rsibling.test( selector ) && testContext( context.parentNode ) || context\n\t);\n\treturn results;\n};\n\n// One-time assignments\n\n// Sort stability\nsupport.sortStable = expando.split(\"\").sort( sortOrder ).join(\"\") === expando;\n\n// Support: Chrome 14-35+\n// Always assume duplicates if they aren't passed to the comparison function\nsupport.detectDuplicates = !!hasDuplicate;\n\n// Initialize against the default document\nsetDocument();\n\n// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)\n// Detached nodes confoundingly follow *each other*\nsupport.sortDetached = assert(function( div1 ) {\n\t// Should return 1, but returns 4 (following)\n\treturn div1.compareDocumentPosition( document.createElement(\"div\") ) & 1;\n});\n\n// Support: IE<8\n// Prevent attribute/property \"interpolation\"\n// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\nif ( !assert(function( div ) {\n\tdiv.innerHTML = \"\";\n\treturn div.firstChild.getAttribute(\"href\") === \"#\" ;\n}) ) {\n\taddHandle( \"type|href|height|width\", function( elem, name, isXML ) {\n\t\tif ( !isXML ) {\n\t\t\treturn elem.getAttribute( name, name.toLowerCase() === \"type\" ? 1 : 2 );\n\t\t}\n\t});\n}\n\n// Support: IE<9\n// Use defaultValue in place of getAttribute(\"value\")\nif ( !support.attributes || !assert(function( div ) {\n\tdiv.innerHTML = \"\";\n\tdiv.firstChild.setAttribute( \"value\", \"\" );\n\treturn div.firstChild.getAttribute( \"value\" ) === \"\";\n}) ) {\n\taddHandle( \"value\", function( elem, name, isXML ) {\n\t\tif ( !isXML && elem.nodeName.toLowerCase() === \"input\" ) {\n\t\t\treturn elem.defaultValue;\n\t\t}\n\t});\n}\n\n// Support: IE<9\n// Use getAttributeNode to fetch booleans when getAttribute lies\nif ( !assert(function( div ) {\n\treturn div.getAttribute(\"disabled\") == null;\n}) ) {\n\taddHandle( booleans, function( elem, name, isXML ) {\n\t\tvar val;\n\t\tif ( !isXML ) {\n\t\t\treturn elem[ name ] === true ? name.toLowerCase() :\n\t\t\t\t\t(val = elem.getAttributeNode( name )) && val.specified ?\n\t\t\t\t\tval.value :\n\t\t\t\tnull;\n\t\t}\n\t});\n}\n\nreturn Sizzle;\n\n})( window );\n\n\n\njQuery.find = Sizzle;\njQuery.expr = Sizzle.selectors;\njQuery.expr[ \":\" ] = jQuery.expr.pseudos;\njQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;\njQuery.text = Sizzle.getText;\njQuery.isXMLDoc = Sizzle.isXML;\njQuery.contains = Sizzle.contains;\n\n\n\nvar dir = function( elem, dir, until ) {\n\tvar matched = [],\n\t\ttruncate = until !== undefined;\n\n\twhile ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {\n\t\tif ( elem.nodeType === 1 ) {\n\t\t\tif ( truncate && jQuery( elem ).is( until ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmatched.push( elem );\n\t\t}\n\t}\n\treturn matched;\n};\n\n\nvar siblings = function( n, elem ) {\n\tvar matched = [];\n\n\tfor ( ; n; n = n.nextSibling ) {\n\t\tif ( n.nodeType === 1 && n !== elem ) {\n\t\t\tmatched.push( n );\n\t\t}\n\t}\n\n\treturn matched;\n};\n\n\nvar rneedsContext = jQuery.expr.match.needsContext;\n\nvar rsingleTag = ( /^<([\\w-]+)\\s*\\/?>(?:<\\/\\1>|)$/ );\n\n\n\nvar risSimple = /^.[^:#\\[\\.,]*$/;\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, not ) {\n\tif ( jQuery.isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\t/* jshint -W018 */\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( typeof qualifier === \"string\" ) {\n\t\tif ( risSimple.test( qualifier ) ) {\n\t\t\treturn jQuery.filter( qualifier, elements, not );\n\t\t}\n\n\t\tqualifier = jQuery.filter( qualifier, elements );\n\t}\n\n\treturn jQuery.grep( elements, function( elem ) {\n\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not;\n\t} );\n}\n\njQuery.filter = function( expr, elems, not ) {\n\tvar elem = elems[ 0 ];\n\n\tif ( not ) {\n\t\texpr = \":not(\" + expr + \")\";\n\t}\n\n\treturn elems.length === 1 && elem.nodeType === 1 ?\n\t\tjQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :\n\t\tjQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\n\t\t\treturn elem.nodeType === 1;\n\t\t} ) );\n};\n\njQuery.fn.extend( {\n\tfind: function( selector ) {\n\t\tvar i,\n\t\t\tlen = this.length,\n\t\t\tret = [],\n\t\t\tself = this;\n\n\t\tif ( typeof selector !== \"string\" ) {\n\t\t\treturn this.pushStack( jQuery( selector ).filter( function() {\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} ) );\n\t\t}\n\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tjQuery.find( selector, self[ i ], ret );\n\t\t}\n\n\t\t// Needed because $( selector, context ) becomes $( context ).find( selector )\n\t\tret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );\n\t\tret.selector = this.selector ? this.selector + \" \" + selector : selector;\n\t\treturn ret;\n\t},\n\tfilter: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], false ) );\n\t},\n\tnot: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], true ) );\n\t},\n\tis: function( selector ) {\n\t\treturn !!winnow(\n\t\t\tthis,\n\n\t\t\t// If this is a positional/relative selector, check membership in the returned set\n\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\n\t\t\ttypeof selector === \"string\" && rneedsContext.test( selector ) ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tselector || [],\n\t\t\tfalse\n\t\t).length;\n\t}\n} );\n\n\n// Initialize a jQuery object\n\n\n// A central reference to the root jQuery(document)\nvar rootjQuery,\n\n\t// A simple way to check for HTML strings\n\t// Prioritize #id over to avoid XSS via location.hash (#9521)\n\t// Strict HTML recognition (#11290: must start with <)\n\trquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,\n\n\tinit = jQuery.fn.init = function( selector, context, root ) {\n\t\tvar match, elem;\n\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\n\t\tif ( !selector ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// Method init() accepts an alternate rootjQuery\n\t\t// so migrate can support jQuery.sub (gh-2101)\n\t\troot = root || rootjQuery;\n\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\tif ( selector[ 0 ] === \"<\" &&\n\t\t\t\tselector[ selector.length - 1 ] === \">\" &&\n\t\t\t\tselector.length >= 3 ) {\n\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\n\t\t\t\tmatch = [ null, selector, null ];\n\n\t\t\t} else {\n\t\t\t\tmatch = rquickExpr.exec( selector );\n\t\t\t}\n\n\t\t\t// Match html or make sure no context is specified for #id\n\t\t\tif ( match && ( match[ 1 ] || !context ) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[ 1 ] ) {\n\t\t\t\t\tcontext = context instanceof jQuery ? context[ 0 ] : context;\n\n\t\t\t\t\t// Option to run scripts is true for back-compat\n\t\t\t\t\t// Intentionally let the error be thrown if parseHTML is not present\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\n\t\t\t\t\t\tmatch[ 1 ],\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t) );\n\n\t\t\t\t\t// HANDLE: $(html, props)\n\t\t\t\t\tif ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {\n\t\t\t\t\t\tfor ( match in context ) {\n\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\n\t\t\t\t\t\t\tif ( jQuery.isFunction( this[ match ] ) ) {\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\n\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this;\n\n\t\t\t\t// HANDLE: $(#id)\n\t\t\t\t} else {\n\t\t\t\t\telem = document.getElementById( match[ 2 ] );\n\n\t\t\t\t\t// Support: Blackberry 4.6\n\t\t\t\t\t// gEBID returns nodes no longer in the document (#6963)\n\t\t\t\t\tif ( elem && elem.parentNode ) {\n\n\t\t\t\t\t\t// Inject the element directly into the jQuery object\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t\tthis[ 0 ] = elem;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.context = document;\n\t\t\t\t\tthis.selector = selector;\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, $(...))\n\t\t\t} else if ( !context || context.jquery ) {\n\t\t\t\treturn ( context || root ).find( selector );\n\n\t\t\t// HANDLE: $(expr, context)\n\t\t\t// (which is just equivalent to: $(context).find(expr)\n\t\t\t} else {\n\t\t\t\treturn this.constructor( context ).find( selector );\n\t\t\t}\n\n\t\t// HANDLE: $(DOMElement)\n\t\t} else if ( selector.nodeType ) {\n\t\t\tthis.context = this[ 0 ] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( jQuery.isFunction( selector ) ) {\n\t\t\treturn root.ready !== undefined ?\n\t\t\t\troot.ready( selector ) :\n\n\t\t\t\t// Execute immediately if ready is not present\n\t\t\t\tselector( jQuery );\n\t\t}\n\n\t\tif ( selector.selector !== undefined ) {\n\t\t\tthis.selector = selector.selector;\n\t\t\tthis.context = selector.context;\n\t\t}\n\n\t\treturn jQuery.makeArray( selector, this );\n\t};\n\n// Give the init function the jQuery prototype for later instantiation\ninit.prototype = jQuery.fn;\n\n// Initialize central reference\nrootjQuery = jQuery( document );\n\n\nvar rparentsprev = /^(?:parents|prev(?:Until|All))/,\n\n\t// Methods guaranteed to produce a unique set when starting from a unique set\n\tguaranteedUnique = {\n\t\tchildren: true,\n\t\tcontents: true,\n\t\tnext: true,\n\t\tprev: true\n\t};\n\njQuery.fn.extend( {\n\thas: function( target ) {\n\t\tvar targets = jQuery( target, this ),\n\t\t\tl = targets.length;\n\n\t\treturn this.filter( function() {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tif ( jQuery.contains( this, targets[ i ] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\tclosest: function( selectors, context ) {\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\tl = this.length,\n\t\t\tmatched = [],\n\t\t\tpos = rneedsContext.test( selectors ) || typeof selectors !== \"string\" ?\n\t\t\t\tjQuery( selectors, context || this.context ) :\n\t\t\t\t0;\n\n\t\tfor ( ; i < l; i++ ) {\n\t\t\tfor ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {\n\n\t\t\t\t// Always skip document fragments\n\t\t\t\tif ( cur.nodeType < 11 && ( pos ?\n\t\t\t\t\tpos.index( cur ) > -1 :\n\n\t\t\t\t\t// Don't pass non-elements to Sizzle\n\t\t\t\t\tcur.nodeType === 1 &&\n\t\t\t\t\t\tjQuery.find.matchesSelector( cur, selectors ) ) ) {\n\n\t\t\t\t\tmatched.push( cur );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );\n\t},\n\n\t// Determine the position of an element within the set\n\tindex: function( elem ) {\n\n\t\t// No argument, return index in parent\n\t\tif ( !elem ) {\n\t\t\treturn ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;\n\t\t}\n\n\t\t// Index in selector\n\t\tif ( typeof elem === \"string\" ) {\n\t\t\treturn indexOf.call( jQuery( elem ), this[ 0 ] );\n\t\t}\n\n\t\t// Locate the position of the desired element\n\t\treturn indexOf.call( this,\n\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem.jquery ? elem[ 0 ] : elem\n\t\t);\n\t},\n\n\tadd: function( selector, context ) {\n\t\treturn this.pushStack(\n\t\t\tjQuery.uniqueSort(\n\t\t\t\tjQuery.merge( this.get(), jQuery( selector, context ) )\n\t\t\t)\n\t\t);\n\t},\n\n\taddBack: function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t}\n} );\n\nfunction sibling( cur, dir ) {\n\twhile ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}\n\treturn cur;\n}\n\njQuery.each( {\n\tparent: function( elem ) {\n\t\tvar parent = elem.parentNode;\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t},\n\tparents: function( elem ) {\n\t\treturn dir( elem, \"parentNode\" );\n\t},\n\tparentsUntil: function( elem, i, until ) {\n\t\treturn dir( elem, \"parentNode\", until );\n\t},\n\tnext: function( elem ) {\n\t\treturn sibling( elem, \"nextSibling\" );\n\t},\n\tprev: function( elem ) {\n\t\treturn sibling( elem, \"previousSibling\" );\n\t},\n\tnextAll: function( elem ) {\n\t\treturn dir( elem, \"nextSibling\" );\n\t},\n\tprevAll: function( elem ) {\n\t\treturn dir( elem, \"previousSibling\" );\n\t},\n\tnextUntil: function( elem, i, until ) {\n\t\treturn dir( elem, \"nextSibling\", until );\n\t},\n\tprevUntil: function( elem, i, until ) {\n\t\treturn dir( elem, \"previousSibling\", until );\n\t},\n\tsiblings: function( elem ) {\n\t\treturn siblings( ( elem.parentNode || {} ).firstChild, elem );\n\t},\n\tchildren: function( elem ) {\n\t\treturn siblings( elem.firstChild );\n\t},\n\tcontents: function( elem ) {\n\t\treturn elem.contentDocument || jQuery.merge( [], elem.childNodes );\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function( until, selector ) {\n\t\tvar matched = jQuery.map( this, fn, until );\n\n\t\tif ( name.slice( -5 ) !== \"Until\" ) {\n\t\t\tselector = until;\n\t\t}\n\n\t\tif ( selector && typeof selector === \"string\" ) {\n\t\t\tmatched = jQuery.filter( selector, matched );\n\t\t}\n\n\t\tif ( this.length > 1 ) {\n\n\t\t\t// Remove duplicates\n\t\t\tif ( !guaranteedUnique[ name ] ) {\n\t\t\t\tjQuery.uniqueSort( matched );\n\t\t\t}\n\n\t\t\t// Reverse order for parents* and prev-derivatives\n\t\t\tif ( rparentsprev.test( name ) ) {\n\t\t\t\tmatched.reverse();\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched );\n\t};\n} );\nvar rnotwhite = ( /\\S+/g );\n\n\n\n// Convert String-formatted options into Object-formatted ones\nfunction createOptions( options ) {\n\tvar object = {};\n\tjQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {\n\t\tobject[ flag ] = true;\n\t} );\n\treturn object;\n}\n\n/*\n * Create a callback list using the following parameters:\n *\n *\toptions: an optional list of space-separated options that will change how\n *\t\t\tthe callback list behaves or a more traditional option object\n *\n * By default a callback list will act like an event callback list and can be\n * \"fired\" multiple times.\n *\n * Possible options:\n *\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\n *\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\n *\t\t\t\t\tvalues (like a Deferred)\n *\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\n *\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\n *\n */\njQuery.Callbacks = function( options ) {\n\n\t// Convert options from String-formatted to Object-formatted if needed\n\t// (we check in cache first)\n\toptions = typeof options === \"string\" ?\n\t\tcreateOptions( options ) :\n\t\tjQuery.extend( {}, options );\n\n\tvar // Flag to know if list is currently firing\n\t\tfiring,\n\n\t\t// Last fire value for non-forgettable lists\n\t\tmemory,\n\n\t\t// Flag to know if list was already fired\n\t\tfired,\n\n\t\t// Flag to prevent firing\n\t\tlocked,\n\n\t\t// Actual callback list\n\t\tlist = [],\n\n\t\t// Queue of execution data for repeatable lists\n\t\tqueue = [],\n\n\t\t// Index of currently firing callback (modified by add/remove as needed)\n\t\tfiringIndex = -1,\n\n\t\t// Fire callbacks\n\t\tfire = function() {\n\n\t\t\t// Enforce single-firing\n\t\t\tlocked = options.once;\n\n\t\t\t// Execute callbacks for all pending executions,\n\t\t\t// respecting firingIndex overrides and runtime changes\n\t\t\tfired = firing = true;\n\t\t\tfor ( ; queue.length; firingIndex = -1 ) {\n\t\t\t\tmemory = queue.shift();\n\t\t\t\twhile ( ++firingIndex < list.length ) {\n\n\t\t\t\t\t// Run callback and check for early termination\n\t\t\t\t\tif ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&\n\t\t\t\t\t\toptions.stopOnFalse ) {\n\n\t\t\t\t\t\t// Jump to end and forget the data so .add doesn't re-fire\n\t\t\t\t\t\tfiringIndex = list.length;\n\t\t\t\t\t\tmemory = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Forget the data if we're done with it\n\t\t\tif ( !options.memory ) {\n\t\t\t\tmemory = false;\n\t\t\t}\n\n\t\t\tfiring = false;\n\n\t\t\t// Clean up if we're done firing for good\n\t\t\tif ( locked ) {\n\n\t\t\t\t// Keep an empty list if we have data for future add calls\n\t\t\t\tif ( memory ) {\n\t\t\t\t\tlist = [];\n\n\t\t\t\t// Otherwise, this object is spent\n\t\t\t\t} else {\n\t\t\t\t\tlist = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t// Actual Callbacks object\n\t\tself = {\n\n\t\t\t// Add a callback or a collection of callbacks to the list\n\t\t\tadd: function() {\n\t\t\t\tif ( list ) {\n\n\t\t\t\t\t// If we have memory from a past run, we should fire after adding\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfiringIndex = list.length - 1;\n\t\t\t\t\t\tqueue.push( memory );\n\t\t\t\t\t}\n\n\t\t\t\t\t( function add( args ) {\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\n\t\t\t\t\t\t\tif ( jQuery.isFunction( arg ) ) {\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\n\t\t\t\t\t\t\t\t\tlist.push( arg );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( arg && arg.length && jQuery.type( arg ) !== \"string\" ) {\n\n\t\t\t\t\t\t\t\t// Inspect recursively\n\t\t\t\t\t\t\t\tadd( arg );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t} )( arguments );\n\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Remove a callback from the list\n\t\t\tremove: function() {\n\t\t\t\tjQuery.each( arguments, function( _, arg ) {\n\t\t\t\t\tvar index;\n\t\t\t\t\twhile ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\n\t\t\t\t\t\tlist.splice( index, 1 );\n\n\t\t\t\t\t\t// Handle firing indexes\n\t\t\t\t\t\tif ( index <= firingIndex ) {\n\t\t\t\t\t\t\tfiringIndex--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Check if a given callback is in the list.\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\n\t\t\thas: function( fn ) {\n\t\t\t\treturn fn ?\n\t\t\t\t\tjQuery.inArray( fn, list ) > -1 :\n\t\t\t\t\tlist.length > 0;\n\t\t\t},\n\n\t\t\t// Remove all callbacks from the list\n\t\t\tempty: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\tlist = [];\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Disable .fire and .add\n\t\t\t// Abort any current/pending executions\n\t\t\t// Clear all callbacks and values\n\t\t\tdisable: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tlist = memory = \"\";\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tdisabled: function() {\n\t\t\t\treturn !list;\n\t\t\t},\n\n\t\t\t// Disable .fire\n\t\t\t// Also disable .add unless we have memory (since it would have no effect)\n\t\t\t// Abort any pending executions\n\t\t\tlock: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tif ( !memory ) {\n\t\t\t\t\tlist = memory = \"\";\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tlocked: function() {\n\t\t\t\treturn !!locked;\n\t\t\t},\n\n\t\t\t// Call all callbacks with the given context and arguments\n\t\t\tfireWith: function( context, args ) {\n\t\t\t\tif ( !locked ) {\n\t\t\t\t\targs = args || [];\n\t\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\n\t\t\t\t\tqueue.push( args );\n\t\t\t\t\tif ( !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Call all the callbacks with the given arguments\n\t\t\tfire: function() {\n\t\t\t\tself.fireWith( this, arguments );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// To know if the callbacks have already been called at least once\n\t\t\tfired: function() {\n\t\t\t\treturn !!fired;\n\t\t\t}\n\t\t};\n\n\treturn self;\n};\n\n\njQuery.extend( {\n\n\tDeferred: function( func ) {\n\t\tvar tuples = [\n\n\t\t\t\t// action, add listener, listener list, final state\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks( \"once memory\" ), \"resolved\" ],\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks( \"once memory\" ), \"rejected\" ],\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks( \"memory\" ) ]\n\t\t\t],\n\t\t\tstate = \"pending\",\n\t\t\tpromise = {\n\t\t\t\tstate: function() {\n\t\t\t\t\treturn state;\n\t\t\t\t},\n\t\t\t\talways: function() {\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\tthen: function( /* fnDone, fnFail, fnProgress */ ) {\n\t\t\t\t\tvar fns = arguments;\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\t\t\t\t\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\t\t\t\t\tvar fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];\n\n\t\t\t\t\t\t\t// deferred[ done | fail | progress ] for forwarding actions to newDefer\n\t\t\t\t\t\t\tdeferred[ tuple[ 1 ] ]( function() {\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\n\t\t\t\t\t\t\t\tif ( returned && jQuery.isFunction( returned.promise ) ) {\n\t\t\t\t\t\t\t\t\treturned.promise()\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify )\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewDefer[ tuple[ 0 ] + \"With\" ](\n\t\t\t\t\t\t\t\t\t\tthis === promise ? newDefer.promise() : this,\n\t\t\t\t\t\t\t\t\t\tfn ? [ returned ] : arguments\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tfns = null;\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\n\t\t\t\t// Get a promise for this deferred\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\n\t\t\t\tpromise: function( obj ) {\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeferred = {};\n\n\t\t// Keep pipe for back-compat\n\t\tpromise.pipe = promise.then;\n\n\t\t// Add list-specific methods\n\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\tvar list = tuple[ 2 ],\n\t\t\t\tstateString = tuple[ 3 ];\n\n\t\t\t// promise[ done | fail | progress ] = list.add\n\t\t\tpromise[ tuple[ 1 ] ] = list.add;\n\n\t\t\t// Handle state\n\t\t\tif ( stateString ) {\n\t\t\t\tlist.add( function() {\n\n\t\t\t\t\t// state = [ resolved | rejected ]\n\t\t\t\t\tstate = stateString;\n\n\t\t\t\t// [ reject_list | resolve_list ].disable; progress_list.lock\n\t\t\t\t}, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );\n\t\t\t}\n\n\t\t\t// deferred[ resolve | reject | notify ]\n\t\t\tdeferred[ tuple[ 0 ] ] = function() {\n\t\t\t\tdeferred[ tuple[ 0 ] + \"With\" ]( this === deferred ? promise : this, arguments );\n\t\t\t\treturn this;\n\t\t\t};\n\t\t\tdeferred[ tuple[ 0 ] + \"With\" ] = list.fireWith;\n\t\t} );\n\n\t\t// Make the deferred a promise\n\t\tpromise.promise( deferred );\n\n\t\t// Call given func if any\n\t\tif ( func ) {\n\t\t\tfunc.call( deferred, deferred );\n\t\t}\n\n\t\t// All done!\n\t\treturn deferred;\n\t},\n\n\t// Deferred helper\n\twhen: function( subordinate /* , ..., subordinateN */ ) {\n\t\tvar i = 0,\n\t\t\tresolveValues = slice.call( arguments ),\n\t\t\tlength = resolveValues.length,\n\n\t\t\t// the count of uncompleted subordinates\n\t\t\tremaining = length !== 1 ||\n\t\t\t\t( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,\n\n\t\t\t// the master Deferred.\n\t\t\t// If resolveValues consist of only a single Deferred, just use that.\n\t\t\tdeferred = remaining === 1 ? subordinate : jQuery.Deferred(),\n\n\t\t\t// Update function for both resolve and progress values\n\t\t\tupdateFunc = function( i, contexts, values ) {\n\t\t\t\treturn function( value ) {\n\t\t\t\t\tcontexts[ i ] = this;\n\t\t\t\t\tvalues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\n\t\t\t\t\tif ( values === progressValues ) {\n\t\t\t\t\t\tdeferred.notifyWith( contexts, values );\n\t\t\t\t\t} else if ( !( --remaining ) ) {\n\t\t\t\t\t\tdeferred.resolveWith( contexts, values );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t},\n\n\t\t\tprogressValues, progressContexts, resolveContexts;\n\n\t\t// Add listeners to Deferred subordinates; treat others as resolved\n\t\tif ( length > 1 ) {\n\t\t\tprogressValues = new Array( length );\n\t\t\tprogressContexts = new Array( length );\n\t\t\tresolveContexts = new Array( length );\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {\n\t\t\t\t\tresolveValues[ i ].promise()\n\t\t\t\t\t\t.progress( updateFunc( i, progressContexts, progressValues ) )\n\t\t\t\t\t\t.done( updateFunc( i, resolveContexts, resolveValues ) )\n\t\t\t\t\t\t.fail( deferred.reject );\n\t\t\t\t} else {\n\t\t\t\t\t--remaining;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// If we're not waiting on anything, resolve the master\n\t\tif ( !remaining ) {\n\t\t\tdeferred.resolveWith( resolveContexts, resolveValues );\n\t\t}\n\n\t\treturn deferred.promise();\n\t}\n} );\n\n\n// The deferred used on DOM ready\nvar readyList;\n\njQuery.fn.ready = function( fn ) {\n\n\t// Add the callback\n\tjQuery.ready.promise().done( fn );\n\n\treturn this;\n};\n\njQuery.extend( {\n\n\t// Is the DOM ready to be used? Set to true once it occurs.\n\tisReady: false,\n\n\t// A counter to track how many items to wait for before\n\t// the ready event fires. See #6781\n\treadyWait: 1,\n\n\t// Hold (or release) the ready event\n\tholdReady: function( hold ) {\n\t\tif ( hold ) {\n\t\t\tjQuery.readyWait++;\n\t\t} else {\n\t\t\tjQuery.ready( true );\n\t\t}\n\t},\n\n\t// Handle when the DOM is ready\n\tready: function( wait ) {\n\n\t\t// Abort if there are pending holds or we're already ready\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remember that the DOM is ready\n\t\tjQuery.isReady = true;\n\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there are functions bound, to execute\n\t\treadyList.resolveWith( document, [ jQuery ] );\n\n\t\t// Trigger any bound ready events\n\t\tif ( jQuery.fn.triggerHandler ) {\n\t\t\tjQuery( document ).triggerHandler( \"ready\" );\n\t\t\tjQuery( document ).off( \"ready\" );\n\t\t}\n\t}\n} );\n\n/**\n * The ready event handler and self cleanup method\n */\nfunction completed() {\n\tdocument.removeEventListener( \"DOMContentLoaded\", completed );\n\twindow.removeEventListener( \"load\", completed );\n\tjQuery.ready();\n}\n\njQuery.ready.promise = function( obj ) {\n\tif ( !readyList ) {\n\n\t\treadyList = jQuery.Deferred();\n\n\t\t// Catch cases where $(document).ready() is called\n\t\t// after the browser event has already occurred.\n\t\t// Support: IE9-10 only\n\t\t// Older IE sometimes signals \"interactive\" too soon\n\t\tif ( document.readyState === \"complete\" ||\n\t\t\t( document.readyState !== \"loading\" && !document.documentElement.doScroll ) ) {\n\n\t\t\t// Handle it asynchronously to allow scripts the opportunity to delay ready\n\t\t\twindow.setTimeout( jQuery.ready );\n\n\t\t} else {\n\n\t\t\t// Use the handy event callback\n\t\t\tdocument.addEventListener( \"DOMContentLoaded\", completed );\n\n\t\t\t// A fallback to window.onload, that will always work\n\t\t\twindow.addEventListener( \"load\", completed );\n\t\t}\n\t}\n\treturn readyList.promise( obj );\n};\n\n// Kick off the DOM ready check even if the user does not\njQuery.ready.promise();\n\n\n\n\n// Multifunctional method to get and set values of a collection\n// The value/s can optionally be executed if it's a function\nvar access = function( elems, fn, key, value, chainable, emptyGet, raw ) {\n\tvar i = 0,\n\t\tlen = elems.length,\n\t\tbulk = key == null;\n\n\t// Sets many values\n\tif ( jQuery.type( key ) === \"object\" ) {\n\t\tchainable = true;\n\t\tfor ( i in key ) {\n\t\t\taccess( elems, fn, i, key[ i ], true, emptyGet, raw );\n\t\t}\n\n\t// Sets one value\n\t} else if ( value !== undefined ) {\n\t\tchainable = true;\n\n\t\tif ( !jQuery.isFunction( value ) ) {\n\t\t\traw = true;\n\t\t}\n\n\t\tif ( bulk ) {\n\n\t\t\t// Bulk operations run against the entire set\n\t\t\tif ( raw ) {\n\t\t\t\tfn.call( elems, value );\n\t\t\t\tfn = null;\n\n\t\t\t// ...except when executing function values\n\t\t\t} else {\n\t\t\t\tbulk = fn;\n\t\t\t\tfn = function( elem, key, value ) {\n\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( fn ) {\n\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\tfn(\n\t\t\t\t\telems[ i ], key, raw ?\n\t\t\t\t\tvalue :\n\t\t\t\t\tvalue.call( elems[ i ], i, fn( elems[ i ], key ) )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn chainable ?\n\t\telems :\n\n\t\t// Gets\n\t\tbulk ?\n\t\t\tfn.call( elems ) :\n\t\t\tlen ? fn( elems[ 0 ], key ) : emptyGet;\n};\nvar acceptData = function( owner ) {\n\n\t// Accepts only:\n\t// - Node\n\t// - Node.ELEMENT_NODE\n\t// - Node.DOCUMENT_NODE\n\t// - Object\n\t// - Any\n\t/* jshint -W018 */\n\treturn owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );\n};\n\n\n\n\nfunction Data() {\n\tthis.expando = jQuery.expando + Data.uid++;\n}\n\nData.uid = 1;\n\nData.prototype = {\n\n\tregister: function( owner, initial ) {\n\t\tvar value = initial || {};\n\n\t\t// If it is a node unlikely to be stringify-ed or looped over\n\t\t// use plain assignment\n\t\tif ( owner.nodeType ) {\n\t\t\towner[ this.expando ] = value;\n\n\t\t// Otherwise secure it in a non-enumerable, non-writable property\n\t\t// configurability must be true to allow the property to be\n\t\t// deleted with the delete operator\n\t\t} else {\n\t\t\tObject.defineProperty( owner, this.expando, {\n\t\t\t\tvalue: value,\n\t\t\t\twritable: true,\n\t\t\t\tconfigurable: true\n\t\t\t} );\n\t\t}\n\t\treturn owner[ this.expando ];\n\t},\n\tcache: function( owner ) {\n\n\t\t// We can accept data for non-element nodes in modern browsers,\n\t\t// but we should not, see #8335.\n\t\t// Always return an empty object.\n\t\tif ( !acceptData( owner ) ) {\n\t\t\treturn {};\n\t\t}\n\n\t\t// Check if the owner object already has a cache\n\t\tvar value = owner[ this.expando ];\n\n\t\t// If not, create one\n\t\tif ( !value ) {\n\t\t\tvalue = {};\n\n\t\t\t// We can accept data for non-element nodes in modern browsers,\n\t\t\t// but we should not, see #8335.\n\t\t\t// Always return an empty object.\n\t\t\tif ( acceptData( owner ) ) {\n\n\t\t\t\t// If it is a node unlikely to be stringify-ed or looped over\n\t\t\t\t// use plain assignment\n\t\t\t\tif ( owner.nodeType ) {\n\t\t\t\t\towner[ this.expando ] = value;\n\n\t\t\t\t// Otherwise secure it in a non-enumerable property\n\t\t\t\t// configurable must be true to allow the property to be\n\t\t\t\t// deleted when data is removed\n\t\t\t\t} else {\n\t\t\t\t\tObject.defineProperty( owner, this.expando, {\n\t\t\t\t\t\tvalue: value,\n\t\t\t\t\t\tconfigurable: true\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn value;\n\t},\n\tset: function( owner, data, value ) {\n\t\tvar prop,\n\t\t\tcache = this.cache( owner );\n\n\t\t// Handle: [ owner, key, value ] args\n\t\tif ( typeof data === \"string\" ) {\n\t\t\tcache[ data ] = value;\n\n\t\t// Handle: [ owner, { properties } ] args\n\t\t} else {\n\n\t\t\t// Copy the properties one-by-one to the cache object\n\t\t\tfor ( prop in data ) {\n\t\t\t\tcache[ prop ] = data[ prop ];\n\t\t\t}\n\t\t}\n\t\treturn cache;\n\t},\n\tget: function( owner, key ) {\n\t\treturn key === undefined ?\n\t\t\tthis.cache( owner ) :\n\t\t\towner[ this.expando ] && owner[ this.expando ][ key ];\n\t},\n\taccess: function( owner, key, value ) {\n\t\tvar stored;\n\n\t\t// In cases where either:\n\t\t//\n\t\t// 1. No key was specified\n\t\t// 2. A string key was specified, but no value provided\n\t\t//\n\t\t// Take the \"read\" path and allow the get method to determine\n\t\t// which value to return, respectively either:\n\t\t//\n\t\t// 1. The entire cache object\n\t\t// 2. The data stored at the key\n\t\t//\n\t\tif ( key === undefined ||\n\t\t\t\t( ( key && typeof key === \"string\" ) && value === undefined ) ) {\n\n\t\t\tstored = this.get( owner, key );\n\n\t\t\treturn stored !== undefined ?\n\t\t\t\tstored : this.get( owner, jQuery.camelCase( key ) );\n\t\t}\n\n\t\t// When the key is not a string, or both a key and value\n\t\t// are specified, set or extend (existing objects) with either:\n\t\t//\n\t\t// 1. An object of properties\n\t\t// 2. A key and value\n\t\t//\n\t\tthis.set( owner, key, value );\n\n\t\t// Since the \"set\" path can have two possible entry points\n\t\t// return the expected data based on which path was taken[*]\n\t\treturn value !== undefined ? value : key;\n\t},\n\tremove: function( owner, key ) {\n\t\tvar i, name, camel,\n\t\t\tcache = owner[ this.expando ];\n\n\t\tif ( cache === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( key === undefined ) {\n\t\t\tthis.register( owner );\n\n\t\t} else {\n\n\t\t\t// Support array or space separated string of keys\n\t\t\tif ( jQuery.isArray( key ) ) {\n\n\t\t\t\t// If \"name\" is an array of keys...\n\t\t\t\t// When data is initially created, via (\"key\", \"val\") signature,\n\t\t\t\t// keys will be converted to camelCase.\n\t\t\t\t// Since there is no way to tell _how_ a key was added, remove\n\t\t\t\t// both plain key and camelCase key. #12786\n\t\t\t\t// This will only penalize the array argument path.\n\t\t\t\tname = key.concat( key.map( jQuery.camelCase ) );\n\t\t\t} else {\n\t\t\t\tcamel = jQuery.camelCase( key );\n\n\t\t\t\t// Try the string as a key before any manipulation\n\t\t\t\tif ( key in cache ) {\n\t\t\t\t\tname = [ key, camel ];\n\t\t\t\t} else {\n\n\t\t\t\t\t// If a key with the spaces exists, use it.\n\t\t\t\t\t// Otherwise, create an array by matching non-whitespace\n\t\t\t\t\tname = camel;\n\t\t\t\t\tname = name in cache ?\n\t\t\t\t\t\t[ name ] : ( name.match( rnotwhite ) || [] );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ti = name.length;\n\n\t\t\twhile ( i-- ) {\n\t\t\t\tdelete cache[ name[ i ] ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove the expando if there's no more data\n\t\tif ( key === undefined || jQuery.isEmptyObject( cache ) ) {\n\n\t\t\t// Support: Chrome <= 35-45+\n\t\t\t// Webkit & Blink performance suffers when deleting properties\n\t\t\t// from DOM nodes, so set to undefined instead\n\t\t\t// https://code.google.com/p/chromium/issues/detail?id=378607\n\t\t\tif ( owner.nodeType ) {\n\t\t\t\towner[ this.expando ] = undefined;\n\t\t\t} else {\n\t\t\t\tdelete owner[ this.expando ];\n\t\t\t}\n\t\t}\n\t},\n\thasData: function( owner ) {\n\t\tvar cache = owner[ this.expando ];\n\t\treturn cache !== undefined && !jQuery.isEmptyObject( cache );\n\t}\n};\nvar dataPriv = new Data();\n\nvar dataUser = new Data();\n\n\n\n//\tImplementation Summary\n//\n//\t1. Enforce API surface and semantic compatibility with 1.9.x branch\n//\t2. Improve the module's maintainability by reducing the storage\n//\t\tpaths to a single mechanism.\n//\t3. Use the same single mechanism to support \"private\" and \"user\" data.\n//\t4. _Never_ expose \"private\" data to user code (TODO: Drop _data, _removeData)\n//\t5. Avoid exposing implementation details on user objects (eg. expando properties)\n//\t6. Provide a clear path for implementation upgrade to WeakMap in 2014\n\nvar rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\n\trmultiDash = /[A-Z]/g;\n\nfunction dataAttr( elem, key, data ) {\n\tvar name;\n\n\t// If nothing was found internally, try to fetch any\n\t// data from the HTML5 data-* attribute\n\tif ( data === undefined && elem.nodeType === 1 ) {\n\t\tname = \"data-\" + key.replace( rmultiDash, \"-$&\" ).toLowerCase();\n\t\tdata = elem.getAttribute( name );\n\n\t\tif ( typeof data === \"string\" ) {\n\t\t\ttry {\n\t\t\t\tdata = data === \"true\" ? true :\n\t\t\t\t\tdata === \"false\" ? false :\n\t\t\t\t\tdata === \"null\" ? null :\n\n\t\t\t\t\t// Only convert to a number if it doesn't change the string\n\t\t\t\t\t+data + \"\" === data ? +data :\n\t\t\t\t\trbrace.test( data ) ? jQuery.parseJSON( data ) :\n\t\t\t\t\tdata;\n\t\t\t} catch ( e ) {}\n\n\t\t\t// Make sure we set the data so it isn't changed later\n\t\t\tdataUser.set( elem, key, data );\n\t\t} else {\n\t\t\tdata = undefined;\n\t\t}\n\t}\n\treturn data;\n}\n\njQuery.extend( {\n\thasData: function( elem ) {\n\t\treturn dataUser.hasData( elem ) || dataPriv.hasData( elem );\n\t},\n\n\tdata: function( elem, name, data ) {\n\t\treturn dataUser.access( elem, name, data );\n\t},\n\n\tremoveData: function( elem, name ) {\n\t\tdataUser.remove( elem, name );\n\t},\n\n\t// TODO: Now that all calls to _data and _removeData have been replaced\n\t// with direct calls to dataPriv methods, these can be deprecated.\n\t_data: function( elem, name, data ) {\n\t\treturn dataPriv.access( elem, name, data );\n\t},\n\n\t_removeData: function( elem, name ) {\n\t\tdataPriv.remove( elem, name );\n\t}\n} );\n\njQuery.fn.extend( {\n\tdata: function( key, value ) {\n\t\tvar i, name, data,\n\t\t\telem = this[ 0 ],\n\t\t\tattrs = elem && elem.attributes;\n\n\t\t// Gets all values\n\t\tif ( key === undefined ) {\n\t\t\tif ( this.length ) {\n\t\t\t\tdata = dataUser.get( elem );\n\n\t\t\t\tif ( elem.nodeType === 1 && !dataPriv.get( elem, \"hasDataAttrs\" ) ) {\n\t\t\t\t\ti = attrs.length;\n\t\t\t\t\twhile ( i-- ) {\n\n\t\t\t\t\t\t// Support: IE11+\n\t\t\t\t\t\t// The attrs elements can be null (#14894)\n\t\t\t\t\t\tif ( attrs[ i ] ) {\n\t\t\t\t\t\t\tname = attrs[ i ].name;\n\t\t\t\t\t\t\tif ( name.indexOf( \"data-\" ) === 0 ) {\n\t\t\t\t\t\t\t\tname = jQuery.camelCase( name.slice( 5 ) );\n\t\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdataPriv.set( elem, \"hasDataAttrs\", true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\n\t\t// Sets multiple values\n\t\tif ( typeof key === \"object\" ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tdataUser.set( this, key );\n\t\t\t} );\n\t\t}\n\n\t\treturn access( this, function( value ) {\n\t\t\tvar data, camelKey;\n\n\t\t\t// The calling jQuery object (element matches) is not empty\n\t\t\t// (and therefore has an element appears at this[ 0 ]) and the\n\t\t\t// `value` parameter was not undefined. An empty jQuery object\n\t\t\t// will result in `undefined` for elem = this[ 0 ] which will\n\t\t\t// throw an exception if an attempt to read a data cache is made.\n\t\t\tif ( elem && value === undefined ) {\n\n\t\t\t\t// Attempt to get data from the cache\n\t\t\t\t// with the key as-is\n\t\t\t\tdata = dataUser.get( elem, key ) ||\n\n\t\t\t\t\t// Try to find dashed key if it exists (gh-2779)\n\t\t\t\t\t// This is for 2.2.x only\n\t\t\t\t\tdataUser.get( elem, key.replace( rmultiDash, \"-$&\" ).toLowerCase() );\n\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\tcamelKey = jQuery.camelCase( key );\n\n\t\t\t\t// Attempt to get data from the cache\n\t\t\t\t// with the key camelized\n\t\t\t\tdata = dataUser.get( elem, camelKey );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// Attempt to \"discover\" the data in\n\t\t\t\t// HTML5 custom data-* attrs\n\t\t\t\tdata = dataAttr( elem, camelKey, undefined );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// We tried really hard, but the data doesn't exist.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Set the data...\n\t\t\tcamelKey = jQuery.camelCase( key );\n\t\t\tthis.each( function() {\n\n\t\t\t\t// First, attempt to store a copy or reference of any\n\t\t\t\t// data that might've been store with a camelCased key.\n\t\t\t\tvar data = dataUser.get( this, camelKey );\n\n\t\t\t\t// For HTML5 data-* attribute interop, we have to\n\t\t\t\t// store property names with dashes in a camelCase form.\n\t\t\t\t// This might not apply to all properties...*\n\t\t\t\tdataUser.set( this, camelKey, value );\n\n\t\t\t\t// *... In the case of properties that might _actually_\n\t\t\t\t// have dashes, we need to also store a copy of that\n\t\t\t\t// unchanged property.\n\t\t\t\tif ( key.indexOf( \"-\" ) > -1 && data !== undefined ) {\n\t\t\t\t\tdataUser.set( this, key, value );\n\t\t\t\t}\n\t\t\t} );\n\t\t}, null, value, arguments.length > 1, null, true );\n\t},\n\n\tremoveData: function( key ) {\n\t\treturn this.each( function() {\n\t\t\tdataUser.remove( this, key );\n\t\t} );\n\t}\n} );\n\n\njQuery.extend( {\n\tqueue: function( elem, type, data ) {\n\t\tvar queue;\n\n\t\tif ( elem ) {\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\n\t\t\tqueue = dataPriv.get( elem, type );\n\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\n\t\t\tif ( data ) {\n\t\t\t\tif ( !queue || jQuery.isArray( data ) ) {\n\t\t\t\t\tqueue = dataPriv.access( elem, type, jQuery.makeArray( data ) );\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push( data );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn queue || [];\n\t\t}\n\t},\n\n\tdequeue: function( elem, type ) {\n\t\ttype = type || \"fx\";\n\n\t\tvar queue = jQuery.queue( elem, type ),\n\t\t\tstartLength = queue.length,\n\t\t\tfn = queue.shift(),\n\t\t\thooks = jQuery._queueHooks( elem, type ),\n\t\t\tnext = function() {\n\t\t\t\tjQuery.dequeue( elem, type );\n\t\t\t};\n\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\n\t\tif ( fn === \"inprogress\" ) {\n\t\t\tfn = queue.shift();\n\t\t\tstartLength--;\n\t\t}\n\n\t\tif ( fn ) {\n\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\n\t\t\t// automatically dequeued\n\t\t\tif ( type === \"fx\" ) {\n\t\t\t\tqueue.unshift( \"inprogress\" );\n\t\t\t}\n\n\t\t\t// Clear up the last queue stop function\n\t\t\tdelete hooks.stop;\n\t\t\tfn.call( elem, next, hooks );\n\t\t}\n\n\t\tif ( !startLength && hooks ) {\n\t\t\thooks.empty.fire();\n\t\t}\n\t},\n\n\t// Not public - generate a queueHooks object, or return the current one\n\t_queueHooks: function( elem, type ) {\n\t\tvar key = type + \"queueHooks\";\n\t\treturn dataPriv.get( elem, key ) || dataPriv.access( elem, key, {\n\t\t\tempty: jQuery.Callbacks( \"once memory\" ).add( function() {\n\t\t\t\tdataPriv.remove( elem, [ type + \"queue\", key ] );\n\t\t\t} )\n\t\t} );\n\t}\n} );\n\njQuery.fn.extend( {\n\tqueue: function( type, data ) {\n\t\tvar setter = 2;\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tdata = type;\n\t\t\ttype = \"fx\";\n\t\t\tsetter--;\n\t\t}\n\n\t\tif ( arguments.length < setter ) {\n\t\t\treturn jQuery.queue( this[ 0 ], type );\n\t\t}\n\n\t\treturn data === undefined ?\n\t\t\tthis :\n\t\t\tthis.each( function() {\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\n\n\t\t\t\t// Ensure a hooks for this queue\n\t\t\t\tjQuery._queueHooks( this, type );\n\n\t\t\t\tif ( type === \"fx\" && queue[ 0 ] !== \"inprogress\" ) {\n\t\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t\t}\n\t\t\t} );\n\t},\n\tdequeue: function( type ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.dequeue( this, type );\n\t\t} );\n\t},\n\tclearQueue: function( type ) {\n\t\treturn this.queue( type || \"fx\", [] );\n\t},\n\n\t// Get a promise resolved when queues of a certain type\n\t// are emptied (fx is the type by default)\n\tpromise: function( type, obj ) {\n\t\tvar tmp,\n\t\t\tcount = 1,\n\t\t\tdefer = jQuery.Deferred(),\n\t\t\telements = this,\n\t\t\ti = this.length,\n\t\t\tresolve = function() {\n\t\t\t\tif ( !( --count ) ) {\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\n\t\t\t\t}\n\t\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tobj = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\ttype = type || \"fx\";\n\n\t\twhile ( i-- ) {\n\t\t\ttmp = dataPriv.get( elements[ i ], type + \"queueHooks\" );\n\t\t\tif ( tmp && tmp.empty ) {\n\t\t\t\tcount++;\n\t\t\t\ttmp.empty.add( resolve );\n\t\t\t}\n\t\t}\n\t\tresolve();\n\t\treturn defer.promise( obj );\n\t}\n} );\nvar pnum = ( /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/ ).source;\n\nvar rcssNum = new RegExp( \"^(?:([+-])=|)(\" + pnum + \")([a-z%]*)$\", \"i\" );\n\n\nvar cssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ];\n\nvar isHidden = function( elem, el ) {\n\n\t\t// isHidden might be called from jQuery#filter function;\n\t\t// in that case, element will be second argument\n\t\telem = el || elem;\n\t\treturn jQuery.css( elem, \"display\" ) === \"none\" ||\n\t\t\t!jQuery.contains( elem.ownerDocument, elem );\n\t};\n\n\n\nfunction adjustCSS( elem, prop, valueParts, tween ) {\n\tvar adjusted,\n\t\tscale = 1,\n\t\tmaxIterations = 20,\n\t\tcurrentValue = tween ?\n\t\t\tfunction() { return tween.cur(); } :\n\t\t\tfunction() { return jQuery.css( elem, prop, \"\" ); },\n\t\tinitial = currentValue(),\n\t\tunit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" ),\n\n\t\t// Starting value computation is required for potential unit mismatches\n\t\tinitialInUnit = ( jQuery.cssNumber[ prop ] || unit !== \"px\" && +initial ) &&\n\t\t\trcssNum.exec( jQuery.css( elem, prop ) );\n\n\tif ( initialInUnit && initialInUnit[ 3 ] !== unit ) {\n\n\t\t// Trust units reported by jQuery.css\n\t\tunit = unit || initialInUnit[ 3 ];\n\n\t\t// Make sure we update the tween properties later on\n\t\tvalueParts = valueParts || [];\n\n\t\t// Iteratively approximate from a nonzero starting point\n\t\tinitialInUnit = +initial || 1;\n\n\t\tdo {\n\n\t\t\t// If previous iteration zeroed out, double until we get *something*.\n\t\t\t// Use string for doubling so we don't accidentally see scale as unchanged below\n\t\t\tscale = scale || \".5\";\n\n\t\t\t// Adjust and apply\n\t\t\tinitialInUnit = initialInUnit / scale;\n\t\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\n\t\t// Update scale, tolerating zero or NaN from tween.cur()\n\t\t// Break the loop if scale is unchanged or perfect, or if we've just had enough.\n\t\t} while (\n\t\t\tscale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations\n\t\t);\n\t}\n\n\tif ( valueParts ) {\n\t\tinitialInUnit = +initialInUnit || +initial || 0;\n\n\t\t// Apply relative offset (+=/-=) if specified\n\t\tadjusted = valueParts[ 1 ] ?\n\t\t\tinitialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :\n\t\t\t+valueParts[ 2 ];\n\t\tif ( tween ) {\n\t\t\ttween.unit = unit;\n\t\t\ttween.start = initialInUnit;\n\t\t\ttween.end = adjusted;\n\t\t}\n\t}\n\treturn adjusted;\n}\nvar rcheckableType = ( /^(?:checkbox|radio)$/i );\n\nvar rtagName = ( /<([\\w:-]+)/ );\n\nvar rscriptType = ( /^$|\\/(?:java|ecma)script/i );\n\n\n\n// We have to close these tags to support XHTML (#13200)\nvar wrapMap = {\n\n\t// Support: IE9\n\toption: [ 1, \"\", \"\" ],\n\n\t// XHTML parsers do not magically insert elements in the\n\t// same way that tag soup parsers do. So we cannot shorten\n\t// this by omitting or other required elements.\n\tthead: [ 1, \"\", \"\" ],\n\tcol: [ 2, \"\", \"\" ],\n\ttr: [ 2, \"\", \"\" ],\n\ttd: [ 3, \"\", \"\" ],\n\n\t_default: [ 0, \"\", \"\" ]\n};\n\n// Support: IE9\nwrapMap.optgroup = wrapMap.option;\n\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n\nfunction getAll( context, tag ) {\n\n\t// Support: IE9-11+\n\t// Use typeof to avoid zero-argument method invocation on host objects (#15151)\n\tvar ret = typeof context.getElementsByTagName !== \"undefined\" ?\n\t\t\tcontext.getElementsByTagName( tag || \"*\" ) :\n\t\t\ttypeof context.querySelectorAll !== \"undefined\" ?\n\t\t\t\tcontext.querySelectorAll( tag || \"*\" ) :\n\t\t\t[];\n\n\treturn tag === undefined || tag && jQuery.nodeName( context, tag ) ?\n\t\tjQuery.merge( [ context ], ret ) :\n\t\tret;\n}\n\n\n// Mark scripts as having already been evaluated\nfunction setGlobalEval( elems, refElements ) {\n\tvar i = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\tdataPriv.set(\n\t\t\telems[ i ],\n\t\t\t\"globalEval\",\n\t\t\t!refElements || dataPriv.get( refElements[ i ], \"globalEval\" )\n\t\t);\n\t}\n}\n\n\nvar rhtml = /<|?\\w+;/;\n\nfunction buildFragment( elems, context, scripts, selection, ignored ) {\n\tvar elem, tmp, tag, wrap, contains, j,\n\t\tfragment = context.createDocumentFragment(),\n\t\tnodes = [],\n\t\ti = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\telem = elems[ i ];\n\n\t\tif ( elem || elem === 0 ) {\n\n\t\t\t// Add nodes directly\n\t\t\tif ( jQuery.type( elem ) === \"object\" ) {\n\n\t\t\t\t// Support: Android<4.1, PhantomJS<2\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\n\n\t\t\t// Convert non-html into a text node\n\t\t\t} else if ( !rhtml.test( elem ) ) {\n\t\t\t\tnodes.push( context.createTextNode( elem ) );\n\n\t\t\t// Convert html into DOM nodes\n\t\t\t} else {\n\t\t\t\ttmp = tmp || fragment.appendChild( context.createElement( \"div\" ) );\n\n\t\t\t\t// Deserialize a standard representation\n\t\t\t\ttag = ( rtagName.exec( elem ) || [ \"\", \"\" ] )[ 1 ].toLowerCase();\n\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\n\t\t\t\ttmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];\n\n\t\t\t\t// Descend through wrappers to the right content\n\t\t\t\tj = wrap[ 0 ];\n\t\t\t\twhile ( j-- ) {\n\t\t\t\t\ttmp = tmp.lastChild;\n\t\t\t\t}\n\n\t\t\t\t// Support: Android<4.1, PhantomJS<2\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\n\n\t\t\t\t// Remember the top-level container\n\t\t\t\ttmp = fragment.firstChild;\n\n\t\t\t\t// Ensure the created nodes are orphaned (#12392)\n\t\t\t\ttmp.textContent = \"\";\n\t\t\t}\n\t\t}\n\t}\n\n\t// Remove wrapper from fragment\n\tfragment.textContent = \"\";\n\n\ti = 0;\n\twhile ( ( elem = nodes[ i++ ] ) ) {\n\n\t\t// Skip elements already in the context collection (trac-4087)\n\t\tif ( selection && jQuery.inArray( elem, selection ) > -1 ) {\n\t\t\tif ( ignored ) {\n\t\t\t\tignored.push( elem );\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tcontains = jQuery.contains( elem.ownerDocument, elem );\n\n\t\t// Append to fragment\n\t\ttmp = getAll( fragment.appendChild( elem ), \"script\" );\n\n\t\t// Preserve script evaluation history\n\t\tif ( contains ) {\n\t\t\tsetGlobalEval( tmp );\n\t\t}\n\n\t\t// Capture executables\n\t\tif ( scripts ) {\n\t\t\tj = 0;\n\t\t\twhile ( ( elem = tmp[ j++ ] ) ) {\n\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\n\t\t\t\t\tscripts.push( elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn fragment;\n}\n\n\n( function() {\n\tvar fragment = document.createDocumentFragment(),\n\t\tdiv = fragment.appendChild( document.createElement( \"div\" ) ),\n\t\tinput = document.createElement( \"input\" );\n\n\t// Support: Android 4.0-4.3, Safari<=5.1\n\t// Check state lost if the name is set (#11217)\n\t// Support: Windows Web Apps (WWA)\n\t// `name` and `type` must use .setAttribute for WWA (#14901)\n\tinput.setAttribute( \"type\", \"radio\" );\n\tinput.setAttribute( \"checked\", \"checked\" );\n\tinput.setAttribute( \"name\", \"t\" );\n\n\tdiv.appendChild( input );\n\n\t// Support: Safari<=5.1, Android<4.2\n\t// Older WebKit doesn't clone checked state correctly in fragments\n\tsupport.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;\n\n\t// Support: IE<=11+\n\t// Make sure textarea (and checkbox) defaultValue is properly cloned\n\tdiv.innerHTML = \"x\";\n\tsupport.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;\n} )();\n\n\nvar\n\trkeyEvent = /^key/,\n\trmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,\n\trtypenamespace = /^([^.]*)(?:\\.(.+)|)/;\n\nfunction returnTrue() {\n\treturn true;\n}\n\nfunction returnFalse() {\n\treturn false;\n}\n\n// Support: IE9\n// See #13393 for more info\nfunction safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}\n\nfunction on( elem, types, selector, data, fn, one ) {\n\tvar origFn, type;\n\n\t// Types can be a map of types/handlers\n\tif ( typeof types === \"object\" ) {\n\n\t\t// ( types-Object, selector, data )\n\t\tif ( typeof selector !== \"string\" ) {\n\n\t\t\t// ( types-Object, data )\n\t\t\tdata = data || selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tfor ( type in types ) {\n\t\t\ton( elem, type, selector, data, types[ type ], one );\n\t\t}\n\t\treturn elem;\n\t}\n\n\tif ( data == null && fn == null ) {\n\n\t\t// ( types, fn )\n\t\tfn = selector;\n\t\tdata = selector = undefined;\n\t} else if ( fn == null ) {\n\t\tif ( typeof selector === \"string\" ) {\n\n\t\t\t// ( types, selector, fn )\n\t\t\tfn = data;\n\t\t\tdata = undefined;\n\t\t} else {\n\n\t\t\t// ( types, data, fn )\n\t\t\tfn = data;\n\t\t\tdata = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t}\n\tif ( fn === false ) {\n\t\tfn = returnFalse;\n\t} else if ( !fn ) {\n\t\treturn elem;\n\t}\n\n\tif ( one === 1 ) {\n\t\torigFn = fn;\n\t\tfn = function( event ) {\n\n\t\t\t// Can use an empty set, since event contains the info\n\t\t\tjQuery().off( event );\n\t\t\treturn origFn.apply( this, arguments );\n\t\t};\n\n\t\t// Use same guid so caller can remove using origFn\n\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\n\t}\n\treturn elem.each( function() {\n\t\tjQuery.event.add( this, types, fn, data, selector );\n\t} );\n}\n\n/*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards' addEvent library for many of the ideas.\n */\njQuery.event = {\n\n\tglobal: {},\n\n\tadd: function( elem, types, handler, data, selector ) {\n\n\t\tvar handleObjIn, eventHandle, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.get( elem );\n\n\t\t// Don't attach events to noData or text/comment nodes (but allow plain objects)\n\t\tif ( !elemData ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Caller can pass in an object of custom data in lieu of the handler\n\t\tif ( handler.handler ) {\n\t\t\thandleObjIn = handler;\n\t\t\thandler = handleObjIn.handler;\n\t\t\tselector = handleObjIn.selector;\n\t\t}\n\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\n\t\tif ( !handler.guid ) {\n\t\t\thandler.guid = jQuery.guid++;\n\t\t}\n\n\t\t// Init the element's event structure and main handler, if this is the first\n\t\tif ( !( events = elemData.events ) ) {\n\t\t\tevents = elemData.events = {};\n\t\t}\n\t\tif ( !( eventHandle = elemData.handle ) ) {\n\t\t\teventHandle = elemData.handle = function( e ) {\n\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\n\t\t\t\t// when an event is called after a page has unloaded\n\t\t\t\treturn typeof jQuery !== \"undefined\" && jQuery.event.triggered !== e.type ?\n\t\t\t\t\tjQuery.event.dispatch.apply( elem, arguments ) : undefined;\n\t\t\t};\n\t\t}\n\n\t\t// Handle multiple events separated by a space\n\t\ttypes = ( types || \"\" ).match( rnotwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// There *must* be a type, no attaching namespace-only handlers\n\t\t\tif ( !type ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If event changes its type, use the special event handlers for the changed type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// If selector defined, determine special event api type, otherwise given type\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\n\t\t\t// Update special based on newly reset type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// handleObj is passed to all event handlers\n\t\t\thandleObj = jQuery.extend( {\n\t\t\t\ttype: type,\n\t\t\t\torigType: origType,\n\t\t\t\tdata: data,\n\t\t\t\thandler: handler,\n\t\t\t\tguid: handler.guid,\n\t\t\t\tselector: selector,\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\n\t\t\t\tnamespace: namespaces.join( \".\" )\n\t\t\t}, handleObjIn );\n\n\t\t\t// Init the event handler queue if we're the first\n\t\t\tif ( !( handlers = events[ type ] ) ) {\n\t\t\t\thandlers = events[ type ] = [];\n\t\t\t\thandlers.delegateCount = 0;\n\n\t\t\t\t// Only use addEventListener if the special events handler returns false\n\t\t\t\tif ( !special.setup ||\n\t\t\t\t\tspecial.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n\n\t\t\t\t\tif ( elem.addEventListener ) {\n\t\t\t\t\t\telem.addEventListener( type, eventHandle );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( special.add ) {\n\t\t\t\tspecial.add.call( elem, handleObj );\n\n\t\t\t\tif ( !handleObj.handler.guid ) {\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add to the element's handler list, delegates in front\n\t\t\tif ( selector ) {\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\n\t\t\t} else {\n\t\t\t\thandlers.push( handleObj );\n\t\t\t}\n\n\t\t\t// Keep track of which events have ever been used, for event optimization\n\t\t\tjQuery.event.global[ type ] = true;\n\t\t}\n\n\t},\n\n\t// Detach an event or set of events from an element\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\n\n\t\tvar j, origCount, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.hasData( elem ) && dataPriv.get( elem );\n\n\t\tif ( !elemData || !( events = elemData.events ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Once for each type.namespace in types; type may be omitted\n\t\ttypes = ( types || \"\" ).match( rnotwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\n\t\t\tif ( !type ) {\n\t\t\t\tfor ( type in events ) {\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\t\t\thandlers = events[ type ] || [];\n\t\t\ttmp = tmp[ 2 ] &&\n\t\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" );\n\n\t\t\t// Remove matching events\n\t\t\torigCount = j = handlers.length;\n\t\t\twhile ( j-- ) {\n\t\t\t\thandleObj = handlers[ j ];\n\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\n\t\t\t\t\t( !selector || selector === handleObj.selector ||\n\t\t\t\t\t\tselector === \"**\" && handleObj.selector ) ) {\n\t\t\t\t\thandlers.splice( j, 1 );\n\n\t\t\t\t\tif ( handleObj.selector ) {\n\t\t\t\t\t\thandlers.delegateCount--;\n\t\t\t\t\t}\n\t\t\t\t\tif ( special.remove ) {\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\n\t\t\tif ( origCount && !handlers.length ) {\n\t\t\t\tif ( !special.teardown ||\n\t\t\t\t\tspecial.teardown.call( elem, namespaces, elemData.handle ) === false ) {\n\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\n\t\t\t\t}\n\n\t\t\t\tdelete events[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove data and the expando if it's no longer used\n\t\tif ( jQuery.isEmptyObject( events ) ) {\n\t\t\tdataPriv.remove( elem, \"handle events\" );\n\t\t}\n\t},\n\n\tdispatch: function( event ) {\n\n\t\t// Make a writable jQuery.Event from the native event object\n\t\tevent = jQuery.event.fix( event );\n\n\t\tvar i, j, ret, matched, handleObj,\n\t\t\thandlerQueue = [],\n\t\t\targs = slice.call( arguments ),\n\t\t\thandlers = ( dataPriv.get( this, \"events\" ) || {} )[ event.type ] || [],\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\n\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\n\t\targs[ 0 ] = event;\n\t\tevent.delegateTarget = this;\n\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine handlers\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\n\n\t\t// Run delegates first; they may want to stop propagation beneath us\n\t\ti = 0;\n\t\twhile ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tevent.currentTarget = matched.elem;\n\n\t\t\tj = 0;\n\t\t\twhile ( ( handleObj = matched.handlers[ j++ ] ) &&\n\t\t\t\t!event.isImmediatePropagationStopped() ) {\n\n\t\t\t\t// Triggered event must either 1) have no namespace, or 2) have namespace(s)\n\t\t\t\t// a subset or equal to those in the bound event (both can have no namespace).\n\t\t\t\tif ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) {\n\n\t\t\t\t\tevent.handleObj = handleObj;\n\t\t\t\t\tevent.data = handleObj.data;\n\n\t\t\t\t\tret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||\n\t\t\t\t\t\thandleObj.handler ).apply( matched.elem, args );\n\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\tif ( ( event.result = ret ) === false ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Call the postDispatch hook for the mapped type\n\t\tif ( special.postDispatch ) {\n\t\t\tspecial.postDispatch.call( this, event );\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\thandlers: function( event, handlers ) {\n\t\tvar i, matches, sel, handleObj,\n\t\t\thandlerQueue = [],\n\t\t\tdelegateCount = handlers.delegateCount,\n\t\t\tcur = event.target;\n\n\t\t// Support (at least): Chrome, IE9\n\t\t// Find delegate handlers\n\t\t// Black-hole SVG instance trees (#13180)\n\t\t//\n\t\t// Support: Firefox<=42+\n\t\t// Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343)\n\t\tif ( delegateCount && cur.nodeType &&\n\t\t\t( event.type !== \"click\" || isNaN( event.button ) || event.button < 1 ) ) {\n\n\t\t\tfor ( ; cur !== this; cur = cur.parentNode || this ) {\n\n\t\t\t\t// Don't check non-elements (#13208)\n\t\t\t\t// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)\n\t\t\t\tif ( cur.nodeType === 1 && ( cur.disabled !== true || event.type !== \"click\" ) ) {\n\t\t\t\t\tmatches = [];\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\n\t\t\t\t\t\thandleObj = handlers[ i ];\n\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (#13203)\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\n\n\t\t\t\t\t\tif ( matches[ sel ] === undefined ) {\n\t\t\t\t\t\t\tmatches[ sel ] = handleObj.needsContext ?\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) > -1 :\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( matches[ sel ] ) {\n\t\t\t\t\t\t\tmatches.push( handleObj );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( matches.length ) {\n\t\t\t\t\t\thandlerQueue.push( { elem: cur, handlers: matches } );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add the remaining (directly-bound) handlers\n\t\tif ( delegateCount < handlers.length ) {\n\t\t\thandlerQueue.push( { elem: this, handlers: handlers.slice( delegateCount ) } );\n\t\t}\n\n\t\treturn handlerQueue;\n\t},\n\n\t// Includes some event props shared by KeyEvent and MouseEvent\n\tprops: ( \"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase \" +\n\t\t\"metaKey relatedTarget shiftKey target timeStamp view which\" ).split( \" \" ),\n\n\tfixHooks: {},\n\n\tkeyHooks: {\n\t\tprops: \"char charCode key keyCode\".split( \" \" ),\n\t\tfilter: function( event, original ) {\n\n\t\t\t// Add which for key events\n\t\t\tif ( event.which == null ) {\n\t\t\t\tevent.which = original.charCode != null ? original.charCode : original.keyCode;\n\t\t\t}\n\n\t\t\treturn event;\n\t\t}\n\t},\n\n\tmouseHooks: {\n\t\tprops: ( \"button buttons clientX clientY offsetX offsetY pageX pageY \" +\n\t\t\t\"screenX screenY toElement\" ).split( \" \" ),\n\t\tfilter: function( event, original ) {\n\t\t\tvar eventDoc, doc, body,\n\t\t\t\tbutton = original.button;\n\n\t\t\t// Calculate pageX/Y if missing and clientX/Y available\n\t\t\tif ( event.pageX == null && original.clientX != null ) {\n\t\t\t\teventDoc = event.target.ownerDocument || document;\n\t\t\t\tdoc = eventDoc.documentElement;\n\t\t\t\tbody = eventDoc.body;\n\n\t\t\t\tevent.pageX = original.clientX +\n\t\t\t\t\t( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) -\n\t\t\t\t\t( doc && doc.clientLeft || body && body.clientLeft || 0 );\n\t\t\t\tevent.pageY = original.clientY +\n\t\t\t\t\t( doc && doc.scrollTop || body && body.scrollTop || 0 ) -\n\t\t\t\t\t( doc && doc.clientTop || body && body.clientTop || 0 );\n\t\t\t}\n\n\t\t\t// Add which for click: 1 === left; 2 === middle; 3 === right\n\t\t\t// Note: button is not normalized, so don't use it\n\t\t\tif ( !event.which && button !== undefined ) {\n\t\t\t\tevent.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );\n\t\t\t}\n\n\t\t\treturn event;\n\t\t}\n\t},\n\n\tfix: function( event ) {\n\t\tif ( event[ jQuery.expando ] ) {\n\t\t\treturn event;\n\t\t}\n\n\t\t// Create a writable copy of the event object and normalize some properties\n\t\tvar i, prop, copy,\n\t\t\ttype = event.type,\n\t\t\toriginalEvent = event,\n\t\t\tfixHook = this.fixHooks[ type ];\n\n\t\tif ( !fixHook ) {\n\t\t\tthis.fixHooks[ type ] = fixHook =\n\t\t\t\trmouseEvent.test( type ) ? this.mouseHooks :\n\t\t\t\trkeyEvent.test( type ) ? this.keyHooks :\n\t\t\t\t{};\n\t\t}\n\t\tcopy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;\n\n\t\tevent = new jQuery.Event( originalEvent );\n\n\t\ti = copy.length;\n\t\twhile ( i-- ) {\n\t\t\tprop = copy[ i ];\n\t\t\tevent[ prop ] = originalEvent[ prop ];\n\t\t}\n\n\t\t// Support: Cordova 2.5 (WebKit) (#13255)\n\t\t// All events should have a target; Cordova deviceready doesn't\n\t\tif ( !event.target ) {\n\t\t\tevent.target = document;\n\t\t}\n\n\t\t// Support: Safari 6.0+, Chrome<28\n\t\t// Target should not be a text node (#504, #13143)\n\t\tif ( event.target.nodeType === 3 ) {\n\t\t\tevent.target = event.target.parentNode;\n\t\t}\n\n\t\treturn fixHook.filter ? fixHook.filter( event, originalEvent ) : event;\n\t},\n\n\tspecial: {\n\t\tload: {\n\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\n\t\t\tnoBubble: true\n\t\t},\n\t\tfocus: {\n\n\t\t\t// Fire native event if possible so blur/focus sequence is correct\n\t\t\ttrigger: function() {\n\t\t\t\tif ( this !== safeActiveElement() && this.focus ) {\n\t\t\t\t\tthis.focus();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdelegateType: \"focusin\"\n\t\t},\n\t\tblur: {\n\t\t\ttrigger: function() {\n\t\t\t\tif ( this === safeActiveElement() && this.blur ) {\n\t\t\t\t\tthis.blur();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdelegateType: \"focusout\"\n\t\t},\n\t\tclick: {\n\n\t\t\t// For checkbox, fire native event so checked state will be right\n\t\t\ttrigger: function() {\n\t\t\t\tif ( this.type === \"checkbox\" && this.click && jQuery.nodeName( this, \"input\" ) ) {\n\t\t\t\t\tthis.click();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t// For cross-browser consistency, don't fire native .click() on links\n\t\t\t_default: function( event ) {\n\t\t\t\treturn jQuery.nodeName( event.target, \"a\" );\n\t\t\t}\n\t\t},\n\n\t\tbeforeunload: {\n\t\t\tpostDispatch: function( event ) {\n\n\t\t\t\t// Support: Firefox 20+\n\t\t\t\t// Firefox doesn't alert if the returnValue field is not set.\n\t\t\t\tif ( event.result !== undefined && event.originalEvent ) {\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\njQuery.removeEvent = function( elem, type, handle ) {\n\n\t// This \"if\" is needed for plain objects\n\tif ( elem.removeEventListener ) {\n\t\telem.removeEventListener( type, handle );\n\t}\n};\n\njQuery.Event = function( src, props ) {\n\n\t// Allow instantiation without the 'new' keyword\n\tif ( !( this instanceof jQuery.Event ) ) {\n\t\treturn new jQuery.Event( src, props );\n\t}\n\n\t// Event object\n\tif ( src && src.type ) {\n\t\tthis.originalEvent = src;\n\t\tthis.type = src.type;\n\n\t\t// Events bubbling up the document may have been marked as prevented\n\t\t// by a handler lower down the tree; reflect the correct value.\n\t\tthis.isDefaultPrevented = src.defaultPrevented ||\n\t\t\t\tsrc.defaultPrevented === undefined &&\n\n\t\t\t\t// Support: Android<4.0\n\t\t\t\tsrc.returnValue === false ?\n\t\t\treturnTrue :\n\t\t\treturnFalse;\n\n\t// Event type\n\t} else {\n\t\tthis.type = src;\n\t}\n\n\t// Put explicitly provided properties onto the event object\n\tif ( props ) {\n\t\tjQuery.extend( this, props );\n\t}\n\n\t// Create a timestamp if incoming event doesn't have one\n\tthis.timeStamp = src && src.timeStamp || jQuery.now();\n\n\t// Mark it as fixed\n\tthis[ jQuery.expando ] = true;\n};\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n\tconstructor: jQuery.Event,\n\tisDefaultPrevented: returnFalse,\n\tisPropagationStopped: returnFalse,\n\tisImmediatePropagationStopped: returnFalse,\n\tisSimulated: false,\n\n\tpreventDefault: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isDefaultPrevented = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.preventDefault();\n\t\t}\n\t},\n\tstopPropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isPropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopPropagation();\n\t\t}\n\t},\n\tstopImmediatePropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isImmediatePropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\n\t\tthis.stopPropagation();\n\t}\n};\n\n// Create mouseenter/leave events using mouseover/out and event-time checks\n// so that event delegation works in jQuery.\n// Do the same for pointerenter/pointerleave and pointerover/pointerout\n//\n// Support: Safari 7 only\n// Safari sends mouseenter too often; see:\n// https://code.google.com/p/chromium/issues/detail?id=470258\n// for the description of the bug (it existed in older Chrome versions as well).\njQuery.each( {\n\tmouseenter: \"mouseover\",\n\tmouseleave: \"mouseout\",\n\tpointerenter: \"pointerover\",\n\tpointerleave: \"pointerout\"\n}, function( orig, fix ) {\n\tjQuery.event.special[ orig ] = {\n\t\tdelegateType: fix,\n\t\tbindType: fix,\n\n\t\thandle: function( event ) {\n\t\t\tvar ret,\n\t\t\t\ttarget = this,\n\t\t\t\trelated = event.relatedTarget,\n\t\t\t\thandleObj = event.handleObj;\n\n\t\t\t// For mouseenter/leave call the handler if related is outside the target.\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\n\t\t\tif ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {\n\t\t\t\tevent.type = handleObj.origType;\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\n\t\t\t\tevent.type = fix;\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t};\n} );\n\njQuery.fn.extend( {\n\ton: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn );\n\t},\n\tone: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn, 1 );\n\t},\n\toff: function( types, selector, fn ) {\n\t\tvar handleObj, type;\n\t\tif ( types && types.preventDefault && types.handleObj ) {\n\n\t\t\t// ( event ) dispatched jQuery.Event\n\t\t\thandleObj = types.handleObj;\n\t\t\tjQuery( types.delegateTarget ).off(\n\t\t\t\thandleObj.namespace ?\n\t\t\t\t\thandleObj.origType + \".\" + handleObj.namespace :\n\t\t\t\t\thandleObj.origType,\n\t\t\t\thandleObj.selector,\n\t\t\t\thandleObj.handler\n\t\t\t);\n\t\t\treturn this;\n\t\t}\n\t\tif ( typeof types === \"object\" ) {\n\n\t\t\t// ( types-object [, selector] )\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.off( type, selector, types[ type ] );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif ( selector === false || typeof selector === \"function\" ) {\n\n\t\t\t// ( types [, fn] )\n\t\t\tfn = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.remove( this, types, fn, selector );\n\t\t} );\n\t}\n} );\n\n\nvar\n\trxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:-]+)[^>]*)\\/>/gi,\n\n\t// Support: IE 10-11, Edge 10240+\n\t// In IE/Edge using regex groups here causes severe slowdowns.\n\t// See https://connect.microsoft.com/IE/feedback/details/1736512/\n\trnoInnerhtml = /\n ```\n \n And associate it by name using a view's `templateName` property:\n \n ```javascript\n AView = Ember.View.extend({\n templateName: 'some-template'\n });\n ```\n \n If you have nested routes, your Handlebars template will look like this:\n \n ```html\n \n ```\n \n And `templateName` property:\n \n ```javascript\n AView = Ember.View.extend({\n templateName: 'posts/new'\n });\n ```\n \n Using a value for `templateName` that does not have a template\n with a matching `data-template-name` attribute will throw an error.\n \n For views classes that may have a template later defined (e.g. as the block\n portion of a `{{view}}` helper call in another template or in\n a subclass), you can provide a `defaultTemplate` property set to compiled\n template function. If a template is not later provided for the view instance\n the `defaultTemplate` value will be used:\n \n ```javascript\n AView = Ember.View.extend({\n defaultTemplate: Ember.HTMLBars.compile('I was the default'),\n template: null,\n templateName: null\n });\n ```\n \n Will result in instances with an HTML representation of:\n \n ```html\n I was the default\n ```\n \n If a `template` or `templateName` is provided it will take precedence over\n `defaultTemplate`:\n \n ```javascript\n AView = Ember.View.extend({\n defaultTemplate: Ember.HTMLBars.compile('I was the default')\n });\n \n aView = AView.create({\n template: Ember.HTMLBars.compile('I was the template, not default')\n });\n ```\n \n Will result in the following HTML representation when rendered:\n \n ```html\n I was the template, not default\n ```\n \n ## View Context\n \n The default context of the compiled template is the view's controller:\n \n ```javascript\n AView = Ember.View.extend({\n template: Ember.HTMLBars.compile('Hello {{excitedGreeting}}')\n });\n \n aController = Ember.Object.create({\n firstName: 'Barry',\n excitedGreeting: Ember.computed('content.firstName', function() {\n return this.get('content.firstName') + '!!!';\n })\n });\n \n aView = AView.create({\n controller: aController\n });\n ```\n \n Will result in an HTML representation of:\n \n ```html\n Hello Barry!!!\n ```\n \n A context can also be explicitly supplied through the view's `context`\n property. If the view has neither `context` nor `controller` properties, the\n `parentView`'s context will be used.\n \n ## Layouts\n \n Views can have a secondary template that wraps their main template. Like\n primary templates, layouts can be any function that accepts an optional\n context parameter and returns a string of HTML that will be inserted inside\n view's tag. Views whose HTML element is self closing (e.g. ``)\n cannot have a layout and this property will be ignored.\n \n Most typically in Ember a layout will be a compiled template.\n \n A view's layout can be set directly with the `layout` property or reference\n an existing template by name with the `layoutName` property.\n \n A template used as a layout must contain a single use of the\n `{{yield}}` helper. The HTML contents of a view's rendered `template` will be\n inserted at this location:\n \n ```javascript\n AViewWithLayout = Ember.View.extend({\n layout: Ember.HTMLBars.compile(\"{{yield}}\"),\n template: Ember.HTMLBars.compile(\"I got wrapped\")\n });\n ```\n \n Will result in view instances with an HTML representation of:\n \n ```html\n \n \n I got wrapped\n \n \n ```\n \n See [Ember.Templates.helpers.yield](/api/classes/Ember.Templates.helpers.html#method_yield)\n for more information.\n \n ## Responding to Browser Events\n \n Views can respond to user-initiated events in one of three ways: method\n implementation, through an event manager, and through `{{action}}` helper use\n in their template or layout.\n \n ### Method Implementation\n \n Views can respond to user-initiated events by implementing a method that\n matches the event name. A `jQuery.Event` object will be passed as the\n argument to this method.\n \n ```javascript\n AView = Ember.View.extend({\n click: function(event) {\n // will be called when an instance's\n // rendered element is clicked\n }\n });\n ```\n \n ### Event Managers\n \n Views can define an object as their `eventManager` property. This object can\n then implement methods that match the desired event names. Matching events\n that occur on the view's rendered HTML or the rendered HTML of any of its DOM\n descendants will trigger this method. A `jQuery.Event` object will be passed\n as the first argument to the method and an `Ember.View` object as the\n second. The `Ember.View` will be the view whose rendered HTML was interacted\n with. This may be the view with the `eventManager` property or one of its\n descendant views.\n \n ```javascript\n AView = Ember.View.extend({\n eventManager: Ember.Object.create({\n doubleClick: function(event, view) {\n // will be called when an instance's\n // rendered element or any rendering\n // of this view's descendant\n // elements is clicked\n }\n })\n });\n ```\n \n An event defined for an event manager takes precedence over events of the\n same name handled through methods on the view.\n \n ```javascript\n AView = Ember.View.extend({\n mouseEnter: function(event) {\n // will never trigger.\n },\n eventManager: Ember.Object.create({\n mouseEnter: function(event, view) {\n // takes precedence over AView#mouseEnter\n }\n })\n });\n ```\n \n Similarly a view's event manager will take precedence for events of any views\n rendered as a descendant. A method name that matches an event name will not\n be called if the view instance was rendered inside the HTML representation of\n a view that has an `eventManager` property defined that handles events of the\n name. Events not handled by the event manager will still trigger method calls\n on the descendant.\n \n ```javascript\n var App = Ember.Application.create();\n App.OuterView = Ember.View.extend({\n template: Ember.HTMLBars.compile(\"outer {{#view 'inner'}}inner{{/view}} outer\"),\n eventManager: Ember.Object.create({\n mouseEnter: function(event, view) {\n // view might be instance of either\n // OuterView or InnerView depending on\n // where on the page the user interaction occurred\n }\n })\n });\n \n App.InnerView = Ember.View.extend({\n click: function(event) {\n // will be called if rendered inside\n // an OuterView because OuterView's\n // eventManager doesn't handle click events\n },\n mouseEnter: function(event) {\n // will never be called if rendered inside\n // an OuterView.\n }\n });\n ```\n \n ### `{{action}}` Helper\n \n See [Ember.Templates.helpers.action](/api/classes/Ember.Templates.helpers.html#method_action).\n \n ### Event Names\n \n All of the event handling approaches described above respond to the same set\n of events. The names of the built-in events are listed below. (The hash of\n built-in events exists in `Ember.EventDispatcher`.) Additional, custom events\n can be registered by using `Ember.Application.customEvents`.\n \n Touch events:\n \n * `touchStart`\n * `touchMove`\n * `touchEnd`\n * `touchCancel`\n \n Keyboard events\n \n * `keyDown`\n * `keyUp`\n * `keyPress`\n \n Mouse events\n \n * `mouseDown`\n * `mouseUp`\n * `contextMenu`\n * `click`\n * `doubleClick`\n * `mouseMove`\n * `focusIn`\n * `focusOut`\n * `mouseEnter`\n * `mouseLeave`\n \n Form events:\n \n * `submit`\n * `change`\n * `focusIn`\n * `focusOut`\n * `input`\n \n HTML5 drag and drop events:\n \n * `dragStart`\n * `drag`\n * `dragEnter`\n * `dragLeave`\n * `dragOver`\n * `dragEnd`\n * `drop`\n \n ## `{{view}}` Helper\n \n Other `Ember.View` instances can be included as part of a view's template by\n using the `{{view}}` helper. See [Ember.Templates.helpers.view](/api/classes/Ember.Templates.helpers.html#method_view)\n for additional information.\n \n @class View\n @namespace Ember\n @extends Ember.CoreView\n @deprecated See http://emberjs.com/deprecations/v1.x/#toc_ember-view\n @uses Ember.ViewSupport\n @uses Ember.ViewContextSupport\n @uses Ember.ViewChildViewsSupport\n @uses Ember.TemplateRenderingSupport\n @uses Ember.ClassNamesSupport\n @uses Ember.AttributeBindingsSupport\n @uses Ember.LegacyViewSupport\n @uses Ember.InstrumentationSupport\n @uses Ember.VisibilitySupport\n @uses Ember.AriaRoleSupport\n @public\n */\n // jscs:disable validateIndentation\n var View = _emberViewsViewsCore_view.default.extend(_emberViewsMixinsView_context_support.default, _emberViewsMixinsView_child_views_support.default, _emberViewsMixinsLegacy_child_views_support.default, _emberViewsMixinsView_state_support.default, _emberViewsMixinsTemplate_rendering_support.default, _emberViewsMixinsClass_names_support.default, _emberViewsMixinsLegacy_view_support.default, _emberViewsMixinsInstrumentation_support.default, _emberViewsMixinsVisibility_support.default, _emberViewsCompatAttrsProxy.default, _emberViewsMixinsAria_role_support.default, _emberViewsMixinsView_support.default, {\n init: function () {\n this._super.apply(this, arguments);\n\n if (!this._viewRegistry) {\n this._viewRegistry = View.views;\n }\n },\n\n /**\n Given a property name, returns a dasherized version of that\n property name if the property evaluates to a non-falsy value.\n For example, if the view has property `isUrgent` that evaluates to true,\n passing `isUrgent` to this method will return `\"is-urgent\"`.\n @method _classStringForProperty\n @param property\n @private\n */\n _classStringForProperty: function (parsedPath) {\n return View._classStringForValue(parsedPath.path, parsedPath.stream.value(), parsedPath.className, parsedPath.falsyClassName);\n }\n });\n\n // jscs:enable validateIndentation\n\n /*\n Describe how the specified actions should behave in the various\n states that a view can exist in. Possible states:\n \n * preRender: when a view is first instantiated, and after its\n element was destroyed, it is in the preRender state\n * inBuffer: once a view has been rendered, but before it has\n been inserted into the DOM, it is in the inBuffer state\n * hasElement: the DOM representation of the view is created,\n and is ready to be inserted\n * inDOM: once a view has been inserted into the DOM it is in\n the inDOM state. A view spends the vast majority of its\n existence in this state.\n * destroyed: once a view has been destroyed (using the destroy\n method), it is in this state. No further actions can be invoked\n on a destroyed view.\n */\n\n // in the destroyed state, everything is illegal\n\n // before rendering has begun, all legal manipulations are noops.\n\n // inside the buffer, legal manipulations are done on the buffer\n\n // once the view has been inserted into the DOM, legal manipulations\n // are done on the DOM element.\n\n View.reopenClass({\n /**\n Global views hash\n @property views\n @static\n @type Object\n @private\n */\n views: {}\n });\n\n exports.default = View;\n exports.ViewContextSupport = _emberViewsMixinsView_context_support.default;\n exports.ViewChildViewsSupport = _emberViewsMixinsView_child_views_support.default;\n exports.ViewStateSupport = _emberViewsMixinsView_state_support.default;\n exports.TemplateRenderingSupport = _emberViewsMixinsTemplate_rendering_support.default;\n exports.ClassNamesSupport = _emberViewsMixinsClass_names_support.default;\n});\n// for the side effect of extending Ember.run.queues\nenifed('htmlbars-runtime/expression-visitor', ['exports'], function (exports) {\n /**\n # Expression Nodes:\n \n These nodes are not directly responsible for any part of the DOM, but are\n eventually passed to a Statement Node.\n \n * get\n * subexpr\n * concat\n */\n\n 'use strict';\n\n exports.acceptParams = acceptParams;\n exports.acceptHash = acceptHash;\n\n function acceptParams(nodes, env, scope) {\n var array = [];\n\n for (var i = 0, l = nodes.length; i < l; i++) {\n array.push(acceptExpression(nodes[i], env, scope).value);\n }\n\n return array;\n }\n\n function acceptHash(pairs, env, scope) {\n var object = {};\n\n for (var i = 0, l = pairs.length; i < l; i += 2) {\n var key = pairs[i];\n var value = pairs[i + 1];\n object[key] = acceptExpression(value, env, scope).value;\n }\n\n return object;\n }\n\n function acceptExpression(node, env, scope) {\n var ret = { value: null };\n\n // Primitive literals are unambiguously non-array representations of\n // themselves.\n if (typeof node !== 'object' || node === null) {\n ret.value = node;\n } else {\n ret.value = evaluateNode(node, env, scope);\n }\n\n return ret;\n }\n\n function evaluateNode(node, env, scope) {\n switch (node[0]) {\n // can be used by manualElement\n case 'value':\n return node[1];\n case 'get':\n return evaluateGet(node, env, scope);\n case 'subexpr':\n return evaluateSubexpr(node, env, scope);\n case 'concat':\n return evaluateConcat(node, env, scope);\n }\n }\n\n function evaluateGet(node, env, scope) {\n var path = node[1];\n\n return env.hooks.get(env, scope, path);\n }\n\n function evaluateSubexpr(node, env, scope) {\n var path = node[1];\n var rawParams = node[2];\n var rawHash = node[3];\n\n var params = acceptParams(rawParams, env, scope);\n var hash = acceptHash(rawHash, env, scope);\n\n return env.hooks.subexpr(env, scope, path, params, hash);\n }\n\n function evaluateConcat(node, env, scope) {\n var rawParts = node[1];\n\n var parts = acceptParams(rawParts, env, scope);\n\n return env.hooks.concat(env, parts);\n }\n});\nenifed(\"htmlbars-runtime/hooks\", [\"exports\", \"htmlbars-runtime/render\", \"morph-range/morph-list\", \"htmlbars-util/object-utils\", \"htmlbars-util/morph-utils\", \"htmlbars-util/template-utils\"], function (exports, _htmlbarsRuntimeRender, _morphRangeMorphList, _htmlbarsUtilObjectUtils, _htmlbarsUtilMorphUtils, _htmlbarsUtilTemplateUtils) {\n \"use strict\";\n\n exports.wrap = wrap;\n exports.wrapForHelper = wrapForHelper;\n exports.createScope = createScope;\n exports.createFreshScope = createFreshScope;\n exports.bindShadowScope = bindShadowScope;\n exports.createChildScope = createChildScope;\n exports.bindSelf = bindSelf;\n exports.updateSelf = updateSelf;\n exports.bindLocal = bindLocal;\n exports.updateLocal = updateLocal;\n exports.bindBlock = bindBlock;\n exports.block = block;\n exports.continueBlock = continueBlock;\n exports.hostBlock = hostBlock;\n exports.handleRedirect = handleRedirect;\n exports.handleKeyword = handleKeyword;\n exports.linkRenderNode = linkRenderNode;\n exports.inline = inline;\n exports.keyword = keyword;\n exports.invokeHelper = invokeHelper;\n exports.classify = classify;\n exports.partial = partial;\n exports.range = range;\n exports.element = element;\n exports.attribute = attribute;\n exports.subexpr = subexpr;\n exports.get = get;\n exports.getRoot = getRoot;\n exports.getBlock = getBlock;\n exports.getChild = getChild;\n exports.getValue = getValue;\n exports.getCellOrValue = getCellOrValue;\n exports.component = component;\n exports.concat = concat;\n exports.hasHelper = hasHelper;\n exports.lookupHelper = lookupHelper;\n exports.bindScope = bindScope;\n exports.updateScope = updateScope;\n\n /**\n HTMLBars delegates the runtime behavior of a template to\n hooks provided by the host environment. These hooks explain\n the lexical environment of a Handlebars template, the internal\n representation of references, and the interaction between an\n HTMLBars template and the DOM it is managing.\n \n While HTMLBars host hooks have access to all of this internal\n machinery, templates and helpers have access to the abstraction\n provided by the host hooks.\n \n ## The Lexical Environment\n \n The default lexical environment of an HTMLBars template includes:\n \n * Any local variables, provided by *block arguments*\n * The current value of `self`\n \n ## Simple Nesting\n \n Let's look at a simple template with a nested block:\n \n ```hbs\n {{title}}\n \n {{#if author}}\n {{author}}\n {{/if}}\n ```\n \n In this case, the lexical environment at the top-level of the\n template does not change inside of the `if` block. This is\n achieved via an implementation of `if` that looks like this:\n \n ```js\n registerHelper('if', function(params) {\n if (!!params[0]) {\n return this.yield();\n }\n });\n ```\n \n A call to `this.yield` invokes the child template using the\n current lexical environment.\n \n ## Block Arguments\n \n It is possible for nested blocks to introduce new local\n variables:\n \n ```hbs\n {{#count-calls as |i|}}\n {{title}}\n Called {{i}} times\n {{/count}}\n ```\n \n In this example, the child block inherits its surrounding\n lexical environment, but augments it with a single new\n variable binding.\n \n The implementation of `count-calls` supplies the value of\n `i`, but does not otherwise alter the environment:\n \n ```js\n var count = 0;\n registerHelper('count-calls', function() {\n return this.yield([ ++count ]);\n });\n ```\n */\n\n function wrap(template) {\n if (template === null) {\n return null;\n }\n\n return {\n meta: template.meta,\n arity: template.arity,\n raw: template,\n render: function (self, env, options, blockArguments) {\n var scope = env.hooks.createFreshScope();\n\n var contextualElement = options && options.contextualElement;\n var renderOptions = new _htmlbarsRuntimeRender.RenderOptions(null, self, blockArguments, contextualElement);\n\n return _htmlbarsRuntimeRender.default(template, env, scope, renderOptions);\n }\n };\n }\n\n function wrapForHelper(template, env, scope, morph, renderState, visitor) {\n if (!template) {\n return {};\n }\n\n var yieldArgs = yieldTemplate(template, env, scope, morph, renderState, visitor);\n\n return {\n meta: template.meta,\n arity: template.arity,\n 'yield': yieldArgs, // quoted since it's a reserved word, see issue #420\n yieldItem: yieldItem(template, env, scope, morph, renderState, visitor),\n raw: template,\n\n render: function (self, blockArguments) {\n yieldArgs(blockArguments, self);\n }\n };\n }\n\n // Called by a user-land helper to render a template.\n function yieldTemplate(template, env, parentScope, morph, renderState, visitor) {\n return function (blockArguments, self) {\n // Render state is used to track the progress of the helper (since it\n // may call into us multiple times). As the user-land helper calls\n // into library code, we track what needs to be cleaned up after the\n // helper has returned.\n //\n // Here, we remember that a template has been yielded and so we do not\n // need to remove the previous template. (If no template is yielded\n // this render by the helper, we assume nothing should be shown and\n // remove any previous rendered templates.)\n renderState.morphToClear = null;\n\n // In this conditional is true, it means that on the previous rendering pass\n // the helper yielded multiple items via `yieldItem()`, but this time they\n // are yielding a single template. In that case, we mark the morph list for\n // cleanup so it is removed from the DOM.\n if (morph.morphList) {\n _htmlbarsUtilTemplateUtils.clearMorphList(morph.morphList, morph, env);\n renderState.morphListToClear = null;\n }\n\n var scope = parentScope;\n\n if (morph.lastYielded && isStableTemplate(template, morph.lastYielded)) {\n return morph.lastResult.revalidateWith(env, undefined, self, blockArguments, visitor);\n }\n\n // Check to make sure that we actually **need** a new scope, and can't\n // share the parent scope. Note that we need to move this check into\n // a host hook, because the host's notion of scope may require a new\n // scope in more cases than the ones we can determine statically.\n if (self !== undefined || parentScope === null || template.arity) {\n scope = env.hooks.createChildScope(parentScope);\n }\n\n morph.lastYielded = { self: self, template: template, shadowTemplate: null };\n\n // Render the template that was selected by the helper\n var renderOptions = new _htmlbarsRuntimeRender.RenderOptions(morph, self, blockArguments);\n _htmlbarsRuntimeRender.default(template, env, scope, renderOptions);\n };\n }\n\n function yieldItem(template, env, parentScope, morph, renderState, visitor) {\n // Initialize state that tracks multiple items being\n // yielded in.\n var currentMorph = null;\n\n // Candidate morphs for deletion.\n var candidates = {};\n\n // Reuse existing MorphList if this is not a first-time\n // render.\n var morphList = morph.morphList;\n if (morphList) {\n currentMorph = morphList.firstChildMorph;\n }\n\n // Advances the currentMorph pointer to the morph in the previously-rendered\n // list that matches the yielded key. While doing so, it marks any morphs\n // that it advances past as candidates for deletion. Assuming those morphs\n // are not yielded in later, they will be removed in the prune step during\n // cleanup.\n // Note that this helper function assumes that the morph being seeked to is\n // guaranteed to exist in the previous MorphList; if this is called and the\n // morph does not exist, it will result in an infinite loop\n function advanceToKey(key) {\n var seek = currentMorph;\n\n while (seek.key !== key) {\n candidates[seek.key] = seek;\n seek = seek.nextMorph;\n }\n\n currentMorph = seek.nextMorph;\n return seek;\n }\n\n return function (_key, blockArguments, self) {\n if (typeof _key !== 'string') {\n throw new Error(\"You must provide a string key when calling `yieldItem`; you provided \" + _key);\n }\n\n // At least one item has been yielded, so we do not wholesale\n // clear the last MorphList but instead apply a prune operation.\n renderState.morphListToClear = null;\n morph.lastYielded = null;\n\n var morphList, morphMap;\n\n if (!morph.morphList) {\n morph.morphList = new _morphRangeMorphList.default();\n morph.morphMap = {};\n morph.setMorphList(morph.morphList);\n }\n\n morphList = morph.morphList;\n morphMap = morph.morphMap;\n\n // A map of morphs that have been yielded in on this\n // rendering pass. Any morphs that do not make it into\n // this list will be pruned from the MorphList during the cleanup\n // process.\n var handledMorphs = renderState.handledMorphs;\n var key = undefined;\n\n if (_key in handledMorphs) {\n // In this branch we are dealing with a duplicate key. The strategy\n // is to take the original key and append a counter to it that is\n // incremented every time the key is reused. In order to greatly\n // reduce the chance of colliding with another valid key we also add\n // an extra string \"--z8mS2hvDW0A--\" to the new key.\n var collisions = renderState.collisions;\n if (collisions === undefined) {\n collisions = renderState.collisions = {};\n }\n var count = collisions[_key] | 0;\n collisions[_key] = ++count;\n\n key = _key + '--z8mS2hvDW0A--' + count;\n } else {\n key = _key;\n }\n\n if (currentMorph && currentMorph.key === key) {\n yieldTemplate(template, env, parentScope, currentMorph, renderState, visitor)(blockArguments, self);\n currentMorph = currentMorph.nextMorph;\n handledMorphs[key] = currentMorph;\n } else if (morphMap[key] !== undefined) {\n var foundMorph = morphMap[key];\n\n if (key in candidates) {\n // If we already saw this morph, move it forward to this position\n morphList.insertBeforeMorph(foundMorph, currentMorph);\n } else {\n // Otherwise, move the pointer forward to the existing morph for this key\n advanceToKey(key);\n }\n\n handledMorphs[foundMorph.key] = foundMorph;\n yieldTemplate(template, env, parentScope, foundMorph, renderState, visitor)(blockArguments, self);\n } else {\n var childMorph = _htmlbarsRuntimeRender.createChildMorph(env.dom, morph);\n childMorph.key = key;\n morphMap[key] = handledMorphs[key] = childMorph;\n morphList.insertBeforeMorph(childMorph, currentMorph);\n yieldTemplate(template, env, parentScope, childMorph, renderState, visitor)(blockArguments, self);\n }\n\n renderState.morphListToPrune = morphList;\n morph.childNodes = null;\n };\n }\n\n function isStableTemplate(template, lastYielded) {\n return !lastYielded.shadowTemplate && template === lastYielded.template;\n }\n function optionsFor(template, inverse, env, scope, morph, visitor) {\n // If there was a template yielded last time, set morphToClear so it will be cleared\n // if no template is yielded on this render.\n var morphToClear = morph.lastResult ? morph : null;\n var renderState = new _htmlbarsUtilTemplateUtils.RenderState(morphToClear, morph.morphList || null);\n\n return {\n templates: {\n template: wrapForHelper(template, env, scope, morph, renderState, visitor),\n inverse: wrapForHelper(inverse, env, scope, morph, renderState, visitor)\n },\n renderState: renderState\n };\n }\n\n function thisFor(options) {\n return {\n arity: options.template.arity,\n 'yield': options.template.yield, // quoted since it's a reserved word, see issue #420\n yieldItem: options.template.yieldItem,\n yieldIn: options.template.yieldIn\n };\n }\n\n /**\n Host Hook: createScope\n \n @param {Scope?} parentScope\n @return Scope\n \n Corresponds to entering a new HTMLBars block.\n \n This hook is invoked when a block is entered with\n a new `self` or additional local variables.\n \n When invoked for a top-level template, the\n `parentScope` is `null`, and this hook should return\n a fresh Scope.\n \n When invoked for a child template, the `parentScope`\n is the scope for the parent environment.\n \n Note that the `Scope` is an opaque value that is\n passed to other host hooks. For example, the `get`\n hook uses the scope to retrieve a value for a given\n scope and variable name.\n */\n\n function createScope(env, parentScope) {\n if (parentScope) {\n return env.hooks.createChildScope(parentScope);\n } else {\n return env.hooks.createFreshScope();\n }\n }\n\n function createFreshScope() {\n // because `in` checks have unpredictable performance, keep a\n // separate dictionary to track whether a local was bound.\n // See `bindLocal` for more information.\n return { self: null, blocks: {}, locals: {}, localPresent: {} };\n }\n\n /**\n Host Hook: bindShadowScope\n \n @param {Scope?} parentScope\n @return Scope\n \n Corresponds to rendering a new template into an existing\n render tree, but with a new top-level lexical scope. This\n template is called the \"shadow root\".\n \n If a shadow template invokes `{{yield}}`, it will render\n the block provided to the shadow root in the original\n lexical scope.\n \n ```hbs\n {{!-- post template --}}\n {{props.title}}\n {{yield}}\n \n {{!-- blog template --}}\n {{#post title=\"Hello world\"}}\n by {{byline}}\n This is my first post\n {{/post}}\n \n {{#post title=\"Goodbye world\"}}\n by {{byline}}\n This is my last post\n {{/post}}\n ```\n \n ```js\n helpers.post = function(params, hash, options) {\n options.template.yieldIn(postTemplate, { props: hash });\n };\n \n blog.render({ byline: \"Yehuda Katz\" });\n ```\n \n Produces:\n \n ```html\n Hello world\n by Yehuda Katz\n This is my first post\n \n Goodbye world\n by Yehuda Katz\n This is my last post\n ```\n \n In short, `yieldIn` creates a new top-level scope for the\n provided template and renders it, making the original block\n available to `{{yield}}` in that template.\n */\n\n function bindShadowScope(env /*, parentScope, shadowScope */) {\n return env.hooks.createFreshScope();\n }\n\n function createChildScope(parent) {\n var scope = Object.create(parent);\n scope.locals = Object.create(parent.locals);\n scope.localPresent = Object.create(parent.localPresent);\n scope.blocks = Object.create(parent.blocks);\n return scope;\n }\n\n /**\n Host Hook: bindSelf\n \n @param {Scope} scope\n @param {any} self\n \n Corresponds to entering a template.\n \n This hook is invoked when the `self` value for a scope is ready to be bound.\n \n The host must ensure that child scopes reflect the change to the `self` in\n future calls to the `get` hook.\n */\n\n function bindSelf(env, scope, self) {\n scope.self = self;\n }\n\n function updateSelf(env, scope, self) {\n env.hooks.bindSelf(env, scope, self);\n }\n\n /**\n Host Hook: bindLocal\n \n @param {Environment} env\n @param {Scope} scope\n @param {String} name\n @param {any} value\n \n Corresponds to entering a template with block arguments.\n \n This hook is invoked when a local variable for a scope has been provided.\n \n The host must ensure that child scopes reflect the change in future calls\n to the `get` hook.\n */\n\n function bindLocal(env, scope, name, value) {\n scope.localPresent[name] = true;\n scope.locals[name] = value;\n }\n\n function updateLocal(env, scope, name, value) {\n env.hooks.bindLocal(env, scope, name, value);\n }\n\n /**\n Host Hook: bindBlock\n \n @param {Environment} env\n @param {Scope} scope\n @param {Function} block\n \n Corresponds to entering a shadow template that was invoked by a block helper with\n `yieldIn`.\n \n This hook is invoked with an opaque block that will be passed along\n to the shadow template, and inserted into the shadow template when\n `{{yield}}` is used. Optionally provide a non-default block name\n that can be targeted by `{{yield to=blockName}}`.\n */\n\n function bindBlock(env, scope, block) {\n var name = arguments.length <= 3 || arguments[3] === undefined ? 'default' : arguments[3];\n\n scope.blocks[name] = block;\n }\n\n /**\n Host Hook: block\n \n @param {RenderNode} renderNode\n @param {Environment} env\n @param {Scope} scope\n @param {String} path\n @param {Array} params\n @param {Object} hash\n @param {Block} block\n @param {Block} elseBlock\n \n Corresponds to:\n \n ```hbs\n {{#helper param1 param2 key1=val1 key2=val2}}\n {{!-- child template --}}\n {{/helper}}\n ```\n \n This host hook is a workhorse of the system. It is invoked\n whenever a block is encountered, and is responsible for\n resolving the helper to call, and then invoke it.\n \n The helper should be invoked with:\n \n - `{Array} params`: the parameters passed to the helper\n in the template.\n - `{Object} hash`: an object containing the keys and values passed\n in the hash position in the template.\n \n The values in `params` and `hash` will already be resolved\n through a previous call to the `get` host hook.\n \n The helper should be invoked with a `this` value that is\n an object with one field:\n \n `{Function} yield`: when invoked, this function executes the\n block with the current scope. It takes an optional array of\n block parameters. If block parameters are supplied, HTMLBars\n will invoke the `bindLocal` host hook to bind the supplied\n values to the block arguments provided by the template.\n \n In general, the default implementation of `block` should work\n for most host environments. It delegates to other host hooks\n where appropriate, and properly invokes the helper with the\n appropriate arguments.\n */\n\n function block(morph, env, scope, path, params, hash, template, inverse, visitor) {\n if (handleRedirect(morph, env, scope, path, params, hash, template, inverse, visitor)) {\n return;\n }\n\n continueBlock(morph, env, scope, path, params, hash, template, inverse, visitor);\n }\n\n function continueBlock(morph, env, scope, path, params, hash, template, inverse, visitor) {\n hostBlock(morph, env, scope, template, inverse, null, visitor, function (options) {\n var helper = env.hooks.lookupHelper(env, scope, path);\n return env.hooks.invokeHelper(morph, env, scope, visitor, params, hash, helper, options.templates, thisFor(options.templates));\n });\n }\n\n function hostBlock(morph, env, scope, template, inverse, shadowOptions, visitor, callback) {\n var options = optionsFor(template, inverse, env, scope, morph, visitor);\n _htmlbarsUtilTemplateUtils.renderAndCleanup(morph, env, options, shadowOptions, callback);\n }\n\n function handleRedirect(morph, env, scope, path, params, hash, template, inverse, visitor) {\n if (!path) {\n return false;\n }\n\n var redirect = env.hooks.classify(env, scope, path);\n if (redirect) {\n switch (redirect) {\n case 'component':\n env.hooks.component(morph, env, scope, path, params, hash, { default: template, inverse: inverse }, visitor);break;\n case 'inline':\n env.hooks.inline(morph, env, scope, path, params, hash, visitor);break;\n case 'block':\n env.hooks.block(morph, env, scope, path, params, hash, template, inverse, visitor);break;\n default:\n throw new Error(\"Internal HTMLBars redirection to \" + redirect + \" not supported\");\n }\n return true;\n }\n\n if (handleKeyword(path, morph, env, scope, params, hash, template, inverse, visitor)) {\n return true;\n }\n\n return false;\n }\n\n function handleKeyword(path, morph, env, scope, params, hash, template, inverse, visitor) {\n var keyword = env.hooks.keywords[path];\n if (!keyword) {\n return false;\n }\n\n if (typeof keyword === 'function') {\n return keyword(morph, env, scope, params, hash, template, inverse, visitor);\n }\n\n if (keyword.willRender) {\n keyword.willRender(morph, env);\n }\n\n var lastState, newState;\n if (keyword.setupState) {\n lastState = _htmlbarsUtilObjectUtils.shallowCopy(morph.getState());\n newState = morph.setState(keyword.setupState(lastState, env, scope, params, hash));\n }\n\n if (keyword.childEnv) {\n // Build the child environment...\n env = keyword.childEnv(morph.getState(), env);\n\n // ..then save off the child env builder on the render node. If the render\n // node tree is re-rendered and this node is not dirty, the child env\n // builder will still be invoked so that child dirty render nodes still get\n // the correct child env.\n morph.buildChildEnv = keyword.childEnv;\n }\n\n var firstTime = !morph.rendered;\n\n if (keyword.isEmpty) {\n var isEmpty = keyword.isEmpty(morph.getState(), env, scope, params, hash);\n\n if (isEmpty) {\n if (!firstTime) {\n _htmlbarsUtilTemplateUtils.clearMorph(morph, env, false);\n }\n return true;\n }\n }\n\n if (firstTime) {\n if (keyword.render) {\n keyword.render(morph, env, scope, params, hash, template, inverse, visitor);\n }\n morph.rendered = true;\n return true;\n }\n\n var isStable;\n if (keyword.isStable) {\n isStable = keyword.isStable(lastState, newState);\n } else {\n isStable = stableState(lastState, newState);\n }\n\n if (isStable) {\n if (keyword.rerender) {\n var newEnv = keyword.rerender(morph, env, scope, params, hash, template, inverse, visitor);\n env = newEnv || env;\n }\n _htmlbarsUtilMorphUtils.validateChildMorphs(env, morph, visitor);\n return true;\n } else {\n _htmlbarsUtilTemplateUtils.clearMorph(morph, env, false);\n }\n\n // If the node is unstable, re-render from scratch\n if (keyword.render) {\n keyword.render(morph, env, scope, params, hash, template, inverse, visitor);\n morph.rendered = true;\n return true;\n }\n }\n\n function stableState(oldState, newState) {\n if (_htmlbarsUtilObjectUtils.keyLength(oldState) !== _htmlbarsUtilObjectUtils.keyLength(newState)) {\n return false;\n }\n\n for (var prop in oldState) {\n if (oldState[prop] !== newState[prop]) {\n return false;\n }\n }\n\n return true;\n }\n\n function linkRenderNode() /* morph, env, scope, params, hash */{\n return;\n }\n\n /**\n Host Hook: inline\n \n @param {RenderNode} renderNode\n @param {Environment} env\n @param {Scope} scope\n @param {String} path\n @param {Array} params\n @param {Hash} hash\n \n Corresponds to:\n \n ```hbs\n {{helper param1 param2 key1=val1 key2=val2}}\n ```\n \n This host hook is similar to the `block` host hook, but it\n invokes helpers that do not supply an attached block.\n \n Like the `block` hook, the helper should be invoked with:\n \n - `{Array} params`: the parameters passed to the helper\n in the template.\n - `{Object} hash`: an object containing the keys and values passed\n in the hash position in the template.\n \n The values in `params` and `hash` will already be resolved\n through a previous call to the `get` host hook.\n \n In general, the default implementation of `inline` should work\n for most host environments. It delegates to other host hooks\n where appropriate, and properly invokes the helper with the\n appropriate arguments.\n \n The default implementation of `inline` also makes `partial`\n a keyword. Instead of invoking a helper named `partial`,\n it invokes the `partial` host hook.\n */\n\n function inline(morph, env, scope, path, params, hash, visitor) {\n if (handleRedirect(morph, env, scope, path, params, hash, null, null, visitor)) {\n return;\n }\n\n var value = undefined,\n hasValue = undefined;\n if (morph.linkedResult) {\n value = env.hooks.getValue(morph.linkedResult);\n hasValue = true;\n } else {\n var options = optionsFor(null, null, env, scope, morph);\n\n var helper = env.hooks.lookupHelper(env, scope, path);\n var result = env.hooks.invokeHelper(morph, env, scope, visitor, params, hash, helper, options.templates, thisFor(options.templates));\n\n if (result && result.link) {\n morph.linkedResult = result.value;\n _htmlbarsUtilMorphUtils.linkParams(env, scope, morph, '@content-helper', [morph.linkedResult], null);\n }\n\n if (result && 'value' in result) {\n value = env.hooks.getValue(result.value);\n hasValue = true;\n }\n }\n\n if (hasValue) {\n if (morph.lastValue !== value) {\n morph.setContent(value);\n }\n morph.lastValue = value;\n }\n }\n\n function keyword(path, morph, env, scope, params, hash, template, inverse, visitor) {\n handleKeyword(path, morph, env, scope, params, hash, template, inverse, visitor);\n }\n\n function invokeHelper(morph, env, scope, visitor, _params, _hash, helper, templates, context) {\n var params = normalizeArray(env, _params);\n var hash = normalizeObject(env, _hash);\n return { value: helper.call(context, params, hash, templates) };\n }\n\n function normalizeArray(env, array) {\n var out = new Array(array.length);\n\n for (var i = 0, l = array.length; i < l; i++) {\n out[i] = env.hooks.getCellOrValue(array[i]);\n }\n\n return out;\n }\n\n function normalizeObject(env, object) {\n var out = {};\n\n for (var prop in object) {\n out[prop] = env.hooks.getCellOrValue(object[prop]);\n }\n\n return out;\n }\n\n function classify() /* env, scope, path */{\n return null;\n }\n\n var keywords = {\n partial: function (morph, env, scope, params) {\n var value = env.hooks.partial(morph, env, scope, params[0]);\n morph.setContent(value);\n return true;\n },\n\n // quoted since it's a reserved word, see issue #420\n 'yield': function (morph, env, scope, params, hash, template, inverse, visitor) {\n // the current scope is provided purely for the creation of shadow\n // scopes; it should not be provided to user code.\n\n var to = env.hooks.getValue(hash.to) || 'default';\n var block = env.hooks.getBlock(scope, to);\n\n if (block) {\n block.invoke(env, params, hash.self, morph, scope, visitor);\n }\n return true;\n },\n\n hasBlock: function (morph, env, scope, params) {\n var name = env.hooks.getValue(params[0]) || 'default';\n return !!env.hooks.getBlock(scope, name);\n },\n\n hasBlockParams: function (morph, env, scope, params) {\n var name = env.hooks.getValue(params[0]) || 'default';\n var block = env.hooks.getBlock(scope, name);\n return !!(block && block.arity);\n }\n\n };\n\n exports.keywords = keywords;\n /**\n Host Hook: partial\n \n @param {RenderNode} renderNode\n @param {Environment} env\n @param {Scope} scope\n @param {String} path\n \n Corresponds to:\n \n ```hbs\n {{partial \"location\"}}\n ```\n \n This host hook is invoked by the default implementation of\n the `inline` hook. This makes `partial` a keyword in an\n HTMLBars environment using the default `inline` host hook.\n \n It is implemented as a host hook so that it can retrieve\n the named partial out of the `Environment`. Helpers, in\n contrast, only have access to the values passed in to them,\n and not to the ambient lexical environment.\n \n The host hook should invoke the referenced partial with\n the ambient `self`.\n */\n\n function partial(renderNode, env, scope, path) {\n var template = env.partials[path];\n return template.render(scope.self, env, {}).fragment;\n }\n\n /**\n Host hook: range\n \n @param {RenderNode} renderNode\n @param {Environment} env\n @param {Scope} scope\n @param {any} value\n \n Corresponds to:\n \n ```hbs\n {{content}}\n {{{unescaped}}}\n ```\n \n This hook is responsible for updating a render node\n that represents a range of content with a value.\n */\n\n function range(morph, env, scope, path, value, visitor) {\n if (handleRedirect(morph, env, scope, path, [], {}, null, null, visitor)) {\n return;\n }\n\n value = env.hooks.getValue(value);\n\n if (morph.lastValue !== value) {\n morph.setContent(value);\n }\n\n morph.lastValue = value;\n }\n\n /**\n Host hook: element\n \n @param {RenderNode} renderNode\n @param {Environment} env\n @param {Scope} scope\n @param {String} path\n @param {Array} params\n @param {Hash} hash\n \n Corresponds to:\n \n ```hbs\n \n ```\n \n This hook is responsible for invoking a helper that\n modifies an element.\n \n Its purpose is largely legacy support for awkward\n idioms that became common when using the string-based\n Handlebars engine.\n \n Most of the uses of the `element` hook are expected\n to be superseded by component syntax and the\n `attribute` hook.\n */\n\n function element(morph, env, scope, path, params, hash, visitor) {\n if (handleRedirect(morph, env, scope, path, params, hash, null, null, visitor)) {\n return;\n }\n\n var helper = env.hooks.lookupHelper(env, scope, path);\n if (helper) {\n env.hooks.invokeHelper(null, env, scope, null, params, hash, helper, { element: morph.element });\n }\n }\n\n /**\n Host hook: attribute\n \n @param {RenderNode} renderNode\n @param {Environment} env\n @param {String} name\n @param {any} value\n \n Corresponds to:\n \n ```hbs\n \n ```\n \n This hook is responsible for updating a render node\n that represents an element's attribute with a value.\n \n It receives the name of the attribute as well as an\n already-resolved value, and should update the render\n node with the value if appropriate.\n */\n\n function attribute(morph, env, scope, name, value) {\n value = env.hooks.getValue(value);\n\n if (morph.lastValue !== value) {\n morph.setContent(value);\n }\n\n morph.lastValue = value;\n }\n\n function subexpr(env, scope, helperName, params, hash) {\n var helper = env.hooks.lookupHelper(env, scope, helperName);\n var result = env.hooks.invokeHelper(null, env, scope, null, params, hash, helper, {});\n if (result && 'value' in result) {\n return env.hooks.getValue(result.value);\n }\n }\n\n /**\n Host Hook: get\n \n @param {Environment} env\n @param {Scope} scope\n @param {String} path\n \n Corresponds to:\n \n ```hbs\n {{foo.bar}}\n ^\n \n {{helper foo.bar key=value}}\n ^ ^\n ```\n \n This hook is the \"leaf\" hook of the system. It is used to\n resolve a path relative to the current scope.\n */\n\n function get(env, scope, path) {\n if (path === '') {\n return scope.self;\n }\n\n var keys = path.split('.');\n var value = env.hooks.getRoot(scope, keys[0])[0];\n\n for (var i = 1; i < keys.length; i++) {\n if (value) {\n value = env.hooks.getChild(value, keys[i]);\n } else {\n break;\n }\n }\n\n return value;\n }\n\n function getRoot(scope, key) {\n if (scope.localPresent[key]) {\n return [scope.locals[key]];\n } else if (scope.self) {\n return [scope.self[key]];\n } else {\n return [undefined];\n }\n }\n\n function getBlock(scope, key) {\n return scope.blocks[key];\n }\n\n function getChild(value, key) {\n return value[key];\n }\n\n function getValue(reference) {\n return reference;\n }\n\n function getCellOrValue(reference) {\n return reference;\n }\n\n function component(morph, env, scope, tagName, params, attrs, templates, visitor) {\n if (env.hooks.hasHelper(env, scope, tagName)) {\n return env.hooks.block(morph, env, scope, tagName, params, attrs, templates.default, templates.inverse, visitor);\n }\n\n componentFallback(morph, env, scope, tagName, attrs, templates.default);\n }\n\n function concat(env, params) {\n var value = \"\";\n for (var i = 0, l = params.length; i < l; i++) {\n value += env.hooks.getValue(params[i]);\n }\n return value;\n }\n\n function componentFallback(morph, env, scope, tagName, attrs, template) {\n var element = env.dom.createElement(tagName);\n for (var name in attrs) {\n element.setAttribute(name, env.hooks.getValue(attrs[name]));\n }\n var fragment = _htmlbarsRuntimeRender.default(template, env, scope, {}).fragment;\n element.appendChild(fragment);\n morph.setNode(element);\n }\n\n function hasHelper(env, scope, helperName) {\n return env.helpers[helperName] !== undefined;\n }\n\n function lookupHelper(env, scope, helperName) {\n return env.helpers[helperName];\n }\n\n function bindScope() /* env, scope */{\n // this function is used to handle host-specified extensions to scope\n // other than `self`, `locals` and `block`.\n }\n\n function updateScope(env, scope) {\n env.hooks.bindScope(env, scope);\n }\n\n exports.default = {\n // fundamental hooks that you will likely want to override\n bindLocal: bindLocal,\n bindSelf: bindSelf,\n bindScope: bindScope,\n classify: classify,\n component: component,\n concat: concat,\n createFreshScope: createFreshScope,\n getChild: getChild,\n getRoot: getRoot,\n getBlock: getBlock,\n getValue: getValue,\n getCellOrValue: getCellOrValue,\n keywords: keywords,\n linkRenderNode: linkRenderNode,\n partial: partial,\n subexpr: subexpr,\n\n // fundamental hooks with good default behavior\n bindBlock: bindBlock,\n bindShadowScope: bindShadowScope,\n updateLocal: updateLocal,\n updateSelf: updateSelf,\n updateScope: updateScope,\n createChildScope: createChildScope,\n hasHelper: hasHelper,\n lookupHelper: lookupHelper,\n invokeHelper: invokeHelper,\n cleanupRenderNode: null,\n destroyRenderNode: null,\n willCleanupTree: null,\n didCleanupTree: null,\n willRenderNode: null,\n didRenderNode: null,\n\n // derived hooks\n attribute: attribute,\n block: block,\n createScope: createScope,\n element: element,\n get: get,\n inline: inline,\n range: range,\n keyword: keyword\n };\n});\nenifed(\"htmlbars-runtime/morph\", [\"exports\", \"morph-range\"], function (exports, _morphRange) {\n \"use strict\";\n\n var guid = 1;\n\n function HTMLBarsMorph(domHelper, contextualElement) {\n this.super$constructor(domHelper, contextualElement);\n\n this._state = undefined;\n this.ownerNode = null;\n this.isDirty = false;\n this.isSubtreeDirty = false;\n this.lastYielded = null;\n this.lastResult = null;\n this.lastValue = null;\n this.buildChildEnv = null;\n this.morphList = null;\n this.morphMap = null;\n this.key = null;\n this.linkedParams = null;\n this.linkedResult = null;\n this.childNodes = null;\n this.rendered = false;\n this.guid = \"range\" + guid++;\n this.seen = false;\n }\n\n HTMLBarsMorph.empty = function (domHelper, contextualElement) {\n var morph = new HTMLBarsMorph(domHelper, contextualElement);\n morph.clear();\n return morph;\n };\n\n HTMLBarsMorph.create = function (domHelper, contextualElement, node) {\n var morph = new HTMLBarsMorph(domHelper, contextualElement);\n morph.setNode(node);\n return morph;\n };\n\n HTMLBarsMorph.attach = function (domHelper, contextualElement, firstNode, lastNode) {\n var morph = new HTMLBarsMorph(domHelper, contextualElement);\n morph.setRange(firstNode, lastNode);\n return morph;\n };\n\n var prototype = HTMLBarsMorph.prototype = Object.create(_morphRange.default.prototype);\n prototype.constructor = HTMLBarsMorph;\n prototype.super$constructor = _morphRange.default;\n\n prototype.getState = function () {\n if (!this._state) {\n this._state = {};\n }\n\n return this._state;\n };\n\n prototype.setState = function (newState) {\n /*jshint -W093 */\n\n return this._state = newState;\n };\n\n exports.default = HTMLBarsMorph;\n});\nenifed(\"htmlbars-runtime/node-visitor\", [\"exports\", \"htmlbars-util/morph-utils\", \"htmlbars-runtime/expression-visitor\"], function (exports, _htmlbarsUtilMorphUtils, _htmlbarsRuntimeExpressionVisitor) {\n \"use strict\";\n\n /**\n Node classification:\n \n # Primary Statement Nodes:\n \n These nodes are responsible for a render node that represents a morph-range.\n \n * block\n * inline\n * content\n * element\n * component\n \n # Leaf Statement Nodes:\n \n This node is responsible for a render node that represents a morph-attr.\n \n * attribute\n */\n\n function linkParamsAndHash(env, scope, morph, path, params, hash) {\n if (morph.linkedParams) {\n params = morph.linkedParams.params;\n hash = morph.linkedParams.hash;\n } else {\n params = params && _htmlbarsRuntimeExpressionVisitor.acceptParams(params, env, scope);\n hash = hash && _htmlbarsRuntimeExpressionVisitor.acceptHash(hash, env, scope);\n }\n\n _htmlbarsUtilMorphUtils.linkParams(env, scope, morph, path, params, hash);\n return [params, hash];\n }\n\n var AlwaysDirtyVisitor = {\n\n block: function (node, morph, env, scope, template, visitor) {\n var path = node[1];\n var params = node[2];\n var hash = node[3];\n var templateId = node[4];\n var inverseId = node[5];\n\n var paramsAndHash = linkParamsAndHash(env, scope, morph, path, params, hash);\n\n morph.isDirty = morph.isSubtreeDirty = false;\n env.hooks.block(morph, env, scope, path, paramsAndHash[0], paramsAndHash[1], templateId === null ? null : template.templates[templateId], inverseId === null ? null : template.templates[inverseId], visitor);\n },\n\n inline: function (node, morph, env, scope, visitor) {\n var path = node[1];\n var params = node[2];\n var hash = node[3];\n\n var paramsAndHash = linkParamsAndHash(env, scope, morph, path, params, hash);\n\n morph.isDirty = morph.isSubtreeDirty = false;\n env.hooks.inline(morph, env, scope, path, paramsAndHash[0], paramsAndHash[1], visitor);\n },\n\n content: function (node, morph, env, scope, visitor) {\n var path = node[1];\n\n morph.isDirty = morph.isSubtreeDirty = false;\n\n if (isHelper(env, scope, path)) {\n env.hooks.inline(morph, env, scope, path, [], {}, visitor);\n if (morph.linkedResult) {\n _htmlbarsUtilMorphUtils.linkParams(env, scope, morph, '@content-helper', [morph.linkedResult], null);\n }\n return;\n }\n\n var params = undefined;\n if (morph.linkedParams) {\n params = morph.linkedParams.params;\n } else {\n params = [env.hooks.get(env, scope, path)];\n }\n\n _htmlbarsUtilMorphUtils.linkParams(env, scope, morph, '@range', params, null);\n env.hooks.range(morph, env, scope, path, params[0], visitor);\n },\n\n element: function (node, morph, env, scope, visitor) {\n var path = node[1];\n var params = node[2];\n var hash = node[3];\n\n var paramsAndHash = linkParamsAndHash(env, scope, morph, path, params, hash);\n\n morph.isDirty = morph.isSubtreeDirty = false;\n env.hooks.element(morph, env, scope, path, paramsAndHash[0], paramsAndHash[1], visitor);\n },\n\n attribute: function (node, morph, env, scope) {\n var name = node[1];\n var value = node[2];\n\n var paramsAndHash = linkParamsAndHash(env, scope, morph, '@attribute', [value], null);\n\n morph.isDirty = morph.isSubtreeDirty = false;\n env.hooks.attribute(morph, env, scope, name, paramsAndHash[0][0]);\n },\n\n component: function (node, morph, env, scope, template, visitor) {\n var path = node[1];\n var attrs = node[2];\n var templateId = node[3];\n var inverseId = node[4];\n\n var paramsAndHash = linkParamsAndHash(env, scope, morph, path, [], attrs);\n var templates = {\n default: template.templates[templateId],\n inverse: template.templates[inverseId]\n };\n\n morph.isDirty = morph.isSubtreeDirty = false;\n env.hooks.component(morph, env, scope, path, paramsAndHash[0], paramsAndHash[1], templates, visitor);\n },\n\n attributes: function (node, morph, env, scope, parentMorph, visitor) {\n var template = node[1];\n\n env.hooks.attributes(morph, env, scope, template, parentMorph, visitor);\n }\n\n };\n\n exports.AlwaysDirtyVisitor = AlwaysDirtyVisitor;\n exports.default = {\n block: function (node, morph, env, scope, template, visitor) {\n dirtyCheck(env, morph, visitor, function (visitor) {\n AlwaysDirtyVisitor.block(node, morph, env, scope, template, visitor);\n });\n },\n\n inline: function (node, morph, env, scope, visitor) {\n dirtyCheck(env, morph, visitor, function (visitor) {\n AlwaysDirtyVisitor.inline(node, morph, env, scope, visitor);\n });\n },\n\n content: function (node, morph, env, scope, visitor) {\n dirtyCheck(env, morph, visitor, function (visitor) {\n AlwaysDirtyVisitor.content(node, morph, env, scope, visitor);\n });\n },\n\n element: function (node, morph, env, scope, template, visitor) {\n dirtyCheck(env, morph, visitor, function (visitor) {\n AlwaysDirtyVisitor.element(node, morph, env, scope, template, visitor);\n });\n },\n\n attribute: function (node, morph, env, scope, template) {\n dirtyCheck(env, morph, null, function () {\n AlwaysDirtyVisitor.attribute(node, morph, env, scope, template);\n });\n },\n\n component: function (node, morph, env, scope, template, visitor) {\n dirtyCheck(env, morph, visitor, function (visitor) {\n AlwaysDirtyVisitor.component(node, morph, env, scope, template, visitor);\n });\n },\n\n attributes: function (node, morph, env, scope, parentMorph, visitor) {\n AlwaysDirtyVisitor.attributes(node, morph, env, scope, parentMorph, visitor);\n }\n };\n\n function dirtyCheck(_env, morph, visitor, callback) {\n var isDirty = morph.isDirty;\n var isSubtreeDirty = morph.isSubtreeDirty;\n var env = _env;\n\n if (isSubtreeDirty) {\n visitor = AlwaysDirtyVisitor;\n }\n\n if (isDirty || isSubtreeDirty) {\n callback(visitor);\n } else {\n if (morph.buildChildEnv) {\n env = morph.buildChildEnv(morph.getState(), env);\n }\n _htmlbarsUtilMorphUtils.validateChildMorphs(env, morph, visitor);\n }\n }\n\n function isHelper(env, scope, path) {\n return env.hooks.keywords[path] !== undefined || env.hooks.hasHelper(env, scope, path);\n }\n});\nenifed(\"htmlbars-runtime/render\", [\"exports\", \"htmlbars-util/morph-utils\", \"htmlbars-runtime/node-visitor\", \"htmlbars-runtime/morph\", \"htmlbars-util/template-utils\", \"htmlbars-util/void-tag-names\"], function (exports, _htmlbarsUtilMorphUtils, _htmlbarsRuntimeNodeVisitor, _htmlbarsRuntimeMorph, _htmlbarsUtilTemplateUtils, _htmlbarsUtilVoidTagNames) {\n \"use strict\";\n\n exports.default = render;\n exports.RenderOptions = RenderOptions;\n exports.manualElement = manualElement;\n exports.attachAttributes = attachAttributes;\n exports.createChildMorph = createChildMorph;\n exports.getCachedFragment = getCachedFragment;\n\n var svgNamespace = \"http://www.w3.org/2000/svg\";\n\n function render(template, env, scope, options) {\n var dom = env.dom;\n var contextualElement;\n\n if (options) {\n if (options.renderNode) {\n contextualElement = options.renderNode.contextualElement;\n } else if (options.contextualElement) {\n contextualElement = options.contextualElement;\n }\n }\n\n dom.detectNamespace(contextualElement);\n\n var renderResult = RenderResult.build(env, scope, template, options, contextualElement);\n renderResult.render();\n\n return renderResult;\n }\n\n function RenderOptions(renderNode, self, blockArguments, contextualElement) {\n this.renderNode = renderNode || null;\n this.self = self;\n this.blockArguments = blockArguments || null;\n this.contextualElement = contextualElement || null;\n }\n\n function RenderResult(env, scope, options, rootNode, ownerNode, nodes, fragment, template, shouldSetContent) {\n this.root = rootNode;\n this.fragment = fragment;\n\n this.nodes = nodes;\n this.template = template;\n this.statements = template.statements.slice();\n this.env = env;\n this.scope = scope;\n this.shouldSetContent = shouldSetContent;\n\n if (options.self !== undefined) {\n this.bindSelf(options.self);\n }\n if (options.blockArguments !== undefined) {\n this.bindLocals(options.blockArguments);\n }\n\n this.initializeNodes(ownerNode);\n }\n\n RenderResult.build = function (env, scope, template, options, contextualElement) {\n var dom = env.dom;\n var fragment = getCachedFragment(template, env);\n var nodes = template.buildRenderNodes(dom, fragment, contextualElement);\n\n var rootNode, ownerNode, shouldSetContent;\n\n if (options && options.renderNode) {\n rootNode = options.renderNode;\n ownerNode = rootNode.ownerNode;\n shouldSetContent = true;\n } else {\n rootNode = dom.createMorph(null, fragment.firstChild, fragment.lastChild, contextualElement);\n ownerNode = rootNode;\n rootNode.ownerNode = ownerNode;\n shouldSetContent = false;\n }\n\n if (rootNode.childNodes) {\n _htmlbarsUtilMorphUtils.visitChildren(rootNode.childNodes, function (node) {\n _htmlbarsUtilTemplateUtils.clearMorph(node, env, true);\n });\n }\n\n rootNode.childNodes = nodes;\n return new RenderResult(env, scope, options, rootNode, ownerNode, nodes, fragment, template, shouldSetContent);\n };\n\n function manualElement(tagName, attributes, _isEmpty) {\n var statements = [];\n\n for (var key in attributes) {\n if (typeof attributes[key] === 'string') {\n continue;\n }\n statements.push([\"attribute\", key, attributes[key]]);\n }\n\n var isEmpty = _isEmpty || _htmlbarsUtilVoidTagNames.default[tagName];\n\n if (!isEmpty) {\n statements.push(['content', 'yield']);\n }\n\n var template = {\n arity: 0,\n cachedFragment: null,\n hasRendered: false,\n buildFragment: function buildFragment(dom) {\n var el0 = dom.createDocumentFragment();\n if (tagName === 'svg') {\n dom.setNamespace(svgNamespace);\n }\n var el1 = dom.createElement(tagName);\n\n for (var key in attributes) {\n if (typeof attributes[key] !== 'string') {\n continue;\n }\n dom.setAttribute(el1, key, attributes[key]);\n }\n\n if (!isEmpty) {\n var el2 = dom.createComment(\"\");\n dom.appendChild(el1, el2);\n }\n\n dom.appendChild(el0, el1);\n\n return el0;\n },\n buildRenderNodes: function buildRenderNodes(dom, fragment) {\n var element = dom.childAt(fragment, [0]);\n var morphs = [];\n\n for (var key in attributes) {\n if (typeof attributes[key] === 'string') {\n continue;\n }\n morphs.push(dom.createAttrMorph(element, key));\n }\n\n if (!isEmpty) {\n morphs.push(dom.createMorphAt(element, 0, 0));\n }\n\n return morphs;\n },\n statements: statements,\n locals: [],\n templates: []\n };\n\n return template;\n }\n\n function attachAttributes(attributes) {\n var statements = [];\n\n for (var key in attributes) {\n if (typeof attributes[key] === 'string') {\n continue;\n }\n statements.push([\"attribute\", key, attributes[key]]);\n }\n\n var template = {\n arity: 0,\n cachedFragment: null,\n hasRendered: false,\n buildFragment: function buildFragment(dom) {\n var el0 = this.element;\n if (el0.namespaceURI === \"http://www.w3.org/2000/svg\") {\n dom.setNamespace(svgNamespace);\n }\n for (var key in attributes) {\n if (typeof attributes[key] !== 'string') {\n continue;\n }\n dom.setAttribute(el0, key, attributes[key]);\n }\n\n return el0;\n },\n buildRenderNodes: function buildRenderNodes(dom) {\n var element = this.element;\n var morphs = [];\n\n for (var key in attributes) {\n if (typeof attributes[key] === 'string') {\n continue;\n }\n morphs.push(dom.createAttrMorph(element, key));\n }\n\n return morphs;\n },\n statements: statements,\n locals: [],\n templates: [],\n element: null\n };\n\n return template;\n }\n\n RenderResult.prototype.initializeNodes = function (ownerNode) {\n var childNodes = this.root.childNodes;\n\n for (var i = 0, l = childNodes.length; i < l; i++) {\n childNodes[i].ownerNode = ownerNode;\n }\n };\n\n RenderResult.prototype.render = function () {\n this.root.lastResult = this;\n this.root.rendered = true;\n this.populateNodes(_htmlbarsRuntimeNodeVisitor.AlwaysDirtyVisitor);\n\n if (this.shouldSetContent && this.root.setContent) {\n this.root.setContent(this.fragment);\n }\n };\n\n RenderResult.prototype.dirty = function () {\n _htmlbarsUtilMorphUtils.visitChildren([this.root], function (node) {\n node.isDirty = true;\n });\n };\n\n RenderResult.prototype.revalidate = function (env, self, blockArguments, scope) {\n this.revalidateWith(env, scope, self, blockArguments, _htmlbarsRuntimeNodeVisitor.default);\n };\n\n RenderResult.prototype.rerender = function (env, self, blockArguments, scope) {\n this.revalidateWith(env, scope, self, blockArguments, _htmlbarsRuntimeNodeVisitor.AlwaysDirtyVisitor);\n };\n\n RenderResult.prototype.revalidateWith = function (env, scope, self, blockArguments, visitor) {\n if (env !== undefined) {\n this.env = env;\n }\n if (scope !== undefined) {\n this.scope = scope;\n }\n this.updateScope();\n\n if (self !== undefined) {\n this.updateSelf(self);\n }\n if (blockArguments !== undefined) {\n this.updateLocals(blockArguments);\n }\n\n this.populateNodes(visitor);\n };\n\n RenderResult.prototype.destroy = function () {\n var rootNode = this.root;\n _htmlbarsUtilTemplateUtils.clearMorph(rootNode, this.env, true);\n };\n\n RenderResult.prototype.populateNodes = function (visitor) {\n var env = this.env;\n var scope = this.scope;\n var template = this.template;\n var nodes = this.nodes;\n var statements = this.statements;\n var i, l;\n\n for (i = 0, l = statements.length; i < l; i++) {\n var statement = statements[i];\n var morph = nodes[i];\n\n if (env.hooks.willRenderNode) {\n env.hooks.willRenderNode(morph, env, scope);\n }\n\n switch (statement[0]) {\n case 'block':\n visitor.block(statement, morph, env, scope, template, visitor);break;\n case 'inline':\n visitor.inline(statement, morph, env, scope, visitor);break;\n case 'content':\n visitor.content(statement, morph, env, scope, visitor);break;\n case 'element':\n visitor.element(statement, morph, env, scope, template, visitor);break;\n case 'attribute':\n visitor.attribute(statement, morph, env, scope);break;\n case 'component':\n visitor.component(statement, morph, env, scope, template, visitor);break;\n }\n\n if (env.hooks.didRenderNode) {\n env.hooks.didRenderNode(morph, env, scope);\n }\n }\n };\n\n RenderResult.prototype.bindScope = function () {\n this.env.hooks.bindScope(this.env, this.scope);\n };\n\n RenderResult.prototype.updateScope = function () {\n this.env.hooks.updateScope(this.env, this.scope);\n };\n\n RenderResult.prototype.bindSelf = function (self) {\n this.env.hooks.bindSelf(this.env, this.scope, self);\n };\n\n RenderResult.prototype.updateSelf = function (self) {\n this.env.hooks.updateSelf(this.env, this.scope, self);\n };\n\n RenderResult.prototype.bindLocals = function (blockArguments) {\n var localNames = this.template.locals;\n\n for (var i = 0, l = localNames.length; i < l; i++) {\n this.env.hooks.bindLocal(this.env, this.scope, localNames[i], blockArguments[i]);\n }\n };\n\n RenderResult.prototype.updateLocals = function (blockArguments) {\n var localNames = this.template.locals;\n\n for (var i = 0, l = localNames.length; i < l; i++) {\n this.env.hooks.updateLocal(this.env, this.scope, localNames[i], blockArguments[i]);\n }\n };\n\n function initializeNode(node, owner) {\n node.ownerNode = owner;\n }\n\n function createChildMorph(dom, parentMorph, contextualElement) {\n var morph = _htmlbarsRuntimeMorph.default.empty(dom, contextualElement || parentMorph.contextualElement);\n initializeNode(morph, parentMorph.ownerNode);\n return morph;\n }\n\n function getCachedFragment(template, env) {\n var dom = env.dom,\n fragment;\n if (env.useFragmentCache && dom.canClone) {\n if (template.cachedFragment === null) {\n fragment = template.buildFragment(dom);\n if (template.hasRendered) {\n template.cachedFragment = fragment;\n } else {\n template.hasRendered = true;\n }\n }\n if (template.cachedFragment) {\n fragment = dom.cloneNode(template.cachedFragment, true);\n }\n } else if (!fragment) {\n fragment = template.buildFragment(dom);\n }\n\n return fragment;\n }\n});\nenifed('htmlbars-runtime', ['exports', 'htmlbars-runtime/hooks', 'htmlbars-runtime/render', 'htmlbars-util/morph-utils', 'htmlbars-util/template-utils'], function (exports, _htmlbarsRuntimeHooks, _htmlbarsRuntimeRender, _htmlbarsUtilMorphUtils, _htmlbarsUtilTemplateUtils) {\n 'use strict';\n\n var internal = {\n blockFor: _htmlbarsUtilTemplateUtils.blockFor,\n manualElement: _htmlbarsRuntimeRender.manualElement,\n hostBlock: _htmlbarsRuntimeHooks.hostBlock,\n continueBlock: _htmlbarsRuntimeHooks.continueBlock,\n hostYieldWithShadowTemplate: _htmlbarsRuntimeHooks.hostYieldWithShadowTemplate,\n visitChildren: _htmlbarsUtilMorphUtils.visitChildren,\n validateChildMorphs: _htmlbarsUtilMorphUtils.validateChildMorphs,\n clearMorph: _htmlbarsUtilTemplateUtils.clearMorph\n };\n\n exports.hooks = _htmlbarsRuntimeHooks.default;\n exports.render = _htmlbarsRuntimeRender.default;\n exports.internal = internal;\n});\nenifed('htmlbars-util/array-utils', ['exports'], function (exports) {\n 'use strict';\n\n exports.forEach = forEach;\n exports.map = map;\n\n function forEach(array, callback, binding) {\n var i, l;\n if (binding === undefined) {\n for (i = 0, l = array.length; i < l; i++) {\n callback(array[i], i, array);\n }\n } else {\n for (i = 0, l = array.length; i < l; i++) {\n callback.call(binding, array[i], i, array);\n }\n }\n }\n\n function map(array, callback) {\n var output = [];\n var i, l;\n\n for (i = 0, l = array.length; i < l; i++) {\n output.push(callback(array[i], i, array));\n }\n\n return output;\n }\n\n var getIdx;\n if (Array.prototype.indexOf) {\n getIdx = function (array, obj, from) {\n return array.indexOf(obj, from);\n };\n } else {\n getIdx = function (array, obj, from) {\n if (from === undefined || from === null) {\n from = 0;\n } else if (from < 0) {\n from = Math.max(0, array.length + from);\n }\n for (var i = from, l = array.length; i < l; i++) {\n if (array[i] === obj) {\n return i;\n }\n }\n return -1;\n };\n }\n\n var isArray = Array.isArray || function (array) {\n return Object.prototype.toString.call(array) === '[object Array]';\n };\n\n exports.isArray = isArray;\n var indexOfArray = getIdx;\n exports.indexOfArray = indexOfArray;\n});\nenifed('htmlbars-util/handlebars/safe-string', ['exports'], function (exports) {\n // Build out our basic SafeString type\n 'use strict';\n\n function SafeString(string) {\n this.string = string;\n }\n\n SafeString.prototype.toString = SafeString.prototype.toHTML = function () {\n return '' + this.string;\n };\n\n exports.default = SafeString;\n});\nenifed('htmlbars-util/handlebars/utils', ['exports'], function (exports) {\n 'use strict';\n\n exports.extend = extend;\n exports.indexOf = indexOf;\n exports.escapeExpression = escapeExpression;\n exports.isEmpty = isEmpty;\n exports.blockParams = blockParams;\n exports.appendContextPath = appendContextPath;\n var escape = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '`': '`'\n };\n\n var badChars = /[&<>\"'`]/g,\n possible = /[&<>\"'`]/;\n\n function escapeChar(chr) {\n return escape[chr];\n }\n\n function extend(obj /* , ...source */) {\n for (var i = 1; i < arguments.length; i++) {\n for (var key in arguments[i]) {\n if (Object.prototype.hasOwnProperty.call(arguments[i], key)) {\n obj[key] = arguments[i][key];\n }\n }\n }\n\n return obj;\n }\n\n var toString = Object.prototype.toString;\n\n exports.toString = toString;\n // Sourced from lodash\n // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt\n /*eslint-disable func-style, no-var */\n var isFunction = function (value) {\n return typeof value === 'function';\n };\n // fallback for older versions of Chrome and Safari\n /* istanbul ignore next */\n if (isFunction(/x/)) {\n exports.isFunction = isFunction = function (value) {\n return typeof value === 'function' && toString.call(value) === '[object Function]';\n };\n }\n var isFunction;\n exports.isFunction = isFunction;\n /*eslint-enable func-style, no-var */\n\n /* istanbul ignore next */\n var isArray = Array.isArray || function (value) {\n return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false;\n };\n\n exports.isArray = isArray;\n // Older IE versions do not directly support indexOf so we must implement our own, sadly.\n\n function indexOf(array, value) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n }\n\n function escapeExpression(string) {\n if (typeof string !== 'string') {\n // don't escape SafeStrings, since they're already safe\n if (string && string.toHTML) {\n return string.toHTML();\n } else if (string == null) {\n return '';\n } else if (!string) {\n return string + '';\n }\n\n // Force a string conversion as this will be done by the append regardless and\n // the regex test will do this transparently behind the scenes, causing issues if\n // an object's to string has escaped characters in it.\n string = '' + string;\n }\n\n if (!possible.test(string)) {\n return string;\n }\n return string.replace(badChars, escapeChar);\n }\n\n function isEmpty(value) {\n if (!value && value !== 0) {\n return true;\n } else if (isArray(value) && value.length === 0) {\n return true;\n } else {\n return false;\n }\n }\n\n function blockParams(params, ids) {\n params.path = ids;\n return params;\n }\n\n function appendContextPath(contextPath, id) {\n return (contextPath ? contextPath + '.' : '') + id;\n }\n});\nenifed(\"htmlbars-util/morph-utils\", [\"exports\"], function (exports) {\n /*globals console*/\n\n \"use strict\";\n\n exports.visitChildren = visitChildren;\n exports.validateChildMorphs = validateChildMorphs;\n exports.linkParams = linkParams;\n exports.dump = dump;\n\n function visitChildren(nodes, callback) {\n if (!nodes || nodes.length === 0) {\n return;\n }\n\n nodes = nodes.slice();\n\n while (nodes.length) {\n var node = nodes.pop();\n callback(node);\n\n if (node.childNodes) {\n nodes.push.apply(nodes, node.childNodes);\n } else if (node.firstChildMorph) {\n var current = node.firstChildMorph;\n\n while (current) {\n nodes.push(current);\n current = current.nextMorph;\n }\n } else if (node.morphList) {\n var current = node.morphList.firstChildMorph;\n\n while (current) {\n nodes.push(current);\n current = current.nextMorph;\n }\n }\n }\n }\n\n function validateChildMorphs(env, morph, visitor) {\n var morphList = morph.morphList;\n if (morph.morphList) {\n var current = morphList.firstChildMorph;\n\n while (current) {\n var next = current.nextMorph;\n validateChildMorphs(env, current, visitor);\n current = next;\n }\n } else if (morph.lastResult) {\n morph.lastResult.revalidateWith(env, undefined, undefined, undefined, visitor);\n } else if (morph.childNodes) {\n // This means that the childNodes were wired up manually\n for (var i = 0, l = morph.childNodes.length; i < l; i++) {\n validateChildMorphs(env, morph.childNodes[i], visitor);\n }\n }\n }\n\n function linkParams(env, scope, morph, path, params, hash) {\n if (morph.linkedParams) {\n return;\n }\n\n if (env.hooks.linkRenderNode(morph, env, scope, path, params, hash)) {\n morph.linkedParams = { params: params, hash: hash };\n }\n }\n\n function dump(node) {\n console.group(node, node.isDirty);\n\n if (node.childNodes) {\n map(node.childNodes, dump);\n } else if (node.firstChildMorph) {\n var current = node.firstChildMorph;\n\n while (current) {\n dump(current);\n current = current.nextMorph;\n }\n } else if (node.morphList) {\n dump(node.morphList);\n }\n\n console.groupEnd();\n }\n\n function map(nodes, cb) {\n for (var i = 0, l = nodes.length; i < l; i++) {\n cb(nodes[i]);\n }\n }\n});\nenifed('htmlbars-util/namespaces', ['exports'], function (exports) {\n // ref http://dev.w3.org/html5/spec-LC/namespaces.html\n 'use strict';\n\n exports.getAttrNamespace = getAttrNamespace;\n var defaultNamespaces = {\n html: 'http://www.w3.org/1999/xhtml',\n mathml: 'http://www.w3.org/1998/Math/MathML',\n svg: 'http://www.w3.org/2000/svg',\n xlink: 'http://www.w3.org/1999/xlink',\n xml: 'http://www.w3.org/XML/1998/namespace'\n };\n\n function getAttrNamespace(attrName, detectedNamespace) {\n if (detectedNamespace) {\n return detectedNamespace;\n }\n\n var namespace;\n\n var colonIndex = attrName.indexOf(':');\n if (colonIndex !== -1) {\n var prefix = attrName.slice(0, colonIndex);\n namespace = defaultNamespaces[prefix];\n }\n\n return namespace || null;\n }\n});\nenifed(\"htmlbars-util/object-utils\", [\"exports\"], function (exports) {\n \"use strict\";\n\n exports.merge = merge;\n exports.shallowCopy = shallowCopy;\n exports.keySet = keySet;\n exports.keyLength = keyLength;\n\n function merge(options, defaults) {\n for (var prop in defaults) {\n if (options.hasOwnProperty(prop)) {\n continue;\n }\n options[prop] = defaults[prop];\n }\n return options;\n }\n\n function shallowCopy(obj) {\n return merge({}, obj);\n }\n\n function keySet(obj) {\n var set = {};\n\n for (var prop in obj) {\n if (obj.hasOwnProperty(prop)) {\n set[prop] = true;\n }\n }\n\n return set;\n }\n\n function keyLength(obj) {\n var count = 0;\n\n for (var prop in obj) {\n if (obj.hasOwnProperty(prop)) {\n count++;\n }\n }\n\n return count;\n }\n});\nenifed(\"htmlbars-util/quoting\", [\"exports\"], function (exports) {\n \"use strict\";\n\n exports.hash = hash;\n exports.repeat = repeat;\n function escapeString(str) {\n str = str.replace(/\\\\/g, \"\\\\\\\\\");\n str = str.replace(/\"/g, '\\\\\"');\n str = str.replace(/\\n/g, \"\\\\n\");\n return str;\n }\n\n exports.escapeString = escapeString;\n\n function string(str) {\n return '\"' + escapeString(str) + '\"';\n }\n\n exports.string = string;\n\n function array(a) {\n return \"[\" + a + \"]\";\n }\n\n exports.array = array;\n\n function hash(pairs) {\n return \"{\" + pairs.join(\", \") + \"}\";\n }\n\n function repeat(chars, times) {\n var str = \"\";\n while (times--) {\n str += chars;\n }\n return str;\n }\n});\nenifed('htmlbars-util/safe-string', ['exports', 'htmlbars-util/handlebars/safe-string'], function (exports, _htmlbarsUtilHandlebarsSafeString) {\n 'use strict';\n\n exports.default = _htmlbarsUtilHandlebarsSafeString.default;\n});\nenifed(\"htmlbars-util/template-utils\", [\"exports\", \"htmlbars-util/morph-utils\", \"htmlbars-runtime/render\"], function (exports, _htmlbarsUtilMorphUtils, _htmlbarsRuntimeRender) {\n \"use strict\";\n\n exports.RenderState = RenderState;\n exports.blockFor = blockFor;\n exports.renderAndCleanup = renderAndCleanup;\n exports.clearMorph = clearMorph;\n exports.clearMorphList = clearMorphList;\n\n function RenderState(renderNode, morphList) {\n // The morph list that is no longer needed and can be\n // destroyed.\n this.morphListToClear = morphList;\n\n // The morph list that needs to be pruned of any items\n // that were not yielded on a subsequent render.\n this.morphListToPrune = null;\n\n // A map of morphs for each item yielded in during this\n // rendering pass. Any morphs in the DOM but not in this map\n // will be pruned during cleanup.\n this.handledMorphs = {};\n this.collisions = undefined;\n\n // The morph to clear once rendering is complete. By\n // default, we set this to the previous morph (to catch\n // the case where nothing is yielded; in that case, we\n // should just clear the morph). Otherwise this gets set\n // to null if anything is rendered.\n this.morphToClear = renderNode;\n\n this.shadowOptions = null;\n }\n\n function Block(render, template, blockOptions) {\n this.render = render;\n this.template = template;\n this.blockOptions = blockOptions;\n this.arity = template.arity;\n }\n\n Block.prototype.invoke = function (env, blockArguments, _self, renderNode, parentScope, visitor) {\n if (renderNode.lastResult) {\n renderNode.lastResult.revalidateWith(env, undefined, _self, blockArguments, visitor);\n } else {\n this._firstRender(env, blockArguments, _self, renderNode, parentScope);\n }\n };\n\n Block.prototype._firstRender = function (env, blockArguments, _self, renderNode, parentScope) {\n var options = { renderState: new RenderState(renderNode) };\n var render = this.render;\n var template = this.template;\n var scope = this.blockOptions.scope;\n\n var shadowScope = scope ? env.hooks.createChildScope(scope) : env.hooks.createFreshScope();\n\n env.hooks.bindShadowScope(env, parentScope, shadowScope, this.blockOptions.options);\n\n if (_self !== undefined) {\n env.hooks.bindSelf(env, shadowScope, _self);\n } else if (this.blockOptions.self !== undefined) {\n env.hooks.bindSelf(env, shadowScope, this.blockOptions.self);\n }\n\n bindBlocks(env, shadowScope, this.blockOptions.yieldTo);\n\n renderAndCleanup(renderNode, env, options, null, function () {\n options.renderState.morphToClear = null;\n var renderOptions = new _htmlbarsRuntimeRender.RenderOptions(renderNode, undefined, blockArguments);\n render(template, env, shadowScope, renderOptions);\n });\n };\n\n function blockFor(render, template, blockOptions) {\n return new Block(render, template, blockOptions);\n }\n\n function bindBlocks(env, shadowScope, blocks) {\n if (!blocks) {\n return;\n }\n if (blocks instanceof Block) {\n env.hooks.bindBlock(env, shadowScope, blocks);\n } else {\n for (var name in blocks) {\n if (blocks.hasOwnProperty(name)) {\n env.hooks.bindBlock(env, shadowScope, blocks[name], name);\n }\n }\n }\n }\n\n function renderAndCleanup(morph, env, options, shadowOptions, callback) {\n // The RenderState object is used to collect information about what the\n // helper or hook being invoked has yielded. Once it has finished either\n // yielding multiple items (via yieldItem) or a single template (via\n // yieldTemplate), we detect what was rendered and how it differs from\n // the previous render, cleaning up old state in DOM as appropriate.\n var renderState = options.renderState;\n renderState.collisions = undefined;\n renderState.shadowOptions = shadowOptions;\n\n // Invoke the callback, instructing it to save information about what it\n // renders into RenderState.\n var result = callback(options);\n\n // The hook can opt-out of cleanup if it handled cleanup itself.\n if (result && result.handled) {\n return;\n }\n\n var morphMap = morph.morphMap;\n\n // Walk the morph list, clearing any items that were yielded in a previous\n // render but were not yielded during this render.\n var morphList = renderState.morphListToPrune;\n if (morphList) {\n var handledMorphs = renderState.handledMorphs;\n var item = morphList.firstChildMorph;\n\n while (item) {\n var next = item.nextMorph;\n\n // If we don't see the key in handledMorphs, it wasn't\n // yielded in and we can safely remove it from DOM.\n if (!(item.key in handledMorphs)) {\n morphMap[item.key] = undefined;\n clearMorph(item, env, true);\n item.destroy();\n }\n\n item = next;\n }\n }\n\n morphList = renderState.morphListToClear;\n if (morphList) {\n clearMorphList(morphList, morph, env);\n }\n\n var toClear = renderState.morphToClear;\n if (toClear) {\n clearMorph(toClear, env);\n }\n }\n\n function clearMorph(morph, env, destroySelf) {\n var cleanup = env.hooks.cleanupRenderNode;\n var destroy = env.hooks.destroyRenderNode;\n var willCleanup = env.hooks.willCleanupTree;\n var didCleanup = env.hooks.didCleanupTree;\n\n function destroyNode(node) {\n if (cleanup) {\n cleanup(node);\n }\n if (destroy) {\n destroy(node);\n }\n }\n\n if (willCleanup) {\n willCleanup(env, morph, destroySelf);\n }\n if (cleanup) {\n cleanup(morph);\n }\n if (destroySelf && destroy) {\n destroy(morph);\n }\n\n _htmlbarsUtilMorphUtils.visitChildren(morph.childNodes, destroyNode);\n\n // TODO: Deal with logical children that are not in the DOM tree\n morph.clear();\n if (didCleanup) {\n didCleanup(env, morph, destroySelf);\n }\n\n morph.lastResult = null;\n morph.lastYielded = null;\n morph.childNodes = null;\n }\n\n function clearMorphList(morphList, morph, env) {\n var item = morphList.firstChildMorph;\n\n while (item) {\n var next = item.nextMorph;\n morph.morphMap[item.key] = undefined;\n clearMorph(item, env, true);\n item.destroy();\n\n item = next;\n }\n\n // Remove the MorphList from the morph.\n morphList.clear();\n morph.morphList = null;\n }\n});\nenifed(\"htmlbars-util/void-tag-names\", [\"exports\", \"htmlbars-util/array-utils\"], function (exports, _htmlbarsUtilArrayUtils) {\n \"use strict\";\n\n // The HTML elements in this list are speced by\n // http://www.w3.org/TR/html-markup/syntax.html#syntax-elements,\n // and will be forced to close regardless of if they have a\n // self-closing /> at the end.\n var voidTagNames = \"area base br col command embed hr img input keygen link meta param source track wbr\";\n var voidMap = {};\n\n _htmlbarsUtilArrayUtils.forEach(voidTagNames.split(\" \"), function (tagName) {\n voidMap[tagName] = true;\n });\n\n exports.default = voidMap;\n});\nenifed('htmlbars-util', ['exports', 'htmlbars-util/safe-string', 'htmlbars-util/handlebars/utils', 'htmlbars-util/namespaces', 'htmlbars-util/morph-utils'], function (exports, _htmlbarsUtilSafeString, _htmlbarsUtilHandlebarsUtils, _htmlbarsUtilNamespaces, _htmlbarsUtilMorphUtils) {\n 'use strict';\n\n exports.SafeString = _htmlbarsUtilSafeString.default;\n exports.escapeExpression = _htmlbarsUtilHandlebarsUtils.escapeExpression;\n exports.getAttrNamespace = _htmlbarsUtilNamespaces.getAttrNamespace;\n exports.validateChildMorphs = _htmlbarsUtilMorphUtils.validateChildMorphs;\n exports.linkParams = _htmlbarsUtilMorphUtils.linkParams;\n exports.dump = _htmlbarsUtilMorphUtils.dump;\n});\nenifed('morph-attr/sanitize-attribute-value', ['exports'], function (exports) {\n /* jshint scripturl:true */\n\n 'use strict';\n\n exports.sanitizeAttributeValue = sanitizeAttributeValue;\n var badProtocols = {\n 'javascript:': true,\n 'vbscript:': true\n };\n\n var badTags = {\n 'A': true,\n 'BODY': true,\n 'LINK': true,\n 'IMG': true,\n 'IFRAME': true,\n 'BASE': true,\n 'FORM': true\n };\n\n var badTagsForDataURI = {\n 'EMBED': true\n };\n\n var badAttributes = {\n 'href': true,\n 'src': true,\n 'background': true,\n 'action': true\n };\n\n exports.badAttributes = badAttributes;\n var badAttributesForDataURI = {\n 'src': true\n };\n\n function sanitizeAttributeValue(dom, element, attribute, value) {\n var tagName;\n\n if (!element) {\n tagName = null;\n } else {\n tagName = element.tagName.toUpperCase();\n }\n\n if (value && value.toHTML) {\n return value.toHTML();\n }\n\n if ((tagName === null || badTags[tagName]) && badAttributes[attribute]) {\n var protocol = dom.protocolForURL(value);\n if (badProtocols[protocol] === true) {\n return 'unsafe:' + value;\n }\n }\n\n if (badTagsForDataURI[tagName] && badAttributesForDataURI[attribute]) {\n return 'unsafe:' + value;\n }\n\n return value;\n }\n});\nenifed(\"morph-attr\", [\"exports\", \"morph-attr/sanitize-attribute-value\", \"dom-helper/prop\", \"dom-helper/build-html-dom\", \"htmlbars-util\"], function (exports, _morphAttrSanitizeAttributeValue, _domHelperProp, _domHelperBuildHtmlDom, _htmlbarsUtil) {\n \"use strict\";\n\n function getProperty() {\n return this.domHelper.getPropertyStrict(this.element, this.attrName);\n }\n\n function updateProperty(value) {\n if (this._renderedInitially === true || !_domHelperProp.isAttrRemovalValue(value)) {\n var element = this.element;\n var attrName = this.attrName;\n\n if (attrName === 'value' && element.tagName === 'INPUT' && element.value === value) {\n // Do nothing. Attempts to avoid accidently changing the input cursor location.\n // See https://github.com/tildeio/htmlbars/pull/447 for more details.\n } else {\n // do not render if initial value is undefined or null\n this.domHelper.setPropertyStrict(element, attrName, value);\n }\n }\n\n this._renderedInitially = true;\n }\n\n function getAttribute() {\n return this.domHelper.getAttribute(this.element, this.attrName);\n }\n\n function updateAttribute(value) {\n if (_domHelperProp.isAttrRemovalValue(value)) {\n this.domHelper.removeAttribute(this.element, this.attrName);\n } else {\n this.domHelper.setAttribute(this.element, this.attrName, value);\n }\n }\n\n function getAttributeNS() {\n return this.domHelper.getAttributeNS(this.element, this.namespace, this.attrName);\n }\n\n function updateAttributeNS(value) {\n if (_domHelperProp.isAttrRemovalValue(value)) {\n this.domHelper.removeAttribute(this.element, this.attrName);\n } else {\n this.domHelper.setAttributeNS(this.element, this.namespace, this.attrName, value);\n }\n }\n\n var UNSET = { unset: true };\n\n var guid = 1;\n\n AttrMorph.create = function (element, attrName, domHelper, namespace) {\n var ns = _htmlbarsUtil.getAttrNamespace(attrName, namespace);\n\n if (ns) {\n return new AttributeNSAttrMorph(element, attrName, domHelper, ns);\n } else {\n return createNonNamespacedAttrMorph(element, attrName, domHelper);\n }\n };\n\n function createNonNamespacedAttrMorph(element, attrName, domHelper) {\n var _normalizeProperty = _domHelperProp.normalizeProperty(element, attrName);\n\n var normalized = _normalizeProperty.normalized;\n var type = _normalizeProperty.type;\n\n if (element.namespaceURI === _domHelperBuildHtmlDom.svgNamespace || attrName === 'style' || type === 'attr') {\n return new AttributeAttrMorph(element, normalized, domHelper);\n } else {\n return new PropertyAttrMorph(element, normalized, domHelper);\n }\n }\n\n function AttrMorph(element, attrName, domHelper) {\n this.element = element;\n this.domHelper = domHelper;\n this.attrName = attrName;\n this._state = undefined;\n this.isDirty = false;\n this.isSubtreeDirty = false;\n this.escaped = true;\n this.lastValue = UNSET;\n this.lastResult = null;\n this.lastYielded = null;\n this.childNodes = null;\n this.linkedParams = null;\n this.linkedResult = null;\n this.guid = \"attr\" + guid++;\n this.seen = false;\n this.ownerNode = null;\n this.rendered = false;\n this._renderedInitially = false;\n this.namespace = undefined;\n this.didInit();\n }\n\n AttrMorph.prototype.getState = function () {\n if (!this._state) {\n this._state = {};\n }\n\n return this._state;\n };\n\n AttrMorph.prototype.setState = function (newState) {\n /*jshint -W093 */\n\n return this._state = newState;\n };\n\n AttrMorph.prototype.didInit = function () {};\n AttrMorph.prototype.willSetContent = function () {};\n\n AttrMorph.prototype.setContent = function (value) {\n this.willSetContent(value);\n\n if (this.lastValue === value) {\n return;\n }\n this.lastValue = value;\n\n if (this.escaped) {\n var sanitized = _morphAttrSanitizeAttributeValue.sanitizeAttributeValue(this.domHelper, this.element, this.attrName, value);\n this._update(sanitized, this.namespace);\n } else {\n this._update(value, this.namespace);\n }\n };\n\n AttrMorph.prototype.getContent = function () {\n var value = this.lastValue = this._get();\n return value;\n };\n\n // renderAndCleanup calls `clear` on all items in the morph map\n // just before calling `destroy` on the morph.\n //\n // As a future refactor this could be changed to set the property\n // back to its original/default value.\n AttrMorph.prototype.clear = function () {};\n\n AttrMorph.prototype.destroy = function () {\n this.element = null;\n this.domHelper = null;\n };\n\n AttrMorph.prototype._$superAttrMorph = AttrMorph;\n\n function PropertyAttrMorph(element, attrName, domHelper) {\n this._$superAttrMorph(element, attrName, domHelper);\n }\n\n PropertyAttrMorph.prototype = Object.create(AttrMorph.prototype);\n PropertyAttrMorph.prototype._update = updateProperty;\n PropertyAttrMorph.prototype._get = getProperty;\n\n function AttributeNSAttrMorph(element, attrName, domHelper, namespace) {\n this._$superAttrMorph(element, attrName, domHelper);\n this.namespace = namespace;\n }\n\n AttributeNSAttrMorph.prototype = Object.create(AttrMorph.prototype);\n AttributeNSAttrMorph.prototype._update = updateAttributeNS;\n AttributeNSAttrMorph.prototype._get = getAttributeNS;\n\n function AttributeAttrMorph(element, attrName, domHelper) {\n this._$superAttrMorph(element, attrName, domHelper);\n }\n\n AttributeAttrMorph.prototype = Object.create(AttrMorph.prototype);\n AttributeAttrMorph.prototype._update = updateAttribute;\n AttributeAttrMorph.prototype._get = getAttribute;\n\n exports.default = AttrMorph;\n exports.sanitizeAttributeValue = _morphAttrSanitizeAttributeValue.sanitizeAttributeValue;\n});\nenifed('morph-range/morph-list', ['exports', 'morph-range/utils'], function (exports, _morphRangeUtils) {\n 'use strict';\n\n function MorphList() {\n // morph graph\n this.firstChildMorph = null;\n this.lastChildMorph = null;\n\n this.mountedMorph = null;\n }\n\n var prototype = MorphList.prototype;\n\n prototype.clear = function MorphList$clear() {\n var current = this.firstChildMorph;\n\n while (current) {\n var next = current.nextMorph;\n current.previousMorph = null;\n current.nextMorph = null;\n current.parentMorphList = null;\n current = next;\n }\n\n this.firstChildMorph = this.lastChildMorph = null;\n };\n\n prototype.destroy = function MorphList$destroy() {};\n\n prototype.appendMorph = function MorphList$appendMorph(morph) {\n this.insertBeforeMorph(morph, null);\n };\n\n prototype.insertBeforeMorph = function MorphList$insertBeforeMorph(morph, referenceMorph) {\n if (morph.parentMorphList !== null) {\n morph.unlink();\n }\n if (referenceMorph && referenceMorph.parentMorphList !== this) {\n throw new Error('The morph before which the new morph is to be inserted is not a child of this morph.');\n }\n\n var mountedMorph = this.mountedMorph;\n\n if (mountedMorph) {\n\n var parentNode = mountedMorph.firstNode.parentNode;\n var referenceNode = referenceMorph ? referenceMorph.firstNode : mountedMorph.lastNode.nextSibling;\n\n _morphRangeUtils.insertBefore(parentNode, morph.firstNode, morph.lastNode, referenceNode);\n\n // was not in list mode replace current content\n if (!this.firstChildMorph) {\n _morphRangeUtils.clear(this.mountedMorph.firstNode.parentNode, this.mountedMorph.firstNode, this.mountedMorph.lastNode);\n }\n }\n\n morph.parentMorphList = this;\n\n var previousMorph = referenceMorph ? referenceMorph.previousMorph : this.lastChildMorph;\n if (previousMorph) {\n previousMorph.nextMorph = morph;\n morph.previousMorph = previousMorph;\n } else {\n this.firstChildMorph = morph;\n }\n\n if (referenceMorph) {\n referenceMorph.previousMorph = morph;\n morph.nextMorph = referenceMorph;\n } else {\n this.lastChildMorph = morph;\n }\n\n this.firstChildMorph._syncFirstNode();\n this.lastChildMorph._syncLastNode();\n };\n\n prototype.removeChildMorph = function MorphList$removeChildMorph(morph) {\n if (morph.parentMorphList !== this) {\n throw new Error(\"Cannot remove a morph from a parent it is not inside of\");\n }\n\n morph.destroy();\n };\n\n exports.default = MorphList;\n});\nenifed('morph-range/morph-list.umd', ['exports', 'morph-range/morph-list'], function (exports, _morphRangeMorphList) {\n 'use strict';\n\n (function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n define([], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.MorphList = factory();\n }\n })(undefined, function () {\n return _morphRangeMorphList.default;\n });\n});\nenifed(\"morph-range/utils\", [\"exports\"], function (exports) {\n // inclusive of both nodes\n \"use strict\";\n\n exports.clear = clear;\n exports.insertBefore = insertBefore;\n\n function clear(parentNode, firstNode, lastNode) {\n if (!parentNode) {\n return;\n }\n\n var node = firstNode;\n var nextNode;\n do {\n nextNode = node.nextSibling;\n parentNode.removeChild(node);\n if (node === lastNode) {\n break;\n }\n node = nextNode;\n } while (node);\n }\n\n function insertBefore(parentNode, firstNode, lastNode, refNode) {\n var node = firstNode;\n var nextNode;\n do {\n nextNode = node.nextSibling;\n parentNode.insertBefore(node, refNode);\n if (node === lastNode) {\n break;\n }\n node = nextNode;\n } while (node);\n }\n});\nenifed('morph-range', ['exports', 'morph-range/utils'], function (exports, _morphRangeUtils) {\n 'use strict';\n\n // constructor just initializes the fields\n // use one of the static initializers to create a valid morph.\n function Morph(domHelper, contextualElement) {\n this.domHelper = domHelper;\n // context if content if current content is detached\n this.contextualElement = contextualElement;\n // inclusive range of morph\n // these should be nodeType 1, 3, or 8\n this.firstNode = null;\n this.lastNode = null;\n\n // flag to force text to setContent to be treated as html\n this.parseTextAsHTML = false;\n\n // morph list graph\n this.parentMorphList = null;\n this.previousMorph = null;\n this.nextMorph = null;\n }\n\n Morph.empty = function (domHelper, contextualElement) {\n var morph = new Morph(domHelper, contextualElement);\n morph.clear();\n return morph;\n };\n\n Morph.create = function (domHelper, contextualElement, node) {\n var morph = new Morph(domHelper, contextualElement);\n morph.setNode(node);\n return morph;\n };\n\n Morph.attach = function (domHelper, contextualElement, firstNode, lastNode) {\n var morph = new Morph(domHelper, contextualElement);\n morph.setRange(firstNode, lastNode);\n return morph;\n };\n\n Morph.prototype.setContent = function Morph$setContent(content) {\n if (content === null || content === undefined) {\n return this.clear();\n }\n\n var type = typeof content;\n switch (type) {\n case 'string':\n if (this.parseTextAsHTML) {\n return this.domHelper.setMorphHTML(this, content);\n }\n return this.setText(content);\n case 'object':\n if (typeof content.nodeType === 'number') {\n return this.setNode(content);\n }\n /* Handlebars.SafeString */\n if (typeof content.toHTML === 'function') {\n return this.setHTML(content.toHTML());\n }\n if (this.parseTextAsHTML) {\n return this.setHTML(content.toString());\n }\n /* falls through */\n case 'boolean':\n case 'number':\n return this.setText(content.toString());\n case 'function':\n raiseCannotBindToFunction(content);\n default:\n throw new TypeError('unsupported content');\n }\n };\n\n function raiseCannotBindToFunction(content) {\n var functionName = content.name;\n var message;\n\n if (functionName) {\n message = 'Unsupported Content: Cannot bind to function `' + functionName + '`';\n } else {\n message = 'Unsupported Content: Cannot bind to function';\n }\n\n throw new TypeError(message);\n }\n\n Morph.prototype.clear = function Morph$clear() {\n var node = this.setNode(this.domHelper.createComment(''));\n return node;\n };\n\n Morph.prototype.setText = function Morph$setText(text) {\n var firstNode = this.firstNode;\n var lastNode = this.lastNode;\n\n if (firstNode && lastNode === firstNode && firstNode.nodeType === 3) {\n firstNode.nodeValue = text;\n return firstNode;\n }\n\n return this.setNode(text ? this.domHelper.createTextNode(text) : this.domHelper.createComment(''));\n };\n\n Morph.prototype.setNode = function Morph$setNode(newNode) {\n var firstNode, lastNode;\n switch (newNode.nodeType) {\n case 3:\n firstNode = newNode;\n lastNode = newNode;\n break;\n case 11:\n firstNode = newNode.firstChild;\n lastNode = newNode.lastChild;\n if (firstNode === null) {\n firstNode = this.domHelper.createComment('');\n newNode.appendChild(firstNode);\n lastNode = firstNode;\n }\n break;\n default:\n firstNode = newNode;\n lastNode = newNode;\n break;\n }\n\n this.setRange(firstNode, lastNode);\n\n return newNode;\n };\n\n Morph.prototype.setRange = function (firstNode, lastNode) {\n var previousFirstNode = this.firstNode;\n if (previousFirstNode !== null) {\n\n var parentNode = previousFirstNode.parentNode;\n if (parentNode !== null) {\n _morphRangeUtils.insertBefore(parentNode, firstNode, lastNode, previousFirstNode);\n _morphRangeUtils.clear(parentNode, previousFirstNode, this.lastNode);\n }\n }\n\n this.firstNode = firstNode;\n this.lastNode = lastNode;\n\n if (this.parentMorphList) {\n this._syncFirstNode();\n this._syncLastNode();\n }\n };\n\n Morph.prototype.destroy = function Morph$destroy() {\n this.unlink();\n\n var firstNode = this.firstNode;\n var lastNode = this.lastNode;\n var parentNode = firstNode && firstNode.parentNode;\n\n this.firstNode = null;\n this.lastNode = null;\n\n _morphRangeUtils.clear(parentNode, firstNode, lastNode);\n };\n\n Morph.prototype.unlink = function Morph$unlink() {\n var parentMorphList = this.parentMorphList;\n var previousMorph = this.previousMorph;\n var nextMorph = this.nextMorph;\n\n if (previousMorph) {\n if (nextMorph) {\n previousMorph.nextMorph = nextMorph;\n nextMorph.previousMorph = previousMorph;\n } else {\n previousMorph.nextMorph = null;\n parentMorphList.lastChildMorph = previousMorph;\n }\n } else {\n if (nextMorph) {\n nextMorph.previousMorph = null;\n parentMorphList.firstChildMorph = nextMorph;\n } else if (parentMorphList) {\n parentMorphList.lastChildMorph = parentMorphList.firstChildMorph = null;\n }\n }\n\n this.parentMorphList = null;\n this.nextMorph = null;\n this.previousMorph = null;\n\n if (parentMorphList && parentMorphList.mountedMorph) {\n if (!parentMorphList.firstChildMorph) {\n // list is empty\n parentMorphList.mountedMorph.clear();\n return;\n } else {\n parentMorphList.firstChildMorph._syncFirstNode();\n parentMorphList.lastChildMorph._syncLastNode();\n }\n }\n };\n\n Morph.prototype.setHTML = function (text) {\n var fragment = this.domHelper.parseHTML(text, this.contextualElement);\n return this.setNode(fragment);\n };\n\n Morph.prototype.setMorphList = function Morph$appendMorphList(morphList) {\n morphList.mountedMorph = this;\n this.clear();\n\n var originalFirstNode = this.firstNode;\n\n if (morphList.firstChildMorph) {\n this.firstNode = morphList.firstChildMorph.firstNode;\n this.lastNode = morphList.lastChildMorph.lastNode;\n\n var current = morphList.firstChildMorph;\n\n while (current) {\n var next = current.nextMorph;\n current.insertBeforeNode(originalFirstNode, null);\n current = next;\n }\n originalFirstNode.parentNode.removeChild(originalFirstNode);\n }\n };\n\n Morph.prototype._syncFirstNode = function Morph$syncFirstNode() {\n var morph = this;\n var parentMorphList;\n while (parentMorphList = morph.parentMorphList) {\n if (parentMorphList.mountedMorph === null) {\n break;\n }\n if (morph !== parentMorphList.firstChildMorph) {\n break;\n }\n if (morph.firstNode === parentMorphList.mountedMorph.firstNode) {\n break;\n }\n\n parentMorphList.mountedMorph.firstNode = morph.firstNode;\n\n morph = parentMorphList.mountedMorph;\n }\n };\n\n Morph.prototype._syncLastNode = function Morph$syncLastNode() {\n var morph = this;\n var parentMorphList;\n while (parentMorphList = morph.parentMorphList) {\n if (parentMorphList.mountedMorph === null) {\n break;\n }\n if (morph !== parentMorphList.lastChildMorph) {\n break;\n }\n if (morph.lastNode === parentMorphList.mountedMorph.lastNode) {\n break;\n }\n\n parentMorphList.mountedMorph.lastNode = morph.lastNode;\n\n morph = parentMorphList.mountedMorph;\n }\n };\n\n Morph.prototype.insertBeforeNode = function Morph$insertBeforeNode(parentNode, refNode) {\n _morphRangeUtils.insertBefore(parentNode, this.firstNode, this.lastNode, refNode);\n };\n\n Morph.prototype.appendToNode = function Morph$appendToNode(parentNode) {\n _morphRangeUtils.insertBefore(parentNode, this.firstNode, this.lastNode, null);\n };\n\n exports.default = Morph;\n});\nenifed(\"route-recognizer/dsl\", [\"exports\"], function (exports) {\n \"use strict\";\n\n function Target(path, matcher, delegate) {\n this.path = path;\n this.matcher = matcher;\n this.delegate = delegate;\n }\n\n Target.prototype = {\n to: function (target, callback) {\n var delegate = this.delegate;\n\n if (delegate && delegate.willAddRoute) {\n target = delegate.willAddRoute(this.matcher.target, target);\n }\n\n this.matcher.add(this.path, target);\n\n if (callback) {\n if (callback.length === 0) {\n throw new Error(\"You must have an argument in the function passed to `to`\");\n }\n this.matcher.addChild(this.path, target, callback, this.delegate);\n }\n return this;\n }\n };\n\n function Matcher(target) {\n this.routes = {};\n this.children = {};\n this.target = target;\n }\n\n Matcher.prototype = {\n add: function (path, handler) {\n this.routes[path] = handler;\n },\n\n addChild: function (path, target, callback, delegate) {\n var matcher = new Matcher(target);\n this.children[path] = matcher;\n\n var match = generateMatch(path, matcher, delegate);\n\n if (delegate && delegate.contextEntered) {\n delegate.contextEntered(target, match);\n }\n\n callback(match);\n }\n };\n\n function generateMatch(startingPath, matcher, delegate) {\n return function (path, nestedCallback) {\n var fullPath = startingPath + path;\n\n if (nestedCallback) {\n nestedCallback(generateMatch(fullPath, matcher, delegate));\n } else {\n return new Target(startingPath + path, matcher, delegate);\n }\n };\n }\n\n function addRoute(routeArray, path, handler) {\n var len = 0;\n for (var i = 0, l = routeArray.length; i < l; i++) {\n len += routeArray[i].path.length;\n }\n\n path = path.substr(len);\n var route = { path: path, handler: handler };\n routeArray.push(route);\n }\n\n function eachRoute(baseRoute, matcher, callback, binding) {\n var routes = matcher.routes;\n\n for (var path in routes) {\n if (routes.hasOwnProperty(path)) {\n var routeArray = baseRoute.slice();\n addRoute(routeArray, path, routes[path]);\n\n if (matcher.children[path]) {\n eachRoute(routeArray, matcher.children[path], callback, binding);\n } else {\n callback.call(binding, routeArray);\n }\n }\n }\n }\n\n exports.default = function (callback, addRouteCallback) {\n var matcher = new Matcher();\n\n callback(generateMatch(\"\", matcher, this.delegate));\n\n eachRoute([], matcher, function (route) {\n if (addRouteCallback) {\n addRouteCallback(this, route);\n } else {\n this.add(route);\n }\n }, this);\n };\n});\nenifed('route-recognizer', ['exports', 'route-recognizer/dsl'], function (exports, _routeRecognizerDsl) {\n 'use strict';\n\n var specials = ['/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\\\'];\n\n var escapeRegex = new RegExp('(\\\\' + specials.join('|\\\\') + ')', 'g');\n\n function isArray(test) {\n return Object.prototype.toString.call(test) === \"[object Array]\";\n }\n\n // A Segment represents a segment in the original route description.\n // Each Segment type provides an `eachChar` and `regex` method.\n //\n // The `eachChar` method invokes the callback with one or more character\n // specifications. A character specification consumes one or more input\n // characters.\n //\n // The `regex` method returns a regex fragment for the segment. If the\n // segment is a dynamic of star segment, the regex fragment also includes\n // a capture.\n //\n // A character specification contains:\n //\n // * `validChars`: a String with a list of all valid characters, or\n // * `invalidChars`: a String with a list of all invalid characters\n // * `repeat`: true if the character specification can repeat\n\n function StaticSegment(string) {\n this.string = string;\n }\n StaticSegment.prototype = {\n eachChar: function (callback) {\n var string = this.string,\n ch;\n\n for (var i = 0, l = string.length; i < l; i++) {\n ch = string.charAt(i);\n callback({ validChars: ch });\n }\n },\n\n regex: function () {\n return this.string.replace(escapeRegex, '\\\\$1');\n },\n\n generate: function () {\n return this.string;\n }\n };\n\n function DynamicSegment(name) {\n this.name = name;\n }\n DynamicSegment.prototype = {\n eachChar: function (callback) {\n callback({ invalidChars: \"/\", repeat: true });\n },\n\n regex: function () {\n return \"([^/]+)\";\n },\n\n generate: function (params) {\n return params[this.name];\n }\n };\n\n function StarSegment(name) {\n this.name = name;\n }\n StarSegment.prototype = {\n eachChar: function (callback) {\n callback({ invalidChars: \"\", repeat: true });\n },\n\n regex: function () {\n return \"(.+)\";\n },\n\n generate: function (params) {\n return params[this.name];\n }\n };\n\n function EpsilonSegment() {}\n EpsilonSegment.prototype = {\n eachChar: function () {},\n regex: function () {\n return \"\";\n },\n generate: function () {\n return \"\";\n }\n };\n\n function parse(route, names, types) {\n // normalize route as not starting with a \"/\". Recognition will\n // also normalize.\n if (route.charAt(0) === \"/\") {\n route = route.substr(1);\n }\n\n var segments = route.split(\"/\"),\n results = [];\n\n for (var i = 0, l = segments.length; i < l; i++) {\n var segment = segments[i],\n match;\n\n if (match = segment.match(/^:([^\\/]+)$/)) {\n results.push(new DynamicSegment(match[1]));\n names.push(match[1]);\n types.dynamics++;\n } else if (match = segment.match(/^\\*([^\\/]+)$/)) {\n results.push(new StarSegment(match[1]));\n names.push(match[1]);\n types.stars++;\n } else if (segment === \"\") {\n results.push(new EpsilonSegment());\n } else {\n results.push(new StaticSegment(segment));\n types.statics++;\n }\n }\n\n return results;\n }\n\n // A State has a character specification and (`charSpec`) and a list of possible\n // subsequent states (`nextStates`).\n //\n // If a State is an accepting state, it will also have several additional\n // properties:\n //\n // * `regex`: A regular expression that is used to extract parameters from paths\n // that reached this accepting state.\n // * `handlers`: Information on how to convert the list of captures into calls\n // to registered handlers with the specified parameters\n // * `types`: How many static, dynamic or star segments in this route. Used to\n // decide which route to use if multiple registered routes match a path.\n //\n // Currently, State is implemented naively by looping over `nextStates` and\n // comparing a character specification against a character. A more efficient\n // implementation would use a hash of keys pointing at one or more next states.\n\n function State(charSpec) {\n this.charSpec = charSpec;\n this.nextStates = [];\n }\n\n State.prototype = {\n get: function (charSpec) {\n var nextStates = this.nextStates;\n\n for (var i = 0, l = nextStates.length; i < l; i++) {\n var child = nextStates[i];\n\n var isEqual = child.charSpec.validChars === charSpec.validChars;\n isEqual = isEqual && child.charSpec.invalidChars === charSpec.invalidChars;\n\n if (isEqual) {\n return child;\n }\n }\n },\n\n put: function (charSpec) {\n var state;\n\n // If the character specification already exists in a child of the current\n // state, just return that state.\n if (state = this.get(charSpec)) {\n return state;\n }\n\n // Make a new state for the character spec\n state = new State(charSpec);\n\n // Insert the new state as a child of the current state\n this.nextStates.push(state);\n\n // If this character specification repeats, insert the new state as a child\n // of itself. Note that this will not trigger an infinite loop because each\n // transition during recognition consumes a character.\n if (charSpec.repeat) {\n state.nextStates.push(state);\n }\n\n // Return the new state\n return state;\n },\n\n // Find a list of child states matching the next character\n match: function (ch) {\n // DEBUG \"Processing `\" + ch + \"`:\"\n var nextStates = this.nextStates,\n child,\n charSpec,\n chars;\n\n // DEBUG \" \" + debugState(this)\n var returned = [];\n\n for (var i = 0, l = nextStates.length; i < l; i++) {\n child = nextStates[i];\n\n charSpec = child.charSpec;\n\n if (typeof (chars = charSpec.validChars) !== 'undefined') {\n if (chars.indexOf(ch) !== -1) {\n returned.push(child);\n }\n } else if (typeof (chars = charSpec.invalidChars) !== 'undefined') {\n if (chars.indexOf(ch) === -1) {\n returned.push(child);\n }\n }\n }\n\n return returned;\n }\n\n /** IF DEBUG\n , debug: function() {\n var charSpec = this.charSpec,\n debug = \"[\",\n chars = charSpec.validChars || charSpec.invalidChars;\n if (charSpec.invalidChars) { debug += \"^\"; }\n debug += chars;\n debug += \"]\";\n if (charSpec.repeat) { debug += \"+\"; }\n return debug;\n }\n END IF **/\n };\n\n /** IF DEBUG\n function debug(log) {\n console.log(log);\n }\n \n function debugState(state) {\n return state.nextStates.map(function(n) {\n if (n.nextStates.length === 0) { return \"( \" + n.debug() + \" [accepting] )\"; }\n return \"( \" + n.debug() + \" \" + n.nextStates.map(function(s) { return s.debug() }).join(\" or \") + \" )\";\n }).join(\", \")\n }\n END IF **/\n\n // This is a somewhat naive strategy, but should work in a lot of cases\n // A better strategy would properly resolve /posts/:id/new and /posts/edit/:id.\n //\n // This strategy generally prefers more static and less dynamic matching.\n // Specifically, it\n //\n // * prefers fewer stars to more, then\n // * prefers using stars for less of the match to more, then\n // * prefers fewer dynamic segments to more, then\n // * prefers more static segments to more\n function sortSolutions(states) {\n return states.sort(function (a, b) {\n if (a.types.stars !== b.types.stars) {\n return a.types.stars - b.types.stars;\n }\n\n if (a.types.stars) {\n if (a.types.statics !== b.types.statics) {\n return b.types.statics - a.types.statics;\n }\n if (a.types.dynamics !== b.types.dynamics) {\n return b.types.dynamics - a.types.dynamics;\n }\n }\n\n if (a.types.dynamics !== b.types.dynamics) {\n return a.types.dynamics - b.types.dynamics;\n }\n if (a.types.statics !== b.types.statics) {\n return b.types.statics - a.types.statics;\n }\n\n return 0;\n });\n }\n\n function recognizeChar(states, ch) {\n var nextStates = [];\n\n for (var i = 0, l = states.length; i < l; i++) {\n var state = states[i];\n\n nextStates = nextStates.concat(state.match(ch));\n }\n\n return nextStates;\n }\n\n var oCreate = Object.create || function (proto) {\n function F() {}\n F.prototype = proto;\n return new F();\n };\n\n function RecognizeResults(queryParams) {\n this.queryParams = queryParams || {};\n }\n RecognizeResults.prototype = oCreate({\n splice: Array.prototype.splice,\n slice: Array.prototype.slice,\n push: Array.prototype.push,\n length: 0,\n queryParams: null\n });\n\n function findHandler(state, path, queryParams) {\n var handlers = state.handlers,\n regex = state.regex;\n var captures = path.match(regex),\n currentCapture = 1;\n var result = new RecognizeResults(queryParams);\n\n for (var i = 0, l = handlers.length; i < l; i++) {\n var handler = handlers[i],\n names = handler.names,\n params = {};\n\n for (var j = 0, m = names.length; j < m; j++) {\n params[names[j]] = captures[currentCapture++];\n }\n\n result.push({ handler: handler.handler, params: params, isDynamic: !!names.length });\n }\n\n return result;\n }\n\n function addSegment(currentState, segment) {\n segment.eachChar(function (ch) {\n var state;\n\n currentState = currentState.put(ch);\n });\n\n return currentState;\n }\n\n function decodeQueryParamPart(part) {\n // http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.1\n part = part.replace(/\\+/gm, '%20');\n return decodeURIComponent(part);\n }\n\n // The main interface\n\n var RouteRecognizer = function () {\n this.rootState = new State();\n this.names = {};\n };\n\n RouteRecognizer.prototype = {\n add: function (routes, options) {\n var currentState = this.rootState,\n regex = \"^\",\n types = { statics: 0, dynamics: 0, stars: 0 },\n handlers = [],\n allSegments = [],\n name;\n\n var isEmpty = true;\n\n for (var i = 0, l = routes.length; i < l; i++) {\n var route = routes[i],\n names = [];\n\n var segments = parse(route.path, names, types);\n\n allSegments = allSegments.concat(segments);\n\n for (var j = 0, m = segments.length; j < m; j++) {\n var segment = segments[j];\n\n if (segment instanceof EpsilonSegment) {\n continue;\n }\n\n isEmpty = false;\n\n // Add a \"/\" for the new segment\n currentState = currentState.put({ validChars: \"/\" });\n regex += \"/\";\n\n // Add a representation of the segment to the NFA and regex\n currentState = addSegment(currentState, segment);\n regex += segment.regex();\n }\n\n var handler = { handler: route.handler, names: names };\n handlers.push(handler);\n }\n\n if (isEmpty) {\n currentState = currentState.put({ validChars: \"/\" });\n regex += \"/\";\n }\n\n currentState.handlers = handlers;\n currentState.regex = new RegExp(regex + \"$\");\n currentState.types = types;\n\n if (name = options && options.as) {\n this.names[name] = {\n segments: allSegments,\n handlers: handlers\n };\n }\n },\n\n handlersFor: function (name) {\n var route = this.names[name],\n result = [];\n if (!route) {\n throw new Error(\"There is no route named \" + name);\n }\n\n for (var i = 0, l = route.handlers.length; i < l; i++) {\n result.push(route.handlers[i]);\n }\n\n return result;\n },\n\n hasRoute: function (name) {\n return !!this.names[name];\n },\n\n generate: function (name, params) {\n var route = this.names[name],\n output = \"\";\n if (!route) {\n throw new Error(\"There is no route named \" + name);\n }\n\n var segments = route.segments;\n\n for (var i = 0, l = segments.length; i < l; i++) {\n var segment = segments[i];\n\n if (segment instanceof EpsilonSegment) {\n continue;\n }\n\n output += \"/\";\n output += segment.generate(params);\n }\n\n if (output.charAt(0) !== '/') {\n output = '/' + output;\n }\n\n if (params && params.queryParams) {\n output += this.generateQueryString(params.queryParams, route.handlers);\n }\n\n return output;\n },\n\n generateQueryString: function (params, handlers) {\n var pairs = [];\n var keys = [];\n for (var key in params) {\n if (params.hasOwnProperty(key)) {\n keys.push(key);\n }\n }\n keys.sort();\n for (var i = 0, len = keys.length; i < len; i++) {\n key = keys[i];\n var value = params[key];\n if (value == null) {\n continue;\n }\n var pair = encodeURIComponent(key);\n if (isArray(value)) {\n for (var j = 0, l = value.length; j < l; j++) {\n var arrayPair = key + '[]' + '=' + encodeURIComponent(value[j]);\n pairs.push(arrayPair);\n }\n } else {\n pair += \"=\" + encodeURIComponent(value);\n pairs.push(pair);\n }\n }\n\n if (pairs.length === 0) {\n return '';\n }\n\n return \"?\" + pairs.join(\"&\");\n },\n\n parseQueryString: function (queryString) {\n var pairs = queryString.split(\"&\"),\n queryParams = {};\n for (var i = 0; i < pairs.length; i++) {\n var pair = pairs[i].split('='),\n key = decodeQueryParamPart(pair[0]),\n keyLength = key.length,\n isArray = false,\n value;\n if (pair.length === 1) {\n value = 'true';\n } else {\n //Handle arrays\n if (keyLength > 2 && key.slice(keyLength - 2) === '[]') {\n isArray = true;\n key = key.slice(0, keyLength - 2);\n if (!queryParams[key]) {\n queryParams[key] = [];\n }\n }\n value = pair[1] ? decodeQueryParamPart(pair[1]) : '';\n }\n if (isArray) {\n queryParams[key].push(value);\n } else {\n queryParams[key] = value;\n }\n }\n return queryParams;\n },\n\n recognize: function (path) {\n var states = [this.rootState],\n pathLen,\n i,\n l,\n queryStart,\n queryParams = {},\n isSlashDropped = false;\n\n queryStart = path.indexOf('?');\n if (queryStart !== -1) {\n var queryString = path.substr(queryStart + 1, path.length);\n path = path.substr(0, queryStart);\n queryParams = this.parseQueryString(queryString);\n }\n\n path = decodeURI(path);\n\n // DEBUG GROUP path\n\n if (path.charAt(0) !== \"/\") {\n path = \"/\" + path;\n }\n\n pathLen = path.length;\n if (pathLen > 1 && path.charAt(pathLen - 1) === \"/\") {\n path = path.substr(0, pathLen - 1);\n isSlashDropped = true;\n }\n\n for (i = 0, l = path.length; i < l; i++) {\n states = recognizeChar(states, path.charAt(i));\n if (!states.length) {\n break;\n }\n }\n\n // END DEBUG GROUP\n\n var solutions = [];\n for (i = 0, l = states.length; i < l; i++) {\n if (states[i].handlers) {\n solutions.push(states[i]);\n }\n }\n\n states = sortSolutions(solutions);\n\n var state = solutions[0];\n\n if (state && state.handlers) {\n // if a trailing slash was dropped and a star segment is the last segment\n // specified, put the trailing slash back\n if (isSlashDropped && state.regex.source.slice(-5) === \"(.+)$\") {\n path = path + \"/\";\n }\n return findHandler(state, path, queryParams);\n }\n }\n };\n\n RouteRecognizer.prototype.map = _routeRecognizerDsl.default;\n\n RouteRecognizer.VERSION = '0.1.5';\n\n exports.default = RouteRecognizer;\n});\nenifed('router/handler-info/factory', ['exports', 'router/handler-info/resolved-handler-info', 'router/handler-info/unresolved-handler-info-by-object', 'router/handler-info/unresolved-handler-info-by-param'], function (exports, _routerHandlerInfoResolvedHandlerInfo, _routerHandlerInfoUnresolvedHandlerInfoByObject, _routerHandlerInfoUnresolvedHandlerInfoByParam) {\n 'use strict';\n\n handlerInfoFactory.klasses = {\n resolved: _routerHandlerInfoResolvedHandlerInfo.default,\n param: _routerHandlerInfoUnresolvedHandlerInfoByParam.default,\n object: _routerHandlerInfoUnresolvedHandlerInfoByObject.default\n };\n\n function handlerInfoFactory(name, props) {\n var Ctor = handlerInfoFactory.klasses[name],\n handlerInfo = new Ctor(props || {});\n handlerInfo.factory = handlerInfoFactory;\n return handlerInfo;\n }\n\n exports.default = handlerInfoFactory;\n});\nenifed('router/handler-info/resolved-handler-info', ['exports', 'router/handler-info', 'router/utils', 'rsvp/promise'], function (exports, _routerHandlerInfo, _routerUtils, _rsvpPromise) {\n 'use strict';\n\n var ResolvedHandlerInfo = _routerUtils.subclass(_routerHandlerInfo.default, {\n resolve: function (shouldContinue, payload) {\n // A ResolvedHandlerInfo just resolved with itself.\n if (payload && payload.resolvedModels) {\n payload.resolvedModels[this.name] = this.context;\n }\n return _rsvpPromise.default.resolve(this, this.promiseLabel(\"Resolve\"));\n },\n\n getUnresolved: function () {\n return this.factory('param', {\n name: this.name,\n handler: this.handler,\n params: this.params\n });\n },\n\n isResolved: true\n });\n\n exports.default = ResolvedHandlerInfo;\n});\nenifed('router/handler-info/unresolved-handler-info-by-object', ['exports', 'router/handler-info', 'router/utils', 'rsvp/promise'], function (exports, _routerHandlerInfo, _routerUtils, _rsvpPromise) {\n 'use strict';\n\n var UnresolvedHandlerInfoByObject = _routerUtils.subclass(_routerHandlerInfo.default, {\n getModel: function (payload) {\n this.log(payload, this.name + \": resolving provided model\");\n return _rsvpPromise.default.resolve(this.context);\n },\n\n initialize: function (props) {\n this.names = props.names || [];\n this.context = props.context;\n },\n\n /**\n @private\n Serializes a handler using its custom `serialize` method or\n by a default that looks up the expected property name from\n the dynamic segment.\n @param {Object} model the model to be serialized for this handler\n */\n serialize: function (_model) {\n var model = _model || this.context,\n names = this.names,\n handler = this.handler;\n\n var object = {};\n if (_routerUtils.isParam(model)) {\n object[names[0]] = model;\n return object;\n }\n\n // Use custom serialize if it exists.\n if (handler.serialize) {\n return handler.serialize(model, names);\n }\n\n if (names.length !== 1) {\n return;\n }\n\n var name = names[0];\n\n if (/_id$/.test(name)) {\n object[name] = model.id;\n } else {\n object[name] = model;\n }\n return object;\n }\n });\n\n exports.default = UnresolvedHandlerInfoByObject;\n});\nenifed('router/handler-info/unresolved-handler-info-by-param', ['exports', 'router/handler-info', 'router/utils'], function (exports, _routerHandlerInfo, _routerUtils) {\n 'use strict';\n\n // Generated by URL transitions and non-dynamic route segments in named Transitions.\n var UnresolvedHandlerInfoByParam = _routerUtils.subclass(_routerHandlerInfo.default, {\n initialize: function (props) {\n this.params = props.params || {};\n },\n\n getModel: function (payload) {\n var fullParams = this.params;\n if (payload && payload.queryParams) {\n fullParams = {};\n _routerUtils.merge(fullParams, this.params);\n fullParams.queryParams = payload.queryParams;\n }\n\n var handler = this.handler;\n var hookName = _routerUtils.resolveHook(handler, 'deserialize') || _routerUtils.resolveHook(handler, 'model');\n\n return this.runSharedModelHook(payload, hookName, [fullParams]);\n }\n });\n\n exports.default = UnresolvedHandlerInfoByParam;\n});\nenifed('router/handler-info', ['exports', 'router/utils', 'rsvp/promise'], function (exports, _routerUtils, _rsvpPromise) {\n 'use strict';\n\n function HandlerInfo(_props) {\n var props = _props || {};\n _routerUtils.merge(this, props);\n this.initialize(props);\n }\n\n HandlerInfo.prototype = {\n name: null,\n handler: null,\n params: null,\n context: null,\n\n // Injected by the handler info factory.\n factory: null,\n\n initialize: function () {},\n\n log: function (payload, message) {\n if (payload.log) {\n payload.log(this.name + ': ' + message);\n }\n },\n\n promiseLabel: function (label) {\n return _routerUtils.promiseLabel(\"'\" + this.name + \"' \" + label);\n },\n\n getUnresolved: function () {\n return this;\n },\n\n serialize: function () {\n return this.params || {};\n },\n\n resolve: function (shouldContinue, payload) {\n var checkForAbort = _routerUtils.bind(this, this.checkForAbort, shouldContinue),\n beforeModel = _routerUtils.bind(this, this.runBeforeModelHook, payload),\n model = _routerUtils.bind(this, this.getModel, payload),\n afterModel = _routerUtils.bind(this, this.runAfterModelHook, payload),\n becomeResolved = _routerUtils.bind(this, this.becomeResolved, payload);\n\n return _rsvpPromise.default.resolve(undefined, this.promiseLabel(\"Start handler\")).then(checkForAbort, null, this.promiseLabel(\"Check for abort\")).then(beforeModel, null, this.promiseLabel(\"Before model\")).then(checkForAbort, null, this.promiseLabel(\"Check if aborted during 'beforeModel' hook\")).then(model, null, this.promiseLabel(\"Model\")).then(checkForAbort, null, this.promiseLabel(\"Check if aborted in 'model' hook\")).then(afterModel, null, this.promiseLabel(\"After model\")).then(checkForAbort, null, this.promiseLabel(\"Check if aborted in 'afterModel' hook\")).then(becomeResolved, null, this.promiseLabel(\"Become resolved\"));\n },\n\n runBeforeModelHook: function (payload) {\n if (payload.trigger) {\n payload.trigger(true, 'willResolveModel', payload, this.handler);\n }\n return this.runSharedModelHook(payload, 'beforeModel', []);\n },\n\n runAfterModelHook: function (payload, resolvedModel) {\n // Stash the resolved model on the payload.\n // This makes it possible for users to swap out\n // the resolved model in afterModel.\n var name = this.name;\n this.stashResolvedModel(payload, resolvedModel);\n\n return this.runSharedModelHook(payload, 'afterModel', [resolvedModel]).then(function () {\n // Ignore the fulfilled value returned from afterModel.\n // Return the value stashed in resolvedModels, which\n // might have been swapped out in afterModel.\n return payload.resolvedModels[name];\n }, null, this.promiseLabel(\"Ignore fulfillment value and return model value\"));\n },\n\n runSharedModelHook: function (payload, hookName, args) {\n this.log(payload, \"calling \" + hookName + \" hook\");\n\n if (this.queryParams) {\n args.push(this.queryParams);\n }\n args.push(payload);\n\n var result = _routerUtils.applyHook(this.handler, hookName, args);\n\n if (result && result.isTransition) {\n result = null;\n }\n\n return _rsvpPromise.default.resolve(result, this.promiseLabel(\"Resolve value returned from one of the model hooks\"));\n },\n\n // overridden by subclasses\n getModel: null,\n\n checkForAbort: function (shouldContinue, promiseValue) {\n return _rsvpPromise.default.resolve(shouldContinue(), this.promiseLabel(\"Check for abort\")).then(function () {\n // We don't care about shouldContinue's resolve value;\n // pass along the original value passed to this fn.\n return promiseValue;\n }, null, this.promiseLabel(\"Ignore fulfillment value and continue\"));\n },\n\n stashResolvedModel: function (payload, resolvedModel) {\n payload.resolvedModels = payload.resolvedModels || {};\n payload.resolvedModels[this.name] = resolvedModel;\n },\n\n becomeResolved: function (payload, resolvedContext) {\n var params = this.serialize(resolvedContext);\n\n if (payload) {\n this.stashResolvedModel(payload, resolvedContext);\n payload.params = payload.params || {};\n payload.params[this.name] = params;\n }\n\n return this.factory('resolved', {\n context: resolvedContext,\n name: this.name,\n handler: this.handler,\n params: params\n });\n },\n\n shouldSupercede: function (other) {\n // Prefer this newer handlerInfo over `other` if:\n // 1) The other one doesn't exist\n // 2) The names don't match\n // 3) This handler has a context that doesn't match\n // the other one (or the other one doesn't have one).\n // 4) This handler has parameters that don't match the other.\n if (!other) {\n return true;\n }\n\n var contextsMatch = other.context === this.context;\n return other.name !== this.name || this.hasOwnProperty('context') && !contextsMatch || this.hasOwnProperty('params') && !paramsMatch(this.params, other.params);\n }\n };\n\n function paramsMatch(a, b) {\n if (!a ^ !b) {\n // Only one is null.\n return false;\n }\n\n if (!a) {\n // Both must be null.\n return true;\n }\n\n // Note: this assumes that both params have the same\n // number of keys, but since we're comparing the\n // same handlers, they should.\n for (var k in a) {\n if (a.hasOwnProperty(k) && a[k] !== b[k]) {\n return false;\n }\n }\n return true;\n }\n\n exports.default = HandlerInfo;\n});\nenifed('router/router', ['exports', 'route-recognizer', 'rsvp/promise', 'router/utils', 'router/transition-state', 'router/transition', 'router/transition-intent/named-transition-intent', 'router/transition-intent/url-transition-intent', 'router/handler-info'], function (exports, _routeRecognizer, _rsvpPromise, _routerUtils, _routerTransitionState, _routerTransition, _routerTransitionIntentNamedTransitionIntent, _routerTransitionIntentUrlTransitionIntent, _routerHandlerInfo) {\n 'use strict';\n\n var pop = Array.prototype.pop;\n\n function Router(_options) {\n var options = _options || {};\n this.getHandler = options.getHandler || this.getHandler;\n this.updateURL = options.updateURL || this.updateURL;\n this.replaceURL = options.replaceURL || this.replaceURL;\n this.didTransition = options.didTransition || this.didTransition;\n this.willTransition = options.willTransition || this.willTransition;\n this.delegate = options.delegate || this.delegate;\n this.triggerEvent = options.triggerEvent || this.triggerEvent;\n this.log = options.log || this.log;\n\n this.recognizer = new _routeRecognizer.default();\n this.reset();\n }\n\n function getTransitionByIntent(intent, isIntermediate) {\n var wasTransitioning = !!this.activeTransition;\n var oldState = wasTransitioning ? this.activeTransition.state : this.state;\n var newTransition;\n\n var newState = intent.applyToState(oldState, this.recognizer, this.getHandler, isIntermediate);\n var queryParamChangelist = _routerUtils.getChangelist(oldState.queryParams, newState.queryParams);\n\n if (handlerInfosEqual(newState.handlerInfos, oldState.handlerInfos)) {\n\n // This is a no-op transition. See if query params changed.\n if (queryParamChangelist) {\n newTransition = this.queryParamsTransition(queryParamChangelist, wasTransitioning, oldState, newState);\n if (newTransition) {\n return newTransition;\n }\n }\n\n // No-op. No need to create a new transition.\n return this.activeTransition || new _routerTransition.Transition(this);\n }\n\n if (isIntermediate) {\n setupContexts(this, newState);\n return;\n }\n\n // Create a new transition to the destination route.\n newTransition = new _routerTransition.Transition(this, intent, newState);\n\n // Abort and usurp any previously active transition.\n if (this.activeTransition) {\n this.activeTransition.abort();\n }\n this.activeTransition = newTransition;\n\n // Transition promises by default resolve with resolved state.\n // For our purposes, swap out the promise to resolve\n // after the transition has been finalized.\n newTransition.promise = newTransition.promise.then(function (result) {\n return finalizeTransition(newTransition, result.state);\n }, null, _routerUtils.promiseLabel(\"Settle transition promise when transition is finalized\"));\n\n if (!wasTransitioning) {\n notifyExistingHandlers(this, newState, newTransition);\n }\n\n fireQueryParamDidChange(this, newState, queryParamChangelist);\n\n return newTransition;\n }\n\n Router.prototype = {\n\n /**\n The main entry point into the router. The API is essentially\n the same as the `map` method in `route-recognizer`.\n This method extracts the String handler at the last `.to()`\n call and uses it as the name of the whole route.\n @param {Function} callback\n */\n map: function (callback) {\n this.recognizer.delegate = this.delegate;\n\n this.recognizer.map(callback, function (recognizer, routes) {\n for (var i = routes.length - 1, proceed = true; i >= 0 && proceed; --i) {\n var route = routes[i];\n recognizer.add(routes, { as: route.handler });\n proceed = route.path === '/' || route.path === '' || route.handler.slice(-6) === '.index';\n }\n });\n },\n\n hasRoute: function (route) {\n return this.recognizer.hasRoute(route);\n },\n\n getHandler: function () {},\n\n queryParamsTransition: function (changelist, wasTransitioning, oldState, newState) {\n var router = this;\n\n fireQueryParamDidChange(this, newState, changelist);\n\n if (!wasTransitioning && this.activeTransition) {\n // One of the handlers in queryParamsDidChange\n // caused a transition. Just return that transition.\n return this.activeTransition;\n } else {\n // Running queryParamsDidChange didn't change anything.\n // Just update query params and be on our way.\n\n // We have to return a noop transition that will\n // perform a URL update at the end. This gives\n // the user the ability to set the url update\n // method (default is replaceState).\n var newTransition = new _routerTransition.Transition(this);\n newTransition.queryParamsOnly = true;\n\n oldState.queryParams = finalizeQueryParamChange(this, newState.handlerInfos, newState.queryParams, newTransition);\n\n newTransition.promise = newTransition.promise.then(function (result) {\n updateURL(newTransition, oldState, true);\n if (router.didTransition) {\n router.didTransition(router.currentHandlerInfos);\n }\n return result;\n }, null, _routerUtils.promiseLabel(\"Transition complete\"));\n return newTransition;\n }\n },\n\n // NOTE: this doesn't really belong here, but here\n // it shall remain until our ES6 transpiler can\n // handle cyclical deps.\n transitionByIntent: function (intent, isIntermediate) {\n try {\n return getTransitionByIntent.apply(this, arguments);\n } catch (e) {\n return new _routerTransition.Transition(this, intent, null, e);\n }\n },\n\n /**\n Clears the current and target route handlers and triggers exit\n on each of them starting at the leaf and traversing up through\n its ancestors.\n */\n reset: function () {\n if (this.state) {\n _routerUtils.forEach(this.state.handlerInfos.slice().reverse(), function (handlerInfo) {\n var handler = handlerInfo.handler;\n _routerUtils.callHook(handler, 'exit');\n });\n }\n\n this.state = new _routerTransitionState.default();\n this.currentHandlerInfos = null;\n },\n\n activeTransition: null,\n\n /**\n var handler = handlerInfo.handler;\n The entry point for handling a change to the URL (usually\n via the back and forward button).\n Returns an Array of handlers and the parameters associated\n with those parameters.\n @param {String} url a URL to process\n @return {Array} an Array of `[handler, parameter]` tuples\n */\n handleURL: function (url) {\n // Perform a URL-based transition, but don't change\n // the URL afterward, since it already happened.\n var args = _routerUtils.slice.call(arguments);\n if (url.charAt(0) !== '/') {\n args[0] = '/' + url;\n }\n\n return doTransition(this, args).method(null);\n },\n\n /**\n Hook point for updating the URL.\n @param {String} url a URL to update to\n */\n updateURL: function () {\n throw new Error(\"updateURL is not implemented\");\n },\n\n /**\n Hook point for replacing the current URL, i.e. with replaceState\n By default this behaves the same as `updateURL`\n @param {String} url a URL to update to\n */\n replaceURL: function (url) {\n this.updateURL(url);\n },\n\n /**\n Transition into the specified named route.\n If necessary, trigger the exit callback on any handlers\n that are no longer represented by the target route.\n @param {String} name the name of the route\n */\n transitionTo: function (name) {\n return doTransition(this, arguments);\n },\n\n intermediateTransitionTo: function (name) {\n return doTransition(this, arguments, true);\n },\n\n refresh: function (pivotHandler) {\n var state = this.activeTransition ? this.activeTransition.state : this.state;\n var handlerInfos = state.handlerInfos;\n var params = {};\n for (var i = 0, len = handlerInfos.length; i < len; ++i) {\n var handlerInfo = handlerInfos[i];\n params[handlerInfo.name] = handlerInfo.params || {};\n }\n\n _routerUtils.log(this, \"Starting a refresh transition\");\n var intent = new _routerTransitionIntentNamedTransitionIntent.default({\n name: handlerInfos[handlerInfos.length - 1].name,\n pivotHandler: pivotHandler || handlerInfos[0].handler,\n contexts: [], // TODO collect contexts...?\n queryParams: this._changedQueryParams || state.queryParams || {}\n });\n\n return this.transitionByIntent(intent, false);\n },\n\n /**\n Identical to `transitionTo` except that the current URL will be replaced\n if possible.\n This method is intended primarily for use with `replaceState`.\n @param {String} name the name of the route\n */\n replaceWith: function (name) {\n return doTransition(this, arguments).method('replace');\n },\n\n /**\n Take a named route and context objects and generate a\n URL.\n @param {String} name the name of the route to generate\n a URL for\n @param {...Object} objects a list of objects to serialize\n @return {String} a URL\n */\n generate: function (handlerName) {\n\n var partitionedArgs = _routerUtils.extractQueryParams(_routerUtils.slice.call(arguments, 1)),\n suppliedParams = partitionedArgs[0],\n queryParams = partitionedArgs[1];\n\n // Construct a TransitionIntent with the provided params\n // and apply it to the present state of the router.\n var intent = new _routerTransitionIntentNamedTransitionIntent.default({ name: handlerName, contexts: suppliedParams });\n var state = intent.applyToState(this.state, this.recognizer, this.getHandler);\n var params = {};\n\n for (var i = 0, len = state.handlerInfos.length; i < len; ++i) {\n var handlerInfo = state.handlerInfos[i];\n var handlerParams = handlerInfo.serialize();\n _routerUtils.merge(params, handlerParams);\n }\n params.queryParams = queryParams;\n\n return this.recognizer.generate(handlerName, params);\n },\n\n applyIntent: function (handlerName, contexts) {\n var intent = new _routerTransitionIntentNamedTransitionIntent.default({\n name: handlerName,\n contexts: contexts\n });\n\n var state = this.activeTransition && this.activeTransition.state || this.state;\n return intent.applyToState(state, this.recognizer, this.getHandler);\n },\n\n isActiveIntent: function (handlerName, contexts, queryParams, _state) {\n var state = _state || this.state,\n targetHandlerInfos = state.handlerInfos,\n found = false,\n names,\n object,\n handlerInfo,\n handlerObj,\n i,\n len;\n\n if (!targetHandlerInfos.length) {\n return false;\n }\n\n var targetHandler = targetHandlerInfos[targetHandlerInfos.length - 1].name;\n var recogHandlers = this.recognizer.handlersFor(targetHandler);\n\n var index = 0;\n for (len = recogHandlers.length; index < len; ++index) {\n handlerInfo = targetHandlerInfos[index];\n if (handlerInfo.name === handlerName) {\n break;\n }\n }\n\n if (index === recogHandlers.length) {\n // The provided route name isn't even in the route hierarchy.\n return false;\n }\n\n var testState = new _routerTransitionState.default();\n testState.handlerInfos = targetHandlerInfos.slice(0, index + 1);\n recogHandlers = recogHandlers.slice(0, index + 1);\n\n var intent = new _routerTransitionIntentNamedTransitionIntent.default({\n name: targetHandler,\n contexts: contexts\n });\n\n var newState = intent.applyToHandlers(testState, recogHandlers, this.getHandler, targetHandler, true, true);\n\n var handlersEqual = handlerInfosEqual(newState.handlerInfos, testState.handlerInfos);\n if (!queryParams || !handlersEqual) {\n return handlersEqual;\n }\n\n // Get a hash of QPs that will still be active on new route\n var activeQPsOnNewHandler = {};\n _routerUtils.merge(activeQPsOnNewHandler, queryParams);\n\n var activeQueryParams = state.queryParams;\n for (var key in activeQueryParams) {\n if (activeQueryParams.hasOwnProperty(key) && activeQPsOnNewHandler.hasOwnProperty(key)) {\n activeQPsOnNewHandler[key] = activeQueryParams[key];\n }\n }\n\n return handlersEqual && !_routerUtils.getChangelist(activeQPsOnNewHandler, queryParams);\n },\n\n isActive: function (handlerName) {\n var partitionedArgs = _routerUtils.extractQueryParams(_routerUtils.slice.call(arguments, 1));\n return this.isActiveIntent(handlerName, partitionedArgs[0], partitionedArgs[1]);\n },\n\n trigger: function (name) {\n var args = _routerUtils.slice.call(arguments);\n _routerUtils.trigger(this, this.currentHandlerInfos, false, args);\n },\n\n /**\n Hook point for logging transition status updates.\n @param {String} message The message to log.\n */\n log: null\n };\n\n /**\n @private\n \n Fires queryParamsDidChange event\n */\n function fireQueryParamDidChange(router, newState, queryParamChangelist) {\n // If queryParams changed trigger event\n if (queryParamChangelist) {\n\n // This is a little hacky but we need some way of storing\n // changed query params given that no activeTransition\n // is guaranteed to have occurred.\n router._changedQueryParams = queryParamChangelist.all;\n _routerUtils.trigger(router, newState.handlerInfos, true, ['queryParamsDidChange', queryParamChangelist.changed, queryParamChangelist.all, queryParamChangelist.removed]);\n router._changedQueryParams = null;\n }\n }\n\n /**\n @private\n \n Takes an Array of `HandlerInfo`s, figures out which ones are\n exiting, entering, or changing contexts, and calls the\n proper handler hooks.\n \n For example, consider the following tree of handlers. Each handler is\n followed by the URL segment it handles.\n \n ```\n |~index (\"/\")\n | |~posts (\"/posts\")\n | | |-showPost (\"/:id\")\n | | |-newPost (\"/new\")\n | | |-editPost (\"/edit\")\n | |~about (\"/about/:id\")\n ```\n \n Consider the following transitions:\n \n 1. A URL transition to `/posts/1`.\n 1. Triggers the `*model` callbacks on the\n `index`, `posts`, and `showPost` handlers\n 2. Triggers the `enter` callback on the same\n 3. Triggers the `setup` callback on the same\n 2. A direct transition to `newPost`\n 1. Triggers the `exit` callback on `showPost`\n 2. Triggers the `enter` callback on `newPost`\n 3. Triggers the `setup` callback on `newPost`\n 3. A direct transition to `about` with a specified\n context object\n 1. Triggers the `exit` callback on `newPost`\n and `posts`\n 2. Triggers the `serialize` callback on `about`\n 3. Triggers the `enter` callback on `about`\n 4. Triggers the `setup` callback on `about`\n \n @param {Router} transition\n @param {TransitionState} newState\n */\n function setupContexts(router, newState, transition) {\n var partition = partitionHandlers(router.state, newState);\n var i, l, handler;\n\n for (i = 0, l = partition.exited.length; i < l; i++) {\n handler = partition.exited[i].handler;\n delete handler.context;\n\n _routerUtils.callHook(handler, 'reset', true, transition);\n _routerUtils.callHook(handler, 'exit', transition);\n }\n\n var oldState = router.oldState = router.state;\n router.state = newState;\n var currentHandlerInfos = router.currentHandlerInfos = partition.unchanged.slice();\n\n try {\n for (i = 0, l = partition.reset.length; i < l; i++) {\n handler = partition.reset[i].handler;\n _routerUtils.callHook(handler, 'reset', false, transition);\n }\n\n for (i = 0, l = partition.updatedContext.length; i < l; i++) {\n handlerEnteredOrUpdated(currentHandlerInfos, partition.updatedContext[i], false, transition);\n }\n\n for (i = 0, l = partition.entered.length; i < l; i++) {\n handlerEnteredOrUpdated(currentHandlerInfos, partition.entered[i], true, transition);\n }\n } catch (e) {\n router.state = oldState;\n router.currentHandlerInfos = oldState.handlerInfos;\n throw e;\n }\n\n router.state.queryParams = finalizeQueryParamChange(router, currentHandlerInfos, newState.queryParams, transition);\n }\n\n /**\n @private\n \n Helper method used by setupContexts. Handles errors or redirects\n that may happen in enter/setup.\n */\n function handlerEnteredOrUpdated(currentHandlerInfos, handlerInfo, enter, transition) {\n\n var handler = handlerInfo.handler,\n context = handlerInfo.context;\n\n if (enter) {\n _routerUtils.callHook(handler, 'enter', transition);\n }\n if (transition && transition.isAborted) {\n throw new _routerTransition.TransitionAborted();\n }\n\n handler.context = context;\n _routerUtils.callHook(handler, 'contextDidChange');\n\n _routerUtils.callHook(handler, 'setup', context, transition);\n if (transition && transition.isAborted) {\n throw new _routerTransition.TransitionAborted();\n }\n\n currentHandlerInfos.push(handlerInfo);\n\n return true;\n }\n\n /**\n @private\n \n This function is called when transitioning from one URL to\n another to determine which handlers are no longer active,\n which handlers are newly active, and which handlers remain\n active but have their context changed.\n \n Take a list of old handlers and new handlers and partition\n them into four buckets:\n \n * unchanged: the handler was active in both the old and\n new URL, and its context remains the same\n * updated context: the handler was active in both the\n old and new URL, but its context changed. The handler's\n `setup` method, if any, will be called with the new\n context.\n * exited: the handler was active in the old URL, but is\n no longer active.\n * entered: the handler was not active in the old URL, but\n is now active.\n \n The PartitionedHandlers structure has four fields:\n \n * `updatedContext`: a list of `HandlerInfo` objects that\n represent handlers that remain active but have a changed\n context\n * `entered`: a list of `HandlerInfo` objects that represent\n handlers that are newly active\n * `exited`: a list of `HandlerInfo` objects that are no\n longer active.\n * `unchanged`: a list of `HanderInfo` objects that remain active.\n \n @param {Array[HandlerInfo]} oldHandlers a list of the handler\n information for the previous URL (or `[]` if this is the\n first handled transition)\n @param {Array[HandlerInfo]} newHandlers a list of the handler\n information for the new URL\n \n @return {Partition}\n */\n function partitionHandlers(oldState, newState) {\n var oldHandlers = oldState.handlerInfos;\n var newHandlers = newState.handlerInfos;\n\n var handlers = {\n updatedContext: [],\n exited: [],\n entered: [],\n unchanged: []\n };\n\n var handlerChanged,\n contextChanged = false,\n i,\n l;\n\n for (i = 0, l = newHandlers.length; i < l; i++) {\n var oldHandler = oldHandlers[i],\n newHandler = newHandlers[i];\n\n if (!oldHandler || oldHandler.handler !== newHandler.handler) {\n handlerChanged = true;\n }\n\n if (handlerChanged) {\n handlers.entered.push(newHandler);\n if (oldHandler) {\n handlers.exited.unshift(oldHandler);\n }\n } else if (contextChanged || oldHandler.context !== newHandler.context) {\n contextChanged = true;\n handlers.updatedContext.push(newHandler);\n } else {\n handlers.unchanged.push(oldHandler);\n }\n }\n\n for (i = newHandlers.length, l = oldHandlers.length; i < l; i++) {\n handlers.exited.unshift(oldHandlers[i]);\n }\n\n handlers.reset = handlers.updatedContext.slice();\n handlers.reset.reverse();\n\n return handlers;\n }\n\n function updateURL(transition, state, inputUrl) {\n var urlMethod = transition.urlMethod;\n\n if (!urlMethod) {\n return;\n }\n\n var router = transition.router,\n handlerInfos = state.handlerInfos,\n handlerName = handlerInfos[handlerInfos.length - 1].name,\n params = {};\n\n for (var i = handlerInfos.length - 1; i >= 0; --i) {\n var handlerInfo = handlerInfos[i];\n _routerUtils.merge(params, handlerInfo.params);\n if (handlerInfo.handler.inaccessibleByURL) {\n urlMethod = null;\n }\n }\n\n if (urlMethod) {\n params.queryParams = transition._visibleQueryParams || state.queryParams;\n var url = router.recognizer.generate(handlerName, params);\n\n if (urlMethod === 'replace') {\n router.replaceURL(url);\n } else {\n router.updateURL(url);\n }\n }\n }\n\n /**\n @private\n \n Updates the URL (if necessary) and calls `setupContexts`\n to update the router's array of `currentHandlerInfos`.\n */\n function finalizeTransition(transition, newState) {\n\n try {\n _routerUtils.log(transition.router, transition.sequence, \"Resolved all models on destination route; finalizing transition.\");\n\n var router = transition.router,\n handlerInfos = newState.handlerInfos,\n seq = transition.sequence;\n\n // Run all the necessary enter/setup/exit hooks\n setupContexts(router, newState, transition);\n\n // Check if a redirect occurred in enter/setup\n if (transition.isAborted) {\n // TODO: cleaner way? distinguish b/w targetHandlerInfos?\n router.state.handlerInfos = router.currentHandlerInfos;\n return _rsvpPromise.default.reject(_routerTransition.logAbort(transition));\n }\n\n updateURL(transition, newState, transition.intent.url);\n\n transition.isActive = false;\n router.activeTransition = null;\n\n _routerUtils.trigger(router, router.currentHandlerInfos, true, ['didTransition']);\n\n if (router.didTransition) {\n router.didTransition(router.currentHandlerInfos);\n }\n\n _routerUtils.log(router, transition.sequence, \"TRANSITION COMPLETE.\");\n\n // Resolve with the final handler.\n return handlerInfos[handlerInfos.length - 1].handler;\n } catch (e) {\n if (!(e instanceof _routerTransition.TransitionAborted)) {\n //var erroneousHandler = handlerInfos.pop();\n var infos = transition.state.handlerInfos;\n transition.trigger(true, 'error', e, transition, infos[infos.length - 1].handler);\n transition.abort();\n }\n\n throw e;\n }\n }\n\n /**\n @private\n \n Begins and returns a Transition based on the provided\n arguments. Accepts arguments in the form of both URL\n transitions and named transitions.\n \n @param {Router} router\n @param {Array[Object]} args arguments passed to transitionTo,\n replaceWith, or handleURL\n */\n function doTransition(router, args, isIntermediate) {\n // Normalize blank transitions to root URL transitions.\n var name = args[0] || '/';\n\n var lastArg = args[args.length - 1];\n var queryParams = {};\n if (lastArg && lastArg.hasOwnProperty('queryParams')) {\n queryParams = pop.call(args).queryParams;\n }\n\n var intent;\n if (args.length === 0) {\n\n _routerUtils.log(router, \"Updating query params\");\n\n // A query param update is really just a transition\n // into the route you're already on.\n var handlerInfos = router.state.handlerInfos;\n intent = new _routerTransitionIntentNamedTransitionIntent.default({\n name: handlerInfos[handlerInfos.length - 1].name,\n contexts: [],\n queryParams: queryParams\n });\n } else if (name.charAt(0) === '/') {\n\n _routerUtils.log(router, \"Attempting URL transition to \" + name);\n intent = new _routerTransitionIntentUrlTransitionIntent.default({ url: name });\n } else {\n\n _routerUtils.log(router, \"Attempting transition to \" + name);\n intent = new _routerTransitionIntentNamedTransitionIntent.default({\n name: args[0],\n contexts: _routerUtils.slice.call(args, 1),\n queryParams: queryParams\n });\n }\n\n return router.transitionByIntent(intent, isIntermediate);\n }\n\n function handlerInfosEqual(handlerInfos, otherHandlerInfos) {\n if (handlerInfos.length !== otherHandlerInfos.length) {\n return false;\n }\n\n for (var i = 0, len = handlerInfos.length; i < len; ++i) {\n if (handlerInfos[i] !== otherHandlerInfos[i]) {\n return false;\n }\n }\n return true;\n }\n\n function finalizeQueryParamChange(router, resolvedHandlers, newQueryParams, transition) {\n // We fire a finalizeQueryParamChange event which\n // gives the new route hierarchy a chance to tell\n // us which query params it's consuming and what\n // their final values are. If a query param is\n // no longer consumed in the final route hierarchy,\n // its serialized segment will be removed\n // from the URL.\n\n for (var k in newQueryParams) {\n if (newQueryParams.hasOwnProperty(k) && newQueryParams[k] === null) {\n delete newQueryParams[k];\n }\n }\n\n var finalQueryParamsArray = [];\n _routerUtils.trigger(router, resolvedHandlers, true, ['finalizeQueryParamChange', newQueryParams, finalQueryParamsArray, transition]);\n\n if (transition) {\n transition._visibleQueryParams = {};\n }\n\n var finalQueryParams = {};\n for (var i = 0, len = finalQueryParamsArray.length; i < len; ++i) {\n var qp = finalQueryParamsArray[i];\n finalQueryParams[qp.key] = qp.value;\n if (transition && qp.visible !== false) {\n transition._visibleQueryParams[qp.key] = qp.value;\n }\n }\n return finalQueryParams;\n }\n\n function notifyExistingHandlers(router, newState, newTransition) {\n var oldHandlers = router.state.handlerInfos,\n changing = [],\n leavingIndex = null,\n leaving,\n leavingChecker,\n i,\n oldHandlerLen,\n oldHandler,\n newHandler;\n\n oldHandlerLen = oldHandlers.length;\n for (i = 0; i < oldHandlerLen; i++) {\n oldHandler = oldHandlers[i];\n newHandler = newState.handlerInfos[i];\n\n if (!newHandler || oldHandler.name !== newHandler.name) {\n leavingIndex = i;\n break;\n }\n\n if (!newHandler.isResolved) {\n changing.push(oldHandler);\n }\n }\n\n if (leavingIndex !== null) {\n leaving = oldHandlers.slice(leavingIndex, oldHandlerLen);\n leavingChecker = function (name) {\n for (var h = 0, len = leaving.length; h < len; h++) {\n if (leaving[h].name === name) {\n return true;\n }\n }\n return false;\n };\n }\n\n _routerUtils.trigger(router, oldHandlers, true, ['willTransition', newTransition]);\n\n if (router.willTransition) {\n router.willTransition(oldHandlers, newState.handlerInfos, newTransition);\n }\n }\n\n exports.default = Router;\n});\nenifed('router/transition-intent/named-transition-intent', ['exports', 'router/transition-intent', 'router/transition-state', 'router/handler-info/factory', 'router/utils'], function (exports, _routerTransitionIntent, _routerTransitionState, _routerHandlerInfoFactory, _routerUtils) {\n 'use strict';\n\n exports.default = _routerUtils.subclass(_routerTransitionIntent.default, {\n name: null,\n pivotHandler: null,\n contexts: null,\n queryParams: null,\n\n initialize: function (props) {\n this.name = props.name;\n this.pivotHandler = props.pivotHandler;\n this.contexts = props.contexts || [];\n this.queryParams = props.queryParams;\n },\n\n applyToState: function (oldState, recognizer, getHandler, isIntermediate) {\n\n var partitionedArgs = _routerUtils.extractQueryParams([this.name].concat(this.contexts)),\n pureArgs = partitionedArgs[0],\n queryParams = partitionedArgs[1],\n handlers = recognizer.handlersFor(pureArgs[0]);\n\n var targetRouteName = handlers[handlers.length - 1].handler;\n\n return this.applyToHandlers(oldState, handlers, getHandler, targetRouteName, isIntermediate);\n },\n\n applyToHandlers: function (oldState, handlers, getHandler, targetRouteName, isIntermediate, checkingIfActive) {\n\n var i, len;\n var newState = new _routerTransitionState.default();\n var objects = this.contexts.slice(0);\n\n var invalidateIndex = handlers.length;\n\n // Pivot handlers are provided for refresh transitions\n if (this.pivotHandler) {\n for (i = 0, len = handlers.length; i < len; ++i) {\n if (getHandler(handlers[i].handler) === this.pivotHandler) {\n invalidateIndex = i;\n break;\n }\n }\n }\n\n var pivotHandlerFound = !this.pivotHandler;\n\n for (i = handlers.length - 1; i >= 0; --i) {\n var result = handlers[i];\n var name = result.handler;\n var handler = getHandler(name);\n\n var oldHandlerInfo = oldState.handlerInfos[i];\n var newHandlerInfo = null;\n\n if (result.names.length > 0) {\n if (i >= invalidateIndex) {\n newHandlerInfo = this.createParamHandlerInfo(name, handler, result.names, objects, oldHandlerInfo);\n } else {\n newHandlerInfo = this.getHandlerInfoForDynamicSegment(name, handler, result.names, objects, oldHandlerInfo, targetRouteName, i);\n }\n } else {\n // This route has no dynamic segment.\n // Therefore treat as a param-based handlerInfo\n // with empty params. This will cause the `model`\n // hook to be called with empty params, which is desirable.\n newHandlerInfo = this.createParamHandlerInfo(name, handler, result.names, objects, oldHandlerInfo);\n }\n\n if (checkingIfActive) {\n // If we're performing an isActive check, we want to\n // serialize URL params with the provided context, but\n // ignore mismatches between old and new context.\n newHandlerInfo = newHandlerInfo.becomeResolved(null, newHandlerInfo.context);\n var oldContext = oldHandlerInfo && oldHandlerInfo.context;\n if (result.names.length > 0 && newHandlerInfo.context === oldContext) {\n // If contexts match in isActive test, assume params also match.\n // This allows for flexibility in not requiring that every last\n // handler provide a `serialize` method\n newHandlerInfo.params = oldHandlerInfo && oldHandlerInfo.params;\n }\n newHandlerInfo.context = oldContext;\n }\n\n var handlerToUse = oldHandlerInfo;\n if (i >= invalidateIndex || newHandlerInfo.shouldSupercede(oldHandlerInfo)) {\n invalidateIndex = Math.min(i, invalidateIndex);\n handlerToUse = newHandlerInfo;\n }\n\n if (isIntermediate && !checkingIfActive) {\n handlerToUse = handlerToUse.becomeResolved(null, handlerToUse.context);\n }\n\n newState.handlerInfos.unshift(handlerToUse);\n }\n\n if (objects.length > 0) {\n throw new Error(\"More context objects were passed than there are dynamic segments for the route: \" + targetRouteName);\n }\n\n if (!isIntermediate) {\n this.invalidateChildren(newState.handlerInfos, invalidateIndex);\n }\n\n _routerUtils.merge(newState.queryParams, this.queryParams || {});\n\n return newState;\n },\n\n invalidateChildren: function (handlerInfos, invalidateIndex) {\n for (var i = invalidateIndex, l = handlerInfos.length; i < l; ++i) {\n var handlerInfo = handlerInfos[i];\n handlerInfos[i] = handlerInfos[i].getUnresolved();\n }\n },\n\n getHandlerInfoForDynamicSegment: function (name, handler, names, objects, oldHandlerInfo, targetRouteName, i) {\n\n var numNames = names.length;\n var objectToUse;\n if (objects.length > 0) {\n\n // Use the objects provided for this transition.\n objectToUse = objects[objects.length - 1];\n if (_routerUtils.isParam(objectToUse)) {\n return this.createParamHandlerInfo(name, handler, names, objects, oldHandlerInfo);\n } else {\n objects.pop();\n }\n } else if (oldHandlerInfo && oldHandlerInfo.name === name) {\n // Reuse the matching oldHandlerInfo\n return oldHandlerInfo;\n } else {\n if (this.preTransitionState) {\n var preTransitionHandlerInfo = this.preTransitionState.handlerInfos[i];\n objectToUse = preTransitionHandlerInfo && preTransitionHandlerInfo.context;\n } else {\n // Ideally we should throw this error to provide maximal\n // information to the user that not enough context objects\n // were provided, but this proves too cumbersome in Ember\n // in cases where inner template helpers are evaluated\n // before parent helpers un-render, in which cases this\n // error somewhat prematurely fires.\n //throw new Error(\"Not enough context objects were provided to complete a transition to \" + targetRouteName + \". Specifically, the \" + name + \" route needs an object that can be serialized into its dynamic URL segments [\" + names.join(', ') + \"]\");\n return oldHandlerInfo;\n }\n }\n\n return _routerHandlerInfoFactory.default('object', {\n name: name,\n handler: handler,\n context: objectToUse,\n names: names\n });\n },\n\n createParamHandlerInfo: function (name, handler, names, objects, oldHandlerInfo) {\n var params = {};\n\n // Soak up all the provided string/numbers\n var numNames = names.length;\n while (numNames--) {\n\n // Only use old params if the names match with the new handler\n var oldParams = oldHandlerInfo && name === oldHandlerInfo.name && oldHandlerInfo.params || {};\n\n var peek = objects[objects.length - 1];\n var paramName = names[numNames];\n if (_routerUtils.isParam(peek)) {\n params[paramName] = \"\" + objects.pop();\n } else {\n // If we're here, this means only some of the params\n // were string/number params, so try and use a param\n // value from a previous handler.\n if (oldParams.hasOwnProperty(paramName)) {\n params[paramName] = oldParams[paramName];\n } else {\n throw new Error(\"You didn't provide enough string/numeric parameters to satisfy all of the dynamic segments for route \" + name);\n }\n }\n }\n\n return _routerHandlerInfoFactory.default('param', {\n name: name,\n handler: handler,\n params: params\n });\n }\n });\n});\nenifed('router/transition-intent/url-transition-intent', ['exports', 'router/transition-intent', 'router/transition-state', 'router/handler-info/factory', 'router/utils', 'router/unrecognized-url-error'], function (exports, _routerTransitionIntent, _routerTransitionState, _routerHandlerInfoFactory, _routerUtils, _routerUnrecognizedUrlError) {\n 'use strict';\n\n exports.default = _routerUtils.subclass(_routerTransitionIntent.default, {\n url: null,\n\n initialize: function (props) {\n this.url = props.url;\n },\n\n applyToState: function (oldState, recognizer, getHandler) {\n var newState = new _routerTransitionState.default();\n\n var results = recognizer.recognize(this.url),\n queryParams = {},\n i,\n len;\n\n if (!results) {\n throw new _routerUnrecognizedUrlError.default(this.url);\n }\n\n var statesDiffer = false;\n\n for (i = 0, len = results.length; i < len; ++i) {\n var result = results[i];\n var name = result.handler;\n var handler = getHandler(name);\n\n if (handler.inaccessibleByURL) {\n throw new _routerUnrecognizedUrlError.default(this.url);\n }\n\n var newHandlerInfo = _routerHandlerInfoFactory.default('param', {\n name: name,\n handler: handler,\n params: result.params\n });\n\n var oldHandlerInfo = oldState.handlerInfos[i];\n if (statesDiffer || newHandlerInfo.shouldSupercede(oldHandlerInfo)) {\n statesDiffer = true;\n newState.handlerInfos[i] = newHandlerInfo;\n } else {\n newState.handlerInfos[i] = oldHandlerInfo;\n }\n }\n\n _routerUtils.merge(newState.queryParams, results.queryParams);\n\n return newState;\n }\n });\n});\nenifed('router/transition-intent', ['exports', 'router/utils'], function (exports, _routerUtils) {\n 'use strict';\n\n function TransitionIntent(props) {\n this.initialize(props);\n\n // TODO: wat\n this.data = this.data || {};\n }\n\n TransitionIntent.prototype = {\n initialize: null,\n applyToState: null\n };\n\n exports.default = TransitionIntent;\n});\nenifed('router/transition-state', ['exports', 'router/handler-info', 'router/utils', 'rsvp/promise'], function (exports, _routerHandlerInfo, _routerUtils, _rsvpPromise) {\n 'use strict';\n\n function TransitionState(other) {\n this.handlerInfos = [];\n this.queryParams = {};\n this.params = {};\n }\n\n TransitionState.prototype = {\n handlerInfos: null,\n queryParams: null,\n params: null,\n\n promiseLabel: function (label) {\n var targetName = '';\n _routerUtils.forEach(this.handlerInfos, function (handlerInfo) {\n if (targetName !== '') {\n targetName += '.';\n }\n targetName += handlerInfo.name;\n });\n return _routerUtils.promiseLabel(\"'\" + targetName + \"': \" + label);\n },\n\n resolve: function (shouldContinue, payload) {\n var self = this;\n // First, calculate params for this state. This is useful\n // information to provide to the various route hooks.\n var params = this.params;\n _routerUtils.forEach(this.handlerInfos, function (handlerInfo) {\n params[handlerInfo.name] = handlerInfo.params || {};\n });\n\n payload = payload || {};\n payload.resolveIndex = 0;\n\n var currentState = this;\n var wasAborted = false;\n\n // The prelude RSVP.resolve() asyncs us into the promise land.\n return _rsvpPromise.default.resolve(null, this.promiseLabel(\"Start transition\")).then(resolveOneHandlerInfo, null, this.promiseLabel('Resolve handler'))['catch'](handleError, this.promiseLabel('Handle error'));\n\n function innerShouldContinue() {\n return _rsvpPromise.default.resolve(shouldContinue(), currentState.promiseLabel(\"Check if should continue\"))['catch'](function (reason) {\n // We distinguish between errors that occurred\n // during resolution (e.g. beforeModel/model/afterModel),\n // and aborts due to a rejecting promise from shouldContinue().\n wasAborted = true;\n return _rsvpPromise.default.reject(reason);\n }, currentState.promiseLabel(\"Handle abort\"));\n }\n\n function handleError(error) {\n // This is the only possible\n // reject value of TransitionState#resolve\n var handlerInfos = currentState.handlerInfos;\n var errorHandlerIndex = payload.resolveIndex >= handlerInfos.length ? handlerInfos.length - 1 : payload.resolveIndex;\n return _rsvpPromise.default.reject({\n error: error,\n handlerWithError: currentState.handlerInfos[errorHandlerIndex].handler,\n wasAborted: wasAborted,\n state: currentState\n });\n }\n\n function proceed(resolvedHandlerInfo) {\n var wasAlreadyResolved = currentState.handlerInfos[payload.resolveIndex].isResolved;\n\n // Swap the previously unresolved handlerInfo with\n // the resolved handlerInfo\n currentState.handlerInfos[payload.resolveIndex++] = resolvedHandlerInfo;\n\n if (!wasAlreadyResolved) {\n // Call the redirect hook. The reason we call it here\n // vs. afterModel is so that redirects into child\n // routes don't re-run the model hooks for this\n // already-resolved route.\n var handler = resolvedHandlerInfo.handler;\n _routerUtils.callHook(handler, 'redirect', resolvedHandlerInfo.context, payload);\n }\n\n // Proceed after ensuring that the redirect hook\n // didn't abort this transition by transitioning elsewhere.\n return innerShouldContinue().then(resolveOneHandlerInfo, null, currentState.promiseLabel('Resolve handler'));\n }\n\n function resolveOneHandlerInfo() {\n if (payload.resolveIndex === currentState.handlerInfos.length) {\n // This is is the only possible\n // fulfill value of TransitionState#resolve\n return {\n error: null,\n state: currentState\n };\n }\n\n var handlerInfo = currentState.handlerInfos[payload.resolveIndex];\n\n return handlerInfo.resolve(innerShouldContinue, payload).then(proceed, null, currentState.promiseLabel('Proceed'));\n }\n }\n };\n\n exports.default = TransitionState;\n});\nenifed('router/transition', ['exports', 'rsvp/promise', 'router/handler-info', 'router/utils'], function (exports, _rsvpPromise, _routerHandlerInfo, _routerUtils) {\n 'use strict';\n\n /**\n A Transition is a thennable (a promise-like object) that represents\n an attempt to transition to another route. It can be aborted, either\n explicitly via `abort` or by attempting another transition while a\n previous one is still underway. An aborted transition can also\n be `retry()`d later.\n \n @class Transition\n @constructor\n @param {Object} router\n @param {Object} intent\n @param {Object} state\n @param {Object} error\n @private\n */\n function Transition(router, intent, state, error) {\n var transition = this;\n this.state = state || router.state;\n this.intent = intent;\n this.router = router;\n this.data = this.intent && this.intent.data || {};\n this.resolvedModels = {};\n this.queryParams = {};\n\n if (error) {\n this.promise = _rsvpPromise.default.reject(error);\n this.error = error;\n return;\n }\n\n if (state) {\n this.params = state.params;\n this.queryParams = state.queryParams;\n this.handlerInfos = state.handlerInfos;\n\n var len = state.handlerInfos.length;\n if (len) {\n this.targetName = state.handlerInfos[len - 1].name;\n }\n\n for (var i = 0; i < len; ++i) {\n var handlerInfo = state.handlerInfos[i];\n\n // TODO: this all seems hacky\n if (!handlerInfo.isResolved) {\n break;\n }\n this.pivotHandler = handlerInfo.handler;\n }\n\n this.sequence = Transition.currentSequence++;\n this.promise = state.resolve(checkForAbort, this)['catch'](function (result) {\n if (result.wasAborted || transition.isAborted) {\n return _rsvpPromise.default.reject(logAbort(transition));\n } else {\n transition.trigger('error', result.error, transition, result.handlerWithError);\n transition.abort();\n return _rsvpPromise.default.reject(result.error);\n }\n }, _routerUtils.promiseLabel('Handle Abort'));\n } else {\n this.promise = _rsvpPromise.default.resolve(this.state);\n this.params = {};\n }\n\n function checkForAbort() {\n if (transition.isAborted) {\n return _rsvpPromise.default.reject(undefined, _routerUtils.promiseLabel(\"Transition aborted - reject\"));\n }\n }\n }\n\n Transition.currentSequence = 0;\n\n Transition.prototype = {\n targetName: null,\n urlMethod: 'update',\n intent: null,\n params: null,\n pivotHandler: null,\n resolveIndex: 0,\n handlerInfos: null,\n resolvedModels: null,\n isActive: true,\n state: null,\n queryParamsOnly: false,\n\n isTransition: true,\n\n isExiting: function (handler) {\n var handlerInfos = this.handlerInfos;\n for (var i = 0, len = handlerInfos.length; i < len; ++i) {\n var handlerInfo = handlerInfos[i];\n if (handlerInfo.name === handler || handlerInfo.handler === handler) {\n return false;\n }\n }\n return true;\n },\n\n /**\n The Transition's internal promise. Calling `.then` on this property\n is that same as calling `.then` on the Transition object itself, but\n this property is exposed for when you want to pass around a\n Transition's promise, but not the Transition object itself, since\n Transition object can be externally `abort`ed, while the promise\n cannot.\n @property promise\n @type {Object}\n @public\n */\n promise: null,\n\n /**\n Custom state can be stored on a Transition's `data` object.\n This can be useful for decorating a Transition within an earlier\n hook and shared with a later hook. Properties set on `data` will\n be copied to new transitions generated by calling `retry` on this\n transition.\n \n @property data\n @type {Object}\n @public\n */\n data: null,\n\n /**\n A standard promise hook that resolves if the transition\n succeeds and rejects if it fails/redirects/aborts.\n Forwards to the internal `promise` property which you can\n use in situations where you want to pass around a thennable,\n but not the Transition itself.\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise}\n @public\n */\n then: function (onFulfilled, onRejected, label) {\n return this.promise.then(onFulfilled, onRejected, label);\n },\n\n /**\n Forwards to the internal `promise` property which you can\n use in situations where you want to pass around a thennable,\n but not the Transition itself.\n @method catch\n @param {Function} onRejection\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise}\n @public\n */\n catch: function (onRejection, label) {\n return this.promise.catch(onRejection, label);\n },\n\n /**\n Forwards to the internal `promise` property which you can\n use in situations where you want to pass around a thennable,\n but not the Transition itself.\n @method finally\n @param {Function} callback\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise}\n @public\n */\n finally: function (callback, label) {\n return this.promise.finally(callback, label);\n },\n\n /**\n Aborts the Transition. Note you can also implicitly abort a transition\n by initiating another transition while a previous one is underway.\n @method abort\n @return {Transition} this transition\n @public\n */\n abort: function () {\n if (this.isAborted) {\n return this;\n }\n _routerUtils.log(this.router, this.sequence, this.targetName + \": transition was aborted\");\n this.intent.preTransitionState = this.router.state;\n this.isAborted = true;\n this.isActive = false;\n this.router.activeTransition = null;\n return this;\n },\n\n /**\n Retries a previously-aborted transition (making sure to abort the\n transition if it's still active). Returns a new transition that\n represents the new attempt to transition.\n @method retry\n @return {Transition} new transition\n @public\n */\n retry: function () {\n // TODO: add tests for merged state retry()s\n this.abort();\n return this.router.transitionByIntent(this.intent, false);\n },\n\n /**\n Sets the URL-changing method to be employed at the end of a\n successful transition. By default, a new Transition will just\n use `updateURL`, but passing 'replace' to this method will\n cause the URL to update using 'replaceWith' instead. Omitting\n a parameter will disable the URL change, allowing for transitions\n that don't update the URL at completion (this is also used for\n handleURL, since the URL has already changed before the\n transition took place).\n @method method\n @param {String} method the type of URL-changing method to use\n at the end of a transition. Accepted values are 'replace',\n falsy values, or any other non-falsy value (which is\n interpreted as an updateURL transition).\n @return {Transition} this transition\n @public\n */\n method: function (method) {\n this.urlMethod = method;\n return this;\n },\n\n /**\n Fires an event on the current list of resolved/resolving\n handlers within this transition. Useful for firing events\n on route hierarchies that haven't fully been entered yet.\n Note: This method is also aliased as `send`\n @method trigger\n @param {Boolean} [ignoreFailure=false] a boolean specifying whether unhandled events throw an error\n @param {String} name the name of the event to fire\n @public\n */\n trigger: function (ignoreFailure) {\n var args = _routerUtils.slice.call(arguments);\n if (typeof ignoreFailure === 'boolean') {\n args.shift();\n } else {\n // Throw errors on unhandled trigger events by default\n ignoreFailure = false;\n }\n _routerUtils.trigger(this.router, this.state.handlerInfos.slice(0, this.resolveIndex + 1), ignoreFailure, args);\n },\n\n /**\n Transitions are aborted and their promises rejected\n when redirects occur; this method returns a promise\n that will follow any redirects that occur and fulfill\n with the value fulfilled by any redirecting transitions\n that occur.\n @method followRedirects\n @return {Promise} a promise that fulfills with the same\n value that the final redirecting transition fulfills with\n @public\n */\n followRedirects: function () {\n var router = this.router;\n return this.promise['catch'](function (reason) {\n if (router.activeTransition) {\n return router.activeTransition.followRedirects();\n }\n return _rsvpPromise.default.reject(reason);\n });\n },\n\n toString: function () {\n return \"Transition (sequence \" + this.sequence + \")\";\n },\n\n /**\n @private\n */\n log: function (message) {\n _routerUtils.log(this.router, this.sequence, message);\n }\n };\n\n // Alias 'trigger' as 'send'\n Transition.prototype.send = Transition.prototype.trigger;\n\n /**\n @private\n \n Logs and returns a TransitionAborted error.\n */\n function logAbort(transition) {\n _routerUtils.log(transition.router, transition.sequence, \"detected abort.\");\n return new TransitionAborted();\n }\n\n function TransitionAborted(message) {\n this.message = message || \"TransitionAborted\";\n this.name = \"TransitionAborted\";\n }\n\n exports.Transition = Transition;\n exports.logAbort = logAbort;\n exports.TransitionAborted = TransitionAborted;\n});\nenifed(\"router/unrecognized-url-error\", [\"exports\", \"router/utils\"], function (exports, _routerUtils) {\n \"use strict\";\n\n /**\n Promise reject reasons passed to promise rejection\n handlers for failed transitions.\n */\n function UnrecognizedURLError(message) {\n this.message = message || \"UnrecognizedURLError\";\n this.name = \"UnrecognizedURLError\";\n Error.call(this);\n }\n\n UnrecognizedURLError.prototype = _routerUtils.oCreate(Error.prototype);\n\n exports.default = UnrecognizedURLError;\n});\nenifed('router/utils', ['exports'], function (exports) {\n 'use strict';\n\n exports.extractQueryParams = extractQueryParams;\n exports.log = log;\n exports.bind = bind;\n exports.forEach = forEach;\n exports.trigger = trigger;\n exports.getChangelist = getChangelist;\n exports.promiseLabel = promiseLabel;\n exports.subclass = subclass;\n var slice = Array.prototype.slice;\n\n var _isArray;\n if (!Array.isArray) {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === \"[object Array]\";\n };\n } else {\n _isArray = Array.isArray;\n }\n\n var isArray = _isArray;\n\n exports.isArray = isArray;\n function merge(hash, other) {\n for (var prop in other) {\n if (other.hasOwnProperty(prop)) {\n hash[prop] = other[prop];\n }\n }\n }\n\n var oCreate = Object.create || function (proto) {\n function F() {}\n F.prototype = proto;\n return new F();\n };\n\n exports.oCreate = oCreate;\n /**\n @private\n \n Extracts query params from the end of an array\n **/\n\n function extractQueryParams(array) {\n var len = array && array.length,\n head,\n queryParams;\n\n if (len && len > 0 && array[len - 1] && array[len - 1].hasOwnProperty('queryParams')) {\n queryParams = array[len - 1].queryParams;\n head = slice.call(array, 0, len - 1);\n return [head, queryParams];\n } else {\n return [array, null];\n }\n }\n\n /**\n @private\n \n Coerces query param properties and array elements into strings.\n **/\n function coerceQueryParamsToString(queryParams) {\n for (var key in queryParams) {\n if (typeof queryParams[key] === 'number') {\n queryParams[key] = '' + queryParams[key];\n } else if (isArray(queryParams[key])) {\n for (var i = 0, l = queryParams[key].length; i < l; i++) {\n queryParams[key][i] = '' + queryParams[key][i];\n }\n }\n }\n }\n /**\n @private\n */\n\n function log(router, sequence, msg) {\n if (!router.log) {\n return;\n }\n\n if (arguments.length === 3) {\n router.log(\"Transition #\" + sequence + \": \" + msg);\n } else {\n msg = sequence;\n router.log(msg);\n }\n }\n\n function bind(context, fn) {\n var boundArgs = arguments;\n return function (value) {\n var args = slice.call(boundArgs, 2);\n args.push(value);\n return fn.apply(context, args);\n };\n }\n\n function isParam(object) {\n return typeof object === \"string\" || object instanceof String || typeof object === \"number\" || object instanceof Number;\n }\n\n function forEach(array, callback) {\n for (var i = 0, l = array.length; i < l && false !== callback(array[i]); i++) {}\n }\n\n function trigger(router, handlerInfos, ignoreFailure, args) {\n if (router.triggerEvent) {\n router.triggerEvent(handlerInfos, ignoreFailure, args);\n return;\n }\n\n var name = args.shift();\n\n if (!handlerInfos) {\n if (ignoreFailure) {\n return;\n }\n throw new Error(\"Could not trigger event '\" + name + \"'. There are no active handlers\");\n }\n\n var eventWasHandled = false;\n\n for (var i = handlerInfos.length - 1; i >= 0; i--) {\n var handlerInfo = handlerInfos[i],\n handler = handlerInfo.handler;\n\n if (handler.events && handler.events[name]) {\n if (handler.events[name].apply(handler, args) === true) {\n eventWasHandled = true;\n } else {\n return;\n }\n }\n }\n\n if (!eventWasHandled && !ignoreFailure) {\n throw new Error(\"Nothing handled the event '\" + name + \"'.\");\n }\n }\n\n function getChangelist(oldObject, newObject) {\n var key;\n var results = {\n all: {},\n changed: {},\n removed: {}\n };\n\n merge(results.all, newObject);\n\n var didChange = false;\n coerceQueryParamsToString(oldObject);\n coerceQueryParamsToString(newObject);\n\n // Calculate removals\n for (key in oldObject) {\n if (oldObject.hasOwnProperty(key)) {\n if (!newObject.hasOwnProperty(key)) {\n didChange = true;\n results.removed[key] = oldObject[key];\n }\n }\n }\n\n // Calculate changes\n for (key in newObject) {\n if (newObject.hasOwnProperty(key)) {\n if (isArray(oldObject[key]) && isArray(newObject[key])) {\n if (oldObject[key].length !== newObject[key].length) {\n results.changed[key] = newObject[key];\n didChange = true;\n } else {\n for (var i = 0, l = oldObject[key].length; i < l; i++) {\n if (oldObject[key][i] !== newObject[key][i]) {\n results.changed[key] = newObject[key];\n didChange = true;\n }\n }\n }\n } else {\n if (oldObject[key] !== newObject[key]) {\n results.changed[key] = newObject[key];\n didChange = true;\n }\n }\n }\n }\n\n return didChange && results;\n }\n\n function promiseLabel(label) {\n return 'Router: ' + label;\n }\n\n function subclass(parentConstructor, proto) {\n function C(props) {\n parentConstructor.call(this, props || {});\n }\n C.prototype = oCreate(parentConstructor.prototype);\n merge(C.prototype, proto);\n return C;\n }\n\n function resolveHook(obj, hookName) {\n if (!obj) {\n return;\n }\n var underscored = \"_\" + hookName;\n return obj[underscored] && underscored || obj[hookName] && hookName;\n }\n\n function callHook(obj, _hookName, arg1, arg2) {\n var hookName = resolveHook(obj, _hookName);\n return hookName && obj[hookName].call(obj, arg1, arg2);\n }\n\n function applyHook(obj, _hookName, args) {\n var hookName = resolveHook(obj, _hookName);\n if (hookName) {\n if (args.length === 0) {\n return obj[hookName].call(obj);\n } else if (args.length === 1) {\n return obj[hookName].call(obj, args[0]);\n } else if (args.length === 2) {\n return obj[hookName].call(obj, args[0], args[1]);\n } else {\n return obj[hookName].apply(obj, args);\n }\n }\n }\n\n exports.merge = merge;\n exports.slice = slice;\n exports.isParam = isParam;\n exports.coerceQueryParamsToString = coerceQueryParamsToString;\n exports.callHook = callHook;\n exports.resolveHook = resolveHook;\n exports.applyHook = applyHook;\n});\nenifed('router', ['exports', 'router/router'], function (exports, _routerRouter) {\n 'use strict';\n\n exports.default = _routerRouter.default;\n});\nenifed('rsvp/-internal', ['exports', 'rsvp/utils', 'rsvp/instrument', 'rsvp/config'], function (exports, _rsvpUtils, _rsvpInstrument, _rsvpConfig) {\n 'use strict';\n\n function withOwnPromise() {\n return new TypeError('A promises callback cannot return that same promise.');\n }\n\n function noop() {}\n\n var PENDING = void 0;\n var FULFILLED = 1;\n var REJECTED = 2;\n\n var GET_THEN_ERROR = new ErrorObject();\n\n function getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n GET_THEN_ERROR.error = error;\n return GET_THEN_ERROR;\n }\n }\n\n function tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n }\n\n function handleForeignThenable(promise, thenable, then) {\n _rsvpConfig.config.async(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n }\n\n function handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n thenable._onError = null;\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n reject(promise, reason);\n });\n }\n }\n\n function handleMaybeThenable(promise, maybeThenable) {\n if (maybeThenable.constructor === promise.constructor) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n var then = getThen(maybeThenable);\n\n if (then === GET_THEN_ERROR) {\n reject(promise, GET_THEN_ERROR.error);\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (_rsvpUtils.isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n }\n\n function resolve(promise, value) {\n if (promise === value) {\n fulfill(promise, value);\n } else if (_rsvpUtils.objectOrFunction(value)) {\n handleMaybeThenable(promise, value);\n } else {\n fulfill(promise, value);\n }\n }\n\n function publishRejection(promise) {\n if (promise._onError) {\n promise._onError(promise._result);\n }\n\n publish(promise);\n }\n\n function fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length === 0) {\n if (_rsvpConfig.config.instrument) {\n _rsvpInstrument.default('fulfilled', promise);\n }\n } else {\n _rsvpConfig.config.async(publish, promise);\n }\n }\n\n function reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n _rsvpConfig.config.async(publishRejection, promise);\n }\n\n function subscribe(parent, child, onFulfillment, onRejection) {\n var subscribers = parent._subscribers;\n var length = subscribers.length;\n\n parent._onError = null;\n\n subscribers[length] = child;\n subscribers[length + FULFILLED] = onFulfillment;\n subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n _rsvpConfig.config.async(publish, parent);\n }\n }\n\n function publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (_rsvpConfig.config.instrument) {\n _rsvpInstrument.default(settled === FULFILLED ? 'fulfilled' : 'rejected', promise);\n }\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child,\n callback,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n }\n\n function ErrorObject() {\n this.error = null;\n }\n\n var TRY_CATCH_ERROR = new ErrorObject();\n\n function tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n }\n\n function invokeCallback(settled, promise, callback, detail) {\n var hasCallback = _rsvpUtils.isFunction(callback),\n value,\n error,\n succeeded,\n failed;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, withOwnPromise());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n }\n\n function initializePromise(promise, resolver) {\n var resolved = false;\n try {\n resolver(function resolvePromise(value) {\n if (resolved) {\n return;\n }\n resolved = true;\n resolve(promise, value);\n }, function rejectPromise(reason) {\n if (resolved) {\n return;\n }\n resolved = true;\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n }\n\n exports.noop = noop;\n exports.resolve = resolve;\n exports.reject = reject;\n exports.fulfill = fulfill;\n exports.subscribe = subscribe;\n exports.publish = publish;\n exports.publishRejection = publishRejection;\n exports.initializePromise = initializePromise;\n exports.invokeCallback = invokeCallback;\n exports.FULFILLED = FULFILLED;\n exports.REJECTED = REJECTED;\n exports.PENDING = PENDING;\n});\nenifed('rsvp/all-settled', ['exports', 'rsvp/enumerator', 'rsvp/promise', 'rsvp/utils'], function (exports, _rsvpEnumerator, _rsvpPromise, _rsvpUtils) {\n 'use strict';\n\n exports.default = allSettled;\n\n function AllSettled(Constructor, entries, label) {\n this._superConstructor(Constructor, entries, false, /* don't abort on reject */label);\n }\n\n AllSettled.prototype = _rsvpUtils.o_create(_rsvpEnumerator.default.prototype);\n AllSettled.prototype._superConstructor = _rsvpEnumerator.default;\n AllSettled.prototype._makeResult = _rsvpEnumerator.makeSettledResult;\n AllSettled.prototype._validationError = function () {\n return new Error('allSettled must be called with an array');\n };\n\n /**\n `RSVP.allSettled` is similar to `RSVP.all`, but instead of implementing\n a fail-fast method, it waits until all the promises have returned and\n shows you all the results. This is useful if you want to handle multiple\n promises' failure states together as a set.\n \n Returns a promise that is fulfilled when all the given promises have been\n settled. The return promise is fulfilled with an array of the states of\n the promises passed into the `promises` array argument.\n \n Each state object will either indicate fulfillment or rejection, and\n provide the corresponding value or reason. The states will take one of\n the following formats:\n \n ```javascript\n { state: 'fulfilled', value: value }\n or\n { state: 'rejected', reason: reason }\n ```\n \n Example:\n \n ```javascript\n var promise1 = RSVP.Promise.resolve(1);\n var promise2 = RSVP.Promise.reject(new Error('2'));\n var promise3 = RSVP.Promise.reject(new Error('3'));\n var promises = [ promise1, promise2, promise3 ];\n \n RSVP.allSettled(promises).then(function(array){\n // array == [\n // { state: 'fulfilled', value: 1 },\n // { state: 'rejected', reason: Error },\n // { state: 'rejected', reason: Error }\n // ]\n // Note that for the second item, reason.message will be '2', and for the\n // third item, reason.message will be '3'.\n }, function(error) {\n // Not run. (This block would only be called if allSettled had failed,\n // for instance if passed an incorrect argument type.)\n });\n ```\n \n @method allSettled\n @static\n @for RSVP\n @param {Array} entries\n @param {String} label - optional string that describes the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled with an array of the settled\n states of the constituent promises.\n */\n\n function allSettled(entries, label) {\n return new AllSettled(_rsvpPromise.default, entries, label).promise;\n }\n});\nenifed(\"rsvp/all\", [\"exports\", \"rsvp/promise\"], function (exports, _rsvpPromise) {\n \"use strict\";\n\n exports.default = all;\n\n /**\n This is a convenient alias for `RSVP.Promise.all`.\n \n @method all\n @static\n @for RSVP\n @param {Array} array Array of promises.\n @param {String} label An optional label. This is useful\n for tooling.\n */\n\n function all(array, label) {\n return _rsvpPromise.default.all(array, label);\n }\n});\nenifed('rsvp/asap', ['exports'], function (exports) {\n 'use strict';\n\n exports.default = asap;\n var len = 0;\n var toString = ({}).toString;\n var vertxNext;\n\n function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 1, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n scheduleFlush();\n }\n }\n\n var browserWindow = typeof window !== 'undefined' ? window : undefined;\n var browserGlobal = browserWindow || {};\n var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\n var isNode = typeof window === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';\n\n // test for web worker but not in IE10\n var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n // node\n function useNextTick() {\n var nextTick = process.nextTick;\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // setImmediate should be used instead instead\n var version = process.versions.node.match(/^(?:(\\d+)\\.)?(?:(\\d+)\\.)?(\\*|\\d+)$/);\n if (Array.isArray(version) && version[1] === '0' && version[2] === '10') {\n nextTick = setImmediate;\n }\n return function () {\n nextTick(flush);\n };\n }\n\n // vertx\n function useVertxTimer() {\n return function () {\n vertxNext(flush);\n };\n }\n\n function useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n }\n\n // web worker\n function useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n channel.port2.postMessage(0);\n };\n }\n\n function useSetTimeout() {\n return function () {\n setTimeout(flush, 1);\n };\n }\n\n var queue = new Array(1000);\n function flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n }\n\n function attemptVertex() {\n try {\n var r = require;\n var vertx = r('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n }\n\n var scheduleFlush;\n // Decide what async method to use to triggering processing of queued callbacks:\n if (isNode) {\n scheduleFlush = useNextTick();\n } else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n } else if (isWorker) {\n scheduleFlush = useMessageChannel();\n } else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertex();\n } else {\n scheduleFlush = useSetTimeout();\n }\n});\nenifed('rsvp/config', ['exports', 'rsvp/events'], function (exports, _rsvpEvents) {\n 'use strict';\n\n var config = {\n instrument: false\n };\n\n _rsvpEvents.default['mixin'](config);\n\n function configure(name, value) {\n if (name === 'onerror') {\n // handle for legacy users that expect the actual\n // error to be passed to their function added via\n // `RSVP.configure('onerror', someFunctionHere);`\n config['on']('error', value);\n return;\n }\n\n if (arguments.length === 2) {\n config[name] = value;\n } else {\n return config[name];\n }\n }\n\n exports.config = config;\n exports.configure = configure;\n});\nenifed('rsvp/defer', ['exports', 'rsvp/promise'], function (exports, _rsvpPromise) {\n 'use strict';\n\n exports.default = defer;\n\n /**\n `RSVP.defer` returns an object similar to jQuery's `$.Deferred`.\n `RSVP.defer` should be used when porting over code reliant on `$.Deferred`'s\n interface. New code should use the `RSVP.Promise` constructor instead.\n \n The object returned from `RSVP.defer` is a plain object with three properties:\n \n * promise - an `RSVP.Promise`.\n * reject - a function that causes the `promise` property on this object to\n become rejected\n * resolve - a function that causes the `promise` property on this object to\n become fulfilled.\n \n Example:\n \n ```javascript\n var deferred = RSVP.defer();\n \n deferred.resolve(\"Success!\");\n \n deferred.promise.then(function(value){\n // value here is \"Success!\"\n });\n ```\n \n @method defer\n @static\n @for RSVP\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Object}\n */\n\n function defer(label) {\n var deferred = {};\n\n deferred['promise'] = new _rsvpPromise.default(function (resolve, reject) {\n deferred['resolve'] = resolve;\n deferred['reject'] = reject;\n }, label);\n\n return deferred;\n }\n});\nenifed('rsvp/enumerator', ['exports', 'rsvp/utils', 'rsvp/-internal'], function (exports, _rsvpUtils, _rsvpInternal) {\n 'use strict';\n\n exports.makeSettledResult = makeSettledResult;\n\n function makeSettledResult(state, position, value) {\n if (state === _rsvpInternal.FULFILLED) {\n return {\n state: 'fulfilled',\n value: value\n };\n } else {\n return {\n state: 'rejected',\n reason: value\n };\n }\n }\n\n function Enumerator(Constructor, input, abortOnReject, label) {\n var enumerator = this;\n\n enumerator._instanceConstructor = Constructor;\n enumerator.promise = new Constructor(_rsvpInternal.noop, label);\n enumerator._abortOnReject = abortOnReject;\n\n if (enumerator._validateInput(input)) {\n enumerator._input = input;\n enumerator.length = input.length;\n enumerator._remaining = input.length;\n\n enumerator._init();\n\n if (enumerator.length === 0) {\n _rsvpInternal.fulfill(enumerator.promise, enumerator._result);\n } else {\n enumerator.length = enumerator.length || 0;\n enumerator._enumerate();\n if (enumerator._remaining === 0) {\n _rsvpInternal.fulfill(enumerator.promise, enumerator._result);\n }\n }\n } else {\n _rsvpInternal.reject(enumerator.promise, enumerator._validationError());\n }\n }\n\n exports.default = Enumerator;\n\n Enumerator.prototype._validateInput = function (input) {\n return _rsvpUtils.isArray(input);\n };\n\n Enumerator.prototype._validationError = function () {\n return new Error('Array Methods must be provided an Array');\n };\n\n Enumerator.prototype._init = function () {\n this._result = new Array(this.length);\n };\n\n Enumerator.prototype._enumerate = function () {\n var enumerator = this;\n var length = enumerator.length;\n var promise = enumerator.promise;\n var input = enumerator._input;\n\n for (var i = 0; promise._state === _rsvpInternal.PENDING && i < length; i++) {\n enumerator._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function (entry, i) {\n var enumerator = this;\n var c = enumerator._instanceConstructor;\n if (_rsvpUtils.isMaybeThenable(entry)) {\n if (entry.constructor === c && entry._state !== _rsvpInternal.PENDING) {\n entry._onError = null;\n enumerator._settledAt(entry._state, i, entry._result);\n } else {\n enumerator._willSettleAt(c.resolve(entry), i);\n }\n } else {\n enumerator._remaining--;\n enumerator._result[i] = enumerator._makeResult(_rsvpInternal.FULFILLED, i, entry);\n }\n };\n\n Enumerator.prototype._settledAt = function (state, i, value) {\n var enumerator = this;\n var promise = enumerator.promise;\n\n if (promise._state === _rsvpInternal.PENDING) {\n enumerator._remaining--;\n\n if (enumerator._abortOnReject && state === _rsvpInternal.REJECTED) {\n _rsvpInternal.reject(promise, value);\n } else {\n enumerator._result[i] = enumerator._makeResult(state, i, value);\n }\n }\n\n if (enumerator._remaining === 0) {\n _rsvpInternal.fulfill(promise, enumerator._result);\n }\n };\n\n Enumerator.prototype._makeResult = function (state, i, value) {\n return value;\n };\n\n Enumerator.prototype._willSettleAt = function (promise, i) {\n var enumerator = this;\n\n _rsvpInternal.subscribe(promise, undefined, function (value) {\n enumerator._settledAt(_rsvpInternal.FULFILLED, i, value);\n }, function (reason) {\n enumerator._settledAt(_rsvpInternal.REJECTED, i, reason);\n });\n };\n});\nenifed('rsvp/events', ['exports'], function (exports) {\n 'use strict';\n\n function indexOf(callbacks, callback) {\n for (var i = 0, l = callbacks.length; i < l; i++) {\n if (callbacks[i] === callback) {\n return i;\n }\n }\n\n return -1;\n }\n\n function callbacksFor(object) {\n var callbacks = object._promiseCallbacks;\n\n if (!callbacks) {\n callbacks = object._promiseCallbacks = {};\n }\n\n return callbacks;\n }\n\n /**\n @class RSVP.EventTarget\n */\n exports.default = {\n\n /**\n `RSVP.EventTarget.mixin` extends an object with EventTarget methods. For\n Example:\n ```javascript\n var object = {};\n RSVP.EventTarget.mixin(object);\n object.on('finished', function(event) {\n // handle event\n });\n object.trigger('finished', { detail: value });\n ```\n `EventTarget.mixin` also works with prototypes:\n ```javascript\n var Person = function() {};\n RSVP.EventTarget.mixin(Person.prototype);\n var yehuda = new Person();\n var tom = new Person();\n yehuda.on('poke', function(event) {\n console.log('Yehuda says OW');\n });\n tom.on('poke', function(event) {\n console.log('Tom says OW');\n });\n yehuda.trigger('poke');\n tom.trigger('poke');\n ```\n @method mixin\n @for RSVP.EventTarget\n @private\n @param {Object} object object to extend with EventTarget methods\n */\n 'mixin': function (object) {\n object['on'] = this['on'];\n object['off'] = this['off'];\n object['trigger'] = this['trigger'];\n object._promiseCallbacks = undefined;\n return object;\n },\n\n /**\n Registers a callback to be executed when `eventName` is triggered\n ```javascript\n object.on('event', function(eventInfo){\n // handle the event\n });\n object.trigger('event');\n ```\n @method on\n @for RSVP.EventTarget\n @private\n @param {String} eventName name of the event to listen for\n @param {Function} callback function to be called when the event is triggered.\n */\n 'on': function (eventName, callback) {\n if (typeof callback !== 'function') {\n throw new TypeError('Callback must be a function');\n }\n\n var allCallbacks = callbacksFor(this),\n callbacks;\n\n callbacks = allCallbacks[eventName];\n\n if (!callbacks) {\n callbacks = allCallbacks[eventName] = [];\n }\n\n if (indexOf(callbacks, callback) === -1) {\n callbacks.push(callback);\n }\n },\n\n /**\n You can use `off` to stop firing a particular callback for an event:\n ```javascript\n function doStuff() { // do stuff! }\n object.on('stuff', doStuff);\n object.trigger('stuff'); // doStuff will be called\n // Unregister ONLY the doStuff callback\n object.off('stuff', doStuff);\n object.trigger('stuff'); // doStuff will NOT be called\n ```\n If you don't pass a `callback` argument to `off`, ALL callbacks for the\n event will not be executed when the event fires. For example:\n ```javascript\n var callback1 = function(){};\n var callback2 = function(){};\n object.on('stuff', callback1);\n object.on('stuff', callback2);\n object.trigger('stuff'); // callback1 and callback2 will be executed.\n object.off('stuff');\n object.trigger('stuff'); // callback1 and callback2 will not be executed!\n ```\n @method off\n @for RSVP.EventTarget\n @private\n @param {String} eventName event to stop listening to\n @param {Function} callback optional argument. If given, only the function\n given will be removed from the event's callback queue. If no `callback`\n argument is given, all callbacks will be removed from the event's callback\n queue.\n */\n 'off': function (eventName, callback) {\n var allCallbacks = callbacksFor(this),\n callbacks,\n index;\n\n if (!callback) {\n allCallbacks[eventName] = [];\n return;\n }\n\n callbacks = allCallbacks[eventName];\n\n index = indexOf(callbacks, callback);\n\n if (index !== -1) {\n callbacks.splice(index, 1);\n }\n },\n\n /**\n Use `trigger` to fire custom events. For example:\n ```javascript\n object.on('foo', function(){\n console.log('foo event happened!');\n });\n object.trigger('foo');\n // 'foo event happened!' logged to the console\n ```\n You can also pass a value as a second argument to `trigger` that will be\n passed as an argument to all event listeners for the event:\n ```javascript\n object.on('foo', function(value){\n console.log(value.name);\n });\n object.trigger('foo', { name: 'bar' });\n // 'bar' logged to the console\n ```\n @method trigger\n @for RSVP.EventTarget\n @private\n @param {String} eventName name of the event to be triggered\n @param {*} options optional value to be passed to any event handlers for\n the given `eventName`\n */\n 'trigger': function (eventName, options) {\n var allCallbacks = callbacksFor(this),\n callbacks,\n callback;\n\n if (callbacks = allCallbacks[eventName]) {\n // Don't cache the callbacks.length since it may grow\n for (var i = 0; i < callbacks.length; i++) {\n callback = callbacks[i];\n\n callback(options);\n }\n }\n }\n };\n});\nenifed('rsvp/filter', ['exports', 'rsvp/promise', 'rsvp/utils'], function (exports, _rsvpPromise, _rsvpUtils) {\n 'use strict';\n\n exports.default = filter;\n\n /**\n `RSVP.filter` is similar to JavaScript's native `filter` method, except that it\n waits for all promises to become fulfilled before running the `filterFn` on\n each item in given to `promises`. `RSVP.filter` returns a promise that will\n become fulfilled with the result of running `filterFn` on the values the\n promises become fulfilled with.\n \n For example:\n \n ```javascript\n \n var promise1 = RSVP.resolve(1);\n var promise2 = RSVP.resolve(2);\n var promise3 = RSVP.resolve(3);\n \n var promises = [promise1, promise2, promise3];\n \n var filterFn = function(item){\n return item > 1;\n };\n \n RSVP.filter(promises, filterFn).then(function(result){\n // result is [ 2, 3 ]\n });\n ```\n \n If any of the `promises` given to `RSVP.filter` are rejected, the first promise\n that is rejected will be given as an argument to the returned promise's\n rejection handler. For example:\n \n ```javascript\n var promise1 = RSVP.resolve(1);\n var promise2 = RSVP.reject(new Error('2'));\n var promise3 = RSVP.reject(new Error('3'));\n var promises = [ promise1, promise2, promise3 ];\n \n var filterFn = function(item){\n return item > 1;\n };\n \n RSVP.filter(promises, filterFn).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(reason) {\n // reason.message === '2'\n });\n ```\n \n `RSVP.filter` will also wait for any promises returned from `filterFn`.\n For instance, you may want to fetch a list of users then return a subset\n of those users based on some asynchronous operation:\n \n ```javascript\n \n var alice = { name: 'alice' };\n var bob = { name: 'bob' };\n var users = [ alice, bob ];\n \n var promises = users.map(function(user){\n return RSVP.resolve(user);\n });\n \n var filterFn = function(user){\n // Here, Alice has permissions to create a blog post, but Bob does not.\n return getPrivilegesForUser(user).then(function(privs){\n return privs.can_create_blog_post === true;\n });\n };\n RSVP.filter(promises, filterFn).then(function(users){\n // true, because the server told us only Alice can create a blog post.\n users.length === 1;\n // false, because Alice is the only user present in `users`\n users[0] === bob;\n });\n ```\n \n @method filter\n @static\n @for RSVP\n @param {Array} promises\n @param {Function} filterFn - function to be called on each resolved value to\n filter the final results.\n @param {String} label optional string describing the promise. Useful for\n tooling.\n @return {Promise}\n */\n\n function filter(promises, filterFn, label) {\n return _rsvpPromise.default.all(promises, label).then(function (values) {\n if (!_rsvpUtils.isFunction(filterFn)) {\n throw new TypeError(\"You must pass a function as filter's second argument.\");\n }\n\n var length = values.length;\n var filtered = new Array(length);\n\n for (var i = 0; i < length; i++) {\n filtered[i] = filterFn(values[i]);\n }\n\n return _rsvpPromise.default.all(filtered, label).then(function (filtered) {\n var results = new Array(length);\n var newLength = 0;\n\n for (var i = 0; i < length; i++) {\n if (filtered[i]) {\n results[newLength] = values[i];\n newLength++;\n }\n }\n\n results.length = newLength;\n\n return results;\n });\n });\n }\n});\nenifed('rsvp/hash-settled', ['exports', 'rsvp/promise', 'rsvp/enumerator', 'rsvp/promise-hash', 'rsvp/utils'], function (exports, _rsvpPromise, _rsvpEnumerator, _rsvpPromiseHash, _rsvpUtils) {\n 'use strict';\n\n exports.default = hashSettled;\n\n function HashSettled(Constructor, object, label) {\n this._superConstructor(Constructor, object, false, label);\n }\n\n HashSettled.prototype = _rsvpUtils.o_create(_rsvpPromiseHash.default.prototype);\n HashSettled.prototype._superConstructor = _rsvpEnumerator.default;\n HashSettled.prototype._makeResult = _rsvpEnumerator.makeSettledResult;\n\n HashSettled.prototype._validationError = function () {\n return new Error('hashSettled must be called with an object');\n };\n\n /**\n `RSVP.hashSettled` is similar to `RSVP.allSettled`, but takes an object\n instead of an array for its `promises` argument.\n \n Unlike `RSVP.all` or `RSVP.hash`, which implement a fail-fast method,\n but like `RSVP.allSettled`, `hashSettled` waits until all the\n constituent promises have returned and then shows you all the results\n with their states and values/reasons. This is useful if you want to\n handle multiple promises' failure states together as a set.\n \n Returns a promise that is fulfilled when all the given promises have been\n settled, or rejected if the passed parameters are invalid.\n \n The returned promise is fulfilled with a hash that has the same key names as\n the `promises` object argument. If any of the values in the object are not\n promises, they will be copied over to the fulfilled object and marked with state\n 'fulfilled'.\n \n Example:\n \n ```javascript\n var promises = {\n myPromise: RSVP.Promise.resolve(1),\n yourPromise: RSVP.Promise.resolve(2),\n theirPromise: RSVP.Promise.resolve(3),\n notAPromise: 4\n };\n \n RSVP.hashSettled(promises).then(function(hash){\n // hash here is an object that looks like:\n // {\n // myPromise: { state: 'fulfilled', value: 1 },\n // yourPromise: { state: 'fulfilled', value: 2 },\n // theirPromise: { state: 'fulfilled', value: 3 },\n // notAPromise: { state: 'fulfilled', value: 4 }\n // }\n });\n ```\n \n If any of the `promises` given to `RSVP.hash` are rejected, the state will\n be set to 'rejected' and the reason for rejection provided.\n \n Example:\n \n ```javascript\n var promises = {\n myPromise: RSVP.Promise.resolve(1),\n rejectedPromise: RSVP.Promise.reject(new Error('rejection')),\n anotherRejectedPromise: RSVP.Promise.reject(new Error('more rejection')),\n };\n \n RSVP.hashSettled(promises).then(function(hash){\n // hash here is an object that looks like:\n // {\n // myPromise: { state: 'fulfilled', value: 1 },\n // rejectedPromise: { state: 'rejected', reason: Error },\n // anotherRejectedPromise: { state: 'rejected', reason: Error },\n // }\n // Note that for rejectedPromise, reason.message == 'rejection',\n // and for anotherRejectedPromise, reason.message == 'more rejection'.\n });\n ```\n \n An important note: `RSVP.hashSettled` is intended for plain JavaScript objects that\n are just a set of keys and values. `RSVP.hashSettled` will NOT preserve prototype\n chains.\n \n Example:\n \n ```javascript\n function MyConstructor(){\n this.example = RSVP.Promise.resolve('Example');\n }\n \n MyConstructor.prototype = {\n protoProperty: RSVP.Promise.resolve('Proto Property')\n };\n \n var myObject = new MyConstructor();\n \n RSVP.hashSettled(myObject).then(function(hash){\n // protoProperty will not be present, instead you will just have an\n // object that looks like:\n // {\n // example: { state: 'fulfilled', value: 'Example' }\n // }\n //\n // hash.hasOwnProperty('protoProperty'); // false\n // 'undefined' === typeof hash.protoProperty\n });\n ```\n \n @method hashSettled\n @for RSVP\n @param {Object} object\n @param {String} label optional string that describes the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when when all properties of `promises`\n have been settled.\n @static\n */\n\n function hashSettled(object, label) {\n return new HashSettled(_rsvpPromise.default, object, label).promise;\n }\n});\nenifed('rsvp/hash', ['exports', 'rsvp/promise', 'rsvp/promise-hash'], function (exports, _rsvpPromise, _rsvpPromiseHash) {\n 'use strict';\n\n exports.default = hash;\n\n /**\n `RSVP.hash` is similar to `RSVP.all`, but takes an object instead of an array\n for its `promises` argument.\n \n Returns a promise that is fulfilled when all the given promises have been\n fulfilled, or rejected if any of them become rejected. The returned promise\n is fulfilled with a hash that has the same key names as the `promises` object\n argument. If any of the values in the object are not promises, they will\n simply be copied over to the fulfilled object.\n \n Example:\n \n ```javascript\n var promises = {\n myPromise: RSVP.resolve(1),\n yourPromise: RSVP.resolve(2),\n theirPromise: RSVP.resolve(3),\n notAPromise: 4\n };\n \n RSVP.hash(promises).then(function(hash){\n // hash here is an object that looks like:\n // {\n // myPromise: 1,\n // yourPromise: 2,\n // theirPromise: 3,\n // notAPromise: 4\n // }\n });\n ````\n \n If any of the `promises` given to `RSVP.hash` are rejected, the first promise\n that is rejected will be given as the reason to the rejection handler.\n \n Example:\n \n ```javascript\n var promises = {\n myPromise: RSVP.resolve(1),\n rejectedPromise: RSVP.reject(new Error('rejectedPromise')),\n anotherRejectedPromise: RSVP.reject(new Error('anotherRejectedPromise')),\n };\n \n RSVP.hash(promises).then(function(hash){\n // Code here never runs because there are rejected promises!\n }, function(reason) {\n // reason.message === 'rejectedPromise'\n });\n ```\n \n An important note: `RSVP.hash` is intended for plain JavaScript objects that\n are just a set of keys and values. `RSVP.hash` will NOT preserve prototype\n chains.\n \n Example:\n \n ```javascript\n function MyConstructor(){\n this.example = RSVP.resolve('Example');\n }\n \n MyConstructor.prototype = {\n protoProperty: RSVP.resolve('Proto Property')\n };\n \n var myObject = new MyConstructor();\n \n RSVP.hash(myObject).then(function(hash){\n // protoProperty will not be present, instead you will just have an\n // object that looks like:\n // {\n // example: 'Example'\n // }\n //\n // hash.hasOwnProperty('protoProperty'); // false\n // 'undefined' === typeof hash.protoProperty\n });\n ```\n \n @method hash\n @static\n @for RSVP\n @param {Object} object\n @param {String} label optional string that describes the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all properties of `promises`\n have been fulfilled, or rejected if any of them become rejected.\n */\n\n function hash(object, label) {\n return new _rsvpPromiseHash.default(_rsvpPromise.default, object, label).promise;\n }\n});\nenifed('rsvp/instrument', ['exports', 'rsvp/config', 'rsvp/utils'], function (exports, _rsvpConfig, _rsvpUtils) {\n 'use strict';\n\n exports.default = instrument;\n\n var queue = [];\n\n function scheduleFlush() {\n setTimeout(function () {\n var entry;\n for (var i = 0; i < queue.length; i++) {\n entry = queue[i];\n\n var payload = entry.payload;\n\n payload.guid = payload.key + payload.id;\n payload.childGuid = payload.key + payload.childId;\n if (payload.error) {\n payload.stack = payload.error.stack;\n }\n\n _rsvpConfig.config['trigger'](entry.name, entry.payload);\n }\n queue.length = 0;\n }, 50);\n }\n\n function instrument(eventName, promise, child) {\n if (1 === queue.push({\n name: eventName,\n payload: {\n key: promise._guidKey,\n id: promise._id,\n eventName: eventName,\n detail: promise._result,\n childId: child && child._id,\n label: promise._label,\n timeStamp: _rsvpUtils.now(),\n error: _rsvpConfig.config[\"instrument-with-stack\"] ? new Error(promise._label) : null\n } })) {\n scheduleFlush();\n }\n }\n});\nenifed('rsvp/map', ['exports', 'rsvp/promise', 'rsvp/utils'], function (exports, _rsvpPromise, _rsvpUtils) {\n 'use strict';\n\n exports.default = map;\n\n /**\n `RSVP.map` is similar to JavaScript's native `map` method, except that it\n waits for all promises to become fulfilled before running the `mapFn` on\n each item in given to `promises`. `RSVP.map` returns a promise that will\n become fulfilled with the result of running `mapFn` on the values the promises\n become fulfilled with.\n \n For example:\n \n ```javascript\n \n var promise1 = RSVP.resolve(1);\n var promise2 = RSVP.resolve(2);\n var promise3 = RSVP.resolve(3);\n var promises = [ promise1, promise2, promise3 ];\n \n var mapFn = function(item){\n return item + 1;\n };\n \n RSVP.map(promises, mapFn).then(function(result){\n // result is [ 2, 3, 4 ]\n });\n ```\n \n If any of the `promises` given to `RSVP.map` are rejected, the first promise\n that is rejected will be given as an argument to the returned promise's\n rejection handler. For example:\n \n ```javascript\n var promise1 = RSVP.resolve(1);\n var promise2 = RSVP.reject(new Error('2'));\n var promise3 = RSVP.reject(new Error('3'));\n var promises = [ promise1, promise2, promise3 ];\n \n var mapFn = function(item){\n return item + 1;\n };\n \n RSVP.map(promises, mapFn).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(reason) {\n // reason.message === '2'\n });\n ```\n \n `RSVP.map` will also wait if a promise is returned from `mapFn`. For example,\n say you want to get all comments from a set of blog posts, but you need\n the blog posts first because they contain a url to those comments.\n \n ```javscript\n \n var mapFn = function(blogPost){\n // getComments does some ajax and returns an RSVP.Promise that is fulfilled\n // with some comments data\n return getComments(blogPost.comments_url);\n };\n \n // getBlogPosts does some ajax and returns an RSVP.Promise that is fulfilled\n // with some blog post data\n RSVP.map(getBlogPosts(), mapFn).then(function(comments){\n // comments is the result of asking the server for the comments\n // of all blog posts returned from getBlogPosts()\n });\n ```\n \n @method map\n @static\n @for RSVP\n @param {Array} promises\n @param {Function} mapFn function to be called on each fulfilled promise.\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled with the result of calling\n `mapFn` on each fulfilled promise or value when they become fulfilled.\n The promise will be rejected if any of the given `promises` become rejected.\n @static\n */\n\n function map(promises, mapFn, label) {\n return _rsvpPromise.default.all(promises, label).then(function (values) {\n if (!_rsvpUtils.isFunction(mapFn)) {\n throw new TypeError(\"You must pass a function as map's second argument.\");\n }\n\n var length = values.length;\n var results = new Array(length);\n\n for (var i = 0; i < length; i++) {\n results[i] = mapFn(values[i]);\n }\n\n return _rsvpPromise.default.all(results, label);\n });\n }\n});\nenifed('rsvp/node', ['exports', 'rsvp/promise', 'rsvp/-internal', 'rsvp/utils'], function (exports, _rsvpPromise, _rsvpInternal, _rsvpUtils) {\n 'use strict';\n\n exports.default = denodeify;\n\n function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }\n\n function Result() {\n this.value = undefined;\n }\n\n var ERROR = new Result();\n var GET_THEN_ERROR = new Result();\n\n function getThen(obj) {\n try {\n return obj.then;\n } catch (error) {\n ERROR.value = error;\n return ERROR;\n }\n }\n\n function tryApply(f, s, a) {\n try {\n f.apply(s, a);\n } catch (error) {\n ERROR.value = error;\n return ERROR;\n }\n }\n\n function makeObject(_, argumentNames) {\n var obj = {};\n var name;\n var i;\n var length = _.length;\n var args = new Array(length);\n\n for (var x = 0; x < length; x++) {\n args[x] = _[x];\n }\n\n for (i = 0; i < argumentNames.length; i++) {\n name = argumentNames[i];\n obj[name] = args[i + 1];\n }\n\n return obj;\n }\n\n function arrayResult(_) {\n var length = _.length;\n var args = new Array(length - 1);\n\n for (var i = 1; i < length; i++) {\n args[i - 1] = _[i];\n }\n\n return args;\n }\n\n function wrapThenable(then, promise) {\n return {\n then: function (onFulFillment, onRejection) {\n return then.call(promise, onFulFillment, onRejection);\n }\n };\n }\n\n /**\n `RSVP.denodeify` takes a 'node-style' function and returns a function that\n will return an `RSVP.Promise`. You can use `denodeify` in Node.js or the\n browser when you'd prefer to use promises over using callbacks. For example,\n `denodeify` transforms the following:\n \n ```javascript\n var fs = require('fs');\n \n fs.readFile('myfile.txt', function(err, data){\n if (err) return handleError(err);\n handleData(data);\n });\n ```\n \n into:\n \n ```javascript\n var fs = require('fs');\n var readFile = RSVP.denodeify(fs.readFile);\n \n readFile('myfile.txt').then(handleData, handleError);\n ```\n \n If the node function has multiple success parameters, then `denodeify`\n just returns the first one:\n \n ```javascript\n var request = RSVP.denodeify(require('request'));\n \n request('http://example.com').then(function(res) {\n // ...\n });\n ```\n \n However, if you need all success parameters, setting `denodeify`'s\n second parameter to `true` causes it to return all success parameters\n as an array:\n \n ```javascript\n var request = RSVP.denodeify(require('request'), true);\n \n request('http://example.com').then(function(result) {\n // result[0] -> res\n // result[1] -> body\n });\n ```\n \n Or if you pass it an array with names it returns the parameters as a hash:\n \n ```javascript\n var request = RSVP.denodeify(require('request'), ['res', 'body']);\n \n request('http://example.com').then(function(result) {\n // result.res\n // result.body\n });\n ```\n \n Sometimes you need to retain the `this`:\n \n ```javascript\n var app = require('express')();\n var render = RSVP.denodeify(app.render.bind(app));\n ```\n \n The denodified function inherits from the original function. It works in all\n environments, except IE 10 and below. Consequently all properties of the original\n function are available to you. However, any properties you change on the\n denodeified function won't be changed on the original function. Example:\n \n ```javascript\n var request = RSVP.denodeify(require('request')),\n cookieJar = request.jar(); // <- Inheritance is used here\n \n request('http://example.com', {jar: cookieJar}).then(function(res) {\n // cookieJar.cookies holds now the cookies returned by example.com\n });\n ```\n \n Using `denodeify` makes it easier to compose asynchronous operations instead\n of using callbacks. For example, instead of:\n \n ```javascript\n var fs = require('fs');\n \n fs.readFile('myfile.txt', function(err, data){\n if (err) { ... } // Handle error\n fs.writeFile('myfile2.txt', data, function(err){\n if (err) { ... } // Handle error\n console.log('done')\n });\n });\n ```\n \n you can chain the operations together using `then` from the returned promise:\n \n ```javascript\n var fs = require('fs');\n var readFile = RSVP.denodeify(fs.readFile);\n var writeFile = RSVP.denodeify(fs.writeFile);\n \n readFile('myfile.txt').then(function(data){\n return writeFile('myfile2.txt', data);\n }).then(function(){\n console.log('done')\n }).catch(function(error){\n // Handle error\n });\n ```\n \n @method denodeify\n @static\n @for RSVP\n @param {Function} nodeFunc a 'node-style' function that takes a callback as\n its last argument. The callback expects an error to be passed as its first\n argument (if an error occurred, otherwise null), and the value from the\n operation as its second argument ('function(err, value){ }').\n @param {Boolean|Array} [options] An optional paramter that if set\n to `true` causes the promise to fulfill with the callback's success arguments\n as an array. This is useful if the node function has multiple success\n paramters. If you set this paramter to an array with names, the promise will\n fulfill with a hash with these names as keys and the success parameters as\n values.\n @return {Function} a function that wraps `nodeFunc` to return an\n `RSVP.Promise`\n @static\n */\n\n function denodeify(nodeFunc, options) {\n var fn = function () {\n var self = this;\n var l = arguments.length;\n var args = new Array(l + 1);\n var arg;\n var promiseInput = false;\n\n for (var i = 0; i < l; ++i) {\n arg = arguments[i];\n\n if (!promiseInput) {\n // TODO: clean this up\n promiseInput = needsPromiseInput(arg);\n if (promiseInput === GET_THEN_ERROR) {\n var p = new _rsvpPromise.default(_rsvpInternal.noop);\n _rsvpInternal.reject(p, GET_THEN_ERROR.value);\n return p;\n } else if (promiseInput && promiseInput !== true) {\n arg = wrapThenable(promiseInput, arg);\n }\n }\n args[i] = arg;\n }\n\n var promise = new _rsvpPromise.default(_rsvpInternal.noop);\n\n args[l] = function (err, val) {\n if (err) _rsvpInternal.reject(promise, err);else if (options === undefined) _rsvpInternal.resolve(promise, val);else if (options === true) _rsvpInternal.resolve(promise, arrayResult(arguments));else if (_rsvpUtils.isArray(options)) _rsvpInternal.resolve(promise, makeObject(arguments, options));else _rsvpInternal.resolve(promise, val);\n };\n\n if (promiseInput) {\n return handlePromiseInput(promise, args, nodeFunc, self);\n } else {\n return handleValueInput(promise, args, nodeFunc, self);\n }\n };\n\n _defaults(fn, nodeFunc);\n\n return fn;\n }\n\n function handleValueInput(promise, args, nodeFunc, self) {\n var result = tryApply(nodeFunc, self, args);\n if (result === ERROR) {\n _rsvpInternal.reject(promise, result.value);\n }\n return promise;\n }\n\n function handlePromiseInput(promise, args, nodeFunc, self) {\n return _rsvpPromise.default.all(args).then(function (args) {\n var result = tryApply(nodeFunc, self, args);\n if (result === ERROR) {\n _rsvpInternal.reject(promise, result.value);\n }\n return promise;\n });\n }\n\n function needsPromiseInput(arg) {\n if (arg && typeof arg === 'object') {\n if (arg.constructor === _rsvpPromise.default) {\n return true;\n } else {\n return getThen(arg);\n }\n } else {\n return false;\n }\n }\n});\nenifed('rsvp/platform', ['exports'], function (exports) {\n 'use strict';\n\n var platform;\n\n /* global self */\n if (typeof self === 'object') {\n platform = self;\n\n /* global global */\n } else if (typeof global === 'object') {\n platform = global;\n } else {\n throw new Error('no global: `self` or `global` found');\n }\n\n exports.default = platform;\n});\nenifed('rsvp/promise/all', ['exports', 'rsvp/enumerator'], function (exports, _rsvpEnumerator) {\n 'use strict';\n\n exports.default = all;\n\n /**\n `RSVP.Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n \n Example:\n \n ```javascript\n var promise1 = RSVP.resolve(1);\n var promise2 = RSVP.resolve(2);\n var promise3 = RSVP.resolve(3);\n var promises = [ promise1, promise2, promise3 ];\n \n RSVP.Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n \n If any of the `promises` given to `RSVP.all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n \n Example:\n \n ```javascript\n var promise1 = RSVP.resolve(1);\n var promise2 = RSVP.reject(new Error(\"2\"));\n var promise3 = RSVP.reject(new Error(\"3\"));\n var promises = [ promise1, promise2, promise3 ];\n \n RSVP.Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n \n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n */\n\n function all(entries, label) {\n return new _rsvpEnumerator.default(this, entries, true, /* abort on reject */label).promise;\n }\n});\nenifed('rsvp/promise/race', ['exports', 'rsvp/utils', 'rsvp/-internal'], function (exports, _rsvpUtils, _rsvpInternal) {\n 'use strict';\n\n exports.default = race;\n\n /**\n `RSVP.Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n \n Example:\n \n ```javascript\n var promise1 = new RSVP.Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n \n var promise2 = new RSVP.Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n \n RSVP.Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n \n `RSVP.Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n \n ```javascript\n var promise1 = new RSVP.Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n \n var promise2 = new RSVP.Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n \n RSVP.Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n \n An example real-world use case is implementing timeouts:\n \n ```javascript\n RSVP.Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n \n @method race\n @static\n @param {Array} entries array of promises to observe\n @param {String} label optional string for describing the promise returned.\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n */\n\n function race(entries, label) {\n /*jshint validthis:true */\n var Constructor = this;\n\n var promise = new Constructor(_rsvpInternal.noop, label);\n\n if (!_rsvpUtils.isArray(entries)) {\n _rsvpInternal.reject(promise, new TypeError('You must pass an array to race.'));\n return promise;\n }\n\n var length = entries.length;\n\n function onFulfillment(value) {\n _rsvpInternal.resolve(promise, value);\n }\n\n function onRejection(reason) {\n _rsvpInternal.reject(promise, reason);\n }\n\n for (var i = 0; promise._state === _rsvpInternal.PENDING && i < length; i++) {\n _rsvpInternal.subscribe(Constructor.resolve(entries[i]), undefined, onFulfillment, onRejection);\n }\n\n return promise;\n }\n});\nenifed('rsvp/promise/reject', ['exports', 'rsvp/-internal'], function (exports, _rsvpInternal) {\n 'use strict';\n\n exports.default = reject;\n\n /**\n `RSVP.Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n \n ```javascript\n var promise = new RSVP.Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n \n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n \n Instead of writing the above, your code now simply becomes the following:\n \n ```javascript\n var promise = RSVP.Promise.reject(new Error('WHOOPS'));\n \n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n \n @method reject\n @static\n @param {*} reason value that the returned promise will be rejected with.\n @param {String} label optional string for identifying the returned promise.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n */\n\n function reject(reason, label) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(_rsvpInternal.noop, label);\n _rsvpInternal.reject(promise, reason);\n return promise;\n }\n});\nenifed('rsvp/promise/resolve', ['exports', 'rsvp/-internal'], function (exports, _rsvpInternal) {\n 'use strict';\n\n exports.default = resolve;\n\n /**\n `RSVP.Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n \n ```javascript\n var promise = new RSVP.Promise(function(resolve, reject){\n resolve(1);\n });\n \n promise.then(function(value){\n // value === 1\n });\n ```\n \n Instead of writing the above, your code now simply becomes the following:\n \n ```javascript\n var promise = RSVP.Promise.resolve(1);\n \n promise.then(function(value){\n // value === 1\n });\n ```\n \n @method resolve\n @static\n @param {*} object value that the returned promise will be resolved with\n @param {String} label optional string for identifying the returned promise.\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n */\n\n function resolve(object, label) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(_rsvpInternal.noop, label);\n _rsvpInternal.resolve(promise, object);\n return promise;\n }\n});\nenifed('rsvp/promise-hash', ['exports', 'rsvp/enumerator', 'rsvp/-internal', 'rsvp/utils'], function (exports, _rsvpEnumerator, _rsvpInternal, _rsvpUtils) {\n 'use strict';\n\n function PromiseHash(Constructor, object, label) {\n this._superConstructor(Constructor, object, true, label);\n }\n\n exports.default = PromiseHash;\n\n PromiseHash.prototype = _rsvpUtils.o_create(_rsvpEnumerator.default.prototype);\n PromiseHash.prototype._superConstructor = _rsvpEnumerator.default;\n PromiseHash.prototype._init = function () {\n this._result = {};\n };\n\n PromiseHash.prototype._validateInput = function (input) {\n return input && typeof input === 'object';\n };\n\n PromiseHash.prototype._validationError = function () {\n return new Error('Promise.hash must be called with an object');\n };\n\n PromiseHash.prototype._enumerate = function () {\n var enumerator = this;\n var promise = enumerator.promise;\n var input = enumerator._input;\n var results = [];\n\n for (var key in input) {\n if (promise._state === _rsvpInternal.PENDING && Object.prototype.hasOwnProperty.call(input, key)) {\n results.push({\n position: key,\n entry: input[key]\n });\n }\n }\n\n var length = results.length;\n enumerator._remaining = length;\n var result;\n\n for (var i = 0; promise._state === _rsvpInternal.PENDING && i < length; i++) {\n result = results[i];\n enumerator._eachEntry(result.entry, result.position);\n }\n };\n});\nenifed('rsvp/promise', ['exports', 'rsvp/config', 'rsvp/instrument', 'rsvp/utils', 'rsvp/-internal', 'rsvp/promise/all', 'rsvp/promise/race', 'rsvp/promise/resolve', 'rsvp/promise/reject'], function (exports, _rsvpConfig, _rsvpInstrument, _rsvpUtils, _rsvpInternal, _rsvpPromiseAll, _rsvpPromiseRace, _rsvpPromiseResolve, _rsvpPromiseReject) {\n 'use strict';\n\n exports.default = Promise;\n\n var guidKey = 'rsvp_' + _rsvpUtils.now() + '-';\n var counter = 0;\n\n function needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n }\n\n function needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n }\n\n /**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise’s eventual value or the reason\n why the promise cannot be fulfilled.\n \n Terminology\n -----------\n \n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n \n A promise can be in one of three states: pending, fulfilled, or rejected.\n \n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n \n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n \n \n Basic Usage:\n ------------\n \n ```js\n var promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n \n // on failure\n reject(reason);\n });\n \n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n \n Advanced Usage:\n ---------------\n \n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n \n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n var xhr = new XMLHttpRequest();\n \n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n \n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n \n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n \n Unlike callbacks, promises are great composable primitives.\n \n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n \n return values;\n });\n ```\n \n @class RSVP.Promise\n @param {function} resolver\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @constructor\n */\n\n function Promise(resolver, label) {\n var promise = this;\n\n promise._id = counter++;\n promise._label = label;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n\n if (_rsvpConfig.config.instrument) {\n _rsvpInstrument.default('created', promise);\n }\n\n if (_rsvpInternal.noop !== resolver) {\n if (!_rsvpUtils.isFunction(resolver)) {\n needsResolver();\n }\n\n if (!(promise instanceof Promise)) {\n needsNew();\n }\n\n _rsvpInternal.initializePromise(promise, resolver);\n }\n }\n\n Promise.cast = _rsvpPromiseResolve.default; // deprecated\n Promise.all = _rsvpPromiseAll.default;\n Promise.race = _rsvpPromiseRace.default;\n Promise.resolve = _rsvpPromiseResolve.default;\n Promise.reject = _rsvpPromiseReject.default;\n\n Promise.prototype = {\n constructor: Promise,\n\n _guidKey: guidKey,\n\n _onError: function (reason) {\n var promise = this;\n _rsvpConfig.config.after(function () {\n if (promise._onError) {\n _rsvpConfig.config['trigger']('error', reason);\n }\n });\n },\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n \n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n \n Chaining\n --------\n \n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n \n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n \n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n \n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n \n Assimilation\n ------------\n \n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n \n If the assimliated promise rejects, then the downstream promise will also reject.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n \n Simple Example\n --------------\n \n Synchronous Example\n \n ```javascript\n var result;\n \n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n \n Advanced Example\n --------------\n \n Synchronous Example\n \n ```javascript\n var author, books;\n \n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n \n function foundBooks(books) {\n \n }\n \n function failure(reason) {\n \n }\n \n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n \n @method then\n @param {Function} onFulfillment\n @param {Function} onRejection\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise}\n */\n then: function (onFulfillment, onRejection, label) {\n var parent = this;\n var state = parent._state;\n\n if (state === _rsvpInternal.FULFILLED && !onFulfillment || state === _rsvpInternal.REJECTED && !onRejection) {\n if (_rsvpConfig.config.instrument) {\n _rsvpInstrument.default('chained', parent, parent);\n }\n return parent;\n }\n\n parent._onError = null;\n\n var child = new parent.constructor(_rsvpInternal.noop, label);\n var result = parent._result;\n\n if (_rsvpConfig.config.instrument) {\n _rsvpInstrument.default('chained', parent, child);\n }\n\n if (state) {\n var callback = arguments[state - 1];\n _rsvpConfig.config.async(function () {\n _rsvpInternal.invokeCallback(state, child, callback, result);\n });\n } else {\n _rsvpInternal.subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n },\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n \n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n \n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n \n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n \n @method catch\n @param {Function} onRejection\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise}\n */\n 'catch': function (onRejection, label) {\n return this.then(undefined, onRejection, label);\n },\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise}\n */\n 'finally': function (callback, label) {\n var promise = this;\n var constructor = promise.constructor;\n\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n }, label);\n }\n };\n});\nenifed('rsvp/race', ['exports', 'rsvp/promise'], function (exports, _rsvpPromise) {\n 'use strict';\n\n exports.default = race;\n\n /**\n This is a convenient alias for `RSVP.Promise.race`.\n \n @method race\n @static\n @for RSVP\n @param {Array} array Array of promises.\n @param {String} label An optional label. This is useful\n for tooling.\n */\n\n function race(array, label) {\n return _rsvpPromise.default.race(array, label);\n }\n});\nenifed('rsvp/reject', ['exports', 'rsvp/promise'], function (exports, _rsvpPromise) {\n 'use strict';\n\n exports.default = reject;\n\n /**\n This is a convenient alias for `RSVP.Promise.reject`.\n \n @method reject\n @static\n @for RSVP\n @param {*} reason value that the returned promise will be rejected with.\n @param {String} label optional string for identifying the returned promise.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n */\n\n function reject(reason, label) {\n return _rsvpPromise.default.reject(reason, label);\n }\n});\nenifed('rsvp/resolve', ['exports', 'rsvp/promise'], function (exports, _rsvpPromise) {\n 'use strict';\n\n exports.default = resolve;\n\n /**\n This is a convenient alias for `RSVP.Promise.resolve`.\n \n @method resolve\n @static\n @for RSVP\n @param {*} value value that the returned promise will be resolved with\n @param {String} label optional string for identifying the returned promise.\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n */\n\n function resolve(value, label) {\n return _rsvpPromise.default.resolve(value, label);\n }\n});\nenifed(\"rsvp/rethrow\", [\"exports\"], function (exports) {\n /**\n `RSVP.rethrow` will rethrow an error on the next turn of the JavaScript event\n loop in order to aid debugging.\n \n Promises A+ specifies that any exceptions that occur with a promise must be\n caught by the promises implementation and bubbled to the last handler. For\n this reason, it is recommended that you always specify a second rejection\n handler function to `then`. However, `RSVP.rethrow` will throw the exception\n outside of the promise, so it bubbles up to your console if in the browser,\n or domain/cause uncaught exception in Node. `rethrow` will also throw the\n error again so the error can be handled by the promise per the spec.\n \n ```javascript\n function throws(){\n throw new Error('Whoops!');\n }\n \n var promise = new RSVP.Promise(function(resolve, reject){\n throws();\n });\n \n promise.catch(RSVP.rethrow).then(function(){\n // Code here doesn't run because the promise became rejected due to an\n // error!\n }, function (err){\n // handle the error here\n });\n ```\n \n The 'Whoops' error will be thrown on the next turn of the event loop\n and you can watch for it in your console. You can also handle it using a\n rejection handler given to `.then` or `.catch` on the returned promise.\n \n @method rethrow\n @static\n @for RSVP\n @param {Error} reason reason the promise became rejected.\n @throws Error\n @static\n */\n \"use strict\";\n\n exports.default = rethrow;\n\n function rethrow(reason) {\n setTimeout(function () {\n throw reason;\n });\n throw reason;\n }\n});\nenifed('rsvp/utils', ['exports'], function (exports) {\n 'use strict';\n\n exports.objectOrFunction = objectOrFunction;\n exports.isFunction = isFunction;\n exports.isMaybeThenable = isMaybeThenable;\n\n function objectOrFunction(x) {\n return typeof x === 'function' || typeof x === 'object' && x !== null;\n }\n\n function isFunction(x) {\n return typeof x === 'function';\n }\n\n function isMaybeThenable(x) {\n return typeof x === 'object' && x !== null;\n }\n\n var _isArray;\n if (!Array.isArray) {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n } else {\n _isArray = Array.isArray;\n }\n\n var isArray = _isArray;\n\n exports.isArray = isArray;\n // Date.now is not available in browsers < IE9\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/now#Compatibility\n var now = Date.now || function () {\n return new Date().getTime();\n };\n\n exports.now = now;\n function F() {}\n\n var o_create = Object.create || function (o) {\n if (arguments.length > 1) {\n throw new Error('Second argument not supported');\n }\n if (typeof o !== 'object') {\n throw new TypeError('Argument must be an object');\n }\n F.prototype = o;\n return new F();\n };\n exports.o_create = o_create;\n});\nenifed('rsvp', ['exports', 'rsvp/promise', 'rsvp/events', 'rsvp/node', 'rsvp/all', 'rsvp/all-settled', 'rsvp/race', 'rsvp/hash', 'rsvp/hash-settled', 'rsvp/rethrow', 'rsvp/defer', 'rsvp/config', 'rsvp/map', 'rsvp/resolve', 'rsvp/reject', 'rsvp/filter', 'rsvp/asap'], function (exports, _rsvpPromise, _rsvpEvents, _rsvpNode, _rsvpAll, _rsvpAllSettled, _rsvpRace, _rsvpHash, _rsvpHashSettled, _rsvpRethrow, _rsvpDefer, _rsvpConfig, _rsvpMap, _rsvpResolve, _rsvpReject, _rsvpFilter, _rsvpAsap) {\n 'use strict';\n\n // defaults\n _rsvpConfig.config.async = _rsvpAsap.default;\n _rsvpConfig.config.after = function (cb) {\n setTimeout(cb, 0);\n };\n var cast = _rsvpResolve.default;\n function async(callback, arg) {\n _rsvpConfig.config.async(callback, arg);\n }\n\n function on() {\n _rsvpConfig.config['on'].apply(_rsvpConfig.config, arguments);\n }\n\n function off() {\n _rsvpConfig.config['off'].apply(_rsvpConfig.config, arguments);\n }\n\n // Set up instrumentation through `window.__PROMISE_INTRUMENTATION__`\n if (typeof window !== 'undefined' && typeof window['__PROMISE_INSTRUMENTATION__'] === 'object') {\n var callbacks = window['__PROMISE_INSTRUMENTATION__'];\n _rsvpConfig.configure('instrument', true);\n for (var eventName in callbacks) {\n if (callbacks.hasOwnProperty(eventName)) {\n on(eventName, callbacks[eventName]);\n }\n }\n }\n\n exports.cast = cast;\n exports.Promise = _rsvpPromise.default;\n exports.EventTarget = _rsvpEvents.default;\n exports.all = _rsvpAll.default;\n exports.allSettled = _rsvpAllSettled.default;\n exports.race = _rsvpRace.default;\n exports.hash = _rsvpHash.default;\n exports.hashSettled = _rsvpHashSettled.default;\n exports.rethrow = _rsvpRethrow.default;\n exports.defer = _rsvpDefer.default;\n exports.denodeify = _rsvpNode.default;\n exports.configure = _rsvpConfig.configure;\n exports.on = on;\n exports.off = off;\n exports.resolve = _rsvpResolve.default;\n exports.reject = _rsvpReject.default;\n exports.async = async;\n exports.map = _rsvpMap.default;\n exports.filter = _rsvpFilter.default;\n});\nenifed('rsvp.umd', ['exports', 'rsvp/platform', 'rsvp'], function (exports, _rsvpPlatform, _rsvp) {\n 'use strict';\n\n var RSVP = {\n 'race': _rsvp.race,\n 'Promise': _rsvp.Promise,\n 'allSettled': _rsvp.allSettled,\n 'hash': _rsvp.hash,\n 'hashSettled': _rsvp.hashSettled,\n 'denodeify': _rsvp.denodeify,\n 'on': _rsvp.on,\n 'off': _rsvp.off,\n 'map': _rsvp.map,\n 'filter': _rsvp.filter,\n 'resolve': _rsvp.resolve,\n 'reject': _rsvp.reject,\n 'all': _rsvp.all,\n 'rethrow': _rsvp.rethrow,\n 'defer': _rsvp.defer,\n 'EventTarget': _rsvp.EventTarget,\n 'configure': _rsvp.configure,\n 'async': _rsvp.async\n };\n\n /* global define:true module:true window: true */\n if (typeof define === 'function' && define['amd']) {\n define(function () {\n return RSVP;\n });\n } else if (typeof module !== 'undefined' && module['exports']) {\n module['exports'] = RSVP;\n } else if (typeof _rsvpPlatform.default !== 'undefined') {\n _rsvpPlatform.default['RSVP'] = RSVP;\n }\n});\nenifed(\"vertex\", [\"exports\"], function (exports) {\n /**\n * DAG Vertex\n *\n * @class Vertex\n * @constructor\n */\n\n \"use strict\";\n\n exports.default = Vertex;\n\n function Vertex(name) {\n this.name = name;\n this.incoming = {};\n this.incomingNames = [];\n this.hasOutgoing = false;\n this.value = null;\n }\n});\nenifed(\"visit\", [\"exports\"], function (exports) {\n \"use strict\";\n\n exports.default = visit;\n\n function visit(vertex, fn, visited, path) {\n var name = vertex.name;\n var vertices = vertex.incoming;\n var names = vertex.incomingNames;\n var len = names.length;\n var i;\n\n if (!visited) {\n visited = {};\n }\n if (!path) {\n path = [];\n }\n if (visited.hasOwnProperty(name)) {\n return;\n }\n path.push(name);\n visited[name] = true;\n for (i = 0; i < len; i++) {\n visit(vertices[names[i]], fn, visited, path);\n }\n fn(vertex, path);\n path.pop();\n }\n});\nrequireModule(\"ember\");\n\n}());\n","(function() {\n/* globals define, Ember, jQuery */\n\n function processEmberShims() {\n var shims = {\n 'ember': {\n 'default': Ember\n },\n 'ember-application': {\n 'default': Ember.Application\n },\n 'ember-array': {\n 'default': Ember.Array\n },\n 'ember-array/mutable': {\n 'default': Ember.MutableArray\n },\n 'ember-array/utils': {\n 'A': Ember.A,\n 'isEmberArray': Ember.isArray,\n 'wrap': Ember.makeArray\n },\n 'ember-component': {\n 'default': Ember.Component\n },\n 'ember-components/checkbox': {\n 'default': Ember.Checkbox\n },\n 'ember-components/text-area': {\n 'default': Ember.TextArea\n },\n 'ember-components/text-field': {\n 'default': Ember.TextField\n },\n 'ember-controller': {\n 'default': Ember.Controller\n },\n 'ember-controller/inject': {\n 'default': Ember.inject.controller\n },\n 'ember-controller/proxy': {\n 'default': Ember.ArrayProxy\n },\n 'ember-controllers/sortable': {\n 'default': Ember.SortableMixin\n },\n 'ember-debug': {\n 'log': Ember.debug,\n 'inspect': Ember.inspect,\n 'run': Ember.runInDebug,\n 'warn': Ember.warn\n },\n 'ember-debug/container-debug-adapter': {\n 'default': Ember.ContainerDebugAdapter\n },\n 'ember-debug/data-adapter': {\n 'default': Ember.DataAdapter\n },\n 'ember-deprecations': {\n 'deprecate': Ember.deprecate,\n 'deprecateFunc': Ember.deprecateFunc\n },\n 'ember-enumerable': {\n 'default': Ember.Enumerable\n },\n 'ember-evented': {\n 'default': Ember.Evented\n },\n 'ember-evented/on': {\n 'default': Ember.on\n },\n 'ember-globals-resolver': {\n 'default': Ember.DefaultResolver\n },\n 'ember-helper': {\n 'default': Ember.Helper,\n 'helper': Ember.Helper && Ember.Helper.helper\n },\n 'ember-instrumentation': {\n 'instrument': Ember.Instrumentation.instrument,\n 'reset': Ember.Instrumentation.reset,\n 'subscribe': Ember.Instrumentation.subscribe,\n 'unsubscribe': Ember.Instrumentation.unsubscribe\n },\n 'ember-locations/hash': {\n 'default': Ember.HashLocation\n },\n 'ember-locations/history': {\n 'default': Ember.HistoryLocation\n },\n 'ember-locations/none': {\n 'default': Ember.NoneLocation\n },\n 'ember-map': {\n 'default': Ember.Map,\n 'withDefault': Ember.MapWithDefault\n },\n 'ember-metal/destroy': {\n 'default': Ember.destroy\n },\n 'ember-metal/events': {\n 'addListener': Ember.addListener,\n 'removeListener': Ember.removeListener,\n 'send': Ember.sendEvent\n },\n 'ember-metal/get': {\n 'default': Ember.get,\n 'getProperties': Ember.getProperties\n },\n 'ember-metal/mixin': {\n 'default': Ember.Mixin\n },\n 'ember-metal/observer': {\n 'default': Ember.observer,\n 'addObserver': Ember.addObserver,\n 'removeObserver': Ember.removeObserver\n },\n 'ember-metal/on-load': {\n 'default': Ember.onLoad,\n 'run': Ember.runLoadHooks\n },\n 'ember-metal/set': {\n 'default': Ember.set,\n 'setProperties': Ember.setProperties,\n 'trySet': Ember.trySet\n },\n 'ember-metal/utils': {\n 'aliasMethod': Ember.aliasMethod,\n 'assert': Ember.assert,\n 'cacheFor': Ember.cacheFor,\n 'copy': Ember.copy,\n 'guidFor': Ember.guidFor\n },\n 'ember-object': {\n 'default': Ember.Object\n },\n 'ember-platform': {\n 'assign': Ember.merge,\n 'create': Ember.create,\n 'defineProperty': Ember.platform.defineProperty,\n 'hasAccessors': Ember.platform.hasPropertyAccessors,\n 'keys': Ember.keys\n },\n 'ember-route': {\n 'default': Ember.Route\n },\n 'ember-router': {\n 'default': Ember.Router\n },\n 'ember-runloop': {\n 'default': Ember.run,\n 'begin': Ember.run.begin,\n 'bind': Ember.run.bind,\n 'cancel': Ember.run.cancel,\n 'debounce': Ember.run.debounce,\n 'end': Ember.run.end,\n 'join': Ember.run.join,\n 'later': Ember.run.later,\n 'next': Ember.run.next,\n 'once': Ember.run.once,\n 'schedule': Ember.run.schedule,\n 'scheduleOnce': Ember.run.scheduleOnce,\n 'throttle': Ember.run.throttle\n },\n 'ember-service': {\n 'default': Ember.Service\n },\n 'ember-service/inject': {\n 'default': Ember.inject.service\n },\n 'ember-set/ordered': {\n 'default': Ember.OrderedSet\n },\n 'ember-string': {\n 'camelize': Ember.String.camelize,\n 'capitalize': Ember.String.capitalize,\n 'classify': Ember.String.classify,\n 'dasherize': Ember.String.dasherize,\n 'decamelize': Ember.String.decamelize,\n 'fmt': Ember.String.fmt,\n 'htmlSafe': Ember.String.htmlSafe,\n 'loc': Ember.String.loc,\n 'underscore': Ember.String.underscore,\n 'w': Ember.String.w\n },\n 'ember-utils': {\n 'isBlank': Ember.isBlank,\n 'isEmpty': Ember.isEmpty,\n 'isNone': Ember.isNone,\n 'isPresent': Ember.isPresent,\n 'tryInvoke': Ember.tryInvoke,\n 'typeOf': Ember.typeOf\n }\n };\n\n // populate `ember/computed` named exports\n shims['ember-computed'] = {\n 'default': Ember.computed\n };\n var computedMacros = [\n \"empty\",\"notEmpty\", \"none\", \"not\", \"bool\", \"match\",\n \"equal\", \"gt\", \"gte\", \"lt\", \"lte\", \"alias\", \"oneWay\",\n \"reads\", \"readOnly\", \"deprecatingAlias\",\n \"and\", \"or\", \"collect\", \"sum\", \"min\", \"max\",\n \"map\", \"sort\", \"setDiff\", \"mapBy\", \"mapProperty\",\n \"filter\", \"filterBy\", \"filterProperty\", \"uniq\",\n \"union\", \"intersect\"\n ];\n for (var i = 0, l = computedMacros.length; i < l; i++) {\n var key = computedMacros[i];\n shims['ember-computed'][key] = Ember.computed[key];\n }\n\n for (var moduleName in shims) {\n generateModule(moduleName, shims[moduleName]);\n }\n }\n\n function processTestShims() {\n if (Ember.Test) {\n var testShims = {\n 'ember-test': {\n 'default': Ember.Test\n },\n 'ember-test/adapter': {\n 'default': Ember.Test.Adapter\n },\n 'ember-test/qunit-adapter': {\n 'default': Ember.Test.QUnitAdapter\n }\n };\n\n for (var moduleName in testShims) {\n generateModule(moduleName, testShims[moduleName]);\n }\n }\n }\n\n function generateModule(name, values) {\n define(name, [], function() {\n 'use strict';\n\n return values;\n });\n }\n\n processEmberShims();\n processTestShims();\n generateModule('jquery', { 'default': self.jQuery });\n generateModule('rsvp', { 'default': Ember.RSVP });\n})();\n","/*! Hammer.JS - v2.0.7 - 2016-04-22\n * http://hammerjs.github.io/\n *\n * Copyright (c) 2016 Jorik Tangelder;\n * Licensed under the MIT license */\n(function(window, document, exportName, undefined) {\n 'use strict';\n\nvar VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o'];\nvar TEST_ELEMENT = document.createElement('div');\n\nvar TYPE_FUNCTION = 'function';\n\nvar round = Math.round;\nvar abs = Math.abs;\nvar now = Date.now;\n\n/**\n * set a timeout with a given scope\n * @param {Function} fn\n * @param {Number} timeout\n * @param {Object} context\n * @returns {number}\n */\nfunction setTimeoutContext(fn, timeout, context) {\n return setTimeout(bindFn(fn, context), timeout);\n}\n\n/**\n * if the argument is an array, we want to execute the fn on each entry\n * if it aint an array we don't want to do a thing.\n * this is used by all the methods that accept a single and array argument.\n * @param {*|Array} arg\n * @param {String} fn\n * @param {Object} [context]\n * @returns {Boolean}\n */\nfunction invokeArrayArg(arg, fn, context) {\n if (Array.isArray(arg)) {\n each(arg, context[fn], context);\n return true;\n }\n return false;\n}\n\n/**\n * walk objects and arrays\n * @param {Object} obj\n * @param {Function} iterator\n * @param {Object} context\n */\nfunction each(obj, iterator, context) {\n var i;\n\n if (!obj) {\n return;\n }\n\n if (obj.forEach) {\n obj.forEach(iterator, context);\n } else if (obj.length !== undefined) {\n i = 0;\n while (i < obj.length) {\n iterator.call(context, obj[i], i, obj);\n i++;\n }\n } else {\n for (i in obj) {\n obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj);\n }\n }\n}\n\n/**\n * wrap a method with a deprecation warning and stack trace\n * @param {Function} method\n * @param {String} name\n * @param {String} message\n * @returns {Function} A new function wrapping the supplied method.\n */\nfunction deprecate(method, name, message) {\n var deprecationMessage = 'DEPRECATED METHOD: ' + name + '\\n' + message + ' AT \\n';\n return function() {\n var e = new Error('get-stack-trace');\n var stack = e && e.stack ? e.stack.replace(/^[^\\(]+?[\\n$]/gm, '')\n .replace(/^\\s+at\\s+/gm, '')\n .replace(/^Object.\\s*\\(/gm, '{anonymous}()@') : 'Unknown Stack Trace';\n\n var log = window.console && (window.console.warn || window.console.log);\n if (log) {\n log.call(window.console, deprecationMessage, stack);\n }\n return method.apply(this, arguments);\n };\n}\n\n/**\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} target\n * @param {...Object} objects_to_assign\n * @returns {Object} target\n */\nvar assign;\nif (typeof Object.assign !== 'function') {\n assign = function assign(target) {\n if (target === undefined || target === null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n var output = Object(target);\n for (var index = 1; index < arguments.length; index++) {\n var source = arguments[index];\n if (source !== undefined && source !== null) {\n for (var nextKey in source) {\n if (source.hasOwnProperty(nextKey)) {\n output[nextKey] = source[nextKey];\n }\n }\n }\n }\n return output;\n };\n} else {\n assign = Object.assign;\n}\n\n/**\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} dest\n * @param {Object} src\n * @param {Boolean} [merge=false]\n * @returns {Object} dest\n */\nvar extend = deprecate(function extend(dest, src, merge) {\n var keys = Object.keys(src);\n var i = 0;\n while (i < keys.length) {\n if (!merge || (merge && dest[keys[i]] === undefined)) {\n dest[keys[i]] = src[keys[i]];\n }\n i++;\n }\n return dest;\n}, 'extend', 'Use `assign`.');\n\n/**\n * merge the values from src in the dest.\n * means that properties that exist in dest will not be overwritten by src\n * @param {Object} dest\n * @param {Object} src\n * @returns {Object} dest\n */\nvar merge = deprecate(function merge(dest, src) {\n return extend(dest, src, true);\n}, 'merge', 'Use `assign`.');\n\n/**\n * simple class inheritance\n * @param {Function} child\n * @param {Function} base\n * @param {Object} [properties]\n */\nfunction inherit(child, base, properties) {\n var baseP = base.prototype,\n childP;\n\n childP = child.prototype = Object.create(baseP);\n childP.constructor = child;\n childP._super = baseP;\n\n if (properties) {\n assign(childP, properties);\n }\n}\n\n/**\n * simple function bind\n * @param {Function} fn\n * @param {Object} context\n * @returns {Function}\n */\nfunction bindFn(fn, context) {\n return function boundFn() {\n return fn.apply(context, arguments);\n };\n}\n\n/**\n * let a boolean value also be a function that must return a boolean\n * this first item in args will be used as the context\n * @param {Boolean|Function} val\n * @param {Array} [args]\n * @returns {Boolean}\n */\nfunction boolOrFn(val, args) {\n if (typeof val == TYPE_FUNCTION) {\n return val.apply(args ? args[0] || undefined : undefined, args);\n }\n return val;\n}\n\n/**\n * use the val2 when val1 is undefined\n * @param {*} val1\n * @param {*} val2\n * @returns {*}\n */\nfunction ifUndefined(val1, val2) {\n return (val1 === undefined) ? val2 : val1;\n}\n\n/**\n * addEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\nfunction addEventListeners(target, types, handler) {\n each(splitStr(types), function(type) {\n target.addEventListener(type, handler, false);\n });\n}\n\n/**\n * removeEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\nfunction removeEventListeners(target, types, handler) {\n each(splitStr(types), function(type) {\n target.removeEventListener(type, handler, false);\n });\n}\n\n/**\n * find if a node is in the given parent\n * @method hasParent\n * @param {HTMLElement} node\n * @param {HTMLElement} parent\n * @return {Boolean} found\n */\nfunction hasParent(node, parent) {\n while (node) {\n if (node == parent) {\n return true;\n }\n node = node.parentNode;\n }\n return false;\n}\n\n/**\n * small indexOf wrapper\n * @param {String} str\n * @param {String} find\n * @returns {Boolean} found\n */\nfunction inStr(str, find) {\n return str.indexOf(find) > -1;\n}\n\n/**\n * split string on whitespace\n * @param {String} str\n * @returns {Array} words\n */\nfunction splitStr(str) {\n return str.trim().split(/\\s+/g);\n}\n\n/**\n * find if a array contains the object using indexOf or a simple polyFill\n * @param {Array} src\n * @param {String} find\n * @param {String} [findByKey]\n * @return {Boolean|Number} false when not found, or the index\n */\nfunction inArray(src, find, findByKey) {\n if (src.indexOf && !findByKey) {\n return src.indexOf(find);\n } else {\n var i = 0;\n while (i < src.length) {\n if ((findByKey && src[i][findByKey] == find) || (!findByKey && src[i] === find)) {\n return i;\n }\n i++;\n }\n return -1;\n }\n}\n\n/**\n * convert array-like objects to real arrays\n * @param {Object} obj\n * @returns {Array}\n */\nfunction toArray(obj) {\n return Array.prototype.slice.call(obj, 0);\n}\n\n/**\n * unique array with objects based on a key (like 'id') or just by the array's value\n * @param {Array} src [{id:1},{id:2},{id:1}]\n * @param {String} [key]\n * @param {Boolean} [sort=False]\n * @returns {Array} [{id:1},{id:2}]\n */\nfunction uniqueArray(src, key, sort) {\n var results = [];\n var values = [];\n var i = 0;\n\n while (i < src.length) {\n var val = key ? src[i][key] : src[i];\n if (inArray(values, val) < 0) {\n results.push(src[i]);\n }\n values[i] = val;\n i++;\n }\n\n if (sort) {\n if (!key) {\n results = results.sort();\n } else {\n results = results.sort(function sortUniqueArray(a, b) {\n return a[key] > b[key];\n });\n }\n }\n\n return results;\n}\n\n/**\n * get the prefixed property\n * @param {Object} obj\n * @param {String} property\n * @returns {String|Undefined} prefixed\n */\nfunction prefixed(obj, property) {\n var prefix, prop;\n var camelProp = property[0].toUpperCase() + property.slice(1);\n\n var i = 0;\n while (i < VENDOR_PREFIXES.length) {\n prefix = VENDOR_PREFIXES[i];\n prop = (prefix) ? prefix + camelProp : property;\n\n if (prop in obj) {\n return prop;\n }\n i++;\n }\n return undefined;\n}\n\n/**\n * get a unique id\n * @returns {number} uniqueId\n */\nvar _uniqueId = 1;\nfunction uniqueId() {\n return _uniqueId++;\n}\n\n/**\n * get the window object of an element\n * @param {HTMLElement} element\n * @returns {DocumentView|Window}\n */\nfunction getWindowForElement(element) {\n var doc = element.ownerDocument || element;\n return (doc.defaultView || doc.parentWindow || window);\n}\n\nvar MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i;\n\nvar SUPPORT_TOUCH = ('ontouchstart' in window);\nvar SUPPORT_POINTER_EVENTS = prefixed(window, 'PointerEvent') !== undefined;\nvar SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent);\n\nvar INPUT_TYPE_TOUCH = 'touch';\nvar INPUT_TYPE_PEN = 'pen';\nvar INPUT_TYPE_MOUSE = 'mouse';\nvar INPUT_TYPE_KINECT = 'kinect';\n\nvar COMPUTE_INTERVAL = 25;\n\nvar INPUT_START = 1;\nvar INPUT_MOVE = 2;\nvar INPUT_END = 4;\nvar INPUT_CANCEL = 8;\n\nvar DIRECTION_NONE = 1;\nvar DIRECTION_LEFT = 2;\nvar DIRECTION_RIGHT = 4;\nvar DIRECTION_UP = 8;\nvar DIRECTION_DOWN = 16;\n\nvar DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT;\nvar DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN;\nvar DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL;\n\nvar PROPS_XY = ['x', 'y'];\nvar PROPS_CLIENT_XY = ['clientX', 'clientY'];\n\n/**\n * create new input type manager\n * @param {Manager} manager\n * @param {Function} callback\n * @returns {Input}\n * @constructor\n */\nfunction Input(manager, callback) {\n var self = this;\n this.manager = manager;\n this.callback = callback;\n this.element = manager.element;\n this.target = manager.options.inputTarget;\n\n // smaller wrapper around the handler, for the scope and the enabled state of the manager,\n // so when disabled the input events are completely bypassed.\n this.domHandler = function(ev) {\n if (boolOrFn(manager.options.enable, [manager])) {\n self.handler(ev);\n }\n };\n\n this.init();\n\n}\n\nInput.prototype = {\n /**\n * should handle the inputEvent data and trigger the callback\n * @virtual\n */\n handler: function() { },\n\n /**\n * bind the events\n */\n init: function() {\n this.evEl && addEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n },\n\n /**\n * unbind the events\n */\n destroy: function() {\n this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n }\n};\n\n/**\n * create new input type manager\n * called by the Manager constructor\n * @param {Hammer} manager\n * @returns {Input}\n */\nfunction createInputInstance(manager) {\n var Type;\n var inputClass = manager.options.inputClass;\n\n if (inputClass) {\n Type = inputClass;\n } else if (SUPPORT_POINTER_EVENTS) {\n Type = PointerEventInput;\n } else if (SUPPORT_ONLY_TOUCH) {\n Type = TouchInput;\n } else if (!SUPPORT_TOUCH) {\n Type = MouseInput;\n } else {\n Type = TouchMouseInput;\n }\n return new (Type)(manager, inputHandler);\n}\n\n/**\n * handle input events\n * @param {Manager} manager\n * @param {String} eventType\n * @param {Object} input\n */\nfunction inputHandler(manager, eventType, input) {\n var pointersLen = input.pointers.length;\n var changedPointersLen = input.changedPointers.length;\n var isFirst = (eventType & INPUT_START && (pointersLen - changedPointersLen === 0));\n var isFinal = (eventType & (INPUT_END | INPUT_CANCEL) && (pointersLen - changedPointersLen === 0));\n\n input.isFirst = !!isFirst;\n input.isFinal = !!isFinal;\n\n if (isFirst) {\n manager.session = {};\n }\n\n // source event is the normalized value of the domEvents\n // like 'touchstart, mouseup, pointerdown'\n input.eventType = eventType;\n\n // compute scale, rotation etc\n computeInputData(manager, input);\n\n // emit secret event\n manager.emit('hammer.input', input);\n\n manager.recognize(input);\n manager.session.prevInput = input;\n}\n\n/**\n * extend the data with some usable properties like scale, rotate, velocity etc\n * @param {Object} manager\n * @param {Object} input\n */\nfunction computeInputData(manager, input) {\n var session = manager.session;\n var pointers = input.pointers;\n var pointersLength = pointers.length;\n\n // store the first input to calculate the distance and direction\n if (!session.firstInput) {\n session.firstInput = simpleCloneInputData(input);\n }\n\n // to compute scale and rotation we need to store the multiple touches\n if (pointersLength > 1 && !session.firstMultiple) {\n session.firstMultiple = simpleCloneInputData(input);\n } else if (pointersLength === 1) {\n session.firstMultiple = false;\n }\n\n var firstInput = session.firstInput;\n var firstMultiple = session.firstMultiple;\n var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center;\n\n var center = input.center = getCenter(pointers);\n input.timeStamp = now();\n input.deltaTime = input.timeStamp - firstInput.timeStamp;\n\n input.angle = getAngle(offsetCenter, center);\n input.distance = getDistance(offsetCenter, center);\n\n computeDeltaXY(session, input);\n input.offsetDirection = getDirection(input.deltaX, input.deltaY);\n\n var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY);\n input.overallVelocityX = overallVelocity.x;\n input.overallVelocityY = overallVelocity.y;\n input.overallVelocity = (abs(overallVelocity.x) > abs(overallVelocity.y)) ? overallVelocity.x : overallVelocity.y;\n\n input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1;\n input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0;\n\n input.maxPointers = !session.prevInput ? input.pointers.length : ((input.pointers.length >\n session.prevInput.maxPointers) ? input.pointers.length : session.prevInput.maxPointers);\n\n computeIntervalInputData(session, input);\n\n // find the correct target\n var target = manager.element;\n if (hasParent(input.srcEvent.target, target)) {\n target = input.srcEvent.target;\n }\n input.target = target;\n}\n\nfunction computeDeltaXY(session, input) {\n var center = input.center;\n var offset = session.offsetDelta || {};\n var prevDelta = session.prevDelta || {};\n var prevInput = session.prevInput || {};\n\n if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) {\n prevDelta = session.prevDelta = {\n x: prevInput.deltaX || 0,\n y: prevInput.deltaY || 0\n };\n\n offset = session.offsetDelta = {\n x: center.x,\n y: center.y\n };\n }\n\n input.deltaX = prevDelta.x + (center.x - offset.x);\n input.deltaY = prevDelta.y + (center.y - offset.y);\n}\n\n/**\n * velocity is calculated every x ms\n * @param {Object} session\n * @param {Object} input\n */\nfunction computeIntervalInputData(session, input) {\n var last = session.lastInterval || input,\n deltaTime = input.timeStamp - last.timeStamp,\n velocity, velocityX, velocityY, direction;\n\n if (input.eventType != INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) {\n var deltaX = input.deltaX - last.deltaX;\n var deltaY = input.deltaY - last.deltaY;\n\n var v = getVelocity(deltaTime, deltaX, deltaY);\n velocityX = v.x;\n velocityY = v.y;\n velocity = (abs(v.x) > abs(v.y)) ? v.x : v.y;\n direction = getDirection(deltaX, deltaY);\n\n session.lastInterval = input;\n } else {\n // use latest velocity info if it doesn't overtake a minimum period\n velocity = last.velocity;\n velocityX = last.velocityX;\n velocityY = last.velocityY;\n direction = last.direction;\n }\n\n input.velocity = velocity;\n input.velocityX = velocityX;\n input.velocityY = velocityY;\n input.direction = direction;\n}\n\n/**\n * create a simple clone from the input used for storage of firstInput and firstMultiple\n * @param {Object} input\n * @returns {Object} clonedInputData\n */\nfunction simpleCloneInputData(input) {\n // make a simple copy of the pointers because we will get a reference if we don't\n // we only need clientXY for the calculations\n var pointers = [];\n var i = 0;\n while (i < input.pointers.length) {\n pointers[i] = {\n clientX: round(input.pointers[i].clientX),\n clientY: round(input.pointers[i].clientY)\n };\n i++;\n }\n\n return {\n timeStamp: now(),\n pointers: pointers,\n center: getCenter(pointers),\n deltaX: input.deltaX,\n deltaY: input.deltaY\n };\n}\n\n/**\n * get the center of all the pointers\n * @param {Array} pointers\n * @return {Object} center contains `x` and `y` properties\n */\nfunction getCenter(pointers) {\n var pointersLength = pointers.length;\n\n // no need to loop when only one touch\n if (pointersLength === 1) {\n return {\n x: round(pointers[0].clientX),\n y: round(pointers[0].clientY)\n };\n }\n\n var x = 0, y = 0, i = 0;\n while (i < pointersLength) {\n x += pointers[i].clientX;\n y += pointers[i].clientY;\n i++;\n }\n\n return {\n x: round(x / pointersLength),\n y: round(y / pointersLength)\n };\n}\n\n/**\n * calculate the velocity between two points. unit is in px per ms.\n * @param {Number} deltaTime\n * @param {Number} x\n * @param {Number} y\n * @return {Object} velocity `x` and `y`\n */\nfunction getVelocity(deltaTime, x, y) {\n return {\n x: x / deltaTime || 0,\n y: y / deltaTime || 0\n };\n}\n\n/**\n * get the direction between two points\n * @param {Number} x\n * @param {Number} y\n * @return {Number} direction\n */\nfunction getDirection(x, y) {\n if (x === y) {\n return DIRECTION_NONE;\n }\n\n if (abs(x) >= abs(y)) {\n return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;\n }\n return y < 0 ? DIRECTION_UP : DIRECTION_DOWN;\n}\n\n/**\n * calculate the absolute distance between two points\n * @param {Object} p1 {x, y}\n * @param {Object} p2 {x, y}\n * @param {Array} [props] containing x and y keys\n * @return {Number} distance\n */\nfunction getDistance(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n var x = p2[props[0]] - p1[props[0]],\n y = p2[props[1]] - p1[props[1]];\n\n return Math.sqrt((x * x) + (y * y));\n}\n\n/**\n * calculate the angle between two coordinates\n * @param {Object} p1\n * @param {Object} p2\n * @param {Array} [props] containing x and y keys\n * @return {Number} angle\n */\nfunction getAngle(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n var x = p2[props[0]] - p1[props[0]],\n y = p2[props[1]] - p1[props[1]];\n return Math.atan2(y, x) * 180 / Math.PI;\n}\n\n/**\n * calculate the rotation degrees between two pointersets\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} rotation\n */\nfunction getRotation(start, end) {\n return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY);\n}\n\n/**\n * calculate the scale factor between two pointersets\n * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} scale\n */\nfunction getScale(start, end) {\n return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY);\n}\n\nvar MOUSE_INPUT_MAP = {\n mousedown: INPUT_START,\n mousemove: INPUT_MOVE,\n mouseup: INPUT_END\n};\n\nvar MOUSE_ELEMENT_EVENTS = 'mousedown';\nvar MOUSE_WINDOW_EVENTS = 'mousemove mouseup';\n\n/**\n * Mouse events input\n * @constructor\n * @extends Input\n */\nfunction MouseInput() {\n this.evEl = MOUSE_ELEMENT_EVENTS;\n this.evWin = MOUSE_WINDOW_EVENTS;\n\n this.pressed = false; // mousedown state\n\n Input.apply(this, arguments);\n}\n\ninherit(MouseInput, Input, {\n /**\n * handle mouse events\n * @param {Object} ev\n */\n handler: function MEhandler(ev) {\n var eventType = MOUSE_INPUT_MAP[ev.type];\n\n // on start we want to have the left mouse button down\n if (eventType & INPUT_START && ev.button === 0) {\n this.pressed = true;\n }\n\n if (eventType & INPUT_MOVE && ev.which !== 1) {\n eventType = INPUT_END;\n }\n\n // mouse must be down\n if (!this.pressed) {\n return;\n }\n\n if (eventType & INPUT_END) {\n this.pressed = false;\n }\n\n this.callback(this.manager, eventType, {\n pointers: [ev],\n changedPointers: [ev],\n pointerType: INPUT_TYPE_MOUSE,\n srcEvent: ev\n });\n }\n});\n\nvar POINTER_INPUT_MAP = {\n pointerdown: INPUT_START,\n pointermove: INPUT_MOVE,\n pointerup: INPUT_END,\n pointercancel: INPUT_CANCEL,\n pointerout: INPUT_CANCEL\n};\n\n// in IE10 the pointer types is defined as an enum\nvar IE10_POINTER_TYPE_ENUM = {\n 2: INPUT_TYPE_TOUCH,\n 3: INPUT_TYPE_PEN,\n 4: INPUT_TYPE_MOUSE,\n 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816\n};\n\nvar POINTER_ELEMENT_EVENTS = 'pointerdown';\nvar POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel';\n\n// IE10 has prefixed support, and case-sensitive\nif (window.MSPointerEvent && !window.PointerEvent) {\n POINTER_ELEMENT_EVENTS = 'MSPointerDown';\n POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel';\n}\n\n/**\n * Pointer events input\n * @constructor\n * @extends Input\n */\nfunction PointerEventInput() {\n this.evEl = POINTER_ELEMENT_EVENTS;\n this.evWin = POINTER_WINDOW_EVENTS;\n\n Input.apply(this, arguments);\n\n this.store = (this.manager.session.pointerEvents = []);\n}\n\ninherit(PointerEventInput, Input, {\n /**\n * handle mouse events\n * @param {Object} ev\n */\n handler: function PEhandler(ev) {\n var store = this.store;\n var removePointer = false;\n\n var eventTypeNormalized = ev.type.toLowerCase().replace('ms', '');\n var eventType = POINTER_INPUT_MAP[eventTypeNormalized];\n var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType;\n\n var isTouch = (pointerType == INPUT_TYPE_TOUCH);\n\n // get index of the event in the store\n var storeIndex = inArray(store, ev.pointerId, 'pointerId');\n\n // start and mouse must be down\n if (eventType & INPUT_START && (ev.button === 0 || isTouch)) {\n if (storeIndex < 0) {\n store.push(ev);\n storeIndex = store.length - 1;\n }\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n removePointer = true;\n }\n\n // it not found, so the pointer hasn't been down (so it's probably a hover)\n if (storeIndex < 0) {\n return;\n }\n\n // update the event in the store\n store[storeIndex] = ev;\n\n this.callback(this.manager, eventType, {\n pointers: store,\n changedPointers: [ev],\n pointerType: pointerType,\n srcEvent: ev\n });\n\n if (removePointer) {\n // remove from the store\n store.splice(storeIndex, 1);\n }\n }\n});\n\nvar SINGLE_TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n};\n\nvar SINGLE_TOUCH_TARGET_EVENTS = 'touchstart';\nvar SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel';\n\n/**\n * Touch events input\n * @constructor\n * @extends Input\n */\nfunction SingleTouchInput() {\n this.evTarget = SINGLE_TOUCH_TARGET_EVENTS;\n this.evWin = SINGLE_TOUCH_WINDOW_EVENTS;\n this.started = false;\n\n Input.apply(this, arguments);\n}\n\ninherit(SingleTouchInput, Input, {\n handler: function TEhandler(ev) {\n var type = SINGLE_TOUCH_INPUT_MAP[ev.type];\n\n // should we handle the touch events?\n if (type === INPUT_START) {\n this.started = true;\n }\n\n if (!this.started) {\n return;\n }\n\n var touches = normalizeSingleTouches.call(this, ev, type);\n\n // when done, reset the started state\n if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) {\n this.started = false;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n }\n});\n\n/**\n * @this {TouchInput}\n * @param {Object} ev\n * @param {Number} type flag\n * @returns {undefined|Array} [all, changed]\n */\nfunction normalizeSingleTouches(ev, type) {\n var all = toArray(ev.touches);\n var changed = toArray(ev.changedTouches);\n\n if (type & (INPUT_END | INPUT_CANCEL)) {\n all = uniqueArray(all.concat(changed), 'identifier', true);\n }\n\n return [all, changed];\n}\n\nvar TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n};\n\nvar TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel';\n\n/**\n * Multi-user touch events input\n * @constructor\n * @extends Input\n */\nfunction TouchInput() {\n this.evTarget = TOUCH_TARGET_EVENTS;\n this.targetIds = {};\n\n Input.apply(this, arguments);\n}\n\ninherit(TouchInput, Input, {\n handler: function MTEhandler(ev) {\n var type = TOUCH_INPUT_MAP[ev.type];\n var touches = getTouches.call(this, ev, type);\n if (!touches) {\n return;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n }\n});\n\n/**\n * @this {TouchInput}\n * @param {Object} ev\n * @param {Number} type flag\n * @returns {undefined|Array} [all, changed]\n */\nfunction getTouches(ev, type) {\n var allTouches = toArray(ev.touches);\n var targetIds = this.targetIds;\n\n // when there is only one touch, the process can be simplified\n if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) {\n targetIds[allTouches[0].identifier] = true;\n return [allTouches, allTouches];\n }\n\n var i,\n targetTouches,\n changedTouches = toArray(ev.changedTouches),\n changedTargetTouches = [],\n target = this.target;\n\n // get target touches from touches\n targetTouches = allTouches.filter(function(touch) {\n return hasParent(touch.target, target);\n });\n\n // collect touches\n if (type === INPUT_START) {\n i = 0;\n while (i < targetTouches.length) {\n targetIds[targetTouches[i].identifier] = true;\n i++;\n }\n }\n\n // filter changed touches to only contain touches that exist in the collected target ids\n i = 0;\n while (i < changedTouches.length) {\n if (targetIds[changedTouches[i].identifier]) {\n changedTargetTouches.push(changedTouches[i]);\n }\n\n // cleanup removed touches\n if (type & (INPUT_END | INPUT_CANCEL)) {\n delete targetIds[changedTouches[i].identifier];\n }\n i++;\n }\n\n if (!changedTargetTouches.length) {\n return;\n }\n\n return [\n // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'\n uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true),\n changedTargetTouches\n ];\n}\n\n/**\n * Combined touch and mouse input\n *\n * Touch has a higher priority then mouse, and while touching no mouse events are allowed.\n * This because touch devices also emit mouse events while doing a touch.\n *\n * @constructor\n * @extends Input\n */\n\nvar DEDUP_TIMEOUT = 2500;\nvar DEDUP_DISTANCE = 25;\n\nfunction TouchMouseInput() {\n Input.apply(this, arguments);\n\n var handler = bindFn(this.handler, this);\n this.touch = new TouchInput(this.manager, handler);\n this.mouse = new MouseInput(this.manager, handler);\n\n this.primaryTouch = null;\n this.lastTouches = [];\n}\n\ninherit(TouchMouseInput, Input, {\n /**\n * handle mouse and touch events\n * @param {Hammer} manager\n * @param {String} inputEvent\n * @param {Object} inputData\n */\n handler: function TMEhandler(manager, inputEvent, inputData) {\n var isTouch = (inputData.pointerType == INPUT_TYPE_TOUCH),\n isMouse = (inputData.pointerType == INPUT_TYPE_MOUSE);\n\n if (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) {\n return;\n }\n\n // when we're in a touch event, record touches to de-dupe synthetic mouse event\n if (isTouch) {\n recordTouches.call(this, inputEvent, inputData);\n } else if (isMouse && isSyntheticEvent.call(this, inputData)) {\n return;\n }\n\n this.callback(manager, inputEvent, inputData);\n },\n\n /**\n * remove the event listeners\n */\n destroy: function destroy() {\n this.touch.destroy();\n this.mouse.destroy();\n }\n});\n\nfunction recordTouches(eventType, eventData) {\n if (eventType & INPUT_START) {\n this.primaryTouch = eventData.changedPointers[0].identifier;\n setLastTouch.call(this, eventData);\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n setLastTouch.call(this, eventData);\n }\n}\n\nfunction setLastTouch(eventData) {\n var touch = eventData.changedPointers[0];\n\n if (touch.identifier === this.primaryTouch) {\n var lastTouch = {x: touch.clientX, y: touch.clientY};\n this.lastTouches.push(lastTouch);\n var lts = this.lastTouches;\n var removeLastTouch = function() {\n var i = lts.indexOf(lastTouch);\n if (i > -1) {\n lts.splice(i, 1);\n }\n };\n setTimeout(removeLastTouch, DEDUP_TIMEOUT);\n }\n}\n\nfunction isSyntheticEvent(eventData) {\n var x = eventData.srcEvent.clientX, y = eventData.srcEvent.clientY;\n for (var i = 0; i < this.lastTouches.length; i++) {\n var t = this.lastTouches[i];\n var dx = Math.abs(x - t.x), dy = Math.abs(y - t.y);\n if (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) {\n return true;\n }\n }\n return false;\n}\n\nvar PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction');\nvar NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined;\n\n// magical touchAction value\nvar TOUCH_ACTION_COMPUTE = 'compute';\nvar TOUCH_ACTION_AUTO = 'auto';\nvar TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented\nvar TOUCH_ACTION_NONE = 'none';\nvar TOUCH_ACTION_PAN_X = 'pan-x';\nvar TOUCH_ACTION_PAN_Y = 'pan-y';\nvar TOUCH_ACTION_MAP = getTouchActionProps();\n\n/**\n * Touch Action\n * sets the touchAction property or uses the js alternative\n * @param {Manager} manager\n * @param {String} value\n * @constructor\n */\nfunction TouchAction(manager, value) {\n this.manager = manager;\n this.set(value);\n}\n\nTouchAction.prototype = {\n /**\n * set the touchAction value on the element or enable the polyfill\n * @param {String} value\n */\n set: function(value) {\n // find out the touch-action by the event handlers\n if (value == TOUCH_ACTION_COMPUTE) {\n value = this.compute();\n }\n\n if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) {\n this.manager.element.style[PREFIXED_TOUCH_ACTION] = value;\n }\n this.actions = value.toLowerCase().trim();\n },\n\n /**\n * just re-set the touchAction value\n */\n update: function() {\n this.set(this.manager.options.touchAction);\n },\n\n /**\n * compute the value for the touchAction property based on the recognizer's settings\n * @returns {String} value\n */\n compute: function() {\n var actions = [];\n each(this.manager.recognizers, function(recognizer) {\n if (boolOrFn(recognizer.options.enable, [recognizer])) {\n actions = actions.concat(recognizer.getTouchAction());\n }\n });\n return cleanTouchActions(actions.join(' '));\n },\n\n /**\n * this method is called on each input cycle and provides the preventing of the browser behavior\n * @param {Object} input\n */\n preventDefaults: function(input) {\n var srcEvent = input.srcEvent;\n var direction = input.offsetDirection;\n\n // if the touch action did prevented once this session\n if (this.manager.session.prevented) {\n srcEvent.preventDefault();\n return;\n }\n\n var actions = this.actions;\n var hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE];\n var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y];\n var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X];\n\n if (hasNone) {\n //do not prevent defaults if this is a tap gesture\n\n var isTapPointer = input.pointers.length === 1;\n var isTapMovement = input.distance < 2;\n var isTapTouchTime = input.deltaTime < 250;\n\n if (isTapPointer && isTapMovement && isTapTouchTime) {\n return;\n }\n }\n\n if (hasPanX && hasPanY) {\n // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent\n return;\n }\n\n if (hasNone ||\n (hasPanY && direction & DIRECTION_HORIZONTAL) ||\n (hasPanX && direction & DIRECTION_VERTICAL)) {\n return this.preventSrc(srcEvent);\n }\n },\n\n /**\n * call preventDefault to prevent the browser's default behavior (scrolling in most cases)\n * @param {Object} srcEvent\n */\n preventSrc: function(srcEvent) {\n this.manager.session.prevented = true;\n srcEvent.preventDefault();\n }\n};\n\n/**\n * when the touchActions are collected they are not a valid value, so we need to clean things up. *\n * @param {String} actions\n * @returns {*}\n */\nfunction cleanTouchActions(actions) {\n // none\n if (inStr(actions, TOUCH_ACTION_NONE)) {\n return TOUCH_ACTION_NONE;\n }\n\n var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X);\n var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y);\n\n // if both pan-x and pan-y are set (different recognizers\n // for different directions, e.g. horizontal pan but vertical swipe?)\n // we need none (as otherwise with pan-x pan-y combined none of these\n // recognizers will work, since the browser would handle all panning\n if (hasPanX && hasPanY) {\n return TOUCH_ACTION_NONE;\n }\n\n // pan-x OR pan-y\n if (hasPanX || hasPanY) {\n return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y;\n }\n\n // manipulation\n if (inStr(actions, TOUCH_ACTION_MANIPULATION)) {\n return TOUCH_ACTION_MANIPULATION;\n }\n\n return TOUCH_ACTION_AUTO;\n}\n\nfunction getTouchActionProps() {\n if (!NATIVE_TOUCH_ACTION) {\n return false;\n }\n var touchMap = {};\n var cssSupports = window.CSS && window.CSS.supports;\n ['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach(function(val) {\n\n // If css.supports is not supported but there is native touch-action assume it supports\n // all values. This is the case for IE 10 and 11.\n touchMap[val] = cssSupports ? window.CSS.supports('touch-action', val) : true;\n });\n return touchMap;\n}\n\n/**\n * Recognizer flow explained; *\n * All recognizers have the initial state of POSSIBLE when a input session starts.\n * The definition of a input session is from the first input until the last input, with all it's movement in it. *\n * Example session for mouse-input: mousedown -> mousemove -> mouseup\n *\n * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed\n * which determines with state it should be.\n *\n * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to\n * POSSIBLE to give it another change on the next cycle.\n *\n * Possible\n * |\n * +-----+---------------+\n * | |\n * +-----+-----+ |\n * | | |\n * Failed Cancelled |\n * +-------+------+\n * | |\n * Recognized Began\n * |\n * Changed\n * |\n * Ended/Recognized\n */\nvar STATE_POSSIBLE = 1;\nvar STATE_BEGAN = 2;\nvar STATE_CHANGED = 4;\nvar STATE_ENDED = 8;\nvar STATE_RECOGNIZED = STATE_ENDED;\nvar STATE_CANCELLED = 16;\nvar STATE_FAILED = 32;\n\n/**\n * Recognizer\n * Every recognizer needs to extend from this class.\n * @constructor\n * @param {Object} options\n */\nfunction Recognizer(options) {\n this.options = assign({}, this.defaults, options || {});\n\n this.id = uniqueId();\n\n this.manager = null;\n\n // default is enable true\n this.options.enable = ifUndefined(this.options.enable, true);\n\n this.state = STATE_POSSIBLE;\n\n this.simultaneous = {};\n this.requireFail = [];\n}\n\nRecognizer.prototype = {\n /**\n * @virtual\n * @type {Object}\n */\n defaults: {},\n\n /**\n * set options\n * @param {Object} options\n * @return {Recognizer}\n */\n set: function(options) {\n assign(this.options, options);\n\n // also update the touchAction, in case something changed about the directions/enabled state\n this.manager && this.manager.touchAction.update();\n return this;\n },\n\n /**\n * recognize simultaneous with an other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n recognizeWith: function(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) {\n return this;\n }\n\n var simultaneous = this.simultaneous;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n if (!simultaneous[otherRecognizer.id]) {\n simultaneous[otherRecognizer.id] = otherRecognizer;\n otherRecognizer.recognizeWith(this);\n }\n return this;\n },\n\n /**\n * drop the simultaneous link. it doesnt remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n dropRecognizeWith: function(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n delete this.simultaneous[otherRecognizer.id];\n return this;\n },\n\n /**\n * recognizer can only run when an other is failing\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n requireFailure: function(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) {\n return this;\n }\n\n var requireFail = this.requireFail;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n if (inArray(requireFail, otherRecognizer) === -1) {\n requireFail.push(otherRecognizer);\n otherRecognizer.requireFailure(this);\n }\n return this;\n },\n\n /**\n * drop the requireFailure link. it does not remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n dropRequireFailure: function(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n var index = inArray(this.requireFail, otherRecognizer);\n if (index > -1) {\n this.requireFail.splice(index, 1);\n }\n return this;\n },\n\n /**\n * has require failures boolean\n * @returns {boolean}\n */\n hasRequireFailures: function() {\n return this.requireFail.length > 0;\n },\n\n /**\n * if the recognizer can recognize simultaneous with an other recognizer\n * @param {Recognizer} otherRecognizer\n * @returns {Boolean}\n */\n canRecognizeWith: function(otherRecognizer) {\n return !!this.simultaneous[otherRecognizer.id];\n },\n\n /**\n * You should use `tryEmit` instead of `emit` directly to check\n * that all the needed recognizers has failed before emitting.\n * @param {Object} input\n */\n emit: function(input) {\n var self = this;\n var state = this.state;\n\n function emit(event) {\n self.manager.emit(event, input);\n }\n\n // 'panstart' and 'panmove'\n if (state < STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n\n emit(self.options.event); // simple 'eventName' events\n\n if (input.additionalEvent) { // additional event(panleft, panright, pinchin, pinchout...)\n emit(input.additionalEvent);\n }\n\n // panend and pancancel\n if (state >= STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n },\n\n /**\n * Check that all the require failure recognizers has failed,\n * if true, it emits a gesture event,\n * otherwise, setup the state to FAILED.\n * @param {Object} input\n */\n tryEmit: function(input) {\n if (this.canEmit()) {\n return this.emit(input);\n }\n // it's failing anyway\n this.state = STATE_FAILED;\n },\n\n /**\n * can we emit?\n * @returns {boolean}\n */\n canEmit: function() {\n var i = 0;\n while (i < this.requireFail.length) {\n if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) {\n return false;\n }\n i++;\n }\n return true;\n },\n\n /**\n * update the recognizer\n * @param {Object} inputData\n */\n recognize: function(inputData) {\n // make a new copy of the inputData\n // so we can change the inputData without messing up the other recognizers\n var inputDataClone = assign({}, inputData);\n\n // is is enabled and allow recognizing?\n if (!boolOrFn(this.options.enable, [this, inputDataClone])) {\n this.reset();\n this.state = STATE_FAILED;\n return;\n }\n\n // reset when we've reached the end\n if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) {\n this.state = STATE_POSSIBLE;\n }\n\n this.state = this.process(inputDataClone);\n\n // the recognizer has recognized a gesture\n // so trigger an event\n if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) {\n this.tryEmit(inputDataClone);\n }\n },\n\n /**\n * return the state of the recognizer\n * the actual recognizing happens in this method\n * @virtual\n * @param {Object} inputData\n * @returns {Const} STATE\n */\n process: function(inputData) { }, // jshint ignore:line\n\n /**\n * return the preferred touch-action\n * @virtual\n * @returns {Array}\n */\n getTouchAction: function() { },\n\n /**\n * called when the gesture isn't allowed to recognize\n * like when another is being recognized or it is disabled\n * @virtual\n */\n reset: function() { }\n};\n\n/**\n * get a usable string, used as event postfix\n * @param {Const} state\n * @returns {String} state\n */\nfunction stateStr(state) {\n if (state & STATE_CANCELLED) {\n return 'cancel';\n } else if (state & STATE_ENDED) {\n return 'end';\n } else if (state & STATE_CHANGED) {\n return 'move';\n } else if (state & STATE_BEGAN) {\n return 'start';\n }\n return '';\n}\n\n/**\n * direction cons to string\n * @param {Const} direction\n * @returns {String}\n */\nfunction directionStr(direction) {\n if (direction == DIRECTION_DOWN) {\n return 'down';\n } else if (direction == DIRECTION_UP) {\n return 'up';\n } else if (direction == DIRECTION_LEFT) {\n return 'left';\n } else if (direction == DIRECTION_RIGHT) {\n return 'right';\n }\n return '';\n}\n\n/**\n * get a recognizer by name if it is bound to a manager\n * @param {Recognizer|String} otherRecognizer\n * @param {Recognizer} recognizer\n * @returns {Recognizer}\n */\nfunction getRecognizerByNameIfManager(otherRecognizer, recognizer) {\n var manager = recognizer.manager;\n if (manager) {\n return manager.get(otherRecognizer);\n }\n return otherRecognizer;\n}\n\n/**\n * This recognizer is just used as a base for the simple attribute recognizers.\n * @constructor\n * @extends Recognizer\n */\nfunction AttrRecognizer() {\n Recognizer.apply(this, arguments);\n}\n\ninherit(AttrRecognizer, Recognizer, {\n /**\n * @namespace\n * @memberof AttrRecognizer\n */\n defaults: {\n /**\n * @type {Number}\n * @default 1\n */\n pointers: 1\n },\n\n /**\n * Used to check if it the recognizer receives valid input, like input.distance > 10.\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {Boolean} recognized\n */\n attrTest: function(input) {\n var optionPointers = this.options.pointers;\n return optionPointers === 0 || input.pointers.length === optionPointers;\n },\n\n /**\n * Process the input and return the state for the recognizer\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {*} State\n */\n process: function(input) {\n var state = this.state;\n var eventType = input.eventType;\n\n var isRecognized = state & (STATE_BEGAN | STATE_CHANGED);\n var isValid = this.attrTest(input);\n\n // on cancel input and we've recognized before, return STATE_CANCELLED\n if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) {\n return state | STATE_CANCELLED;\n } else if (isRecognized || isValid) {\n if (eventType & INPUT_END) {\n return state | STATE_ENDED;\n } else if (!(state & STATE_BEGAN)) {\n return STATE_BEGAN;\n }\n return state | STATE_CHANGED;\n }\n return STATE_FAILED;\n }\n});\n\n/**\n * Pan\n * Recognized when the pointer is down and moved in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\nfunction PanRecognizer() {\n AttrRecognizer.apply(this, arguments);\n\n this.pX = null;\n this.pY = null;\n}\n\ninherit(PanRecognizer, AttrRecognizer, {\n /**\n * @namespace\n * @memberof PanRecognizer\n */\n defaults: {\n event: 'pan',\n threshold: 10,\n pointers: 1,\n direction: DIRECTION_ALL\n },\n\n getTouchAction: function() {\n var direction = this.options.direction;\n var actions = [];\n if (direction & DIRECTION_HORIZONTAL) {\n actions.push(TOUCH_ACTION_PAN_Y);\n }\n if (direction & DIRECTION_VERTICAL) {\n actions.push(TOUCH_ACTION_PAN_X);\n }\n return actions;\n },\n\n directionTest: function(input) {\n var options = this.options;\n var hasMoved = true;\n var distance = input.distance;\n var direction = input.direction;\n var x = input.deltaX;\n var y = input.deltaY;\n\n // lock to axis?\n if (!(direction & options.direction)) {\n if (options.direction & DIRECTION_HORIZONTAL) {\n direction = (x === 0) ? DIRECTION_NONE : (x < 0) ? DIRECTION_LEFT : DIRECTION_RIGHT;\n hasMoved = x != this.pX;\n distance = Math.abs(input.deltaX);\n } else {\n direction = (y === 0) ? DIRECTION_NONE : (y < 0) ? DIRECTION_UP : DIRECTION_DOWN;\n hasMoved = y != this.pY;\n distance = Math.abs(input.deltaY);\n }\n }\n input.direction = direction;\n return hasMoved && distance > options.threshold && direction & options.direction;\n },\n\n attrTest: function(input) {\n return AttrRecognizer.prototype.attrTest.call(this, input) &&\n (this.state & STATE_BEGAN || (!(this.state & STATE_BEGAN) && this.directionTest(input)));\n },\n\n emit: function(input) {\n\n this.pX = input.deltaX;\n this.pY = input.deltaY;\n\n var direction = directionStr(input.direction);\n\n if (direction) {\n input.additionalEvent = this.options.event + direction;\n }\n this._super.emit.call(this, input);\n }\n});\n\n/**\n * Pinch\n * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out).\n * @constructor\n * @extends AttrRecognizer\n */\nfunction PinchRecognizer() {\n AttrRecognizer.apply(this, arguments);\n}\n\ninherit(PinchRecognizer, AttrRecognizer, {\n /**\n * @namespace\n * @memberof PinchRecognizer\n */\n defaults: {\n event: 'pinch',\n threshold: 0,\n pointers: 2\n },\n\n getTouchAction: function() {\n return [TOUCH_ACTION_NONE];\n },\n\n attrTest: function(input) {\n return this._super.attrTest.call(this, input) &&\n (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN);\n },\n\n emit: function(input) {\n if (input.scale !== 1) {\n var inOut = input.scale < 1 ? 'in' : 'out';\n input.additionalEvent = this.options.event + inOut;\n }\n this._super.emit.call(this, input);\n }\n});\n\n/**\n * Press\n * Recognized when the pointer is down for x ms without any movement.\n * @constructor\n * @extends Recognizer\n */\nfunction PressRecognizer() {\n Recognizer.apply(this, arguments);\n\n this._timer = null;\n this._input = null;\n}\n\ninherit(PressRecognizer, Recognizer, {\n /**\n * @namespace\n * @memberof PressRecognizer\n */\n defaults: {\n event: 'press',\n pointers: 1,\n time: 251, // minimal time of the pointer to be pressed\n threshold: 9 // a minimal movement is ok, but keep it low\n },\n\n getTouchAction: function() {\n return [TOUCH_ACTION_AUTO];\n },\n\n process: function(input) {\n var options = this.options;\n var validPointers = input.pointers.length === options.pointers;\n var validMovement = input.distance < options.threshold;\n var validTime = input.deltaTime > options.time;\n\n this._input = input;\n\n // we only allow little movement\n // and we've reached an end event, so a tap is possible\n if (!validMovement || !validPointers || (input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime)) {\n this.reset();\n } else if (input.eventType & INPUT_START) {\n this.reset();\n this._timer = setTimeoutContext(function() {\n this.state = STATE_RECOGNIZED;\n this.tryEmit();\n }, options.time, this);\n } else if (input.eventType & INPUT_END) {\n return STATE_RECOGNIZED;\n }\n return STATE_FAILED;\n },\n\n reset: function() {\n clearTimeout(this._timer);\n },\n\n emit: function(input) {\n if (this.state !== STATE_RECOGNIZED) {\n return;\n }\n\n if (input && (input.eventType & INPUT_END)) {\n this.manager.emit(this.options.event + 'up', input);\n } else {\n this._input.timeStamp = now();\n this.manager.emit(this.options.event, this._input);\n }\n }\n});\n\n/**\n * Rotate\n * Recognized when two or more pointer are moving in a circular motion.\n * @constructor\n * @extends AttrRecognizer\n */\nfunction RotateRecognizer() {\n AttrRecognizer.apply(this, arguments);\n}\n\ninherit(RotateRecognizer, AttrRecognizer, {\n /**\n * @namespace\n * @memberof RotateRecognizer\n */\n defaults: {\n event: 'rotate',\n threshold: 0,\n pointers: 2\n },\n\n getTouchAction: function() {\n return [TOUCH_ACTION_NONE];\n },\n\n attrTest: function(input) {\n return this._super.attrTest.call(this, input) &&\n (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN);\n }\n});\n\n/**\n * Swipe\n * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\nfunction SwipeRecognizer() {\n AttrRecognizer.apply(this, arguments);\n}\n\ninherit(SwipeRecognizer, AttrRecognizer, {\n /**\n * @namespace\n * @memberof SwipeRecognizer\n */\n defaults: {\n event: 'swipe',\n threshold: 10,\n velocity: 0.3,\n direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL,\n pointers: 1\n },\n\n getTouchAction: function() {\n return PanRecognizer.prototype.getTouchAction.call(this);\n },\n\n attrTest: function(input) {\n var direction = this.options.direction;\n var velocity;\n\n if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) {\n velocity = input.overallVelocity;\n } else if (direction & DIRECTION_HORIZONTAL) {\n velocity = input.overallVelocityX;\n } else if (direction & DIRECTION_VERTICAL) {\n velocity = input.overallVelocityY;\n }\n\n return this._super.attrTest.call(this, input) &&\n direction & input.offsetDirection &&\n input.distance > this.options.threshold &&\n input.maxPointers == this.options.pointers &&\n abs(velocity) > this.options.velocity && input.eventType & INPUT_END;\n },\n\n emit: function(input) {\n var direction = directionStr(input.offsetDirection);\n if (direction) {\n this.manager.emit(this.options.event + direction, input);\n }\n\n this.manager.emit(this.options.event, input);\n }\n});\n\n/**\n * A tap is ecognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur\n * between the given interval and position. The delay option can be used to recognize multi-taps without firing\n * a single tap.\n *\n * The eventData from the emitted event contains the property `tapCount`, which contains the amount of\n * multi-taps being recognized.\n * @constructor\n * @extends Recognizer\n */\nfunction TapRecognizer() {\n Recognizer.apply(this, arguments);\n\n // previous time and center,\n // used for tap counting\n this.pTime = false;\n this.pCenter = false;\n\n this._timer = null;\n this._input = null;\n this.count = 0;\n}\n\ninherit(TapRecognizer, Recognizer, {\n /**\n * @namespace\n * @memberof PinchRecognizer\n */\n defaults: {\n event: 'tap',\n pointers: 1,\n taps: 1,\n interval: 300, // max time between the multi-tap taps\n time: 250, // max time of the pointer to be down (like finger on the screen)\n threshold: 9, // a minimal movement is ok, but keep it low\n posThreshold: 10 // a multi-tap can be a bit off the initial position\n },\n\n getTouchAction: function() {\n return [TOUCH_ACTION_MANIPULATION];\n },\n\n process: function(input) {\n var options = this.options;\n\n var validPointers = input.pointers.length === options.pointers;\n var validMovement = input.distance < options.threshold;\n var validTouchTime = input.deltaTime < options.time;\n\n this.reset();\n\n if ((input.eventType & INPUT_START) && (this.count === 0)) {\n return this.failTimeout();\n }\n\n // we only allow little movement\n // and we've reached an end event, so a tap is possible\n if (validMovement && validTouchTime && validPointers) {\n if (input.eventType != INPUT_END) {\n return this.failTimeout();\n }\n\n var validInterval = this.pTime ? (input.timeStamp - this.pTime < options.interval) : true;\n var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold;\n\n this.pTime = input.timeStamp;\n this.pCenter = input.center;\n\n if (!validMultiTap || !validInterval) {\n this.count = 1;\n } else {\n this.count += 1;\n }\n\n this._input = input;\n\n // if tap count matches we have recognized it,\n // else it has began recognizing...\n var tapCount = this.count % options.taps;\n if (tapCount === 0) {\n // no failing requirements, immediately trigger the tap event\n // or wait as long as the multitap interval to trigger\n if (!this.hasRequireFailures()) {\n return STATE_RECOGNIZED;\n } else {\n this._timer = setTimeoutContext(function() {\n this.state = STATE_RECOGNIZED;\n this.tryEmit();\n }, options.interval, this);\n return STATE_BEGAN;\n }\n }\n }\n return STATE_FAILED;\n },\n\n failTimeout: function() {\n this._timer = setTimeoutContext(function() {\n this.state = STATE_FAILED;\n }, this.options.interval, this);\n return STATE_FAILED;\n },\n\n reset: function() {\n clearTimeout(this._timer);\n },\n\n emit: function() {\n if (this.state == STATE_RECOGNIZED) {\n this._input.tapCount = this.count;\n this.manager.emit(this.options.event, this._input);\n }\n }\n});\n\n/**\n * Simple way to create a manager with a default set of recognizers.\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\nfunction Hammer(element, options) {\n options = options || {};\n options.recognizers = ifUndefined(options.recognizers, Hammer.defaults.preset);\n return new Manager(element, options);\n}\n\n/**\n * @const {string}\n */\nHammer.VERSION = '2.0.7';\n\n/**\n * default settings\n * @namespace\n */\nHammer.defaults = {\n /**\n * set if DOM events are being triggered.\n * But this is slower and unused by simple implementations, so disabled by default.\n * @type {Boolean}\n * @default false\n */\n domEvents: false,\n\n /**\n * The value for the touchAction property/fallback.\n * When set to `compute` it will magically set the correct value based on the added recognizers.\n * @type {String}\n * @default compute\n */\n touchAction: TOUCH_ACTION_COMPUTE,\n\n /**\n * @type {Boolean}\n * @default true\n */\n enable: true,\n\n /**\n * EXPERIMENTAL FEATURE -- can be removed/changed\n * Change the parent input target element.\n * If Null, then it is being set the to main element.\n * @type {Null|EventTarget}\n * @default null\n */\n inputTarget: null,\n\n /**\n * force an input class\n * @type {Null|Function}\n * @default null\n */\n inputClass: null,\n\n /**\n * Default recognizer setup when calling `Hammer()`\n * When creating a new Manager these will be skipped.\n * @type {Array}\n */\n preset: [\n // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]\n [RotateRecognizer, {enable: false}],\n [PinchRecognizer, {enable: false}, ['rotate']],\n [SwipeRecognizer, {direction: DIRECTION_HORIZONTAL}],\n [PanRecognizer, {direction: DIRECTION_HORIZONTAL}, ['swipe']],\n [TapRecognizer],\n [TapRecognizer, {event: 'doubletap', taps: 2}, ['tap']],\n [PressRecognizer]\n ],\n\n /**\n * Some CSS properties can be used to improve the working of Hammer.\n * Add them to this method and they will be set when creating a new Manager.\n * @namespace\n */\n cssProps: {\n /**\n * Disables text selection to improve the dragging gesture. Mainly for desktop browsers.\n * @type {String}\n * @default 'none'\n */\n userSelect: 'none',\n\n /**\n * Disable the Windows Phone grippers when pressing an element.\n * @type {String}\n * @default 'none'\n */\n touchSelect: 'none',\n\n /**\n * Disables the default callout shown when you touch and hold a touch target.\n * On iOS, when you touch and hold a touch target such as a link, Safari displays\n * a callout containing information about the link. This property allows you to disable that callout.\n * @type {String}\n * @default 'none'\n */\n touchCallout: 'none',\n\n /**\n * Specifies whether zooming is enabled. Used by IE10>\n * @type {String}\n * @default 'none'\n */\n contentZooming: 'none',\n\n /**\n * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers.\n * @type {String}\n * @default 'none'\n */\n userDrag: 'none',\n\n /**\n * Overrides the highlight color shown when the user taps a link or a JavaScript\n * clickable element in iOS. This property obeys the alpha value, if specified.\n * @type {String}\n * @default 'rgba(0,0,0,0)'\n */\n tapHighlightColor: 'rgba(0,0,0,0)'\n }\n};\n\nvar STOP = 1;\nvar FORCED_STOP = 2;\n\n/**\n * Manager\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\nfunction Manager(element, options) {\n this.options = assign({}, Hammer.defaults, options || {});\n\n this.options.inputTarget = this.options.inputTarget || element;\n\n this.handlers = {};\n this.session = {};\n this.recognizers = [];\n this.oldCssProps = {};\n\n this.element = element;\n this.input = createInputInstance(this);\n this.touchAction = new TouchAction(this, this.options.touchAction);\n\n toggleCssProps(this, true);\n\n each(this.options.recognizers, function(item) {\n var recognizer = this.add(new (item[0])(item[1]));\n item[2] && recognizer.recognizeWith(item[2]);\n item[3] && recognizer.requireFailure(item[3]);\n }, this);\n}\n\nManager.prototype = {\n /**\n * set options\n * @param {Object} options\n * @returns {Manager}\n */\n set: function(options) {\n assign(this.options, options);\n\n // Options that need a little more setup\n if (options.touchAction) {\n this.touchAction.update();\n }\n if (options.inputTarget) {\n // Clean up existing event listeners and reinitialize\n this.input.destroy();\n this.input.target = options.inputTarget;\n this.input.init();\n }\n return this;\n },\n\n /**\n * stop recognizing for this session.\n * This session will be discarded, when a new [input]start event is fired.\n * When forced, the recognizer cycle is stopped immediately.\n * @param {Boolean} [force]\n */\n stop: function(force) {\n this.session.stopped = force ? FORCED_STOP : STOP;\n },\n\n /**\n * run the recognizers!\n * called by the inputHandler function on every movement of the pointers (touches)\n * it walks through all the recognizers and tries to detect the gesture that is being made\n * @param {Object} inputData\n */\n recognize: function(inputData) {\n var session = this.session;\n if (session.stopped) {\n return;\n }\n\n // run the touch-action polyfill\n this.touchAction.preventDefaults(inputData);\n\n var recognizer;\n var recognizers = this.recognizers;\n\n // this holds the recognizer that is being recognized.\n // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED\n // if no recognizer is detecting a thing, it is set to `null`\n var curRecognizer = session.curRecognizer;\n\n // reset when the last recognizer is recognized\n // or when we're in a new session\n if (!curRecognizer || (curRecognizer && curRecognizer.state & STATE_RECOGNIZED)) {\n curRecognizer = session.curRecognizer = null;\n }\n\n var i = 0;\n while (i < recognizers.length) {\n recognizer = recognizers[i];\n\n // find out if we are allowed try to recognize the input for this one.\n // 1. allow if the session is NOT forced stopped (see the .stop() method)\n // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one\n // that is being recognized.\n // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer.\n // this can be setup with the `recognizeWith()` method on the recognizer.\n if (session.stopped !== FORCED_STOP && ( // 1\n !curRecognizer || recognizer == curRecognizer || // 2\n recognizer.canRecognizeWith(curRecognizer))) { // 3\n recognizer.recognize(inputData);\n } else {\n recognizer.reset();\n }\n\n // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the\n // current active recognizer. but only if we don't already have an active recognizer\n if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) {\n curRecognizer = session.curRecognizer = recognizer;\n }\n i++;\n }\n },\n\n /**\n * get a recognizer by its event name.\n * @param {Recognizer|String} recognizer\n * @returns {Recognizer|Null}\n */\n get: function(recognizer) {\n if (recognizer instanceof Recognizer) {\n return recognizer;\n }\n\n var recognizers = this.recognizers;\n for (var i = 0; i < recognizers.length; i++) {\n if (recognizers[i].options.event == recognizer) {\n return recognizers[i];\n }\n }\n return null;\n },\n\n /**\n * add a recognizer to the manager\n * existing recognizers with the same event name will be removed\n * @param {Recognizer} recognizer\n * @returns {Recognizer|Manager}\n */\n add: function(recognizer) {\n if (invokeArrayArg(recognizer, 'add', this)) {\n return this;\n }\n\n // remove existing\n var existing = this.get(recognizer.options.event);\n if (existing) {\n this.remove(existing);\n }\n\n this.recognizers.push(recognizer);\n recognizer.manager = this;\n\n this.touchAction.update();\n return recognizer;\n },\n\n /**\n * remove a recognizer by name or instance\n * @param {Recognizer|String} recognizer\n * @returns {Manager}\n */\n remove: function(recognizer) {\n if (invokeArrayArg(recognizer, 'remove', this)) {\n return this;\n }\n\n recognizer = this.get(recognizer);\n\n // let's make sure this recognizer exists\n if (recognizer) {\n var recognizers = this.recognizers;\n var index = inArray(recognizers, recognizer);\n\n if (index !== -1) {\n recognizers.splice(index, 1);\n this.touchAction.update();\n }\n }\n\n return this;\n },\n\n /**\n * bind event\n * @param {String} events\n * @param {Function} handler\n * @returns {EventEmitter} this\n */\n on: function(events, handler) {\n if (events === undefined) {\n return;\n }\n if (handler === undefined) {\n return;\n }\n\n var handlers = this.handlers;\n each(splitStr(events), function(event) {\n handlers[event] = handlers[event] || [];\n handlers[event].push(handler);\n });\n return this;\n },\n\n /**\n * unbind event, leave emit blank to remove all handlers\n * @param {String} events\n * @param {Function} [handler]\n * @returns {EventEmitter} this\n */\n off: function(events, handler) {\n if (events === undefined) {\n return;\n }\n\n var handlers = this.handlers;\n each(splitStr(events), function(event) {\n if (!handler) {\n delete handlers[event];\n } else {\n handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1);\n }\n });\n return this;\n },\n\n /**\n * emit event to the listeners\n * @param {String} event\n * @param {Object} data\n */\n emit: function(event, data) {\n // we also want to trigger dom events\n if (this.options.domEvents) {\n triggerDomEvent(event, data);\n }\n\n // no handlers, so skip it all\n var handlers = this.handlers[event] && this.handlers[event].slice();\n if (!handlers || !handlers.length) {\n return;\n }\n\n data.type = event;\n data.preventDefault = function() {\n data.srcEvent.preventDefault();\n };\n\n var i = 0;\n while (i < handlers.length) {\n handlers[i](data);\n i++;\n }\n },\n\n /**\n * destroy the manager and unbinds all events\n * it doesn't unbind dom events, that is the user own responsibility\n */\n destroy: function() {\n this.element && toggleCssProps(this, false);\n\n this.handlers = {};\n this.session = {};\n this.input.destroy();\n this.element = null;\n }\n};\n\n/**\n * add/remove the css properties as defined in manager.options.cssProps\n * @param {Manager} manager\n * @param {Boolean} add\n */\nfunction toggleCssProps(manager, add) {\n var element = manager.element;\n if (!element.style) {\n return;\n }\n var prop;\n each(manager.options.cssProps, function(value, name) {\n prop = prefixed(element.style, name);\n if (add) {\n manager.oldCssProps[prop] = element.style[prop];\n element.style[prop] = value;\n } else {\n element.style[prop] = manager.oldCssProps[prop] || '';\n }\n });\n if (!add) {\n manager.oldCssProps = {};\n }\n}\n\n/**\n * trigger dom event\n * @param {String} event\n * @param {Object} data\n */\nfunction triggerDomEvent(event, data) {\n var gestureEvent = document.createEvent('Event');\n gestureEvent.initEvent(event, true, true);\n gestureEvent.gesture = data;\n data.target.dispatchEvent(gestureEvent);\n}\n\nassign(Hammer, {\n INPUT_START: INPUT_START,\n INPUT_MOVE: INPUT_MOVE,\n INPUT_END: INPUT_END,\n INPUT_CANCEL: INPUT_CANCEL,\n\n STATE_POSSIBLE: STATE_POSSIBLE,\n STATE_BEGAN: STATE_BEGAN,\n STATE_CHANGED: STATE_CHANGED,\n STATE_ENDED: STATE_ENDED,\n STATE_RECOGNIZED: STATE_RECOGNIZED,\n STATE_CANCELLED: STATE_CANCELLED,\n STATE_FAILED: STATE_FAILED,\n\n DIRECTION_NONE: DIRECTION_NONE,\n DIRECTION_LEFT: DIRECTION_LEFT,\n DIRECTION_RIGHT: DIRECTION_RIGHT,\n DIRECTION_UP: DIRECTION_UP,\n DIRECTION_DOWN: DIRECTION_DOWN,\n DIRECTION_HORIZONTAL: DIRECTION_HORIZONTAL,\n DIRECTION_VERTICAL: DIRECTION_VERTICAL,\n DIRECTION_ALL: DIRECTION_ALL,\n\n Manager: Manager,\n Input: Input,\n TouchAction: TouchAction,\n\n TouchInput: TouchInput,\n MouseInput: MouseInput,\n PointerEventInput: PointerEventInput,\n TouchMouseInput: TouchMouseInput,\n SingleTouchInput: SingleTouchInput,\n\n Recognizer: Recognizer,\n AttrRecognizer: AttrRecognizer,\n Tap: TapRecognizer,\n Pan: PanRecognizer,\n Swipe: SwipeRecognizer,\n Pinch: PinchRecognizer,\n Rotate: RotateRecognizer,\n Press: PressRecognizer,\n\n on: addEventListeners,\n off: removeEventListeners,\n each: each,\n merge: merge,\n extend: extend,\n assign: assign,\n inherit: inherit,\n bindFn: bindFn,\n prefixed: prefixed\n});\n\n// this prevents errors when Hammer is loaded in the presence of an AMD\n// style loader but by script tag, not by the loader.\nvar freeGlobal = (typeof window !== 'undefined' ? window : (typeof self !== 'undefined' ? self : {})); // jshint ignore:line\nfreeGlobal.Hammer = Hammer;\n\nif (typeof define === 'function' && define.amd) {\n define(function() {\n return Hammer;\n });\n} else if (typeof module != 'undefined' && module.exports) {\n module.exports = Hammer;\n} else {\n window[exportName] = Hammer;\n}\n\n})(window, document, 'Hammer');\n","/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. Dual MIT/BSD license */\n\nwindow.matchMedia || (window.matchMedia = function() {\n \"use strict\";\n\n // For browsers that support matchMedium api such as IE 9 and webkit\n var styleMedia = (window.styleMedia || window.media);\n\n // For those that don't support matchMedium\n if (!styleMedia) {\n var style = document.createElement('style'),\n script = document.getElementsByTagName('script')[0],\n info = null;\n\n style.type = 'text/css';\n style.id = 'matchmediajs-test';\n\n script.parentNode.insertBefore(style, script);\n\n // 'style.currentStyle' is used by IE <= 8 and 'window.getComputedStyle' for all other browsers\n info = ('getComputedStyle' in window) && window.getComputedStyle(style, null) || style.currentStyle;\n\n styleMedia = {\n matchMedium: function(media) {\n var text = '@media ' + media + '{ #matchmediajs-test { width: 1px; } }';\n\n // 'style.styleSheet' is used by IE <= 8 and 'style.textContent' for all other browsers\n if (style.styleSheet) {\n style.styleSheet.cssText = text;\n } else {\n style.textContent = text;\n }\n\n // Test if media query is true or false\n return info.width === '1px';\n }\n };\n }\n\n return function(media) {\n return {\n matches: styleMedia.matchMedium(media || 'all'),\n media: media || 'all'\n };\n };\n}());\n","'use strict';\n\n(function(factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define([], factory);\n } else if (typeof exports === 'object') {\n // Node. Does not work with strict CommonJS, but\n // only CommonJS-like environments that support module.exports,\n // like Node.\n module.exports = factory();\n } else {\n // Browser globals (root is window)\n window.propagating = factory();\n }\n}(function() {\n var _firstTarget = null; // singleton, will contain the target element where the touch event started\n var _processing = false; // singleton, true when a touch event is being handled\n\n /**\n * Extend an Hammer.js instance with event propagation.\n *\n * Features:\n * - Events emitted by hammer will propagate in order from child to parent\n * elements.\n * - Events are extended with a function `event.stopPropagation()` to stop\n * propagation to parent elements.\n * - An option `preventDefault` to stop all default browser behavior.\n *\n * Usage:\n * var hammer = propagatingHammer(new Hammer(element));\n * var hammer = propagatingHammer(new Hammer(element), {preventDefault: true});\n *\n * @param {Hammer.Manager} hammer An hammer instance.\n * @param {Object} [options] Available options:\n * - `preventDefault: true | 'mouse' | 'touch' | 'pen'`.\n * Enforce preventing the default browser behavior.\n * Cannot be set to `false`.\n * @return {Hammer.Manager} Returns the same hammer instance with extended\n * functionality\n */\n return function propagating(hammer, options) {\n var _options = options || {\n preventDefault: false\n };\n\n if (hammer.Manager) {\n // This looks like the Hammer constructor.\n // Overload the constructors with our own.\n var Hammer = hammer;\n\n var PropagatingHammer = function(element, options) {\n var o = Object.create(_options);\n if (options) Hammer.extend(o, options);\n return propagating(new Hammer(element, o), o);\n };\n Hammer.extend(PropagatingHammer, Hammer);\n\n PropagatingHammer.Manager = function(element, options) {\n var o = Object.create(_options);\n if (options) Hammer.extend(o, options);\n return propagating(new Hammer.Manager(element, o), o);\n };\n\n return PropagatingHammer;\n }\n\n // create a wrapper object which will override the functions\n // `on`, `off`, `destroy`, and `emit` of the hammer instance\n var wrapper = Object.create(hammer);\n\n // attach to DOM element\n var element = hammer.element;\n\n if (!element.hammer) element.hammer = [];\n element.hammer.push(wrapper);\n\n // register an event to catch the start of a gesture and store the\n // target in a singleton\n hammer.on('hammer.input', function(event) {\n if (_options.preventDefault === true || (_options.preventDefault === event.pointerType)) {\n event.preventDefault();\n }\n if (event.isFirst) {\n _firstTarget = event.target;\n }\n });\n\n /** @type {Object.>} */\n wrapper._handlers = {};\n\n /**\n * Register a handler for one or multiple events\n * @param {String} events A space separated string with events\n * @param {function} handler A callback function, called as handler(event)\n * @returns {Hammer.Manager} Returns the hammer instance\n */\n wrapper.on = function(events, handler) {\n // register the handler\n split(events).forEach(function(event) {\n var _handlers = wrapper._handlers[event];\n if (!_handlers) {\n wrapper._handlers[event] = _handlers = [];\n\n // register the static, propagated handler\n hammer.on(event, propagatedHandler);\n }\n _handlers.push(handler);\n });\n\n return wrapper;\n };\n\n /**\n * Unregister a handler for one or multiple events\n * @param {String} events A space separated string with events\n * @param {function} [handler] Optional. The registered handler. If not\n * provided, all handlers for given events\n * are removed.\n * @returns {Hammer.Manager} Returns the hammer instance\n */\n wrapper.off = function(events, handler) {\n // unregister the handler\n split(events).forEach(function(event) {\n var _handlers = wrapper._handlers[event];\n if (_handlers) {\n _handlers = handler ? _handlers.filter(function(h) {\n return h !== handler;\n }) : [];\n\n if (_handlers.length > 0) {\n wrapper._handlers[event] = _handlers;\n }\n else {\n // remove static, propagated handler\n hammer.off(event, propagatedHandler);\n delete wrapper._handlers[event];\n }\n }\n });\n\n return wrapper;\n };\n\n /**\n * Emit to the event listeners\n * @param {string} eventType\n * @param {Event} event\n */\n wrapper.emit = function(eventType, event) {\n _firstTarget = event.target;\n hammer.emit(eventType, event);\n };\n\n wrapper.destroy = function() {\n // Detach from DOM element\n var hammers = hammer.element.hammer;\n var idx = hammers.indexOf(wrapper);\n if (idx !== -1) hammers.splice(idx,1);\n if (!hammers.length) delete hammer.element.hammer;\n\n // clear all handlers\n wrapper._handlers = {};\n\n // call original hammer destroy\n hammer.destroy();\n };\n\n // split a string with space separated words\n function split(events) {\n return events.match(/[^ ]+/g);\n }\n\n /**\n * A static event handler, applying event propagation.\n * @param {Object} event\n */\n function propagatedHandler(event) {\n // let only a single hammer instance handle this event\n if (event.type !== 'hammer.input') {\n // it is possible that the same srcEvent is used with multiple hammer events,\n // we keep track on which events are handled in an object _handled\n if (!event.srcEvent._handled) {\n event.srcEvent._handled = {};\n }\n\n if (event.srcEvent._handled[event.type]) {\n return;\n }\n else {\n event.srcEvent._handled[event.type] = true;\n }\n }\n\n // attach a stopPropagation function to the event\n var stopped = false;\n event.stopPropagation = function() {\n stopped = true;\n };\n\n //wrap the srcEvent's stopPropagation to also stop hammer propagation:\n var srcStop = event.srcEvent.stopPropagation;\n if (typeof srcStop == \"function\") {\n event.srcEvent.stopPropagation = function(){\n srcStop();\n event.stopPropagation();\n }\n }\n\n // attach firstTarget property to the event\n event.firstTarget = _firstTarget;\n\n // propagate over all elements (until stopped)\n var elem = _firstTarget;\n while (elem && !stopped) {\n if (elem.hammer){\n var _handlers;\n for (var k = 0; k < elem.hammer.length; k++){\n _handlers = elem.hammer[k]._handlers[event.type];\n if (_handlers) for (var i = 0; i < _handlers.length && !stopped; i++) {\n _handlers[i](event);\n }\n }\n }\n elem = elem.parentNode;\n }\n }\n\n return wrapper;\n };\n}));\n","/* globals define */\ndefine('ember/load-initializers', ['exports', 'ember-load-initializers', 'ember'], function(exports, loadInitializers, Ember) {\n Ember['default'].deprecate(\n 'Usage of `' + 'ember/load-initializers' + '` module is deprecated, please update to `ember-load-initializers`.',\n false,\n { id: 'ember-load-initializers.legacy-shims', until: '3.0.0' }\n );\n\n exports['default'] = loadInitializers['default'];\n});\n","/* globals define */\n\nfunction createDeprecatedModule(moduleId) {\n define(moduleId, ['exports', 'ember-resolver/resolver', 'ember'], function(exports, Resolver, Ember) {\n Ember['default'].deprecate(\n 'Usage of `' + moduleId + '` module is deprecated, please update to `ember-resolver`.',\n false,\n { id: 'ember-resolver.legacy-shims', until: '3.0.0' }\n );\n\n exports['default'] = Resolver['default'];\n });\n}\n\ncreateDeprecatedModule('ember/resolver');\ncreateDeprecatedModule('resolver');\n","define('ember-ajax/ajax-request', ['exports', 'ember', 'ember-ajax/mixins/ajax-request'], function (exports, _ember, _emberAjaxMixinsAjaxRequest) {\n 'use strict';\n\n exports['default'] = _ember['default'].Object.extend(_emberAjaxMixinsAjaxRequest['default']);\n});","define('ember-ajax/errors', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n exports.AjaxError = AjaxError;\n exports.InvalidError = InvalidError;\n exports.UnauthorizedError = UnauthorizedError;\n exports.ForbiddenError = ForbiddenError;\n exports.BadRequestError = BadRequestError;\n exports.NotFoundError = NotFoundError;\n exports.TimeoutError = TimeoutError;\n exports.AbortError = AbortError;\n exports.ServerError = ServerError;\n exports.isAjaxError = isAjaxError;\n exports.isUnauthorizedError = isUnauthorizedError;\n exports.isForbiddenError = isForbiddenError;\n exports.isInvalidError = isInvalidError;\n exports.isBadRequestError = isBadRequestError;\n exports.isNotFoundError = isNotFoundError;\n exports.isTimeoutError = isTimeoutError;\n exports.isAbortError = isAbortError;\n exports.isServerError = isServerError;\n exports.isSuccess = isSuccess;\n\n var EmberError = _ember['default'].Error;\n\n /**\n * @class AjaxError\n * @private\n */\n\n function AjaxError(errors) {\n var message = arguments.length <= 1 || arguments[1] === undefined ? 'Ajax operation failed' : arguments[1];\n\n EmberError.call(this, message);\n\n this.errors = errors || [{\n title: 'Ajax Error',\n detail: message\n }];\n }\n\n AjaxError.prototype = Object.create(EmberError.prototype);\n\n /**\n * @class InvalidError\n * @public\n */\n\n function InvalidError(errors) {\n AjaxError.call(this, errors, 'Request was rejected because it was invalid');\n }\n\n InvalidError.prototype = Object.create(AjaxError.prototype);\n\n /**\n * @class UnauthorizedError\n * @public\n */\n\n function UnauthorizedError(errors) {\n AjaxError.call(this, errors, 'Ajax authorization failed');\n }\n\n UnauthorizedError.prototype = Object.create(AjaxError.prototype);\n\n /**\n * @class ForbiddenError\n * @public\n */\n\n function ForbiddenError(errors) {\n AjaxError.call(this, errors, 'Request was rejected because user is not permitted to perform this operation.');\n }\n\n ForbiddenError.prototype = Object.create(AjaxError.prototype);\n\n /**\n * @class BadRequestError\n * @public\n */\n\n function BadRequestError(errors) {\n AjaxError.call(this, errors, 'Request was formatted incorrectly.');\n }\n\n BadRequestError.prototype = Object.create(AjaxError.prototype);\n\n /**\n * @class NotFoundError\n * @public\n */\n\n function NotFoundError(errors) {\n AjaxError.call(this, errors, 'Resource was not found.');\n }\n\n NotFoundError.prototype = Object.create(AjaxError.prototype);\n\n /**\n * @class TimeoutError\n * @public\n */\n\n function TimeoutError() {\n AjaxError.call(this, null, 'The ajax operation timed out');\n }\n\n TimeoutError.prototype = Object.create(AjaxError.prototype);\n\n /**\n * @class AbortError\n * @public\n */\n\n function AbortError() {\n AjaxError.call(this, null, 'The ajax operation was aborted');\n }\n\n AbortError.prototype = Object.create(AjaxError.prototype);\n\n /**\n * @class ServerError\n * @public\n */\n\n function ServerError(errors) {\n AjaxError.call(this, errors, 'Request was rejected due to server error');\n }\n\n ServerError.prototype = Object.create(AjaxError.prototype);\n\n /**\n * Checks if the given error is or inherits from AjaxError\n * @method isAjaxError\n * @public\n * @param {Error} error\n * @return {Boolean}\n */\n\n function isAjaxError(error) {\n return error instanceof AjaxError;\n }\n\n /**\n * Checks if the given status code or AjaxError object represents an\n * unauthorized request error\n * @method isUnauthorizedError\n * @public\n * @param {Number | AjaxError} error\n * @return {Boolean}\n */\n\n function isUnauthorizedError(error) {\n if (isAjaxError(error)) {\n return error instanceof UnauthorizedError;\n } else {\n return error === 401;\n }\n }\n\n /**\n * Checks if the given status code or AjaxError object represents a forbidden\n * request error\n * @method isForbiddenError\n * @public\n * @param {Number | AjaxError} error\n * @return {Boolean}\n */\n\n function isForbiddenError(error) {\n if (isAjaxError(error)) {\n return error instanceof ForbiddenError;\n } else {\n return error === 403;\n }\n }\n\n /**\n * Checks if the given status code or AjaxError object represents an invalid\n * request error\n * @method isInvalidError\n * @public\n * @param {Number | AjaxError} error\n * @return {Boolean}\n */\n\n function isInvalidError(error) {\n if (isAjaxError(error)) {\n return error instanceof InvalidError;\n } else {\n return error === 422;\n }\n }\n\n /**\n * Checks if the given status code or AjaxError object represents a bad request\n * error\n * @method isBadRequestError\n * @public\n * @param {Number | AjaxError} error\n * @return {Boolean}\n */\n\n function isBadRequestError(error) {\n if (isAjaxError(error)) {\n return error instanceof BadRequestError;\n } else {\n return error === 400;\n }\n }\n\n /**\n * Checks if the given status code or AjaxError object represents a\n * \"not found\" error\n * @method isNotFoundError\n * @public\n * @param {Number | AjaxError} error\n * @return {Boolean}\n */\n\n function isNotFoundError(error) {\n if (isAjaxError(error)) {\n return error instanceof NotFoundError;\n } else {\n return error === 404;\n }\n }\n\n /**\n * Checks if the given status code or AjaxError object represents a\n * \"timeout\" error\n * @method isTimeoutError\n * @public\n * @param {AjaxError} error\n * @return {Boolean}\n */\n\n function isTimeoutError(error) {\n return error instanceof TimeoutError;\n }\n\n /**\n * Checks if the given status code or AjaxError object represents an\n * \"abort\" error\n * @method isAbortError\n * @public\n * @param {AjaxError} error\n * @return {Boolean}\n */\n\n function isAbortError(error) {\n return error instanceof AbortError;\n }\n\n /**\n * Checks if the given status code or AjaxError object represents a server error\n * @method isServerError\n * @public\n * @param {Number | AjaxError} error\n * @return {Boolean}\n */\n\n function isServerError(error) {\n if (isAjaxError(error)) {\n return error instanceof ServerError;\n } else {\n return error >= 500 && error < 600;\n }\n }\n\n /**\n * Checks if the given status code represents a successful request\n * @method isSuccess\n * @public\n * @param {Number} status\n * @return {Boolean}\n */\n\n function isSuccess(status) {\n var s = parseInt(status, 10);\n return s >= 200 && s < 300 || s === 304;\n }\n});","define('ember-ajax/index', ['exports', 'ember-ajax/request'], function (exports, _emberAjaxRequest) {\n 'use strict';\n\n Object.defineProperty(exports, 'default', {\n enumerable: true,\n get: function get() {\n return _emberAjaxRequest['default'];\n }\n });\n});","define('ember-ajax/mixins/ajax-request', ['exports', 'ember', 'ember-ajax/errors', 'ember-ajax/utils/parse-response-headers', 'ember-ajax/utils/url-helpers', 'ember-ajax/utils/ajax'], function (exports, _ember, _emberAjaxErrors, _emberAjaxUtilsParseResponseHeaders, _emberAjaxUtilsUrlHelpers, _emberAjaxUtilsAjax) {\n 'use strict';\n\n var $ = _ember['default'].$;\n var EmberError = _ember['default'].Error;\n var Mixin = _ember['default'].Mixin;\n var Promise = _ember['default'].RSVP.Promise;\n var get = _ember['default'].get;\n var isNone = _ember['default'].isNone;\n var merge = _ember['default'].merge;\n var run = _ember['default'].run;\n var Test = _ember['default'].Test;\n var testing = _ember['default'].testing;\n\n var JSONAPIContentType = 'application/vnd.api+json';\n\n function isJSONAPIContentType(header) {\n if (isNone(header)) {\n return false;\n }\n return header.indexOf(JSONAPIContentType) === 0;\n }\n\n function startsWithSlash(string) {\n return string.charAt(0) === '/';\n }\n\n function endsWithSlash(string) {\n return string.charAt(string.length - 1) === '/';\n }\n\n function stripSlashes(path) {\n // make sure path starts with `/`\n if (startsWithSlash(path)) {\n path = path.substring(1);\n }\n\n // remove end `/`\n if (endsWithSlash(path)) {\n path = path.slice(0, -1);\n }\n return path;\n }\n\n var pendingRequestCount = 0;\n if (testing) {\n Test.registerWaiter(function () {\n return pendingRequestCount === 0;\n });\n }\n\n exports['default'] = Mixin.create({\n\n request: function request(url, options) {\n var _this = this;\n\n var hash = this.options(url, options);\n return new Promise(function (resolve, reject) {\n _this.raw(url, hash).then(function (_ref) {\n var response = _ref.response;\n\n resolve(response);\n })['catch'](function (_ref2) {\n var response = _ref2.response;\n\n reject(response);\n });\n }, 'ember-ajax: ' + hash.type + ' ' + hash.url + ' response');\n },\n\n raw: function raw(url, options) {\n var _this2 = this;\n\n var hash = this.options(url, options);\n var requestData = {\n type: hash.type,\n url: hash.url\n };\n\n if (isJSONAPIContentType(hash.headers['Content-Type']) && requestData.type !== 'GET') {\n if (typeof hash.data === 'object') {\n hash.data = JSON.stringify(hash.data);\n }\n }\n\n return new Promise(function (resolve, reject) {\n hash.success = function (payload, textStatus, jqXHR) {\n var response = _this2.handleResponse(jqXHR.status, (0, _emberAjaxUtilsParseResponseHeaders['default'])(jqXHR.getAllResponseHeaders()), payload, requestData);\n\n pendingRequestCount--;\n\n if ((0, _emberAjaxErrors.isAjaxError)(response)) {\n run.join(null, reject, { payload: payload, textStatus: textStatus, jqXHR: jqXHR, response: response });\n } else {\n run.join(null, resolve, { payload: payload, textStatus: textStatus, jqXHR: jqXHR, response: response });\n }\n };\n\n hash.error = function (jqXHR, textStatus, errorThrown) {\n var payload = _this2.parseErrorResponse(jqXHR.responseText) || errorThrown;\n var response = undefined;\n\n if (errorThrown instanceof Error) {\n response = errorThrown;\n } else if (textStatus === 'timeout') {\n response = new _emberAjaxErrors.TimeoutError();\n } else if (textStatus === 'abort') {\n response = new _emberAjaxErrors.AbortError();\n } else {\n response = _this2.handleResponse(jqXHR.status, (0, _emberAjaxUtilsParseResponseHeaders['default'])(jqXHR.getAllResponseHeaders()), payload, requestData);\n }\n\n pendingRequestCount--;\n\n run.join(null, reject, { payload: payload, textStatus: textStatus, jqXHR: jqXHR, errorThrown: errorThrown, response: response });\n };\n\n pendingRequestCount++;\n\n (0, _emberAjaxUtilsAjax['default'])(hash);\n }, 'ember-ajax: ' + hash.type + ' ' + hash.url);\n },\n\n /**\n * calls `request()` but forces `options.type` to `POST`\n * @public\n */\n post: function post(url, options) {\n return this.request(url, this._addTypeToOptionsFor(options, 'POST'));\n },\n\n /**\n * calls `request()` but forces `options.type` to `PUT`\n * @public\n */\n put: function put(url, options) {\n return this.request(url, this._addTypeToOptionsFor(options, 'PUT'));\n },\n\n /**\n * calls `request()` but forces `options.type` to `PATCH`\n * @public\n */\n patch: function patch(url, options) {\n return this.request(url, this._addTypeToOptionsFor(options, 'PATCH'));\n },\n\n /**\n * calls `request()` but forces `options.type` to `DELETE`\n * @public\n */\n del: function del(url, options) {\n return this.request(url, this._addTypeToOptionsFor(options, 'DELETE'));\n },\n\n /**\n * calls `request()` but forces `options.type` to `DELETE`\n * alias for `del()`\n * @public\n */\n 'delete': function _delete() {\n return this.del.apply(this, arguments);\n },\n\n /**\n * Wrap the `.get` method so that we issue a warning if\n *\n * Since `.get` is both an AJAX pattern _and_ an Ember pattern, we want to try\n * to warn users when they try using `.get` to make a request\n *\n * @method get\n * @public\n */\n get: function get(url) {\n if (arguments.length > 1 || url.charAt(0) === '/') {\n throw new EmberError('It seems you tried to use `.get` to make a request! Use the `.request` method instead.');\n }\n return this._super.apply(this, arguments);\n },\n\n // forcibly manipulates the options hash to include the HTTP method on the type key\n _addTypeToOptionsFor: function _addTypeToOptionsFor(options, method) {\n options = options || {};\n options.type = method;\n return options;\n },\n\n /**\n * @method _getFullHeadersHash\n * @private\n * @param {Object} headers\n * @return {Object}\n */\n _getFullHeadersHash: function _getFullHeadersHash(headers) {\n var classHeaders = get(this, 'headers') || {};\n var _headers = merge({}, classHeaders);\n return merge(_headers, headers);\n },\n\n /**\n * @method options\n * @private\n * @param {String} url\n * @param {Object} options\n * @return {Object}\n */\n options: function options(url) {\n var _options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];\n\n _options.url = this._buildURL(url, _options);\n _options.type = _options.type || 'GET';\n _options.dataType = _options.dataType || 'json';\n\n if (this._shouldSendHeaders(_options)) {\n _options.headers = this._getFullHeadersHash(_options.headers);\n } else {\n _options.headers = _options.headers || {};\n }\n\n return _options;\n },\n\n /**\n * Build a URL for a request\n *\n * If the provided `url` is deemed to be a complete URL, it will be returned\n * directly. If it is not complete, then the segment provided will be combined\n * with the `host` and `namespace` options of the request class to create the\n * full URL.\n *\n * @private\n * @param {string} url the url, or url segment, to request\n * @param {object} [options] the options for the request being made\n * @param {object.host} [host] the host to use for this request\n * @returns {string} the URL to make a request to\n */\n _buildURL: function _buildURL(url) {\n var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];\n\n var urlObject = new _emberAjaxUtilsUrlHelpers.RequestURL(url);\n\n // If the URL passed is not relative, return the whole URL\n if (urlObject.isComplete) {\n return urlObject.href;\n }\n\n var host = options.host || get(this, 'host');\n var namespace = get(this, 'namespace');\n if (namespace) {\n namespace = stripSlashes(namespace);\n }\n\n var fullUrl = '';\n // Add the host, if it exists\n if (host) {\n fullUrl += host;\n }\n // Add the namespace, if it exists\n if (namespace) {\n if (!endsWithSlash(fullUrl)) {\n fullUrl += '/';\n }\n fullUrl += namespace;\n }\n // Add the URL segment, if it exists\n if (url) {\n if (!startsWithSlash(url)) {\n fullUrl += '/';\n }\n fullUrl += url;\n }\n\n return fullUrl;\n },\n\n _normalizePath: function _normalizePath(path) {\n if (path) {\n // make sure path starts with `/`\n if (path.charAt(0) !== '/') {\n path = '/' + path;\n }\n\n // remove end `/`\n if (path.charAt(path.length - 1) === '/') {\n path = path.slice(0, -1);\n }\n }\n return path;\n },\n\n /**\n * Takes an ajax response, and returns the json payload or an error.\n *\n * By default this hook just returns the json payload passed to it.\n * You might want to override it in two cases:\n *\n * 1. Your API might return useful results in the response headers.\n * Response headers are passed in as the second argument.\n *\n * 2. Your API might return errors as successful responses with status code\n * 200 and an Errors text or object.\n *\n * @method handleResponse\n * @private\n * @param {Number} status\n * @param {Object} headers\n * @param {Object} payload\n * @param {Object} requestData the original request information\n * @return {Object | AjaxError} response\n */\n handleResponse: function handleResponse(status, headers, payload, requestData) {\n payload = payload || {};\n var errors = this.normalizeErrorResponse(status, headers, payload);\n\n if (this.isSuccess(status, headers, payload)) {\n return payload;\n } else if (this.isUnauthorizedError(status, headers, payload)) {\n return new _emberAjaxErrors.UnauthorizedError(errors);\n } else if (this.isForbiddenError(status, headers, payload)) {\n return new _emberAjaxErrors.ForbiddenError(errors);\n } else if (this.isInvalidError(status, headers, payload)) {\n return new _emberAjaxErrors.InvalidError(errors);\n } else if (this.isBadRequestError(status, headers, payload)) {\n return new _emberAjaxErrors.BadRequestError(errors);\n } else if (this.isNotFoundError(status, headers, payload)) {\n return new _emberAjaxErrors.NotFoundError(errors);\n } else if (this.isServerError(status, headers, payload)) {\n return new _emberAjaxErrors.ServerError(errors);\n }\n\n var detailedMessage = this.generateDetailedMessage(status, headers, payload, requestData);\n return new _emberAjaxErrors.AjaxError(errors, detailedMessage);\n },\n\n /**\n * Match the host to a provided array of strings or regexes that can match to a host\n *\n * @method matchHosts\n * @private\n * @param {String} host the host you are sending too\n * @param {RegExp | String} matcher a string or regex that you can match the host to.\n * @returns {Boolean} if the host passed the matcher\n */\n _matchHosts: function _matchHosts(host, matcher) {\n if (matcher.constructor === RegExp) {\n return matcher.test(host);\n } else if (typeof matcher === 'string') {\n return matcher === host;\n } else {\n _ember['default'].Logger.warn('trustedHosts only handles strings or regexes.', matcher, 'is neither.');\n return false;\n }\n },\n\n /**\n * Determine whether the headers should be added for this request\n *\n * This hook is used to help prevent sending headers to every host, regardless\n * of the destination, since this could be a security issue if authentication\n * tokens are accidentally leaked to third parties.\n *\n * To avoid that problem, subclasses should utilize the `headers` computed\n * property to prevent authentication from being sent to third parties, or\n * implement this hook for more fine-grain control over when headers are sent.\n *\n * By default, the headers are sent if the host of the request matches the\n * `host` property designated on the class.\n *\n * @method _shouldSendHeaders\n * @private\n * @property {Object} hash request options hash\n * @returns {Boolean} whether or not headers should be sent\n */\n _shouldSendHeaders: function _shouldSendHeaders(_ref3) {\n var _this3 = this;\n\n var url = _ref3.url;\n var host = _ref3.host;\n\n url = url || '';\n host = host || get(this, 'host') || '';\n\n var urlObject = new _emberAjaxUtilsUrlHelpers.RequestURL(url);\n var trustedHosts = get(this, 'trustedHosts') || _ember['default'].A();\n\n // Add headers on relative URLs\n if (!urlObject.isComplete) {\n return true;\n } else if (trustedHosts.find(function (matcher) {\n return _this3._matchHosts(urlObject.hostname, matcher);\n })) {\n return true;\n }\n\n // Add headers on matching host\n var hostObject = new _emberAjaxUtilsUrlHelpers.RequestURL(host);\n return urlObject.sameHost(hostObject);\n },\n\n /**\n * Generates a detailed (\"friendly\") error message, with plenty\n * of information for debugging (good luck!)\n * @method generateDetailedMessage\n * @private\n * @param {Number} status\n * @param {Object} headers\n * @param {Object} payload\n * @param {Object} requestData the original request information\n * @return {Object} request information\n */\n generateDetailedMessage: function generateDetailedMessage(status, headers, payload, requestData) {\n var shortenedPayload = undefined;\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 = JSON.stringify(payload);\n }\n\n var requestDescription = requestData.type + ' ' + requestData.url;\n var payloadDescription = 'Payload (' + payloadContentType + ')';\n\n return ['Ember Data Request ' + requestDescription + ' returned a ' + status, payloadDescription, shortenedPayload].join('\\n');\n },\n\n /**\n * Default `handleResponse` implementation uses this hook to decide if the\n * response is a an authorized error.\n * @method isUnauthorizedError\n * @private\n * @param {Number} status\n * @param {Object} headers\n * @param {Object} payload\n * @return {Boolean}\n */\n isUnauthorizedError: function isUnauthorizedError(status) {\n return (0, _emberAjaxErrors.isUnauthorizedError)(status);\n },\n\n /**\n * Default `handleResponse` implementation uses this hook to decide if the\n * response is a forbidden error.\n * @method isForbiddenError\n * @private\n * @param {Number} status\n * @param {Object} headers\n * @param {Object} payload\n * @return {Boolean}\n */\n isForbiddenError: function isForbiddenError(status) {\n return (0, _emberAjaxErrors.isForbiddenError)(status);\n },\n\n /**\n * Default `handleResponse` implementation uses this hook to decide if the\n * response is a an invalid error.\n * @method isInvalidError\n * @private\n * @param {Number} status\n * @param {Object} headers\n * @param {Object} payload\n * @return {Boolean}\n */\n isInvalidError: function isInvalidError(status) {\n return (0, _emberAjaxErrors.isInvalidError)(status);\n },\n\n /**\n * Default `handleResponse` implementation uses this hook to decide if the\n * response is a bad request error.\n * @method isBadRequestError\n * @private\n * @param {Number} status\n * @param {Object} headers\n * @param {Object} payload\n * @return {Boolean}\n */\n isBadRequestError: function isBadRequestError(status) {\n return (0, _emberAjaxErrors.isBadRequestError)(status);\n },\n\n /**\n * Default `handleResponse` implementation uses this hook to decide if the\n * response is a \"not found\" error.\n * @method isNotFoundError\n * @private\n * @param {Number} status\n * @param {Object} headers\n * @param {Object} payload\n * @return {Boolean}\n */\n isNotFoundError: function isNotFoundError(status) {\n return (0, _emberAjaxErrors.isNotFoundError)(status);\n },\n\n /**\n * Default `handleResponse` implementation uses this hook to decide if the\n * response is a server error.\n * @method isServerError\n * @private\n * @param {Number} status\n * @param {Object} headers\n * @param {Object} payload\n * @return {Boolean}\n */\n isServerError: function isServerError(status) {\n return (0, _emberAjaxErrors.isServerError)(status);\n },\n\n /**\n * Default `handleResponse` implementation uses this hook to decide if the\n * response is a success.\n * @method isSuccess\n * @private\n * @param {Number} status\n * @param {Object} headers\n * @param {Object} payload\n * @return {Boolean}\n */\n isSuccess: function isSuccess(status) {\n return (0, _emberAjaxErrors.isSuccess)(status);\n },\n\n /**\n * @method parseErrorResponse\n * @private\n * @param {String} responseText\n * @return {Object}\n */\n parseErrorResponse: function parseErrorResponse(responseText) {\n var json = responseText;\n\n try {\n json = $.parseJSON(responseText);\n } catch (e) {}\n\n return json;\n },\n\n /**\n * @method normalizeErrorResponse\n * @private\n * @param {Number} status\n * @param {Object} headers\n * @param {Object} payload\n * @return {Array} errors payload\n */\n normalizeErrorResponse: function normalizeErrorResponse(status, headers, payload) {\n if (payload && typeof payload === 'object' && payload.errors) {\n if (!_ember['default'].isArray(payload.errors)) {\n return payload.errors;\n }\n\n return payload.errors.map(function (error) {\n var ret = merge({}, error);\n\n if (typeof ret.status === 'number') {\n ret.status = '' + ret.status;\n }\n\n return ret;\n });\n } else {\n return [{\n status: '' + status,\n title: 'The backend responded with an error',\n detail: payload\n }];\n }\n }\n });\n});","define('ember-ajax/raw', ['exports', 'ember-ajax/ajax-request'], function (exports, _emberAjaxAjaxRequest) {\n 'use strict';\n\n exports['default'] = raw;\n\n /**\n * Same as `request` except it resolves an object with\n *\n * {response, textStatus, jqXHR}\n *\n * Useful if you need access to the jqXHR object for headers, etc.\n *\n * @public\n */\n function raw() {\n var ajax = new _emberAjaxAjaxRequest['default']();\n return ajax.raw.apply(ajax, arguments);\n }\n});","define('ember-ajax/request', ['exports', 'ember-ajax/ajax-request'], function (exports, _emberAjaxAjaxRequest) {\n 'use strict';\n\n exports['default'] = request;\n\n /**\n * Helper function that allows you to use the default `ember-ajax` to make\n * requests without using the service.\n *\n * Note: Unlike `ic-ajax`'s `request` helper function, this will *not* return a\n * jqXHR object in the error handler. If you need jqXHR, you can use the `raw`\n * function instead.\n *\n * @public\n */\n function request() {\n var ajax = new _emberAjaxAjaxRequest['default']();\n return ajax.request.apply(ajax, arguments);\n }\n});","define('ember-ajax/services/ajax', ['exports', 'ember', 'ember-ajax/mixins/ajax-request'], function (exports, _ember, _emberAjaxMixinsAjaxRequest) {\n 'use strict';\n\n var Service = _ember['default'].Service;\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 * ```app/services/ajax\n * import AjaxService from 'ember-ajax/services/ajax';\n *\n * export default AjaxService.extend({\n * headers: {\n * \"API_KEY\": \"secret key\",\n * \"ANOTHER_HEADER\": \"Some header value\"\n * }\n * });\n * ```\n *\n * `headers` can also be used as a computed property to support dynamic\n * headers.\n *\n * ```app/services/ajax.js\n * import Ember from 'ember';\n * import AjaxService from 'ember-ajax/services/ajax';\n *\n * export default AjaxService.extend({\n * session: Ember.inject.service(),\n * headers: Ember.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/services/ajax.js\n * import Ember from 'ember';\n * import AjaxService from 'ember-ajax/services/ajax';\n *\n * export default AjaxService.extend({\n * session: Ember.inject.service(),\n * headers: Ember.computed(\"session.authToken\", function() {\n * return {\n * \"API_KEY\": Ember.get(document.cookie.match(/apiKey\\=([^;]*)/), \"1\"),\n * \"ANOTHER_HEADER\": \"Some header value\"\n * };\n * }).volatile()\n * });\n * ```\n * @public\n */\n exports['default'] = Service.extend(_emberAjaxMixinsAjaxRequest['default']);\n});","define('ember-ajax/utils/ajax', ['exports', 'ember', 'ember-ajax/utils/is-fastboot'], function (exports, _ember, _emberAjaxUtilsIsFastboot) {\n /* global najax */\n 'use strict';\n\n var $ = _ember['default'].$;\n\n exports['default'] = _emberAjaxUtilsIsFastboot['default'] ? najax : $.ajax;\n});","define('ember-ajax/utils/is-fastboot', ['exports'], function (exports) {\n /* global FastBoot */\n 'use strict';\n\n var isFastBoot = typeof FastBoot !== 'undefined';\n exports['default'] = isFastBoot;\n});","define('ember-ajax/utils/parse-response-headers', ['exports'], function (exports) {\n 'use strict';\n\n exports['default'] = parseResponseHeaders;\n\n function _toArray(arr) {\n return Array.isArray(arr) ? arr : Array.from(arr);\n }\n\n var CLRF = '\\r\\n';\n function parseResponseHeaders(headersString) {\n var headers = {};\n\n if (!headersString) {\n return headers;\n }\n\n var headerPairs = headersString.split(CLRF);\n\n headerPairs.forEach(function (header) {\n var _header$split = header.split(':');\n\n var _header$split2 = _toArray(_header$split);\n\n var field = _header$split2[0];\n\n var value = _header$split2.slice(1);\n\n field = field.trim();\n value = value.join(':').trim();\n\n if (value) {\n headers[field] = value;\n }\n });\n\n return headers;\n }\n});","define('ember-ajax/utils/url-helpers', ['exports', 'ember-ajax/utils/is-fastboot'], function (exports, _emberAjaxUtilsIsFastboot) {\n 'use strict';\n\n var _createClass = (function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ('value' in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);\n }\n }return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);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 /* global require, module, URL */\n\n var completeUrlRegex = /^(http|https)/;\n\n /*\n * Isomorphic URL parsing\n * Borrowed from\n * http://www.sitepoint.com/url-parsing-isomorphic-javascript/\n */\n var isNode = typeof module === 'object' && module.exports;\n var url = getUrlModule();\n\n /**\n * Get the node url module or an anchor element\n *\n * @private\n * @return {Object|HTMLAnchorElement} Object to parse urls\n */\n function getUrlModule() {\n if (_emberAjaxUtilsIsFastboot['default']) {\n // ember-fastboot-server provides the node url module as URL global\n return URL;\n }\n\n if (isNode) {\n return require('url');\n }\n\n return document.createElement('a');\n }\n\n /**\n * Parse a URL string into an object that defines its structure\n *\n * The returned object will have the following properties:\n *\n * href: the full URL\n * protocol: the request protocol\n * hostname: the target for the request\n * port: the port for the request\n * pathname: any URL after the host\n * search: query parameters\n * hash: the URL hash\n *\n * @private\n * @return {Object} URL structure\n */\n function parseUrl(str) {\n var fullObject = undefined;\n if (isNode || _emberAjaxUtilsIsFastboot['default']) {\n fullObject = url.parse(str);\n } else {\n url.href = str;\n fullObject = url;\n }\n var desiredProps = {};\n desiredProps.href = fullObject.href;\n desiredProps.protocol = fullObject.protocol;\n desiredProps.hostname = fullObject.hostname;\n desiredProps.port = fullObject.port;\n desiredProps.pathname = fullObject.pathname;\n desiredProps.search = fullObject.search;\n desiredProps.hash = fullObject.hash;\n return desiredProps;\n }\n\n /**\n * RequestURL\n *\n * Converts a URL string into an object for easy comparison to other URLs\n *\n * @public\n */\n\n var RequestURL = (function () {\n function RequestURL(url) {\n _classCallCheck(this, RequestURL);\n\n this.url = url;\n }\n\n _createClass(RequestURL, [{\n key: 'sameHost',\n value: function sameHost(other) {\n var _this = this;\n\n return ['protocol', 'hostname', 'port'].reduce(function (previous, prop) {\n return previous && _this[prop] === other[prop];\n }, true);\n }\n }, {\n key: 'url',\n get: function get() {\n return this._url;\n },\n set: function set(value) {\n this._url = value;\n\n var explodedUrl = parseUrl(value);\n for (var prop in explodedUrl) {\n this[prop] = explodedUrl[prop];\n }\n\n return this._url;\n }\n }, {\n key: 'isComplete',\n get: function get() {\n return this.url.match(completeUrlRegex);\n }\n }]);\n\n return RequestURL;\n })();\n\n exports.RequestURL = RequestURL;\n});","define('ember-cli-app-version/components/app-version', ['exports', 'ember', 'ember-cli-app-version/templates/app-version'], function (exports, _ember, _emberCliAppVersionTemplatesAppVersion) {\n 'use strict';\n\n exports['default'] = _ember['default'].Component.extend({\n tagName: 'span',\n layout: _emberCliAppVersionTemplatesAppVersion['default']\n });\n});","define('ember-cli-app-version/initializer-factory', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n exports['default'] = initializerFactory;\n\n var classify = _ember['default'].String.classify;\n\n function initializerFactory(name, version) {\n var registered = false;\n\n return function () {\n if (!registered && name && version) {\n var appName = classify(name);\n _ember['default'].libraries.register(appName, version);\n registered = true;\n }\n };\n }\n});","define(\"ember-cli-app-version/templates/app-version\", [\"exports\"], function (exports) {\n \"use strict\";\n\n exports[\"default\"] = Ember.HTMLBars.template((function () {\n return {\n meta: {\n \"fragmentReason\": {\n \"name\": \"missing-wrapper\",\n \"problems\": [\"wrong-type\"]\n },\n \"revision\": \"Ember@2.6.1\",\n \"loc\": {\n \"source\": null,\n \"start\": {\n \"line\": 1,\n \"column\": 0\n },\n \"end\": {\n \"line\": 2,\n \"column\": 0\n }\n },\n \"moduleName\": \"modules/ember-cli-app-version/templates/app-version.hbs\"\n },\n isEmpty: false,\n arity: 0,\n cachedFragment: null,\n hasRendered: false,\n buildFragment: function buildFragment(dom) {\n var el0 = dom.createDocumentFragment();\n var el1 = dom.createComment(\"\");\n dom.appendChild(el0, el1);\n var el1 = dom.createTextNode(\"\\n\");\n dom.appendChild(el0, el1);\n return el0;\n },\n buildRenderNodes: function buildRenderNodes(dom, fragment, contextualElement) {\n var morphs = new Array(1);\n morphs[0] = dom.createMorphAt(fragment, 0, 0, contextualElement);\n dom.insertBoundary(fragment, 0);\n return morphs;\n },\n statements: [[\"content\", \"version\", [\"loc\", [null, [1, 0], [1, 11]]]]],\n locals: [],\n templates: []\n };\n })());\n});","define('ember-css-transitions/components/transition-group', ['exports', 'ember', 'ember-css-transitions/mixins/transition-mixin'], function (exports, _ember, _emberCssTransitionsMixinsTransitionMixin) {\n 'use strict';\n\n exports['default'] = _ember['default'].Component.extend(_emberCssTransitionsMixinsTransitionMixin['default'], {\n tagName: 'div'\n });\n});","define('ember-css-transitions/mixins/transition-mixin', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n var _slicedToArray = (function () {\n function sliceIterator(arr, i) {\n var _arr = [];var _n = true;var _d = false;var _e = undefined;try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;_e = err;\n } finally {\n try {\n if (!_n && _i['return']) _i['return']();\n } finally {\n if (_d) throw _e;\n }\n }return _arr;\n }return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError('Invalid attempt to destructure non-iterable instance');\n }\n };\n })();\n\n var Mixin = _ember['default'].Mixin;\n var inject = _ember['default'].inject;\n var computed = _ember['default'].computed;\n var run = _ember['default'].run;\n\n var __DEV__ = _ember['default'].environment === 'development';\n var TICK = 17;\n var NO_EVENT_TIMEOUT = 5000;\n var noEventListener = null,\n EMPTY_ARRAY = [];\n\n if (__DEV__) {\n noEventListener = function () {\n _ember['default'].Logger.warn('transition(): tried to perform an animation without ' + 'an animationend or transitionend event after timeout (' + (NO_EVENT_TIMEOUT + 'ms). You should either disable this') + 'transition in JS or add a CSS animation/transition.');\n };\n }\n\n exports['default'] = Mixin.create({\n\n classNameBindings: ['joinedTransitionClasses'],\n\n joinedTransitionClasses: computed('transitionClasses.[]', function () {\n return this.get('transitionClasses').join(' ');\n }),\n\n addClass: function addClass(className, $element) {\n if (!this.get('isDestroying')) {\n this.get('transitionClasses').addObject(className);\n } else {\n $element.addClass(className);\n }\n },\n\n removeClass: function removeClass(className, $element) {\n if (!this.get('isDestroying')) {\n this.get('transitionClasses').removeObject(className);\n } else {\n $element.removeClass(className);\n }\n },\n\n transitionEvents: inject.service('transition-events'),\n\n shouldTransition: computed.bool('transitionClass'),\n\n 'transition-class': computed.alias('transitionClass'),\n\n init: function init() {\n this._super.apply(this, arguments);\n this.classNameQueue = [];\n this.transitionClasses = _ember['default'].A();\n this._setupTriggerObservers();\n },\n\n /**\n * Transitions a DOMElement.\n * @param DOMElement node Dom node to add transition classes to.\n * @param animationType The animation type, e.g. \"enter\" or \"leave\".\n * @param finishCallback The callback to use when transition was finished.\n */\n transitionDomNode: function transitionDomNode(node, transitionClass, animationType, finishCallback) {\n var _this = this;\n\n var $element = _ember['default'].$(node);\n\n if (!node) {\n if (finishCallback) {\n finishCallback();\n }\n return;\n }\n\n var className = transitionClass + '-' + animationType;\n var activeClassName = className + '-active';\n\n var noEventTimeout = null;\n\n var endListener = function endListener(e) {\n if (e && e.target !== node) {\n return;\n }\n if (__DEV__) {\n clearTimeout(noEventTimeout);\n }\n\n _this.removeClass(className, $element);\n _this.removeClass(activeClassName, $element);\n\n _this.get('transitionEvents').removeEndEventListener(node, endListener);\n\n // Usually this optional callback is used for informing an owner of\n // a leave animation and telling it to remove the child.\n if (finishCallback) {\n finishCallback();\n }\n };\n\n this.get('transitionEvents').addEndEventListener(node, endListener);\n\n this.addClass(className, $element);\n\n // Need to do this to actually trigger a transition.\n this.queueClass($element, activeClassName);\n\n if (animationType === 'remove') {\n this.queueClass($element, transitionClass, 'remove');\n }\n\n if (__DEV__) {\n noEventTimeout = setTimeout(noEventListener, NO_EVENT_TIMEOUT);\n }\n },\n\n /**\n * Queues a class on a jQuery Element.\n * Sets a timeout based on TICK, after TICK is done it sets the classes on the $element.\n * @param $element\n * @param className\n */\n queueClass: function queueClass($element, className) {\n var _this2 = this;\n\n var op = arguments.length <= 2 || arguments[2] === undefined ? 'add' : arguments[2];\n\n this.classNameQueue.push({ op: op, className: className });\n\n if (!this.timeout) {\n this.timeout = run.later(function () {\n _this2.flushClassNameQueue($element);\n }, TICK);\n }\n },\n\n /**\n * Flushes queued classes on the $element given and resets the timer.\n * @param $element The element to apply classNameQueue on.\n */\n flushClassNameQueue: function flushClassNameQueue($element) {\n var _this3 = this;\n\n // Add classes one and one to ensure animation correctness: e.g.: x-enter, x-enter-active\n this.classNameQueue.forEach(function (_ref) {\n var className = _ref.className;\n var op = _ref.op;\n\n if (op === 'add') {\n _this3.addClass(className, $element);\n } else if (op === 'remove') {\n _this3.removeClass(className, $element);\n }\n });\n this.classNameQueue = [];\n this.timeout = null;\n },\n\n willDestroyElement: function willDestroyElement() {\n var _this4 = this;\n\n this._teardownTriggerObservers();\n if (this.get('shouldTransition')) {\n if (this.timeout) {\n run.cancel(this.timeout);\n }\n // This is currently the only way of doing this (since willDestroyElement is not promise based).\n var clone = this.$().clone();\n var parent = this.$().parent();\n var idx = parent.children().index(this.$());\n run.scheduleOnce('afterRender', function () {\n _this4.addDestroyedElementClone(parent, idx, clone);\n _this4.transitionDomNode(clone[0], _this4.get('transitionClass'), 'leave', function () {\n _this4.didTransitionOut(clone);\n });\n });\n }\n },\n\n /**\n * Default placement of the cloned element when being destroyed.\n */\n addDestroyedElementClone: function addDestroyedElementClone(parent, idx, clone) {\n if (idx === 0) {\n parent.prepend(clone);\n } else {\n _ember['default'].$(parent.children()[idx - 1]).after(clone);\n }\n },\n\n /**\n * Called after transition in was done. Will always be called after didInsertElement.\n */\n didTransitionIn: _ember['default'].K,\n\n /**\n * Called when the transition out is called.\n * @param clone The cloned jQuery element. Normally .remove() should be called to remove the element after transition is done.\n */\n didTransitionOut: function didTransitionOut(clone) {\n clone.remove();\n },\n\n didInsertElement: function didInsertElement() {\n var _this5 = this;\n\n if (this.get('shouldTransition')) {\n run.scheduleOnce('afterRender', function () {\n _this5.transitionDomNode(_this5.get('element'), _this5.get('transitionClass'), 'enter', _this5.didTransitionIn);\n });\n }\n },\n\n /**\n * A list of properties that can control the transitions. Functions just like\n * Ember.Component.classNameBindings, and can be formatted in the same way.\n *\n * @property transitionTriggers\n * @type Array\n * @default []\n * @public\n */\n transitionTriggers: EMPTY_ARRAY,\n\n _setupTriggerObservers: function _setupTriggerObservers() {\n var _this6 = this;\n\n this._observers = {};\n this.get('transitionTriggers').forEach(function (classExp) {\n var _classExp$split = classExp.split(':');\n\n var _classExp$split2 = _slicedToArray(_classExp$split, 2);\n\n var propName = _classExp$split2[0];\n var className = _classExp$split2[1];\n\n if (!className) {\n className = _ember['default'].String.dasherize(propName);\n }\n\n // create observer function\n _this6._observers[propName] = function () {\n var _this7 = this;\n\n var value = this.get(propName);\n if (value) {\n this.addClass(className, this.$());\n this.transitionDomNode(this.get('element'), className, 'add');\n } else {\n this.transitionDomNode(this.get('element'), className, 'remove', function () {\n _this7.removeClass(className, _this7.$());\n });\n }\n };\n\n // if value starts as true, add it immediatly\n var value = _this6.get(propName);\n if (value) {\n _this6.get('transitionClasses').addObject(className);\n }\n\n // add observer\n _this6.addObserver(propName, _this6, _this6._observers[propName]);\n });\n },\n\n _teardownTriggerObservers: function _teardownTriggerObservers() {\n var _this8 = this;\n\n if (this._observers) {\n this.get('transitionTriggers').forEach(function (classExp) {\n var _classExp$split3 = classExp.split(':');\n\n var _classExp$split32 = _slicedToArray(_classExp$split3, 1);\n\n var propName = _classExp$split32[0];\n\n _this8.removeObserver(propName, _this8, _this8._observers[propName]);\n delete _this8._observers[propName];\n });\n }\n }\n\n });\n});","define('ember-css-transitions/services/transition-events', ['exports', 'ember', 'ember-css-transitions/utils/execution-environment'], function (exports, _ember, _emberCssTransitionsUtilsExecutionEnvironment) {\n 'use strict';\n\n /**\n * EVENT_NAME_MAP is used to determine which event fired when a\n * transition/animation ends, based on the style property used to\n * define that event.\n */\n var EVENT_NAME_MAP = {\n transitionend: {\n 'transition': 'transitionend',\n 'WebkitTransition': 'webkitTransitionEnd',\n 'MozTransition': 'mozTransitionEnd',\n 'OTransition': 'oTransitionEnd',\n 'msTransition': 'MSTransitionEnd'\n },\n\n animationend: {\n 'animation': 'animationend',\n 'WebkitAnimation': 'webkitAnimationEnd',\n 'MozAnimation': 'mozAnimationEnd',\n 'OAnimation': 'oAnimationEnd',\n 'msAnimation': 'MSAnimationEnd'\n }\n };\n\n var endEvents = [];\n\n function detectEvents() {\n var testEl = document.createElement('div');\n var style = testEl.style;\n\n // On some platforms, in particular some releases of Android 4.x,\n // the un-prefixed \"animation\" and \"transition\" properties are defined on the\n // style object but the events that fire will still be prefixed, so we need\n // to check if the un-prefixed events are useable, and if not remove them\n // from the map\n if (!('AnimationEvent' in window)) {\n delete EVENT_NAME_MAP.animationend.animation;\n }\n\n if (!('TransitionEvent' in window)) {\n delete EVENT_NAME_MAP.transitionend.transition;\n }\n\n for (var baseEventName in EVENT_NAME_MAP) {\n var baseEvents = EVENT_NAME_MAP[baseEventName];\n for (var styleName in baseEvents) {\n if (styleName in style) {\n endEvents.push(baseEvents[styleName]);\n break;\n }\n }\n }\n }\n\n // We use the raw {add|remove}EventListener() call because EventListener\n // does not know how to remove event listeners and we really should\n // clean up. Also, these events are not triggered in older browsers\n // so we should be A-OK here.\n\n function addEventListener(node, eventName, eventListener) {\n node.addEventListener(eventName, eventListener, false);\n }\n\n function removeEventListener(node, eventName, eventListener) {\n node.removeEventListener(eventName, eventListener, false);\n }\n\n exports['default'] = _ember['default'].Service.extend({\n init: function init() {\n if (_emberCssTransitionsUtilsExecutionEnvironment['default'].canUseDom()) {\n detectEvents();\n }\n },\n addEndEventListener: function addEndEventListener(node, eventListener) {\n if (endEvents.length === 0) {\n // If CSS transitions are not supported, trigger an \"end animation\"\n // event immediately.\n window.setTimeout(eventListener, 0);\n return;\n }\n endEvents.forEach(function (endEvent) {\n addEventListener(node, endEvent, eventListener);\n });\n },\n\n removeEndEventListener: function removeEndEventListener(node, eventListener) {\n if (endEvents.length === 0) {\n return;\n }\n endEvents.forEach(function (endEvent) {\n removeEventListener(node, endEvent, eventListener);\n });\n }\n });\n});","define('ember-css-transitions/utils/execution-environment', ['exports'], function (exports) {\n /* global window */\n\n 'use strict';\n\n exports['default'] = {\n canUseDom: function canUseDom() {\n return !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n }\n };\n});","define('ember-data/-private/adapters/build-url-mixin', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n var get = _ember['default'].get;\n\n /**\n \n WARNING: This interface is likely to change in order to accomodate https://github.com/emberjs/rfcs/pull/4\n \n ## Using BuildURLMixin\n \n To use url building, include the mixin when extending an adapter, and call `buildURL` where needed.\n The default behaviour is designed for RESTAdapter.\n \n ### Example\n \n ```javascript\n export default DS.Adapter.extend(BuildURLMixin, {\n findRecord: function(store, type, id, snapshot) {\n var url = this.buildURL(type.modelName, id, snapshot, 'findRecord');\n return this.ajax(url, 'GET');\n }\n });\n ```\n \n ### Attributes\n \n The `host` and `namespace` attributes will be used if defined, and are optional.\n \n @class BuildURLMixin\n @namespace DS\n */\n exports['default'] = _ember['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 buildURL(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 @method _buildURL\n @private\n @param {String} modelName\n @param {String} id\n @return {String} url\n */\n _buildURL: function _buildURL(modelName, id) {\n var url = [];\n var host = get(this, 'host');\n var prefix = this.urlPrefix();\n var path;\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 * @method urlForFindRecord\n * @param {String} id\n * @param {String} modelName\n * @param {DS.Snapshot} snapshot\n * @return {String} url\n */\n urlForFindRecord: function urlForFindRecord(id, modelName, snapshot) {\n return this._buildURL(modelName, id);\n },\n\n /**\n * @method urlForFindAll\n * @param {String} modelName\n * @param {DS.SnapshotRecordArray} snapshot\n * @return {String} url\n */\n urlForFindAll: function urlForFindAll(modelName, snapshot) {\n return this._buildURL(modelName);\n },\n\n /**\n * @method urlForQuery\n * @param {Object} query\n * @param {String} modelName\n * @return {String} url\n */\n urlForQuery: function urlForQuery(query, modelName) {\n return this._buildURL(modelName);\n },\n\n /**\n * @method urlForQueryRecord\n * @param {Object} query\n * @param {String} modelName\n * @return {String} url\n */\n urlForQueryRecord: function urlForQueryRecord(query, modelName) {\n return this._buildURL(modelName);\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 urlForFindMany(ids, modelName, snapshots) {\n return this._buildURL(modelName);\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 urlForFindHasMany(id, modelName, snapshot) {\n return this._buildURL(modelName, id);\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 urlForFindBelongsTo(id, modelName, snapshot) {\n return this._buildURL(modelName, id);\n },\n\n /**\n * @method urlForCreateRecord\n * @param {String} modelName\n * @param {DS.Snapshot} snapshot\n * @return {String} url\n */\n urlForCreateRecord: function urlForCreateRecord(modelName, snapshot) {\n return this._buildURL(modelName);\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 urlForUpdateRecord(id, modelName, snapshot) {\n return this._buildURL(modelName, id);\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 urlForDeleteRecord(id, modelName, snapshot) {\n return this._buildURL(modelName, id);\n },\n\n /**\n @method urlPrefix\n @private\n @param {String} path\n @param {String} parentURL\n @return {String} urlPrefix\n */\n urlPrefix: function urlPrefix(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 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 export default DS.RESTAdapter.extend({\n pathForType: function(modelName) {\n var decamelized = Ember.String.decamelize(modelName);\n return Ember.String.pluralize(decamelized);\n }\n });\n ```\n @method pathForType\n @param {String} modelName\n @return {String} path\n **/\n pathForType: function pathForType(modelName) {\n var camelized = _ember['default'].String.camelize(modelName);\n return _ember['default'].String.pluralize(camelized);\n }\n });\n});","define(\"ember-data/-private/adapters\", [\"exports\", \"ember-data/adapters/json-api\", \"ember-data/adapters/rest\"], function (exports, _emberDataAdaptersJsonApi, _emberDataAdaptersRest) {\n /**\n @module ember-data\n */\n\n \"use strict\";\n\n exports.JSONAPIAdapter = _emberDataAdaptersJsonApi[\"default\"];\n exports.RESTAdapter = _emberDataAdaptersRest[\"default\"];\n});","define('ember-data/-private/core', ['exports', 'ember', 'ember-data/version'], function (exports, _ember, _emberDataVersion) {\n 'use strict';\n\n /**\n @module ember-data\n */\n\n /**\n All Ember Data 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['default'].Namespace.create({\n VERSION: _emberDataVersion['default']\n });\n\n if (_ember['default'].libraries) {\n _ember['default'].libraries.registerCoreLibrary('Ember Data', DS.VERSION);\n }\n\n exports['default'] = DS;\n});","define('ember-data/-private/debug', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n exports.assert = assert;\n exports.debug = debug;\n exports.deprecate = deprecate;\n exports.info = info;\n exports.runInDebug = runInDebug;\n exports.warn = warn;\n exports.debugSeal = debugSeal;\n exports.assertPolymorphicType = assertPolymorphicType;\n\n function assert() {\n return _ember['default'].assert.apply(_ember['default'], arguments);\n }\n\n function debug() {\n return _ember['default'].debug.apply(_ember['default'], arguments);\n }\n\n function deprecate() {\n return _ember['default'].deprecate.apply(_ember['default'], arguments);\n }\n\n function info() {\n return _ember['default'].info.apply(_ember['default'], arguments);\n }\n\n function runInDebug() {\n return _ember['default'].runInDebug.apply(_ember['default'], arguments);\n }\n\n function warn() {\n return _ember['default'].warn.apply(_ember['default'], arguments);\n }\n\n function debugSeal() {\n return _ember['default'].debugSeal.apply(_ember['default'], arguments);\n }\n\n function checkPolymorphic(typeClass, addedRecord) {\n if (typeClass.__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 typeClass.__mixin.detect(addedRecord.type.PrototypeMixin);\n }\n if (_ember['default'].MODEL_FACTORY_INJECTIONS) {\n typeClass = typeClass.superclass;\n }\n return typeClass.detect(addedRecord.type);\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} record\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\n function assertPolymorphicType(record, relationshipMeta, addedRecord) {\n var addedType = addedRecord.type.modelName;\n var recordType = record.type.modelName;\n var key = relationshipMeta.key;\n var typeClass = record.store.modelFor(relationshipMeta.type);\n\n var assertionMessage = 'You cannot add a record of type \\'' + addedType + '\\' to the \\'' + recordType + '.' + key + '\\' relationship (only \\'' + typeClass.modelName + '\\' allowed)';\n\n assert(assertionMessage, checkPolymorphic(typeClass, addedRecord));\n }\n});","define('ember-data/-private/ext/date', ['exports', 'ember'], function (exports, _ember) {\n /**\n @module ember-data\n */\n\n 'use strict';\n\n /**\n Date.parse with progressive enhancement for ISO 8601 \n \n © 2011 Colin Snover \n \n Released under MIT license.\n \n @class Date\n @namespace Ember\n @static\n */\n _ember['default'].Date = _ember['default'].Date || {};\n\n var origParse = Date.parse;\n var numericKeys = [1, 4, 5, 6, 7, 10, 11];\n\n /**\n @method parse\n @param {Date} date\n @return {Number} timestamp\n */\n _ember['default'].Date.parse = function (date) {\n var timestamp, struct;\n var minutesOffset = 0;\n\n // ES5 §15.9.4.2 states that the string should attempt to be parsed as a Date Time String Format string\n // before falling back to any implementation-specific date parsing, so that’s what we do, even if native\n // implementations could be faster\n // 1 YYYY 2 MM 3 DD 4 HH 5 mm 6 ss 7 msec 8 Z 9 ± 10 tzHH 11 tzmm\n if (struct = /^(\\d{4}|[+\\-]\\d{6})(?:-(\\d{2})(?:-(\\d{2}))?)?(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.(\\d{3}))?)?(?:(Z)|([+\\-])(\\d{2})(?::(\\d{2}))?)?)?$/.exec(date)) {\n // avoid NaN timestamps caused by “undefined” values being passed to Date.UTC\n for (var i = 0, k; k = numericKeys[i]; ++i) {\n struct[k] = +struct[k] || 0;\n }\n\n // allow undefined days and months\n struct[2] = (+struct[2] || 1) - 1;\n struct[3] = +struct[3] || 1;\n\n if (struct[8] !== 'Z' && struct[9] !== undefined) {\n minutesOffset = struct[10] * 60 + struct[11];\n\n if (struct[9] === '+') {\n minutesOffset = 0 - minutesOffset;\n }\n }\n\n timestamp = Date.UTC(struct[1], struct[2], struct[3], struct[4], struct[5] + minutesOffset, struct[6], struct[7]);\n } else {\n timestamp = origParse ? origParse(date) : NaN;\n }\n\n return timestamp;\n };\n\n if (_ember['default'].EXTEND_PROTOTYPES === true || _ember['default'].EXTEND_PROTOTYPES.Date) {\n Date.parse = _ember['default'].Date.parse;\n }\n});","define('ember-data/-private/features', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n exports['default'] = isEnabled;\n\n function isEnabled() {\n var _Ember$FEATURES;\n\n return (_Ember$FEATURES = _ember['default'].FEATURES).isEnabled.apply(_Ember$FEATURES, arguments);\n }\n});","define(\"ember-data/-private/initializers/data-adapter\", [\"exports\", \"ember-data/-private/system/debug/debug-adapter\"], function (exports, _emberDataPrivateSystemDebugDebugAdapter) {\n \"use strict\";\n\n exports[\"default\"] = initializeDebugAdapter;\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 initializeDebugAdapter(registry) {\n registry.register('data-adapter:main', _emberDataPrivateSystemDebugDebugAdapter[\"default\"]);\n }\n});","define('ember-data/-private/initializers/store-injections', ['exports'], function (exports) {\n 'use strict';\n\n exports['default'] = initializeStoreInjections;\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});","define(\"ember-data/-private/initializers/store\", [\"exports\", \"ember-data/-private/system/store\", \"ember-data/-private/serializers\", \"ember-data/-private/adapters\"], function (exports, _emberDataPrivateSystemStore, _emberDataPrivateSerializers, _emberDataPrivateAdapters) {\n \"use strict\";\n\n exports[\"default\"] = initializeStore;\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 // registry.optionsForType for Ember < 2.1.0\n // application.registerOptionsForType for Ember 2.1.0+\n var registerOptionsForType = registry.registerOptionsForType || registry.optionsForType;\n registerOptionsForType.call(registry, 'serializer', { singleton: false });\n registerOptionsForType.call(registry, 'adapter', { singleton: false });\n\n registry.register('serializer:-default', _emberDataPrivateSerializers.JSONSerializer);\n registry.register('serializer:-rest', _emberDataPrivateSerializers.RESTSerializer);\n registry.register('adapter:-rest', _emberDataPrivateAdapters.RESTAdapter);\n\n registry.register('adapter:-json-api', _emberDataPrivateAdapters.JSONAPIAdapter);\n registry.register('serializer:-json-api', _emberDataPrivateSerializers.JSONAPISerializer);\n\n if (!has(registry, 'service:store')) {\n registry.register('service:store', _emberDataPrivateSystemStore[\"default\"]);\n }\n }\n});","define('ember-data/-private/initializers/transforms', ['exports', 'ember-data/-private/transforms'], function (exports, _emberDataPrivateTransforms) {\n 'use strict';\n\n exports['default'] = initializeTransforms;\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', _emberDataPrivateTransforms.BooleanTransform);\n registry.register('transform:date', _emberDataPrivateTransforms.DateTransform);\n registry.register('transform:number', _emberDataPrivateTransforms.NumberTransform);\n registry.register('transform:string', _emberDataPrivateTransforms.StringTransform);\n }\n});","define('ember-data/-private/instance-initializers/initialize-store-service', ['exports'], function (exports) {\n 'use strict';\n\n exports['default'] = initializeStoreService;\n\n /**\n Configures a registry for use with an Ember-Data\n store.\n \n @method initializeStore\n @param {Ember.ApplicationInstance} applicationOrRegistry\n */\n function initializeStoreService(application) {\n var container = application.lookup ? application : application.container;\n // Eagerly generate the store so defaultStore is populated.\n container.lookup('service:store');\n }\n});","define(\"ember-data/-private/serializers\", [\"exports\", \"ember-data/serializers/json-api\", \"ember-data/serializers/json\", \"ember-data/serializers/rest\"], function (exports, _emberDataSerializersJsonApi, _emberDataSerializersJson, _emberDataSerializersRest) {\n /**\n @module ember-data\n */\n\n \"use strict\";\n\n exports.JSONAPISerializer = _emberDataSerializersJsonApi[\"default\"];\n exports.JSONSerializer = _emberDataSerializersJson[\"default\"];\n exports.RESTSerializer = _emberDataSerializersRest[\"default\"];\n});","define(\"ember-data/-private/system/clone-null\", [\"exports\", \"ember-data/-private/system/empty-object\"], function (exports, _emberDataPrivateSystemEmptyObject) {\n \"use strict\";\n\n exports[\"default\"] = cloneNull;\n\n function cloneNull(source) {\n var clone = new _emberDataPrivateSystemEmptyObject[\"default\"]();\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['default'] = coerceId;\n\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\n function coerceId(id) {\n return id == null || id === '' ? null : id + '';\n }\n});","define('ember-data/-private/system/container-proxy', ['exports', 'ember-data/-private/debug'], function (exports, _emberDataPrivateDebug) {\n 'use strict';\n\n exports['default'] = ContainerProxy;\n\n /*\n This is used internally to enable deprecation of container paths and provide\n a decent message to the user indicating how to fix the issue.\n \n @class ContainerProxy\n @namespace DS\n @private\n */\n function ContainerProxy(container) {\n this.container = container;\n }\n\n ContainerProxy.prototype.aliasedFactory = function (path, preLookup) {\n var _this = this;\n\n return {\n create: function create() {\n if (preLookup) {\n preLookup();\n }\n\n return _this.container.lookup(path);\n }\n };\n };\n\n ContainerProxy.prototype.registerAlias = function (source, dest, preLookup) {\n var factory = this.aliasedFactory(dest, preLookup);\n\n return this.container.register(source, factory);\n };\n\n ContainerProxy.prototype.registerDeprecation = function (deprecated, valid) {\n var preLookupCallback = function preLookupCallback() {\n (0, _emberDataPrivateDebug.deprecate)('You tried to look up \\'' + deprecated + '\\', but this has been deprecated in favor of \\'' + valid + '\\'.', false, {\n id: 'ds.store.deprecated-lookup',\n until: '2.0.0'\n });\n };\n\n return this.registerAlias(deprecated, valid, preLookupCallback);\n };\n\n ContainerProxy.prototype.registerDeprecations = function (proxyPairs) {\n var i, proxyPair, deprecated, valid;\n\n for (i = proxyPairs.length; i > 0; i--) {\n proxyPair = proxyPairs[i - 1];\n deprecated = proxyPair['deprecated'];\n valid = proxyPair['valid'];\n\n this.registerDeprecation(deprecated, valid);\n }\n };\n});","define('ember-data/-private/system/debug/debug-adapter', ['exports', 'ember', 'ember-data/model'], function (exports, _ember, _emberDataModel) {\n /**\n @module ember-data\n */\n 'use strict';\n\n var get = _ember['default'].get;\n var capitalize = _ember['default'].String.capitalize;\n var underscore = _ember['default'].String.underscore;\n var assert = _ember['default'].assert;\n\n /*\n Extend `Ember.DataAdapter` with ED specific code.\n \n @class DebugAdapter\n @namespace DS\n @extends Ember.DataAdapter\n @private\n */\n exports['default'] = _ember['default'].DataAdapter.extend({\n getFilters: function getFilters() {\n return [{ name: 'isNew', desc: 'New' }, { name: 'isModified', desc: 'Modified' }, { name: 'isClean', desc: 'Clean' }];\n },\n\n detect: function detect(typeClass) {\n return typeClass !== _emberDataModel['default'] && _emberDataModel['default'].detect(typeClass);\n },\n\n columnsForType: function columnsForType(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\n getRecords: function getRecords(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) {\n modelName = match[1];\n }\n }\n }\n assert(\"Cannot find model name. Please upgrade to Ember.js >= 1.13 for Ember Inspector support\", !!modelName);\n return this.get('store').peekAll(modelName);\n },\n\n getRecordColumnValues: function getRecordColumnValues(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 var value = get(record, key);\n columnValues[key] = value;\n });\n return columnValues;\n },\n\n getRecordKeywords: function getRecordKeywords(record) {\n var keywords = [];\n var keys = _ember['default'].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\n getRecordFilterValues: function getRecordFilterValues(record) {\n return {\n isNew: record.get('isNew'),\n isModified: record.get('hasDirtyAttributes') && !record.get('isNew'),\n isClean: !record.get('hasDirtyAttributes')\n };\n },\n\n getRecordColor: function getRecordColor(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\n observeRecord: function observeRecord(record, recordUpdated) {\n var releaseMethods = _ember['default'].A();\n var keysToObserve = _ember['default'].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 handler() {\n recordUpdated(adapter.wrapRecord(record));\n };\n _ember['default'].addObserver(record, key, handler);\n releaseMethods.push(function () {\n _ember['default'].removeObserver(record, key, handler);\n });\n });\n\n var release = function release() {\n releaseMethods.forEach(function (fn) {\n return fn();\n });\n };\n\n return release;\n }\n });\n});","define('ember-data/-private/system/debug/debug-info', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n exports['default'] = _ember['default'].Mixin.create({\n\n /**\n Provides info about the model for debugging purposes\n by grouping the properties into more semantic groups.\n Meant to be used by debugging tools such as the Chrome Ember Extension.\n - Groups all attributes in \"Attributes\" group.\n - Groups all belongsTo relationships in \"Belongs To\" group.\n - Groups all hasMany relationships in \"Has Many\" group.\n - Groups all flags in \"Flags\" group.\n - Flags relationship CPs as expensive properties.\n @method _debugInfo\n @for DS.Model\n @private\n */\n _debugInfo: function _debugInfo() {\n var attributes = ['id'];\n var relationships = { belongsTo: [], hasMany: [] };\n var expensiveProperties = [];\n\n this.eachAttribute(function (name, meta) {\n return attributes.push(name);\n });\n\n this.eachRelationship(function (name, relationship) {\n relationships[relationship.kind].push(name);\n expensiveProperties.push(name);\n });\n\n var groups = [{\n name: 'Attributes',\n properties: attributes,\n expand: true\n }, {\n name: 'Belongs To',\n properties: relationships.belongsTo,\n expand: true\n }, {\n name: 'Has Many',\n properties: relationships.hasMany,\n expand: true\n }, {\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 });\n});","define(\"ember-data/-private/system/debug\", [\"exports\", \"ember-data/-private/system/debug/debug-adapter\"], function (exports, _emberDataPrivateSystemDebugDebugAdapter) {\n /**\n @module ember-data\n */\n\n \"use strict\";\n\n exports[\"default\"] = _emberDataPrivateSystemDebugDebugAdapter[\"default\"];\n});","define(\"ember-data/-private/system/empty-object\", [\"exports\"], function (exports) {\n \"use strict\";\n\n exports[\"default\"] = EmptyObject;\n\n // This exists because `Object.create(null)` is absurdly slow compared\n // to `new EmptyObject()`. In either case, you want a null prototype\n // when you're treating the object instances as arbitrary dictionaries\n // and don't want your keys colliding with build-in methods on the\n // default object prototype.\n var proto = Object.create(null, {\n // without this, we will always still end up with (new\n // EmptyObject()).constructor === Object\n constructor: {\n value: undefined,\n enumerable: false,\n writable: true\n }\n });\n function EmptyObject() {}\n\n EmptyObject.prototype = proto;\n});","define('ember-data/-private/system/is-array-like', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n exports['default'] = isArrayLike;\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 (_ember['default'].Array.detect(obj)) {\n return true;\n }\n\n var type = _ember['default'].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\", \"ember-data/-private/debug\", \"ember-data/-private/system/promise-proxies\", \"ember-data/-private/system/store/common\"], function (exports, _ember, _emberDataPrivateDebug, _emberDataPrivateSystemPromiseProxies, _emberDataPrivateSystemStoreCommon) {\n /**\n @module ember-data\n */\n \"use strict\";\n\n var get = _ember[\"default\"].get;\n var set = _ember[\"default\"].set;\n\n /**\n A `ManyArray` is a `MutableArray` that represents the contents of a has-many\n relationship.\n \n The `ManyArray` is instantiated lazily the first time the relationship is\n requested.\n \n ### Inverses\n \n Often, the relationships in Ember Data applications will have\n an inverse. For example, imagine the following models are\n defined:\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 If you created a new instance of `App.Post` and added\n a `App.Comment` record to its `comments` has-many\n relationship, you would expect the comment's `post`\n property to be set to the post that contained\n the has-many.\n \n We call the record to which a relationship belongs the\n relationship's _owner_.\n \n @class ManyArray\n @namespace DS\n @extends Ember.Object\n @uses Ember.MutableArray, Ember.Evented\n */\n exports[\"default\"] = _ember[\"default\"].Object.extend(_ember[\"default\"].MutableArray, _ember[\"default\"].Evented, {\n init: function init() {\n this._super.apply(this, arguments);\n this.currentState = _ember[\"default\"].A([]);\n },\n\n record: null,\n\n canonicalState: null,\n currentState: null,\n\n length: 0,\n\n objectAt: function objectAt(index) {\n //Ember observers such as 'firstObject', 'lastObject' might do out of bounds accesses\n if (!this.currentState[index]) {\n return undefined;\n }\n return this.currentState[index].getRecord();\n },\n\n flushCanonical: function flushCanonical() {\n //TODO make this smarter, currently its plenty stupid\n var toSet = this.canonicalState.filter(function (internalModel) {\n return !internalModel.isDeleted();\n });\n\n //a hack for not removing new records\n //TODO remove once we have proper diffing\n var newRecords = this.currentState.filter(\n // only add new records which are not yet in the canonical state of this\n // relationship (a new record can be in the canonical state if it has\n function (internalModel) {\n return internalModel.isNew() && toSet.indexOf(internalModel) === -1;\n });\n toSet = toSet.concat(newRecords);\n var oldLength = this.length;\n this.arrayContentWillChange(0, this.length, toSet.length);\n // It’s possible the parent side of the relationship may have been unloaded by this point\n if ((0, _emberDataPrivateSystemStoreCommon._objectIsAlive)(this)) {\n this.set('length', toSet.length);\n }\n this.currentState = toSet;\n this.arrayContentDidChange(0, oldLength, this.length);\n //TODO Figure out to notify only on additions and maybe only if unloaded\n this.relationship.notifyHasManyChanged();\n this.record.updateRecordArrays();\n },\n /**\n `true` if the relationship is polymorphic, `false` otherwise.\n @property {Boolean} isPolymorphic\n @private\n */\n isPolymorphic: false,\n\n /**\n The loading state of this array\n @property {Boolean} isLoaded\n */\n isLoaded: false,\n\n /**\n The relationship which manages this array.\n @property {ManyRelationship} relationship\n @private\n */\n relationship: 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 meta: null,\n\n internalReplace: function internalReplace(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 if (objects) {\n //TODO(Igor) probably needed only for unloaded records\n this.relationship.notifyHasManyChanged();\n }\n this.record.updateRecordArrays();\n },\n\n //TODO(Igor) optimize\n internalRemoveRecords: function internalRemoveRecords(records) {\n var index;\n for (var i = 0; i < records.length; i++) {\n index = this.currentState.indexOf(records[i]);\n this.internalReplace(index, 1);\n }\n },\n\n //TODO(Igor) optimize\n internalAddRecords: function internalAddRecords(records, idx) {\n if (idx === undefined) {\n idx = this.currentState.length;\n }\n this.internalReplace(idx, 0, records);\n },\n\n replace: function replace(idx, amt, objects) {\n var records;\n if (amt > 0) {\n records = this.currentState.slice(idx, idx + amt);\n this.get('relationship').removeRecords(records);\n }\n if (objects) {\n this.get('relationship').addRecords(objects.map(function (obj) {\n return obj._internalModel;\n }), idx);\n }\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 promise: null,\n\n /**\n @method loadingRecordsCount\n @param {Number} count\n @private\n */\n loadingRecordsCount: function loadingRecordsCount(count) {\n this.loadingRecordsCount = count;\n },\n\n /**\n @method loadedRecord\n @private\n */\n loadedRecord: function loadedRecord() {\n this.loadingRecordsCount--;\n if (this.loadingRecordsCount === 0) {\n set(this, 'isLoaded', true);\n this.trigger('didLoad');\n }\n },\n\n /**\n @method reload\n @public\n */\n reload: function reload() {\n return this.relationship.reload();\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 save() {\n var manyArray = this;\n var promiseLabel = \"DS: ManyArray#save \" + get(this, 'type');\n var promise = _ember[\"default\"].RSVP.all(this.invoke(\"save\"), promiseLabel).then(function (array) {\n return manyArray;\n }, null, \"DS: ManyArray#save return ManyArray\");\n\n return _emberDataPrivateSystemPromiseProxies.PromiseArray.create({ promise: promise });\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 createRecord(hash) {\n var store = get(this, 'store');\n var type = get(this, 'type');\n var record;\n\n (0, _emberDataPrivateDebug.assert)(\"You cannot add '\" + type.modelName + \"' records to this polymorphic relationship.\", !get(this, 'isPolymorphic'));\n record = store.createRecord(type.modelName, hash);\n this.pushObject(record);\n\n return record;\n }\n });\n});\n// been 'acknowleged' to be in the relationship via a store.push)","define(\"ember-data/-private/system/model/attr\", [\"exports\", \"ember\", \"ember-data/-private/debug\"], function (exports, _ember, _emberDataPrivateDebug) {\n \"use strict\";\n\n var get = _ember[\"default\"].get;\n var Map = _ember[\"default\"].Map;\n\n /**\n @module ember-data\n */\n\n /**\n @class Model\n @namespace DS\n */\n\n var AttrClassMethodsMixin = _ember[\"default\"].Mixin.create({\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: attr('string'),\n lastName: attr('string'),\n birthday: attr('date')\n });\n ```\n ```javascript\n import Ember from 'ember';\n import Person from 'app/models/person';\n var 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: _ember[\"default\"].computed(function () {\n var _this = this;\n\n var map = Map.create();\n\n this.eachComputedProperty(function (name, meta) {\n if (meta.isAttribute) {\n (0, _emberDataPrivateDebug.assert)(\"You may not set `id` as an attribute on your model. Please remove any lines that look like: `id: DS.attr('')` from \" + _this.toString(), name !== 'id');\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: attr(),\n lastName: attr('string'),\n birthday: attr('date')\n });\n ```\n ```javascript\n import Ember from 'ember';\n import Person from 'app/models/person';\n var 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: _ember[\"default\"].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 /**\n Iterates through the attributes of the model, calling the passed function on each\n attribute.\n The callback method you provide should have the following signature (all\n parameters are optional):\n ```javascript\n function(name, meta);\n ```\n - `name` the name of the current property in the iteration\n - `meta` the meta object for the attribute property in the iteration\n Note that in addition to a callback, you can also pass an optional target\n object that will be set as `this` on the context.\n Example\n ```javascript\n import DS from 'ember-data';\n var Person = DS.Model.extend({\n firstName: attr('string'),\n lastName: attr('string'),\n birthday: attr('date')\n });\n Person.eachAttribute(function(name, meta) {\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 @method eachAttribute\n @param {Function} callback The callback to execute\n @param {Object} [binding] the value to which the callback's `this` should be bound\n @static\n */\n eachAttribute: function eachAttribute(callback, binding) {\n get(this, 'attributes').forEach(function (meta, name) {\n callback.call(binding, name, meta);\n });\n },\n\n /**\n Iterates through the transformedAttributes of the model, calling\n the passed function on each attribute. Note the callback will not be\n called for any attributes that do not have an transformation type.\n The callback method you provide should have the following signature (all\n parameters are optional):\n ```javascript\n function(name, type);\n ```\n - `name` the name of the current property in the iteration\n - `type` a string containing the name of the type of transformed\n applied to the attribute\n Note that in addition to a callback, you can also pass an optional target\n object that will be set as `this` on the context.\n Example\n ```javascript\n import DS from 'ember-data';\n var Person = DS.Model.extend({\n firstName: attr(),\n lastName: attr('string'),\n birthday: attr('date')\n });\n Person.eachTransformedAttribute(function(name, type) {\n console.log(name, type);\n });\n // prints:\n // lastName string\n // birthday date\n ```\n @method eachTransformedAttribute\n @param {Function} callback The callback to execute\n @param {Object} [binding] the value to which the callback's `this` should be bound\n @static\n */\n eachTransformedAttribute: function eachTransformedAttribute(callback, binding) {\n get(this, 'transformedAttributes').forEach(function (type, name) {\n callback.call(binding, name, type);\n });\n }\n });\n\n exports.AttrClassMethodsMixin = AttrClassMethodsMixin;\n\n var AttrInstanceMethodsMixin = _ember[\"default\"].Mixin.create({\n eachAttribute: function eachAttribute(callback, binding) {\n this.constructor.eachAttribute(callback, binding);\n }\n });\n exports.AttrInstanceMethodsMixin = AttrInstanceMethodsMixin;\n});","define('ember-data/-private/system/model/errors', ['exports', 'ember', 'ember-data/-private/debug'], function (exports, _ember, _emberDataPrivateDebug) {\n 'use strict';\n\n var get = _ember['default'].get;\n var set = _ember['default'].set;\n var isEmpty = _ember['default'].isEmpty;\n var makeArray = _ember['default'].makeArray;\n\n var MapWithDefault = _ember['default'].MapWithDefault;\n\n /**\n @module ember-data\n */\n\n /**\n Holds validation errors for a given record, organized by attribute names.\n \n Every `DS.Model` has an `errors` property that is an instance of\n `DS.Errors`. This can be used to display validation error\n messages returned from the server when a `record.save()` rejects.\n \n For Example, if you had a `User` model that looked like this:\n \n ```app/models/user.js\n import DS from 'ember-data';\n \n export default DS.Model.extend({\n username: attr('string'),\n email: attr('string')\n });\n ```\n And you attempted to save a record that did not validate on the backend:\n \n ```javascript\n var user = store.createRecord('user', {\n username: 'tomster',\n email: 'invalidEmail'\n });\n user.save();\n ```\n \n Your backend would be expected to return an error response that described\n the problem, so that error messages can be generated on the app.\n \n API responses will be translated into instances of `DS.Errors` differently,\n depending on the specific combination of adapter and serializer used. You\n may want to check the documentation or the source code of the libraries\n that you are using, to know how they expect errors to be communicated.\n \n Errors can be displayed to the user by accessing their property name\n to get an array of all the error objects for that property. Each\n error object is a JavaScript object with two keys:\n \n - `message` A string containing the error message from the backend\n - `attribute` The name of the property associated with this error message\n \n ```handlebars\n Username: {{input value=username}} \n {{#each model.errors.username as |error|}}\n \n {{error.message}}\n \n {{/each}}\n \n Email: {{input value=email}} \n {{#each model.errors.email as |error|}}\n \n {{error.message}}\n \n {{/each}}\n ```\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 \n ```handlebars\n {{#each model.errors.messages as |message|}}\n \n {{message}}\n \n {{/each}}\n ```\n \n @class Errors\n @namespace DS\n @extends Ember.Object\n @uses Ember.Enumerable\n @uses Ember.Evented\n */\n exports['default'] = _ember['default'].ArrayProxy.extend(_ember['default'].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 registerHandlers(target, becameInvalid, becameValid) {\n (0, _emberDataPrivateDebug.deprecate)('Record errors will no longer be evented.', false, {\n id: 'ds.errors.registerHandlers',\n until: '3.0.0'\n });\n\n this._registerHandlers(target, becameInvalid, becameValid);\n },\n\n /**\n Register with target handler\n @method _registerHandlers\n @private\n */\n _registerHandlers: function _registerHandlers(target, becameInvalid, becameValid) {\n this.on('becameInvalid', target, becameInvalid);\n this.on('becameValid', target, becameValid);\n },\n\n /**\n @property errorsByAttributeName\n @type {Ember.MapWithDefault}\n @private\n */\n errorsByAttributeName: _ember['default'].computed(function () {\n return MapWithDefault.create({\n defaultValue: function defaultValue() {\n return _ember['default'].A();\n }\n });\n }),\n\n /**\n Returns errors for a given attribute\n ```javascript\n var 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 errorsFor(attribute) {\n return get(this, 'errorsByAttributeName').get(attribute);\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 \n {{message}}\n \n {{/each}}\n ```\n @property messages\n @type {Array}\n */\n messages: _ember['default'].computed.mapBy('content', 'message'),\n\n /**\n @property content\n @type {Array}\n @private\n */\n content: _ember['default'].computed(function () {\n return _ember['default'].A();\n }),\n\n /**\n @method unknownProperty\n @private\n */\n unknownProperty: function unknownProperty(attribute) {\n var errors = this.errorsFor(attribute);\n if (isEmpty(errors)) {\n return null;\n }\n return errors;\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: _ember['default'].computed.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 add(attribute, messages) {\n (0, _emberDataPrivateDebug.warn)('Interacting with a record errors object will no longer change the record state.', false, {\n id: 'ds.errors.add'\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 Adds error messages to a given attribute without sending event.\n @method _add\n @private\n */\n _add: function _add(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 @method _findOrCreateMessages\n @private\n */\n _findOrCreateMessages: function _findOrCreateMessages(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 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 Ember from 'ember';\n export default Ember.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 remove(attribute) {\n (0, _emberDataPrivateDebug.warn)('Interacting with a record errors object will no longer change the record state.', false, {\n id: 'ds.errors.remove'\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 Removes all error messages from the given attribute without sending event.\n @method _remove\n @private\n */\n _remove: function _remove(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 },\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 Ember from 'ember';\n export default Ember.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 clear() {\n (0, _emberDataPrivateDebug.warn)('Interacting with a record errors object will no longer change the record state.', false, {\n id: 'ds.errors.clear'\n });\n\n if (get(this, 'isEmpty')) {\n return;\n }\n\n this._clear();\n this.trigger('becameValid');\n },\n\n /**\n Removes all error messages.\n to the record.\n @method _clear\n @private\n */\n _clear: function _clear() {\n if (get(this, 'isEmpty')) {\n return;\n }\n\n var errorsByAttributeName = get(this, 'errorsByAttributeName');\n var attributes = _ember['default'].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 _ember['default'].ArrayProxy.prototype.clear.call(this);\n },\n\n /**\n Checks if there is error messages for the given attribute.\n ```app/routes/user/edit.js\n import Ember from 'ember';\n export default Ember.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 has(attribute) {\n return !isEmpty(this.errorsFor(attribute));\n }\n });\n});","define(\"ember-data/-private/system/model/internal-model\", [\"exports\", \"ember\", \"ember-data/-private/debug\", \"ember-data/-private/system/model/states\", \"ember-data/-private/system/relationships/state/create\", \"ember-data/-private/system/snapshot\", \"ember-data/-private/system/empty-object\", \"ember-data/-private/features\", \"ember-data/-private/utils\", \"ember-data/-private/system/references\"], function (exports, _ember, _emberDataPrivateDebug, _emberDataPrivateSystemModelStates, _emberDataPrivateSystemRelationshipsStateCreate, _emberDataPrivateSystemSnapshot, _emberDataPrivateSystemEmptyObject, _emberDataPrivateFeatures, _emberDataPrivateUtils, _emberDataPrivateSystemReferences) {\n \"use strict\";\n\n var _slicedToArray = (function () {\n function sliceIterator(arr, i) {\n var _arr = [];var _n = true;var _d = false;var _e = undefined;try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;_e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"]) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }return _arr;\n }return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }\n };\n })();\n\n exports[\"default\"] = InternalModel;\n\n var Promise = _ember[\"default\"].RSVP.Promise;\n var get = _ember[\"default\"].get;\n var set = _ember[\"default\"].set;\n var copy = _ember[\"default\"].copy;\n var assign = _ember[\"default\"].assign || _ember[\"default\"].merge;\n\n var _extractPivotNameCache = new _emberDataPrivateSystemEmptyObject[\"default\"]();\n var _splitOnDotCache = new _emberDataPrivateSystemEmptyObject[\"default\"]();\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 retrieveFromCurrentState(key) {\n return function () {\n return get(this.currentState, key);\n };\n }\n\n var guid = 0;\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 function InternalModel(type, id, store, _, data) {\n this.type = type;\n this.id = id;\n this.store = store;\n this._data = data || new _emberDataPrivateSystemEmptyObject[\"default\"]();\n this.modelName = type.modelName;\n this.dataHasInitialized = false;\n //Look into making this lazy\n this._deferredTriggers = [];\n this._attributes = new _emberDataPrivateSystemEmptyObject[\"default\"]();\n this._inFlightAttributes = new _emberDataPrivateSystemEmptyObject[\"default\"]();\n this._relationships = new _emberDataPrivateSystemRelationshipsStateCreate[\"default\"](this);\n this._recordArrays = undefined;\n this.currentState = _emberDataPrivateSystemModelStates[\"default\"].empty;\n this.recordReference = new _emberDataPrivateSystemReferences.RecordReference(store, this);\n this.references = {};\n this.isReloading = false;\n this.isError = false;\n this.error = null;\n this.__ember_meta__ = null;\n this[_ember[\"default\"].GUID_KEY] = guid++ + 'internal-model';\n /*\n implicit relationships are relationship which have not been declared but the inverse side exists on\n another record somewhere\n For example if there was\n ```app/models/comment.js\n import DS from 'ember-data';\n export default DS.Model.extend({\n name: DS.attr()\n })\n ```\n but there is also\n ```app/models/post.js\n import DS from 'ember-data';\n export default DS.Model.extend({\n name: DS.attr(),\n comments: DS.hasMany('comment')\n })\n ```\n would have a implicit post relationship in order to be do things like remove ourselves from the post\n when we are deleted\n */\n this._implicitRelationships = new _emberDataPrivateSystemEmptyObject[\"default\"]();\n }\n\n InternalModel.prototype = {\n isEmpty: retrieveFromCurrentState('isEmpty'),\n isLoading: retrieveFromCurrentState('isLoading'),\n isLoaded: retrieveFromCurrentState('isLoaded'),\n hasDirtyAttributes: retrieveFromCurrentState('hasDirtyAttributes'),\n isSaving: retrieveFromCurrentState('isSaving'),\n isDeleted: retrieveFromCurrentState('isDeleted'),\n isNew: retrieveFromCurrentState('isNew'),\n isValid: retrieveFromCurrentState('isValid'),\n dirtyType: retrieveFromCurrentState('dirtyType'),\n\n constructor: InternalModel,\n materializeRecord: function materializeRecord() {\n (0, _emberDataPrivateDebug.assert)(\"Materialized \" + this.modelName + \" record with id:\" + this.id + \"more than once\", this.record === null || this.record === undefined);\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: get(this, 'currentState'),\n isError: this.isError,\n adapterError: this.error\n };\n\n if (_ember[\"default\"].setOwner) {\n // ensure that `Ember.getOwner(this)` works inside a model instance\n _ember[\"default\"].setOwner(createOptions, (0, _emberDataPrivateUtils.getOwner)(this.store));\n } else {\n createOptions.container = this.store.container;\n }\n\n this.record = this.type._create(createOptions);\n\n this._triggerDeferredTriggers();\n },\n\n recordObjectWillDestroy: function recordObjectWillDestroy() {\n this.record = null;\n },\n\n deleteRecord: function deleteRecord() {\n this.send('deleteRecord');\n },\n\n save: function save(options) {\n var promiseLabel = \"DS: Model#save \" + this;\n var resolver = _ember[\"default\"].RSVP.defer(promiseLabel);\n\n this.store.scheduleSave(this, resolver, options);\n return resolver.promise;\n },\n\n startedReloading: function startedReloading() {\n this.isReloading = true;\n if (this.record) {\n set(this.record, 'isReloading', true);\n }\n },\n\n finishedReloading: function finishedReloading() {\n this.isReloading = false;\n if (this.record) {\n set(this.record, 'isReloading', false);\n }\n },\n\n reload: function reload() {\n this.startedReloading();\n var record = this;\n var promiseLabel = \"DS: Model#reload of \" + this;\n return new Promise(function (resolve) {\n record.send('reloadRecord', resolve);\n }, promiseLabel).then(function () {\n record.didCleanError();\n return record;\n }, function (error) {\n record.didError(error);\n throw error;\n }, \"DS: Model#reload complete, update flags\")[\"finally\"](function () {\n record.finishedReloading();\n record.updateRecordArrays();\n });\n },\n\n getRecord: function getRecord() {\n if (!this.record) {\n this.materializeRecord();\n }\n return this.record;\n },\n\n unloadRecord: function unloadRecord() {\n this.send('unloadRecord');\n },\n\n eachRelationship: function eachRelationship(callback, binding) {\n return this.type.eachRelationship(callback, binding);\n },\n\n eachAttribute: function eachAttribute(callback, binding) {\n return this.type.eachAttribute(callback, binding);\n },\n\n inverseFor: function inverseFor(key) {\n return this.type.inverseFor(key);\n },\n\n setupData: function setupData(data) {\n var changedKeys = this._changedKeys(data.attributes);\n assign(this._data, data.attributes);\n this.pushedData();\n if (this.record) {\n this.record._notifyProperties(changedKeys);\n }\n this.didInitalizeData();\n },\n\n becameReady: function becameReady() {\n _ember[\"default\"].run.schedule('actions', this.store.recordArrayManager, this.store.recordArrayManager.recordWasLoaded, this);\n },\n\n didInitalizeData: function didInitalizeData() {\n if (!this.dataHasInitialized) {\n this.becameReady();\n this.dataHasInitialized = true;\n }\n },\n\n destroy: function destroy() {\n if (this.record) {\n return this.record.destroy();\n }\n },\n\n /*\n @method createSnapshot\n @private\n */\n createSnapshot: function createSnapshot(options) {\n return new _emberDataPrivateSystemSnapshot[\"default\"](this, options);\n },\n\n /*\n @method loadingData\n @private\n @param {Promise} promise\n */\n loadingData: function loadingData(promise) {\n this.send('loadingData', promise);\n },\n\n /*\n @method loadedData\n @private\n */\n loadedData: function loadedData() {\n this.send('loadedData');\n this.didInitalizeData();\n },\n\n /*\n @method notFound\n @private\n */\n notFound: function notFound() {\n this.send('notFound');\n },\n\n /*\n @method pushedData\n @private\n */\n pushedData: function pushedData() {\n this.send('pushedData');\n },\n\n flushChangedAttributes: function flushChangedAttributes() {\n this._inFlightAttributes = this._attributes;\n this._attributes = new _emberDataPrivateSystemEmptyObject[\"default\"]();\n },\n\n hasChangedAttributes: function hasChangedAttributes() {\n return Object.keys(this._attributes).length > 0;\n },\n\n /*\n Checks if the attributes which are considered as changed are still\n different to the state which is acknowledged by the server.\n This method is needed when data for the internal model is pushed and the\n pushed data might acknowledge dirty attributes as confirmed.\n @method updateChangedAttributes\n @private\n */\n updateChangedAttributes: function updateChangedAttributes() {\n var changedAttributes = this.changedAttributes();\n var changedAttributeNames = Object.keys(changedAttributes);\n\n for (var i = 0, _length = changedAttributeNames.length; i < _length; i++) {\n var attribute = changedAttributeNames[i];\n\n var _changedAttributes$attribute = _slicedToArray(changedAttributes[attribute], 2);\n\n var oldData = _changedAttributes$attribute[0];\n var newData = _changedAttributes$attribute[1];\n\n if (oldData === newData) {\n delete this._attributes[attribute];\n }\n }\n },\n\n /*\n Returns an object, whose keys are changed properties, and value is an\n [oldProp, newProp] array.\n @method changedAttributes\n @private\n */\n changedAttributes: function changedAttributes() {\n var oldData = this._data;\n var currentData = this._attributes;\n var inFlightData = this._inFlightAttributes;\n var newData = assign(copy(inFlightData), currentData);\n var diffData = new _emberDataPrivateSystemEmptyObject[\"default\"]();\n\n var newDataKeys = Object.keys(newData);\n\n for (var i = 0, _length2 = newDataKeys.length; i < _length2; i++) {\n var key = newDataKeys[i];\n diffData[key] = [oldData[key], newData[key]];\n }\n\n return diffData;\n },\n\n /*\n @method adapterWillCommit\n @private\n */\n adapterWillCommit: function adapterWillCommit() {\n this.send('willCommit');\n },\n\n /*\n @method adapterDidDirty\n @private\n */\n adapterDidDirty: function adapterDidDirty() {\n this.send('becomeDirty');\n this.updateRecordArraysLater();\n },\n\n /*\n @method send\n @private\n @param {String} name\n @param {Object} context\n */\n send: function send(name, context) {\n var currentState = get(this, 'currentState');\n\n if (!currentState[name]) {\n this._unhandledEvent(currentState, name, context);\n }\n\n return currentState[name](this, context);\n },\n\n notifyHasManyAdded: function notifyHasManyAdded(key, record, idx) {\n if (this.record) {\n this.record.notifyHasManyAdded(key, record, idx);\n }\n },\n\n notifyHasManyRemoved: function notifyHasManyRemoved(key, record, idx) {\n if (this.record) {\n this.record.notifyHasManyRemoved(key, record, idx);\n }\n },\n\n notifyBelongsToChanged: function notifyBelongsToChanged(key, record) {\n if (this.record) {\n this.record.notifyBelongsToChanged(key, record);\n }\n },\n\n notifyPropertyChange: function notifyPropertyChange(key) {\n if (this.record) {\n this.record.notifyPropertyChange(key);\n }\n },\n\n rollbackAttributes: function rollbackAttributes() {\n var dirtyKeys = Object.keys(this._attributes);\n\n this._attributes = new _emberDataPrivateSystemEmptyObject[\"default\"]();\n\n if (get(this, 'isError')) {\n this._inFlightAttributes = new _emberDataPrivateSystemEmptyObject[\"default\"]();\n this.didCleanError();\n }\n\n //Eventually rollback will always work for relationships\n //For now we support it only out of deleted state, because we\n //have an explicit way of knowing when the server acked the relationship change\n if (this.isDeleted()) {\n //TODO: Should probably move this to the state machine somehow\n this.becameReady();\n }\n\n if (this.isNew()) {\n this.clearRelationships();\n }\n\n if (this.isValid()) {\n this._inFlightAttributes = new _emberDataPrivateSystemEmptyObject[\"default\"]();\n }\n\n this.send('rolledBack');\n\n this.record._notifyProperties(dirtyKeys);\n },\n /*\n @method transitionTo\n @private\n @param {String} name\n */\n 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 currentState = get(this, 'currentState');\n var state = currentState;\n\n do {\n if (state.exit) {\n state.exit(this);\n }\n state = state.parentState;\n } while (!state.hasOwnProperty(pivotName));\n\n var path = splitOnDot(name);\n var setups = [];\n var enters = [];\n var i, l;\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 for (i = 0, l = enters.length; i < l; i++) {\n enters[i].enter(this);\n }\n\n set(this, 'currentState', state);\n //TODO Consider whether this is the best approach for keeping these two in sync\n if (this.record) {\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.updateRecordArraysLater();\n },\n\n _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 \" + _ember[\"default\"].inspect(context) + \".\";\n }\n\n throw new _ember[\"default\"].Error(errorMessage);\n },\n\n triggerLater: function triggerLater() {\n var length = arguments.length;\n var args = new Array(length);\n\n for (var i = 0; i < length; i++) {\n args[i] = arguments[i];\n }\n\n if (this._deferredTriggers.push(args) !== 1) {\n return;\n }\n _ember[\"default\"].run.scheduleOnce('actions', this, '_triggerDeferredTriggers');\n },\n\n _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.record) {\n return;\n }\n for (var i = 0, l = this._deferredTriggers.length; i < l; i++) {\n this.record.trigger.apply(this.record, this._deferredTriggers[i]);\n }\n\n this._deferredTriggers.length = 0;\n },\n /*\n @method clearRelationships\n @private\n */\n clearRelationships: function clearRelationships() {\n var _this = this;\n\n this.eachRelationship(function (name, relationship) {\n if (_this._relationships.has(name)) {\n var rel = _this._relationships.get(name);\n rel.clear();\n rel.destroy();\n }\n });\n Object.keys(this._implicitRelationships).forEach(function (key) {\n _this._implicitRelationships[key].clear();\n _this._implicitRelationships[key].destroy();\n });\n },\n\n /*\n When a find request is triggered on the store, the user can optionally pass in\n attributes and relationships to be preloaded. These are meant to behave as if they\n came back from the server, except the user obtained them out of band and is informing\n the store of their existence. The most common use case is for supporting client side\n nested URLs, such as `/posts/1/comments/2` so the user can do\n `store.findRecord('comment', 2, { preload: { post: 1 } })` without having to fetch the post.\n Preloaded data can be attributes and relationships passed in either as IDs or as actual\n models.\n @method _preloadData\n @private\n @param {Object} preload\n */\n _preloadData: function _preloadData(preload) {\n var _this2 = 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 = _this2.type.metaForProperty(key);\n if (relationshipMeta.isRelationship) {\n _this2._preloadRelationship(key, preloadValue);\n } else {\n _this2._data[key] = preloadValue;\n }\n });\n },\n\n _preloadRelationship: function _preloadRelationship(key, preloadValue) {\n var relationshipMeta = this.type.metaForProperty(key);\n var type = relationshipMeta.type;\n if (relationshipMeta.kind === 'hasMany') {\n this._preloadHasMany(key, preloadValue, type);\n } else {\n this._preloadBelongsTo(key, preloadValue, type);\n }\n },\n\n _preloadHasMany: function _preloadHasMany(key, preloadValue, type) {\n (0, _emberDataPrivateDebug.assert)(\"You need to pass in an array to set a hasMany property on a record\", Array.isArray(preloadValue));\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, type);\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).updateRecordsFromAdapter(recordsToSet);\n },\n\n _preloadBelongsTo: function _preloadBelongsTo(key, preloadValue, type) {\n var recordToSet = this._convertStringOrNumberIntoInternalModel(preloadValue, type);\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).setRecord(recordToSet);\n },\n\n _convertStringOrNumberIntoInternalModel: function _convertStringOrNumberIntoInternalModel(value, type) {\n if (typeof value === 'string' || typeof value === 'number') {\n return this.store._internalModelForId(type, value);\n }\n if (value._internalModel) {\n return value._internalModel;\n }\n return value;\n },\n\n /*\n @method updateRecordArrays\n @private\n */\n updateRecordArrays: function updateRecordArrays() {\n this._updatingRecordArraysLater = false;\n this.store.dataWasUpdated(this.type, this);\n },\n\n setId: function setId(id) {\n (0, _emberDataPrivateDebug.assert)('A record\\'s id cannot be changed once it is in the loaded state', this.id === null || this.id === id || this.isNew());\n this.id = id;\n if (this.record.get('id') !== id) {\n this.record.set('id', id);\n }\n },\n\n didError: function didError(error) {\n this.error = error;\n this.isError = true;\n\n if (this.record) {\n this.record.setProperties({\n isError: true,\n adapterError: error\n });\n }\n },\n\n didCleanError: function didCleanError() {\n this.error = null;\n this.isError = false;\n\n if (this.record) {\n this.record.setProperties({\n isError: false,\n adapterError: null\n });\n }\n },\n /*\n If the adapter did not return a hash in response to a commit,\n merge the changed attributes and relationships into the existing\n saved data.\n @method adapterDidCommit\n */\n adapterDidCommit: function adapterDidCommit(data) {\n if (data) {\n data = data.attributes;\n }\n\n this.didCleanError();\n var changedKeys = this._changedKeys(data);\n\n assign(this._data, this._inFlightAttributes);\n if (data) {\n assign(this._data, data);\n }\n\n this._inFlightAttributes = new _emberDataPrivateSystemEmptyObject[\"default\"]();\n\n this.send('didCommit');\n this.updateRecordArraysLater();\n\n if (!data) {\n return;\n }\n\n this.record._notifyProperties(changedKeys);\n },\n\n /*\n @method updateRecordArraysLater\n @private\n */\n updateRecordArraysLater: function updateRecordArraysLater() {\n // quick hack (something like this could be pushed into run.once\n if (this._updatingRecordArraysLater) {\n return;\n }\n this._updatingRecordArraysLater = true;\n _ember[\"default\"].run.schedule('actions', this, this.updateRecordArrays);\n },\n\n addErrorMessageToAttribute: function addErrorMessageToAttribute(attribute, message) {\n var record = this.getRecord();\n get(record, 'errors')._add(attribute, message);\n },\n\n removeErrorMessageFromAttribute: function removeErrorMessageFromAttribute(attribute) {\n var record = this.getRecord();\n get(record, 'errors')._remove(attribute);\n },\n\n clearErrorMessages: function clearErrorMessages() {\n var record = this.getRecord();\n get(record, 'errors')._clear();\n },\n\n hasErrors: function hasErrors() {\n var record = this.getRecord();\n var errors = get(record, 'errors');\n\n return !_ember[\"default\"].isEmpty(errors);\n },\n\n // FOR USE DURING COMMIT PROCESS\n\n /*\n @method adapterDidInvalidate\n @private\n */\n adapterDidInvalidate: function adapterDidInvalidate(errors) {\n var attribute;\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 /*\n @method adapterDidError\n @private\n */\n adapterDidError: function adapterDidError(error) {\n this.send('becameError');\n this.didError(error);\n this._saveWasRejected();\n },\n\n _saveWasRejected: function _saveWasRejected() {\n var keys = Object.keys(this._inFlightAttributes);\n for (var i = 0; i < keys.length; i++) {\n if (this._attributes[keys[i]] === undefined) {\n this._attributes[keys[i]] = this._inFlightAttributes[keys[i]];\n }\n }\n this._inFlightAttributes = new _emberDataPrivateSystemEmptyObject[\"default\"]();\n },\n\n /*\n Ember Data has 3 buckets for storing the value of an attribute on an internalModel.\n `_data` holds all of the attributes that have been acknowledged by\n a backend via the adapter. When rollbackAttributes is called on a model all\n attributes will revert to the record's state in `_data`.\n `_attributes` holds any change the user has made to an attribute\n that has not been acknowledged by the adapter. Any values in\n `_attributes` are have priority over values in `_data`.\n `_inFlightAttributes`. When a record is being synced with the\n backend the values in `_attributes` are copied to\n `_inFlightAttributes`. This way if the backend acknowledges the\n save but does not return the new state Ember Data can copy the\n values from `_inFlightAttributes` to `_data`. Without having to\n worry about changes made to `_attributes` while the save was\n happenign.\n Changed keys builds a list of all of the values that may have been\n changed by the backend after a successful save.\n It does this by iterating over each key, value pair in the payload\n returned from the server after a save. If the `key` is found in\n `_attributes` then the user has a local changed to the attribute\n that has not been synced with the server and the key is not\n included in the list of changed keys.\n \n If the value, for a key differs from the value in what Ember Data\n believes to be the truth about the backend state (A merger of the\n `_data` and `_inFlightAttributes` objects where\n `_inFlightAttributes` has priority) then that means the backend\n has updated the value and the key is added to the list of changed\n keys.\n @method _changedKeys\n @private\n */\n _changedKeys: function _changedKeys(updates) {\n var changedKeys = [];\n\n if (updates) {\n var original, i, value, key;\n var keys = Object.keys(updates);\n var length = keys.length;\n\n original = assign(new _emberDataPrivateSystemEmptyObject[\"default\"](), this._data);\n original = assign(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 (this._attributes[key] !== undefined) {\n continue;\n }\n\n if (!_ember[\"default\"].isEqual(original[key], value)) {\n changedKeys.push(key);\n }\n }\n }\n\n return changedKeys;\n },\n\n toString: function toString() {\n if (this.record) {\n return this.record.toString();\n } else {\n return \"<\" + this.modelName + \":\" + this.id + \">\";\n }\n }\n };\n\n if (true) {\n\n InternalModel.prototype.referenceFor = function (type, name) {\n var reference = this.references[name];\n\n if (!reference) {\n var relationship = this._relationships.get(name);\n\n if (type === \"belongsTo\") {\n reference = new _emberDataPrivateSystemReferences.BelongsToReference(this.store, this, relationship);\n } else if (type === \"hasMany\") {\n reference = new _emberDataPrivateSystemReferences.HasManyReference(this.store, this, relationship);\n }\n\n this.references[name] = reference;\n }\n\n return reference;\n };\n }\n});","define(\"ember-data/-private/system/model/model\", [\"exports\", \"ember\", \"ember-data/-private/debug\", \"ember-data/-private/system/promise-proxies\", \"ember-data/-private/system/model/errors\", \"ember-data/-private/features\", \"ember-data/-private/system/debug/debug-info\", \"ember-data/-private/system/relationships/belongs-to\", \"ember-data/-private/system/relationships/has-many\", \"ember-data/-private/system/relationships/ext\", \"ember-data/-private/system/model/attr\"], function (exports, _ember, _emberDataPrivateDebug, _emberDataPrivateSystemPromiseProxies, _emberDataPrivateSystemModelErrors, _emberDataPrivateFeatures, _emberDataPrivateSystemDebugDebugInfo, _emberDataPrivateSystemRelationshipsBelongsTo, _emberDataPrivateSystemRelationshipsHasMany, _emberDataPrivateSystemRelationshipsExt, _emberDataPrivateSystemModelAttr) {\n \"use strict\";\n\n /**\n @module ember-data\n */\n\n var get = _ember[\"default\"].get;\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 = _ember[\"default\"].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 = _ember[\"default\"].Object.extend(_ember[\"default\"].Evented, {\n _internalModel: null,\n store: null,\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 var 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 var 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 @property hasDirtyAttributes\n @type {Boolean}\n @readOnly\n */\n hasDirtyAttributes: _ember[\"default\"].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 var record = store.createRecord('model');\n record.get('isSaving'); // false\n var 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 var 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 var 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 var 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 var 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 form 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 var 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\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 Username: {{input value=username}} \n {{#each model.errors.username as |error|}}\n \n {{error.message}}\n \n {{/each}}\n Email: {{input value=email}} \n {{#each model.errors.email as |error|}}\n \n {{error.message}}\n \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 \n {{message}}\n \n {{/each}}\n ```\n @property errors\n @type {DS.Errors}\n */\n errors: _ember[\"default\"].computed(function () {\n var errors = _emberDataPrivateSystemModelErrors[\"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 /**\n Create a JSON representation of the record, using the serialization\n strategy of the store's adapter.\n `serialize` takes an optional hash as a parameter, currently\n supported options are:\n - `includeId`: `true` if the record's ID should be included in the\n JSON representation.\n @method serialize\n @param {Object} options\n @return {Object} an object whose values are primitive JSON values only\n */\n serialize: function serialize(options) {\n return this.store.serialize(this, options);\n },\n\n /**\n Use [DS.JSONSerializer](DS.JSONSerializer.html) to\n get the JSON representation of a record.\n `toJSON` takes an optional hash as a parameter, currently\n supported options are:\n - `includeId`: `true` if the record's ID should be included in the\n JSON representation.\n @method toJSON\n @param {Object} options\n @return {Object} A JSON representation of the object.\n */\n toJSON: function toJSON(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 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: _ember[\"default\"].K,\n\n /**\n Fired when the record is loaded from the server.\n @event didLoad\n */\n didLoad: _ember[\"default\"].K,\n\n /**\n Fired when the record is updated.\n @event didUpdate\n */\n didUpdate: _ember[\"default\"].K,\n\n /**\n Fired when a new record is commited to the server.\n @event didCreate\n */\n didCreate: _ember[\"default\"].K,\n\n /**\n Fired when the record is deleted.\n @event didDelete\n */\n didDelete: _ember[\"default\"].K,\n\n /**\n Fired when the record becomes invalid.\n @event becameInvalid\n */\n becameInvalid: _ember[\"default\"].K,\n\n /**\n Fired when the record enters the error state.\n @event becameError\n */\n becameError: _ember[\"default\"].K,\n\n /**\n Fired when the record is rolled back.\n @event rolledBack\n */\n rolledBack: _ember[\"default\"].K,\n\n /**\n @property data\n @private\n @type {Object}\n */\n data: _ember[\"default\"].computed.readOnly('_internalModel._data'),\n\n //TODO Do we want to deprecate these?\n /**\n @method send\n @private\n @param {String} name\n @param {Object} context\n */\n send: function send(name, context) {\n return this._internalModel.send(name, context);\n },\n\n /**\n @method transitionTo\n @private\n @param {String} name\n */\n transitionTo: function transitionTo(name) {\n return this._internalModel.transitionTo(name);\n },\n\n /**\n Marks the record as deleted but does not save it. You must call\n `save` afterwards if you want to persist it. You might use this\n method if you want to allow the user to still `rollbackAttributes()`\n after a delete it was made.\n Example\n ```app/routes/model/delete.js\n import Ember from 'ember';\n export default Ember.Route.extend({\n actions: {\n softDelete: function() {\n this.controller.get('model').deleteRecord();\n },\n confirm: function() {\n this.controller.get('model').save();\n },\n undo: function() {\n this.controller.get('model').rollbackAttributes();\n }\n }\n });\n ```\n @method deleteRecord\n */\n deleteRecord: function deleteRecord() {\n this._internalModel.deleteRecord();\n },\n\n /**\n Same as `deleteRecord`, but saves the record immediately.\n Example\n ```app/routes/model/delete.js\n import Ember from 'ember';\n export default Ember.Route.extend({\n actions: {\n delete: function() {\n var controller = this.controller;\n controller.get('model').destroyRecord().then(function() {\n controller.transitionToRoute('model.index');\n });\n }\n }\n });\n ```\n @method destroyRecord\n @param {Object} options\n @return {Promise} a promise that will be resolved when the adapter returns\n successfully or rejected if the adapter returns with an error.\n */\n destroyRecord: function destroyRecord(options) {\n this.deleteRecord();\n return this.save(options);\n },\n\n /**\n @method unloadRecord\n @private\n */\n unloadRecord: function unloadRecord() {\n if (this.isDestroyed) {\n return;\n }\n this._internalModel.unloadRecord();\n },\n\n /**\n @method _notifyProperties\n @private\n */\n _notifyProperties: function _notifyProperties(keys) {\n _ember[\"default\"].beginPropertyChanges();\n var key;\n for (var i = 0, length = keys.length; i < length; i++) {\n key = keys[i];\n this.notifyPropertyChange(key);\n }\n _ember[\"default\"].endPropertyChanges();\n },\n\n /**\n Returns an object, whose keys are changed properties, and value is\n an [oldProp, newProp] array.\n The array represents the diff of the canonical state with the local state\n of the model. Note: if the model is created locally, the canonical state is\n empty since the adapter hasn't acknowledged the attributes yet:\n Example\n ```app/models/mascot.js\n import DS from 'ember-data';\n export default DS.Model.extend({\n name: attr('string'),\n isAdmin: attr('boolean', {\n defaultValue: false\n })\n });\n ```\n ```javascript\n var mascot = store.createRecord('mascot');\n mascot.changedAttributes(); // {}\n mascot.set('name', 'Tomster');\n mascot.changedAttributes(); // { name: [undefined, 'Tomster'] }\n mascot.set('isAdmin', true);\n mascot.changedAttributes(); // { isAdmin: [undefined, true], name: [undefined, 'Tomster'] }\n mascot.save().then(function() {\n mascot.changedAttributes(); // {}\n mascot.set('isAdmin', false);\n mascot.changedAttributes(); // { isAdmin: [true, false] }\n });\n ```\n @method changedAttributes\n @return {Object} an object, whose keys are changed properties,\n and value is an [oldProp, newProp] array.\n */\n changedAttributes: function changedAttributes() {\n return this._internalModel.changedAttributes();\n },\n\n //TODO discuss with tomhuda about events/hooks\n //Bring back as hooks?\n /**\n @method adapterWillCommit\n @private\n adapterWillCommit: function() {\n this.send('willCommit');\n },\n /**\n @method adapterDidDirty\n @private\n adapterDidDirty: function() {\n this.send('becomeDirty');\n this.updateRecordArraysLater();\n },\n */\n\n /**\n If the model `hasDirtyAttributes` this function will discard any unsaved\n changes. If the model `isNew` it will be removed from the store.\n Example\n ```javascript\n record.get('name'); // 'Untitled Document'\n record.set('name', 'Doc 1');\n record.get('name'); // 'Doc 1'\n record.rollbackAttributes();\n record.get('name'); // 'Untitled Document'\n ```\n @method rollbackAttributes\n */\n rollbackAttributes: function rollbackAttributes() {\n this._internalModel.rollbackAttributes();\n },\n\n /*\n @method _createSnapshot\n @private\n */\n _createSnapshot: function _createSnapshot() {\n return this._internalModel.createSnapshot();\n },\n\n toStringExtension: function toStringExtension() {\n return get(this, 'id');\n },\n\n /**\n Save the record and persist any changes to the record to an\n external source via the adapter.\n Example\n ```javascript\n record.set('name', 'Tomster');\n record.save().then(function() {\n // Success callback\n }, function() {\n // Error callback\n });\n ```\n @method save\n @param {Object} options\n @return {Promise} a promise that will be resolved when the adapter returns\n successfully or rejected if the adapter returns with an error.\n */\n save: function save(options) {\n var _this = this;\n\n return _emberDataPrivateSystemPromiseProxies.PromiseObject.create({\n promise: this._internalModel.save(options).then(function () {\n return _this;\n })\n });\n },\n\n /**\n Reload the record from the adapter.\n This will only work if the record has already finished loading.\n Example\n ```app/routes/model/view.js\n import Ember from 'ember';\n export default Ember.Route.extend({\n actions: {\n reload: function() {\n this.controller.get('model').reload().then(function(model) {\n // do something with the reloaded model\n });\n }\n }\n });\n ```\n @method reload\n @return {Promise} a promise that will be resolved with the record when the\n adapter returns successfully or rejected if the adapter returns\n with an error.\n */\n reload: function reload() {\n var _this2 = this;\n\n return _emberDataPrivateSystemPromiseProxies.PromiseObject.create({\n promise: this._internalModel.reload().then(function () {\n return _this2;\n })\n });\n },\n\n /**\n Override the default event firing from Ember.Evented to\n also call methods with the given name.\n @method trigger\n @private\n @param {String} name\n */\n trigger: function trigger(name) {\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\n _ember[\"default\"].tryInvoke(this, name, args);\n this._super.apply(this, arguments);\n },\n\n willDestroy: function willDestroy() {\n //TODO Move!\n this._super.apply(this, arguments);\n this._internalModel.clearRelationships();\n this._internalModel.recordObjectWillDestroy();\n //TODO should we set internalModel to null here?\n },\n\n // This is a temporary solution until we refactor DS.Model to not\n // rely on the data property.\n willMergeMixin: function willMergeMixin(props) {\n var constructor = this.constructor;\n (0, _emberDataPrivateDebug.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 (0, _emberDataPrivateDebug.assert)(\"You may not set `id` as an attribute on your model. Please remove any lines that look like: `id: DS.attr('')` from \" + constructor.toString(), Object.keys(props).indexOf('id') === -1);\n },\n\n attr: function attr() {\n (0, _emberDataPrivateDebug.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\n belongsTo: function belongsTo() {\n (0, _emberDataPrivateDebug.assert)(\"The `belongsTo` 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\n hasMany: function hasMany() {\n (0, _emberDataPrivateDebug.assert)(\"The `hasMany` 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\n setId: _ember[\"default\"].observer('id', function () {\n this._internalModel.setId(this.get('id'));\n })\n });\n\n Model.reopenClass({\n /**\n Alias DS.Model's `create` method to `_create`. This allows us to create DS.Model\n instances from within the store, but if end users accidentally call `create()`\n (instead of `createRecord()`), we can raise an error.\n @method _create\n @private\n @static\n */\n _create: Model.create,\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 create: function create() {\n throw new _ember[\"default\"].Error(\"You should not call `create` on a model. Instead, call `store.createRecord` with the attributes you would like to set.\");\n },\n\n /**\n Represents the model's class name as a string. This can be used to look up the model 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 export default var PostSerializer = DS.RESTSerializer.extend({\n payloadKeyFromModelName: function(modelName) {\n return Ember.String.underscore(modelName);\n }\n });\n ```\n @property modelName\n @type String\n @readonly\n */\n modelName: null\n });\n\n // if `Ember.setOwner` is defined, accessing `this.container` is\n // deprecated (but functional). In \"standard\" Ember usage, this\n // deprecation is actually created via an `.extend` of the factory\n // inside the container itself, but that only happens on models\n // with MODEL_FACTORY_INJECTIONS enabled :(\n if (_ember[\"default\"].setOwner) {\n Object.defineProperty(Model.prototype, 'container', {\n configurable: true,\n enumerable: false,\n get: function get() {\n (0, _emberDataPrivateDebug.deprecate)('Using the injected `container` is deprecated. Please use the `getOwner` helper instead to access the owner of this object.', false, { id: 'ember-application.injected-container', until: '3.0.0' });\n\n return this.store.container;\n }\n });\n }\n\n if (true) {\n\n Model.reopen({\n\n /**\n Get the reference for the specified belongsTo relationship.\n Example\n ```javascript\n // models/blog.js\n export default DS.Model.extend({\n user: DS.belongsTo({ async: true })\n });\n var blog = store.push({\n type: 'blog',\n id: 1,\n relationships: {\n user: { type: 'user', id: 1 }\n }\n });\n var userRef = blog.belongsTo('user');\n // check if the user relationship is loaded\n var isLoaded = userRef.value() !== null;\n // get the record of the reference (null if not yet available)\n var user = userRef.value();\n // get the identifier of the reference\n if (userRef.remoteType() === \"id\") {\n var id = userRef.id();\n } else if (userRef.remoteType() === \"link\") {\n var link = userRef.link();\n }\n // load user (via store.findRecord or store.findBelongsTo)\n userRef.load().then(...)\n // or trigger a reload\n userRef.reload().then(...)\n // provide data for reference\n userRef.push({\n type: 'user',\n id: 1,\n attributes: {\n username: \"@user\"\n }\n }).then(function(user) {\n userRef.value() === user;\n });\n ```\n @method belongsTo\n @param {String} name of the relationship\n @return {BelongsToReference} reference for this relationship\n */\n belongsTo: function belongsTo(name) {\n return this._internalModel.referenceFor('belongsTo', name);\n },\n\n /**\n Get the reference for the specified hasMany relationship.\n Example\n ```javascript\n // models/blog.js\n export default DS.Model.extend({\n comments: DS.hasMany({ async: true })\n });\n var blog = store.push({\n type: 'blog',\n id: 1,\n relationships: {\n comments: {\n data: [\n { type: 'comment', id: 1 },\n { type: 'comment', id: 2 }\n ]\n }\n }\n });\n var commentsRef = blog.hasMany('comments');\n // check if the comments are loaded already\n var isLoaded = commentsRef.value() !== null;\n // get the records of the reference (null if not yet available)\n var comments = commentsRef.value();\n // get the identifier of the reference\n if (commentsRef.remoteType() === \"ids\") {\n var ids = commentsRef.ids();\n } else if (commentsRef.remoteType() === \"link\") {\n var link = commentsRef.link();\n }\n // load comments (via store.findMany or store.findHasMany)\n commentsRef.load().then(...)\n // or trigger a reload\n commentsRef.reload().then(...)\n // provide data for reference\n commentsRef.push([{ type: 'comment', id: 1 }, { type: 'comment', id: 2 }]).then(function(comments) {\n commentsRef.value() === comments;\n });\n ```\n @method hasMany\n @param {String} name of the relationship\n @return {HasManyReference} reference for this relationship\n */\n hasMany: function hasMany(name) {\n return this._internalModel.referenceFor('hasMany', name);\n }\n });\n }\n\n Model.reopenClass(_emberDataPrivateSystemRelationshipsExt.RelationshipsClassMethodsMixin);\n Model.reopenClass(_emberDataPrivateSystemModelAttr.AttrClassMethodsMixin);\n\n exports[\"default\"] = Model.extend(_emberDataPrivateSystemDebugDebugInfo[\"default\"], _emberDataPrivateSystemRelationshipsBelongsTo.BelongsToMixin, _emberDataPrivateSystemRelationshipsExt.DidDefinePropertyMixin, _emberDataPrivateSystemRelationshipsExt.RelationshipsInstanceMethodsMixin, _emberDataPrivateSystemRelationshipsHasMany.HasManyMixin, _emberDataPrivateSystemModelAttr.AttrInstanceMethodsMixin);\n});","define('ember-data/-private/system/model/states', ['exports', 'ember', 'ember-data/-private/debug'], function (exports, _ember, _emberDataPrivateDebug) {\n /**\n @module ember-data\n */\n 'use strict';\n\n var get = _ember['default'].get;\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 * [isDirty](DS.Model.html#property_isDirty)\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.updateRecordArraysLater();\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 // send to the adapter yet.\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 //TODO(Igor) reloading now triggers a\n //loadingData event, though it seems fine?\n loadingData: _ember['default'].K,\n\n propertyWasReset: function propertyWasReset(internalModel, name) {\n if (!internalModel.hasChangedAttributes()) {\n internalModel.send('rolledBack');\n }\n },\n\n pushedData: function pushedData(internalModel) {\n internalModel.updateChangedAttributes();\n\n if (!internalModel.hasChangedAttributes()) {\n internalModel.transitionTo('loaded.saved');\n }\n },\n\n becomeDirty: _ember['default'].K,\n\n willCommit: function willCommit(internalModel) {\n internalModel.transitionTo('inFlight');\n },\n\n reloadRecord: function reloadRecord(internalModel, resolve) {\n resolve(internalModel.store.reloadRecord(internalModel));\n },\n\n rolledBack: function rolledBack(internalModel) {\n internalModel.transitionTo('loaded.saved');\n },\n\n becameInvalid: function becameInvalid(internalModel) {\n internalModel.transitionTo('invalid');\n },\n\n rollback: function rollback(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: _ember['default'].K,\n pushedData: _ember['default'].K,\n\n unloadRecord: assertAgainstUnloadRecord,\n\n // TODO: More robust semantics around save-while-in-flight\n willCommit: _ember['default'].K,\n\n didCommit: function didCommit(internalModel) {\n var dirtyType = get(this, 'dirtyType');\n\n internalModel.transitionTo('saved');\n internalModel.send('invokeLifecycleCallbacks', dirtyType);\n },\n\n becameInvalid: function becameInvalid(internalModel) {\n internalModel.transitionTo('invalid');\n internalModel.send('invokeLifecycleCallbacks');\n },\n\n becameError: function becameError(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 // EVENTS\n deleteRecord: function deleteRecord(internalModel) {\n internalModel.transitionTo('deleted.uncommitted');\n },\n\n didSetProperty: function didSetProperty(internalModel, context) {\n internalModel.removeErrorMessageFromAttribute(context.name);\n\n _didSetProperty(internalModel, context);\n\n if (!internalModel.hasErrors()) {\n this.becameValid(internalModel);\n }\n },\n\n becameInvalid: _ember['default'].K,\n becomeDirty: _ember['default'].K,\n pushedData: _ember['default'].K,\n\n willCommit: function willCommit(internalModel) {\n internalModel.clearErrorMessages();\n internalModel.transitionTo('inFlight');\n },\n\n rolledBack: function rolledBack(internalModel) {\n internalModel.clearErrorMessages();\n internalModel.transitionTo('loaded.saved');\n internalModel.triggerLater('ready');\n },\n\n becameValid: function becameValid(internalModel) {\n internalModel.transitionTo('uncommitted');\n },\n\n invokeLifecycleCallbacks: function invokeLifecycleCallbacks(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;\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 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 = _ember['default'].K;\n\n function assertAgainstUnloadRecord(internalModel) {\n (0, _emberDataPrivateDebug.assert)(\"You can only unload a record which is not inFlight. `\" + internalModel + \"`\", false);\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 // DEFAULT EVENTS\n\n // Trying to roll back if you're not in the dirty state\n // doesn't change your state. For example, if you're in the\n // in-flight state, rolling back the record doesn't move\n // you out of the in-flight state.\n rolledBack: _ember['default'].K,\n unloadRecord: function unloadRecord(internalModel) {\n // clear relationships before moving to deleted state\n // otherwise it fails\n internalModel.clearRelationships();\n internalModel.transitionTo('deleted.saved');\n },\n\n propertyWasReset: _ember['default'].K,\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 // EVENTS\n loadingData: function loadingData(internalModel, promise) {\n internalModel._loadingPromise = promise;\n internalModel.transitionTo('loading');\n },\n\n loadedData: function loadedData(internalModel) {\n internalModel.transitionTo('loaded.created.uncommitted');\n internalModel.triggerLater('ready');\n },\n\n pushedData: function pushedData(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 exit(internalModel) {\n internalModel._loadingPromise = null;\n },\n\n // EVENTS\n pushedData: function pushedData(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\n becameError: function becameError(internalModel) {\n internalModel.triggerLater('becameError', internalModel);\n },\n\n notFound: function notFound(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 //TODO(Igor) Reloading now triggers a loadingData event,\n //but it should be ok?\n loadingData: _ember['default'].K,\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 setup(internalModel) {\n if (internalModel.hasChangedAttributes()) {\n internalModel.adapterDidDirty();\n }\n },\n\n // EVENTS\n didSetProperty: _didSetProperty,\n\n pushedData: _ember['default'].K,\n\n becomeDirty: function becomeDirty(internalModel) {\n internalModel.transitionTo('updated.uncommitted');\n },\n\n willCommit: function willCommit(internalModel) {\n internalModel.transitionTo('updated.inFlight');\n },\n\n reloadRecord: function reloadRecord(internalModel, resolve) {\n resolve(internalModel.store.reloadRecord(internalModel));\n },\n\n deleteRecord: function deleteRecord(internalModel) {\n internalModel.transitionTo('deleted.uncommitted');\n },\n\n unloadRecord: function unloadRecord(internalModel) {\n // clear relationships before moving to deleted state\n // otherwise it fails\n internalModel.clearRelationships();\n internalModel.transitionTo('deleted.saved');\n },\n\n didCommit: function didCommit(internalModel) {\n internalModel.send('invokeLifecycleCallbacks', get(internalModel, 'lastDirtyType'));\n },\n\n // loaded.saved.notFound would be triggered by a failed\n // `reload()` on an unchanged record\n notFound: _ember['default'].K\n\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 // TRANSITIONS\n setup: function setup(internalModel) {\n internalModel.updateRecordArrays();\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\n // EVENTS\n\n willCommit: function willCommit(internalModel) {\n internalModel.transitionTo('inFlight');\n },\n\n rollback: function rollback(internalModel) {\n internalModel.rollbackAttributes();\n internalModel.triggerLater('ready');\n },\n\n pushedData: _ember['default'].K,\n becomeDirty: _ember['default'].K,\n deleteRecord: _ember['default'].K,\n\n rolledBack: function rolledBack(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 // TODO: More robust semantics around save-while-in-flight\n willCommit: _ember['default'].K,\n didCommit: function didCommit(internalModel) {\n internalModel.transitionTo('saved');\n\n internalModel.send('invokeLifecycleCallbacks');\n },\n\n becameError: function becameError(internalModel) {\n internalModel.transitionTo('uncommitted');\n internalModel.triggerLater('becameError', internalModel);\n },\n\n becameInvalid: function becameInvalid(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 setup(internalModel) {\n internalModel.clearRelationships();\n var store = internalModel.store;\n store._dematerializeRecord(internalModel);\n },\n\n invokeLifecycleCallbacks: function invokeLifecycleCallbacks(internalModel) {\n internalModel.triggerLater('didDelete', internalModel);\n internalModel.triggerLater('didCommit', internalModel);\n },\n\n willCommit: _ember['default'].K,\n\n didCommit: _ember['default'].K\n },\n\n invalid: {\n isValid: false,\n\n didSetProperty: function didSetProperty(internalModel, context) {\n internalModel.removeErrorMessageFromAttribute(context.name);\n\n _didSetProperty(internalModel, context);\n\n if (!internalModel.hasErrors()) {\n this.becameValid(internalModel);\n }\n },\n\n becameInvalid: _ember['default'].K,\n becomeDirty: _ember['default'].K,\n deleteRecord: _ember['default'].K,\n willCommit: _ember['default'].K,\n\n rolledBack: function rolledBack(internalModel) {\n internalModel.clearErrorMessages();\n internalModel.transitionTo('loaded.saved');\n internalModel.triggerLater('ready');\n },\n\n becameValid: function becameValid(internalModel) {\n internalModel.transitionTo('uncommitted');\n }\n\n }\n },\n\n invokeLifecycleCallbacks: function invokeLifecycleCallbacks(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 /*jshint proto:true*/\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 RootState = wireState(RootState, null, \"root\");\n\n exports['default'] = RootState;\n});","define(\"ember-data/-private/system/model\", [\"exports\", \"ember-data/-private/system/model/model\", \"ember-data/attr\", \"ember-data/-private/system/model/states\", \"ember-data/-private/system/model/errors\"], function (exports, _emberDataPrivateSystemModelModel, _emberDataAttr, _emberDataPrivateSystemModelStates, _emberDataPrivateSystemModelErrors) {\n /**\n @module ember-data\n */\n\n \"use strict\";\n\n exports.RootState = _emberDataPrivateSystemModelStates[\"default\"];\n exports.attr = _emberDataAttr[\"default\"];\n exports.Errors = _emberDataPrivateSystemModelErrors[\"default\"];\n exports[\"default\"] = _emberDataPrivateSystemModelModel[\"default\"];\n});","define('ember-data/-private/system/normalize-link', ['exports'], function (exports) {\n 'use strict';\n\n exports['default'] = _normalizeLink;\n\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', 'ember'], function (exports, _ember) {\n 'use strict';\n\n exports['default'] = normalizeModelName;\n\n /**\n All modelNames are dasherized internally. Changing this function may\n require changes to other normalization hooks (such as typeForRoot).\n @method normalizeModelName\n @public\n @param {String} modelName\n @return {String} if the adapter can generate one, an ID\n @for DS\n */\n function normalizeModelName(modelName) {\n return _ember['default'].String.dasherize(modelName);\n }\n});","define('ember-data/-private/system/ordered-set', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n exports['default'] = OrderedSet;\n\n var EmberOrderedSet = _ember['default'].OrderedSet;\n var guidFor = _ember['default'].guidFor;\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', 'ember', 'ember-data/-private/debug'], function (exports, _ember, _emberDataPrivateDebug) {\n 'use strict';\n\n var Promise = _ember['default'].RSVP.Promise;\n var get = _ember['default'].get;\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 var 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 = _ember['default'].ArrayProxy.extend(_ember['default'].PromiseProxyMixin);\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 var 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 = _ember['default'].ObjectProxy.extend(_ember['default'].PromiseProxyMixin);\n\n var promiseObject = function promiseObject(promise, label) {\n return PromiseObject.create({\n promise: Promise.resolve(promise, label)\n });\n };\n\n var promiseArray = 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 content = get(this, 'content');\n return content[method].apply(content, arguments);\n };\n }\n\n var PromiseManyArray = PromiseArray.extend({\n reload: function reload() {\n //I don't think this should ever happen right now, but worth guarding if we refactor the async relationships\n (0, _emberDataPrivateDebug.assert)('You are trying to reload an async manyArray before it has been created', get(this, 'content'));\n return PromiseManyArray.create({\n promise: get(this, 'content').reload()\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 var promiseManyArray = function promiseManyArray(promise, label) {\n return PromiseManyArray.create({\n promise: Promise.resolve(promise, label)\n });\n };\n\n exports.PromiseArray = PromiseArray;\n exports.PromiseObject = PromiseObject;\n exports.PromiseManyArray = PromiseManyArray;\n exports.promiseArray = promiseArray;\n exports.promiseObject = promiseObject;\n exports.promiseManyArray = promiseManyArray;\n});","define(\"ember-data/-private/system/record-array-manager\", [\"exports\", \"ember\", \"ember-data/-private/system/record-arrays\", \"ember-data/-private/system/ordered-set\"], function (exports, _ember, _emberDataPrivateSystemRecordArrays, _emberDataPrivateSystemOrderedSet) {\n /**\n @module ember-data\n */\n\n \"use strict\";\n\n var MapWithDefault = _ember[\"default\"].MapWithDefault;var get = _ember[\"default\"].get;\n\n /**\n @class RecordArrayManager\n @namespace DS\n @private\n @extends Ember.Object\n */\n exports[\"default\"] = _ember[\"default\"].Object.extend({\n init: function init() {\n var _this = this;\n\n this.filteredRecordArrays = MapWithDefault.create({\n defaultValue: function defaultValue() {\n return [];\n }\n });\n\n this.liveRecordArrays = MapWithDefault.create({\n defaultValue: function defaultValue(typeClass) {\n return _this.createRecordArray(typeClass);\n }\n });\n\n this.changedRecords = [];\n this._adapterPopulatedRecordArrays = [];\n },\n\n recordDidChange: function recordDidChange(record) {\n if (this.changedRecords.push(record) !== 1) {\n return;\n }\n\n _ember[\"default\"].run.schedule('actions', this, this.updateRecordArrays);\n },\n\n recordArraysForRecord: function recordArraysForRecord(record) {\n record._recordArrays = record._recordArrays || _emberDataPrivateSystemOrderedSet[\"default\"].create();\n return record._recordArrays;\n },\n\n /**\n This method is invoked whenever data is loaded into the store by the\n adapter or updated by the adapter, or when a record has changed.\n It updates all record arrays that a record belongs to.\n To avoid thrashing, it only runs at most once per run loop.\n @method updateRecordArrays\n */\n updateRecordArrays: function updateRecordArrays() {\n var _this2 = this;\n\n this.changedRecords.forEach(function (internalModel) {\n if (get(internalModel, 'record.isDestroyed') || get(internalModel, 'record.isDestroying') || get(internalModel, 'currentState.stateName') === 'root.deleted.saved') {\n _this2._recordWasDeleted(internalModel);\n } else {\n _this2._recordWasChanged(internalModel);\n }\n });\n\n this.changedRecords.length = 0;\n },\n\n _recordWasDeleted: function _recordWasDeleted(record) {\n var recordArrays = record._recordArrays;\n\n if (!recordArrays) {\n return;\n }\n\n recordArrays.forEach(function (array) {\n return array.removeInternalModel(record);\n });\n\n record._recordArrays = null;\n },\n\n _recordWasChanged: function _recordWasChanged(record) {\n var _this3 = this;\n\n var typeClass = record.type;\n var recordArrays = this.filteredRecordArrays.get(typeClass);\n var filter;\n recordArrays.forEach(function (array) {\n filter = get(array, 'filterFunction');\n _this3.updateFilterRecordArray(array, filter, typeClass, record);\n });\n },\n\n //Need to update live arrays on loading\n recordWasLoaded: function recordWasLoaded(record) {\n var _this4 = this;\n\n var typeClass = record.type;\n var recordArrays = this.filteredRecordArrays.get(typeClass);\n var filter;\n\n recordArrays.forEach(function (array) {\n filter = get(array, 'filterFunction');\n _this4.updateFilterRecordArray(array, filter, typeClass, record);\n });\n\n if (this.liveRecordArrays.has(typeClass)) {\n var liveRecordArray = this.liveRecordArrays.get(typeClass);\n this._addRecordToRecordArray(liveRecordArray, record);\n }\n },\n /**\n Update an individual filter.\n @method updateFilterRecordArray\n @param {DS.FilteredRecordArray} array\n @param {Function} filter\n @param {DS.Model} typeClass\n @param {InternalModel} record\n */\n updateFilterRecordArray: function updateFilterRecordArray(array, filter, typeClass, record) {\n var shouldBeInArray = filter(record.getRecord());\n var recordArrays = this.recordArraysForRecord(record);\n if (shouldBeInArray) {\n this._addRecordToRecordArray(array, record);\n } else {\n recordArrays[\"delete\"](array);\n array.removeInternalModel(record);\n }\n },\n\n _addRecordToRecordArray: function _addRecordToRecordArray(array, record) {\n var recordArrays = this.recordArraysForRecord(record);\n if (!recordArrays.has(array)) {\n array.addInternalModel(record);\n recordArrays.add(array);\n }\n },\n\n populateLiveRecordArray: function populateLiveRecordArray(array, modelName) {\n var typeMap = this.store.typeMapFor(modelName);\n var records = typeMap.records;\n var record;\n\n for (var i = 0; i < records.length; i++) {\n record = records[i];\n\n if (!record.isDeleted() && !record.isEmpty()) {\n this._addRecordToRecordArray(array, record);\n }\n }\n },\n\n /**\n This method is invoked if the `filterFunction` property is\n changed on a `DS.FilteredRecordArray`.\n It essentially re-runs the filter from scratch. This same\n method is invoked when the filter is created in th first place.\n @method updateFilter\n @param {Array} array\n @param {String} modelName\n @param {Function} filter\n */\n updateFilter: function updateFilter(array, modelName, filter) {\n var typeMap = this.store.typeMapFor(modelName);\n var records = typeMap.records;\n var record;\n\n for (var i = 0; i < records.length; i++) {\n record = records[i];\n\n if (!record.isDeleted() && !record.isEmpty()) {\n this.updateFilterRecordArray(array, filter, modelName, record);\n }\n }\n },\n\n /**\n Get the `DS.RecordArray` for a type, which contains all loaded records of\n given type.\n @method liveRecordArrayFor\n @param {Class} typeClass\n @return {DS.RecordArray}\n */\n liveRecordArrayFor: function liveRecordArrayFor(typeClass) {\n return this.liveRecordArrays.get(typeClass);\n },\n\n /**\n Create a `DS.RecordArray` for a type.\n @method createRecordArray\n @param {Class} typeClass\n @return {DS.RecordArray}\n */\n createRecordArray: function createRecordArray(typeClass) {\n var array = _emberDataPrivateSystemRecordArrays.RecordArray.create({\n type: typeClass,\n content: _ember[\"default\"].A(),\n store: this.store,\n isLoaded: true,\n manager: this\n });\n\n return array;\n },\n\n /**\n Create a `DS.FilteredRecordArray` for a type and register it for updates.\n @method createFilteredRecordArray\n @param {DS.Model} typeClass\n @param {Function} filter\n @param {Object} query (optional\n @return {DS.FilteredRecordArray}\n */\n createFilteredRecordArray: function createFilteredRecordArray(typeClass, filter, query) {\n var array = _emberDataPrivateSystemRecordArrays.FilteredRecordArray.create({\n query: query,\n type: typeClass,\n content: _ember[\"default\"].A(),\n store: this.store,\n manager: this,\n filterFunction: filter\n });\n\n this.registerFilteredRecordArray(array, typeClass, filter);\n\n return array;\n },\n\n /**\n Create a `DS.AdapterPopulatedRecordArray` for a type with given query.\n @method createAdapterPopulatedRecordArray\n @param {DS.Model} typeClass\n @param {Object} query\n @return {DS.AdapterPopulatedRecordArray}\n */\n createAdapterPopulatedRecordArray: function createAdapterPopulatedRecordArray(typeClass, query) {\n var array = _emberDataPrivateSystemRecordArrays.AdapterPopulatedRecordArray.create({\n type: typeClass,\n query: query,\n content: _ember[\"default\"].A(),\n store: this.store,\n manager: this\n });\n\n this._adapterPopulatedRecordArrays.push(array);\n\n return array;\n },\n\n /**\n Register a RecordArray for a given type to be backed by\n a filter function. This will cause the array to update\n automatically when records of that type change attribute\n values or states.\n @method registerFilteredRecordArray\n @param {DS.RecordArray} array\n @param {DS.Model} typeClass\n @param {Function} filter\n */\n registerFilteredRecordArray: function registerFilteredRecordArray(array, typeClass, filter) {\n var recordArrays = this.filteredRecordArrays.get(typeClass);\n recordArrays.push(array);\n\n this.updateFilter(array, typeClass, filter);\n },\n\n /**\n Unregister a RecordArray.\n So manager will not update this array.\n @method unregisterRecordArray\n @param {DS.RecordArray} array\n */\n unregisterRecordArray: function unregisterRecordArray(array) {\n var typeClass = array.type;\n\n // unregister filtered record array\n var recordArrays = this.filteredRecordArrays.get(typeClass);\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 // unregister live record array\n if (this.liveRecordArrays.has(typeClass)) {\n var liveRecordArrayForType = this.liveRecordArrayFor(typeClass);\n if (array === liveRecordArrayForType) {\n this.liveRecordArrays[\"delete\"](typeClass);\n }\n }\n }\n },\n\n willDestroy: function willDestroy() {\n this._super.apply(this, arguments);\n\n this.filteredRecordArrays.forEach(function (value) {\n return flatten(value).forEach(destroy);\n });\n this.liveRecordArrays.forEach(destroy);\n this._adapterPopulatedRecordArrays.forEach(destroy);\n }\n });\n\n function destroy(entry) {\n entry.destroy();\n }\n\n function flatten(list) {\n var length = list.length;\n var result = _ember[\"default\"].A();\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});","define(\"ember-data/-private/system/record-arrays/adapter-populated-record-array\", [\"exports\", \"ember\", \"ember-data/-private/system/record-arrays/record-array\", \"ember-data/-private/system/clone-null\", \"ember-data/-private/features\"], function (exports, _ember, _emberDataPrivateSystemRecordArraysRecordArray, _emberDataPrivateSystemCloneNull, _emberDataPrivateFeatures) {\n \"use strict\";\n\n /**\n @module ember-data\n */\n\n var get = _ember[\"default\"].get;\n\n /**\n Represents an ordered list of records whose order and membership is\n determined by the adapter. For example, a query sent to the adapter\n may trigger a search on the server, whose results would be loaded\n into an instance of the `AdapterPopulatedRecordArray`.\n \n @class AdapterPopulatedRecordArray\n @namespace DS\n @extends DS.RecordArray\n */\n exports[\"default\"] = _emberDataPrivateSystemRecordArraysRecordArray[\"default\"].extend({\n query: null,\n\n replace: function replace() {\n var type = get(this, 'type').toString();\n throw new Error(\"The result of a server query (on \" + type + \") is immutable.\");\n },\n\n _update: function _update() {\n var store = get(this, 'store');\n var modelName = get(this, 'type.modelName');\n var query = get(this, 'query');\n\n return store._query(modelName, query, this);\n },\n\n /**\n @method loadRecords\n @param {Array} records\n @param {Object} payload normalized payload\n @private\n */\n loadRecords: function loadRecords(records, payload) {\n var _this = this;\n\n //TODO Optimize\n var internalModels = _ember[\"default\"].A(records).mapBy('_internalModel');\n this.setProperties({\n content: _ember[\"default\"].A(internalModels),\n isLoaded: true,\n isUpdating: false,\n meta: (0, _emberDataPrivateSystemCloneNull[\"default\"])(payload.meta)\n });\n\n if (false) {\n this.set('links', (0, _emberDataPrivateSystemCloneNull[\"default\"])(payload.links));\n }\n\n internalModels.forEach(function (record) {\n _this.manager.recordArraysForRecord(record).add(_this);\n });\n\n // TODO: should triggering didLoad event be the last action of the runLoop?\n _ember[\"default\"].run.once(this, 'trigger', 'didLoad');\n }\n });\n});","define('ember-data/-private/system/record-arrays/filtered-record-array', ['exports', 'ember', 'ember-data/-private/system/record-arrays/record-array'], function (exports, _ember, _emberDataPrivateSystemRecordArraysRecordArray) {\n 'use strict';\n\n /**\n @module ember-data\n */\n\n var get = _ember['default'].get;\n\n /**\n Represents a list of records whose membership is determined by the\n store. As records are created, loaded, or modified, the store\n evaluates them to determine if they should be part of the record\n array.\n \n @class FilteredRecordArray\n @namespace DS\n @extends DS.RecordArray\n */\n exports['default'] = _emberDataPrivateSystemRecordArraysRecordArray['default'].extend({\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 filterFunction: null,\n isLoaded: true,\n\n replace: function replace() {\n var type = get(this, 'type').toString();\n throw new Error(\"The result of a client-side filter (on \" + type + \") is immutable.\");\n },\n\n /**\n @method updateFilter\n @private\n */\n _updateFilter: function _updateFilter() {\n var manager = get(this, 'manager');\n manager.updateFilter(this, get(this, 'type'), get(this, 'filterFunction'));\n },\n\n updateFilter: _ember['default'].observer('filterFunction', function () {\n _ember['default'].run.once(this, this._updateFilter);\n })\n });\n});","define(\"ember-data/-private/system/record-arrays/record-array\", [\"exports\", \"ember\", \"ember-data/-private/system/promise-proxies\", \"ember-data/-private/system/snapshot-record-array\"], function (exports, _ember, _emberDataPrivateSystemPromiseProxies, _emberDataPrivateSystemSnapshotRecordArray) {\n /**\n @module ember-data\n */\n\n \"use strict\";\n\n var get = _ember[\"default\"].get;\n var set = _ember[\"default\"].set;\n\n /**\n A record array is an array that contains records of a certain type. The record\n array materializes records as needed when they are retrieved for the first\n time. You should not create record arrays yourself. Instead, an instance of\n `DS.RecordArray` or its subclasses will be returned by your application's store\n in response to queries.\n \n @class RecordArray\n @namespace DS\n @extends Ember.ArrayProxy\n @uses Ember.Evented\n */\n\n exports[\"default\"] = _ember[\"default\"].ArrayProxy.extend(_ember[\"default\"].Evented, {\n /**\n The model type contained by this record array.\n @property type\n @type DS.Model\n */\n type: null,\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 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 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 isUpdating: false,\n\n /**\n The store that created this record array.\n @property store\n @private\n @type DS.Store\n */\n store: null,\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 objectAtContent(index) {\n var content = get(this, 'content');\n var internalModel = content.objectAt(index);\n return internalModel && internalModel.getRecord();\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 update() {\n if (get(this, 'isUpdating')) {\n return;\n }\n\n this.set('isUpdating', true);\n return this._update();\n },\n\n /*\n Update this RecordArray and return a promise which resolves once the update\n is finished.\n */\n _update: function _update() {\n var store = get(this, 'store');\n var modelName = get(this, 'type.modelName');\n\n return store.findAll(modelName, { reload: true });\n },\n\n /**\n Adds an internal model to the `RecordArray` without duplicates\n @method addInternalModel\n @private\n @param {InternalModel} internalModel\n @param {number} an optional index to insert at\n */\n addInternalModel: function addInternalModel(internalModel, idx) {\n var content = get(this, 'content');\n if (idx === undefined) {\n content.addObject(internalModel);\n } else if (!content.contains(internalModel)) {\n content.insertAt(idx, internalModel);\n }\n },\n\n /**\n Removes an internalModel to the `RecordArray`.\n @method removeInternalModel\n @private\n @param {InternalModel} internalModel\n */\n removeInternalModel: function removeInternalModel(internalModel) {\n get(this, 'content').removeObject(internalModel);\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 save() {\n var recordArray = this;\n var promiseLabel = \"DS: RecordArray#save \" + get(this, 'type');\n var promise = _ember[\"default\"].RSVP.all(this.invoke(\"save\"), promiseLabel).then(function (array) {\n return recordArray;\n }, null, \"DS: RecordArray#save return RecordArray\");\n\n return _emberDataPrivateSystemPromiseProxies.PromiseArray.create({ promise: promise });\n },\n\n _dissociateFromOwnRecords: function _dissociateFromOwnRecords() {\n var _this = this;\n\n this.get('content').forEach(function (record) {\n var recordArrays = record._recordArrays;\n\n if (recordArrays) {\n recordArrays[\"delete\"](_this);\n }\n });\n },\n\n /**\n @method _unregisterFromManager\n @private\n */\n _unregisterFromManager: function _unregisterFromManager() {\n var manager = get(this, 'manager');\n manager.unregisterRecordArray(this);\n },\n\n willDestroy: function willDestroy() {\n this._unregisterFromManager();\n this._dissociateFromOwnRecords();\n set(this, 'content', undefined);\n this._super.apply(this, arguments);\n },\n\n createSnapshot: function createSnapshot(options) {\n var meta = this.get('meta');\n return new _emberDataPrivateSystemSnapshotRecordArray[\"default\"](this, meta, options);\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, _emberDataPrivateSystemRecordArraysRecordArray, _emberDataPrivateSystemRecordArraysFilteredRecordArray, _emberDataPrivateSystemRecordArraysAdapterPopulatedRecordArray) {\n /**\n @module ember-data\n */\n\n \"use strict\";\n\n exports.RecordArray = _emberDataPrivateSystemRecordArraysRecordArray[\"default\"];\n exports.FilteredRecordArray = _emberDataPrivateSystemRecordArraysFilteredRecordArray[\"default\"];\n exports.AdapterPopulatedRecordArray = _emberDataPrivateSystemRecordArraysAdapterPopulatedRecordArray[\"default\"];\n});","define('ember-data/-private/system/references/belongs-to', ['exports', 'ember-data/model', 'ember', 'ember-data/-private/system/references/reference', 'ember-data/-private/debug'], function (exports, _emberDataModel, _ember, _emberDataPrivateSystemReferencesReference, _emberDataPrivateDebug) {\n 'use strict';\n\n var BelongsToReference = function BelongsToReference(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(_emberDataPrivateSystemReferencesReference['default'].prototype);\n BelongsToReference.prototype.constructor = BelongsToReference;\n BelongsToReference.prototype._super$constructor = _emberDataPrivateSystemReferencesReference['default'];\n\n BelongsToReference.prototype.remoteType = function () {\n if (this.belongsToRelationship.link) {\n return \"link\";\n }\n\n return \"id\";\n };\n\n BelongsToReference.prototype.id = function () {\n var inverseRecord = this.belongsToRelationship.inverseRecord;\n return inverseRecord && inverseRecord.id;\n };\n\n BelongsToReference.prototype.link = function () {\n return this.belongsToRelationship.link;\n };\n\n BelongsToReference.prototype.meta = function () {\n return this.belongsToRelationship.meta;\n };\n\n BelongsToReference.prototype.push = function (objectOrPromise) {\n var _this = this;\n\n return _ember['default'].RSVP.resolve(objectOrPromise).then(function (data) {\n var record;\n\n if (data instanceof _emberDataModel['default']) {\n record = data;\n } else {\n record = _this.store.push(data);\n }\n\n (0, _emberDataPrivateDebug.assertPolymorphicType)(_this.internalModel, _this.belongsToRelationship.relationshipMeta, record._internalModel);\n\n _this.belongsToRelationship.setCanonicalRecord(record._internalModel);\n\n return record;\n });\n };\n\n BelongsToReference.prototype.value = function () {\n var inverseRecord = this.belongsToRelationship.inverseRecord;\n\n if (inverseRecord && inverseRecord.record) {\n return inverseRecord.record;\n }\n\n return null;\n };\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 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', 'ember-data/-private/system/references/reference', 'ember-data/-private/debug'], function (exports, _ember, _emberDataPrivateSystemReferencesReference, _emberDataPrivateDebug) {\n 'use strict';\n\n var get = _ember['default'].get;\n\n var HasManyReference = function HasManyReference(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(_emberDataPrivateSystemReferencesReference['default'].prototype);\n HasManyReference.prototype.constructor = HasManyReference;\n HasManyReference.prototype._super$constructor = _emberDataPrivateSystemReferencesReference['default'];\n\n HasManyReference.prototype.remoteType = function () {\n if (this.hasManyRelationship.link) {\n return \"link\";\n }\n\n return \"ids\";\n };\n\n HasManyReference.prototype.link = function () {\n return this.hasManyRelationship.link;\n };\n\n HasManyReference.prototype.ids = function () {\n var members = this.hasManyRelationship.members;\n var ids = members.toArray().map(function (internalModel) {\n return internalModel.id;\n });\n\n return ids;\n };\n\n HasManyReference.prototype.meta = function () {\n return this.hasManyRelationship.manyArray.meta;\n };\n\n HasManyReference.prototype.push = function (objectOrPromise) {\n var _this = this;\n\n return _ember['default'].RSVP.resolve(objectOrPromise).then(function (payload) {\n var array = payload;\n if (typeof payload === \"object\" && payload.data) {\n array = payload.data;\n }\n\n var internalModels = array.map(function (obj) {\n var record = _this.store.push(obj);\n\n (0, _emberDataPrivateDebug.runInDebug)(function () {\n var relationshipMeta = _this.hasManyRelationship.relationshipMeta;\n (0, _emberDataPrivateDebug.assertPolymorphicType)(_this.internalModel, relationshipMeta, record._internalModel);\n });\n\n return record._internalModel;\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 var isEveryLoaded = members.every(function (internalModel) {\n return internalModel.isLoaded() === true;\n });\n\n return isEveryLoaded;\n };\n\n HasManyReference.prototype.value = function () {\n if (this._isLoaded()) {\n return this.hasManyRelationship.manyArray;\n }\n\n return null;\n };\n\n HasManyReference.prototype.load = function () {\n if (!this._isLoaded()) {\n return this.hasManyRelationship.getRecords();\n }\n\n var manyArray = this.hasManyRelationship.manyArray;\n return _ember['default'].RSVP.resolve(manyArray);\n };\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', 'ember-data/-private/system/references/reference'], function (exports, _ember, _emberDataPrivateSystemReferencesReference) {\n 'use strict';\n\n var RecordReference = function RecordReference(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(_emberDataPrivateSystemReferencesReference['default'].prototype);\n RecordReference.prototype.constructor = RecordReference;\n RecordReference.prototype._super$constructor = _emberDataPrivateSystemReferencesReference['default'];\n\n RecordReference.prototype.id = function () {\n return this._id;\n };\n\n RecordReference.prototype.remoteType = function () {\n return 'identity';\n };\n\n RecordReference.prototype.push = function (objectOrPromise) {\n var _this = this;\n\n return _ember['default'].RSVP.resolve(objectOrPromise).then(function (data) {\n var record = _this.store.push(data);\n return record;\n });\n };\n\n RecordReference.prototype.value = function () {\n return this.internalModel.record;\n };\n\n RecordReference.prototype.load = function () {\n return this.store.findRecord(this.type, this._id);\n };\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 var Reference = function Reference(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/references', ['exports', 'ember-data/-private/system/references/record', 'ember-data/-private/system/references/belongs-to', 'ember-data/-private/system/references/has-many'], function (exports, _emberDataPrivateSystemReferencesRecord, _emberDataPrivateSystemReferencesBelongsTo, _emberDataPrivateSystemReferencesHasMany) {\n 'use strict';\n\n exports.RecordReference = _emberDataPrivateSystemReferencesRecord['default'];\n exports.BelongsToReference = _emberDataPrivateSystemReferencesBelongsTo['default'];\n exports.HasManyReference = _emberDataPrivateSystemReferencesHasMany['default'];\n});","define('ember-data/-private/system/relationship-meta', ['exports', 'ember-inflector', 'ember-data/-private/system/normalize-model-name'], function (exports, _emberInflector, _emberDataPrivateSystemNormalizeModelName) {\n 'use strict';\n\n exports.typeForRelationshipMeta = typeForRelationshipMeta;\n exports.relationshipFromMeta = relationshipFromMeta;\n\n function typeForRelationshipMeta(meta) {\n var modelName;\n\n modelName = meta.type || meta.key;\n if (meta.kind === 'hasMany') {\n modelName = (0, _emberInflector.singularize)((0, _emberDataPrivateSystemNormalizeModelName['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 parentType: meta.parentType,\n isRelationship: true\n };\n }\n});","define(\"ember-data/-private/system/relationships/belongs-to\", [\"exports\", \"ember\", \"ember-data/-private/debug\", \"ember-data/-private/system/normalize-model-name\"], function (exports, _ember, _emberDataPrivateDebug, _emberDataPrivateSystemNormalizeModelName) {\n \"use strict\";\n\n exports[\"default\"] = belongsTo;\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, userEnteredModelName;\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, _emberDataPrivateSystemNormalizeModelName[\"default\"])(userEnteredModelName);\n }\n\n (0, _emberDataPrivateDebug.assert)(\"The first argument to DS.belongsTo must be a string representing a model type key, not an instance of \" + _ember[\"default\"].inspect(userEnteredModelName) + \". E.g., to define a relation to the Person model, use DS.belongsTo('person')\", typeof userEnteredModelName === 'string' || typeof userEnteredModelName === 'undefined');\n\n opts = opts || {};\n\n var meta = {\n type: userEnteredModelName,\n isRelationship: true,\n options: opts,\n kind: 'belongsTo',\n key: null\n };\n\n return _ember[\"default\"].computed({\n get: function get(key) {\n if (opts.hasOwnProperty('serialize')) {\n (0, _emberDataPrivateDebug.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 http://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 (0, _emberDataPrivateDebug.warn)(\"You provided an embedded option on the \\\"\" + key + \"\\\" property in the \\\"\" + this._internalModel.modelName + \"\\\" class, this belongs in the serializer. See DS.EmbeddedRecordsMixin http://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 set(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).setRecord(value._internalModel);\n } else {\n this._internalModel._relationships.get(key).setRecord(value);\n }\n\n return this._internalModel._relationships.get(key).getRecord();\n }\n }).meta(meta);\n }\n\n /*\n These observers observe all `belongsTo` relationships on the record. See\n `relationships/ext` to see how these observers get their dependencies.\n */\n var BelongsToMixin = _ember[\"default\"].Mixin.create({\n notifyBelongsToChanged: function notifyBelongsToChanged(key) {\n this.notifyPropertyChange(key);\n }\n });\n exports.BelongsToMixin = BelongsToMixin;\n});","define(\"ember-data/-private/system/relationships/ext\", [\"exports\", \"ember\", \"ember-data/-private/debug\", \"ember-data/-private/system/relationship-meta\", \"ember-data/-private/system/empty-object\"], function (exports, _ember, _emberDataPrivateDebug, _emberDataPrivateSystemRelationshipMeta, _emberDataPrivateSystemEmptyObject) {\n \"use strict\";\n\n var get = _ember[\"default\"].get;\n var Map = _ember[\"default\"].Map;\n var MapWithDefault = _ember[\"default\"].MapWithDefault;\n\n var relationshipsDescriptor = _ember[\"default\"].computed(function () {\n if (_ember[\"default\"].testing === true && relationshipsDescriptor._cacheable === true) {\n relationshipsDescriptor._cacheable = false;\n }\n\n var map = new MapWithDefault({\n defaultValue: function defaultValue() {\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, _emberDataPrivateSystemRelationshipMeta.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 = _ember[\"default\"].computed(function () {\n var _this = this;\n\n if (_ember[\"default\"].testing === true && relatedTypesDescriptor._cacheable === true) {\n relatedTypesDescriptor._cacheable = false;\n }\n\n var modelName;\n var types = _ember[\"default\"].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, _emberDataPrivateSystemRelationshipMeta.typeForRelationshipMeta)(meta);\n\n (0, _emberDataPrivateDebug.assert)(\"You specified a hasMany (\" + meta.type + \") on \" + meta.parentType + \" but \" + meta.type + \" was not found.\", modelName);\n\n if (!types.contains(modelName)) {\n (0, _emberDataPrivateDebug.assert)(\"Trying to sideload \" + name + \" on \" + _this.toString() + \" but the type doesn't exist.\", !!modelName);\n types.push(modelName);\n }\n }\n });\n\n return types;\n }).readOnly();\n\n var relationshipsByNameDescriptor = _ember[\"default\"].computed(function () {\n if (_ember[\"default\"].testing === true && relationshipsByNameDescriptor._cacheable === true) {\n relationshipsByNameDescriptor._cacheable = false;\n }\n\n var map = Map.create();\n\n this.eachComputedProperty(function (name, meta) {\n if (meta.isRelationship) {\n meta.key = name;\n var relationship = (0, _emberDataPrivateSystemRelationshipMeta.relationshipFromMeta)(meta);\n relationship.type = (0, _emberDataPrivateSystemRelationshipMeta.typeForRelationshipMeta)(meta);\n map.set(name, relationship);\n }\n });\n\n return map;\n }).readOnly();\n\n /**\n @module ember-data\n */\n\n /*\n This file defines several extensions to the base `DS.Model` class that\n add support for one-to-many relationships.\n */\n\n /**\n @class Model\n @namespace DS\n */\n var DidDefinePropertyMixin = _ember[\"default\"].Mixin.create({\n\n /**\n This Ember.js hook allows an object to be notified when a property\n is defined.\n In this case, we use it to be notified when an Ember Data user defines a\n belongs-to relationship. In that case, we need to set up observers for\n each one, allowing us to track relationship changes and automatically\n reflect changes in the inverse has-many array.\n This hook passes the class being set up, as well as the key and value\n being defined. So, for example, when the user does this:\n ```javascript\n DS.Model.extend({\n parent: DS.belongsTo('user')\n });\n ```\n This hook would be called with \"parent\" as the key and the computed\n property returned by `DS.belongsTo` as the value.\n @method didDefineProperty\n @param {Object} proto\n @param {String} key\n @param {Ember.ComputedProperty} value\n */\n didDefineProperty: function didDefineProperty(proto, key, value) {\n // Check if the value being set is a computed property.\n if (value instanceof _ember[\"default\"].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 meta.parentType = proto.constructor;\n }\n }\n });\n\n exports.DidDefinePropertyMixin = DidDefinePropertyMixin;\n\n /*\n These DS.Model extensions add class methods that provide relationship\n introspection abilities about relationships.\n \n A note about the computed properties contained here:\n \n **These properties are effectively sealed once called for the first time.**\n To avoid repeatedly doing expensive iteration over a model's fields, these\n values are computed once and then cached for the remainder of the runtime of\n your application.\n \n If your application needs to modify a class after its initial definition\n (for example, using `reopen()` to add additional attributes), make sure you\n do it before using your model with the store, which uses these properties\n extensively.\n */\n\n var RelationshipsClassMethodsMixin = _ember[\"default\"].Mixin.create({\n\n /**\n For a given relationship name, returns the model type of the relationship.\n For example, if you define a model like this:\n ```app/models/post.js\n import DS from 'ember-data';\n export default DS.Model.extend({\n comments: DS.hasMany('comment')\n });\n ```\n Calling `App.Post.typeForRelationship('comments')` will return `App.Comment`.\n @method typeForRelationship\n @static\n @param {String} name the name of the relationship\n @param {store} store an instance of DS.Store\n @return {DS.Model} the type of the relationship, or undefined\n */\n typeForRelationship: function typeForRelationship(name, store) {\n var relationship = get(this, 'relationshipsByName').get(name);\n return relationship && store.modelFor(relationship.type);\n },\n\n inverseMap: _ember[\"default\"].computed(function () {\n return new _emberDataPrivateSystemEmptyObject[\"default\"]();\n }),\n\n /**\n Find the relationship which is the inverse of the one asked for.\n For example, if you define models like this:\n ```app/models/post.js\n import DS from 'ember-data';\n export default DS.Model.extend({\n comments: DS.hasMany('message')\n });\n ```\n ```app/models/message.js\n import DS from 'ember-data';\n export default DS.Model.extend({\n owner: DS.belongsTo('post')\n });\n ```\n App.Post.inverseFor('comments') -> { type: App.Message, name: 'owner', kind: 'belongsTo' }\n App.Message.inverseFor('owner') -> { type: App.Post, name: 'comments', kind: 'hasMany' }\n @method inverseFor\n @static\n @param {String} name the name of the relationship\n @return {Object} the inverse relationship, or null\n */\n inverseFor: function inverseFor(name, store) {\n var inverseMap = get(this, 'inverseMap');\n if (inverseMap[name]) {\n return inverseMap[name];\n } else {\n var inverse = this._findInverseFor(name, store);\n inverseMap[name] = inverse;\n return inverse;\n }\n },\n\n //Calculate the inverse, ignoring the cache\n _findInverseFor: function _findInverseFor(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, inverseKind, inverse;\n\n //If inverse is specified manually, return the inverse\n if (options.inverse) {\n inverseName = options.inverse;\n inverse = _ember[\"default\"].get(inverseType, 'relationshipsByName').get(inverseName);\n\n (0, _emberDataPrivateDebug.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.\", !_ember[\"default\"].isNone(inverse));\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.type === propertyMeta.parentType.modelName) {\n (0, _emberDataPrivateDebug.warn)(\"Detected a reflexive relationship by the name of '\" + name + \"' without an inverse option. Look at http://emberjs.com/guides/models/defining-models/#toc_reflexive-relation for how to explicitly specify inverses.\", false, {\n id: 'ds.model.reflexive-relationship-without-inverse'\n });\n }\n\n var possibleRelationships = findPossibleInverses(this, inverseType);\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 (0, _emberDataPrivateDebug.assert)(\"You defined the '\" + name + \"' relationship on \" + this + \", but you defined the inverse relationships of type \" + inverseType.toString() + \" multiple times. Look at http://emberjs.com/guides/models/defining-models/#toc_explicit-inverses for how to explicitly specify inverses\", filteredRelationships.length < 2);\n\n if (filteredRelationships.length === 1) {\n possibleRelationships = filteredRelationships;\n }\n\n (0, _emberDataPrivateDebug.assert)(\"You defined the '\" + name + \"' relationship on \" + this + \", but multiple possible inverse relationships of type \" + this + \" were found on \" + inverseType + \". Look at http://emberjs.com/guides/models/defining-models/#toc_explicit-inverses for how to explicitly specify inverses\", possibleRelationships.length === 1);\n\n inverseName = possibleRelationships[0].name;\n inverseKind = possibleRelationships[0].kind;\n }\n\n function findPossibleInverses(type, inverseType, 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);\n\n relationships = relationships.filter(function (relationship) {\n var optionsForRelationship = inverseType.metaForProperty(relationship.name).options;\n\n if (!optionsForRelationship.inverse) {\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, possibleRelationships);\n }\n\n return possibleRelationships;\n }\n\n return {\n type: inverseType,\n name: inverseName,\n kind: inverseKind\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 var relationships = Ember.get(Blog, 'relationships');\n relationships.get(App.User);\n //=> [ { name: 'users', kind: 'hasMany' },\n // { name: 'owner', kind: 'belongsTo' } ]\n relationships.get(App.Post);\n //=> [ { name: 'posts', kind: 'hasMany' } ]\n ```\n @property relationships\n @static\n @type Ember.Map\n @readOnly\n */\n\n relationships: 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 var 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: _ember[\"default\"].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 var relatedTypes = Ember.get(Blog, 'relatedTypes');\n //=> [ App.User, App.Post ]\n ```\n @property relatedTypes\n @static\n @type Ember.Array\n @readOnly\n */\n relatedTypes: 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 var relationshipsByName = Ember.get(Blog, 'relationshipsByName');\n relationshipsByName.get('users');\n //=> { key: 'users', kind: 'hasMany', type: App.User }\n relationshipsByName.get('owner');\n //=> { key: 'owner', kind: 'belongsTo', type: App.User }\n ```\n @property relationshipsByName\n @static\n @type Ember.Map\n @readOnly\n */\n relationshipsByName: 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 var 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: _ember[\"default\"].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 /**\n Given a callback, iterates over each of the relationships in the model,\n invoking the callback with the name of each relationship and its relationship\n descriptor.\n @method eachRelationship\n @static\n @param {Function} callback the callback to invoke\n @param {any} binding the value to which the callback's `this` should be bound\n */\n eachRelationship: function eachRelationship(callback, binding) {\n get(this, 'relationshipsByName').forEach(function (relationship, name) {\n callback.call(binding, name, relationship);\n });\n },\n\n /**\n Given a callback, iterates over each of the types related to a model,\n invoking the callback with the related type's class. Each type will be\n returned just once, regardless of how many different relationships it has\n with a model.\n @method eachRelatedType\n @static\n @param {Function} callback the callback to invoke\n @param {any} binding the value to which the callback's `this` should be bound\n */\n eachRelatedType: function eachRelatedType(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\n determineRelationshipType: function determineRelationshipType(knownSide, store) {\n var knownKey = knownSide.key;\n var knownKind = knownSide.kind;\n var inverse = this.inverseFor(knownKey, store);\n var key = undefined,\n otherKind = undefined;\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 exports.RelationshipsClassMethodsMixin = RelationshipsClassMethodsMixin;\n\n var RelationshipsInstanceMethodsMixin = _ember[\"default\"].Mixin.create({\n /**\n Given a callback, iterates over each of the relationships in the model,\n invoking the callback with the name of each relationship and its relationship\n descriptor.\n The callback method you provide should have the following signature (all\n parameters are optional):\n ```javascript\n function(name, descriptor);\n ```\n - `name` the name of the current property in the iteration\n - `descriptor` the meta object that describes this relationship\n The relationship descriptor argument is an object with the following properties.\n - **key** String the name of this relationship on the Model\n - **kind** String \"hasMany\" or \"belongsTo\"\n - **options** Object the original options hash passed when the relationship was declared\n - **parentType** DS.Model the type of the Model that owns this relationship\n - **type** DS.Model the type of the related Model\n Note that in addition to a callback, you can also pass an optional target\n object that will be set as `this` on the context.\n Example\n ```app/serializers/application.js\n import DS from 'ember-data';\n export default DS.JSONSerializer.extend({\n serialize: function(record, options) {\n var json = {};\n record.eachRelationship(function(name, descriptor) {\n if (descriptor.kind === 'hasMany') {\n var serializedHasManyName = name.toUpperCase() + '_IDS';\n json[serializedHasManyName] = record.get(name).mapBy('id');\n }\n });\n return json;\n }\n });\n ```\n @method eachRelationship\n @param {Function} callback the callback to invoke\n @param {any} binding the value to which the callback's `this` should be bound\n */\n eachRelationship: function eachRelationship(callback, binding) {\n this.constructor.eachRelationship(callback, binding);\n },\n\n relationshipFor: function relationshipFor(name) {\n return get(this.constructor, 'relationshipsByName').get(name);\n },\n\n inverseFor: function inverseFor(key) {\n return this.constructor.inverseFor(key, this.store);\n }\n\n });\n exports.RelationshipsInstanceMethodsMixin = RelationshipsInstanceMethodsMixin;\n});","define(\"ember-data/-private/system/relationships/has-many\", [\"exports\", \"ember\", \"ember-data/-private/debug\", \"ember-data/-private/system/normalize-model-name\", \"ember-data/-private/system/is-array-like\"], function (exports, _ember, _emberDataPrivateDebug, _emberDataPrivateSystemNormalizeModelName, _emberDataPrivateSystemIsArrayLike) {\n \"use strict\";\n\n exports[\"default\"] = hasMany;\n\n /**\n @module ember-data\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`/`hasManys` 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 (0, _emberDataPrivateDebug.assert)(\"The first argument to DS.hasMany must be a string representing a model type key, not an instance of \" + _ember[\"default\"].inspect(type) + \". E.g., to define a relation to the Comment model, use DS.hasMany('comment')\", typeof type === 'string' || typeof type === 'undefined');\n\n options = options || {};\n\n if (typeof type === 'string') {\n type = (0, _emberDataPrivateSystemNormalizeModelName[\"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 isRelationship: true,\n options: options,\n kind: 'hasMany',\n key: null\n };\n\n return _ember[\"default\"].computed({\n get: function get(key) {\n var relationship = this._internalModel._relationships.get(key);\n return relationship.getRecords();\n },\n set: function set(key, records) {\n (0, _emberDataPrivateDebug.assert)(\"You must pass an array of records to set a hasMany relationship\", (0, _emberDataPrivateSystemIsArrayLike[\"default\"])(records));\n (0, _emberDataPrivateDebug.assert)(\"All elements of a hasMany relationship must be instances of DS.Model, you passed \" + _ember[\"default\"].inspect(records), (function () {\n return _ember[\"default\"].A(records).every(function (record) {\n return record.hasOwnProperty('_internalModel') === true;\n });\n })());\n\n var relationship = this._internalModel._relationships.get(key);\n relationship.clear();\n relationship.addRecords(_ember[\"default\"].A(records).mapBy('_internalModel'));\n return relationship.getRecords();\n }\n }).meta(meta);\n }\n\n var HasManyMixin = _ember[\"default\"].Mixin.create({\n notifyHasManyAdded: function notifyHasManyAdded(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 });\n exports.HasManyMixin = HasManyMixin;\n});","define(\"ember-data/-private/system/relationships/state/belongs-to\", [\"exports\", \"ember\", \"ember-data/-private/debug\", \"ember-data/-private/system/promise-proxies\", \"ember-data/-private/system/relationships/state/relationship\"], function (exports, _ember, _emberDataPrivateDebug, _emberDataPrivateSystemPromiseProxies, _emberDataPrivateSystemRelationshipsStateRelationship) {\n \"use strict\";\n\n exports[\"default\"] = BelongsToRelationship;\n\n function BelongsToRelationship(store, record, inverseKey, relationshipMeta) {\n this._super$constructor(store, record, inverseKey, relationshipMeta);\n this.record = record;\n this.key = relationshipMeta.key;\n this.inverseRecord = null;\n this.canonicalState = null;\n }\n\n BelongsToRelationship.prototype = Object.create(_emberDataPrivateSystemRelationshipsStateRelationship[\"default\"].prototype);\n BelongsToRelationship.prototype.constructor = BelongsToRelationship;\n BelongsToRelationship.prototype._super$constructor = _emberDataPrivateSystemRelationshipsStateRelationship[\"default\"];\n\n BelongsToRelationship.prototype.setRecord = function (newRecord) {\n if (newRecord) {\n this.addRecord(newRecord);\n } else if (this.inverseRecord) {\n this.removeRecord(this.inverseRecord);\n }\n this.setHasData(true);\n this.setHasLoaded(true);\n };\n\n BelongsToRelationship.prototype.setCanonicalRecord = function (newRecord) {\n if (newRecord) {\n this.addCanonicalRecord(newRecord);\n } else if (this.canonicalState) {\n this.removeCanonicalRecord(this.canonicalState);\n }\n this.setHasData(true);\n this.setHasLoaded(true);\n };\n\n BelongsToRelationship.prototype._super$addCanonicalRecord = _emberDataPrivateSystemRelationshipsStateRelationship[\"default\"].prototype.addCanonicalRecord;\n BelongsToRelationship.prototype.addCanonicalRecord = function (newRecord) {\n if (this.canonicalMembers.has(newRecord)) {\n return;\n }\n\n if (this.canonicalState) {\n this.removeCanonicalRecord(this.canonicalState);\n }\n\n this.canonicalState = newRecord;\n this._super$addCanonicalRecord(newRecord);\n };\n\n BelongsToRelationship.prototype._super$flushCanonical = _emberDataPrivateSystemRelationshipsStateRelationship[\"default\"].prototype.flushCanonical;\n BelongsToRelationship.prototype.flushCanonical = function () {\n //temporary fix to not remove newly created records if server returned null.\n //TODO remove once we have proper diffing\n if (this.inverseRecord && this.inverseRecord.isNew() && !this.canonicalState) {\n return;\n }\n this.inverseRecord = this.canonicalState;\n this.record.notifyBelongsToChanged(this.key);\n this._super$flushCanonical();\n };\n\n BelongsToRelationship.prototype._super$addRecord = _emberDataPrivateSystemRelationshipsStateRelationship[\"default\"].prototype.addRecord;\n BelongsToRelationship.prototype.addRecord = function (newRecord) {\n if (this.members.has(newRecord)) {\n return;\n }\n\n (0, _emberDataPrivateDebug.assertPolymorphicType)(this.record, this.relationshipMeta, newRecord);\n\n if (this.inverseRecord) {\n this.removeRecord(this.inverseRecord);\n }\n\n this.inverseRecord = newRecord;\n this._super$addRecord(newRecord);\n this.record.notifyBelongsToChanged(this.key);\n };\n\n BelongsToRelationship.prototype.setRecordPromise = function (newPromise) {\n var content = newPromise.get && newPromise.get('content');\n (0, _emberDataPrivateDebug.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 this.setRecord(content ? content._internalModel : content);\n };\n\n BelongsToRelationship.prototype._super$removeRecordFromOwn = _emberDataPrivateSystemRelationshipsStateRelationship[\"default\"].prototype.removeRecordFromOwn;\n BelongsToRelationship.prototype.removeRecordFromOwn = function (record) {\n if (!this.members.has(record)) {\n return;\n }\n this.inverseRecord = null;\n this._super$removeRecordFromOwn(record);\n this.record.notifyBelongsToChanged(this.key);\n };\n\n BelongsToRelationship.prototype._super$removeCanonicalRecordFromOwn = _emberDataPrivateSystemRelationshipsStateRelationship[\"default\"].prototype.removeCanonicalRecordFromOwn;\n BelongsToRelationship.prototype.removeCanonicalRecordFromOwn = function (record) {\n if (!this.canonicalMembers.has(record)) {\n return;\n }\n this.canonicalState = null;\n this._super$removeCanonicalRecordFromOwn(record);\n };\n\n BelongsToRelationship.prototype.findRecord = function () {\n if (this.inverseRecord) {\n return this.store._findByInternalModel(this.inverseRecord);\n } else {\n return _ember[\"default\"].RSVP.Promise.resolve(null);\n }\n };\n\n BelongsToRelationship.prototype.fetchLink = function () {\n var _this = this;\n\n return this.store.findBelongsTo(this.record, this.link, this.relationshipMeta).then(function (record) {\n if (record) {\n _this.addRecord(record);\n }\n return record;\n });\n };\n\n BelongsToRelationship.prototype.getRecord = function () {\n var _this2 = this;\n\n //TODO(Igor) flushCanonical here once our syncing is not stupid\n if (this.isAsync) {\n var promise;\n if (this.link) {\n if (this.hasLoaded) {\n promise = this.findRecord();\n } else {\n promise = this.findLink().then(function () {\n return _this2.findRecord();\n });\n }\n } else {\n promise = this.findRecord();\n }\n\n return _emberDataPrivateSystemPromiseProxies.PromiseObject.create({\n promise: promise,\n content: this.inverseRecord ? this.inverseRecord.getRecord() : null\n });\n } else {\n if (this.inverseRecord === null) {\n return null;\n }\n var toReturn = this.inverseRecord.getRecord();\n (0, _emberDataPrivateDebug.assert)(\"You looked up the '\" + this.key + \"' relationship on a '\" + this.record.type.modelName + \"' with id \" + this.record.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 return toReturn;\n }\n };\n\n BelongsToRelationship.prototype.reload = function () {\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.inverseRecord && this.inverseRecord.record) {\n return this.inverseRecord.record.reload();\n }\n\n return this.findRecord();\n };\n});","define(\"ember-data/-private/system/relationships/state/create\", [\"exports\", \"ember\", \"ember-data/-private/system/relationships/state/has-many\", \"ember-data/-private/system/relationships/state/belongs-to\", \"ember-data/-private/system/empty-object\"], function (exports, _ember, _emberDataPrivateSystemRelationshipsStateHasMany, _emberDataPrivateSystemRelationshipsStateBelongsTo, _emberDataPrivateSystemEmptyObject) {\n \"use strict\";\n\n exports[\"default\"] = Relationships;\n\n var get = _ember[\"default\"].get;\n\n function shouldFindInverse(relationshipMeta) {\n var options = relationshipMeta.options;\n return !(options && options.inverse === null);\n }\n\n function createRelationshipFor(record, relationshipMeta, store) {\n var inverseKey = undefined;\n var inverse = null;\n if (shouldFindInverse(relationshipMeta)) {\n inverse = record.type.inverseFor(relationshipMeta.key, store);\n }\n\n if (inverse) {\n inverseKey = inverse.name;\n }\n\n if (relationshipMeta.kind === 'hasMany') {\n return new _emberDataPrivateSystemRelationshipsStateHasMany[\"default\"](store, record, inverseKey, relationshipMeta);\n } else {\n return new _emberDataPrivateSystemRelationshipsStateBelongsTo[\"default\"](store, record, inverseKey, relationshipMeta);\n }\n }\n function Relationships(record) {\n this.record = record;\n this.initializedRelationships = new _emberDataPrivateSystemEmptyObject[\"default\"]();\n }\n\n Relationships.prototype.has = function (key) {\n return !!this.initializedRelationships[key];\n };\n\n Relationships.prototype.get = function (key) {\n var relationships = this.initializedRelationships;\n var relationshipsByName = get(this.record.type, 'relationshipsByName');\n if (!relationships[key] && relationshipsByName.get(key)) {\n relationships[key] = createRelationshipFor(this.record, relationshipsByName.get(key), this.record.store);\n }\n return relationships[key];\n };\n});","define(\"ember-data/-private/system/relationships/state/has-many\", [\"exports\", \"ember-data/-private/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, _emberDataPrivateDebug, _emberDataPrivateSystemPromiseProxies, _emberDataPrivateSystemRelationshipsStateRelationship, _emberDataPrivateSystemOrderedSet, _emberDataPrivateSystemManyArray) {\n \"use strict\";\n\n exports[\"default\"] = ManyRelationship;\n\n function ManyRelationship(store, record, inverseKey, relationshipMeta) {\n this._super$constructor(store, record, inverseKey, relationshipMeta);\n this.belongsToType = relationshipMeta.type;\n this.canonicalState = [];\n this.manyArray = _emberDataPrivateSystemManyArray[\"default\"].create({\n canonicalState: this.canonicalState,\n store: this.store,\n relationship: this,\n type: this.store.modelFor(this.belongsToType),\n record: record\n });\n this.isPolymorphic = relationshipMeta.options.polymorphic;\n this.manyArray.isPolymorphic = this.isPolymorphic;\n }\n\n ManyRelationship.prototype = Object.create(_emberDataPrivateSystemRelationshipsStateRelationship[\"default\"].prototype);\n ManyRelationship.prototype.constructor = ManyRelationship;\n ManyRelationship.prototype._super$constructor = _emberDataPrivateSystemRelationshipsStateRelationship[\"default\"];\n\n ManyRelationship.prototype.destroy = function () {\n this.manyArray.destroy();\n };\n\n ManyRelationship.prototype._super$updateMeta = _emberDataPrivateSystemRelationshipsStateRelationship[\"default\"].prototype.updateMeta;\n ManyRelationship.prototype.updateMeta = function (meta) {\n this._super$updateMeta(meta);\n this.manyArray.set('meta', meta);\n };\n\n ManyRelationship.prototype._super$addCanonicalRecord = _emberDataPrivateSystemRelationshipsStateRelationship[\"default\"].prototype.addCanonicalRecord;\n ManyRelationship.prototype.addCanonicalRecord = function (record, idx) {\n if (this.canonicalMembers.has(record)) {\n return;\n }\n if (idx !== undefined) {\n this.canonicalState.splice(idx, 0, record);\n } else {\n this.canonicalState.push(record);\n }\n this._super$addCanonicalRecord(record, idx);\n };\n\n ManyRelationship.prototype._super$addRecord = _emberDataPrivateSystemRelationshipsStateRelationship[\"default\"].prototype.addRecord;\n ManyRelationship.prototype.addRecord = function (record, idx) {\n if (this.members.has(record)) {\n return;\n }\n this._super$addRecord(record, idx);\n this.manyArray.internalAddRecords([record], idx);\n };\n\n ManyRelationship.prototype._super$removeCanonicalRecordFromOwn = _emberDataPrivateSystemRelationshipsStateRelationship[\"default\"].prototype.removeCanonicalRecordFromOwn;\n ManyRelationship.prototype.removeCanonicalRecordFromOwn = function (record, idx) {\n var i = idx;\n if (!this.canonicalMembers.has(record)) {\n return;\n }\n if (i === undefined) {\n i = this.canonicalState.indexOf(record);\n }\n if (i > -1) {\n this.canonicalState.splice(i, 1);\n }\n this._super$removeCanonicalRecordFromOwn(record, idx);\n };\n\n ManyRelationship.prototype._super$flushCanonical = _emberDataPrivateSystemRelationshipsStateRelationship[\"default\"].prototype.flushCanonical;\n ManyRelationship.prototype.flushCanonical = function () {\n this.manyArray.flushCanonical();\n this._super$flushCanonical();\n };\n\n ManyRelationship.prototype._super$removeRecordFromOwn = _emberDataPrivateSystemRelationshipsStateRelationship[\"default\"].prototype.removeRecordFromOwn;\n ManyRelationship.prototype.removeRecordFromOwn = function (record, idx) {\n if (!this.members.has(record)) {\n return;\n }\n this._super$removeRecordFromOwn(record, idx);\n if (idx !== undefined) {\n //TODO(Igor) not used currently, fix\n this.manyArray.currentState.removeAt(idx);\n } else {\n this.manyArray.internalRemoveRecords([record]);\n }\n };\n\n ManyRelationship.prototype.notifyRecordRelationshipAdded = function (record, idx) {\n (0, _emberDataPrivateDebug.assertPolymorphicType)(this.record, this.relationshipMeta, record);\n\n this.record.notifyHasManyAdded(this.key, record, idx);\n };\n\n ManyRelationship.prototype.reload = function () {\n var _this = this;\n\n var manyArrayLoadedState = this.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 this.manyArray.set('isLoaded', manyArrayLoadedState);\n }\n }\n\n if (this.link) {\n this._loadingPromise = (0, _emberDataPrivateSystemPromiseProxies.promiseManyArray)(this.fetchLink(), 'Reload with link');\n return this._loadingPromise;\n } else {\n this._loadingPromise = (0, _emberDataPrivateSystemPromiseProxies.promiseManyArray)(this.store.scheduleFetchMany(this.manyArray.toArray()).then(function () {\n return _this.manyArray;\n }), 'Reload with ids');\n return this._loadingPromise;\n }\n };\n\n ManyRelationship.prototype.computeChanges = function (records) {\n var members = this.canonicalMembers;\n var recordsToRemove = [];\n var length;\n var record;\n var i;\n\n records = setForArray(records);\n\n members.forEach(function (member) {\n if (records.has(member)) {\n return;\n }\n\n recordsToRemove.push(member);\n });\n\n this.removeCanonicalRecords(recordsToRemove);\n\n // Using records.toArray() since currently using\n // removeRecord can modify length, messing stuff up\n // forEach since it directly looks at \"length\" each\n // iteration\n records = records.toArray();\n length = records.length;\n for (i = 0; i < length; i++) {\n record = records[i];\n this.removeCanonicalRecord(record);\n this.addCanonicalRecord(record, i);\n }\n };\n\n ManyRelationship.prototype.fetchLink = function () {\n var _this2 = this;\n\n return this.store.findHasMany(this.record, 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.updateRecordsFromAdapter(records);\n _this2.manyArray.set('isLoaded', true);\n });\n return _this2.manyArray;\n });\n };\n\n ManyRelationship.prototype.findRecords = function () {\n var _this3 = this;\n\n var manyArray = this.manyArray.toArray();\n var internalModels = new Array(manyArray.length);\n\n for (var i = 0; i < manyArray.length; i++) {\n internalModels[i] = manyArray[i]._internalModel;\n }\n\n //TODO CLEANUP\n return this.store.findMany(internalModels).then(function () {\n if (!_this3.manyArray.get('isDestroyed')) {\n //Goes away after the manyArray refactor\n _this3.manyArray.set('isLoaded', true);\n }\n return _this3.manyArray;\n });\n };\n ManyRelationship.prototype.notifyHasManyChanged = function () {\n this.record.notifyHasManyAdded(this.key);\n };\n\n ManyRelationship.prototype.getRecords = function () {\n var _this4 = this;\n\n //TODO(Igor) sync server here, once our syncing is not stupid\n if (this.isAsync) {\n var promise;\n if (this.link) {\n if (this.hasLoaded) {\n promise = this.findRecords();\n } else {\n promise = this.findLink().then(function () {\n return _this4.findRecords();\n });\n }\n } else {\n promise = this.findRecords();\n }\n this._loadingPromise = _emberDataPrivateSystemPromiseProxies.PromiseManyArray.create({\n content: this.manyArray,\n promise: promise\n });\n return this._loadingPromise;\n } else {\n (0, _emberDataPrivateDebug.assert)(\"You looked up the '\" + this.key + \"' relationship on a '\" + this.record.type.modelName + \"' with id \" + this.record.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 })`)\", this.manyArray.isEvery('isEmpty', false));\n\n //TODO(Igor) WTF DO I DO HERE?\n if (!this.manyArray.get('isDestroyed')) {\n this.manyArray.set('isLoaded', true);\n }\n return this.manyArray;\n }\n };\n\n function setForArray(array) {\n var set = new _emberDataPrivateSystemOrderedSet[\"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\", \"ember-data/-private/debug\", \"ember-data/-private/system/ordered-set\"], function (exports, _ember, _emberDataPrivateDebug, _emberDataPrivateSystemOrderedSet) {\n \"use strict\";\n\n exports[\"default\"] = Relationship;\n\n function Relationship(store, record, inverseKey, relationshipMeta) {\n var async = relationshipMeta.options.async;\n this.members = new _emberDataPrivateSystemOrderedSet[\"default\"]();\n this.canonicalMembers = new _emberDataPrivateSystemOrderedSet[\"default\"]();\n this.store = store;\n this.key = relationshipMeta.key;\n this.inverseKey = inverseKey;\n this.record = record;\n this.isAsync = typeof async === 'undefined' ? true : async;\n this.relationshipMeta = relationshipMeta;\n //This probably breaks for polymorphic relationship in complex scenarios, due to\n //multiple possible modelNames\n this.inverseKeyForImplicit = this.record.constructor.modelName + this.key;\n this.linkPromise = null;\n this.meta = null;\n this.hasData = false;\n this.hasLoaded = false;\n }\n\n Relationship.prototype = {\n constructor: Relationship,\n\n destroy: _ember[\"default\"].K,\n\n updateMeta: function updateMeta(meta) {\n this.meta = meta;\n },\n\n clear: function clear() {\n var members = this.members.list;\n var member;\n\n while (members.length > 0) {\n member = members[0];\n this.removeRecord(member);\n }\n },\n\n removeRecords: function removeRecords(records) {\n var _this = this;\n\n records.forEach(function (record) {\n return _this.removeRecord(record);\n });\n },\n\n addRecords: function addRecords(records, idx) {\n var _this2 = this;\n\n records.forEach(function (record) {\n _this2.addRecord(record, idx);\n if (idx !== undefined) {\n idx++;\n }\n });\n },\n\n addCanonicalRecords: function addCanonicalRecords(records, idx) {\n for (var i = 0; i < records.length; i++) {\n if (idx !== undefined) {\n this.addCanonicalRecord(records[i], i + idx);\n } else {\n this.addCanonicalRecord(records[i]);\n }\n }\n },\n\n addCanonicalRecord: function addCanonicalRecord(record, idx) {\n if (!this.canonicalMembers.has(record)) {\n this.canonicalMembers.add(record);\n if (this.inverseKey) {\n record._relationships.get(this.inverseKey).addCanonicalRecord(this.record);\n } else {\n if (!record._implicitRelationships[this.inverseKeyForImplicit]) {\n record._implicitRelationships[this.inverseKeyForImplicit] = new Relationship(this.store, record, this.key, { options: {} });\n }\n record._implicitRelationships[this.inverseKeyForImplicit].addCanonicalRecord(this.record);\n }\n }\n this.flushCanonicalLater();\n this.setHasData(true);\n },\n\n removeCanonicalRecords: function removeCanonicalRecords(records, idx) {\n for (var i = 0; i < records.length; i++) {\n if (idx !== undefined) {\n this.removeCanonicalRecord(records[i], i + idx);\n } else {\n this.removeCanonicalRecord(records[i]);\n }\n }\n },\n\n removeCanonicalRecord: function removeCanonicalRecord(record, idx) {\n if (this.canonicalMembers.has(record)) {\n this.removeCanonicalRecordFromOwn(record);\n if (this.inverseKey) {\n this.removeCanonicalRecordFromInverse(record);\n } else {\n if (record._implicitRelationships[this.inverseKeyForImplicit]) {\n record._implicitRelationships[this.inverseKeyForImplicit].removeCanonicalRecord(this.record);\n }\n }\n }\n this.flushCanonicalLater();\n },\n\n addRecord: function addRecord(record, idx) {\n if (!this.members.has(record)) {\n this.members.addWithIndex(record, idx);\n this.notifyRecordRelationshipAdded(record, idx);\n if (this.inverseKey) {\n record._relationships.get(this.inverseKey).addRecord(this.record);\n } else {\n if (!record._implicitRelationships[this.inverseKeyForImplicit]) {\n record._implicitRelationships[this.inverseKeyForImplicit] = new Relationship(this.store, record, this.key, { options: {} });\n }\n record._implicitRelationships[this.inverseKeyForImplicit].addRecord(this.record);\n }\n this.record.updateRecordArraysLater();\n }\n this.setHasData(true);\n },\n\n removeRecord: function removeRecord(record) {\n if (this.members.has(record)) {\n this.removeRecordFromOwn(record);\n if (this.inverseKey) {\n this.removeRecordFromInverse(record);\n } else {\n if (record._implicitRelationships[this.inverseKeyForImplicit]) {\n record._implicitRelationships[this.inverseKeyForImplicit].removeRecord(this.record);\n }\n }\n }\n },\n\n removeRecordFromInverse: function removeRecordFromInverse(record) {\n var inverseRelationship = record._relationships.get(this.inverseKey);\n //Need to check for existence, as the record might unloading at the moment\n if (inverseRelationship) {\n inverseRelationship.removeRecordFromOwn(this.record);\n }\n },\n\n removeRecordFromOwn: function removeRecordFromOwn(record) {\n this.members[\"delete\"](record);\n this.notifyRecordRelationshipRemoved(record);\n this.record.updateRecordArrays();\n },\n\n removeCanonicalRecordFromInverse: function removeCanonicalRecordFromInverse(record) {\n var inverseRelationship = record._relationships.get(this.inverseKey);\n //Need to check for existence, as the record might unloading at the moment\n if (inverseRelationship) {\n inverseRelationship.removeCanonicalRecordFromOwn(this.record);\n }\n },\n\n removeCanonicalRecordFromOwn: function removeCanonicalRecordFromOwn(record) {\n this.canonicalMembers[\"delete\"](record);\n this.flushCanonicalLater();\n },\n\n flushCanonical: function flushCanonical() {\n this.willSync = false;\n //a hack for not removing new records\n //TODO remove once we have proper diffing\n var newRecords = [];\n for (var i = 0; i < this.members.list.length; i++) {\n if (this.members.list[i].isNew()) {\n newRecords.push(this.members.list[i]);\n }\n }\n //TODO(Igor) make this less abysmally slow\n this.members = this.canonicalMembers.copy();\n for (i = 0; i < newRecords.length; i++) {\n this.members.add(newRecords[i]);\n }\n },\n\n flushCanonicalLater: function flushCanonicalLater() {\n var _this3 = this;\n\n if (this.willSync) {\n return;\n }\n this.willSync = true;\n this.store._backburner.join(function () {\n return _this3.store._backburner.schedule('syncRelationships', _this3, _this3.flushCanonical);\n });\n },\n\n updateLink: function updateLink(link) {\n (0, _emberDataPrivateDebug.warn)(\"You have pushed a record of type '\" + this.record.type.modelName + \"' with '\" + this.key + \"' as a link, but the association is not an async relationship.\", this.isAsync, {\n id: 'ds.store.push-link-for-sync-relationship'\n });\n (0, _emberDataPrivateDebug.assert)(\"You have pushed a record of type '\" + this.record.type.modelName + \"' with '\" + this.key + \"' as a link, but the value of that link is not a string.\", typeof link === 'string' || link === null);\n if (link !== this.link) {\n this.link = link;\n this.linkPromise = null;\n this.setHasLoaded(false);\n this.record.notifyPropertyChange(this.key);\n }\n },\n\n 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 updateRecordsFromAdapter: function updateRecordsFromAdapter(records) {\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(records);\n this.setHasData(true);\n this.setHasLoaded(true);\n },\n\n notifyRecordRelationshipAdded: _ember[\"default\"].K,\n notifyRecordRelationshipRemoved: _ember[\"default\"].K,\n\n /*\n `hasData` for a relationship is a flag to indicate if we consider the\n content of this relationship \"known\". Snapshots uses this to tell the\n difference between unknown (`undefined`) or empty (`null`). The reason for\n this is that we wouldn't want to serialize unknown relationships as `null`\n as that might overwrite remote state.\n All relationships for a newly created (`store.createRecord()`) are\n considered known (`hasData === true`).\n */\n setHasData: function setHasData(value) {\n this.hasData = value;\n },\n\n /*\n `hasLoaded` is a flag to indicate if we have gotten data from the adapter or\n not when the relationship has a link.\n This is used to be able to tell when to fetch the link and when to return\n the local data in scenarios where the local state is considered known\n (`hasData === true`).\n Updating the link will automatically set `hasLoaded` to `false`.\n */\n setHasLoaded: function setHasLoaded(value) {\n this.hasLoaded = value;\n }\n };\n});","define('ember-data/-private/system/snapshot-record-array', ['exports', 'ember-data/-private/features'], function (exports, _emberDataPrivateFeatures) {\n 'use strict';\n\n exports['default'] = SnapshotRecordArray;\n\n /**\n @module ember-data\n */\n\n /**\n @class SnapshotRecordArray\n @namespace DS\n @private\n @constructor\n @param {Array} snapshots An array of snapshots\n @param {Object} meta\n */\n function SnapshotRecordArray(recordArray, meta) {\n var options = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];\n\n /**\n An array of snapshots\n @private\n @property _snapshots\n @type {Array}\n */\n this._snapshots = null;\n /**\n An array of records\n @private\n @property _recordArray\n @type {Array}\n */\n this._recordArray = recordArray;\n /**\n Number of records in the array\n @property length\n @type {Number}\n */\n this.length = recordArray.get('length');\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 this.type = recordArray.get('type');\n /**\n Meta object\n @property meta\n @type {Object}\n */\n this.meta = meta;\n /**\n A hash of adapter options\n @property adapterOptions\n @type {Object}\n */\n this.adapterOptions = options.adapterOptions;\n\n if (true) {\n this.include = options.include;\n }\n }\n\n /**\n Get snapshots of the underlying record array\n @method snapshots\n @return {Array} Array of snapshots\n */\n SnapshotRecordArray.prototype.snapshots = function () {\n if (this._snapshots) {\n return this._snapshots;\n }\n var recordArray = this._recordArray;\n this._snapshots = recordArray.invoke('createSnapshot');\n\n return this._snapshots;\n };\n});","define('ember-data/-private/system/snapshot', ['exports', 'ember', 'ember-data/-private/system/empty-object', 'ember-data/-private/features'], function (exports, _ember, _emberDataPrivateSystemEmptyObject, _emberDataPrivateFeatures) {\n 'use strict';\n\n exports['default'] = Snapshot;\n\n /**\n @module ember-data\n */\n\n var get = _ember['default'].get;\n\n /**\n @class Snapshot\n @namespace DS\n @private\n @constructor\n @param {DS.Model} internalModel The model to create a snapshot from\n */\n function Snapshot(internalModel) {\n var _this = this;\n\n var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];\n\n this._attributes = new _emberDataPrivateSystemEmptyObject['default']();\n this._belongsToRelationships = new _emberDataPrivateSystemEmptyObject['default']();\n this._belongsToIds = new _emberDataPrivateSystemEmptyObject['default']();\n this._hasManyRelationships = new _emberDataPrivateSystemEmptyObject['default']();\n this._hasManyIds = new _emberDataPrivateSystemEmptyObject['default']();\n\n var record = internalModel.getRecord();\n this.record = record;\n record.eachAttribute(function (keyName) {\n return _this._attributes[keyName] = get(record, keyName);\n });\n\n this.id = internalModel.id;\n this._internalModel = internalModel;\n this.type = internalModel.type;\n this.modelName = internalModel.type.modelName;\n\n /**\n A hash of adapter options\n @property adapterOptions\n @type {Object}\n */\n this.adapterOptions = options.adapterOptions;\n\n if (true) {\n this.include = options.include;\n }\n\n this._changedAttributes = record.changedAttributes();\n }\n\n Snapshot.prototype = {\n constructor: Snapshot,\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 id: null,\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 var json = snapshot.record.toJSON();\n ```\n @property record\n @type {DS.Model}\n */\n record: null,\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 type: null,\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 modelName: null,\n\n /**\n Returns the value of an attribute.\n Example\n ```javascript\n // store.push('post', { id: 1, author: 'Tomster', title: 'Ember.js rocks' });\n postSnapshot.attr('author'); // => 'Tomster'\n postSnapshot.attr('title'); // => 'Ember.js rocks'\n ```\n Note: Values are loaded eagerly and cached when the snapshot is created.\n @method attr\n @param {String} keyName\n @return {Object} The attribute value or undefined\n */\n attr: function attr(keyName) {\n if (keyName in this._attributes) {\n return this._attributes[keyName];\n }\n throw new _ember['default'].Error(\"Model '\" + _ember['default'].inspect(this.record) + \"' has no attribute named '\" + keyName + \"' defined.\");\n },\n\n /**\n Returns all attributes and their corresponding values.\n Example\n ```javascript\n // store.push('post', { id: 1, author: 'Tomster', title: 'Ember.js rocks' });\n postSnapshot.attributes(); // => { author: 'Tomster', title: 'Ember.js rocks' }\n ```\n @method attributes\n @return {Object} All attributes of the current snapshot\n */\n attributes: function attributes() {\n return _ember['default'].copy(this._attributes);\n },\n\n /**\n Returns all changed attributes and their old and new values.\n Example\n ```javascript\n // store.push('post', { id: 1, author: 'Tomster', title: 'Ember.js rocks' });\n postModel.set('title', 'Ember.js rocks!');\n postSnapshot.changedAttributes(); // => { title: ['Ember.js rocks', 'Ember.js rocks!'] }\n ```\n @method changedAttributes\n @return {Object} All changed attributes of the current snapshot\n */\n changedAttributes: function changedAttributes() {\n var changedAttributes = new _emberDataPrivateSystemEmptyObject['default']();\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] = _ember['default'].copy(this._changedAttributes[key]);\n }\n\n return changedAttributes;\n },\n\n /**\n Returns the current value of a belongsTo relationship.\n `belongsTo` takes an optional hash of options as a second parameter,\n currently supported options are:\n - `id`: set to `true` if you only want the ID of the related record to be\n returned.\n Example\n ```javascript\n // store.push('post', { id: 1, title: 'Hello World' });\n // store.createRecord('comment', { body: 'Lorem ipsum', post: post });\n commentSnapshot.belongsTo('post'); // => DS.Snapshot\n commentSnapshot.belongsTo('post', { id: true }); // => '1'\n // store.push('comment', { id: 1, body: 'Lorem ipsum' });\n commentSnapshot.belongsTo('post'); // => undefined\n ```\n Calling `belongsTo` will return a new Snapshot as long as there's any known\n data for the relationship available, such as an ID. If the relationship is\n known but unset, `belongsTo` will return `null`. If the contents of the\n relationship is unknown `belongsTo` will return `undefined`.\n Note: Relationships are loaded lazily and cached upon first access.\n @method belongsTo\n @param {String} keyName\n @param {Object} [options]\n @return {(DS.Snapshot|String|null|undefined)} A snapshot or ID of a known\n relationship or null if the relationship is known but unset. undefined\n will be returned if the contents of the relationship is unknown.\n */\n belongsTo: function belongsTo(keyName, options) {\n var id = options && options.id;\n var relationship, inverseRecord, hasData;\n var result;\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 _ember['default'].Error(\"Model '\" + _ember['default'].inspect(this.record) + \"' has no belongsTo relationship named '\" + keyName + \"' defined.\");\n }\n\n hasData = get(relationship, 'hasData');\n inverseRecord = get(relationship, 'inverseRecord');\n\n if (hasData) {\n if (inverseRecord && !inverseRecord.isDeleted()) {\n if (id) {\n result = get(inverseRecord, 'id');\n } else {\n result = inverseRecord.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 /**\n Returns the current value of a hasMany relationship.\n `hasMany` takes an optional hash of options as a second parameter,\n currently supported options are:\n - `ids`: set to `true` if you only want the IDs of the related records to be\n returned.\n Example\n ```javascript\n // store.push('post', { id: 1, title: 'Hello World', comments: [2, 3] });\n postSnapshot.hasMany('comments'); // => [DS.Snapshot, DS.Snapshot]\n postSnapshot.hasMany('comments', { ids: true }); // => ['2', '3']\n // store.push('post', { id: 1, title: 'Hello World' });\n postSnapshot.hasMany('comments'); // => undefined\n ```\n Note: Relationships are loaded lazily and cached upon first access.\n @method hasMany\n @param {String} keyName\n @param {Object} [options]\n @return {(Array|undefined)} An array of snapshots or IDs of a known\n relationship or an empty array if the relationship is known but unset.\n undefined will be returned if the contents of the relationship is unknown.\n */\n hasMany: function hasMany(keyName, options) {\n var ids = options && options.ids;\n var relationship, members, hasData;\n var results;\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 _ember['default'].Error(\"Model '\" + _ember['default'].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 /**\n Iterates through all the attributes of the model, calling the passed\n function on each attribute.\n Example\n ```javascript\n snapshot.eachAttribute(function(name, meta) {\n // ...\n });\n ```\n @method eachAttribute\n @param {Function} callback the callback to execute\n @param {Object} [binding] the value to which the callback's `this` should be bound\n */\n eachAttribute: function eachAttribute(callback, binding) {\n this.record.eachAttribute(callback, binding);\n },\n\n /**\n Iterates through all the relationships of the model, calling the passed\n function on each relationship.\n Example\n ```javascript\n snapshot.eachRelationship(function(name, relationship) {\n // ...\n });\n ```\n @method eachRelationship\n @param {Function} callback the callback to execute\n @param {Object} [binding] the value to which the callback's `this` should be bound\n */\n eachRelationship: function eachRelationship(callback, binding) {\n this.record.eachRelationship(callback, binding);\n },\n\n /**\n @method serialize\n @param {Object} options\n @return {Object} an object whose values are primitive JSON values only\n */\n serialize: function serialize(options) {\n return this.record.store.serializerFor(this.modelName).serialize(this, options);\n }\n };\n});","define('ember-data/-private/system/store/common', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n exports._bind = _bind;\n exports._guard = _guard;\n exports._objectIsAlive = _objectIsAlive;\n\n var get = _ember['default'].get;\n\n function _bind(fn) {\n var args = Array.prototype.slice.call(arguments, 1);\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/container-instance-cache', ['exports', 'ember', 'ember-data/-private/system/empty-object'], function (exports, _ember, _emberDataPrivateSystemEmptyObject) {\n 'use strict';\n\n exports['default'] = ContainerInstanceCache;\n\n var assign = _ember['default'].assign || _ember['default'].merge;\n\n /**\n * The `ContainerInstanceCache` serves as a lazy cache for looking up\n * instances of serializers and adapters. It has some additional logic for\n * finding the 'fallback' adapter or serializer.\n *\n * The 'fallback' adapter or serializer is an adapter or serializer that is looked up\n * when the preferred lookup fails. For example, say you try to look up `adapter:post`,\n * but there is no entry (app/adapters/post.js in EmberCLI) for `adapter:post` in the registry.\n *\n * The `fallbacks` array passed will then be used; the first entry in the fallbacks array\n * that exists in the container will then be cached for `adapter:post`. So, the next time you\n * look up `adapter:post`, you'll get the `adapter:application` instance (or whatever the fallback\n * was if `adapter:application` doesn't exist).\n *\n * @private\n * @class ContainerInstanceCache\n *\n */\n function ContainerInstanceCache(owner) {\n this._owner = owner;\n this._cache = new _emberDataPrivateSystemEmptyObject['default']();\n }\n\n ContainerInstanceCache.prototype = new _emberDataPrivateSystemEmptyObject['default']();\n\n assign(ContainerInstanceCache.prototype, {\n get: function get(type, preferredKey, fallbacks) {\n var cache = this._cache;\n var preferredLookupKey = type + ':' + preferredKey;\n\n if (!(preferredLookupKey in cache)) {\n var instance = this.instanceFor(preferredLookupKey) || this._findInstance(type, fallbacks);\n if (instance) {\n cache[preferredLookupKey] = instance;\n }\n }\n return cache[preferredLookupKey];\n },\n\n _findInstance: function _findInstance(type, fallbacks) {\n for (var i = 0, _length = fallbacks.length; i < _length; i++) {\n var fallback = fallbacks[i];\n var lookupKey = type + ':' + fallback;\n var instance = this.instanceFor(lookupKey);\n\n if (instance) {\n return instance;\n }\n }\n },\n\n instanceFor: function instanceFor(key) {\n var cache = this._cache;\n if (!cache[key]) {\n var instance = this._owner.lookup(key);\n if (instance) {\n cache[key] = instance;\n }\n }\n return cache[key];\n },\n\n destroy: function destroy() {\n var cache = this._cache;\n var cacheEntries = Object.keys(cache);\n\n for (var i = 0, _length2 = cacheEntries.length; i < _length2; i++) {\n var cacheKey = cacheEntries[i];\n var cacheEntry = cache[cacheKey];\n if (cacheEntry) {\n cacheEntry.destroy();\n }\n }\n this._owner = null;\n },\n\n constructor: ContainerInstanceCache,\n\n toString: function toString() {\n return 'ContainerInstanceCache';\n }\n });\n});","define(\"ember-data/-private/system/store/finders\", [\"exports\", \"ember\", \"ember-data/-private/debug\", \"ember-data/-private/system/store/common\", \"ember-data/-private/system/store/serializer-response\", \"ember-data/-private/system/store/serializers\"], function (exports, _ember, _emberDataPrivateDebug, _emberDataPrivateSystemStoreCommon, _emberDataPrivateSystemStoreSerializerResponse, _emberDataPrivateSystemStoreSerializers) {\n \"use strict\";\n\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\n var Promise = _ember[\"default\"].RSVP.Promise;\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, typeClass, id, internalModel, options) {\n var snapshot = internalModel.createSnapshot(options);\n var promise = adapter.findRecord(store, typeClass, id, snapshot);\n var serializer = (0, _emberDataPrivateSystemStoreSerializers.serializerForAdapter)(store, adapter, internalModel.type.modelName);\n var label = \"DS: Handle Adapter#findRecord of \" + typeClass + \" with id: \" + id;\n\n promise = Promise.resolve(promise, label);\n promise = (0, _emberDataPrivateSystemStoreCommon._guard)(promise, (0, _emberDataPrivateSystemStoreCommon._bind)(_emberDataPrivateSystemStoreCommon._objectIsAlive, store));\n\n return promise.then(function (adapterPayload) {\n (0, _emberDataPrivateDebug.assert)(\"You made a `findRecord` request for a \" + typeClass.modelName + \" with id \" + id + \", but the adapter's response did not have any data\", payloadIsNotBlank(adapterPayload));\n return store._adapterRun(function () {\n var payload = (0, _emberDataPrivateSystemStoreSerializerResponse.normalizeResponseHelper)(serializer, store, typeClass, adapterPayload, id, 'findRecord');\n (0, _emberDataPrivateDebug.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 //TODO Optimize\n var record = store.push(payload);\n return record._internalModel;\n });\n }, function (error) {\n internalModel.notFound();\n if (internalModel.isEmpty()) {\n internalModel.unloadRecord();\n }\n\n throw error;\n }, \"DS: Extract payload of '\" + typeClass + \"'\");\n }\n\n function _findMany(adapter, store, typeClass, ids, internalModels) {\n var snapshots = _ember[\"default\"].A(internalModels).invoke('createSnapshot');\n var promise = adapter.findMany(store, typeClass, ids, snapshots);\n var serializer = (0, _emberDataPrivateSystemStoreSerializers.serializerForAdapter)(store, adapter, typeClass.modelName);\n var label = \"DS: Handle Adapter#findMany of \" + typeClass;\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, _emberDataPrivateSystemStoreCommon._guard)(promise, (0, _emberDataPrivateSystemStoreCommon._bind)(_emberDataPrivateSystemStoreCommon._objectIsAlive, store));\n\n return promise.then(function (adapterPayload) {\n (0, _emberDataPrivateDebug.assert)(\"You made a `findMany` request for \" + typeClass.modelName + \" records with ids \" + ids + \", but the adapter's response did not have any data\", payloadIsNotBlank(adapterPayload));\n return store._adapterRun(function () {\n var payload = (0, _emberDataPrivateSystemStoreSerializerResponse.normalizeResponseHelper)(serializer, store, typeClass, adapterPayload, null, 'findMany');\n //TODO Optimize, no need to materialize here\n var records = store.push(payload);\n var internalModels = new Array(records.length);\n\n for (var i = 0; i < records.length; i++) {\n internalModels[i] = records[i]._internalModel;\n }\n\n return internalModels;\n });\n }, null, \"DS: Extract payload of \" + typeClass);\n }\n\n function _findHasMany(adapter, store, internalModel, link, relationship) {\n var snapshot = internalModel.createSnapshot();\n var typeClass = store.modelFor(relationship.type);\n var promise = adapter.findHasMany(store, snapshot, link, relationship);\n var serializer = (0, _emberDataPrivateSystemStoreSerializers.serializerForAdapter)(store, adapter, relationship.type);\n var label = \"DS: Handle Adapter#findHasMany of \" + internalModel + \" : \" + relationship.type;\n\n promise = Promise.resolve(promise, label);\n promise = (0, _emberDataPrivateSystemStoreCommon._guard)(promise, (0, _emberDataPrivateSystemStoreCommon._bind)(_emberDataPrivateSystemStoreCommon._objectIsAlive, store));\n promise = (0, _emberDataPrivateSystemStoreCommon._guard)(promise, (0, _emberDataPrivateSystemStoreCommon._bind)(_emberDataPrivateSystemStoreCommon._objectIsAlive, internalModel));\n\n return promise.then(function (adapterPayload) {\n (0, _emberDataPrivateDebug.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 return store._adapterRun(function () {\n var payload = (0, _emberDataPrivateSystemStoreSerializerResponse.normalizeResponseHelper)(serializer, store, typeClass, adapterPayload, null, 'findHasMany');\n //TODO Use a non record creating push\n var records = store.push(payload);\n var recordArray = records.map(function (record) {\n return record._internalModel;\n });\n recordArray.meta = payload.meta;\n return recordArray;\n });\n }, null, \"DS: Extract payload of \" + internalModel + \" : hasMany \" + relationship.type);\n }\n\n function _findBelongsTo(adapter, store, internalModel, link, relationship) {\n var snapshot = internalModel.createSnapshot();\n var typeClass = store.modelFor(relationship.type);\n var promise = adapter.findBelongsTo(store, snapshot, link, relationship);\n var serializer = (0, _emberDataPrivateSystemStoreSerializers.serializerForAdapter)(store, adapter, relationship.type);\n var label = \"DS: Handle Adapter#findBelongsTo of \" + internalModel + \" : \" + relationship.type;\n\n promise = Promise.resolve(promise, label);\n promise = (0, _emberDataPrivateSystemStoreCommon._guard)(promise, (0, _emberDataPrivateSystemStoreCommon._bind)(_emberDataPrivateSystemStoreCommon._objectIsAlive, store));\n promise = (0, _emberDataPrivateSystemStoreCommon._guard)(promise, (0, _emberDataPrivateSystemStoreCommon._bind)(_emberDataPrivateSystemStoreCommon._objectIsAlive, internalModel));\n\n return promise.then(function (adapterPayload) {\n return store._adapterRun(function () {\n var payload = (0, _emberDataPrivateSystemStoreSerializerResponse.normalizeResponseHelper)(serializer, store, typeClass, adapterPayload, null, 'findBelongsTo');\n\n if (!payload.data) {\n return null;\n }\n\n //TODO Optimize\n var record = store.push(payload);\n return record._internalModel;\n });\n }, null, \"DS: Extract payload of \" + internalModel + \" : \" + relationship.type);\n }\n\n function _findAll(adapter, store, typeClass, sinceToken, options) {\n var modelName = typeClass.modelName;\n var recordArray = store.peekAll(modelName);\n var snapshotArray = recordArray.createSnapshot(options);\n var promise = adapter.findAll(store, typeClass, sinceToken, snapshotArray);\n var serializer = (0, _emberDataPrivateSystemStoreSerializers.serializerForAdapter)(store, adapter, modelName);\n var label = \"DS: Handle Adapter#findAll of \" + typeClass;\n\n promise = Promise.resolve(promise, label);\n promise = (0, _emberDataPrivateSystemStoreCommon._guard)(promise, (0, _emberDataPrivateSystemStoreCommon._bind)(_emberDataPrivateSystemStoreCommon._objectIsAlive, store));\n\n return promise.then(function (adapterPayload) {\n (0, _emberDataPrivateDebug.assert)(\"You made a `findAll` request for \" + typeClass.modelName + \" records, but the adapter's response did not have any data\", payloadIsNotBlank(adapterPayload));\n store._adapterRun(function () {\n var payload = (0, _emberDataPrivateSystemStoreSerializerResponse.normalizeResponseHelper)(serializer, store, typeClass, adapterPayload, null, 'findAll');\n //TODO Optimize\n store.push(payload);\n });\n\n store.didUpdateAll(typeClass);\n return store.peekAll(modelName);\n }, null, \"DS: Extract payload of findAll \" + typeClass);\n }\n\n function _query(adapter, store, typeClass, query, recordArray) {\n var modelName = typeClass.modelName;\n var promise = adapter.query(store, typeClass, query, recordArray);\n\n var serializer = (0, _emberDataPrivateSystemStoreSerializers.serializerForAdapter)(store, adapter, modelName);\n var label = \"DS: Handle Adapter#query of \" + typeClass;\n\n promise = Promise.resolve(promise, label);\n promise = (0, _emberDataPrivateSystemStoreCommon._guard)(promise, (0, _emberDataPrivateSystemStoreCommon._bind)(_emberDataPrivateSystemStoreCommon._objectIsAlive, store));\n\n return promise.then(function (adapterPayload) {\n var records, payload;\n store._adapterRun(function () {\n payload = (0, _emberDataPrivateSystemStoreSerializerResponse.normalizeResponseHelper)(serializer, store, typeClass, adapterPayload, null, 'query');\n //TODO Optimize\n records = store.push(payload);\n });\n\n (0, _emberDataPrivateDebug.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(records));\n recordArray.loadRecords(records, payload);\n return recordArray;\n }, null, \"DS: Extract payload of query \" + typeClass);\n }\n\n function _queryRecord(adapter, store, typeClass, query) {\n var modelName = typeClass.modelName;\n var promise = adapter.queryRecord(store, typeClass, query);\n var serializer = (0, _emberDataPrivateSystemStoreSerializers.serializerForAdapter)(store, adapter, modelName);\n var label = \"DS: Handle Adapter#queryRecord of \" + typeClass;\n\n promise = Promise.resolve(promise, label);\n promise = (0, _emberDataPrivateSystemStoreCommon._guard)(promise, (0, _emberDataPrivateSystemStoreCommon._bind)(_emberDataPrivateSystemStoreCommon._objectIsAlive, store));\n\n return promise.then(function (adapterPayload) {\n var record;\n store._adapterRun(function () {\n var payload = (0, _emberDataPrivateSystemStoreSerializerResponse.normalizeResponseHelper)(serializer, store, typeClass, adapterPayload, null, 'queryRecord');\n\n (0, _emberDataPrivateDebug.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 //TODO Optimize\n record = store.push(payload);\n });\n\n return record;\n }, null, \"DS: Extract payload of queryRecord \" + typeClass);\n }\n});","define('ember-data/-private/system/store/serializer-response', ['exports', 'ember', 'ember-data/-private/debug'], function (exports, _ember, _emberDataPrivateDebug) {\n 'use strict';\n\n exports.validateDocumentStructure = validateDocumentStructure;\n exports.normalizeResponseHelper = normalizeResponseHelper;\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\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\n function normalizeResponseHelper(serializer, store, modelClass, payload, id, requestType) {\n var normalizedResponse = serializer.normalizeResponse(store, modelClass, payload, id, requestType);\n var validationErrors = [];\n (0, _emberDataPrivateDebug.runInDebug)(function () {\n validationErrors = validateDocumentStructure(normalizedResponse);\n });\n (0, _emberDataPrivateDebug.assert)('normalizeResponse must return a valid JSON API document:\\n\\t* ' + validationErrors.join('\\n\\t* '), _ember['default'].isEmpty(validationErrors));\n\n return normalizedResponse;\n }\n});","define(\"ember-data/-private/system/store/serializers\", [\"exports\"], function (exports) {\n \"use strict\";\n\n exports.serializerForAdapter = serializerForAdapter;\n\n function serializerForAdapter(store, adapter, type) {\n var serializer = adapter.serializer;\n\n if (serializer === undefined) {\n serializer = store.serializerFor(type);\n }\n\n if (serializer === null || serializer === undefined) {\n serializer = {\n extract: function extract(store, type, payload) {\n return payload;\n }\n };\n }\n\n return serializer;\n }\n});","define('ember-data/-private/system/store', ['exports', 'ember', 'ember-data/model', 'ember-data/-private/debug', 'ember-data/-private/system/normalize-link', 'ember-data/-private/system/normalize-model-name', 'ember-data/adapters/errors', '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/store/finders', 'ember-data/-private/utils', 'ember-data/-private/system/coerce-id', 'ember-data/-private/system/record-array-manager', 'ember-data/-private/system/store/container-instance-cache', 'ember-data/-private/system/model/internal-model', 'ember-data/-private/system/empty-object', 'ember-data/-private/features'], function (exports, _ember, _emberDataModel, _emberDataPrivateDebug, _emberDataPrivateSystemNormalizeLink, _emberDataPrivateSystemNormalizeModelName, _emberDataAdaptersErrors, _emberDataPrivateSystemPromiseProxies, _emberDataPrivateSystemStoreCommon, _emberDataPrivateSystemStoreSerializerResponse, _emberDataPrivateSystemStoreSerializers, _emberDataPrivateSystemStoreFinders, _emberDataPrivateUtils, _emberDataPrivateSystemCoerceId, _emberDataPrivateSystemRecordArrayManager, _emberDataPrivateSystemStoreContainerInstanceCache, _emberDataPrivateSystemModelInternalModel, _emberDataPrivateSystemEmptyObject, _emberDataPrivateFeatures) {\n /**\n @module ember-data\n */\n\n 'use strict';\n\n var badIdFormatAssertion = '`id` has to be non-empty string or number';\n\n exports.badIdFormatAssertion = badIdFormatAssertion;\n\n var Backburner = _ember['default']._Backburner;\n var Map = _ember['default'].Map;\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(internalModel, label) {\n var toReturn = internalModel.then(function (model) {\n return model.getRecord();\n });\n return (0, _emberDataPrivateSystemPromiseProxies.promiseObject)(toReturn, label);\n }\n\n var get = _ember['default'].get;\n var set = _ember['default'].set;\n var once = _ember['default'].run.once;\n var isNone = _ember['default'].isNone;\n var isPresent = _ember['default'].isPresent;\n var Promise = _ember['default'].RSVP.Promise;\n var copy = _ember['default'].copy;\n var Store;\n\n var Service = _ember['default'].Service;\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()`, `store#findAll()` or `store#filter()`. 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 init() {\n this._super.apply(this, arguments);\n this._backburner = new Backburner(['normalizeRelationships', 'syncRelationships', 'finished']);\n // internal bookkeeping; not observable\n this.typeMaps = {};\n this.recordArrayManager = _emberDataPrivateSystemRecordArrayManager['default'].create({\n store: this\n });\n this._pendingSave = [];\n this._instanceCache = new _emberDataPrivateSystemStoreContainerInstanceCache['default']((0, _emberDataPrivateUtils.getOwner)(this));\n //Used to keep track of all the find requests that need to be coalesced\n this._pendingFetch = Map.create();\n },\n\n /**\n The adapter to use to communicate to a backend server or other persistence layer.\n This can be specified as an instance, class, or string.\n If you want to specify `app/adapters/custom.js` as a string, do:\n ```js\n adapter: 'custom'\n ```\n @property adapter\n @default DS.JSONAPIAdapter\n @type {(DS.Adapter|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 @param {DS.Model} record the record to serialize\n @param {Object} options an options hash\n */\n serialize: function serialize(record, options) {\n var snapshot = record._internalModel.createSnapshot();\n return snapshot.serialize(options);\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: _ember['default'].computed('adapter', function () {\n var adapter = get(this, 'adapter');\n\n (0, _emberDataPrivateDebug.assert)('You tried to set `adapter` property to an instance of `DS.Adapter`, where it should be a name', typeof adapter === 'string');\n\n adapter = this.retrieveManagedInstance('adapter', adapter);\n\n return 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 var 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 createRecord(modelName, inputProperties) {\n (0, _emberDataPrivateDebug.assert)(\"You need to pass a model name to the store's createRecord method\", isPresent(modelName));\n (0, _emberDataPrivateDebug.assert)('Passing classes to store methods has been removed. Please pass a dasherized string instead of ' + _ember['default'].inspect(modelName), typeof modelName === 'string');\n var typeClass = this.modelFor(modelName);\n var properties = copy(inputProperties) || new _emberDataPrivateSystemEmptyObject['default']();\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(modelName, properties);\n }\n\n // Coerce ID to a string\n properties.id = (0, _emberDataPrivateSystemCoerceId['default'])(properties.id);\n\n var internalModel = this.buildInternalModel(typeClass, properties.id);\n var record = internalModel.getRecord();\n\n // Move the record out of its initial `empty` state into\n // the `loaded` state.\n internalModel.loadedData();\n\n // Set the properties specified on the record.\n record.setProperties(properties);\n\n internalModel.eachRelationship(function (key, descriptor) {\n internalModel._relationships.get(key).setHasData(true);\n });\n\n return record;\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 _generateId(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 // . DELETE RECORD .\n // .................\n\n /**\n For symmetry, a record can be deleted via the store.\n Example\n ```javascript\n var 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 deleteRecord(record) {\n record.deleteRecord();\n },\n\n /**\n For symmetry, a record can be unloaded via the store. Only\n non-dirty records can be unloaded.\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 unloadRecord(record) {\n record.unloadRecord();\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 find(modelName, id, options) {\n // The default `model` hook in Ember.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\n if (arguments.length === 1) {\n (0, _emberDataPrivateDebug.assert)('Using store.find(type) has been removed. Use store.findAll(type) to retrieve all records for a given type.');\n }\n\n if (_ember['default'].typeOf(id) === 'object') {\n (0, _emberDataPrivateDebug.assert)('Calling store.find() with a query object is no longer supported. Use store.query() instead.');\n }\n\n if (options) {\n (0, _emberDataPrivateDebug.assert)('Calling store.find(type, id, { preload: preload }) is no longer supported. Use store.findRecord(type, id, { preload: preload }) instead.');\n }\n\n (0, _emberDataPrivateDebug.assert)(\"You need to pass the model name and id to the store's find method\", arguments.length === 2);\n (0, _emberDataPrivateDebug.assert)(\"You cannot pass `\" + _ember['default'].inspect(id) + \"` as id to the store's find method\", _ember['default'].typeOf(id) === 'string' || _ember['default'].typeOf(id) === 'number');\n (0, _emberDataPrivateDebug.assert)('Passing classes to store methods has been removed. Please pass a dasherized string instead of ' + _ember['default'].inspect(modelName), typeof modelName === 'string');\n\n return this.findRecord(modelName, id);\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 Ember from 'ember';\n export default Ember.Route.extend({\n model: function(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 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 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 var 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 See [peekRecord](#method_peekRecord) to get the cached version of a record.\n @method findRecord\n @param {String} modelName\n @param {(String|Integer)} id\n @param {Object} options\n @return {Promise} promise\n */\n findRecord: function findRecord(modelName, id, options) {\n (0, _emberDataPrivateDebug.assert)(\"You need to pass a model name to the store's findRecord method\", isPresent(modelName));\n (0, _emberDataPrivateDebug.assert)('Passing classes to store methods has been removed. Please pass a dasherized string instead of ' + _ember['default'].inspect(modelName), typeof modelName === 'string');\n (0, _emberDataPrivateDebug.assert)(badIdFormatAssertion, typeof id === 'string' && id.length > 0 || typeof id === 'number' && !isNaN(id));\n\n var internalModel = this._internalModelForId(modelName, id);\n options = options || {};\n\n if (!this.hasRecordForId(modelName, id)) {\n return this._findByInternalModel(internalModel, options);\n }\n\n var fetchedInternalModel = this._findRecord(internalModel, options);\n\n return promiseRecord(fetchedInternalModel, \"DS: Store#findRecord \" + internalModel.typeKey + \" with id: \" + get(internalModel, 'id'));\n },\n\n _findRecord: function _findRecord(internalModel, options) {\n // Refetch if the reload option is passed\n if (options.reload) {\n return this.scheduleFetch(internalModel, options);\n }\n\n // Refetch the record if the adapter thinks the record is stale\n var snapshot = internalModel.createSnapshot(options);\n var typeClass = internalModel.type;\n var adapter = this.adapterFor(typeClass.modelName);\n if (adapter.shouldReloadRecord(this, snapshot)) {\n return this.scheduleFetch(internalModel, options);\n }\n\n // Trigger the background refetch if all the previous checks fail\n if (adapter.shouldBackgroundReloadRecord(this, snapshot)) {\n this.scheduleFetch(internalModel, options);\n }\n\n // Return the cached record\n return Promise.resolve(internalModel);\n },\n\n _findByInternalModel: function _findByInternalModel(internalModel, options) {\n options = options || {};\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.typeKey + \" with id: \" + get(internalModel, 'id'));\n },\n\n _findEmptyInternalModel: function _findEmptyInternalModel(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 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 findByIds(modelName, ids) {\n (0, _emberDataPrivateDebug.assert)(\"You need to pass a model name to the store's findByIds method\", isPresent(modelName));\n (0, _emberDataPrivateDebug.assert)('Passing classes to store methods has been removed. Please pass a dasherized string instead of ' + _ember['default'].inspect(modelName), typeof modelName === 'string');\n var promises = new Array(ids.length);\n\n for (var i = 0; i < ids.length; i++) {\n promises[i] = this.findRecord(modelName, ids[i]);\n }\n\n return (0, _emberDataPrivateSystemPromiseProxies.promiseArray)(_ember['default'].RSVP.all(promises).then(_ember['default'].A, null, \"DS: Store#findByIds of \" + modelName + \" complete\"));\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 // TODO rename this to have an underscore\n fetchRecord: function fetchRecord(internalModel, options) {\n var typeClass = internalModel.type;\n var id = internalModel.id;\n var adapter = this.adapterFor(typeClass.modelName);\n\n (0, _emberDataPrivateDebug.assert)(\"You tried to find a record but you have no adapter (for \" + typeClass + \")\", adapter);\n (0, _emberDataPrivateDebug.assert)(\"You tried to find a record but your adapter (for \" + typeClass + \") does not implement 'findRecord'\", typeof adapter.findRecord === 'function' || typeof adapter.find === 'function');\n\n var promise = (0, _emberDataPrivateSystemStoreFinders._find)(adapter, this, typeClass, id, internalModel, options);\n return promise;\n },\n\n scheduleFetchMany: function scheduleFetchMany(records) {\n var internalModels = new Array(records.length);\n var fetches = new Array(records.length);\n for (var i = 0; i < records.length; i++) {\n internalModels[i] = records[i]._internalModel;\n }\n\n for (var i = 0; i < internalModels.length; i++) {\n fetches[i] = this.scheduleFetch(internalModels[i]);\n }\n\n return _ember['default'].RSVP.Promise.all(fetches);\n },\n\n scheduleFetch: function scheduleFetch(internalModel, options) {\n var typeClass = internalModel.type;\n\n if (internalModel._loadingPromise) {\n return internalModel._loadingPromise;\n }\n\n var resolver = _ember['default'].RSVP.defer('Fetching ' + typeClass + 'with id: ' + internalModel.id);\n var pendingFetchItem = {\n record: internalModel,\n resolver: resolver,\n options: options\n };\n var promise = resolver.promise;\n\n internalModel.loadingData(promise);\n\n if (!this._pendingFetch.get(typeClass)) {\n this._pendingFetch.set(typeClass, [pendingFetchItem]);\n } else {\n this._pendingFetch.get(typeClass).push(pendingFetchItem);\n }\n _ember['default'].run.scheduleOnce('afterRender', this, this.flushAllPendingFetches);\n\n return promise;\n },\n\n flushAllPendingFetches: function flushAllPendingFetches() {\n if (this.isDestroyed || this.isDestroying) {\n return;\n }\n\n this._pendingFetch.forEach(this._flushPendingFetchForType, this);\n this._pendingFetch = Map.create();\n },\n\n _flushPendingFetchForType: function _flushPendingFetchForType(pendingFetchItems, typeClass) {\n var store = this;\n var adapter = store.adapterFor(typeClass.modelName);\n var shouldCoalesce = !!adapter.findMany && adapter.coalesceFindRequests;\n var records = _ember['default'].A(pendingFetchItems).mapBy('record');\n\n function _fetchRecord(recordResolverPair) {\n recordResolverPair.resolver.resolve(store.fetchRecord(recordResolverPair.record, recordResolverPair.options)); // TODO adapter options\n }\n\n function resolveFoundRecords(records) {\n records.forEach(function (record) {\n var pair = _ember['default'].A(pendingFetchItems).findBy('record', record);\n if (pair) {\n var resolver = pair.resolver;\n resolver.resolve(record);\n }\n });\n return records;\n }\n\n function makeMissingRecordsRejector(requestedRecords) {\n return function rejectMissingRecords(resolvedRecords) {\n resolvedRecords = _ember['default'].A(resolvedRecords);\n var missingRecords = requestedRecords.reject(function (record) {\n return resolvedRecords.contains(record);\n });\n if (missingRecords.length) {\n (0, _emberDataPrivateDebug.warn)('Ember Data expected to find records with the following ids in the adapter response but they were missing: ' + _ember['default'].inspect(_ember['default'].A(missingRecords).mapBy('id')), false, {\n id: 'ds.store.missing-records-from-adapter'\n });\n }\n rejectRecords(missingRecords);\n };\n }\n\n function makeRecordsRejector(records) {\n return function (error) {\n rejectRecords(records, error);\n };\n }\n\n function rejectRecords(records, error) {\n records.forEach(function (record) {\n var pair = _ember['default'].A(pendingFetchItems).findBy('record', record);\n if (pair) {\n var resolver = pair.resolver;\n resolver.reject(error);\n }\n });\n }\n\n if (pendingFetchItems.length === 1) {\n _fetchRecord(pendingFetchItems[0]);\n } else if (shouldCoalesce) {\n\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\n var snapshots = _ember['default'].A(records).invoke('createSnapshot');\n var groups = adapter.groupRecordsForFindMany(this, snapshots);\n groups.forEach(function (groupOfSnapshots) {\n var groupOfRecords = _ember['default'].A(groupOfSnapshots).mapBy('_internalModel');\n var requestedRecords = _ember['default'].A(groupOfRecords);\n var ids = requestedRecords.mapBy('id');\n if (ids.length > 1) {\n (0, _emberDataPrivateSystemStoreFinders._findMany)(adapter, store, typeClass, ids, requestedRecords).then(resolveFoundRecords).then(makeMissingRecordsRejector(requestedRecords)).then(null, makeRecordsRejector(requestedRecords));\n } else if (ids.length === 1) {\n var pair = _ember['default'].A(pendingFetchItems).findBy('record', groupOfRecords[0]);\n _fetchRecord(pair);\n } else {\n (0, _emberDataPrivateDebug.assert)(\"You cannot return an empty array from adapter's method groupRecordsForFindMany\", false);\n }\n });\n } else {\n pendingFetchItems.forEach(_fetchRecord);\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 _Note: This is an synchronous method and does not return a promise._\n ```js\n var post = store.peekRecord('post', 1);\n post.get('id'); // 1\n ```\n @method peekRecord\n @param {String} modelName\n @param {String|Integer} id\n @return {DS.Model|null} record\n */\n peekRecord: function peekRecord(modelName, id) {\n (0, _emberDataPrivateDebug.assert)(\"You need to pass a model name to the store's peekRecord method\", isPresent(modelName));\n (0, _emberDataPrivateDebug.assert)('Passing classes to store methods has been removed. Please pass a dasherized string instead of ' + _ember['default'].inspect(modelName), typeof modelName === 'string');\n if (this.hasRecordForId(modelName, id)) {\n return this._internalModelForId(modelName, id).getRecord();\n } else {\n return null;\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 reloadRecord(internalModel) {\n var modelName = internalModel.type.modelName;\n var adapter = this.adapterFor(modelName);\n var id = internalModel.id;\n\n (0, _emberDataPrivateDebug.assert)(\"You cannot reload a record without an ID\", id);\n (0, _emberDataPrivateDebug.assert)(\"You tried to reload a record but you have no adapter (for \" + modelName + \")\", adapter);\n (0, _emberDataPrivateDebug.assert)(\"You tried to reload a record but your adapter does not implement `findRecord`\", typeof adapter.findRecord === 'function' || typeof adapter.find === 'function');\n\n return this.scheduleFetch(internalModel);\n },\n\n /**\n Returns true if a record for a given type and ID is already loaded.\n @method hasRecordForId\n @param {(String|DS.Model)} modelName\n @param {(String|Integer)} inputId\n @return {Boolean}\n */\n hasRecordForId: function hasRecordForId(modelName, inputId) {\n (0, _emberDataPrivateDebug.assert)(\"You need to pass a model name to the store's hasRecordForId method\", isPresent(modelName));\n (0, _emberDataPrivateDebug.assert)('Passing classes to store methods has been removed. Please pass a dasherized string instead of ' + _ember['default'].inspect(modelName), typeof modelName === 'string');\n var typeClass = this.modelFor(modelName);\n var id = (0, _emberDataPrivateSystemCoerceId['default'])(inputId);\n var internalModel = this.typeMapFor(typeClass).idToRecord[id];\n return !!internalModel && internalModel.isLoaded();\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 recordForId(modelName, id) {\n (0, _emberDataPrivateDebug.assert)(\"You need to pass a model name to the store's recordForId method\", isPresent(modelName));\n (0, _emberDataPrivateDebug.assert)('Passing classes to store methods has been removed. Please pass a dasherized string instead of ' + _ember['default'].inspect(modelName), typeof modelName === 'string');\n return this._internalModelForId(modelName, id).getRecord();\n },\n\n _internalModelForId: function _internalModelForId(typeName, inputId) {\n var typeClass = this.modelFor(typeName);\n var id = (0, _emberDataPrivateSystemCoerceId['default'])(inputId);\n var idToRecord = this.typeMapFor(typeClass).idToRecord;\n var record = idToRecord[id];\n\n if (!record || !idToRecord[id]) {\n record = this.buildInternalModel(typeClass, id);\n }\n\n return record;\n },\n\n /**\n @method findMany\n @private\n @param {Array} internalModels\n @return {Promise} promise\n */\n findMany: function findMany(internalModels) {\n var finds = new Array(internalModels.length);\n\n for (var i = 0; i < internalModels.length; i++) {\n finds[i] = this._findByInternalModel(internalModels[i]);\n }\n\n return Promise.all(finds);\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 {DS.Model} owner\n @param {any} link\n @param {(Relationship)} relationship\n @return {Promise} promise\n */\n findHasMany: function findHasMany(owner, link, relationship) {\n var adapter = this.adapterFor(owner.type.modelName);\n\n (0, _emberDataPrivateDebug.assert)(\"You tried to load a hasMany relationship but you have no adapter (for \" + owner.type + \")\", adapter);\n (0, _emberDataPrivateDebug.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 return (0, _emberDataPrivateSystemStoreFinders._findHasMany)(adapter, this, owner, link, relationship);\n },\n\n /**\n @method findBelongsTo\n @private\n @param {DS.Model} owner\n @param {any} link\n @param {Relationship} relationship\n @return {Promise} promise\n */\n findBelongsTo: function findBelongsTo(owner, link, relationship) {\n var adapter = this.adapterFor(owner.type.modelName);\n\n (0, _emberDataPrivateDebug.assert)(\"You tried to load a belongsTo relationship but you have no adapter (for \" + owner.type + \")\", adapter);\n (0, _emberDataPrivateDebug.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 return (0, _emberDataPrivateSystemStoreFinders._findBelongsTo)(adapter, this, owner, link, relationship);\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 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 a `RecordArray`\n once the server returns.\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 query(modelName, _query2) {\n return this._query(modelName, _query2);\n },\n\n _query: function _query(modelName, query, array) {\n (0, _emberDataPrivateDebug.assert)(\"You need to pass a model name to the store's query method\", isPresent(modelName));\n (0, _emberDataPrivateDebug.assert)(\"You need to pass a query hash to the store's query method\", query);\n (0, _emberDataPrivateDebug.assert)('Passing classes to store methods has been removed. Please pass a dasherized string instead of ' + _ember['default'].inspect(modelName), typeof modelName === 'string');\n var typeClass = this.modelFor(modelName);\n array = array || this.recordArrayManager.createAdapterPopulatedRecordArray(typeClass, query);\n\n var adapter = this.adapterFor(modelName);\n\n (0, _emberDataPrivateDebug.assert)(\"You tried to load a query but you have no adapter (for \" + typeClass + \")\", adapter);\n (0, _emberDataPrivateDebug.assert)(\"You tried to load a query but your adapter does not implement `query`\", typeof adapter.query === 'function');\n\n return (0, _emberDataPrivateSystemPromiseProxies.promiseArray)((0, _emberDataPrivateSystemStoreFinders._query)(adapter, this, typeClass, query, array));\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` 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 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 ```javascript\n // app/adapters/user.js\n import Adapter from \"ember-data/adapter\";\n export default Adapter.extend({\n queryRecord(modelName, query) {\n return Ember.$.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 kown 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 @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 queryRecord(modelName, query) {\n (0, _emberDataPrivateDebug.assert)(\"You need to pass a model name to the store's queryRecord method\", isPresent(modelName));\n (0, _emberDataPrivateDebug.assert)(\"You need to pass a query hash to the store's queryRecord method\", query);\n (0, _emberDataPrivateDebug.assert)('Passing classes to store methods has been removed. Please pass a dasherized string instead of ' + _ember['default'].inspect(modelName), typeof modelName === 'string');\n\n var typeClass = this.modelFor(modelName);\n var adapter = this.adapterFor(modelName);\n\n (0, _emberDataPrivateDebug.assert)(\"You tried to make a query but you have no adapter (for \" + typeClass + \")\", adapter);\n (0, _emberDataPrivateDebug.assert)(\"You tried to make a query but your adapter does not implement `queryRecord`\", typeof adapter.queryRecord === 'function');\n\n return (0, _emberDataPrivateSystemPromiseProxies.promiseObject)((0, _emberDataPrivateSystemStoreFinders._queryRecord)(adapter, this, typeClass, query));\n },\n\n /**\n `findAll` ask 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 Ember from 'ember';\n export default Ember.Route.extend({\n model: function(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 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 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 ```js\n // app/adapters/application.js\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 var 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 See [peekAll](#method_peekAll) to get an array of current records in the\n store, without waiting until a reload is finished.\n See [query](#method_query) to only get a subset of records from the server.\n @method findAll\n @param {String} modelName\n @param {Object} options\n @return {Promise} promise\n */\n findAll: function findAll(modelName, options) {\n (0, _emberDataPrivateDebug.assert)(\"You need to pass a model name to the store's findAll method\", isPresent(modelName));\n (0, _emberDataPrivateDebug.assert)('Passing classes to store methods has been removed. Please pass a dasherized string instead of ' + _ember['default'].inspect(modelName), typeof modelName === 'string');\n var typeClass = this.modelFor(modelName);\n\n return this._fetchAll(typeClass, this.peekAll(modelName), options);\n },\n\n /**\n @method _fetchAll\n @private\n @param {DS.Model} typeClass\n @param {DS.RecordArray} array\n @return {Promise} promise\n */\n _fetchAll: function _fetchAll(typeClass, array, options) {\n options = options || {};\n var adapter = this.adapterFor(typeClass.modelName);\n var sinceToken = this.typeMapFor(typeClass).metadata.since;\n\n (0, _emberDataPrivateDebug.assert)(\"You tried to load all records but you have no adapter (for \" + typeClass + \")\", adapter);\n (0, _emberDataPrivateDebug.assert)(\"You tried to load all records but your adapter does not implement `findAll`\", typeof adapter.findAll === 'function');\n\n set(array, 'isUpdating', true);\n\n if (options.reload) {\n return (0, _emberDataPrivateSystemPromiseProxies.promiseArray)((0, _emberDataPrivateSystemStoreFinders._findAll)(adapter, this, typeClass, sinceToken, options));\n }\n var snapshotArray = array.createSnapshot(options);\n if (adapter.shouldReloadAll(this, snapshotArray)) {\n return (0, _emberDataPrivateSystemPromiseProxies.promiseArray)((0, _emberDataPrivateSystemStoreFinders._findAll)(adapter, this, typeClass, sinceToken, options));\n }\n if (adapter.shouldBackgroundReloadAll(this, snapshotArray)) {\n (0, _emberDataPrivateSystemStoreFinders._findAll)(adapter, this, typeClass, sinceToken, options);\n }\n return (0, _emberDataPrivateSystemPromiseProxies.promiseArray)(Promise.resolve(array));\n },\n\n /**\n @method didUpdateAll\n @param {DS.Model} typeClass\n @private\n */\n didUpdateAll: function didUpdateAll(typeClass) {\n var liveRecordArray = this.recordArrayManager.liveRecordArrayFor(typeClass);\n set(liveRecordArray, 'isUpdating', false);\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 var localPosts = store.peekAll('post');\n ```\n @method peekAll\n @param {String} modelName\n @return {DS.RecordArray}\n */\n peekAll: function peekAll(modelName) {\n (0, _emberDataPrivateDebug.assert)(\"You need to pass a model name to the store's peekAll method\", isPresent(modelName));\n (0, _emberDataPrivateDebug.assert)('Passing classes to store methods has been removed. Please pass a dasherized string instead of ' + _ember['default'].inspect(modelName), typeof modelName === 'string');\n var typeClass = this.modelFor(modelName);\n\n var liveRecordArray = this.recordArrayManager.liveRecordArrayFor(typeClass);\n this.recordArrayManager.populateLiveRecordArray(liveRecordArray, typeClass);\n\n return liveRecordArray;\n },\n\n /**\n This method unloads all records in the store.\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 unloadAll(modelName) {\n (0, _emberDataPrivateDebug.assert)('Passing classes to store methods has been removed. Please pass a dasherized string instead of ' + _ember['default'].inspect(modelName), !modelName || typeof modelName === 'string');\n if (arguments.length === 0) {\n var typeMaps = this.typeMaps;\n var keys = Object.keys(typeMaps);\n var types = new Array(keys.length);\n\n for (var i = 0; i < keys.length; i++) {\n types[i] = typeMaps[keys[i]]['type'].modelName;\n }\n\n types.forEach(this.unloadAll, this);\n } else {\n var typeClass = this.modelFor(modelName);\n var typeMap = this.typeMapFor(typeClass);\n var records = typeMap.records.slice();\n var record = undefined;\n\n for (var i = 0; i < records.length; i++) {\n record = records[i];\n record.unloadRecord();\n record.destroy(); // maybe within unloadRecord\n }\n\n typeMap.metadata = new _emberDataPrivateSystemEmptyObject['default']();\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 var 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 filter(modelName, query, _filter) {\n (0, _emberDataPrivateDebug.assert)(\"You need to pass a model name to the store's filter method\", isPresent(modelName));\n (0, _emberDataPrivateDebug.assert)('Passing classes to store methods has been removed. Please pass a dasherized string instead of ' + _ember['default'].inspect(modelName), typeof modelName === 'string');\n\n if (!_ember['default'].ENV.ENABLE_DS_FILTER) {\n (0, _emberDataPrivateDebug.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;\n var length = arguments.length;\n var array;\n var hasQuery = length === 3;\n\n // allow an optional server query\n if (hasQuery) {\n promise = this.query(modelName, query);\n } else if (arguments.length === 2) {\n _filter = query;\n }\n\n modelName = this.modelFor(modelName);\n\n if (hasQuery) {\n array = this.recordArrayManager.createFilteredRecordArray(modelName, _filter, query);\n } else {\n array = this.recordArrayManager.createFilteredRecordArray(modelName, _filter);\n }\n\n promise = promise || Promise.resolve(array);\n\n return (0, _emberDataPrivateSystemPromiseProxies.promiseArray)(promise.then(function () {\n return array;\n }, null, 'DS: Store#filter of ' + modelName));\n },\n\n /**\n This method returns if a certain record is already loaded\n 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.recordIsLoaded('post', 1); // false\n store.findRecord('post', 1).then(function() {\n store.recordIsLoaded('post', 1); // true\n });\n ```\n @method recordIsLoaded\n @param {String} modelName\n @param {string} id\n @return {boolean}\n */\n recordIsLoaded: function recordIsLoaded(modelName, id) {\n (0, _emberDataPrivateDebug.assert)(\"You need to pass a model name to the store's recordIsLoaded method\", isPresent(modelName));\n (0, _emberDataPrivateDebug.assert)('Passing classes to store methods has been removed. Please pass a dasherized string instead of ' + _ember['default'].inspect(modelName), typeof modelName === 'string');\n return this.hasRecordForId(modelName, id);\n },\n\n // ............\n // . UPDATING .\n // ............\n\n /**\n If the adapter updates attributes the record will notify\n the store to update its membership in any filters.\n To avoid thrashing, this method is invoked only once per\n run loop per record.\n @method dataWasUpdated\n @private\n @param {Class} type\n @param {InternalModel} internalModel\n */\n dataWasUpdated: function dataWasUpdated(type, internalModel) {\n this.recordArrayManager.recordDidChange(internalModel);\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 scheduleSave(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 once(this, 'flushPendingSave');\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 flushPendingSave() {\n var _this = this;\n\n var pending = this._pendingSave.slice();\n this._pendingSave = [];\n\n pending.forEach(function (pendingItem) {\n var snapshot = pendingItem.snapshot;\n var resolver = pendingItem.resolver;\n var record = snapshot._internalModel;\n var adapter = _this.adapterFor(record.type.modelName);\n var operation;\n\n if (get(record, 'currentState.stateName') === 'root.deleted.saved') {\n return resolver.resolve();\n } else if (record.isNew()) {\n operation = 'createRecord';\n } else if (record.isDeleted()) {\n operation = 'deleteRecord';\n } else {\n operation = 'updateRecord';\n }\n\n resolver.resolve(_commit(adapter, _this, operation, snapshot));\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 didSaveRecord(internalModel, dataArg) {\n var data;\n if (dataArg) {\n data = dataArg.data;\n }\n if (data) {\n // normalize relationship IDs into records\n this._backburner.schedule('normalizeRelationships', this, '_setupRelationships', internalModel, data);\n this.updateId(internalModel, data);\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 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 recordWasInvalid(internalModel, errors) {\n internalModel.adapterDidInvalidate(errors);\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 recordWasError(internalModel, error) {\n internalModel.adapterDidError(error);\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 updateId(internalModel, data) {\n var oldId = internalModel.id;\n var id = (0, _emberDataPrivateSystemCoerceId['default'])(data.id);\n\n (0, _emberDataPrivateDebug.assert)(\"An adapter cannot assign a new id to a record that already has an id. \" + internalModel + \" had id: \" + oldId + \" and you tried to update it with \" + id + \". This likely happened because your server returned data in response to a find or update that had a different id than the one you sent.\", oldId === null || id === oldId);\n\n this.typeMapFor(internalModel.type).idToRecord[id] = internalModel;\n\n internalModel.setId(id);\n },\n\n /**\n Returns a map of IDs to client IDs for a given type.\n @method typeMapFor\n @private\n @param {DS.Model} typeClass\n @return {Object} typeMap\n */\n typeMapFor: function typeMapFor(typeClass) {\n var typeMaps = get(this, 'typeMaps');\n var guid = _ember['default'].guidFor(typeClass);\n var typeMap = typeMaps[guid];\n\n if (typeMap) {\n return typeMap;\n }\n\n typeMap = {\n idToRecord: new _emberDataPrivateSystemEmptyObject['default'](),\n records: [],\n metadata: new _emberDataPrivateSystemEmptyObject['default'](),\n type: typeClass\n };\n\n typeMaps[guid] = typeMap;\n\n return typeMap;\n },\n\n // ................\n // . LOADING DATA .\n // ................\n\n /**\n This internal method is used by `push`.\n @method _load\n @private\n @param {(String|DS.Model)} type\n @param {Object} data\n */\n _load: function _load(data) {\n var internalModel = this._internalModelForId(data.type, data.id);\n\n internalModel.setupData(data);\n\n this.recordArrayManager.recordDidChange(internalModel);\n\n return internalModel;\n },\n\n /*\n In case someone defined a relationship to a mixin, for example:\n ```\n var Comment = DS.Model.extend({\n owner: belongsTo('commentable'. { polymorphic: true})\n });\n var 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 */\n\n _modelForMixin: function _modelForMixin(modelName) {\n var normalizedModelName = (0, _emberDataPrivateSystemNormalizeModelName['default'])(modelName);\n // container.registry = 2.1\n // container._registry = 1.11 - 2.0\n // container = < 1.11\n var owner = (0, _emberDataPrivateUtils.getOwner)(this);\n\n var mixin = owner._lookupFactory('mixin:' + normalizedModelName);\n if (mixin) {\n //Cache the class as a model\n owner.register('model:' + normalizedModelName, _emberDataModel['default'].extend(mixin));\n }\n var factory = this.modelFactoryFor(normalizedModelName);\n if (factory) {\n factory.__isMixin = true;\n factory.__mixin = mixin;\n }\n\n return factory;\n },\n\n /**\n Returns a model class for a particular key. Used by\n methods that take a type key (like `find`, `createRecord`,\n etc.)\n @method modelFor\n @param {String} modelName\n @return {DS.Model}\n */\n modelFor: function modelFor(modelName) {\n (0, _emberDataPrivateDebug.assert)(\"You need to pass a model name to the store's modelFor method\", isPresent(modelName));\n (0, _emberDataPrivateDebug.assert)('Passing classes to store methods has been removed. Please pass a dasherized string instead of ' + _ember['default'].inspect(modelName), typeof modelName === 'string');\n\n var factory = this.modelFactoryFor(modelName);\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 _ember['default'].Error(\"No model was found for '\" + modelName + \"'\");\n }\n factory.modelName = factory.modelName || (0, _emberDataPrivateSystemNormalizeModelName['default'])(modelName);\n\n return factory;\n },\n\n modelFactoryFor: function modelFactoryFor(modelName) {\n (0, _emberDataPrivateDebug.assert)(\"You need to pass a model name to the store's modelFactoryFor method\", isPresent(modelName));\n (0, _emberDataPrivateDebug.assert)('Passing classes to store methods has been removed. Please pass a dasherized string instead of ' + _ember['default'].inspect(modelName), typeof modelName === 'string');\n var normalizedKey = (0, _emberDataPrivateSystemNormalizeModelName['default'])(modelName);\n\n var owner = (0, _emberDataPrivateUtils.getOwner)(this);\n\n return owner._lookupFactory('model:' + normalizedKey);\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 push(data) {\n var included = data.included;\n var i, length;\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(data.data)) {\n length = data.data.length;\n var internalModels = new Array(length);\n for (i = 0; i < length; i++) {\n internalModels[i] = this._pushInternalModel(data.data[i]).getRecord();\n }\n return internalModels;\n }\n\n if (data.data === null) {\n return null;\n }\n\n (0, _emberDataPrivateDebug.assert)('Expected an object in the \\'data\\' property in a call to \\'push\\' for ' + data.type + ', but was ' + _ember['default'].typeOf(data.data), _ember['default'].typeOf(data.data) === 'object');\n\n var internalModel = this._pushInternalModel(data.data);\n\n return internalModel.getRecord();\n },\n\n _hasModelFor: function _hasModelFor(type) {\n return !!(0, _emberDataPrivateUtils.getOwner)(this)._lookupFactory('model:' + type);\n },\n\n _pushInternalModel: function _pushInternalModel(data) {\n var _this2 = this;\n\n var modelName = data.type;\n (0, _emberDataPrivateDebug.assert)('You must include an \\'id\\' for ' + modelName + ' in an object passed to \\'push\\'', data.id != null && data.id !== '');\n (0, _emberDataPrivateDebug.assert)('You tried to push data with a type \\'' + modelName + '\\' but no model could be found with that name.', this._hasModelFor(modelName));\n\n (0, _emberDataPrivateDebug.runInDebug)(function () {\n // If Ember.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 (_ember['default'].ENV.DS_WARN_ON_UNKNOWN_KEYS) {\n (function () {\n var type = _this2.modelFor(modelName);\n\n // Check unknown attributes\n var unknownAttributes = Object.keys(data.attributes || {}).filter(function (key) {\n return !get(type, 'fields').has(key);\n });\n var unknownAttributesMessage = 'The payload for \\'' + type.modelName + '\\' contains these unknown attributes: ' + unknownAttributes + '. Make sure they\\'ve been defined in your model.';\n (0, _emberDataPrivateDebug.warn)(unknownAttributesMessage, unknownAttributes.length === 0, { id: 'ds.store.unknown-keys-in-payload' });\n\n // Check unknown relationships\n var unknownRelationships = Object.keys(data.relationships || {}).filter(function (key) {\n return !get(type, 'fields').has(key);\n });\n var unknownRelationshipsMessage = 'The payload for \\'' + type.modelName + '\\' contains these unknown relationships: ' + unknownRelationships + '. Make sure they\\'ve been defined in your model.';\n (0, _emberDataPrivateDebug.warn)(unknownRelationshipsMessage, unknownRelationships.length === 0, { id: 'ds.store.unknown-keys-in-payload' });\n })();\n }\n });\n\n // Actually load the record into the store.\n var internalModel = this._load(data);\n\n this._backburner.join(function () {\n _this2._backburner.schedule('normalizeRelationships', _this2, '_setupRelationships', internalModel, data);\n });\n\n return internalModel;\n },\n\n _setupRelationships: function _setupRelationships(record, data) {\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 setupRelationships(this, record, data);\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 var 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('comment', 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 pushPayload(modelName, inputPayload) {\n var _this3 = this;\n\n var serializer;\n var payload;\n if (!inputPayload) {\n payload = modelName;\n serializer = defaultSerializer(this);\n (0, _emberDataPrivateDebug.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 (0, _emberDataPrivateDebug.assert)('Passing classes to store methods has been removed. Please pass a dasherized string instead of ' + _ember['default'].inspect(modelName), typeof modelName === 'string');\n serializer = this.serializerFor(modelName);\n }\n if (false) {\n return this._adapterRun(function () {\n return serializer.pushPayload(_this3, payload);\n });\n } else {\n this._adapterRun(function () {\n return serializer.pushPayload(_this3, 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 var modelName = message.model;\n var 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 normalize(modelName, payload) {\n (0, _emberDataPrivateDebug.assert)(\"You need to pass a model name to the store's normalize method\", isPresent(modelName));\n (0, _emberDataPrivateDebug.assert)('Passing classes to store methods has been removed. Please pass a dasherized string instead of ' + _ember['default'].inspect(modelName), typeof modelName === 'string');\n var serializer = this.serializerFor(modelName);\n var model = this.modelFor(modelName);\n return serializer.normalize(model, payload);\n },\n\n /**\n Build a brand new record for a given type, ID, and\n initial data.\n @method buildRecord\n @private\n @param {DS.Model} type\n @param {String} id\n @param {Object} data\n @return {InternalModel} internal model\n */\n buildInternalModel: function buildInternalModel(type, id, data) {\n var typeMap = this.typeMapFor(type);\n var idToRecord = typeMap.idToRecord;\n\n (0, _emberDataPrivateDebug.assert)('The id ' + id + ' has already been used with another record of type ' + type.toString() + '.', !id || !idToRecord[id]);\n (0, _emberDataPrivateDebug.assert)('\\'' + _ember['default'].inspect(type) + '\\' does not appear to be an ember-data model', typeof type._create === 'function');\n\n // lookupFactory should really return an object that creates\n // instances with the injections applied\n var internalModel = new _emberDataPrivateSystemModelInternalModel['default'](type, id, this, null, data);\n\n // if we're creating an item, this process will be done\n // later, once the object has been persisted.\n if (id) {\n idToRecord[id] = internalModel;\n }\n\n typeMap.records.push(internalModel);\n\n return internalModel;\n },\n\n //Called by the state machine to notify the store that the record is ready to be interacted with\n recordWasLoaded: function recordWasLoaded(record) {\n this.recordArrayManager.recordWasLoaded(record);\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 _dematerializeRecord\n @private\n @param {InternalModel} internalModel\n */\n _dematerializeRecord: function _dematerializeRecord(internalModel) {\n var type = internalModel.type;\n var typeMap = this.typeMapFor(type);\n var id = internalModel.id;\n\n internalModel.updateRecordArrays();\n\n if (id) {\n delete typeMap.idToRecord[id];\n }\n\n var loc = typeMap.records.indexOf(internalModel);\n typeMap.records.splice(loc, 1);\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 adapterFor(modelName) {\n (0, _emberDataPrivateDebug.assert)(\"You need to pass a model name to the store's adapterFor method\", isPresent(modelName));\n (0, _emberDataPrivateDebug.assert)('Passing classes to store.adapterFor has been removed. Please pass a dasherized string instead of ' + _ember['default'].inspect(modelName), typeof modelName === 'string');\n\n return this.lookupAdapter(modelName);\n },\n\n _adapterRun: function _adapterRun(fn) {\n return this._backburner.run(fn);\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 serializerFor(modelName) {\n (0, _emberDataPrivateDebug.assert)(\"You need to pass a model name to the store's serializerFor method\", isPresent(modelName));\n (0, _emberDataPrivateDebug.assert)('Passing classes to store.serializerFor has been removed. Please pass a dasherized string instead of ' + _ember['default'].inspect(modelName), typeof modelName === 'string');\n\n var fallbacks = ['application', this.adapterFor(modelName).get('defaultSerializer'), '-default'];\n\n var serializer = this.lookupSerializer(modelName, fallbacks);\n return serializer;\n },\n\n /**\n Retrieve a particular instance from the\n container cache. If not found, creates it and\n placing it in the cache.\n Enabled a store to manage local instances of\n adapters and serializers.\n @method retrieveManagedInstance\n @private\n @param {String} modelName the object modelName\n @param {String} name the object name\n @param {Array} fallbacks the fallback objects to lookup if the lookup for modelName or 'application' fails\n @return {Ember.Object}\n */\n retrieveManagedInstance: function retrieveManagedInstance(type, modelName, fallbacks) {\n var normalizedModelName = (0, _emberDataPrivateSystemNormalizeModelName['default'])(modelName);\n\n var instance = this._instanceCache.get(type, normalizedModelName, fallbacks);\n set(instance, 'store', this);\n return instance;\n },\n\n lookupAdapter: function lookupAdapter(name) {\n return this.retrieveManagedInstance('adapter', name, this.get('_adapterFallbacks'));\n },\n\n _adapterFallbacks: _ember['default'].computed('adapter', function () {\n var adapter = this.get('adapter');\n return ['application', adapter, '-json-api'];\n }),\n\n lookupSerializer: function lookupSerializer(name, fallbacks) {\n return this.retrieveManagedInstance('serializer', name, fallbacks);\n },\n\n willDestroy: function willDestroy() {\n this._super.apply(this, arguments);\n this.recordArrayManager.destroy();\n\n this.unloadAll();\n }\n\n });\n\n if (true) {\n\n Store.reopen({\n /**\n Get the reference for the specified record.\n Example\n ```javascript\n var userRef = store.getReference('user', 1);\n // check if the user is loaded\n var isLoaded = userRef.value() !== null;\n // get the record of the reference (null if not yet available)\n var user = userRef.value();\n // get the identifier of the reference\n if (userRef.remoteType() === \"id\") {\n var 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} type\n @param {String|Integer} id\n @return {RecordReference}\n */\n getReference: function getReference(type, id) {\n return this._internalModelForId(type, id).recordReference;\n }\n });\n }\n\n function deserializeRecordId(store, key, relationship, id) {\n if (isNone(id)) {\n return;\n }\n\n (0, _emberDataPrivateDebug.assert)('A ' + relationship.parentType + ' record was pushed into the store with the value of ' + key + ' being ' + _ember['default'].inspect(id) + ', but ' + key + ' is a belongsTo relationship so the value must not be an array. You should probably check your data payload or serializer.', !Array.isArray(id));\n\n //TODO:Better asserts\n return store._internalModelForId(id.type, id.id);\n }\n\n function deserializeRecordIds(store, key, relationship, ids) {\n if (isNone(ids)) {\n return;\n }\n\n (0, _emberDataPrivateDebug.assert)('A ' + relationship.parentType + ' record was pushed into the store with the value of ' + key + ' being \\'' + _ember['default'].inspect(ids) + '\\', but ' + key + ' is a hasMany relationship so the value must be an array. You should probably check your data payload or serializer.', Array.isArray(ids));\n var _ids = new Array(ids.length);\n\n for (var i = 0; i < ids.length; i++) {\n _ids[i] = deserializeRecordId(store, key, relationship, ids[i]);\n }\n\n return _ids;\n }\n\n // Delegation to the adapter and promise management\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 typeClass = store.modelFor(modelName);\n var promise = adapter[operation](store, typeClass, snapshot);\n var serializer = (0, _emberDataPrivateSystemStoreSerializers.serializerForAdapter)(store, adapter, modelName);\n var label = 'DS: Extract and notify about ' + operation + ' completion of ' + internalModel;\n\n (0, _emberDataPrivateDebug.assert)('Your adapter\\'s \\'' + operation + '\\' method must return a value, but it returned \\'undefined\\'', promise !== undefined);\n\n promise = Promise.resolve(promise, label);\n promise = (0, _emberDataPrivateSystemStoreCommon._guard)(promise, (0, _emberDataPrivateSystemStoreCommon._bind)(_emberDataPrivateSystemStoreCommon._objectIsAlive, store));\n promise = (0, _emberDataPrivateSystemStoreCommon._guard)(promise, (0, _emberDataPrivateSystemStoreCommon._bind)(_emberDataPrivateSystemStoreCommon._objectIsAlive, internalModel));\n\n return promise.then(function (adapterPayload) {\n store._adapterRun(function () {\n var payload, data;\n if (adapterPayload) {\n payload = (0, _emberDataPrivateSystemStoreSerializerResponse.normalizeResponseHelper)(serializer, store, typeClass, adapterPayload, snapshot.id, operation);\n if (payload.included) {\n store.push({ data: 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 _emberDataAdaptersErrors.InvalidError) {\n var errors = serializer.extractErrors(store, typeClass, error, snapshot.id);\n store.recordWasInvalid(internalModel, errors);\n } else {\n store.recordWasError(internalModel, error);\n }\n\n throw error;\n }, label);\n }\n\n function setupRelationships(store, record, data) {\n if (!data.relationships) {\n return;\n }\n\n record.type.eachRelationship(function (key, descriptor) {\n var kind = descriptor.kind;\n\n if (!data.relationships[key]) {\n return;\n }\n\n var relationship;\n\n if (data.relationships[key].links && data.relationships[key].links.related) {\n var relatedLink = (0, _emberDataPrivateSystemNormalizeLink['default'])(data.relationships[key].links.related);\n if (relatedLink && relatedLink.href) {\n relationship = record._relationships.get(key);\n relationship.updateLink(relatedLink.href);\n }\n }\n\n if (data.relationships[key].meta) {\n relationship = record._relationships.get(key);\n relationship.updateMeta(data.relationships[key].meta);\n }\n\n // If the data contains a relationship that is specified as an ID (or IDs),\n // normalizeRelationship will convert them into DS.Model instances\n // (possibly unloaded) before we push the payload into the store.\n normalizeRelationship(store, key, descriptor, data.relationships[key]);\n\n var value = data.relationships[key].data;\n\n if (value !== undefined) {\n if (kind === 'belongsTo') {\n relationship = record._relationships.get(key);\n relationship.setCanonicalRecord(value);\n } else if (kind === 'hasMany') {\n relationship = record._relationships.get(key);\n relationship.updateRecordsFromAdapter(value);\n }\n }\n });\n }\n\n function normalizeRelationship(store, key, relationship, jsonPayload) {\n var data = jsonPayload.data;\n if (data) {\n var kind = relationship.kind;\n if (kind === 'belongsTo') {\n jsonPayload.data = deserializeRecordId(store, key, relationship, data);\n } else if (kind === 'hasMany') {\n jsonPayload.data = deserializeRecordIds(store, key, relationship, data);\n }\n }\n }\n\n exports.Store = Store;\n exports['default'] = Store;\n});","define('ember-data/-private/transforms/boolean', ['exports', 'ember', 'ember-data/transform', 'ember-data/-private/features'], function (exports, _ember, _emberDataTransform, _emberDataPrivateFeatures) {\n 'use strict';\n\n var isNone = _ember['default'].isNone;\n\n /**\n The `DS.BooleanTransform` class is used to serialize and deserialize\n boolean attributes on Ember Data record objects. This transform is\n used when `boolean` is passed as the type parameter to the\n [DS.attr](../../data#method_attr) function.\n \n Usage\n \n ```app/models/user.js\n import DS from 'ember-data';\n \n export default DS.Model.extend({\n isAdmin: DS.attr('boolean'),\n name: DS.attr('string'),\n email: DS.attr('string')\n });\n ```\n \n @class BooleanTransform\n @extends DS.Transform\n @namespace DS\n */\n exports['default'] = _emberDataTransform['default'].extend({\n deserialize: function deserialize(serialized, options) {\n var type = typeof serialized;\n\n if (true) {\n if (false) {\n if (isNone(serialized) && options.allowNull === true) {\n return null;\n }\n }\n }\n\n if (type === \"boolean\") {\n return serialized;\n } else if (type === \"string\") {\n return serialized.match(/^true$|^t$|^1$/i) !== null;\n } else if (type === \"number\") {\n return serialized === 1;\n } else {\n return false;\n }\n },\n\n serialize: function serialize(deserialized, options) {\n if (true) {\n if (false) {\n if (isNone(deserialized) && options.allowNull === true) {\n return null;\n }\n }\n }\n\n return Boolean(deserialized);\n }\n });\n});","define(\"ember-data/-private/transforms/date\", [\"exports\", \"ember\", \"ember-data/-private/ext/date\", \"ember-data/transform\"], function (exports, _ember, _emberDataPrivateExtDate, _emberDataTransform) {\n \"use strict\";\n\n exports[\"default\"] = _emberDataTransform[\"default\"].extend({\n deserialize: function deserialize(serialized) {\n var type = typeof serialized;\n\n if (type === \"string\") {\n return new Date(_ember[\"default\"].Date.parse(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\n serialize: function serialize(date) {\n if (date instanceof Date) {\n return date.toISOString();\n } else {\n return null;\n }\n }\n });\n});\n\n/**\n The `DS.DateTransform` class is used to serialize and deserialize\n date attributes on Ember Data record objects. This transform is used\n when `date` is passed as the type parameter to the\n [DS.attr](../../data#method_attr) function.\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 DateTransform\n @extends DS.Transform\n @namespace DS\n */","define(\"ember-data/-private/transforms/number\", [\"exports\", \"ember\", \"ember-data/transform\"], function (exports, _ember, _emberDataTransform) {\n \"use strict\";\n\n var empty = _ember[\"default\"].isEmpty;\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\"] = _emberDataTransform[\"default\"].extend({\n deserialize: function deserialize(serialized) {\n var transformed;\n\n if (empty(serialized)) {\n return null;\n } else {\n transformed = Number(serialized);\n\n return isNumber(transformed) ? transformed : null;\n }\n },\n\n serialize: function serialize(deserialized) {\n var transformed;\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/-private/transforms/string\", [\"exports\", \"ember\", \"ember-data/transform\"], function (exports, _ember, _emberDataTransform) {\n \"use strict\";\n\n var none = _ember[\"default\"].isNone;\n\n /**\n The `DS.StringTransform` class is used to serialize and deserialize\n string attributes on Ember Data record objects. This transform is\n used when `string` is passed as the type parameter to the\n [DS.attr](../../data#method_attr) function.\n \n Usage\n \n ```app/models/user.js\n import DS from 'ember-data';\n \n export default DS.Model.extend({\n isAdmin: DS.attr('boolean'),\n name: DS.attr('string'),\n email: DS.attr('string')\n });\n ```\n \n @class StringTransform\n @extends DS.Transform\n @namespace DS\n */\n exports[\"default\"] = _emberDataTransform[\"default\"].extend({\n deserialize: function deserialize(serialized) {\n return none(serialized) ? null : String(serialized);\n },\n serialize: function serialize(deserialized) {\n return none(deserialized) ? null : String(deserialized);\n }\n });\n});","define(\"ember-data/-private/transforms\", [\"exports\", \"ember-data/transform\", \"ember-data/-private/transforms/number\", \"ember-data/-private/transforms/date\", \"ember-data/-private/transforms/string\", \"ember-data/-private/transforms/boolean\"], function (exports, _emberDataTransform, _emberDataPrivateTransformsNumber, _emberDataPrivateTransformsDate, _emberDataPrivateTransformsString, _emberDataPrivateTransformsBoolean) {\n \"use strict\";\n\n exports.Transform = _emberDataTransform[\"default\"];\n exports.NumberTransform = _emberDataPrivateTransformsNumber[\"default\"];\n exports.DateTransform = _emberDataPrivateTransformsDate[\"default\"];\n exports.StringTransform = _emberDataPrivateTransformsString[\"default\"];\n exports.BooleanTransform = _emberDataPrivateTransformsBoolean[\"default\"];\n});","define('ember-data/-private/utils/parse-response-headers', ['exports', 'ember-data/-private/system/empty-object'], function (exports, _emberDataPrivateSystemEmptyObject) {\n 'use strict';\n\n exports['default'] = parseResponseHeaders;\n\n function _toArray(arr) {\n return Array.isArray(arr) ? arr : Array.from(arr);\n }\n\n var CLRF = '\\r\\n';\n function parseResponseHeaders(headersString) {\n var headers = new _emberDataPrivateSystemEmptyObject['default']();\n\n if (!headersString) {\n return headers;\n }\n\n var headerPairs = headersString.split(CLRF);\n\n headerPairs.forEach(function (header) {\n var _header$split = header.split(':');\n\n var _header$split2 = _toArray(_header$split);\n\n var field = _header$split2[0];\n\n var value = _header$split2.slice(1);\n\n field = field.trim();\n value = value.join(':').trim();\n\n if (value) {\n headers[field] = value;\n }\n });\n\n return headers;\n }\n});","define('ember-data/-private/utils', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n var get = _ember['default'].get;\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;\n\n if (_ember['default'].getOwner) {\n owner = _ember['default'].getOwner(context);\n }\n\n if (!owner && 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 = owner.lookupFactory;\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/adapter', ['exports', 'ember'], function (exports, _ember) {\n /**\n @module ember-data\n */\n\n 'use strict';\n\n var get = _ember['default'].get;\n\n /**\n An adapter is an object that receives requests from a store and\n translates them into the appropriate action to take against your\n persistence layer. The persistence layer is usually an HTTP API, but\n may be anything, such as the browser's local storage. Typically the\n adapter is not invoked directly instead its functionality is accessed\n through the `store`.\n \n ### Creating an Adapter\n \n Create a new subclass of `DS.Adapter` in the `app/adapters` folder:\n \n ```app/adapters/application.js\n import DS from 'ember-data';\n \n export default DS.Adapter.extend({\n // ...your code here\n });\n ```\n \n Model-specific adapters can be created by putting your adapter\n class in an `app/adapters/` + `model-name` + `.js` file of the application.\n \n ```app/adapters/post.js\n import DS from 'ember-data';\n \n export default DS.Adapter.extend({\n // ...Post-specific adapter code goes here\n });\n ```\n \n `DS.Adapter` is an abstract base class that you should override in your\n application to customize it for your backend. The minimum set of methods\n that you should implement is:\n \n * `findRecord()`\n * `createRecord()`\n * `updateRecord()`\n * `deleteRecord()`\n * `findAll()`\n * `query()`\n \n To improve the network performance of your application, you can optimize\n your adapter by overriding these lower-level methods:\n \n * `findMany()`\n \n \n For an example implementation, see `DS.RESTAdapter`, the\n included REST adapter.\n \n @class Adapter\n @namespace DS\n @extends Ember.Object\n */\n\n exports['default'] = _ember['default'].Object.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 export default DS.Adapter.extend({\n findRecord: function(store, type, id, snapshot) {\n var url = [type.modelName, id].join('/');\n return new Ember.RSVP.Promise(function(resolve, reject) {\n Ember.$.getJSON(url).then(function(data) {\n Ember.run(null, resolve, data);\n }, function(jqXHR) {\n jqXHR.then = null; // tame jQuery's ill mannered promises\n Ember.run(null, 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 export default DS.Adapter.extend({\n findAll: function(store, type, sinceToken) {\n var url = type;\n var query = { since: sinceToken };\n return new Ember.RSVP.Promise(function(resolve, reject) {\n Ember.$.getJSON(url, query).then(function(data) {\n Ember.run(null, resolve, data);\n }, function(jqXHR) {\n jqXHR.then = null; // tame jQuery's ill mannered promises\n Ember.run(null, 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 export default DS.Adapter.extend({\n query: function(store, type, query) {\n var url = type;\n return new Ember.RSVP.Promise(function(resolve, reject) {\n Ember.$.getJSON(url, query).then(function(data) {\n Ember.run(null, resolve, data);\n }, function(jqXHR) {\n jqXHR.then = null; // tame jQuery's ill mannered promises\n Ember.run(null, 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 Ember from 'ember';\n export default DS.Adapter.extend(DS.BuildURLMixin, {\n queryRecord: function(store, type, query) {\n var urlForQueryRecord = this.buildURL(type.modelName, null, null, 'queryRecord', query);\n return new Ember.RSVP.Promise(function(resolve, reject) {\n Ember.$.getJSON(urlForQueryRecord, query).then(function(data) {\n Ember.run(null, resolve, data);\n }, function(jqXHR) {\n jqXHR.then = null; // tame jQuery's ill mannered promises\n Ember.run(null, 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 generateIdForRecord: function(store, inputProperties) {\n var uuid = App.generateUUIDWithStatisticallyLowOddsOfCollision();\n return uuid;\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: function(store, type, snapshot) {\n var data = this.serialize(snapshot, { includeId: true });\n var url = type;\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 serialize(snapshot, options) {\n return get(snapshot.record, 'store').serializerFor(snapshot.modelName).serialize(snapshot, options);\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 export default DS.Adapter.extend({\n createRecord: function(store, type, snapshot) {\n var data = this.serialize(snapshot, { includeId: true });\n var url = type;\n return new Ember.RSVP.Promise(function(resolve, reject) {\n Ember.$.ajax({\n type: 'POST',\n url: url,\n dataType: 'json',\n data: data\n }).then(function(data) {\n Ember.run(null, resolve, data);\n }, function(jqXHR) {\n jqXHR.then = null; // tame jQuery's ill mannered promises\n Ember.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 export default DS.Adapter.extend({\n updateRecord: function(store, type, snapshot) {\n var data = this.serialize(snapshot, { includeId: true });\n var id = snapshot.id;\n var url = [type, id].join('/');\n return new Ember.RSVP.Promise(function(resolve, reject) {\n Ember.$.ajax({\n type: 'PUT',\n url: url,\n dataType: 'json',\n data: data\n }).then(function(data) {\n Ember.run(null, resolve, data);\n }, function(jqXHR) {\n jqXHR.then = null; // tame jQuery's ill mannered promises\n Ember.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 export default DS.Adapter.extend({\n deleteRecord: function(store, type, snapshot) {\n var data = this.serialize(snapshot, { includeId: true });\n var id = snapshot.id;\n var url = [type, id].join('/');\n return new Ember.RSVP.Promise(function(resolve, reject) {\n Ember.$.ajax({\n type: 'DELETE',\n url: url,\n dataType: 'json',\n data: data\n }).then(function(data) {\n Ember.run(null, resolve, data);\n }, function(jqXHR) {\n jqXHR.then = null; // tame jQuery's ill mannered promises\n Ember.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 Find multiple records at once if coalesceFindRequests is true.\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 groupRecordsForFindMany(store, snapshots) {\n return [snapshots];\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: function(store, ticketSnapshot) {\n var timeDiff = moment().diff(ticketSnapshot.attr('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 @method shouldReloadRecord\n @param {DS.Store} store\n @param {DS.Snapshot} snapshot\n @return {Boolean}\n */\n shouldReloadRecord: function shouldReloadRecord(store, snapshot) {\n return false;\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: function(store, snapshotArray) {\n var snapshots = snapshotArray.snapshots();\n return snapshots.any(function(ticketSnapshot) {\n var timeDiff = moment().diff(ticketSnapshot.attr('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 @method shouldReloadAll\n @param {DS.Store} store\n @param {DS.SnapshotRecordArray} snapshotRecordArray\n @return {Boolean}\n */\n shouldReloadAll: function shouldReloadAll(store, snapshotRecordArray) {\n return !snapshotRecordArray.length;\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: function(store, snapshot) {\n var 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 @method shouldBackgroundReloadRecord\n @param {DS.Store} store\n @param {DS.Snapshot} snapshot\n @return {Boolean}\n */\n shouldBackgroundReloadRecord: function shouldBackgroundReloadRecord(store, snapshot) {\n return true;\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: function(store, snapshotArray) {\n var 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 @method shouldBackgroundReloadAll\n @param {DS.Store} store\n @param {DS.SnapshotRecordArray} snapshotRecordArray\n @return {Boolean}\n */\n shouldBackgroundReloadAll: function shouldBackgroundReloadAll(store, snapshotRecordArray) {\n return true;\n }\n });\n});","define('ember-data/adapters/errors', ['exports', 'ember', 'ember-data/-private/debug', 'ember-data/-private/features'], function (exports, _ember, _emberDataPrivateDebug, _emberDataPrivateFeatures) {\n 'use strict';\n\n exports.AdapterError = AdapterError;\n exports.errorsHashToArray = errorsHashToArray;\n exports.errorsArrayToHash = errorsArrayToHash;\n\n var EmberError = _ember['default'].Error;\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 @class AdapterError\n @namespace DS\n */\n\n function AdapterError(errors) {\n var message = arguments.length <= 1 || arguments[1] === undefined ? 'Adapter operation failed' : arguments[1];\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 var extendedErrorsEnabled = false;\n if (false) {\n extendedErrorsEnabled = true;\n }\n\n function extendFn(ErrorClass) {\n return function () {\n var _ref = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n var defaultMessage = _ref.message;\n\n return extend(ErrorClass, defaultMessage);\n };\n }\n\n function extend(ParentErrorClass, defaultMessage) {\n var ErrorClass = function ErrorClass(errors, message) {\n (0, _emberDataPrivateDebug.assert)('`AdapterError` expects json-api formatted errors array.', Array.isArray(errors || []));\n ParentErrorClass.call(this, errors, message || defaultMessage);\n };\n ErrorClass.prototype = Object.create(ParentErrorClass.prototype);\n\n if (extendedErrorsEnabled) {\n ErrorClass.extend = extendFn(ErrorClass);\n }\n\n return ErrorClass;\n }\n\n AdapterError.prototype = Object.create(EmberError.prototype);\n\n if (extendedErrorsEnabled) {\n AdapterError.extend = extendFn(AdapterError);\n }\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 Ember from 'ember';\n import DS from 'ember-data';\n \n export default DS.RESTAdapter.extend({\n updateRecord: function() {\n // Fictional adapter that always rejects\n return Ember.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 = extend(AdapterError, 'The adapter rejected the commit because it was invalid');\n\n exports.InvalidError = InvalidError;\n\n /**\n @class TimeoutError\n @namespace DS\n */\n var TimeoutError = extend(AdapterError, 'The adapter operation timed out');\n\n exports.TimeoutError = TimeoutError;\n\n /**\n @class AbortError\n @namespace DS\n */\n var AbortError = extend(AdapterError, 'The adapter operation was aborted');\n\n exports.AbortError = AbortError;\n\n /**\n @class UnauthorizedError\n @namespace DS\n */\n var UnauthorizedError = extendedErrorsEnabled ? extend(AdapterError, 'The adapter operation is unauthorized') : null;\n\n exports.UnauthorizedError = UnauthorizedError;\n\n /**\n @class ForbiddenError\n @namespace DS\n */\n var ForbiddenError = extendedErrorsEnabled ? extend(AdapterError, 'The adapter operation is forbidden') : null;\n\n exports.ForbiddenError = ForbiddenError;\n\n /**\n @class NotFoundError\n @namespace DS\n */\n var NotFoundError = extendedErrorsEnabled ? extend(AdapterError, 'The adapter could not find the resource') : null;\n\n exports.NotFoundError = NotFoundError;\n\n /**\n @class ConflictError\n @namespace DS\n */\n var ConflictError = extendedErrorsEnabled ? extend(AdapterError, 'The adapter operation failed due to a conflict') : null;\n\n exports.ConflictError = ConflictError;\n\n /**\n @class ServerError\n @namespace DS\n */\n var ServerError = extendedErrorsEnabled ? extend(AdapterError, 'The adapter operation failed due to a server error') : null;\n\n exports.ServerError = ServerError;\n\n /**\n @method errorsHashToArray\n @private\n */\n\n function errorsHashToArray(errors) {\n var out = [];\n\n if (_ember['default'].isPresent(errors)) {\n Object.keys(errors).forEach(function (key) {\n var messages = _ember['default'].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 @method errorsArrayToHash\n @private\n */\n\n function errorsArrayToHash(errors) {\n var out = {};\n\n if (_ember['default'].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/adapters/json-api', ['exports', 'ember', 'ember-data/adapters/rest', 'ember-data/-private/features'], function (exports, _ember, _emberDataAdaptersRest, _emberDataPrivateFeatures) {\n /**\n @module ember-data\n */\n\n 'use strict';\n\n /**\n @class JSONAPIAdapter\n @constructor\n @namespace DS\n @extends DS.RESTAdapter\n */\n var JSONAPIAdapter = _emberDataAdaptersRest['default'].extend({\n defaultSerializer: '-json-api',\n\n /**\n @method ajaxOptions\n @private\n @param {String} url\n @param {String} type The request type GET, POST, PUT, DELETE etc.\n @param {Object} options\n @return {Object}\n */\n ajaxOptions: function ajaxOptions(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 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 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?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 /**\n @method findMany\n @param {DS.Store} store\n @param {DS.Model} type\n @param {Array} ids\n @param {Array} snapshots\n @return {Promise} promise\n */\n findMany: function findMany(store, type, ids, snapshots) {\n if (false) {\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\n /**\n @method pathForType\n @param {String} modelName\n @return {String} path\n **/\n pathForType: function pathForType(modelName) {\n var dasherized = _ember['default'].String.dasherize(modelName);\n return _ember['default'].String.pluralize(dasherized);\n },\n\n // TODO: Remove this once we have a better way to override HTTP verbs.\n /**\n @method updateRecord\n @param {DS.Store} store\n @param {DS.Model} type\n @param {DS.Snapshot} snapshot\n @return {Promise} promise\n */\n updateRecord: function updateRecord(store, type, snapshot) {\n if (false) {\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 id = snapshot.id;\n var url = this.buildURL(type.modelName, id, snapshot, 'updateRecord');\n\n return this.ajax(url, 'PATCH', { data: data });\n }\n }\n });\n\n if (false) {\n\n JSONAPIAdapter.reopen({\n\n methodForRequest: function methodForRequest(params) {\n if (params.requestType === 'updateRecord') {\n return 'PATCH';\n }\n\n return this._super.apply(this, arguments);\n },\n\n dataForRequest: function dataForRequest(params) {\n var requestType = params.requestType;\n var ids = params.ids;\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 var type = params.type;\n var 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\n headersForRequest: function headersForRequest() {\n var headers = this._super.apply(this, arguments) || {};\n\n headers['Accept'] = 'application/vnd.api+json';\n\n return headers;\n },\n\n _requestToJQueryAjaxHash: function _requestToJQueryAjaxHash() {\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\n exports['default'] = JSONAPIAdapter;\n});","define('ember-data/adapters/rest', ['exports', 'ember', 'ember-data/adapter', 'ember-data/adapters/errors', 'ember-data/-private/adapters/build-url-mixin', 'ember-data/-private/features', 'ember-data/-private/debug', 'ember-data/-private/utils/parse-response-headers'], function (exports, _ember, _emberDataAdapter, _emberDataAdaptersErrors, _emberDataPrivateAdaptersBuildUrlMixin, _emberDataPrivateFeatures, _emberDataPrivateDebug, _emberDataPrivateUtilsParseResponseHeaders) {\n /**\n @module ember-data\n */\n\n 'use strict';\n\n var MapWithDefault = _ember['default'].MapWithDefault;\n var get = _ember['default'].get;\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 \"post\": {\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 \"person\": {\n \"id\": 5,\n \"firstName\": \"Barack\",\n \"lastName\": \"Obama\",\n \"occupation\": \"President\"\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 \n export default DS.RESTAdapter.extend({\n headers: {\n \"API_KEY\": \"secret key\",\n \"ANOTHER_HEADER\": \"Some header value\"\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 \n export default DS.RESTAdapter.extend({\n headers: Ember.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 \n export default DS.RESTAdapter.extend({\n headers: Ember.computed(function() {\n return {\n \"API_KEY\": Ember.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 = _emberDataAdapter['default'].extend(_emberDataPrivateAdaptersBuildUrlMixin['default'], {\n defaultSerializer: '-rest',\n\n /**\n By default, the RESTAdapter will send the query params sorted alphabetically to the\n server.\n For example:\n ```js\n store.query('posts', { sort: 'price', category: 'pets' });\n ```\n will generate a requests like this `/posts?category=pets&sort=price`, even if the\n parameters were specified in a different order.\n That way the generated URL will be deterministic and that simplifies caching mechanisms\n in the backend.\n Setting `sortQueryParams` to a falsey value will respect the original order.\n In case you want to sort the query parameters with a different criteria, set\n `sortQueryParams` to your custom sort function.\n ```app/adapters/application.js\n import DS from 'ember-data';\n export default DS.RESTAdapter.extend({\n sortQueryParams: function(params) {\n var sortedKeys = Object.keys(params).sort().reverse();\n var len = sortedKeys.length, newParams = {};\n for (var i = 0; i < len; i++) {\n newParams[sortedKeys[i]] = params[sortedKeys[i]];\n }\n return newParams;\n }\n });\n ```\n @method sortQueryParams\n @param {Object} obj\n @return {Object}\n */\n sortQueryParams: function sortQueryParams(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 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 /**\n Endpoint paths can be prefixed with a `namespace` by setting the namespace\n property on the adapter:\n ```app/adapters/application.js\n import DS from 'ember-data';\n export default DS.RESTAdapter.extend({\n namespace: 'api/1'\n });\n ```\n Requests for the `Post` model would now target `/api/1/post/`.\n @property namespace\n @type {String}\n */\n\n /**\n An adapter can target other hosts by setting the `host` property.\n ```app/adapters/application.js\n import DS from 'ember-data';\n export default DS.RESTAdapter.extend({\n host: 'https://api.example.com'\n });\n ```\n Requests for the `Post` model would now target `https://api.example.com/post/`.\n @property host\n @type {String}\n */\n\n /**\n Some APIs require HTTP headers, e.g. to provide an API\n key. Arbitrary headers can be set as key/value pairs on the\n `RESTAdapter`'s `headers` object and Ember Data will send them\n along with each ajax request. For dynamic headers see [headers\n customization](/api/data/classes/DS.RESTAdapter.html#toc_headers-customization).\n ```app/adapters/application.js\n import DS from 'ember-data';\n export default DS.RESTAdapter.extend({\n headers: {\n \"API_KEY\": \"secret key\",\n \"ANOTHER_HEADER\": \"Some header value\"\n }\n });\n ```\n @property headers\n @type {Object}\n */\n\n /**\n Called by the store in order to fetch the JSON for a given\n type and ID.\n The `findRecord` method makes an Ajax request to a URL computed by\n `buildURL`, and returns a promise for the resulting payload.\n This method performs an HTTP `GET` request with the id provided as part of the query string.\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: function findRecord(store, type, id, snapshot) {\n if (false) {\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\n /**\n Called by the store in order to fetch a JSON array for all\n of the records for a given type.\n The `findAll` method makes an Ajax (HTTP GET) request to a URL computed by `buildURL`, and returns a\n promise for the resulting payload.\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: function findAll(store, type, sinceToken, snapshotRecordArray) {\n var query = this.buildQuery(snapshotRecordArray);\n\n if (false) {\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\n /**\n Called by the store in order to fetch a JSON array for\n the records that match a particular query.\n The `query` method makes an Ajax (HTTP GET) request to a URL\n computed by `buildURL`, and returns a promise for the resulting\n payload.\n The `query` argument is a simple JavaScript object that will be passed directly\n to the server as parameters.\n @method query\n @param {DS.Store} store\n @param {DS.Model} type\n @param {Object} query\n @return {Promise} promise\n */\n query: function query(store, type, _query) {\n if (false) {\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\n /**\n Called by the store in order to fetch a JSON object for\n the record that matches a particular query.\n The `queryRecord` method makes an Ajax (HTTP GET) request to a URL\n computed by `buildURL`, and returns a promise for the resulting\n payload.\n The `query` argument is a simple JavaScript object that will be passed directly\n to the server as parameters.\n @method queryRecord\n @param {DS.Store} store\n @param {DS.Model} type\n @param {Object} query\n @return {Promise} promise\n */\n queryRecord: function queryRecord(store, type, query) {\n if (false) {\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\n /**\n Called by the store in order to fetch several records together if `coalesceFindRequests` is true\n For example, if the original payload looks like:\n ```js\n {\n \"id\": 1,\n \"title\": \"Rails is omakase\",\n \"comments\": [ 1, 2, 3 ]\n }\n ```\n The IDs will be passed as a URL-encoded Array of IDs, in this form:\n ```\n ids[]=1&ids[]=2&ids[]=3\n ```\n Many servers, such as Rails and PHP, will automatically convert this URL-encoded array\n into an Array for you on the server-side. If you want to encode the\n IDs, differently, just override this (one-line) method.\n The `findMany` method makes an Ajax (HTTP GET) request to a URL computed by `buildURL`, and returns a\n promise for the resulting payload.\n @method findMany\n @param {DS.Store} store\n @param {DS.Model} type\n @param {Array} ids\n @param {Array} snapshots\n @return {Promise} promise\n */\n findMany: function findMany(store, type, ids, snapshots) {\n if (false) {\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\n /**\n Called by the store in order to fetch a JSON array for\n the unloaded records in a has-many relationship that were originally\n specified as a URL (inside of `links`).\n For example, if your original payload looks like this:\n ```js\n {\n \"post\": {\n \"id\": 1,\n \"title\": \"Rails is omakase\",\n \"links\": { \"comments\": \"/posts/1/comments\" }\n }\n }\n ```\n This method will be called with the parent record and `/posts/1/comments`.\n The `findHasMany` method will make an Ajax (HTTP GET) request to the originally specified URL.\n The format of your `links` value will influence the final request URL via the `urlPrefix` method:\n * Links beginning with `//`, `http://`, `https://`, will be used as is, with no further manipulation.\n * Links beginning with a single `/` will have the current adapter's `host` value prepended to it.\n * Links with no beginning `/` will have a parentURL prepended to it, via the current adapter's `buildURL`.\n @method findHasMany\n @param {DS.Store} store\n @param {DS.Snapshot} snapshot\n @param {String} url\n @return {Promise} promise\n */\n findHasMany: function findHasMany(store, snapshot, url, relationship) {\n if (false) {\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\n /**\n Called by the store in order to fetch the JSON for the unloaded record in a\n belongs-to relationship that was originally specified as a URL (inside of\n `links`).\n For example, if your original payload looks like this:\n ```js\n {\n \"person\": {\n \"id\": 1,\n \"name\": \"Tom Dale\",\n \"links\": { \"group\": \"/people/1/group\" }\n }\n }\n ```\n This method will be called with the parent record and `/people/1/group`.\n The `findBelongsTo` method will make an Ajax (HTTP GET) request to the originally specified URL.\n The format of your `links` value will influence the final request URL via the `urlPrefix` method:\n * Links beginning with `//`, `http://`, `https://`, will be used as is, with no further manipulation.\n * Links beginning with a single `/` will have the current adapter's `host` value prepended to it.\n * Links with no beginning `/` will have a parentURL prepended to it, via the current adapter's `buildURL`.\n @method findBelongsTo\n @param {DS.Store} store\n @param {DS.Snapshot} snapshot\n @param {String} url\n @return {Promise} promise\n */\n findBelongsTo: function findBelongsTo(store, snapshot, url, relationship) {\n if (false) {\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\n /**\n Called by the store when a newly created record is\n saved via the `save` method on a model record instance.\n The `createRecord` method serializes the record and makes an Ajax (HTTP POST) request\n to a URL computed by `buildURL`.\n See `serialize` for information on how to customize the serialized form\n of a record.\n @method createRecord\n @param {DS.Store} store\n @param {DS.Model} type\n @param {DS.Snapshot} snapshot\n @return {Promise} promise\n */\n createRecord: function createRecord(store, type, snapshot) {\n if (false) {\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\n /**\n Called by the store when an existing record is saved\n via the `save` method on a model record instance.\n The `updateRecord` method serializes the record and makes an Ajax (HTTP PUT) request\n to a URL computed by `buildURL`.\n See `serialize` for information on how to customize the serialized form\n of a record.\n @method updateRecord\n @param {DS.Store} store\n @param {DS.Model} type\n @param {DS.Snapshot} snapshot\n @return {Promise} promise\n */\n updateRecord: function updateRecord(store, type, snapshot) {\n if (false) {\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\n /**\n Called by the store when a record is deleted.\n The `deleteRecord` method makes an Ajax (HTTP DELETE) request to a URL computed by `buildURL`.\n @method deleteRecord\n @param {DS.Store} store\n @param {DS.Model} type\n @param {DS.Snapshot} snapshot\n @return {Promise} promise\n */\n deleteRecord: function deleteRecord(store, type, snapshot) {\n if (false) {\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\n _stripIDFromURL: function _stripIDFromURL(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 var lastSegment = expandedURL[expandedURL.length - 1];\n var id = snapshot.id;\n if (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 // http://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers\n maxURLLength: 2048,\n\n /**\n Organize records into groups, each of which is to be passed to separate\n calls to `findMany`.\n This implementation groups together records that have the same base URL but\n differing ids. For example `/comments/1` and `/comments/2` will be grouped together\n because we know findMany can coalesce them together as `/comments?ids[]=1&ids[]=2`\n It also supports urls where ids are passed as a query param, such as `/comments?id=1`\n but not those where there is more than 1 query param such as `/comments?id=2&name=David`\n Currently only the query param of `id` is supported. If you need to support others, please\n override this or the `_stripIDFromURL` method.\n It does not group records that have differing base urls, such as for example: `/posts/1/comments/2`\n and `/posts/2/comments/3`\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 groupRecordsForFindMany(store, snapshots) {\n var groups = MapWithDefault.create({ defaultValue: function defaultValue() {\n return [];\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 baseUrl = adapter._stripIDFromURL(store, group[0]);\n var idsSize = 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\n /**\n Takes an ajax response, and returns the json payload or an error.\n By default this hook just returns the json payload passed to it.\n You might want to override it in two cases:\n 1. Your API might return useful results in the response headers.\n Response headers are passed in as the second argument.\n 2. Your API might return errors as successful responses with status code\n 200 and an Errors text or object. You can return a `DS.InvalidError` or a\n `DS.AdapterError` (or a sub class) from this hook and it will automatically\n reject the promise and put your record into the invalid or error state.\n Returning a `DS.InvalidError` from this method will cause the\n record to transition into the `invalid` state and make the\n `errors` object available on the record. When returning an\n `DS.InvalidError` the store will attempt to normalize the error data\n returned from the server using the serializer's `extractErrors`\n method.\n @method handleResponse\n @param {Number} status\n @param {Object} headers\n @param {Object} payload\n @param {Object} requestData - the original request information\n @return {Object | DS.AdapterError} response\n */\n handleResponse: function handleResponse(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 _emberDataAdaptersErrors.InvalidError(payload.errors);\n }\n\n var errors = this.normalizeErrorResponse(status, headers, payload);\n var detailedMessage = this.generatedDetailedMessage(status, headers, payload, requestData);\n\n if (false) {\n switch (status) {\n case 401:\n return new _emberDataAdaptersErrors.UnauthorizedError(errors, detailedMessage);\n case 403:\n return new _emberDataAdaptersErrors.ForbiddenError(errors, detailedMessage);\n case 404:\n return new _emberDataAdaptersErrors.NotFoundError(errors, detailedMessage);\n case 409:\n return new _emberDataAdaptersErrors.ConflictError(errors, detailedMessage);\n default:\n if (status >= 500) {\n return new _emberDataAdaptersErrors.ServerError(errors, detailedMessage);\n }\n }\n }\n\n return new _emberDataAdaptersErrors.AdapterError(errors, detailedMessage);\n },\n\n /**\n Default `handleResponse` implementation uses this hook to decide if the\n response is a success.\n @method isSuccess\n @param {Number} status\n @param {Object} headers\n @param {Object} payload\n @return {Boolean}\n */\n isSuccess: function isSuccess(status, headers, payload) {\n return status >= 200 && status < 300 || status === 304;\n },\n\n /**\n Default `handleResponse` implementation uses this hook to decide if the\n response is a an invalid error.\n @method isInvalid\n @param {Number} status\n @param {Object} headers\n @param {Object} payload\n @return {Boolean}\n */\n isInvalid: function isInvalid(status, headers, payload) {\n return status === 422;\n },\n\n /**\n Takes a URL, an HTTP method and a hash of data, and makes an\n HTTP request.\n When the server responds with a payload, Ember Data will call into `extractSingle`\n or `extractArray` (depending on whether the original query was for one record or\n many records).\n By default, `ajax` method has the following behavior:\n * It sets the response `dataType` to `\"json\"`\n * If the HTTP method is not `\"GET\"`, it sets the `Content-Type` to be\n `application/json; charset=utf-8`\n * If the HTTP method is not `\"GET\"`, it stringifies the data passed in. The\n data is the serialized record in the case of a save.\n * Registers success and failure handlers.\n @method ajax\n @private\n @param {String} url\n @param {String} type The request type GET, POST, PUT, DELETE etc.\n @param {Object} options\n @return {Promise} promise\n */\n ajax: function ajax(url, type, options) {\n var adapter = this;\n\n var requestData = {\n url: url,\n method: type\n };\n\n return new _ember['default'].RSVP.Promise(function (resolve, reject) {\n var hash = adapter.ajaxOptions(url, type, options);\n\n hash.success = function (payload, textStatus, jqXHR) {\n\n var response = adapter.handleResponse(jqXHR.status, (0, _emberDataPrivateUtilsParseResponseHeaders['default'])(jqXHR.getAllResponseHeaders()), payload, requestData);\n\n if (response && response.isAdapterError) {\n _ember['default'].run.join(null, reject, response);\n } else {\n _ember['default'].run.join(null, resolve, response);\n }\n };\n\n hash.error = function (jqXHR, textStatus, errorThrown) {\n (0, _emberDataPrivateDebug.runInDebug)(function () {\n var message = 'The server returned an empty string for ' + type + ' ' + url + ', which cannot be parsed into a valid JSON. Return either null or {}.';\n var validJSONString = !(textStatus === \"parsererror\" && jqXHR.responseText === \"\");\n (0, _emberDataPrivateDebug.warn)(message, validJSONString, {\n id: 'ds.adapter.returned-empty-string-as-JSON'\n });\n });\n\n var error = undefined;\n\n if (errorThrown instanceof Error) {\n error = errorThrown;\n } else if (textStatus === 'timeout') {\n error = new _emberDataAdaptersErrors.TimeoutError();\n } else if (textStatus === 'abort') {\n error = new _emberDataAdaptersErrors.AbortError();\n } else {\n error = adapter.handleResponse(jqXHR.status, (0, _emberDataPrivateUtilsParseResponseHeaders['default'])(jqXHR.getAllResponseHeaders()), adapter.parseErrorResponse(jqXHR.responseText) || errorThrown, requestData);\n }\n\n _ember['default'].run.join(null, reject, error);\n };\n\n adapter._ajaxRequest(hash);\n }, 'DS: RESTAdapter#ajax ' + type + ' to ' + url);\n },\n\n /**\n @method _ajaxRequest\n @private\n @param {Object} options jQuery ajax options to be used for the ajax request\n */\n _ajaxRequest: function _ajaxRequest(options) {\n _ember['default'].$.ajax(options);\n },\n\n /**\n @method ajaxOptions\n @private\n @param {String} url\n @param {String} type The request type GET, POST, PUT, DELETE etc.\n @param {Object} options\n @return {Object}\n */\n ajaxOptions: function ajaxOptions(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\n /**\n @method parseErrorResponse\n @private\n @param {String} responseText\n @return {Object}\n */\n parseErrorResponse: function parseErrorResponse(responseText) {\n var json = responseText;\n\n try {\n json = _ember['default'].$.parseJSON(responseText);\n } catch (e) {}\n\n return json;\n },\n\n /**\n @method normalizeErrorResponse\n @private\n @param {Number} status\n @param {Object} headers\n @param {Object} payload\n @return {Array} errors payload\n */\n normalizeErrorResponse: function normalizeErrorResponse(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 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 generatedDetailedMessage(status, headers, payload, requestData) {\n var shortenedPayload;\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 buildQuery(snapshot) {\n var query = {};\n\n if (true) {\n if (snapshot) {\n var include = snapshot.include;\n\n if (include) {\n query.include = include;\n }\n }\n }\n\n return query;\n }\n });\n\n if (false) {\n\n RESTAdapter.reopen({\n\n /**\n * Get the data (body or query params) for a request.\n *\n * @public\n * @method dataForRequest\n * @param {Object} params\n * @return {Object} data\n */\n dataForRequest: function dataForRequest(params) {\n var store = params.store;\n var type = params.type;\n var snapshot = params.snapshot;\n var requestType = params.requestType;\n var query = params.query;\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\n /**\n * Get the HTTP method for a request.\n *\n * @public\n * @method methodForRequest\n * @param {Object} params\n * @return {String} HTTP method\n */\n methodForRequest: function methodForRequest(params) {\n var requestType = params.requestType;\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\n /**\n * Get the URL for a request.\n *\n * @public\n * @method urlForRequest\n * @param {Object} params\n * @return {String} URL\n */\n urlForRequest: function urlForRequest(params) {\n var type = params.type;\n var id = params.id;\n var ids = params.ids;\n var snapshot = params.snapshot;\n var snapshots = params.snapshots;\n var requestType = params.requestType;\n var query = params.query;\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 var url = this.buildURL(type.modelName, id, snapshot, requestType);\n return this.urlPrefix(params.url, url);\n }\n\n return this.buildURL(type.modelName, id, snapshot, requestType, query);\n },\n\n /**\n * Get the headers for a request.\n *\n * By default the value of the `headers` property of the adapter is\n * returned.\n *\n * @public\n * @method headersForRequest\n * @param {Object} params\n * @return {Object} headers\n */\n headersForRequest: function headersForRequest(params) {\n return this.get('headers');\n },\n\n /**\n * Get an object which contains all properties for a request which should\n * be made.\n *\n * @private\n * @method _requestFor\n * @param {Object} params\n * @return {Object} request object\n */\n _requestFor: function _requestFor(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\n /**\n * Convert a request object into a hash which can be passed to `jQuery.ajax`.\n *\n * @private\n * @method _requestToJQueryAjaxHash\n * @param {Object} request\n * @return {Object} jQuery ajax hash\n */\n _requestToJQueryAjaxHash: function _requestToJQueryAjaxHash(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.type !== '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\n /**\n * Make a request using `jQuery.ajax`.\n *\n * @private\n * @method _makeRequest\n * @param {Object} request\n * @return {Promise} promise\n */\n _makeRequest: function _makeRequest(request) {\n var adapter = this;\n var hash = this._requestToJQueryAjaxHash(request);\n\n var method = request.method;\n var url = request.url;\n\n var requestData = { method: method, url: url };\n\n return new _ember['default'].RSVP.Promise(function (resolve, reject) {\n\n hash.success = function (payload, textStatus, jqXHR) {\n var response = adapter.handleResponse(jqXHR.status, (0, _emberDataPrivateUtilsParseResponseHeaders['default'])(jqXHR.getAllResponseHeaders()), payload, requestData);\n\n if (response instanceof _emberDataAdaptersErrors.AdapterError) {\n _ember['default'].run.join(null, reject, response);\n } else {\n _ember['default'].run.join(null, resolve, response);\n }\n };\n\n hash.error = function (jqXHR, textStatus, errorThrown) {\n (0, _emberDataPrivateDebug.runInDebug)(function () {\n var message = 'The server returned an empty string for ' + method + ' ' + url + ', which cannot be parsed into a valid JSON. Return either null or {}.';\n var validJSONString = !(textStatus === \"parsererror\" && jqXHR.responseText === \"\");\n (0, _emberDataPrivateDebug.warn)(message, validJSONString, {\n id: 'ds.adapter.returned-empty-string-as-JSON'\n });\n });\n\n var error = undefined;\n\n if (errorThrown instanceof Error) {\n error = errorThrown;\n } else if (textStatus === 'timeout') {\n error = new _emberDataAdaptersErrors.TimeoutError();\n } else if (textStatus === 'abort') {\n error = new _emberDataAdaptersErrors.AbortError();\n } else {\n error = adapter.handleResponse(jqXHR.status, (0, _emberDataPrivateUtilsParseResponseHeaders['default'])(jqXHR.getAllResponseHeaders()), adapter.parseErrorResponse(jqXHR.responseText) || errorThrown, requestData);\n }\n\n _ember['default'].run.join(null, reject, error);\n };\n\n adapter._ajaxRequest(hash);\n }, 'DS: RESTAdapter#makeRequest: ' + method + ' ' + url);\n }\n });\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', 'ember', 'ember-data/-private/debug'], function (exports, _ember, _emberDataPrivateDebug) {\n 'use strict';\n\n exports['default'] = attr;\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 (0, _emberDataPrivateDebug.deprecate)('Non primitive defaultValues are deprecated 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 id: 'ds.defaultValue.complex-object',\n until: '3.0.0'\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: attr('string'),\n email: attr('string'),\n settings: attr({defaultValue: function() {\n return {};\n }})\n });\n ```\n \n @namespace\n @method attr\n @for DS\n @param {String} type the attribute type\n @param {Object} options a hash of options\n @return {Attribute}\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 _ember['default'].computed({\n get: function get(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 set(key, value) {\n var internalModel = this._internalModel;\n var oldValue = getValue(internalModel, key);\n var originalValue;\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\n // TODO add to documentation of `attr` function above, once this feature is added\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 // * export default DS.Model.extend({\n // * text: DS.attr('text', {\n // * uppercase: true\n // * })\n // * });\n // * ```\n // *\n // * ```app/transforms/text.js\n // * export default DS.Transform.extend({\n // * serialize: function(value, options) {\n // * if (options.uppercase) {\n // * return value.toUpperCase();\n // * }\n // *\n // * return value;\n // * },\n // *\n // * deserialize: function(value) {\n // * return value;\n // * }\n // * })\n // * ```\n // *\n // */\n});","define(\"ember-data/index\", [\"exports\", \"ember\", \"ember-data/-private/debug\", \"ember-data/-private/features\", \"ember-data/-private/core\", \"ember-data/-private/system/normalize-model-name\", \"ember-data/-private/system/model/internal-model\", \"ember-data/-private/system/promise-proxies\", \"ember-data/-private/system/store\", \"ember-data/-private/system/model\", \"ember-data/model\", \"ember-data/-private/system/snapshot\", \"ember-data/adapter\", \"ember-data/serializer\", \"ember-data/-private/system/debug\", \"ember-data/adapters/errors\", \"ember-data/-private/system/record-arrays\", \"ember-data/-private/system/many-array\", \"ember-data/-private/system/record-array-manager\", \"ember-data/-private/adapters\", \"ember-data/-private/adapters/build-url-mixin\", \"ember-data/-private/serializers\", \"ember-inflector\", \"ember-data/serializers/embedded-records-mixin\", \"ember-data/-private/transforms\", \"ember-data/relationships\", \"ember-data/setup-container\", \"ember-data/-private/instance-initializers/initialize-store-service\", \"ember-data/-private/system/container-proxy\", \"ember-data/-private/system/relationships/state/relationship\"], function (exports, _ember, _emberDataPrivateDebug, _emberDataPrivateFeatures, _emberDataPrivateCore, _emberDataPrivateSystemNormalizeModelName, _emberDataPrivateSystemModelInternalModel, _emberDataPrivateSystemPromiseProxies, _emberDataPrivateSystemStore, _emberDataPrivateSystemModel, _emberDataModel, _emberDataPrivateSystemSnapshot, _emberDataAdapter, _emberDataSerializer, _emberDataPrivateSystemDebug, _emberDataAdaptersErrors, _emberDataPrivateSystemRecordArrays, _emberDataPrivateSystemManyArray, _emberDataPrivateSystemRecordArrayManager, _emberDataPrivateAdapters, _emberDataPrivateAdaptersBuildUrlMixin, _emberDataPrivateSerializers, _emberInflector, _emberDataSerializersEmbeddedRecordsMixin, _emberDataPrivateTransforms, _emberDataRelationships, _emberDataSetupContainer, _emberDataPrivateInstanceInitializersInitializeStoreService, _emberDataPrivateSystemContainerProxy, _emberDataPrivateSystemRelationshipsStateRelationship) {\n \"use strict\";\n\n if (_ember[\"default\"].VERSION.match(/^1\\.([0-9]|1[0-2])\\./)) {\n throw new _ember[\"default\"].Error(\"Ember Data requires at least Ember 1.13.0, but you have \" + _ember[\"default\"].VERSION + \". Please upgrade your version of Ember, then upgrade Ember Data.\");\n }_emberDataPrivateCore[\"default\"].Store = _emberDataPrivateSystemStore.Store;\n _emberDataPrivateCore[\"default\"].PromiseArray = _emberDataPrivateSystemPromiseProxies.PromiseArray;\n _emberDataPrivateCore[\"default\"].PromiseObject = _emberDataPrivateSystemPromiseProxies.PromiseObject;\n\n _emberDataPrivateCore[\"default\"].PromiseManyArray = _emberDataPrivateSystemPromiseProxies.PromiseManyArray;\n\n _emberDataPrivateCore[\"default\"].Model = _emberDataModel[\"default\"];\n _emberDataPrivateCore[\"default\"].RootState = _emberDataPrivateSystemModel.RootState;\n _emberDataPrivateCore[\"default\"].attr = _emberDataPrivateSystemModel.attr;\n _emberDataPrivateCore[\"default\"].Errors = _emberDataPrivateSystemModel.Errors;\n\n _emberDataPrivateCore[\"default\"].InternalModel = _emberDataPrivateSystemModelInternalModel[\"default\"];\n _emberDataPrivateCore[\"default\"].Snapshot = _emberDataPrivateSystemSnapshot[\"default\"];\n\n _emberDataPrivateCore[\"default\"].Adapter = _emberDataAdapter[\"default\"];\n\n _emberDataPrivateCore[\"default\"].AdapterError = _emberDataAdaptersErrors.AdapterError;\n _emberDataPrivateCore[\"default\"].InvalidError = _emberDataAdaptersErrors.InvalidError;\n _emberDataPrivateCore[\"default\"].TimeoutError = _emberDataAdaptersErrors.TimeoutError;\n _emberDataPrivateCore[\"default\"].AbortError = _emberDataAdaptersErrors.AbortError;\n\n if (false) {\n _emberDataPrivateCore[\"default\"].UnauthorizedError = _emberDataAdaptersErrors.UnauthorizedError;\n _emberDataPrivateCore[\"default\"].ForbiddenError = _emberDataAdaptersErrors.ForbiddenError;\n _emberDataPrivateCore[\"default\"].NotFoundError = _emberDataAdaptersErrors.NotFoundError;\n _emberDataPrivateCore[\"default\"].ConflictError = _emberDataAdaptersErrors.ConflictError;\n _emberDataPrivateCore[\"default\"].ServerError = _emberDataAdaptersErrors.ServerError;\n }\n\n _emberDataPrivateCore[\"default\"].errorsHashToArray = _emberDataAdaptersErrors.errorsHashToArray;\n _emberDataPrivateCore[\"default\"].errorsArrayToHash = _emberDataAdaptersErrors.errorsArrayToHash;\n\n _emberDataPrivateCore[\"default\"].Serializer = _emberDataSerializer[\"default\"];\n\n _emberDataPrivateCore[\"default\"].DebugAdapter = _emberDataPrivateSystemDebug[\"default\"];\n\n _emberDataPrivateCore[\"default\"].RecordArray = _emberDataPrivateSystemRecordArrays.RecordArray;\n _emberDataPrivateCore[\"default\"].FilteredRecordArray = _emberDataPrivateSystemRecordArrays.FilteredRecordArray;\n _emberDataPrivateCore[\"default\"].AdapterPopulatedRecordArray = _emberDataPrivateSystemRecordArrays.AdapterPopulatedRecordArray;\n _emberDataPrivateCore[\"default\"].ManyArray = _emberDataPrivateSystemManyArray[\"default\"];\n\n _emberDataPrivateCore[\"default\"].RecordArrayManager = _emberDataPrivateSystemRecordArrayManager[\"default\"];\n\n _emberDataPrivateCore[\"default\"].RESTAdapter = _emberDataPrivateAdapters.RESTAdapter;\n _emberDataPrivateCore[\"default\"].BuildURLMixin = _emberDataPrivateAdaptersBuildUrlMixin[\"default\"];\n\n _emberDataPrivateCore[\"default\"].RESTSerializer = _emberDataPrivateSerializers.RESTSerializer;\n _emberDataPrivateCore[\"default\"].JSONSerializer = _emberDataPrivateSerializers.JSONSerializer;\n\n _emberDataPrivateCore[\"default\"].JSONAPIAdapter = _emberDataPrivateAdapters.JSONAPIAdapter;\n _emberDataPrivateCore[\"default\"].JSONAPISerializer = _emberDataPrivateSerializers.JSONAPISerializer;\n\n _emberDataPrivateCore[\"default\"].Transform = _emberDataPrivateTransforms.Transform;\n _emberDataPrivateCore[\"default\"].DateTransform = _emberDataPrivateTransforms.DateTransform;\n _emberDataPrivateCore[\"default\"].StringTransform = _emberDataPrivateTransforms.StringTransform;\n _emberDataPrivateCore[\"default\"].NumberTransform = _emberDataPrivateTransforms.NumberTransform;\n _emberDataPrivateCore[\"default\"].BooleanTransform = _emberDataPrivateTransforms.BooleanTransform;\n\n _emberDataPrivateCore[\"default\"].EmbeddedRecordsMixin = _emberDataSerializersEmbeddedRecordsMixin[\"default\"];\n\n _emberDataPrivateCore[\"default\"].belongsTo = _emberDataRelationships.belongsTo;\n _emberDataPrivateCore[\"default\"].hasMany = _emberDataRelationships.hasMany;\n\n _emberDataPrivateCore[\"default\"].Relationship = _emberDataPrivateSystemRelationshipsStateRelationship[\"default\"];\n\n _emberDataPrivateCore[\"default\"].ContainerProxy = _emberDataPrivateSystemContainerProxy[\"default\"];\n\n _emberDataPrivateCore[\"default\"]._setupContainer = _emberDataSetupContainer[\"default\"];\n _emberDataPrivateCore[\"default\"]._initializeStoreService = _emberDataPrivateInstanceInitializersInitializeStoreService[\"default\"];\n\n Object.defineProperty(_emberDataPrivateCore[\"default\"], 'normalizeModelName', {\n enumerable: true,\n writable: false,\n configurable: false,\n value: _emberDataPrivateSystemNormalizeModelName[\"default\"]\n });\n\n _ember[\"default\"].lookup.DS = _emberDataPrivateCore[\"default\"];\n\n exports[\"default\"] = _emberDataPrivateCore[\"default\"];\n});\n\n/**\n Ember Data\n @module ember-data\n @main ember-data\n*/","define(\"ember-data/model\", [\"exports\", \"ember-data/-private/system/model\"], function (exports, _emberDataPrivateSystemModel) {\n \"use strict\";\n\n exports[\"default\"] = _emberDataPrivateSystemModel[\"default\"];\n});","define(\"ember-data/relationships\", [\"exports\", \"ember-data/-private/system/relationships/belongs-to\", \"ember-data/-private/system/relationships/has-many\"], function (exports, _emberDataPrivateSystemRelationshipsBelongsTo, _emberDataPrivateSystemRelationshipsHasMany) {\n /**\n @module ember-data\n */\n\n \"use strict\";\n\n exports.belongsTo = _emberDataPrivateSystemRelationshipsBelongsTo[\"default\"];\n exports.hasMany = _emberDataPrivateSystemRelationshipsHasMany[\"default\"];\n});","define('ember-data/serializer', ['exports', 'ember'], function (exports, _ember) {\n /**\n @module ember-data\n */\n\n 'use strict';\n\n /**\n `DS.Serializer` is an abstract base class that you should override in your\n application to customize it for your backend. The minimum set of methods\n that you should implement is:\n \n * `normalizeResponse()`\n * `serialize()`\n \n And you can optionally override the following methods:\n \n * `normalize()`\n \n For an example implementation, see\n [DS.JSONSerializer](DS.JSONSerializer.html), the included JSON serializer.\n \n @class Serializer\n @namespace DS\n @extends Ember.Object\n */\n\n exports['default'] = _ember['default'].Object.extend({\n\n /**\n The `store` property is the application's `store` that contains all records.\n It's injected as a service.\n It can be used to push records from a non flat data structure server\n response.\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 @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 @method serialize\n @param {DS.Model} record\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 @method normalize\n @param {DS.Model} typeClass\n @param {Object} hash\n @return {Object}\n */\n normalize: function normalize(typeClass, hash) {\n return hash;\n }\n\n });\n});","define('ember-data/serializers/embedded-records-mixin', ['exports', 'ember', 'ember-data/-private/debug', 'ember-data/-private/features'], function (exports, _ember, _emberDataPrivateDebug, _emberDataPrivateFeatures) {\n 'use strict';\n\n function _toConsumableArray(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];return arr2;\n } else {\n return Array.from(arr);\n }\n }\n\n var get = _ember['default'].get;\n var set = _ember['default'].set;\n var camelize = _ember['default'].String.camelize;\n\n /**\n ## Using Embedded Records\n \n `DS.EmbeddedRecordsMixin` supports serializing embedded records.\n \n To set up embedded records, include the mixin when extending a serializer,\n then define and configure embedded (model) relationships.\n \n Below is an example of a per-type serializer (`post` type).\n \n ```app/serializers/post.js\n import DS from 'ember-data';\n \n export default DS.RESTSerializer.extend(DS.EmbeddedRecordsMixin, {\n attrs: {\n author: { embedded: 'always' },\n comments: { serialize: 'ids' }\n }\n });\n ```\n Note that this use of `{ embedded: 'always' }` is unrelated to\n the `{ embedded: 'always' }` that is defined as an option on `DS.attr` as part of\n defining a model while working with the `ActiveModelSerializer`. Nevertheless,\n using `{ embedded: 'always' }` as an option to `DS.attr` is not a valid way to setup\n embedded records.\n \n The `attrs` option for a resource `{ embedded: 'always' }` is shorthand for:\n \n ```js\n {\n serialize: 'records',\n deserialize: 'records'\n }\n ```\n \n ### Configuring Attrs\n \n A resource's `attrs` option may be set to use `ids`, `records` or false for the\n `serialize` and `deserialize` settings.\n \n The `attrs` property can be set on the `ApplicationSerializer` or a per-type\n serializer.\n \n In the case where embedded JSON is expected while extracting a payload (reading)\n the setting is `deserialize: 'records'`, there is no need to use `ids` when\n extracting as that is the default behavior without this mixin if you are using\n the vanilla `EmbeddedRecordsMixin`. Likewise, to embed JSON in the payload while\n serializing `serialize: 'records'` is the setting to use. There is an option of\n not embedding JSON in the serialized payload by using `serialize: 'ids'`. If you\n do not want the relationship sent at all, you can use `serialize: false`.\n \n \n ### EmbeddedRecordsMixin defaults\n If you do not overwrite `attrs` for a specific relationship, the `EmbeddedRecordsMixin`\n will behave in the following way:\n \n BelongsTo: `{ serialize: 'id', deserialize: 'id' }`\n HasMany: `{ serialize: false, deserialize: 'ids' }`\n \n ### Model Relationships\n \n Embedded records must have a model defined to be extracted and serialized. Note that\n when defining any relationships on your model such as `belongsTo` and `hasMany`, you\n should not both specify `async: true` and also indicate through the serializer's\n `attrs` attribute that the related model should be embedded for deserialization.\n If a model is declared embedded for deserialization (`embedded: 'always'` or `deserialize: 'records'`),\n then do not use `async: true`.\n \n To successfully extract and serialize embedded records the model relationships\n must be setup correcty. See the\n [defining relationships](/guides/models/defining-models/#toc_defining-relationships)\n section of the **Defining Models** guide page.\n \n Records without an `id` property are not considered embedded records, model\n instances must have an `id` property to be used with Ember Data.\n \n ### Example JSON payloads, Models and Serializers\n \n **When customizing a serializer it is important to grok what the customizations\n are. Please read the docs for the methods this mixin provides, in case you need\n to modify it to fit your specific needs.**\n \n For example review the docs for each method of this mixin:\n * [normalize](/api/data/classes/DS.EmbeddedRecordsMixin.html#method_normalize)\n * [serializeBelongsTo](/api/data/classes/DS.EmbeddedRecordsMixin.html#method_serializeBelongsTo)\n * [serializeHasMany](/api/data/classes/DS.EmbeddedRecordsMixin.html#method_serializeHasMany)\n \n @class EmbeddedRecordsMixin\n @namespace DS\n */\n exports['default'] = _ember['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 normalize(typeClass, hash, prop) {\n var normalizedHash = this._super(typeClass, hash, prop);\n return this._extractEmbeddedRecords(this, this.store, typeClass, normalizedHash);\n },\n\n keyForRelationship: function keyForRelationship(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 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 serializeBelongsTo(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 var key;\n if (includeIds) {\n key = this.keyForRelationship(attr, relationship.kind, 'serialize');\n if (!embeddedSnapshot) {\n json[key] = null;\n } else {\n json[key] = 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\n _serializeEmbeddedBelongsTo: function _serializeEmbeddedBelongsTo(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 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 Note that the `ids-and-types` strategy is still behind the `ds-serialize-ids-and-types` feature flag.\n @method serializeHasMany\n @param {DS.Snapshot} snapshot\n @param {Object} json\n @param {Object} relationship\n */\n serializeHasMany: function serializeHasMany(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.keyForRelationship(attr, relationship.kind, 'serialize');\n json[serializedKey] = snapshot.hasMany(attr, { ids: true });\n } else if (this.hasSerializeRecordsOption(attr)) {\n this._serializeEmbeddedHasMany(snapshot, json, relationship);\n } else {\n if (true) {\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 _serializeHasManyAsIdsAndTypes(snapshot, json, relationship) {\n var serializedKey = this.keyForAttribute(relationship.key, 'serialize');\n var hasMany = snapshot.hasMany(relationship.key);\n\n json[serializedKey] = _ember['default'].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\n _serializeEmbeddedHasMany: function _serializeEmbeddedHasMany(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 (0, _emberDataPrivateDebug.warn)('The embedded relationship \\'' + serializedKey + '\\' is undefined for \\'' + snapshot.modelName + '\\' with id \\'' + snapshot.id + '\\'. Please include it in your original payload.', _ember['default'].typeOf(snapshot.hasMany(relationship.key)) !== 'undefined', { id: 'ds.serializer.embedded-relationship-undefined' });\n\n json[serializedKey] = this._generateSerializedHasMany(snapshot, relationship);\n },\n\n /*\n Returns an array of embedded records serialized to JSON\n */\n _generateSerializedHasMany: function _generateSerializedHasMany(snapshot, relationship) {\n var hasMany = snapshot.hasMany(relationship.key);\n var manyArray = _ember['default'].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 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 removeEmbeddedForeignKey(snapshot, embeddedSnapshot, relationship, json) {\n if (relationship.kind === 'hasMany') {\n return;\n } else 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 }\n },\n\n // checks config for attrs option to embedded (always) - serialize and deserialize\n hasEmbeddedAlwaysOption: function hasEmbeddedAlwaysOption(attr) {\n var option = this.attrsOption(attr);\n return option && option.embedded === 'always';\n },\n\n // checks config for attrs option to serialize ids\n hasSerializeRecordsOption: function hasSerializeRecordsOption(attr) {\n var alwaysEmbed = this.hasEmbeddedAlwaysOption(attr);\n var option = this.attrsOption(attr);\n return alwaysEmbed || option && option.serialize === 'records';\n },\n\n // checks config for attrs option to serialize records\n hasSerializeIdsOption: function hasSerializeIdsOption(attr) {\n var option = this.attrsOption(attr);\n return option && (option.serialize === 'ids' || option.serialize === 'id');\n },\n\n // checks config for attrs option to serialize records as objects containing id and types\n hasSerializeIdsAndTypesOption: function hasSerializeIdsAndTypesOption(attr) {\n var option = this.attrsOption(attr);\n return option && (option.serialize === 'ids-and-types' || option.serialize === 'id-and-type');\n },\n\n // checks config for attrs option to serialize records\n noSerializeOptionSpecified: function noSerializeOptionSpecified(attr) {\n var option = this.attrsOption(attr);\n return !(option && (option.serialize || option.embedded));\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 hasDeserializeRecordsOption(attr) {\n var alwaysEmbed = this.hasEmbeddedAlwaysOption(attr);\n var option = this.attrsOption(attr);\n return alwaysEmbed || option && option.deserialize === 'records';\n },\n\n attrsOption: function attrsOption(attr) {\n var attrs = this.get('attrs');\n return attrs && (attrs[camelize(attr)] || attrs[attr]);\n },\n\n /**\n @method _extractEmbeddedRecords\n @private\n */\n _extractEmbeddedRecords: function _extractEmbeddedRecords(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 @method _extractEmbeddedHasMany\n @private\n */\n _extractEmbeddedHasMany: function _extractEmbeddedHasMany(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 _normalizeEmbeddedRelationship2 = this._normalizeEmbeddedRelationship(store, relationshipMeta, item);\n\n var data = _normalizeEmbeddedRelationship2.data;\n var included = _normalizeEmbeddedRelationship2.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 @method _extractEmbeddedBelongsTo\n @private\n */\n _extractEmbeddedBelongsTo: function _extractEmbeddedBelongsTo(store, key, hash, relationshipMeta) {\n var relationshipHash = get(hash, 'data.relationships.' + key + '.data');\n if (!relationshipHash) {\n return;\n }\n\n var _normalizeEmbeddedRelationship3 = this._normalizeEmbeddedRelationship(store, relationshipMeta, relationshipHash);\n\n var data = _normalizeEmbeddedRelationship3.data;\n var included = _normalizeEmbeddedRelationship3.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 @method _normalizeEmbeddedRelationship\n @private\n */\n _normalizeEmbeddedRelationship: function _normalizeEmbeddedRelationship(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 isEmbeddedRecordsMixin: true\n });\n});","define('ember-data/serializers/json-api', ['exports', 'ember', 'ember-data/-private/debug', 'ember-data/serializers/json', 'ember-data/-private/system/normalize-model-name', 'ember-inflector', 'ember-data/-private/features'], function (exports, _ember, _emberDataPrivateDebug, _emberDataSerializersJson, _emberDataPrivateSystemNormalizeModelName, _emberInflector, _emberDataPrivateFeatures) {\n /**\n @module ember-data\n */\n\n 'use strict';\n\n var dasherize = _ember['default'].String.dasherize;\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 ```js\n \n // models/player.js\n import DS from \"ember-data\";\n \n export default DS.Model.extend({\n name: DS.attr(),\n skill: DS.attr(),\n gamesPlayed: DS.attr(),\n club: DS.belongsTo('club')\n });\n \n // models/club.js\n import DS from \"ember-data\";\n \n export default DS.Model.extend({\n name: DS.attr(),\n location: DS.attr(),\n players: DS.hasMany('player')\n });\n ```\n \n ```js\n \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 @class JSONAPISerializer\n @namespace DS\n @extends DS.JSONSerializer\n */\n var JSONAPISerializer = _emberDataSerializersJson['default'].extend({\n\n /**\n @method _normalizeDocumentHelper\n @param {Object} documentHash\n @return {Object}\n @private\n */\n _normalizeDocumentHelper: function _normalizeDocumentHelper(documentHash) {\n\n if (_ember['default'].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(documentHash.included.length);\n\n for (var i = 0; i < documentHash.included.length; i++) {\n var included = documentHash.included[i];\n ret[i] = this._normalizeResourceHelper(included);\n }\n\n documentHash.included = ret;\n }\n\n return documentHash;\n },\n\n /**\n @method _normalizeRelationshipDataHelper\n @param {Object} relationshipDataHash\n @return {Object}\n @private\n */\n _normalizeRelationshipDataHelper: function _normalizeRelationshipDataHelper(relationshipDataHash) {\n var type = this.modelNameFromPayloadKey(relationshipDataHash.type);\n relationshipDataHash.type = type;\n return relationshipDataHash;\n },\n\n /**\n @method _normalizeResourceHelper\n @param {Object} resourceHash\n @return {Object}\n @private\n */\n _normalizeResourceHelper: function _normalizeResourceHelper(resourceHash) {\n (0, _emberDataPrivateDebug.assert)(this.warnMessageForUndefinedType(), !_ember['default'].isNone(resourceHash.type), {\n id: 'ds.serializer.type-is-undefined'\n });\n\n var modelName = this.modelNameFromPayloadKey(resourceHash.type);\n\n if (!this.store._hasModelFor(modelName)) {\n (0, _emberDataPrivateDebug.warn)(this.warnMessageNoModelForType(modelName, resourceHash.type), false, {\n id: 'ds.serializer.model-for-type-missing'\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\n var data = _serializer$normalize.data;\n\n return data;\n },\n\n /**\n @method pushPayload\n @param {DS.Store} store\n @param {Object} payload\n */\n pushPayload: function pushPayload(store, payload) {\n var normalizedPayload = this._normalizeDocumentHelper(payload);\n if (false) {\n return store.push(normalizedPayload);\n } else {\n store.push(normalizedPayload);\n }\n },\n\n /**\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 @param {Boolean} isSingle\n @return {Object} JSON-API Document\n @private\n */\n _normalizeResponse: function _normalizeResponse(store, primaryModelClass, payload, id, requestType, isSingle) {\n var normalizedPayload = this._normalizeDocumentHelper(payload);\n return normalizedPayload;\n },\n\n normalizeQueryRecordResponse: function normalizeQueryRecordResponse() {\n var normalized = this._super.apply(this, arguments);\n\n (0, _emberDataPrivateDebug.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 return normalized;\n },\n\n /**\n @method extractAttributes\n @param {DS.Model} modelClass\n @param {Object} resourceHash\n @return {Object}\n */\n extractAttributes: function extractAttributes(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.hasOwnProperty(attributeKey)) {\n attributes[key] = resourceHash.attributes[attributeKey];\n }\n });\n }\n\n return attributes;\n },\n\n /**\n @method extractRelationship\n @param {Object} relationshipHash\n @return {Object}\n */\n extractRelationship: function extractRelationship(relationshipHash) {\n\n if (_ember['default'].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\n /**\n @method extractRelationships\n @param {Object} modelClass\n @param {Object} resourceHash\n @return {Object}\n */\n extractRelationships: function extractRelationships(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.hasOwnProperty(relationshipKey)) {\n\n var relationshipHash = resourceHash.relationships[relationshipKey];\n relationships[key] = _this2.extractRelationship(relationshipHash);\n }\n });\n }\n\n return relationships;\n },\n\n /**\n @method _extractType\n @param {DS.Model} modelClass\n @param {Object} resourceHash\n @return {String}\n @private\n */\n _extractType: function _extractType(modelClass, resourceHash) {\n return this.modelNameFromPayloadKey(resourceHash.type);\n },\n\n /**\n @method modelNameFromPayloadKey\n @param {String} key\n @return {String} the model's modelName\n */\n modelNameFromPayloadKey: function modelNameFromPayloadKey(key) {\n return (0, _emberInflector.singularize)((0, _emberDataPrivateSystemNormalizeModelName['default'])(key));\n },\n\n /**\n @method payloadKeyFromModelName\n @param {String} modelName\n @return {String}\n */\n payloadKeyFromModelName: function payloadKeyFromModelName(modelName) {\n return (0, _emberInflector.pluralize)(modelName);\n },\n\n /**\n @method normalize\n @param {DS.Model} modelClass\n @param {Object} resourceHash the resource hash from the adapter\n @return {Object} the normalized resource hash\n */\n normalize: function normalize(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\n /**\n `keyForAttribute` can be used to define rules for how to convert an\n attribute name in your model to a key in your JSON.\n By default `JSONAPISerializer` follows the format used on the examples of\n http://jsonapi.org/format and uses dashes as the word separator in the JSON\n attribute keys.\n This behaviour can be easily customized by extending this method.\n Example\n ```app/serializers/application.js\n import DS from 'ember-data';\n export default DS.JSONAPISerializer.extend({\n keyForAttribute: function(attr, method) {\n return Ember.String.dasherize(attr).toUpperCase();\n }\n });\n ```\n @method keyForAttribute\n @param {String} key\n @param {String} method\n @return {String} normalized key\n */\n keyForAttribute: function keyForAttribute(key, method) {\n return dasherize(key);\n },\n\n /**\n `keyForRelationship` can be used to define a custom key when\n serializing and deserializing relationship properties.\n By default `JSONAPISerializer` follows the format used on the examples of\n http://jsonapi.org/format and uses dashes as word separators in\n relationship properties.\n This behaviour can be easily customized by extending this method.\n Example\n ```app/serializers/post.js\n import DS from 'ember-data';\n export default DS.JSONAPISerializer.extend({\n keyForRelationship: function(key, relationship, method) {\n return Ember.String.underscore(key);\n }\n });\n ```\n @method keyForRelationship\n @param {String} key\n @param {String} typeClass\n @param {String} method\n @return {String} normalized key\n */\n keyForRelationship: function keyForRelationship(key, typeClass, method) {\n return dasherize(key);\n },\n\n /**\n @method serialize\n @param {DS.Snapshot} snapshot\n @param {Object} options\n @return {Object} json\n */\n serialize: function serialize(snapshot, options) {\n var data = this._super.apply(this, arguments);\n data.type = this.payloadKeyFromModelName(snapshot.modelName);\n return { data: data };\n },\n\n /**\n @method serializeAttribute\n @param {DS.Snapshot} snapshot\n @param {Object} json\n @param {String} key\n @param {Object} attribute\n */\n serializeAttribute: function serializeAttribute(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\n /**\n @method serializeBelongsTo\n @param {DS.Snapshot} snapshot\n @param {Object} json\n @param {Object} relationship\n */\n serializeBelongsTo: function serializeBelongsTo(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 data = {\n type: this.payloadKeyFromModelName(belongsTo.modelName),\n id: belongsTo.id\n };\n }\n\n json.relationships[payloadKey] = { data: data };\n }\n }\n },\n\n /**\n @method serializeHasMany\n @param {DS.Snapshot} snapshot\n @param {Object} json\n @param {Object} relationship\n */\n serializeHasMany: function serializeHasMany(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 data[i] = {\n type: this.payloadKeyFromModelName(item.modelName),\n id: item.id\n };\n }\n\n json.relationships[payloadKey] = { data: data };\n }\n }\n }\n });\n\n (0, _emberDataPrivateDebug.runInDebug)(function () {\n JSONAPISerializer.reopen({\n willMergeMixin: function willMergeMixin(props) {\n (0, _emberDataPrivateDebug.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 warnMessageForUndefinedType() {\n return 'Encountered a resource object with an undefined type (resolved resource using ' + this.constructor.toString() + ')';\n },\n warnMessageNoModelForType: function warnMessageNoModelForType(modelName, originalType) {\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() + '.modelNameFromPayloadKey(\"' + originalType + '\"))';\n }\n });\n });\n\n exports['default'] = JSONAPISerializer;\n});","define('ember-data/serializers/json', ['exports', 'ember', 'ember-data/-private/debug', 'ember-data/serializer', 'ember-data/-private/system/coerce-id', 'ember-data/-private/system/normalize-model-name', 'ember-data/-private/utils', 'ember-data/adapters/errors', 'ember-data/-private/features'], function (exports, _ember, _emberDataPrivateDebug, _emberDataSerializer, _emberDataPrivateSystemCoerceId, _emberDataPrivateSystemNormalizeModelName, _emberDataPrivateUtils, _emberDataAdaptersErrors, _emberDataPrivateFeatures) {\n 'use strict';\n\n function _toConsumableArray(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];return arr2;\n } else {\n return Array.from(arr);\n }\n }\n\n var get = _ember['default'].get;\n var isNone = _ember['default'].isNone;\n var assign = _ember['default'].assign || _ember['default'].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 methods 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 exports['default'] = _emberDataSerializer['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 /**\n Given a subclass of `DS.Model` and a JSON object this method will\n iterate through each attribute of the `DS.Model` and invoke the\n `DS.Transform#deserialize` method on the matching property of the\n JSON object. This method is typically called after the\n serializer's `normalize` method.\n @method applyTransforms\n @private\n @param {DS.Model} typeClass\n @param {Object} data The data to transform\n @return {Object} data The transformed data object\n */\n applyTransforms: function applyTransforms(typeClass, data) {\n var _this = this;\n\n var attributes = undefined;\n if (true) {\n attributes = get(typeClass, 'attributes');\n }\n\n typeClass.eachTransformedAttribute(function (key, typeClass) {\n if (!(key in data)) {\n return;\n }\n\n var transform = _this.transformFor(typeClass);\n if (true) {\n var transformMeta = attributes.get(key);\n data[key] = transform.deserialize(data[key], transformMeta.options);\n } else {\n data[key] = transform.deserialize(data[key]);\n }\n });\n\n return data;\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 This method delegates to a more specific normalize method based on\n the `requestType`.\n To override this method with a custom one, make sure to call\n `return this._super(store, primaryModelClass, payload, id, requestType)` with your\n pre-processed data.\n Here's an example of using `normalizeResponse` manually:\n ```javascript\n socket.on('message', function(message) {\n var data = message.data;\n var modelClass = store.modelFor(data.modelName);\n var serializer = store.serializerFor(data.modelName);\n var normalized = serializer.normalizeSingleResponse(store, modelClass, data, data.id);\n store.push(normalized);\n });\n ```\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: function normalizeResponse(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\n /**\n @method normalizeFindRecordResponse\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 normalizeFindRecordResponse: function normalizeFindRecordResponse(store, primaryModelClass, payload, id, requestType) {\n return this.normalizeSingleResponse.apply(this, arguments);\n },\n\n /**\n @method normalizeQueryRecordResponse\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 normalizeQueryRecordResponse: function normalizeQueryRecordResponse(store, primaryModelClass, payload, id, requestType) {\n return this.normalizeSingleResponse.apply(this, arguments);\n },\n\n /**\n @method normalizeFindAllResponse\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 normalizeFindAllResponse: function normalizeFindAllResponse(store, primaryModelClass, payload, id, requestType) {\n return this.normalizeArrayResponse.apply(this, arguments);\n },\n\n /**\n @method normalizeFindBelongsToResponse\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 normalizeFindBelongsToResponse: function normalizeFindBelongsToResponse(store, primaryModelClass, payload, id, requestType) {\n return this.normalizeSingleResponse.apply(this, arguments);\n },\n\n /**\n @method normalizeFindHasManyResponse\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 normalizeFindHasManyResponse: function normalizeFindHasManyResponse(store, primaryModelClass, payload, id, requestType) {\n return this.normalizeArrayResponse.apply(this, arguments);\n },\n\n /**\n @method normalizeFindManyResponse\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 normalizeFindManyResponse: function normalizeFindManyResponse(store, primaryModelClass, payload, id, requestType) {\n return this.normalizeArrayResponse.apply(this, arguments);\n },\n\n /**\n @method normalizeQueryResponse\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 normalizeQueryResponse: function normalizeQueryResponse(store, primaryModelClass, payload, id, requestType) {\n return this.normalizeArrayResponse.apply(this, arguments);\n },\n\n /**\n @method normalizeCreateRecordResponse\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 normalizeCreateRecordResponse: function normalizeCreateRecordResponse(store, primaryModelClass, payload, id, requestType) {\n return this.normalizeSaveResponse.apply(this, arguments);\n },\n\n /**\n @method normalizeDeleteRecordResponse\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 normalizeDeleteRecordResponse: function normalizeDeleteRecordResponse(store, primaryModelClass, payload, id, requestType) {\n return this.normalizeSaveResponse.apply(this, arguments);\n },\n\n /**\n @method normalizeUpdateRecordResponse\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 normalizeUpdateRecordResponse: function normalizeUpdateRecordResponse(store, primaryModelClass, payload, id, requestType) {\n return this.normalizeSaveResponse.apply(this, arguments);\n },\n\n /**\n @method normalizeSaveResponse\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 normalizeSaveResponse: function normalizeSaveResponse(store, primaryModelClass, payload, id, requestType) {\n return this.normalizeSingleResponse.apply(this, arguments);\n },\n\n /**\n @method normalizeSingleResponse\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 normalizeSingleResponse: function normalizeSingleResponse(store, primaryModelClass, payload, id, requestType) {\n return this._normalizeResponse(store, primaryModelClass, payload, id, requestType, true);\n },\n\n /**\n @method normalizeArrayResponse\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 normalizeArrayResponse: function normalizeArrayResponse(store, primaryModelClass, payload, id, requestType) {\n return this._normalizeResponse(store, primaryModelClass, payload, id, requestType, false);\n },\n\n /**\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 @param {Boolean} isSingle\n @return {Object} JSON-API Document\n @private\n */\n _normalizeResponse: function _normalizeResponse(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 (0, _emberDataPrivateDebug.assert)('The `meta` returned from `extractMeta` has to be an object, not \"' + _ember['default'].typeOf(meta) + '\".', _ember['default'].typeOf(meta) === 'object');\n documentHash.meta = meta;\n }\n\n if (isSingle) {\n var _normalize = this.normalize(primaryModelClass, payload);\n\n var data = _normalize.data;\n var 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\n var data = _normalize2.data;\n var included = _normalize2.included;\n\n if (included) {\n var _documentHash$included;\n\n (_documentHash$included = documentHash.included).push.apply(_documentHash$included, _toConsumableArray(included));\n }\n ret[i] = data;\n }\n\n documentHash.data = ret;\n }\n\n return documentHash;\n },\n\n /**\n Normalizes a part of the JSON payload returned by\n the server. You should override this method, munge the hash\n and call super if you have generic normalization to do.\n It takes the type of the record that is being normalized\n (as a DS.Model class), the property where the hash was\n originally found, and the hash to normalize.\n You can use this method, for example, to normalize underscored keys to camelized\n or other general-purpose normalizations.\n Example\n ```app/serializers/application.js\n import DS from 'ember-data';\n export default DS.JSONSerializer.extend({\n normalize: function(typeClass, hash) {\n var fields = Ember.get(typeClass, 'fields');\n fields.forEach(function(field) {\n var payloadField = Ember.String.underscore(field);\n if (field === payloadField) { return; }\n hash[field] = hash[payloadField];\n delete hash[payloadField];\n });\n return this._super.apply(this, arguments);\n }\n });\n ```\n @method normalize\n @param {DS.Model} typeClass\n @param {Object} hash\n @return {Object}\n */\n normalize: function normalize(modelClass, resourceHash) {\n var data = null;\n\n if (resourceHash) {\n this.normalizeUsingDeclaredMapping(modelClass, resourceHash);\n if (_ember['default'].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\n /**\n Returns the resource's ID.\n @method extractId\n @param {Object} modelClass\n @param {Object} resourceHash\n @return {String}\n */\n extractId: function extractId(modelClass, resourceHash) {\n var primaryKey = get(this, 'primaryKey');\n var id = resourceHash[primaryKey];\n return (0, _emberDataPrivateSystemCoerceId['default'])(id);\n },\n\n /**\n Returns the resource's attributes formatted as a JSON-API \"attributes object\".\n http://jsonapi.org/format/#document-resource-object-attributes\n @method extractAttributes\n @param {Object} modelClass\n @param {Object} resourceHash\n @return {Object}\n */\n extractAttributes: function extractAttributes(modelClass, resourceHash) {\n var _this2 = this;\n\n var attributeKey;\n var attributes = {};\n\n modelClass.eachAttribute(function (key) {\n attributeKey = _this2.keyForAttribute(key, 'deserialize');\n if (resourceHash.hasOwnProperty(attributeKey)) {\n attributes[key] = resourceHash[attributeKey];\n }\n });\n\n return attributes;\n },\n\n /**\n Returns a relationship formatted as a JSON-API \"relationship object\".\n http://jsonapi.org/format/#document-resource-object-relationships\n @method extractRelationship\n @param {Object} relationshipModelName\n @param {Object} relationshipHash\n @return {Object}\n */\n extractRelationship: function extractRelationship(relationshipModelName, relationshipHash) {\n if (_ember['default'].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 (_ember['default'].typeOf(relationshipHash) === 'object') {\n if (relationshipHash.id) {\n relationshipHash.id = (0, _emberDataPrivateSystemCoerceId['default'])(relationshipHash.id);\n }\n\n var modelClass = this.store.modelFor(relationshipModelName);\n if (relationshipHash.type && !(0, _emberDataPrivateUtils.modelHasAttributeOrRelationshipNamedType)(modelClass)) {\n relationshipHash.type = this.modelNameFromPayloadKey(relationshipHash.type);\n }\n return relationshipHash;\n }\n return { id: (0, _emberDataPrivateSystemCoerceId['default'])(relationshipHash), type: relationshipModelName };\n },\n\n /**\n Returns a polymorphic relationship formatted as a JSON-API \"relationship object\".\n http://jsonapi.org/format/#document-resource-object-relationships\n `relationshipOptions` is a hash which contains more information about the\n polymorphic relationship which should be extracted:\n - `resourceHash` complete hash of the resource the relationship should be\n extracted from\n - `relationshipKey` key under which the value for the relationship is\n extracted from the resourceHash\n - `relationshipMeta` meta information about the relationship\n @method extractPolymorphicRelationship\n @param {Object} relationshipModelName\n @param {Object} relationshipHash\n @param {Object} relationshipOptions\n @return {Object}\n */\n extractPolymorphicRelationship: function extractPolymorphicRelationship(relationshipModelName, relationshipHash, relationshipOptions) {\n return this.extractRelationship(relationshipModelName, relationshipHash);\n },\n\n /**\n Returns the resource's relationships formatted as a JSON-API \"relationships object\".\n http://jsonapi.org/format/#document-resource-object-relationships\n @method extractRelationships\n @param {Object} modelClass\n @param {Object} resourceHash\n @return {Object}\n */\n extractRelationships: function extractRelationships(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.hasOwnProperty(relationshipKey)) {\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 (!_ember['default'].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.hasOwnProperty(linkKey)) {\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\n /**\n @method modelNameFromPayloadKey\n @param {String} key\n @return {String} the model's modelName\n */\n modelNameFromPayloadKey: function modelNameFromPayloadKey(key) {\n return (0, _emberDataPrivateSystemNormalizeModelName['default'])(key);\n },\n\n /**\n @method normalizeAttributes\n @private\n */\n normalizeAttributes: function normalizeAttributes(typeClass, hash) {\n var _this4 = this;\n\n var payloadKey;\n\n if (this.keyForAttribute) {\n typeClass.eachAttribute(function (key) {\n payloadKey = _this4.keyForAttribute(key, 'deserialize');\n if (key === payloadKey) {\n return;\n }\n if (!hash.hasOwnProperty(payloadKey)) {\n return;\n }\n\n hash[key] = hash[payloadKey];\n delete hash[payloadKey];\n });\n }\n },\n\n /**\n @method normalizeRelationships\n @private\n */\n normalizeRelationships: function normalizeRelationships(typeClass, hash) {\n var _this5 = this;\n\n var payloadKey;\n\n if (this.keyForRelationship) {\n typeClass.eachRelationship(function (key, relationship) {\n payloadKey = _this5.keyForRelationship(key, relationship.kind, 'deserialize');\n if (key === payloadKey) {\n return;\n }\n if (!hash.hasOwnProperty(payloadKey)) {\n return;\n }\n\n hash[key] = hash[payloadKey];\n delete hash[payloadKey];\n });\n }\n },\n\n /**\n @method normalizeUsingDeclaredMapping\n @private\n */\n normalizeUsingDeclaredMapping: function normalizeUsingDeclaredMapping(modelClass, hash) {\n var attrs = get(this, 'attrs');\n var normalizedKey, payloadKey, key;\n\n if (attrs) {\n for (key in attrs) {\n normalizedKey = payloadKey = this._getMappedKey(key, modelClass);\n\n if (!hash.hasOwnProperty(payloadKey)) {\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\n /**\n Looks up the property key that was set by the custom `attr` mapping\n passed to the serializer.\n @method _getMappedKey\n @private\n @param {String} key\n @return {String} key\n */\n _getMappedKey: function _getMappedKey(key, modelClass) {\n (0, _emberDataPrivateDebug.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 var attrs = get(this, 'attrs');\n var mappedKey;\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\n /**\n Check attrs.key.serialize property to inform if the `key`\n can be serialized\n @method _canSerialize\n @private\n @param {String} key\n @return {boolean} true if the key can be serialized\n */\n _canSerialize: function _canSerialize(key) {\n var attrs = get(this, 'attrs');\n\n return !attrs || !attrs[key] || attrs[key].serialize !== false;\n },\n\n /**\n When attrs.key.serialize is set to true then\n it takes priority over the other checks and the related\n attribute/relationship will be serialized\n @method _mustSerialize\n @private\n @param {String} key\n @return {boolean} true if the key must be serialized\n */\n _mustSerialize: function _mustSerialize(key) {\n var attrs = get(this, 'attrs');\n\n return attrs && attrs[key] && attrs[key].serialize === true;\n },\n\n /**\n Check if the given hasMany relationship should be serialized\n @method _shouldSerializeHasMany\n @private\n @param {DS.Snapshot} snapshot\n @param {String} key\n @param {String} relationshipType\n @return {boolean} true if the hasMany relationship should be serialized\n */\n _shouldSerializeHasMany: function _shouldSerializeHasMany(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\n // SERIALIZE\n /**\n Called when a record is saved in order to convert the\n record into JSON.\n By default, it creates a JSON object with a key for\n each attribute and belongsTo relationship.\n For example, consider this model:\n ```app/models/comment.js\n import DS from 'ember-data';\n export default DS.Model.extend({\n title: DS.attr(),\n body: DS.attr(),\n author: DS.belongsTo('user')\n });\n ```\n The default serialization would create a JSON object like:\n ```javascript\n {\n \"title\": \"Rails is unagi\",\n \"body\": \"Rails? Omakase? O_O\",\n \"author\": 12\n }\n ```\n By default, attributes are passed through as-is, unless\n you specified an attribute type (`DS.attr('date')`). If\n you specify a transform, the JavaScript value will be\n serialized when inserted into the JSON hash.\n By default, belongs-to relationships are converted into\n IDs when inserted into the JSON hash.\n ## IDs\n `serialize` takes an options hash with a single option:\n `includeId`. If this option is `true`, `serialize` will,\n by default include the ID in the JSON object it builds.\n The adapter passes in `includeId: true` when serializing\n a record for `createRecord`, but not for `updateRecord`.\n ## Customization\n Your server may expect a different JSON format than the\n built-in serialization format.\n In that case, you can implement `serialize` yourself and\n return a JSON hash of your choosing.\n ```app/serializers/post.js\n import DS from 'ember-data';\n export default DS.JSONSerializer.extend({\n serialize: function(snapshot, options) {\n var json = {\n POST_TTL: snapshot.attr('title'),\n POST_BDY: snapshot.attr('body'),\n POST_CMS: snapshot.hasMany('comments', { ids: true })\n }\n if (options.includeId) {\n json.POST_ID_ = snapshot.id;\n }\n return json;\n }\n });\n ```\n ## Customizing an App-Wide Serializer\n If you want to define a serializer for your entire\n application, you'll probably want to use `eachAttribute`\n and `eachRelationship` on the record.\n ```app/serializers/application.js\n import DS from 'ember-data';\n export default DS.JSONSerializer.extend({\n serialize: function(snapshot, options) {\n var json = {};\n snapshot.eachAttribute(function(name) {\n json[serverAttributeName(name)] = snapshot.attr(name);\n })\n snapshot.eachRelationship(function(name, relationship) {\n if (relationship.kind === 'hasMany') {\n json[serverHasManyName(name)] = snapshot.hasMany(name, { ids: true });\n }\n });\n if (options.includeId) {\n json.ID_ = snapshot.id;\n }\n return json;\n }\n });\n function serverAttributeName(attribute) {\n return attribute.underscore().toUpperCase();\n }\n function serverHasManyName(name) {\n return serverAttributeName(name.singularize()) + \"_IDS\";\n }\n ```\n This serializer will generate JSON that looks like this:\n ```javascript\n {\n \"TITLE\": \"Rails is omakase\",\n \"BODY\": \"Yep. Omakase.\",\n \"COMMENT_IDS\": [ 1, 2, 3 ]\n }\n ```\n ## Tweaking the Default JSON\n If you just want to do some small tweaks on the default JSON,\n you can call super first and make the tweaks on the returned\n JSON.\n ```app/serializers/post.js\n import DS from 'ember-data';\n export default DS.JSONSerializer.extend({\n serialize: function(snapshot, options) {\n var json = this._super.apply(this, arguments);\n json.subject = json.title;\n delete json.title;\n return json;\n }\n });\n ```\n @method serialize\n @param {DS.Snapshot} snapshot\n @param {Object} options\n @return {Object} json\n */\n serialize: function serialize(snapshot, options) {\n var _this6 = this;\n\n var json = {};\n\n if (options && options.includeId) {\n var id = snapshot.id;\n\n if (id) {\n json[get(this, 'primaryKey')] = id;\n }\n }\n\n snapshot.eachAttribute(function (key, attribute) {\n _this6.serializeAttribute(snapshot, json, key, attribute);\n });\n\n snapshot.eachRelationship(function (key, relationship) {\n if (relationship.kind === 'belongsTo') {\n _this6.serializeBelongsTo(snapshot, json, relationship);\n } else if (relationship.kind === 'hasMany') {\n _this6.serializeHasMany(snapshot, json, relationship);\n }\n });\n\n return json;\n },\n\n /**\n You can use this method to customize how a serialized record is added to the complete\n JSON hash to be sent to the server. By default the JSON Serializer does not namespace\n the payload and just sends the raw serialized JSON object.\n If your server expects namespaced keys, you should consider using the RESTSerializer.\n Otherwise you can override this method to customize how the record is added to the hash.\n The hash property should be modified by reference.\n For example, your server may expect underscored root objects.\n ```app/serializers/application.js\n import DS from 'ember-data';\n export default DS.RESTSerializer.extend({\n serializeIntoHash: function(data, type, snapshot, options) {\n var root = Ember.String.decamelize(type.modelName);\n data[root] = this.serialize(snapshot, options);\n }\n });\n ```\n @method serializeIntoHash\n @param {Object} hash\n @param {DS.Model} typeClass\n @param {DS.Snapshot} snapshot\n @param {Object} options\n */\n serializeIntoHash: function serializeIntoHash(hash, typeClass, snapshot, options) {\n assign(hash, this.serialize(snapshot, options));\n },\n\n /**\n `serializeAttribute` can be used to customize how `DS.attr`\n properties are serialized\n For example if you wanted to ensure all your attributes were always\n serialized as properties on an `attributes` object you could\n write:\n ```app/serializers/application.js\n import DS from 'ember-data';\n export default DS.JSONSerializer.extend({\n serializeAttribute: function(snapshot, json, key, attributes) {\n json.attributes = json.attributes || {};\n this._super(snapshot, json.attributes, key, attributes);\n }\n });\n ```\n @method serializeAttribute\n @param {DS.Snapshot} snapshot\n @param {Object} json\n @param {String} key\n @param {Object} attribute\n */\n serializeAttribute: function serializeAttribute(snapshot, json, key, attribute) {\n var type = attribute.type;\n\n if (this._canSerialize(key)) {\n var value = snapshot.attr(key);\n if (type) {\n var transform = this.transformFor(type);\n if (true) {\n value = transform.serialize(value, attribute.options);\n } else {\n value = transform.serialize(value);\n }\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\n /**\n `serializeBelongsTo` can be used to customize how `DS.belongsTo`\n properties are serialized.\n Example\n ```app/serializers/post.js\n import DS from 'ember-data';\n export default DS.JSONSerializer.extend({\n serializeBelongsTo: function(snapshot, json, relationship) {\n var key = relationship.key;\n var belongsTo = snapshot.belongsTo(key);\n key = this.keyForRelationship ? this.keyForRelationship(key, \"belongsTo\", \"serialize\") : key;\n json[key] = Ember.isNone(belongsTo) ? belongsTo : belongsTo.record.toJSON();\n }\n });\n ```\n @method serializeBelongsTo\n @param {DS.Snapshot} snapshot\n @param {Object} json\n @param {Object} relationship\n */\n serializeBelongsTo: function serializeBelongsTo(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\n /**\n `serializeHasMany` can be used to customize how `DS.hasMany`\n properties are serialized.\n Example\n ```app/serializers/post.js\n import DS from 'ember-data';\n export default DS.JSONSerializer.extend({\n serializeHasMany: function(snapshot, json, relationship) {\n var key = relationship.key;\n if (key === 'comments') {\n return;\n } else {\n this._super.apply(this, arguments);\n }\n }\n });\n ```\n @method serializeHasMany\n @param {DS.Snapshot} snapshot\n @param {Object} json\n @param {Object} relationship\n */\n serializeHasMany: function serializeHasMany(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\n /**\n You can use this method to customize how polymorphic objects are\n serialized. Objects are considered to be polymorphic if\n `{ polymorphic: true }` is pass as the second argument to the\n `DS.belongsTo` function.\n Example\n ```app/serializers/comment.js\n import DS from 'ember-data';\n export default DS.JSONSerializer.extend({\n serializePolymorphicType: function(snapshot, json, relationship) {\n var key = relationship.key,\n belongsTo = snapshot.belongsTo(key);\n key = this.keyForAttribute ? this.keyForAttribute(key, \"serialize\") : key;\n if (Ember.isNone(belongsTo)) {\n json[key + \"_type\"] = null;\n } else {\n json[key + \"_type\"] = belongsTo.modelName;\n }\n }\n });\n ```\n @method serializePolymorphicType\n @param {DS.Snapshot} snapshot\n @param {Object} json\n @param {Object} relationship\n */\n serializePolymorphicType: _ember['default'].K,\n\n /**\n `extractMeta` is used to deserialize any meta information in the\n adapter payload. By default Ember Data expects meta information to\n be located on the `meta` property of the payload object.\n Example\n ```app/serializers/post.js\n import DS from 'ember-data';\n export default DS.JSONSerializer.extend({\n extractMeta: function(store, typeClass, payload) {\n if (payload && payload.hasOwnProperty('_pagination')) {\n let meta = payload._pagination;\n delete payload._pagination;\n return meta;\n }\n }\n });\n ```\n @method extractMeta\n @param {DS.Store} store\n @param {DS.Model} modelClass\n @param {Object} payload\n */\n extractMeta: function extractMeta(store, modelClass, payload) {\n if (payload && payload.hasOwnProperty('meta')) {\n var meta = payload.meta;\n delete payload.meta;\n return meta;\n }\n },\n\n /**\n `extractErrors` is used to extract model errors when a call\n to `DS.Model#save` fails with an `InvalidError`. By default\n Ember Data expects error information to be located on the `errors`\n property of the payload object.\n This serializer expects this `errors` object to be an Array similar\n to the following, compliant with the JSON-API specification:\n ```js\n {\n \"errors\": [\n {\n \"detail\": \"This username is already taken!\",\n \"source\": {\n \"pointer\": \"data/attributes/username\"\n }\n }, {\n \"detail\": \"Doesn't look like a valid email.\",\n \"source\": {\n \"pointer\": \"data/attributes/email\"\n }\n }\n ]\n }\n ```\n The key `detail` provides a textual description of the problem.\n Alternatively, the key `title` can be used for the same purpose.\n The nested keys `source.pointer` detail which specific element\n of the request data was invalid.\n Note that JSON-API also allows for object-level errors to be placed\n in an object with pointer `data`, signifying that the problem\n cannot be traced to a specific attribute:\n ```javascript\n {\n \"errors\": [\n {\n \"detail\": \"Some generic non property error message\",\n \"source\": {\n \"pointer\": \"data\"\n }\n }\n ]\n }\n ```\n When turn into a `DS.Errors` object, you can read these errors\n through the property `base`:\n ```handlebars\n {{#each model.errors.base as |error|}}\n \n {{error.message}}\n \n {{/each}}\n ```\n Example of alternative implementation, overriding the default\n behavior to deal with a different format of errors:\n ```app/serializers/post.js\n import DS from 'ember-data';\n export default DS.JSONSerializer.extend({\n extractErrors: function(store, typeClass, payload, id) {\n if (payload && typeof payload === 'object' && payload._problems) {\n payload = payload._problems;\n this.normalizeErrors(typeClass, payload);\n }\n return payload;\n }\n });\n ```\n @method extractErrors\n @param {DS.Store} store\n @param {DS.Model} typeClass\n @param {Object} payload\n @param {(String|Number)} id\n @return {Object} json The deserialized errors\n */\n extractErrors: function extractErrors(store, typeClass, payload, id) {\n var _this7 = this;\n\n if (payload && typeof payload === 'object' && payload.errors) {\n payload = (0, _emberDataAdaptersErrors.errorsArrayToHash)(payload.errors);\n\n this.normalizeUsingDeclaredMapping(typeClass, payload);\n\n typeClass.eachAttribute(function (name) {\n var key = _this7.keyForAttribute(name, 'deserialize');\n if (key !== name && payload.hasOwnProperty(key)) {\n payload[name] = payload[key];\n delete payload[key];\n }\n });\n\n typeClass.eachRelationship(function (name) {\n var key = _this7.keyForRelationship(name, 'deserialize');\n if (key !== name && payload.hasOwnProperty(key)) {\n payload[name] = payload[key];\n delete payload[key];\n }\n });\n }\n\n return payload;\n },\n\n /**\n `keyForAttribute` can be used to define rules for how to convert an\n attribute name in your model to a key in your JSON.\n Example\n ```app/serializers/application.js\n import DS from 'ember-data';\n export default DS.RESTSerializer.extend({\n keyForAttribute: function(attr, method) {\n return Ember.String.underscore(attr).toUpperCase();\n }\n });\n ```\n @method keyForAttribute\n @param {String} key\n @param {String} method\n @return {String} normalized key\n */\n keyForAttribute: function keyForAttribute(key, method) {\n return key;\n },\n\n /**\n `keyForRelationship` can be used to define a custom key when\n serializing and deserializing relationship properties. By default\n `JSONSerializer` does not provide an implementation of this method.\n Example\n ```app/serializers/post.js\n import DS from 'ember-data';\n export default DS.JSONSerializer.extend({\n keyForRelationship: function(key, relationship, method) {\n return 'rel_' + Ember.String.underscore(key);\n }\n });\n ```\n @method keyForRelationship\n @param {String} key\n @param {String} typeClass\n @param {String} method\n @return {String} normalized key\n */\n keyForRelationship: function keyForRelationship(key, typeClass, method) {\n return key;\n },\n\n /**\n `keyForLink` can be used to define a custom key when deserializing link\n properties.\n @method keyForLink\n @param {String} key\n @param {String} kind `belongsTo` or `hasMany`\n @return {String} normalized key\n */\n keyForLink: function keyForLink(key, kind) {\n return key;\n },\n\n // HELPERS\n\n /**\n @method transformFor\n @private\n @param {String} attributeType\n @param {Boolean} skipAssertion\n @return {DS.Transform} transform\n */\n transformFor: function transformFor(attributeType, skipAssertion) {\n var transform = (0, _emberDataPrivateUtils.getOwner)(this).lookup('transform:' + attributeType);\n\n (0, _emberDataPrivateDebug.assert)(\"Unable to find transform for '\" + attributeType + \"'\", skipAssertion || !!transform);\n\n return transform;\n }\n });\n});","define(\"ember-data/serializers/rest\", [\"exports\", \"ember\", \"ember-data/-private/debug\", \"ember-data/serializers/json\", \"ember-data/-private/system/normalize-model-name\", \"ember-inflector\", \"ember-data/-private/system/coerce-id\", \"ember-data/-private/utils\", \"ember-data/-private/features\"], function (exports, _ember, _emberDataPrivateDebug, _emberDataSerializersJson, _emberDataPrivateSystemNormalizeModelName, _emberInflector, _emberDataPrivateSystemCoerceId, _emberDataPrivateUtils, _emberDataPrivateFeatures) {\n \"use strict\";\n\n function _toConsumableArray(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];return arr2;\n } else {\n return Array.from(arr);\n }\n }\n\n /**\n @module ember-data\n */\n\n var camelize = _ember[\"default\"].String.camelize;\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 \n export default DS.RESTSerializer.extend({\n keyForAttribute: function(attr, method) {\n return Ember.String.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 = _emberDataSerializersJson[\"default\"].extend({\n\n /**\n `keyForPolymorphicType` can be used to define a custom key when\n serializing and deserializing a polymorphic type. By default, the\n returned key is `${key}Type`.\n Example\n ```app/serializers/post.js\n import DS from 'ember-data';\n export default DS.RESTSerializer.extend({\n keyForPolymorphicType: function(key, relationship) {\n var relationshipKey = this.keyForRelationship(key);\n return 'type-' + relationshipKey;\n }\n });\n ```\n @method keyForPolymorphicType\n @param {String} key\n @param {String} typeClass\n @param {String} method\n @return {String} normalized key\n */\n keyForPolymorphicType: function keyForPolymorphicType(key, typeClass, method) {\n var relationshipKey = this.keyForRelationship(key);\n\n return relationshipKey + \"Type\";\n },\n\n /**\n Normalizes a part of the JSON payload returned by\n the server. You should override this method, munge the hash\n and call super if you have generic normalization to do.\n It takes the type of the record that is being normalized\n (as a DS.Model class), the property where the hash was\n originally found, and the hash to normalize.\n For example, if you have a payload that looks like this:\n ```js\n {\n \"post\": {\n \"id\": 1,\n \"title\": \"Rails is omakase\",\n \"comments\": [ 1, 2 ]\n },\n \"comments\": [{\n \"id\": 1,\n \"body\": \"FIRST\"\n }, {\n \"id\": 2,\n \"body\": \"Rails is unagi\"\n }]\n }\n ```\n The `normalize` method will be called three times:\n * With `App.Post`, `\"posts\"` and `{ id: 1, title: \"Rails is omakase\", ... }`\n * With `App.Comment`, `\"comments\"` and `{ id: 1, body: \"FIRST\" }`\n * With `App.Comment`, `\"comments\"` and `{ id: 2, body: \"Rails is unagi\" }`\n You can use this method, for example, to normalize underscored keys to camelized\n or other general-purpose normalizations. You will only need to implement \n `normalize` and manipulate the payload as desired.\n For example, if the `IDs` under `\"comments\"` are provided as `_id` instead of\n `id`, you can specify how to normalize just the comments:\n ```app/serializers/post.js\n import DS from 'ember-data';\n export default DS.RESTSerializer.extend({\n normalize(model, hash, prop) {\n if (prop === 'comments') {\n hash.id = hash._id;\n delete hash._id; \n }\n return this._super(...arguments);\n }\n });\n ```\n On each call to the `normalize` method, the third parameter (`prop`) is always \n one of the keys that were in the original payload or in the result of another \n normalization as `normalizeResponse`.\n @method normalize\n @param {DS.Model} modelClass\n @param {Object} resourceHash\n @param {String} prop\n @return {Object}\n */\n normalize: function normalize(modelClass, resourceHash, prop) {\n if (this.normalizeHash && this.normalizeHash[prop]) {\n (0, _emberDataPrivateDebug.deprecate)('`RESTSerializer.normalizeHash` has been deprecated. Please use `serializer.normalize` to modify the payload of single resources.', false, {\n id: 'ds.serializer.normalize-hash-deprecated',\n until: '3.0.0'\n });\n this.normalizeHash[prop](resourceHash);\n }\n return this._super(modelClass, resourceHash);\n },\n\n /**\n Normalizes an array of resource payloads and returns a JSON-API Document\n with primary data and, if any, included data as `{ data, included }`.\n @method _normalizeArray\n @param {DS.Store} store\n @param {String} modelName\n @param {Object} arrayHash\n @param {String} prop\n @return {Object}\n @private\n */\n _normalizeArray: function _normalizeArray(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 /*jshint loopfunc:true*/\n _ember[\"default\"].makeArray(arrayHash).forEach(function (hash) {\n var _normalizePolymorphicRecord2 = _this._normalizePolymorphicRecord(store, hash, prop, modelClass, serializer);\n\n var data = _normalizePolymorphicRecord2.data;\n var included = _normalizePolymorphicRecord2.included;\n\n documentHash.data.push(data);\n if (included) {\n var _documentHash$included;\n\n (_documentHash$included = documentHash.included).push.apply(_documentHash$included, _toConsumableArray(included));\n }\n });\n\n return documentHash;\n },\n\n _normalizePolymorphicRecord: function _normalizePolymorphicRecord(store, hash, prop, primaryModelClass, primarySerializer) {\n var serializer = undefined,\n modelClass = undefined;\n var primaryHasTypeAttribute = (0, _emberDataPrivateUtils.modelHasAttributeOrRelationshipNamedType)(primaryModelClass);\n // Support polymorphic records in async relationships\n if (!primaryHasTypeAttribute && hash.type && store._hasModelFor(this.modelNameFromPayloadKey(hash.type))) {\n serializer = store.serializerFor(this.modelNameFromPayloadKey(hash.type));\n modelClass = store.modelFor(this.modelNameFromPayloadKey(hash.type));\n } else {\n serializer = primarySerializer;\n modelClass = primaryModelClass;\n }\n return serializer.normalize(modelClass, hash, prop);\n },\n\n /*\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 @param {Boolean} isSingle\n @return {Object} JSON-API Document\n @private\n */\n _normalizeResponse: function _normalizeResponse(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 (0, _emberDataPrivateDebug.assert)('The `meta` returned from `extractMeta` has to be an object, not \"' + _ember[\"default\"].typeOf(meta) + '\".', _ember[\"default\"].typeOf(meta) === 'object');\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 (0, _emberDataPrivateDebug.warn)(this.warnMessageNoModelForKey(modelName, typeName), false, {\n id: 'ds.serializer.model-for-key-missing'\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 (0, _emberDataPrivateDebug.runInDebug)(function () {\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 (0, _emberDataPrivateDebug.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 && _ember[\"default\"].typeOf(value) !== 'array') {\n var _normalizePolymorphicRecord3 = this._normalizePolymorphicRecord(store, value, prop, primaryModelClass, this);\n\n var _data = _normalizePolymorphicRecord3.data;\n var _included = _normalizePolymorphicRecord3.included;\n\n documentHash.data = _data;\n if (_included) {\n var _documentHash$included2;\n\n (_documentHash$included2 = documentHash.included).push.apply(_documentHash$included2, _toConsumableArray(_included));\n }\n continue;\n }\n\n var _normalizeArray2 = this._normalizeArray(store, typeName, value, prop);\n\n var data = _normalizeArray2.data;\n var included = _normalizeArray2.included;\n\n if (included) {\n var _documentHash$included3;\n\n (_documentHash$included3 = documentHash.included).push.apply(_documentHash$included3, _toConsumableArray(included));\n }\n\n if (isSingle) {\n /*jshint loopfunc:true*/\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, _emberDataPrivateSystemCoerceId[\"default\"])(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$included4;\n\n (_documentHash$included4 = documentHash.included).push.apply(_documentHash$included4, _toConsumableArray(data));\n }\n }\n }\n }\n\n return documentHash;\n },\n\n isPrimaryType: function isPrimaryType(store, typeName, primaryTypeClass) {\n var typeClass = store.modelFor(typeName);\n return typeClass.modelName === primaryTypeClass.modelName;\n },\n\n /**\n This method allows you to push a payload containing top-level\n collections of records organized per type.\n ```js\n {\n \"posts\": [{\n \"id\": \"1\",\n \"title\": \"Rails is omakase\",\n \"author\", \"1\",\n \"comments\": [ \"1\" ]\n }],\n \"comments\": [{\n \"id\": \"1\",\n \"body\": \"FIRST\"\n }],\n \"users\": [{\n \"id\": \"1\",\n \"name\": \"@d2h\"\n }]\n }\n ```\n It will first normalize the payload, so you can use this to push\n in data streaming in from your server structured the same way\n that fetches and saves are structured.\n @method pushPayload\n @param {DS.Store} store\n @param {Object} payload\n */\n pushPayload: function pushPayload(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 (0, _emberDataPrivateDebug.warn)(this.warnMessageNoModelForKey(prop, modelName), false, {\n id: 'ds.serializer.model-for-key-missing'\n });\n continue;\n }\n var type = store.modelFor(modelName);\n var typeSerializer = store.serializerFor(type.modelName);\n\n /*jshint loopfunc:true*/\n _ember[\"default\"].makeArray(payload[prop]).forEach(function (hash) {\n var _typeSerializer$normalize = typeSerializer.normalize(type, hash, prop);\n\n var data = _typeSerializer$normalize.data;\n var included = _typeSerializer$normalize.included;\n\n documentHash.data.push(data);\n if (included) {\n var _documentHash$included5;\n\n (_documentHash$included5 = documentHash.included).push.apply(_documentHash$included5, _toConsumableArray(included));\n }\n });\n }\n\n if (false) {\n return store.push(documentHash);\n } else {\n store.push(documentHash);\n }\n },\n\n /**\n This method is used to convert each JSON root key in the payload\n into a modelName that it can use to look up the appropriate model for\n that part of the payload.\n For example, your server may send a model name that does not correspond with\n the name of the model in your app. Let's take a look at an example model,\n and an example payload:\n ```app/models/post.js\n import DS from 'ember-data';\n export default DS.Model.extend({\n });\n ```\n ```javascript\n {\n \"blog/post\": {\n \"id\": \"1\n }\n }\n ```\n Ember Data is going to normalize the payload's root key for the modelName. As a result,\n it will try to look up the \"blog/post\" model. Since we don't have a model called \"blog/post\"\n (or a file called app/models/blog/post.js in ember-cli), Ember Data will throw an error\n because it cannot find the \"blog/post\" model.\n Since we want to remove this namespace, we can define a serializer for the application that will\n remove \"blog/\" from the payload key whenver it's encountered by Ember Data:\n ```app/serializers/application.js\n import DS from 'ember-data';\n export default DS.RESTSerializer.extend({\n modelNameFromPayloadKey: function(payloadKey) {\n if (payloadKey === 'blog/post') {\n return this._super(payloadKey.replace('blog/', ''));\n } else {\n return this._super(payloadKey);\n }\n }\n });\n ```\n After refreshing, Ember Data will appropriately look up the \"post\" model.\n By default the modelName for a model is its\n name in dasherized form. This means that a payload key like \"blogPost\" would be\n normalized to \"blog-post\" when Ember Data looks up the model. Usually, Ember Data\n can use the correct inflection to do this for you. Most of the time, you won't\n need to override `modelNameFromPayloadKey` for this purpose.\n @method modelNameFromPayloadKey\n @param {String} key\n @return {String} the model's modelName\n */\n modelNameFromPayloadKey: function modelNameFromPayloadKey(key) {\n return (0, _emberInflector.singularize)((0, _emberDataPrivateSystemNormalizeModelName[\"default\"])(key));\n },\n\n // SERIALIZE\n\n /**\n Called when a record is saved in order to convert the\n record into JSON.\n By default, it creates a JSON object with a key for\n each attribute and belongsTo relationship.\n For example, consider this model:\n ```app/models/comment.js\n import DS from 'ember-data';\n export default DS.Model.extend({\n title: DS.attr(),\n body: DS.attr(),\n author: DS.belongsTo('user')\n });\n ```\n The default serialization would create a JSON object like:\n ```js\n {\n \"title\": \"Rails is unagi\",\n \"body\": \"Rails? Omakase? O_O\",\n \"author\": 12\n }\n ```\n By default, attributes are passed through as-is, unless\n you specified an attribute type (`DS.attr('date')`). If\n you specify a transform, the JavaScript value will be\n serialized when inserted into the JSON hash.\n By default, belongs-to relationships are converted into\n IDs when inserted into the JSON hash.\n ## IDs\n `serialize` takes an options hash with a single option:\n `includeId`. If this option is `true`, `serialize` will,\n by default include the ID in the JSON object it builds.\n The adapter passes in `includeId: true` when serializing\n a record for `createRecord`, but not for `updateRecord`.\n ## Customization\n Your server may expect a different JSON format than the\n built-in serialization format.\n In that case, you can implement `serialize` yourself and\n return a JSON hash of your choosing.\n ```app/serializers/post.js\n import DS from 'ember-data';\n export default DS.RESTSerializer.extend({\n serialize: function(snapshot, options) {\n var json = {\n POST_TTL: snapshot.attr('title'),\n POST_BDY: snapshot.attr('body'),\n POST_CMS: snapshot.hasMany('comments', { ids: true })\n }\n if (options.includeId) {\n json.POST_ID_ = snapshot.id;\n }\n return json;\n }\n });\n ```\n ## Customizing an App-Wide Serializer\n If you want to define a serializer for your entire\n application, you'll probably want to use `eachAttribute`\n and `eachRelationship` on the record.\n ```app/serializers/application.js\n import DS from 'ember-data';\n export default DS.RESTSerializer.extend({\n serialize: function(snapshot, options) {\n var json = {};\n snapshot.eachAttribute(function(name) {\n json[serverAttributeName(name)] = snapshot.attr(name);\n })\n snapshot.eachRelationship(function(name, relationship) {\n if (relationship.kind === 'hasMany') {\n json[serverHasManyName(name)] = snapshot.hasMany(name, { ids: true });\n }\n });\n if (options.includeId) {\n json.ID_ = snapshot.id;\n }\n return json;\n }\n });\n function serverAttributeName(attribute) {\n return attribute.underscore().toUpperCase();\n }\n function serverHasManyName(name) {\n return serverAttributeName(name.singularize()) + \"_IDS\";\n }\n ```\n This serializer will generate JSON that looks like this:\n ```js\n {\n \"TITLE\": \"Rails is omakase\",\n \"BODY\": \"Yep. Omakase.\",\n \"COMMENT_IDS\": [ 1, 2, 3 ]\n }\n ```\n ## Tweaking the Default JSON\n If you just want to do some small tweaks on the default JSON,\n you can call super first and make the tweaks on the returned\n JSON.\n ```app/serializers/post.js\n import DS from 'ember-data';\n export default DS.RESTSerializer.extend({\n serialize: function(snapshot, options) {\n var json = this._super(snapshot, options);\n json.subject = json.title;\n delete json.title;\n return json;\n }\n });\n ```\n @method serialize\n @param {DS.Snapshot} snapshot\n @param {Object} options\n @return {Object} json\n */\n serialize: function serialize(snapshot, options) {\n return this._super.apply(this, arguments);\n },\n\n /**\n You can use this method to customize the root keys serialized into the JSON.\n The hash property should be modified by reference (possibly using something like _.extend)\n By default the REST Serializer sends the modelName of a model, which is a camelized\n version of the name.\n For example, your server may expect underscored root objects.\n ```app/serializers/application.js\n import DS from 'ember-data';\n export default DS.RESTSerializer.extend({\n serializeIntoHash: function(data, type, record, options) {\n var root = Ember.String.decamelize(type.modelName);\n data[root] = this.serialize(record, options);\n }\n });\n ```\n @method serializeIntoHash\n @param {Object} hash\n @param {DS.Model} typeClass\n @param {DS.Snapshot} snapshot\n @param {Object} options\n */\n serializeIntoHash: function serializeIntoHash(hash, typeClass, snapshot, options) {\n var normalizedRootKey = this.payloadKeyFromModelName(typeClass.modelName);\n hash[normalizedRootKey] = this.serialize(snapshot, options);\n },\n\n /**\n You can use `payloadKeyFromModelName` to override the root key for an outgoing\n request. By default, the RESTSerializer returns a camelized version of the\n model's name.\n For a model called TacoParty, its `modelName` would be the string `taco-party`. The RESTSerializer\n will send it to the server with `tacoParty` as the root key in the JSON payload:\n ```js\n {\n \"tacoParty\": {\n \"id\": \"1\",\n \"location\": \"Matthew Beale's House\"\n }\n }\n ```\n For example, your server may expect dasherized root objects:\n ```app/serializers/application.js\n import DS from 'ember-data';\n export default DS.RESTSerializer.extend({\n payloadKeyFromModelName: function(modelName) {\n return Ember.String.dasherize(modelName);\n }\n });\n ```\n Given a `TacoParty` model, calling `save` on it would produce an outgoing\n request like:\n ```js\n {\n \"taco-party\": {\n \"id\": \"1\",\n \"location\": \"Matthew Beale's House\"\n }\n }\n ```\n @method payloadKeyFromModelName\n @param {String} modelName\n @return {String}\n */\n payloadKeyFromModelName: function payloadKeyFromModelName(modelName) {\n return camelize(modelName);\n },\n\n /**\n You can use this method to customize how polymorphic objects are serialized.\n By default the REST Serializer creates the key by appending `Type` to\n the attribute and value from the model's camelcased model name.\n @method serializePolymorphicType\n @param {DS.Snapshot} snapshot\n @param {Object} json\n @param {Object} relationship\n */\n serializePolymorphicType: function serializePolymorphicType(snapshot, json, relationship) {\n var key = relationship.key;\n var belongsTo = snapshot.belongsTo(key);\n var typeKey = this.keyForPolymorphicType(key, relationship.type, 'serialize');\n\n // old way of getting the key for the polymorphic type\n key = this.keyForAttribute ? this.keyForAttribute(key, \"serialize\") : key;\n key = key + \"Type\";\n\n // The old way of serializing the type of a polymorphic record used\n // `keyForAttribute`, which is not correct. The next code checks if the old\n // way is used and if it differs from the new way of using\n // `keyForPolymorphicType`. If this is the case, a deprecation warning is\n // logged and the old way is restored (so nothing breaks).\n if (key !== typeKey && this.keyForPolymorphicType === RESTSerializer.prototype.keyForPolymorphicType) {\n (0, _emberDataPrivateDebug.deprecate)(\"The key to serialize the type of a polymorphic record is created via keyForAttribute which has been deprecated. Use the keyForPolymorphicType hook instead.\", false, {\n id: 'ds.rest-serializer.deprecated-key-for-polymorphic-type',\n until: '3.0.0'\n });\n\n typeKey = key;\n }\n\n if (_ember[\"default\"].isNone(belongsTo)) {\n json[typeKey] = null;\n } else {\n json[typeKey] = camelize(belongsTo.modelName);\n }\n },\n\n /**\n You can use this method to customize how a polymorphic relationship should\n be extracted.\n @method extractPolymorphicRelationship\n @param {Object} relationshipType\n @param {Object} relationshipHash\n @param {Object} relationshipOptions\n @return {Object}\n */\n extractPolymorphicRelationship: function extractPolymorphicRelationship(relationshipType, relationshipHash, relationshipOptions) {\n var key = relationshipOptions.key;\n var resourceHash = relationshipOptions.resourceHash;\n var relationshipMeta = relationshipOptions.relationshipMeta;\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 `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.hasOwnProperty(typeProperty) && typeof relationshipHash !== 'object') {\n var type = this.modelNameFromPayloadKey(resourceHash[typeProperty]);\n return {\n id: relationshipHash,\n type: type\n };\n }\n\n return this._super.apply(this, arguments);\n }\n });\n\n (0, _emberDataPrivateDebug.runInDebug)(function () {\n RESTSerializer.reopen({\n warnMessageNoModelForKey: function warnMessageNoModelForKey(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/initializers/store', 'ember-data/-private/initializers/transforms', 'ember-data/-private/initializers/store-injections', 'ember-data/-private/initializers/data-adapter'], function (exports, _emberDataPrivateInitializersStore, _emberDataPrivateInitializersTransforms, _emberDataPrivateInitializersStoreInjections, _emberDataPrivateInitializersDataAdapter) {\n 'use strict';\n\n exports['default'] = setupContainer;\n\n function setupContainer(application) {\n (0, _emberDataPrivateInitializersDataAdapter['default'])(application);\n (0, _emberDataPrivateInitializersTransforms['default'])(application);\n (0, _emberDataPrivateInitializersStoreInjections['default'])(application);\n (0, _emberDataPrivateInitializersStore['default'])(application);\n }\n});","define(\"ember-data/store\", [\"exports\", \"ember-data/-private/system/store\"], function (exports, _emberDataPrivateSystemStore) {\n \"use strict\";\n\n exports[\"default\"] = _emberDataPrivateSystemStore[\"default\"];\n});","define('ember-data/transform', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n /**\n The `DS.Transform` class is used to serialize and deserialize model\n attributes when they are saved or loaded from an\n adapter. Subclassing `DS.Transform` is useful for creating custom\n attributes. All subclasses of `DS.Transform` must implement a\n `serialize` and a `deserialize` method.\n \n Example\n \n ```app/transforms/temperature.js\n import DS from 'ember-data';\n \n // Converts centigrade in the JSON to fahrenheit in the app\n export default DS.Transform.extend({\n deserialize: function(serialized) {\n return (serialized * 1.8) + 32;\n },\n serialize: function(deserialized) {\n return (deserialized - 32) / 1.8;\n }\n });\n ```\n \n Usage\n \n ```app/models/requirement.js\n import DS from 'ember-data';\n \n export default DS.Model.extend({\n name: DS.attr('string'),\n temperature: DS.attr('temperature')\n });\n ```\n \n @class Transform\n @namespace DS\n */\n exports['default'] = _ember['default'].Object.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 serialize: function(deserialized) {\n return Ember.isEmpty(deserialized) ? null : Number(deserialized);\n }\n ```\n @method serialize\n @param deserialized The deserialized value\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: function(serialized) {\n return empty(serialized) ? null : Number(serialized);\n }\n ```\n @method deserialize\n @param serialized The serialized value\n @return The deserialized value\n */\n deserialize: null\n });\n});","define(\"ember-data/version\", [\"exports\"], function (exports) {\n \"use strict\";\n\n exports[\"default\"] = \"2.6.1\";\n});","define(\"ember-inflector/index\", [\"exports\", \"ember\", \"ember-inflector/lib/system\", \"ember-inflector/lib/ext/string\"], function (exports, _ember, _emberInflectorLibSystem, _emberInflectorLibExtString) {\n /* global define, module */\n\n \"use strict\";\n\n _emberInflectorLibSystem.Inflector.defaultRules = _emberInflectorLibSystem.defaultRules;\n _ember[\"default\"].Inflector = _emberInflectorLibSystem.Inflector;\n\n _ember[\"default\"].String.pluralize = _emberInflectorLibSystem.pluralize;\n _ember[\"default\"].String.singularize = _emberInflectorLibSystem.singularize;exports[\"default\"] = _emberInflectorLibSystem.Inflector;\n exports.pluralize = _emberInflectorLibSystem.pluralize;\n exports.singularize = _emberInflectorLibSystem.singularize;\n exports.defaultRules = _emberInflectorLibSystem.defaultRules;\n\n if (typeof define !== 'undefined' && define.amd) {\n define('ember-inflector', ['exports'], function (__exports__) {\n __exports__['default'] = _emberInflectorLibSystem.Inflector;\n return _emberInflectorLibSystem.Inflector;\n });\n } else if (typeof module !== 'undefined' && module['exports']) {\n module['exports'] = _emberInflectorLibSystem.Inflector;\n }\n});","define('ember-inflector/lib/ext/string', ['exports', 'ember', 'ember-inflector/lib/system/string'], function (exports, _ember, _emberInflectorLibSystemString) {\n 'use strict';\n\n if (_ember['default'].EXTEND_PROTOTYPES === true || _ember['default'].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, _emberInflectorLibSystemString.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, _emberInflectorLibSystemString.singularize)(this);\n };\n }\n});","define('ember-inflector/lib/helpers/pluralize', ['exports', 'ember-inflector', 'ember-inflector/lib/utils/make-helper'], function (exports, _emberInflector, _emberInflectorLibUtilsMakeHelper) {\n 'use strict';\n\n /**\n *\n * If you have Ember Inflector (such as if Ember Data is present),\n * pluralize a word. For example, turn \"ox\" into \"oxen\".\n *\n * Example:\n *\n * {{pluralize count myProperty}}\n * {{pluralize 1 \"oxen\"}}\n * {{pluralize myProperty}}\n * {{pluralize \"ox\"}}\n *\n * @for Ember.HTMLBars.helpers\n * @method pluralize\n * @param {Number|Property} [count] count of objects\n * @param {String|Property} word word to pluralize\n */\n exports['default'] = (0, _emberInflectorLibUtilsMakeHelper['default'])(function (params) {\n var count = undefined,\n word = undefined;\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 (parseFloat(count) !== 1) {\n word = (0, _emberInflector.pluralize)(word);\n }\n\n return count + \" \" + word;\n }\n });\n});","define('ember-inflector/lib/helpers/singularize', ['exports', 'ember-inflector', 'ember-inflector/lib/utils/make-helper'], function (exports, _emberInflector, _emberInflectorLibUtilsMakeHelper) {\n 'use strict';\n\n /**\n *\n * If you have Ember Inflector (such as if Ember Data is present),\n * singularize a word. For example, turn \"oxen\" into \"ox\".\n *\n * Example:\n *\n * {{singularize myProperty}}\n * {{singularize \"oxen\"}}\n *\n * @for Ember.HTMLBars.helpers\n * @method singularize\n * @param {String|Property} word word to singularize\n */\n exports['default'] = (0, _emberInflectorLibUtilsMakeHelper['default'])(function (params) {\n return (0, _emberInflector.singularize)(params[0]);\n });\n});","define('ember-inflector/lib/system/inflections', ['exports'], function (exports) {\n 'use strict';\n\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)$/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)(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', 'ember'], function (exports, _ember) {\n 'use strict';\n\n var capitalize = _ember['default'].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: [ /$/, 's' ],\n singular: [ /\\s$/, '' ],\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 enableCache() {\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 purgeCache() {\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 disableCache() {\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 plural(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 singular(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 uncountable(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 irregular(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 pluralize(word) {\n return this._pluralize(word);\n },\n\n _pluralize: function _pluralize(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 singularize(word) {\n return this._singularize(word);\n },\n\n _singularize: function _singularize(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 inflect(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 this.rules.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(rule, 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, _emberInflectorLibSystemInflector) {\n 'use strict';\n\n function pluralize(word) {\n return _emberInflectorLibSystemInflector['default'].inflector.pluralize(word);\n }\n\n function singularize(word) {\n return _emberInflectorLibSystemInflector['default'].inflector.singularize(word);\n }\n\n exports.pluralize = pluralize;\n exports.singularize = singularize;\n});","define(\"ember-inflector/lib/system\", [\"exports\", \"ember-inflector/lib/system/inflector\", \"ember-inflector/lib/system/string\", \"ember-inflector/lib/system/inflections\"], function (exports, _emberInflectorLibSystemInflector, _emberInflectorLibSystemString, _emberInflectorLibSystemInflections) {\n \"use strict\";\n\n _emberInflectorLibSystemInflector[\"default\"].inflector = new _emberInflectorLibSystemInflector[\"default\"](_emberInflectorLibSystemInflections[\"default\"]);\n\n exports.Inflector = _emberInflectorLibSystemInflector[\"default\"];\n exports.singularize = _emberInflectorLibSystemString.singularize;\n exports.pluralize = _emberInflectorLibSystemString.pluralize;\n exports.defaultRules = _emberInflectorLibSystemInflections[\"default\"];\n});","define('ember-inflector/lib/utils/make-helper', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n exports['default'] = makeHelper;\n\n function makeHelper(helperFunction) {\n if (_ember['default'].Helper) {\n return _ember['default'].Helper.helper(helperFunction);\n }\n if (_ember['default'].HTMLBars) {\n return _ember['default'].HTMLBars.makeBoundHelper(helperFunction);\n }\n return _ember['default'].Handlebars.makeBoundHelper(helperFunction);\n }\n});","define('ember-load-initializers/index', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n exports['default'] = function (app, prefix) {\n var regex = new RegExp('^' + prefix + '\\/((?:instance-)?initializers)\\/');\n var getKeys = Object.keys || _ember['default'].keys;\n\n getKeys(requirejs._eak_seen).map(function (moduleName) {\n return {\n moduleName: moduleName,\n matches: regex.exec(moduleName)\n };\n }).filter(function (dep) {\n return dep.matches && dep.matches.length === 2;\n }).forEach(function (dep) {\n var moduleName = dep.moduleName;\n\n var module = require(moduleName, null, null, true);\n if (!module) {\n throw new Error(moduleName + ' must export an initializer.');\n }\n\n var initializerType = _ember['default'].String.camelize(dep.matches[1].substring(0, dep.matches[1].length - 1));\n var initializer = module['default'];\n if (!initializer.name) {\n var initializerName = moduleName.match(/[^\\/]+\\/?$/)[0];\n initializer.name = initializerName;\n }\n\n if (app[initializerType]) {\n app[initializerType](initializer);\n }\n });\n };\n});","define('ember-paper/components/base-focusable', ['exports', 'ember', 'ember-paper/mixins/events-mixin'], function (exports, _ember, _emberPaperMixinsEventsMixin) {\n 'use strict';\n\n var Component = _ember['default'].Component;\n var computed = _ember['default'].computed;\n\n exports['default'] = Component.extend(_emberPaperMixinsEventsMixin['default'], {\n\n disabled: false,\n pressed: false,\n active: false,\n focused: false,\n hover: false,\n\n classNameBindings: ['focused:md-focused'],\n attributeBindings: ['tabindex', 'disabledAttr:disabled'],\n\n disabledAttr: computed('disabled', function () {\n return this.get('disabled') ? 'disabled' : null;\n }),\n\n // Alow element to be focusable by supplying a tabindex 0\n tabindex: computed('disabled', function () {\n return this.get('disabled') ? '-1' : '0';\n }),\n\n toggle: false,\n\n // Only render the \"focused\" state if the element gains focus due to\n // keyboard navigation.\n focusOnlyOnKey: false,\n\n /*\n * Listen to `focusIn` and `focusOut` events instead of `focus` and `blur`.\n * This way we don't need to explicitly bubble the events.\n * They bubble by default.\n */\n focusIn: function focusIn() {\n if (!this.get('disabled') && !this.get('focusOnlyOnKey') || !this.get('pressed')) {\n this.set('focused', true);\n }\n },\n\n focusOut: function focusOut() {\n this.set('focused', false);\n },\n\n mouseEnter: function mouseEnter() {\n this.set('hover', true);\n },\n\n mouseLeave: function mouseLeave(e) {\n this.set('hover', false);\n this._super(e);\n },\n\n down: function down() {\n this.set('pressed', true);\n if (this.toggle) {\n this.toggleProperty('active');\n } else {\n this.set('active', true);\n }\n },\n\n up: function up() {\n this.set('pressed', false);\n\n if (!this.toggle) {\n this.set('active', false);\n }\n }\n });\n});","define('ember-paper/components/paper-autocomplete-highlight', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n exports['default'] = _ember['default'].Component.extend({\n tagName: 'span',\n flags: '',\n\n highlight: _ember['default'].computed('searchText', 'label', 'flags', function () {\n var unsafeText = _ember['default'].Handlebars.Utils.escapeExpression(this.get('label'));\n var text = unsafeText;\n var flags = this.get('flags');\n var regex = this.getRegExp(this.get('searchText'), flags);\n var html = text.replace(regex, '$&');\n return new _ember['default'].Handlebars.SafeString(html);\n }),\n\n sanitize: function sanitize(term) {\n if (!term) {\n return term;\n }\n return term.replace(/[\\\\\\^\\$\\*\\+\\?\\.\\(\\)\\|\\{}\\[\\]]/g, '\\\\$&');\n },\n\n getRegExp: function getRegExp(text, flags) {\n var str = '';\n if (flags.indexOf('^') >= 1) {\n str += '^';\n }\n str += text;\n if (flags.indexOf('$') >= 1) {\n str += '$';\n }\n return new RegExp(this.sanitize(str), flags.replace(/[\\$\\^]/g, ''));\n }\n\n });\n});","define('ember-paper/components/paper-autocomplete-item', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n exports['default'] = _ember['default'].Component.extend({\n tagName: 'li',\n attributeBindings: ['tabindex', 'role'],\n classNameBindings: ['isSelected:selected'],\n tabindex: 0,\n role: 'option',\n\n label: _ember['default'].computed('item', function () {\n return this.lookupLabelOfItem(this.get('item'));\n }),\n\n isSelected: _ember['default'].computed('selectedIndex', function () {\n return this.get('selectedIndex') === this.get('index');\n }),\n\n lookupLabelOfItem: function lookupLabelOfItem(model) {\n return this.get('lookupKey') ? _ember['default'].get(model, this.get('lookupKey')) : model;\n },\n\n click: function click() {\n this.sendAction('pick', this.get('item'));\n }\n });\n});","define('ember-paper/components/paper-autocomplete-list', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n // TODO Move to constants?\n var ITEM_HEIGHT = 41;\n var MAX_HEIGHT = 5.5 * ITEM_HEIGHT;\n var MENU_PADDING = 8;\n\n exports['default'] = _ember['default'].Component.extend({\n util: _ember['default'].inject.service(),\n\n tagName: 'ul',\n classNames: ['md-default-theme', 'md-autocomplete-suggestions', 'md-whiteframe-z1'],\n attributeNameBindings: ['role'],\n role: 'presentation',\n stickToElement: null,\n\n init: function init() {\n this._super.apply(this, arguments);\n this._resizeWindowEvent = _ember['default'].run.bind(this, this.resizeWindowEvent);\n },\n\n mouseEnter: function mouseEnter() {\n this.sendAction('mouse-enter');\n },\n\n mouseLeave: function mouseLeave() {\n this.sendAction('mouse-leave');\n },\n\n mouseUp: function mouseUp() {\n this.sendAction('mouse-up');\n },\n\n // TODO reafactor into a computed property that binds directly to dropdown's `style`\n positionDropdown: function positionDropdown() {\n var hrect = _ember['default'].$('#' + this.get('wrapToElementId'))[0].getBoundingClientRect();\n var vrect = hrect;\n var root = document.body.getBoundingClientRect();\n var top = vrect.bottom - root.top;\n var bot = root.bottom - vrect.top;\n var left = hrect.left - root.left;\n var width = hrect.width;\n\n var styles = {\n left: left + 'px',\n minWidth: width + 'px',\n maxWidth: Math.max(hrect.right - root.left, root.right - hrect.left) - MENU_PADDING + 'px'\n };\n var ul = this.$();\n\n if (top > bot && root.height - hrect.bottom - MENU_PADDING < MAX_HEIGHT) {\n styles.top = 'auto';\n styles.bottom = bot + 'px';\n styles.maxHeight = Math.min(MAX_HEIGHT, hrect.top - root.top - MENU_PADDING) + 'px';\n } else {\n styles.top = top + 'px';\n styles.bottom = 'auto';\n styles.maxHeight = Math.min(MAX_HEIGHT, root.bottom - hrect.bottom - MENU_PADDING) + 'px';\n }\n ul.css(styles);\n correctHorizontalAlignment();\n\n /*\n * Makes sure that the menu doesn't go off of the screen on either side.\n */\n function correctHorizontalAlignment() {\n var dropdown = ul[0].getBoundingClientRect();\n var styles = {};\n if (dropdown.right > root.right - MENU_PADDING) {\n styles.left = hrect.right - dropdown.width + 'px';\n }\n ul.css(styles);\n }\n },\n\n observeIndex: _ember['default'].observer('selectedIndex', function () {\n var suggestions = this.get('suggestions');\n if (!suggestions || !suggestions.objectAt(this.get('selectedIndex'))) {\n return;\n }\n\n var ul = this.$();\n var li = ul.find('li:eq(' + this.get('selectedIndex') + ')').get(0);\n var top = li.offsetTop;\n var bot = top + li.offsetHeight;\n var hgt = ul[0].clientHeight;\n\n if (top < ul[0].scrollTop) {\n ul[0].scrollTop = top;\n } else if (bot > ul[0].scrollTop + hgt) {\n ul[0].scrollTop = bot - hgt;\n }\n }),\n\n resizeWindowEvent: function resizeWindowEvent() {\n this.positionDropdown();\n },\n\n didInsertElement: function didInsertElement() {\n this._super.apply(this, arguments);\n\n // TODO refactor using ember-wormhole?\n var ul = this.$().detach();\n _ember['default'].$('body').append(ul);\n _ember['default'].$(window).on('resize', this._resizeWindowEvent);\n this.get('util').disableScrollAround(this.$());\n this.positionDropdown();\n },\n\n willDestroyElement: function willDestroyElement() {\n _ember['default'].$(window).off('resize', this._resizeWindowEvent);\n this.get('util').enableScrolling();\n }\n\n });\n});","define('ember-paper/components/paper-autocomplete', ['exports', 'ember', 'ember-paper/utils/promise-proxies'], function (exports, _ember, _emberPaperUtilsPromiseProxies) {\n 'use strict';\n\n function isString(item) {\n return typeof item === 'string' || item instanceof String;\n }\n\n /*\n * @name paper-autocomplete\n *\n * @description\n * Provides material design autocomplete.\n *\n *\n * ## Dependencies\n * - paper-autocomplete-item\n * - paper-autocomplete-list\n * - paper-input\n * - paper-button\n * - input\n */\n exports['default'] = _ember['default'].Component.extend({\n util: _ember['default'].inject.service(),\n constants: _ember['default'].inject.service(),\n\n tagName: 'md-autocomplete',\n classNameBindings: ['notFloating:md-default-theme'],\n attributeBindings: ['floating:md-floating-label', 'showDisabled:disabled'],\n\n // Internal\n hidden: true,\n selectedIndex: 0,\n messages: [],\n noBlur: false,\n hasFocus: false,\n searchText: '',\n // wrap in a computed property so that cache\n // isn't shared among autocomplete instances\n itemCache: _ember['default'].computed(function () {\n return {};\n }),\n\n // Public\n disabled: null,\n required: null,\n lookupKey: null,\n placeholder: '',\n delay: 0,\n minLength: 1,\n allowNonExisting: false,\n noCache: false,\n notFoundMessage: 'No matches found for \\'%@\\'.',\n\n init: function init() {\n this._super.apply(this, arguments);\n\n if (this.get('model')) {\n this.set('searchText', this.lookupLabelOfItem(this.get('model')));\n this.searchTextDidChange();\n }\n },\n\n notFloating: _ember['default'].computed.not('floating'),\n notHidden: _ember['default'].computed.not('hidden'),\n\n autocompleteWrapperId: _ember['default'].computed('elementId', function () {\n return 'autocomplete-wrapper-' + this.get('elementId');\n }),\n\n sections: {\n itemTemplate: { isItemTemplate: true },\n notFoundTemplate: { isNotFoundTemplate: true }\n },\n\n notFoundMsg: _ember['default'].computed('searchText', 'notFoundMessage', function () {\n return _ember['default'].String.fmt(this.get('notFoundMessage'), [this.get('searchText')]);\n }),\n\n /*\n * Needed because of false = disabled='false'.\n */\n showDisabled: _ember['default'].computed('disabled', function () {\n if (this.get('disabled')) {\n return true;\n }\n }),\n\n showLoadingBar: _ember['default'].computed('loading', 'allowNonExisting', 'debouncingState', function () {\n return !this.get('loading') && !this.get('allowNonExisting') && !this.get('debouncingState');\n }),\n\n enableClearButton: _ember['default'].computed('searchText', 'disabled', function () {\n return this.get('searchText') && !this.get('disabled');\n }),\n\n /*\n * Source filtering logic\n */\n searchTextDidChange: _ember['default'].observer('searchText', function () {\n var searchText = this.get('searchText');\n if (searchText !== this.get('previousSearchText')) {\n if (!this.get('allowNonExisting')) {\n this.set('model', null);\n } else {\n this.set('model', searchText);\n }\n\n this.sendAction('update-filter', searchText);\n\n this.set('debouncingState', true);\n _ember['default'].run.debounce(this, this.setDebouncedSearchText, this.get('delay'));\n this.set('previousSearchText', searchText);\n }\n }),\n\n modelDidChange: _ember['default'].observer('model', function () {\n var model = this.get('model');\n var value = this.lookupLabelOfItem(model);\n // First set previousSearchText then searchText ( do not trigger observer only update value! ).\n this.set('previousSearchText', value);\n this.set('searchText', value);\n this.set('hidden', true);\n }),\n\n setDebouncedSearchText: function setDebouncedSearchText() {\n var searchText = this.get('searchText');\n if (this.get('isMinLengthMet')) {\n this.sendAction('debounced-update-filter', searchText);\n if (!this.cacheGet(searchText)) {\n this.sendAction('cache-miss', searchText);\n } else {\n this.sendAction('cache-hit', searchText);\n }\n this.set('debouncedSearchText', searchText);\n\n // If the autocomplete is being triggered by a human / not on initial render.\n if (this.get('hasFocus') || this.get('noBlur')) {\n this.set('hidden', false);\n }\n } else {\n this.set('hidden', true);\n }\n this.set('debouncingState', false);\n },\n\n loading: _ember['default'].computed.bool('sourcePromiseArray.isPending').readOnly(),\n\n // coalesces all promises into PromiseArrays or Arrays\n sourcePromiseArray: _ember['default'].computed('source', function () {\n var source = this.get('source');\n if (source && source.then) {\n // coalesce into promise array\n return (0, _emberPaperUtilsPromiseProxies.promiseArray)(source);\n } else if (_ember['default'].isArray(source)) {\n // return array\n return _ember['default'].A(source);\n } else {\n // Unknown source type\n _ember['default'].assert('The provided \\'source\\' for paper-autocomplete must be an Array or a Promise.', !_ember['default'].isPresent(source));\n return _ember['default'].A();\n }\n }).readOnly(),\n\n suggestions: _ember['default'].computed('debouncedSearchText', 'sourcePromiseArray.[]', function () {\n var source = this.get('sourcePromiseArray');\n var lookupKey = this.get('lookupKey');\n var searchText = (this.get('debouncedSearchText') || '').toLowerCase();\n var cachedItems = this.cacheGet(searchText);\n var suggestions = undefined;\n\n if (cachedItems) {\n // We have cached results\n suggestions = cachedItems;\n } else {\n // no cache\n\n var data = this.filterArray(source, searchText, lookupKey);\n if (source.then && source.get('isFulfilled')) {\n // cache when we have a PromiseArray\n this.cacheSet(searchText, data);\n }\n suggestions = _ember['default'].A(data);\n }\n // If we have no item suggestions, and allowNonExisting is enabled\n // We need to close the paper-autocomplete-list so all mouse events get activated again.\n if (suggestions.length === 0 && this.get('allowNonExisting')) {\n this.set('hidden', true);\n }\n return suggestions;\n }).readOnly(),\n\n filterArray: function filterArray(array, searchText, lookupKey) {\n return array.filter(function (item) {\n _ember['default'].assert('You have not defined `lookupKey` on paper-autocomplete, when source contained\\n items that are not of type String. To fix this error provide a\\n lookupKey=`key to lookup from source item`.', isString(item) || _ember['default'].isPresent(lookupKey));\n\n _ember['default'].assert('You specified `lookupKey` as a lookupKey on paper-autocomplete,\\n but at least one of its values is not of type String. To fix this error make sure that every `lookupKey`\\n value is a string.', isString(item) || _ember['default'].isPresent(lookupKey) && isString(_ember['default'].get(item, lookupKey)));\n\n var search = isString(item) ? item.toLowerCase() : _ember['default'].get(item, lookupKey).toLowerCase();\n return search.indexOf(searchText) === 0;\n });\n },\n\n // TODO move cache to service? Components are not singletons.\n cacheGet: function cacheGet(text) {\n return !this.get('noCache') && this.get('itemCache')[text];\n },\n\n cacheSet: function cacheSet(text, data) {\n this.get('itemCache')[text] = data;\n },\n\n shouldHide: _ember['default'].computed.not('isMinLengthMet'),\n\n isMinLengthMet: _ember['default'].computed('searchText', 'minLength', function () {\n return this.get('searchText').length >= this.get('minLength');\n }),\n\n /*\n * Returns the default index based on whether or not autoselect is enabled.\n * @returns {number}\n */\n defaultIndex: _ember['default'].computed('autoselect', function () {\n return this.get('autoselect') ? 0 : -1;\n }),\n\n lookupLabelOfItem: function lookupLabelOfItem(model) {\n return this.get('lookupKey') ? _ember['default'].get(model, this.get('lookupKey')) : model;\n },\n\n actions: {\n clear: function clear() {\n this.set('searchText', '');\n this.set('selectedIndex', -1);\n this.set('model', null);\n this.set('hidden', this.get('shouldHide'));\n },\n\n pickModel: function pickModel(model) {\n this.set('model', model);\n var value = this.lookupLabelOfItem(model);\n // First set previousSearchText then searchText ( do not trigger observer only update value! ).\n this.set('previousSearchText', value);\n this.set('searchText', value);\n this.set('hidden', true);\n },\n\n inputFocusOut: function inputFocusOut() {\n this.set('hasFocus', false);\n if (this.get('noBlur') === false) {\n this.set('hidden', true);\n }\n },\n\n inputFocusIn: function inputFocusIn() {\n this.set('hasFocus', true);\n this.set('hidden', this.get('shouldHide'));\n },\n\n inputKeyDown: function inputKeyDown(value, event) {\n switch (event.keyCode) {\n case this.get('constants').KEYCODE.DOWN_ARROW:\n if (this.get('loading')) {\n return;\n }\n this.set('selectedIndex', Math.min(this.get('selectedIndex') + 1, this.get('suggestions').length - 1));\n break;\n case this.get('constants').KEYCODE.UP_ARROW:\n if (this.get('loading')) {\n return;\n }\n this.set('selectedIndex', this.get('selectedIndex') < 0 ? this.get('suggestions').length - 1 : Math.max(0, this.get('selectedIndex') - 1));\n break;\n case this.get('constants').KEYCODE.TAB:\n case this.get('constants').KEYCODE.ENTER:\n if (this.get('hidden') || this.get('loading') || this.get('selectedIndex') < 0 || this.get('suggestions').length < 1) {\n return;\n }\n this.send('pickModel', this.get('suggestions').objectAt(this.get('selectedIndex')));\n break;\n case this.get('constants').KEYCODE.ESCAPE:\n this.set('searchText', '');\n this.set('selectedIndex', this.get('defaultIndex'));\n this.set('model', null);\n this.set('hidden', this.get('shouldHide'));\n break;\n default:\n break;\n }\n },\n\n listMouseEnter: function listMouseEnter() {\n this.set('noBlur', true);\n },\n\n listMouseLeave: function listMouseLeave() {\n this.set('noBlur', false);\n if (this.get('hasFocus') === false) {\n this.set('hidden', true);\n }\n },\n\n listMouseUp: function listMouseUp() {\n this.$().find('input').focus();\n }\n }\n\n });\n});","define('ember-paper/components/paper-backdrop', ['exports', 'ember', 'ember-css-transitions/mixins/transition-mixin'], function (exports, _ember, _emberCssTransitionsMixinsTransitionMixin) {\n 'use strict';\n\n var Component = _ember['default'].Component;\n var computed = _ember['default'].computed;\n var htmlSafe = _ember['default'].String.htmlSafe;\n\n exports['default'] = Component.extend(_emberCssTransitionsMixinsTransitionMixin['default'], {\n\n tagName: 'md-backdrop',\n classNames: ['md-default-theme'],\n classNameBindings: ['opaque:md-opaque', 'isLockedOpen:md-locked-open'],\n attributeBindings: ['backdropStyle:style'],\n\n // TransitionMixin:\n transitionClass: 'ng',\n shouldTransition: computed.bool('opaque'),\n\n backdropStyle: computed('fixed', 'translateStyle', function () {\n var style = this.get('translateStyle');\n return this.get('fixed') ? htmlSafe('position:fixed; ' + style) : style;\n }),\n\n addDestroyedElementClone: function addDestroyedElementClone(parent, index, clone) {\n parent.append(clone);\n },\n\n click: function click(e) {\n e.preventDefault();\n this.sendAction('onClick', e);\n }\n\n });\n});","define('ember-paper/components/paper-button', ['exports', 'ember', 'ember-paper/components/base-focusable', 'ember-paper/mixins/ripple-mixin', 'ember-paper/mixins/proxiable-mixin', 'ember-paper/mixins/color-mixin'], function (exports, _ember, _emberPaperComponentsBaseFocusable, _emberPaperMixinsRippleMixin, _emberPaperMixinsProxiableMixin, _emberPaperMixinsColorMixin) {\n 'use strict';\n\n var computed = _ember['default'].computed;\n\n exports['default'] = _emberPaperComponentsBaseFocusable['default'].extend(_emberPaperMixinsRippleMixin['default'], _emberPaperMixinsProxiableMixin['default'], _emberPaperMixinsColorMixin['default'], {\n tagName: 'button',\n classNames: ['paper-button', 'md-default-theme', 'md-button'],\n raised: false,\n iconButton: false,\n fab: computed.reads('mini'), // circular button\n mini: false,\n type: 'button',\n href: null,\n target: null,\n attributeBindings: ['type', 'href', 'target'],\n classNameBindings: ['raised:md-raised', 'iconButton:md-icon-button', 'fab:md-fab', 'mini:md-mini'],\n\n // Ripple Overrides\n rippleContainerSelector: null,\n fitRipple: computed.readOnly('iconButton'),\n center: computed.readOnly('iconButton'),\n dimBackground: computed.not('iconButton'),\n\n init: function init() {\n this._super.apply(this, arguments);\n if (this.get('href')) {\n this.setProperties({\n tagName: 'a',\n type: null\n });\n }\n },\n\n click: function click(event) {\n this.sendAction('onClick', event);\n // Prevent bubbling, if specified. If undefined, the event will bubble.\n return this.get('bubbles');\n }\n });\n});","define('ember-paper/components/paper-card-actions', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n var Component = _ember['default'].Component;\n\n exports['default'] = Component.extend({\n tagName: 'md-card-actions',\n classNameBindings: ['defaultClasses'],\n\n didReceiveAttrs: function didReceiveAttrs() {\n this._super.apply(this, arguments);\n\n // if the consumer didn't set layout classes, we should set them\n // to the default (layout = row, layout align = end center)\n var providedClasses = this.get('class');\n\n if (!providedClasses || providedClasses.indexOf('layout-') === -1) {\n this.set('defaultClasses', 'layout-row layout-align-end-center');\n }\n }\n });\n});","define('ember-paper/components/paper-card-avatar', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n var Component = _ember['default'].Component;\n\n exports['default'] = Component.extend({\n tagName: 'md-card-avatar'\n });\n});","define('ember-paper/components/paper-card-content', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n var Component = _ember['default'].Component;\n\n exports['default'] = Component.extend({\n tagName: 'md-card-content'\n });\n});","define('ember-paper/components/paper-card-header-headline', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n var Component = _ember['default'].Component;\n\n exports['default'] = Component.extend({\n tagName: 'span',\n classNames: ['md-headline']\n });\n});","define('ember-paper/components/paper-card-header-subhead', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n var Component = _ember['default'].Component;\n\n exports['default'] = Component.extend({\n tagName: 'span',\n classNames: ['md-subhead']\n });\n});","define('ember-paper/components/paper-card-header-text', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n var Component = _ember['default'].Component;\n\n exports['default'] = Component.extend({\n tagName: 'md-card-header-text'\n });\n});","define('ember-paper/components/paper-card-header-title', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n var Component = _ember['default'].Component;\n\n exports['default'] = Component.extend({\n tagName: 'span',\n classNames: ['md-title']\n });\n});","define('ember-paper/components/paper-card-header', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n var Component = _ember['default'].Component;\n\n exports['default'] = Component.extend({\n tagName: 'md-card-header'\n });\n});","define('ember-paper/components/paper-card-icon-actions', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n var Component = _ember['default'].Component;\n\n exports['default'] = Component.extend({\n tagName: 'md-card-icon-actions'\n });\n});","define('ember-paper/components/paper-card-image', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n var Component = _ember['default'].Component;\n\n exports['default'] = Component.extend({\n tagName: 'img',\n classNames: ['md-card-image'],\n attributeBindings: ['src', 'title', 'alt']\n });\n});","define('ember-paper/components/paper-card-media', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n var Component = _ember['default'].Component;\n\n exports['default'] = Component.extend({\n tagName: '',\n size: 'md'\n });\n});","define('ember-paper/components/paper-card-title-media', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n var Component = _ember['default'].Component;\n\n exports['default'] = Component.extend({\n tagName: 'md-card-title-media',\n size: 'md'\n });\n});","define('ember-paper/components/paper-card-title-text', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n var Component = _ember['default'].Component;\n\n exports['default'] = Component.extend({\n tagName: 'md-card-title-text'\n });\n});","define('ember-paper/components/paper-card-title', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n var Component = _ember['default'].Component;\n\n exports['default'] = Component.extend({\n tagName: 'md-card-title'\n });\n});","define('ember-paper/components/paper-card', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n var Component = _ember['default'].Component;\n\n exports['default'] = Component.extend({\n tagName: 'md-card'\n });\n});","define('ember-paper/components/paper-checkbox', ['exports', 'ember', 'ember-paper/components/base-focusable', 'ember-paper/mixins/ripple-mixin', 'ember-paper/mixins/proxiable-mixin', 'ember-paper/mixins/color-mixin'], function (exports, _ember, _emberPaperComponentsBaseFocusable, _emberPaperMixinsRippleMixin, _emberPaperMixinsProxiableMixin, _emberPaperMixinsColorMixin) {\n 'use strict';\n\n var inject = _ember['default'].inject;\n var assert = _ember['default'].assert;\n\n exports['default'] = _emberPaperComponentsBaseFocusable['default'].extend(_emberPaperMixinsRippleMixin['default'], _emberPaperMixinsProxiableMixin['default'], _emberPaperMixinsColorMixin['default'], {\n tagName: 'md-checkbox',\n classNames: ['md-checkbox', 'md-default-theme'],\n classNameBindings: ['value:md-checked'],\n\n /* Ripple Overrides */\n rippleContainerSelector: '.md-container',\n center: true,\n dimBackground: false,\n fitRipple: true,\n\n /* BaseFocusable Overrides */\n focusOnlyOnKey: true,\n\n constants: inject.service(),\n\n value: false,\n\n init: function init() {\n this._super.apply(this, arguments);\n assert('{{paper-checkbox}} requires an `onChange` action or null for no action.', this.get('onChange') !== undefined);\n },\n\n click: function click() {\n if (!this.get('disabled')) {\n this.sendAction('onChange', !this.get('value'));\n }\n // Prevent bubbling, if specified. If undefined, the event will bubble.\n return this.get('bubbles');\n },\n\n keyPress: function keyPress(ev) {\n if (ev.which === this.get('constants.KEYCODE.SPACE') || ev.which === this.get('constants.KEYCODE.ENTER')) {\n ev.preventDefault();\n this.click();\n }\n },\n\n processProxy: function processProxy() {\n this.sendAction('onChange', !this.get('value'));\n }\n });\n});","define('ember-paper/components/paper-content', ['exports', 'ember', 'ember-paper/mixins/flex-mixin'], function (exports, _ember, _emberPaperMixinsFlexMixin) {\n 'use strict';\n\n exports['default'] = _ember['default'].Component.extend(_emberPaperMixinsFlexMixin['default'], {\n tagName: 'md-content',\n classNames: ['md-default-theme'],\n attributeBindings: ['layout-padding', 'scroll-y:md-scroll-y'],\n classNameBindings: ['padding:md-padding']\n });\n});","define('ember-paper/components/paper-dialog-actions', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n var Component = _ember['default'].Component;\n\n exports['default'] = Component.extend({\n tagName: 'md-dialog-actions'\n });\n});","define('ember-paper/components/paper-dialog-container', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n exports['default'] = _ember['default'].Component.extend({\n classNames: ['md-dialog-container'],\n\n click: function click() {\n this.sendAction('outsideClicked');\n }\n\n });\n});","define('ember-paper/components/paper-dialog-content', ['exports', 'ember', 'ember-paper/components/paper-dialog-inner'], function (exports, _ember, _emberPaperComponentsPaperDialogInner) {\n 'use strict';\n\n var Component = _ember['default'].Component;\n var computed = _ember['default'].computed;\n var run = _ember['default'].run;\n\n exports['default'] = Component.extend({\n tagName: 'md-dialog-content',\n classNames: ['md-dialog-content'],\n\n dialogInnerComponent: computed(function () {\n return this.nearestOfType(_emberPaperComponentsPaperDialogInner['default']);\n }),\n\n imagesLoaded: function imagesLoaded() {\n var content = this.get('element');\n this.get('dialogInnerComponent').set('contentOverflow', content.scrollHeight > content.clientHeight);\n },\n\n didInsertElement: function didInsertElement() {\n // content overflow might change depending on load of images inside dialog.\n var images = this.$().find('img');\n images.load(run.bind(this, this.imagesLoaded));\n }\n });\n});","define('ember-paper/components/paper-dialog-inner', ['exports', 'ember', 'ember-paper/mixins/translate3d-mixin'], function (exports, _ember, _emberPaperMixinsTranslate3dMixin) {\n 'use strict';\n\n var Component = _ember['default'].Component;\n\n exports['default'] = Component.extend(_emberPaperMixinsTranslate3dMixin['default'], {\n tagName: 'md-dialog',\n classNames: ['md-default-theme'],\n classNameBindings: ['contentOverflow:md-content-overflow', 'fullscreen:md-dialog-fullscreen'],\n\n onTranslateFromEnd: function onTranslateFromEnd() {\n if (this.get('focusOnOpen')) {\n var toFocus = this.$('[autofocus]').last();\n if (toFocus.length === 0) {\n toFocus = this.$('md-dialog-actions button').last();\n }\n toFocus.focus();\n }\n },\n\n onTranslateToEnd: function onTranslateToEnd($origin) {\n if ($origin) {\n $origin.focus();\n }\n },\n\n click: function click(ev) {\n if (this.get('clickOutsideToClose')) {\n ev.stopPropagation();\n return false;\n }\n }\n\n });\n});","define('ember-paper/components/paper-dialog', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n var $ = _ember['default'].$;\n var Component = _ember['default'].Component;\n var computed = _ember['default'].computed;\n var inject = _ember['default'].inject;\n\n exports['default'] = Component.extend({\n tagName: '',\n\n escapeToClose: true,\n focusOnOpen: true,\n\n // Calculate a default that is always valid for the parent of the backdrop.\n wormholeSelector: '#paper-wormhole',\n defaultedParent: computed.or('parent', 'wormholeSelector'),\n\n // Calculate a default that is always valid where the opening transition should originate.\n defaultedOpenFrom: computed.or('openFrom', 'origin', 'parent'),\n\n // Calculate a default that is always valid where the closing transition should terminate.\n defaultedCloseTo: computed.or('closeTo', 'origin', 'parent'),\n\n // Calculate the id of the wormhole destination, setting it if need be. The\n // id is that of the 'parent', if provided, or 'paper-wormhole' if not.\n destinationId: computed('defaultedParent', function () {\n var parent = this.get('defaultedParent');\n var $parent = $(parent);\n // If the parent isn't found, assume that it is an id, but that the DOM doesn't\n // exist yet. This only happens during integration tests or if entire application\n // route is a dialog.\n if ($parent.length === 0 && parent.charAt(0) === '#') {\n return parent.substring(1);\n } else {\n var id = $parent.attr('id');\n if (!id) {\n id = this.elementId + '-parent';\n $parent.get(0).id = id;\n }\n return id;\n }\n }),\n\n constants: inject.service(),\n\n didInsertElement: function didInsertElement() {\n var _this = this;\n\n this._super.apply(this, arguments);\n if (this.get('escapeToClose')) {\n $(this.get('defaultedParent')).on('keydown.' + this.elementId, function (e) {\n if (e.keyCode === _this.get('constants.KEYCODE.ESCAPE') && _this.get('onClose')) {\n _this.sendAction('onClose');\n }\n });\n }\n },\n\n willDestroyElement: function willDestroyElement() {\n this._super.apply(this, arguments);\n if (this.get('escapeToClose')) {\n $(this.get('defaultedParent')).off('keydown.' + this.elementId);\n }\n },\n\n actions: {\n outsideClicked: function outsideClicked() {\n if (this.get('clickOutsideToClose') && this.get('onClose')) {\n this.sendAction('onClose');\n }\n }\n }\n });\n});","define('ember-paper/components/paper-divider', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n var Component = _ember['default'].Component;\n\n exports['default'] = Component.extend({\n tagName: 'md-divider',\n attributeBindings: ['insetAttr:md-inset'],\n inset: false,\n classNames: ['paper-divider', 'md-default-theme'],\n\n /*\n * Not binding boolean values in Ember 1.8.1?\n * https://github.com/emberjs/ember.js/issues/9595\n */\n insetAttr: _ember['default'].computed('inset', function () {\n return this.get('inset') ? 'md-inset' : null;\n })\n });\n});","define('ember-paper/components/paper-grid-list', ['exports', 'ember', 'ember-paper/utils/grid-layout'], function (exports, _ember, _emberPaperUtilsGridLayout) {\n 'use strict';\n\n var UNIT = function UNIT(units) {\n return units.share + '% - (' + units.gutter + ' * ' + units.gutterShare + ')';\n };\n\n var POSITION = function POSITION(positions) {\n return 'calc((' + positions.unit + ' + ' + positions.gutter + ') * ' + positions.offset + ')';\n };\n\n var DIMENSION = function DIMENSION(dimensions) {\n return 'calc((' + dimensions.unit + ') * ' + dimensions.span + ' + (' + dimensions.span + ' - 1) * ' + dimensions.gutter + ')';\n };\n\n var MEDIA = function MEDIA(mediaName) {\n return mediaName.charAt(0) !== '(' ? '(' + mediaName + ')' : mediaName;\n };\n\n exports['default'] = _ember['default'].Component.extend({\n tagName: 'md-grid-list',\n\n constants: _ember['default'].inject.service(),\n\n layoutInvalidated: false,\n tilesInvalidated: false,\n lastLayoutProps: {},\n tiles: _ember['default'].computed(function () {\n return _ember['default'].A();\n }),\n\n _invalidateLayoutListener: _ember['default'].computed(function () {\n var _this = this;\n\n return _ember['default'].run.bind(this, function () {\n _this.send('invalidateLayout');\n });\n }),\n\n didInsertElement: function didInsertElement() {\n this._super.apply(this, arguments);\n this._watchMedia();\n this._watchResponsiveAttributes(['md-cols', 'md-row-height', 'md-gutter'], _ember['default'].run.bind(this, this.layoutIfMediaMatch));\n },\n\n willDestroyElement: function willDestroyElement() {\n this._super.apply(this, arguments);\n this._unwatchMedia();\n },\n\n registerGridTile: function registerGridTile(gridTile) {\n this.get('tiles').addObject(gridTile);\n },\n\n layout: function layout() {\n try {\n var tilesInvalidated = this.get('tilesInvalidated');\n this._layoutDelegate(tilesInvalidated);\n } finally {\n this.setProperties({\n 'layoutInvalidated': false,\n 'tilesInvalidated': false\n });\n }\n },\n\n layoutIfMediaMatch: function layoutIfMediaMatch(mediaName) {\n if (mediaName == null) {\n this.send('invalidateLayout');\n } else if (window.matchMedia(mediaName)) {\n this.send('invalidateLayout');\n }\n },\n\n _watchMedia: function _watchMedia() {\n\n var invalidateLayoutListener = this.get('_invalidateLayoutListener');\n\n for (var mediaName in this.get('constants.MEDIA')) {\n var query = this.get('constants.MEDIA')[mediaName] || MEDIA(mediaName);\n window.matchMedia(query).addListener(invalidateLayoutListener);\n }\n },\n\n _watchResponsiveAttributes: function _watchResponsiveAttributes(attrNames, watchFn) {\n var _this2 = this;\n\n var checkObserverValues = function checkObserverValues(sender, key, mediaName) {\n var oldValue = sender.get('old' + key);\n var newValue = sender.get(key);\n\n if (oldValue !== newValue) {\n watchFn(mediaName);\n }\n };\n\n attrNames.forEach(function (attrName) {\n if (_ember['default'].get(_this2, attrName)) {\n _this2.set('old' + attrName, _ember['default'].get(_this2, attrName));\n\n var customObserver = _ember['default'].run.bind(_this2, checkObserverValues, _this2, attrName);\n\n _this2.addObserver(attrName, customObserver);\n }\n\n for (var mediaName in _this2.get('constants.MEDIA')) {\n var normalizedName = attrName + '-' + mediaName;\n if (_ember['default'].get(_this2, normalizedName)) {\n var customObserverNormalized = _ember['default'].run.bind(_this2, checkObserverValues, _this2, normalizedName, mediaName);\n _this2.addObserver(normalizedName, customObserverNormalized);\n }\n }\n });\n },\n\n _unwatchMedia: function _unwatchMedia() {\n var invalidateLayoutListener = this.get('_invalidateLayoutListener');\n for (var mediaName in this.get('constants.MEDIA')) {\n var query = this.get('constants.MEDIA')[mediaName] || MEDIA(mediaName);\n window.matchMedia(query).removeListener(invalidateLayoutListener);\n }\n },\n\n _getResponsiveAttribute: function _getResponsiveAttribute(component, attrName) {\n var mediaPriorities = this.get('constants.MEDIA_PRIORITY');\n for (var i = 0; i < mediaPriorities.length; i++) {\n var mediaName = mediaPriorities[i];\n var query = this.get('constants.MEDIA')[mediaName] || MEDIA(mediaName);\n\n if (!window.matchMedia(query).matches) {\n continue;\n }\n\n var normalizedName = attrName + '-' + mediaName;\n if (_ember['default'].get(component, normalizedName)) {\n return _ember['default'].get(component, normalizedName);\n }\n }\n\n // fallback on unprefixed\n return _ember['default'].get(component, attrName);\n },\n\n _getTileStyle: function _getTileStyle(position, spans, colCount, rowCount, gutter, rowMode, rowHeight) {\n\n // Percent of the available horizontal space that one column takes up.\n var hShare = 1 / colCount * 100;\n\n // Fraction of the gutter size that each column takes up.\n var hGutterShare = (colCount - 1) / colCount;\n\n // Base horizontal size of a column.\n var hUnit = UNIT({ share: hShare, gutterShare: hGutterShare, gutter: gutter });\n\n // The width and horizontal position of each tile is always calculated the same way, but the\n // height and vertical position depends on the rowMode.\n var style = {\n left: POSITION({ unit: hUnit, offset: position.col, gutter: gutter }),\n width: DIMENSION({ unit: hUnit, span: spans.col, gutter: gutter }),\n // resets\n paddingTop: '',\n marginTop: '',\n top: '',\n height: ''\n };\n\n var vShare = undefined;\n var vUnit = undefined;\n\n switch (rowMode) {\n case 'fixed':\n // In fixed mode, simply use the given rowHeight.\n style.top = POSITION({ unit: rowHeight, offset: position.row, gutter: gutter });\n style.height = DIMENSION({ unit: rowHeight, span: spans.row, gutter: gutter });\n break;\n\n case 'ratio':\n // Percent of the available vertical space that one row takes up. Here, rowHeight holds\n // the ratio value. For example, if the width:height ratio is 4:3, rowHeight = 1.333.\n vShare = hShare / rowHeight;\n\n // Base veritcal size of a row.\n vUnit = UNIT({ share: vShare, gutterShare: hGutterShare, gutter: gutter });\n\n // padidngTop and marginTop are used to maintain the given aspect ratio, as\n // a percentage-based value for these properties is applied to the *width* of the\n // containing block. See http://www.w3.org/TR/CSS2/box.html#margin-properties\n style.paddingTop = DIMENSION({ unit: vUnit, span: spans.row, gutter: gutter });\n style.marginTop = POSITION({ unit: vUnit, offset: position.row, gutter: gutter });\n break;\n\n case 'fit':\n // Fraction of the gutter size that each column takes up.\n var vGutterShare = (rowCount - 1) / rowCount;\n\n // Percent of the available vertical space that one row takes up.\n vShare = 1 / rowCount * 100;\n\n // Base vertical size of a row.\n vUnit = UNIT({ share: vShare, gutterShare: vGutterShare, gutter: gutter });\n\n style.top = POSITION({ unit: vUnit, offset: position.row, gutter: gutter });\n style.height = DIMENSION({ unit: vUnit, span: spans.row, gutter: gutter });\n break;\n }\n\n return style;\n },\n\n _getGridStyle: function _getGridStyle(colCount, rowCount, gutter, rowMode, rowHeight) {\n var style = {};\n\n switch (rowMode) {\n case 'fixed':\n style.height = DIMENSION({ unit: rowHeight, span: rowCount, gutter: gutter });\n style.paddingBottom = '';\n break;\n case 'ratio':\n // rowHeight is width / height\n var hGutterShare = colCount === 1 ? 0 : (colCount - 1) / colCount;\n var hShare = 1 / colCount * 100;\n var vShare = hShare * (1 / rowHeight);\n var vUnit = UNIT({ share: vShare, gutterShare: hGutterShare, gutter: gutter });\n\n style.height = '';\n style.paddingBottom = DIMENSION({ unit: vUnit, span: rowCount, gutter: gutter });\n break;\n case 'fit':\n // noop, as the height is user set\n break;\n }\n\n return style;\n },\n\n _getTileSpans: function _getTileSpans(tileElements) {\n var _this3 = this;\n\n return [].map.call(tileElements, function (ele) {\n return {\n row: parseInt(_this3._getResponsiveAttribute(ele, 'md-rowspan'), 10) || 1,\n col: parseInt(_this3._getResponsiveAttribute(ele, 'md-colspan'), 10) || 1\n };\n });\n },\n\n _getColumnCount: function _getColumnCount() {\n var colCount = parseInt(this._getResponsiveAttribute(this, 'md-cols'), 10);\n if (isNaN(colCount)) {\n throw 'md-grid-list: md-cols attribute was not found, or contained a non-numeric value';\n }\n return colCount;\n },\n\n _getGutter: function _getGutter() {\n return this._applyDefaultUnit(this._getResponsiveAttribute(this, 'md-gutter') || 1);\n },\n\n _getRowHeight: function _getRowHeight() {\n var rowHeight = this._getResponsiveAttribute(this, 'md-row-height');\n switch (this._getRowMode()) {\n case 'fixed':\n return this._applyDefaultUnit(rowHeight);\n case 'ratio':\n var whRatio = rowHeight.split(':');\n return parseFloat(whRatio[0]) / parseFloat(whRatio[1]);\n case 'fit':\n return 0;\n }\n },\n\n _getRowMode: function _getRowMode() {\n var rowHeight = this._getResponsiveAttribute(this, 'md-row-height');\n if (rowHeight === 'fit') {\n return 'fit';\n } else if (rowHeight.indexOf(':') !== -1) {\n return 'ratio';\n } else {\n return 'fixed';\n }\n },\n\n _layoutDelegate: function _layoutDelegate(tilesInvalidated) {\n var _this4 = this;\n\n var tiles = this.get('tiles');\n var props = {\n tileSpans: this._getTileSpans(tiles),\n colCount: this._getColumnCount(),\n rowMode: this._getRowMode(),\n rowHeight: this._getRowHeight(),\n gutter: this._getGutter()\n };\n\n if (!tilesInvalidated && _ember['default'].isEqual(props, this.get('lastLayoutProps'))) {\n return;\n }\n\n (0, _emberPaperUtilsGridLayout['default'])(props.colCount, props.tileSpans, tiles).map(function (tilePositions, rowCount) {\n return {\n grid: {\n element: _this4.$(),\n style: _this4._getGridStyle(props.colCount, rowCount, props.gutter, props.rowMode, props.rowHeight)\n },\n tiles: tilePositions.map(function (ps, i) {\n return {\n element: tiles[i].$(),\n style: _this4._getTileStyle(ps.position, ps.spans, props.colCount, rowCount, props.gutter, props.rowMode, props.rowHeight)\n };\n })\n };\n }).reflow();\n\n this.set('lastLayoutProps', props);\n },\n\n _applyDefaultUnit: function _applyDefaultUnit(val) {\n return (/\\D$/.test(val) ? val : val + 'px'\n );\n },\n\n actions: {\n invalidateTiles: function invalidateTiles() {\n this.set('tilesInvalidated', true);\n this.send('invalidateLayout');\n },\n\n invalidateLayout: function invalidateLayout() {\n if (this.get('layoutInvalidated') || this.get('isDestroyed') || this.get('isDestroying')) {\n return;\n }\n this.set('layoutInvalidated', true);\n _ember['default'].run.next(this, this.layout);\n }\n }\n });\n});","define('ember-paper/components/paper-grid-tile-footer', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n exports['default'] = _ember['default'].Component.extend({\n tagName: 'md-grid-tile-footer'\n });\n});","define('ember-paper/components/paper-grid-tile', ['exports', 'ember', 'ember-paper/components/paper-grid-list'], function (exports, _ember, _emberPaperComponentsPaperGridList) {\n 'use strict';\n\n exports['default'] = _ember['default'].Component.extend({\n tagName: 'md-grid-tile',\n\n constants: _ember['default'].inject.service(),\n\n didInsertElement: function didInsertElement() {\n var _this = this;\n\n this._super.apply(this, arguments);\n\n this.get('gridList').registerGridTile(this);\n this.get('gridList').send('invalidateTiles');\n\n this._watchResponsiveAttributes(['md-colspan', 'md-rowspan'], function (mediaName) {\n _this.get('gridList').send('invalidateLayout', mediaName);\n });\n },\n\n willDestroyElement: function willDestroyElement() {\n this._super.apply(this, arguments);\n\n this.get('gridList').send('invalidateLayout');\n },\n\n gridList: _ember['default'].computed(function () {\n return this.nearestOfType(_emberPaperComponentsPaperGridList['default']);\n }),\n\n _watchResponsiveAttributes: function _watchResponsiveAttributes(attrNames, watchFn) {\n var _this2 = this;\n\n var checkObserverValues = function checkObserverValues(sender, key) {\n var oldValue = _this2.get('old' + key);\n var newValue = sender.get(key);\n\n if (oldValue !== newValue) {\n watchFn();\n }\n };\n\n attrNames.forEach(function (attrName) {\n if (_ember['default'].get(_this2, attrName)) {\n _this2.set('old' + attrName, _ember['default'].get(_this2, attrName));\n\n _this2.addObserver(attrName, checkObserverValues);\n }\n\n for (var mediaName in _this2.get('constants.MEDIA')) {\n var normalizedName = attrName + '-' + mediaName;\n if (_ember['default'].get(_this2, normalizedName)) {\n _this2.set('old' + normalizedName, _ember['default'].get(_this2, normalizedName));\n\n _this2.addObserver(normalizedName, checkObserverValues);\n }\n }\n });\n }\n\n });\n});","define('ember-paper/components/paper-icon', ['exports', 'ember', 'ember-paper/mixins/color-mixin'], function (exports, _ember, _emberPaperMixinsColorMixin) {\n 'use strict';\n\n var Component = _ember['default'].Component;\n var computed = _ember['default'].computed;\n var Str = _ember['default'].String;\n\n var PaperIconComponent = Component.extend(_emberPaperMixinsColorMixin['default'], {\n tagName: 'md-icon',\n classNames: ['paper-icon', 'md-font', 'material-icons', 'md-default-theme'],\n classNameBindings: ['spinClass'],\n attributeBindings: ['aria-label', 'title', 'sizeStyle:style'],\n\n icon: '',\n spin: false,\n reverseSpin: false,\n\n iconClass: computed('icon', 'positionalIcon', function () {\n var icon = this.getWithDefault('positionalIcon', this.get('icon'));\n return icon;\n }),\n\n 'aria-label': computed.reads('iconClass'),\n\n spinClass: computed('spin', 'reverseSpin', function () {\n if (this.get('spin')) {\n return 'md-spin';\n } else if (this.get('reverseSpin')) {\n return 'md-spin-reverse';\n }\n }),\n\n sizeStyle: computed('size', function () {\n var size = this.get('size');\n\n if (size) {\n return Str.htmlSafe('height: ' + size + 'px; font-size: ' + size + 'px;');\n }\n })\n });\n\n PaperIconComponent.reopenClass({\n positionalParams: ['positionalIcon']\n });\n\n exports['default'] = PaperIconComponent;\n});","define('ember-paper/components/paper-input', ['exports', 'ember', 'ember-paper/components/base-focusable', 'ember-paper/mixins/color-mixin', 'ember-paper/mixins/flex-mixin', 'ember-paper/validators/required', 'ember-paper/validators/min', 'ember-paper/validators/max', 'ember-paper/validators/minlength', 'ember-paper/validators/maxlength'], function (exports, _ember, _emberPaperComponentsBaseFocusable, _emberPaperMixinsColorMixin, _emberPaperMixinsFlexMixin, _emberPaperValidatorsRequired, _emberPaperValidatorsMin, _emberPaperValidatorsMax, _emberPaperValidatorsMinlength, _emberPaperValidatorsMaxlength) {\n 'use strict';\n\n var $ = _ember['default'].$;\n var computed = _ember['default'].computed;\n var isArray = _ember['default'].isArray;\n var isEmpty = _ember['default'].isEmpty;\n var Logger = _ember['default'].Logger;\n var A = _ember['default'].A;\n var run = _ember['default'].run;\n var assert = _ember['default'].assert;\n var get = _ember['default'].get;\n\n exports['default'] = _emberPaperComponentsBaseFocusable['default'].extend(_emberPaperMixinsColorMixin['default'], _emberPaperMixinsFlexMixin['default'], {\n tagName: 'md-input-container',\n classNames: ['md-default-theme'],\n classNameBindings: ['hasValue:md-input-has-value', 'isInvalidAndTouched:md-input-invalid', 'eitherIcon:md-has-icon', 'iconRight:md-icon-right', 'focused:md-input-focused', 'block:md-block'],\n type: 'text',\n autofocus: false,\n tabindex: null,\n hideAllMessages: false,\n isTouched: false,\n lastIsInvalid: undefined,\n\n hasValue: computed('value', 'isNativeInvalid', function () {\n var value = this.get('value');\n var isNativeInvalid = this.get('isNativeInvalid');\n return !isEmpty(value) || isNativeInvalid;\n }),\n\n inputElementId: computed('elementId', function () {\n return 'input-' + this.get('elementId');\n }),\n\n /**\n * The result of isInvalid is appropriate for controlling the display of\n * validation error messages. It also may be used to distinguish whether\n * the input would be considered valid after it is touched.\n *\n * @public\n *\n * @return {boolean} Whether the input is or would be invalid.\n * false: input is valid (touched or not), or is no longer rendered\n * true: input has been touched and is invalid.\n */\n isInvalid: computed.or('validationErrorMessages.length', 'isNativeInvalid'),\n\n isInvalidAndTouched: computed.and('isInvalid', 'isTouched'),\n\n renderCharCount: computed('value', function () {\n var currentLength = this.get('value') ? this.get('value').length : 0;\n return currentLength + '/' + this.get('maxlength');\n }),\n\n eitherIcon: computed.or('icon', 'iconRight'),\n\n /**\n * Return the built-in validations.\n *\n * May be overridden to provide additional built-in validations. Be sure to\n * call this._super() to retrieve the standard validations.\n *\n * @public\n */\n validations: function validations() {\n return [_emberPaperValidatorsRequired['default'], _emberPaperValidatorsMin['default'], _emberPaperValidatorsMax['default'], _emberPaperValidatorsMinlength['default'], _emberPaperValidatorsMaxlength['default']];\n },\n\n customValidations: [],\n errors: [],\n\n /**\n * Computed property that validate the input and return an array of error\n * objects, each with an ng-message code and an error message.\n *\n * @public\n */\n validationErrorMessages: computed('value', 'errors.[]', 'customValidations.[]', function () {\n var _this = this;\n\n var validations = A();\n var messages = A();\n\n // built-in validations\n validations.pushObjects(this.validations());\n\n // custom validations\n var customValidations = this.get('customValidations');\n assert('`customValidations` must be an array', isArray(customValidations));\n validations.pushObjects(customValidations);\n\n // execute validations\n var currentValue = this.get('value');\n validations.forEach(function (validation) {\n assert('validation must include an `validate(value)` function', validation && validation.validate && typeof validation.validate === 'function');\n try {\n var valParam = get(validation, 'param');\n var paramValue = valParam ? _this.get(valParam) : undefined;\n if (!validation.validate(currentValue, paramValue)) {\n var message = _this.get('errorMessages.' + valParam) || get(validation, 'message');\n messages.pushObject({\n message: _ember['default'].String.loc(message.string || message, paramValue, currentValue)\n });\n }\n } catch (error) {\n Logger.error('Exception with validation: ', validation, error);\n }\n });\n\n // error messages array\n var errors = this.get('errors') || [];\n assert('`errors` must be an array', isArray(errors));\n messages.pushObjects(errors.map(function (e) {\n return get(e, 'message') ? e : { message: e };\n }));\n\n return messages;\n }),\n\n // Lifecycle hooks\n didReceiveAttrs: function didReceiveAttrs() {\n this._super.apply(this, arguments);\n assert('{{paper-input}} and {{paper-select}} require an `onChange` action or null for no action.', this.get('onChange') !== undefined);\n this.notifyInvalid();\n },\n\n didInsertElement: function didInsertElement() {\n this._super.apply(this, arguments);\n if (this.get('textarea')) {\n $(window).on('resize.' + this.elementId, run.bind(this, this.growTextarea));\n }\n },\n\n didRender: function didRender() {\n this.growTextarea();\n // setValue below ensures that the input value is the same as this.value\n this.setValue(this.get('value'));\n },\n\n willClearRender: function willClearRender() {\n this.sendAction('onInvalid', false);\n },\n\n willDestroyElement: function willDestroyElement() {\n if (this.get('textarea')) {\n $(window).off('resize.' + this.elementId);\n }\n },\n\n growTextarea: function growTextarea() {\n if (this.get('textarea')) {\n var inputElement = this.$('input, textarea');\n inputElement.addClass('md-no-flex').attr('rows', 1);\n\n var minRows = this.get('passThru.rows');\n\n if (minRows) {\n if (!this.lineHeight) {\n inputElement.get(0).style.minHeight = 0;\n this.lineHeight = inputElement.get(0).clientHeight;\n inputElement.get(0).style.minHeight = null;\n }\n\n var newRows = Math.round(Math.round(this.getHeight(inputElement) / this.lineHeight));\n var rowsToSet = Math.min(newRows, minRows);\n\n inputElement.css('height', this.lineHeight * rowsToSet + 'px').attr('rows', rowsToSet).toggleClass('md-textarea-scrollable', newRows >= minRows);\n } else {\n inputElement.css('height', 'auto');\n inputElement.get(0).scrollTop = 0;\n var height = this.getHeight(inputElement);\n if (height) {\n inputElement.css('height', height + 'px');\n }\n }\n\n inputElement.removeClass('md-no-flex');\n }\n },\n\n getHeight: function getHeight(inputElement) {\n var _inputElement$get = inputElement.get(0);\n\n var offsetHeight = _inputElement$get.offsetHeight;\n\n var line = inputElement.get(0).scrollHeight - offsetHeight;\n return offsetHeight + (line > 0 ? line : 0);\n },\n\n notifyInvalid: function notifyInvalid() {\n var isInvalid = this.get('isInvalid');\n var lastIsInvalid = this.get('lastIsInvalid');\n if (lastIsInvalid !== isInvalid) {\n this.sendAction('onInvalid', isInvalid);\n this.set('lastIsInvalid', isInvalid);\n }\n },\n\n setValue: function setValue(value) {\n this.$('input, textarea').val(value);\n },\n\n actions: {\n handleInput: function handleInput(e) {\n this.sendAction('onChange', e.target.value);\n // setValue below ensures that the input value is the same as this.value\n this.setValue(this.get('value'));\n this.growTextarea();\n var inputElement = this.$('input').get(0);\n this.set('isNativeInvalid', inputElement && inputElement.validity && inputElement.validity.badInput);\n this.notifyInvalid();\n },\n\n handleBlur: function handleBlur(e) {\n this.sendAction('onBlur', e);\n this.set('isTouched', true);\n this.notifyInvalid();\n }\n }\n });\n});","define('ember-paper/components/paper-item', ['exports', 'ember', 'ember-paper/mixins/ripple-mixin', 'ember-paper/mixins/proxy-mixin'], function (exports, _ember, _emberPaperMixinsRippleMixin, _emberPaperMixinsProxyMixin) {\n 'use strict';\n\n var get = _ember['default'].get;\n var set = _ember['default'].set;\n var isEmpty = _ember['default'].isEmpty;\n var computed = _ember['default'].computed;\n var run = _ember['default'].run;\n var Component = _ember['default'].Component;\n\n exports['default'] = Component.extend(_emberPaperMixinsRippleMixin['default'], _emberPaperMixinsProxyMixin['default'], {\n tagName: 'md-list-item',\n\n // Ripple Overrides\n rippleContainerSelector: '.md-no-style',\n center: false,\n dimBackground: true,\n outline: false,\n\n classNameBindings: ['shouldBeClickable:md-clickable', 'hasProxiedComponent:md-proxy-focus'],\n attributeBindings: ['role', 'tabindex'],\n role: 'listitem',\n tabindex: '-1',\n\n hasProxiedComponent: computed.bool('proxiedComponents.length'),\n\n hasPrimaryAction: computed.notEmpty('onClick'),\n\n hasSecondaryAction: computed('secondaryItem', 'onClick', function () {\n var secondaryItem = get(this, 'secondaryItem');\n if (!isEmpty(secondaryItem)) {\n var hasClickAction = get(secondaryItem, 'onClick');\n var hasChangeAction = get(secondaryItem, 'onChange');\n return hasClickAction || hasChangeAction;\n } else {\n return false;\n }\n }),\n\n secondaryItem: computed('proxiedComponents.[]', function () {\n var proxiedComponents = get(this, 'proxiedComponents');\n return proxiedComponents.find(function (component) {\n return get(component, 'isSecondary');\n });\n }),\n\n shouldBeClickable: computed.or('proxiedComponents.length', 'onClick'),\n\n click: function click(ev) {\n var _this = this;\n\n this.get('proxiedComponents').forEach(function (component) {\n if (component.processProxy && !get(component, 'disabled') && get(component, 'bubbles') | !get(_this, 'hasPrimaryAction')) {\n component.processProxy();\n }\n });\n this.sendAction('onClick', ev);\n },\n\n setupProxiedComponent: function setupProxiedComponent() {\n var _this2 = this;\n\n var tEl = this.$();\n var proxiedComponents = get(this, 'proxiedComponents');\n proxiedComponents.forEach(function (component) {\n var isProxyHandlerSet = get(component, 'isProxyHandlerSet');\n // we run init only once for each component.\n if (!isProxyHandlerSet) {\n (function () {\n // Allow proxied component to propagate ripple hammer event\n if (!get(component, 'onClick') && !get(component, 'propagateRipple')) {\n set(component, 'propagateRipple', true);\n }\n // ripple\n var el = component.$();\n set(_this2, 'mouseActive', false);\n el.on('mousedown', function () {\n set(_this2, 'mouseActive', true);\n run.later(function () {\n set(_this2, 'mouseActive', false);\n }, 100);\n });\n el.on('focus', function () {\n if (!get(_this2, 'mouseActive')) {\n tEl.addClass('md-focused');\n }\n el.on('blur', function proxyOnBlur() {\n tEl.removeClass('md-focused');\n el.off('blur', proxyOnBlur);\n });\n });\n // If we don't have primary action then\n // no need to bubble\n if (!get(_this2, 'hasPrimaryAction')) {\n var bubbles = get(component, 'bubbles');\n if (isEmpty(bubbles)) {\n set(component, 'bubbles', false);\n }\n } else if (get(proxiedComponents, 'length')) {\n // primary action exists. Make sure child\n // that has separate action won't bubble.\n proxiedComponents.forEach(function (component) {\n var hasClickAction = get(component, 'onClick');\n var hasChangeAction = get(component, 'onChange');\n if (hasClickAction || hasChangeAction) {\n var bubbles = get(component, 'bubbles');\n if (isEmpty(bubbles)) {\n set(component, 'bubbles', false);\n }\n }\n });\n }\n // Init complete. We don't want it to run again\n // for that particular component.\n set(component, 'isProxyHandlerSet', true);\n })();\n }\n });\n }\n });\n});","define('ember-paper/components/paper-list', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n exports['default'] = _ember['default'].Component.extend({\n tagName: 'md-list',\n classNames: ['paper-list', 'md-default-theme']\n });\n});","define('ember-paper/components/paper-menu-abstract', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n var Component = _ember['default'].Component;\n var inject = _ember['default'].inject;\n var assert = _ember['default'].assert;\n\n exports['default'] = Component.extend({\n constants: inject.service(),\n\n /* `isOpen` true when toggleMenu action is called, but only turns false when animation to hide the wrapper is done. */\n isOpen: false,\n\n /* Supports `getItems` that can return a promise, menu is not opened before this promise is resolved by the origin. */\n getItems: null,\n\n /* async: is true if promise was not resolved. */\n isLoading: false,\n\n /* cache async requests */\n cache: true,\n\n preventMenuOpen: false,\n\n setOpen: function setOpen(newState) {\n this.set('isOpen', newState);\n this.sendAction(newState ? 'onOpenMenu' : 'onCloseMenu');\n },\n\n actions: {\n\n toggleMenu: function toggleMenu() {\n var _this = this;\n\n if (this.get('isOpen')) {\n this.get('activeWrapper').hideWrapper().then(function () {\n _this.setOpen(false);\n });\n } else {\n if (this.get('preventMenuOpen')) {\n return;\n }\n if (this.get('getItems') && (!this.get('items') || !this.get('cache'))) {\n this.set('activeWrapper', null);\n this.set('isLoading', true);\n this.setOpen(true);\n var promise = this.get('getItems').call(this);\n promise.then(function (data) {\n _this.set('items', data);\n _this.set('isLoading', false);\n }, function () {\n _this.set('items', _ember['default'].A([]));\n _this.setOpen(false);\n _this.set('isLoading', false);\n });\n } else {\n this.set('activeWrapper', null);\n this.setOpen(true);\n }\n }\n }\n },\n\n didReceiveAttrs: function didReceiveAttrs() {\n var _this2 = this;\n\n _ember['default'].run.scheduleOnce('afterRender', function () {\n var wrapper = _this2.get('activeWrapper');\n if (wrapper && !wrapper.get('isDestroyed') && !wrapper.get('isDestroying')) {\n _this2.positionMenu(wrapper.$());\n }\n });\n },\n\n registerWrapper: function registerWrapper(component) {\n this.set('activeWrapper', component);\n this.positionMenu(component.$());\n },\n\n positionMenu: function positionMenu(el) {\n assert('Override positionMenu to create custom animation for the menu component: ' + el + ' ' + this.get('activeWrapper'));\n }\n\n });\n});","define('ember-paper/components/paper-menu-container-abstract', ['exports', 'ember', 'ember-paper/components/paper-menu-abstract'], function (exports, _ember, _emberPaperComponentsPaperMenuAbstract) {\n 'use strict';\n\n /*\n * The paper-menu-container-abstract is responsible for animation and positioning the menu / select / any other\n * menu based component.\n *\n */\n exports['default'] = _ember['default'].Component.extend({\n transitionEvents: _ember['default'].inject.service(),\n constants: _ember['default'].inject.service(),\n\n classNames: ['md-default-theme'],\n classNameBindings: ['interaction:md-clickable'],\n\n menuAbstract: _ember['default'].computed(function () {\n var container = this.nearestOfType(_emberPaperComponentsPaperMenuAbstract['default']);\n return container;\n }),\n\n _resizeHandler: _ember['default'].computed(function () {\n var _this = this;\n\n return function () {\n _this.get('menuAbstract').registerWrapper(_this);\n };\n }),\n\n moveComponentToBody: _ember['default'].on('didInsertElement', function () {\n var _self = this;\n var dom = this.$().detach();\n _ember['default'].$('body').append(dom);\n\n var menuAbstract = this.get('menuAbstract');\n\n window.requestAnimationFrame(function () {\n window.requestAnimationFrame(function () {\n menuAbstract.registerWrapper(_self);\n window.requestAnimationFrame(function () {\n _self.$().addClass('md-active');\n _self.set('alreadyOpen', true);\n _self.$()[0].style[_self.get('constants').get('CSS').TRANSFORM] = '';\n });\n });\n });\n\n // Register resize handler.\n _ember['default'].$(window).on('resize', this.get('_resizeHandler'));\n }),\n\n willDestroyElement: function willDestroyElement() {\n // Destroy resize handler.\n _ember['default'].$(window).off('resize', this.get('_resizeHandler'));\n },\n\n hideWrapper: function hideWrapper() {\n var _self = this;\n return new _ember['default'].RSVP.Promise(function (resolve /*, reject*/) {\n _self.get('transitionEvents').addEndEventListener(_self.get('element'), function () {\n _self.$().removeClass('md-active');\n resolve();\n });\n _self.$().addClass('md-leave');\n });\n },\n\n actions: {\n toggleMenu: function toggleMenu() {\n this.get('menuAbstract').send('toggleMenu');\n }\n }\n });\n});","define('ember-paper/components/paper-menu-container', ['exports', 'ember-paper/components/paper-menu-container-abstract'], function (exports, _emberPaperComponentsPaperMenuContainerAbstract) {\n 'use strict';\n\n exports['default'] = _emberPaperComponentsPaperMenuContainerAbstract['default'].extend({\n classNames: ['md-whiteframe-z2', 'md-open-menu-container'],\n interaction: true\n });\n});","define('ember-paper/components/paper-menu-content-pane', ['exports', 'ember', 'ember-paper/components/paper-menu-abstract'], function (exports, _ember, _emberPaperComponentsPaperMenuAbstract) {\n 'use strict';\n\n var $ = _ember['default'].$;\n var Component = _ember['default'].Component;\n var service = _ember['default'].inject.service;\n var later = _ember['default'].run.later;\n\n exports['default'] = Component.extend({\n tagName: 'md-menu-content',\n\n constants: service(),\n\n classNames: ['md-default-theme'],\n classNameBindings: ['dense:md-dense'],\n attributeBindings: ['width'],\n width: 4,\n dense: false,\n\n // menuAbstract: Ember.computed(function() {\n // let container = this.nearestOfType(PaperMenuAbstract);\n // return container;\n // }),\n //\n keyDown: function keyDown(ev) {\n var KeyCodes = this.get('constants').KEYCODE;\n switch (ev.keyCode) {\n case KeyCodes.get('ESCAPE'):\n this.nearestOfType(_emberPaperComponentsPaperMenuAbstract['default']).send('toggleMenu');\n break;\n case KeyCodes.get('UP_ARROW'):\n this.focusMenuItem(ev, -1);\n break;\n case KeyCodes.get('DOWN_ARROW'):\n this.focusMenuItem(ev, 1);\n break;\n }\n },\n\n didInsertElement: function didInsertElement() {\n var _this = this;\n\n // kick off initial focus in the menu on the first element\n later(function () {\n var focusTarget = _this.$().find('.md-menu-focus-target');\n if (!focusTarget.length) {\n focusTarget = _this.$().children().eq(0).children().eq(0);\n }\n focusTarget.focus();\n });\n },\n\n focusMenuItem: function focusMenuItem(e, direction) {\n var currentItem = $(e.target).closest('md-menu-item');\n\n var children = this.$().children();\n var items = $.makeArray(children);\n var currentIndex = children.index(currentItem);\n\n // Traverse through our elements in the specified direction (+/-1) and try to\n // focus them until we find one that accepts focus\n for (var i = currentIndex + direction; i >= 0 && i < items.length; i = i + direction) {\n var focusTarget = items[i].firstElementChild || items[i];\n var didFocus = this.attemptFocus(focusTarget);\n if (didFocus) {\n break;\n }\n }\n },\n attemptFocus: function attemptFocus(el) {\n if (el && el.getAttribute('tabindex') !== -1) {\n el.focus();\n if (document.activeElement === el) {\n return true;\n } else {\n return false;\n }\n }\n }\n\n });\n});","define('ember-paper/components/paper-menu-content', ['exports', 'ember-paper/components/paper-menu-container'], function (exports, _emberPaperComponentsPaperMenuContainer) {\n 'use strict';\n\n exports['default'] = _emberPaperComponentsPaperMenuContainer['default'];\n});","define('ember-paper/components/paper-menu-item', ['exports', 'ember', 'ember-paper/components/paper-menu-abstract'], function (exports, _ember, _emberPaperComponentsPaperMenuAbstract) {\n 'use strict';\n\n var Component = _ember['default'].Component;\n\n exports['default'] = Component.extend({\n tagName: 'md-menu-item',\n\n actions: {\n handleClick: function handleClick(event) {\n this.nearestOfType(_emberPaperComponentsPaperMenuAbstract['default']).send('toggleMenu');\n this.sendAction('onClick', event);\n }\n },\n mouseEnter: function mouseEnter() {\n if (!this.get('disabled')) {\n this.$('button').focus();\n }\n }\n\n });\n});","define('ember-paper/components/paper-menu', ['exports', 'ember', 'ember-paper/components/paper-menu-abstract'], function (exports, _ember, _emberPaperComponentsPaperMenuAbstract) {\n 'use strict';\n\n var MENU_EDGE_MARGIN = 8;\n\n exports['default'] = _emberPaperComponentsPaperMenuAbstract['default'].extend({\n tagName: 'md-menu',\n\n position: 'target',\n\n offset: '0 0',\n\n positionMode: _ember['default'].computed('position', function () {\n var attachment = (this.get('position') || 'target').split(' ');\n\n // If attachment is a single item, duplicate it for our second value.\n // ie. 'target' -> 'target target'\n if (attachment.length === 1) {\n attachment.push(attachment[0]);\n }\n\n return {\n left: attachment[0],\n top: attachment[1]\n };\n }),\n\n offsets: _ember['default'].computed('offset', function () {\n var offsets = (this.get('offset') || '0 0').split(' ').map(parseFloat);\n if (offsets.length === 2) {\n return {\n left: offsets[0],\n top: offsets[1]\n };\n } else if (offsets.length === 1) {\n return {\n top: offsets[0],\n left: offsets[0]\n };\n } else {\n throw Error('Invalid offsets specified. Please follow format or ');\n }\n }),\n\n positionMenu: function positionMenu(el) {\n // containerNode = wrapper\n var containerNode = el.get(0);\n // md-menu-content / any other child.z\n var openMenuNode = containerNode.firstElementChild;\n var openMenuNodeRect = openMenuNode.getBoundingClientRect();\n // body\n var boundryNode = document.body;\n var boundryNodeRect = boundryNode.getBoundingClientRect();\n\n // icon that opens the menu\n var originNode = this.$()[0].querySelector('.md-menu-origin');\n var originNodeRect = originNode.getBoundingClientRect();\n\n var bounds = {\n left: boundryNodeRect.left + MENU_EDGE_MARGIN,\n top: Math.max(boundryNodeRect.top, 0) + MENU_EDGE_MARGIN,\n bottom: Math.max(boundryNodeRect.bottom, Math.max(boundryNodeRect.top, 0) + boundryNodeRect.height) - MENU_EDGE_MARGIN,\n right: boundryNodeRect.right - MENU_EDGE_MARGIN\n };\n\n var alignTarget = undefined,\n alignTargetRect = undefined,\n existingOffsets = undefined;\n var positionMode = this.get('positionMode');\n\n if (positionMode.top === 'target' || positionMode.left === 'target' || positionMode.left === 'target-right') {\n // TODO: Allow centering on an arbitrary node, for now center on first menu-item's child\n // Icon INSIDE the wrapper.\n alignTarget = firstVisibleChild();\n if (!alignTarget) {\n throw Error('Error positioning menu. No visible children.');\n }\n alignTarget = alignTarget.querySelector('.md-menu-align-target') || alignTarget;\n alignTargetRect = alignTarget.getBoundingClientRect();\n\n existingOffsets = {\n top: parseFloat(containerNode.style.top || 0),\n left: parseFloat(containerNode.style.left || 0)\n };\n }\n\n var position = {};\n var transformOrigin = 'top ';\n\n switch (positionMode.top) {\n case 'target':\n position.top = existingOffsets.top + originNodeRect.top - alignTargetRect.top;\n break;\n // Support for mdMenuBar\n case 'top':\n position.top = originNodeRect.top;\n break;\n case 'bottom':\n position.top = originNodeRect.top + originNodeRect.height;\n break;\n default:\n throw new Error('Invalid target mode \"' + positionMode.top + '\" specified for md-menu on Y axis.');\n }\n\n switch (positionMode.left) {\n case 'target':\n position.left = existingOffsets.left + originNodeRect.left - alignTargetRect.left;\n transformOrigin += 'left';\n break;\n case 'target-right':\n position.left = originNodeRect.right - openMenuNodeRect.width + (openMenuNodeRect.right - alignTargetRect.right);\n transformOrigin += 'right';\n break;\n // Support for mdMenuBar\n case 'left':\n position.left = originNodeRect.left;\n transformOrigin += 'left';\n break;\n case 'right':\n position.left = originNodeRect.right - containerNode.offsetWidth;\n transformOrigin += 'right';\n break;\n default:\n throw new Error('Invalid target mode \"' + positionMode.left + '\" specified for md-menu on X axis.');\n }\n\n var offsets = this.get('offsets');\n position.top += offsets.top;\n position.left += offsets.left;\n\n clamp(position);\n\n el.css({\n top: position.top + 'px',\n left: position.left + 'px'\n });\n\n containerNode.style[this.get('constants').get('CSS').TRANSFORM_ORIGIN] = transformOrigin;\n\n /*if (!this.get('alreadyOpen')) {\n // Animate a scale out if we aren't just repositioning\n containerNode.style[this.get('constants').get('CSS').TRANSFORM] = 'scale(' +\n Math.min(originNodeRect.width / containerNode.offsetWidth, 1.0) + ',' +\n Math.min(originNodeRect.height / containerNode.offsetHeight, 1.0) +\n ')';\n }*/\n /*\n * Clamps the repositioning of the menu within the confines of\n * bounding element (often the screen/body)\n */\n function clamp(pos) {\n pos.top = Math.max(Math.min(pos.top, bounds.bottom - containerNode.offsetHeight), bounds.top);\n pos.left = Math.max(Math.min(pos.left, bounds.right - containerNode.offsetWidth), bounds.left);\n }\n\n /*\n * Gets the first visible child in the openMenuNode\n * Necessary incase menu nodes are being dynamically hidden\n */\n function firstVisibleChild() {\n for (var i = 0; i < openMenuNode.children.length; ++i) {\n if (window.getComputedStyle(openMenuNode.children[i]).display !== 'none') {\n return openMenuNode.children[i];\n }\n }\n }\n }\n\n });\n});","define('ember-paper/components/paper-optgroup', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n exports['default'] = _ember['default'].Component.extend({\n tagName: 'md-optgroup',\n attributeBindings: ['label']\n });\n});","define('ember-paper/components/paper-option', ['exports', 'ember', 'ember-paper/components/paper-menu-abstract', 'ember-paper/components/base-focusable', 'ember-paper/mixins/ripple-mixin'], function (exports, _ember, _emberPaperComponentsPaperMenuAbstract, _emberPaperComponentsBaseFocusable, _emberPaperMixinsRippleMixin) {\n 'use strict';\n\n exports['default'] = _emberPaperComponentsBaseFocusable['default'].extend(_emberPaperMixinsRippleMixin['default'], {\n tagName: 'md-option',\n\n constants: _ember['default'].inject.service(),\n\n /* Ripple Overrides */\n rippleContainerSelector: null,\n fitRipple: _ember['default'].computed.readOnly('isIconButton'),\n center: _ember['default'].computed.readOnly('isIconButton'),\n dimBackground: _ember['default'].computed.not('isIconButton'),\n\n attributeBindings: ['selected', 'isDisabled:disabled'],\n\n focus: false,\n\n isDisabled: _ember['default'].computed('disabled', function () {\n return this.get('disabled') ? 'disabled' : null;\n }),\n\n menuAbstract: _ember['default'].computed(function () {\n var container = this.nearestOfType(_emberPaperComponentsPaperMenuAbstract['default']);\n return container;\n }),\n\n click: function click(ev) {\n this.selectListener(ev);\n },\n\n keyDown: function keyDown(ev) {\n if (ev.keyCode === this.get('constants').KEYCODE.get('ENTER') || ev.keyCode === this.get('constants').KEYCODE.get('SPACE')) {\n this.selectListener(ev);\n }\n },\n\n selectListener: function selectListener(ev) {\n var selectMenu = this.get('menuAbstract');\n var isSelected = this.get('selected');\n\n if (this.get('disabled')) {\n ev.stopImmediatePropagation();\n return;\n }\n\n if (selectMenu.get('multiple')) {\n if (isSelected) {\n selectMenu.send('deselect', this.get('value'));\n } else {\n selectMenu.send('selectOption', this.get('value'));\n }\n } else {\n if (!isSelected) {\n selectMenu.send('deselectOption', this.get('value'));\n selectMenu.send('selectOption', this.get('value'));\n }\n }\n this.get('menuAbstract').send('toggleMenu');\n },\n\n selected: _ember['default'].computed('menuAbstract.value', function () {\n return this.get('menuAbstract').get('value') === this.get('value') ? 'selected' : null;\n })\n });\n});","define('ember-paper/components/paper-progress-circular', ['exports', 'ember', 'ember-paper/mixins/color-mixin'], function (exports, _ember, _emberPaperMixinsColorMixin) {\n 'use strict';\n\n var Component = _ember['default'].Component;\n var computed = _ember['default'].computed;\n var isPresent = _ember['default'].isPresent;\n var inject = _ember['default'].inject;\n\n var DEFAULT_PROGRESS_SIZE = 100;\n var DEFAULT_SCALING = 0.5;\n\n var MODE_DETERMINATE = 'determinate';\n var MODE_INDETERMINATE = 'indeterminate';\n\n exports['default'] = Component.extend(_emberPaperMixinsColorMixin['default'], {\n\n tagName: 'md-progress-circular',\n classNames: ['md-default-theme'],\n attributeBindings: ['value', 'mode:md-mode', 'circleStyle:style'],\n\n constants: inject.service(),\n\n mode: computed('value', function () {\n var value = this.get('value');\n return isPresent(value) ? MODE_DETERMINATE : MODE_INDETERMINATE;\n }),\n\n spinnerClass: computed('mode', function () {\n var mode = this.get('mode');\n return mode === MODE_DETERMINATE || mode === MODE_INDETERMINATE ? 'md-mode-' + mode : 'ng-hide';\n }),\n\n clampedValue: computed('value', function () {\n var value = this.get('value');\n return Math.max(0, Math.min(value || 0, 100));\n }),\n\n circleStyle: computed('diameterRatio', function () {\n var diameterRatio = this.get('diameterRatio');\n\n var width = 'width: ' + 100 * diameterRatio + 'px';\n var height = 'height: ' + 100 * diameterRatio + 'px';\n\n return _ember['default'].String.htmlSafe([width, height].join(';'));\n }),\n\n scaleWrapperStyle: computed('diameterRatio', function () {\n var diameterRatio = this.get('diameterRatio');\n\n var transform = this.get('constants.CSS.TRANSFORM') + ': translate(-50%, -50%) scale(' + diameterRatio + ')';\n\n return _ember['default'].String.htmlSafe(transform);\n }),\n\n diameterRatio: computed('diameter', function () {\n var diameter = this.get('diameter');\n if (!diameter) {\n return DEFAULT_SCALING;\n }\n\n var match = /([0-9]*)%/.exec(diameter);\n var value = Math.max(0, match && match[1] / 100 || parseFloat(diameter));\n\n return value > 1 ? value / DEFAULT_PROGRESS_SIZE : value;\n }),\n\n gapStyle: computed('mode', 'clampedValue', function () {\n if (this.get('mode') !== MODE_DETERMINATE) {\n return _ember['default'].String.htmlSafe('');\n }\n\n var value = this.get('clampedValue');\n var borderBottomColor = value <= 50 ? 'border-bottom-color: transparent !important' : null;\n var transition = value <= 50 ? null : this.get('constants.CSS.TRANSITION') + ': borderBottomColor 0.1s linear';\n\n return _ember['default'].String.htmlSafe([borderBottomColor, transition].filter(function (i) {\n return !!i;\n }).join(';'));\n }),\n\n leftStyle: computed('mode', 'clampedValue', function () {\n if (this.get('mode') !== MODE_DETERMINATE) {\n return _ember['default'].String.htmlSafe('');\n }\n\n var value = this.get('clampedValue');\n var transition = value <= 50 ? this.get('constants.CSS.TRANSITION') + ': transform 0.1s linear' : '';\n var transform = this.get('constants.CSS.TRANSFORM') + ': rotate(' + (value <= 50 ? 135 : (value - 50) / 50 * 180 + 135) + 'deg)';\n\n return _ember['default'].String.htmlSafe([transition, transform].filter(function (i) {\n return !!i;\n }).join(';'));\n }),\n\n rightStyle: computed('mode', 'clampedValue', function () {\n if (this.get('mode') !== MODE_DETERMINATE) {\n return _ember['default'].String.htmlSafe('');\n }\n\n var value = this.get('clampedValue');\n var transition = value >= 50 ? this.get('constants.CSS.TRANSITION') + ': transform 0.1s linear' : '';\n var transform = this.get('constants.CSS.TRANSFORM') + ': rotate(' + (value >= 50 ? 45 : value / 50 * 180 - 135) + 'deg)';\n\n return _ember['default'].String.htmlSafe([transition, transform].filter(function (i) {\n return !!i;\n }).join(';'));\n })\n\n });\n});","define('ember-paper/components/paper-progress-linear', ['exports', 'ember', 'ember-paper/mixins/color-mixin'], function (exports, _ember, _emberPaperMixinsColorMixin) {\n 'use strict';\n\n var inject = _ember['default'].inject;\n var computed = _ember['default'].computed;\n var Component = _ember['default'].Component;\n var isPresent = _ember['default'].isPresent;\n\n function makeTransform(value) {\n var scale = value / 100;\n var translateX = (value - 100) / 2;\n return 'translateX(' + translateX.toString() + '%) scale(' + scale.toString() + ', 1)';\n }\n\n var MODE_DETERMINATE = 'determinate';\n var MODE_INDETERMINATE = 'indeterminate';\n var MODE_BUFFER = 'buffer';\n var MODE_QUERY = 'query';\n\n exports['default'] = Component.extend(_emberPaperMixinsColorMixin['default'], {\n tagName: 'md-progress-linear',\n\n attributeBindings: ['mode:md-mode', 'bufferValue:md-buffer-value'],\n classNames: ['md-default-theme'],\n\n constants: inject.service(),\n\n init: function init() {\n this._super.apply(this, arguments);\n this.setupTransforms();\n },\n\n mode: computed('value', function () {\n var value = this.get('value');\n var bufferValue = this.get('bufferValue');\n\n if (isPresent(value)) {\n if (isPresent(bufferValue)) {\n return MODE_BUFFER;\n } else {\n return MODE_DETERMINATE;\n }\n } else {\n return MODE_INDETERMINATE;\n }\n }),\n\n queryModeClass: computed('mode', function () {\n var mode = this.get('mode');\n\n switch (mode) {\n case MODE_QUERY:\n case MODE_BUFFER:\n case MODE_DETERMINATE:\n case MODE_INDETERMINATE:\n return 'md-mode-' + mode;\n default:\n return '';\n }\n }),\n\n transforms: new Array(101),\n\n setupTransforms: function setupTransforms() {\n for (var i = 0; i < 101; i++) {\n this.transforms[i] = makeTransform(i);\n }\n },\n\n bar1Style: computed('clampedBufferValue', function () {\n return _ember['default'].String.htmlSafe(this.get('constants.CSS.TRANSFORM') + ': ' + this.transforms[this.get('clampedBufferValue')]);\n }),\n\n bar2Style: computed('clampedValue', 'mode', function () {\n if (this.get('mode') === MODE_QUERY) {\n return _ember['default'].String.htmlSafe('');\n }\n\n return _ember['default'].String.htmlSafe(this.get('constants.CSS.TRANSFORM') + ': ' + this.transforms[this.get('clampedValue')]);\n }),\n\n clampedValue: computed('value', function () {\n var value = this.get('value');\n return Math.max(0, Math.min(value || 0, 100));\n }),\n\n clampedBufferValue: computed('bufferValue', function () {\n var value = this.get('bufferValue');\n return Math.max(0, Math.min(value || 0, 100));\n })\n\n });\n});","define('ember-paper/components/paper-radio-group', ['exports', 'ember', 'ember-paper/components/base-focusable'], function (exports, _ember, _emberPaperComponentsBaseFocusable) {\n 'use strict';\n\n var A = _ember['default'].A;\n var computed = _ember['default'].computed;\n var inject = _ember['default'].inject;\n var assert = _ember['default'].assert;\n\n exports['default'] = _emberPaperComponentsBaseFocusable['default'].extend({\n tagName: 'md-radio-group',\n tabindex: 0,\n\n /* BaseFocusable Overrides */\n focusOnlyOnKey: true,\n\n constants: inject.service(),\n\n // Lifecycle hooks\n init: function init() {\n this._super.apply(this, arguments);\n assert('{{paper-radio-group}} requires an `onChange` action or null for no action', this.get('onChange') !== undefined);\n },\n\n childRadios: computed(function () {\n return A();\n }),\n\n enabledChildRadios: computed.filterBy('childRadios', 'disabled', false),\n childValues: computed.mapBy('enabledChildRadios', 'value'),\n\n register: function register(child) {\n this.get('childRadios').pushObject(child);\n },\n\n unregister: function unregister(child) {\n this.get('childRadios').removeObject(child);\n },\n\n keyDown: function keyDown(ev) {\n\n switch (ev.which) {\n case this.get('constants.KEYCODE.LEFT_ARROW'):\n case this.get('constants.KEYCODE.UP_ARROW'):\n ev.preventDefault();\n this.select(-1);\n break;\n case this.get('constants.KEYCODE.RIGHT_ARROW'):\n case this.get('constants.KEYCODE.DOWN_ARROW'):\n ev.preventDefault();\n this.select(1);\n break;\n }\n },\n\n select: function select(increment) {\n var groupValue = this.get('groupValue');\n var index = 0;\n\n if (groupValue) {\n index = this.get('childValues').indexOf(groupValue);\n index += increment;\n var _length = this.get('childValues.length');\n index = (index % _length + _length) % _length;\n }\n\n var childRadio = this.get('enabledChildRadios').objectAt(index);\n childRadio.set('focused', true);\n this.sendAction('onChange', childRadio.get('value'));\n },\n\n actions: {\n onChange: function onChange(value) {\n this.sendAction('onChange', value);\n }\n }\n });\n});","define('ember-paper/components/paper-radio', ['exports', 'ember', 'ember-paper/components/base-focusable', 'ember-paper/mixins/ripple-mixin', 'ember-paper/mixins/color-mixin'], function (exports, _ember, _emberPaperComponentsBaseFocusable, _emberPaperMixinsRippleMixin, _emberPaperMixinsColorMixin) {\n 'use strict';\n\n var computed = _ember['default'].computed;\n var assert = _ember['default'].assert;\n\n exports['default'] = _emberPaperComponentsBaseFocusable['default'].extend(_emberPaperMixinsRippleMixin['default'], _emberPaperMixinsColorMixin['default'], {\n tagName: 'md-radio-button',\n classNames: ['md-default-theme'],\n classNameBindings: ['checked:md-checked'],\n\n tabindex: null,\n\n toggle: false,\n\n /* Ripple Overrides */\n rippleContainerSelector: '.md-container',\n center: true,\n dimBackground: false,\n fitRipple: true,\n\n /* BaseFocusable Overrides */\n focusOnlyOnKey: true,\n\n // Lifecycle hooks\n init: function init() {\n this._super.apply(this, arguments);\n assert('{{paper-radio}} requires an `onChange` action or null for no action.', this.get('onChange') !== undefined);\n\n if (this.get('parentGroup')) {\n this.get('parentGroup').register(this);\n }\n },\n\n willDestroyElement: function willDestroyElement() {\n this._super.apply(this, arguments);\n if (this.get('parentGroup')) {\n this.get('parentGroup').unregister(this);\n }\n },\n\n checked: computed('groupValue', 'value', function () {\n return this.get('groupValue') === this.get('value');\n }),\n\n click: function click() {\n if (!this.get('disabled')) {\n if (this.get('toggle')) {\n this.sendAction('onChange', this.get('checked') ? null : this.get('value'));\n } else {\n this.sendAction('onChange', this.get('value'));\n }\n }\n // Prevent bubbling, if specified. If undefined, the event will bubble.\n return this.get('bubbles');\n }\n });\n});","define('ember-paper/components/paper-select-container', ['exports', 'ember-paper/components/paper-menu-container-abstract'], function (exports, _emberPaperComponentsPaperMenuContainerAbstract) {\n 'use strict';\n\n exports['default'] = _emberPaperComponentsPaperMenuContainerAbstract['default'].extend({\n classNames: ['md-select-menu-container'],\n interaction: true\n });\n});","define('ember-paper/components/paper-select-core', ['exports', 'ember', 'ember-paper/components/paper-menu-abstract'], function (exports, _ember, _emberPaperComponentsPaperMenuAbstract) {\n 'use strict';\n\n var SELECT_EDGE_MARGIN = 8;\n\n function clamp(min, n, max) {\n return Math.max(min, Math.min(n, max));\n }\n\n function getOffsetRect(node) {\n return node ? {\n left: node.offsetLeft,\n top: node.offsetTop,\n width: node.offsetWidth,\n height: node.offsetHeight\n } : { left: 0, top: 0, width: 0, height: 0 };\n }\n\n exports['default'] = _emberPaperComponentsPaperMenuAbstract['default'].extend({\n tagName: 'md-select',\n placeholder: null,\n\n classNames: ['md-default-theme'],\n\n attributeBindings: ['tabindex', 'readonlyAttr:readonly', 'multipleAttr:multiple'],\n tabindex: _ember['default'].computed('readonly', function () {\n return this.get('readonly') ? -1 : 0;\n }),\n readonly: null,\n multiple: null,\n\n readonlyAttr: _ember['default'].computed('readonly', function () {\n return this.get('readonly') ? 'readonly' : null;\n }),\n multipleAttr: _ember['default'].computed('multiple', function () {\n return this.get('multiple') ? 'multiple' : null;\n }),\n\n preventMenuOpen: _ember['default'].computed('disabled', function () {\n return !!this.get('disabled');\n }),\n\n label: _ember['default'].computed('value', 'itemLabelCallback', function () {\n if (!this.get('value')) {\n return null;\n }\n if (this.get('itemLabelCallback')) {\n return this.get('itemLabelCallback').call(this, this.get('value'));\n }\n return this.get('value');\n }),\n\n click: function click() {\n this.send('toggleMenu');\n },\n\n actions: {\n selectOption: function selectOption(value) {\n this.get('onChange')(value);\n },\n deselectOption: function deselectOption() {\n this.get('onChange')(null);\n }\n },\n\n /* @todo move to util */\n floatingScrollbars: _ember['default'].computed(function () {\n var tempNode = _ember['default'].$('');\n _ember['default'].$('body').append(tempNode[0]);\n var hasFloating = tempNode[0].offsetWidth === tempNode[0].childNodes[0].offsetWidth;\n tempNode.remove();\n return hasFloating;\n }),\n\n keyDown: function keyDown(e) {\n var KeyCodes = this.get('constants').KEYCODE;\n var allowedCodes = [KeyCodes.get('SPACE'), KeyCodes.get('ENTER'), KeyCodes.get('UP_ARROW'), KeyCodes.get('DOWN_ARROW')];\n\n if (allowedCodes.indexOf(e.keyCode) !== -1) {\n // prevent page scrolling on interaction\n e.preventDefault();\n this.send('toggleMenu');\n } else {\n if (e.keyCode <= 90 && e.keyCode >= 31) {\n e.preventDefault();\n /* todo. use paper-select-menu's optNodeForKeyboardSearch.\n let node = this.optNodeForKeyboardSearch(e);\n if (!node) return;\n this.set('focusedNode', node || this.get('focusedNode'));\n if (node) {\n node.focus();\n }*/\n }\n }\n },\n\n /*\n * Select menu have other animations then \"md-menu\", so we override the positionMenu here.\n */\n positionMenu: function positionMenu(element) {\n if (!this.get('isOpen')) {\n return;\n }\n var _self = this;\n var opts = {\n target: this.$(),\n parent: _ember['default'].$('body'),\n selectEl: element.find('md-select-menu'),\n contentEl: element.find('md-content')\n };\n\n var containerNode = element.get(0);\n var targetNode = opts.target[0].firstElementChild; // target the label\n var parentNode = opts.parent.get(0);\n var selectNode = opts.selectEl.get(0);\n var contentNode = opts.contentEl.get(0);\n var parentRect = parentNode.getBoundingClientRect();\n var targetRect = targetNode.getBoundingClientRect();\n var shouldOpenAroundTarget = false;\n var bounds = {\n left: parentRect.left + SELECT_EDGE_MARGIN,\n top: SELECT_EDGE_MARGIN,\n bottom: parentRect.height - SELECT_EDGE_MARGIN,\n right: parentRect.width - SELECT_EDGE_MARGIN - (this.get('floatingScrollbars') ? 16 : 0)\n };\n var spaceAvailable = {\n top: targetRect.top - bounds.top,\n left: targetRect.left - bounds.left,\n right: bounds.right - (targetRect.left + targetRect.width),\n bottom: bounds.bottom - (targetRect.top + targetRect.height)\n };\n var maxWidth = parentRect.width - SELECT_EDGE_MARGIN * 2;\n var isScrollable = contentNode.scrollHeight > contentNode.offsetHeight;\n var selectedNode = selectNode.querySelector('md-option[selected]');\n var optionNodes = selectNode.getElementsByTagName('md-option');\n var optgroupNodes = selectNode.getElementsByTagName('md-optgroup');\n\n var centeredNode = undefined;\n // If a selected node, center around that\n if (selectedNode) {\n centeredNode = selectedNode;\n // If there are option groups, center around the first option group\n } else if (optgroupNodes.length) {\n centeredNode = optgroupNodes[0];\n // Otherwise, center around the first optionNode\n } else if (optionNodes.length) {\n centeredNode = optionNodes[0];\n // In case there are no options, center on whatever's in there... (eg progress indicator)\n } else {\n centeredNode = contentNode.firstElementChild || contentNode;\n }\n\n if (contentNode.offsetWidth > maxWidth) {\n contentNode.style['max-width'] = maxWidth + 'px';\n }\n if (shouldOpenAroundTarget) {\n contentNode.style['min-width'] = targetRect.width + 'px';\n }\n\n // Remove padding before we compute the position of the menu\n if (isScrollable) {\n selectNode.classList.add('md-overflow');\n }\n\n var focusedNode = centeredNode;\n if ((focusedNode.tagName || '').toUpperCase() === 'MD-OPTGROUP') {\n focusedNode = optionNodes[0] || contentNode.firstElementChild || contentNode;\n centeredNode = focusedNode;\n }\n\n // Get the selectMenuRect *after* max-width is possibly set above\n var selectMenuRect = selectNode.getBoundingClientRect();\n var centeredRect = getOffsetRect(centeredNode);\n\n if (centeredNode) {\n var centeredStyle = window.getComputedStyle(centeredNode);\n centeredRect.paddingLeft = parseInt(centeredStyle.paddingLeft, 10) || 0;\n centeredRect.paddingRight = parseInt(centeredStyle.paddingRight, 10) || 0;\n }\n\n if (isScrollable) {\n var scrollBuffer = contentNode.offsetHeight / 2;\n contentNode.scrollTop = centeredRect.top + centeredRect.height / 2 - scrollBuffer;\n\n if (spaceAvailable.top < scrollBuffer) {\n contentNode.scrollTop = Math.min(centeredRect.top, contentNode.scrollTop + scrollBuffer - spaceAvailable.top);\n } else if (spaceAvailable.bottom < scrollBuffer) {\n contentNode.scrollTop = Math.max(centeredRect.top + centeredRect.height - selectMenuRect.height, contentNode.scrollTop - scrollBuffer + spaceAvailable.bottom);\n }\n }\n\n var left = undefined,\n top = undefined,\n transformOrigin = undefined;\n if (shouldOpenAroundTarget) {\n left = targetRect.left;\n top = targetRect.top + targetRect.height;\n transformOrigin = '50% 0';\n if (top + selectMenuRect.height > bounds.bottom) {\n top = targetRect.top - selectMenuRect.height;\n transformOrigin = '50% 100%';\n }\n } else {\n left = targetRect.left + centeredRect.left - centeredRect.paddingLeft + 2;\n top = Math.floor(targetRect.top + targetRect.height / 2 - centeredRect.height / 2 - centeredRect.top + contentNode.scrollTop) + 2;\n\n transformOrigin = centeredRect.left + targetRect.width / 2 + 'px\\n ' + (centeredRect.top + centeredRect.height / 2 - contentNode.scrollTop) + 'px 0px';\n\n containerNode.style.minWidth = targetRect.width + centeredRect.paddingLeft + centeredRect.paddingRight + 'px';\n }\n\n // Keep left and top within the window\n var containerRect = containerNode.getBoundingClientRect();\n containerNode.style.left = clamp(bounds.left, left, bounds.right - containerRect.width) + 'px';\n containerNode.style.top = clamp(bounds.top, top, bounds.bottom - containerRect.height) + 'px';\n selectNode.style[this.get('constants').get('CSS').TRANSFORM_ORIGIN] = transformOrigin;\n\n selectNode.style[this.get('constants').get('CSS').TRANSFORM] = 'scale(\\n ' + Math.min(targetRect.width / selectMenuRect.width, 1.0) + ',\\n ' + Math.min(targetRect.height / selectMenuRect.height, 1.0) + '\\n )';\n\n window.requestAnimationFrame(function () {\n element.addClass('md-active');\n selectNode.style[_self.get('constants').get('CSS').TRANSFORM] = '';\n if (focusedNode && !focusedNode.hasAttribute('disabled')) {\n _self.set('focusedNode', focusedNode);\n focusedNode.focus();\n }\n });\n }\n\n });\n});","define('ember-paper/components/paper-select-header', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n var Component = _ember['default'].Component;\n\n exports['default'] = Component.extend({\n tagName: 'md-select-header'\n });\n});","define('ember-paper/components/paper-select-menu', ['exports', 'ember', 'ember-paper/components/paper-menu-abstract'], function (exports, _ember, _emberPaperComponentsPaperMenuAbstract) {\n 'use strict';\n\n var searchStr = '';\n var clearSearchTimeout = undefined,\n optNodes = undefined,\n optText = undefined;\n var CLEAR_SEARCH_AFTER = 300;\n\n exports['default'] = _ember['default'].Component.extend({\n tagName: 'md-select-menu',\n classNames: ['md-default-theme'],\n\n constants: _ember['default'].inject.service(),\n\n menuAbstract: _ember['default'].computed(function () {\n var container = this.nearestOfType(_emberPaperComponentsPaperMenuAbstract['default']);\n return container;\n }),\n\n keyDown: function keyDown(ev) {\n var KeyCodes = this.get('constants').KEYCODE;\n switch (ev.keyCode) {\n case KeyCodes.get('TAB'):\n case KeyCodes.get('ESCAPE'):\n this.get('menuAbstract').send('toggleMenu');\n break;\n case KeyCodes.get('UP_ARROW'):\n this.focusPrevOption();\n break;\n case KeyCodes.get('DOWN_ARROW'):\n this.focusNextOption();\n break;\n default:\n if (ev.keyCode >= 31 && ev.keyCode <= 90) {\n var optNode = this.optNodeForKeyboardSearch(ev);\n this.get('menuAbstract').set('focusedNode', optNode || this.get('menuAbstract').get('focusedNode'));\n if (optNode) {\n optNode.focus();\n }\n }\n }\n },\n\n optNodeForKeyboardSearch: function optNodeForKeyboardSearch(e) {\n if (clearSearchTimeout) {\n clearTimeout(clearSearchTimeout);\n }\n clearSearchTimeout = setTimeout(function () {\n clearSearchTimeout = undefined;\n searchStr = '';\n optText = undefined;\n optNodes = undefined;\n }, CLEAR_SEARCH_AFTER);\n searchStr += String.fromCharCode(e.keyCode);\n var search = new RegExp('^' + searchStr, 'i');\n if (!optNodes) {\n optNodes = this.$().find('md-option');\n optText = new Array(optNodes.length);\n optNodes.each(function (i, el) {\n optText[i] = el.textContent.trim();\n });\n }\n for (var i = 0; i < optText.length; ++i) {\n if (search.test(optText[i])) {\n return optNodes[i];\n }\n }\n },\n\n focusOption: function focusOption(direction) {\n var optionsArray = this.$().find('md-option').toArray();\n var index = optionsArray.indexOf(this.get('menuAbstract').get('focusedNode'));\n\n var newOption = undefined;\n\n do {\n if (index === -1) {\n // We lost the previously focused element, reset to first option\n index = 0;\n } else if (direction === 'next' && index < optionsArray.length - 1) {\n index++;\n } else if (direction === 'prev' && index > 0) {\n index--;\n }\n newOption = optionsArray[index];\n if (newOption.hasAttribute('disabled')) {\n newOption = undefined;\n }\n } while (!newOption && index < optionsArray.length - 1 && index > 0);\n\n if (newOption) {\n newOption.focus();\n }\n this.get('menuAbstract').set('focusedNode', newOption);\n },\n focusNextOption: function focusNextOption() {\n this.focusOption('next');\n },\n focusPrevOption: function focusPrevOption() {\n this.focusOption('prev');\n }\n\n });\n});","define('ember-paper/components/paper-select-value', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n exports['default'] = _ember['default'].Component.extend({\n tagName: 'md-select-value',\n classNames: ['md-select-value'],\n classNameBindings: ['isPlaceholder:md-select-placeholder'],\n\n isPlaceholder: _ember['default'].computed('value', function () {\n return !this.get('value');\n }),\n\n label: _ember['default'].computed('isPlaceholder', function () {\n if (this.get('isPlaceholder')) {\n return this.get('placeholder');\n } else {\n return this.get('value');\n }\n })\n\n });\n});","define('ember-paper/components/paper-select', ['exports', 'ember', 'ember-paper/components/paper-input'], function (exports, _ember, _emberPaperComponentsPaperInput) {\n 'use strict';\n\n var computed = _ember['default'].computed;\n\n exports['default'] = _emberPaperComponentsPaperInput['default'].extend({\n label: computed.alias('placeholder')\n });\n});","define('ember-paper/components/paper-sidenav-container', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n var Component = _ember['default'].Component;\n\n exports['default'] = Component.extend({\n classNames: ['flex', 'layout-row'],\n attributeBindings: ['style'],\n style: _ember['default'].String.htmlSafe('overflow: hidden')\n });\n});","define('ember-paper/components/paper-sidenav-inner', ['exports', 'ember', 'ember-css-transitions/mixins/transition-mixin'], function (exports, _ember, _emberCssTransitionsMixinsTransitionMixin) {\n 'use strict';\n\n var Component = _ember['default'].Component;\n var inject = _ember['default'].inject;\n var computed = _ember['default'].computed;\n var $ = _ember['default'].$;\n var run = _ember['default'].run;\n\n exports['default'] = Component.extend(_emberCssTransitionsMixinsTransitionMixin['default'], {\n tagName: 'md-sidenav',\n attributeBindings: ['tabindex'],\n classNameBindings: ['positionClass'],\n transitionTriggers: ['isLockedOpen:md-locked-open', 'closed:md-closed'],\n\n constants: inject.service(),\n paperSidenav: inject.service(),\n\n name: 'default',\n position: 'left',\n lockedOpen: 'gt-sm',\n closed: true,\n closeOnClick: true,\n tabindex: -1,\n\n positionClass: computed('position', function () {\n return 'md-sidenav-' + this.get('position');\n }),\n\n init: function init() {\n // need to updateLockedOpen() first because otherwise the transition classes\n // would be applied due to transition mixin's `init`\n this.updateLockedOpen();\n this._super.apply(this, arguments);\n this.get('paperSidenav').register(this.get('name'), this);\n },\n\n didInsertElement: function didInsertElement() {\n this._super.apply(this, arguments);\n $(window).on('resize.' + this.elementId, run.bind(this, 'updateLockedOpen'));\n },\n\n willDestroyElement: function willDestroyElement() {\n this._super.apply(this, arguments);\n $(window).off('resize.' + this.elementId);\n this.get('paperSidenav').unregister(this.get('name'), this);\n },\n\n updateLockedOpen: function updateLockedOpen() {\n var lockedOpen = this.get('lockedOpen');\n var isLockedOpen = undefined;\n\n // if `true` or `false` is specified, always/never \"lock open\"\n // otherwise proceed with normal matchMedia test\n if (typeof lockedOpen === 'boolean') {\n isLockedOpen = lockedOpen;\n } else {\n var mediaQuery = this.get('constants').MEDIA[lockedOpen] || lockedOpen;\n isLockedOpen = window.matchMedia(mediaQuery).matches;\n }\n\n if (this.get('isLockedOpen') !== isLockedOpen) {\n this.set('isLockedOpen', isLockedOpen);\n\n // if sidenav is open and we enter lockedOpen,\n // make the sidenav enter the \"closed\" state\n if (!this.get('closed') && isLockedOpen) {\n this.sendAction('onToggle', false);\n }\n }\n },\n\n click: function click() {\n if (this.get('closeOnClick') && !this.get('isLockedOpen')) {\n this.sendAction('onToggle', false);\n }\n },\n\n open: function open() {\n if (this.get('closed') && this.get('isLockedOpen')) {\n this.sendAction('onToggle', true);\n }\n },\n\n close: function close() {\n if (!this.get('closed') && !this.get('isLockedOpen')) {\n this.sendAction('onToggle', false);\n }\n },\n\n toggle: function toggle() {\n if (!this.get('isLockedOpen')) {\n this.sendAction('onToggle', this.get('closed'));\n }\n }\n });\n});","define('ember-paper/components/paper-sidenav-toggle', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n var Component = _ember['default'].Component;\n var inject = _ember['default'].inject;\n\n exports['default'] = Component.extend({\n\n tagName: '',\n\n name: 'default',\n\n paperSidenav: inject.service(),\n\n toggle: function toggle() {\n this.get('paperSidenav').toggle(this.get('name'));\n }\n\n });\n});","define('ember-paper/components/paper-sidenav', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n var _slice = Array.prototype.slice;\n\n var Component = _ember['default'].Component;\n var computed = _ember['default'].computed;\n\n exports['default'] = Component.extend({\n tagName: '',\n\n name: 'default',\n position: 'left',\n lockedOpen: 'gt-sm',\n open: false,\n closed: computed.not('open'),\n closeOnClick: true,\n\n actions: {\n onToggle: function onToggle() {\n this.sendAction.apply(this, ['onToggle'].concat(_slice.call(arguments)));\n },\n onBackdropTap: function onBackdropTap() {\n this.sendAction('onToggle', false);\n }\n }\n });\n});","define('ember-paper/components/paper-slider', ['exports', 'ember', 'ember-paper/mixins/events-mixin', 'ember-paper/components/base-focusable', 'ember-paper/mixins/color-mixin', 'ember-paper/mixins/flex-mixin'], function (exports, _ember, _emberPaperMixinsEventsMixin, _emberPaperComponentsBaseFocusable, _emberPaperMixinsColorMixin, _emberPaperMixinsFlexMixin) {\n 'use strict';\n\n exports['default'] = _emberPaperComponentsBaseFocusable['default'].extend(_emberPaperMixinsEventsMixin['default'], _emberPaperMixinsFlexMixin['default'], _emberPaperMixinsColorMixin['default'], {\n\n tagName: 'md-slider',\n\n attributeBindings: ['min', 'max', 'step', 'discrete:md-discrete', 'tabindex'],\n\n classNames: ['md-default-theme'],\n classNameBindings: ['isMinimum:md-min', 'active', 'dragging'],\n\n constants: _ember['default'].inject.service(),\n\n min: 0,\n max: 100,\n step: 1,\n tabindex: 0,\n\n trackContainer: _ember['default'].computed(function () {\n return this.$('.md-track-container');\n }),\n\n activeTrackStyle: _ember['default'].computed('percent', function () {\n var percent = this.get('percent') || 0;\n return _ember['default'].String.htmlSafe('width: ' + percent * 100 + '%');\n }),\n\n thumbContainerStyle: _ember['default'].computed('percent', function () {\n var percent = this.get('percent') || 0;\n return _ember['default'].String.htmlSafe('left: ' + percent * 100 + '%');\n }),\n\n isMinimum: _ember['default'].computed('percent', 'min', function () {\n return this.get('percent') === this.get('min');\n }),\n\n percent: _ember['default'].computed('value', 'min', 'max', function () {\n var min = parseInt(this.get('min'), 10);\n var max = parseInt(this.get('max'), 10);\n\n return (this.get('value') - min) / (max - min);\n }),\n\n positionToPercent: function positionToPercent(x) {\n return Math.max(0, Math.min(1, (x - this.get('sliderDimensions.left')) / this.get('sliderDimensions.width')));\n },\n\n percentToValue: function percentToValue(x) {\n var min = parseInt(this.get('min'), 10);\n var max = parseInt(this.get('max'), 10);\n return min + x * (max - min);\n },\n\n minMaxValidator: function minMaxValidator(value) {\n var min = parseInt(this.get('min'), 10);\n var max = parseInt(this.get('max'), 10);\n return Math.max(min, Math.min(max, value));\n },\n\n stepValidator: function stepValidator(value) {\n var step = parseInt(this.get('step'), 10);\n return Math.round(value / step) * step;\n },\n\n active: false,\n dragging: false,\n\n sliderDimensions: _ember['default'].computed(function () {\n return this.get('trackContainer')[0].getBoundingClientRect();\n }),\n\n setValueFromEvent: function setValueFromEvent(event) {\n // let exactVal = this.percentToValue(this.positionToPercent(event.deltaX || event.clientX));\n var exactVal = this.percentToValue(this.positionToPercent(event.clientX || event.originalEvent.touches[0].clientX));\n var closestVal = this.minMaxValidator(this.stepValidator(exactVal));\n\n this.set('value', closestVal);\n },\n\n down: function down(event) {\n if (this.get('disabled')) {\n return;\n }\n\n this.set('active', true);\n this.set('dragging', true);\n this.$().focus();\n\n this.get('sliderDimensions');\n\n this.setValueFromEvent(event);\n },\n\n up: function up(event) {\n if (this.get('disabled')) {\n return;\n }\n\n event.stopPropagation();\n\n this.beginPropertyChanges();\n this.set('active', false);\n this.set('dragging', false);\n this.endPropertyChanges();\n },\n\n move: function move(event) {\n if (this.get('disabled') || !this.get('dragging')) {\n return;\n }\n\n this.setValueFromEvent(event);\n },\n\n keyDown: function keyDown(event) {\n if (this.get('disabled')) {\n return;\n }\n\n var changeAmount = undefined,\n newValue = undefined;\n\n if (event.keyCode === this.get('constants.KEYCODE.LEFT_ARROW')) {\n changeAmount = parseInt(this.get('step')) * -1;\n } else if (event.keyCode === this.get('constants.KEYCODE.RIGHT_ARROW')) {\n changeAmount = parseInt(this.get('step'));\n }\n\n if (changeAmount) {\n if (event.metaKey || event.ctrlKey || event.altKey) {\n changeAmount *= 4;\n }\n\n newValue = this.get('value') + changeAmount;\n\n this.set('value', this.minMaxValidator(newValue));\n\n event.preventDefault();\n event.stopPropagation();\n }\n }\n\n });\n});","define('ember-paper/components/paper-subheader', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n exports['default'] = _ember['default'].Component.extend({\n tagName: 'h2',\n classNames: ['md-subheader']\n });\n});","define('ember-paper/components/paper-switch', ['exports', 'ember', 'ember-paper/components/base-focusable', 'ember-paper/mixins/ripple-mixin', 'ember-paper/mixins/proxiable-mixin', 'ember-paper/mixins/color-mixin'], function (exports, _ember, _emberPaperComponentsBaseFocusable, _emberPaperMixinsRippleMixin, _emberPaperMixinsProxiableMixin, _emberPaperMixinsColorMixin) {\n 'use strict';\n\n var assert = _ember['default'].assert;\n var computed = _ember['default'].computed;\n var get = _ember['default'].get;\n var run = _ember['default'].run;\n var htmlSafe = _ember['default'].String.htmlSafe;\n var inject = _ember['default'].inject;\n\n /* global Hammer */\n\n exports['default'] = _emberPaperComponentsBaseFocusable['default'].extend(_emberPaperMixinsRippleMixin['default'], _emberPaperMixinsProxiableMixin['default'], _emberPaperMixinsColorMixin['default'], {\n tagName: 'md-switch',\n classNames: ['paper-switch', 'md-default-theme'],\n classNameBindings: ['value:md-checked', 'dragging:md-dragging'],\n toggle: true,\n constants: inject.service(),\n\n /* Ripple Overrides */\n rippleContainerSelector: '.md-thumb',\n center: true,\n dimBackground: false,\n fitRipple: true,\n\n value: false,\n disabled: false,\n dragging: false,\n\n thumbContainerStyle: computed('dragging', 'dragAmount', function () {\n if (!this.get('dragging')) {\n return htmlSafe('');\n }\n\n var translate = Math.max(0, Math.min(100, this.get('dragAmount') * 100));\n var transformProp = 'translate3d(' + translate + '%, 0, 0)';\n return htmlSafe('transform: ' + transformProp + ';-webkit-transform: ' + transformProp);\n }),\n\n didInsertElement: function didInsertElement() {\n this._super.apply(this, arguments);\n\n // Only setup if the switch is not disabled\n if (!this.get('disabled')) {\n this._setupSwitch();\n }\n },\n\n init: function init() {\n this._super.apply(this, arguments);\n assert('{{paper-switch}} requires an `onChange` action or null for no action.', this.get('onChange') !== undefined);\n },\n\n willDestroyElement: function willDestroyElement() {\n this._super.apply(this, arguments);\n this._teardownSwitch();\n },\n\n didUpdateAttrs: function didUpdateAttrs() {\n this._super.apply(this, arguments);\n\n if (!this.get('disabled') && !this._switchContainerHammer) {\n this._setupSwitch();\n } else if (!this.get('disabled') && this._switchContainerHammer) {\n this._switchContainerHammer.set({ enable: true });\n } else if (this.get('disabled') && this._switchContainerHammer) {\n this._switchContainerHammer.set({ enable: false });\n }\n },\n\n _setupSwitch: function _setupSwitch() {\n this.set('switchWidth', this.$('.md-thumb-container').innerWidth());\n\n var switchContainer = this.$('.md-container').get(0);\n var switchHammer = new Hammer(switchContainer);\n this._switchContainerHammer = switchHammer;\n\n // Enable dragging the switch container\n switchHammer.get('pan').set({ threshold: 1 });\n switchHammer.on('panstart', run.bind(this, this._dragStart)).on('panmove', run.bind(this, this._drag)).on('panend', run.bind(this, this._dragEnd));\n\n // Enable tapping gesture on the switch\n this._switchHammer = new Hammer(this.element);\n this._switchHammer.on('tap', run.bind(this, this._dragEnd));\n this.$('.md-container').on('click', run.bind(this, this._handleNativeClick));\n },\n\n _handleNativeClick: function _handleNativeClick() {\n return get(this, 'bubbles');\n },\n\n _teardownSwitch: function _teardownSwitch() {\n if (this._switchContainerHammer) {\n this._switchContainerHammer.destroy();\n this._switchHammer.destroy();\n }\n },\n\n _dragStart: function _dragStart() {\n this.set('dragAmount', +this.get('value'));\n this.set('dragging', true);\n },\n\n _drag: function _drag(event) {\n if (!this.get('disabled')) {\n // Set the amount the switch has been dragged\n this.set('dragAmount', +this.get('value') + event.deltaX / this.get('switchWidth'));\n }\n },\n\n _dragEnd: function _dragEnd() {\n if (!this.get('disabled')) {\n var value = this.get('value');\n var dragAmount = this.get('dragAmount');\n\n if (!this.get('dragging') || value && dragAmount < 0.5 || !value && dragAmount > 0.5) {\n this.sendAction('onChange', !value);\n }\n this.set('dragging', false);\n this.set('dragAmount', null);\n }\n },\n\n focusIn: function focusIn() {\n // Focusing in w/o being pressed should use the default behavior\n if (!this.get('pressed')) {\n this._super.apply(this, arguments);\n }\n },\n\n keyPress: function keyPress(ev) {\n if (ev.which === this.get('constants.KEYCODE.SPACE') || ev.which === this.get('constants.KEYCODE.ENTER')) {\n ev.preventDefault();\n this._dragEnd();\n }\n },\n\n processProxy: function processProxy() {\n this.sendAction('onChange', !this.get('value'));\n }\n\n });\n});","define('ember-paper/components/paper-toolbar-tools', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n var Component = _ember['default'].Component;\n\n exports['default'] = Component.extend({\n classNames: ['md-toolbar-tools']\n });\n});","define('ember-paper/components/paper-toolbar', ['exports', 'ember', 'ember-paper/mixins/color-mixin'], function (exports, _ember, _emberPaperMixinsColorMixin) {\n 'use strict';\n\n var Component = _ember['default'].Component;\n\n exports['default'] = Component.extend(_emberPaperMixinsColorMixin['default'], {\n tagName: 'md-toolbar',\n classNames: ['md-default-theme'],\n tall: false,\n classNameBindings: ['tall:md-tall']\n });\n});","define('ember-paper/helpers/underscore', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n var _slicedToArray = (function () {\n function sliceIterator(arr, i) {\n var _arr = [];var _n = true;var _d = false;var _e = undefined;try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;_e = err;\n } finally {\n try {\n if (!_n && _i['return']) _i['return']();\n } finally {\n if (_d) throw _e;\n }\n }return _arr;\n }return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError('Invalid attempt to destructure non-iterable instance');\n }\n };\n })();\n\n exports.underscore = underscore;\n\n var Helper = _ember['default'].Helper;\n var Str = _ember['default'].String;\n\n function underscore(_ref) {\n var _ref2 = _slicedToArray(_ref, 1);\n\n var text = _ref2[0];\n\n return Str.underscore(text);\n }\n\n exports['default'] = Helper.helper(underscore);\n});","define('ember-paper/initializers/paper-wormhole', ['exports'], function (exports) {\n 'use strict';\n\n exports['default'] = initialize;\n\n var hasDOM = typeof document !== 'undefined';\n var defaultWormhole = 'paper-wormhole';\n function initialize() {\n if (!hasDOM) {\n return;\n }\n\n var application = arguments[1] || arguments[0];\n var rootElementSelector = application.rootElement || 'body';\n var rootElement = document.querySelector(rootElementSelector);\n\n var wormhole = document.createElement('div');\n wormhole.id = defaultWormhole;\n\n rootElement.appendChild(wormhole);\n }\n});","define('ember-paper/mixins/color-mixin', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n exports['default'] = _ember['default'].Mixin.create({\n classNameBindings: ['warn:md-warn', 'accent:md-accent', 'primary:md-primary']\n });\n});","define('ember-paper/mixins/events-mixin', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n exports['default'] = _ember['default'].Mixin.create({\n touchStart: function touchStart(e) {\n return this.down(e);\n },\n mouseDown: function mouseDown(e) {\n this.down(e);\n },\n touchEnd: function touchEnd(e) {\n return this.up(e);\n },\n mouseUp: function mouseUp(e) {\n return this.up(e);\n },\n touchCancel: function touchCancel(e) {\n return this.up(e);\n },\n mouseLeave: function mouseLeave(e) {\n return this.up(e);\n },\n up: _ember['default'].K,\n down: _ember['default'].K,\n contextMenu: _ember['default'].K,\n\n /*\n * Move events\n */\n\n mouseMove: function mouseMove(e) {\n return this.move(e);\n },\n\n touchMove: function touchMove(e) {\n return this.move(e);\n },\n\n pointerMove: function pointerMove(e) {\n return this.move(e);\n },\n\n move: _ember['default'].K\n });\n});","define('ember-paper/mixins/flex-mixin', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n /*\n * Adds bindings to flex attributes\n * - flex=true|false\n * - flex-layout=column|row\n */\n exports['default'] = _ember['default'].Mixin.create({\n attributeBindings: ['flex', 'flex-layout:layout',\n // Allow responsive layout definition ( see layout.scss: layout-for-name ):\n 'layout-sm', 'layout-gt-sm', 'layout-md', 'layout-gt-md', 'layout-lg', 'layout-gt-lg']\n });\n});","define('ember-paper/mixins/proxiable-mixin', ['exports', 'ember', 'ember-paper/mixins/proxy-mixin'], function (exports, _ember, _emberPaperMixinsProxyMixin) {\n 'use strict';\n\n var computed = _ember['default'].computed;\n var get = _ember['default'].get;\n var isEmpty = _ember['default'].isEmpty;\n\n exports['default'] = _ember['default'].Mixin.create({\n init: function init() {\n this._super.apply(this, arguments);\n _ember['default'].run.next(this, 'registerProxy');\n },\n\n registerProxy: function registerProxy() {\n var proxy = this.nearestOfType(_emberPaperMixinsProxyMixin['default']);\n if (proxy) {\n proxy.register(this);\n }\n },\n\n processProxy: null,\n\n // Paper item secondary container class\n isSecondary: computed('class', function () {\n var cls = get(this, 'class');\n if (!isEmpty(cls)) {\n return cls.indexOf('md-secondary') !== -1;\n } else {\n return false;\n }\n }),\n isProxyHandlerSet: false\n });\n});","define('ember-paper/mixins/proxy-mixin', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n exports['default'] = _ember['default'].Mixin.create({\n proxiedComponents: _ember['default'].computed(function () {\n return _ember['default'].A();\n }),\n register: function register(component) {\n if (!component.get('skipProxy')) {\n this.get('proxiedComponents').addObject(component);\n this.setupProxiedComponent();\n }\n }\n });\n});","define('ember-paper/mixins/ripple-mixin', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n var inject = _ember['default'].inject;\n var computed = _ember['default'].computed;\n var Mixin = _ember['default'].Mixin;\n var run = _ember['default'].run;\n var $ = _ember['default'].$;\n\n /* global window */\n\n var DURATION = 400;\n\n exports['default'] = Mixin.create({\n util: inject.service(),\n rippleContainerSelector: '.md-container',\n\n center: false,\n dimBackground: false,\n fitRipple: false,\n colorElement: false,\n noink: false,\n\n rippleInk: computed('noink', 'rippleInkColor', function () {\n if (this.get('noink')) {\n return false;\n }\n if (this.get('rippleInkColor')) {\n return this.get('rippleInkColor');\n }\n return '';\n }),\n\n didInsertElement: function didInsertElement() {\n this._super.apply(this, arguments);\n this.rippleElement = this.$(this.get('rippleContainerSelector'));\n this.mousedown = false;\n this.ripples = [];\n this.timeout = null; // Stores a reference to the most-recent ripple timeout\n this.lastRipple = null;\n\n this._container = this.createContainer();\n\n this.rippleElement.addClass('md-ink-ripple');\n this.bindEvents();\n },\n\n autoCleanup: function autoCleanup(self, cleanupFn) {\n if (self.mousedown || self.lastRipple) {\n self.mousedown = false;\n self.get('util').nextTick(cleanupFn.bind(self), false);\n }\n },\n\n color: function color(value) {\n var self = this;\n\n // If assigning a color value, apply it to background and the ripple color\n if (typeof value !== 'undefined') {\n self._color = self._parseColor(value);\n }\n\n // If color lookup, use assigned, defined, or inherited\n return self._color || self._parseColor(self.get('rippleInk')) || self._parseColor(getElementColor());\n\n /*\n * Finds the color element and returns its text color for use as default ripple color\n * @returns {string}\n */\n function getElementColor() {\n var items = self.get('colorElement') ? self.get('colorElement') : [];\n var elem = items.length ? items[0] : self.rippleElement[0];\n\n return elem ? window.getComputedStyle(elem).color : 'rgb(0,0,0)';\n }\n },\n\n calculateColor: function calculateColor() {\n return this.color();\n },\n\n _parseColor: function _parseColor(color, multiplier) {\n multiplier = multiplier || 1;\n\n if (!color) {\n return;\n }\n if (color.indexOf('rgba') === 0) {\n return color.replace(/\\d?\\.?\\d*\\s*\\)\\s*$/, (0.1 * multiplier).toString() + ')');\n }\n if (color.indexOf('rgb') === 0) {\n return rgbToRGBA(color);\n }\n if (color.indexOf('#') === 0) {\n return hexToRGBA(color);\n }\n\n /*\n * Converts hex value to RGBA string\n * @param color {string}\n * @returns {string}\n */\n function hexToRGBA(color) {\n var hex = color[0] === '#' ? color.substr(1) : color;\n var dig = hex.length / 3;\n var red = hex.substr(0, dig);\n var green = hex.substr(dig, dig);\n var blue = hex.substr(dig * 2);\n if (dig === 1) {\n red += red;\n green += green;\n blue += blue;\n }\n return 'rgba(' + parseInt(red, 16) + ', ' + parseInt(green, 16) + ', ' + parseInt(blue, 16) + ', 0.1)';\n }\n\n /*\n * Converts an RGB color to RGBA\n * @param color {string}\n * @returns {string}\n */\n function rgbToRGBA(color) {\n return color.replace(')', ', 0.1)').replace('(', 'a(');\n }\n },\n bindEvents: function bindEvents() {\n this.rippleElement.on('mousedown', run.bind(this, this.handleMousedown));\n this.rippleElement.on('mouseup touchend', run.bind(this, this.handleMouseup));\n this.rippleElement.on('mouseleave', run.bind(this, this.handleMouseup));\n this.rippleElement.on('touchmove', run.bind(this, this.handleTouchmove));\n },\n handleMousedown: function handleMousedown(event) {\n if (this.mousedown) {\n return;\n }\n\n // When jQuery is loaded, we have to get the original event\n if (event.hasOwnProperty('originalEvent')) {\n event = event.originalEvent;\n }\n this.mousedown = true;\n if (this.get('center')) {\n this.createRipple(this._container.prop('clientWidth') / 2, this._container.prop('clientWidth') / 2);\n } else {\n\n // We need to calculate the relative coordinates if the target is a sublayer of the ripple element\n if (event.srcElement !== this.rippleElement[0]) {\n var layerRect = this.rippleElement[0].getBoundingClientRect();\n var layerX = event.clientX - layerRect.left;\n var layerY = event.clientY - layerRect.top;\n\n this.createRipple(layerX, layerY);\n } else {\n this.createRipple(event.offsetX, event.offsetY);\n }\n }\n },\n handleMouseup: function handleMouseup() {\n this.autoCleanup(this, this.clearRipples);\n },\n handleTouchmove: function handleTouchmove() {\n this.autoCleanup(this, this.deleteRipples);\n },\n deleteRipples: function deleteRipples() {\n for (var i = 0; i < this.ripples.length; i++) {\n this.ripples[i].remove();\n }\n },\n clearRipples: function clearRipples() {\n for (var i = 0; i < this.ripples.length; i++) {\n this.fadeInComplete(this.ripples[i]);\n }\n },\n createContainer: function createContainer() {\n var container = $('');\n this.rippleElement.append(container);\n return container;\n },\n clearTimeout: function clearTimeout() {\n if (this.timeout) {\n run.cancel(this.timeout);\n this.timeout = null;\n }\n },\n isRippleAllowed: function isRippleAllowed() {\n var element = this.rippleElement.get(0);\n do {\n if (!element.tagName || element.tagName === 'BODY') {\n break;\n }\n\n if (element && $.isFunction(element.hasAttribute)) {\n if (element.hasAttribute('disabled')) {\n return false;\n }\n if (this.get('rippleInk') === false) {\n return false;\n }\n }\n } while (element = element.parentNode);\n\n return true;\n },\n createRipple: function createRipple(left, top) {\n if (!this.isRippleAllowed()) {\n return;\n }\n\n var ctrl = this;\n var ripple = $('');\n var width = this.rippleElement.prop('clientWidth');\n var height = this.rippleElement.prop('clientHeight');\n var x = Math.max(Math.abs(width - left), left) * 2;\n var y = Math.max(Math.abs(height - top), top) * 2;\n var size = getSize(this.get('fitRipple'), x, y);\n var color = this.calculateColor();\n\n ripple.css({\n left: left + 'px',\n top: top + 'px',\n background: 'black',\n width: size + 'px',\n height: size + 'px',\n backgroundColor: rgbaToRGB(color),\n borderColor: rgbaToRGB(color)\n });\n this.lastRipple = ripple;\n\n // we only want one timeout to be running at a time\n this.clearTimeout();\n this.timeout = run.later(this, function () {\n ctrl.clearTimeout();\n if (!ctrl.mousedown) {\n ctrl.fadeInComplete(ripple);\n }\n }, {}, DURATION * 0.35);\n\n if (this.get('dimBackground')) {\n this._container.css({ backgroundColor: color });\n }\n this._container.append(ripple);\n this.ripples.push(ripple);\n ripple.addClass('md-ripple-placed');\n\n this.get('util').nextTick(function () {\n\n ripple.addClass('md-ripple-scaled md-ripple-active');\n run.later(this, function () {\n ctrl.clearRipples();\n }, {}, DURATION);\n }, false);\n\n function rgbaToRGB(color) {\n return color ? color.replace('rgba', 'rgb').replace(/,[^\\),]+\\)/, ')') : 'rgb(0,0,0)';\n }\n\n function getSize(fit, x, y) {\n return fit ? Math.max(x, y) : Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));\n }\n },\n fadeInComplete: function fadeInComplete(ripple) {\n if (this.lastRipple === ripple) {\n if (!this.timeout && !this.mousedown) {\n this.removeRipple(ripple);\n }\n } else {\n this.removeRipple(ripple);\n }\n },\n removeRipple: function removeRipple(ripple) {\n var ctrl = this;\n var index = this.ripples.indexOf(ripple);\n if (index < 0) {\n return;\n }\n this.ripples.splice(this.ripples.indexOf(ripple), 1);\n ripple.removeClass('md-ripple-active');\n if (this.ripples.length === 0) {\n this._container.css({ backgroundColor: '' });\n }\n // use a 2-second timeout in order to allow for the animation to finish\n // we don't actually care how long the animation takes\n run.later(this, function () {\n ctrl.fadeOutComplete(ripple);\n }, {}, DURATION);\n },\n fadeOutComplete: function fadeOutComplete(ripple) {\n ripple.remove();\n this.lastRipple = null;\n }\n });\n});","define('ember-paper/mixins/translate3d-mixin', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n var $ = _ember['default'].$;\n var Mixin = _ember['default'].Mixin;\n var htmlSafe = _ember['default'].String.htmlSafe;\n var Promise = _ember['default'].RSVP.Promise;\n var computed = _ember['default'].computed;\n var inject = _ember['default'].inject;\n var run = _ember['default'].run;\n var K = _ember['default'].K;\n\n exports['default'] = Mixin.create({\n constants: inject.service(),\n\n attributeBindings: ['translateStyle:style'],\n classNameBindings: ['transformIn:md-transition-in'],\n\n fromStyle: computed('defaultedOpenFrom', function () {\n return this.toTransformCss(this.calculateZoomToOrigin(this.element, this.get('defaultedOpenFrom')));\n }),\n\n centerStyle: computed(function () {\n return this.toTransformCss('');\n }),\n\n translateStyle: computed('fromStyle', 'centerStyle', 'transformStyleApply', function () {\n if (this.get('transformStyleApply') === 'from') {\n return htmlSafe(this.get('fromStyle'));\n } else if (this.get('transformStyleApply') === 'main') {\n return htmlSafe(this.get('centerStyle'));\n } else {\n return htmlSafe('');\n }\n }),\n\n init: function init() {\n this._super.apply(this, arguments);\n this.TRANSITIONEND = this.get('constants').get('CSS').TRANSITIONEND;\n },\n\n onTranslateFromEnd: K,\n onTranslateToEnd: K,\n\n didInsertElement: function didInsertElement() {\n var _this = this;\n\n this._super.apply(this, arguments);\n\n run.schedule('afterRender', function () {\n // Set translate3d style to start at the `from` origin\n _this.set('transformStyleApply', 'from');\n // Wait while CSS takes affect\n // Set the `main` styles and run the transition-in styles\n run.next(function () {\n _this.waitTransitionEnd($(_this.element)).then(function () {\n if (!_this.get('isDestroying') && !_this.get('isDestroyed')) {\n _this.onTranslateFromEnd();\n }\n });\n if (!_this.get('isDestroying') && !_this.get('isDestroyed')) {\n _this.set('transformStyleApply', 'main');\n _this.set('transformIn', true);\n }\n });\n });\n },\n\n /**\n * Specific reversal of the request translate animation above...\n *\n * @protected\n */\n willDestroyElement: function willDestroyElement() {\n var _this2 = this;\n\n this._super.apply(this, arguments);\n\n var containerClone = this.$().parent().clone();\n var dialogClone = containerClone.find('md-dialog');\n\n var toStyle = this.toTransformCss(this.calculateZoomToOrigin(this.element, this.get('defaultedCloseTo')));\n\n run.schedule('afterRender', function () {\n $(_this2.get('defaultedParent')).parent().append(containerClone);\n run.next(function () {\n dialogClone.removeClass('md-transition-in');\n dialogClone.addClass('md-transition-out');\n dialogClone.attr('style', toStyle);\n run.next(function () {\n _this2.waitTransitionEnd(dialogClone).then(function () {\n containerClone.remove();\n _this2.onTranslateToEnd($(_this2.get('origin')));\n });\n });\n });\n });\n },\n\n /**\n * Listen for transitionEnd event (with optional timeout)\n * Announce completion or failure via promise handlers\n *\n * @public\n */\n waitTransitionEnd: function waitTransitionEnd($element) {\n var _this3 = this;\n\n // fallback is 3 secs\n return new Promise(function (resolve /*, reject*/) {\n\n // Upon timeout or transitionEnd, reject or resolve (respectively) this promise.\n // NOTE: Make sure this transitionEnd didn't bubble up from a child\n $element.one(_this3.TRANSITIONEND, function (ev) {\n if (ev) {\n run(resolve);\n }\n });\n });\n },\n\n /**\n * Calculate the zoom transform from dialog to origin.\n *\n * We use this to set the dialog position immediately;\n * then the md-transition-in actually translates back to\n * `translate3d(0,0,0) scale(1.0)`...\n *\n * NOTE: all values are rounded to the nearest integer\n *\n * @public\n */\n calculateZoomToOrigin: function calculateZoomToOrigin(element, originator) {\n var zoomStyle = undefined;\n\n if (originator) {\n originator = $(originator).get(0);\n var originBnds = this.copyRect(originator.getBoundingClientRect());\n var dialogRect = this.copyRect(element.getBoundingClientRect());\n var dialogCenterPt = this.centerPointFor(dialogRect);\n var originCenterPt = this.centerPointFor(originBnds);\n\n zoomStyle = {\n centerX: originCenterPt.x - dialogCenterPt.x,\n centerY: originCenterPt.y - dialogCenterPt.y,\n scaleX: Math.min(0.5, originBnds.width / dialogRect.width),\n scaleY: Math.min(0.5, originBnds.height / dialogRect.height)\n };\n } else {\n zoomStyle = { centerX: 0, centerY: 0, scaleX: 0.5, scaleY: 0.5 };\n }\n\n return 'translate3d(' + zoomStyle.centerX + 'px, ' + zoomStyle.centerY + 'px, 0 ) scale(' + zoomStyle.scaleX + ', ' + zoomStyle.scaleY + ')';\n },\n\n /**\n * Convert the translate CSS value to key/value pair(s).\n *\n * @public\n */\n toTransformCss: function toTransformCss(transform, addTransition) {\n var styles = '';\n this.get('constants').get('CSS').TRANSFORM.split(' ').forEach(function (key) {\n styles += key + ':' + transform + ';';\n });\n\n if (addTransition) {\n styles += 'transform: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;';\n }\n\n return styles;\n },\n\n /**\n * Clone the Rect and calculate the height/width if needed\n *\n * @public\n */\n copyRect: function copyRect(source, destination) {\n if (!source) {\n return null;\n }\n\n destination = destination || {};\n\n 'left top right bottom width height'.split(' ').forEach(function (key) {\n destination[key] = Math.round(source[key]);\n });\n\n destination.width = destination.width || destination.right - destination.left;\n destination.height = destination.height || destination.bottom - destination.top;\n\n return destination;\n },\n\n /**\n * Calculate ClientRect of element; return null if hidden or zero size\n *\n * @public\n */\n clientRect: function clientRect(element) {\n var bounds = $(element)[0].getBoundingClientRect();\n\n // If the event origin element has zero size, it has probably been hidden.\n return bounds && bounds.width > 0 && bounds.height > 0 ? this.copyRect(bounds) : null;\n },\n\n /**\n * Calculate 'rounded' center point of Rect\n *\n * @public\n */\n centerPointFor: function centerPointFor(targetRect) {\n return {\n x: Math.round(targetRect.left + targetRect.width / 2),\n y: Math.round(targetRect.top + targetRect.height / 2)\n };\n }\n\n });\n});","define('ember-paper/services/paper-sidenav', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n var Service = _ember['default'].Service;\n var assert = _ember['default'].assert;\n\n exports['default'] = Service.extend({\n init: function init() {\n this._super.apply(this, arguments);\n this._sidenavs = {};\n },\n\n willDestroy: function willDestroy() {\n this._super.apply(this, arguments);\n delete this._sidenavs;\n },\n\n register: function register(name, sidenav) {\n if (!this._sidenavs[name]) {\n this._sidenavs[name] = [];\n }\n this._sidenavs[name].push({ name: name, sidenav: sidenav });\n },\n\n unregister: function unregister(name, sidenav) {\n assert('You tried to unregister a sidenav named \\'' + name + '\\' but no such sidenav is registered', this._sidenavs[name] && this._sidenavs[name].length);\n var sidenavs = this._sidenavs[name] || [];\n this._sidenavs[name] = sidenavs.filter(function (s) {\n return s !== sidenav;\n });\n },\n\n open: function open() {\n var name = arguments.length <= 0 || arguments[0] === undefined ? 'default' : arguments[0];\n\n assert('You tried to open a sidenav named \\'' + name + '\\' but no such sidenav is registered', this._sidenavs[name] && this._sidenavs[name].length);\n var sidenavs = this._sidenavs[name] || [];\n sidenavs.forEach(function (s) {\n return s.sidenav.open();\n });\n },\n\n close: function close() {\n var name = arguments.length <= 0 || arguments[0] === undefined ? 'default' : arguments[0];\n\n assert('You tried to close a sidenav named \\'' + name + '\\' but no such sidenav is registered', this._sidenavs[name] && this._sidenavs[name].length);\n var sidenavs = this._sidenavs[name] || [];\n sidenavs.forEach(function (s) {\n return s.sidenav.close();\n });\n },\n\n toggle: function toggle() {\n var name = arguments.length <= 0 || arguments[0] === undefined ? 'default' : arguments[0];\n\n assert('You tried to toggle a sidenav named \\'' + name + '\\' but no such sidenav is registered', this._sidenavs[name] && this._sidenavs[name].length);\n var sidenavs = this._sidenavs[name] || [];\n sidenavs.forEach(function (s) {\n return s.sidenav.toggle();\n });\n }\n });\n});","define(\"ember-paper/utils/grid-layout\", [\"exports\"], function (exports) {\n \"use strict\";\n\n var defaultAnimator = GridTileAnimator;\n\n /*\n * Publish layout function\n */\n function GridLayout(colCount, tileSpans) {\n var self = undefined,\n _layoutInfo = undefined,\n gridStyles = undefined,\n layoutTime = undefined,\n mapTime = undefined,\n reflowTime = undefined;\n\n _layoutInfo = calculateGridfor(colCount, tileSpans);\n\n return self = {\n\n /*\n * An array of objects describing each tile's position in the grid.\n */\n layoutInfo: function layoutInfo() {\n return _layoutInfo;\n },\n\n /*\n * Maps grid positioning to an element and a set of styles using the\n * provided updateFn.\n */\n map: function map(updateFn) {\n var info = self.layoutInfo();\n gridStyles = updateFn(info.positioning, info.rowCount);\n\n return self;\n },\n\n /*\n * Default animator simply sets the element.css( ). An alternate\n * animator can be provided as an argument. The function has the following\n * signature:\n *\n * function({grid: {element: JQLite, style: Object}, tiles: Array<{element: JQLite, style: Object}>)\n */\n reflow: function reflow(animatorFn) {\n var animator = animatorFn || defaultAnimator;\n animator(gridStyles.grid, gridStyles.tiles);\n return self;\n },\n\n /*\n * Timing for the most recent layout run.\n */\n performance: function performance() {\n return {\n tileCount: tileSpans.length,\n layoutTime: layoutTime,\n mapTime: mapTime,\n reflowTime: reflowTime,\n totalTime: layoutTime + mapTime + reflowTime\n };\n }\n };\n }\n\n /*\n * Default Gridlist animator simple sets the css for each element;\n * NOTE: any transitions effects must be manually set in the CSS.\n * e.g.\n *\n * md-grid-tile {\n * transition: all 700ms ease-out 50ms;\n * }\n *\n */\n function GridTileAnimator(grid, tiles) {\n grid.element.css(grid.style);\n tiles.forEach(function (t) {\n t.element.css(t.style);\n });\n }\n\n /*\n * Calculates the positions of tiles.\n *\n * The algorithm works as follows:\n * An Array with length colCount (spaceTracker) keeps track of\n * available tiling positions, where elements of value 0 represents an\n * empty position. Space for a tile is reserved by finding a sequence of\n * 0s with length <= than the tile's colspan. When such a space has been\n * found, the occupied tile positions are incremented by the tile's\n * rowspan value, as these positions have become unavailable for that\n * many rows.\n *\n * If the end of a row has been reached without finding space for the\n * tile, spaceTracker's elements are each decremented by 1 to a minimum\n * of 0. Rows are searched in this fashion until space is found.\n */\n function calculateGridfor(colCount, tileSpans) {\n var curCol = 0;\n var curRow = 0;\n var spaceTracker = newSpaceTracker();\n\n return {\n positioning: tileSpans.map(function (spans, i) {\n return {\n spans: spans,\n position: reserveSpace(spans, i)\n };\n }),\n rowCount: curRow + Math.max.apply(Math, spaceTracker)\n };\n\n function reserveSpace(spans, i) {\n if (spans.col > colCount) {\n throw \"md-grid-list: Tile at position \" + i + \" has a colspan\\n (\" + spans.col + \") that exceeds the column count\\n (\" + colCount + \")\";\n }\n\n var start = 0;\n var end = 0;\n\n // TODO(shyndman): This loop isn't strictly necessary if you can\n // determine the minimum number of rows before a space opens up. To do\n // this, recognize that you've iterated across an entire row looking for\n // space, and if so fast-forward by the minimum rowSpan count. Repeat\n // until the required space opens up.\n while (end - start < spans.col) {\n if (curCol >= colCount) {\n nextRow();\n continue;\n }\n\n start = spaceTracker.indexOf(0, curCol);\n if (start === -1 || (end = findEnd(start + 1)) === -1) {\n start = end = 0;\n nextRow();\n continue;\n }\n\n curCol = end + 1;\n }\n\n adjustRow(start, spans.col, spans.row);\n curCol = start + spans.col;\n\n return {\n col: start,\n row: curRow\n };\n }\n\n function nextRow() {\n curCol = 0;\n curRow++;\n adjustRow(0, colCount, -1); // Decrement row spans by one\n }\n\n function adjustRow(from, cols, by) {\n for (var i = from; i < from + cols; i++) {\n spaceTracker[i] = Math.max(spaceTracker[i] + by, 0);\n }\n }\n\n function findEnd(start) {\n var i = undefined;\n for (i = start; i < spaceTracker.length; i++) {\n if (spaceTracker[i] !== 0) {\n return i;\n }\n }\n\n if (i === spaceTracker.length) {\n return i;\n }\n }\n\n function newSpaceTracker() {\n var tracker = [];\n for (var i = 0; i < colCount; i++) {\n tracker.push(0);\n }\n return tracker;\n }\n }\n\n exports[\"default\"] = GridLayout;\n});","define('ember-paper/utils/promise-proxies', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n exports.promiseObject = promiseObject;\n exports.promiseArray = promiseArray;\n\n var Promise = _ember['default'].RSVP.Promise;\n\n // See http://emberjs.com/api/data/classes/DS.PromiseArray.html\n var PromiseArray = _ember['default'].ArrayProxy.extend(_ember['default'].PromiseProxyMixin);\n exports.PromiseArray = PromiseArray;\n\n // See http://emberjs.com/api/data/classes/DS.PromiseObject.html\n var PromiseObject = _ember['default'].ObjectProxy.extend(_ember['default'].PromiseProxyMixin);\n\n exports.PromiseObject = PromiseObject;\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});","define('ember-paper/validators/max', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n exports.max = max;\n\n var isEmpty = _ember['default'].isEmpty;\n\n function max(value, max) {\n return isEmpty(max) || isEmpty(value) || parseFloat(value) <= parseFloat(max);\n }\n\n exports['default'] = {\n param: 'max',\n message: 'Must be less than %@.',\n validate: max\n };\n});","define('ember-paper/validators/maxlength', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n exports.maxlength = maxlength;\n\n var isEmpty = _ember['default'].isEmpty;\n var isNone = _ember['default'].isNone;\n\n function maxlength(value, maxlength) {\n return isEmpty(maxlength) || isNone(value) || ('' + value).length <= parseInt(maxlength, 10);\n }\n\n exports['default'] = {\n param: 'maxlength',\n message: 'Must not exceed %@ characters.',\n validate: maxlength\n };\n});","define('ember-paper/validators/min', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n exports.min = min;\n\n var isEmpty = _ember['default'].isEmpty;\n\n function min(value, min) {\n return isEmpty(min) || isEmpty(value) || parseFloat(value) >= parseFloat(min);\n }\n\n exports['default'] = {\n param: 'min',\n message: 'Must be at least %@.',\n validate: min\n };\n});","define('ember-paper/validators/minlength', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n exports.minlength = minlength;\n\n var isEmpty = _ember['default'].isEmpty;\n var isNone = _ember['default'].isNone;\n\n function minlength(value, minlength) {\n return isEmpty(minlength) || isNone(value) || ('' + value).length >= parseInt(minlength, 10);\n }\n\n exports['default'] = {\n param: 'minlength',\n message: 'Must have at least %@ characters.',\n validate: minlength\n };\n});","define('ember-paper/validators/required', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n exports.required = required;\n\n var isEmpty = _ember['default'].isEmpty;\n\n function required(value, required) {\n return required === true && !isEmpty(value) || required !== true;\n }\n\n exports['default'] = {\n param: 'required',\n message: 'This is required.',\n // required can be a boolean or 'style' for just required asterisk styling.\n validate: required\n };\n});","define('ember-resolver/container-debug-adapter', ['exports', 'ember', 'ember-resolver/utils/module-registry'], function (exports, _ember, _emberResolverUtilsModuleRegistry) {\n 'use strict';\n\n var ContainerDebugAdapter = _ember['default'].ContainerDebugAdapter;\n\n var ModulesContainerDebugAdapter = null;\n\n function getPod(type, key, prefix) {\n var match = key.match(new RegExp('^/?' + prefix + '/(.+)/' + type + '$'));\n if (match) {\n return match[1];\n }\n }\n\n // Support Ember < 1.5-beta.4\n // TODO: Remove this after 1.5.0 is released\n if (typeof ContainerDebugAdapter !== 'undefined') {\n\n /*\n * This module defines a subclass of Ember.ContainerDebugAdapter that adds two\n * important features:\n *\n * 1) is able provide injections to classes that implement `extend`\n * (as is typical with Ember).\n */\n\n ModulesContainerDebugAdapter = ContainerDebugAdapter.extend({\n _moduleRegistry: null,\n\n init: function init() {\n this._super.apply(this, arguments);\n\n if (!this._moduleRegistry) {\n this._moduleRegistry = new _emberResolverUtilsModuleRegistry['default']();\n }\n },\n\n /**\n The container of the application being debugged.\n This property will be injected\n on creation.\n @property container\n @default null\n */\n\n /**\n The resolver instance of the application\n being debugged. This property will be injected\n on creation.\n @property resolver\n @default null\n */\n\n /**\n Returns true if it is possible to catalog a list of available\n classes in the resolver for a given type.\n @method canCatalogEntriesByType\n @param {string} type The type. e.g. \"model\", \"controller\", \"route\"\n @return {boolean} whether a list is available for this type.\n */\n canCatalogEntriesByType: function canCatalogEntriesByType() /* type */{\n return true;\n },\n\n /**\n Returns the available classes a given type.\n @method catalogEntriesByType\n @param {string} type The type. e.g. \"model\", \"controller\", \"route\"\n @return {Array} An array of classes.\n */\n catalogEntriesByType: function catalogEntriesByType(type) {\n var moduleNames = this._moduleRegistry.moduleNames();\n var types = _ember['default'].A();\n\n var prefix = this.namespace.modulePrefix;\n\n for (var i = 0, l = moduleNames.length; i < l; i++) {\n var key = moduleNames[i];\n\n if (key.indexOf(type) !== -1) {\n // Check if it's a pod module\n var name = getPod(type, key, this.namespace.podModulePrefix || prefix);\n if (!name) {\n // Not pod\n name = key.split(type + 's/').pop();\n\n // Support for different prefix (such as ember-cli addons).\n // Uncomment the code below when\n // https://github.com/ember-cli/ember-resolver/pull/80 is merged.\n\n //var match = key.match('^/?(.+)/' + type);\n //if (match && match[1] !== prefix) {\n // Different prefix such as an addon\n //name = match[1] + '@' + name;\n //}\n }\n types.addObject(name);\n }\n }\n return types;\n }\n });\n }\n\n exports['default'] = ModulesContainerDebugAdapter;\n});","define('ember-resolver/index', ['exports', 'ember-resolver/resolver'], function (exports, _emberResolverResolver) {\n 'use strict';\n\n Object.defineProperty(exports, 'default', {\n enumerable: true,\n get: function get() {\n return _emberResolverResolver['default'];\n }\n });\n});","define('ember-resolver/resolver', ['exports', 'ember', 'ember-resolver/utils/module-registry', 'ember-resolver/utils/class-factory', 'ember-resolver/utils/make-dictionary'], function (exports, _ember, _emberResolverUtilsModuleRegistry, _emberResolverUtilsClassFactory, _emberResolverUtilsMakeDictionary) {\n /*globals require */\n\n 'use strict';\n\n /*\n * This module defines a subclass of Ember.DefaultResolver that adds two\n * important features:\n *\n * 1) The resolver makes the container aware of es6 modules via the AMD\n * output. The loader's _moduleEntries is consulted so that classes can be\n * resolved directly via the module loader, without needing a manual\n * `import`.\n * 2) is able to provide injections to classes that implement `extend`\n * (as is typical with Ember).\n */\n\n var _Ember$String = _ember['default'].String;\n var underscore = _Ember$String.underscore;\n var classify = _Ember$String.classify;\n var get = _ember['default'].get;\n var DefaultResolver = _ember['default'].DefaultResolver;\n\n function parseName(fullName) {\n /*jshint validthis:true */\n\n if (fullName.parsedName === true) {\n return fullName;\n }\n\n var prefix, type, name;\n var fullNameParts = fullName.split('@');\n\n // HTMLBars uses helper:@content-helper which collides\n // with ember-cli namespace detection.\n // This will be removed in a future release of HTMLBars.\n if (fullName !== 'helper:@content-helper' && fullNameParts.length === 2) {\n var prefixParts = fullNameParts[0].split(':');\n\n if (prefixParts.length === 2) {\n prefix = prefixParts[1];\n type = prefixParts[0];\n name = fullNameParts[1];\n } else {\n var nameParts = fullNameParts[1].split(':');\n\n prefix = fullNameParts[0];\n type = nameParts[0];\n name = nameParts[1];\n }\n } else {\n fullNameParts = fullName.split(':');\n type = fullNameParts[0];\n name = fullNameParts[1];\n }\n\n var fullNameWithoutType = name;\n var namespace = get(this, 'namespace');\n var root = namespace;\n\n return {\n parsedName: true,\n fullName: fullName,\n prefix: prefix || this.prefix({ type: type }),\n type: type,\n fullNameWithoutType: fullNameWithoutType,\n name: name,\n root: root,\n resolveMethodName: \"resolve\" + classify(type)\n };\n }\n\n function resolveOther(parsedName) {\n /*jshint validthis:true */\n\n _ember['default'].assert('`modulePrefix` must be defined', this.namespace.modulePrefix);\n\n var normalizedModuleName = this.findModuleName(parsedName);\n\n if (normalizedModuleName) {\n var defaultExport = this._extractDefaultExport(normalizedModuleName, parsedName);\n\n if (defaultExport === undefined) {\n throw new Error(\" Expected to find: '\" + parsedName.fullName + \"' within '\" + normalizedModuleName + \"' but got 'undefined'. Did you forget to `export default` within '\" + normalizedModuleName + \"'?\");\n }\n\n if (this.shouldWrapInClassFactory(defaultExport, parsedName)) {\n defaultExport = (0, _emberResolverUtilsClassFactory['default'])(defaultExport);\n }\n\n return defaultExport;\n } else {\n return this._super(parsedName);\n }\n }\n\n // Ember.DefaultResolver docs:\n // https://github.com/emberjs/ember.js/blob/master/packages/ember-application/lib/system/resolver.js\n var Resolver = DefaultResolver.extend({\n resolveOther: resolveOther,\n parseName: parseName,\n resolveTemplate: resolveOther,\n pluralizedTypes: null,\n moduleRegistry: null,\n\n makeToString: function makeToString(factory, fullName) {\n return '' + this.namespace.modulePrefix + '@' + fullName + ':';\n },\n\n shouldWrapInClassFactory: function shouldWrapInClassFactory() /* module, parsedName */{\n return false;\n },\n\n init: function init() {\n this._super();\n this.moduleBasedResolver = true;\n\n if (!this._moduleRegistry) {\n this._moduleRegistry = new _emberResolverUtilsModuleRegistry['default']();\n }\n\n this._normalizeCache = (0, _emberResolverUtilsMakeDictionary['default'])();\n\n this.pluralizedTypes = this.pluralizedTypes || (0, _emberResolverUtilsMakeDictionary['default'])();\n\n if (!this.pluralizedTypes.config) {\n this.pluralizedTypes.config = 'config';\n }\n\n this._deprecatedPodModulePrefix = false;\n },\n\n normalize: function normalize(fullName) {\n return this._normalizeCache[fullName] || (this._normalizeCache[fullName] = this._normalize(fullName));\n },\n\n _normalize: function _normalize(fullName) {\n // replace `.` with `/` in order to make nested controllers work in the following cases\n // 1. `needs: ['posts/post']`\n // 2. `{{render \"posts/post\"}}`\n // 3. `this.render('posts/post')` from Route\n var split = fullName.split(':');\n if (split.length > 1) {\n return split[0] + ':' + _ember['default'].String.dasherize(split[1].replace(/\\./g, '/'));\n } else {\n return fullName;\n }\n },\n\n pluralize: function pluralize(type) {\n return this.pluralizedTypes[type] || (this.pluralizedTypes[type] = type + 's');\n },\n\n podBasedLookupWithPrefix: function podBasedLookupWithPrefix(podPrefix, parsedName) {\n var fullNameWithoutType = parsedName.fullNameWithoutType;\n\n if (parsedName.type === 'template') {\n fullNameWithoutType = fullNameWithoutType.replace(/^components\\//, '');\n }\n\n return podPrefix + '/' + fullNameWithoutType + '/' + parsedName.type;\n },\n\n podBasedModuleName: function podBasedModuleName(parsedName) {\n var podPrefix = this.namespace.podModulePrefix || this.namespace.modulePrefix;\n\n return this.podBasedLookupWithPrefix(podPrefix, parsedName);\n },\n\n podBasedComponentsInSubdir: function podBasedComponentsInSubdir(parsedName) {\n var podPrefix = this.namespace.podModulePrefix || this.namespace.modulePrefix;\n podPrefix = podPrefix + '/components';\n\n if (parsedName.type === 'component' || parsedName.fullNameWithoutType.match(/^components/)) {\n return this.podBasedLookupWithPrefix(podPrefix, parsedName);\n }\n },\n\n mainModuleName: function mainModuleName(parsedName) {\n // if router:main or adapter:main look for a module with just the type first\n var tmpModuleName = parsedName.prefix + '/' + parsedName.type;\n\n if (parsedName.fullNameWithoutType === 'main') {\n return tmpModuleName;\n }\n },\n\n defaultModuleName: function defaultModuleName(parsedName) {\n return parsedName.prefix + '/' + this.pluralize(parsedName.type) + '/' + parsedName.fullNameWithoutType;\n },\n\n prefix: function prefix(parsedName) {\n var tmpPrefix = this.namespace.modulePrefix;\n\n if (this.namespace[parsedName.type + 'Prefix']) {\n tmpPrefix = this.namespace[parsedName.type + 'Prefix'];\n }\n\n return tmpPrefix;\n },\n\n /**\n A listing of functions to test for moduleName's based on the provided\n `parsedName`. This allows easy customization of additional module based\n lookup patterns.\n @property moduleNameLookupPatterns\n @returns {Ember.Array}\n */\n moduleNameLookupPatterns: _ember['default'].computed(function () {\n return [this.podBasedModuleName, this.podBasedComponentsInSubdir, this.mainModuleName, this.defaultModuleName];\n }),\n\n findModuleName: function findModuleName(parsedName, loggingDisabled) {\n var moduleNameLookupPatterns = this.get('moduleNameLookupPatterns');\n var moduleName;\n\n for (var index = 0, _length = moduleNameLookupPatterns.length; index < _length; index++) {\n var item = moduleNameLookupPatterns[index];\n\n var tmpModuleName = item.call(this, parsedName);\n\n // allow treat all dashed and all underscored as the same thing\n // supports components with dashes and other stuff with underscores.\n if (tmpModuleName) {\n tmpModuleName = this.chooseModuleName(tmpModuleName);\n }\n\n if (tmpModuleName && this._moduleRegistry.has(tmpModuleName)) {\n moduleName = tmpModuleName;\n }\n\n if (!loggingDisabled) {\n this._logLookup(moduleName, parsedName, tmpModuleName);\n }\n\n if (moduleName) {\n return moduleName;\n }\n }\n },\n\n chooseModuleName: function chooseModuleName(moduleName) {\n var underscoredModuleName = underscore(moduleName);\n\n if (moduleName !== underscoredModuleName && this._moduleRegistry.has(moduleName) && this._moduleRegistry.has(underscoredModuleName)) {\n throw new TypeError(\"Ambiguous module names: `\" + moduleName + \"` and `\" + underscoredModuleName + \"`\");\n }\n\n if (this._moduleRegistry.has(moduleName)) {\n return moduleName;\n } else if (this._moduleRegistry.has(underscoredModuleName)) {\n return underscoredModuleName;\n } else {\n // workaround for dasherized partials:\n // something/something/-something => something/something/_something\n var partializedModuleName = moduleName.replace(/\\/-([^\\/]*)$/, '/_$1');\n\n if (this._moduleRegistry.has(partializedModuleName)) {\n _ember['default'].deprecate('Modules should not contain underscores. ' + 'Attempted to lookup \"' + moduleName + '\" which ' + 'was not found. Please rename \"' + partializedModuleName + '\" ' + 'to \"' + moduleName + '\" instead.', false);\n\n return partializedModuleName;\n } else {\n return moduleName;\n }\n }\n },\n\n // used by Ember.DefaultResolver.prototype._logLookup\n lookupDescription: function lookupDescription(fullName) {\n var parsedName = this.parseName(fullName);\n\n var moduleName = this.findModuleName(parsedName, true);\n\n return moduleName;\n },\n\n // only needed until 1.6.0-beta.2 can be required\n _logLookup: function _logLookup(found, parsedName, description) {\n if (!_ember['default'].ENV.LOG_MODULE_RESOLVER && !parsedName.root.LOG_RESOLVER) {\n return;\n }\n\n var symbol, padding;\n\n if (found) {\n symbol = '[✓]';\n } else {\n symbol = '[ ]';\n }\n\n if (parsedName.fullName.length > 60) {\n padding = '.';\n } else {\n padding = new Array(60 - parsedName.fullName.length).join('.');\n }\n\n if (!description) {\n description = this.lookupDescription(parsedName);\n }\n\n _ember['default'].Logger.info(symbol, parsedName.fullName, padding, description);\n },\n\n knownForType: function knownForType(type) {\n var moduleKeys = this._moduleRegistry.moduleNames();\n\n var items = (0, _emberResolverUtilsMakeDictionary['default'])();\n for (var index = 0, length = moduleKeys.length; index < length; index++) {\n var moduleName = moduleKeys[index];\n var fullname = this.translateToContainerFullname(type, moduleName);\n\n if (fullname) {\n items[fullname] = true;\n }\n }\n\n return items;\n },\n\n translateToContainerFullname: function translateToContainerFullname(type, moduleName) {\n var prefix = this.prefix({ type: type });\n\n // Note: using string manipulation here rather than regexes for better performance.\n // pod modules\n // '^' + prefix + '/(.+)/' + type + '$'\n var podPrefix = prefix + '/';\n var podSuffix = '/' + type;\n var start = moduleName.indexOf(podPrefix);\n var end = moduleName.indexOf(podSuffix);\n\n if (start === 0 && end === moduleName.length - podSuffix.length && moduleName.length > podPrefix.length + podSuffix.length) {\n return type + ':' + moduleName.slice(start + podPrefix.length, end);\n }\n\n // non-pod modules\n // '^' + prefix + '/' + pluralizedType + '/(.+)$'\n var pluralizedType = this.pluralize(type);\n var nonPodPrefix = prefix + '/' + pluralizedType + '/';\n\n if (moduleName.indexOf(nonPodPrefix) === 0 && moduleName.length > nonPodPrefix.length) {\n return type + ':' + moduleName.slice(nonPodPrefix.length);\n }\n },\n\n _extractDefaultExport: function _extractDefaultExport(normalizedModuleName) {\n var module = require(normalizedModuleName, null, null, true /* force sync */);\n\n if (module && module['default']) {\n module = module['default'];\n }\n\n return module;\n }\n });\n\n Resolver.reopenClass({\n moduleBasedResolver: true\n });\n\n exports['default'] = Resolver;\n});","define('ember-resolver/utils/class-factory', ['exports'], function (exports) {\n 'use strict';\n\n exports['default'] = classFactory;\n\n function classFactory(klass) {\n return {\n create: function create(injections) {\n if (typeof klass.extend === 'function') {\n return klass.extend(injections);\n } else {\n return klass;\n }\n }\n };\n }\n});","define(\"ember-resolver/utils/create\", [\"exports\", \"ember\"], function (exports, _ember) {\n \"use strict\";\n\n var create = Object.create || _ember[\"default\"].create;\n if (!(create && !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 exports[\"default\"] = create;\n});","define('ember-resolver/utils/make-dictionary', ['exports', 'ember-resolver/utils/create'], function (exports, _emberResolverUtilsCreate) {\n 'use strict';\n\n exports['default'] = makeDictionary;\n\n function makeDictionary() {\n var cache = (0, _emberResolverUtilsCreate['default'])(null);\n cache['_dict'] = null;\n delete cache['_dict'];\n return cache;\n }\n});","define('ember-resolver/utils/module-registry', ['exports', 'ember'], function (exports, _ember) {\n /*globals requirejs, require */\n\n 'use strict';\n\n if (typeof requirejs.entries === 'undefined') {\n requirejs.entries = requirejs._eak_seen;\n }\n\n function ModuleRegistry(entries) {\n this._entries = entries || requirejs.entries;\n }\n\n ModuleRegistry.prototype.moduleNames = function ModuleRegistry_moduleNames() {\n return (Object.keys || _ember['default'].keys)(this._entries);\n };\n\n ModuleRegistry.prototype.has = function ModuleRegistry_has(moduleName) {\n return moduleName in this._entries;\n };\n\n ModuleRegistry.prototype.get = function ModuleRegistry_get(moduleName) {\n var exportName = arguments.length <= 1 || arguments[1] === undefined ? 'default' : arguments[1];\n\n var module = require(moduleName);\n return module && module[exportName];\n };\n\n exports['default'] = ModuleRegistry;\n});","define('ember-wormhole/components/ember-wormhole', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n var computed = _ember['default'].computed;\n var observer = _ember['default'].observer;\n var run = _ember['default'].run;\n\n exports['default'] = _ember['default'].Component.extend({\n to: computed.alias('destinationElementId'),\n destinationElementId: null,\n destinationElement: computed('destinationElementId', 'renderInPlace', function () {\n return this.get('renderInPlace') ? this.element : document.getElementById(this.get('destinationElementId'));\n }),\n renderInPlace: false,\n\n didInsertElement: function didInsertElement() {\n this._super.apply(this, arguments);\n this._firstNode = this.element.firstChild;\n this._lastNode = this.element.lastChild;\n this.appendToDestination();\n },\n\n willDestroyElement: function willDestroyElement() {\n var _this = this;\n\n this._super.apply(this, arguments);\n var firstNode = this._firstNode;\n var lastNode = this._lastNode;\n run.schedule('render', function () {\n _this.removeRange(firstNode, lastNode);\n });\n },\n\n destinationDidChange: observer('destinationElement', function () {\n var destinationElement = this.get('destinationElement');\n if (destinationElement !== this._firstNode.parentNode) {\n run.schedule('render', this, 'appendToDestination');\n }\n }),\n\n appendToDestination: function appendToDestination() {\n var destinationElement = this.get('destinationElement');\n var currentActiveElement = document.activeElement;\n if (!destinationElement) {\n var destinationElementId = this.get('destinationElementId');\n if (destinationElementId) {\n throw new Error('ember-wormhole failed to render into \\'#' + this.get('destinationElementId') + '\\' because the element is not in the DOM');\n }\n throw new Error('ember-wormhole failed to render content because the destinationElementId was set to an undefined or falsy value.');\n }\n\n this.appendRange(destinationElement, this._firstNode, this._lastNode);\n if (document.activeElement !== currentActiveElement) {\n currentActiveElement.focus();\n }\n },\n\n appendRange: function appendRange(destinationElement, firstNode, lastNode) {\n while (firstNode) {\n destinationElement.insertBefore(firstNode, null);\n firstNode = firstNode !== lastNode ? lastNode.parentNode.firstChild : null;\n }\n },\n\n removeRange: function removeRange(firstNode, lastNode) {\n var node = lastNode;\n do {\n var next = node.previousSibling;\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n if (node === firstNode) {\n break;\n }\n }\n node = next;\n } while (node);\n }\n\n });\n});","define('lodash/array/chunk', ['exports', 'lodash/internal/baseSlice', 'lodash/internal/isIterateeCall'], function (exports, _lodashInternalBaseSlice, _lodashInternalIsIterateeCall) {\n 'use strict';\n\n /* Native method references for those with the same name as other `lodash` methods. */\n var nativeCeil = Math.ceil,\n nativeFloor = Math.floor,\n nativeMax = Math.max;\n\n /**\n * Creates an array of elements split into groups the length of `size`.\n * If `collection` can't be split evenly, the final chunk will be the remaining\n * elements.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to process.\n * @param {number} [size=1] The length of each chunk.\n * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.\n * @returns {Array} Returns the new array containing chunks.\n * @example\n *\n * _.chunk(['a', 'b', 'c', 'd'], 2);\n * // => [['a', 'b'], ['c', 'd']]\n *\n * _.chunk(['a', 'b', 'c', 'd'], 3);\n * // => [['a', 'b', 'c'], ['d']]\n */\n function chunk(array, size, guard) {\n if (guard ? (0, _lodashInternalIsIterateeCall['default'])(array, size, guard) : size == null) {\n size = 1;\n } else {\n size = nativeMax(nativeFloor(size) || 1, 1);\n }\n var index = 0,\n length = array ? array.length : 0,\n resIndex = -1,\n result = Array(nativeCeil(length / size));\n\n while (index < length) {\n result[++resIndex] = (0, _lodashInternalBaseSlice['default'])(array, index, index += size);\n }\n return result;\n }\n\n exports['default'] = chunk;\n});","define(\"lodash/array/compact\", [\"exports\"], function (exports) {\n /**\n * Creates an array with all falsey values removed. The values `false`, `null`,\n * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to compact.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.compact([0, 1, false, 2, '', 3]);\n * // => [1, 2, 3]\n */\n \"use strict\";\n\n function compact(array) {\n var index = -1,\n length = array ? array.length : 0,\n resIndex = -1,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value) {\n result[++resIndex] = value;\n }\n }\n return result;\n }\n\n exports[\"default\"] = compact;\n});","define('lodash/array/difference', ['exports', 'lodash/internal/baseDifference', 'lodash/internal/baseFlatten', 'lodash/internal/isArrayLike', 'lodash/internal/isObjectLike', 'lodash/function/restParam'], function (exports, _lodashInternalBaseDifference, _lodashInternalBaseFlatten, _lodashInternalIsArrayLike, _lodashInternalIsObjectLike, _lodashFunctionRestParam) {\n 'use strict';\n\n /**\n * Creates an array of unique `array` values not included in the other\n * provided arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The arrays of values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.difference([1, 2, 3], [4, 2]);\n * // => [1, 3]\n */\n var difference = (0, _lodashFunctionRestParam['default'])(function (array, values) {\n return (0, _lodashInternalIsObjectLike['default'])(array) && (0, _lodashInternalIsArrayLike['default'])(array) ? (0, _lodashInternalBaseDifference['default'])(array, (0, _lodashInternalBaseFlatten['default'])(values, false, true)) : [];\n });\n\n exports['default'] = difference;\n});","define('lodash/array/drop', ['exports', 'lodash/internal/baseSlice', 'lodash/internal/isIterateeCall'], function (exports, _lodashInternalBaseSlice, _lodashInternalIsIterateeCall) {\n 'use strict';\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the beginning.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.drop([1, 2, 3]);\n * // => [2, 3]\n *\n * _.drop([1, 2, 3], 2);\n * // => [3]\n *\n * _.drop([1, 2, 3], 5);\n * // => []\n *\n * _.drop([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function drop(array, n, guard) {\n var length = array ? array.length : 0;\n if (!length) {\n return [];\n }\n if (guard ? (0, _lodashInternalIsIterateeCall['default'])(array, n, guard) : n == null) {\n n = 1;\n }\n return (0, _lodashInternalBaseSlice['default'])(array, n < 0 ? 0 : n);\n }\n\n exports['default'] = drop;\n});","define('lodash/array/dropRight', ['exports', 'lodash/internal/baseSlice', 'lodash/internal/isIterateeCall'], function (exports, _lodashInternalBaseSlice, _lodashInternalIsIterateeCall) {\n 'use strict';\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the end.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.dropRight([1, 2, 3]);\n * // => [1, 2]\n *\n * _.dropRight([1, 2, 3], 2);\n * // => [1]\n *\n * _.dropRight([1, 2, 3], 5);\n * // => []\n *\n * _.dropRight([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function dropRight(array, n, guard) {\n var length = array ? array.length : 0;\n if (!length) {\n return [];\n }\n if (guard ? (0, _lodashInternalIsIterateeCall['default'])(array, n, guard) : n == null) {\n n = 1;\n }\n n = length - (+n || 0);\n return (0, _lodashInternalBaseSlice['default'])(array, 0, n < 0 ? 0 : n);\n }\n\n exports['default'] = dropRight;\n});","define('lodash/array/dropRightWhile', ['exports', 'lodash/internal/baseCallback', 'lodash/internal/baseWhile'], function (exports, _lodashInternalBaseCallback, _lodashInternalBaseWhile) {\n 'use strict';\n\n /**\n * Creates a slice of `array` excluding elements dropped from the end.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * bound to `thisArg` and invoked with three arguments: (value, index, array).\n *\n * If a property name is provided for `predicate` the created `_.property`\n * style callback returns the property value of the given element.\n *\n * If a value is also provided for `thisArg` the created `_.matchesProperty`\n * style callback returns `true` for elements that have a matching property\n * value, else `false`.\n *\n * If an object is provided for `predicate` the created `_.matches` style\n * callback returns `true` for elements that match the properties of the given\n * object, else `false`.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function|Object|string} [predicate=_.identity] The function invoked\n * per iteration.\n * @param {*} [thisArg] The `this` binding of `predicate`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.dropRightWhile([1, 2, 3], function(n) {\n * return n > 1;\n * });\n * // => [1]\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * // using the `_.matches` callback shorthand\n * _.pluck(_.dropRightWhile(users, { 'user': 'pebbles', 'active': false }), 'user');\n * // => ['barney', 'fred']\n *\n * // using the `_.matchesProperty` callback shorthand\n * _.pluck(_.dropRightWhile(users, 'active', false), 'user');\n * // => ['barney']\n *\n * // using the `_.property` callback shorthand\n * _.pluck(_.dropRightWhile(users, 'active'), 'user');\n * // => ['barney', 'fred', 'pebbles']\n */\n function dropRightWhile(array, predicate, thisArg) {\n return array && array.length ? (0, _lodashInternalBaseWhile['default'])(array, (0, _lodashInternalBaseCallback['default'])(predicate, thisArg, 3), true, true) : [];\n }\n\n exports['default'] = dropRightWhile;\n});","define('lodash/array/dropWhile', ['exports', 'lodash/internal/baseCallback', 'lodash/internal/baseWhile'], function (exports, _lodashInternalBaseCallback, _lodashInternalBaseWhile) {\n 'use strict';\n\n /**\n * Creates a slice of `array` excluding elements dropped from the beginning.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * bound to `thisArg` and invoked with three arguments: (value, index, array).\n *\n * If a property name is provided for `predicate` the created `_.property`\n * style callback returns the property value of the given element.\n *\n * If a value is also provided for `thisArg` the created `_.matchesProperty`\n * style callback returns `true` for elements that have a matching property\n * value, else `false`.\n *\n * If an object is provided for `predicate` the created `_.matches` style\n * callback returns `true` for elements that have the properties of the given\n * object, else `false`.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function|Object|string} [predicate=_.identity] The function invoked\n * per iteration.\n * @param {*} [thisArg] The `this` binding of `predicate`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.dropWhile([1, 2, 3], function(n) {\n * return n < 3;\n * });\n * // => [3]\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * // using the `_.matches` callback shorthand\n * _.pluck(_.dropWhile(users, { 'user': 'barney', 'active': false }), 'user');\n * // => ['fred', 'pebbles']\n *\n * // using the `_.matchesProperty` callback shorthand\n * _.pluck(_.dropWhile(users, 'active', false), 'user');\n * // => ['pebbles']\n *\n * // using the `_.property` callback shorthand\n * _.pluck(_.dropWhile(users, 'active'), 'user');\n * // => ['barney', 'fred', 'pebbles']\n */\n function dropWhile(array, predicate, thisArg) {\n return array && array.length ? (0, _lodashInternalBaseWhile['default'])(array, (0, _lodashInternalBaseCallback['default'])(predicate, thisArg, 3), true) : [];\n }\n\n exports['default'] = dropWhile;\n});","define('lodash/array/fill', ['exports', 'lodash/internal/baseFill', 'lodash/internal/isIterateeCall'], function (exports, _lodashInternalBaseFill, _lodashInternalIsIterateeCall) {\n 'use strict';\n\n /**\n * Fills elements of `array` with `value` from `start` up to, but not\n * including, `end`.\n *\n * **Note:** This method mutates `array`.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.fill(array, 'a');\n * console.log(array);\n * // => ['a', 'a', 'a']\n *\n * _.fill(Array(3), 2);\n * // => [2, 2, 2]\n *\n * _.fill([4, 6, 8], '*', 1, 2);\n * // => [4, '*', 8]\n */\n function fill(array, value, start, end) {\n var length = array ? array.length : 0;\n if (!length) {\n return [];\n }\n if (start && typeof start != 'number' && (0, _lodashInternalIsIterateeCall['default'])(array, value, start)) {\n start = 0;\n end = length;\n }\n return (0, _lodashInternalBaseFill['default'])(array, value, start, end);\n }\n\n exports['default'] = fill;\n});","define('lodash/array/findIndex', ['exports', 'lodash/internal/createFindIndex'], function (exports, _lodashInternalCreateFindIndex) {\n 'use strict';\n\n /**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * If a property name is provided for `predicate` the created `_.property`\n * style callback returns the property value of the given element.\n *\n * If a value is also provided for `thisArg` the created `_.matchesProperty`\n * style callback returns `true` for elements that have a matching property\n * value, else `false`.\n *\n * If an object is provided for `predicate` the created `_.matches` style\n * callback returns `true` for elements that have the properties of the given\n * object, else `false`.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to search.\n * @param {Function|Object|string} [predicate=_.identity] The function invoked\n * per iteration.\n * @param {*} [thisArg] The `this` binding of `predicate`.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(chr) {\n * return chr.user == 'barney';\n * });\n * // => 0\n *\n * // using the `_.matches` callback shorthand\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // using the `_.matchesProperty` callback shorthand\n * _.findIndex(users, 'active', false);\n * // => 0\n *\n * // using the `_.property` callback shorthand\n * _.findIndex(users, 'active');\n * // => 2\n */\n var findIndex = (0, _lodashInternalCreateFindIndex['default'])();\n\n exports['default'] = findIndex;\n});","define('lodash/array/findLastIndex', ['exports', 'lodash/internal/createFindIndex'], function (exports, _lodashInternalCreateFindIndex) {\n 'use strict';\n\n /**\n * This method is like `_.findIndex` except that it iterates over elements\n * of `collection` from right to left.\n *\n * If a property name is provided for `predicate` the created `_.property`\n * style callback returns the property value of the given element.\n *\n * If a value is also provided for `thisArg` the created `_.matchesProperty`\n * style callback returns `true` for elements that have a matching property\n * value, else `false`.\n *\n * If an object is provided for `predicate` the created `_.matches` style\n * callback returns `true` for elements that have the properties of the given\n * object, else `false`.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to search.\n * @param {Function|Object|string} [predicate=_.identity] The function invoked\n * per iteration.\n * @param {*} [thisArg] The `this` binding of `predicate`.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.findLastIndex(users, function(chr) {\n * return chr.user == 'pebbles';\n * });\n * // => 2\n *\n * // using the `_.matches` callback shorthand\n * _.findLastIndex(users, { 'user': 'barney', 'active': true });\n * // => 0\n *\n * // using the `_.matchesProperty` callback shorthand\n * _.findLastIndex(users, 'active', false);\n * // => 2\n *\n * // using the `_.property` callback shorthand\n * _.findLastIndex(users, 'active');\n * // => 0\n */\n var findLastIndex = (0, _lodashInternalCreateFindIndex['default'])(true);\n\n exports['default'] = findLastIndex;\n});","define(\"lodash/array/first\", [\"exports\"], function (exports) {\n /**\n * Gets the first element of `array`.\n *\n * @static\n * @memberOf _\n * @alias head\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the first element of `array`.\n * @example\n *\n * _.first([1, 2, 3]);\n * // => 1\n *\n * _.first([]);\n * // => undefined\n */\n \"use strict\";\n\n function first(array) {\n return array ? array[0] : undefined;\n }\n\n exports[\"default\"] = first;\n});","define('lodash/array/flatten', ['exports', 'lodash/internal/baseFlatten', 'lodash/internal/isIterateeCall'], function (exports, _lodashInternalBaseFlatten, _lodashInternalIsIterateeCall) {\n 'use strict';\n\n /**\n * Flattens a nested array. If `isDeep` is `true` the array is recursively\n * flattened, otherwise it's only flattened a single level.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to flatten.\n * @param {boolean} [isDeep] Specify a deep flatten.\n * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, 3, [4]]]);\n * // => [1, 2, 3, [4]]\n *\n * // using `isDeep`\n * _.flatten([1, [2, 3, [4]]], true);\n * // => [1, 2, 3, 4]\n */\n function flatten(array, isDeep, guard) {\n var length = array ? array.length : 0;\n if (guard && (0, _lodashInternalIsIterateeCall['default'])(array, isDeep, guard)) {\n isDeep = false;\n }\n return length ? (0, _lodashInternalBaseFlatten['default'])(array, isDeep) : [];\n }\n\n exports['default'] = flatten;\n});","define('lodash/array/flattenDeep', ['exports', 'lodash/internal/baseFlatten'], function (exports, _lodashInternalBaseFlatten) {\n 'use strict';\n\n /**\n * Recursively flattens a nested array.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to recursively flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flattenDeep([1, [2, 3, [4]]]);\n * // => [1, 2, 3, 4]\n */\n function flattenDeep(array) {\n var length = array ? array.length : 0;\n return length ? (0, _lodashInternalBaseFlatten['default'])(array, true) : [];\n }\n\n exports['default'] = flattenDeep;\n});","define('lodash/array/head', ['exports', 'lodash/array/first'], function (exports, _lodashArrayFirst) {\n 'use strict';\n\n exports['default'] = _lodashArrayFirst['default'];\n});","define('lodash/array/indexOf', ['exports', 'lodash/internal/baseIndexOf', 'lodash/internal/binaryIndex'], function (exports, _lodashInternalBaseIndexOf, _lodashInternalBinaryIndex) {\n 'use strict';\n\n /* Native method references for those with the same name as other `lodash` methods. */\n var nativeMax = Math.max;\n\n /**\n * Gets the index at which the first occurrence of `value` is found in `array`\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)\n * for equality comparisons. If `fromIndex` is negative, it's used as the offset\n * from the end of `array`. If `array` is sorted providing `true` for `fromIndex`\n * performs a faster binary search.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to search.\n * @param {*} value The value to search for.\n * @param {boolean|number} [fromIndex=0] The index to search from or `true`\n * to perform a binary search on a sorted array.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.indexOf([1, 2, 1, 2], 2);\n * // => 1\n *\n * // using `fromIndex`\n * _.indexOf([1, 2, 1, 2], 2, 2);\n * // => 3\n *\n * // performing a binary search\n * _.indexOf([1, 1, 2, 2], 2, true);\n * // => 2\n */\n function indexOf(array, value, fromIndex) {\n var length = array ? array.length : 0;\n if (!length) {\n return -1;\n }\n if (typeof fromIndex == 'number') {\n fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex;\n } else if (fromIndex) {\n var index = (0, _lodashInternalBinaryIndex['default'])(array, value);\n if (index < length && (value === value ? value === array[index] : array[index] !== array[index])) {\n return index;\n }\n return -1;\n }\n return (0, _lodashInternalBaseIndexOf['default'])(array, value, fromIndex || 0);\n }\n\n exports['default'] = indexOf;\n});","define('lodash/array/initial', ['exports', 'lodash/array/dropRight'], function (exports, _lodashArrayDropRight) {\n 'use strict';\n\n /**\n * Gets all but the last element of `array`.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.initial([1, 2, 3]);\n * // => [1, 2]\n */\n function initial(array) {\n return (0, _lodashArrayDropRight['default'])(array, 1);\n }\n\n exports['default'] = initial;\n});","define('lodash/array/intersection', ['exports', 'lodash/internal/baseIndexOf', 'lodash/internal/cacheIndexOf', 'lodash/internal/createCache', 'lodash/internal/isArrayLike', 'lodash/function/restParam'], function (exports, _lodashInternalBaseIndexOf, _lodashInternalCacheIndexOf, _lodashInternalCreateCache, _lodashInternalIsArrayLike, _lodashFunctionRestParam) {\n 'use strict';\n\n /**\n * Creates an array of unique values that are included in all of the provided\n * arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of shared values.\n * @example\n * _.intersection([1, 2], [4, 2], [2, 1]);\n * // => [2]\n */\n var intersection = (0, _lodashFunctionRestParam['default'])(function (arrays) {\n var othLength = arrays.length,\n othIndex = othLength,\n caches = Array(length),\n indexOf = _lodashInternalBaseIndexOf['default'],\n isCommon = true,\n result = [];\n\n while (othIndex--) {\n var value = arrays[othIndex] = (0, _lodashInternalIsArrayLike['default'])(value = arrays[othIndex]) ? value : [];\n caches[othIndex] = isCommon && value.length >= 120 ? (0, _lodashInternalCreateCache['default'])(othIndex && value) : null;\n }\n var array = arrays[0],\n index = -1,\n length = array ? array.length : 0,\n seen = caches[0];\n\n outer: while (++index < length) {\n value = array[index];\n if ((seen ? (0, _lodashInternalCacheIndexOf['default'])(seen, value) : indexOf(result, value, 0)) < 0) {\n var othIndex = othLength;\n while (--othIndex) {\n var cache = caches[othIndex];\n if ((cache ? (0, _lodashInternalCacheIndexOf['default'])(cache, value) : indexOf(arrays[othIndex], value, 0)) < 0) {\n continue outer;\n }\n }\n if (seen) {\n seen.push(value);\n }\n result.push(value);\n }\n }\n return result;\n });\n\n exports['default'] = intersection;\n});","define(\"lodash/array/last\", [\"exports\"], function (exports) {\n /**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\n \"use strict\";\n\n function last(array) {\n var length = array ? array.length : 0;\n return length ? array[length - 1] : undefined;\n }\n\n exports[\"default\"] = last;\n});","define('lodash/array/lastIndexOf', ['exports', 'lodash/internal/binaryIndex', 'lodash/internal/indexOfNaN'], function (exports, _lodashInternalBinaryIndex, _lodashInternalIndexOfNaN) {\n 'use strict';\n\n /* Native method references for those with the same name as other `lodash` methods. */\n var nativeMax = Math.max,\n nativeMin = Math.min;\n\n /**\n * This method is like `_.indexOf` except that it iterates over elements of\n * `array` from right to left.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to search.\n * @param {*} value The value to search for.\n * @param {boolean|number} [fromIndex=array.length-1] The index to search from\n * or `true` to perform a binary search on a sorted array.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.lastIndexOf([1, 2, 1, 2], 2);\n * // => 3\n *\n * // using `fromIndex`\n * _.lastIndexOf([1, 2, 1, 2], 2, 2);\n * // => 1\n *\n * // performing a binary search\n * _.lastIndexOf([1, 1, 2, 2], 2, true);\n * // => 3\n */\n function lastIndexOf(array, value, fromIndex) {\n var length = array ? array.length : 0;\n if (!length) {\n return -1;\n }\n var index = length;\n if (typeof fromIndex == 'number') {\n index = (fromIndex < 0 ? nativeMax(length + fromIndex, 0) : nativeMin(fromIndex || 0, length - 1)) + 1;\n } else if (fromIndex) {\n index = (0, _lodashInternalBinaryIndex['default'])(array, value, true) - 1;\n var other = array[index];\n if (value === value ? value === other : other !== other) {\n return index;\n }\n return -1;\n }\n if (value !== value) {\n return (0, _lodashInternalIndexOfNaN['default'])(array, index, true);\n }\n while (index--) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n }\n\n exports['default'] = lastIndexOf;\n});","define('lodash/array/object', ['exports', 'lodash/array/zipObject'], function (exports, _lodashArrayZipObject) {\n 'use strict';\n\n exports['default'] = _lodashArrayZipObject['default'];\n});","define('lodash/array/pull', ['exports', 'lodash/internal/baseIndexOf'], function (exports, _lodashInternalBaseIndexOf) {\n 'use strict';\n\n /** Used for native method references. */\n var arrayProto = Array.prototype;\n\n /** Native method references. */\n var splice = arrayProto.splice;\n\n /**\n * Removes all provided values from `array` using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.without`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...*} [values] The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3, 1, 2, 3];\n *\n * _.pull(array, 2, 3);\n * console.log(array);\n * // => [1, 1]\n */\n function pull() {\n var args = arguments,\n array = args[0];\n\n if (!(array && array.length)) {\n return array;\n }\n var index = 0,\n indexOf = _lodashInternalBaseIndexOf['default'],\n length = args.length;\n\n while (++index < length) {\n var fromIndex = 0,\n value = args[index];\n\n while ((fromIndex = indexOf(array, value, fromIndex)) > -1) {\n splice.call(array, fromIndex, 1);\n }\n }\n return array;\n }\n\n exports['default'] = pull;\n});","define('lodash/array/pullAt', ['exports', 'lodash/internal/baseAt', 'lodash/internal/baseCompareAscending', 'lodash/internal/baseFlatten', 'lodash/internal/basePullAt', 'lodash/function/restParam'], function (exports, _lodashInternalBaseAt, _lodashInternalBaseCompareAscending, _lodashInternalBaseFlatten, _lodashInternalBasePullAt, _lodashFunctionRestParam) {\n 'use strict';\n\n /**\n * Removes elements from `array` corresponding to the given indexes and returns\n * an array of the removed elements. Indexes may be specified as an array of\n * indexes or as individual arguments.\n *\n * **Note:** Unlike `_.at`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...(number|number[])} [indexes] The indexes of elements to remove,\n * specified as individual indexes or arrays of indexes.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = [5, 10, 15, 20];\n * var evens = _.pullAt(array, 1, 3);\n *\n * console.log(array);\n * // => [5, 15]\n *\n * console.log(evens);\n * // => [10, 20]\n */\n var pullAt = (0, _lodashFunctionRestParam['default'])(function (array, indexes) {\n indexes = (0, _lodashInternalBaseFlatten['default'])(indexes);\n\n var result = (0, _lodashInternalBaseAt['default'])(array, indexes);\n (0, _lodashInternalBasePullAt['default'])(array, indexes.sort(_lodashInternalBaseCompareAscending['default']));\n return result;\n });\n\n exports['default'] = pullAt;\n});","define('lodash/array/remove', ['exports', 'lodash/internal/baseCallback', 'lodash/internal/basePullAt'], function (exports, _lodashInternalBaseCallback, _lodashInternalBasePullAt) {\n 'use strict';\n\n /**\n * Removes all elements from `array` that `predicate` returns truthy for\n * and returns an array of the removed elements. The predicate is bound to\n * `thisArg` and invoked with three arguments: (value, index, array).\n *\n * If a property name is provided for `predicate` the created `_.property`\n * style callback returns the property value of the given element.\n *\n * If a value is also provided for `thisArg` the created `_.matchesProperty`\n * style callback returns `true` for elements that have a matching property\n * value, else `false`.\n *\n * If an object is provided for `predicate` the created `_.matches` style\n * callback returns `true` for elements that have the properties of the given\n * object, else `false`.\n *\n * **Note:** Unlike `_.filter`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Function|Object|string} [predicate=_.identity] The function invoked\n * per iteration.\n * @param {*} [thisArg] The `this` binding of `predicate`.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = [1, 2, 3, 4];\n * var evens = _.remove(array, function(n) {\n * return n % 2 == 0;\n * });\n *\n * console.log(array);\n * // => [1, 3]\n *\n * console.log(evens);\n * // => [2, 4]\n */\n function remove(array, predicate, thisArg) {\n var result = [];\n if (!(array && array.length)) {\n return result;\n }\n var index = -1,\n indexes = [],\n length = array.length;\n\n predicate = (0, _lodashInternalBaseCallback['default'])(predicate, thisArg, 3);\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result.push(value);\n indexes.push(index);\n }\n }\n (0, _lodashInternalBasePullAt['default'])(array, indexes);\n return result;\n }\n\n exports['default'] = remove;\n});","define('lodash/array/rest', ['exports', 'lodash/array/drop'], function (exports, _lodashArrayDrop) {\n 'use strict';\n\n /**\n * Gets all but the first element of `array`.\n *\n * @static\n * @memberOf _\n * @alias tail\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.rest([1, 2, 3]);\n * // => [2, 3]\n */\n function rest(array) {\n return (0, _lodashArrayDrop['default'])(array, 1);\n }\n\n exports['default'] = rest;\n});","define('lodash/array/slice', ['exports', 'lodash/internal/baseSlice', 'lodash/internal/isIterateeCall'], function (exports, _lodashInternalBaseSlice, _lodashInternalIsIterateeCall) {\n 'use strict';\n\n /**\n * Creates a slice of `array` from `start` up to, but not including, `end`.\n *\n * **Note:** This method is used instead of `Array#slice` to support node\n * lists in IE < 9 and to ensure dense arrays are returned.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function slice(array, start, end) {\n var length = array ? array.length : 0;\n if (!length) {\n return [];\n }\n if (end && typeof end != 'number' && (0, _lodashInternalIsIterateeCall['default'])(array, start, end)) {\n start = 0;\n end = length;\n }\n return (0, _lodashInternalBaseSlice['default'])(array, start, end);\n }\n\n exports['default'] = slice;\n});","define('lodash/array/sortedIndex', ['exports', 'lodash/internal/createSortedIndex'], function (exports, _lodashInternalCreateSortedIndex) {\n 'use strict';\n\n /**\n * Uses a binary search to determine the lowest index at which `value` should\n * be inserted into `array` in order to maintain its sort order. If an iteratee\n * function is provided it's invoked for `value` and each element of `array`\n * to compute their sort ranking. The iteratee is bound to `thisArg` and\n * invoked with one argument; (value).\n *\n * If a property name is provided for `iteratee` the created `_.property`\n * style callback returns the property value of the given element.\n *\n * If a value is also provided for `thisArg` the created `_.matchesProperty`\n * style callback returns `true` for elements that have a matching property\n * value, else `false`.\n *\n * If an object is provided for `iteratee` the created `_.matches` style\n * callback returns `true` for elements that have the properties of the given\n * object, else `false`.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function|Object|string} [iteratee=_.identity] The function invoked\n * per iteration.\n * @param {*} [thisArg] The `this` binding of `iteratee`.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedIndex([30, 50], 40);\n * // => 1\n *\n * _.sortedIndex([4, 4, 5, 5], 5);\n * // => 2\n *\n * var dict = { 'data': { 'thirty': 30, 'forty': 40, 'fifty': 50 } };\n *\n * // using an iteratee function\n * _.sortedIndex(['thirty', 'fifty'], 'forty', function(word) {\n * return this.data[word];\n * }, dict);\n * // => 1\n *\n * // using the `_.property` callback shorthand\n * _.sortedIndex([{ 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x');\n * // => 1\n */\n var sortedIndex = (0, _lodashInternalCreateSortedIndex['default'])();\n\n exports['default'] = sortedIndex;\n});","define('lodash/array/sortedLastIndex', ['exports', 'lodash/internal/createSortedIndex'], function (exports, _lodashInternalCreateSortedIndex) {\n 'use strict';\n\n /**\n * This method is like `_.sortedIndex` except that it returns the highest\n * index at which `value` should be inserted into `array` in order to\n * maintain its sort order.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function|Object|string} [iteratee=_.identity] The function invoked\n * per iteration.\n * @param {*} [thisArg] The `this` binding of `iteratee`.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedLastIndex([4, 4, 5, 5], 5);\n * // => 4\n */\n var sortedLastIndex = (0, _lodashInternalCreateSortedIndex['default'])(true);\n\n exports['default'] = sortedLastIndex;\n});","define('lodash/array/tail', ['exports', 'lodash/array/rest'], function (exports, _lodashArrayRest) {\n 'use strict';\n\n exports['default'] = _lodashArrayRest['default'];\n});","define('lodash/array/take', ['exports', 'lodash/internal/baseSlice', 'lodash/internal/isIterateeCall'], function (exports, _lodashInternalBaseSlice, _lodashInternalIsIterateeCall) {\n 'use strict';\n\n /**\n * Creates a slice of `array` with `n` elements taken from the beginning.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.take([1, 2, 3]);\n * // => [1]\n *\n * _.take([1, 2, 3], 2);\n * // => [1, 2]\n *\n * _.take([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.take([1, 2, 3], 0);\n * // => []\n */\n function take(array, n, guard) {\n var length = array ? array.length : 0;\n if (!length) {\n return [];\n }\n if (guard ? (0, _lodashInternalIsIterateeCall['default'])(array, n, guard) : n == null) {\n n = 1;\n }\n return (0, _lodashInternalBaseSlice['default'])(array, 0, n < 0 ? 0 : n);\n }\n\n exports['default'] = take;\n});","define('lodash/array/takeRight', ['exports', 'lodash/internal/baseSlice', 'lodash/internal/isIterateeCall'], function (exports, _lodashInternalBaseSlice, _lodashInternalIsIterateeCall) {\n 'use strict';\n\n /**\n * Creates a slice of `array` with `n` elements taken from the end.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.takeRight([1, 2, 3]);\n * // => [3]\n *\n * _.takeRight([1, 2, 3], 2);\n * // => [2, 3]\n *\n * _.takeRight([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.takeRight([1, 2, 3], 0);\n * // => []\n */\n function takeRight(array, n, guard) {\n var length = array ? array.length : 0;\n if (!length) {\n return [];\n }\n if (guard ? (0, _lodashInternalIsIterateeCall['default'])(array, n, guard) : n == null) {\n n = 1;\n }\n n = length - (+n || 0);\n return (0, _lodashInternalBaseSlice['default'])(array, n < 0 ? 0 : n);\n }\n\n exports['default'] = takeRight;\n});","define('lodash/array/takeRightWhile', ['exports', 'lodash/internal/baseCallback', 'lodash/internal/baseWhile'], function (exports, _lodashInternalBaseCallback, _lodashInternalBaseWhile) {\n 'use strict';\n\n /**\n * Creates a slice of `array` with elements taken from the end. Elements are\n * taken until `predicate` returns falsey. The predicate is bound to `thisArg`\n * and invoked with three arguments: (value, index, array).\n *\n * If a property name is provided for `predicate` the created `_.property`\n * style callback returns the property value of the given element.\n *\n * If a value is also provided for `thisArg` the created `_.matchesProperty`\n * style callback returns `true` for elements that have a matching property\n * value, else `false`.\n *\n * If an object is provided for `predicate` the created `_.matches` style\n * callback returns `true` for elements that have the properties of the given\n * object, else `false`.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function|Object|string} [predicate=_.identity] The function invoked\n * per iteration.\n * @param {*} [thisArg] The `this` binding of `predicate`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.takeRightWhile([1, 2, 3], function(n) {\n * return n > 1;\n * });\n * // => [2, 3]\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * // using the `_.matches` callback shorthand\n * _.pluck(_.takeRightWhile(users, { 'user': 'pebbles', 'active': false }), 'user');\n * // => ['pebbles']\n *\n * // using the `_.matchesProperty` callback shorthand\n * _.pluck(_.takeRightWhile(users, 'active', false), 'user');\n * // => ['fred', 'pebbles']\n *\n * // using the `_.property` callback shorthand\n * _.pluck(_.takeRightWhile(users, 'active'), 'user');\n * // => []\n */\n function takeRightWhile(array, predicate, thisArg) {\n return array && array.length ? (0, _lodashInternalBaseWhile['default'])(array, (0, _lodashInternalBaseCallback['default'])(predicate, thisArg, 3), false, true) : [];\n }\n\n exports['default'] = takeRightWhile;\n});","define('lodash/array/takeWhile', ['exports', 'lodash/internal/baseCallback', 'lodash/internal/baseWhile'], function (exports, _lodashInternalBaseCallback, _lodashInternalBaseWhile) {\n 'use strict';\n\n /**\n * Creates a slice of `array` with elements taken from the beginning. Elements\n * are taken until `predicate` returns falsey. The predicate is bound to\n * `thisArg` and invoked with three arguments: (value, index, array).\n *\n * If a property name is provided for `predicate` the created `_.property`\n * style callback returns the property value of the given element.\n *\n * If a value is also provided for `thisArg` the created `_.matchesProperty`\n * style callback returns `true` for elements that have a matching property\n * value, else `false`.\n *\n * If an object is provided for `predicate` the created `_.matches` style\n * callback returns `true` for elements that have the properties of the given\n * object, else `false`.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function|Object|string} [predicate=_.identity] The function invoked\n * per iteration.\n * @param {*} [thisArg] The `this` binding of `predicate`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.takeWhile([1, 2, 3], function(n) {\n * return n < 3;\n * });\n * // => [1, 2]\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false},\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * // using the `_.matches` callback shorthand\n * _.pluck(_.takeWhile(users, { 'user': 'barney', 'active': false }), 'user');\n * // => ['barney']\n *\n * // using the `_.matchesProperty` callback shorthand\n * _.pluck(_.takeWhile(users, 'active', false), 'user');\n * // => ['barney', 'fred']\n *\n * // using the `_.property` callback shorthand\n * _.pluck(_.takeWhile(users, 'active'), 'user');\n * // => []\n */\n function takeWhile(array, predicate, thisArg) {\n return array && array.length ? (0, _lodashInternalBaseWhile['default'])(array, (0, _lodashInternalBaseCallback['default'])(predicate, thisArg, 3)) : [];\n }\n\n exports['default'] = takeWhile;\n});","define('lodash/array/union', ['exports', 'lodash/internal/baseFlatten', 'lodash/internal/baseUniq', 'lodash/function/restParam'], function (exports, _lodashInternalBaseFlatten, _lodashInternalBaseUniq, _lodashFunctionRestParam) {\n 'use strict';\n\n /**\n * Creates an array of unique values, in order, from all of the provided arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.union([1, 2], [4, 2], [2, 1]);\n * // => [1, 2, 4]\n */\n var union = (0, _lodashFunctionRestParam['default'])(function (arrays) {\n return (0, _lodashInternalBaseUniq['default'])((0, _lodashInternalBaseFlatten['default'])(arrays, false, true));\n });\n\n exports['default'] = union;\n});","define('lodash/array/uniq', ['exports', 'lodash/internal/baseCallback', 'lodash/internal/baseUniq', 'lodash/internal/isIterateeCall', 'lodash/internal/sortedUniq'], function (exports, _lodashInternalBaseCallback, _lodashInternalBaseUniq, _lodashInternalIsIterateeCall, _lodashInternalSortedUniq) {\n 'use strict';\n\n /**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurence of each element\n * is kept. Providing `true` for `isSorted` performs a faster search algorithm\n * for sorted arrays. If an iteratee function is provided it's invoked for\n * each element in the array to generate the criterion by which uniqueness\n * is computed. The `iteratee` is bound to `thisArg` and invoked with three\n * arguments: (value, index, array).\n *\n * If a property name is provided for `iteratee` the created `_.property`\n * style callback returns the property value of the given element.\n *\n * If a value is also provided for `thisArg` the created `_.matchesProperty`\n * style callback returns `true` for elements that have a matching property\n * value, else `false`.\n *\n * If an object is provided for `iteratee` the created `_.matches` style\n * callback returns `true` for elements that have the properties of the given\n * object, else `false`.\n *\n * @static\n * @memberOf _\n * @alias unique\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {boolean} [isSorted] Specify the array is sorted.\n * @param {Function|Object|string} [iteratee] The function invoked per iteration.\n * @param {*} [thisArg] The `this` binding of `iteratee`.\n * @returns {Array} Returns the new duplicate-value-free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n *\n * // using `isSorted`\n * _.uniq([1, 1, 2], true);\n * // => [1, 2]\n *\n * // using an iteratee function\n * _.uniq([1, 2.5, 1.5, 2], function(n) {\n * return this.floor(n);\n * }, Math);\n * // => [1, 2.5]\n *\n * // using the `_.property` callback shorthand\n * _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n function uniq(array, isSorted, iteratee, thisArg) {\n var length = array ? array.length : 0;\n if (!length) {\n return [];\n }\n if (isSorted != null && typeof isSorted != 'boolean') {\n thisArg = iteratee;\n iteratee = (0, _lodashInternalIsIterateeCall['default'])(array, isSorted, thisArg) ? undefined : isSorted;\n isSorted = false;\n }\n iteratee = iteratee == null ? iteratee : (0, _lodashInternalBaseCallback['default'])(iteratee, thisArg, 3);\n return isSorted ? (0, _lodashInternalSortedUniq['default'])(array, iteratee) : (0, _lodashInternalBaseUniq['default'])(array, iteratee);\n }\n\n exports['default'] = uniq;\n});","define('lodash/array/unique', ['exports', 'lodash/array/uniq'], function (exports, _lodashArrayUniq) {\n 'use strict';\n\n exports['default'] = _lodashArrayUniq['default'];\n});","define('lodash/array/unzip', ['exports', 'lodash/internal/arrayFilter', 'lodash/internal/arrayMap', 'lodash/internal/baseProperty', 'lodash/internal/isArrayLike'], function (exports, _lodashInternalArrayFilter, _lodashInternalArrayMap, _lodashInternalBaseProperty, _lodashInternalIsArrayLike) {\n 'use strict';\n\n /* Native method references for those with the same name as other `lodash` methods. */\n var nativeMax = Math.max;\n\n /**\n * This method is like `_.zip` except that it accepts an array of grouped\n * elements and creates an array regrouping the elements to their pre-zip\n * configuration.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip(['fred', 'barney'], [30, 40], [true, false]);\n * // => [['fred', 30, true], ['barney', 40, false]]\n *\n * _.unzip(zipped);\n * // => [['fred', 'barney'], [30, 40], [true, false]]\n */\n function unzip(array) {\n if (!(array && array.length)) {\n return [];\n }\n var index = -1,\n length = 0;\n\n array = (0, _lodashInternalArrayFilter['default'])(array, function (group) {\n if ((0, _lodashInternalIsArrayLike['default'])(group)) {\n length = nativeMax(group.length, length);\n return true;\n }\n });\n var result = Array(length);\n while (++index < length) {\n result[index] = (0, _lodashInternalArrayMap['default'])(array, (0, _lodashInternalBaseProperty['default'])(index));\n }\n return result;\n }\n\n exports['default'] = unzip;\n});","define('lodash/array/unzipWith', ['exports', 'lodash/internal/arrayMap', 'lodash/internal/arrayReduce', 'lodash/internal/bindCallback', 'lodash/array/unzip'], function (exports, _lodashInternalArrayMap, _lodashInternalArrayReduce, _lodashInternalBindCallback, _lodashArrayUnzip) {\n 'use strict';\n\n /**\n * This method is like `_.unzip` except that it accepts an iteratee to specify\n * how regrouped values should be combined. The `iteratee` is bound to `thisArg`\n * and invoked with four arguments: (accumulator, value, index, group).\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @param {Function} [iteratee] The function to combine regrouped values.\n * @param {*} [thisArg] The `this` binding of `iteratee`.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip([1, 2], [10, 20], [100, 200]);\n * // => [[1, 10, 100], [2, 20, 200]]\n *\n * _.unzipWith(zipped, _.add);\n * // => [3, 30, 300]\n */\n function unzipWith(array, iteratee, thisArg) {\n var length = array ? array.length : 0;\n if (!length) {\n return [];\n }\n var result = (0, _lodashArrayUnzip['default'])(array);\n if (iteratee == null) {\n return result;\n }\n iteratee = (0, _lodashInternalBindCallback['default'])(iteratee, thisArg, 4);\n return (0, _lodashInternalArrayMap['default'])(result, function (group) {\n return (0, _lodashInternalArrayReduce['default'])(group, iteratee, undefined, true);\n });\n }\n\n exports['default'] = unzipWith;\n});","define('lodash/array/without', ['exports', 'lodash/internal/baseDifference', 'lodash/internal/isArrayLike', 'lodash/function/restParam'], function (exports, _lodashInternalBaseDifference, _lodashInternalIsArrayLike, _lodashFunctionRestParam) {\n 'use strict';\n\n /**\n * Creates an array excluding all provided values using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to filter.\n * @param {...*} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.without([1, 2, 1, 3], 1, 2);\n * // => [3]\n */\n var without = (0, _lodashFunctionRestParam['default'])(function (array, values) {\n return (0, _lodashInternalIsArrayLike['default'])(array) ? (0, _lodashInternalBaseDifference['default'])(array, values) : [];\n });\n\n exports['default'] = without;\n});","define('lodash/array/xor', ['exports', 'lodash/internal/arrayPush', 'lodash/internal/baseDifference', 'lodash/internal/baseUniq', 'lodash/internal/isArrayLike'], function (exports, _lodashInternalArrayPush, _lodashInternalBaseDifference, _lodashInternalBaseUniq, _lodashInternalIsArrayLike) {\n 'use strict';\n\n /**\n * Creates an array of unique values that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)\n * of the provided arrays.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of values.\n * @example\n *\n * _.xor([1, 2], [4, 2]);\n * // => [1, 4]\n */\n function xor() {\n var index = -1,\n length = arguments.length;\n\n while (++index < length) {\n var array = arguments[index];\n if ((0, _lodashInternalIsArrayLike['default'])(array)) {\n var result = result ? (0, _lodashInternalArrayPush['default'])((0, _lodashInternalBaseDifference['default'])(result, array), (0, _lodashInternalBaseDifference['default'])(array, result)) : array;\n }\n }\n return result ? (0, _lodashInternalBaseUniq['default'])(result) : [];\n }\n\n exports['default'] = xor;\n});","define('lodash/array/zip', ['exports', 'lodash/function/restParam', 'lodash/array/unzip'], function (exports, _lodashFunctionRestParam, _lodashArrayUnzip) {\n 'use strict';\n\n /**\n * Creates an array of grouped elements, the first of which contains the first\n * elements of the given arrays, the second of which contains the second elements\n * of the given arrays, and so on.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zip(['fred', 'barney'], [30, 40], [true, false]);\n * // => [['fred', 30, true], ['barney', 40, false]]\n */\n var zip = (0, _lodashFunctionRestParam['default'])(_lodashArrayUnzip['default']);\n\n exports['default'] = zip;\n});","define('lodash/array/zipObject', ['exports', 'lodash/lang/isArray'], function (exports, _lodashLangIsArray) {\n 'use strict';\n\n /**\n * The inverse of `_.pairs`; this method returns an object composed from arrays\n * of property names and values. Provide either a single two dimensional array,\n * e.g. `[[key1, value1], [key2, value2]]` or two arrays, one of property names\n * and one of corresponding values.\n *\n * @static\n * @memberOf _\n * @alias object\n * @category Array\n * @param {Array} props The property names.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObject([['fred', 30], ['barney', 40]]);\n * // => { 'fred': 30, 'barney': 40 }\n *\n * _.zipObject(['fred', 'barney'], [30, 40]);\n * // => { 'fred': 30, 'barney': 40 }\n */\n function zipObject(props, values) {\n var index = -1,\n length = props ? props.length : 0,\n result = {};\n\n if (length && !values && !(0, _lodashLangIsArray['default'])(props[0])) {\n values = [];\n }\n while (++index < length) {\n var key = props[index];\n if (values) {\n result[key] = values[index];\n } else if (key) {\n result[key[0]] = key[1];\n }\n }\n return result;\n }\n\n exports['default'] = zipObject;\n});","define('lodash/array/zipWith', ['exports', 'lodash/function/restParam', 'lodash/array/unzipWith'], function (exports, _lodashFunctionRestParam, _lodashArrayUnzipWith) {\n 'use strict';\n\n /**\n * This method is like `_.zip` except that it accepts an iteratee to specify\n * how grouped values should be combined. The `iteratee` is bound to `thisArg`\n * and invoked with four arguments: (accumulator, value, index, group).\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @param {Function} [iteratee] The function to combine grouped values.\n * @param {*} [thisArg] The `this` binding of `iteratee`.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zipWith([1, 2], [10, 20], [100, 200], _.add);\n * // => [111, 222]\n */\n var zipWith = (0, _lodashFunctionRestParam['default'])(function (arrays) {\n var length = arrays.length,\n iteratee = length > 2 ? arrays[length - 2] : undefined,\n thisArg = length > 1 ? arrays[length - 1] : undefined;\n\n if (length > 2 && typeof iteratee == 'function') {\n length -= 2;\n } else {\n iteratee = length > 1 && typeof thisArg == 'function' ? (--length, thisArg) : undefined;\n thisArg = undefined;\n }\n arrays.length = length;\n return (0, _lodashArrayUnzipWith['default'])(arrays, iteratee, thisArg);\n });\n\n exports['default'] = zipWith;\n});","define('lodash/array', ['exports', 'lodash/array/chunk', 'lodash/array/compact', 'lodash/array/difference', 'lodash/array/drop', 'lodash/array/dropRight', 'lodash/array/dropRightWhile', 'lodash/array/dropWhile', 'lodash/array/fill', 'lodash/array/findIndex', 'lodash/array/findLastIndex', 'lodash/array/first', 'lodash/array/flatten', 'lodash/array/flattenDeep', 'lodash/array/head', 'lodash/array/indexOf', 'lodash/array/initial', 'lodash/array/intersection', 'lodash/array/last', 'lodash/array/lastIndexOf', 'lodash/array/object', 'lodash/array/pull', 'lodash/array/pullAt', 'lodash/array/remove', 'lodash/array/rest', 'lodash/array/slice', 'lodash/array/sortedIndex', 'lodash/array/sortedLastIndex', 'lodash/array/tail', 'lodash/array/take', 'lodash/array/takeRight', 'lodash/array/takeRightWhile', 'lodash/array/takeWhile', 'lodash/array/union', 'lodash/array/uniq', 'lodash/array/unique', 'lodash/array/unzip', 'lodash/array/unzipWith', 'lodash/array/without', 'lodash/array/xor', 'lodash/array/zip', 'lodash/array/zipObject', 'lodash/array/zipWith'], function (exports, _lodashArrayChunk, _lodashArrayCompact, _lodashArrayDifference, _lodashArrayDrop, _lodashArrayDropRight, _lodashArrayDropRightWhile, _lodashArrayDropWhile, _lodashArrayFill, _lodashArrayFindIndex, _lodashArrayFindLastIndex, _lodashArrayFirst, _lodashArrayFlatten, _lodashArrayFlattenDeep, _lodashArrayHead, _lodashArrayIndexOf, _lodashArrayInitial, _lodashArrayIntersection, _lodashArrayLast, _lodashArrayLastIndexOf, _lodashArrayObject, _lodashArrayPull, _lodashArrayPullAt, _lodashArrayRemove, _lodashArrayRest, _lodashArraySlice, _lodashArraySortedIndex, _lodashArraySortedLastIndex, _lodashArrayTail, _lodashArrayTake, _lodashArrayTakeRight, _lodashArrayTakeRightWhile, _lodashArrayTakeWhile, _lodashArrayUnion, _lodashArrayUniq, _lodashArrayUnique, _lodashArrayUnzip, _lodashArrayUnzipWith, _lodashArrayWithout, _lodashArrayXor, _lodashArrayZip, _lodashArrayZipObject, _lodashArrayZipWith) {\n 'use strict';\n\n exports['default'] = {\n 'chunk': _lodashArrayChunk['default'],\n 'compact': _lodashArrayCompact['default'],\n 'difference': _lodashArrayDifference['default'],\n 'drop': _lodashArrayDrop['default'],\n 'dropRight': _lodashArrayDropRight['default'],\n 'dropRightWhile': _lodashArrayDropRightWhile['default'],\n 'dropWhile': _lodashArrayDropWhile['default'],\n 'fill': _lodashArrayFill['default'],\n 'findIndex': _lodashArrayFindIndex['default'],\n 'findLastIndex': _lodashArrayFindLastIndex['default'],\n 'first': _lodashArrayFirst['default'],\n 'flatten': _lodashArrayFlatten['default'],\n 'flattenDeep': _lodashArrayFlattenDeep['default'],\n 'head': _lodashArrayHead['default'],\n 'indexOf': _lodashArrayIndexOf['default'],\n 'initial': _lodashArrayInitial['default'],\n 'intersection': _lodashArrayIntersection['default'],\n 'last': _lodashArrayLast['default'],\n 'lastIndexOf': _lodashArrayLastIndexOf['default'],\n 'object': _lodashArrayObject['default'],\n 'pull': _lodashArrayPull['default'],\n 'pullAt': _lodashArrayPullAt['default'],\n 'remove': _lodashArrayRemove['default'],\n 'rest': _lodashArrayRest['default'],\n 'slice': _lodashArraySlice['default'],\n 'sortedIndex': _lodashArraySortedIndex['default'],\n 'sortedLastIndex': _lodashArraySortedLastIndex['default'],\n 'tail': _lodashArrayTail['default'],\n 'take': _lodashArrayTake['default'],\n 'takeRight': _lodashArrayTakeRight['default'],\n 'takeRightWhile': _lodashArrayTakeRightWhile['default'],\n 'takeWhile': _lodashArrayTakeWhile['default'],\n 'union': _lodashArrayUnion['default'],\n 'uniq': _lodashArrayUniq['default'],\n 'unique': _lodashArrayUnique['default'],\n 'unzip': _lodashArrayUnzip['default'],\n 'unzipWith': _lodashArrayUnzipWith['default'],\n 'without': _lodashArrayWithout['default'],\n 'xor': _lodashArrayXor['default'],\n 'zip': _lodashArrayZip['default'],\n 'zipObject': _lodashArrayZipObject['default'],\n 'zipWith': _lodashArrayZipWith['default']\n };\n});","define('lodash/chain/chain', ['exports', 'lodash/chain/lodash'], function (exports, _lodashChainLodash) {\n 'use strict';\n\n /**\n * Creates a `lodash` object that wraps `value` with explicit method\n * chaining enabled.\n *\n * @static\n * @memberOf _\n * @category Chain\n * @param {*} value The value to wrap.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'pebbles', 'age': 1 }\n * ];\n *\n * var youngest = _.chain(users)\n * .sortBy('age')\n * .map(function(chr) {\n * return chr.user + ' is ' + chr.age;\n * })\n * .first()\n * .value();\n * // => 'pebbles is 1'\n */\n function chain(value) {\n var result = (0, _lodashChainLodash['default'])(value);\n result.__chain__ = true;\n return result;\n }\n\n exports['default'] = chain;\n});","define('lodash/chain/commit', ['exports', 'lodash/chain/wrapperCommit'], function (exports, _lodashChainWrapperCommit) {\n 'use strict';\n\n exports['default'] = _lodashChainWrapperCommit['default'];\n});","define('lodash/chain/concat', ['exports', 'lodash/chain/wrapperConcat'], function (exports, _lodashChainWrapperConcat) {\n 'use strict';\n\n exports['default'] = _lodashChainWrapperConcat['default'];\n});","define('lodash/chain/lodash', ['exports', 'lodash/internal/LazyWrapper', 'lodash/internal/LodashWrapper', 'lodash/internal/baseLodash', 'lodash/lang/isArray', 'lodash/internal/isObjectLike', 'lodash/internal/wrapperClone'], function (exports, _lodashInternalLazyWrapper, _lodashInternalLodashWrapper, _lodashInternalBaseLodash, _lodashLangIsArray, _lodashInternalIsObjectLike, _lodashInternalWrapperClone) {\n 'use strict';\n\n /** Used for native method references. */\n var objectProto = Object.prototype;\n\n /** Used to check objects for own properties. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /**\n * Creates a `lodash` object which wraps `value` to enable implicit chaining.\n * Methods that operate on and return arrays, collections, and functions can\n * be chained together. Methods that retrieve a single value or may return a\n * primitive value will automatically end the chain returning the unwrapped\n * value. Explicit chaining may be enabled using `_.chain`. The execution of\n * chained methods is lazy, that is, execution is deferred until `_#value`\n * is implicitly or explicitly called.\n *\n * Lazy evaluation allows several methods to support shortcut fusion. Shortcut\n * fusion is an optimization strategy which merge iteratee calls; this can help\n * to avoid the creation of intermediate data structures and greatly reduce the\n * number of iteratee executions.\n *\n * Chaining is supported in custom builds as long as the `_#value` method is\n * directly or indirectly included in the build.\n *\n * In addition to lodash methods, wrappers have `Array` and `String` methods.\n *\n * The wrapper `Array` methods are:\n * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`,\n * `splice`, and `unshift`\n *\n * The wrapper `String` methods are:\n * `replace` and `split`\n *\n * The wrapper methods that support shortcut fusion are:\n * `compact`, `drop`, `dropRight`, `dropRightWhile`, `dropWhile`, `filter`,\n * `first`, `initial`, `last`, `map`, `pluck`, `reject`, `rest`, `reverse`,\n * `slice`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `toArray`,\n * and `where`\n *\n * The chainable wrapper methods are:\n * `after`, `ary`, `assign`, `at`, `before`, `bind`, `bindAll`, `bindKey`,\n * `callback`, `chain`, `chunk`, `commit`, `compact`, `concat`, `constant`,\n * `countBy`, `create`, `curry`, `debounce`, `defaults`, `defaultsDeep`,\n * `defer`, `delay`, `difference`, `drop`, `dropRight`, `dropRightWhile`,\n * `dropWhile`, `fill`, `filter`, `flatten`, `flattenDeep`, `flow`, `flowRight`,\n * `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`,\n * `functions`, `groupBy`, `indexBy`, `initial`, `intersection`, `invert`,\n * `invoke`, `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`,\n * `matchesProperty`, `memoize`, `merge`, `method`, `methodOf`, `mixin`,\n * `modArgs`, `negate`, `omit`, `once`, `pairs`, `partial`, `partialRight`,\n * `partition`, `pick`, `plant`, `pluck`, `property`, `propertyOf`, `pull`,\n * `pullAt`, `push`, `range`, `rearg`, `reject`, `remove`, `rest`, `restParam`,\n * `reverse`, `set`, `shuffle`, `slice`, `sort`, `sortBy`, `sortByAll`,\n * `sortByOrder`, `splice`, `spread`, `take`, `takeRight`, `takeRightWhile`,\n * `takeWhile`, `tap`, `throttle`, `thru`, `times`, `toArray`, `toPlainObject`,\n * `transform`, `union`, `uniq`, `unshift`, `unzip`, `unzipWith`, `values`,\n * `valuesIn`, `where`, `without`, `wrap`, `xor`, `zip`, `zipObject`, `zipWith`\n *\n * The wrapper methods that are **not** chainable by default are:\n * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clone`, `cloneDeep`,\n * `deburr`, `endsWith`, `escape`, `escapeRegExp`, `every`, `find`, `findIndex`,\n * `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `findWhere`, `first`,\n * `floor`, `get`, `gt`, `gte`, `has`, `identity`, `includes`, `indexOf`,\n * `inRange`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`,\n * `isEmpty`, `isEqual`, `isError`, `isFinite` `isFunction`, `isMatch`,\n * `isNative`, `isNaN`, `isNull`, `isNumber`, `isObject`, `isPlainObject`,\n * `isRegExp`, `isString`, `isUndefined`, `isTypedArray`, `join`, `kebabCase`,\n * `last`, `lastIndexOf`, `lt`, `lte`, `max`, `min`, `noConflict`, `noop`,\n * `now`, `pad`, `padLeft`, `padRight`, `parseInt`, `pop`, `random`, `reduce`,\n * `reduceRight`, `repeat`, `result`, `round`, `runInContext`, `shift`, `size`,\n * `snakeCase`, `some`, `sortedIndex`, `sortedLastIndex`, `startCase`,\n * `startsWith`, `sum`, `template`, `trim`, `trimLeft`, `trimRight`, `trunc`,\n * `unescape`, `uniqueId`, `value`, and `words`\n *\n * The wrapper method `sample` will return a wrapped value when `n` is provided,\n * otherwise an unwrapped value is returned.\n *\n * @name _\n * @constructor\n * @category Chain\n * @param {*} value The value to wrap in a `lodash` instance.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var wrapped = _([1, 2, 3]);\n *\n * // returns an unwrapped value\n * wrapped.reduce(function(total, n) {\n * return total + n;\n * });\n * // => 6\n *\n * // returns a wrapped value\n * var squares = wrapped.map(function(n) {\n * return n * n;\n * });\n *\n * _.isArray(squares);\n * // => false\n *\n * _.isArray(squares.value());\n * // => true\n */\n function lodash(value) {\n if ((0, _lodashInternalIsObjectLike['default'])(value) && !(0, _lodashLangIsArray['default'])(value) && !(value instanceof _lodashInternalLazyWrapper['default'])) {\n if (value instanceof _lodashInternalLodashWrapper['default']) {\n return value;\n }\n if (hasOwnProperty.call(value, '__chain__') && hasOwnProperty.call(value, '__wrapped__')) {\n return (0, _lodashInternalWrapperClone['default'])(value);\n }\n }\n return new _lodashInternalLodashWrapper['default'](value);\n }\n\n // Ensure wrappers are instances of `baseLodash`.\n lodash.prototype = _lodashInternalBaseLodash['default'].prototype;\n\n exports['default'] = lodash;\n});","define('lodash/chain/plant', ['exports', 'lodash/chain/wrapperPlant'], function (exports, _lodashChainWrapperPlant) {\n 'use strict';\n\n exports['default'] = _lodashChainWrapperPlant['default'];\n});","define('lodash/chain/reverse', ['exports', 'lodash/chain/wrapperReverse'], function (exports, _lodashChainWrapperReverse) {\n 'use strict';\n\n exports['default'] = _lodashChainWrapperReverse['default'];\n});","define('lodash/chain/run', ['exports', 'lodash/chain/wrapperValue'], function (exports, _lodashChainWrapperValue) {\n 'use strict';\n\n exports['default'] = _lodashChainWrapperValue['default'];\n});","define(\"lodash/chain/tap\", [\"exports\"], function (exports) {\n /**\n * This method invokes `interceptor` and returns `value`. The interceptor is\n * bound to `thisArg` and invoked with one argument; (value). The purpose of\n * this method is to \"tap into\" a method chain in order to perform operations\n * on intermediate results within the chain.\n *\n * @static\n * @memberOf _\n * @category Chain\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @param {*} [thisArg] The `this` binding of `interceptor`.\n * @returns {*} Returns `value`.\n * @example\n *\n * _([1, 2, 3])\n * .tap(function(array) {\n * array.pop();\n * })\n * .reverse()\n * .value();\n * // => [2, 1]\n */\n \"use strict\";\n\n function tap(value, interceptor, thisArg) {\n interceptor.call(thisArg, value);\n return value;\n }\n\n exports[\"default\"] = tap;\n});","define(\"lodash/chain/thru\", [\"exports\"], function (exports) {\n /**\n * This method is like `_.tap` except that it returns the result of `interceptor`.\n *\n * @static\n * @memberOf _\n * @category Chain\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @param {*} [thisArg] The `this` binding of `interceptor`.\n * @returns {*} Returns the result of `interceptor`.\n * @example\n *\n * _(' abc ')\n * .chain()\n * .trim()\n * .thru(function(value) {\n * return [value];\n * })\n * .value();\n * // => ['abc']\n */\n \"use strict\";\n\n function thru(value, interceptor, thisArg) {\n return interceptor.call(thisArg, value);\n }\n\n exports[\"default\"] = thru;\n});","define('lodash/chain/toJSON', ['exports', 'lodash/chain/wrapperValue'], function (exports, _lodashChainWrapperValue) {\n 'use strict';\n\n exports['default'] = _lodashChainWrapperValue['default'];\n});","define('lodash/chain/toString', ['exports', 'lodash/chain/wrapperToString'], function (exports, _lodashChainWrapperToString) {\n 'use strict';\n\n exports['default'] = _lodashChainWrapperToString['default'];\n});","define('lodash/chain/value', ['exports', 'lodash/chain/wrapperValue'], function (exports, _lodashChainWrapperValue) {\n 'use strict';\n\n exports['default'] = _lodashChainWrapperValue['default'];\n});","define('lodash/chain/valueOf', ['exports', 'lodash/chain/wrapperValue'], function (exports, _lodashChainWrapperValue) {\n 'use strict';\n\n exports['default'] = _lodashChainWrapperValue['default'];\n});","define('lodash/chain/wrapperChain', ['exports', 'lodash/chain/chain'], function (exports, _lodashChainChain) {\n 'use strict';\n\n /**\n * Enables explicit method chaining on the wrapper object.\n *\n * @name chain\n * @memberOf _\n * @category Chain\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 }\n * ];\n *\n * // without explicit chaining\n * _(users).first();\n * // => { 'user': 'barney', 'age': 36 }\n *\n * // with explicit chaining\n * _(users).chain()\n * .first()\n * .pick('user')\n * .value();\n * // => { 'user': 'barney' }\n */\n function wrapperChain() {\n return (0, _lodashChainChain['default'])(this);\n }\n\n exports['default'] = wrapperChain;\n});","define('lodash/chain/wrapperCommit', ['exports', 'lodash/internal/LodashWrapper'], function (exports, _lodashInternalLodashWrapper) {\n 'use strict';\n\n /**\n * Executes the chained sequence and returns the wrapped result.\n *\n * @name commit\n * @memberOf _\n * @category Chain\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2];\n * var wrapped = _(array).push(3);\n *\n * console.log(array);\n * // => [1, 2]\n *\n * wrapped = wrapped.commit();\n * console.log(array);\n * // => [1, 2, 3]\n *\n * wrapped.last();\n * // => 3\n *\n * console.log(array);\n * // => [1, 2, 3]\n */\n function wrapperCommit() {\n return new _lodashInternalLodashWrapper['default'](this.value(), this.__chain__);\n }\n\n exports['default'] = wrapperCommit;\n});","define('lodash/chain/wrapperConcat', ['exports', 'lodash/internal/arrayConcat', 'lodash/internal/baseFlatten', 'lodash/lang/isArray', 'lodash/function/restParam', 'lodash/internal/toObject'], function (exports, _lodashInternalArrayConcat, _lodashInternalBaseFlatten, _lodashLangIsArray, _lodashFunctionRestParam, _lodashInternalToObject) {\n 'use strict';\n\n /**\n * Creates a new array joining a wrapped array with any additional arrays\n * and/or values.\n *\n * @name concat\n * @memberOf _\n * @category Chain\n * @param {...*} [values] The values to concatenate.\n * @returns {Array} Returns the new concatenated array.\n * @example\n *\n * var array = [1];\n * var wrapped = _(array).concat(2, [3], [[4]]);\n *\n * console.log(wrapped.value());\n * // => [1, 2, 3, [4]]\n *\n * console.log(array);\n * // => [1]\n */\n var wrapperConcat = (0, _lodashFunctionRestParam['default'])(function (values) {\n values = (0, _lodashInternalBaseFlatten['default'])(values);\n return this.thru(function (array) {\n return (0, _lodashInternalArrayConcat['default'])((0, _lodashLangIsArray['default'])(array) ? array : [(0, _lodashInternalToObject['default'])(array)], values);\n });\n });\n\n exports['default'] = wrapperConcat;\n});","define('lodash/chain/wrapperPlant', ['exports', 'lodash/internal/baseLodash', 'lodash/internal/wrapperClone'], function (exports, _lodashInternalBaseLodash, _lodashInternalWrapperClone) {\n 'use strict';\n\n /**\n * Creates a clone of the chained sequence planting `value` as the wrapped value.\n *\n * @name plant\n * @memberOf _\n * @category Chain\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2];\n * var wrapped = _(array).map(function(value) {\n * return Math.pow(value, 2);\n * });\n *\n * var other = [3, 4];\n * var otherWrapped = wrapped.plant(other);\n *\n * otherWrapped.value();\n * // => [9, 16]\n *\n * wrapped.value();\n * // => [1, 4]\n */\n function wrapperPlant(value) {\n var result,\n parent = this;\n\n while (parent instanceof _lodashInternalBaseLodash['default']) {\n var clone = (0, _lodashInternalWrapperClone['default'])(parent);\n if (result) {\n previous.__wrapped__ = clone;\n } else {\n result = clone;\n }\n var previous = clone;\n parent = parent.__wrapped__;\n }\n previous.__wrapped__ = value;\n return result;\n }\n\n exports['default'] = wrapperPlant;\n});","define('lodash/chain/wrapperReverse', ['exports', 'lodash/internal/LazyWrapper', 'lodash/internal/LodashWrapper', 'lodash/chain/thru'], function (exports, _lodashInternalLazyWrapper, _lodashInternalLodashWrapper, _lodashChainThru) {\n 'use strict';\n\n /**\n * Reverses the wrapped array so the first element becomes the last, the\n * second element becomes the second to last, and so on.\n *\n * **Note:** This method mutates the wrapped array.\n *\n * @name reverse\n * @memberOf _\n * @category Chain\n * @returns {Object} Returns the new reversed `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _(array).reverse().value()\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function wrapperReverse() {\n var value = this.__wrapped__;\n\n var interceptor = function interceptor(value) {\n return value.reverse();\n };\n if (value instanceof _lodashInternalLazyWrapper['default']) {\n var wrapped = value;\n if (this.__actions__.length) {\n wrapped = new _lodashInternalLazyWrapper['default'](this);\n }\n wrapped = wrapped.reverse();\n wrapped.__actions__.push({ 'func': _lodashChainThru['default'], 'args': [interceptor], 'thisArg': undefined });\n return new _lodashInternalLodashWrapper['default'](wrapped, this.__chain__);\n }\n return this.thru(interceptor);\n }\n\n exports['default'] = wrapperReverse;\n});","define('lodash/chain/wrapperToString', ['exports'], function (exports) {\n /**\n * Produces the result of coercing the unwrapped value to a string.\n *\n * @name toString\n * @memberOf _\n * @category Chain\n * @returns {string} Returns the coerced string value.\n * @example\n *\n * _([1, 2, 3]).toString();\n * // => '1,2,3'\n */\n 'use strict';\n\n function wrapperToString() {\n return this.value() + '';\n }\n\n exports['default'] = wrapperToString;\n});","define('lodash/chain/wrapperValue', ['exports', 'lodash/internal/baseWrapperValue'], function (exports, _lodashInternalBaseWrapperValue) {\n 'use strict';\n\n /**\n * Executes the chained sequence to extract the unwrapped value.\n *\n * @name value\n * @memberOf _\n * @alias run, toJSON, valueOf\n * @category Chain\n * @returns {*} Returns the resolved unwrapped value.\n * @example\n *\n * _([1, 2, 3]).value();\n * // => [1, 2, 3]\n */\n function wrapperValue() {\n return (0, _lodashInternalBaseWrapperValue['default'])(this.__wrapped__, this.__actions__);\n }\n\n exports['default'] = wrapperValue;\n});","define('lodash/chain', ['exports', 'lodash/chain/chain', 'lodash/chain/commit', 'lodash/chain/concat', 'lodash/chain/lodash', 'lodash/chain/plant', 'lodash/chain/reverse', 'lodash/chain/run', 'lodash/chain/tap', 'lodash/chain/thru', 'lodash/chain/toJSON', 'lodash/chain/toString', 'lodash/chain/value', 'lodash/chain/valueOf', 'lodash/chain/wrapperChain'], function (exports, _lodashChainChain, _lodashChainCommit, _lodashChainConcat, _lodashChainLodash, _lodashChainPlant, _lodashChainReverse, _lodashChainRun, _lodashChainTap, _lodashChainThru, _lodashChainToJSON, _lodashChainToString, _lodashChainValue, _lodashChainValueOf, _lodashChainWrapperChain) {\n 'use strict';\n\n exports['default'] = {\n 'chain': _lodashChainChain['default'],\n 'commit': _lodashChainCommit['default'],\n 'concat': _lodashChainConcat['default'],\n 'lodash': _lodashChainLodash['default'],\n 'plant': _lodashChainPlant['default'],\n 'reverse': _lodashChainReverse['default'],\n 'run': _lodashChainRun['default'],\n 'tap': _lodashChainTap['default'],\n 'thru': _lodashChainThru['default'],\n 'toJSON': _lodashChainToJSON['default'],\n 'toString': _lodashChainToString['default'],\n 'value': _lodashChainValue['default'],\n 'valueOf': _lodashChainValueOf['default'],\n 'wrapperChain': _lodashChainWrapperChain['default']\n };\n});","define('lodash/collection/all', ['exports', 'lodash/collection/every'], function (exports, _lodashCollectionEvery) {\n 'use strict';\n\n exports['default'] = _lodashCollectionEvery['default'];\n});","define('lodash/collection/any', ['exports', 'lodash/collection/some'], function (exports, _lodashCollectionSome) {\n 'use strict';\n\n exports['default'] = _lodashCollectionSome['default'];\n});","define('lodash/collection/at', ['exports', 'lodash/internal/baseAt', 'lodash/internal/baseFlatten', 'lodash/function/restParam'], function (exports, _lodashInternalBaseAt, _lodashInternalBaseFlatten, _lodashFunctionRestParam) {\n 'use strict';\n\n /**\n * Creates an array of elements corresponding to the given keys, or indexes,\n * of `collection`. Keys may be specified as individual arguments or as arrays\n * of keys.\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object|string} collection The collection to iterate over.\n * @param {...(number|number[]|string|string[])} [props] The property names\n * or indexes of elements to pick, specified individually or in arrays.\n * @returns {Array} Returns the new array of picked elements.\n * @example\n *\n * _.at(['a', 'b', 'c'], [0, 2]);\n * // => ['a', 'c']\n *\n * _.at(['barney', 'fred', 'pebbles'], 0, 2);\n * // => ['barney', 'pebbles']\n */\n var at = (0, _lodashFunctionRestParam['default'])(function (collection, props) {\n return (0, _lodashInternalBaseAt['default'])(collection, (0, _lodashInternalBaseFlatten['default'])(props));\n });\n\n exports['default'] = at;\n});","define('lodash/collection/collect', ['exports', 'lodash/collection/map'], function (exports, _lodashCollectionMap) {\n 'use strict';\n\n exports['default'] = _lodashCollectionMap['default'];\n});","define('lodash/collection/contains', ['exports', 'lodash/collection/includes'], function (exports, _lodashCollectionIncludes) {\n 'use strict';\n\n exports['default'] = _lodashCollectionIncludes['default'];\n});","define('lodash/collection/countBy', ['exports', 'lodash/internal/createAggregator'], function (exports, _lodashInternalCreateAggregator) {\n 'use strict';\n\n /** Used for native method references. */\n var objectProto = Object.prototype;\n\n /** Used to check objects for own properties. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` through `iteratee`. The corresponding value\n * of each key is the number of times the key was returned by `iteratee`.\n * The `iteratee` is bound to `thisArg` and invoked with three arguments:\n * (value, index|key, collection).\n *\n * If a property name is provided for `iteratee` the created `_.property`\n * style callback returns the property value of the given element.\n *\n * If a value is also provided for `thisArg` the created `_.matchesProperty`\n * style callback returns `true` for elements that have a matching property\n * value, else `false`.\n *\n * If an object is provided for `iteratee` the created `_.matches` style\n * callback returns `true` for elements that have the properties of the given\n * object, else `false`.\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object|string} collection The collection to iterate over.\n * @param {Function|Object|string} [iteratee=_.identity] The function invoked\n * per iteration.\n * @param {*} [thisArg] The `this` binding of `iteratee`.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.countBy([4.3, 6.1, 6.4], function(n) {\n * return Math.floor(n);\n * });\n * // => { '4': 1, '6': 2 }\n *\n * _.countBy([4.3, 6.1, 6.4], function(n) {\n * return this.floor(n);\n * }, Math);\n * // => { '4': 1, '6': 2 }\n *\n * _.countBy(['one', 'two', 'three'], 'length');\n * // => { '3': 2, '5': 1 }\n */\n var countBy = (0, _lodashInternalCreateAggregator['default'])(function (result, value, key) {\n hasOwnProperty.call(result, key) ? ++result[key] : result[key] = 1;\n });\n\n exports['default'] = countBy;\n});","define('lodash/collection/detect', ['exports', 'lodash/collection/find'], function (exports, _lodashCollectionFind) {\n 'use strict';\n\n exports['default'] = _lodashCollectionFind['default'];\n});","define('lodash/collection/each', ['exports', 'lodash/collection/forEach'], function (exports, _lodashCollectionForEach) {\n 'use strict';\n\n exports['default'] = _lodashCollectionForEach['default'];\n});","define('lodash/collection/eachRight', ['exports', 'lodash/collection/forEachRight'], function (exports, _lodashCollectionForEachRight) {\n 'use strict';\n\n exports['default'] = _lodashCollectionForEachRight['default'];\n});","define('lodash/collection/every', ['exports', 'lodash/internal/arrayEvery', 'lodash/internal/baseCallback', 'lodash/internal/baseEvery', 'lodash/lang/isArray', 'lodash/internal/isIterateeCall'], function (exports, _lodashInternalArrayEvery, _lodashInternalBaseCallback, _lodashInternalBaseEvery, _lodashLangIsArray, _lodashInternalIsIterateeCall) {\n 'use strict';\n\n /**\n * Checks if `predicate` returns truthy for **all** elements of `collection`.\n * The predicate is bound to `thisArg` and invoked with three arguments:\n * (value, index|key, collection).\n *\n * If a property name is provided for `predicate` the created `_.property`\n * style callback returns the property value of the given element.\n *\n * If a value is also provided for `thisArg` the created `_.matchesProperty`\n * style callback returns `true` for elements that have a matching property\n * value, else `false`.\n *\n * If an object is provided for `predicate` the created `_.matches` style\n * callback returns `true` for elements that have the properties of the given\n * object, else `false`.\n *\n * @static\n * @memberOf _\n * @alias all\n * @category Collection\n * @param {Array|Object|string} collection The collection to iterate over.\n * @param {Function|Object|string} [predicate=_.identity] The function invoked\n * per iteration.\n * @param {*} [thisArg] The `this` binding of `predicate`.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n * @example\n *\n * _.every([true, 1, null, 'yes'], Boolean);\n * // => false\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false }\n * ];\n *\n * // using the `_.matches` callback shorthand\n * _.every(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // using the `_.matchesProperty` callback shorthand\n * _.every(users, 'active', false);\n * // => true\n *\n * // using the `_.property` callback shorthand\n * _.every(users, 'active');\n * // => false\n */\n function every(collection, predicate, thisArg) {\n var func = (0, _lodashLangIsArray['default'])(collection) ? _lodashInternalArrayEvery['default'] : _lodashInternalBaseEvery['default'];\n if (thisArg && (0, _lodashInternalIsIterateeCall['default'])(collection, predicate, thisArg)) {\n predicate = undefined;\n }\n if (typeof predicate != 'function' || thisArg !== undefined) {\n predicate = (0, _lodashInternalBaseCallback['default'])(predicate, thisArg, 3);\n }\n return func(collection, predicate);\n }\n\n exports['default'] = every;\n});","define('lodash/collection/filter', ['exports', 'lodash/internal/arrayFilter', 'lodash/internal/baseCallback', 'lodash/internal/baseFilter', 'lodash/lang/isArray'], function (exports, _lodashInternalArrayFilter, _lodashInternalBaseCallback, _lodashInternalBaseFilter, _lodashLangIsArray) {\n 'use strict';\n\n /**\n * Iterates over elements of `collection`, returning an array of all elements\n * `predicate` returns truthy for. The predicate is bound to `thisArg` and\n * invoked with three arguments: (value, index|key, collection).\n *\n * If a property name is provided for `predicate` the created `_.property`\n * style callback returns the property value of the given element.\n *\n * If a value is also provided for `thisArg` the created `_.matchesProperty`\n * style callback returns `true` for elements that have a matching property\n * value, else `false`.\n *\n * If an object is provided for `predicate` the created `_.matches` style\n * callback returns `true` for elements that have the properties of the given\n * object, else `false`.\n *\n * @static\n * @memberOf _\n * @alias select\n * @category Collection\n * @param {Array|Object|string} collection The collection to iterate over.\n * @param {Function|Object|string} [predicate=_.identity] The function invoked\n * per iteration.\n * @param {*} [thisArg] The `this` binding of `predicate`.\n * @returns {Array} Returns the new filtered array.\n * @example\n *\n * _.filter([4, 5, 6], function(n) {\n * return n % 2 == 0;\n * });\n * // => [4, 6]\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // using the `_.matches` callback shorthand\n * _.pluck(_.filter(users, { 'age': 36, 'active': true }), 'user');\n * // => ['barney']\n *\n * // using the `_.matchesProperty` callback shorthand\n * _.pluck(_.filter(users, 'active', false), 'user');\n * // => ['fred']\n *\n * // using the `_.property` callback shorthand\n * _.pluck(_.filter(users, 'active'), 'user');\n * // => ['barney']\n */\n function filter(collection, predicate, thisArg) {\n var func = (0, _lodashLangIsArray['default'])(collection) ? _lodashInternalArrayFilter['default'] : _lodashInternalBaseFilter['default'];\n predicate = (0, _lodashInternalBaseCallback['default'])(predicate, thisArg, 3);\n return func(collection, predicate);\n }\n\n exports['default'] = filter;\n});","define('lodash/collection/find', ['exports', 'lodash/internal/baseEach', 'lodash/internal/createFind'], function (exports, _lodashInternalBaseEach, _lodashInternalCreateFind) {\n 'use strict';\n\n /**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is bound to `thisArg` and\n * invoked with three arguments: (value, index|key, collection).\n *\n * If a property name is provided for `predicate` the created `_.property`\n * style callback returns the property value of the given element.\n *\n * If a value is also provided for `thisArg` the created `_.matchesProperty`\n * style callback returns `true` for elements that have a matching property\n * value, else `false`.\n *\n * If an object is provided for `predicate` the created `_.matches` style\n * callback returns `true` for elements that have the properties of the given\n * object, else `false`.\n *\n * @static\n * @memberOf _\n * @alias detect\n * @category Collection\n * @param {Array|Object|string} collection The collection to search.\n * @param {Function|Object|string} [predicate=_.identity] The function invoked\n * per iteration.\n * @param {*} [thisArg] The `this` binding of `predicate`.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.result(_.find(users, function(chr) {\n * return chr.age < 40;\n * }), 'user');\n * // => 'barney'\n *\n * // using the `_.matches` callback shorthand\n * _.result(_.find(users, { 'age': 1, 'active': true }), 'user');\n * // => 'pebbles'\n *\n * // using the `_.matchesProperty` callback shorthand\n * _.result(_.find(users, 'active', false), 'user');\n * // => 'fred'\n *\n * // using the `_.property` callback shorthand\n * _.result(_.find(users, 'active'), 'user');\n * // => 'barney'\n */\n var find = (0, _lodashInternalCreateFind['default'])(_lodashInternalBaseEach['default']);\n\n exports['default'] = find;\n});","define('lodash/collection/findLast', ['exports', 'lodash/internal/baseEachRight', 'lodash/internal/createFind'], function (exports, _lodashInternalBaseEachRight, _lodashInternalCreateFind) {\n 'use strict';\n\n /**\n * This method is like `_.find` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object|string} collection The collection to search.\n * @param {Function|Object|string} [predicate=_.identity] The function invoked\n * per iteration.\n * @param {*} [thisArg] The `this` binding of `predicate`.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * _.findLast([1, 2, 3, 4], function(n) {\n * return n % 2 == 1;\n * });\n * // => 3\n */\n var findLast = (0, _lodashInternalCreateFind['default'])(_lodashInternalBaseEachRight['default'], true);\n\n exports['default'] = findLast;\n});","define('lodash/collection/findWhere', ['exports', 'lodash/internal/baseMatches', 'lodash/collection/find'], function (exports, _lodashInternalBaseMatches, _lodashCollectionFind) {\n 'use strict';\n\n /**\n * Performs a deep comparison between each element in `collection` and the\n * source object, returning the first element that has equivalent property\n * values.\n *\n * **Note:** This method supports comparing arrays, booleans, `Date` objects,\n * numbers, `Object` objects, regexes, and strings. Objects are compared by\n * their own, not inherited, enumerable properties. For comparing a single\n * own or inherited property value see `_.matchesProperty`.\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object|string} collection The collection to search.\n * @param {Object} source The object of property values to match.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * _.result(_.findWhere(users, { 'age': 36, 'active': true }), 'user');\n * // => 'barney'\n *\n * _.result(_.findWhere(users, { 'age': 40, 'active': false }), 'user');\n * // => 'fred'\n */\n function findWhere(collection, source) {\n return (0, _lodashCollectionFind['default'])(collection, (0, _lodashInternalBaseMatches['default'])(source));\n }\n\n exports['default'] = findWhere;\n});","define('lodash/collection/foldl', ['exports', 'lodash/collection/reduce'], function (exports, _lodashCollectionReduce) {\n 'use strict';\n\n exports['default'] = _lodashCollectionReduce['default'];\n});","define('lodash/collection/foldr', ['exports', 'lodash/collection/reduceRight'], function (exports, _lodashCollectionReduceRight) {\n 'use strict';\n\n exports['default'] = _lodashCollectionReduceRight['default'];\n});","define('lodash/collection/forEach', ['exports', 'lodash/internal/arrayEach', 'lodash/internal/baseEach', 'lodash/internal/createForEach'], function (exports, _lodashInternalArrayEach, _lodashInternalBaseEach, _lodashInternalCreateForEach) {\n 'use strict';\n\n /**\n * Iterates over elements of `collection` invoking `iteratee` for each element.\n * The `iteratee` is bound to `thisArg` and invoked with three arguments:\n * (value, index|key, collection). Iteratee functions may exit iteration early\n * by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\" property\n * are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn`\n * may be used for object iteration.\n *\n * @static\n * @memberOf _\n * @alias each\n * @category Collection\n * @param {Array|Object|string} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [thisArg] The `this` binding of `iteratee`.\n * @returns {Array|Object|string} Returns `collection`.\n * @example\n *\n * _([1, 2]).forEach(function(n) {\n * console.log(n);\n * }).value();\n * // => logs each value from left to right and returns the array\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(n, key) {\n * console.log(n, key);\n * });\n * // => logs each value-key pair and returns the object (iteration order is not guaranteed)\n */\n var forEach = (0, _lodashInternalCreateForEach['default'])(_lodashInternalArrayEach['default'], _lodashInternalBaseEach['default']);\n\n exports['default'] = forEach;\n});","define('lodash/collection/forEachRight', ['exports', 'lodash/internal/arrayEachRight', 'lodash/internal/baseEachRight', 'lodash/internal/createForEach'], function (exports, _lodashInternalArrayEachRight, _lodashInternalBaseEachRight, _lodashInternalCreateForEach) {\n 'use strict';\n\n /**\n * This method is like `_.forEach` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @alias eachRight\n * @category Collection\n * @param {Array|Object|string} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [thisArg] The `this` binding of `iteratee`.\n * @returns {Array|Object|string} Returns `collection`.\n * @example\n *\n * _([1, 2]).forEachRight(function(n) {\n * console.log(n);\n * }).value();\n * // => logs each value from right to left and returns the array\n */\n var forEachRight = (0, _lodashInternalCreateForEach['default'])(_lodashInternalArrayEachRight['default'], _lodashInternalBaseEachRight['default']);\n\n exports['default'] = forEachRight;\n});","define('lodash/collection/groupBy', ['exports', 'lodash/internal/createAggregator'], function (exports, _lodashInternalCreateAggregator) {\n 'use strict';\n\n /** Used for native method references. */\n var objectProto = Object.prototype;\n\n /** Used to check objects for own properties. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` through `iteratee`. The corresponding value\n * of each key is an array of the elements responsible for generating the key.\n * The `iteratee` is bound to `thisArg` and invoked with three arguments:\n * (value, index|key, collection).\n *\n * If a property name is provided for `iteratee` the created `_.property`\n * style callback returns the property value of the given element.\n *\n * If a value is also provided for `thisArg` the created `_.matchesProperty`\n * style callback returns `true` for elements that have a matching property\n * value, else `false`.\n *\n * If an object is provided for `iteratee` the created `_.matches` style\n * callback returns `true` for elements that have the properties of the given\n * object, else `false`.\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object|string} collection The collection to iterate over.\n * @param {Function|Object|string} [iteratee=_.identity] The function invoked\n * per iteration.\n * @param {*} [thisArg] The `this` binding of `iteratee`.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.groupBy([4.2, 6.1, 6.4], function(n) {\n * return Math.floor(n);\n * });\n * // => { '4': [4.2], '6': [6.1, 6.4] }\n *\n * _.groupBy([4.2, 6.1, 6.4], function(n) {\n * return this.floor(n);\n * }, Math);\n * // => { '4': [4.2], '6': [6.1, 6.4] }\n *\n * // using the `_.property` callback shorthand\n * _.groupBy(['one', 'two', 'three'], 'length');\n * // => { '3': ['one', 'two'], '5': ['three'] }\n */\n var groupBy = (0, _lodashInternalCreateAggregator['default'])(function (result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n result[key].push(value);\n } else {\n result[key] = [value];\n }\n });\n\n exports['default'] = groupBy;\n});","define('lodash/collection/include', ['exports', 'lodash/collection/includes'], function (exports, _lodashCollectionIncludes) {\n 'use strict';\n\n exports['default'] = _lodashCollectionIncludes['default'];\n});","define('lodash/collection/includes', ['exports', 'lodash/internal/baseIndexOf', 'lodash/internal/getLength', 'lodash/lang/isArray', 'lodash/internal/isIterateeCall', 'lodash/internal/isLength', 'lodash/lang/isString', 'lodash/object/values'], function (exports, _lodashInternalBaseIndexOf, _lodashInternalGetLength, _lodashLangIsArray, _lodashInternalIsIterateeCall, _lodashInternalIsLength, _lodashLangIsString, _lodashObjectValues) {\n 'use strict';\n\n /* Native method references for those with the same name as other `lodash` methods. */\n var nativeMax = Math.max;\n\n /**\n * Checks if `target` is in `collection` using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)\n * for equality comparisons. If `fromIndex` is negative, it's used as the offset\n * from the end of `collection`.\n *\n * @static\n * @memberOf _\n * @alias contains, include\n * @category Collection\n * @param {Array|Object|string} collection The collection to search.\n * @param {*} target The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`.\n * @returns {boolean} Returns `true` if a matching element is found, else `false`.\n * @example\n *\n * _.includes([1, 2, 3], 1);\n * // => true\n *\n * _.includes([1, 2, 3], 1, 2);\n * // => false\n *\n * _.includes({ 'user': 'fred', 'age': 40 }, 'fred');\n * // => true\n *\n * _.includes('pebbles', 'eb');\n * // => true\n */\n function includes(collection, target, fromIndex, guard) {\n var length = collection ? (0, _lodashInternalGetLength['default'])(collection) : 0;\n if (!(0, _lodashInternalIsLength['default'])(length)) {\n collection = (0, _lodashObjectValues['default'])(collection);\n length = collection.length;\n }\n if (typeof fromIndex != 'number' || guard && (0, _lodashInternalIsIterateeCall['default'])(target, fromIndex, guard)) {\n fromIndex = 0;\n } else {\n fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex || 0;\n }\n return typeof collection == 'string' || !(0, _lodashLangIsArray['default'])(collection) && (0, _lodashLangIsString['default'])(collection) ? fromIndex <= length && collection.indexOf(target, fromIndex) > -1 : !!length && (0, _lodashInternalBaseIndexOf['default'])(collection, target, fromIndex) > -1;\n }\n\n exports['default'] = includes;\n});","define('lodash/collection/indexBy', ['exports', 'lodash/internal/createAggregator'], function (exports, _lodashInternalCreateAggregator) {\n 'use strict';\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` through `iteratee`. The corresponding value\n * of each key is the last element responsible for generating the key. The\n * iteratee function is bound to `thisArg` and invoked with three arguments:\n * (value, index|key, collection).\n *\n * If a property name is provided for `iteratee` the created `_.property`\n * style callback returns the property value of the given element.\n *\n * If a value is also provided for `thisArg` the created `_.matchesProperty`\n * style callback returns `true` for elements that have a matching property\n * value, else `false`.\n *\n * If an object is provided for `iteratee` the created `_.matches` style\n * callback returns `true` for elements that have the properties of the given\n * object, else `false`.\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object|string} collection The collection to iterate over.\n * @param {Function|Object|string} [iteratee=_.identity] The function invoked\n * per iteration.\n * @param {*} [thisArg] The `this` binding of `iteratee`.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * var keyData = [\n * { 'dir': 'left', 'code': 97 },\n * { 'dir': 'right', 'code': 100 }\n * ];\n *\n * _.indexBy(keyData, 'dir');\n * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\n *\n * _.indexBy(keyData, function(object) {\n * return String.fromCharCode(object.code);\n * });\n * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n *\n * _.indexBy(keyData, function(object) {\n * return this.fromCharCode(object.code);\n * }, String);\n * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n */\n var indexBy = (0, _lodashInternalCreateAggregator['default'])(function (result, value, key) {\n result[key] = value;\n });\n\n exports['default'] = indexBy;\n});","define('lodash/collection/inject', ['exports', 'lodash/collection/reduce'], function (exports, _lodashCollectionReduce) {\n 'use strict';\n\n exports['default'] = _lodashCollectionReduce['default'];\n});","define('lodash/collection/invoke', ['exports', 'lodash/internal/baseEach', 'lodash/internal/invokePath', 'lodash/internal/isArrayLike', 'lodash/internal/isKey', 'lodash/function/restParam'], function (exports, _lodashInternalBaseEach, _lodashInternalInvokePath, _lodashInternalIsArrayLike, _lodashInternalIsKey, _lodashFunctionRestParam) {\n 'use strict';\n\n /**\n * Invokes the method at `path` of each element in `collection`, returning\n * an array of the results of each invoked method. Any additional arguments\n * are provided to each invoked method. If `methodName` is a function it's\n * invoked for, and `this` bound to, each element in `collection`.\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object|string} collection The collection to iterate over.\n * @param {Array|Function|string} path The path of the method to invoke or\n * the function invoked per iteration.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {Array} Returns the array of results.\n * @example\n *\n * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort');\n * // => [[1, 5, 7], [1, 2, 3]]\n *\n * _.invoke([123, 456], String.prototype.split, '');\n * // => [['1', '2', '3'], ['4', '5', '6']]\n */\n var invoke = (0, _lodashFunctionRestParam['default'])(function (collection, path, args) {\n var index = -1,\n isFunc = typeof path == 'function',\n isProp = (0, _lodashInternalIsKey['default'])(path),\n result = (0, _lodashInternalIsArrayLike['default'])(collection) ? Array(collection.length) : [];\n\n (0, _lodashInternalBaseEach['default'])(collection, function (value) {\n var func = isFunc ? path : isProp && value != null ? value[path] : undefined;\n result[++index] = func ? func.apply(value, args) : (0, _lodashInternalInvokePath['default'])(value, path, args);\n });\n return result;\n });\n\n exports['default'] = invoke;\n});","define('lodash/collection/map', ['exports', 'lodash/internal/arrayMap', 'lodash/internal/baseCallback', 'lodash/internal/baseMap', 'lodash/lang/isArray'], function (exports, _lodashInternalArrayMap, _lodashInternalBaseCallback, _lodashInternalBaseMap, _lodashLangIsArray) {\n 'use strict';\n\n /**\n * Creates an array of values by running each element in `collection` through\n * `iteratee`. The `iteratee` is bound to `thisArg` and invoked with three\n * arguments: (value, index|key, collection).\n *\n * If a property name is provided for `iteratee` the created `_.property`\n * style callback returns the property value of the given element.\n *\n * If a value is also provided for `thisArg` the created `_.matchesProperty`\n * style callback returns `true` for elements that have a matching property\n * value, else `false`.\n *\n * If an object is provided for `iteratee` the created `_.matches` style\n * callback returns `true` for elements that have the properties of the given\n * object, else `false`.\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `callback`, `chunk`, `clone`, `create`, `curry`, `curryRight`,\n * `drop`, `dropRight`, `every`, `fill`, `flatten`, `invert`, `max`, `min`,\n * `parseInt`, `slice`, `sortBy`, `take`, `takeRight`, `template`, `trim`,\n * `trimLeft`, `trimRight`, `trunc`, `random`, `range`, `sample`, `some`,\n * `sum`, `uniq`, and `words`\n *\n * @static\n * @memberOf _\n * @alias collect\n * @category Collection\n * @param {Array|Object|string} collection The collection to iterate over.\n * @param {Function|Object|string} [iteratee=_.identity] The function invoked\n * per iteration.\n * @param {*} [thisArg] The `this` binding of `iteratee`.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function timesThree(n) {\n * return n * 3;\n * }\n *\n * _.map([1, 2], timesThree);\n * // => [3, 6]\n *\n * _.map({ 'a': 1, 'b': 2 }, timesThree);\n * // => [3, 6] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // using the `_.property` callback shorthand\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\n function map(collection, iteratee, thisArg) {\n var func = (0, _lodashLangIsArray['default'])(collection) ? _lodashInternalArrayMap['default'] : _lodashInternalBaseMap['default'];\n iteratee = (0, _lodashInternalBaseCallback['default'])(iteratee, thisArg, 3);\n return func(collection, iteratee);\n }\n\n exports['default'] = map;\n});","define('lodash/collection/max', ['exports', 'lodash/math/max'], function (exports, _lodashMathMax) {\n 'use strict';\n\n exports['default'] = _lodashMathMax['default'];\n});","define('lodash/collection/min', ['exports', 'lodash/math/min'], function (exports, _lodashMathMin) {\n 'use strict';\n\n exports['default'] = _lodashMathMin['default'];\n});","define('lodash/collection/partition', ['exports', 'lodash/internal/createAggregator'], function (exports, _lodashInternalCreateAggregator) {\n 'use strict';\n\n /**\n * Creates an array of elements split into two groups, the first of which\n * contains elements `predicate` returns truthy for, while the second of which\n * contains elements `predicate` returns falsey for. The predicate is bound\n * to `thisArg` and invoked with three arguments: (value, index|key, collection).\n *\n * If a property name is provided for `predicate` the created `_.property`\n * style callback returns the property value of the given element.\n *\n * If a value is also provided for `thisArg` the created `_.matchesProperty`\n * style callback returns `true` for elements that have a matching property\n * value, else `false`.\n *\n * If an object is provided for `predicate` the created `_.matches` style\n * callback returns `true` for elements that have the properties of the given\n * object, else `false`.\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object|string} collection The collection to iterate over.\n * @param {Function|Object|string} [predicate=_.identity] The function invoked\n * per iteration.\n * @param {*} [thisArg] The `this` binding of `predicate`.\n * @returns {Array} Returns the array of grouped elements.\n * @example\n *\n * _.partition([1, 2, 3], function(n) {\n * return n % 2;\n * });\n * // => [[1, 3], [2]]\n *\n * _.partition([1.2, 2.3, 3.4], function(n) {\n * return this.floor(n) % 2;\n * }, Math);\n * // => [[1.2, 3.4], [2.3]]\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true },\n * { 'user': 'pebbles', 'age': 1, 'active': false }\n * ];\n *\n * var mapper = function(array) {\n * return _.pluck(array, 'user');\n * };\n *\n * // using the `_.matches` callback shorthand\n * _.map(_.partition(users, { 'age': 1, 'active': false }), mapper);\n * // => [['pebbles'], ['barney', 'fred']]\n *\n * // using the `_.matchesProperty` callback shorthand\n * _.map(_.partition(users, 'active', false), mapper);\n * // => [['barney', 'pebbles'], ['fred']]\n *\n * // using the `_.property` callback shorthand\n * _.map(_.partition(users, 'active'), mapper);\n * // => [['fred'], ['barney', 'pebbles']]\n */\n var partition = (0, _lodashInternalCreateAggregator['default'])(function (result, value, key) {\n result[key ? 0 : 1].push(value);\n }, function () {\n return [[], []];\n });\n\n exports['default'] = partition;\n});","define('lodash/collection/pluck', ['exports', 'lodash/collection/map', 'lodash/utility/property'], function (exports, _lodashCollectionMap, _lodashUtilityProperty) {\n 'use strict';\n\n /**\n * Gets the property value of `path` from all elements in `collection`.\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object|string} collection The collection to iterate over.\n * @param {Array|string} path The path of the property to pluck.\n * @returns {Array} Returns the property values.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 }\n * ];\n *\n * _.pluck(users, 'user');\n * // => ['barney', 'fred']\n *\n * var userIndex = _.indexBy(users, 'user');\n * _.pluck(userIndex, 'age');\n * // => [36, 40] (iteration order is not guaranteed)\n */\n function pluck(collection, path) {\n return (0, _lodashCollectionMap['default'])(collection, (0, _lodashUtilityProperty['default'])(path));\n }\n\n exports['default'] = pluck;\n});","define('lodash/collection/reduce', ['exports', 'lodash/internal/arrayReduce', 'lodash/internal/baseEach', 'lodash/internal/createReduce'], function (exports, _lodashInternalArrayReduce, _lodashInternalBaseEach, _lodashInternalCreateReduce) {\n 'use strict';\n\n /**\n * Reduces `collection` to a value which is the accumulated result of running\n * each element in `collection` through `iteratee`, where each successive\n * invocation is supplied the return value of the previous. If `accumulator`\n * is not provided the first element of `collection` is used as the initial\n * value. The `iteratee` is bound to `thisArg` and invoked with four arguments:\n * (accumulator, value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.reduce`, `_.reduceRight`, and `_.transform`.\n *\n * The guarded methods are:\n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `sortByAll`,\n * and `sortByOrder`\n *\n * @static\n * @memberOf _\n * @alias foldl, inject\n * @category Collection\n * @param {Array|Object|string} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {*} [thisArg] The `this` binding of `iteratee`.\n * @returns {*} Returns the accumulated value.\n * @example\n *\n * _.reduce([1, 2], function(total, n) {\n * return total + n;\n * });\n * // => 3\n *\n * _.reduce({ 'a': 1, 'b': 2 }, function(result, n, key) {\n * result[key] = n * 3;\n * return result;\n * }, {});\n * // => { 'a': 3, 'b': 6 } (iteration order is not guaranteed)\n */\n var reduce = (0, _lodashInternalCreateReduce['default'])(_lodashInternalArrayReduce['default'], _lodashInternalBaseEach['default']);\n\n exports['default'] = reduce;\n});","define('lodash/collection/reduceRight', ['exports', 'lodash/internal/arrayReduceRight', 'lodash/internal/baseEachRight', 'lodash/internal/createReduce'], function (exports, _lodashInternalArrayReduceRight, _lodashInternalBaseEachRight, _lodashInternalCreateReduce) {\n 'use strict';\n\n /**\n * This method is like `_.reduce` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @alias foldr\n * @category Collection\n * @param {Array|Object|string} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {*} [thisArg] The `this` binding of `iteratee`.\n * @returns {*} Returns the accumulated value.\n * @example\n *\n * var array = [[0, 1], [2, 3], [4, 5]];\n *\n * _.reduceRight(array, function(flattened, other) {\n * return flattened.concat(other);\n * }, []);\n * // => [4, 5, 2, 3, 0, 1]\n */\n var reduceRight = (0, _lodashInternalCreateReduce['default'])(_lodashInternalArrayReduceRight['default'], _lodashInternalBaseEachRight['default']);\n\n exports['default'] = reduceRight;\n});","define('lodash/collection/reject', ['exports', 'lodash/internal/arrayFilter', 'lodash/internal/baseCallback', 'lodash/internal/baseFilter', 'lodash/lang/isArray'], function (exports, _lodashInternalArrayFilter, _lodashInternalBaseCallback, _lodashInternalBaseFilter, _lodashLangIsArray) {\n 'use strict';\n\n /**\n * The opposite of `_.filter`; this method returns the elements of `collection`\n * that `predicate` does **not** return truthy for.\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object|string} collection The collection to iterate over.\n * @param {Function|Object|string} [predicate=_.identity] The function invoked\n * per iteration.\n * @param {*} [thisArg] The `this` binding of `predicate`.\n * @returns {Array} Returns the new filtered array.\n * @example\n *\n * _.reject([1, 2, 3, 4], function(n) {\n * return n % 2 == 0;\n * });\n * // => [1, 3]\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true }\n * ];\n *\n * // using the `_.matches` callback shorthand\n * _.pluck(_.reject(users, { 'age': 40, 'active': true }), 'user');\n * // => ['barney']\n *\n * // using the `_.matchesProperty` callback shorthand\n * _.pluck(_.reject(users, 'active', false), 'user');\n * // => ['fred']\n *\n * // using the `_.property` callback shorthand\n * _.pluck(_.reject(users, 'active'), 'user');\n * // => ['barney']\n */\n function reject(collection, predicate, thisArg) {\n var func = (0, _lodashLangIsArray['default'])(collection) ? _lodashInternalArrayFilter['default'] : _lodashInternalBaseFilter['default'];\n predicate = (0, _lodashInternalBaseCallback['default'])(predicate, thisArg, 3);\n return func(collection, function (value, index, collection) {\n return !predicate(value, index, collection);\n });\n }\n\n exports['default'] = reject;\n});","define('lodash/collection/sample', ['exports', 'lodash/internal/baseRandom', 'lodash/internal/isIterateeCall', 'lodash/lang/toArray', 'lodash/internal/toIterable'], function (exports, _lodashInternalBaseRandom, _lodashInternalIsIterateeCall, _lodashLangToArray, _lodashInternalToIterable) {\n 'use strict';\n\n /* Native method references for those with the same name as other `lodash` methods. */\n var nativeMin = Math.min;\n\n /**\n * Gets a random element or `n` random elements from a collection.\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object|string} collection The collection to sample.\n * @param {number} [n] The number of elements to sample.\n * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.\n * @returns {*} Returns the random sample(s).\n * @example\n *\n * _.sample([1, 2, 3, 4]);\n * // => 2\n *\n * _.sample([1, 2, 3, 4], 2);\n * // => [3, 1]\n */\n function sample(collection, n, guard) {\n if (guard ? (0, _lodashInternalIsIterateeCall['default'])(collection, n, guard) : n == null) {\n collection = (0, _lodashInternalToIterable['default'])(collection);\n var length = collection.length;\n return length > 0 ? collection[(0, _lodashInternalBaseRandom['default'])(0, length - 1)] : undefined;\n }\n var index = -1,\n result = (0, _lodashLangToArray['default'])(collection),\n length = result.length,\n lastIndex = length - 1;\n\n n = nativeMin(n < 0 ? 0 : +n || 0, length);\n while (++index < n) {\n var rand = (0, _lodashInternalBaseRandom['default'])(index, lastIndex),\n value = result[rand];\n\n result[rand] = result[index];\n result[index] = value;\n }\n result.length = n;\n return result;\n }\n\n exports['default'] = sample;\n});","define('lodash/collection/select', ['exports', 'lodash/collection/filter'], function (exports, _lodashCollectionFilter) {\n 'use strict';\n\n exports['default'] = _lodashCollectionFilter['default'];\n});","define('lodash/collection/shuffle', ['exports', 'lodash/collection/sample'], function (exports, _lodashCollectionSample) {\n 'use strict';\n\n /** Used as references for `-Infinity` and `Infinity`. */\n var POSITIVE_INFINITY = Number.POSITIVE_INFINITY;\n\n /**\n * Creates an array of shuffled values, using a version of the\n * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object|string} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n * @example\n *\n * _.shuffle([1, 2, 3, 4]);\n * // => [4, 1, 3, 2]\n */\n function shuffle(collection) {\n return (0, _lodashCollectionSample['default'])(collection, POSITIVE_INFINITY);\n }\n\n exports['default'] = shuffle;\n});","define('lodash/collection/size', ['exports', 'lodash/internal/getLength', 'lodash/internal/isLength', 'lodash/object/keys'], function (exports, _lodashInternalGetLength, _lodashInternalIsLength, _lodashObjectKeys) {\n 'use strict';\n\n /**\n * Gets the size of `collection` by returning its length for array-like\n * values or the number of own enumerable properties for objects.\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @returns {number} Returns the size of `collection`.\n * @example\n *\n * _.size([1, 2, 3]);\n * // => 3\n *\n * _.size({ 'a': 1, 'b': 2 });\n * // => 2\n *\n * _.size('pebbles');\n * // => 7\n */\n function size(collection) {\n var length = collection ? (0, _lodashInternalGetLength['default'])(collection) : 0;\n return (0, _lodashInternalIsLength['default'])(length) ? length : (0, _lodashObjectKeys['default'])(collection).length;\n }\n\n exports['default'] = size;\n});","define('lodash/collection/some', ['exports', 'lodash/internal/arraySome', 'lodash/internal/baseCallback', 'lodash/internal/baseSome', 'lodash/lang/isArray', 'lodash/internal/isIterateeCall'], function (exports, _lodashInternalArraySome, _lodashInternalBaseCallback, _lodashInternalBaseSome, _lodashLangIsArray, _lodashInternalIsIterateeCall) {\n 'use strict';\n\n /**\n * Checks if `predicate` returns truthy for **any** element of `collection`.\n * The function returns as soon as it finds a passing value and does not iterate\n * over the entire collection. The predicate is bound to `thisArg` and invoked\n * with three arguments: (value, index|key, collection).\n *\n * If a property name is provided for `predicate` the created `_.property`\n * style callback returns the property value of the given element.\n *\n * If a value is also provided for `thisArg` the created `_.matchesProperty`\n * style callback returns `true` for elements that have a matching property\n * value, else `false`.\n *\n * If an object is provided for `predicate` the created `_.matches` style\n * callback returns `true` for elements that have the properties of the given\n * object, else `false`.\n *\n * @static\n * @memberOf _\n * @alias any\n * @category Collection\n * @param {Array|Object|string} collection The collection to iterate over.\n * @param {Function|Object|string} [predicate=_.identity] The function invoked\n * per iteration.\n * @param {*} [thisArg] The `this` binding of `predicate`.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n * @example\n *\n * _.some([null, 0, 'yes', false], Boolean);\n * // => true\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false }\n * ];\n *\n * // using the `_.matches` callback shorthand\n * _.some(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // using the `_.matchesProperty` callback shorthand\n * _.some(users, 'active', false);\n * // => true\n *\n * // using the `_.property` callback shorthand\n * _.some(users, 'active');\n * // => true\n */\n function some(collection, predicate, thisArg) {\n var func = (0, _lodashLangIsArray['default'])(collection) ? _lodashInternalArraySome['default'] : _lodashInternalBaseSome['default'];\n if (thisArg && (0, _lodashInternalIsIterateeCall['default'])(collection, predicate, thisArg)) {\n predicate = undefined;\n }\n if (typeof predicate != 'function' || thisArg !== undefined) {\n predicate = (0, _lodashInternalBaseCallback['default'])(predicate, thisArg, 3);\n }\n return func(collection, predicate);\n }\n\n exports['default'] = some;\n});","define('lodash/collection/sortBy', ['exports', 'lodash/internal/baseCallback', 'lodash/internal/baseMap', 'lodash/internal/baseSortBy', 'lodash/internal/compareAscending', 'lodash/internal/isIterateeCall'], function (exports, _lodashInternalBaseCallback, _lodashInternalBaseMap, _lodashInternalBaseSortBy, _lodashInternalCompareAscending, _lodashInternalIsIterateeCall) {\n 'use strict';\n\n /**\n * Creates an array of elements, sorted in ascending order by the results of\n * running each element in a collection through `iteratee`. This method performs\n * a stable sort, that is, it preserves the original sort order of equal elements.\n * The `iteratee` is bound to `thisArg` and invoked with three arguments:\n * (value, index|key, collection).\n *\n * If a property name is provided for `iteratee` the created `_.property`\n * style callback returns the property value of the given element.\n *\n * If a value is also provided for `thisArg` the created `_.matchesProperty`\n * style callback returns `true` for elements that have a matching property\n * value, else `false`.\n *\n * If an object is provided for `iteratee` the created `_.matches` style\n * callback returns `true` for elements that have the properties of the given\n * object, else `false`.\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object|string} collection The collection to iterate over.\n * @param {Function|Object|string} [iteratee=_.identity] The function invoked\n * per iteration.\n * @param {*} [thisArg] The `this` binding of `iteratee`.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * _.sortBy([1, 2, 3], function(n) {\n * return Math.sin(n);\n * });\n * // => [3, 1, 2]\n *\n * _.sortBy([1, 2, 3], function(n) {\n * return this.sin(n);\n * }, Math);\n * // => [3, 1, 2]\n *\n * var users = [\n * { 'user': 'fred' },\n * { 'user': 'pebbles' },\n * { 'user': 'barney' }\n * ];\n *\n * // using the `_.property` callback shorthand\n * _.pluck(_.sortBy(users, 'user'), 'user');\n * // => ['barney', 'fred', 'pebbles']\n */\n function sortBy(collection, iteratee, thisArg) {\n if (collection == null) {\n return [];\n }\n if (thisArg && (0, _lodashInternalIsIterateeCall['default'])(collection, iteratee, thisArg)) {\n iteratee = undefined;\n }\n var index = -1;\n iteratee = (0, _lodashInternalBaseCallback['default'])(iteratee, thisArg, 3);\n\n var result = (0, _lodashInternalBaseMap['default'])(collection, function (value, key, collection) {\n return { 'criteria': iteratee(value, key, collection), 'index': ++index, 'value': value };\n });\n return (0, _lodashInternalBaseSortBy['default'])(result, _lodashInternalCompareAscending['default']);\n }\n\n exports['default'] = sortBy;\n});","define('lodash/collection/sortByAll', ['exports', 'lodash/internal/baseFlatten', 'lodash/internal/baseSortByOrder', 'lodash/internal/isIterateeCall', 'lodash/function/restParam'], function (exports, _lodashInternalBaseFlatten, _lodashInternalBaseSortByOrder, _lodashInternalIsIterateeCall, _lodashFunctionRestParam) {\n 'use strict';\n\n /**\n * This method is like `_.sortBy` except that it can sort by multiple iteratees\n * or property names.\n *\n * If a property name is provided for an iteratee the created `_.property`\n * style callback returns the property value of the given element.\n *\n * If an object is provided for an iteratee the created `_.matches` style\n * callback returns `true` for elements that have the properties of the given\n * object, else `false`.\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object|string} collection The collection to iterate over.\n * @param {...(Function|Function[]|Object|Object[]|string|string[])} iteratees\n * The iteratees to sort by, specified as individual values or arrays of values.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 42 },\n * { 'user': 'barney', 'age': 34 }\n * ];\n *\n * _.map(_.sortByAll(users, ['user', 'age']), _.values);\n * // => [['barney', 34], ['barney', 36], ['fred', 42], ['fred', 48]]\n *\n * _.map(_.sortByAll(users, 'user', function(chr) {\n * return Math.floor(chr.age / 10);\n * }), _.values);\n * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]\n */\n var sortByAll = (0, _lodashFunctionRestParam['default'])(function (collection, iteratees) {\n if (collection == null) {\n return [];\n }\n var guard = iteratees[2];\n if (guard && (0, _lodashInternalIsIterateeCall['default'])(iteratees[0], iteratees[1], guard)) {\n iteratees.length = 1;\n }\n return (0, _lodashInternalBaseSortByOrder['default'])(collection, (0, _lodashInternalBaseFlatten['default'])(iteratees), []);\n });\n\n exports['default'] = sortByAll;\n});","define('lodash/collection/sortByOrder', ['exports', 'lodash/internal/baseSortByOrder', 'lodash/lang/isArray', 'lodash/internal/isIterateeCall'], function (exports, _lodashInternalBaseSortByOrder, _lodashLangIsArray, _lodashInternalIsIterateeCall) {\n 'use strict';\n\n /**\n * This method is like `_.sortByAll` except that it allows specifying the\n * sort orders of the iteratees to sort by. If `orders` is unspecified, all\n * values are sorted in ascending order. Otherwise, a value is sorted in\n * ascending order if its corresponding order is \"asc\", and descending if \"desc\".\n *\n * If a property name is provided for an iteratee the created `_.property`\n * style callback returns the property value of the given element.\n *\n * If an object is provided for an iteratee the created `_.matches` style\n * callback returns `true` for elements that have the properties of the given\n * object, else `false`.\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object|string} collection The collection to iterate over.\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n * @param {boolean[]} [orders] The sort orders of `iteratees`.\n * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 34 },\n * { 'user': 'fred', 'age': 42 },\n * { 'user': 'barney', 'age': 36 }\n * ];\n *\n * // sort by `user` in ascending order and by `age` in descending order\n * _.map(_.sortByOrder(users, ['user', 'age'], ['asc', 'desc']), _.values);\n * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]\n */\n function sortByOrder(collection, iteratees, orders, guard) {\n if (collection == null) {\n return [];\n }\n if (guard && (0, _lodashInternalIsIterateeCall['default'])(iteratees, orders, guard)) {\n orders = undefined;\n }\n if (!(0, _lodashLangIsArray['default'])(iteratees)) {\n iteratees = iteratees == null ? [] : [iteratees];\n }\n if (!(0, _lodashLangIsArray['default'])(orders)) {\n orders = orders == null ? [] : [orders];\n }\n return (0, _lodashInternalBaseSortByOrder['default'])(collection, iteratees, orders);\n }\n\n exports['default'] = sortByOrder;\n});","define('lodash/collection/sum', ['exports', 'lodash/math/sum'], function (exports, _lodashMathSum) {\n 'use strict';\n\n exports['default'] = _lodashMathSum['default'];\n});","define('lodash/collection/where', ['exports', 'lodash/internal/baseMatches', 'lodash/collection/filter'], function (exports, _lodashInternalBaseMatches, _lodashCollectionFilter) {\n 'use strict';\n\n /**\n * Performs a deep comparison between each element in `collection` and the\n * source object, returning an array of all elements that have equivalent\n * property values.\n *\n * **Note:** This method supports comparing arrays, booleans, `Date` objects,\n * numbers, `Object` objects, regexes, and strings. Objects are compared by\n * their own, not inherited, enumerable properties. For comparing a single\n * own or inherited property value see `_.matchesProperty`.\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object|string} collection The collection to search.\n * @param {Object} source The object of property values to match.\n * @returns {Array} Returns the new filtered array.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false, 'pets': ['hoppy'] },\n * { 'user': 'fred', 'age': 40, 'active': true, 'pets': ['baby puss', 'dino'] }\n * ];\n *\n * _.pluck(_.where(users, { 'age': 36, 'active': false }), 'user');\n * // => ['barney']\n *\n * _.pluck(_.where(users, { 'pets': ['dino'] }), 'user');\n * // => ['fred']\n */\n function where(collection, source) {\n return (0, _lodashCollectionFilter['default'])(collection, (0, _lodashInternalBaseMatches['default'])(source));\n }\n\n exports['default'] = where;\n});","define('lodash/collection', ['exports', 'lodash/collection/all', 'lodash/collection/any', 'lodash/collection/at', 'lodash/collection/collect', 'lodash/collection/contains', 'lodash/collection/countBy', 'lodash/collection/detect', 'lodash/collection/each', 'lodash/collection/eachRight', 'lodash/collection/every', 'lodash/collection/filter', 'lodash/collection/find', 'lodash/collection/findLast', 'lodash/collection/findWhere', 'lodash/collection/foldl', 'lodash/collection/foldr', 'lodash/collection/forEach', 'lodash/collection/forEachRight', 'lodash/collection/groupBy', 'lodash/collection/include', 'lodash/collection/includes', 'lodash/collection/indexBy', 'lodash/collection/inject', 'lodash/collection/invoke', 'lodash/collection/map', 'lodash/math/max', 'lodash/math/min', 'lodash/collection/partition', 'lodash/collection/pluck', 'lodash/collection/reduce', 'lodash/collection/reduceRight', 'lodash/collection/reject', 'lodash/collection/sample', 'lodash/collection/select', 'lodash/collection/shuffle', 'lodash/collection/size', 'lodash/collection/some', 'lodash/collection/sortBy', 'lodash/collection/sortByAll', 'lodash/collection/sortByOrder', 'lodash/math/sum', 'lodash/collection/where'], function (exports, _lodashCollectionAll, _lodashCollectionAny, _lodashCollectionAt, _lodashCollectionCollect, _lodashCollectionContains, _lodashCollectionCountBy, _lodashCollectionDetect, _lodashCollectionEach, _lodashCollectionEachRight, _lodashCollectionEvery, _lodashCollectionFilter, _lodashCollectionFind, _lodashCollectionFindLast, _lodashCollectionFindWhere, _lodashCollectionFoldl, _lodashCollectionFoldr, _lodashCollectionForEach, _lodashCollectionForEachRight, _lodashCollectionGroupBy, _lodashCollectionInclude, _lodashCollectionIncludes, _lodashCollectionIndexBy, _lodashCollectionInject, _lodashCollectionInvoke, _lodashCollectionMap, _lodashMathMax, _lodashMathMin, _lodashCollectionPartition, _lodashCollectionPluck, _lodashCollectionReduce, _lodashCollectionReduceRight, _lodashCollectionReject, _lodashCollectionSample, _lodashCollectionSelect, _lodashCollectionShuffle, _lodashCollectionSize, _lodashCollectionSome, _lodashCollectionSortBy, _lodashCollectionSortByAll, _lodashCollectionSortByOrder, _lodashMathSum, _lodashCollectionWhere) {\n 'use strict';\n\n exports['default'] = {\n 'all': _lodashCollectionAll['default'],\n 'any': _lodashCollectionAny['default'],\n 'at': _lodashCollectionAt['default'],\n 'collect': _lodashCollectionCollect['default'],\n 'contains': _lodashCollectionContains['default'],\n 'countBy': _lodashCollectionCountBy['default'],\n 'detect': _lodashCollectionDetect['default'],\n 'each': _lodashCollectionEach['default'],\n 'eachRight': _lodashCollectionEachRight['default'],\n 'every': _lodashCollectionEvery['default'],\n 'filter': _lodashCollectionFilter['default'],\n 'find': _lodashCollectionFind['default'],\n 'findLast': _lodashCollectionFindLast['default'],\n 'findWhere': _lodashCollectionFindWhere['default'],\n 'foldl': _lodashCollectionFoldl['default'],\n 'foldr': _lodashCollectionFoldr['default'],\n 'forEach': _lodashCollectionForEach['default'],\n 'forEachRight': _lodashCollectionForEachRight['default'],\n 'groupBy': _lodashCollectionGroupBy['default'],\n 'include': _lodashCollectionInclude['default'],\n 'includes': _lodashCollectionIncludes['default'],\n 'indexBy': _lodashCollectionIndexBy['default'],\n 'inject': _lodashCollectionInject['default'],\n 'invoke': _lodashCollectionInvoke['default'],\n 'map': _lodashCollectionMap['default'],\n 'max': _lodashMathMax['default'],\n 'min': _lodashMathMin['default'],\n 'partition': _lodashCollectionPartition['default'],\n 'pluck': _lodashCollectionPluck['default'],\n 'reduce': _lodashCollectionReduce['default'],\n 'reduceRight': _lodashCollectionReduceRight['default'],\n 'reject': _lodashCollectionReject['default'],\n 'sample': _lodashCollectionSample['default'],\n 'select': _lodashCollectionSelect['default'],\n 'shuffle': _lodashCollectionShuffle['default'],\n 'size': _lodashCollectionSize['default'],\n 'some': _lodashCollectionSome['default'],\n 'sortBy': _lodashCollectionSortBy['default'],\n 'sortByAll': _lodashCollectionSortByAll['default'],\n 'sortByOrder': _lodashCollectionSortByOrder['default'],\n 'sum': _lodashMathSum['default'],\n 'where': _lodashCollectionWhere['default']\n };\n});","define('lodash/date/now', ['exports', 'lodash/internal/getNative'], function (exports, _lodashInternalGetNative) {\n 'use strict';\n\n /* Native method references for those with the same name as other `lodash` methods. */\n var nativeNow = (0, _lodashInternalGetNative['default'])(Date, 'now');\n\n /**\n * Gets the number of milliseconds that have elapsed since the Unix epoch\n * (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @category Date\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => logs the number of milliseconds it took for the deferred function to be invoked\n */\n var now = nativeNow || function () {\n return new Date().getTime();\n };\n\n exports['default'] = now;\n});","define('lodash/date', ['exports', 'lodash/date/now'], function (exports, _lodashDateNow) {\n 'use strict';\n\n exports['default'] = {\n 'now': _lodashDateNow['default']\n };\n});","define('lodash/function/after', ['exports', 'lodash/internal/root'], function (exports, _lodashInternalRoot) {\n 'use strict';\n\n /** Used as the `TypeError` message for \"Functions\" methods. */\n var FUNC_ERROR_TEXT = 'Expected a function';\n\n /* Native method references for those with the same name as other `lodash` methods. */\n var nativeIsFinite = _lodashInternalRoot['default'].isFinite;\n\n /**\n * The opposite of `_.before`; this method creates a function that invokes\n * `func` once it's called `n` or more times.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {number} n The number of calls before `func` is invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var saves = ['profile', 'settings'];\n *\n * var done = _.after(saves.length, function() {\n * console.log('done saving!');\n * });\n *\n * _.forEach(saves, function(type) {\n * asyncSave({ 'type': type, 'complete': done });\n * });\n * // => logs 'done saving!' after the two async saves have completed\n */\n function after(n, func) {\n if (typeof func != 'function') {\n if (typeof n == 'function') {\n var temp = n;\n n = func;\n func = temp;\n } else {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n }\n n = nativeIsFinite(n = +n) ? n : 0;\n return function () {\n if (--n < 1) {\n return func.apply(this, arguments);\n }\n };\n }\n\n exports['default'] = after;\n});","define('lodash/function/ary', ['exports', 'lodash/internal/createWrapper', 'lodash/internal/isIterateeCall'], function (exports, _lodashInternalCreateWrapper, _lodashInternalIsIterateeCall) {\n 'use strict';\n\n /** Used to compose bitmasks for wrapper metadata. */\n var ARY_FLAG = 128;\n\n /* Native method references for those with the same name as other `lodash` methods. */\n var nativeMax = Math.max;\n\n /**\n * Creates a function that accepts up to `n` arguments ignoring any\n * additional arguments.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @param {number} [n=func.length] The arity cap.\n * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.\n * @returns {Function} Returns the new function.\n * @example\n *\n * _.map(['6', '8', '10'], _.ary(parseInt, 1));\n * // => [6, 8, 10]\n */\n function ary(func, n, guard) {\n if (guard && (0, _lodashInternalIsIterateeCall['default'])(func, n, guard)) {\n n = undefined;\n }\n n = func && n == null ? func.length : nativeMax(+n || 0, 0);\n return (0, _lodashInternalCreateWrapper['default'])(func, ARY_FLAG, undefined, undefined, undefined, undefined, n);\n }\n\n exports['default'] = ary;\n});","define('lodash/function/backflow', ['exports', 'lodash/function/flowRight'], function (exports, _lodashFunctionFlowRight) {\n 'use strict';\n\n exports['default'] = _lodashFunctionFlowRight['default'];\n});","define('lodash/function/before', ['exports'], function (exports) {\n /** Used as the `TypeError` message for \"Functions\" methods. */\n 'use strict';\n\n var FUNC_ERROR_TEXT = 'Expected a function';\n\n /**\n * Creates a function that invokes `func`, with the `this` binding and arguments\n * of the created function, while it's called less than `n` times. Subsequent\n * calls to the created function return the result of the last `func` invocation.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {number} n The number of calls at which `func` is no longer invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * jQuery('#add').on('click', _.before(5, addContactToList));\n * // => allows adding up to 4 contacts to the list\n */\n function before(n, func) {\n var result;\n if (typeof func != 'function') {\n if (typeof n == 'function') {\n var temp = n;\n n = func;\n func = temp;\n } else {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n }\n return function () {\n if (--n > 0) {\n result = func.apply(this, arguments);\n }\n if (n <= 1) {\n func = undefined;\n }\n return result;\n };\n }\n\n exports['default'] = before;\n});","define('lodash/function/bind', ['exports', 'lodash/internal/createWrapper', 'lodash/internal/replaceHolders', 'lodash/function/restParam'], function (exports, _lodashInternalCreateWrapper, _lodashInternalReplaceHolders, _lodashFunctionRestParam) {\n 'use strict';\n\n /** Used to compose bitmasks for wrapper metadata. */\n var BIND_FLAG = 1,\n PARTIAL_FLAG = 32;\n\n /**\n * Creates a function that invokes `func` with the `this` binding of `thisArg`\n * and prepends any additional `_.bind` arguments to those provided to the\n * bound function.\n *\n * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for partially applied arguments.\n *\n * **Note:** Unlike native `Function#bind` this method does not set the \"length\"\n * property of bound functions.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to bind.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * var greet = function(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * };\n *\n * var object = { 'user': 'fred' };\n *\n * var bound = _.bind(greet, object, 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * // using placeholders\n * var bound = _.bind(greet, object, _, '!');\n * bound('hi');\n * // => 'hi fred!'\n */\n var bind = (0, _lodashFunctionRestParam['default'])(function (func, thisArg, partials) {\n var bitmask = BIND_FLAG;\n if (partials.length) {\n var holders = (0, _lodashInternalReplaceHolders['default'])(partials, bind.placeholder);\n bitmask |= PARTIAL_FLAG;\n }\n return (0, _lodashInternalCreateWrapper['default'])(func, bitmask, thisArg, partials, holders);\n });\n\n // Assign default placeholders.\n bind.placeholder = {};\n\n exports['default'] = bind;\n});","define('lodash/function/bindAll', ['exports', 'lodash/internal/baseFlatten', 'lodash/internal/createWrapper', 'lodash/object/functions', 'lodash/function/restParam'], function (exports, _lodashInternalBaseFlatten, _lodashInternalCreateWrapper, _lodashObjectFunctions, _lodashFunctionRestParam) {\n 'use strict';\n\n /** Used to compose bitmasks for wrapper metadata. */\n var BIND_FLAG = 1;\n\n /**\n * Binds methods of an object to the object itself, overwriting the existing\n * method. Method names may be specified as individual arguments or as arrays\n * of method names. If no method names are provided all enumerable function\n * properties, own and inherited, of `object` are bound.\n *\n * **Note:** This method does not set the \"length\" property of bound functions.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Object} object The object to bind and assign the bound methods to.\n * @param {...(string|string[])} [methodNames] The object method names to bind,\n * specified as individual method names or arrays of method names.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var view = {\n * 'label': 'docs',\n * 'onClick': function() {\n * console.log('clicked ' + this.label);\n * }\n * };\n *\n * _.bindAll(view);\n * jQuery('#docs').on('click', view.onClick);\n * // => logs 'clicked docs' when the element is clicked\n */\n var bindAll = (0, _lodashFunctionRestParam['default'])(function (object, methodNames) {\n methodNames = methodNames.length ? (0, _lodashInternalBaseFlatten['default'])(methodNames) : (0, _lodashObjectFunctions['default'])(object);\n\n var index = -1,\n length = methodNames.length;\n\n while (++index < length) {\n var key = methodNames[index];\n object[key] = (0, _lodashInternalCreateWrapper['default'])(object[key], BIND_FLAG, object);\n }\n return object;\n });\n\n exports['default'] = bindAll;\n});","define('lodash/function/bindKey', ['exports', 'lodash/internal/createWrapper', 'lodash/internal/replaceHolders', 'lodash/function/restParam'], function (exports, _lodashInternalCreateWrapper, _lodashInternalReplaceHolders, _lodashFunctionRestParam) {\n 'use strict';\n\n /** Used to compose bitmasks for wrapper metadata. */\n var BIND_FLAG = 1,\n BIND_KEY_FLAG = 2,\n PARTIAL_FLAG = 32;\n\n /**\n * Creates a function that invokes the method at `object[key]` and prepends\n * any additional `_.bindKey` arguments to those provided to the bound function.\n *\n * This method differs from `_.bind` by allowing bound functions to reference\n * methods that may be redefined or don't yet exist.\n * See [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)\n * for more details.\n *\n * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Object} object The object the method belongs to.\n * @param {string} key The key of the method.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * var object = {\n * 'user': 'fred',\n * 'greet': function(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n * };\n *\n * var bound = _.bindKey(object, 'greet', 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * object.greet = function(greeting, punctuation) {\n * return greeting + 'ya ' + this.user + punctuation;\n * };\n *\n * bound('!');\n * // => 'hiya fred!'\n *\n * // using placeholders\n * var bound = _.bindKey(object, 'greet', _, '!');\n * bound('hi');\n * // => 'hiya fred!'\n */\n var bindKey = (0, _lodashFunctionRestParam['default'])(function (object, key, partials) {\n var bitmask = BIND_FLAG | BIND_KEY_FLAG;\n if (partials.length) {\n var holders = (0, _lodashInternalReplaceHolders['default'])(partials, bindKey.placeholder);\n bitmask |= PARTIAL_FLAG;\n }\n return (0, _lodashInternalCreateWrapper['default'])(key, bitmask, object, partials, holders);\n });\n\n // Assign default placeholders.\n bindKey.placeholder = {};\n\n exports['default'] = bindKey;\n});","define('lodash/function/compose', ['exports', 'lodash/function/flowRight'], function (exports, _lodashFunctionFlowRight) {\n 'use strict';\n\n exports['default'] = _lodashFunctionFlowRight['default'];\n});","define('lodash/function/curry', ['exports', 'lodash/internal/createCurry'], function (exports, _lodashInternalCreateCurry) {\n 'use strict';\n\n /** Used to compose bitmasks for wrapper metadata. */\n var CURRY_FLAG = 8;\n\n /**\n * Creates a function that accepts one or more arguments of `func` that when\n * called either invokes `func` returning its result, if all `func` arguments\n * have been provided, or returns a function that accepts one or more of the\n * remaining `func` arguments, and so on. The arity of `func` may be specified\n * if `func.length` is not sufficient.\n *\n * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for provided arguments.\n *\n * **Note:** This method does not set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curry(abc);\n *\n * curried(1)(2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // using placeholders\n * curried(1)(_, 3)(2);\n * // => [1, 2, 3]\n */\n var curry = (0, _lodashInternalCreateCurry['default'])(CURRY_FLAG);\n\n // Assign default placeholders.\n curry.placeholder = {};\n\n exports['default'] = curry;\n});","define('lodash/function/curryRight', ['exports', 'lodash/internal/createCurry'], function (exports, _lodashInternalCreateCurry) {\n 'use strict';\n\n /** Used to compose bitmasks for wrapper metadata. */\n var CURRY_RIGHT_FLAG = 16;\n\n /**\n * This method is like `_.curry` except that arguments are applied to `func`\n * in the manner of `_.partialRight` instead of `_.partial`.\n *\n * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for provided arguments.\n *\n * **Note:** This method does not set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curryRight(abc);\n *\n * curried(3)(2)(1);\n * // => [1, 2, 3]\n *\n * curried(2, 3)(1);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // using placeholders\n * curried(3)(1, _)(2);\n * // => [1, 2, 3]\n */\n var curryRight = (0, _lodashInternalCreateCurry['default'])(CURRY_RIGHT_FLAG);\n\n // Assign default placeholders.\n curryRight.placeholder = {};\n\n exports['default'] = curryRight;\n});","define('lodash/function/debounce', ['exports', 'lodash/lang/isObject', 'lodash/date/now'], function (exports, _lodashLangIsObject, _lodashDateNow) {\n 'use strict';\n\n /** Used as the `TypeError` message for \"Functions\" methods. */\n var FUNC_ERROR_TEXT = 'Expected a function';\n\n /* Native method references for those with the same name as other `lodash` methods. */\n var nativeMax = Math.max;\n\n /**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed invocations. Provide an options object to indicate that `func`\n * should be invoked on the leading and/or trailing edge of the `wait` timeout.\n * Subsequent calls to the debounced function return the result of the last\n * `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked\n * on the trailing edge of the timeout only if the the debounced function is\n * invoked more than once during the `wait` timeout.\n *\n * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options] The options object.\n * @param {boolean} [options.leading=false] Specify invoking on the leading\n * edge of the timeout.\n * @param {number} [options.maxWait] The maximum time `func` is allowed to be\n * delayed before it's invoked.\n * @param {boolean} [options.trailing=true] Specify invoking on the trailing\n * edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // avoid costly calculations while the window size is in flux\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // invoke `sendMail` when the click event is fired, debouncing subsequent calls\n * jQuery('#postbox').on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // ensure `batchLog` is invoked once after 1 second of debounced calls\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', _.debounce(batchLog, 250, {\n * 'maxWait': 1000\n * }));\n *\n * // cancel a debounced call\n * var todoChanges = _.debounce(batchLog, 1000);\n * Object.observe(models.todo, todoChanges);\n *\n * Object.observe(models, function(changes) {\n * if (_.find(changes, { 'user': 'todo', 'type': 'delete'})) {\n * todoChanges.cancel();\n * }\n * }, ['delete']);\n *\n * // ...at some point `models.todo` is changed\n * models.todo.completed = true;\n *\n * // ...before 1 second has passed `models.todo` is deleted\n * // which cancels the debounced `todoChanges` call\n * delete models.todo;\n */\n function debounce(func, wait, options) {\n var args,\n maxTimeoutId,\n result,\n stamp,\n thisArg,\n timeoutId,\n trailingCall,\n lastCalled = 0,\n maxWait = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = wait < 0 ? 0 : +wait || 0;\n if (options === true) {\n var leading = true;\n trailing = false;\n } else if ((0, _lodashLangIsObject['default'])(options)) {\n leading = !!options.leading;\n maxWait = 'maxWait' in options && nativeMax(+options.maxWait || 0, wait);\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function cancel() {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n if (maxTimeoutId) {\n clearTimeout(maxTimeoutId);\n }\n lastCalled = 0;\n maxTimeoutId = timeoutId = trailingCall = undefined;\n }\n\n function complete(isCalled, id) {\n if (id) {\n clearTimeout(id);\n }\n maxTimeoutId = timeoutId = trailingCall = undefined;\n if (isCalled) {\n lastCalled = (0, _lodashDateNow['default'])();\n result = func.apply(thisArg, args);\n if (!timeoutId && !maxTimeoutId) {\n args = thisArg = undefined;\n }\n }\n }\n\n function delayed() {\n var remaining = wait - ((0, _lodashDateNow['default'])() - stamp);\n if (remaining <= 0 || remaining > wait) {\n complete(trailingCall, maxTimeoutId);\n } else {\n timeoutId = setTimeout(delayed, remaining);\n }\n }\n\n function maxDelayed() {\n complete(trailing, timeoutId);\n }\n\n function debounced() {\n args = arguments;\n stamp = (0, _lodashDateNow['default'])();\n thisArg = this;\n trailingCall = trailing && (timeoutId || !leading);\n\n if (maxWait === false) {\n var leadingCall = leading && !timeoutId;\n } else {\n if (!maxTimeoutId && !leading) {\n lastCalled = stamp;\n }\n var remaining = maxWait - (stamp - lastCalled),\n isCalled = remaining <= 0 || remaining > maxWait;\n\n if (isCalled) {\n if (maxTimeoutId) {\n maxTimeoutId = clearTimeout(maxTimeoutId);\n }\n lastCalled = stamp;\n result = func.apply(thisArg, args);\n } else if (!maxTimeoutId) {\n maxTimeoutId = setTimeout(maxDelayed, remaining);\n }\n }\n if (isCalled && timeoutId) {\n timeoutId = clearTimeout(timeoutId);\n } else if (!timeoutId && wait !== maxWait) {\n timeoutId = setTimeout(delayed, wait);\n }\n if (leadingCall) {\n isCalled = true;\n result = func.apply(thisArg, args);\n }\n if (isCalled && !timeoutId && !maxTimeoutId) {\n args = thisArg = undefined;\n }\n return result;\n }\n debounced.cancel = cancel;\n return debounced;\n }\n\n exports['default'] = debounce;\n});","define('lodash/function/defer', ['exports', 'lodash/internal/baseDelay', 'lodash/function/restParam'], function (exports, _lodashInternalBaseDelay, _lodashFunctionRestParam) {\n 'use strict';\n\n /**\n * Defers invoking the `func` until the current call stack has cleared. Any\n * additional arguments are provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to defer.\n * @param {...*} [args] The arguments to invoke the function with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.defer(function(text) {\n * console.log(text);\n * }, 'deferred');\n * // logs 'deferred' after one or more milliseconds\n */\n var defer = (0, _lodashFunctionRestParam['default'])(function (func, args) {\n return (0, _lodashInternalBaseDelay['default'])(func, 1, args);\n });\n\n exports['default'] = defer;\n});","define('lodash/function/delay', ['exports', 'lodash/internal/baseDelay', 'lodash/function/restParam'], function (exports, _lodashInternalBaseDelay, _lodashFunctionRestParam) {\n 'use strict';\n\n /**\n * Invokes `func` after `wait` milliseconds. Any additional arguments are\n * provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {...*} [args] The arguments to invoke the function with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.delay(function(text) {\n * console.log(text);\n * }, 1000, 'later');\n * // => logs 'later' after one second\n */\n var delay = (0, _lodashFunctionRestParam['default'])(function (func, wait, args) {\n return (0, _lodashInternalBaseDelay['default'])(func, wait, args);\n });\n\n exports['default'] = delay;\n});","define('lodash/function/flow', ['exports', 'lodash/internal/createFlow'], function (exports, _lodashInternalCreateFlow) {\n 'use strict';\n\n /**\n * Creates a function that returns the result of invoking the provided\n * functions with the `this` binding of the created function, where each\n * successive invocation is supplied the return value of the previous.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {...Function} [funcs] Functions to invoke.\n * @returns {Function} Returns the new function.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var addSquare = _.flow(_.add, square);\n * addSquare(1, 2);\n * // => 9\n */\n var flow = (0, _lodashInternalCreateFlow['default'])();\n\n exports['default'] = flow;\n});","define('lodash/function/flowRight', ['exports', 'lodash/internal/createFlow'], function (exports, _lodashInternalCreateFlow) {\n 'use strict';\n\n /**\n * This method is like `_.flow` except that it creates a function that\n * invokes the provided functions from right to left.\n *\n * @static\n * @memberOf _\n * @alias backflow, compose\n * @category Function\n * @param {...Function} [funcs] Functions to invoke.\n * @returns {Function} Returns the new function.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var addSquare = _.flowRight(square, _.add);\n * addSquare(1, 2);\n * // => 9\n */\n var flowRight = (0, _lodashInternalCreateFlow['default'])(true);\n\n exports['default'] = flowRight;\n});","define('lodash/function/memoize', ['exports', 'lodash/internal/MapCache'], function (exports, _lodashInternalMapCache) {\n 'use strict';\n\n /** Used as the `TypeError` message for \"Functions\" methods. */\n var FUNC_ERROR_TEXT = 'Expected a function';\n\n /**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is coerced to a string and used as the\n * cache key. The `func` is invoked with the `this` binding of the memoized\n * function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoizing function.\n * @example\n *\n * var upperCase = _.memoize(function(string) {\n * return string.toUpperCase();\n * });\n *\n * upperCase('fred');\n * // => 'FRED'\n *\n * // modifying the result cache\n * upperCase.cache.set('fred', 'BARNEY');\n * upperCase('fred');\n * // => 'BARNEY'\n *\n * // replacing `_.memoize.Cache`\n * var object = { 'user': 'fred' };\n * var other = { 'user': 'barney' };\n * var identity = _.memoize(_.identity);\n *\n * identity(object);\n * // => { 'user': 'fred' }\n * identity(other);\n * // => { 'user': 'fred' }\n *\n * _.memoize.Cache = WeakMap;\n * var identity = _.memoize(_.identity);\n *\n * identity(object);\n * // => { 'user': 'fred' }\n * identity(other);\n * // => { 'user': 'barney' }\n */\n function memoize(func, resolver) {\n if (typeof func != 'function' || resolver && typeof resolver != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function memoized() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result);\n return result;\n };\n memoized.cache = new memoize.Cache();\n return memoized;\n }\n\n // Assign cache to `_.memoize`.\n memoize.Cache = _lodashInternalMapCache['default'];\n\n exports['default'] = memoize;\n});","define('lodash/function/modArgs', ['exports', 'lodash/internal/arrayEvery', 'lodash/internal/baseFlatten', 'lodash/internal/baseIsFunction', 'lodash/function/restParam'], function (exports, _lodashInternalArrayEvery, _lodashInternalBaseFlatten, _lodashInternalBaseIsFunction, _lodashFunctionRestParam) {\n 'use strict';\n\n /** Used as the `TypeError` message for \"Functions\" methods. */\n var FUNC_ERROR_TEXT = 'Expected a function';\n\n /* Native method references for those with the same name as other `lodash` methods. */\n var nativeMin = Math.min;\n\n /**\n * Creates a function that runs each argument through a corresponding\n * transform function.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to wrap.\n * @param {...(Function|Function[])} [transforms] The functions to transform\n * arguments, specified as individual functions or arrays of functions.\n * @returns {Function} Returns the new function.\n * @example\n *\n * function doubled(n) {\n * return n * 2;\n * }\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var modded = _.modArgs(function(x, y) {\n * return [x, y];\n * }, square, doubled);\n *\n * modded(1, 2);\n * // => [1, 4]\n *\n * modded(5, 10);\n * // => [25, 20]\n */\n var modArgs = (0, _lodashFunctionRestParam['default'])(function (func, transforms) {\n transforms = (0, _lodashInternalBaseFlatten['default'])(transforms);\n if (typeof func != 'function' || !(0, _lodashInternalArrayEvery['default'])(transforms, _lodashInternalBaseIsFunction['default'])) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var length = transforms.length;\n return (0, _lodashFunctionRestParam['default'])(function (args) {\n var index = nativeMin(args.length, length);\n while (index--) {\n args[index] = transforms[index](args[index]);\n }\n return func.apply(this, args);\n });\n });\n\n exports['default'] = modArgs;\n});","define('lodash/function/negate', ['exports'], function (exports) {\n /** Used as the `TypeError` message for \"Functions\" methods. */\n 'use strict';\n\n var FUNC_ERROR_TEXT = 'Expected a function';\n\n /**\n * Creates a function that negates the result of the predicate `func`. The\n * `func` predicate is invoked with the `this` binding and arguments of the\n * created function.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} predicate The predicate to negate.\n * @returns {Function} Returns the new function.\n * @example\n *\n * function isEven(n) {\n * return n % 2 == 0;\n * }\n *\n * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\n * // => [1, 3, 5]\n */\n function negate(predicate) {\n if (typeof predicate != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return function () {\n return !predicate.apply(this, arguments);\n };\n }\n\n exports['default'] = negate;\n});","define('lodash/function/once', ['exports', 'lodash/function/before'], function (exports, _lodashFunctionBefore) {\n 'use strict';\n\n /**\n * Creates a function that is restricted to invoking `func` once. Repeat calls\n * to the function return the value of the first call. The `func` is invoked\n * with the `this` binding and arguments of the created function.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var initialize = _.once(createApplication);\n * initialize();\n * initialize();\n * // `initialize` invokes `createApplication` once\n */\n function once(func) {\n return (0, _lodashFunctionBefore['default'])(2, func);\n }\n\n exports['default'] = once;\n});","define('lodash/function/partial', ['exports', 'lodash/internal/createPartial'], function (exports, _lodashInternalCreatePartial) {\n 'use strict';\n\n /** Used to compose bitmasks for wrapper metadata. */\n var PARTIAL_FLAG = 32;\n\n /**\n * Creates a function that invokes `func` with `partial` arguments prepended\n * to those provided to the new function. This method is like `_.bind` except\n * it does **not** alter the `this` binding.\n *\n * The `_.partial.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method does not set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * var greet = function(greeting, name) {\n * return greeting + ' ' + name;\n * };\n *\n * var sayHelloTo = _.partial(greet, 'hello');\n * sayHelloTo('fred');\n * // => 'hello fred'\n *\n * // using placeholders\n * var greetFred = _.partial(greet, _, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n */\n var partial = (0, _lodashInternalCreatePartial['default'])(PARTIAL_FLAG);\n\n // Assign default placeholders.\n partial.placeholder = {};\n\n exports['default'] = partial;\n});","define('lodash/function/partialRight', ['exports', 'lodash/internal/createPartial'], function (exports, _lodashInternalCreatePartial) {\n 'use strict';\n\n /** Used to compose bitmasks for wrapper metadata. */\n var PARTIAL_RIGHT_FLAG = 64;\n\n /**\n * This method is like `_.partial` except that partially applied arguments\n * are appended to those provided to the new function.\n *\n * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method does not set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * var greet = function(greeting, name) {\n * return greeting + ' ' + name;\n * };\n *\n * var greetFred = _.partialRight(greet, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n *\n * // using placeholders\n * var sayHelloTo = _.partialRight(greet, 'hello', _);\n * sayHelloTo('fred');\n * // => 'hello fred'\n */\n var partialRight = (0, _lodashInternalCreatePartial['default'])(PARTIAL_RIGHT_FLAG);\n\n // Assign default placeholders.\n partialRight.placeholder = {};\n\n exports['default'] = partialRight;\n});","define('lodash/function/rearg', ['exports', 'lodash/internal/baseFlatten', 'lodash/internal/createWrapper', 'lodash/function/restParam'], function (exports, _lodashInternalBaseFlatten, _lodashInternalCreateWrapper, _lodashFunctionRestParam) {\n 'use strict';\n\n /** Used to compose bitmasks for wrapper metadata. */\n var REARG_FLAG = 256;\n\n /**\n * Creates a function that invokes `func` with arguments arranged according\n * to the specified indexes where the argument value at the first index is\n * provided as the first argument, the argument value at the second index is\n * provided as the second argument, and so on.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to rearrange arguments for.\n * @param {...(number|number[])} indexes The arranged argument indexes,\n * specified as individual indexes or arrays of indexes.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var rearged = _.rearg(function(a, b, c) {\n * return [a, b, c];\n * }, 2, 0, 1);\n *\n * rearged('b', 'c', 'a')\n * // => ['a', 'b', 'c']\n *\n * var map = _.rearg(_.map, [1, 0]);\n * map(function(n) {\n * return n * 3;\n * }, [1, 2, 3]);\n * // => [3, 6, 9]\n */\n var rearg = (0, _lodashFunctionRestParam['default'])(function (func, indexes) {\n return (0, _lodashInternalCreateWrapper['default'])(func, REARG_FLAG, undefined, undefined, undefined, (0, _lodashInternalBaseFlatten['default'])(indexes));\n });\n\n exports['default'] = rearg;\n});","define('lodash/function/restParam', ['exports'], function (exports) {\n /** Used as the `TypeError` message for \"Functions\" methods. */\n 'use strict';\n\n var FUNC_ERROR_TEXT = 'Expected a function';\n\n /* Native method references for those with the same name as other `lodash` methods. */\n var nativeMax = Math.max;\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * created function and arguments from `start` and beyond provided as an array.\n *\n * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/Web/JavaScript/Reference/Functions/rest_parameters).\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.restParam(function(what, names) {\n * return what + ' ' + _.initial(names).join(', ') +\n * (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n * });\n *\n * say('hello', 'fred', 'barney', 'pebbles');\n * // => 'hello fred, barney, & pebbles'\n */\n function restParam(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = nativeMax(start === undefined ? func.length - 1 : +start || 0, 0);\n return function () {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n rest = Array(length);\n\n while (++index < length) {\n rest[index] = args[start + index];\n }\n switch (start) {\n case 0:\n return func.call(this, rest);\n case 1:\n return func.call(this, args[0], rest);\n case 2:\n return func.call(this, args[0], args[1], rest);\n }\n var otherArgs = Array(start + 1);\n index = -1;\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = rest;\n return func.apply(this, otherArgs);\n };\n }\n\n exports['default'] = restParam;\n});","define('lodash/function/spread', ['exports'], function (exports) {\n /** Used as the `TypeError` message for \"Functions\" methods. */\n 'use strict';\n\n var FUNC_ERROR_TEXT = 'Expected a function';\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the created\n * function and an array of arguments much like [`Function#apply`](https://es5.github.io/#x15.3.4.3).\n *\n * **Note:** This method is based on the [spread operator](https://developer.mozilla.org/Web/JavaScript/Reference/Operators/Spread_operator).\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to spread arguments over.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.spread(function(who, what) {\n * return who + ' says ' + what;\n * });\n *\n * say(['fred', 'hello']);\n * // => 'fred says hello'\n *\n * // with a Promise\n * var numbers = Promise.all([\n * Promise.resolve(40),\n * Promise.resolve(36)\n * ]);\n *\n * numbers.then(_.spread(function(x, y) {\n * return x + y;\n * }));\n * // => a Promise of 76\n */\n function spread(func) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return function (array) {\n return func.apply(this, array);\n };\n }\n\n exports['default'] = spread;\n});","define('lodash/function/throttle', ['exports', 'lodash/function/debounce', 'lodash/lang/isObject'], function (exports, _lodashFunctionDebounce, _lodashLangIsObject) {\n 'use strict';\n\n /** Used as the `TypeError` message for \"Functions\" methods. */\n var FUNC_ERROR_TEXT = 'Expected a function';\n\n /**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed invocations. Provide an options object to indicate\n * that `func` should be invoked on the leading and/or trailing edge of the\n * `wait` timeout. Subsequent calls to the throttled function return the\n * result of the last `func` call.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked\n * on the trailing edge of the timeout only if the the throttled function is\n * invoked more than once during the `wait` timeout.\n *\n * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options] The options object.\n * @param {boolean} [options.leading=true] Specify invoking on the leading\n * edge of the timeout.\n * @param {boolean} [options.trailing=true] Specify invoking on the trailing\n * edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // avoid excessively updating the position while scrolling\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // invoke `renewToken` when the click event is fired, but not more than once every 5 minutes\n * jQuery('.interactive').on('click', _.throttle(renewToken, 300000, {\n * 'trailing': false\n * }));\n *\n * // cancel a trailing throttled call\n * jQuery(window).on('popstate', throttled.cancel);\n */\n function throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (options === false) {\n leading = false;\n } else if ((0, _lodashLangIsObject['default'])(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return (0, _lodashFunctionDebounce['default'])(func, wait, { 'leading': leading, 'maxWait': +wait, 'trailing': trailing });\n }\n\n exports['default'] = throttle;\n});","define('lodash/function/wrap', ['exports', 'lodash/internal/createWrapper', 'lodash/utility/identity'], function (exports, _lodashInternalCreateWrapper, _lodashUtilityIdentity) {\n 'use strict';\n\n /** Used to compose bitmasks for wrapper metadata. */\n var PARTIAL_FLAG = 32;\n\n /**\n * Creates a function that provides `value` to the wrapper function as its\n * first argument. Any additional arguments provided to the function are\n * appended to those provided to the wrapper function. The wrapper is invoked\n * with the `this` binding of the created function.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {*} value The value to wrap.\n * @param {Function} wrapper The wrapper function.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var p = _.wrap(_.escape, function(func, text) {\n * return '' + func(text) + '';\n * });\n *\n * p('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles'\n */\n function wrap(value, wrapper) {\n wrapper = wrapper == null ? _lodashUtilityIdentity['default'] : wrapper;\n return (0, _lodashInternalCreateWrapper['default'])(wrapper, PARTIAL_FLAG, undefined, [value], []);\n }\n\n exports['default'] = wrap;\n});","define('lodash/function', ['exports', 'lodash/function/after', 'lodash/function/ary', 'lodash/function/backflow', 'lodash/function/before', 'lodash/function/bind', 'lodash/function/bindAll', 'lodash/function/bindKey', 'lodash/function/compose', 'lodash/function/curry', 'lodash/function/curryRight', 'lodash/function/debounce', 'lodash/function/defer', 'lodash/function/delay', 'lodash/function/flow', 'lodash/function/flowRight', 'lodash/function/memoize', 'lodash/function/modArgs', 'lodash/function/negate', 'lodash/function/once', 'lodash/function/partial', 'lodash/function/partialRight', 'lodash/function/rearg', 'lodash/function/restParam', 'lodash/function/spread', 'lodash/function/throttle', 'lodash/function/wrap'], function (exports, _lodashFunctionAfter, _lodashFunctionAry, _lodashFunctionBackflow, _lodashFunctionBefore, _lodashFunctionBind, _lodashFunctionBindAll, _lodashFunctionBindKey, _lodashFunctionCompose, _lodashFunctionCurry, _lodashFunctionCurryRight, _lodashFunctionDebounce, _lodashFunctionDefer, _lodashFunctionDelay, _lodashFunctionFlow, _lodashFunctionFlowRight, _lodashFunctionMemoize, _lodashFunctionModArgs, _lodashFunctionNegate, _lodashFunctionOnce, _lodashFunctionPartial, _lodashFunctionPartialRight, _lodashFunctionRearg, _lodashFunctionRestParam, _lodashFunctionSpread, _lodashFunctionThrottle, _lodashFunctionWrap) {\n 'use strict';\n\n exports['default'] = {\n 'after': _lodashFunctionAfter['default'],\n 'ary': _lodashFunctionAry['default'],\n 'backflow': _lodashFunctionBackflow['default'],\n 'before': _lodashFunctionBefore['default'],\n 'bind': _lodashFunctionBind['default'],\n 'bindAll': _lodashFunctionBindAll['default'],\n 'bindKey': _lodashFunctionBindKey['default'],\n 'compose': _lodashFunctionCompose['default'],\n 'curry': _lodashFunctionCurry['default'],\n 'curryRight': _lodashFunctionCurryRight['default'],\n 'debounce': _lodashFunctionDebounce['default'],\n 'defer': _lodashFunctionDefer['default'],\n 'delay': _lodashFunctionDelay['default'],\n 'flow': _lodashFunctionFlow['default'],\n 'flowRight': _lodashFunctionFlowRight['default'],\n 'memoize': _lodashFunctionMemoize['default'],\n 'modArgs': _lodashFunctionModArgs['default'],\n 'negate': _lodashFunctionNegate['default'],\n 'once': _lodashFunctionOnce['default'],\n 'partial': _lodashFunctionPartial['default'],\n 'partialRight': _lodashFunctionPartialRight['default'],\n 'rearg': _lodashFunctionRearg['default'],\n 'restParam': _lodashFunctionRestParam['default'],\n 'spread': _lodashFunctionSpread['default'],\n 'throttle': _lodashFunctionThrottle['default'],\n 'wrap': _lodashFunctionWrap['default']\n };\n});","define('lodash/index', ['exports', 'lodash/lodash'], function (exports, _lodashLodash) {\n 'use strict';\n\n exports['default'] = _lodashLodash['default'];\n});","define('lodash/internal/LazyWrapper', ['exports', 'lodash/internal/baseCreate', 'lodash/internal/baseLodash'], function (exports, _lodashInternalBaseCreate, _lodashInternalBaseLodash) {\n 'use strict';\n\n /** Used as references for `-Infinity` and `Infinity`. */\n var POSITIVE_INFINITY = Number.POSITIVE_INFINITY;\n\n /**\n * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n *\n * @private\n * @param {*} value The value to wrap.\n */\n function LazyWrapper(value) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__dir__ = 1;\n this.__filtered__ = false;\n this.__iteratees__ = [];\n this.__takeCount__ = POSITIVE_INFINITY;\n this.__views__ = [];\n }\n\n LazyWrapper.prototype = (0, _lodashInternalBaseCreate['default'])(_lodashInternalBaseLodash['default'].prototype);\n LazyWrapper.prototype.constructor = LazyWrapper;\n\n exports['default'] = LazyWrapper;\n});","define('lodash/internal/LodashWrapper', ['exports', 'lodash/internal/baseCreate', 'lodash/internal/baseLodash'], function (exports, _lodashInternalBaseCreate, _lodashInternalBaseLodash) {\n 'use strict';\n\n /**\n * The base constructor for creating `lodash` wrapper objects.\n *\n * @private\n * @param {*} value The value to wrap.\n * @param {boolean} [chainAll] Enable chaining for all wrapper methods.\n * @param {Array} [actions=[]] Actions to peform to resolve the unwrapped value.\n */\n function LodashWrapper(value, chainAll, actions) {\n this.__wrapped__ = value;\n this.__actions__ = actions || [];\n this.__chain__ = !!chainAll;\n }\n\n LodashWrapper.prototype = (0, _lodashInternalBaseCreate['default'])(_lodashInternalBaseLodash['default'].prototype);\n LodashWrapper.prototype.constructor = LodashWrapper;\n\n exports['default'] = LodashWrapper;\n});","define('lodash/internal/MapCache', ['exports', 'lodash/internal/mapDelete', 'lodash/internal/mapGet', 'lodash/internal/mapHas', 'lodash/internal/mapSet'], function (exports, _lodashInternalMapDelete, _lodashInternalMapGet, _lodashInternalMapHas, _lodashInternalMapSet) {\n 'use strict';\n\n /**\n * Creates a cache object to store key/value pairs.\n *\n * @private\n * @static\n * @name Cache\n * @memberOf _.memoize\n */\n function MapCache() {\n this.__data__ = {};\n }\n\n // Add functions to the `Map` cache.\n MapCache.prototype['delete'] = _lodashInternalMapDelete['default'];\n MapCache.prototype.get = _lodashInternalMapGet['default'];\n MapCache.prototype.has = _lodashInternalMapHas['default'];\n MapCache.prototype.set = _lodashInternalMapSet['default'];\n\n exports['default'] = MapCache;\n});","define('lodash/internal/SetCache', ['exports', 'lodash/internal/cachePush', 'lodash/internal/getNative', 'lodash/internal/root'], function (exports, _lodashInternalCachePush, _lodashInternalGetNative, _lodashInternalRoot) {\n 'use strict';\n\n /** Native method references. */\n var Set = (0, _lodashInternalGetNative['default'])(_lodashInternalRoot['default'], 'Set');\n\n /* Native method references for those with the same name as other `lodash` methods. */\n var nativeCreate = (0, _lodashInternalGetNative['default'])(Object, 'create');\n\n /**\n *\n * Creates a cache object to store unique values.\n *\n * @private\n * @param {Array} [values] The values to cache.\n */\n function SetCache(values) {\n var length = values ? values.length : 0;\n\n this.data = { 'hash': nativeCreate(null), 'set': new Set() };\n while (length--) {\n this.push(values[length]);\n }\n }\n\n // Add functions to the `Set` cache.\n SetCache.prototype.push = _lodashInternalCachePush['default'];\n\n exports['default'] = SetCache;\n});","define(\"lodash/internal/arrayConcat\", [\"exports\"], function (exports) {\n /**\n * Creates a new array joining `array` with `other`.\n *\n * @private\n * @param {Array} array The array to join.\n * @param {Array} other The other array to join.\n * @returns {Array} Returns the new concatenated array.\n */\n \"use strict\";\n\n function arrayConcat(array, other) {\n var index = -1,\n length = array.length,\n othIndex = -1,\n othLength = other.length,\n result = Array(length + othLength);\n\n while (++index < length) {\n result[index] = array[index];\n }\n while (++othIndex < othLength) {\n result[index++] = other[othIndex];\n }\n return result;\n }\n\n exports[\"default\"] = arrayConcat;\n});","define(\"lodash/internal/arrayCopy\", [\"exports\"], function (exports) {\n /**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\n \"use strict\";\n\n function arrayCopy(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n }\n\n exports[\"default\"] = arrayCopy;\n});","define(\"lodash/internal/arrayEach\", [\"exports\"], function (exports) {\n /**\n * A specialized version of `_.forEach` for arrays without support for callback\n * shorthands and `this` binding.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n \"use strict\";\n\n function arrayEach(array, iteratee) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n }\n\n exports[\"default\"] = arrayEach;\n});","define(\"lodash/internal/arrayEachRight\", [\"exports\"], function (exports) {\n /**\n * A specialized version of `_.forEachRight` for arrays without support for\n * callback shorthands and `this` binding.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n \"use strict\";\n\n function arrayEachRight(array, iteratee) {\n var length = array.length;\n\n while (length--) {\n if (iteratee(array[length], length, array) === false) {\n break;\n }\n }\n return array;\n }\n\n exports[\"default\"] = arrayEachRight;\n});","define(\"lodash/internal/arrayEvery\", [\"exports\"], function (exports) {\n /**\n * A specialized version of `_.every` for arrays without support for callback\n * shorthands and `this` binding.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n */\n \"use strict\";\n\n function arrayEvery(array, predicate) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n if (!predicate(array[index], index, array)) {\n return false;\n }\n }\n return true;\n }\n\n exports[\"default\"] = arrayEvery;\n});","define(\"lodash/internal/arrayExtremum\", [\"exports\"], function (exports) {\n /**\n * A specialized version of `baseExtremum` for arrays which invokes `iteratee`\n * with one argument: (value).\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} comparator The function used to compare values.\n * @param {*} exValue The initial extremum value.\n * @returns {*} Returns the extremum value.\n */\n \"use strict\";\n\n function arrayExtremum(array, iteratee, comparator, exValue) {\n var index = -1,\n length = array.length,\n computed = exValue,\n result = computed;\n\n while (++index < length) {\n var value = array[index],\n current = +iteratee(value);\n\n if (comparator(current, computed)) {\n computed = current;\n result = value;\n }\n }\n return result;\n }\n\n exports[\"default\"] = arrayExtremum;\n});","define(\"lodash/internal/arrayFilter\", [\"exports\"], function (exports) {\n /**\n * A specialized version of `_.filter` for arrays without support for callback\n * shorthands and `this` binding.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n \"use strict\";\n\n function arrayFilter(array, predicate) {\n var index = -1,\n length = array.length,\n resIndex = -1,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[++resIndex] = value;\n }\n }\n return result;\n }\n\n exports[\"default\"] = arrayFilter;\n});","define(\"lodash/internal/arrayMap\", [\"exports\"], function (exports) {\n /**\n * A specialized version of `_.map` for arrays without support for callback\n * shorthands and `this` binding.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n \"use strict\";\n\n function arrayMap(array, iteratee) {\n var index = -1,\n length = array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n }\n\n exports[\"default\"] = arrayMap;\n});","define(\"lodash/internal/arrayPush\", [\"exports\"], function (exports) {\n /**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\n \"use strict\";\n\n function arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n }\n\n exports[\"default\"] = arrayPush;\n});","define(\"lodash/internal/arrayReduce\", [\"exports\"], function (exports) {\n /**\n * A specialized version of `_.reduce` for arrays without support for callback\n * shorthands and `this` binding.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initFromArray] Specify using the first element of `array`\n * as the initial value.\n * @returns {*} Returns the accumulated value.\n */\n \"use strict\";\n\n function arrayReduce(array, iteratee, accumulator, initFromArray) {\n var index = -1,\n length = array.length;\n\n if (initFromArray && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n }\n\n exports[\"default\"] = arrayReduce;\n});","define(\"lodash/internal/arrayReduceRight\", [\"exports\"], function (exports) {\n /**\n * A specialized version of `_.reduceRight` for arrays without support for\n * callback shorthands and `this` binding.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initFromArray] Specify using the last element of `array`\n * as the initial value.\n * @returns {*} Returns the accumulated value.\n */\n \"use strict\";\n\n function arrayReduceRight(array, iteratee, accumulator, initFromArray) {\n var length = array.length;\n if (initFromArray && length) {\n accumulator = array[--length];\n }\n while (length--) {\n accumulator = iteratee(accumulator, array[length], length, array);\n }\n return accumulator;\n }\n\n exports[\"default\"] = arrayReduceRight;\n});","define(\"lodash/internal/arraySome\", [\"exports\"], function (exports) {\n /**\n * A specialized version of `_.some` for arrays without support for callback\n * shorthands and `this` binding.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\n \"use strict\";\n\n function arraySome(array, predicate) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n }\n\n exports[\"default\"] = arraySome;\n});","define(\"lodash/internal/arraySum\", [\"exports\"], function (exports) {\n /**\n * A specialized version of `_.sum` for arrays without support for callback\n * shorthands and `this` binding..\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the sum.\n */\n \"use strict\";\n\n function arraySum(array, iteratee) {\n var length = array.length,\n result = 0;\n\n while (length--) {\n result += +iteratee(array[length]) || 0;\n }\n return result;\n }\n\n exports[\"default\"] = arraySum;\n});","define(\"lodash/internal/assignDefaults\", [\"exports\"], function (exports) {\n /**\n * Used by `_.defaults` to customize its `_.assign` use.\n *\n * @private\n * @param {*} objectValue The destination object property value.\n * @param {*} sourceValue The source object property value.\n * @returns {*} Returns the value to assign to the destination object.\n */\n \"use strict\";\n\n function assignDefaults(objectValue, sourceValue) {\n return objectValue === undefined ? sourceValue : objectValue;\n }\n\n exports[\"default\"] = assignDefaults;\n});","define(\"lodash/internal/assignOwnDefaults\", [\"exports\"], function (exports) {\n /** Used for native method references. */\n \"use strict\";\n\n var objectProto = Object.prototype;\n\n /** Used to check objects for own properties. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /**\n * Used by `_.template` to customize its `_.assign` use.\n *\n * **Note:** This function is like `assignDefaults` except that it ignores\n * inherited property values when checking if a property is `undefined`.\n *\n * @private\n * @param {*} objectValue The destination object property value.\n * @param {*} sourceValue The source object property value.\n * @param {string} key The key associated with the object and source values.\n * @param {Object} object The destination object.\n * @returns {*} Returns the value to assign to the destination object.\n */\n function assignOwnDefaults(objectValue, sourceValue, key, object) {\n return objectValue === undefined || !hasOwnProperty.call(object, key) ? sourceValue : objectValue;\n }\n\n exports[\"default\"] = assignOwnDefaults;\n});","define('lodash/internal/assignWith', ['exports', 'lodash/object/keys'], function (exports, _lodashObjectKeys) {\n 'use strict';\n\n /**\n * A specialized version of `_.assign` for customizing assigned values without\n * support for argument juggling, multiple sources, and `this` binding `customizer`\n * functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Object} Returns `object`.\n */\n function assignWith(object, source, customizer) {\n var index = -1,\n props = (0, _lodashObjectKeys['default'])(source),\n length = props.length;\n\n while (++index < length) {\n var key = props[index],\n value = object[key],\n result = customizer(value, source[key], key, object, source);\n\n if ((result === result ? result !== value : value === value) || value === undefined && !(key in object)) {\n object[key] = result;\n }\n }\n return object;\n }\n\n exports['default'] = assignWith;\n});","define('lodash/internal/baseAssign', ['exports', 'lodash/internal/baseCopy', 'lodash/object/keys'], function (exports, _lodashInternalBaseCopy, _lodashObjectKeys) {\n 'use strict';\n\n /**\n * The base implementation of `_.assign` without support for argument juggling,\n * multiple sources, and `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\n function baseAssign(object, source) {\n return source == null ? object : (0, _lodashInternalBaseCopy['default'])(source, (0, _lodashObjectKeys['default'])(source), object);\n }\n\n exports['default'] = baseAssign;\n});","define('lodash/internal/baseAt', ['exports', 'lodash/internal/isArrayLike', 'lodash/internal/isIndex'], function (exports, _lodashInternalIsArrayLike, _lodashInternalIsIndex) {\n 'use strict';\n\n /**\n * The base implementation of `_.at` without support for string collections\n * and individual key arguments.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {number[]|string[]} props The property names or indexes of elements to pick.\n * @returns {Array} Returns the new array of picked elements.\n */\n function baseAt(collection, props) {\n var index = -1,\n isNil = collection == null,\n isArr = !isNil && (0, _lodashInternalIsArrayLike['default'])(collection),\n length = isArr ? collection.length : 0,\n propsLength = props.length,\n result = Array(propsLength);\n\n while (++index < propsLength) {\n var key = props[index];\n if (isArr) {\n result[index] = (0, _lodashInternalIsIndex['default'])(key, length) ? collection[key] : undefined;\n } else {\n result[index] = isNil ? undefined : collection[key];\n }\n }\n return result;\n }\n\n exports['default'] = baseAt;\n});","define('lodash/internal/baseCallback', ['exports', 'lodash/internal/baseMatches', 'lodash/internal/baseMatchesProperty', 'lodash/internal/bindCallback', 'lodash/utility/identity', 'lodash/utility/property'], function (exports, _lodashInternalBaseMatches, _lodashInternalBaseMatchesProperty, _lodashInternalBindCallback, _lodashUtilityIdentity, _lodashUtilityProperty) {\n 'use strict';\n\n /**\n * The base implementation of `_.callback` which supports specifying the\n * number of arguments to provide to `func`.\n *\n * @private\n * @param {*} [func=_.identity] The value to convert to a callback.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {number} [argCount] The number of arguments to provide to `func`.\n * @returns {Function} Returns the callback.\n */\n function baseCallback(func, thisArg, argCount) {\n var type = typeof func;\n if (type == 'function') {\n return thisArg === undefined ? func : (0, _lodashInternalBindCallback['default'])(func, thisArg, argCount);\n }\n if (func == null) {\n return _lodashUtilityIdentity['default'];\n }\n if (type == 'object') {\n return (0, _lodashInternalBaseMatches['default'])(func);\n }\n return thisArg === undefined ? (0, _lodashUtilityProperty['default'])(func) : (0, _lodashInternalBaseMatchesProperty['default'])(func, thisArg);\n }\n\n exports['default'] = baseCallback;\n});","define('lodash/internal/baseClone', ['exports', 'lodash/internal/arrayCopy', 'lodash/internal/arrayEach', 'lodash/internal/baseAssign', 'lodash/internal/baseForOwn', 'lodash/internal/initCloneArray', 'lodash/internal/initCloneByTag', 'lodash/internal/initCloneObject', 'lodash/lang/isArray', 'lodash/lang/isObject'], function (exports, _lodashInternalArrayCopy, _lodashInternalArrayEach, _lodashInternalBaseAssign, _lodashInternalBaseForOwn, _lodashInternalInitCloneArray, _lodashInternalInitCloneByTag, _lodashInternalInitCloneObject, _lodashLangIsArray, _lodashLangIsObject) {\n 'use strict';\n\n /** `Object#toString` result references. */\n var argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\n var arrayBufferTag = '[object ArrayBuffer]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n /** Used to identify `toStringTag` values supported by `_.clone`. */\n var cloneableTags = {};\n cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[stringTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\n cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[mapTag] = cloneableTags[setTag] = cloneableTags[weakMapTag] = false;\n\n /** Used for native method references. */\n var objectProto = Object.prototype;\n\n /**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\n var objToString = objectProto.toString;\n\n /**\n * The base implementation of `_.clone` without support for argument juggling\n * and `this` binding `customizer` functions.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @param {Function} [customizer] The function to customize cloning values.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The object `value` belongs to.\n * @param {Array} [stackA=[]] Tracks traversed source objects.\n * @param {Array} [stackB=[]] Associates clones with source counterparts.\n * @returns {*} Returns the cloned value.\n */\n function baseClone(value, isDeep, customizer, key, object, stackA, stackB) {\n var result;\n if (customizer) {\n result = object ? customizer(value, key, object) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!(0, _lodashLangIsObject['default'])(value)) {\n return value;\n }\n var isArr = (0, _lodashLangIsArray['default'])(value);\n if (isArr) {\n result = (0, _lodashInternalInitCloneArray['default'])(value);\n if (!isDeep) {\n return (0, _lodashInternalArrayCopy['default'])(value, result);\n }\n } else {\n var tag = objToString.call(value),\n isFunc = tag == funcTag;\n\n if (tag == objectTag || tag == argsTag || isFunc && !object) {\n result = (0, _lodashInternalInitCloneObject['default'])(isFunc ? {} : value);\n if (!isDeep) {\n return (0, _lodashInternalBaseAssign['default'])(result, value);\n }\n } else {\n return cloneableTags[tag] ? (0, _lodashInternalInitCloneByTag['default'])(value, tag, isDeep) : object ? value : {};\n }\n }\n // Check for circular references and return its corresponding clone.\n stackA || (stackA = []);\n stackB || (stackB = []);\n\n var length = stackA.length;\n while (length--) {\n if (stackA[length] == value) {\n return stackB[length];\n }\n }\n // Add the source value to the stack of traversed objects and associate it with its clone.\n stackA.push(value);\n stackB.push(result);\n\n // Recursively populate clone (susceptible to call stack limits).\n (isArr ? _lodashInternalArrayEach['default'] : _lodashInternalBaseForOwn['default'])(value, function (subValue, key) {\n result[key] = baseClone(subValue, isDeep, customizer, key, value, stackA, stackB);\n });\n return result;\n }\n\n exports['default'] = baseClone;\n});","define(\"lodash/internal/baseCompareAscending\", [\"exports\"], function (exports) {\n /**\n * The base implementation of `compareAscending` which compares values and\n * sorts them in ascending order without guaranteeing a stable sort.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {number} Returns the sort order indicator for `value`.\n */\n \"use strict\";\n\n function baseCompareAscending(value, other) {\n if (value !== other) {\n var valIsNull = value === null,\n valIsUndef = value === undefined,\n valIsReflexive = value === value;\n\n var othIsNull = other === null,\n othIsUndef = other === undefined,\n othIsReflexive = other === other;\n\n if (value > other && !othIsNull || !valIsReflexive || valIsNull && !othIsUndef && othIsReflexive || valIsUndef && othIsReflexive) {\n return 1;\n }\n if (value < other && !valIsNull || !othIsReflexive || othIsNull && !valIsUndef && valIsReflexive || othIsUndef && valIsReflexive) {\n return -1;\n }\n }\n return 0;\n }\n\n exports[\"default\"] = baseCompareAscending;\n});","define(\"lodash/internal/baseCopy\", [\"exports\"], function (exports) {\n /**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property names to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @returns {Object} Returns `object`.\n */\n \"use strict\";\n\n function baseCopy(source, props, object) {\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n object[key] = source[key];\n }\n return object;\n }\n\n exports[\"default\"] = baseCopy;\n});","define('lodash/internal/baseCreate', ['exports', 'lodash/lang/isObject'], function (exports, _lodashLangIsObject) {\n 'use strict';\n\n /**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} prototype The object to inherit from.\n * @returns {Object} Returns the new object.\n */\n var baseCreate = (function () {\n function object() {}\n return function (prototype) {\n if ((0, _lodashLangIsObject['default'])(prototype)) {\n object.prototype = prototype;\n var result = new object();\n object.prototype = undefined;\n }\n return result || {};\n };\n })();\n\n exports['default'] = baseCreate;\n});","define('lodash/internal/baseDelay', ['exports'], function (exports) {\n /** Used as the `TypeError` message for \"Functions\" methods. */\n 'use strict';\n\n var FUNC_ERROR_TEXT = 'Expected a function';\n\n /**\n * The base implementation of `_.delay` and `_.defer` which accepts an index\n * of where to slice the arguments to provide to `func`.\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {Object} args The arguments provide to `func`.\n * @returns {number} Returns the timer id.\n */\n function baseDelay(func, wait, args) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return setTimeout(function () {\n func.apply(undefined, args);\n }, wait);\n }\n\n exports['default'] = baseDelay;\n});","define('lodash/internal/baseDifference', ['exports', 'lodash/internal/baseIndexOf', 'lodash/internal/cacheIndexOf', 'lodash/internal/createCache'], function (exports, _lodashInternalBaseIndexOf, _lodashInternalCacheIndexOf, _lodashInternalCreateCache) {\n 'use strict';\n\n /** Used as the size to enable large array optimizations. */\n var LARGE_ARRAY_SIZE = 200;\n\n /**\n * The base implementation of `_.difference` which accepts a single array\n * of values to exclude.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n */\n function baseDifference(array, values) {\n var length = array ? array.length : 0,\n result = [];\n\n if (!length) {\n return result;\n }\n var index = -1,\n indexOf = _lodashInternalBaseIndexOf['default'],\n isCommon = true,\n cache = isCommon && values.length >= LARGE_ARRAY_SIZE ? (0, _lodashInternalCreateCache['default'])(values) : null,\n valuesLength = values.length;\n\n if (cache) {\n indexOf = _lodashInternalCacheIndexOf['default'];\n isCommon = false;\n values = cache;\n }\n outer: while (++index < length) {\n var value = array[index];\n\n if (isCommon && value === value) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === value) {\n continue outer;\n }\n }\n result.push(value);\n } else if (indexOf(values, value, 0) < 0) {\n result.push(value);\n }\n }\n return result;\n }\n\n exports['default'] = baseDifference;\n});","define('lodash/internal/baseEach', ['exports', 'lodash/internal/baseForOwn', 'lodash/internal/createBaseEach'], function (exports, _lodashInternalBaseForOwn, _lodashInternalCreateBaseEach) {\n 'use strict';\n\n /**\n * The base implementation of `_.forEach` without support for callback\n * shorthands and `this` binding.\n *\n * @private\n * @param {Array|Object|string} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object|string} Returns `collection`.\n */\n var baseEach = (0, _lodashInternalCreateBaseEach['default'])(_lodashInternalBaseForOwn['default']);\n\n exports['default'] = baseEach;\n});","define('lodash/internal/baseEachRight', ['exports', 'lodash/internal/baseForOwnRight', 'lodash/internal/createBaseEach'], function (exports, _lodashInternalBaseForOwnRight, _lodashInternalCreateBaseEach) {\n 'use strict';\n\n /**\n * The base implementation of `_.forEachRight` without support for callback\n * shorthands and `this` binding.\n *\n * @private\n * @param {Array|Object|string} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object|string} Returns `collection`.\n */\n var baseEachRight = (0, _lodashInternalCreateBaseEach['default'])(_lodashInternalBaseForOwnRight['default'], true);\n\n exports['default'] = baseEachRight;\n});","define('lodash/internal/baseEvery', ['exports', 'lodash/internal/baseEach'], function (exports, _lodashInternalBaseEach) {\n 'use strict';\n\n /**\n * The base implementation of `_.every` without support for callback\n * shorthands and `this` binding.\n *\n * @private\n * @param {Array|Object|string} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`\n */\n function baseEvery(collection, predicate) {\n var result = true;\n (0, _lodashInternalBaseEach['default'])(collection, function (value, index, collection) {\n result = !!predicate(value, index, collection);\n return result;\n });\n return result;\n }\n\n exports['default'] = baseEvery;\n});","define('lodash/internal/baseExtremum', ['exports', 'lodash/internal/baseEach'], function (exports, _lodashInternalBaseEach) {\n 'use strict';\n\n /**\n * Gets the extremum value of `collection` invoking `iteratee` for each value\n * in `collection` to generate the criterion by which the value is ranked.\n * The `iteratee` is invoked with three arguments: (value, index|key, collection).\n *\n * @private\n * @param {Array|Object|string} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} comparator The function used to compare values.\n * @param {*} exValue The initial extremum value.\n * @returns {*} Returns the extremum value.\n */\n function baseExtremum(collection, iteratee, comparator, exValue) {\n var computed = exValue,\n result = computed;\n\n (0, _lodashInternalBaseEach['default'])(collection, function (value, index, collection) {\n var current = +iteratee(value, index, collection);\n if (comparator(current, computed) || current === exValue && current === result) {\n computed = current;\n result = value;\n }\n });\n return result;\n }\n\n exports['default'] = baseExtremum;\n});","define(\"lodash/internal/baseFill\", [\"exports\"], function (exports) {\n /**\n * The base implementation of `_.fill` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n */\n \"use strict\";\n\n function baseFill(array, value, start, end) {\n var length = array.length;\n\n start = start == null ? 0 : +start || 0;\n if (start < 0) {\n start = -start > length ? 0 : length + start;\n }\n end = end === undefined || end > length ? length : +end || 0;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : end >>> 0;\n start >>>= 0;\n\n while (start < length) {\n array[start++] = value;\n }\n return array;\n }\n\n exports[\"default\"] = baseFill;\n});","define('lodash/internal/baseFilter', ['exports', 'lodash/internal/baseEach'], function (exports, _lodashInternalBaseEach) {\n 'use strict';\n\n /**\n * The base implementation of `_.filter` without support for callback\n * shorthands and `this` binding.\n *\n * @private\n * @param {Array|Object|string} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function baseFilter(collection, predicate) {\n var result = [];\n (0, _lodashInternalBaseEach['default'])(collection, function (value, index, collection) {\n if (predicate(value, index, collection)) {\n result.push(value);\n }\n });\n return result;\n }\n\n exports['default'] = baseFilter;\n});","define(\"lodash/internal/baseFind\", [\"exports\"], function (exports) {\n /**\n * The base implementation of `_.find`, `_.findLast`, `_.findKey`, and `_.findLastKey`,\n * without support for callback shorthands and `this` binding, which iterates\n * over `collection` using the provided `eachFunc`.\n *\n * @private\n * @param {Array|Object|string} collection The collection to search.\n * @param {Function} predicate The function invoked per iteration.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @param {boolean} [retKey] Specify returning the key of the found element\n * instead of the element itself.\n * @returns {*} Returns the found element or its key, else `undefined`.\n */\n \"use strict\";\n\n function baseFind(collection, predicate, eachFunc, retKey) {\n var result;\n eachFunc(collection, function (value, key, collection) {\n if (predicate(value, key, collection)) {\n result = retKey ? key : value;\n return false;\n }\n });\n return result;\n }\n\n exports[\"default\"] = baseFind;\n});","define(\"lodash/internal/baseFindIndex\", [\"exports\"], function (exports) {\n /**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for callback shorthands and `this` binding.\n *\n * @private\n * @param {Array} array The array to search.\n * @param {Function} predicate The function invoked per iteration.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n \"use strict\";\n\n function baseFindIndex(array, predicate, fromRight) {\n var length = array.length,\n index = fromRight ? length : -1;\n\n while (fromRight ? index-- : ++index < length) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n }\n\n exports[\"default\"] = baseFindIndex;\n});","define('lodash/internal/baseFlatten', ['exports', 'lodash/internal/arrayPush', 'lodash/lang/isArguments', 'lodash/lang/isArray', 'lodash/internal/isArrayLike', 'lodash/internal/isObjectLike'], function (exports, _lodashInternalArrayPush, _lodashLangIsArguments, _lodashLangIsArray, _lodashInternalIsArrayLike, _lodashInternalIsObjectLike) {\n 'use strict';\n\n /**\n * The base implementation of `_.flatten` with added support for restricting\n * flattening and specifying the start index.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {boolean} [isDeep] Specify a deep flatten.\n * @param {boolean} [isStrict] Restrict flattening to arrays-like objects.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\n function baseFlatten(array, isDeep, isStrict, result) {\n result || (result = []);\n\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n var value = array[index];\n if ((0, _lodashInternalIsObjectLike['default'])(value) && (0, _lodashInternalIsArrayLike['default'])(value) && (isStrict || (0, _lodashLangIsArray['default'])(value) || (0, _lodashLangIsArguments['default'])(value))) {\n if (isDeep) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, isDeep, isStrict, result);\n } else {\n (0, _lodashInternalArrayPush['default'])(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n }\n\n exports['default'] = baseFlatten;\n});","define('lodash/internal/baseFor', ['exports', 'lodash/internal/createBaseFor'], function (exports, _lodashInternalCreateBaseFor) {\n 'use strict';\n\n /**\n * The base implementation of `baseForIn` and `baseForOwn` which iterates\n * over `object` properties returned by `keysFunc` invoking `iteratee` for\n * each property. Iteratee functions may exit iteration early by explicitly\n * returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseFor = (0, _lodashInternalCreateBaseFor['default'])();\n\n exports['default'] = baseFor;\n});","define('lodash/internal/baseForIn', ['exports', 'lodash/internal/baseFor', 'lodash/object/keysIn'], function (exports, _lodashInternalBaseFor, _lodashObjectKeysIn) {\n 'use strict';\n\n /**\n * The base implementation of `_.forIn` without support for callback\n * shorthands and `this` binding.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForIn(object, iteratee) {\n return (0, _lodashInternalBaseFor['default'])(object, iteratee, _lodashObjectKeysIn['default']);\n }\n\n exports['default'] = baseForIn;\n});","define('lodash/internal/baseForOwn', ['exports', 'lodash/internal/baseFor', 'lodash/object/keys'], function (exports, _lodashInternalBaseFor, _lodashObjectKeys) {\n 'use strict';\n\n /**\n * The base implementation of `_.forOwn` without support for callback\n * shorthands and `this` binding.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwn(object, iteratee) {\n return (0, _lodashInternalBaseFor['default'])(object, iteratee, _lodashObjectKeys['default']);\n }\n\n exports['default'] = baseForOwn;\n});","define('lodash/internal/baseForOwnRight', ['exports', 'lodash/internal/baseForRight', 'lodash/object/keys'], function (exports, _lodashInternalBaseForRight, _lodashObjectKeys) {\n 'use strict';\n\n /**\n * The base implementation of `_.forOwnRight` without support for callback\n * shorthands and `this` binding.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwnRight(object, iteratee) {\n return (0, _lodashInternalBaseForRight['default'])(object, iteratee, _lodashObjectKeys['default']);\n }\n\n exports['default'] = baseForOwnRight;\n});","define('lodash/internal/baseForRight', ['exports', 'lodash/internal/createBaseFor'], function (exports, _lodashInternalCreateBaseFor) {\n 'use strict';\n\n /**\n * This function is like `baseFor` except that it iterates over properties\n * in the opposite order.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseForRight = (0, _lodashInternalCreateBaseFor['default'])(true);\n\n exports['default'] = baseForRight;\n});","define('lodash/internal/baseFunctions', ['exports', 'lodash/lang/isFunction'], function (exports, _lodashLangIsFunction) {\n 'use strict';\n\n /**\n * The base implementation of `_.functions` which creates an array of\n * `object` function property names filtered from those provided.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Array} props The property names to filter.\n * @returns {Array} Returns the new array of filtered property names.\n */\n function baseFunctions(object, props) {\n var index = -1,\n length = props.length,\n resIndex = -1,\n result = [];\n\n while (++index < length) {\n var key = props[index];\n if ((0, _lodashLangIsFunction['default'])(object[key])) {\n result[++resIndex] = key;\n }\n }\n return result;\n }\n\n exports['default'] = baseFunctions;\n});","define('lodash/internal/baseGet', ['exports', 'lodash/internal/toObject'], function (exports, _lodashInternalToObject) {\n 'use strict';\n\n /**\n * The base implementation of `get` without support for string paths\n * and default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} path The path of the property to get.\n * @param {string} [pathKey] The key representation of path.\n * @returns {*} Returns the resolved value.\n */\n function baseGet(object, path, pathKey) {\n if (object == null) {\n return;\n }\n if (pathKey !== undefined && pathKey in (0, _lodashInternalToObject['default'])(object)) {\n path = [pathKey];\n }\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[path[index++]];\n }\n return index && index == length ? object : undefined;\n }\n\n exports['default'] = baseGet;\n});","define('lodash/internal/baseIndexOf', ['exports', 'lodash/internal/indexOfNaN'], function (exports, _lodashInternalIndexOfNaN) {\n 'use strict';\n\n /**\n * The base implementation of `_.indexOf` without support for binary searches.\n *\n * @private\n * @param {Array} array The array to search.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOf(array, value, fromIndex) {\n if (value !== value) {\n return (0, _lodashInternalIndexOfNaN['default'])(array, fromIndex);\n }\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n }\n\n exports['default'] = baseIndexOf;\n});","define('lodash/internal/baseIsEqual', ['exports', 'lodash/internal/baseIsEqualDeep', 'lodash/lang/isObject', 'lodash/internal/isObjectLike'], function (exports, _lodashInternalBaseIsEqualDeep, _lodashLangIsObject, _lodashInternalIsObjectLike) {\n 'use strict';\n\n /**\n * The base implementation of `_.isEqual` without support for `this` binding\n * `customizer` functions.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [customizer] The function to customize comparing values.\n * @param {boolean} [isLoose] Specify performing partial comparisons.\n * @param {Array} [stackA] Tracks traversed `value` objects.\n * @param {Array} [stackB] Tracks traversed `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\n function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || !(0, _lodashLangIsObject['default'])(value) && !(0, _lodashInternalIsObjectLike['default'])(other)) {\n return value !== value && other !== other;\n }\n return (0, _lodashInternalBaseIsEqualDeep['default'])(value, other, baseIsEqual, customizer, isLoose, stackA, stackB);\n }\n\n exports['default'] = baseIsEqual;\n});","define('lodash/internal/baseIsEqualDeep', ['exports', 'lodash/internal/equalArrays', 'lodash/internal/equalByTag', 'lodash/internal/equalObjects', 'lodash/lang/isArray', 'lodash/lang/isTypedArray'], function (exports, _lodashInternalEqualArrays, _lodashInternalEqualByTag, _lodashInternalEqualObjects, _lodashLangIsArray, _lodashLangIsTypedArray) {\n 'use strict';\n\n /** `Object#toString` result references. */\n var argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n /** Used for native method references. */\n var objectProto = Object.prototype;\n\n /** Used to check objects for own properties. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\n var objToString = objectProto.toString;\n\n /**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} [customizer] The function to customize comparing objects.\n * @param {boolean} [isLoose] Specify performing partial comparisons.\n * @param {Array} [stackA=[]] Tracks traversed `value` objects.\n * @param {Array} [stackB=[]] Tracks traversed `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) {\n var objIsArr = (0, _lodashLangIsArray['default'])(object),\n othIsArr = (0, _lodashLangIsArray['default'])(other),\n objTag = arrayTag,\n othTag = arrayTag;\n\n if (!objIsArr) {\n objTag = objToString.call(object);\n if (objTag == argsTag) {\n objTag = objectTag;\n } else if (objTag != objectTag) {\n objIsArr = (0, _lodashLangIsTypedArray['default'])(object);\n }\n }\n if (!othIsArr) {\n othTag = objToString.call(other);\n if (othTag == argsTag) {\n othTag = objectTag;\n } else if (othTag != objectTag) {\n othIsArr = (0, _lodashLangIsTypedArray['default'])(other);\n }\n }\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && !(objIsArr || objIsObj)) {\n return (0, _lodashInternalEqualByTag['default'])(object, other, objTag);\n }\n if (!isLoose) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, isLoose, stackA, stackB);\n }\n }\n if (!isSameTag) {\n return false;\n }\n // Assume cyclic values are equal.\n // For more information on detecting circular references see https://es5.github.io/#JO.\n stackA || (stackA = []);\n stackB || (stackB = []);\n\n var length = stackA.length;\n while (length--) {\n if (stackA[length] == object) {\n return stackB[length] == other;\n }\n }\n // Add `object` and `other` to the stack of traversed objects.\n stackA.push(object);\n stackB.push(other);\n\n var result = (objIsArr ? _lodashInternalEqualArrays['default'] : _lodashInternalEqualObjects['default'])(object, other, equalFunc, customizer, isLoose, stackA, stackB);\n\n stackA.pop();\n stackB.pop();\n\n return result;\n }\n\n exports['default'] = baseIsEqualDeep;\n});","define('lodash/internal/baseIsFunction', ['exports'], function (exports) {\n /**\n * The base implementation of `_.isFunction` without support for environments\n * with incorrect `typeof` results.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n */\n 'use strict';\n\n function baseIsFunction(value) {\n // Avoid a Chakra JIT bug in compatibility modes of IE 11.\n // See https://github.com/jashkenas/underscore/issues/1621 for more details.\n return typeof value == 'function' || false;\n }\n\n exports['default'] = baseIsFunction;\n});","define('lodash/internal/baseIsMatch', ['exports', 'lodash/internal/baseIsEqual', 'lodash/internal/toObject'], function (exports, _lodashInternalBaseIsEqual, _lodashInternalToObject) {\n 'use strict';\n\n /**\n * The base implementation of `_.isMatch` without support for callback\n * shorthands and `this` binding.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Array} matchData The propery names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparing objects.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\n function baseIsMatch(object, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = (0, _lodashInternalToObject['default'])(object);\n while (index--) {\n var data = matchData[index];\n if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var result = customizer ? customizer(objValue, srcValue, key) : undefined;\n if (!(result === undefined ? (0, _lodashInternalBaseIsEqual['default'])(srcValue, objValue, customizer, true) : result)) {\n return false;\n }\n }\n }\n return true;\n }\n\n exports['default'] = baseIsMatch;\n});","define(\"lodash/internal/baseLodash\", [\"exports\"], function (exports) {\n /**\n * The function whose prototype all chaining wrappers inherit from.\n *\n * @private\n */\n \"use strict\";\n\n function baseLodash() {\n // No operation performed.\n }\n\n exports[\"default\"] = baseLodash;\n});","define('lodash/internal/baseMap', ['exports', 'lodash/internal/baseEach', 'lodash/internal/isArrayLike'], function (exports, _lodashInternalBaseEach, _lodashInternalIsArrayLike) {\n 'use strict';\n\n /**\n * The base implementation of `_.map` without support for callback shorthands\n * and `this` binding.\n *\n * @private\n * @param {Array|Object|string} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function baseMap(collection, iteratee) {\n var index = -1,\n result = (0, _lodashInternalIsArrayLike['default'])(collection) ? Array(collection.length) : [];\n\n (0, _lodashInternalBaseEach['default'])(collection, function (value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n }\n\n exports['default'] = baseMap;\n});","define('lodash/internal/baseMatches', ['exports', 'lodash/internal/baseIsMatch', 'lodash/internal/getMatchData', 'lodash/internal/toObject'], function (exports, _lodashInternalBaseIsMatch, _lodashInternalGetMatchData, _lodashInternalToObject) {\n 'use strict';\n\n /**\n * The base implementation of `_.matches` which does not clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new function.\n */\n function baseMatches(source) {\n var matchData = (0, _lodashInternalGetMatchData['default'])(source);\n if (matchData.length == 1 && matchData[0][2]) {\n var key = matchData[0][0],\n value = matchData[0][1];\n\n return function (object) {\n if (object == null) {\n return false;\n }\n return object[key] === value && (value !== undefined || key in (0, _lodashInternalToObject['default'])(object));\n };\n }\n return function (object) {\n return (0, _lodashInternalBaseIsMatch['default'])(object, matchData);\n };\n }\n\n exports['default'] = baseMatches;\n});","define('lodash/internal/baseMatchesProperty', ['exports', 'lodash/internal/baseGet', 'lodash/internal/baseIsEqual', 'lodash/internal/baseSlice', 'lodash/lang/isArray', 'lodash/internal/isKey', 'lodash/internal/isStrictComparable', 'lodash/array/last', 'lodash/internal/toObject', 'lodash/internal/toPath'], function (exports, _lodashInternalBaseGet, _lodashInternalBaseIsEqual, _lodashInternalBaseSlice, _lodashLangIsArray, _lodashInternalIsKey, _lodashInternalIsStrictComparable, _lodashArrayLast, _lodashInternalToObject, _lodashInternalToPath) {\n 'use strict';\n\n /**\n * The base implementation of `_.matchesProperty` which does not clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to compare.\n * @returns {Function} Returns the new function.\n */\n function baseMatchesProperty(path, srcValue) {\n var isArr = (0, _lodashLangIsArray['default'])(path),\n isCommon = (0, _lodashInternalIsKey['default'])(path) && (0, _lodashInternalIsStrictComparable['default'])(srcValue),\n pathKey = path + '';\n\n path = (0, _lodashInternalToPath['default'])(path);\n return function (object) {\n if (object == null) {\n return false;\n }\n var key = pathKey;\n object = (0, _lodashInternalToObject['default'])(object);\n if ((isArr || !isCommon) && !(key in object)) {\n object = path.length == 1 ? object : (0, _lodashInternalBaseGet['default'])(object, (0, _lodashInternalBaseSlice['default'])(path, 0, -1));\n if (object == null) {\n return false;\n }\n key = (0, _lodashArrayLast['default'])(path);\n object = (0, _lodashInternalToObject['default'])(object);\n }\n return object[key] === srcValue ? srcValue !== undefined || key in object : (0, _lodashInternalBaseIsEqual['default'])(srcValue, object[key], undefined, true);\n };\n }\n\n exports['default'] = baseMatchesProperty;\n});","define('lodash/internal/baseMerge', ['exports', 'lodash/internal/arrayEach', 'lodash/internal/baseMergeDeep', 'lodash/lang/isArray', 'lodash/internal/isArrayLike', 'lodash/lang/isObject', 'lodash/internal/isObjectLike', 'lodash/lang/isTypedArray', 'lodash/object/keys'], function (exports, _lodashInternalArrayEach, _lodashInternalBaseMergeDeep, _lodashLangIsArray, _lodashInternalIsArrayLike, _lodashLangIsObject, _lodashInternalIsObjectLike, _lodashLangIsTypedArray, _lodashObjectKeys) {\n 'use strict';\n\n /**\n * The base implementation of `_.merge` without support for argument juggling,\n * multiple sources, and `this` binding `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Array} [stackA=[]] Tracks traversed source objects.\n * @param {Array} [stackB=[]] Associates values with source counterparts.\n * @returns {Object} Returns `object`.\n */\n function baseMerge(object, source, customizer, stackA, stackB) {\n if (!(0, _lodashLangIsObject['default'])(object)) {\n return object;\n }\n var isSrcArr = (0, _lodashInternalIsArrayLike['default'])(source) && ((0, _lodashLangIsArray['default'])(source) || (0, _lodashLangIsTypedArray['default'])(source)),\n props = isSrcArr ? undefined : (0, _lodashObjectKeys['default'])(source);\n\n (0, _lodashInternalArrayEach['default'])(props || source, function (srcValue, key) {\n if (props) {\n key = srcValue;\n srcValue = source[key];\n }\n if ((0, _lodashInternalIsObjectLike['default'])(srcValue)) {\n stackA || (stackA = []);\n stackB || (stackB = []);\n (0, _lodashInternalBaseMergeDeep['default'])(object, source, key, baseMerge, customizer, stackA, stackB);\n } else {\n var value = object[key],\n result = customizer ? customizer(value, srcValue, key, object, source) : undefined,\n isCommon = result === undefined;\n\n if (isCommon) {\n result = srcValue;\n }\n if ((result !== undefined || isSrcArr && !(key in object)) && (isCommon || (result === result ? result !== value : value === value))) {\n object[key] = result;\n }\n }\n });\n return object;\n }\n\n exports['default'] = baseMerge;\n});","define('lodash/internal/baseMergeDeep', ['exports', 'lodash/internal/arrayCopy', 'lodash/lang/isArguments', 'lodash/lang/isArray', 'lodash/internal/isArrayLike', 'lodash/lang/isPlainObject', 'lodash/lang/isTypedArray', 'lodash/lang/toPlainObject'], function (exports, _lodashInternalArrayCopy, _lodashLangIsArguments, _lodashLangIsArray, _lodashInternalIsArrayLike, _lodashLangIsPlainObject, _lodashLangIsTypedArray, _lodashLangToPlainObject) {\n 'use strict';\n\n /**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Array} [stackA=[]] Tracks traversed source objects.\n * @param {Array} [stackB=[]] Associates values with source counterparts.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function baseMergeDeep(object, source, key, mergeFunc, customizer, stackA, stackB) {\n var length = stackA.length,\n srcValue = source[key];\n\n while (length--) {\n if (stackA[length] == srcValue) {\n object[key] = stackB[length];\n return;\n }\n }\n var value = object[key],\n result = customizer ? customizer(value, srcValue, key, object, source) : undefined,\n isCommon = result === undefined;\n\n if (isCommon) {\n result = srcValue;\n if ((0, _lodashInternalIsArrayLike['default'])(srcValue) && ((0, _lodashLangIsArray['default'])(srcValue) || (0, _lodashLangIsTypedArray['default'])(srcValue))) {\n result = (0, _lodashLangIsArray['default'])(value) ? value : (0, _lodashInternalIsArrayLike['default'])(value) ? (0, _lodashInternalArrayCopy['default'])(value) : [];\n } else if ((0, _lodashLangIsPlainObject['default'])(srcValue) || (0, _lodashLangIsArguments['default'])(srcValue)) {\n result = (0, _lodashLangIsArguments['default'])(value) ? (0, _lodashLangToPlainObject['default'])(value) : (0, _lodashLangIsPlainObject['default'])(value) ? value : {};\n } else {\n isCommon = false;\n }\n }\n // Add the source value to the stack of traversed objects and associate\n // it with its merged value.\n stackA.push(srcValue);\n stackB.push(result);\n\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n object[key] = mergeFunc(result, srcValue, customizer, stackA, stackB);\n } else if (result === result ? result !== value : value === value) {\n object[key] = result;\n }\n }\n\n exports['default'] = baseMergeDeep;\n});","define(\"lodash/internal/baseProperty\", [\"exports\"], function (exports) {\n /**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new function.\n */\n \"use strict\";\n\n function baseProperty(key) {\n return function (object) {\n return object == null ? undefined : object[key];\n };\n }\n\n exports[\"default\"] = baseProperty;\n});","define('lodash/internal/basePropertyDeep', ['exports', 'lodash/internal/baseGet', 'lodash/internal/toPath'], function (exports, _lodashInternalBaseGet, _lodashInternalToPath) {\n 'use strict';\n\n /**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new function.\n */\n function basePropertyDeep(path) {\n var pathKey = path + '';\n path = (0, _lodashInternalToPath['default'])(path);\n return function (object) {\n return (0, _lodashInternalBaseGet['default'])(object, path, pathKey);\n };\n }\n\n exports['default'] = basePropertyDeep;\n});","define('lodash/internal/basePullAt', ['exports', 'lodash/internal/isIndex'], function (exports, _lodashInternalIsIndex) {\n 'use strict';\n\n /** Used for native method references. */\n var arrayProto = Array.prototype;\n\n /** Native method references. */\n var splice = arrayProto.splice;\n\n /**\n * The base implementation of `_.pullAt` without support for individual\n * index arguments and capturing the removed elements.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {number[]} indexes The indexes of elements to remove.\n * @returns {Array} Returns `array`.\n */\n function basePullAt(array, indexes) {\n var length = array ? indexes.length : 0;\n while (length--) {\n var index = indexes[length];\n if (index != previous && (0, _lodashInternalIsIndex['default'])(index)) {\n var previous = index;\n splice.call(array, index, 1);\n }\n }\n return array;\n }\n\n exports['default'] = basePullAt;\n});","define(\"lodash/internal/baseRandom\", [\"exports\"], function (exports) {\n /* Native method references for those with the same name as other `lodash` methods. */\n \"use strict\";\n\n var nativeFloor = Math.floor,\n nativeRandom = Math.random;\n\n /**\n * The base implementation of `_.random` without support for argument juggling\n * and returning floating-point numbers.\n *\n * @private\n * @param {number} min The minimum possible value.\n * @param {number} max The maximum possible value.\n * @returns {number} Returns the random number.\n */\n function baseRandom(min, max) {\n return min + nativeFloor(nativeRandom() * (max - min + 1));\n }\n\n exports[\"default\"] = baseRandom;\n});","define(\"lodash/internal/baseReduce\", [\"exports\"], function (exports) {\n /**\n * The base implementation of `_.reduce` and `_.reduceRight` without support\n * for callback shorthands and `this` binding, which iterates over `collection`\n * using the provided `eachFunc`.\n *\n * @private\n * @param {Array|Object|string} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} accumulator The initial value.\n * @param {boolean} initFromCollection Specify using the first or last element\n * of `collection` as the initial value.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the accumulated value.\n */\n \"use strict\";\n\n function baseReduce(collection, iteratee, accumulator, initFromCollection, eachFunc) {\n eachFunc(collection, function (value, index, collection) {\n accumulator = initFromCollection ? (initFromCollection = false, value) : iteratee(accumulator, value, index, collection);\n });\n return accumulator;\n }\n\n exports[\"default\"] = baseReduce;\n});","define('lodash/internal/baseSetData', ['exports', 'lodash/utility/identity', 'lodash/internal/metaMap'], function (exports, _lodashUtilityIdentity, _lodashInternalMetaMap) {\n 'use strict';\n\n /**\n * The base implementation of `setData` without support for hot loop detection.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var baseSetData = !_lodashInternalMetaMap['default'] ? _lodashUtilityIdentity['default'] : function (func, data) {\n _lodashInternalMetaMap['default'].set(func, data);\n return func;\n };\n\n exports['default'] = baseSetData;\n});","define(\"lodash/internal/baseSlice\", [\"exports\"], function (exports) {\n /**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n \"use strict\";\n\n function baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n start = start == null ? 0 : +start || 0;\n if (start < 0) {\n start = -start > length ? 0 : length + start;\n }\n end = end === undefined || end > length ? length : +end || 0;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : end - start >>> 0;\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n }\n\n exports[\"default\"] = baseSlice;\n});","define('lodash/internal/baseSome', ['exports', 'lodash/internal/baseEach'], function (exports, _lodashInternalBaseEach) {\n 'use strict';\n\n /**\n * The base implementation of `_.some` without support for callback shorthands\n * and `this` binding.\n *\n * @private\n * @param {Array|Object|string} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\n function baseSome(collection, predicate) {\n var result;\n\n (0, _lodashInternalBaseEach['default'])(collection, function (value, index, collection) {\n result = predicate(value, index, collection);\n return !result;\n });\n return !!result;\n }\n\n exports['default'] = baseSome;\n});","define(\"lodash/internal/baseSortBy\", [\"exports\"], function (exports) {\n /**\n * The base implementation of `_.sortBy` which uses `comparer` to define\n * the sort order of `array` and replaces criteria objects with their\n * corresponding values.\n *\n * @private\n * @param {Array} array The array to sort.\n * @param {Function} comparer The function to define sort order.\n * @returns {Array} Returns `array`.\n */\n \"use strict\";\n\n function baseSortBy(array, comparer) {\n var length = array.length;\n\n array.sort(comparer);\n while (length--) {\n array[length] = array[length].value;\n }\n return array;\n }\n\n exports[\"default\"] = baseSortBy;\n});","define('lodash/internal/baseSortByOrder', ['exports', 'lodash/internal/arrayMap', 'lodash/internal/baseCallback', 'lodash/internal/baseMap', 'lodash/internal/baseSortBy', 'lodash/internal/compareMultiple'], function (exports, _lodashInternalArrayMap, _lodashInternalBaseCallback, _lodashInternalBaseMap, _lodashInternalBaseSortBy, _lodashInternalCompareMultiple) {\n 'use strict';\n\n /**\n * The base implementation of `_.sortByOrder` without param guards.\n *\n * @private\n * @param {Array|Object|string} collection The collection to iterate over.\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n * @param {boolean[]} orders The sort orders of `iteratees`.\n * @returns {Array} Returns the new sorted array.\n */\n function baseSortByOrder(collection, iteratees, orders) {\n var index = -1;\n\n iteratees = (0, _lodashInternalArrayMap['default'])(iteratees, function (iteratee) {\n return (0, _lodashInternalBaseCallback['default'])(iteratee);\n });\n\n var result = (0, _lodashInternalBaseMap['default'])(collection, function (value) {\n var criteria = (0, _lodashInternalArrayMap['default'])(iteratees, function (iteratee) {\n return iteratee(value);\n });\n return { 'criteria': criteria, 'index': ++index, 'value': value };\n });\n\n return (0, _lodashInternalBaseSortBy['default'])(result, function (object, other) {\n return (0, _lodashInternalCompareMultiple['default'])(object, other, orders);\n });\n }\n\n exports['default'] = baseSortByOrder;\n});","define('lodash/internal/baseSum', ['exports', 'lodash/internal/baseEach'], function (exports, _lodashInternalBaseEach) {\n 'use strict';\n\n /**\n * The base implementation of `_.sum` without support for callback shorthands\n * and `this` binding.\n *\n * @private\n * @param {Array|Object|string} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the sum.\n */\n function baseSum(collection, iteratee) {\n var result = 0;\n (0, _lodashInternalBaseEach['default'])(collection, function (value, index, collection) {\n result += +iteratee(value, index, collection) || 0;\n });\n return result;\n }\n\n exports['default'] = baseSum;\n});","define('lodash/internal/baseToString', ['exports'], function (exports) {\n /**\n * Converts `value` to a string if it's not one. An empty string is returned\n * for `null` or `undefined` values.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\n 'use strict';\n\n function baseToString(value) {\n return value == null ? '' : value + '';\n }\n\n exports['default'] = baseToString;\n});","define('lodash/internal/baseUniq', ['exports', 'lodash/internal/baseIndexOf', 'lodash/internal/cacheIndexOf', 'lodash/internal/createCache'], function (exports, _lodashInternalBaseIndexOf, _lodashInternalCacheIndexOf, _lodashInternalCreateCache) {\n 'use strict';\n\n /** Used as the size to enable large array optimizations. */\n var LARGE_ARRAY_SIZE = 200;\n\n /**\n * The base implementation of `_.uniq` without support for callback shorthands\n * and `this` binding.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The function invoked per iteration.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseUniq(array, iteratee) {\n var index = -1,\n indexOf = _lodashInternalBaseIndexOf['default'],\n length = array.length,\n isCommon = true,\n isLarge = isCommon && length >= LARGE_ARRAY_SIZE,\n seen = isLarge ? (0, _lodashInternalCreateCache['default'])() : null,\n result = [];\n\n if (seen) {\n indexOf = _lodashInternalCacheIndexOf['default'];\n isCommon = false;\n } else {\n isLarge = false;\n seen = iteratee ? [] : result;\n }\n outer: while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value, index, array) : value;\n\n if (isCommon && value === value) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n } else if (indexOf(seen, computed, 0) < 0) {\n if (iteratee || isLarge) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n exports['default'] = baseUniq;\n});","define(\"lodash/internal/baseValues\", [\"exports\"], function (exports) {\n /**\n * The base implementation of `_.values` and `_.valuesIn` which creates an\n * array of `object` property values corresponding to the property names\n * of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the array of property values.\n */\n \"use strict\";\n\n function baseValues(object, props) {\n var index = -1,\n length = props.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = object[props[index]];\n }\n return result;\n }\n\n exports[\"default\"] = baseValues;\n});","define('lodash/internal/baseWhile', ['exports', 'lodash/internal/baseSlice'], function (exports, _lodashInternalBaseSlice) {\n 'use strict';\n\n /**\n * The base implementation of `_.dropRightWhile`, `_.dropWhile`, `_.takeRightWhile`,\n * and `_.takeWhile` without support for callback shorthands and `this` binding.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {Function} predicate The function invoked per iteration.\n * @param {boolean} [isDrop] Specify dropping elements instead of taking them.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseWhile(array, predicate, isDrop, fromRight) {\n var length = array.length,\n index = fromRight ? length : -1;\n\n while ((fromRight ? index-- : ++index < length) && predicate(array[index], index, array)) {}\n return isDrop ? (0, _lodashInternalBaseSlice['default'])(array, fromRight ? 0 : index, fromRight ? index + 1 : length) : (0, _lodashInternalBaseSlice['default'])(array, fromRight ? index + 1 : 0, fromRight ? length : index);\n }\n\n exports['default'] = baseWhile;\n});","define('lodash/internal/baseWrapperValue', ['exports', 'lodash/internal/LazyWrapper', 'lodash/internal/arrayPush'], function (exports, _lodashInternalLazyWrapper, _lodashInternalArrayPush) {\n 'use strict';\n\n /**\n * The base implementation of `wrapperValue` which returns the result of\n * performing a sequence of actions on the unwrapped `value`, where each\n * successive action is supplied the return value of the previous.\n *\n * @private\n * @param {*} value The unwrapped value.\n * @param {Array} actions Actions to peform to resolve the unwrapped value.\n * @returns {*} Returns the resolved value.\n */\n function baseWrapperValue(value, actions) {\n var result = value;\n if (result instanceof _lodashInternalLazyWrapper['default']) {\n result = result.value();\n }\n var index = -1,\n length = actions.length;\n\n while (++index < length) {\n var action = actions[index];\n result = action.func.apply(action.thisArg, (0, _lodashInternalArrayPush['default'])([result], action.args));\n }\n return result;\n }\n\n exports['default'] = baseWrapperValue;\n});","define('lodash/internal/binaryIndex', ['exports', 'lodash/internal/binaryIndexBy', 'lodash/utility/identity'], function (exports, _lodashInternalBinaryIndexBy, _lodashUtilityIdentity) {\n 'use strict';\n\n /** Used as references for the maximum length and index of an array. */\n var MAX_ARRAY_LENGTH = 4294967295,\n HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;\n\n /**\n * Performs a binary search of `array` to determine the index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function binaryIndex(array, value, retHighest) {\n var low = 0,\n high = array ? array.length : low;\n\n if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {\n while (low < high) {\n var mid = low + high >>> 1,\n computed = array[mid];\n\n if ((retHighest ? computed <= value : computed < value) && computed !== null) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return high;\n }\n return (0, _lodashInternalBinaryIndexBy['default'])(array, value, _lodashUtilityIdentity['default'], retHighest);\n }\n\n exports['default'] = binaryIndex;\n});","define(\"lodash/internal/binaryIndexBy\", [\"exports\"], function (exports) {\n /* Native method references for those with the same name as other `lodash` methods. */\n \"use strict\";\n\n var nativeFloor = Math.floor,\n nativeMin = Math.min;\n\n /** Used as references for the maximum length and index of an array. */\n var MAX_ARRAY_LENGTH = 4294967295,\n MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1;\n\n /**\n * This function is like `binaryIndex` except that it invokes `iteratee` for\n * `value` and each element of `array` to compute their sort ranking. The\n * iteratee is invoked with one argument; (value).\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function binaryIndexBy(array, value, iteratee, retHighest) {\n value = iteratee(value);\n\n var low = 0,\n high = array ? array.length : 0,\n valIsNaN = value !== value,\n valIsNull = value === null,\n valIsUndef = value === undefined;\n\n while (low < high) {\n var mid = nativeFloor((low + high) / 2),\n computed = iteratee(array[mid]),\n isDef = computed !== undefined,\n isReflexive = computed === computed;\n\n if (valIsNaN) {\n var setLow = isReflexive || retHighest;\n } else if (valIsNull) {\n setLow = isReflexive && isDef && (retHighest || computed != null);\n } else if (valIsUndef) {\n setLow = isReflexive && (retHighest || isDef);\n } else if (computed == null) {\n setLow = false;\n } else {\n setLow = retHighest ? computed <= value : computed < value;\n }\n if (setLow) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return nativeMin(high, MAX_ARRAY_INDEX);\n }\n\n exports[\"default\"] = binaryIndexBy;\n});","define('lodash/internal/bindCallback', ['exports', 'lodash/utility/identity'], function (exports, _lodashUtilityIdentity) {\n 'use strict';\n\n /**\n * A specialized version of `baseCallback` which only supports `this` binding\n * and specifying the number of arguments to provide to `func`.\n *\n * @private\n * @param {Function} func The function to bind.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {number} [argCount] The number of arguments to provide to `func`.\n * @returns {Function} Returns the callback.\n */\n function bindCallback(func, thisArg, argCount) {\n if (typeof func != 'function') {\n return _lodashUtilityIdentity['default'];\n }\n if (thisArg === undefined) {\n return func;\n }\n switch (argCount) {\n case 1:\n return function (value) {\n return func.call(thisArg, value);\n };\n case 3:\n return function (value, index, collection) {\n return func.call(thisArg, value, index, collection);\n };\n case 4:\n return function (accumulator, value, index, collection) {\n return func.call(thisArg, accumulator, value, index, collection);\n };\n case 5:\n return function (value, other, key, object, source) {\n return func.call(thisArg, value, other, key, object, source);\n };\n }\n return function () {\n return func.apply(thisArg, arguments);\n };\n }\n\n exports['default'] = bindCallback;\n});","define('lodash/internal/bufferClone', ['exports', 'lodash/internal/root'], function (exports, _lodashInternalRoot) {\n 'use strict';\n\n /** Native method references. */\n var ArrayBuffer = _lodashInternalRoot['default'].ArrayBuffer,\n Uint8Array = _lodashInternalRoot['default'].Uint8Array;\n\n /**\n * Creates a clone of the given array buffer.\n *\n * @private\n * @param {ArrayBuffer} buffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\n function bufferClone(buffer) {\n var result = new ArrayBuffer(buffer.byteLength),\n view = new Uint8Array(result);\n\n view.set(new Uint8Array(buffer));\n return result;\n }\n\n exports['default'] = bufferClone;\n});","define('lodash/internal/cacheIndexOf', ['exports', 'lodash/lang/isObject'], function (exports, _lodashLangIsObject) {\n 'use strict';\n\n /**\n * Checks if `value` is in `cache` mimicking the return signature of\n * `_.indexOf` by returning `0` if the value is found, else `-1`.\n *\n * @private\n * @param {Object} cache The cache to search.\n * @param {*} value The value to search for.\n * @returns {number} Returns `0` if `value` is found, else `-1`.\n */\n function cacheIndexOf(cache, value) {\n var data = cache.data,\n result = typeof value == 'string' || (0, _lodashLangIsObject['default'])(value) ? data.set.has(value) : data.hash[value];\n\n return result ? 0 : -1;\n }\n\n exports['default'] = cacheIndexOf;\n});","define('lodash/internal/cachePush', ['exports', 'lodash/lang/isObject'], function (exports, _lodashLangIsObject) {\n 'use strict';\n\n /**\n * Adds `value` to the cache.\n *\n * @private\n * @name push\n * @memberOf SetCache\n * @param {*} value The value to cache.\n */\n function cachePush(value) {\n var data = this.data;\n if (typeof value == 'string' || (0, _lodashLangIsObject['default'])(value)) {\n data.set.add(value);\n } else {\n data.hash[value] = true;\n }\n }\n\n exports['default'] = cachePush;\n});","define(\"lodash/internal/charsLeftIndex\", [\"exports\"], function (exports) {\n /**\n * Used by `_.trim` and `_.trimLeft` to get the index of the first character\n * of `string` that is not found in `chars`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @param {string} chars The characters to find.\n * @returns {number} Returns the index of the first character not found in `chars`.\n */\n \"use strict\";\n\n function charsLeftIndex(string, chars) {\n var index = -1,\n length = string.length;\n\n while (++index < length && chars.indexOf(string.charAt(index)) > -1) {}\n return index;\n }\n\n exports[\"default\"] = charsLeftIndex;\n});","define(\"lodash/internal/charsRightIndex\", [\"exports\"], function (exports) {\n /**\n * Used by `_.trim` and `_.trimRight` to get the index of the last character\n * of `string` that is not found in `chars`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @param {string} chars The characters to find.\n * @returns {number} Returns the index of the last character not found in `chars`.\n */\n \"use strict\";\n\n function charsRightIndex(string, chars) {\n var index = string.length;\n\n while (index-- && chars.indexOf(string.charAt(index)) > -1) {}\n return index;\n }\n\n exports[\"default\"] = charsRightIndex;\n});","define('lodash/internal/compareAscending', ['exports', 'lodash/internal/baseCompareAscending'], function (exports, _lodashInternalBaseCompareAscending) {\n 'use strict';\n\n /**\n * Used by `_.sortBy` to compare transformed elements of a collection and stable\n * sort them in ascending order.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @returns {number} Returns the sort order indicator for `object`.\n */\n function compareAscending(object, other) {\n return (0, _lodashInternalBaseCompareAscending['default'])(object.criteria, other.criteria) || object.index - other.index;\n }\n\n exports['default'] = compareAscending;\n});","define('lodash/internal/compareMultiple', ['exports', 'lodash/internal/baseCompareAscending'], function (exports, _lodashInternalBaseCompareAscending) {\n 'use strict';\n\n /**\n * Used by `_.sortByOrder` to compare multiple properties of a value to another\n * and stable sort them.\n *\n * If `orders` is unspecified, all valuess are sorted in ascending order. Otherwise,\n * a value is sorted in ascending order if its corresponding order is \"asc\", and\n * descending if \"desc\".\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {boolean[]} orders The order to sort by for each property.\n * @returns {number} Returns the sort order indicator for `object`.\n */\n function compareMultiple(object, other, orders) {\n var index = -1,\n objCriteria = object.criteria,\n othCriteria = other.criteria,\n length = objCriteria.length,\n ordersLength = orders.length;\n\n while (++index < length) {\n var result = (0, _lodashInternalBaseCompareAscending['default'])(objCriteria[index], othCriteria[index]);\n if (result) {\n if (index >= ordersLength) {\n return result;\n }\n var order = orders[index];\n return result * (order === 'asc' || order === true ? 1 : -1);\n }\n }\n // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n // that causes it, under certain circumstances, to provide the same value for\n // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n // for more details.\n //\n // This also ensures a stable sort in V8 and other engines.\n // See https://code.google.com/p/v8/issues/detail?id=90 for more details.\n return object.index - other.index;\n }\n\n exports['default'] = compareMultiple;\n});","define(\"lodash/internal/composeArgs\", [\"exports\"], function (exports) {\n /* Native method references for those with the same name as other `lodash` methods. */\n \"use strict\";\n\n var nativeMax = Math.max;\n\n /**\n * Creates an array that is the composition of partially applied arguments,\n * placeholders, and provided arguments into a single array of arguments.\n *\n * @private\n * @param {Array|Object} args The provided arguments.\n * @param {Array} partials The arguments to prepend to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgs(args, partials, holders) {\n var holdersLength = holders.length,\n argsIndex = -1,\n argsLength = nativeMax(args.length - holdersLength, 0),\n leftIndex = -1,\n leftLength = partials.length,\n result = Array(leftLength + argsLength);\n\n while (++leftIndex < leftLength) {\n result[leftIndex] = partials[leftIndex];\n }\n while (++argsIndex < holdersLength) {\n result[holders[argsIndex]] = args[argsIndex];\n }\n while (argsLength--) {\n result[leftIndex++] = args[argsIndex++];\n }\n return result;\n }\n\n exports[\"default\"] = composeArgs;\n});","define(\"lodash/internal/composeArgsRight\", [\"exports\"], function (exports) {\n /* Native method references for those with the same name as other `lodash` methods. */\n \"use strict\";\n\n var nativeMax = Math.max;\n\n /**\n * This function is like `composeArgs` except that the arguments composition\n * is tailored for `_.partialRight`.\n *\n * @private\n * @param {Array|Object} args The provided arguments.\n * @param {Array} partials The arguments to append to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgsRight(args, partials, holders) {\n var holdersIndex = -1,\n holdersLength = holders.length,\n argsIndex = -1,\n argsLength = nativeMax(args.length - holdersLength, 0),\n rightIndex = -1,\n rightLength = partials.length,\n result = Array(argsLength + rightLength);\n\n while (++argsIndex < argsLength) {\n result[argsIndex] = args[argsIndex];\n }\n var offset = argsIndex;\n while (++rightIndex < rightLength) {\n result[offset + rightIndex] = partials[rightIndex];\n }\n while (++holdersIndex < holdersLength) {\n result[offset + holders[holdersIndex]] = args[argsIndex++];\n }\n return result;\n }\n\n exports[\"default\"] = composeArgsRight;\n});","define('lodash/internal/createAggregator', ['exports', 'lodash/internal/baseCallback', 'lodash/internal/baseEach', 'lodash/lang/isArray'], function (exports, _lodashInternalBaseCallback, _lodashInternalBaseEach, _lodashLangIsArray) {\n 'use strict';\n\n /**\n * Creates a `_.countBy`, `_.groupBy`, `_.indexBy`, or `_.partition` function.\n *\n * @private\n * @param {Function} setter The function to set keys and values of the accumulator object.\n * @param {Function} [initializer] The function to initialize the accumulator object.\n * @returns {Function} Returns the new aggregator function.\n */\n function createAggregator(setter, initializer) {\n return function (collection, iteratee, thisArg) {\n var result = initializer ? initializer() : {};\n iteratee = (0, _lodashInternalBaseCallback['default'])(iteratee, thisArg, 3);\n\n if ((0, _lodashLangIsArray['default'])(collection)) {\n var index = -1,\n length = collection.length;\n\n while (++index < length) {\n var value = collection[index];\n setter(result, value, iteratee(value, index, collection), collection);\n }\n } else {\n (0, _lodashInternalBaseEach['default'])(collection, function (value, key, collection) {\n setter(result, value, iteratee(value, key, collection), collection);\n });\n }\n return result;\n };\n }\n\n exports['default'] = createAggregator;\n});","define('lodash/internal/createAssigner', ['exports', 'lodash/internal/bindCallback', 'lodash/internal/isIterateeCall', 'lodash/function/restParam'], function (exports, _lodashInternalBindCallback, _lodashInternalIsIterateeCall, _lodashFunctionRestParam) {\n 'use strict';\n\n /**\n * Creates a `_.assign`, `_.defaults`, or `_.merge` function.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\n function createAssigner(assigner) {\n return (0, _lodashFunctionRestParam['default'])(function (object, sources) {\n var index = -1,\n length = object == null ? 0 : sources.length,\n customizer = length > 2 ? sources[length - 2] : undefined,\n guard = length > 2 ? sources[2] : undefined,\n thisArg = length > 1 ? sources[length - 1] : undefined;\n\n if (typeof customizer == 'function') {\n customizer = (0, _lodashInternalBindCallback['default'])(customizer, thisArg, 5);\n length -= 2;\n } else {\n customizer = typeof thisArg == 'function' ? thisArg : undefined;\n length -= customizer ? 1 : 0;\n }\n if (guard && (0, _lodashInternalIsIterateeCall['default'])(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, customizer);\n }\n }\n return object;\n });\n }\n\n exports['default'] = createAssigner;\n});","define('lodash/internal/createBaseEach', ['exports', 'lodash/internal/getLength', 'lodash/internal/isLength', 'lodash/internal/toObject'], function (exports, _lodashInternalGetLength, _lodashInternalIsLength, _lodashInternalToObject) {\n 'use strict';\n\n /**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseEach(eachFunc, fromRight) {\n return function (collection, iteratee) {\n var length = collection ? (0, _lodashInternalGetLength['default'])(collection) : 0;\n if (!(0, _lodashInternalIsLength['default'])(length)) {\n return eachFunc(collection, iteratee);\n }\n var index = fromRight ? length : -1,\n iterable = (0, _lodashInternalToObject['default'])(collection);\n\n while (fromRight ? index-- : ++index < length) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n }\n\n exports['default'] = createBaseEach;\n});","define('lodash/internal/createBaseFor', ['exports', 'lodash/internal/toObject'], function (exports, _lodashInternalToObject) {\n 'use strict';\n\n /**\n * Creates a base function for `_.forIn` or `_.forInRight`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseFor(fromRight) {\n return function (object, iteratee, keysFunc) {\n var iterable = (0, _lodashInternalToObject['default'])(object),\n props = keysFunc(object),\n length = props.length,\n index = fromRight ? length : -1;\n\n while (fromRight ? index-- : ++index < length) {\n var key = props[index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n }\n\n exports['default'] = createBaseFor;\n});","define('lodash/internal/createBindWrapper', ['exports', 'lodash/internal/createCtorWrapper', 'lodash/internal/root'], function (exports, _lodashInternalCreateCtorWrapper, _lodashInternalRoot) {\n 'use strict';\n\n /**\n * Creates a function that wraps `func` and invokes it with the `this`\n * binding of `thisArg`.\n *\n * @private\n * @param {Function} func The function to bind.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @returns {Function} Returns the new bound function.\n */\n function createBindWrapper(func, thisArg) {\n var Ctor = (0, _lodashInternalCreateCtorWrapper['default'])(func);\n\n function wrapper() {\n var fn = this && this !== _lodashInternalRoot['default'] && this instanceof wrapper ? Ctor : func;\n return fn.apply(thisArg, arguments);\n }\n return wrapper;\n }\n\n exports['default'] = createBindWrapper;\n});","define('lodash/internal/createCache', ['exports', 'lodash/internal/SetCache', 'lodash/internal/getNative', 'lodash/internal/root'], function (exports, _lodashInternalSetCache, _lodashInternalGetNative, _lodashInternalRoot) {\n 'use strict';\n\n /** Native method references. */\n var Set = (0, _lodashInternalGetNative['default'])(_lodashInternalRoot['default'], 'Set');\n\n /* Native method references for those with the same name as other `lodash` methods. */\n var nativeCreate = (0, _lodashInternalGetNative['default'])(Object, 'create');\n\n /**\n * Creates a `Set` cache object to optimize linear searches of large arrays.\n *\n * @private\n * @param {Array} [values] The values to cache.\n * @returns {null|Object} Returns the new cache object if `Set` is supported, else `null`.\n */\n function createCache(values) {\n return nativeCreate && Set ? new _lodashInternalSetCache['default'](values) : null;\n }\n\n exports['default'] = createCache;\n});","define('lodash/internal/createCompounder', ['exports', 'lodash/string/deburr', 'lodash/string/words'], function (exports, _lodashStringDeburr, _lodashStringWords) {\n 'use strict';\n\n /**\n * Creates a function that produces compound words out of the words in a\n * given string.\n *\n * @private\n * @param {Function} callback The function to combine each word.\n * @returns {Function} Returns the new compounder function.\n */\n function createCompounder(callback) {\n return function (string) {\n var index = -1,\n array = (0, _lodashStringWords['default'])((0, _lodashStringDeburr['default'])(string)),\n length = array.length,\n result = '';\n\n while (++index < length) {\n result = callback(result, array[index], index);\n }\n return result;\n };\n }\n\n exports['default'] = createCompounder;\n});","define('lodash/internal/createCtorWrapper', ['exports', 'lodash/internal/baseCreate', 'lodash/lang/isObject'], function (exports, _lodashInternalBaseCreate, _lodashLangIsObject) {\n 'use strict';\n\n /**\n * Creates a function that produces an instance of `Ctor` regardless of\n * whether it was invoked as part of a `new` expression or by `call` or `apply`.\n *\n * @private\n * @param {Function} Ctor The constructor to wrap.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCtorWrapper(Ctor) {\n return function () {\n // Use a `switch` statement to work with class constructors.\n // See http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n // for more details.\n var args = arguments;\n switch (args.length) {\n case 0:\n return new Ctor();\n case 1:\n return new Ctor(args[0]);\n case 2:\n return new Ctor(args[0], args[1]);\n case 3:\n return new Ctor(args[0], args[1], args[2]);\n case 4:\n return new Ctor(args[0], args[1], args[2], args[3]);\n case 5:\n return new Ctor(args[0], args[1], args[2], args[3], args[4]);\n case 6:\n return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\n case 7:\n return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\n }\n var thisBinding = (0, _lodashInternalBaseCreate['default'])(Ctor.prototype),\n result = Ctor.apply(thisBinding, args);\n\n // Mimic the constructor's `return` behavior.\n // See https://es5.github.io/#x13.2.2 for more details.\n return (0, _lodashLangIsObject['default'])(result) ? result : thisBinding;\n };\n }\n\n exports['default'] = createCtorWrapper;\n});","define('lodash/internal/createCurry', ['exports', 'lodash/internal/createWrapper', 'lodash/internal/isIterateeCall'], function (exports, _lodashInternalCreateWrapper, _lodashInternalIsIterateeCall) {\n 'use strict';\n\n /**\n * Creates a `_.curry` or `_.curryRight` function.\n *\n * @private\n * @param {boolean} flag The curry bit flag.\n * @returns {Function} Returns the new curry function.\n */\n function createCurry(flag) {\n function curryFunc(func, arity, guard) {\n if (guard && (0, _lodashInternalIsIterateeCall['default'])(func, arity, guard)) {\n arity = undefined;\n }\n var result = (0, _lodashInternalCreateWrapper['default'])(func, flag, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curryFunc.placeholder;\n return result;\n }\n return curryFunc;\n }\n\n exports['default'] = createCurry;\n});","define('lodash/internal/createDefaults', ['exports', 'lodash/function/restParam'], function (exports, _lodashFunctionRestParam) {\n 'use strict';\n\n /**\n * Creates a `_.defaults` or `_.defaultsDeep` function.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Function} Returns the new defaults function.\n */\n function createDefaults(assigner, customizer) {\n return (0, _lodashFunctionRestParam['default'])(function (args) {\n var object = args[0];\n if (object == null) {\n return object;\n }\n args.push(customizer);\n return assigner.apply(undefined, args);\n });\n }\n\n exports['default'] = createDefaults;\n});","define('lodash/internal/createExtremum', ['exports', 'lodash/internal/arrayExtremum', 'lodash/internal/baseCallback', 'lodash/internal/baseExtremum', 'lodash/lang/isArray', 'lodash/internal/isIterateeCall', 'lodash/internal/toIterable'], function (exports, _lodashInternalArrayExtremum, _lodashInternalBaseCallback, _lodashInternalBaseExtremum, _lodashLangIsArray, _lodashInternalIsIterateeCall, _lodashInternalToIterable) {\n 'use strict';\n\n /**\n * Creates a `_.max` or `_.min` function.\n *\n * @private\n * @param {Function} comparator The function used to compare values.\n * @param {*} exValue The initial extremum value.\n * @returns {Function} Returns the new extremum function.\n */\n function createExtremum(comparator, exValue) {\n return function (collection, iteratee, thisArg) {\n if (thisArg && (0, _lodashInternalIsIterateeCall['default'])(collection, iteratee, thisArg)) {\n iteratee = undefined;\n }\n iteratee = (0, _lodashInternalBaseCallback['default'])(iteratee, thisArg, 3);\n if (iteratee.length == 1) {\n collection = (0, _lodashLangIsArray['default'])(collection) ? collection : (0, _lodashInternalToIterable['default'])(collection);\n var result = (0, _lodashInternalArrayExtremum['default'])(collection, iteratee, comparator, exValue);\n if (!(collection.length && result === exValue)) {\n return result;\n }\n }\n return (0, _lodashInternalBaseExtremum['default'])(collection, iteratee, comparator, exValue);\n };\n }\n\n exports['default'] = createExtremum;\n});","define('lodash/internal/createFind', ['exports', 'lodash/internal/baseCallback', 'lodash/internal/baseFind', 'lodash/internal/baseFindIndex', 'lodash/lang/isArray'], function (exports, _lodashInternalBaseCallback, _lodashInternalBaseFind, _lodashInternalBaseFindIndex, _lodashLangIsArray) {\n 'use strict';\n\n /**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new find function.\n */\n function createFind(eachFunc, fromRight) {\n return function (collection, predicate, thisArg) {\n predicate = (0, _lodashInternalBaseCallback['default'])(predicate, thisArg, 3);\n if ((0, _lodashLangIsArray['default'])(collection)) {\n var index = (0, _lodashInternalBaseFindIndex['default'])(collection, predicate, fromRight);\n return index > -1 ? collection[index] : undefined;\n }\n return (0, _lodashInternalBaseFind['default'])(collection, predicate, eachFunc);\n };\n }\n\n exports['default'] = createFind;\n});","define('lodash/internal/createFindIndex', ['exports', 'lodash/internal/baseCallback', 'lodash/internal/baseFindIndex'], function (exports, _lodashInternalBaseCallback, _lodashInternalBaseFindIndex) {\n 'use strict';\n\n /**\n * Creates a `_.findIndex` or `_.findLastIndex` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new find function.\n */\n function createFindIndex(fromRight) {\n return function (array, predicate, thisArg) {\n if (!(array && array.length)) {\n return -1;\n }\n predicate = (0, _lodashInternalBaseCallback['default'])(predicate, thisArg, 3);\n return (0, _lodashInternalBaseFindIndex['default'])(array, predicate, fromRight);\n };\n }\n\n exports['default'] = createFindIndex;\n});","define('lodash/internal/createFindKey', ['exports', 'lodash/internal/baseCallback', 'lodash/internal/baseFind'], function (exports, _lodashInternalBaseCallback, _lodashInternalBaseFind) {\n 'use strict';\n\n /**\n * Creates a `_.findKey` or `_.findLastKey` function.\n *\n * @private\n * @param {Function} objectFunc The function to iterate over an object.\n * @returns {Function} Returns the new find function.\n */\n function createFindKey(objectFunc) {\n return function (object, predicate, thisArg) {\n predicate = (0, _lodashInternalBaseCallback['default'])(predicate, thisArg, 3);\n return (0, _lodashInternalBaseFind['default'])(object, predicate, objectFunc, true);\n };\n }\n\n exports['default'] = createFindKey;\n});","define('lodash/internal/createFlow', ['exports', 'lodash/internal/LodashWrapper', 'lodash/internal/getData', 'lodash/internal/getFuncName', 'lodash/lang/isArray', 'lodash/internal/isLaziable'], function (exports, _lodashInternalLodashWrapper, _lodashInternalGetData, _lodashInternalGetFuncName, _lodashLangIsArray, _lodashInternalIsLaziable) {\n 'use strict';\n\n /** Used to compose bitmasks for wrapper metadata. */\n var CURRY_FLAG = 8,\n PARTIAL_FLAG = 32,\n ARY_FLAG = 128,\n REARG_FLAG = 256;\n\n /** Used as the size to enable large array optimizations. */\n var LARGE_ARRAY_SIZE = 200;\n\n /** Used as the `TypeError` message for \"Functions\" methods. */\n var FUNC_ERROR_TEXT = 'Expected a function';\n\n /**\n * Creates a `_.flow` or `_.flowRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new flow function.\n */\n function createFlow(fromRight) {\n return function () {\n var wrapper,\n length = arguments.length,\n index = fromRight ? length : -1,\n leftIndex = 0,\n funcs = Array(length);\n\n while (fromRight ? index-- : ++index < length) {\n var func = funcs[leftIndex++] = arguments[index];\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (!wrapper && _lodashInternalLodashWrapper['default'].prototype.thru && (0, _lodashInternalGetFuncName['default'])(func) == 'wrapper') {\n wrapper = new _lodashInternalLodashWrapper['default']([], true);\n }\n }\n index = wrapper ? -1 : length;\n while (++index < length) {\n func = funcs[index];\n\n var funcName = (0, _lodashInternalGetFuncName['default'])(func),\n data = funcName == 'wrapper' ? (0, _lodashInternalGetData['default'])(func) : undefined;\n\n if (data && (0, _lodashInternalIsLaziable['default'])(data[0]) && data[1] == (ARY_FLAG | CURRY_FLAG | PARTIAL_FLAG | REARG_FLAG) && !data[4].length && data[9] == 1) {\n wrapper = wrapper[(0, _lodashInternalGetFuncName['default'])(data[0])].apply(wrapper, data[3]);\n } else {\n wrapper = func.length == 1 && (0, _lodashInternalIsLaziable['default'])(func) ? wrapper[funcName]() : wrapper.thru(func);\n }\n }\n return function () {\n var args = arguments,\n value = args[0];\n\n if (wrapper && args.length == 1 && (0, _lodashLangIsArray['default'])(value) && value.length >= LARGE_ARRAY_SIZE) {\n return wrapper.plant(value).value();\n }\n var index = 0,\n result = length ? funcs[index].apply(this, args) : value;\n\n while (++index < length) {\n result = funcs[index].call(this, result);\n }\n return result;\n };\n };\n }\n\n exports['default'] = createFlow;\n});","define('lodash/internal/createForEach', ['exports', 'lodash/internal/bindCallback', 'lodash/lang/isArray'], function (exports, _lodashInternalBindCallback, _lodashLangIsArray) {\n 'use strict';\n\n /**\n * Creates a function for `_.forEach` or `_.forEachRight`.\n *\n * @private\n * @param {Function} arrayFunc The function to iterate over an array.\n * @param {Function} eachFunc The function to iterate over a collection.\n * @returns {Function} Returns the new each function.\n */\n function createForEach(arrayFunc, eachFunc) {\n return function (collection, iteratee, thisArg) {\n return typeof iteratee == 'function' && thisArg === undefined && (0, _lodashLangIsArray['default'])(collection) ? arrayFunc(collection, iteratee) : eachFunc(collection, (0, _lodashInternalBindCallback['default'])(iteratee, thisArg, 3));\n };\n }\n\n exports['default'] = createForEach;\n});","define('lodash/internal/createForIn', ['exports', 'lodash/internal/bindCallback', 'lodash/object/keysIn'], function (exports, _lodashInternalBindCallback, _lodashObjectKeysIn) {\n 'use strict';\n\n /**\n * Creates a function for `_.forIn` or `_.forInRight`.\n *\n * @private\n * @param {Function} objectFunc The function to iterate over an object.\n * @returns {Function} Returns the new each function.\n */\n function createForIn(objectFunc) {\n return function (object, iteratee, thisArg) {\n if (typeof iteratee != 'function' || thisArg !== undefined) {\n iteratee = (0, _lodashInternalBindCallback['default'])(iteratee, thisArg, 3);\n }\n return objectFunc(object, iteratee, _lodashObjectKeysIn['default']);\n };\n }\n\n exports['default'] = createForIn;\n});","define('lodash/internal/createForOwn', ['exports', 'lodash/internal/bindCallback'], function (exports, _lodashInternalBindCallback) {\n 'use strict';\n\n /**\n * Creates a function for `_.forOwn` or `_.forOwnRight`.\n *\n * @private\n * @param {Function} objectFunc The function to iterate over an object.\n * @returns {Function} Returns the new each function.\n */\n function createForOwn(objectFunc) {\n return function (object, iteratee, thisArg) {\n if (typeof iteratee != 'function' || thisArg !== undefined) {\n iteratee = (0, _lodashInternalBindCallback['default'])(iteratee, thisArg, 3);\n }\n return objectFunc(object, iteratee);\n };\n }\n\n exports['default'] = createForOwn;\n});","define('lodash/internal/createHybridWrapper', ['exports', 'lodash/internal/arrayCopy', 'lodash/internal/composeArgs', 'lodash/internal/composeArgsRight', 'lodash/internal/createCtorWrapper', 'lodash/internal/isLaziable', 'lodash/internal/reorder', 'lodash/internal/replaceHolders', 'lodash/internal/root', 'lodash/internal/setData'], function (exports, _lodashInternalArrayCopy, _lodashInternalComposeArgs, _lodashInternalComposeArgsRight, _lodashInternalCreateCtorWrapper, _lodashInternalIsLaziable, _lodashInternalReorder, _lodashInternalReplaceHolders, _lodashInternalRoot, _lodashInternalSetData) {\n 'use strict';\n\n /** Used to compose bitmasks for wrapper metadata. */\n var BIND_FLAG = 1,\n BIND_KEY_FLAG = 2,\n CURRY_BOUND_FLAG = 4,\n CURRY_FLAG = 8,\n CURRY_RIGHT_FLAG = 16,\n PARTIAL_FLAG = 32,\n PARTIAL_RIGHT_FLAG = 64,\n ARY_FLAG = 128;\n\n /* Native method references for those with the same name as other `lodash` methods. */\n var nativeMax = Math.max;\n\n /**\n * Creates a function that wraps `func` and invokes it with optional `this`\n * binding of, partial application, and currying.\n *\n * @private\n * @param {Function|string} func The function or method name to reference.\n * @param {number} bitmask The bitmask of flags. See `createWrapper` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [partialsRight] The arguments to append to those provided to the new function.\n * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createHybridWrapper(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n var isAry = bitmask & ARY_FLAG,\n isBind = bitmask & BIND_FLAG,\n isBindKey = bitmask & BIND_KEY_FLAG,\n isCurry = bitmask & CURRY_FLAG,\n isCurryBound = bitmask & CURRY_BOUND_FLAG,\n isCurryRight = bitmask & CURRY_RIGHT_FLAG,\n Ctor = isBindKey ? undefined : (0, _lodashInternalCreateCtorWrapper['default'])(func);\n\n function wrapper() {\n // Avoid `arguments` object use disqualifying optimizations by\n // converting it to an array before providing it to other functions.\n var length = arguments.length,\n index = length,\n args = Array(length);\n\n while (index--) {\n args[index] = arguments[index];\n }\n if (partials) {\n args = (0, _lodashInternalComposeArgs['default'])(args, partials, holders);\n }\n if (partialsRight) {\n args = (0, _lodashInternalComposeArgsRight['default'])(args, partialsRight, holdersRight);\n }\n if (isCurry || isCurryRight) {\n var placeholder = wrapper.placeholder,\n argsHolders = (0, _lodashInternalReplaceHolders['default'])(args, placeholder);\n\n length -= argsHolders.length;\n if (length < arity) {\n var newArgPos = argPos ? (0, _lodashInternalArrayCopy['default'])(argPos) : undefined,\n newArity = nativeMax(arity - length, 0),\n newsHolders = isCurry ? argsHolders : undefined,\n newHoldersRight = isCurry ? undefined : argsHolders,\n newPartials = isCurry ? args : undefined,\n newPartialsRight = isCurry ? undefined : args;\n\n bitmask |= isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG;\n bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG);\n\n if (!isCurryBound) {\n bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG);\n }\n var newData = [func, bitmask, thisArg, newPartials, newsHolders, newPartialsRight, newHoldersRight, newArgPos, ary, newArity],\n result = createHybridWrapper.apply(undefined, newData);\n\n if ((0, _lodashInternalIsLaziable['default'])(func)) {\n (0, _lodashInternalSetData['default'])(result, newData);\n }\n result.placeholder = placeholder;\n return result;\n }\n }\n var thisBinding = isBind ? thisArg : this,\n fn = isBindKey ? thisBinding[func] : func;\n\n if (argPos) {\n args = (0, _lodashInternalReorder['default'])(args, argPos);\n }\n if (isAry && ary < args.length) {\n args.length = ary;\n }\n if (this && this !== _lodashInternalRoot['default'] && this instanceof wrapper) {\n fn = Ctor || (0, _lodashInternalCreateCtorWrapper['default'])(func);\n }\n return fn.apply(thisBinding, args);\n }\n return wrapper;\n }\n\n exports['default'] = createHybridWrapper;\n});","define('lodash/internal/createObjectMapper', ['exports', 'lodash/internal/baseCallback', 'lodash/internal/baseForOwn'], function (exports, _lodashInternalBaseCallback, _lodashInternalBaseForOwn) {\n 'use strict';\n\n /**\n * Creates a function for `_.mapKeys` or `_.mapValues`.\n *\n * @private\n * @param {boolean} [isMapKeys] Specify mapping keys instead of values.\n * @returns {Function} Returns the new map function.\n */\n function createObjectMapper(isMapKeys) {\n return function (object, iteratee, thisArg) {\n var result = {};\n iteratee = (0, _lodashInternalBaseCallback['default'])(iteratee, thisArg, 3);\n\n (0, _lodashInternalBaseForOwn['default'])(object, function (value, key, object) {\n var mapped = iteratee(value, key, object);\n key = isMapKeys ? mapped : key;\n value = isMapKeys ? value : mapped;\n result[key] = value;\n });\n return result;\n };\n }\n\n exports['default'] = createObjectMapper;\n});","define('lodash/internal/createPadDir', ['exports', 'lodash/internal/baseToString', 'lodash/internal/createPadding'], function (exports, _lodashInternalBaseToString, _lodashInternalCreatePadding) {\n 'use strict';\n\n /**\n * Creates a function for `_.padLeft` or `_.padRight`.\n *\n * @private\n * @param {boolean} [fromRight] Specify padding from the right.\n * @returns {Function} Returns the new pad function.\n */\n function createPadDir(fromRight) {\n return function (string, length, chars) {\n string = (0, _lodashInternalBaseToString['default'])(string);\n return (fromRight ? string : '') + (0, _lodashInternalCreatePadding['default'])(string, length, chars) + (fromRight ? '' : string);\n };\n }\n\n exports['default'] = createPadDir;\n});","define('lodash/internal/createPadding', ['exports', 'lodash/string/repeat', 'lodash/internal/root'], function (exports, _lodashStringRepeat, _lodashInternalRoot) {\n 'use strict';\n\n /* Native method references for those with the same name as other `lodash` methods. */\n var nativeCeil = Math.ceil,\n nativeIsFinite = _lodashInternalRoot['default'].isFinite;\n\n /**\n * Creates the padding required for `string` based on the given `length`.\n * The `chars` string is truncated if the number of characters exceeds `length`.\n *\n * @private\n * @param {string} string The string to create padding for.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the pad for `string`.\n */\n function createPadding(string, length, chars) {\n var strLength = string.length;\n length = +length;\n\n if (strLength >= length || !nativeIsFinite(length)) {\n return '';\n }\n var padLength = length - strLength;\n chars = chars == null ? ' ' : chars + '';\n return (0, _lodashStringRepeat['default'])(chars, nativeCeil(padLength / chars.length)).slice(0, padLength);\n }\n\n exports['default'] = createPadding;\n});","define('lodash/internal/createPartial', ['exports', 'lodash/internal/createWrapper', 'lodash/internal/replaceHolders', 'lodash/function/restParam'], function (exports, _lodashInternalCreateWrapper, _lodashInternalReplaceHolders, _lodashFunctionRestParam) {\n 'use strict';\n\n /**\n * Creates a `_.partial` or `_.partialRight` function.\n *\n * @private\n * @param {boolean} flag The partial bit flag.\n * @returns {Function} Returns the new partial function.\n */\n function createPartial(flag) {\n var partialFunc = (0, _lodashFunctionRestParam['default'])(function (func, partials) {\n var holders = (0, _lodashInternalReplaceHolders['default'])(partials, partialFunc.placeholder);\n return (0, _lodashInternalCreateWrapper['default'])(func, flag, undefined, partials, holders);\n });\n return partialFunc;\n }\n\n exports['default'] = createPartial;\n});","define('lodash/internal/createPartialWrapper', ['exports', 'lodash/internal/createCtorWrapper', 'lodash/internal/root'], function (exports, _lodashInternalCreateCtorWrapper, _lodashInternalRoot) {\n 'use strict';\n\n /** Used to compose bitmasks for wrapper metadata. */\n var BIND_FLAG = 1;\n\n /**\n * Creates a function that wraps `func` and invokes it with the optional `this`\n * binding of `thisArg` and the `partials` prepended to those provided to\n * the wrapper.\n *\n * @private\n * @param {Function} func The function to partially apply arguments to.\n * @param {number} bitmask The bitmask of flags. See `createWrapper` for more details.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} partials The arguments to prepend to those provided to the new function.\n * @returns {Function} Returns the new bound function.\n */\n function createPartialWrapper(func, bitmask, thisArg, partials) {\n var isBind = bitmask & BIND_FLAG,\n Ctor = (0, _lodashInternalCreateCtorWrapper['default'])(func);\n\n function wrapper() {\n // Avoid `arguments` object use disqualifying optimizations by\n // converting it to an array before providing it `func`.\n var argsIndex = -1,\n argsLength = arguments.length,\n leftIndex = -1,\n leftLength = partials.length,\n args = Array(leftLength + argsLength);\n\n while (++leftIndex < leftLength) {\n args[leftIndex] = partials[leftIndex];\n }\n while (argsLength--) {\n args[leftIndex++] = arguments[++argsIndex];\n }\n var fn = this && this !== _lodashInternalRoot['default'] && this instanceof wrapper ? Ctor : func;\n return fn.apply(isBind ? thisArg : this, args);\n }\n return wrapper;\n }\n\n exports['default'] = createPartialWrapper;\n});","define('lodash/internal/createReduce', ['exports', 'lodash/internal/baseCallback', 'lodash/internal/baseReduce', 'lodash/lang/isArray'], function (exports, _lodashInternalBaseCallback, _lodashInternalBaseReduce, _lodashLangIsArray) {\n 'use strict';\n\n /**\n * Creates a function for `_.reduce` or `_.reduceRight`.\n *\n * @private\n * @param {Function} arrayFunc The function to iterate over an array.\n * @param {Function} eachFunc The function to iterate over a collection.\n * @returns {Function} Returns the new each function.\n */\n function createReduce(arrayFunc, eachFunc) {\n return function (collection, iteratee, accumulator, thisArg) {\n var initFromArray = arguments.length < 3;\n return typeof iteratee == 'function' && thisArg === undefined && (0, _lodashLangIsArray['default'])(collection) ? arrayFunc(collection, iteratee, accumulator, initFromArray) : (0, _lodashInternalBaseReduce['default'])(collection, (0, _lodashInternalBaseCallback['default'])(iteratee, thisArg, 4), accumulator, initFromArray, eachFunc);\n };\n }\n\n exports['default'] = createReduce;\n});","define(\"lodash/internal/createRound\", [\"exports\"], function (exports) {\n /** Native method references. */\n \"use strict\";\n\n var pow = Math.pow;\n\n /**\n * Creates a `_.ceil`, `_.floor`, or `_.round` function.\n *\n * @private\n * @param {string} methodName The name of the `Math` method to use when rounding.\n * @returns {Function} Returns the new round function.\n */\n function createRound(methodName) {\n var func = Math[methodName];\n return function (number, precision) {\n precision = precision === undefined ? 0 : +precision || 0;\n if (precision) {\n precision = pow(10, precision);\n return func(number * precision) / precision;\n }\n return func(number);\n };\n }\n\n exports[\"default\"] = createRound;\n});","define('lodash/internal/createSortedIndex', ['exports', 'lodash/internal/baseCallback', 'lodash/internal/binaryIndex', 'lodash/internal/binaryIndexBy'], function (exports, _lodashInternalBaseCallback, _lodashInternalBinaryIndex, _lodashInternalBinaryIndexBy) {\n 'use strict';\n\n /**\n * Creates a `_.sortedIndex` or `_.sortedLastIndex` function.\n *\n * @private\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {Function} Returns the new index function.\n */\n function createSortedIndex(retHighest) {\n return function (array, value, iteratee, thisArg) {\n return iteratee == null ? (0, _lodashInternalBinaryIndex['default'])(array, value, retHighest) : (0, _lodashInternalBinaryIndexBy['default'])(array, value, (0, _lodashInternalBaseCallback['default'])(iteratee, thisArg, 1), retHighest);\n };\n }\n\n exports['default'] = createSortedIndex;\n});","define('lodash/internal/createWrapper', ['exports', 'lodash/internal/baseSetData', 'lodash/internal/createBindWrapper', 'lodash/internal/createHybridWrapper', 'lodash/internal/createPartialWrapper', 'lodash/internal/getData', 'lodash/internal/mergeData', 'lodash/internal/setData'], function (exports, _lodashInternalBaseSetData, _lodashInternalCreateBindWrapper, _lodashInternalCreateHybridWrapper, _lodashInternalCreatePartialWrapper, _lodashInternalGetData, _lodashInternalMergeData, _lodashInternalSetData) {\n 'use strict';\n\n /** Used to compose bitmasks for wrapper metadata. */\n var BIND_FLAG = 1,\n BIND_KEY_FLAG = 2,\n PARTIAL_FLAG = 32,\n PARTIAL_RIGHT_FLAG = 64;\n\n /** Used as the `TypeError` message for \"Functions\" methods. */\n var FUNC_ERROR_TEXT = 'Expected a function';\n\n /* Native method references for those with the same name as other `lodash` methods. */\n var nativeMax = Math.max;\n\n /**\n * Creates a function that either curries or invokes `func` with optional\n * `this` binding and partially applied arguments.\n *\n * @private\n * @param {Function|string} func The function or method name to reference.\n * @param {number} bitmask The bitmask of flags.\n * The bitmask may be composed of the following flags:\n * 1 - `_.bind`\n * 2 - `_.bindKey`\n * 4 - `_.curry` or `_.curryRight` of a bound function\n * 8 - `_.curry`\n * 16 - `_.curryRight`\n * 32 - `_.partial`\n * 64 - `_.partialRight`\n * 128 - `_.rearg`\n * 256 - `_.ary`\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to be partially applied.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\n var isBindKey = bitmask & BIND_KEY_FLAG;\n if (!isBindKey && typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var length = partials ? partials.length : 0;\n if (!length) {\n bitmask &= ~(PARTIAL_FLAG | PARTIAL_RIGHT_FLAG);\n partials = holders = undefined;\n }\n length -= holders ? holders.length : 0;\n if (bitmask & PARTIAL_RIGHT_FLAG) {\n var partialsRight = partials,\n holdersRight = holders;\n\n partials = holders = undefined;\n }\n var data = isBindKey ? undefined : (0, _lodashInternalGetData['default'])(func),\n newData = [func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity];\n\n if (data) {\n (0, _lodashInternalMergeData['default'])(newData, data);\n bitmask = newData[1];\n arity = newData[9];\n }\n newData[9] = arity == null ? isBindKey ? 0 : func.length : nativeMax(arity - length, 0) || 0;\n\n if (bitmask == BIND_FLAG) {\n var result = (0, _lodashInternalCreateBindWrapper['default'])(newData[0], newData[2]);\n } else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !newData[4].length) {\n result = _lodashInternalCreatePartialWrapper['default'].apply(undefined, newData);\n } else {\n result = _lodashInternalCreateHybridWrapper['default'].apply(undefined, newData);\n }\n var setter = data ? _lodashInternalBaseSetData['default'] : _lodashInternalSetData['default'];\n return setter(result, newData);\n }\n\n exports['default'] = createWrapper;\n});","define('lodash/internal/deburrLetter', ['exports'], function (exports) {\n /** Used to map latin-1 supplementary letters to basic latin letters. */\n 'use strict';\n\n var deburredLetters = {\n '\\xc0': 'A', '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n '\\xe0': 'a', '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n '\\xc7': 'C', '\\xe7': 'c',\n '\\xd0': 'D', '\\xf0': 'd',\n '\\xc8': 'E', '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n '\\xe8': 'e', '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n '\\xcC': 'I', '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n '\\xeC': 'i', '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n '\\xd1': 'N', '\\xf1': 'n',\n '\\xd2': 'O', '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n '\\xf2': 'o', '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n '\\xd9': 'U', '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n '\\xf9': 'u', '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n '\\xdd': 'Y', '\\xfd': 'y', '\\xff': 'y',\n '\\xc6': 'Ae', '\\xe6': 'ae',\n '\\xde': 'Th', '\\xfe': 'th',\n '\\xdf': 'ss'\n };\n\n /**\n * Used by `_.deburr` to convert latin-1 supplementary letters to basic latin letters.\n *\n * @private\n * @param {string} letter The matched letter to deburr.\n * @returns {string} Returns the deburred letter.\n */\n function deburrLetter(letter) {\n return deburredLetters[letter];\n }\n\n exports['default'] = deburrLetter;\n});","define('lodash/internal/equalArrays', ['exports', 'lodash/internal/arraySome'], function (exports, _lodashInternalArraySome) {\n 'use strict';\n\n /**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} [customizer] The function to customize comparing arrays.\n * @param {boolean} [isLoose] Specify performing partial comparisons.\n * @param {Array} [stackA] Tracks traversed `value` objects.\n * @param {Array} [stackB] Tracks traversed `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\n function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) {\n var index = -1,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isLoose && othLength > arrLength)) {\n return false;\n }\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index],\n result = customizer ? customizer(isLoose ? othValue : arrValue, isLoose ? arrValue : othValue, index) : undefined;\n\n if (result !== undefined) {\n if (result) {\n continue;\n }\n return false;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (isLoose) {\n if (!(0, _lodashInternalArraySome['default'])(other, function (othValue) {\n return arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB);\n })) {\n return false;\n }\n } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB))) {\n return false;\n }\n }\n return true;\n }\n\n exports['default'] = equalArrays;\n});","define('lodash/internal/equalByTag', ['exports'], function (exports) {\n /** `Object#toString` result references. */\n 'use strict';\n\n var boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n stringTag = '[object String]';\n\n /**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalByTag(object, other, tag) {\n switch (tag) {\n case boolTag:\n case dateTag:\n // Coerce dates and booleans to numbers, dates to milliseconds and booleans\n // to `1` or `0` treating invalid dates coerced to `NaN` as not equal.\n return +object == +other;\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case numberTag:\n // Treat `NaN` vs. `NaN` as equal.\n return object != +object ? other != +other : object == +other;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings primitives and string\n // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details.\n return object == other + '';\n }\n return false;\n }\n\n exports['default'] = equalByTag;\n});","define('lodash/internal/equalObjects', ['exports', 'lodash/object/keys'], function (exports, _lodashObjectKeys) {\n 'use strict';\n\n /** Used for native method references. */\n var objectProto = Object.prototype;\n\n /** Used to check objects for own properties. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} [customizer] The function to customize comparing values.\n * @param {boolean} [isLoose] Specify performing partial comparisons.\n * @param {Array} [stackA] Tracks traversed `value` objects.\n * @param {Array} [stackB] Tracks traversed `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) {\n var objProps = (0, _lodashObjectKeys['default'])(object),\n objLength = objProps.length,\n othProps = (0, _lodashObjectKeys['default'])(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isLoose) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n var skipCtor = isLoose;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key],\n result = customizer ? customizer(isLoose ? othValue : objValue, isLoose ? objValue : othValue, key) : undefined;\n\n // Recursively compare objects (susceptible to call stack limits).\n if (!(result === undefined ? equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB) : result)) {\n return false;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (!skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n return false;\n }\n }\n return true;\n }\n\n exports['default'] = equalObjects;\n});","define('lodash/internal/escapeHtmlChar', ['exports'], function (exports) {\n /** Used to map characters to HTML entities. */\n 'use strict';\n\n var htmlEscapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '`': '`'\n };\n\n /**\n * Used by `_.escape` to convert characters to HTML entities.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n function escapeHtmlChar(chr) {\n return htmlEscapes[chr];\n }\n\n exports['default'] = escapeHtmlChar;\n});","define('lodash/internal/escapeRegExpChar', ['exports'], function (exports) {\n /** Used to escape characters for inclusion in compiled regexes. */\n 'use strict';\n\n var regexpEscapes = {\n '0': 'x30', '1': 'x31', '2': 'x32', '3': 'x33', '4': 'x34',\n '5': 'x35', '6': 'x36', '7': 'x37', '8': 'x38', '9': 'x39',\n 'A': 'x41', 'B': 'x42', 'C': 'x43', 'D': 'x44', 'E': 'x45', 'F': 'x46',\n 'a': 'x61', 'b': 'x62', 'c': 'x63', 'd': 'x64', 'e': 'x65', 'f': 'x66',\n 'n': 'x6e', 'r': 'x72', 't': 'x74', 'u': 'x75', 'v': 'x76', 'x': 'x78'\n };\n\n /** Used to escape characters for inclusion in compiled string literals. */\n var stringEscapes = {\n '\\\\': '\\\\',\n \"'\": \"'\",\n '\\n': 'n',\n '\\r': 'r',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n };\n\n /**\n * Used by `_.escapeRegExp` to escape characters for inclusion in compiled regexes.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @param {string} leadingChar The capture group for a leading character.\n * @param {string} whitespaceChar The capture group for a whitespace character.\n * @returns {string} Returns the escaped character.\n */\n function escapeRegExpChar(chr, leadingChar, whitespaceChar) {\n if (leadingChar) {\n chr = regexpEscapes[chr];\n } else if (whitespaceChar) {\n chr = stringEscapes[chr];\n }\n return '\\\\' + chr;\n }\n\n exports['default'] = escapeRegExpChar;\n});","define('lodash/internal/escapeStringChar', ['exports'], function (exports) {\n /** Used to escape characters for inclusion in compiled string literals. */\n 'use strict';\n\n var stringEscapes = {\n '\\\\': '\\\\',\n \"'\": \"'\",\n '\\n': 'n',\n '\\r': 'r',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n };\n\n /**\n * Used by `_.template` to escape characters for inclusion in compiled string literals.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n function escapeStringChar(chr) {\n return '\\\\' + stringEscapes[chr];\n }\n\n exports['default'] = escapeStringChar;\n});","define('lodash/internal/getData', ['exports', 'lodash/internal/metaMap', 'lodash/utility/noop'], function (exports, _lodashInternalMetaMap, _lodashUtilityNoop) {\n 'use strict';\n\n /**\n * Gets metadata for `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {*} Returns the metadata for `func`.\n */\n var getData = !_lodashInternalMetaMap['default'] ? _lodashUtilityNoop['default'] : function (func) {\n return _lodashInternalMetaMap['default'].get(func);\n };\n\n exports['default'] = getData;\n});","define('lodash/internal/getFuncName', ['exports', 'lodash/internal/realNames'], function (exports, _lodashInternalRealNames) {\n 'use strict';\n\n /**\n * Gets the name of `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {string} Returns the function name.\n */\n function getFuncName(func) {\n var result = func.name + '',\n array = _lodashInternalRealNames['default'][result],\n length = array ? array.length : 0;\n\n while (length--) {\n var data = array[length],\n otherFunc = data.func;\n if (otherFunc == null || otherFunc == func) {\n return data.name;\n }\n }\n return result;\n }\n\n exports['default'] = getFuncName;\n});","define('lodash/internal/getLength', ['exports', 'lodash/internal/baseProperty'], function (exports, _lodashInternalBaseProperty) {\n 'use strict';\n\n /**\n * Gets the \"length\" property value of `object`.\n *\n * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)\n * that affects Safari on at least iOS 8.1-8.3 ARM64.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {*} Returns the \"length\" value.\n */\n var getLength = (0, _lodashInternalBaseProperty['default'])('length');\n\n exports['default'] = getLength;\n});","define('lodash/internal/getMatchData', ['exports', 'lodash/internal/isStrictComparable', 'lodash/object/pairs'], function (exports, _lodashInternalIsStrictComparable, _lodashObjectPairs) {\n 'use strict';\n\n /**\n * Gets the propery names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\n function getMatchData(object) {\n var result = (0, _lodashObjectPairs['default'])(object),\n length = result.length;\n\n while (length--) {\n result[length][2] = (0, _lodashInternalIsStrictComparable['default'])(result[length][1]);\n }\n return result;\n }\n\n exports['default'] = getMatchData;\n});","define('lodash/internal/getNative', ['exports', 'lodash/lang/isNative'], function (exports, _lodashLangIsNative) {\n 'use strict';\n\n /**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\n function getNative(object, key) {\n var value = object == null ? undefined : object[key];\n return (0, _lodashLangIsNative['default'])(value) ? value : undefined;\n }\n\n exports['default'] = getNative;\n});","define('lodash/internal/getView', ['exports'], function (exports) {\n /* Native method references for those with the same name as other `lodash` methods. */\n 'use strict';\n\n var nativeMax = Math.max,\n nativeMin = Math.min;\n\n /**\n * Gets the view, applying any `transforms` to the `start` and `end` positions.\n *\n * @private\n * @param {number} start The start of the view.\n * @param {number} end The end of the view.\n * @param {Array} transforms The transformations to apply to the view.\n * @returns {Object} Returns an object containing the `start` and `end`\n * positions of the view.\n */\n function getView(start, end, transforms) {\n var index = -1,\n length = transforms.length;\n\n while (++index < length) {\n var data = transforms[index],\n size = data.size;\n\n switch (data.type) {\n case 'drop':\n start += size;break;\n case 'dropRight':\n end -= size;break;\n case 'take':\n end = nativeMin(end, start + size);break;\n case 'takeRight':\n start = nativeMax(start, end - size);break;\n }\n }\n return { 'start': start, 'end': end };\n }\n\n exports['default'] = getView;\n});","define(\"lodash/internal/indexOfNaN\", [\"exports\"], function (exports) {\n /**\n * Gets the index at which the first occurrence of `NaN` is found in `array`.\n *\n * @private\n * @param {Array} array The array to search.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched `NaN`, else `-1`.\n */\n \"use strict\";\n\n function indexOfNaN(array, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 0 : -1);\n\n while (fromRight ? index-- : ++index < length) {\n var other = array[index];\n if (other !== other) {\n return index;\n }\n }\n return -1;\n }\n\n exports[\"default\"] = indexOfNaN;\n});","define('lodash/internal/initCloneArray', ['exports'], function (exports) {\n /** Used for native method references. */\n 'use strict';\n\n var objectProto = Object.prototype;\n\n /** Used to check objects for own properties. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\n function initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add array properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n }\n\n exports['default'] = initCloneArray;\n});","define('lodash/internal/initCloneByTag', ['exports', 'lodash/internal/bufferClone'], function (exports, _lodashInternalBufferClone) {\n 'use strict';\n\n /** `Object#toString` result references. */\n var boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n stringTag = '[object String]';\n\n var arrayBufferTag = '[object ArrayBuffer]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n /** Used to match `RegExp` flags from their coerced string values. */\n var reFlags = /\\w*$/;\n\n /**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return (0, _lodashInternalBufferClone['default'])(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case float32Tag:case float64Tag:\n case int8Tag:case int16Tag:case int32Tag:\n case uint8Tag:case uint8ClampedTag:case uint16Tag:case uint32Tag:\n var buffer = object.buffer;\n return new Ctor(isDeep ? (0, _lodashInternalBufferClone['default'])(buffer) : buffer, object.byteOffset, object.length);\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n var result = new Ctor(object.source, reFlags.exec(object));\n result.lastIndex = object.lastIndex;\n }\n return result;\n }\n\n exports['default'] = initCloneByTag;\n});","define('lodash/internal/initCloneObject', ['exports'], function (exports) {\n /**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\n 'use strict';\n\n function initCloneObject(object) {\n var Ctor = object.constructor;\n if (!(typeof Ctor == 'function' && Ctor instanceof Ctor)) {\n Ctor = Object;\n }\n return new Ctor();\n }\n\n exports['default'] = initCloneObject;\n});","define('lodash/internal/invokePath', ['exports', 'lodash/internal/baseGet', 'lodash/internal/baseSlice', 'lodash/internal/isKey', 'lodash/array/last', 'lodash/internal/toPath'], function (exports, _lodashInternalBaseGet, _lodashInternalBaseSlice, _lodashInternalIsKey, _lodashArrayLast, _lodashInternalToPath) {\n 'use strict';\n\n /**\n * Invokes the method at `path` on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {Array} args The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n */\n function invokePath(object, path, args) {\n if (object != null && !(0, _lodashInternalIsKey['default'])(path, object)) {\n path = (0, _lodashInternalToPath['default'])(path);\n object = path.length == 1 ? object : (0, _lodashInternalBaseGet['default'])(object, (0, _lodashInternalBaseSlice['default'])(path, 0, -1));\n path = (0, _lodashArrayLast['default'])(path);\n }\n var func = object == null ? object : object[path];\n return func == null ? undefined : func.apply(object, args);\n }\n\n exports['default'] = invokePath;\n});","define('lodash/internal/isArrayLike', ['exports', 'lodash/internal/getLength', 'lodash/internal/isLength'], function (exports, _lodashInternalGetLength, _lodashInternalIsLength) {\n 'use strict';\n\n /**\n * Checks if `value` is array-like.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n */\n function isArrayLike(value) {\n return value != null && (0, _lodashInternalIsLength['default'])((0, _lodashInternalGetLength['default'])(value));\n }\n\n exports['default'] = isArrayLike;\n});","define('lodash/internal/isIndex', ['exports'], function (exports) {\n /** Used to detect unsigned integer values. */\n 'use strict';\n\n var reIsUint = /^\\d+$/;\n\n /**\n * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)\n * of an array-like value.\n */\n var MAX_SAFE_INTEGER = 9007199254740991;\n\n /**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\n function isIndex(value, length) {\n value = typeof value == 'number' || reIsUint.test(value) ? +value : -1;\n length = length == null ? MAX_SAFE_INTEGER : length;\n return value > -1 && value % 1 == 0 && value < length;\n }\n\n exports['default'] = isIndex;\n});","define('lodash/internal/isIterateeCall', ['exports', 'lodash/internal/isArrayLike', 'lodash/internal/isIndex', 'lodash/lang/isObject'], function (exports, _lodashInternalIsArrayLike, _lodashInternalIsIndex, _lodashLangIsObject) {\n 'use strict';\n\n /**\n * Checks if the provided arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`.\n */\n function isIterateeCall(value, index, object) {\n if (!(0, _lodashLangIsObject['default'])(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number' ? (0, _lodashInternalIsArrayLike['default'])(object) && (0, _lodashInternalIsIndex['default'])(index, object.length) : type == 'string' && index in object) {\n var other = object[index];\n return value === value ? value === other : other !== other;\n }\n return false;\n }\n\n exports['default'] = isIterateeCall;\n});","define('lodash/internal/isKey', ['exports', 'lodash/lang/isArray', 'lodash/internal/toObject'], function (exports, _lodashLangIsArray, _lodashInternalToObject) {\n 'use strict';\n\n /** Used to match property names within property paths. */\n var reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\n\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n /**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\n function isKey(value, object) {\n var type = typeof value;\n if (type == 'string' && reIsPlainProp.test(value) || type == 'number') {\n return true;\n }\n if ((0, _lodashLangIsArray['default'])(value)) {\n return false;\n }\n var result = !reIsDeepProp.test(value);\n return result || object != null && value in (0, _lodashInternalToObject['default'])(object);\n }\n\n exports['default'] = isKey;\n});","define('lodash/internal/isLaziable', ['exports', 'lodash/internal/LazyWrapper', 'lodash/internal/getData', 'lodash/internal/getFuncName', 'lodash/chain/lodash'], function (exports, _lodashInternalLazyWrapper, _lodashInternalGetData, _lodashInternalGetFuncName, _lodashChainLodash) {\n 'use strict';\n\n /**\n * Checks if `func` has a lazy counterpart.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` has a lazy counterpart, else `false`.\n */\n function isLaziable(func) {\n var funcName = (0, _lodashInternalGetFuncName['default'])(func),\n other = _lodashChainLodash['default'][funcName];\n\n if (typeof other != 'function' || !(funcName in _lodashInternalLazyWrapper['default'].prototype)) {\n return false;\n }\n if (func === other) {\n return true;\n }\n var data = (0, _lodashInternalGetData['default'])(other);\n return !!data && func === data[0];\n }\n\n exports['default'] = isLaziable;\n});","define('lodash/internal/isLength', ['exports'], function (exports) {\n /**\n * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)\n * of an array-like value.\n */\n 'use strict';\n\n var MAX_SAFE_INTEGER = 9007199254740991;\n\n /**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n */\n function isLength(value) {\n return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n }\n\n exports['default'] = isLength;\n});","define('lodash/internal/isObjectLike', ['exports'], function (exports) {\n /**\n * Checks if `value` is object-like.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n */\n 'use strict';\n\n function isObjectLike(value) {\n return !!value && typeof value == 'object';\n }\n\n exports['default'] = isObjectLike;\n});","define(\"lodash/internal/isSpace\", [\"exports\"], function (exports) {\n /**\n * Used by `trimmedLeftIndex` and `trimmedRightIndex` to determine if a\n * character code is whitespace.\n *\n * @private\n * @param {number} charCode The character code to inspect.\n * @returns {boolean} Returns `true` if `charCode` is whitespace, else `false`.\n */\n \"use strict\";\n\n function isSpace(charCode) {\n return charCode <= 160 && charCode >= 9 && charCode <= 13 || charCode == 32 || charCode == 160 || charCode == 5760 || charCode == 6158 || charCode >= 8192 && (charCode <= 8202 || charCode == 8232 || charCode == 8233 || charCode == 8239 || charCode == 8287 || charCode == 12288 || charCode == 65279);\n }\n\n exports[\"default\"] = isSpace;\n});","define('lodash/internal/isStrictComparable', ['exports', 'lodash/lang/isObject'], function (exports, _lodashLangIsObject) {\n 'use strict';\n\n /**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\n function isStrictComparable(value) {\n return value === value && !(0, _lodashLangIsObject['default'])(value);\n }\n\n exports['default'] = isStrictComparable;\n});","define('lodash/internal/lazyClone', ['exports', 'lodash/internal/LazyWrapper', 'lodash/internal/arrayCopy'], function (exports, _lodashInternalLazyWrapper, _lodashInternalArrayCopy) {\n 'use strict';\n\n /**\n * Creates a clone of the lazy wrapper object.\n *\n * @private\n * @name clone\n * @memberOf LazyWrapper\n * @returns {Object} Returns the cloned `LazyWrapper` object.\n */\n function lazyClone() {\n var result = new _lodashInternalLazyWrapper['default'](this.__wrapped__);\n result.__actions__ = (0, _lodashInternalArrayCopy['default'])(this.__actions__);\n result.__dir__ = this.__dir__;\n result.__filtered__ = this.__filtered__;\n result.__iteratees__ = (0, _lodashInternalArrayCopy['default'])(this.__iteratees__);\n result.__takeCount__ = this.__takeCount__;\n result.__views__ = (0, _lodashInternalArrayCopy['default'])(this.__views__);\n return result;\n }\n\n exports['default'] = lazyClone;\n});","define('lodash/internal/lazyReverse', ['exports', 'lodash/internal/LazyWrapper'], function (exports, _lodashInternalLazyWrapper) {\n 'use strict';\n\n /**\n * Reverses the direction of lazy iteration.\n *\n * @private\n * @name reverse\n * @memberOf LazyWrapper\n * @returns {Object} Returns the new reversed `LazyWrapper` object.\n */\n function lazyReverse() {\n if (this.__filtered__) {\n var result = new _lodashInternalLazyWrapper['default'](this);\n result.__dir__ = -1;\n result.__filtered__ = true;\n } else {\n result = this.clone();\n result.__dir__ *= -1;\n }\n return result;\n }\n\n exports['default'] = lazyReverse;\n});","define('lodash/internal/lazyValue', ['exports', 'lodash/internal/baseWrapperValue', 'lodash/internal/getView', 'lodash/lang/isArray'], function (exports, _lodashInternalBaseWrapperValue, _lodashInternalGetView, _lodashLangIsArray) {\n 'use strict';\n\n /** Used as the size to enable large array optimizations. */\n var LARGE_ARRAY_SIZE = 200;\n\n /** Used to indicate the type of lazy iteratees. */\n var LAZY_FILTER_FLAG = 1,\n LAZY_MAP_FLAG = 2;\n\n /* Native method references for those with the same name as other `lodash` methods. */\n var nativeMin = Math.min;\n\n /**\n * Extracts the unwrapped value from its lazy wrapper.\n *\n * @private\n * @name value\n * @memberOf LazyWrapper\n * @returns {*} Returns the unwrapped value.\n */\n function lazyValue() {\n var array = this.__wrapped__.value(),\n dir = this.__dir__,\n isArr = (0, _lodashLangIsArray['default'])(array),\n isRight = dir < 0,\n arrLength = isArr ? array.length : 0,\n view = (0, _lodashInternalGetView['default'])(0, arrLength, this.__views__),\n start = view.start,\n end = view.end,\n length = end - start,\n index = isRight ? end : start - 1,\n iteratees = this.__iteratees__,\n iterLength = iteratees.length,\n resIndex = 0,\n takeCount = nativeMin(length, this.__takeCount__);\n\n if (!isArr || arrLength < LARGE_ARRAY_SIZE || arrLength == length && takeCount == length) {\n return (0, _lodashInternalBaseWrapperValue['default'])(array, this.__actions__);\n }\n var result = [];\n\n outer: while (length-- && resIndex < takeCount) {\n index += dir;\n\n var iterIndex = -1,\n value = array[index];\n\n while (++iterIndex < iterLength) {\n var data = iteratees[iterIndex],\n iteratee = data.iteratee,\n type = data.type,\n computed = iteratee(value);\n\n if (type == LAZY_MAP_FLAG) {\n value = computed;\n } else if (!computed) {\n if (type == LAZY_FILTER_FLAG) {\n continue outer;\n } else {\n break outer;\n }\n }\n }\n result[resIndex++] = value;\n }\n return result;\n }\n\n exports['default'] = lazyValue;\n});","define(\"lodash/internal/mapDelete\", [\"exports\"], function (exports) {\n /**\n * Removes `key` and its value from the cache.\n *\n * @private\n * @name delete\n * @memberOf _.memoize.Cache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed successfully, else `false`.\n */\n \"use strict\";\n\n function mapDelete(key) {\n return this.has(key) && delete this.__data__[key];\n }\n\n exports[\"default\"] = mapDelete;\n});","define('lodash/internal/mapGet', ['exports'], function (exports) {\n /**\n * Gets the cached value for `key`.\n *\n * @private\n * @name get\n * @memberOf _.memoize.Cache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the cached value.\n */\n 'use strict';\n\n function mapGet(key) {\n return key == '__proto__' ? undefined : this.__data__[key];\n }\n\n exports['default'] = mapGet;\n});","define('lodash/internal/mapHas', ['exports'], function (exports) {\n /** Used for native method references. */\n 'use strict';\n\n var objectProto = Object.prototype;\n\n /** Used to check objects for own properties. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /**\n * Checks if a cached value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf _.memoize.Cache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function mapHas(key) {\n return key != '__proto__' && hasOwnProperty.call(this.__data__, key);\n }\n\n exports['default'] = mapHas;\n});","define('lodash/internal/mapSet', ['exports'], function (exports) {\n /**\n * Sets `value` to `key` of the cache.\n *\n * @private\n * @name set\n * @memberOf _.memoize.Cache\n * @param {string} key The key of the value to cache.\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache object.\n */\n 'use strict';\n\n function mapSet(key, value) {\n if (key != '__proto__') {\n this.__data__[key] = value;\n }\n return this;\n }\n\n exports['default'] = mapSet;\n});","define('lodash/internal/mergeData', ['exports', 'lodash/internal/arrayCopy', 'lodash/internal/composeArgs', 'lodash/internal/composeArgsRight', 'lodash/internal/replaceHolders'], function (exports, _lodashInternalArrayCopy, _lodashInternalComposeArgs, _lodashInternalComposeArgsRight, _lodashInternalReplaceHolders) {\n 'use strict';\n\n /** Used to compose bitmasks for wrapper metadata. */\n var BIND_FLAG = 1,\n CURRY_BOUND_FLAG = 4,\n CURRY_FLAG = 8,\n ARY_FLAG = 128,\n REARG_FLAG = 256;\n\n /** Used as the internal argument placeholder. */\n var PLACEHOLDER = '__lodash_placeholder__';\n\n /* Native method references for those with the same name as other `lodash` methods. */\n var nativeMin = Math.min;\n\n /**\n * Merges the function metadata of `source` into `data`.\n *\n * Merging metadata reduces the number of wrappers required to invoke a function.\n * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\n * may be applied regardless of execution order. Methods like `_.ary` and `_.rearg`\n * augment function arguments, making the order in which they are executed important,\n * preventing the merging of metadata. However, we make an exception for a safe\n * common case where curried functions have `_.ary` and or `_.rearg` applied.\n *\n * @private\n * @param {Array} data The destination metadata.\n * @param {Array} source The source metadata.\n * @returns {Array} Returns `data`.\n */\n function mergeData(data, source) {\n var bitmask = data[1],\n srcBitmask = source[1],\n newBitmask = bitmask | srcBitmask,\n isCommon = newBitmask < ARY_FLAG;\n\n var isCombo = srcBitmask == ARY_FLAG && bitmask == CURRY_FLAG || srcBitmask == ARY_FLAG && bitmask == REARG_FLAG && data[7].length <= source[8] || srcBitmask == (ARY_FLAG | REARG_FLAG) && bitmask == CURRY_FLAG;\n\n // Exit early if metadata can't be merged.\n if (!(isCommon || isCombo)) {\n return data;\n }\n // Use source `thisArg` if available.\n if (srcBitmask & BIND_FLAG) {\n data[2] = source[2];\n // Set when currying a bound function.\n newBitmask |= bitmask & BIND_FLAG ? 0 : CURRY_BOUND_FLAG;\n }\n // Compose partial arguments.\n var value = source[3];\n if (value) {\n var partials = data[3];\n data[3] = partials ? (0, _lodashInternalComposeArgs['default'])(partials, value, source[4]) : (0, _lodashInternalArrayCopy['default'])(value);\n data[4] = partials ? (0, _lodashInternalReplaceHolders['default'])(data[3], PLACEHOLDER) : (0, _lodashInternalArrayCopy['default'])(source[4]);\n }\n // Compose partial right arguments.\n value = source[5];\n if (value) {\n partials = data[5];\n data[5] = partials ? (0, _lodashInternalComposeArgsRight['default'])(partials, value, source[6]) : (0, _lodashInternalArrayCopy['default'])(value);\n data[6] = partials ? (0, _lodashInternalReplaceHolders['default'])(data[5], PLACEHOLDER) : (0, _lodashInternalArrayCopy['default'])(source[6]);\n }\n // Use source `argPos` if available.\n value = source[7];\n if (value) {\n data[7] = (0, _lodashInternalArrayCopy['default'])(value);\n }\n // Use source `ary` if it's smaller.\n if (srcBitmask & ARY_FLAG) {\n data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\n }\n // Use source `arity` if one is not provided.\n if (data[9] == null) {\n data[9] = source[9];\n }\n // Use source `func` and merge bitmasks.\n data[0] = source[0];\n data[1] = newBitmask;\n\n return data;\n }\n\n exports['default'] = mergeData;\n});","define('lodash/internal/mergeDefaults', ['exports', 'lodash/object/merge'], function (exports, _lodashObjectMerge) {\n 'use strict';\n\n /**\n * Used by `_.defaultsDeep` to customize its `_.merge` use.\n *\n * @private\n * @param {*} objectValue The destination object property value.\n * @param {*} sourceValue The source object property value.\n * @returns {*} Returns the value to assign to the destination object.\n */\n function mergeDefaults(objectValue, sourceValue) {\n return objectValue === undefined ? sourceValue : (0, _lodashObjectMerge['default'])(objectValue, sourceValue, mergeDefaults);\n }\n\n exports['default'] = mergeDefaults;\n});","define('lodash/internal/metaMap', ['exports', 'lodash/internal/getNative', 'lodash/internal/root'], function (exports, _lodashInternalGetNative, _lodashInternalRoot) {\n 'use strict';\n\n /** Native method references. */\n var WeakMap = (0, _lodashInternalGetNative['default'])(_lodashInternalRoot['default'], 'WeakMap');\n\n /** Used to store function metadata. */\n var metaMap = WeakMap && new WeakMap();\n\n exports['default'] = metaMap;\n});","define('lodash/internal/pickByArray', ['exports', 'lodash/internal/toObject'], function (exports, _lodashInternalToObject) {\n 'use strict';\n\n /**\n * A specialized version of `_.pick` which picks `object` properties specified\n * by `props`.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} props The property names to pick.\n * @returns {Object} Returns the new object.\n */\n function pickByArray(object, props) {\n object = (0, _lodashInternalToObject['default'])(object);\n\n var index = -1,\n length = props.length,\n result = {};\n\n while (++index < length) {\n var key = props[index];\n if (key in object) {\n result[key] = object[key];\n }\n }\n return result;\n }\n\n exports['default'] = pickByArray;\n});","define('lodash/internal/pickByCallback', ['exports', 'lodash/internal/baseForIn'], function (exports, _lodashInternalBaseForIn) {\n 'use strict';\n\n /**\n * A specialized version of `_.pick` which picks `object` properties `predicate`\n * returns truthy for.\n *\n * @private\n * @param {Object} object The source object.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Object} Returns the new object.\n */\n function pickByCallback(object, predicate) {\n var result = {};\n (0, _lodashInternalBaseForIn['default'])(object, function (value, key, object) {\n if (predicate(value, key, object)) {\n result[key] = value;\n }\n });\n return result;\n }\n\n exports['default'] = pickByCallback;\n});","define(\"lodash/internal/reEscape\", [\"exports\"], function (exports) {\n /** Used to match template delimiters. */\n \"use strict\";\n\n var reEscape = /<%-([\\s\\S]+?)%>/g;\n\n exports[\"default\"] = reEscape;\n});","define(\"lodash/internal/reEvaluate\", [\"exports\"], function (exports) {\n /** Used to match template delimiters. */\n \"use strict\";\n\n var reEvaluate = /<%([\\s\\S]+?)%>/g;\n\n exports[\"default\"] = reEvaluate;\n});","define(\"lodash/internal/reInterpolate\", [\"exports\"], function (exports) {\n /** Used to match template delimiters. */\n \"use strict\";\n\n var reInterpolate = /<%=([\\s\\S]+?)%>/g;\n\n exports[\"default\"] = reInterpolate;\n});","define(\"lodash/internal/realNames\", [\"exports\"], function (exports) {\n /** Used to lookup unminified function names. */\n \"use strict\";\n\n var realNames = {};\n\n exports[\"default\"] = realNames;\n});","define('lodash/internal/reorder', ['exports', 'lodash/internal/arrayCopy', 'lodash/internal/isIndex'], function (exports, _lodashInternalArrayCopy, _lodashInternalIsIndex) {\n 'use strict';\n\n /* Native method references for those with the same name as other `lodash` methods. */\n var nativeMin = Math.min;\n\n /**\n * Reorder `array` according to the specified indexes where the element at\n * the first index is assigned as the first element, the element at\n * the second index is assigned as the second element, and so on.\n *\n * @private\n * @param {Array} array The array to reorder.\n * @param {Array} indexes The arranged array indexes.\n * @returns {Array} Returns `array`.\n */\n function reorder(array, indexes) {\n var arrLength = array.length,\n length = nativeMin(indexes.length, arrLength),\n oldArray = (0, _lodashInternalArrayCopy['default'])(array);\n\n while (length--) {\n var index = indexes[length];\n array[length] = (0, _lodashInternalIsIndex['default'])(index, arrLength) ? oldArray[index] : undefined;\n }\n return array;\n }\n\n exports['default'] = reorder;\n});","define('lodash/internal/replaceHolders', ['exports'], function (exports) {\n /** Used as the internal argument placeholder. */\n 'use strict';\n\n var PLACEHOLDER = '__lodash_placeholder__';\n\n /**\n * Replaces all `placeholder` elements in `array` with an internal placeholder\n * and returns an array of their indexes.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {*} placeholder The placeholder to replace.\n * @returns {Array} Returns the new array of placeholder indexes.\n */\n function replaceHolders(array, placeholder) {\n var index = -1,\n length = array.length,\n resIndex = -1,\n result = [];\n\n while (++index < length) {\n if (array[index] === placeholder) {\n array[index] = PLACEHOLDER;\n result[++resIndex] = index;\n }\n }\n return result;\n }\n\n exports['default'] = replaceHolders;\n});","define('lodash/internal/root', ['exports'], function (exports) {\n /** Used to determine if values are of the language type `Object`. */\n 'use strict';\n\n var objectTypes = {\n 'function': true,\n 'object': true\n };\n\n /** Detect free variable `exports`. */\n var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports;\n\n /** Detect free variable `module`. */\n var freeModule = objectTypes[typeof module] && module && !module.nodeType && module;\n\n /** Detect free variable `global` from Node.js. */\n var freeGlobal = freeExports && freeModule && typeof global == 'object' && global && global.Object && global;\n\n /** Detect free variable `self`. */\n var freeSelf = objectTypes[typeof self] && self && self.Object && self;\n\n /** Detect free variable `window`. */\n var freeWindow = objectTypes[typeof window] && window && window.Object && window;\n\n /**\n * Used as a reference to the global object.\n *\n * The `this` value is used if it's the global object to avoid Greasemonkey's\n * restricted `window` object, otherwise the `window` object is used.\n */\n var root = freeGlobal || window;\n // var root = freeGlobal || ((freeWindow !== (this && this.window)) && freeWindow) || freeSelf || this;\n\n exports['default'] = root;\n});","define('lodash/internal/setData', ['exports', 'lodash/internal/baseSetData', 'lodash/date/now'], function (exports, _lodashInternalBaseSetData, _lodashDateNow) {\n 'use strict';\n\n /** Used to detect when a function becomes hot. */\n var HOT_COUNT = 150,\n HOT_SPAN = 16;\n\n /**\n * Sets metadata for `func`.\n *\n * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\n * period of time, it will trip its breaker and transition to an identity function\n * to avoid garbage collection pauses in V8. See [V8 issue 2070](https://code.google.com/p/v8/issues/detail?id=2070)\n * for more details.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var setData = (function () {\n var count = 0,\n lastCalled = 0;\n\n return function (key, value) {\n var stamp = (0, _lodashDateNow['default'])(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return key;\n }\n } else {\n count = 0;\n }\n return (0, _lodashInternalBaseSetData['default'])(key, value);\n };\n })();\n\n exports['default'] = setData;\n});","define('lodash/internal/shimKeys', ['exports', 'lodash/lang/isArguments', 'lodash/lang/isArray', 'lodash/internal/isIndex', 'lodash/internal/isLength', 'lodash/object/keysIn'], function (exports, _lodashLangIsArguments, _lodashLangIsArray, _lodashInternalIsIndex, _lodashInternalIsLength, _lodashObjectKeysIn) {\n 'use strict';\n\n /** Used for native method references. */\n var objectProto = Object.prototype;\n\n /** Used to check objects for own properties. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /**\n * A fallback implementation of `Object.keys` which creates an array of the\n * own enumerable property names of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function shimKeys(object) {\n var props = (0, _lodashObjectKeysIn['default'])(object),\n propsLength = props.length,\n length = propsLength && object.length;\n\n var allowIndexes = !!length && (0, _lodashInternalIsLength['default'])(length) && ((0, _lodashLangIsArray['default'])(object) || (0, _lodashLangIsArguments['default'])(object));\n\n var index = -1,\n result = [];\n\n while (++index < propsLength) {\n var key = props[index];\n if (allowIndexes && (0, _lodashInternalIsIndex['default'])(key, length) || hasOwnProperty.call(object, key)) {\n result.push(key);\n }\n }\n return result;\n }\n\n exports['default'] = shimKeys;\n});","define(\"lodash/internal/sortedUniq\", [\"exports\"], function (exports) {\n /**\n * An implementation of `_.uniq` optimized for sorted arrays without support\n * for callback shorthands and `this` binding.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The function invoked per iteration.\n * @returns {Array} Returns the new duplicate free array.\n */\n \"use strict\";\n\n function sortedUniq(array, iteratee) {\n var seen,\n index = -1,\n length = array.length,\n resIndex = -1,\n result = [];\n\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value, index, array) : value;\n\n if (!index || seen !== computed) {\n seen = computed;\n result[++resIndex] = value;\n }\n }\n return result;\n }\n\n exports[\"default\"] = sortedUniq;\n});","define('lodash/internal/toIterable', ['exports', 'lodash/internal/isArrayLike', 'lodash/lang/isObject', 'lodash/object/values'], function (exports, _lodashInternalIsArrayLike, _lodashLangIsObject, _lodashObjectValues) {\n 'use strict';\n\n /**\n * Converts `value` to an array-like object if it's not one.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {Array|Object} Returns the array-like object.\n */\n function toIterable(value) {\n if (value == null) {\n return [];\n }\n if (!(0, _lodashInternalIsArrayLike['default'])(value)) {\n return (0, _lodashObjectValues['default'])(value);\n }\n return (0, _lodashLangIsObject['default'])(value) ? value : Object(value);\n }\n\n exports['default'] = toIterable;\n});","define('lodash/internal/toObject', ['exports', 'lodash/lang/isObject'], function (exports, _lodashLangIsObject) {\n 'use strict';\n\n /**\n * Converts `value` to an object if it's not one.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {Object} Returns the object.\n */\n function toObject(value) {\n return (0, _lodashLangIsObject['default'])(value) ? value : Object(value);\n }\n\n exports['default'] = toObject;\n});","define('lodash/internal/toPath', ['exports', 'lodash/internal/baseToString', 'lodash/lang/isArray'], function (exports, _lodashInternalBaseToString, _lodashLangIsArray) {\n 'use strict';\n\n /** Used to match property names within property paths. */\n var rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\n\\\\]|\\\\.)*?)\\2)\\]/g;\n\n /** Used to match backslashes in property paths. */\n var reEscapeChar = /\\\\(\\\\)?/g;\n\n /**\n * Converts `value` to property path array if it's not one.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {Array} Returns the property path array.\n */\n function toPath(value) {\n if ((0, _lodashLangIsArray['default'])(value)) {\n return value;\n }\n var result = [];\n (0, _lodashInternalBaseToString['default'])(value).replace(rePropName, function (match, number, quote, string) {\n result.push(quote ? string.replace(reEscapeChar, '$1') : number || match);\n });\n return result;\n }\n\n exports['default'] = toPath;\n});","define('lodash/internal/trimmedLeftIndex', ['exports', 'lodash/internal/isSpace'], function (exports, _lodashInternalIsSpace) {\n 'use strict';\n\n /**\n * Used by `_.trim` and `_.trimLeft` to get the index of the first non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the first non-whitespace character.\n */\n function trimmedLeftIndex(string) {\n var index = -1,\n length = string.length;\n\n while (++index < length && (0, _lodashInternalIsSpace['default'])(string.charCodeAt(index))) {}\n return index;\n }\n\n exports['default'] = trimmedLeftIndex;\n});","define('lodash/internal/trimmedRightIndex', ['exports', 'lodash/internal/isSpace'], function (exports, _lodashInternalIsSpace) {\n 'use strict';\n\n /**\n * Used by `_.trim` and `_.trimRight` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\n function trimmedRightIndex(string) {\n var index = string.length;\n\n while (index-- && (0, _lodashInternalIsSpace['default'])(string.charCodeAt(index))) {}\n return index;\n }\n\n exports['default'] = trimmedRightIndex;\n});","define('lodash/internal/unescapeHtmlChar', ['exports'], function (exports) {\n /** Used to map HTML entities to characters. */\n 'use strict';\n\n var htmlUnescapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\",\n '`': '`'\n };\n\n /**\n * Used by `_.unescape` to convert HTML entities to characters.\n *\n * @private\n * @param {string} chr The matched character to unescape.\n * @returns {string} Returns the unescaped character.\n */\n function unescapeHtmlChar(chr) {\n return htmlUnescapes[chr];\n }\n\n exports['default'] = unescapeHtmlChar;\n});","define('lodash/internal/wrapperClone', ['exports', 'lodash/internal/LazyWrapper', 'lodash/internal/LodashWrapper', 'lodash/internal/arrayCopy'], function (exports, _lodashInternalLazyWrapper, _lodashInternalLodashWrapper, _lodashInternalArrayCopy) {\n 'use strict';\n\n /**\n * Creates a clone of `wrapper`.\n *\n * @private\n * @param {Object} wrapper The wrapper to clone.\n * @returns {Object} Returns the cloned wrapper.\n */\n function wrapperClone(wrapper) {\n return wrapper instanceof _lodashInternalLazyWrapper['default'] ? wrapper.clone() : new _lodashInternalLodashWrapper['default'](wrapper.__wrapped__, wrapper.__chain__, (0, _lodashInternalArrayCopy['default'])(wrapper.__actions__));\n }\n\n exports['default'] = wrapperClone;\n});","define('lodash/lang/clone', ['exports', 'lodash/internal/baseClone', 'lodash/internal/bindCallback', 'lodash/internal/isIterateeCall'], function (exports, _lodashInternalBaseClone, _lodashInternalBindCallback, _lodashInternalIsIterateeCall) {\n 'use strict';\n\n /**\n * Creates a clone of `value`. If `isDeep` is `true` nested objects are cloned,\n * otherwise they are assigned by reference. If `customizer` is provided it's\n * invoked to produce the cloned values. If `customizer` returns `undefined`\n * cloning is handled by the method instead. The `customizer` is bound to\n * `thisArg` and invoked with up to three argument; (value [, index|key, object]).\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm).\n * The enumerable properties of `arguments` objects and objects created by\n * constructors other than `Object` are cloned to plain `Object` objects. An\n * empty object is returned for uncloneable values such as functions, DOM nodes,\n * Maps, Sets, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @param {Function} [customizer] The function to customize cloning values.\n * @param {*} [thisArg] The `this` binding of `customizer`.\n * @returns {*} Returns the cloned value.\n * @example\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * var shallow = _.clone(users);\n * shallow[0] === users[0];\n * // => true\n *\n * var deep = _.clone(users, true);\n * deep[0] === users[0];\n * // => false\n *\n * // using a customizer callback\n * var el = _.clone(document.body, function(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(false);\n * }\n * });\n *\n * el === document.body\n * // => false\n * el.nodeName\n * // => BODY\n * el.childNodes.length;\n * // => 0\n */\n function clone(value, isDeep, customizer, thisArg) {\n if (isDeep && typeof isDeep != 'boolean' && (0, _lodashInternalIsIterateeCall['default'])(value, isDeep, customizer)) {\n isDeep = false;\n } else if (typeof isDeep == 'function') {\n thisArg = customizer;\n customizer = isDeep;\n isDeep = false;\n }\n return typeof customizer == 'function' ? (0, _lodashInternalBaseClone['default'])(value, isDeep, (0, _lodashInternalBindCallback['default'])(customizer, thisArg, 3)) : (0, _lodashInternalBaseClone['default'])(value, isDeep);\n }\n\n exports['default'] = clone;\n});","define('lodash/lang/cloneDeep', ['exports', 'lodash/internal/baseClone', 'lodash/internal/bindCallback'], function (exports, _lodashInternalBaseClone, _lodashInternalBindCallback) {\n 'use strict';\n\n /**\n * Creates a deep clone of `value`. If `customizer` is provided it's invoked\n * to produce the cloned values. If `customizer` returns `undefined` cloning\n * is handled by the method instead. The `customizer` is bound to `thisArg`\n * and invoked with up to three argument; (value [, index|key, object]).\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm).\n * The enumerable properties of `arguments` objects and objects created by\n * constructors other than `Object` are cloned to plain `Object` objects. An\n * empty object is returned for uncloneable values such as functions, DOM nodes,\n * Maps, Sets, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to deep clone.\n * @param {Function} [customizer] The function to customize cloning values.\n * @param {*} [thisArg] The `this` binding of `customizer`.\n * @returns {*} Returns the deep cloned value.\n * @example\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * var deep = _.cloneDeep(users);\n * deep[0] === users[0];\n * // => false\n *\n * // using a customizer callback\n * var el = _.cloneDeep(document.body, function(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(true);\n * }\n * });\n *\n * el === document.body\n * // => false\n * el.nodeName\n * // => BODY\n * el.childNodes.length;\n * // => 20\n */\n function cloneDeep(value, customizer, thisArg) {\n return typeof customizer == 'function' ? (0, _lodashInternalBaseClone['default'])(value, true, (0, _lodashInternalBindCallback['default'])(customizer, thisArg, 3)) : (0, _lodashInternalBaseClone['default'])(value, true);\n }\n\n exports['default'] = cloneDeep;\n});","define('lodash/lang/eq', ['exports', 'lodash/lang/isEqual'], function (exports, _lodashLangIsEqual) {\n 'use strict';\n\n exports['default'] = _lodashLangIsEqual['default'];\n});","define(\"lodash/lang/gt\", [\"exports\"], function (exports) {\n /**\n * Checks if `value` is greater than `other`.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`, else `false`.\n * @example\n *\n * _.gt(3, 1);\n * // => true\n *\n * _.gt(3, 3);\n * // => false\n *\n * _.gt(1, 3);\n * // => false\n */\n \"use strict\";\n\n function gt(value, other) {\n return value > other;\n }\n\n exports[\"default\"] = gt;\n});","define(\"lodash/lang/gte\", [\"exports\"], function (exports) {\n /**\n * Checks if `value` is greater than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than or equal to `other`, else `false`.\n * @example\n *\n * _.gte(3, 1);\n * // => true\n *\n * _.gte(3, 3);\n * // => true\n *\n * _.gte(1, 3);\n * // => false\n */\n \"use strict\";\n\n function gte(value, other) {\n return value >= other;\n }\n\n exports[\"default\"] = gte;\n});","define('lodash/lang/isArguments', ['exports', 'lodash/internal/isArrayLike', 'lodash/internal/isObjectLike'], function (exports, _lodashInternalIsArrayLike, _lodashInternalIsObjectLike) {\n 'use strict';\n\n /** Used for native method references. */\n var objectProto = Object.prototype;\n\n /** Used to check objects for own properties. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /** Native method references. */\n var propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n /**\n * Checks if `value` is classified as an `arguments` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\n function isArguments(value) {\n return (0, _lodashInternalIsObjectLike['default'])(value) && (0, _lodashInternalIsArrayLike['default'])(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');\n }\n\n exports['default'] = isArguments;\n});","define('lodash/lang/isArray', ['exports', 'lodash/internal/getNative', 'lodash/internal/isLength', 'lodash/internal/isObjectLike'], function (exports, _lodashInternalGetNative, _lodashInternalIsLength, _lodashInternalIsObjectLike) {\n 'use strict';\n\n /** `Object#toString` result references. */\n var arrayTag = '[object Array]';\n\n /** Used for native method references. */\n var objectProto = Object.prototype;\n\n /**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\n var objToString = objectProto.toString;\n\n /* Native method references for those with the same name as other `lodash` methods. */\n var nativeIsArray = (0, _lodashInternalGetNative['default'])(Array, 'isArray');\n\n /**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(function() { return arguments; }());\n * // => false\n */\n var isArray = nativeIsArray || function (value) {\n return (0, _lodashInternalIsObjectLike['default'])(value) && (0, _lodashInternalIsLength['default'])(value.length) && objToString.call(value) == arrayTag;\n };\n\n exports['default'] = isArray;\n});","define('lodash/lang/isBoolean', ['exports', 'lodash/internal/isObjectLike'], function (exports, _lodashInternalIsObjectLike) {\n 'use strict';\n\n /** `Object#toString` result references. */\n var boolTag = '[object Boolean]';\n\n /** Used for native method references. */\n var objectProto = Object.prototype;\n\n /**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\n var objToString = objectProto.toString;\n\n /**\n * Checks if `value` is classified as a boolean primitive or object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isBoolean(false);\n * // => true\n *\n * _.isBoolean(null);\n * // => false\n */\n function isBoolean(value) {\n return value === true || value === false || (0, _lodashInternalIsObjectLike['default'])(value) && objToString.call(value) == boolTag;\n }\n\n exports['default'] = isBoolean;\n});","define('lodash/lang/isDate', ['exports', 'lodash/internal/isObjectLike'], function (exports, _lodashInternalIsObjectLike) {\n 'use strict';\n\n /** `Object#toString` result references. */\n var dateTag = '[object Date]';\n\n /** Used for native method references. */\n var objectProto = Object.prototype;\n\n /**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\n var objToString = objectProto.toString;\n\n /**\n * Checks if `value` is classified as a `Date` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isDate(new Date);\n * // => true\n *\n * _.isDate('Mon April 23 2012');\n * // => false\n */\n function isDate(value) {\n return (0, _lodashInternalIsObjectLike['default'])(value) && objToString.call(value) == dateTag;\n }\n\n exports['default'] = isDate;\n});","define('lodash/lang/isElement', ['exports', 'lodash/internal/isObjectLike', 'lodash/lang/isPlainObject'], function (exports, _lodashInternalIsObjectLike, _lodashLangIsPlainObject) {\n 'use strict';\n\n /**\n * Checks if `value` is a DOM element.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\n * @example\n *\n * _.isElement(document.body);\n * // => true\n *\n * _.isElement('');\n * // => false\n */\n function isElement(value) {\n return !!value && value.nodeType === 1 && (0, _lodashInternalIsObjectLike['default'])(value) && !(0, _lodashLangIsPlainObject['default'])(value);\n }\n\n exports['default'] = isElement;\n});","define('lodash/lang/isEmpty', ['exports', 'lodash/lang/isArguments', 'lodash/lang/isArray', 'lodash/internal/isArrayLike', 'lodash/lang/isFunction', 'lodash/internal/isObjectLike', 'lodash/lang/isString', 'lodash/object/keys'], function (exports, _lodashLangIsArguments, _lodashLangIsArray, _lodashInternalIsArrayLike, _lodashLangIsFunction, _lodashInternalIsObjectLike, _lodashLangIsString, _lodashObjectKeys) {\n 'use strict';\n\n /**\n * Checks if `value` is empty. A value is considered empty unless it's an\n * `arguments` object, array, string, or jQuery-like collection with a length\n * greater than `0` or an object with own enumerable properties.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {Array|Object|string} value The value to inspect.\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */\n function isEmpty(value) {\n if (value == null) {\n return true;\n }\n if ((0, _lodashInternalIsArrayLike['default'])(value) && ((0, _lodashLangIsArray['default'])(value) || (0, _lodashLangIsString['default'])(value) || (0, _lodashLangIsArguments['default'])(value) || (0, _lodashInternalIsObjectLike['default'])(value) && (0, _lodashLangIsFunction['default'])(value.splice))) {\n return !value.length;\n }\n return !(0, _lodashObjectKeys['default'])(value).length;\n }\n\n exports['default'] = isEmpty;\n});","define('lodash/lang/isEqual', ['exports', 'lodash/internal/baseIsEqual', 'lodash/internal/bindCallback'], function (exports, _lodashInternalBaseIsEqual, _lodashInternalBindCallback) {\n 'use strict';\n\n /**\n * Performs a deep comparison between two values to determine if they are\n * equivalent. If `customizer` is provided it's invoked to compare values.\n * If `customizer` returns `undefined` comparisons are handled by the method\n * instead. The `customizer` is bound to `thisArg` and invoked with up to\n * three arguments: (value, other [, index|key]).\n *\n * **Note:** This method supports comparing arrays, booleans, `Date` objects,\n * numbers, `Object` objects, regexes, and strings. Objects are compared by\n * their own, not inherited, enumerable properties. Functions and DOM nodes\n * are **not** supported. Provide a customizer function to extend support\n * for comparing other values.\n *\n * @static\n * @memberOf _\n * @alias eq\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [customizer] The function to customize value comparisons.\n * @param {*} [thisArg] The `this` binding of `customizer`.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'user': 'fred' };\n * var other = { 'user': 'fred' };\n *\n * object == other;\n * // => false\n *\n * _.isEqual(object, other);\n * // => true\n *\n * // using a customizer callback\n * var array = ['hello', 'goodbye'];\n * var other = ['hi', 'goodbye'];\n *\n * _.isEqual(array, other, function(value, other) {\n * if (_.every([value, other], RegExp.prototype.test, /^h(?:i|ello)$/)) {\n * return true;\n * }\n * });\n * // => true\n */\n function isEqual(value, other, customizer, thisArg) {\n customizer = typeof customizer == 'function' ? (0, _lodashInternalBindCallback['default'])(customizer, thisArg, 3) : undefined;\n var result = customizer ? customizer(value, other) : undefined;\n return result === undefined ? (0, _lodashInternalBaseIsEqual['default'])(value, other, customizer) : !!result;\n }\n\n exports['default'] = isEqual;\n});","define('lodash/lang/isError', ['exports', 'lodash/internal/isObjectLike'], function (exports, _lodashInternalIsObjectLike) {\n 'use strict';\n\n /** `Object#toString` result references. */\n var errorTag = '[object Error]';\n\n /** Used for native method references. */\n var objectProto = Object.prototype;\n\n /**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\n var objToString = objectProto.toString;\n\n /**\n * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n * `SyntaxError`, `TypeError`, or `URIError` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an error object, else `false`.\n * @example\n *\n * _.isError(new Error);\n * // => true\n *\n * _.isError(Error);\n * // => false\n */\n function isError(value) {\n return (0, _lodashInternalIsObjectLike['default'])(value) && typeof value.message == 'string' && objToString.call(value) == errorTag;\n }\n\n exports['default'] = isError;\n});","define('lodash/lang/isFinite', ['exports', 'lodash/internal/root'], function (exports, _lodashInternalRoot) {\n 'use strict';\n\n /* Native method references for those with the same name as other `lodash` methods. */\n var nativeIsFinite = _lodashInternalRoot['default'].isFinite;\n\n /**\n * Checks if `value` is a finite primitive number.\n *\n * **Note:** This method is based on [`Number.isFinite`](http://ecma-international.org/ecma-262/6.0/#sec-number.isfinite).\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\n * @example\n *\n * _.isFinite(10);\n * // => true\n *\n * _.isFinite('10');\n * // => false\n *\n * _.isFinite(true);\n * // => false\n *\n * _.isFinite(Object(10));\n * // => false\n *\n * _.isFinite(Infinity);\n * // => false\n */\n function isFinite(value) {\n return typeof value == 'number' && nativeIsFinite(value);\n }\n\n exports['default'] = isFinite;\n});","define('lodash/lang/isFunction', ['exports', 'lodash/lang/isObject'], function (exports, _lodashLangIsObject) {\n 'use strict';\n\n /** `Object#toString` result references. */\n var funcTag = '[object Function]';\n\n /** Used for native method references. */\n var objectProto = Object.prototype;\n\n /**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\n var objToString = objectProto.toString;\n\n /**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\n function isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in older versions of Chrome and Safari which return 'function' for regexes\n // and Safari 8 which returns 'object' for typed array constructors.\n return (0, _lodashLangIsObject['default'])(value) && objToString.call(value) == funcTag;\n }\n\n exports['default'] = isFunction;\n});","define('lodash/lang/isMatch', ['exports', 'lodash/internal/baseIsMatch', 'lodash/internal/bindCallback', 'lodash/internal/getMatchData'], function (exports, _lodashInternalBaseIsMatch, _lodashInternalBindCallback, _lodashInternalGetMatchData) {\n 'use strict';\n\n /**\n * Performs a deep comparison between `object` and `source` to determine if\n * `object` contains equivalent property values. If `customizer` is provided\n * it's invoked to compare values. If `customizer` returns `undefined`\n * comparisons are handled by the method instead. The `customizer` is bound\n * to `thisArg` and invoked with three arguments: (value, other, index|key).\n *\n * **Note:** This method supports comparing properties of arrays, booleans,\n * `Date` objects, numbers, `Object` objects, regexes, and strings. Functions\n * and DOM nodes are **not** supported. Provide a customizer function to extend\n * support for comparing other values.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Function} [customizer] The function to customize value comparisons.\n * @param {*} [thisArg] The `this` binding of `customizer`.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * var object = { 'user': 'fred', 'age': 40 };\n *\n * _.isMatch(object, { 'age': 40 });\n * // => true\n *\n * _.isMatch(object, { 'age': 36 });\n * // => false\n *\n * // using a customizer callback\n * var object = { 'greeting': 'hello' };\n * var source = { 'greeting': 'hi' };\n *\n * _.isMatch(object, source, function(value, other) {\n * return _.every([value, other], RegExp.prototype.test, /^h(?:i|ello)$/) || undefined;\n * });\n * // => true\n */\n function isMatch(object, source, customizer, thisArg) {\n customizer = typeof customizer == 'function' ? (0, _lodashInternalBindCallback['default'])(customizer, thisArg, 3) : undefined;\n return (0, _lodashInternalBaseIsMatch['default'])(object, (0, _lodashInternalGetMatchData['default'])(source), customizer);\n }\n\n exports['default'] = isMatch;\n});","define('lodash/lang/isNaN', ['exports', 'lodash/lang/isNumber'], function (exports, _lodashLangIsNumber) {\n 'use strict';\n\n /**\n * Checks if `value` is `NaN`.\n *\n * **Note:** This method is not the same as [`isNaN`](https://es5.github.io/#x15.1.2.4)\n * which returns `true` for `undefined` and other non-numeric values.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n * @example\n *\n * _.isNaN(NaN);\n * // => true\n *\n * _.isNaN(new Number(NaN));\n * // => true\n *\n * isNaN(undefined);\n * // => true\n *\n * _.isNaN(undefined);\n * // => false\n */\n function isNaN(value) {\n // An `NaN` primitive is the only value that is not equal to itself.\n // Perform the `toStringTag` check first to avoid errors with some host objects in IE.\n return (0, _lodashLangIsNumber['default'])(value) && value != +value;\n }\n\n exports['default'] = isNaN;\n});","define('lodash/lang/isNative', ['exports', 'lodash/lang/isFunction', 'lodash/internal/isObjectLike'], function (exports, _lodashLangIsFunction, _lodashInternalIsObjectLike) {\n 'use strict';\n\n /** Used to detect host constructors (Safari > 5). */\n var reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n /** Used for native method references. */\n var objectProto = Object.prototype;\n\n /** Used to resolve the decompiled source of functions. */\n var fnToString = Function.prototype.toString;\n\n /** Used to check objects for own properties. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /** Used to detect if a method is native. */\n var reIsNative = RegExp('^' + fnToString.call(hasOwnProperty).replace(/[\\\\^$.*+?()[\\]{}|]/g, '\\\\$&').replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$');\n\n /**\n * Checks if `value` is a native function.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function, else `false`.\n * @example\n *\n * _.isNative(Array.prototype.push);\n * // => true\n *\n * _.isNative(_);\n * // => false\n */\n function isNative(value) {\n if (value == null) {\n return false;\n }\n if ((0, _lodashLangIsFunction['default'])(value)) {\n return reIsNative.test(fnToString.call(value));\n }\n return (0, _lodashInternalIsObjectLike['default'])(value) && reIsHostCtor.test(value);\n }\n\n exports['default'] = isNative;\n});","define(\"lodash/lang/isNull\", [\"exports\"], function (exports) {\n /**\n * Checks if `value` is `null`.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\n * @example\n *\n * _.isNull(null);\n * // => true\n *\n * _.isNull(void 0);\n * // => false\n */\n \"use strict\";\n\n function isNull(value) {\n return value === null;\n }\n\n exports[\"default\"] = isNull;\n});","define('lodash/lang/isNumber', ['exports', 'lodash/internal/isObjectLike'], function (exports, _lodashInternalIsObjectLike) {\n 'use strict';\n\n /** `Object#toString` result references. */\n var numberTag = '[object Number]';\n\n /** Used for native method references. */\n var objectProto = Object.prototype;\n\n /**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\n var objToString = objectProto.toString;\n\n /**\n * Checks if `value` is classified as a `Number` primitive or object.\n *\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are classified\n * as numbers, use the `_.isFinite` method.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isNumber(8.4);\n * // => true\n *\n * _.isNumber(NaN);\n * // => true\n *\n * _.isNumber('8.4');\n * // => false\n */\n function isNumber(value) {\n return typeof value == 'number' || (0, _lodashInternalIsObjectLike['default'])(value) && objToString.call(value) == numberTag;\n }\n\n exports['default'] = isNumber;\n});","define('lodash/lang/isObject', ['exports'], function (exports) {\n /**\n * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.\n * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(1);\n * // => false\n */\n 'use strict';\n\n function isObject(value) {\n // Avoid a V8 JIT bug in Chrome 19-20.\n // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n }\n\n exports['default'] = isObject;\n});","define('lodash/lang/isPlainObject', ['exports', 'lodash/internal/baseForIn', 'lodash/lang/isArguments', 'lodash/internal/isObjectLike'], function (exports, _lodashInternalBaseForIn, _lodashLangIsArguments, _lodashInternalIsObjectLike) {\n 'use strict';\n\n /** `Object#toString` result references. */\n var objectTag = '[object Object]';\n\n /** Used for native method references. */\n var objectProto = Object.prototype;\n\n /** Used to check objects for own properties. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\n var objToString = objectProto.toString;\n\n /**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * **Note:** This method assumes objects created by the `Object` constructor\n * have no inherited enumerable properties.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\n function isPlainObject(value) {\n var Ctor;\n\n // Exit early for non `Object` objects.\n if (!((0, _lodashInternalIsObjectLike['default'])(value) && objToString.call(value) == objectTag && !(0, _lodashLangIsArguments['default'])(value)) || !hasOwnProperty.call(value, 'constructor') && (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor))) {\n return false;\n }\n // IE < 9 iterates inherited properties before own properties. If the first\n // iterated property is an object's own property then there are no inherited\n // enumerable properties.\n var result;\n // In most environments an object's own properties are iterated before\n // its inherited properties. If the last iterated property is an object's\n // own property then there are no inherited enumerable properties.\n (0, _lodashInternalBaseForIn['default'])(value, function (subValue, key) {\n result = key;\n });\n return result === undefined || hasOwnProperty.call(value, result);\n }\n\n exports['default'] = isPlainObject;\n});","define('lodash/lang/isRegExp', ['exports', 'lodash/lang/isObject'], function (exports, _lodashLangIsObject) {\n 'use strict';\n\n /** `Object#toString` result references. */\n var regexpTag = '[object RegExp]';\n\n /** Used for native method references. */\n var objectProto = Object.prototype;\n\n /**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\n var objToString = objectProto.toString;\n\n /**\n * Checks if `value` is classified as a `RegExp` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isRegExp(/abc/);\n * // => true\n *\n * _.isRegExp('/abc/');\n * // => false\n */\n function isRegExp(value) {\n return (0, _lodashLangIsObject['default'])(value) && objToString.call(value) == regexpTag;\n }\n\n exports['default'] = isRegExp;\n});","define('lodash/lang/isString', ['exports', 'lodash/internal/isObjectLike'], function (exports, _lodashInternalIsObjectLike) {\n 'use strict';\n\n /** `Object#toString` result references. */\n var stringTag = '[object String]';\n\n /** Used for native method references. */\n var objectProto = Object.prototype;\n\n /**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\n var objToString = objectProto.toString;\n\n /**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\n function isString(value) {\n return typeof value == 'string' || (0, _lodashInternalIsObjectLike['default'])(value) && objToString.call(value) == stringTag;\n }\n\n exports['default'] = isString;\n});","define('lodash/lang/isTypedArray', ['exports', 'lodash/internal/isLength', 'lodash/internal/isObjectLike'], function (exports, _lodashInternalIsLength, _lodashInternalIsObjectLike) {\n 'use strict';\n\n /** `Object#toString` result references. */\n var argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\n var arrayBufferTag = '[object ArrayBuffer]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n /** Used to identify `toStringTag` values of typed arrays. */\n var typedArrayTags = {};\n typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;\n typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;\n\n /** Used for native method references. */\n var objectProto = Object.prototype;\n\n /**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\n var objToString = objectProto.toString;\n\n /**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\n function isTypedArray(value) {\n return (0, _lodashInternalIsObjectLike['default'])(value) && (0, _lodashInternalIsLength['default'])(value.length) && !!typedArrayTags[objToString.call(value)];\n }\n\n exports['default'] = isTypedArray;\n});","define(\"lodash/lang/isUndefined\", [\"exports\"], function (exports) {\n /**\n * Checks if `value` is `undefined`.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n * @example\n *\n * _.isUndefined(void 0);\n * // => true\n *\n * _.isUndefined(null);\n * // => false\n */\n \"use strict\";\n\n function isUndefined(value) {\n return value === undefined;\n }\n\n exports[\"default\"] = isUndefined;\n});","define(\"lodash/lang/lt\", [\"exports\"], function (exports) {\n /**\n * Checks if `value` is less than `other`.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`, else `false`.\n * @example\n *\n * _.lt(1, 3);\n * // => true\n *\n * _.lt(3, 3);\n * // => false\n *\n * _.lt(3, 1);\n * // => false\n */\n \"use strict\";\n\n function lt(value, other) {\n return value < other;\n }\n\n exports[\"default\"] = lt;\n});","define(\"lodash/lang/lte\", [\"exports\"], function (exports) {\n /**\n * Checks if `value` is less than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than or equal to `other`, else `false`.\n * @example\n *\n * _.lte(1, 3);\n * // => true\n *\n * _.lte(3, 3);\n * // => true\n *\n * _.lte(3, 1);\n * // => false\n */\n \"use strict\";\n\n function lte(value, other) {\n return value <= other;\n }\n\n exports[\"default\"] = lte;\n});","define('lodash/lang/toArray', ['exports', 'lodash/internal/arrayCopy', 'lodash/internal/getLength', 'lodash/internal/isLength', 'lodash/object/values'], function (exports, _lodashInternalArrayCopy, _lodashInternalGetLength, _lodashInternalIsLength, _lodashObjectValues) {\n 'use strict';\n\n /**\n * Converts `value` to an array.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Array} Returns the converted array.\n * @example\n *\n * (function() {\n * return _.toArray(arguments).slice(1);\n * }(1, 2, 3));\n * // => [2, 3]\n */\n function toArray(value) {\n var length = value ? (0, _lodashInternalGetLength['default'])(value) : 0;\n if (!(0, _lodashInternalIsLength['default'])(length)) {\n return (0, _lodashObjectValues['default'])(value);\n }\n if (!length) {\n return [];\n }\n return (0, _lodashInternalArrayCopy['default'])(value);\n }\n\n exports['default'] = toArray;\n});","define('lodash/lang/toPlainObject', ['exports', 'lodash/internal/baseCopy', 'lodash/object/keysIn'], function (exports, _lodashInternalBaseCopy, _lodashObjectKeysIn) {\n 'use strict';\n\n /**\n * Converts `value` to a plain object flattening inherited enumerable\n * properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\n function toPlainObject(value) {\n return (0, _lodashInternalBaseCopy['default'])(value, (0, _lodashObjectKeysIn['default'])(value));\n }\n\n exports['default'] = toPlainObject;\n});","define('lodash/lang', ['exports', 'lodash/lang/clone', 'lodash/lang/cloneDeep', 'lodash/lang/eq', 'lodash/lang/gt', 'lodash/lang/gte', 'lodash/lang/isArguments', 'lodash/lang/isArray', 'lodash/lang/isBoolean', 'lodash/lang/isDate', 'lodash/lang/isElement', 'lodash/lang/isEmpty', 'lodash/lang/isEqual', 'lodash/lang/isError', 'lodash/lang/isFinite', 'lodash/lang/isFunction', 'lodash/lang/isMatch', 'lodash/lang/isNaN', 'lodash/lang/isNative', 'lodash/lang/isNull', 'lodash/lang/isNumber', 'lodash/lang/isObject', 'lodash/lang/isPlainObject', 'lodash/lang/isRegExp', 'lodash/lang/isString', 'lodash/lang/isTypedArray', 'lodash/lang/isUndefined', 'lodash/lang/lt', 'lodash/lang/lte', 'lodash/lang/toArray', 'lodash/lang/toPlainObject'], function (exports, _lodashLangClone, _lodashLangCloneDeep, _lodashLangEq, _lodashLangGt, _lodashLangGte, _lodashLangIsArguments, _lodashLangIsArray, _lodashLangIsBoolean, _lodashLangIsDate, _lodashLangIsElement, _lodashLangIsEmpty, _lodashLangIsEqual, _lodashLangIsError, _lodashLangIsFinite, _lodashLangIsFunction, _lodashLangIsMatch, _lodashLangIsNaN, _lodashLangIsNative, _lodashLangIsNull, _lodashLangIsNumber, _lodashLangIsObject, _lodashLangIsPlainObject, _lodashLangIsRegExp, _lodashLangIsString, _lodashLangIsTypedArray, _lodashLangIsUndefined, _lodashLangLt, _lodashLangLte, _lodashLangToArray, _lodashLangToPlainObject) {\n 'use strict';\n\n exports['default'] = {\n 'clone': _lodashLangClone['default'],\n 'cloneDeep': _lodashLangCloneDeep['default'],\n 'eq': _lodashLangEq['default'],\n 'gt': _lodashLangGt['default'],\n 'gte': _lodashLangGte['default'],\n 'isArguments': _lodashLangIsArguments['default'],\n 'isArray': _lodashLangIsArray['default'],\n 'isBoolean': _lodashLangIsBoolean['default'],\n 'isDate': _lodashLangIsDate['default'],\n 'isElement': _lodashLangIsElement['default'],\n 'isEmpty': _lodashLangIsEmpty['default'],\n 'isEqual': _lodashLangIsEqual['default'],\n 'isError': _lodashLangIsError['default'],\n 'isFinite': _lodashLangIsFinite['default'],\n 'isFunction': _lodashLangIsFunction['default'],\n 'isMatch': _lodashLangIsMatch['default'],\n 'isNaN': _lodashLangIsNaN['default'],\n 'isNative': _lodashLangIsNative['default'],\n 'isNull': _lodashLangIsNull['default'],\n 'isNumber': _lodashLangIsNumber['default'],\n 'isObject': _lodashLangIsObject['default'],\n 'isPlainObject': _lodashLangIsPlainObject['default'],\n 'isRegExp': _lodashLangIsRegExp['default'],\n 'isString': _lodashLangIsString['default'],\n 'isTypedArray': _lodashLangIsTypedArray['default'],\n 'isUndefined': _lodashLangIsUndefined['default'],\n 'lt': _lodashLangLt['default'],\n 'lte': _lodashLangLte['default'],\n 'toArray': _lodashLangToArray['default'],\n 'toPlainObject': _lodashLangToPlainObject['default']\n };\n});","define('lodash/lodash', ['exports', 'lodash/array', 'lodash/chain', 'lodash/collection', 'lodash/date', 'lodash/function', 'lodash/lang', 'lodash/math', 'lodash/number', 'lodash/object', 'lodash/string', 'lodash/utility', 'lodash/internal/LazyWrapper', 'lodash/internal/LodashWrapper', 'lodash/internal/arrayEach', 'lodash/internal/arrayPush', 'lodash/internal/baseCallback', 'lodash/internal/baseForOwn', 'lodash/internal/baseFunctions', 'lodash/internal/baseMatches', 'lodash/internal/createHybridWrapper', 'lodash/utility/identity', 'lodash/lang/isArray', 'lodash/lang/isObject', 'lodash/object/keys', 'lodash/array/last', 'lodash/internal/lazyClone', 'lodash/internal/lazyReverse', 'lodash/internal/lazyValue', 'lodash/chain/lodash', 'lodash/utility/mixin', 'lodash/utility/property', 'lodash/internal/realNames', 'lodash/support', 'lodash/chain/thru'], function (exports, _lodashArray, _lodashChain, _lodashCollection, _lodashDate, _lodashFunction, _lodashLang, _lodashMath, _lodashNumber, _lodashObject, _lodashString, _lodashUtility, _lodashInternalLazyWrapper, _lodashInternalLodashWrapper, _lodashInternalArrayEach, _lodashInternalArrayPush, _lodashInternalBaseCallback, _lodashInternalBaseForOwn, _lodashInternalBaseFunctions, _lodashInternalBaseMatches, _lodashInternalCreateHybridWrapper, _lodashUtilityIdentity, _lodashLangIsArray, _lodashLangIsObject, _lodashObjectKeys, _lodashArrayLast, _lodashInternalLazyClone, _lodashInternalLazyReverse, _lodashInternalLazyValue, _lodashChainLodash, _lodashUtilityMixin, _lodashUtilityProperty, _lodashInternalRealNames, _lodashSupport, _lodashChainThru) {\n /**\n * @license\n * lodash 3.10.1 (Custom Build) \n * Build: `lodash modularize modern exports=\"es\" -o ./`\n * Copyright 2012-2015 The Dojo Foundation \n * Based on Underscore.js 1.8.3 \n * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license \n */\n 'use strict';\n\n /** Used as the semantic version number. */\n var VERSION = '3.10.1';\n\n /** Used to compose bitmasks for wrapper metadata. */\n var BIND_KEY_FLAG = 2;\n\n /** Used to indicate the type of lazy iteratees. */\n var LAZY_MAP_FLAG = 2;\n\n /** Used for native method references. */\n var arrayProto = Array.prototype,\n stringProto = String.prototype;\n\n /* Native method references for those with the same name as other `lodash` methods. */\n var nativeFloor = Math.floor,\n nativeMax = Math.max,\n nativeMin = Math.min;\n\n /** Used as references for `-Infinity` and `Infinity`. */\n var POSITIVE_INFINITY = Number.POSITIVE_INFINITY;\n\n // wrap `_.mixin` so it works when provided only one argument\n var mixin = (function (func) {\n return function (object, source, options) {\n if (options == null) {\n var isObj = (0, _lodashLangIsObject['default'])(source),\n props = isObj && (0, _lodashObjectKeys['default'])(source),\n methodNames = props && props.length && (0, _lodashInternalBaseFunctions['default'])(source, props);\n\n if (!(methodNames ? methodNames.length : isObj)) {\n options = source;\n source = object;\n object = this;\n }\n }\n return func(object, source, options);\n };\n })(_lodashUtilityMixin['default']);\n\n // Add functions that return wrapped values when chaining.\n _lodashChainLodash['default'].after = _lodashFunction['default'].after;\n _lodashChainLodash['default'].ary = _lodashFunction['default'].ary;\n _lodashChainLodash['default'].assign = _lodashObject['default'].assign;\n _lodashChainLodash['default'].at = _lodashCollection['default'].at;\n _lodashChainLodash['default'].before = _lodashFunction['default'].before;\n _lodashChainLodash['default'].bind = _lodashFunction['default'].bind;\n _lodashChainLodash['default'].bindAll = _lodashFunction['default'].bindAll;\n _lodashChainLodash['default'].bindKey = _lodashFunction['default'].bindKey;\n _lodashChainLodash['default'].callback = _lodashUtility['default'].callback;\n _lodashChainLodash['default'].chain = _lodashChain['default'].chain;\n _lodashChainLodash['default'].chunk = _lodashArray['default'].chunk;\n _lodashChainLodash['default'].compact = _lodashArray['default'].compact;\n _lodashChainLodash['default'].constant = _lodashUtility['default'].constant;\n _lodashChainLodash['default'].countBy = _lodashCollection['default'].countBy;\n _lodashChainLodash['default'].create = _lodashObject['default'].create;\n _lodashChainLodash['default'].curry = _lodashFunction['default'].curry;\n _lodashChainLodash['default'].curryRight = _lodashFunction['default'].curryRight;\n _lodashChainLodash['default'].debounce = _lodashFunction['default'].debounce;\n _lodashChainLodash['default'].defaults = _lodashObject['default'].defaults;\n _lodashChainLodash['default'].defaultsDeep = _lodashObject['default'].defaultsDeep;\n _lodashChainLodash['default'].defer = _lodashFunction['default'].defer;\n _lodashChainLodash['default'].delay = _lodashFunction['default'].delay;\n _lodashChainLodash['default'].difference = _lodashArray['default'].difference;\n _lodashChainLodash['default'].drop = _lodashArray['default'].drop;\n _lodashChainLodash['default'].dropRight = _lodashArray['default'].dropRight;\n _lodashChainLodash['default'].dropRightWhile = _lodashArray['default'].dropRightWhile;\n _lodashChainLodash['default'].dropWhile = _lodashArray['default'].dropWhile;\n _lodashChainLodash['default'].fill = _lodashArray['default'].fill;\n _lodashChainLodash['default'].filter = _lodashCollection['default'].filter;\n _lodashChainLodash['default'].flatten = _lodashArray['default'].flatten;\n _lodashChainLodash['default'].flattenDeep = _lodashArray['default'].flattenDeep;\n _lodashChainLodash['default'].flow = _lodashFunction['default'].flow;\n _lodashChainLodash['default'].flowRight = _lodashFunction['default'].flowRight;\n _lodashChainLodash['default'].forEach = _lodashCollection['default'].forEach;\n _lodashChainLodash['default'].forEachRight = _lodashCollection['default'].forEachRight;\n _lodashChainLodash['default'].forIn = _lodashObject['default'].forIn;\n _lodashChainLodash['default'].forInRight = _lodashObject['default'].forInRight;\n _lodashChainLodash['default'].forOwn = _lodashObject['default'].forOwn;\n _lodashChainLodash['default'].forOwnRight = _lodashObject['default'].forOwnRight;\n _lodashChainLodash['default'].functions = _lodashObject['default'].functions;\n _lodashChainLodash['default'].groupBy = _lodashCollection['default'].groupBy;\n _lodashChainLodash['default'].indexBy = _lodashCollection['default'].indexBy;\n _lodashChainLodash['default'].initial = _lodashArray['default'].initial;\n _lodashChainLodash['default'].intersection = _lodashArray['default'].intersection;\n _lodashChainLodash['default'].invert = _lodashObject['default'].invert;\n _lodashChainLodash['default'].invoke = _lodashCollection['default'].invoke;\n _lodashChainLodash['default'].keys = _lodashObjectKeys['default'];\n _lodashChainLodash['default'].keysIn = _lodashObject['default'].keysIn;\n _lodashChainLodash['default'].map = _lodashCollection['default'].map;\n _lodashChainLodash['default'].mapKeys = _lodashObject['default'].mapKeys;\n _lodashChainLodash['default'].mapValues = _lodashObject['default'].mapValues;\n _lodashChainLodash['default'].matches = _lodashUtility['default'].matches;\n _lodashChainLodash['default'].matchesProperty = _lodashUtility['default'].matchesProperty;\n _lodashChainLodash['default'].memoize = _lodashFunction['default'].memoize;\n _lodashChainLodash['default'].merge = _lodashObject['default'].merge;\n _lodashChainLodash['default'].method = _lodashUtility['default'].method;\n _lodashChainLodash['default'].methodOf = _lodashUtility['default'].methodOf;\n _lodashChainLodash['default'].mixin = mixin;\n _lodashChainLodash['default'].modArgs = _lodashFunction['default'].modArgs;\n _lodashChainLodash['default'].negate = _lodashFunction['default'].negate;\n _lodashChainLodash['default'].omit = _lodashObject['default'].omit;\n _lodashChainLodash['default'].once = _lodashFunction['default'].once;\n _lodashChainLodash['default'].pairs = _lodashObject['default'].pairs;\n _lodashChainLodash['default'].partial = _lodashFunction['default'].partial;\n _lodashChainLodash['default'].partialRight = _lodashFunction['default'].partialRight;\n _lodashChainLodash['default'].partition = _lodashCollection['default'].partition;\n _lodashChainLodash['default'].pick = _lodashObject['default'].pick;\n _lodashChainLodash['default'].pluck = _lodashCollection['default'].pluck;\n _lodashChainLodash['default'].property = _lodashUtilityProperty['default'];\n _lodashChainLodash['default'].propertyOf = _lodashUtility['default'].propertyOf;\n _lodashChainLodash['default'].pull = _lodashArray['default'].pull;\n _lodashChainLodash['default'].pullAt = _lodashArray['default'].pullAt;\n _lodashChainLodash['default'].range = _lodashUtility['default'].range;\n _lodashChainLodash['default'].rearg = _lodashFunction['default'].rearg;\n _lodashChainLodash['default'].reject = _lodashCollection['default'].reject;\n _lodashChainLodash['default'].remove = _lodashArray['default'].remove;\n _lodashChainLodash['default'].rest = _lodashArray['default'].rest;\n _lodashChainLodash['default'].restParam = _lodashFunction['default'].restParam;\n _lodashChainLodash['default'].set = _lodashObject['default'].set;\n _lodashChainLodash['default'].shuffle = _lodashCollection['default'].shuffle;\n _lodashChainLodash['default'].slice = _lodashArray['default'].slice;\n _lodashChainLodash['default'].sortBy = _lodashCollection['default'].sortBy;\n _lodashChainLodash['default'].sortByAll = _lodashCollection['default'].sortByAll;\n _lodashChainLodash['default'].sortByOrder = _lodashCollection['default'].sortByOrder;\n _lodashChainLodash['default'].spread = _lodashFunction['default'].spread;\n _lodashChainLodash['default'].take = _lodashArray['default'].take;\n _lodashChainLodash['default'].takeRight = _lodashArray['default'].takeRight;\n _lodashChainLodash['default'].takeRightWhile = _lodashArray['default'].takeRightWhile;\n _lodashChainLodash['default'].takeWhile = _lodashArray['default'].takeWhile;\n _lodashChainLodash['default'].tap = _lodashChain['default'].tap;\n _lodashChainLodash['default'].throttle = _lodashFunction['default'].throttle;\n _lodashChainLodash['default'].thru = _lodashChainThru['default'];\n _lodashChainLodash['default'].times = _lodashUtility['default'].times;\n _lodashChainLodash['default'].toArray = _lodashLang['default'].toArray;\n _lodashChainLodash['default'].toPlainObject = _lodashLang['default'].toPlainObject;\n _lodashChainLodash['default'].transform = _lodashObject['default'].transform;\n _lodashChainLodash['default'].union = _lodashArray['default'].union;\n _lodashChainLodash['default'].uniq = _lodashArray['default'].uniq;\n _lodashChainLodash['default'].unzip = _lodashArray['default'].unzip;\n _lodashChainLodash['default'].unzipWith = _lodashArray['default'].unzipWith;\n _lodashChainLodash['default'].values = _lodashObject['default'].values;\n _lodashChainLodash['default'].valuesIn = _lodashObject['default'].valuesIn;\n _lodashChainLodash['default'].where = _lodashCollection['default'].where;\n _lodashChainLodash['default'].without = _lodashArray['default'].without;\n _lodashChainLodash['default'].wrap = _lodashFunction['default'].wrap;\n _lodashChainLodash['default'].xor = _lodashArray['default'].xor;\n _lodashChainLodash['default'].zip = _lodashArray['default'].zip;\n _lodashChainLodash['default'].zipObject = _lodashArray['default'].zipObject;\n _lodashChainLodash['default'].zipWith = _lodashArray['default'].zipWith;\n\n // Add aliases.\n _lodashChainLodash['default'].backflow = _lodashFunction['default'].flowRight;\n _lodashChainLodash['default'].collect = _lodashCollection['default'].map;\n _lodashChainLodash['default'].compose = _lodashFunction['default'].flowRight;\n _lodashChainLodash['default'].each = _lodashCollection['default'].forEach;\n _lodashChainLodash['default'].eachRight = _lodashCollection['default'].forEachRight;\n _lodashChainLodash['default'].extend = _lodashObject['default'].assign;\n _lodashChainLodash['default'].iteratee = _lodashUtility['default'].callback;\n _lodashChainLodash['default'].methods = _lodashObject['default'].functions;\n _lodashChainLodash['default'].object = _lodashArray['default'].zipObject;\n _lodashChainLodash['default'].select = _lodashCollection['default'].filter;\n _lodashChainLodash['default'].tail = _lodashArray['default'].rest;\n _lodashChainLodash['default'].unique = _lodashArray['default'].uniq;\n\n // Add functions to `lodash.prototype`.\n mixin(_lodashChainLodash['default'], _lodashChainLodash['default']);\n\n // Add functions that return unwrapped values when chaining.\n _lodashChainLodash['default'].add = _lodashMath['default'].add;\n _lodashChainLodash['default'].attempt = _lodashUtility['default'].attempt;\n _lodashChainLodash['default'].camelCase = _lodashString['default'].camelCase;\n _lodashChainLodash['default'].capitalize = _lodashString['default'].capitalize;\n _lodashChainLodash['default'].ceil = _lodashMath['default'].ceil;\n _lodashChainLodash['default'].clone = _lodashLang['default'].clone;\n _lodashChainLodash['default'].cloneDeep = _lodashLang['default'].cloneDeep;\n _lodashChainLodash['default'].deburr = _lodashString['default'].deburr;\n _lodashChainLodash['default'].endsWith = _lodashString['default'].endsWith;\n _lodashChainLodash['default'].escape = _lodashString['default'].escape;\n _lodashChainLodash['default'].escapeRegExp = _lodashString['default'].escapeRegExp;\n _lodashChainLodash['default'].every = _lodashCollection['default'].every;\n _lodashChainLodash['default'].find = _lodashCollection['default'].find;\n _lodashChainLodash['default'].findIndex = _lodashArray['default'].findIndex;\n _lodashChainLodash['default'].findKey = _lodashObject['default'].findKey;\n _lodashChainLodash['default'].findLast = _lodashCollection['default'].findLast;\n _lodashChainLodash['default'].findLastIndex = _lodashArray['default'].findLastIndex;\n _lodashChainLodash['default'].findLastKey = _lodashObject['default'].findLastKey;\n _lodashChainLodash['default'].findWhere = _lodashCollection['default'].findWhere;\n _lodashChainLodash['default'].first = _lodashArray['default'].first;\n _lodashChainLodash['default'].floor = _lodashMath['default'].floor;\n _lodashChainLodash['default'].get = _lodashObject['default'].get;\n _lodashChainLodash['default'].gt = _lodashLang['default'].gt;\n _lodashChainLodash['default'].gte = _lodashLang['default'].gte;\n _lodashChainLodash['default'].has = _lodashObject['default'].has;\n _lodashChainLodash['default'].identity = _lodashUtilityIdentity['default'];\n _lodashChainLodash['default'].includes = _lodashCollection['default'].includes;\n _lodashChainLodash['default'].indexOf = _lodashArray['default'].indexOf;\n _lodashChainLodash['default'].inRange = _lodashNumber['default'].inRange;\n _lodashChainLodash['default'].isArguments = _lodashLang['default'].isArguments;\n _lodashChainLodash['default'].isArray = _lodashLangIsArray['default'];\n _lodashChainLodash['default'].isBoolean = _lodashLang['default'].isBoolean;\n _lodashChainLodash['default'].isDate = _lodashLang['default'].isDate;\n _lodashChainLodash['default'].isElement = _lodashLang['default'].isElement;\n _lodashChainLodash['default'].isEmpty = _lodashLang['default'].isEmpty;\n _lodashChainLodash['default'].isEqual = _lodashLang['default'].isEqual;\n _lodashChainLodash['default'].isError = _lodashLang['default'].isError;\n _lodashChainLodash['default'].isFinite = _lodashLang['default'].isFinite;\n _lodashChainLodash['default'].isFunction = _lodashLang['default'].isFunction;\n _lodashChainLodash['default'].isMatch = _lodashLang['default'].isMatch;\n _lodashChainLodash['default'].isNaN = _lodashLang['default'].isNaN;\n _lodashChainLodash['default'].isNative = _lodashLang['default'].isNative;\n _lodashChainLodash['default'].isNull = _lodashLang['default'].isNull;\n _lodashChainLodash['default'].isNumber = _lodashLang['default'].isNumber;\n _lodashChainLodash['default'].isObject = _lodashLangIsObject['default'];\n _lodashChainLodash['default'].isPlainObject = _lodashLang['default'].isPlainObject;\n _lodashChainLodash['default'].isRegExp = _lodashLang['default'].isRegExp;\n _lodashChainLodash['default'].isString = _lodashLang['default'].isString;\n _lodashChainLodash['default'].isTypedArray = _lodashLang['default'].isTypedArray;\n _lodashChainLodash['default'].isUndefined = _lodashLang['default'].isUndefined;\n _lodashChainLodash['default'].kebabCase = _lodashString['default'].kebabCase;\n _lodashChainLodash['default'].last = _lodashArrayLast['default'];\n _lodashChainLodash['default'].lastIndexOf = _lodashArray['default'].lastIndexOf;\n _lodashChainLodash['default'].lt = _lodashLang['default'].lt;\n _lodashChainLodash['default'].lte = _lodashLang['default'].lte;\n _lodashChainLodash['default'].max = _lodashMath['default'].max;\n _lodashChainLodash['default'].min = _lodashMath['default'].min;\n _lodashChainLodash['default'].noop = _lodashUtility['default'].noop;\n _lodashChainLodash['default'].now = _lodashDate['default'].now;\n _lodashChainLodash['default'].pad = _lodashString['default'].pad;\n _lodashChainLodash['default'].padLeft = _lodashString['default'].padLeft;\n _lodashChainLodash['default'].padRight = _lodashString['default'].padRight;\n _lodashChainLodash['default'].parseInt = _lodashString['default'].parseInt;\n _lodashChainLodash['default'].random = _lodashNumber['default'].random;\n _lodashChainLodash['default'].reduce = _lodashCollection['default'].reduce;\n _lodashChainLodash['default'].reduceRight = _lodashCollection['default'].reduceRight;\n _lodashChainLodash['default'].repeat = _lodashString['default'].repeat;\n _lodashChainLodash['default'].result = _lodashObject['default'].result;\n _lodashChainLodash['default'].round = _lodashMath['default'].round;\n _lodashChainLodash['default'].size = _lodashCollection['default'].size;\n _lodashChainLodash['default'].snakeCase = _lodashString['default'].snakeCase;\n _lodashChainLodash['default'].some = _lodashCollection['default'].some;\n _lodashChainLodash['default'].sortedIndex = _lodashArray['default'].sortedIndex;\n _lodashChainLodash['default'].sortedLastIndex = _lodashArray['default'].sortedLastIndex;\n _lodashChainLodash['default'].startCase = _lodashString['default'].startCase;\n _lodashChainLodash['default'].startsWith = _lodashString['default'].startsWith;\n _lodashChainLodash['default'].sum = _lodashMath['default'].sum;\n _lodashChainLodash['default'].template = _lodashString['default'].template;\n _lodashChainLodash['default'].trim = _lodashString['default'].trim;\n _lodashChainLodash['default'].trimLeft = _lodashString['default'].trimLeft;\n _lodashChainLodash['default'].trimRight = _lodashString['default'].trimRight;\n _lodashChainLodash['default'].trunc = _lodashString['default'].trunc;\n _lodashChainLodash['default'].unescape = _lodashString['default'].unescape;\n _lodashChainLodash['default'].uniqueId = _lodashUtility['default'].uniqueId;\n _lodashChainLodash['default'].words = _lodashString['default'].words;\n\n // Add aliases.\n _lodashChainLodash['default'].all = _lodashCollection['default'].every;\n _lodashChainLodash['default'].any = _lodashCollection['default'].some;\n _lodashChainLodash['default'].contains = _lodashCollection['default'].includes;\n _lodashChainLodash['default'].eq = _lodashLang['default'].isEqual;\n _lodashChainLodash['default'].detect = _lodashCollection['default'].find;\n _lodashChainLodash['default'].foldl = _lodashCollection['default'].reduce;\n _lodashChainLodash['default'].foldr = _lodashCollection['default'].reduceRight;\n _lodashChainLodash['default'].head = _lodashArray['default'].first;\n _lodashChainLodash['default'].include = _lodashCollection['default'].includes;\n _lodashChainLodash['default'].inject = _lodashCollection['default'].reduce;\n\n mixin(_lodashChainLodash['default'], (function () {\n var source = {};\n (0, _lodashInternalBaseForOwn['default'])(_lodashChainLodash['default'], function (func, methodName) {\n if (!_lodashChainLodash['default'].prototype[methodName]) {\n source[methodName] = func;\n }\n });\n return source;\n })(), false);\n\n // Add functions capable of returning wrapped and unwrapped values when chaining.\n _lodashChainLodash['default'].sample = _lodashCollection['default'].sample;\n\n _lodashChainLodash['default'].prototype.sample = function (n) {\n if (!this.__chain__ && n == null) {\n return _lodashCollection['default'].sample(this.value());\n }\n return this.thru(function (value) {\n return _lodashCollection['default'].sample(value, n);\n });\n };\n\n /**\n * The semantic version number.\n *\n * @static\n * @memberOf _\n * @type string\n */\n _lodashChainLodash['default'].VERSION = VERSION;\n\n _lodashChainLodash['default'].support = _lodashSupport['default'];\n (_lodashChainLodash['default'].templateSettings = _lodashString['default'].templateSettings).imports._ = _lodashChainLodash['default'];\n\n // Assign default placeholders.\n (0, _lodashInternalArrayEach['default'])(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function (methodName) {\n _lodashChainLodash['default'][methodName].placeholder = _lodashChainLodash['default'];\n });\n\n // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.\n (0, _lodashInternalArrayEach['default'])(['drop', 'take'], function (methodName, index) {\n _lodashInternalLazyWrapper['default'].prototype[methodName] = function (n) {\n var filtered = this.__filtered__;\n if (filtered && !index) {\n return new _lodashInternalLazyWrapper['default'](this);\n }\n n = n == null ? 1 : nativeMax(nativeFloor(n) || 0, 0);\n\n var result = this.clone();\n if (filtered) {\n result.__takeCount__ = nativeMin(result.__takeCount__, n);\n } else {\n result.__views__.push({ 'size': n, 'type': methodName + (result.__dir__ < 0 ? 'Right' : '') });\n }\n return result;\n };\n\n _lodashInternalLazyWrapper['default'].prototype[methodName + 'Right'] = function (n) {\n return this.reverse()[methodName](n).reverse();\n };\n });\n\n // Add `LazyWrapper` methods that accept an `iteratee` value.\n (0, _lodashInternalArrayEach['default'])(['filter', 'map', 'takeWhile'], function (methodName, index) {\n var type = index + 1,\n isFilter = type != LAZY_MAP_FLAG;\n\n _lodashInternalLazyWrapper['default'].prototype[methodName] = function (iteratee, thisArg) {\n var result = this.clone();\n result.__iteratees__.push({ 'iteratee': (0, _lodashInternalBaseCallback['default'])(iteratee, thisArg, 1), 'type': type });\n result.__filtered__ = result.__filtered__ || isFilter;\n return result;\n };\n });\n\n // Add `LazyWrapper` methods for `_.first` and `_.last`.\n (0, _lodashInternalArrayEach['default'])(['first', 'last'], function (methodName, index) {\n var takeName = 'take' + (index ? 'Right' : '');\n\n _lodashInternalLazyWrapper['default'].prototype[methodName] = function () {\n return this[takeName](1).value()[0];\n };\n });\n\n // Add `LazyWrapper` methods for `_.initial` and `_.rest`.\n (0, _lodashInternalArrayEach['default'])(['initial', 'rest'], function (methodName, index) {\n var dropName = 'drop' + (index ? '' : 'Right');\n\n _lodashInternalLazyWrapper['default'].prototype[methodName] = function () {\n return this.__filtered__ ? new _lodashInternalLazyWrapper['default'](this) : this[dropName](1);\n };\n });\n\n // Add `LazyWrapper` methods for `_.pluck` and `_.where`.\n (0, _lodashInternalArrayEach['default'])(['pluck', 'where'], function (methodName, index) {\n var operationName = index ? 'filter' : 'map',\n createCallback = index ? _lodashInternalBaseMatches['default'] : _lodashUtilityProperty['default'];\n\n _lodashInternalLazyWrapper['default'].prototype[methodName] = function (value) {\n return this[operationName](createCallback(value));\n };\n });\n\n _lodashInternalLazyWrapper['default'].prototype.compact = function () {\n return this.filter(_lodashUtilityIdentity['default']);\n };\n\n _lodashInternalLazyWrapper['default'].prototype.reject = function (predicate, thisArg) {\n predicate = (0, _lodashInternalBaseCallback['default'])(predicate, thisArg, 1);\n return this.filter(function (value) {\n return !predicate(value);\n });\n };\n\n _lodashInternalLazyWrapper['default'].prototype.slice = function (start, end) {\n start = start == null ? 0 : +start || 0;\n\n var result = this;\n if (result.__filtered__ && (start > 0 || end < 0)) {\n return new _lodashInternalLazyWrapper['default'](result);\n }\n if (start < 0) {\n result = result.takeRight(-start);\n } else if (start) {\n result = result.drop(start);\n }\n if (end !== undefined) {\n end = +end || 0;\n result = end < 0 ? result.dropRight(-end) : result.take(end - start);\n }\n return result;\n };\n\n _lodashInternalLazyWrapper['default'].prototype.takeRightWhile = function (predicate, thisArg) {\n return this.reverse().takeWhile(predicate, thisArg).reverse();\n };\n\n _lodashInternalLazyWrapper['default'].prototype.toArray = function () {\n return this.take(POSITIVE_INFINITY);\n };\n\n // Add `LazyWrapper` methods to `lodash.prototype`.\n (0, _lodashInternalBaseForOwn['default'])(_lodashInternalLazyWrapper['default'].prototype, function (func, methodName) {\n var checkIteratee = /^(?:filter|map|reject)|While$/.test(methodName),\n retUnwrapped = /^(?:first|last)$/.test(methodName),\n lodashFunc = _lodashChainLodash['default'][retUnwrapped ? 'take' + (methodName == 'last' ? 'Right' : '') : methodName];\n\n if (!lodashFunc) {\n return;\n }\n _lodashChainLodash['default'].prototype[methodName] = function () {\n var args = retUnwrapped ? [1] : arguments,\n chainAll = this.__chain__,\n value = this.__wrapped__,\n isHybrid = !!this.__actions__.length,\n isLazy = value instanceof _lodashInternalLazyWrapper['default'],\n iteratee = args[0],\n useLazy = isLazy || (0, _lodashLangIsArray['default'])(value);\n\n if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {\n // Avoid lazy use if the iteratee has a \"length\" value other than `1`.\n isLazy = useLazy = false;\n }\n var interceptor = function interceptor(value) {\n return retUnwrapped && chainAll ? lodashFunc(value, 1)[0] : lodashFunc.apply(undefined, (0, _lodashInternalArrayPush['default'])([value], args));\n };\n\n var action = { 'func': _lodashChainThru['default'], 'args': [interceptor], 'thisArg': undefined },\n onlyLazy = isLazy && !isHybrid;\n\n if (retUnwrapped && !chainAll) {\n if (onlyLazy) {\n value = value.clone();\n value.__actions__.push(action);\n return func.call(value);\n }\n return lodashFunc.call(undefined, this.value())[0];\n }\n if (!retUnwrapped && useLazy) {\n value = onlyLazy ? value : new _lodashInternalLazyWrapper['default'](this);\n var result = func.apply(value, args);\n result.__actions__.push(action);\n return new _lodashInternalLodashWrapper['default'](result, chainAll);\n }\n return this.thru(interceptor);\n };\n });\n\n // Add `Array` and `String` methods to `lodash.prototype`.\n (0, _lodashInternalArrayEach['default'])(['join', 'pop', 'push', 'replace', 'shift', 'sort', 'splice', 'split', 'unshift'], function (methodName) {\n var func = (/^(?:replace|split)$/.test(methodName) ? stringProto : arrayProto)[methodName],\n chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',\n retUnwrapped = /^(?:join|pop|replace|shift)$/.test(methodName);\n\n _lodashChainLodash['default'].prototype[methodName] = function () {\n var args = arguments;\n if (retUnwrapped && !this.__chain__) {\n return func.apply(this.value(), args);\n }\n return this[chainName](function (value) {\n return func.apply(value, args);\n });\n };\n });\n\n // Map minified function names to their real names.\n (0, _lodashInternalBaseForOwn['default'])(_lodashInternalLazyWrapper['default'].prototype, function (func, methodName) {\n var lodashFunc = _lodashChainLodash['default'][methodName];\n if (lodashFunc) {\n var key = lodashFunc.name + '',\n names = _lodashInternalRealNames['default'][key] || (_lodashInternalRealNames['default'][key] = []);\n\n names.push({ 'name': methodName, 'func': lodashFunc });\n }\n });\n\n _lodashInternalRealNames['default'][(0, _lodashInternalCreateHybridWrapper['default'])(undefined, BIND_KEY_FLAG).name] = [{ 'name': 'wrapper', 'func': undefined }];\n\n // Add functions to the lazy wrapper.\n _lodashInternalLazyWrapper['default'].prototype.clone = _lodashInternalLazyClone['default'];\n _lodashInternalLazyWrapper['default'].prototype.reverse = _lodashInternalLazyReverse['default'];\n _lodashInternalLazyWrapper['default'].prototype.value = _lodashInternalLazyValue['default'];\n\n // Add chaining functions to the `lodash` wrapper.\n _lodashChainLodash['default'].prototype.chain = _lodashChain['default'].wrapperChain;\n _lodashChainLodash['default'].prototype.commit = _lodashChain['default'].commit;\n _lodashChainLodash['default'].prototype.concat = _lodashChain['default'].concat;\n _lodashChainLodash['default'].prototype.plant = _lodashChain['default'].plant;\n _lodashChainLodash['default'].prototype.reverse = _lodashChain['default'].reverse;\n _lodashChainLodash['default'].prototype.toString = _lodashChain['default'].toString;\n _lodashChainLodash['default'].prototype.run = _lodashChainLodash['default'].prototype.toJSON = _lodashChainLodash['default'].prototype.valueOf = _lodashChainLodash['default'].prototype.value = _lodashChain['default'].value;\n\n // Add function aliases to the `lodash` wrapper.\n _lodashChainLodash['default'].prototype.collect = _lodashChainLodash['default'].prototype.map;\n _lodashChainLodash['default'].prototype.head = _lodashChainLodash['default'].prototype.first;\n _lodashChainLodash['default'].prototype.select = _lodashChainLodash['default'].prototype.filter;\n _lodashChainLodash['default'].prototype.tail = _lodashChainLodash['default'].prototype.rest;\n\n exports['default'] = _lodashChainLodash['default'];\n});","define(\"lodash/math/add\", [\"exports\"], function (exports) {\n /**\n * Adds two numbers.\n *\n * @static\n * @memberOf _\n * @category Math\n * @param {number} augend The first number to add.\n * @param {number} addend The second number to add.\n * @returns {number} Returns the sum.\n * @example\n *\n * _.add(6, 4);\n * // => 10\n */\n \"use strict\";\n\n function add(augend, addend) {\n return (+augend || 0) + (+addend || 0);\n }\n\n exports[\"default\"] = add;\n});","define('lodash/math/ceil', ['exports', 'lodash/internal/createRound'], function (exports, _lodashInternalCreateRound) {\n 'use strict';\n\n /**\n * Calculates `n` rounded up to `precision`.\n *\n * @static\n * @memberOf _\n * @category Math\n * @param {number} n The number to round up.\n * @param {number} [precision=0] The precision to round up to.\n * @returns {number} Returns the rounded up number.\n * @example\n *\n * _.ceil(4.006);\n * // => 5\n *\n * _.ceil(6.004, 2);\n * // => 6.01\n *\n * _.ceil(6040, -2);\n * // => 6100\n */\n var ceil = (0, _lodashInternalCreateRound['default'])('ceil');\n\n exports['default'] = ceil;\n});","define('lodash/math/floor', ['exports', 'lodash/internal/createRound'], function (exports, _lodashInternalCreateRound) {\n 'use strict';\n\n /**\n * Calculates `n` rounded down to `precision`.\n *\n * @static\n * @memberOf _\n * @category Math\n * @param {number} n The number to round down.\n * @param {number} [precision=0] The precision to round down to.\n * @returns {number} Returns the rounded down number.\n * @example\n *\n * _.floor(4.006);\n * // => 4\n *\n * _.floor(0.046, 2);\n * // => 0.04\n *\n * _.floor(4060, -2);\n * // => 4000\n */\n var floor = (0, _lodashInternalCreateRound['default'])('floor');\n\n exports['default'] = floor;\n});","define('lodash/math/max', ['exports', 'lodash/internal/createExtremum', 'lodash/lang/gt'], function (exports, _lodashInternalCreateExtremum, _lodashLangGt) {\n 'use strict';\n\n /** Used as references for `-Infinity` and `Infinity`. */\n var NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY;\n\n /**\n * Gets the maximum value of `collection`. If `collection` is empty or falsey\n * `-Infinity` is returned. If an iteratee function is provided it's invoked\n * for each value in `collection` to generate the criterion by which the value\n * is ranked. The `iteratee` is bound to `thisArg` and invoked with three\n * arguments: (value, index, collection).\n *\n * If a property name is provided for `iteratee` the created `_.property`\n * style callback returns the property value of the given element.\n *\n * If a value is also provided for `thisArg` the created `_.matchesProperty`\n * style callback returns `true` for elements that have a matching property\n * value, else `false`.\n *\n * If an object is provided for `iteratee` the created `_.matches` style\n * callback returns `true` for elements that have the properties of the given\n * object, else `false`.\n *\n * @static\n * @memberOf _\n * @category Math\n * @param {Array|Object|string} collection The collection to iterate over.\n * @param {Function|Object|string} [iteratee] The function invoked per iteration.\n * @param {*} [thisArg] The `this` binding of `iteratee`.\n * @returns {*} Returns the maximum value.\n * @example\n *\n * _.max([4, 2, 8, 6]);\n * // => 8\n *\n * _.max([]);\n * // => -Infinity\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 }\n * ];\n *\n * _.max(users, function(chr) {\n * return chr.age;\n * });\n * // => { 'user': 'fred', 'age': 40 }\n *\n * // using the `_.property` callback shorthand\n * _.max(users, 'age');\n * // => { 'user': 'fred', 'age': 40 }\n */\n var max = (0, _lodashInternalCreateExtremum['default'])(_lodashLangGt['default'], NEGATIVE_INFINITY);\n\n exports['default'] = max;\n});","define('lodash/math/min', ['exports', 'lodash/internal/createExtremum', 'lodash/lang/lt'], function (exports, _lodashInternalCreateExtremum, _lodashLangLt) {\n 'use strict';\n\n /** Used as references for `-Infinity` and `Infinity`. */\n var POSITIVE_INFINITY = Number.POSITIVE_INFINITY;\n\n /**\n * Gets the minimum value of `collection`. If `collection` is empty or falsey\n * `Infinity` is returned. If an iteratee function is provided it's invoked\n * for each value in `collection` to generate the criterion by which the value\n * is ranked. The `iteratee` is bound to `thisArg` and invoked with three\n * arguments: (value, index, collection).\n *\n * If a property name is provided for `iteratee` the created `_.property`\n * style callback returns the property value of the given element.\n *\n * If a value is also provided for `thisArg` the created `_.matchesProperty`\n * style callback returns `true` for elements that have a matching property\n * value, else `false`.\n *\n * If an object is provided for `iteratee` the created `_.matches` style\n * callback returns `true` for elements that have the properties of the given\n * object, else `false`.\n *\n * @static\n * @memberOf _\n * @category Math\n * @param {Array|Object|string} collection The collection to iterate over.\n * @param {Function|Object|string} [iteratee] The function invoked per iteration.\n * @param {*} [thisArg] The `this` binding of `iteratee`.\n * @returns {*} Returns the minimum value.\n * @example\n *\n * _.min([4, 2, 8, 6]);\n * // => 2\n *\n * _.min([]);\n * // => Infinity\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 }\n * ];\n *\n * _.min(users, function(chr) {\n * return chr.age;\n * });\n * // => { 'user': 'barney', 'age': 36 }\n *\n * // using the `_.property` callback shorthand\n * _.min(users, 'age');\n * // => { 'user': 'barney', 'age': 36 }\n */\n var min = (0, _lodashInternalCreateExtremum['default'])(_lodashLangLt['default'], POSITIVE_INFINITY);\n\n exports['default'] = min;\n});","define('lodash/math/round', ['exports', 'lodash/internal/createRound'], function (exports, _lodashInternalCreateRound) {\n 'use strict';\n\n /**\n * Calculates `n` rounded to `precision`.\n *\n * @static\n * @memberOf _\n * @category Math\n * @param {number} n The number to round.\n * @param {number} [precision=0] The precision to round to.\n * @returns {number} Returns the rounded number.\n * @example\n *\n * _.round(4.006);\n * // => 4\n *\n * _.round(4.006, 2);\n * // => 4.01\n *\n * _.round(4060, -2);\n * // => 4100\n */\n var round = (0, _lodashInternalCreateRound['default'])('round');\n\n exports['default'] = round;\n});","define('lodash/math/sum', ['exports', 'lodash/internal/arraySum', 'lodash/internal/baseCallback', 'lodash/internal/baseSum', 'lodash/lang/isArray', 'lodash/internal/isIterateeCall', 'lodash/internal/toIterable'], function (exports, _lodashInternalArraySum, _lodashInternalBaseCallback, _lodashInternalBaseSum, _lodashLangIsArray, _lodashInternalIsIterateeCall, _lodashInternalToIterable) {\n 'use strict';\n\n /**\n * Gets the sum of the values in `collection`.\n *\n * @static\n * @memberOf _\n * @category Math\n * @param {Array|Object|string} collection The collection to iterate over.\n * @param {Function|Object|string} [iteratee] The function invoked per iteration.\n * @param {*} [thisArg] The `this` binding of `iteratee`.\n * @returns {number} Returns the sum.\n * @example\n *\n * _.sum([4, 6]);\n * // => 10\n *\n * _.sum({ 'a': 4, 'b': 6 });\n * // => 10\n *\n * var objects = [\n * { 'n': 4 },\n * { 'n': 6 }\n * ];\n *\n * _.sum(objects, function(object) {\n * return object.n;\n * });\n * // => 10\n *\n * // using the `_.property` callback shorthand\n * _.sum(objects, 'n');\n * // => 10\n */\n function sum(collection, iteratee, thisArg) {\n if (thisArg && (0, _lodashInternalIsIterateeCall['default'])(collection, iteratee, thisArg)) {\n iteratee = undefined;\n }\n iteratee = (0, _lodashInternalBaseCallback['default'])(iteratee, thisArg, 3);\n return iteratee.length == 1 ? (0, _lodashInternalArraySum['default'])((0, _lodashLangIsArray['default'])(collection) ? collection : (0, _lodashInternalToIterable['default'])(collection), iteratee) : (0, _lodashInternalBaseSum['default'])(collection, iteratee);\n }\n\n exports['default'] = sum;\n});","define('lodash/math', ['exports', 'lodash/math/add', 'lodash/math/ceil', 'lodash/math/floor', 'lodash/math/max', 'lodash/math/min', 'lodash/math/round', 'lodash/math/sum'], function (exports, _lodashMathAdd, _lodashMathCeil, _lodashMathFloor, _lodashMathMax, _lodashMathMin, _lodashMathRound, _lodashMathSum) {\n 'use strict';\n\n exports['default'] = {\n 'add': _lodashMathAdd['default'],\n 'ceil': _lodashMathCeil['default'],\n 'floor': _lodashMathFloor['default'],\n 'max': _lodashMathMax['default'],\n 'min': _lodashMathMin['default'],\n 'round': _lodashMathRound['default'],\n 'sum': _lodashMathSum['default']\n };\n});","define(\"lodash/number/inRange\", [\"exports\"], function (exports) {\n /* Native method references for those with the same name as other `lodash` methods. */\n \"use strict\";\n\n var nativeMax = Math.max,\n nativeMin = Math.min;\n\n /**\n * Checks if `n` is between `start` and up to but not including, `end`. If\n * `end` is not specified it's set to `start` with `start` then set to `0`.\n *\n * @static\n * @memberOf _\n * @category Number\n * @param {number} n The number to check.\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `n` is in the range, else `false`.\n * @example\n *\n * _.inRange(3, 2, 4);\n * // => true\n *\n * _.inRange(4, 8);\n * // => true\n *\n * _.inRange(4, 2);\n * // => false\n *\n * _.inRange(2, 2);\n * // => false\n *\n * _.inRange(1.2, 2);\n * // => true\n *\n * _.inRange(5.2, 4);\n * // => false\n */\n function inRange(value, start, end) {\n start = +start || 0;\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = +end || 0;\n }\n return value >= nativeMin(start, end) && value < nativeMax(start, end);\n }\n\n exports[\"default\"] = inRange;\n});","define('lodash/number/random', ['exports', 'lodash/internal/baseRandom', 'lodash/internal/isIterateeCall'], function (exports, _lodashInternalBaseRandom, _lodashInternalIsIterateeCall) {\n 'use strict';\n\n /* Native method references for those with the same name as other `lodash` methods. */\n var nativeMin = Math.min,\n nativeRandom = Math.random;\n\n /**\n * Produces a random number between `min` and `max` (inclusive). If only one\n * argument is provided a number between `0` and the given number is returned.\n * If `floating` is `true`, or either `min` or `max` are floats, a floating-point\n * number is returned instead of an integer.\n *\n * @static\n * @memberOf _\n * @category Number\n * @param {number} [min=0] The minimum possible value.\n * @param {number} [max=1] The maximum possible value.\n * @param {boolean} [floating] Specify returning a floating-point number.\n * @returns {number} Returns the random number.\n * @example\n *\n * _.random(0, 5);\n * // => an integer between 0 and 5\n *\n * _.random(5);\n * // => also an integer between 0 and 5\n *\n * _.random(5, true);\n * // => a floating-point number between 0 and 5\n *\n * _.random(1.2, 5.2);\n * // => a floating-point number between 1.2 and 5.2\n */\n function random(min, max, floating) {\n if (floating && (0, _lodashInternalIsIterateeCall['default'])(min, max, floating)) {\n max = floating = undefined;\n }\n var noMin = min == null,\n noMax = max == null;\n\n if (floating == null) {\n if (noMax && typeof min == 'boolean') {\n floating = min;\n min = 1;\n } else if (typeof max == 'boolean') {\n floating = max;\n noMax = true;\n }\n }\n if (noMin && noMax) {\n max = 1;\n noMax = false;\n }\n min = +min || 0;\n if (noMax) {\n max = min;\n min = 0;\n } else {\n max = +max || 0;\n }\n if (floating || min % 1 || max % 1) {\n var rand = nativeRandom();\n return nativeMin(min + rand * (max - min + parseFloat('1e-' + ((rand + '').length - 1))), max);\n }\n return (0, _lodashInternalBaseRandom['default'])(min, max);\n }\n\n exports['default'] = random;\n});","define('lodash/number', ['exports', 'lodash/number/inRange', 'lodash/number/random'], function (exports, _lodashNumberInRange, _lodashNumberRandom) {\n 'use strict';\n\n exports['default'] = {\n 'inRange': _lodashNumberInRange['default'],\n 'random': _lodashNumberRandom['default']\n };\n});","define('lodash/object/assign', ['exports', 'lodash/internal/assignWith', 'lodash/internal/baseAssign', 'lodash/internal/createAssigner'], function (exports, _lodashInternalAssignWith, _lodashInternalBaseAssign, _lodashInternalCreateAssigner) {\n 'use strict';\n\n /**\n * Assigns own enumerable properties of source object(s) to the destination\n * object. Subsequent sources overwrite property assignments of previous sources.\n * If `customizer` is provided it's invoked to produce the assigned values.\n * The `customizer` is bound to `thisArg` and invoked with five arguments:\n * (objectValue, sourceValue, key, object, source).\n *\n * **Note:** This method mutates `object` and is based on\n * [`Object.assign`](http://ecma-international.org/ecma-262/6.0/#sec-object.assign).\n *\n * @static\n * @memberOf _\n * @alias extend\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {*} [thisArg] The `this` binding of `customizer`.\n * @returns {Object} Returns `object`.\n * @example\n *\n * _.assign({ 'user': 'barney' }, { 'age': 40 }, { 'user': 'fred' });\n * // => { 'user': 'fred', 'age': 40 }\n *\n * // using a customizer callback\n * var defaults = _.partialRight(_.assign, function(value, other) {\n * return _.isUndefined(value) ? other : value;\n * });\n *\n * defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });\n * // => { 'user': 'barney', 'age': 36 }\n */\n var assign = (0, _lodashInternalCreateAssigner['default'])(function (object, source, customizer) {\n return customizer ? (0, _lodashInternalAssignWith['default'])(object, source, customizer) : (0, _lodashInternalBaseAssign['default'])(object, source);\n });\n\n exports['default'] = assign;\n});","define('lodash/object/create', ['exports', 'lodash/internal/baseAssign', 'lodash/internal/baseCreate', 'lodash/internal/isIterateeCall'], function (exports, _lodashInternalBaseAssign, _lodashInternalBaseCreate, _lodashInternalIsIterateeCall) {\n 'use strict';\n\n /**\n * Creates an object that inherits from the given `prototype` object. If a\n * `properties` object is provided its own enumerable properties are assigned\n * to the created object.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} prototype The object to inherit from.\n * @param {Object} [properties] The properties to assign to the object.\n * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.\n * @returns {Object} Returns the new object.\n * @example\n *\n * function Shape() {\n * this.x = 0;\n * this.y = 0;\n * }\n *\n * function Circle() {\n * Shape.call(this);\n * }\n *\n * Circle.prototype = _.create(Shape.prototype, {\n * 'constructor': Circle\n * });\n *\n * var circle = new Circle;\n * circle instanceof Circle;\n * // => true\n *\n * circle instanceof Shape;\n * // => true\n */\n function create(prototype, properties, guard) {\n var result = (0, _lodashInternalBaseCreate['default'])(prototype);\n if (guard && (0, _lodashInternalIsIterateeCall['default'])(prototype, properties, guard)) {\n properties = undefined;\n }\n return properties ? (0, _lodashInternalBaseAssign['default'])(result, properties) : result;\n }\n\n exports['default'] = create;\n});","define('lodash/object/defaults', ['exports', 'lodash/object/assign', 'lodash/internal/assignDefaults', 'lodash/internal/createDefaults'], function (exports, _lodashObjectAssign, _lodashInternalAssignDefaults, _lodashInternalCreateDefaults) {\n 'use strict';\n\n /**\n * Assigns own enumerable properties of source object(s) to the destination\n * object for all destination properties that resolve to `undefined`. Once a\n * property is set, additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });\n * // => { 'user': 'barney', 'age': 36 }\n */\n var defaults = (0, _lodashInternalCreateDefaults['default'])(_lodashObjectAssign['default'], _lodashInternalAssignDefaults['default']);\n\n exports['default'] = defaults;\n});","define('lodash/object/defaultsDeep', ['exports', 'lodash/internal/createDefaults', 'lodash/object/merge', 'lodash/internal/mergeDefaults'], function (exports, _lodashInternalCreateDefaults, _lodashObjectMerge, _lodashInternalMergeDefaults) {\n 'use strict';\n\n /**\n * This method is like `_.defaults` except that it recursively assigns\n * default properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * _.defaultsDeep({ 'user': { 'name': 'barney' } }, { 'user': { 'name': 'fred', 'age': 36 } });\n * // => { 'user': { 'name': 'barney', 'age': 36 } }\n *\n */\n var defaultsDeep = (0, _lodashInternalCreateDefaults['default'])(_lodashObjectMerge['default'], _lodashInternalMergeDefaults['default']);\n\n exports['default'] = defaultsDeep;\n});","define('lodash/object/extend', ['exports', 'lodash/object/assign'], function (exports, _lodashObjectAssign) {\n 'use strict';\n\n exports['default'] = _lodashObjectAssign['default'];\n});","define('lodash/object/findKey', ['exports', 'lodash/internal/baseForOwn', 'lodash/internal/createFindKey'], function (exports, _lodashInternalBaseForOwn, _lodashInternalCreateFindKey) {\n 'use strict';\n\n /**\n * This method is like `_.find` except that it returns the key of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * If a property name is provided for `predicate` the created `_.property`\n * style callback returns the property value of the given element.\n *\n * If a value is also provided for `thisArg` the created `_.matchesProperty`\n * style callback returns `true` for elements that have a matching property\n * value, else `false`.\n *\n * If an object is provided for `predicate` the created `_.matches` style\n * callback returns `true` for elements that have the properties of the given\n * object, else `false`.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to search.\n * @param {Function|Object|string} [predicate=_.identity] The function invoked\n * per iteration.\n * @param {*} [thisArg] The `this` binding of `predicate`.\n * @returns {string|undefined} Returns the key of the matched element, else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findKey(users, function(chr) {\n * return chr.age < 40;\n * });\n * // => 'barney' (iteration order is not guaranteed)\n *\n * // using the `_.matches` callback shorthand\n * _.findKey(users, { 'age': 1, 'active': true });\n * // => 'pebbles'\n *\n * // using the `_.matchesProperty` callback shorthand\n * _.findKey(users, 'active', false);\n * // => 'fred'\n *\n * // using the `_.property` callback shorthand\n * _.findKey(users, 'active');\n * // => 'barney'\n */\n var findKey = (0, _lodashInternalCreateFindKey['default'])(_lodashInternalBaseForOwn['default']);\n\n exports['default'] = findKey;\n});","define('lodash/object/findLastKey', ['exports', 'lodash/internal/baseForOwnRight', 'lodash/internal/createFindKey'], function (exports, _lodashInternalBaseForOwnRight, _lodashInternalCreateFindKey) {\n 'use strict';\n\n /**\n * This method is like `_.findKey` except that it iterates over elements of\n * a collection in the opposite order.\n *\n * If a property name is provided for `predicate` the created `_.property`\n * style callback returns the property value of the given element.\n *\n * If a value is also provided for `thisArg` the created `_.matchesProperty`\n * style callback returns `true` for elements that have a matching property\n * value, else `false`.\n *\n * If an object is provided for `predicate` the created `_.matches` style\n * callback returns `true` for elements that have the properties of the given\n * object, else `false`.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to search.\n * @param {Function|Object|string} [predicate=_.identity] The function invoked\n * per iteration.\n * @param {*} [thisArg] The `this` binding of `predicate`.\n * @returns {string|undefined} Returns the key of the matched element, else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findLastKey(users, function(chr) {\n * return chr.age < 40;\n * });\n * // => returns `pebbles` assuming `_.findKey` returns `barney`\n *\n * // using the `_.matches` callback shorthand\n * _.findLastKey(users, { 'age': 36, 'active': true });\n * // => 'barney'\n *\n * // using the `_.matchesProperty` callback shorthand\n * _.findLastKey(users, 'active', false);\n * // => 'fred'\n *\n * // using the `_.property` callback shorthand\n * _.findLastKey(users, 'active');\n * // => 'pebbles'\n */\n var findLastKey = (0, _lodashInternalCreateFindKey['default'])(_lodashInternalBaseForOwnRight['default']);\n\n exports['default'] = findLastKey;\n});","define('lodash/object/forIn', ['exports', 'lodash/internal/baseFor', 'lodash/internal/createForIn'], function (exports, _lodashInternalBaseFor, _lodashInternalCreateForIn) {\n 'use strict';\n\n /**\n * Iterates over own and inherited enumerable properties of an object invoking\n * `iteratee` for each property. The `iteratee` is bound to `thisArg` and invoked\n * with three arguments: (value, key, object). Iteratee functions may exit\n * iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [thisArg] The `this` binding of `iteratee`.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forIn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => logs 'a', 'b', and 'c' (iteration order is not guaranteed)\n */\n var forIn = (0, _lodashInternalCreateForIn['default'])(_lodashInternalBaseFor['default']);\n\n exports['default'] = forIn;\n});","define('lodash/object/forInRight', ['exports', 'lodash/internal/baseForRight', 'lodash/internal/createForIn'], function (exports, _lodashInternalBaseForRight, _lodashInternalCreateForIn) {\n 'use strict';\n\n /**\n * This method is like `_.forIn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [thisArg] The `this` binding of `iteratee`.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forInRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => logs 'c', 'b', and 'a' assuming `_.forIn ` logs 'a', 'b', and 'c'\n */\n var forInRight = (0, _lodashInternalCreateForIn['default'])(_lodashInternalBaseForRight['default']);\n\n exports['default'] = forInRight;\n});","define('lodash/object/forOwn', ['exports', 'lodash/internal/baseForOwn', 'lodash/internal/createForOwn'], function (exports, _lodashInternalBaseForOwn, _lodashInternalCreateForOwn) {\n 'use strict';\n\n /**\n * Iterates over own enumerable properties of an object invoking `iteratee`\n * for each property. The `iteratee` is bound to `thisArg` and invoked with\n * three arguments: (value, key, object). Iteratee functions may exit iteration\n * early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [thisArg] The `this` binding of `iteratee`.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => logs 'a' and 'b' (iteration order is not guaranteed)\n */\n var forOwn = (0, _lodashInternalCreateForOwn['default'])(_lodashInternalBaseForOwn['default']);\n\n exports['default'] = forOwn;\n});","define('lodash/object/forOwnRight', ['exports', 'lodash/internal/baseForOwnRight', 'lodash/internal/createForOwn'], function (exports, _lodashInternalBaseForOwnRight, _lodashInternalCreateForOwn) {\n 'use strict';\n\n /**\n * This method is like `_.forOwn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [thisArg] The `this` binding of `iteratee`.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwnRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => logs 'b' and 'a' assuming `_.forOwn` logs 'a' and 'b'\n */\n var forOwnRight = (0, _lodashInternalCreateForOwn['default'])(_lodashInternalBaseForOwnRight['default']);\n\n exports['default'] = forOwnRight;\n});","define('lodash/object/functions', ['exports', 'lodash/internal/baseFunctions', 'lodash/object/keysIn'], function (exports, _lodashInternalBaseFunctions, _lodashObjectKeysIn) {\n 'use strict';\n\n /**\n * Creates an array of function property names from all enumerable properties,\n * own and inherited, of `object`.\n *\n * @static\n * @memberOf _\n * @alias methods\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the new array of property names.\n * @example\n *\n * _.functions(_);\n * // => ['after', 'ary', 'assign', ...]\n */\n function functions(object) {\n return (0, _lodashInternalBaseFunctions['default'])(object, (0, _lodashObjectKeysIn['default'])(object));\n }\n\n exports['default'] = functions;\n});","define('lodash/object/get', ['exports', 'lodash/internal/baseGet', 'lodash/internal/toPath'], function (exports, _lodashInternalBaseGet, _lodashInternalToPath) {\n 'use strict';\n\n /**\n * Gets the property value at `path` of `object`. If the resolved value is\n * `undefined` the `defaultValue` is used in its place.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned if the resolved value is `undefined`.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\n function get(object, path, defaultValue) {\n var result = object == null ? undefined : (0, _lodashInternalBaseGet['default'])(object, (0, _lodashInternalToPath['default'])(path), path + '');\n return result === undefined ? defaultValue : result;\n }\n\n exports['default'] = get;\n});","define('lodash/object/has', ['exports', 'lodash/internal/baseGet', 'lodash/internal/baseSlice', 'lodash/lang/isArguments', 'lodash/lang/isArray', 'lodash/internal/isIndex', 'lodash/internal/isKey', 'lodash/internal/isLength', 'lodash/array/last', 'lodash/internal/toPath'], function (exports, _lodashInternalBaseGet, _lodashInternalBaseSlice, _lodashLangIsArguments, _lodashLangIsArray, _lodashInternalIsIndex, _lodashInternalIsKey, _lodashInternalIsLength, _lodashArrayLast, _lodashInternalToPath) {\n 'use strict';\n\n /** Used for native method references. */\n var objectProto = Object.prototype;\n\n /** Used to check objects for own properties. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /**\n * Checks if `path` is a direct property.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` is a direct property, else `false`.\n * @example\n *\n * var object = { 'a': { 'b': { 'c': 3 } } };\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b.c');\n * // => true\n *\n * _.has(object, ['a', 'b', 'c']);\n * // => true\n */\n function has(object, path) {\n if (object == null) {\n return false;\n }\n var result = hasOwnProperty.call(object, path);\n if (!result && !(0, _lodashInternalIsKey['default'])(path)) {\n path = (0, _lodashInternalToPath['default'])(path);\n object = path.length == 1 ? object : (0, _lodashInternalBaseGet['default'])(object, (0, _lodashInternalBaseSlice['default'])(path, 0, -1));\n if (object == null) {\n return false;\n }\n path = (0, _lodashArrayLast['default'])(path);\n result = hasOwnProperty.call(object, path);\n }\n return result || (0, _lodashInternalIsLength['default'])(object.length) && (0, _lodashInternalIsIndex['default'])(path, object.length) && ((0, _lodashLangIsArray['default'])(object) || (0, _lodashLangIsArguments['default'])(object));\n }\n\n exports['default'] = has;\n});","define('lodash/object/invert', ['exports', 'lodash/internal/isIterateeCall', 'lodash/object/keys'], function (exports, _lodashInternalIsIterateeCall, _lodashObjectKeys) {\n 'use strict';\n\n /** Used for native method references. */\n var objectProto = Object.prototype;\n\n /** Used to check objects for own properties. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /**\n * Creates an object composed of the inverted keys and values of `object`.\n * If `object` contains duplicate values, subsequent values overwrite property\n * assignments of previous values unless `multiValue` is `true`.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to invert.\n * @param {boolean} [multiValue] Allow multiple values per key.\n * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invert(object);\n * // => { '1': 'c', '2': 'b' }\n *\n * // with `multiValue`\n * _.invert(object, true);\n * // => { '1': ['a', 'c'], '2': ['b'] }\n */\n function invert(object, multiValue, guard) {\n if (guard && (0, _lodashInternalIsIterateeCall['default'])(object, multiValue, guard)) {\n multiValue = undefined;\n }\n var index = -1,\n props = (0, _lodashObjectKeys['default'])(object),\n length = props.length,\n result = {};\n\n while (++index < length) {\n var key = props[index],\n value = object[key];\n\n if (multiValue) {\n if (hasOwnProperty.call(result, value)) {\n result[value].push(key);\n } else {\n result[value] = [key];\n }\n } else {\n result[value] = key;\n }\n }\n return result;\n }\n\n exports['default'] = invert;\n});","define('lodash/object/keys', ['exports', 'lodash/internal/getNative', 'lodash/internal/isArrayLike', 'lodash/lang/isObject', 'lodash/internal/shimKeys'], function (exports, _lodashInternalGetNative, _lodashInternalIsArrayLike, _lodashLangIsObject, _lodashInternalShimKeys) {\n 'use strict';\n\n /* Native method references for those with the same name as other `lodash` methods. */\n var nativeKeys = (0, _lodashInternalGetNative['default'])(Object, 'keys');\n\n /**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\n var keys = !nativeKeys ? _lodashInternalShimKeys['default'] : function (object) {\n var Ctor = object == null ? undefined : object.constructor;\n if (typeof Ctor == 'function' && Ctor.prototype === object || typeof object != 'function' && (0, _lodashInternalIsArrayLike['default'])(object)) {\n return (0, _lodashInternalShimKeys['default'])(object);\n }\n return (0, _lodashLangIsObject['default'])(object) ? nativeKeys(object) : [];\n };\n\n exports['default'] = keys;\n});","define('lodash/object/keysIn', ['exports', 'lodash/lang/isArguments', 'lodash/lang/isArray', 'lodash/internal/isIndex', 'lodash/internal/isLength', 'lodash/lang/isObject'], function (exports, _lodashLangIsArguments, _lodashLangIsArray, _lodashInternalIsIndex, _lodashInternalIsLength, _lodashLangIsObject) {\n 'use strict';\n\n /** Used for native method references. */\n var objectProto = Object.prototype;\n\n /** Used to check objects for own properties. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\n function keysIn(object) {\n if (object == null) {\n return [];\n }\n if (!(0, _lodashLangIsObject['default'])(object)) {\n object = Object(object);\n }\n var length = object.length;\n length = length && (0, _lodashInternalIsLength['default'])(length) && ((0, _lodashLangIsArray['default'])(object) || (0, _lodashLangIsArguments['default'])(object)) && length || 0;\n\n var Ctor = object.constructor,\n index = -1,\n isProto = typeof Ctor == 'function' && Ctor.prototype === object,\n result = Array(length),\n skipIndexes = length > 0;\n\n while (++index < length) {\n result[index] = index + '';\n }\n for (var key in object) {\n if (!(skipIndexes && (0, _lodashInternalIsIndex['default'])(key, length)) && !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n }\n\n exports['default'] = keysIn;\n});","define('lodash/object/mapKeys', ['exports', 'lodash/internal/createObjectMapper'], function (exports, _lodashInternalCreateObjectMapper) {\n 'use strict';\n\n /**\n * The opposite of `_.mapValues`; this method creates an object with the\n * same values as `object` and keys generated by running each own enumerable\n * property of `object` through `iteratee`.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function|Object|string} [iteratee=_.identity] The function invoked\n * per iteration.\n * @param {*} [thisArg] The `this` binding of `iteratee`.\n * @returns {Object} Returns the new mapped object.\n * @example\n *\n * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\n * return key + value;\n * });\n * // => { 'a1': 1, 'b2': 2 }\n */\n var mapKeys = (0, _lodashInternalCreateObjectMapper['default'])(true);\n\n exports['default'] = mapKeys;\n});","define('lodash/object/mapValues', ['exports', 'lodash/internal/createObjectMapper'], function (exports, _lodashInternalCreateObjectMapper) {\n 'use strict';\n\n /**\n * Creates an object with the same keys as `object` and values generated by\n * running each own enumerable property of `object` through `iteratee`. The\n * iteratee function is bound to `thisArg` and invoked with three arguments:\n * (value, key, object).\n *\n * If a property name is provided for `iteratee` the created `_.property`\n * style callback returns the property value of the given element.\n *\n * If a value is also provided for `thisArg` the created `_.matchesProperty`\n * style callback returns `true` for elements that have a matching property\n * value, else `false`.\n *\n * If an object is provided for `iteratee` the created `_.matches` style\n * callback returns `true` for elements that have the properties of the given\n * object, else `false`.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function|Object|string} [iteratee=_.identity] The function invoked\n * per iteration.\n * @param {*} [thisArg] The `this` binding of `iteratee`.\n * @returns {Object} Returns the new mapped object.\n * @example\n *\n * _.mapValues({ 'a': 1, 'b': 2 }, function(n) {\n * return n * 3;\n * });\n * // => { 'a': 3, 'b': 6 }\n *\n * var users = {\n * 'fred': { 'user': 'fred', 'age': 40 },\n * 'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n *\n * // using the `_.property` callback shorthand\n * _.mapValues(users, 'age');\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n */\n var mapValues = (0, _lodashInternalCreateObjectMapper['default'])();\n\n exports['default'] = mapValues;\n});","define('lodash/object/merge', ['exports', 'lodash/internal/baseMerge', 'lodash/internal/createAssigner'], function (exports, _lodashInternalBaseMerge, _lodashInternalCreateAssigner) {\n 'use strict';\n\n /**\n * Recursively merges own enumerable properties of the source object(s), that\n * don't resolve to `undefined` into the destination object. Subsequent sources\n * overwrite property assignments of previous sources. If `customizer` is\n * provided it's invoked to produce the merged values of the destination and\n * source properties. If `customizer` returns `undefined` merging is handled\n * by the method instead. The `customizer` is bound to `thisArg` and invoked\n * with five arguments: (objectValue, sourceValue, key, object, source).\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {*} [thisArg] The `this` binding of `customizer`.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var users = {\n * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }]\n * };\n *\n * var ages = {\n * 'data': [{ 'age': 36 }, { 'age': 40 }]\n * };\n *\n * _.merge(users, ages);\n * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] }\n *\n * // using a customizer callback\n * var object = {\n * 'fruits': ['apple'],\n * 'vegetables': ['beet']\n * };\n *\n * var other = {\n * 'fruits': ['banana'],\n * 'vegetables': ['carrot']\n * };\n *\n * _.merge(object, other, function(a, b) {\n * if (_.isArray(a)) {\n * return a.concat(b);\n * }\n * });\n * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] }\n */\n var merge = (0, _lodashInternalCreateAssigner['default'])(_lodashInternalBaseMerge['default']);\n\n exports['default'] = merge;\n});","define('lodash/object/methods', ['exports', 'lodash/object/functions'], function (exports, _lodashObjectFunctions) {\n 'use strict';\n\n exports['default'] = _lodashObjectFunctions['default'];\n});","define('lodash/object/omit', ['exports', 'lodash/internal/arrayMap', 'lodash/internal/baseDifference', 'lodash/internal/baseFlatten', 'lodash/internal/bindCallback', 'lodash/object/keysIn', 'lodash/internal/pickByArray', 'lodash/internal/pickByCallback', 'lodash/function/restParam'], function (exports, _lodashInternalArrayMap, _lodashInternalBaseDifference, _lodashInternalBaseFlatten, _lodashInternalBindCallback, _lodashObjectKeysIn, _lodashInternalPickByArray, _lodashInternalPickByCallback, _lodashFunctionRestParam) {\n 'use strict';\n\n /**\n * The opposite of `_.pick`; this method creates an object composed of the\n * own and inherited enumerable properties of `object` that are not omitted.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {Function|...(string|string[])} [predicate] The function invoked per\n * iteration or property names to omit, specified as individual property\n * names or arrays of property names.\n * @param {*} [thisArg] The `this` binding of `predicate`.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'user': 'fred', 'age': 40 };\n *\n * _.omit(object, 'age');\n * // => { 'user': 'fred' }\n *\n * _.omit(object, _.isNumber);\n * // => { 'user': 'fred' }\n */\n var omit = (0, _lodashFunctionRestParam['default'])(function (object, props) {\n if (object == null) {\n return {};\n }\n if (typeof props[0] != 'function') {\n var props = (0, _lodashInternalArrayMap['default'])((0, _lodashInternalBaseFlatten['default'])(props), String);\n return (0, _lodashInternalPickByArray['default'])(object, (0, _lodashInternalBaseDifference['default'])((0, _lodashObjectKeysIn['default'])(object), props));\n }\n var predicate = (0, _lodashInternalBindCallback['default'])(props[0], props[1], 3);\n return (0, _lodashInternalPickByCallback['default'])(object, function (value, key, object) {\n return !predicate(value, key, object);\n });\n });\n\n exports['default'] = omit;\n});","define('lodash/object/pairs', ['exports', 'lodash/object/keys', 'lodash/internal/toObject'], function (exports, _lodashObjectKeys, _lodashInternalToObject) {\n 'use strict';\n\n /**\n * Creates a two dimensional array of the key-value pairs for `object`,\n * e.g. `[[key1, value1], [key2, value2]]`.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the new array of key-value pairs.\n * @example\n *\n * _.pairs({ 'barney': 36, 'fred': 40 });\n * // => [['barney', 36], ['fred', 40]] (iteration order is not guaranteed)\n */\n function pairs(object) {\n object = (0, _lodashInternalToObject['default'])(object);\n\n var index = -1,\n props = (0, _lodashObjectKeys['default'])(object),\n length = props.length,\n result = Array(length);\n\n while (++index < length) {\n var key = props[index];\n result[index] = [key, object[key]];\n }\n return result;\n }\n\n exports['default'] = pairs;\n});","define('lodash/object/pick', ['exports', 'lodash/internal/baseFlatten', 'lodash/internal/bindCallback', 'lodash/internal/pickByArray', 'lodash/internal/pickByCallback', 'lodash/function/restParam'], function (exports, _lodashInternalBaseFlatten, _lodashInternalBindCallback, _lodashInternalPickByArray, _lodashInternalPickByCallback, _lodashFunctionRestParam) {\n 'use strict';\n\n /**\n * Creates an object composed of the picked `object` properties. Property\n * names may be specified as individual arguments or as arrays of property\n * names. If `predicate` is provided it's invoked for each property of `object`\n * picking the properties `predicate` returns truthy for. The predicate is\n * bound to `thisArg` and invoked with three arguments: (value, key, object).\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {Function|...(string|string[])} [predicate] The function invoked per\n * iteration or property names to pick, specified as individual property\n * names or arrays of property names.\n * @param {*} [thisArg] The `this` binding of `predicate`.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'user': 'fred', 'age': 40 };\n *\n * _.pick(object, 'user');\n * // => { 'user': 'fred' }\n *\n * _.pick(object, _.isString);\n * // => { 'user': 'fred' }\n */\n var pick = (0, _lodashFunctionRestParam['default'])(function (object, props) {\n if (object == null) {\n return {};\n }\n return typeof props[0] == 'function' ? (0, _lodashInternalPickByCallback['default'])(object, (0, _lodashInternalBindCallback['default'])(props[0], props[1], 3)) : (0, _lodashInternalPickByArray['default'])(object, (0, _lodashInternalBaseFlatten['default'])(props));\n });\n\n exports['default'] = pick;\n});","define('lodash/object/result', ['exports', 'lodash/internal/baseGet', 'lodash/internal/baseSlice', 'lodash/lang/isFunction', 'lodash/internal/isKey', 'lodash/array/last', 'lodash/internal/toPath'], function (exports, _lodashInternalBaseGet, _lodashInternalBaseSlice, _lodashLangIsFunction, _lodashInternalIsKey, _lodashArrayLast, _lodashInternalToPath) {\n 'use strict';\n\n /**\n * This method is like `_.get` except that if the resolved value is a function\n * it's invoked with the `this` binding of its parent object and its result\n * is returned.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to resolve.\n * @param {*} [defaultValue] The value returned if the resolved value is `undefined`.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\n *\n * _.result(object, 'a[0].b.c1');\n * // => 3\n *\n * _.result(object, 'a[0].b.c2');\n * // => 4\n *\n * _.result(object, 'a.b.c', 'default');\n * // => 'default'\n *\n * _.result(object, 'a.b.c', _.constant('default'));\n * // => 'default'\n */\n function result(object, path, defaultValue) {\n var result = object == null ? undefined : object[path];\n if (result === undefined) {\n if (object != null && !(0, _lodashInternalIsKey['default'])(path, object)) {\n path = (0, _lodashInternalToPath['default'])(path);\n object = path.length == 1 ? object : (0, _lodashInternalBaseGet['default'])(object, (0, _lodashInternalBaseSlice['default'])(path, 0, -1));\n result = object == null ? undefined : object[(0, _lodashArrayLast['default'])(path)];\n }\n result = result === undefined ? defaultValue : result;\n }\n return (0, _lodashLangIsFunction['default'])(result) ? result.call(object) : result;\n }\n\n exports['default'] = result;\n});","define('lodash/object/set', ['exports', 'lodash/internal/isIndex', 'lodash/internal/isKey', 'lodash/lang/isObject', 'lodash/internal/toPath'], function (exports, _lodashInternalIsIndex, _lodashInternalIsKey, _lodashLangIsObject, _lodashInternalToPath) {\n 'use strict';\n\n /**\n * Sets the property value of `path` on `object`. If a portion of `path`\n * does not exist it's created.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to augment.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, 'x[0].y.z', 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\n function set(object, path, value) {\n if (object == null) {\n return object;\n }\n var pathKey = path + '';\n path = object[pathKey] != null || (0, _lodashInternalIsKey['default'])(path, object) ? [pathKey] : (0, _lodashInternalToPath['default'])(path);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = path[index];\n if ((0, _lodashLangIsObject['default'])(nested)) {\n if (index == lastIndex) {\n nested[key] = value;\n } else if (nested[key] == null) {\n nested[key] = (0, _lodashInternalIsIndex['default'])(path[index + 1]) ? [] : {};\n }\n }\n nested = nested[key];\n }\n return object;\n }\n\n exports['default'] = set;\n});","define('lodash/object/transform', ['exports', 'lodash/internal/arrayEach', 'lodash/internal/baseCallback', 'lodash/internal/baseCreate', 'lodash/internal/baseForOwn', 'lodash/lang/isArray', 'lodash/lang/isFunction', 'lodash/lang/isObject', 'lodash/lang/isTypedArray'], function (exports, _lodashInternalArrayEach, _lodashInternalBaseCallback, _lodashInternalBaseCreate, _lodashInternalBaseForOwn, _lodashLangIsArray, _lodashLangIsFunction, _lodashLangIsObject, _lodashLangIsTypedArray) {\n 'use strict';\n\n /**\n * An alternative to `_.reduce`; this method transforms `object` to a new\n * `accumulator` object which is the result of running each of its own enumerable\n * properties through `iteratee`, with each invocation potentially mutating\n * the `accumulator` object. The `iteratee` is bound to `thisArg` and invoked\n * with four arguments: (accumulator, value, key, object). Iteratee functions\n * may exit iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Array|Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The custom accumulator value.\n * @param {*} [thisArg] The `this` binding of `iteratee`.\n * @returns {*} Returns the accumulated value.\n * @example\n *\n * _.transform([2, 3, 4], function(result, n) {\n * result.push(n *= n);\n * return n % 2 == 0;\n * });\n * // => [4, 9]\n *\n * _.transform({ 'a': 1, 'b': 2 }, function(result, n, key) {\n * result[key] = n * 3;\n * });\n * // => { 'a': 3, 'b': 6 }\n */\n function transform(object, iteratee, accumulator, thisArg) {\n var isArr = (0, _lodashLangIsArray['default'])(object) || (0, _lodashLangIsTypedArray['default'])(object);\n iteratee = (0, _lodashInternalBaseCallback['default'])(iteratee, thisArg, 4);\n\n if (accumulator == null) {\n if (isArr || (0, _lodashLangIsObject['default'])(object)) {\n var Ctor = object.constructor;\n if (isArr) {\n accumulator = (0, _lodashLangIsArray['default'])(object) ? new Ctor() : [];\n } else {\n accumulator = (0, _lodashInternalBaseCreate['default'])((0, _lodashLangIsFunction['default'])(Ctor) ? Ctor.prototype : undefined);\n }\n } else {\n accumulator = {};\n }\n }\n (isArr ? _lodashInternalArrayEach['default'] : _lodashInternalBaseForOwn['default'])(object, function (value, index, object) {\n return iteratee(accumulator, value, index, object);\n });\n return accumulator;\n }\n\n exports['default'] = transform;\n});","define('lodash/object/values', ['exports', 'lodash/internal/baseValues', 'lodash/object/keys'], function (exports, _lodashInternalBaseValues, _lodashObjectKeys) {\n 'use strict';\n\n /**\n * Creates an array of the own enumerable property values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.values(new Foo);\n * // => [1, 2] (iteration order is not guaranteed)\n *\n * _.values('hi');\n * // => ['h', 'i']\n */\n function values(object) {\n return (0, _lodashInternalBaseValues['default'])(object, (0, _lodashObjectKeys['default'])(object));\n }\n\n exports['default'] = values;\n});","define('lodash/object/valuesIn', ['exports', 'lodash/internal/baseValues', 'lodash/object/keysIn'], function (exports, _lodashInternalBaseValues, _lodashObjectKeysIn) {\n 'use strict';\n\n /**\n * Creates an array of the own and inherited enumerable property values\n * of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.valuesIn(new Foo);\n * // => [1, 2, 3] (iteration order is not guaranteed)\n */\n function valuesIn(object) {\n return (0, _lodashInternalBaseValues['default'])(object, (0, _lodashObjectKeysIn['default'])(object));\n }\n\n exports['default'] = valuesIn;\n});","define('lodash/object', ['exports', 'lodash/object/assign', 'lodash/object/create', 'lodash/object/defaults', 'lodash/object/defaultsDeep', 'lodash/object/extend', 'lodash/object/findKey', 'lodash/object/findLastKey', 'lodash/object/forIn', 'lodash/object/forInRight', 'lodash/object/forOwn', 'lodash/object/forOwnRight', 'lodash/object/functions', 'lodash/object/get', 'lodash/object/has', 'lodash/object/invert', 'lodash/object/keys', 'lodash/object/keysIn', 'lodash/object/mapKeys', 'lodash/object/mapValues', 'lodash/object/merge', 'lodash/object/methods', 'lodash/object/omit', 'lodash/object/pairs', 'lodash/object/pick', 'lodash/object/result', 'lodash/object/set', 'lodash/object/transform', 'lodash/object/values', 'lodash/object/valuesIn'], function (exports, _lodashObjectAssign, _lodashObjectCreate, _lodashObjectDefaults, _lodashObjectDefaultsDeep, _lodashObjectExtend, _lodashObjectFindKey, _lodashObjectFindLastKey, _lodashObjectForIn, _lodashObjectForInRight, _lodashObjectForOwn, _lodashObjectForOwnRight, _lodashObjectFunctions, _lodashObjectGet, _lodashObjectHas, _lodashObjectInvert, _lodashObjectKeys, _lodashObjectKeysIn, _lodashObjectMapKeys, _lodashObjectMapValues, _lodashObjectMerge, _lodashObjectMethods, _lodashObjectOmit, _lodashObjectPairs, _lodashObjectPick, _lodashObjectResult, _lodashObjectSet, _lodashObjectTransform, _lodashObjectValues, _lodashObjectValuesIn) {\n 'use strict';\n\n exports['default'] = {\n 'assign': _lodashObjectAssign['default'],\n 'create': _lodashObjectCreate['default'],\n 'defaults': _lodashObjectDefaults['default'],\n 'defaultsDeep': _lodashObjectDefaultsDeep['default'],\n 'extend': _lodashObjectExtend['default'],\n 'findKey': _lodashObjectFindKey['default'],\n 'findLastKey': _lodashObjectFindLastKey['default'],\n 'forIn': _lodashObjectForIn['default'],\n 'forInRight': _lodashObjectForInRight['default'],\n 'forOwn': _lodashObjectForOwn['default'],\n 'forOwnRight': _lodashObjectForOwnRight['default'],\n 'functions': _lodashObjectFunctions['default'],\n 'get': _lodashObjectGet['default'],\n 'has': _lodashObjectHas['default'],\n 'invert': _lodashObjectInvert['default'],\n 'keys': _lodashObjectKeys['default'],\n 'keysIn': _lodashObjectKeysIn['default'],\n 'mapKeys': _lodashObjectMapKeys['default'],\n 'mapValues': _lodashObjectMapValues['default'],\n 'merge': _lodashObjectMerge['default'],\n 'methods': _lodashObjectMethods['default'],\n 'omit': _lodashObjectOmit['default'],\n 'pairs': _lodashObjectPairs['default'],\n 'pick': _lodashObjectPick['default'],\n 'result': _lodashObjectResult['default'],\n 'set': _lodashObjectSet['default'],\n 'transform': _lodashObjectTransform['default'],\n 'values': _lodashObjectValues['default'],\n 'valuesIn': _lodashObjectValuesIn['default']\n };\n});","define('lodash/string/camelCase', ['exports', 'lodash/internal/createCompounder'], function (exports, _lodashInternalCreateCompounder) {\n 'use strict';\n\n /**\n * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the camel cased string.\n * @example\n *\n * _.camelCase('Foo Bar');\n * // => 'fooBar'\n *\n * _.camelCase('--foo-bar');\n * // => 'fooBar'\n *\n * _.camelCase('__foo_bar__');\n * // => 'fooBar'\n */\n var camelCase = (0, _lodashInternalCreateCompounder['default'])(function (result, word, index) {\n word = word.toLowerCase();\n return result + (index ? word.charAt(0).toUpperCase() + word.slice(1) : word);\n });\n\n exports['default'] = camelCase;\n});","define('lodash/string/capitalize', ['exports', 'lodash/internal/baseToString'], function (exports, _lodashInternalBaseToString) {\n 'use strict';\n\n /**\n * Capitalizes the first character of `string`.\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to capitalize.\n * @returns {string} Returns the capitalized string.\n * @example\n *\n * _.capitalize('fred');\n * // => 'Fred'\n */\n function capitalize(string) {\n string = (0, _lodashInternalBaseToString['default'])(string);\n return string && string.charAt(0).toUpperCase() + string.slice(1);\n }\n\n exports['default'] = capitalize;\n});","define('lodash/string/deburr', ['exports', 'lodash/internal/baseToString', 'lodash/internal/deburrLetter'], function (exports, _lodashInternalBaseToString, _lodashInternalDeburrLetter) {\n 'use strict';\n\n /** Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). */\n var reComboMark = /[\\u0300-\\u036f\\ufe20-\\ufe23]/g;\n\n /** Used to match latin-1 supplementary letters (excluding mathematical operators). */\n var reLatin1 = /[\\xc0-\\xd6\\xd8-\\xde\\xdf-\\xf6\\xf8-\\xff]/g;\n\n /**\n * Deburrs `string` by converting [latin-1 supplementary letters](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n * to basic latin letters and removing [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to deburr.\n * @returns {string} Returns the deburred string.\n * @example\n *\n * _.deburr('déjà vu');\n * // => 'deja vu'\n */\n function deburr(string) {\n string = (0, _lodashInternalBaseToString['default'])(string);\n return string && string.replace(reLatin1, _lodashInternalDeburrLetter['default']).replace(reComboMark, '');\n }\n\n exports['default'] = deburr;\n});","define('lodash/string/endsWith', ['exports', 'lodash/internal/baseToString'], function (exports, _lodashInternalBaseToString) {\n 'use strict';\n\n /* Native method references for those with the same name as other `lodash` methods. */\n var nativeMin = Math.min;\n\n /**\n * Checks if `string` ends with the given target string.\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to search.\n * @param {string} [target] The string to search for.\n * @param {number} [position=string.length] The position to search from.\n * @returns {boolean} Returns `true` if `string` ends with `target`, else `false`.\n * @example\n *\n * _.endsWith('abc', 'c');\n * // => true\n *\n * _.endsWith('abc', 'b');\n * // => false\n *\n * _.endsWith('abc', 'b', 2);\n * // => true\n */\n function endsWith(string, target, position) {\n string = (0, _lodashInternalBaseToString['default'])(string);\n target = target + '';\n\n var length = string.length;\n position = position === undefined ? length : nativeMin(position < 0 ? 0 : +position || 0, length);\n\n position -= target.length;\n return position >= 0 && string.indexOf(target, position) == position;\n }\n\n exports['default'] = endsWith;\n});","define('lodash/string/escape', ['exports', 'lodash/internal/baseToString', 'lodash/internal/escapeHtmlChar'], function (exports, _lodashInternalBaseToString, _lodashInternalEscapeHtmlChar) {\n 'use strict';\n\n /** Used to match HTML entities and HTML characters. */\n var reUnescapedHtml = /[&<>\"'`]/g,\n reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\n\n /**\n * Converts the characters \"&\", \"<\", \">\", '\"', \"'\", and \"\\`\", in `string` to\n * their corresponding HTML entities.\n *\n * **Note:** No other characters are escaped. To escape additional characters\n * use a third-party library like [_he_](https://mths.be/he).\n *\n * Though the \">\" character is escaped for symmetry, characters like\n * \">\" and \"/\" don't need escaping in HTML and have no special meaning\n * unless they're part of a tag or unquoted attribute value.\n * See [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\n * (under \"semi-related fun fact\") for more details.\n *\n * Backticks are escaped because in Internet Explorer < 9, they can break out\n * of attribute values or HTML comments. See [#59](https://html5sec.org/#59),\n * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and\n * [#133](https://html5sec.org/#133) of the [HTML5 Security Cheatsheet](https://html5sec.org/)\n * for more details.\n *\n * When working with HTML you should always [quote attribute values](http://wonko.com/post/html-escaping)\n * to reduce XSS vectors.\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escape('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles'\n */\n function escape(string) {\n // Reset `lastIndex` because in IE < 9 `String#replace` does not.\n string = (0, _lodashInternalBaseToString['default'])(string);\n return string && reHasUnescapedHtml.test(string) ? string.replace(reUnescapedHtml, _lodashInternalEscapeHtmlChar['default']) : string;\n }\n\n exports['default'] = escape;\n});","define('lodash/string/escapeRegExp', ['exports', 'lodash/internal/baseToString', 'lodash/internal/escapeRegExpChar'], function (exports, _lodashInternalBaseToString, _lodashInternalEscapeRegExpChar) {\n 'use strict';\n\n /**\n * Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns)\n * and those outlined by [`EscapeRegExpPattern`](http://ecma-international.org/ecma-262/6.0/#sec-escaperegexppattern).\n */\n var reRegExpChars = /^[:!,]|[\\\\^$.*+?()[\\]{}|\\/]|(^[0-9a-fA-Fnrtuvx])|([\\n\\r\\u2028\\u2029])/g,\n reHasRegExpChars = RegExp(reRegExpChars.source);\n\n /**\n * Escapes the `RegExp` special characters \"\\\", \"/\", \"^\", \"$\", \".\", \"|\", \"?\",\n * \"*\", \"+\", \"(\", \")\", \"[\", \"]\", \"{\" and \"}\" in `string`.\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escapeRegExp('[lodash](https://lodash.com/)');\n * // => '\\[lodash\\]\\(https:\\/\\/lodash\\.com\\/\\)'\n */\n function escapeRegExp(string) {\n string = (0, _lodashInternalBaseToString['default'])(string);\n return string && reHasRegExpChars.test(string) ? string.replace(reRegExpChars, _lodashInternalEscapeRegExpChar['default']) : string || '(?:)';\n }\n\n exports['default'] = escapeRegExp;\n});","define('lodash/string/kebabCase', ['exports', 'lodash/internal/createCompounder'], function (exports, _lodashInternalCreateCompounder) {\n 'use strict';\n\n /**\n * Converts `string` to [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the kebab cased string.\n * @example\n *\n * _.kebabCase('Foo Bar');\n * // => 'foo-bar'\n *\n * _.kebabCase('fooBar');\n * // => 'foo-bar'\n *\n * _.kebabCase('__foo_bar__');\n * // => 'foo-bar'\n */\n var kebabCase = (0, _lodashInternalCreateCompounder['default'])(function (result, word, index) {\n return result + (index ? '-' : '') + word.toLowerCase();\n });\n\n exports['default'] = kebabCase;\n});","define('lodash/string/pad', ['exports', 'lodash/internal/baseToString', 'lodash/internal/createPadding', 'lodash/internal/root'], function (exports, _lodashInternalBaseToString, _lodashInternalCreatePadding, _lodashInternalRoot) {\n 'use strict';\n\n /* Native method references for those with the same name as other `lodash` methods. */\n var nativeCeil = Math.ceil,\n nativeFloor = Math.floor,\n nativeIsFinite = _lodashInternalRoot['default'].isFinite;\n\n /**\n * Pads `string` on the left and right sides if it's shorter than `length`.\n * Padding characters are truncated if they can't be evenly divided by `length`.\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.pad('abc', 8);\n * // => ' abc '\n *\n * _.pad('abc', 8, '_-');\n * // => '_-abc_-_'\n *\n * _.pad('abc', 3);\n * // => 'abc'\n */\n function pad(string, length, chars) {\n string = (0, _lodashInternalBaseToString['default'])(string);\n length = +length;\n\n var strLength = string.length;\n if (strLength >= length || !nativeIsFinite(length)) {\n return string;\n }\n var mid = (length - strLength) / 2,\n leftLength = nativeFloor(mid),\n rightLength = nativeCeil(mid);\n\n chars = (0, _lodashInternalCreatePadding['default'])('', rightLength, chars);\n return chars.slice(0, leftLength) + string + chars;\n }\n\n exports['default'] = pad;\n});","define('lodash/string/padLeft', ['exports', 'lodash/internal/createPadDir'], function (exports, _lodashInternalCreatePadDir) {\n 'use strict';\n\n /**\n * Pads `string` on the left side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padLeft('abc', 6);\n * // => ' abc'\n *\n * _.padLeft('abc', 6, '_-');\n * // => '_-_abc'\n *\n * _.padLeft('abc', 3);\n * // => 'abc'\n */\n var padLeft = (0, _lodashInternalCreatePadDir['default'])();\n\n exports['default'] = padLeft;\n});","define('lodash/string/padRight', ['exports', 'lodash/internal/createPadDir'], function (exports, _lodashInternalCreatePadDir) {\n 'use strict';\n\n /**\n * Pads `string` on the right side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padRight('abc', 6);\n * // => 'abc '\n *\n * _.padRight('abc', 6, '_-');\n * // => 'abc_-_'\n *\n * _.padRight('abc', 3);\n * // => 'abc'\n */\n var padRight = (0, _lodashInternalCreatePadDir['default'])(true);\n\n exports['default'] = padRight;\n});","define('lodash/string/parseInt', ['exports', 'lodash/internal/isIterateeCall', 'lodash/internal/root', 'lodash/string/trim'], function (exports, _lodashInternalIsIterateeCall, _lodashInternalRoot, _lodashStringTrim) {\n 'use strict';\n\n /** Used to detect hexadecimal string values. */\n var reHasHexPrefix = /^0[xX]/;\n\n /* Native method references for those with the same name as other `lodash` methods. */\n var nativeParseInt = _lodashInternalRoot['default'].parseInt;\n\n /**\n * Converts `string` to an integer of the specified radix. If `radix` is\n * `undefined` or `0`, a `radix` of `10` is used unless `value` is a hexadecimal,\n * in which case a `radix` of `16` is used.\n *\n * **Note:** This method aligns with the [ES5 implementation](https://es5.github.io/#E)\n * of `parseInt`.\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} string The string to convert.\n * @param {number} [radix] The radix to interpret `value` by.\n * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.parseInt('08');\n * // => 8\n *\n * _.map(['6', '08', '10'], _.parseInt);\n * // => [6, 8, 10]\n */\n function parseInt(string, radix, guard) {\n // Firefox < 21 and Opera < 15 follow ES3 for `parseInt`.\n // Chrome fails to trim leading whitespace characters.\n // See https://code.google.com/p/v8/issues/detail?id=3109 for more details.\n if (guard ? (0, _lodashInternalIsIterateeCall['default'])(string, radix, guard) : radix == null) {\n radix = 0;\n } else if (radix) {\n radix = +radix;\n }\n string = (0, _lodashStringTrim['default'])(string);\n return nativeParseInt(string, radix || (reHasHexPrefix.test(string) ? 16 : 10));\n }\n\n exports['default'] = parseInt;\n});","define('lodash/string/repeat', ['exports', 'lodash/internal/baseToString', 'lodash/internal/root'], function (exports, _lodashInternalBaseToString, _lodashInternalRoot) {\n 'use strict';\n\n /* Native method references for those with the same name as other `lodash` methods. */\n var nativeFloor = Math.floor,\n nativeIsFinite = _lodashInternalRoot['default'].isFinite;\n\n /**\n * Repeats the given string `n` times.\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to repeat.\n * @param {number} [n=0] The number of times to repeat the string.\n * @returns {string} Returns the repeated string.\n * @example\n *\n * _.repeat('*', 3);\n * // => '***'\n *\n * _.repeat('abc', 2);\n * // => 'abcabc'\n *\n * _.repeat('abc', 0);\n * // => ''\n */\n function repeat(string, n) {\n var result = '';\n string = (0, _lodashInternalBaseToString['default'])(string);\n n = +n;\n if (n < 1 || !string || !nativeIsFinite(n)) {\n return result;\n }\n // Leverage the exponentiation by squaring algorithm for a faster repeat.\n // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.\n do {\n if (n % 2) {\n result += string;\n }\n n = nativeFloor(n / 2);\n string += string;\n } while (n);\n\n return result;\n }\n\n exports['default'] = repeat;\n});","define('lodash/string/snakeCase', ['exports', 'lodash/internal/createCompounder'], function (exports, _lodashInternalCreateCompounder) {\n 'use strict';\n\n /**\n * Converts `string` to [snake case](https://en.wikipedia.org/wiki/Snake_case).\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the snake cased string.\n * @example\n *\n * _.snakeCase('Foo Bar');\n * // => 'foo_bar'\n *\n * _.snakeCase('fooBar');\n * // => 'foo_bar'\n *\n * _.snakeCase('--foo-bar');\n * // => 'foo_bar'\n */\n var snakeCase = (0, _lodashInternalCreateCompounder['default'])(function (result, word, index) {\n return result + (index ? '_' : '') + word.toLowerCase();\n });\n\n exports['default'] = snakeCase;\n});","define('lodash/string/startCase', ['exports', 'lodash/internal/createCompounder'], function (exports, _lodashInternalCreateCompounder) {\n 'use strict';\n\n /**\n * Converts `string` to [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the start cased string.\n * @example\n *\n * _.startCase('--foo-bar');\n * // => 'Foo Bar'\n *\n * _.startCase('fooBar');\n * // => 'Foo Bar'\n *\n * _.startCase('__foo_bar__');\n * // => 'Foo Bar'\n */\n var startCase = (0, _lodashInternalCreateCompounder['default'])(function (result, word, index) {\n return result + (index ? ' ' : '') + (word.charAt(0).toUpperCase() + word.slice(1));\n });\n\n exports['default'] = startCase;\n});","define('lodash/string/startsWith', ['exports', 'lodash/internal/baseToString'], function (exports, _lodashInternalBaseToString) {\n 'use strict';\n\n /* Native method references for those with the same name as other `lodash` methods. */\n var nativeMin = Math.min;\n\n /**\n * Checks if `string` starts with the given target string.\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to search.\n * @param {string} [target] The string to search for.\n * @param {number} [position=0] The position to search from.\n * @returns {boolean} Returns `true` if `string` starts with `target`, else `false`.\n * @example\n *\n * _.startsWith('abc', 'a');\n * // => true\n *\n * _.startsWith('abc', 'b');\n * // => false\n *\n * _.startsWith('abc', 'b', 1);\n * // => true\n */\n function startsWith(string, target, position) {\n string = (0, _lodashInternalBaseToString['default'])(string);\n position = position == null ? 0 : nativeMin(position < 0 ? 0 : +position || 0, string.length);\n\n return string.lastIndexOf(target, position) == position;\n }\n\n exports['default'] = startsWith;\n});","define('lodash/string/template', ['exports', 'lodash/internal/assignOwnDefaults', 'lodash/internal/assignWith', 'lodash/utility/attempt', 'lodash/internal/baseAssign', 'lodash/internal/baseToString', 'lodash/internal/baseValues', 'lodash/internal/escapeStringChar', 'lodash/lang/isError', 'lodash/internal/isIterateeCall', 'lodash/object/keys', 'lodash/internal/reInterpolate', 'lodash/string/templateSettings'], function (exports, _lodashInternalAssignOwnDefaults, _lodashInternalAssignWith, _lodashUtilityAttempt, _lodashInternalBaseAssign, _lodashInternalBaseToString, _lodashInternalBaseValues, _lodashInternalEscapeStringChar, _lodashLangIsError, _lodashInternalIsIterateeCall, _lodashObjectKeys, _lodashInternalReInterpolate, _lodashStringTemplateSettings) {\n 'use strict';\n\n /** Used to match empty string literals in compiled template source. */\n var reEmptyStringLeading = /\\b__p \\+= '';/g,\n reEmptyStringMiddle = /\\b(__p \\+=) '' \\+/g,\n reEmptyStringTrailing = /(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g;\n\n /** Used to match [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). */\n var reEsTemplate = /\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g;\n\n /** Used to ensure capturing order of template delimiters. */\n var reNoMatch = /($^)/;\n\n /** Used to match unescaped characters in compiled string literals. */\n var reUnescapedString = /['\\n\\r\\u2028\\u2029\\\\]/g;\n\n /**\n * Creates a compiled template function that can interpolate data properties\n * in \"interpolate\" delimiters, HTML-escape interpolated data properties in\n * \"escape\" delimiters, and execute JavaScript in \"evaluate\" delimiters. Data\n * properties may be accessed as free variables in the template. If a setting\n * object is provided it takes precedence over `_.templateSettings` values.\n *\n * **Note:** In the development build `_.template` utilizes\n * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)\n * for easier debugging.\n *\n * For more information on precompiling templates see\n * [lodash's custom builds documentation](https://lodash.com/custom-builds).\n *\n * For more information on Chrome extension sandboxes see\n * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The template string.\n * @param {Object} [options] The options object.\n * @param {RegExp} [options.escape] The HTML \"escape\" delimiter.\n * @param {RegExp} [options.evaluate] The \"evaluate\" delimiter.\n * @param {Object} [options.imports] An object to import into the template as free variables.\n * @param {RegExp} [options.interpolate] The \"interpolate\" delimiter.\n * @param {string} [options.sourceURL] The sourceURL of the template's compiled source.\n * @param {string} [options.variable] The data object variable name.\n * @param- {Object} [otherOptions] Enables the legacy `options` param signature.\n * @returns {Function} Returns the compiled template function.\n * @example\n *\n * // using the \"interpolate\" delimiter to create a compiled template\n * var compiled = _.template('hello <%= user %>!');\n * compiled({ 'user': 'fred' });\n * // => 'hello fred!'\n *\n * // using the HTML \"escape\" delimiter to escape data property values\n * var compiled = _.template('<%- value %>');\n * compiled({ 'value': '
{{author}}
Called {{i}} times
{{props.title}}
by {{byline}}
Hello world
by Yehuda Katz
Goodbye world
' + func(text) + '
fred, barney, & pebbles