Last active
August 29, 2015 13:56
-
-
Save rwjblue/9333682 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* @overview Ember - JavaScript Application Framework | |
* @copyright Copyright 2011-2014 Tilde Inc. and contributors | |
* Portions Copyright 2006-2011 Strobe Inc. | |
* Portions Copyright 2008-2011 Apple Inc. All rights reserved. | |
* @license Licensed under MIT license | |
* See https://raw.github.com/emberjs/ember.js/master/LICENSE | |
* @version 1.6.0-beta.1+canary.4686c4da | |
*/ | |
! function () { | |
var e, t, n, r, i; | |
! function () { | |
if (i = window.Ember = window.Ember || {}, "undefined" == typeof i && (i = {}), "undefined" == typeof i.__loader) { | |
var o = {}, a = {}; | |
e = function (e, t, n) { | |
o[e] = { | |
deps: t, | |
callback: n | |
} | |
}, r = n = t = function (e) { | |
function n(t) { | |
if ("." !== t.charAt(0)) return t; | |
for (var n = t.split("/"), r = e.split("/").slice(0, -1), i = 0, o = n.length; o > i; i++) { | |
var a = n[i]; | |
if (".." === a) r.pop(); | |
else { | |
if ("." === a) continue; | |
r.push(a) | |
} | |
} | |
return r.join("/") | |
} | |
if (a[e]) return a[e]; | |
if (a[e] = {}, !o[e]) throw new Error("Could not find module " + e); | |
for (var r, i = o[e], s = i.deps, u = i.callback, l = [], c = 0, h = s.length; h > c; c++) "exports" === s[c] ? l.push(r = {}) : l.push(t(n(s[c]))); | |
var d = u.apply(this, l); | |
return a[e] = r || d | |
}, r._eak_seen = o, i.__loader = { | |
define: e, | |
require: n, | |
registry: o | |
} | |
} else e = i.__loader.define, r = n = t = i.__loader.require | |
}(), | |
function () { | |
e(1, ["exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = Array.prototype, | |
r = function (e) { | |
return e && Function.prototype.toString.call(e).indexOf("[native code]") > -1 | |
}, o = r(n.map) ? n.map : function (e) { | |
if (void 0 === this || null === this) throw new TypeError; | |
var t = Object(this), | |
n = t.length >>> 0; | |
if ("function" != typeof e) throw new TypeError; | |
for (var r = new Array(n), i = arguments[1], o = 0; n > o; o++) o in t && (r[o] = e.call(i, t[o], o, t)); | |
return r | |
}, a = r(n.forEach) ? n.forEach : function (e) { | |
if (void 0 === this || null === this) throw new TypeError; | |
var t = Object(this), | |
n = t.length >>> 0; | |
if ("function" != typeof e) throw new TypeError; | |
for (var r = arguments[1], i = 0; n > i; i++) i in t && e.call(r, t[i], i, t) | |
}, s = r(n.indexOf) ? n.indexOf : function (e, t) { | |
null === t || void 0 === t ? t = 0 : 0 > t && (t = Math.max(0, this.length + t)); | |
for (var n = t, r = this.length; r > n; n++) | |
if (this[n] === e) return n; | |
return -1 | |
}, u = r(n.filter) ? n.filter : function (e, t) { | |
var n, r, i = [], | |
o = this.length; | |
for (n = 0; o > n; n++) this.hasOwnProperty(n) && (r = this[n], e.call(t, r, n, this) && i.push(r)); | |
return i | |
}; | |
i.SHIM_ES5 && (n.map || (n.map = o), n.forEach || (n.forEach = a), n.filter || (n.filter = u), n.indexOf || (n.indexOf = s)), t.map = o, t.forEach = a, t.filter = u, t.indexOf = s | |
}), e(2, [3, 4, 5, 6, 7, 8, 9, "exports"], function () { | |
function e(e) { | |
return v.test(e) | |
} | |
function t(t, n) { | |
return u(e(n) ? s.lookup : t, n) | |
} | |
function n(e, t) { | |
for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]) | |
} | |
function r(e, t, n) { | |
return new g(t, n).connect(e) | |
} | |
function i(e, t, n) { | |
return new g(t, n).oneWay().connect(e) | |
} | |
var o = arguments, | |
a = o[o.length - 1], | |
s = o[0].__d, | |
u = o[1].get, | |
l = (o[2].set, o[2].trySet), | |
c = o[3].guidFor, | |
h = o[4].Map, | |
d = o[5].addObserver, | |
f = o[5].removeObserver, | |
p = o[5]._suspendObserver, | |
m = o[6].__d; | |
s.LOG_BINDINGS = !1 || !! s.ENV.LOG_BINDINGS; | |
var v = /^([A-Z$]|([0-9][A-Z$]))/, | |
g = function (e, t) { | |
this._direction = "fwd", this._from = t, this._to = e, this._directionMap = h.create() | |
}; | |
g.prototype = { | |
copy: function () { | |
var e = new g(this._to, this._from); | |
return this._oneWay && (e._oneWay = !0), e | |
}, | |
from: function (e) { | |
return this._from = e, this | |
}, | |
to: function (e) { | |
return this._to = e, this | |
}, | |
oneWay: function () { | |
return this._oneWay = !0, this | |
}, | |
toString: function () { | |
var e = this._oneWay ? "[oneWay]" : ""; | |
return "Ember.Binding<" + c(this) + ">(" + this._from + " -> " + this._to + ")" + e | |
}, | |
connect: function (e) { | |
var n = this._from, | |
r = this._to; | |
return l(e, r, t(e, n)), d(e, n, this, this.fromDidChange), this._oneWay || d(e, r, this, this.toDidChange), this._readyToSync = !0, this | |
}, | |
disconnect: function (e) { | |
var t = !this._oneWay; | |
return f(e, this._from, this, this.fromDidChange), t && f(e, this._to, this, this.toDidChange), this._readyToSync = !1, this | |
}, | |
fromDidChange: function (e) { | |
this._scheduleSync(e, "fwd") | |
}, | |
toDidChange: function (e) { | |
this._scheduleSync(e, "back") | |
}, | |
_scheduleSync: function (e, t) { | |
var n = this._directionMap, | |
r = n.get(e); | |
r || (m.schedule("sync", this, this._sync, e), n.set(e, t)), "back" === r && "fwd" === t && n.set(e, "fwd") | |
}, | |
_sync: function (n) { | |
var r = s.LOG_BINDINGS; | |
if (!n.isDestroyed && this._readyToSync) { | |
var i = this._directionMap, | |
o = i.get(n), | |
a = this._from, | |
c = this._to; | |
if (i.remove(n), "fwd" === o) { | |
var h = t(n, this._from); | |
r && s.Logger.log(" ", this.toString(), "->", h, n), this._oneWay ? l(n, c, h) : p(n, c, this, this.toDidChange, function () { | |
l(n, c, h) | |
}) | |
} else if ("back" === o) { | |
var d = u(n, this._to); | |
r && s.Logger.log(" ", this.toString(), "<-", d, n), p(n, a, this, this.fromDidChange, function () { | |
l(e(a) ? s.lookup : n, a, d) | |
}) | |
} | |
} | |
} | |
}, n(g, { | |
from: function () { | |
var e = this, | |
t = new e; | |
return t.from.apply(t, arguments) | |
}, | |
to: function () { | |
var e = this, | |
t = new e; | |
return t.to.apply(t, arguments) | |
}, | |
oneWay: function (e, t) { | |
var n = this, | |
r = new n(null, e); | |
return r.oneWay(t) | |
} | |
}), a.Binding = g, a.bind = r, a.oneWay = i, a.isGlobalPath = e | |
}), e(10, [3, 6, 4, 1, 11, "exports"], function () { | |
function e(e) { | |
return e.match(_)[0] | |
} | |
function t() { | |
if (0 !== b.length) { | |
var e = b; | |
b = [], p.call(e, function (e) { | |
e[0].add(e[1]) | |
}), y("Watching an undefined global, Ember expects watched globals to be setup by the time the run loop is flushed, check for typos", 0 === b.length) | |
} | |
} | |
function n(e, t, n) { | |
if (e && "object" == typeof e) { | |
var r = g(e), | |
i = r.chainWatchers; | |
r.hasOwnProperty("chainWatchers") || (i = r.chainWatchers = {}), i[t] || (i[t] = []), i[t].push(n), m(e, t, r) | |
} | |
} | |
function r(e, t, n) { | |
if (e && "object" == typeof e) { | |
var r = e[h]; | |
if (!r || r.hasOwnProperty("chainWatchers")) { | |
var i = r && r.chainWatchers; | |
if (i && i[t]) { | |
i = i[t]; | |
for (var o = 0, a = i.length; a > o; o++) i[o] === n && i.splice(o, 1) | |
} | |
v(e, t, r) | |
} | |
} | |
} | |
function i(e, t, r) { | |
this._parent = e, this._key = t, this._watching = void 0 === r, this._value = r, this._paths = {}, this._watching && (this._object = e.value(), this._object && n(this._object, this._key, this)), this._parent && "@each" === this._parent._key && this.value() | |
} | |
function o(e, t) { | |
if (!e) return void 0; | |
var n = e[h]; | |
if (n && n.proto === e) return void 0; | |
if ("@each" === t) return d(e, t); | |
var r = n && n.descs[t]; | |
return r && r._cacheable ? t in n.cache ? n.cache[t] : void 0 : d(e, t) | |
} | |
function a(e) { | |
var t = e[h], | |
n = t && t.chains; | |
n && (n.value() !== e ? g(e).chains = n = n.copy(e) : n.didChange(null)) | |
} | |
var s = arguments, | |
u = s[s.length - 1], | |
l = s[0].__d, | |
c = s[1].meta, | |
h = s[1].META_KEY, | |
d = s[2].get, | |
f = s[2].normalizeTuple, | |
p = s[3].forEach, | |
m = s[4].watchKey, | |
v = s[4].unwatchKey, | |
g = c, | |
y = l.warn, | |
_ = /^([^\.\*]+)/, | |
b = [], | |
w = i.prototype; | |
w.value = function () { | |
if (void 0 === this._value && this._watching) { | |
var e = this._parent.value(); | |
this._value = o(e, this._key) | |
} | |
return this._value | |
}, w.destroy = function () { | |
if (this._watching) { | |
var e = this._object; | |
e && r(e, this._key, this), this._watching = !1 | |
} | |
}, w.copy = function (e) { | |
var t, n = new i(null, null, e), | |
r = this._paths; | |
for (t in r) r[t] <= 0 || n.add(t); | |
return n | |
}, w.add = function (t) { | |
var n, r, i, o, a; | |
if (a = this._paths, a[t] = (a[t] || 0) + 1, n = this.value(), r = f(n, t), r[0] && r[0] === n) t = r[1], i = e(t), t = t.slice(i.length + 1); | |
else { | |
if (!r[0]) return b.push([this, t]), r.length = 0, void 0; | |
o = r[0], i = t.slice(0, 0 - (r[1].length + 1)), t = r[1] | |
} | |
r.length = 0, this.chain(i, t, o) | |
}, w.remove = function (t) { | |
var n, r, i, o, a; | |
a = this._paths, a[t] > 0 && a[t]--, n = this.value(), r = f(n, t), r[0] === n ? (t = r[1], i = e(t), t = t.slice(i.length + 1)) : (o = r[0], i = t.slice(0, 0 - (r[1].length + 1)), t = r[1]), r.length = 0, this.unchain(i, t) | |
}, w.count = 0, w.chain = function (t, n, r) { | |
var o, a = this._chains; | |
a || (a = this._chains = {}), o = a[t], o || (o = a[t] = new i(this, t, r)), o.count++, n && n.length > 0 && (t = e(n), n = n.slice(t.length + 1), o.chain(t, n)) | |
}, w.unchain = function (t, n) { | |
var r = this._chains, | |
i = r[t]; | |
n && n.length > 1 && (t = e(n), n = n.slice(t.length + 1), i.unchain(t, n)), i.count--, i.count <= 0 && (delete r[i._key], i.destroy()) | |
}, w.willChange = function (e) { | |
var t = this._chains; | |
if (t) | |
for (var n in t) t.hasOwnProperty(n) && t[n].willChange(e); | |
this._parent && this._parent.chainWillChange(this, this._key, 1, e) | |
}, w.chainWillChange = function (e, t, n, r) { | |
this._key && (t = this._key + "." + t), this._parent ? this._parent.chainWillChange(this, t, n + 1, r) : (n > 1 && r.push(this.value(), t), t = "this." + t, this._paths[t] > 0 && r.push(this.value(), t)) | |
}, w.chainDidChange = function (e, t, n, r) { | |
this._key && (t = this._key + "." + t), this._parent ? this._parent.chainDidChange(this, t, n + 1, r) : (n > 1 && r.push(this.value(), t), t = "this." + t, this._paths[t] > 0 && r.push(this.value(), t)) | |
}, w.didChange = function (e) { | |
if (this._watching) { | |
var t = this._parent.value(); | |
t !== this._object && (r(this._object, this._key, this), this._object = t, n(t, this._key, this)), this._value = void 0, this._parent && "@each" === this._parent._key && this.value() | |
} | |
var i = this._chains; | |
if (i) | |
for (var o in i) i.hasOwnProperty(o) && i[o].didChange(e); | |
null !== e && this._parent && this._parent.chainDidChange(this, this._key, 1, e) | |
}, u.flushPendingChains = t, u.removeChainWatcher = r, u.ChainNode = i, u.finishChains = a | |
}), e(12, [3, 4, 5, 6, 13, 14, 15, 16, 17, 18, 19, 20, 21, "exports"], function () { | |
function e(e, t) { | |
var n = e[t]; | |
return n ? e.hasOwnProperty(t) || (n = e[t] = I(n)) : n = e[t] = {}, n | |
} | |
function t(t) { | |
return e(t, "deps") | |
} | |
function n(n, r, i, o) { | |
var a, s, u, l, c, h = n._dependentKeys; | |
if (h) | |
for (a = t(o), s = 0, u = h.length; u > s; s++) l = h[s], c = e(a, l), c[i] = (c[i] || 0) + 1, b(r, l, o) | |
} | |
function r(n, r, i, o) { | |
var a, s, u, l, c, h = n._dependentKeys; | |
if (h) | |
for (a = t(o), s = 0, u = h.length; u > s; s++) l = h[s], c = e(a, l), c[i] = (c[i] || 0) - 1, w(r, l, o) | |
} | |
function i(e, t) { | |
this.func = e, this._cacheable = t && void 0 !== t.cacheable ? t.cacheable : !0, this._dependentKeys = t && t.dependentKeys, this._readOnly = t && (void 0 !== t.readOnly || !! t.readOnly) | |
} | |
function o(e) { | |
for (var t = 0, n = e.length; n > t; t++) e[t].didChange(null) | |
} | |
function a(e) { | |
var t; | |
if (arguments.length > 1 && (t = N.call(arguments, 0, -1), e = N.call(arguments, -1)[0]), "function" != typeof e) throw new E("Computed Property declared without a property function"); | |
var n = new i(e); | |
return t && n.property.apply(n, t), n | |
} | |
function s(e, t) { | |
var n = e[g], | |
r = n && n.cache; | |
return r && t in r ? r[t] : void 0 | |
} | |
function u(e, t) { | |
for (var n = {}, r = 0; r < t.length; r++) n[t[r]] = p(e, t[r]); | |
return n | |
} | |
function l(e, t) { | |
a[e] = function (e) { | |
var n = N.call(arguments); | |
return a(e, function () { | |
return t.apply(this, n) | |
}) | |
} | |
} | |
function c(e, t) { | |
a[e] = function () { | |
var e = N.call(arguments), | |
n = a(function () { | |
return t.apply(this, [u(this, e)]) | |
}); | |
return n.property.apply(n, e) | |
} | |
} | |
var h = arguments, | |
d = h[h.length - 1], | |
f = h[0].__d, | |
p = h[1].get, | |
m = h[2].set, | |
v = h[3].meta, | |
g = h[3].META_KEY, | |
y = (h[3].guidFor, h[3].typeOf, h[3].inspect), | |
_ = (h[4].__d, h[5].create), | |
b = h[6].watch, | |
w = h[6].unwatch, | |
C = h[7].__d, | |
E = h[8].__d, | |
O = h[9].Descriptor, | |
P = h[9].defineProperty, | |
x = h[10].propertyWillChange, | |
A = h[10].propertyDidChange, | |
T = h[11].__d, | |
S = h[12].isNone, | |
V = v, | |
N = [].slice, | |
I = _; | |
if (f.FEATURES.isEnabled("ember-metal-computed-empty-array")); | |
i.prototype = new O; | |
var R = i.prototype; | |
R._dependentKeys = void 0, R._suspended = void 0, R._meta = void 0, R.cacheable = function (e) { | |
return this._cacheable = e !== !1, this | |
}, R.volatile = function () { | |
return this.cacheable(!1) | |
}, R.readOnly = function (e) { | |
return this._readOnly = void 0 === e || !! e, this | |
}, R.property = function () { | |
var e, t = function (t) { | |
e.push(t) | |
}; | |
e = []; | |
for (var n = 0, r = arguments.length; r > n; n++) C(arguments[n], t); | |
return this._dependentKeys = e, this | |
}, R.meta = function (e) { | |
return 0 === arguments.length ? this._meta || {} : (this._meta = e, this) | |
}, R.didChange = function (e, t) { | |
if (this._cacheable && this._suspended !== e) { | |
var n = V(e); | |
t in n.cache && (delete n.cache[t], r(this, e, t, n)) | |
} | |
}, R.get = function (e, t) { | |
var r, i, a, s; | |
if (this._cacheable) { | |
if (a = V(e), i = a.cache, t in i) return i[t]; | |
r = i[t] = this.func.call(e, t), s = a.chainWatchers && a.chainWatchers[t], s && o(s), n(this, e, t, a) | |
} else r = this.func.call(e, t); | |
return r | |
}, R.set = function (e, t, r) { | |
var i, o, a, s = this._cacheable, | |
u = this.func, | |
l = V(e, s), | |
c = l.watching[t], | |
h = this._suspended, | |
d = !1, | |
f = l.cache; | |
if (this._readOnly) throw new E('Cannot set read-only property "' + t + '" on object: ' + y(e)); | |
this._suspended = e; | |
try { | |
if (s && f.hasOwnProperty(t) && (o = f[t], d = !0), i = u.wrappedFunction ? u.wrappedFunction.length : u.length, 3 === i) a = u.call(e, t, r, o); | |
else { | |
if (2 !== i) return P(e, t, null, o), m(e, t, r), void 0; | |
a = u.call(e, t, r) | |
} if (d && o === a) return; | |
c && x(e, t), d && delete f[t], s && (d || n(this, e, t, l), f[t] = a), c && A(e, t) | |
} finally { | |
this._suspended = h | |
} | |
return a | |
}, R.teardown = function (e, t) { | |
var n = V(e); | |
return t in n.cache && r(this, e, t, n), this._cacheable && delete n.cache[t], null | |
}, f.FEATURES.isEnabled("ember-metal-computed-empty-array") ? a.empty = function (e) { | |
return a(e + ".length", function () { | |
return T(p(this, e)) | |
}) | |
} : l("empty", function (e) { | |
return T(p(this, e)) | |
}), l("notEmpty", function (e) { | |
return !T(p(this, e)) | |
}), l("none", function (e) { | |
return S(p(this, e)) | |
}), l("not", function (e) { | |
return !p(this, e) | |
}), l("bool", function (e) { | |
return !!p(this, e) | |
}), l("match", function (e, t) { | |
var n = p(this, e); | |
return "string" == typeof n ? t.test(n) : !1 | |
}), l("equal", function (e, t) { | |
return p(this, e) === t | |
}), l("gt", function (e, t) { | |
return p(this, e) > t | |
}), l("gte", function (e, t) { | |
return p(this, e) >= t | |
}), l("lt", function (e, t) { | |
return p(this, e) < t | |
}), l("lte", function (e, t) { | |
return p(this, e) <= t | |
}), c("and", function (e) { | |
for (var t in e) | |
if (e.hasOwnProperty(t) && !e[t]) return !1; | |
return !0 | |
}), c("or", function (e) { | |
for (var t in e) | |
if (e.hasOwnProperty(t) && e[t]) return !0; | |
return !1 | |
}), c("any", function (e) { | |
for (var t in e) | |
if (e.hasOwnProperty(t) && e[t]) return e[t]; | |
return null | |
}), c("collect", function (e) { | |
var t = []; | |
for (var n in e) e.hasOwnProperty(n) && (S(e[n]) ? t.push(null) : t.push(e[n])); | |
return t | |
}), a.alias = function (e) { | |
return a(e, function (t, n) { | |
return arguments.length > 1 ? (m(this, e, n), n) : p(this, e) | |
}) | |
}, a.oneWay = function (e) { | |
return a(e, function () { | |
return p(this, e) | |
}) | |
}, f.FEATURES.isEnabled("query-params-new") && (a.reads = a.oneWay), a.readOnly = function (e) { | |
return a(e, function () { | |
return p(this, e) | |
}).readOnly() | |
}, a.defaultTo = function (e) { | |
return a(function (t, n) { | |
return 1 === arguments.length ? p(this, e) : null != n ? n : p(this, e) | |
}) | |
}, d.ComputedProperty = i, d.computed = a, d.cacheFor = s | |
}), e(3, ["exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1]; | |
i = window.Ember, "undefined" == typeof i && (i = {}); { | |
var n = (i.imports = i.imports || this, i.exports = i.exports || this); | |
i.lookup = i.lookup || this | |
} | |
n.Em = n.Ember = i, i.isNamespace = !0, i.toString = function () { | |
return "Ember" | |
}, i.VERSION = "1.6.0-beta.1+canary.4686c4da", i.ENV || (i.ENV = "undefined" != typeof EmberENV ? EmberENV : "undefined" != typeof ENV ? ENV : {}), i.config = i.config || {}, "undefined" == typeof i.ENV.DISABLE_RANGE_API && (i.ENV.DISABLE_RANGE_API = !0), "undefined" == typeof MetamorphENV && (n.MetamorphENV = {}), MetamorphENV.DISABLE_RANGE_API = i.ENV.DISABLE_RANGE_API, i.FEATURES = i.ENV.FEATURES || {}, i.FEATURES.isEnabled = function (e) { | |
var t = i.FEATURES[e]; | |
return i.ENV.ENABLE_ALL_FEATURES ? !0 : t === !0 || t === !1 || void 0 === t ? t : i.ENV.ENABLE_OPTIONAL_FEATURES ? !0 : !1 | |
}, i.EXTEND_PROTOTYPES = i.ENV.EXTEND_PROTOTYPES, "undefined" == typeof i.EXTEND_PROTOTYPES && (i.EXTEND_PROTOTYPES = !0), i.LOG_STACKTRACE_ON_DEPRECATION = i.ENV.LOG_STACKTRACE_ON_DEPRECATION !== !1, i.SHIM_ES5 = i.ENV.SHIM_ES5 === !1 ? !1 : i.EXTEND_PROTOTYPES, i.LOG_VERSION = i.ENV.LOG_VERSION === !1 ? !1 : !0, i.K = function () { | |
return this | |
}, "undefined" == typeof i.assert && (i.assert = i.K), "undefined" == typeof i.warn && (i.warn = i.K), "undefined" == typeof i.debug && (i.debug = i.K), "undefined" == typeof i.deprecate && (i.deprecate = i.K), "undefined" == typeof i.deprecateFunc && (i.deprecateFunc = function (e, t) { | |
return t | |
}), i.uuid = 0, i.merge = function (e, t) { | |
for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]); | |
return e | |
}, window.Em = window.Ember = i, t.__d = i | |
}), e(13, [1, "exports"], function () { | |
var e, t, n, r, i, o = arguments, | |
a = o[o.length - 1], | |
e = o[0].map, | |
t = o[0].forEach, | |
n = o[0].indexOf, | |
i = o[0].filter; | |
e = Array.prototype.map || e, t = Array.prototype.forEach || t, n = Array.prototype.indexOf || n, i = Array.prototype.filter || i, r = Array.prototype.splice; | |
var s = { | |
map: function (t, n, r) { | |
return t.map ? t.map.call(t, n, r) : e.call(t, n, r) | |
}, | |
forEach: function (e, n, r) { | |
return e.forEach ? e.forEach.call(e, n, r) : t.call(e, n, r) | |
}, | |
filter: function (e, t, n) { | |
return e.filter ? e.filter.call(e, t, n) : i.call(e, t, n) | |
}, | |
indexOf: function (e, t, r) { | |
return e.indexOf ? e.indexOf.call(e, t, r) : n.call(e, t, r) | |
}, | |
indexesOf: function (e, t) { | |
return void 0 === t ? [] : s.map(t, function (t) { | |
return s.indexOf(e, t) | |
}) | |
}, | |
addObject: function (e, t) { | |
var n = s.indexOf(e, t); - 1 === n && e.push(t) | |
}, | |
removeObject: function (e, t) { | |
var n = s.indexOf(e, t); - 1 !== n && e.splice(n, 1) | |
}, | |
_replace: function (e, t, n, i) { | |
for (var o, a, s = [].concat(i), u = [], l = 6e4, c = t, h = n; s.length;) a = h > l ? l : h, 0 >= a && (a = 0), o = s.splice(0, l), o = [c, a].concat(o), c += l, h -= a, u = u.concat(r.apply(e, o)); | |
return u | |
}, | |
replace: function (e, t, n, r) { | |
return e.replace ? e.replace(t, n, r) : s._replace(e, t, n, r) | |
}, | |
intersection: function (e, t) { | |
var n = []; | |
return s.forEach(e, function (e) { | |
s.indexOf(t, e) >= 0 && n.push(e) | |
}), n | |
} | |
}; | |
a.__d = s | |
}), e(17, [14, "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = e[0].create, | |
r = ["description", "fileName", "lineNumber", "message", "name", "number", "stack"], | |
o = function () { | |
var e = Error.apply(this, arguments); | |
Error.captureStackTrace && Error.captureStackTrace(this, i.Error); | |
for (var t = 0; t < r.length; t++) this[r[t]] = e[r[t]] | |
}; | |
o.prototype = n(Error.prototype), t.__d = o | |
}), e(22, [3, 6, 14, "exports"], function () { | |
function e(e, t, n) { | |
for (var r = -1, i = e.length - 3; i >= 0; i -= 3) | |
if (t === e[i] && n === e[i + 1]) { | |
r = i; | |
break | |
} | |
return r | |
} | |
function t(e, t) { | |
var n, r = E(e, !0); | |
return r.listeners || (r.listeners = {}), r.hasOwnProperty("listeners") || (r.listeners = w(r.listeners)), n = r.listeners[t], n && !r.listeners.hasOwnProperty(t) ? n = r.listeners[t] = r.listeners[t].slice() : n || (n = r.listeners[t] = []), n | |
} | |
function n(t, n, r) { | |
var i = t[g], | |
o = i && i.listeners && i.listeners[n]; | |
if (o) | |
for (var a = o.length - 3; a >= 0; a -= 3) { | |
var s = o[a], | |
u = o[a + 1], | |
l = o[a + 2], | |
c = e(r, s, u); - 1 === c && r.push(s, u, l) | |
} | |
} | |
function r(t, n, r) { | |
var i = t[g], | |
o = i && i.listeners && i.listeners[n], | |
a = []; | |
if (o) { | |
for (var s = o.length - 3; s >= 0; s -= 3) { | |
var u = o[s], | |
l = o[s + 1], | |
c = o[s + 2], | |
h = e(r, u, l); - 1 === h && (r.push(u, l, c), a.push(u, l, c)) | |
} | |
return a | |
} | |
} | |
function i(n, r, i, o, a) { | |
o || "function" != typeof i || (o = i, i = null); | |
var s = t(n, r), | |
u = e(s, i, o), | |
l = 0; | |
a && (l |= O), -1 === u && (s.push(i, o, l), "function" == typeof n.didAddListener && n.didAddListener(r, i, o)) | |
} | |
function o(n, r, i, o) { | |
function a(i, o) { | |
var a = t(n, r), | |
s = e(a, i, o); - 1 !== s && (a.splice(s, 3), "function" == typeof n.didRemoveListener && n.didRemoveListener(r, i, o)) | |
} | |
if (o || "function" != typeof i || (o = i, i = null), o) a(i, o); | |
else { | |
var s = n[g], | |
u = s && s.listeners && s.listeners[r]; | |
if (!u) return; | |
for (var l = u.length - 3; l >= 0; l -= 3) a(u[l], u[l + 1]) | |
} | |
} | |
function a(n, r, i, o, a) { | |
function s() { | |
return a.call(i) | |
} | |
function u() { | |
-1 !== c && (l[c + 2] &= ~P) | |
} | |
o || "function" != typeof i || (o = i, i = null); | |
var l = t(n, r), | |
c = e(l, i, o); | |
return -1 !== c && (l[c + 2] |= P), y(s, u) | |
} | |
function s(n, r, i, o, a) { | |
function s() { | |
return a.call(i) | |
} | |
function u() { | |
for (var e = 0, t = f.length; t > e; e++) { | |
var n = f[e]; | |
p[e][n + 2] &= ~P | |
} | |
} | |
o || "function" != typeof i || (o = i, i = null); | |
var l, c, h, d, f = [], | |
p = []; | |
for (h = 0, d = r.length; d > h; h++) { | |
l = r[h], c = t(n, l); | |
var m = e(c, i, o); - 1 !== m && (c[m + 2] |= P, f.push(m), p.push(c)) | |
} | |
return y(s, u) | |
} | |
function u(e) { | |
var t = e[g].listeners, | |
n = []; | |
if (t) | |
for (var r in t) t[r] && n.push(r); | |
return n | |
} | |
function l(e, t, n, r) { | |
if (e !== m && "function" == typeof e.sendEvent && e.sendEvent(t, n), !r) { | |
var i = e[g]; | |
r = i && i.listeners && i.listeners[t] | |
} | |
if (r) { | |
for (var a = r.length - 3; a >= 0; a -= 3) { | |
var s = r[a], | |
u = r[a + 1], | |
l = r[a + 2]; | |
u && (l & P || (l & O && o(e, t, s, u), s || (s = e), "string" == typeof u ? n ? b(s, u, n) : s[u]() : n ? _(s, u, n) : u.call(s))) | |
} | |
return !0 | |
} | |
} | |
function c(e, t) { | |
var n = e[g], | |
r = n && n.listeners && n.listeners[t]; | |
return !(!r || !r.length) | |
} | |
function h(e, t) { | |
var n = [], | |
r = e[g], | |
i = r && r.listeners && r.listeners[t]; | |
if (!i) return n; | |
for (var o = 0, a = i.length; a > o; o += 3) { | |
var s = i[o], | |
u = i[o + 1]; | |
n.push([s, u]) | |
} | |
return n | |
} | |
function d() { | |
var e = C.call(arguments, -1)[0], | |
t = C.call(arguments, 0, -1); | |
return e.__ember_listens__ = t, e | |
} | |
var f = arguments, | |
p = f[f.length - 1], | |
m = f[0].__d, | |
v = f[1].meta, | |
g = f[1].META_KEY, | |
y = f[1].tryFinally, | |
_ = f[1].apply, | |
b = f[1].applyStr, | |
w = f[2].create, | |
C = [].slice, | |
E = v, | |
O = 1, | |
P = 2; | |
p.on = d, p.addListener = i, p.removeListener = o, p.suspendListener = a, p.suspendListeners = s, p.sendEvent = l, p.hasListeners = c, p.watchedEvents = u, p.listenersFor = h, p.listenersDiff = r, p.listenersUnion = n | |
}), e(16, [13, "exports"], function () { | |
function e(e, t) { | |
var n, r, a; | |
(n = o.exec(e)) ? (r = n[1], a = n[2], i(a.split(","), function (e) { | |
t(r + e) | |
})) : t(e) | |
} | |
var t = arguments, | |
n = t[t.length - 1], | |
r = t[0].__d, | |
i = r.forEach, | |
o = /^((?:[^\.]*\.)*)\{(.*)\}$/; | |
n.__d = e | |
}), e(23, [4, 6, "exports"], function () { | |
function e(e) { | |
var t = {}, n = arguments, | |
o = 1; | |
2 === arguments.length && "array" === i(arguments[1]) && (o = 0, n = arguments[1]); | |
for (var a = n.length; a > o; o++) t[n[o]] = r(e, n[o]); | |
return t | |
} | |
var t = arguments, | |
n = t[t.length - 1], | |
r = t[0].get, | |
i = t[1].typeOf; | |
n.__d = e | |
}), e(24, [3, 6, "exports"], function () { | |
function e(e, t, n, r) { | |
function i() { | |
for (v = 0, g = p.length; g > v; v++) m = p[v], y[v] = m.before(e, h(), t); | |
return n.call(r) | |
} | |
function o(e) { | |
t = t || {}, t.exception = e | |
} | |
function u() { | |
for (v = 0, g = p.length; g > v; v++) m = p[v], m.after(e, h(), t, y[v]); | |
a.STRUCTURED_PROFILE && console.timeEnd(d) | |
} | |
var d, f, p = l[e]; | |
if (a.STRUCTURED_PROFILE && (d = e + ": " + t.object, console.time(d)), p || (p = c(e)), 0 === p.length) return f = n.call(r), a.STRUCTURED_PROFILE && console.timeEnd(d), f; | |
var m, v, g, y = []; | |
return s(i, o, u) | |
} | |
function t(e, t) { | |
for (var n, r = e.split("."), i = [], o = 0, a = r.length; a > o; o++) n = r[o], "*" === n ? i.push("[^\\.]*") : i.push(n); | |
i = i.join("\\."), i += "(\\..*)?"; | |
var s = { | |
pattern: e, | |
regex: new RegExp("^" + i + "$"), | |
object: t | |
}; | |
return u.push(s), l = {}, s | |
} | |
function n(e) { | |
for (var t, n = 0, r = u.length; r > n; n++) u[n] === e && (t = n); | |
u.splice(t, 1), l = {} | |
} | |
function r() { | |
u = [], l = {} | |
} | |
var i = arguments, | |
o = i[i.length - 1], | |
a = i[0].__d, | |
s = i[1].tryCatchFinally, | |
u = [], | |
l = {}, c = function (e) { | |
for (var t, n = [], r = 0, i = u.length; i > r; r++) t = u[r], t.regex.test(e) && n.push(t.object); | |
return l[e] = n, n | |
}, h = function () { | |
var e = "undefined" != typeof window ? window.performance || {} : {}, t = e.now || e.mozNow || e.webkitNow || e.msNow || e.oNow; | |
return t ? t.bind(e) : function () { | |
return +new Date | |
} | |
}(); | |
o.instrument = e, o.subscribe = t, o.unsubscribe = n, o.reset = r | |
}), e(25, [3, 20, "exports"], function () { | |
var e, t = arguments, | |
n = t[t.length - 1], | |
r = (t[0].__d, t[1].__d); | |
e = function (e) { | |
return r(e) || "string" == typeof e && null === e.match(/\S/) | |
}, n.__d = e | |
}), e(20, [3, 4, 21, "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = e[0].__d, | |
r = e[1].get, | |
i = e[2].__d, | |
o = function (e) { | |
return i(e) || 0 === e.length && "function" != typeof e || "object" == typeof e && 0 === r(e, "length") | |
}, a = n.deprecateFunc("Ember.empty is deprecated. Please use Ember.isEmpty instead.", o); | |
t.__d = o, t.isEmpty = o, t.empty = a | |
}), e(21, [3, "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = e[0].__d, | |
r = function (e) { | |
return null === e || void 0 === e | |
}, i = n.deprecateFunc("Ember.none is deprecated. Please use Ember.isNone instead.", r); | |
t.__d = r, t.isNone = r, t.none = i | |
}), e(26, [13, "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = e[0].__d, | |
r = n.forEach, | |
i = n.indexOf, | |
o = function () { | |
var e = [], | |
t = 0, | |
n = function (t) { | |
for (var n = 0; n < e.length; n++) | |
if (e[n].name === t) return e[n] | |
}; | |
return e.register = function (t, r) { | |
n(t) || e.push({ | |
name: t, | |
version: r | |
}) | |
}, e.registerCoreLibrary = function (r, i) { | |
n(r) || e.splice(t++, 0, { | |
name: r, | |
version: i | |
}) | |
}, e.deRegister = function (t) { | |
var r = n(t); | |
r && e.splice(i(e, r), 1) | |
}, e.each = function (t) { | |
r(e, function (e) { | |
t(e.name, e.version) | |
}) | |
}, e | |
}(); | |
t.__d = o | |
}), e(27, [3, 17, "exports"], function () { | |
function e(e) { | |
var t, n; | |
i.imports.console ? t = i.imports.console : "undefined" != typeof console && (t = console); | |
var r = "object" == typeof t ? t[e] : null; | |
return r ? "function" == typeof r.apply ? (n = function () { | |
r.apply(t, arguments) | |
}, n.displayName = "console." + e, n) : function () { | |
var e = Array.prototype.join.call(arguments, ", "); | |
r(e) | |
} : void 0 | |
} | |
function t(e, t) { | |
if (!e) try { | |
throw new o("assertion failed: " + t) | |
} catch (n) { | |
setTimeout(function () { | |
throw n | |
}, 0) | |
} | |
} | |
var n = arguments, | |
r = n[n.length - 1], | |
i = n[0].__d, | |
o = n[1].__d, | |
a = { | |
log: e("log") || i.K, | |
warn: e("warn") || i.K, | |
error: e("error") || i.K, | |
info: e("info") || i.K, | |
debug: e("debug") || e("info") || i.K, | |
assert: e("assert") || t | |
}; | |
r.__d = a | |
}), e("ember-metal", [3, 24, 6, 17, 13, 14, 1, 27, 4, 22, 28, 19, 18, 5, 7, 23, 29, 11, 10, 30, 15, 16, 12, 8, 31, 2, 9, 26, 21, 20, 25, "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1]; | |
i.Instrumentation = {}, i.Instrumentation.instrument = e[1].instrument, i.Instrumentation.subscribe = e[1].subscribe, i.Instrumentation.unsubscribe = e[1].unsubscribe, i.Instrumentation.reset = e[1].reset, i.instrument = e[1].instrument, i.subscribe = e[1].subscribe, i.generateGuid = e[2].generateGuid, i.GUID_KEY = e[2].GUID_KEY, i.GUID_PREFIX = e[2].GUID_PREFIX, i.create = e[5].create, i.platform = e[5].platform, i.ArrayPolyfills = {}, i.ArrayPolyfills.map = e[6].map, i.ArrayPolyfills.forEach = e[6].forEach, i.ArrayPolyfills.filter = e[6].filter, i.ArrayPolyfills.indexOf = e[6].indexOf, i.Error = e[3].__d, i.guidFor = e[2].guidFor, i.META_DESC = e[2].META_DESC, i.EMPTY_META = e[2].EMPTY_META, i.meta = e[2].meta, i.getMeta = e[2].getMeta, i.setMeta = e[2].setMeta, i.metaPath = e[2].metaPath, i.inspect = e[2].inspect, i.typeOf = e[2].typeOf, i.tryCatchFinally = e[2].tryCatchFinally, i.isArray = e[2].isArray, i.makeArray = e[2].makeArray, i.canInvoke = e[2].canInvoke, i.tryInvoke = e[2].tryInvoke, i.tryFinally = e[2].tryFinally, i.wrap = e[2].wrap, i.apply = e[2].apply, i.applyStr = e[2].applyStr, i.Logger = e[7].__d, i.get = e[8].get, i.getWithDefault = e[8].getWithDefault, i.normalizeTuple = e[8].normalizeTuple, i._getPath = e[8]._getPath, i.EnumerableUtils = e[4].__d, i.on = e[9].on, i.addListener = e[9].addListener, i.removeListener = e[9].removeListener, i._suspendListener = e[9].suspendListener, i._suspendListeners = e[9].suspendListeners, i.sendEvent = e[9].sendEvent, i.hasListeners = e[9].hasListeners, i.watchedEvents = e[9].watchedEvents, i.listenersFor = e[9].listenersFor, i.listenersDiff = e[9].listenersDiff, i.listenersUnion = e[9].listenersUnion, i._ObserverSet = e[10].__d, i.propertyWillChange = e[11].propertyWillChange, i.propertyDidChange = e[11].propertyDidChange, i.overrideChains = e[11].overrideChains, i.beginPropertyChanges = e[11].beginPropertyChanges, i.endPropertyChanges = e[11].endPropertyChanges, i.changeProperties = e[11].changeProperties, i.Descriptor = e[12].Descriptor, i.defineProperty = e[12].defineProperty, i.set = e[13].set, i.trySet = e[13].trySet, i.OrderedSet = e[14].OrderedSet, i.Map = e[14].Map, i.MapWithDefault = e[14].MapWithDefault, i.getProperties = e[15].__d, i.setProperties = e[16].__d, i.watchKey = e[17].watchKey, i.unwatchKey = e[17].unwatchKey, i.flushPendingChains = e[18].flushPendingChains, i.removeChainWatcher = e[18].removeChainWatcher, i._ChainNode = e[18].ChainNode, i.finishChains = e[18].finishChains, i.watchPath = e[19].watchPath, i.unwatchPath = e[19].unwatchPath, i.watch = e[20].watch, i.isWatching = e[20].isWatching, i.unwatch = e[20].unwatch, i.rewatch = e[20].rewatch, i.destroy = e[20].destroy, i.expandProperties = e[21].__d, i.ComputedProperty = e[22].ComputedProperty, i.computed = e[22].computed, i.cacheFor = e[22].cacheFor, i.addObserver = e[23].addObserver, i.observersFor = e[23].observersFor, i.removeObserver = e[23].removeObserver, i.addBeforeObserver = e[23].addBeforeObserver, i._suspendBeforeObserver = e[23]._suspendBeforeObserver, i._suspendBeforeObservers = e[23]._suspendBeforeObservers, i._suspendObserver = e[23]._suspendObserver, i._suspendObservers = e[23]._suspendObservers, i.beforeObserversFor = e[23].beforeObserversFor, i.removeBeforeObserver = e[23].removeBeforeObserver, i.IS_BINDING = e[24].IS_BINDING, i.required = e[24].required, i.aliasMethod = e[24].aliasMethod, i.observer = e[24].observer, i.immediateObserver = e[24].immediateObserver, i.beforeObserver = e[24].beforeObserver, i.mixin = e[24].mixin, i.Mixin = e[24].Mixin, i.oneWay = e[25].oneWay, i.bind = e[25].bind, i.Binding = e[25].Binding, i.isGlobalPath = e[25].isGlobalPath, i.run = e[26].__d, i.libraries = e[27].__d, i.libraries.registerCoreLibrary("Ember", i.VERSION), i.isNone = e[28].isNone, i.none = e[28].none, i.isEmpty = e[29].isEmpty, i.empty = e[29].empty, i.isBlank = e[30].__d, i.onerror = null, t.__d = i | |
}), e(7, [1, 6, 5, 14, "exports"], function () { | |
function e() { | |
this.clear() | |
} | |
function t(e) { | |
h.call(this), this.defaultValue = e.defaultValue | |
} | |
var n = arguments, | |
r = n[n.length - 1], | |
o = n[0].indexOf, | |
a = n[1].guidFor, | |
s = n[2].set, | |
u = n[3].create, | |
l = function (e) { | |
var t = {}; | |
for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n]); | |
return t | |
}, c = function (e, t) { | |
var n = e.keys.copy(), | |
r = l(e.values); | |
return t.keys = n, t.values = r, t.length = e.length, t | |
}; | |
e.create = function () { | |
return new e | |
}, e.prototype = { | |
clear: function () { | |
this.presenceSet = {}, this.list = [] | |
}, | |
add: function (e) { | |
var t = a(e), | |
n = this.presenceSet, | |
r = this.list; | |
t in n || (n[t] = !0, r.push(e)) | |
}, | |
remove: function (e) { | |
var t = a(e), | |
n = this.presenceSet, | |
r = this.list; | |
delete n[t]; | |
var i = o.call(r, e); | |
i > -1 && r.splice(i, 1) | |
}, | |
isEmpty: function () { | |
return 0 === this.list.length | |
}, | |
has: function (e) { | |
var t = a(e), | |
n = this.presenceSet; | |
return t in n | |
}, | |
forEach: function (e, t) { | |
for (var n = this.toArray(), r = 0, i = n.length; i > r; r++) e.call(t, n[r]) | |
}, | |
toArray: function () { | |
return this.list.slice() | |
}, | |
copy: function () { | |
var t = new e; | |
return t.presenceSet = l(this.presenceSet), t.list = this.toArray(), t | |
} | |
}; | |
var h = i.Map = function () { | |
this.keys = e.create(), this.values = {} | |
}; | |
h.create = function () { | |
return new h | |
}, h.prototype = { | |
length: 0, | |
get: function (e) { | |
var t = this.values, | |
n = a(e); | |
return t[n] | |
}, | |
set: function (e, t) { | |
var n = this.keys, | |
r = this.values, | |
i = a(e); | |
n.add(e), r[i] = t, s(this, "length", n.list.length) | |
}, | |
remove: function (e) { | |
var t = this.keys, | |
n = this.values, | |
r = a(e); | |
return n.hasOwnProperty(r) ? (t.remove(e), delete n[r], s(this, "length", t.list.length), !0) : !1 | |
}, | |
has: function (e) { | |
var t = this.values, | |
n = a(e); | |
return t.hasOwnProperty(n) | |
}, | |
forEach: function (e, t) { | |
var n = this.keys, | |
r = this.values; | |
n.forEach(function (n) { | |
var i = a(n); | |
e.call(t, n, r[i]) | |
}) | |
}, | |
copy: function () { | |
return c(this, new h) | |
} | |
}, t.create = function (e) { | |
return e ? new t(e) : new h | |
}, t.prototype = u(h.prototype), t.prototype.get = function (e) { | |
var t = this.has(e); | |
if (t) return h.prototype.get.call(this, e); | |
var n = this.defaultValue(e); | |
return this.set(e, n), n | |
}, t.prototype.copy = function () { | |
return c(this, new t({ | |
defaultValue: this.defaultValue | |
})) | |
}, r.OrderedSet = e, r.Map = h, r.MapWithDefault = t | |
}), e(31, [3, 1, 14, 6, 16, 18, 12, 2, 8, 22, "exports"], function () { | |
function e() { | |
var e, t = this.__nextSuper; | |
return t && (this.__nextSuper = null, e = U(this, t, arguments), this.__nextSuper = t), e | |
} | |
function t(e) { | |
var t = ot(e, !0), | |
n = t.mixins; | |
return n ? t.hasOwnProperty("mixins") || (n = t.mixins = it(n)) : n = t.mixins = {}, n | |
} | |
function n(e, t) { | |
return t && t.length > 0 && (e.mixins = et.call(t, function (e) { | |
if (e instanceof b) return e; | |
var t = new b; | |
return t.properties = e, t | |
})), e | |
} | |
function r(e) { | |
return "function" == typeof e && e.isMethod !== !1 && e !== Boolean && e !== Object && e !== Number && e !== Array && e !== Date && e !== String | |
} | |
function i(e, t) { | |
var n; | |
return t instanceof b ? (n = H(t), e[n] ? at : (e[n] = t, t.properties)) : t | |
} | |
function o(e, t, n, r) { | |
var i; | |
return i = n[e] || r[e], t[e] && (i = i ? i.concat(t[e]) : t[e]), i | |
} | |
function a(e, t, n, r, i) { | |
var o; | |
return void 0 === r[t] && (o = i[t]), o = o || e.descs[t], o && o instanceof W ? (n = it(n), n.func = B(n.func, o.func), n) : n | |
} | |
function s(e, t, n, r, i) { | |
var o; | |
return void 0 === i[t] && (o = r[t]), o = o || e[t], "function" != typeof o ? n : B(n, o) | |
} | |
function u(e, t, n, r) { | |
var i = r[t] || e[t]; | |
return i ? "function" == typeof i.concat ? i.concat(n) : F(i).concat(n) : F(n) | |
} | |
function l(t, n, i, o) { | |
var a = o[n] || t[n]; | |
if (!a) return i; | |
var u = I.merge({}, a), | |
l = !1; | |
for (var c in i) | |
if (i.hasOwnProperty(c)) { | |
var h = i[c]; | |
r(h) ? (l = !0, u[c] = s(t, c, h, a, {})) : u[c] = h | |
} | |
return l && (u._super = e), u | |
} | |
function c(e, t, n, i, o, c, h, d) { | |
if (n instanceof z) { | |
if (n === T && o[t]) return at; | |
n.func && (n = a(i, t, n, c, o)), o[t] = n, c[t] = void 0 | |
} else h && tt.call(h, t) >= 0 || "concatenatedProperties" === t || "mergedProperties" === t ? n = u(e, t, n, c) : d && tt.call(d, t) >= 0 ? n = l(e, t, n, c) : r(n) && (n = s(e, t, n, c, o)), o[t] = void 0, c[t] = n | |
} | |
function h(e, t, n, r, a, s) { | |
function u(e) { | |
delete n[e], delete r[e] | |
} | |
for (var l, d, f, p, m, v, g = 0, y = e.length; y > g; g++) | |
if (l = e[g], d = i(t, l), d !== at) | |
if (d) { | |
v = ot(a), a.willMergeMixin && a.willMergeMixin(d), p = o("concatenatedProperties", d, r, a), m = o("mergedProperties", d, r, a); | |
for (f in d) d.hasOwnProperty(f) && (s.push(f), c(a, f, d[f], v, n, r, p, m)); | |
d.hasOwnProperty("toString") && (a.toString = d.toString) | |
} else l.mixins && (h(l.mixins, t, n, r, a, s), l._without && nt.call(l._without, u)) | |
} | |
function d(e, t, n, r) { | |
if (st.test(t)) { | |
var i = r.bindings; | |
i ? r.hasOwnProperty("bindings") || (i = r.bindings = it(r.bindings)) : i = r.bindings = {}, i[t] = n | |
} | |
} | |
function f(e, t) { | |
var n, r, i, o = t.bindings; | |
if (o) { | |
for (n in o) r = o[n], r && (i = n.slice(0, -7), r instanceof G ? (r = r.copy(), r.to(i)) : r = new G(i, r), r.connect(e), e[n] = r); | |
t.bindings = {} | |
} | |
} | |
function p(e, t) { | |
return f(e, t || ot(e)), e | |
} | |
function m(e, t, n, r, i) { | |
var o, a = t.methodName; | |
return r[a] || i[a] ? (o = i[a], t = r[a]) : n.descs[a] ? (t = n.descs[a], o = void 0) : (t = void 0, o = e[a]), { | |
desc: t, | |
value: o | |
} | |
} | |
function v(e, t, n, r, i) { | |
var o = n[r]; | |
if (o) | |
for (var a = 0, s = o.length; s > a; a++) i(e, o[a], null, t) | |
} | |
function g(e, t, n) { | |
var r = e[t]; | |
"function" == typeof r && (v(e, t, r, "__ember_observesBefore__", J), v(e, t, r, "__ember_observes__", Y), v(e, t, r, "__ember_listens__", Z)), "function" == typeof n && (v(e, t, n, "__ember_observesBefore__", Q), v(e, t, n, "__ember_observes__", $), v(e, t, n, "__ember_listens__", X)) | |
} | |
function y(n, r, i) { | |
var o, a, s, u = {}, l = {}, c = ot(n), | |
f = []; | |
n._super = e, h(r, t(n), u, l, n, f); | |
for (var v = 0, y = f.length; y > v; v++) | |
if (o = f[v], "constructor" !== o && l.hasOwnProperty(o) && (s = u[o], a = l[o], s !== T)) { | |
for (; s && s instanceof S;) { | |
var _ = m(n, s, c, u, l); | |
s = _.desc, a = _.value | |
}(void 0 !== s || void 0 !== a) && (g(n, o, a), d(n, o, a, c), K(n, o, s, a, c)) | |
} | |
return i || p(n, c), n | |
} | |
function _(e) { | |
var t = rt.call(arguments, 1); | |
return y(e, t, !1), e | |
} | |
function b() { | |
return n(this, arguments) | |
} | |
function w(e, t, n) { | |
var r = H(e); | |
if (n[r]) return !1; | |
if (n[r] = !0, e === t) return !0; | |
for (var i = e.mixins, o = i ? i.length : 0; --o >= 0;) | |
if (w(i[o], t, n)) return !0; | |
return !1 | |
} | |
function C(e, t, n) { | |
if (!n[H(t)]) | |
if (n[H(t)] = !0, t.properties) { | |
var r = t.properties; | |
for (var i in r) r.hasOwnProperty(i) && (e[i] = !0) | |
} else t.mixins && nt.call(t.mixins, function (t) { | |
C(e, t, n) | |
}) | |
} | |
function E() { | |
return T | |
} | |
function O(e) { | |
return new S(e) | |
} | |
function P() { | |
var e, t = rt.call(arguments, -1)[0], | |
n = function (t) { | |
e.push(t) | |
}, r = rt.call(arguments, 0, -1); | |
"function" != typeof t && (t = arguments[0], r = rt.call(arguments, 1)), e = []; | |
for (var i = 0; i < r.length; ++i) q(r[i], n); | |
if ("function" != typeof t) throw new I.Error("Ember.observer called without a function"); | |
return t.__ember_observes__ = e, t | |
} | |
function x() { | |
for (var e = 0, t = arguments.length; t > e; e++) { | |
arguments[e] | |
} | |
return P.apply(this, arguments) | |
} | |
function A() { | |
var e, t = rt.call(arguments, -1)[0], | |
n = function (t) { | |
e.push(t) | |
}, r = rt.call(arguments, 0, -1); | |
"function" != typeof t && (t = arguments[0], r = rt.call(arguments, 1)), e = []; | |
for (var i = 0; i < r.length; ++i) q(r[i], n); | |
if ("function" != typeof t) throw new I.Error("Ember.beforeObserver called without a function"); | |
return t.__ember_observesBefore__ = e, t | |
} | |
var b, T, S, V = arguments, | |
N = V[V.length - 1], | |
I = V[0].__d, | |
R = V[1].map, | |
D = V[1].indexOf, | |
M = V[1].forEach, | |
k = V[2].create, | |
H = V[3].guidFor, | |
j = V[3].meta, | |
L = V[3].META_KEY, | |
B = V[3].wrap, | |
F = V[3].makeArray, | |
U = V[3].apply, | |
q = V[4].__d, | |
z = V[5].Descriptor, | |
K = V[5].defineProperty, | |
W = V[6].ComputedProperty, | |
G = V[7].Binding, | |
$ = V[8].addObserver, | |
Y = V[8].removeObserver, | |
Q = V[8].addBeforeObserver, | |
J = V[8].removeBeforeObserver, | |
X = V[9].addListener, | |
Z = V[9].removeListener, | |
et = R, | |
tt = D, | |
nt = M, | |
rt = [].slice, | |
it = k, | |
K = K, | |
ot = j, | |
at = {}, st = /^.+Binding$/; | |
b.prototype = { | |
properties: null, | |
mixins: null, | |
ownerConstructor: null | |
}, b._apply = y, b.applyPartial = function (e) { | |
var t = rt.call(arguments, 1); | |
return y(e, t, !0) | |
}, b.finishPartial = p, I.anyUnprocessedMixins = !1, b.create = function () { | |
I.anyUnprocessedMixins = !0; | |
var e = this; | |
return n(new e, arguments) | |
}; | |
var ut = b.prototype; | |
ut.reopen = function () { | |
var e, t; | |
this.properties ? (e = b.create(), e.properties = this.properties, delete this.properties, this.mixins = [e]) : this.mixins || (this.mixins = []); | |
var n, r = arguments.length, | |
i = this.mixins; | |
for (n = 0; r > n; n++) e = arguments[n], e instanceof b ? i.push(e) : (t = b.create(), t.properties = e, i.push(t)); | |
return this | |
}, ut.apply = function (e) { | |
return y(e, [this], !1) | |
}, ut.applyPartial = function (e) { | |
return y(e, [this], !0) | |
}, ut.detect = function (e) { | |
if (!e) return !1; | |
if (e instanceof b) return w(e, this, {}); | |
var t = e[L], | |
n = t && t.mixins; | |
return n ? !! n[H(this)] : !1 | |
}, ut.without = function () { | |
var e = new b(this); | |
return e._without = rt.call(arguments), e | |
}, ut.keys = function () { | |
var e = {}, t = {}, n = []; | |
C(e, this, t); | |
for (var r in e) e.hasOwnProperty(r) && n.push(r); | |
return n | |
}, b.mixins = function (e) { | |
var t = e[L], | |
n = t && t.mixins, | |
r = []; | |
if (!n) return r; | |
for (var i in n) { | |
var o = n[i]; | |
o.properties || r.push(o) | |
} | |
return r | |
}, T = new z, T.toString = function () { | |
return "(Required Property)" | |
}, S = function (e) { | |
this.methodName = e | |
}, S.prototype = new z, N.IS_BINDING = st, N.mixin = _, N.Mixin = b, N.required = E, N.aliasMethod = O, N.observer = P, N.immediateObserver = x, N.beforeObserver = A | |
}), e(8, [15, 1, 22, "exports"], function () { | |
function e(e) { | |
return e + C | |
} | |
function t(e) { | |
return e + E | |
} | |
function n(t, n, r, i) { | |
return y(t, e(n), r, i), p(t, n), this | |
} | |
function r(t, n) { | |
return g(t, e(n)) | |
} | |
function i(t, n, r, i) { | |
return m(t, n), _(t, e(n), r, i), this | |
} | |
function o(e, n, r, i) { | |
return y(e, t(n), r, i), p(e, n), this | |
} | |
function a(e, n, r, i, o) { | |
return w(e, t(n), r, i, o) | |
} | |
function s(t, n, r, i, o) { | |
return w(t, e(n), r, i, o) | |
} | |
function u(e, n, r, i, o) { | |
var a = v.call(n, t); | |
return b(e, a, r, i, o) | |
} | |
function l(t, n, r, i, o) { | |
var a = v.call(n, e); | |
return b(t, a, r, i, o) | |
} | |
function c(e, n) { | |
return g(e, t(n)) | |
} | |
function h(e, n, r, i) { | |
return m(e, n), _(e, t(n), r, i), this | |
} | |
var d = arguments, | |
f = d[d.length - 1], | |
p = d[0].watch, | |
m = d[0].unwatch, | |
v = d[1].map, | |
g = d[2].listenersFor, | |
y = d[2].addListener, | |
_ = d[2].removeListener, | |
b = d[2].suspendListeners, | |
w = d[2].suspendListener, | |
C = ":change", | |
E = ":before"; | |
f.addObserver = n, f.observersFor = r, f.removeObserver = i, f.addBeforeObserver = o, f._suspendBeforeObserver = a, f._suspendObserver = s, f._suspendBeforeObservers = u, f._suspendObservers = l, f.beforeObserversFor = c, f.removeBeforeObserver = h | |
}), e(28, [6, 22, "exports"], function () { | |
function e() { | |
this.clear() | |
} | |
var t = arguments, | |
n = t[t.length - 1], | |
r = t[0].guidFor, | |
i = t[1].sendEvent; | |
e.prototype.add = function (e, t, n) { | |
var i, o = this.observerSet, | |
a = this.observers, | |
s = r(e), | |
u = o[s]; | |
return u || (o[s] = u = {}), i = u[t], void 0 === i && (i = a.push({ | |
sender: e, | |
keyName: t, | |
eventName: n, | |
listeners: [] | |
}) - 1, u[t] = i), a[i].listeners | |
}, e.prototype.flush = function () { | |
var e, t, n, r, o = this.observers; | |
for (this.clear(), e = 0, t = o.length; t > e; ++e) n = o[e], r = n.sender, r.isDestroying || r.isDestroyed || i(r, n.eventName, [r, n.keyName], n.listeners) | |
}, e.prototype.clear = function () { | |
this.observerSet = {}, this.observers = [] | |
}, n.__d = e | |
}), e(14, [3, "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = e[0].__d, | |
r = {}, i = Object.create; | |
if (i && 2 !== i({ | |
a: 1 | |
}, { | |
a: { | |
value: 2 | |
} | |
}).a && (i = null), !i || n.ENV.STUB_OBJECT_CREATE) { | |
var o = function () {}; | |
i = function (e, t) { | |
if (o.prototype = e, e = new o, t) { | |
o.prototype = e; | |
for (var n in t) o.prototype[n] = t[n].value; | |
e = new o | |
} | |
return o.prototype = null, e | |
}, i.isSimulated = !0 | |
} | |
var a, s, u = Object.defineProperty; | |
if (u) try { | |
u({}, "a", { | |
get: function () {} | |
}) | |
} catch (l) { | |
u = null | |
} | |
u && (a = function () { | |
var e = {}; | |
return u(e, "a", { | |
configurable: !0, | |
enumerable: !0, | |
get: function () {}, | |
set: function () {} | |
}), u(e, "a", { | |
configurable: !0, | |
enumerable: !0, | |
writable: !0, | |
value: !0 | |
}), e.a === !0 | |
}(), s = function () { | |
try { | |
return u(document.createElement("div"), "definePropertyOnDOM", {}), !0 | |
} catch (e) {} | |
return !1 | |
}(), a ? s || (u = function (e, t, n) { | |
var r; | |
return r = "object" == typeof Node ? e instanceof Node : "object" == typeof e && "number" == typeof e.nodeType && "string" == typeof e.nodeName, r ? e[t] = n.value : Object.defineProperty(e, t, n) | |
}) : u = null), r.defineProperty = u, r.hasPropertyAccessors = !0, r.defineProperty || (r.hasPropertyAccessors = !1, r.defineProperty = function (e, t, n) { | |
n.get || (e[t] = n.value) | |
}, r.defineProperty.isSimulated = !0), n.ENV.MANDATORY_SETTER && !r.hasPropertyAccessors && (n.ENV.MANDATORY_SETTER = !1), t.create = i, t.platform = r | |
}), e(18, [3, 6, 14, 19, "exports"], function () { | |
function e() {} | |
function t(t, n, r, i, o) { | |
var a, s, p, m; | |
return o || (o = l(t)), a = o.descs, s = o.descs[n], p = o.watching[n] > 0, s instanceof e && s.teardown(t, n), r instanceof e ? (m = r, a[n] = r, h && p ? c(t, n, { | |
configurable: !0, | |
enumerable: !0, | |
writable: !0, | |
value: void 0 | |
}) : t[n] = void 0) : (a[n] = void 0, null == r ? (m = i, h && p ? (o.values[n] = i, c(t, n, { | |
configurable: !0, | |
enumerable: !0, | |
set: d, | |
get: f(n) | |
})) : t[n] = i) : (m = r, c(t, n, r))), p && u(t, n, o), t.didDefineProperty && t.didDefineProperty(t, n, m), this | |
} | |
var n = arguments, | |
r = n[n.length - 1], | |
i = n[0].__d, | |
o = n[1].META_KEY, | |
a = n[1].meta, | |
s = n[2].platform, | |
u = n[3].overrideChains, | |
l = a, | |
c = s.defineProperty, | |
h = i.ENV.MANDATORY_SETTER, | |
d = i.MANDATORY_SETTER_FUNCTION = function () {}, f = i.DEFAULT_GETTER_FUNCTION = function (e) { | |
return function () { | |
var t = this[o]; | |
return t && t.values[e] | |
} | |
}; | |
r.Descriptor = e, r.defineProperty = t | |
}), e(19, [6, 22, 28, "exports"], function () { | |
function e(e, t) { | |
var r = e[g], | |
i = r && r.watching[t] > 0 || "length" === t, | |
a = r && r.proto, | |
s = r && r.descs[t]; | |
i && a !== e && (s && s.willChange && s.willChange(e, t), n(e, t, r), o(e, t, r), h(e, t)) | |
} | |
function t(e, t) { | |
var n = e[g], | |
i = n && n.watching[t] > 0 || "length" === t, | |
o = n && n.proto, | |
s = n && n.descs[t]; | |
o !== e && (s && s.didChange && s.didChange(e, t), (i || "length" === t) && (r(e, t, n), a(e, t, n, !1), d(e, t))) | |
} | |
function n(t, n, r) { | |
if (!t.isDestroying) { | |
var o = f, | |
a = !o; | |
a && (o = f = {}), i(e, t, n, o, r), a && (f = null) | |
} | |
} | |
function r(e, n, r) { | |
if (!e.isDestroying) { | |
var o = p, | |
a = !o; | |
a && (o = p = {}), i(t, e, n, o, r), a && (p = null) | |
} | |
} | |
function i(e, t, n, r, i) { | |
var o = y(t); | |
if (r[o] || (r[o] = {}), !r[o][n]) { | |
r[o][n] = !0; | |
var a = i.deps; | |
if (a = a && a[n]) | |
for (var s in a) { | |
var u = i.descs[s]; | |
u && u._suspended === t || e(t, s) | |
} | |
} | |
} | |
function o(t, n, r) { | |
if (r.hasOwnProperty("chainWatchers") && r.chainWatchers[n]) { | |
var i, o, a = r.chainWatchers[n], | |
s = []; | |
for (i = 0, o = a.length; o > i; i++) a[i].willChange(s); | |
for (i = 0, o = s.length; o > i; i += 2) e(s[i], s[i + 1]) | |
} | |
} | |
function a(e, n, r, i) { | |
if (r && r.hasOwnProperty("chainWatchers") && r.chainWatchers[n]) { | |
var o, a, s = r.chainWatchers[n], | |
u = i ? null : []; | |
for (o = 0, a = s.length; a > o; o++) s[o].didChange(u); | |
if (!i) | |
for (o = 0, a = u.length; a > o; o += 2) t(u[o], u[o + 1]) | |
} | |
} | |
function s(e, t, n) { | |
a(e, t, n, !0) | |
} | |
function u() { | |
x++ | |
} | |
function l() { | |
x--, 0 >= x && (O.clear(), P.flush()) | |
} | |
function c(e, t) { | |
u(), _(e, l, t) | |
} | |
function h(e, t) { | |
if (!e.isDestroying) { | |
var n, r, i = t + ":before"; | |
x ? (n = O.add(e, t, i), r = C(e, i, n), b(e, i, [e, t], r)) : b(e, i, [e, t]) | |
} | |
} | |
function d(e, t) { | |
if (!e.isDestroying) { | |
var n, r = t + ":change"; | |
x ? (n = P.add(e, t, r), w(e, r, n)) : b(e, r, [e, t]) | |
} | |
} | |
var f, p, m = arguments, | |
v = m[m.length - 1], | |
g = m[0].META_KEY, | |
y = m[0].guidFor, | |
_ = m[0].tryFinally, | |
b = m[1].sendEvent, | |
w = m[1].listenersUnion, | |
C = m[1].listenersDiff, | |
E = m[2].__d, | |
O = new E, | |
P = new E, | |
x = 0; | |
v.propertyWillChange = e, v.propertyDidChange = t, v.overrideChains = s, v.beginPropertyChanges = u, v.endPropertyChanges = l, v.changeProperties = c | |
}), e(4, [3, 6, 17, "exports"], function () { | |
function e(e, t) { | |
var n, i = h.test(t), | |
o = !i && c.test(t); | |
if ((!e || o) && (e = a.lookup), i && (t = t.slice(5)), e === a.lookup && (n = t.match(d)[0], e = r(e, n), t = t.slice(n.length + 1)), !t || 0 === t.length) throw new u("Path cannot be empty"); | |
return [e, t] | |
} | |
function t(t, n) { | |
var i, o, s, u, l; | |
if (null === t && -1 === n.indexOf(".")) return r(a.lookup, n); | |
for (i = h.test(n), (!t || i) && (s = e(t, n), t = s[0], n = s[1], s.length = 0), o = n.split("."), l = o.length, u = 0; null != t && l > u; u++) | |
if (t = r(t, o[u], !0), t && t.isDestroyed) return void 0; | |
return t | |
} | |
function n(e, t, n) { | |
var i = r(e, t); | |
return void 0 === i ? n : i | |
} | |
var r, i = arguments, | |
o = i[i.length - 1], | |
a = i[0].__d, | |
s = i[1].META_KEY, | |
u = i[2].__d, | |
l = a.ENV.MANDATORY_SETTER, | |
c = /^([A-Z$]|([0-9][A-Z$])).*[\.\*]/, | |
h = /^this[\.\*]/, | |
d = /^([^\.\*]+)/; | |
r = function (e, n) { | |
if ("" === n) return e; | |
if (n || "string" != typeof e || (n = e, e = null), null === e || -1 !== n.indexOf(".")) return t(e, n); | |
var r, i = e[s], | |
o = i && i.descs[n]; | |
return o ? o.get(e, n) : (r = l && i && i.watching[n] > 0 ? i.values[n] : e[n], void 0 !== r || "object" != typeof e || n in e || "function" != typeof e.unknownProperty ? r : e.unknownProperty(n)) | |
}, a.config.overrideAccessors && (a.get = r, a.config.overrideAccessors(), r = a.get), o.__d = r, o.get = r, o.getWithDefault = n, o.normalizeTuple = e, o._getPath = t | |
}), e(5, [3, 6, 4, 19, 18, 17, "exports"], function () { | |
function e(e, t, n, r) { | |
var i; | |
if (i = t.slice(t.lastIndexOf(".") + 1), t = t === i ? i : t.slice(0, t.length - (i.length + 1)), "this" !== t && (e = a(e, t)), !i || 0 === i.length) throw new c("Property set failed: You passed an empty path"); | |
if (!e) { | |
if (r) return; | |
throw new c('Property set failed: object in path "' + t + '" could not be found or was destroyed.') | |
} | |
return d(e, i, n) | |
} | |
function t(e, t, n) { | |
return d(e, t, n, !0) | |
} | |
var n = arguments, | |
r = n[n.length - 1], | |
i = n[0].__d, | |
o = n[1].META_KEY, | |
a = n[2]._getPath, | |
s = n[3].propertyWillChange, | |
u = n[3].propertyDidChange, | |
l = n[4].defineProperty, | |
c = n[5].__d, | |
h = i.ENV.MANDATORY_SETTER, | |
d = function (t, n, r, i) { | |
if ("string" == typeof t && (r = n, n = t, t = null), !t || -1 !== n.indexOf(".")) return e(t, n, r, i); | |
var a, c, d = t[o], | |
f = d && d.descs[n]; | |
return f ? f.set(t, n, r) : (a = "object" == typeof t && !(n in t), a && "function" == typeof t.setUnknownProperty ? t.setUnknownProperty(n, r) : d && d.watching[n] > 0 ? (c = h ? d.values[n] : t[n], r !== c && (s(t, n), h ? (void 0 !== c || n in t) && t.propertyIsEnumerable(n) ? d.values[n] = r : l(t, n, null, r) : t[n] = r, u(t, n))) : t[n] = r), r | |
}; | |
i.config.overrideAccessors && (i.set = d, i.config.overrideAccessors(), d = i.set), r.set = d, r.trySet = t | |
}), e(9, [3, 6, 19, "exports"], function () { | |
function e(e) { | |
try { | |
return a(d, d.run, e) | |
} catch (t) { | |
o.onerror(t) | |
} | |
} | |
function n() { | |
!p.currentRunLoop | |
} | |
var r = arguments, | |
i = r[r.length - 1], | |
o = r[0].__d, | |
a = r[1].apply, | |
s = r[2].beginPropertyChanges, | |
u = r[2].endPropertyChanges, | |
l = function (e) { | |
p.currentRunLoop = e | |
}, c = function (e, t) { | |
p.currentRunLoop = t | |
}, h = t("backburner").Backburner, | |
d = new h(["sync", "actions", "destroy"], { | |
sync: { | |
before: s, | |
after: u | |
}, | |
defaultQueue: "actions", | |
onBegin: l, | |
onEnd: c | |
}), | |
f = [].slice, | |
p = ([].concat, function () { | |
return o.onerror ? e(arguments) : a(d, d.run, arguments) | |
}); | |
p.join = function () { | |
if (!p.currentRunLoop) return a(o, p, arguments); | |
var e = f.call(arguments); | |
e.unshift("actions"), a(p, p.schedule, e) | |
}, p.bind = function () { | |
var e = arguments; | |
return function () { | |
return a(p, p.join, e) | |
} | |
}, p.backburner = d, p.currentRunLoop = null, p.queues = d.queueNames, p.begin = function () { | |
d.begin() | |
}, p.end = function () { | |
d.end() | |
}, p.schedule = function () { | |
n(), a(d, d.schedule, arguments) | |
}, p.hasScheduledTimers = function () { | |
return d.hasTimers() | |
}, p.cancelTimers = function () { | |
d.cancelTimers() | |
}, p.sync = function () { | |
d.currentInstance && d.currentInstance.queues.sync.flush() | |
}, p.later = function () { | |
return a(d, d.later, arguments) | |
}, p.once = function () { | |
n(); | |
var e = f.call(arguments); | |
return e.unshift("actions"), a(d, d.scheduleOnce, e) | |
}, p.scheduleOnce = function () { | |
return n(), a(d, d.scheduleOnce, arguments) | |
}, p.next = function () { | |
var e = f.call(arguments); | |
return e.push(1), a(d, d.later, e) | |
}, p.cancel = function (e) { | |
return d.cancel(e) | |
}, p.debounce = function () { | |
return a(d, d.debounce, arguments) | |
}, p.throttle = function () { | |
return a(d, d.throttle, arguments) | |
}, i.__d = p | |
}), e(29, [19, 5, "exports"], function () { | |
function e(e, t) { | |
return r(function () { | |
for (var n in t) t.hasOwnProperty(n) && i(e, n, t[n]) | |
}), e | |
} | |
var t = arguments, | |
n = t[t.length - 1], | |
r = t[0].changeProperties, | |
i = t[1].set; | |
n.__d = e | |
}), e(6, [3, 14, 1, "exports"], function () { | |
function e(e, t) { | |
t || (t = O); | |
var n = t + S++; | |
return e && (null === e[N] ? e[N] = n : (I.value = n, P(e, N, I))), n | |
} | |
function n(e) { | |
if (void 0 === e) return "(undefined)"; | |
if (null === e) return "(null)"; | |
var t, n = typeof e; | |
switch (n) { | |
case "number": | |
return t = A[e], t || (t = A[e] = "nu" + e), t; | |
case "string": | |
return t = T[e], t || (t = T[e] = "st" + S++), t; | |
case "boolean": | |
return e ? "(true)" : "(false)"; | |
default: | |
return e[N] ? e[N] : e === Object ? "(Object)" : e === Array ? "(Array)" : (t = "ember" + S++, null === e[N] ? e[N] = t : (I.value = t, P(e, N, I)), t) | |
} | |
} | |
function i(e) { | |
this.descs = {}, this.watching = {}, this.cache = {}, this.source = e | |
} | |
function o(e, t) { | |
var n = e[D]; | |
return t === !1 ? n || k : (n ? n.source !== e && (M || P(e, D, R), n = x(n), n.descs = x(n.descs), n.watching = x(n.watching), n.cache = {}, n.source = e, V && (n.values = x(n.values)), e[D] = n) : (M || P(e, D, R), n = new i(e), V && (n.values = {}), e[D] = n, n.descs.constructor = null), n) | |
} | |
function a(e, t) { | |
var n = o(e, !1); | |
return n[t] | |
} | |
function s(e, t, n) { | |
var r = o(e, !0); | |
return r[t] = n, n | |
} | |
function u(e, t, n) { | |
for (var r, i, a = o(e, n), s = 0, u = t.length; u > s; s++) { | |
if (r = t[s], i = a[r]) { | |
if (i.__ember_source__ !== e) { | |
if (!n) return void 0; | |
i = a[r] = x(i), i.__ember_source__ = e | |
} | |
} else { | |
if (!n) return void 0; | |
i = a[r] = { | |
__ember_source__: e | |
} | |
} | |
a = i | |
} | |
return i | |
} | |
function l(e, t) { | |
function n() { | |
var n, r = this.__nextSuper; | |
return this.__nextSuper = t, n = v(this, e, arguments), this.__nextSuper = r, n | |
} | |
return n.wrappedFunction = e, n.__ember_observes__ = e.__ember_observes__, n.__ember_observesBefore__ = e.__ember_observesBefore__, n.__ember_listens__ = e.__ember_listens__, n | |
} | |
function c(e) { | |
var n; | |
return "undefined" == typeof H && (n = "ember-runtime/mixins/array", r._eak_seen[n] && (H = t(n)["default"])), !e || e.setInterval ? !1 : Array.isArray && Array.isArray(e) ? !0 : H && H.detect(e) ? !0 : void 0 !== e.length && "object" == typeof e ? !0 : !1 | |
} | |
function h(e) { | |
return null === e || void 0 === e ? [] : c(e) ? e : [e] | |
} | |
function d(e, t) { | |
return !(!e || "function" != typeof e[t]) | |
} | |
function f(e, t, n) { | |
return d(e, t) ? n ? g(e, t, n) : g(e, t) : void 0 | |
} | |
function p(e) { | |
var n, i; | |
return "undefined" == typeof q && (i = "ember-runtime/system/object", r._eak_seen[i] && (q = t(i)["default"])), n = null === e || void 0 === e ? String(e) : F[z.call(e)] || "object", "function" === n ? q && q.detect(e) && (n = "class") : "object" === n && (e instanceof Error ? n = "error" : q && e instanceof q ? n = "instance" : e instanceof Date && (n = "date")), n | |
} | |
function m(e) { | |
var t = p(e); | |
if ("array" === t) return "[" + e + "]"; | |
if ("object" !== t) return e + ""; | |
var n, r = []; | |
for (var i in e) | |
if (e.hasOwnProperty(i)) { | |
if (n = e[i], "toString" === n) continue; | |
"function" === p(n) && (n = "function() { ... }"), r.push(i + ": " + n) | |
} | |
return "{" + r.join(", ") + "}" | |
} | |
function v(e, t, n) { | |
var r = n && n.length; | |
if (!n || !r) return t.call(e); | |
switch (r) { | |
case 1: | |
return t.call(e, n[0]); | |
case 2: | |
return t.call(e, n[0], n[1]); | |
case 3: | |
return t.call(e, n[0], n[1], n[2]); | |
case 4: | |
return t.call(e, n[0], n[1], n[2], n[3]); | |
case 5: | |
return t.call(e, n[0], n[1], n[2], n[3], n[4]); | |
default: | |
return t.apply(e, n) | |
} | |
} | |
function g(e, t, n) { | |
var r = n && n.length; | |
if (!n || !r) return e[t](); | |
switch (r) { | |
case 1: | |
return e[t](n[0]); | |
case 2: | |
return e[t](n[0], n[1]); | |
case 3: | |
return e[t](n[0], n[1], n[2]); | |
case 4: | |
return e[t](n[0], n[1], n[2], n[3]); | |
case 5: | |
return e[t](n[0], n[1], n[2], n[3], n[4]); | |
default: | |
return e[t].apply(e, n) | |
} | |
} | |
var y = arguments, | |
_ = y[y.length - 1], | |
b = y[0].__d, | |
w = y[1].platform, | |
C = y[1].create, | |
E = y[2].forEach, | |
O = "ember", | |
P = w.defineProperty, | |
x = C, | |
A = [], | |
T = {}, S = 0, | |
V = b.ENV.MANDATORY_SETTER, | |
N = "__ember" + +new Date, | |
I = { | |
writable: !1, | |
configurable: !1, | |
enumerable: !1, | |
value: null | |
}, R = { | |
writable: !0, | |
configurable: !1, | |
enumerable: !1, | |
value: null | |
}, D = N + "_meta", | |
M = w.defineProperty.isSimulated; | |
i.prototype = { | |
descs: null, | |
deps: null, | |
watching: null, | |
listeners: null, | |
cache: null, | |
source: null, | |
mixins: null, | |
bindings: null, | |
chains: null, | |
chainWatchers: null, | |
values: null, | |
proto: null | |
}, M && (i.prototype.__preventPlainObject__ = !0, i.prototype.toJSON = function () {}); | |
var k = new i(null); | |
V && (k.values = {}); | |
var H, j, L = function () { | |
var e = 0; | |
try { | |
try {} finally { | |
throw e++, new Error("needsFinallyFixTest") | |
} | |
} catch (t) {} | |
return 1 !== e | |
}(); | |
j = L ? function (e, t, n) { | |
var r, i, o; | |
n = n || this; | |
try { | |
r = e.call(n) | |
} finally { | |
try { | |
i = t.call(n) | |
} catch (a) { | |
o = a | |
} | |
} | |
if (o) throw o; | |
return void 0 === i ? r : i | |
} : function (e, t, n) { | |
var r, i; | |
n = n || this; | |
try { | |
r = e.call(n) | |
} finally { | |
i = t.call(n) | |
} | |
return void 0 === i ? r : i | |
}; | |
var B; | |
B = L ? function (e, t, n, r) { | |
var i, o, a; | |
r = r || this; | |
try { | |
i = e.call(r) | |
} catch (s) { | |
i = t.call(r, s) | |
} finally { | |
try { | |
o = n.call(r) | |
} catch (u) { | |
a = u | |
} | |
} | |
if (a) throw a; | |
return void 0 === o ? i : o | |
} : function (e, t, n, r) { | |
var i, o; | |
r = r || this; | |
try { | |
i = e.call(r) | |
} catch (a) { | |
i = t.call(r, a) | |
} finally { | |
o = n.call(r) | |
} | |
return void 0 === o ? i : o | |
}; | |
var F = {}, U = "Boolean Number String Function Array Date RegExp Object".split(" "); | |
E.call(U, function (e) { | |
F["[object " + e + "]"] = e.toLowerCase() | |
}); | |
var q, z = Object.prototype.toString; | |
_.generateGuid = e, _.GUID_KEY = N, _.GUID_PREFIX = O, _.guidFor = n, _.META_DESC = R, _.EMPTY_META = k, _.META_KEY = D, _.meta = o, _.getMeta = a, _.setMeta = s, _.metaPath = u, _.inspect = m, _.typeOf = p, _.tryCatchFinally = B, _.isArray = c, _.makeArray = h, _.canInvoke = d, _.tryInvoke = f, _.tryFinally = j, _.wrap = l, _.applyStr = g, _.apply = v | |
}), e("backburner/queue", ["exports"], function () { | |
function e(e, t, n) { | |
this.daq = e, this.name = t, this.options = n, this._queue = [] | |
} | |
var t = arguments, | |
n = t[t.length - 1]; | |
e.prototype = { | |
daq: null, | |
name: null, | |
options: null, | |
_queue: null, | |
push: function (e, t, n, r) { | |
var i = this._queue; | |
return i.push(e, t, n, r), { | |
queue: this, | |
target: e, | |
method: t | |
} | |
}, | |
pushUnique: function (e, t, n, r) { | |
var i, o, a, s, u = this._queue; | |
for (a = 0, s = u.length; s > a; a += 4) | |
if (i = u[a], o = u[a + 1], i === e && o === t) return u[a + 2] = n, u[a + 3] = r, { | |
queue: this, | |
target: e, | |
method: t | |
}; | |
return this._queue.push(e, t, n, r), { | |
queue: this, | |
target: e, | |
method: t | |
} | |
}, | |
flush: function () { | |
var e, t, n, r, i, o = this._queue, | |
a = this.options, | |
s = a && a.before, | |
u = a && a.after, | |
l = o.length; | |
for (l && s && s(), i = 0; l > i; i += 4) e = o[i], t = o[i + 1], n = o[i + 2], r = o[i + 3], n && n.length > 0 ? t.apply(e, n) : t.call(e); | |
l && u && u(), o.length > l ? (this._queue = o.slice(l), this.flush()) : this._queue.length = 0 | |
}, | |
cancel: function (e) { | |
var t, n, r, i, o = this._queue; | |
for (r = 0, i = o.length; i > r; r += 4) | |
if (t = o[r], n = o[r + 1], t === e.target && n === e.method) return o.splice(r, 4), !0; | |
if (o = this._queueBeingFlushed) | |
for (r = 0, i = o.length; i > r; r += 4) | |
if (t = o[r], n = o[r + 1], t === e.target && n === e.method) return o[r + 1] = null, !0 | |
} | |
}, n.Queue = e | |
}), e("backburner/deferred_action_queues", ["backburner/queue", "exports"], function () { | |
function e(e, t) { | |
var n = this.queues = {}; | |
this.queueNames = e = e || []; | |
for (var r, o = 0, a = e.length; a > o; o++) r = e[o], n[r] = new i(this, r, t[r]) | |
} | |
function t(e, t) { | |
for (var n, r, i = 0, o = t; o >= i; i++) | |
if (n = e.queueNames[i], r = e.queues[n], r._queue.length) return i; | |
return -1 | |
} | |
var n = arguments, | |
r = n[n.length - 1], | |
i = n[0].Queue; | |
e.prototype = { | |
queueNames: null, | |
queues: null, | |
schedule: function (e, t, n, r, i, o) { | |
var a = this.queues, | |
s = a[e]; | |
if (!s) throw new Error("You attempted to schedule an action in a queue (" + e + ") that doesn't exist"); | |
return i ? s.pushUnique(t, n, r, o) : s.push(t, n, r, o) | |
}, | |
flush: function () { | |
for (var e, n, r, i, o = this.queues, a = this.queueNames, s = 0, u = a.length; u > s;) { | |
e = a[s], n = o[e], r = n._queueBeingFlushed = n._queue.slice(), n._queue = []; | |
var l, c, h, d, f = n.options, | |
p = f && f.before, | |
m = f && f.after, | |
v = 0, | |
g = r.length; | |
for (g && p && p(); g > v;) l = r[v], c = r[v + 1], h = r[v + 2], d = r[v + 3], "string" == typeof c && (c = l[c]), c && (h && h.length > 0 ? c.apply(l, h) : c.call(l)), v += 4; | |
n._queueBeingFlushed = null, g && m && m(), -1 === (i = t(this, s)) ? s++ : s = i | |
} | |
} | |
}, r.DeferredActionQueues = e | |
}), e("backburner", ["backburner/deferred_action_queues", "exports"], function () { | |
function e(e) { | |
return "number" == typeof e || _.test(e) | |
} | |
function t(e, t) { | |
this.queueNames = e, this.options = t || {}, this.options.defaultQueue || (this.options.defaultQueue = e[0]), this.instanceStack = [] | |
} | |
function n(e) { | |
e.begin(), s = y.setTimeout(function () { | |
s = null, e.end() | |
}) | |
} | |
function r(e, t, n) { | |
(!u || l > t) && (u && clearTimeout(u), u = y.setTimeout(function () { | |
u = null, l = null, i(e) | |
}, n), l = t) | |
} | |
function i(e) { | |
var t, n, i, o, a = +new Date; | |
e.run(function () { | |
for (i = 0, o = g.length; o > i && (t = g[i], !(t > a)); i += 2); | |
for (n = g.splice(0, i), i = 1, o = n.length; o > i; i += 2) e.schedule(e.options.defaultQueue, null, n[i]) | |
}), g.length && r(e, g[0], g[0] - a) | |
} | |
function o(e, t) { | |
for (var n, r = -1, i = 0, o = v.length; o > i; i++) | |
if (n = v[i], n[0] === e && n[1] === t) { | |
r = i; | |
break | |
} | |
return r | |
} | |
function a(e, t) { | |
for (var n, r = -1, i = 0, o = m.length; o > i; i++) | |
if (n = m[i], n[0] === e && n[1] === t) { | |
r = i; | |
break | |
} | |
return r | |
} | |
var s, u, l, c = arguments, | |
h = c[c.length - 1], | |
d = c[0].DeferredActionQueues, | |
f = [].slice, | |
p = [].pop, | |
m = [], | |
v = [], | |
g = [], | |
y = this, | |
_ = /\d+/; | |
t.prototype = { | |
queueNames: null, | |
options: null, | |
currentInstance: null, | |
instanceStack: null, | |
begin: function () { | |
var e = this.options && this.options.onBegin, | |
t = this.currentInstance; | |
t && this.instanceStack.push(t), this.currentInstance = new d(this.queueNames, this.options), e && e(this.currentInstance, t) | |
}, | |
end: function () { | |
var e = this.options && this.options.onEnd, | |
t = this.currentInstance, | |
n = null; | |
try { | |
t.flush() | |
} finally { | |
this.currentInstance = null, this.instanceStack.length && (n = this.instanceStack.pop(), this.currentInstance = n), e && e(t, n) | |
} | |
}, | |
run: function (e, t) { | |
var n; | |
this.begin(), t || (t = e, e = null), "string" == typeof t && (t = e[t]); | |
var r = !1; | |
try { | |
n = arguments.length > 2 ? t.apply(e, f.call(arguments, 2)) : t.call(e) | |
} finally { | |
r || (r = !0, this.end()) | |
} | |
return n | |
}, | |
defer: function (e, t, r) { | |
r || (r = t, t = null), "string" == typeof r && (r = t[r]); | |
var i = this.DEBUG ? new Error : void 0, | |
o = arguments.length > 3 ? f.call(arguments, 3) : void 0; | |
return this.currentInstance || n(this), this.currentInstance.schedule(e, t, r, o, !1, i) | |
}, | |
deferOnce: function (e, t, r) { | |
r || (r = t, t = null), "string" == typeof r && (r = t[r]); | |
var i = this.DEBUG ? new Error : void 0, | |
o = arguments.length > 3 ? f.call(arguments, 3) : void 0; | |
return this.currentInstance || n(this), this.currentInstance.schedule(e, t, r, o, !0, i) | |
}, | |
setTimeout: function () { | |
function t() { | |
n.apply(o, l) | |
} | |
var n, i, o, a, s, u, l = f.call(arguments), | |
c = l.length, | |
h = this; | |
if (0 !== c) { | |
if (1 === c) n = l.shift(), i = 0; | |
else if (2 === c) a = l[0], s = l[1], "function" == typeof s || "function" == typeof a[s] ? (o = l.shift(), n = l.shift(), i = 0) : e(s) ? (n = l.shift(), i = l.shift()) : (n = l.shift(), i = 0); | |
else { | |
var d = l[l.length - 1]; | |
e(d) && (i = l.pop()), a = l[0], u = l[1], "function" == typeof u || "string" == typeof u && null !== a && u in a ? (o = l.shift(), n = l.shift()) : n = l.shift() | |
} | |
var p = +new Date + parseInt(i, 10); | |
"string" == typeof n && (n = o[n]); | |
var m, v; | |
for (m = 0, v = g.length; v > m && !(p < g[m]); m += 2); | |
return g.splice(m, 0, p, t), r(h, p, i), t | |
} | |
}, | |
throttle: function (e, t) { | |
var n, r, i, o, s = this, | |
u = arguments, | |
l = p.call(u); | |
return "number" == typeof l || "string" == typeof l ? (n = l, l = !0) : n = p.call(u), n = parseInt(n, 10), i = a(e, t), i > -1 ? m[i] : (o = y.setTimeout(function () { | |
l || s.run.apply(s, u); | |
var n = a(e, t); | |
n > -1 && m.splice(n, 1) | |
}, n), l && s.run.apply(s, u), r = [e, t, o], m.push(r), r) | |
}, | |
debounce: function (e, t) { | |
var n, r, i, a, s = this, | |
u = arguments, | |
l = p.call(u); | |
return "number" == typeof l || "string" == typeof l ? (n = l, l = !1) : n = p.call(u), n = parseInt(n, 10), r = o(e, t), r > -1 && (i = v[r], v.splice(r, 1), clearTimeout(i[2])), a = y.setTimeout(function () { | |
l || s.run.apply(s, u); | |
var n = o(e, t); | |
n > -1 && v.splice(n, 1) | |
}, n), l && -1 === r && s.run.apply(s, u), i = [e, t, a], v.push(i), i | |
}, | |
cancelTimers: function () { | |
var e, t; | |
for (e = 0, t = m.length; t > e; e++) clearTimeout(m[e][2]); | |
for (m = [], e = 0, t = v.length; t > e; e++) clearTimeout(v[e][2]); | |
v = [], u && (clearTimeout(u), u = null), g = [], s && (clearTimeout(s), s = null) | |
}, | |
hasTimers: function () { | |
return !!g.length || s | |
}, | |
cancel: function (e) { | |
var t = typeof e; | |
if (e && "object" === t && e.queue && e.method) return e.queue.cancel(e); | |
if ("function" !== t) return "[object Array]" === Object.prototype.toString.call(e) ? this._cancelItem(a, m, e) || this._cancelItem(o, v, e) : void 0; | |
for (var n = 0, r = g.length; r > n; n += 2) | |
if (g[n + 1] === e) return g.splice(n, 2), !0 | |
}, | |
_cancelItem: function (e, t, n) { | |
var r, i; | |
return n.length < 3 ? !1 : (i = e(n[0], n[1]), i > -1 && (r = t[i], r[2] === n[2]) ? (t.splice(i, 1), clearTimeout(n[2]), !0) : !1) | |
} | |
}, t.prototype.schedule = t.prototype.defer, t.prototype.scheduleOnce = t.prototype.deferOnce, t.prototype.later = t.prototype.setTimeout, h.Backburner = t | |
}), e(11, [3, 6, 14, "exports"], function () { | |
function e(e, t, n) { | |
if ("length" !== t || "array" !== a(e)) { | |
var r = n || u(e), | |
o = r.watching; | |
o[t] ? o[t] = (o[t] || 0) + 1 : (o[t] = 1, "function" == typeof e.willWatchProperty && e.willWatchProperty(t), l && t in e && (r.values[t] = e[t], c(e, t, { | |
configurable: !0, | |
enumerable: e.propertyIsEnumerable(t), | |
set: i.MANDATORY_SETTER_FUNCTION, | |
get: i.DEFAULT_GETTER_FUNCTION(t) | |
}))) | |
} | |
} | |
function t(e, t, n) { | |
var r = n || u(e), | |
o = r.watching; | |
1 === o[t] ? (o[t] = 0, "function" == typeof e.didUnwatchProperty && e.didUnwatchProperty(t), l && t in e && c(e, t, { | |
configurable: !0, | |
enumerable: e.propertyIsEnumerable(t), | |
set: function (n) { | |
c(e, t, { | |
configurable: !0, | |
writable: !0, | |
enumerable: !0, | |
value: n | |
}), delete r.values[t] | |
}, | |
get: i.DEFAULT_GETTER_FUNCTION(t) | |
})) : o[t] > 1 && o[t]-- | |
} | |
var n = arguments, | |
r = n[n.length - 1], | |
i = n[0].__d, | |
o = n[1].meta, | |
a = n[1].typeOf, | |
s = n[2].platform, | |
u = o, | |
l = i.ENV.MANDATORY_SETTER, | |
c = s.defineProperty; | |
r.watchKey = e, r.unwatchKey = t | |
}), e(30, [6, 10, "exports"], function () { | |
function e(e, t) { | |
var n = t || u(e), | |
r = n.chains; | |
return r ? r.value() !== e && (r = n.chains = r.copy(e)) : r = n.chains = new s(null, null, e), r | |
} | |
function t(t, n, r) { | |
if ("length" !== n || "array" !== a(t)) { | |
var i = r || u(t), | |
o = i.watching; | |
o[n] ? o[n] = (o[n] || 0) + 1 : (o[n] = 1, e(t, i).add(n)) | |
} | |
} | |
function n(t, n, r) { | |
var i = r || u(t), | |
o = i.watching; | |
1 === o[n] ? (o[n] = 0, e(t, i).remove(n)) : o[n] > 1 && o[n]-- | |
} | |
var r = arguments, | |
i = r[r.length - 1], | |
o = r[0].meta, | |
a = r[0].typeOf, | |
s = r[1].ChainNode, | |
u = o; | |
i.watchPath = t, i.unwatchPath = n | |
}), e(15, [6, 10, 11, 30, "exports"], function () { | |
function e(e) { | |
return "*" === e || !y.test(e) | |
} | |
function t(t, n, r) { | |
("length" !== n || "array" !== c(t)) && (e(n) ? p(t, n, r) : v(t, n, r)) | |
} | |
function n(e, t) { | |
var n = e[u]; | |
return (n && n.watching[t]) > 0 | |
} | |
function r(t, n, r) { | |
("length" !== n || "array" !== c(t)) && (e(n) ? m(t, n, r) : g(t, n, r)) | |
} | |
function i(e) { | |
var t = e[u], | |
n = t && t.chains; | |
l in e && !e.hasOwnProperty(l) && h(e), n && n.value() !== e && (t.chains = n.copy(e)) | |
} | |
function o(e) { | |
var t, n, r, i, o = e[u]; | |
if (o && (e[u] = null, t = o.chains)) | |
for (_.push(t); _.length > 0;) { | |
if (t = _.pop(), n = t._chains) | |
for (r in n) n.hasOwnProperty(r) && _.push(n[r]); | |
t._watching && (i = t._object, i && d(i, t._key, t)) | |
} | |
} | |
var a = arguments, | |
s = a[a.length - 1], | |
u = (a[0].meta, a[0].META_KEY), | |
l = a[0].GUID_KEY, | |
c = a[0].typeOf, | |
h = a[0].generateGuid, | |
d = a[1].removeChainWatcher, | |
f = a[1].flushPendingChains, | |
p = a[2].watchKey, | |
m = a[2].unwatchKey, | |
v = a[3].watchPath, | |
g = a[3].unwatchPath, | |
y = /[\.\*]/; | |
t.flushPending = f; | |
var _ = []; | |
s.watch = t, s.isWatching = n, s.unwatch = r, s.rewatch = i, s.destroy = o | |
}) | |
}(), | |
function () { | |
e("rsvp/all", ["./promise", "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = e[0].__d; | |
t.__d = function (e, t) { | |
return n.all(e, t) | |
} | |
}), e("rsvp/all_settled", ["./promise", "./utils", "exports"], function () { | |
function e(e) { | |
return { | |
state: "fulfilled", | |
value: e | |
} | |
} | |
function t(e) { | |
return { | |
state: "rejected", | |
reason: e | |
} | |
} | |
var n = arguments, | |
r = n[n.length - 1], | |
i = n[0].__d, | |
o = n[1].isArray, | |
a = n[1].isNonThenable; | |
r.__d = function (n, r) { | |
return new i(function (r) { | |
function s(t) { | |
return function (n) { | |
l(t, e(n)) | |
} | |
} | |
function u(e) { | |
return function (n) { | |
l(e, t(n)) | |
} | |
} | |
function l(e, t) { | |
d[e] = t, 0 === --h && r(d) | |
} | |
if (!o(n)) throw new TypeError("You must pass an array to allSettled."); | |
var c, h = n.length; | |
if (0 === h) return r([]), void 0; | |
for (var d = new Array(h), f = 0; f < n.length; f++) c = n[f], a(c) ? l(f, e(c)) : i.cast(c).then(s(f), u(f)) | |
}, r) | |
} | |
}), e("rsvp/config", ["./events", "exports"], function () { | |
function e(e, t) { | |
return "onerror" === e ? (i.on("error", t), void 0) : 2 !== arguments.length ? i[e] : (i[e] = t, void 0) | |
} | |
var t = arguments, | |
n = t[t.length - 1], | |
r = t[0].__d, | |
i = { | |
instrument: !1 | |
}; | |
r.mixin(i), n.config = i, n.configure = e | |
}), e("rsvp/defer", ["./promise", "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = e[0].__d; | |
t.__d = function (e) { | |
var t = {}; | |
return t.promise = new n(function (e, n) { | |
t.resolve = e, t.reject = n | |
}, e), t | |
} | |
}), e("rsvp/events", ["exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = function (e, t) { | |
for (var n = 0, r = e.length; r > n; n++) | |
if (e[n] === t) return n; | |
return -1 | |
}, r = function (e) { | |
var t = e._promiseCallbacks; | |
return t || (t = e._promiseCallbacks = {}), t | |
}; | |
t.__d = { | |
mixin: function (e) { | |
return e.on = this.on, e.off = this.off, e.trigger = this.trigger, e._promiseCallbacks = void 0, e | |
}, | |
on: function (e, t) { | |
var i, o = r(this); | |
i = o[e], i || (i = o[e] = []), -1 === n(i, t) && i.push(t) | |
}, | |
off: function (e, t) { | |
var i, o, a = r(this); | |
return t ? (i = a[e], o = n(i, t), -1 !== o && i.splice(o, 1), void 0) : (a[e] = [], void 0) | |
}, | |
trigger: function (e, t) { | |
var n, i, o = r(this); | |
if (n = o[e]) | |
for (var a = 0; a < n.length; a++)(i = n[a])(t) | |
} | |
} | |
}), e("rsvp/filter", ["./all", "./map", "./utils", "exports"], function () { | |
function e(e, t, n) { | |
return r(e, n).then(function (r) { | |
if (!a(e)) throw new TypeError("You must pass an array to filter."); | |
if (!o(t)) throw new TypeError("You must pass a function to filter's second argument."); | |
return i(e, t, n).then(function (e) { | |
var t, n = r.length, | |
i = []; | |
for (t = 0; n > t; t++) e[t] && i.push(r[t]); | |
return i | |
}) | |
}) | |
} | |
var t = arguments, | |
n = t[t.length - 1], | |
r = t[0].__d, | |
i = t[1].__d, | |
o = t[2].isFunction, | |
a = t[2].isArray; | |
n.__d = e | |
}), e("rsvp/hash", ["./promise", "./utils", "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = e[0].__d, | |
r = e[1].isNonThenable, | |
i = e[1].keysOf; | |
t.__d = function (e) { | |
return new n(function (t, o) { | |
function a(e) { | |
return function (n) { | |
c[e] = n, 0 === --d && t(c) | |
} | |
} | |
function s(e) { | |
d = 0, o(e) | |
} | |
var u, l, c = {}, h = i(e), | |
d = h.length; | |
if (0 === d) return t(c), void 0; | |
for (var f = 0; f < h.length; f++) l = h[f], u = e[l], r(u) ? (c[l] = u, 0 === --d && t(c)) : n.cast(u).then(a(l), s) | |
}) | |
} | |
}), e("rsvp/instrument", ["./config", "./utils", "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = e[0].config, | |
r = e[1].now; | |
t.__d = function (e, t, i) { | |
try { | |
n.trigger(e, { | |
guid: t._guidKey + t._id, | |
eventName: e, | |
detail: t._detail, | |
childGuid: i && t._guidKey + i._id, | |
label: t._label, | |
timeStamp: r(), | |
stack: new Error(t._label).stack | |
}) | |
} catch (o) { | |
setTimeout(function () { | |
throw o | |
}, 0) | |
} | |
} | |
}), e("rsvp/map", ["./promise", "./all", "./utils", "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = (e[0].__d, e[1].__d), | |
r = e[2].isArray, | |
i = e[2].isFunction; | |
t.__d = function (e, t, o) { | |
return n(e, o).then(function (a) { | |
if (!r(e)) throw new TypeError("You must pass an array to map."); | |
if (!i(t)) throw new TypeError("You must pass a function to map's second argument."); | |
var s, u = a.length, | |
l = []; | |
for (s = 0; u > s; s++) l.push(t(a[s])); | |
return n(l, o) | |
}) | |
} | |
}), e("rsvp/node", ["./promise", "exports"], function () { | |
function e(e, t) { | |
return function (n, r) { | |
n ? t(n) : arguments.length > 2 ? e(i.call(arguments, 1)) : e(r) | |
} | |
} | |
var t = arguments, | |
n = t[t.length - 1], | |
r = t[0].__d, | |
i = Array.prototype.slice; | |
n.__d = function (t, n) { | |
return function () { | |
var o = i.call(arguments), | |
a = this || n; | |
return new r(function (n, i) { | |
r.all(o).then(function (r) { | |
try { | |
r.push(e(n, i)), t.apply(a, r) | |
} catch (o) { | |
i(o) | |
} | |
}) | |
}) | |
} | |
} | |
}), e("rsvp/promise", ["./config", "./events", "./instrument", "./utils", "./promise/cast", "./promise/all", "./promise/race", "./promise/resolve", "./promise/reject", "exports"], function () { | |
function e() {} | |
function t(r, i) { | |
if (!g(r)) throw new TypeError("You must pass a resolver function as the first argument to the promise constructor"); | |
if (!(this instanceof t)) throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); | |
this._id = P++, this._label = i, this._subscribers = [], p.instrument && m("created", this), e !== r && n(r, this) | |
} | |
function n(e, t) { | |
function n(e) { | |
s(t, e) | |
} | |
function r(e) { | |
l(t, e) | |
} | |
try { | |
e(n, r) | |
} catch (i) { | |
r(i) | |
} | |
} | |
function r(e, t, n, r) { | |
var i = e._subscribers, | |
o = i.length; | |
i[o] = t, i[o + T] = n, i[o + S] = r | |
} | |
function i(e, t) { | |
var n, r, i = e._subscribers, | |
a = e._detail; | |
p.instrument && m(t === T ? "fulfilled" : "rejected", e); | |
for (var s = 0; s < i.length; s += 3) n = i[s], r = i[s + t], o(t, n, r, a); | |
e._subscribers = null | |
} | |
function o(e, t, n, r) { | |
var i, o, u, c, h = g(n); | |
if (h) try { | |
i = n(r), u = !0 | |
} catch (d) { | |
c = !0, o = d | |
} else i = r, u = !0; | |
a(t, i) || (h && u ? s(t, i) : c ? l(t, o) : e === T ? s(t, i) : e === S && l(t, i)) | |
} | |
function a(e, t) { | |
var n, r = null; | |
try { | |
if (e === t) throw new TypeError("A promises callback cannot return that same promise."); | |
if (v(t) && (r = t.then, g(r))) return r.call(t, function (r) { | |
return n ? !0 : (n = !0, t !== r ? s(e, r) : u(e, r), void 0) | |
}, function (t) { | |
return n ? !0 : (n = !0, l(e, t), void 0) | |
}, "derived from: " + (e._label || " unknown promise")), !0 | |
} catch (i) { | |
return n ? !0 : (l(e, i), !0) | |
} | |
return !1 | |
} | |
function s(e, t) { | |
e === t ? u(e, t) : a(e, t) || u(e, t) | |
} | |
function u(e, t) { | |
e._state === x && (e._state = A, e._detail = t, p.async(c, e)) | |
} | |
function l(e, t) { | |
e._state === x && (e._state = A, e._detail = t, p.async(h, e)) | |
} | |
function c(e) { | |
i(e, e._state = T) | |
} | |
function h(e) { | |
e._onerror && e._onerror(e._detail), i(e, e._state = S) | |
} | |
var d = arguments, | |
f = d[d.length - 1], | |
p = d[0].config, | |
m = (d[1].__d, d[2].__d), | |
v = d[3].objectOrFunction, | |
g = d[3].isFunction, | |
y = d[3].now, | |
_ = d[4].__d, | |
b = d[5].__d, | |
w = d[6].__d, | |
C = d[7].__d, | |
E = d[8].__d, | |
O = "rsvp_" + y() + "-", | |
P = 0; | |
f.__d = t, t.cast = _, t.all = b, t.race = w, t.resolve = C, t.reject = E; | |
var x = void 0, | |
A = 0, | |
T = 1, | |
S = 2; | |
t.prototype = { | |
constructor: t, | |
_id: void 0, | |
_guidKey: O, | |
_label: void 0, | |
_state: void 0, | |
_detail: void 0, | |
_subscribers: void 0, | |
_onerror: function (e) { | |
p.trigger("error", e) | |
}, | |
then: function (t, n, i) { | |
var a = this; | |
this._onerror = null; | |
var s = new this.constructor(e, i); | |
if (this._state) { | |
var u = arguments; | |
p.async(function () { | |
o(a._state, s, u[a._state - 1], a._detail) | |
}) | |
} else r(this, s, t, n); | |
return p.instrument && m("chained", a, s), s | |
}, | |
"catch": function (e, t) { | |
return this.then(null, e, t) | |
}, | |
"finally": function (e, t) { | |
var n = this.constructor; | |
return this.then(function (t) { | |
return n.cast(e()).then(function () { | |
return t | |
}) | |
}, function (t) { | |
return n.cast(e()).then(function () { | |
throw t | |
}) | |
}, t) | |
} | |
} | |
}), e("rsvp/promise/all", ["../utils", "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = e[0].isArray, | |
r = e[0].isNonThenable; | |
t.__d = function (e, t) { | |
var i = this; | |
return new i(function (t, o) { | |
function a(e) { | |
return function (n) { | |
c[e] = n, 0 === --l && t(c) | |
} | |
} | |
function s(e) { | |
l = 0, o(e) | |
} | |
if (!n(e)) throw new TypeError("You must pass an array to all."); | |
var u, l = e.length, | |
c = new Array(l); | |
if (0 === l) return t(c), void 0; | |
for (var h = 0; h < e.length; h++) u = e[h], r(u) ? (c[h] = u, 0 === --l && t(c)) : i.cast(u).then(a(h), s) | |
}, t) | |
} | |
}), e("rsvp/promise/cast", ["exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1]; | |
t.__d = function (e, t) { | |
var n = this; | |
return e && "object" == typeof e && e.constructor === n ? e : new n(function (t) { | |
t(e) | |
}, t) | |
} | |
}), e("rsvp/promise/race", ["../utils", "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = e[0].isArray, | |
r = (e[0].isFunction, e[0].isNonThenable); | |
t.__d = function (e, t) { | |
var i, o = this; | |
return new o(function (t, a) { | |
function s(e) { | |
l && (l = !1, t(e)) | |
} | |
function u(e) { | |
l && (l = !1, a(e)) | |
} | |
if (!n(e)) throw new TypeError("You must pass an array to race."); | |
for (var l = !0, c = 0; c < e.length; c++) { | |
if (i = e[c], r(i)) return l = !1, t(i), void 0; | |
o.cast(i).then(s, u) | |
} | |
}, t) | |
} | |
}), e("rsvp/promise/reject", ["exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1]; | |
t.__d = function (e, t) { | |
var n = this; | |
return new n(function (t, n) { | |
n(e) | |
}, t) | |
} | |
}), e("rsvp/promise/resolve", ["exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1]; | |
t.__d = function (e, t) { | |
var n = this; | |
return new n(function (t) { | |
t(e) | |
}, t) | |
} | |
}), e("rsvp/race", ["./promise", "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = e[0].__d; | |
t.__d = function (e, t) { | |
return n.race(e, t) | |
} | |
}), e("rsvp/reject", ["./promise", "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = e[0].__d; | |
t.__d = function (e, t) { | |
return n.reject(e, t) | |
} | |
}), e("rsvp/resolve", ["./promise", "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = e[0].__d; | |
t.__d = function (e, t) { | |
return n.resolve(e, t) | |
} | |
}), e("rsvp/rethrow", ["exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1]; | |
t.__d = function (e) { | |
throw setTimeout(function () { | |
throw e | |
}), e | |
} | |
}), e("rsvp/utils", ["exports"], function () { | |
function e(e) { | |
return "function" == typeof e || "object" == typeof e && null !== e | |
} | |
function t(e) { | |
return "function" == typeof e | |
} | |
function n(t) { | |
return !e(t) | |
} | |
function r(e) { | |
return "[object Array]" === Object.prototype.toString.call(e) | |
} | |
var i = arguments, | |
o = i[i.length - 1]; | |
o.objectOrFunction = e, o.isFunction = t, o.isNonThenable = n, o.isArray = r; | |
var a = Date.now || function () { | |
return (new Date).getTime() | |
}; | |
o.now = a; | |
var s = Object.keys || function (e) { | |
var t = []; | |
for (var n in e) t.push(n); | |
return t | |
}; | |
o.keysOf = s | |
}), e("rsvp", ["./rsvp/promise", "./rsvp/events", "./rsvp/node", "./rsvp/all", "./rsvp/all_settled", "./rsvp/race", "./rsvp/hash", "./rsvp/rethrow", "./rsvp/defer", "./rsvp/config", "./rsvp/map", "./rsvp/resolve", "./rsvp/reject", "./rsvp/filter", "exports"], function () { | |
function e(e, t) { | |
p.async(e, t) | |
} | |
function t() { | |
p.on.apply(p, arguments) | |
} | |
function n() { | |
p.off.apply(p, arguments) | |
} | |
var r = arguments, | |
i = r[r.length - 1], | |
o = r[0].__d, | |
a = r[1].__d, | |
s = r[2].__d, | |
u = r[3].__d, | |
l = r[4].__d, | |
c = r[5].__d, | |
h = r[6].__d, | |
d = r[7].__d, | |
f = r[8].__d, | |
p = r[9].config, | |
m = r[9].configure, | |
v = r[10].__d, | |
g = r[11].__d, | |
y = r[12].__d, | |
_ = r[13].__d; | |
if ("undefined" != typeof window && "object" == typeof window.__PROMISE_INSTRUMENTATION__) { | |
var b = window.__PROMISE_INSTRUMENTATION__; | |
m("instrument", !0); | |
for (var w in b) b.hasOwnProperty(w) && t(w, b[w]) | |
} | |
i.Promise = o, i.EventTarget = a, i.all = u, i.allSettled = l, i.race = c, i.hash = h, i.rethrow = d, i.defer = f, i.denodeify = s, i.configure = m, i.on = t, i.off = n, i.resolve = g, i.reject = y, i.async = e, i.map = v, i.filter = _ | |
}) | |
}(), | |
function () { | |
e("container/container", ["container/inheriting_dict", "exports"], function () { | |
function e(e) { | |
this.parent = e, this.children = [], this.resolver = e && e.resolver || function () {}, this.registry = new _(e && e.registry), this.cache = new _(e && e.cache), this.factoryCache = new _(e && e.factoryCache), this.resolveCache = new _(e && e.resolveCache), this.typeInjections = new _(e && e.typeInjections), this.injections = {}, this.factoryTypeInjections = new _(e && e.factoryTypeInjections), this.factoryInjections = {}, this._options = new _(e && e._options), this._typeOptions = new _(e && e._typeOptions) | |
} | |
function t(e, t) { | |
return e.cache.has(t) ? !0 : !! e.resolve(t) | |
} | |
function n(e, t, n) { | |
if (n = n || {}, e.cache.has(t) && n.singleton !== !1) return e.cache.get(t); | |
var r = h(e, t); | |
return void 0 !== r ? (o(e, t) && n.singleton !== !1 && e.cache.set(t, r), r) : void 0 | |
} | |
function r(e) { | |
throw new Error(e + " is not currently supported on child containers") | |
} | |
function o(e, t) { | |
var n = s(e, t, "singleton"); | |
return n !== !1 | |
} | |
function a(e, t) { | |
var r = {}; | |
if (!t) return r; | |
for (var i, o, a = 0, s = t.length; s > a; a++) { | |
if (i = t[a], o = n(e, i.fullName), void 0 === o) throw new Error("Attempting to inject an unknown injection: `" + i.fullName + "`"); | |
r[i.property] = o | |
} | |
return r | |
} | |
function s(e, t, n) { | |
var r = e._options.get(t); | |
if (r && void 0 !== r[n]) return r[n]; | |
var i = t.split(":")[0]; | |
return r = e._typeOptions.get(i), r ? r[n] : void 0 | |
} | |
function u(e, t) { | |
var n, r = t, | |
o = e.resolve(r), | |
a = e.factoryCache, | |
s = t.split(":")[0]; | |
if (void 0 !== o) { | |
if (a.has(t)) return a.get(t); | |
if (!o || "function" != typeof o.extend || !i.MODEL_FACTORY_INJECTIONS && "model" === s) return o; | |
var u = l(e, t), | |
h = c(e, t); | |
return h._toString = e.makeToString(o, t), n = o.extend(u), n.reopenClass(h), a.set(t, n), n | |
} | |
} | |
function l(e, t) { | |
var n = t.split(":"), | |
r = n[0], | |
i = []; | |
return i = i.concat(e.typeInjections.get(r) || []), i = i.concat(e.injections[t] || []), i = a(e, i), i._debugContainerKey = t, i.container = e, i | |
} | |
function c(e, t) { | |
var n = t.split(":"), | |
r = n[0], | |
i = []; | |
return i = i.concat(e.factoryTypeInjections.get(r) || []), i = i.concat(e.factoryInjections[t] || []), i = a(e, i), i._debugContainerKey = t, i | |
} | |
function h(e, t) { | |
var n = u(e, t); | |
return s(e, t, "instantiate") === !1 ? n : n ? "function" == typeof n.extend ? n.create() : n.create(l(e, t)) : void 0 | |
} | |
function d(e, t) { | |
e.cache.eachLocal(function (n, r) { | |
s(e, n, "instantiate") !== !1 && t(r) | |
}) | |
} | |
function f(e) { | |
e.cache.eachLocal(function (t, n) { | |
s(e, t, "instantiate") !== !1 && n.destroy() | |
}), e.cache.dict = {} | |
} | |
function p(e, t, n, r) { | |
var i = e.get(t); | |
i || (i = [], e.set(t, i)), i.push({ | |
property: n, | |
fullName: r | |
}) | |
} | |
function m(e) { | |
if (!b.test(e)) throw new TypeError("Invalid Fullname, expected: `type:name` got: " + e) | |
} | |
function v(e, t, n, r) { | |
var i = e[t] = e[t] || []; | |
i.push({ | |
property: n, | |
fullName: r | |
}) | |
} | |
var g = arguments, | |
y = g[g.length - 1], | |
_ = g[0].__d; | |
e.prototype = { | |
parent: null, | |
children: null, | |
resolver: null, | |
registry: null, | |
cache: null, | |
typeInjections: null, | |
injections: null, | |
_options: null, | |
_typeOptions: null, | |
child: function () { | |
var t = new e(this); | |
return this.children.push(t), t | |
}, | |
set: function (e, t, n) { | |
e[t] = n | |
}, | |
register: function (e, t, n) { | |
if (m(e), void 0 === t) throw new TypeError("Attempting to register an unknown factory: `" + e + "`"); | |
var r = this.normalize(e); | |
if (this.cache.has(r)) throw new Error("Cannot re-register: `" + e + "`, as it has already been looked up."); | |
this.registry.set(r, t), this._options.set(r, n || {}) | |
}, | |
unregister: function (e) { | |
m(e); | |
var t = this.normalize(e); | |
this.registry.remove(t), this.cache.remove(t), this.factoryCache.remove(t), this.resolveCache.remove(t), this._options.remove(t) | |
}, | |
resolve: function (e) { | |
m(e); | |
var t = this.normalize(e), | |
n = this.resolveCache.get(t); | |
if (n) return n; | |
var r = this.resolver(t) || this.registry.get(t); | |
return this.resolveCache.set(t, r), r | |
}, | |
describe: function (e) { | |
return e | |
}, | |
normalize: function (e) { | |
return e | |
}, | |
makeToString: function (e) { | |
return e.toString() | |
}, | |
lookup: function (e, t) { | |
return m(e), n(this, this.normalize(e), t) | |
}, | |
lookupFactory: function (e) { | |
return m(e), u(this, this.normalize(e)) | |
}, | |
has: function (e) { | |
return m(e), t(this, this.normalize(e)) | |
}, | |
optionsForType: function (e, t) { | |
this.parent && r("optionsForType"), this._typeOptions.set(e, t) | |
}, | |
options: function (e, t) { | |
this.optionsForType(e, t) | |
}, | |
typeInjection: function (e, t, n) { | |
m(n), this.parent && r("typeInjection"), p(this.typeInjections, e, t, n) | |
}, | |
injection: function (e, t, n) { | |
this.parent && r("injection"), m(n); | |
var i = this.normalize(n); | |
if (-1 === e.indexOf(":")) return this.typeInjection(e, t, i); | |
m(e); | |
var o = this.normalize(e); | |
v(this.injections, o, t, i) | |
}, | |
factoryTypeInjection: function (e, t, n) { | |
this.parent && r("factoryTypeInjection"), p(this.factoryTypeInjections, e, t, this.normalize(n)) | |
}, | |
factoryInjection: function (e, t, n) { | |
this.parent && r("injection"); | |
var i = this.normalize(e), | |
o = this.normalize(n); | |
return m(n), -1 === e.indexOf(":") ? this.factoryTypeInjection(i, t, o) : (m(e), v(this.factoryInjections, i, t, o), void 0) | |
}, | |
destroy: function () { | |
for (var e = 0, t = this.children.length; t > e; e++) this.children[e].destroy(); | |
this.children = [], d(this, function (e) { | |
e.destroy() | |
}), this.parent = void 0, this.isDestroyed = !0 | |
}, | |
reset: function () { | |
for (var e = 0, t = this.children.length; t > e; e++) f(this.children[e]); | |
f(this) | |
} | |
}; | |
var b = /^[^:]+.+:[^:]+$/; | |
y.__d = e | |
}), e("container/inheriting_dict", ["exports"], function () { | |
function e(e) { | |
this.parent = e, this.dict = {} | |
} | |
var t = arguments, | |
n = t[t.length - 1]; | |
e.prototype = { | |
parent: null, | |
dict: null, | |
get: function (e) { | |
var t = this.dict; | |
return t.hasOwnProperty(e) ? t[e] : this.parent ? this.parent.get(e) : void 0 | |
}, | |
set: function (e, t) { | |
this.dict[e] = t | |
}, | |
remove: function (e) { | |
delete this.dict[e] | |
}, | |
has: function (e) { | |
var t = this.dict; | |
return t.hasOwnProperty(e) ? !0 : this.parent ? this.parent.has(e) : !1 | |
}, | |
eachLocal: function (e, t) { | |
var n = this.dict; | |
for (var r in n) n.hasOwnProperty(r) && e.call(t, r, n[r]) | |
} | |
}, n.__d = e | |
}), e("container", ["container/container", "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1]; | |
i.MODEL_FACTORY_INJECTIONS = !1, i.ENV && "undefined" != typeof i.ENV.MODEL_FACTORY_INJECTIONS && (i.MODEL_FACTORY_INJECTIONS = !! i.ENV.MODEL_FACTORY_INJECTIONS); | |
var n = e[0].__d; | |
t.__d = n | |
}) | |
}(), | |
function () { | |
e(32, [3, 6, 33, "exports"], function () { | |
function e(t, n) { | |
if (t === n) return 0; | |
var a = i(t), | |
s = i(n); | |
if (o) { | |
if ("instance" === a && o.detect(t.constructor)) return t.constructor.compare(t, n); | |
if ("instance" === s && o.detect(n.constructor)) return 1 - n.constructor.compare(n, t) | |
} | |
var u = r.ORDER_DEFINITION_MAPPING; | |
if (!u) { | |
var l = r.ORDER_DEFINITION; | |
u = r.ORDER_DEFINITION_MAPPING = {}; | |
var c, h; | |
for (c = 0, h = l.length; h > c; ++c) u[l[c]] = c; | |
delete r.ORDER_DEFINITION | |
} | |
var d = u[a], | |
f = u[s]; | |
if (f > d) return -1; | |
if (d > f) return 1; | |
switch (a) { | |
case "boolean": | |
case "number": | |
return n > t ? -1 : t > n ? 1 : 0; | |
case "string": | |
var p = t.localeCompare(n); | |
return 0 > p ? -1 : p > 0 ? 1 : 0; | |
case "array": | |
for (var m = t.length, v = n.length, g = Math.min(m, v), y = 0, _ = 0; 0 === y && g > _;) y = e(t[_], n[_]), _++; | |
return 0 !== y ? y : v > m ? -1 : m > v ? 1 : 0; | |
case "instance": | |
return o && o.detect(t) ? t.compare(t, n) : 0; | |
case "date": | |
var b = t.getTime(), | |
w = n.getTime(); | |
return w > b ? -1 : b > w ? 1 : 0; | |
default: | |
return 0 | |
} | |
} | |
var t = arguments, | |
n = t[t.length - 1], | |
r = t[0].__d, | |
i = t[1].typeOf, | |
o = t[2].__d; | |
r.ORDER_DEFINITION = r.ENV.ORDER_DEFINITION || ["undefined", "null", "boolean", "number", "string", "array", "object", "instance", "function", "class", "date"], n.__d = e | |
}), e(34, [3, 35, 13, 14, 8, 17, "exports"], function () { | |
function e() { | |
var e = this; | |
return o.apply(this, arguments), this.func = function (t) { | |
return function (n) { | |
return e._hasInstanceMeta(this, n) || d(e._dependentKeys, function (t) { | |
u(this, t, function () { | |
e.recomputeOnce.call(this, n) | |
}) | |
}, this), t.apply(this, arguments) | |
} | |
}(this.func), this | |
} | |
function t(t) { | |
var n; | |
if (arguments.length > 1 && (n = c.call(arguments, 0, -1), t = c.call(arguments, -1)[0]), "object" != typeof t) throw new l("Array Computed Property declared without an options hash"); | |
var r = new e(t); | |
return n && r.property.apply(r, n), r | |
} | |
var n = arguments, | |
r = n[n.length - 1], | |
i = n[0].__d, | |
o = (n[1].reduceComputed, n[1].ReduceComputedProperty), | |
a = n[2].__d, | |
s = n[3].create, | |
u = n[4].addObserver, | |
l = n[5].__d, | |
c = [].slice, | |
h = s, | |
d = a.forEach; | |
e.prototype = h(o.prototype), e.prototype.initialValue = function () { | |
return i.A() | |
}, e.prototype.resetValue = function (e) { | |
return e.clear(), e | |
}, e.prototype.didChange = function () {}, r.arrayComputed = t, r.ArrayComputedProperty = e | |
}), e(35, [3, 4, 5, 17, 6, 19, 16, 8, 12, 14, 13, 36, 37, 9, 38, "exports"], function () { | |
function e(e, t) { | |
return "@this" === t ? e : m(e, t) | |
} | |
function t(e, t, n) { | |
this.callbacks = e, this.cp = t, this.instanceMeta = n, this.dependentKeysByGuid = {}, this.trackedArraysByGuid = {}, this.suspended = !1, this.changedItems = {} | |
} | |
function n(e, t, n) { | |
this.dependentArray = e, this.index = t, this.item = e.objectAt(t), this.trackedArray = n, this.beforeObserver = null, this.observer = null, this.destroyed = !1 | |
} | |
function r(e, t, n) { | |
return 0 > e ? Math.max(0, t + e) : t > e ? e : Math.min(t - n, e) | |
} | |
function i(e, t, n) { | |
return Math.min(n, t - e) | |
} | |
function o(e, t, n, r, i, o) { | |
var a = { | |
arrayChanged: e, | |
index: n, | |
item: t, | |
propertyName: r, | |
property: i | |
}; | |
return o && (a.previousValues = o), a | |
} | |
function a(e, t, n, r, i) { | |
M(e, function (a, s) { | |
i.setValue(t.addedItem.call(this, i.getValue(), a, o(e, a, s, r, n), i.sugarMeta)) | |
}, this) | |
} | |
function s(e, t) { | |
{ | |
var n; | |
e._callbacks() | |
} | |
e._hasInstanceMeta(this, t) ? (n = e._instanceMeta(this, t), n.setValue(e.resetValue(n.getValue()))) : n = e._instanceMeta(this, t), e.options.initialize && e.options.initialize.call(this, n.getValue(), { | |
property: e, | |
propertyName: t | |
}, n.sugarMeta) | |
} | |
function u(t, n) { | |
if (L.test(n)) return !1; | |
var r = e(t, n); | |
return V.detect(r) | |
} | |
function l(e, t, n) { | |
this.context = e, this.propertyName = t, this.cache = k(e).cache, this.dependentArrays = {}, this.sugarMeta = {}, this.initialValue = n | |
} | |
function c(t) { | |
var n = this; | |
this.options = t, this._instanceMetas = {}, this._dependentKeys = null, this._itemPropertyKeys = {}, this._previousItemPropertyKeys = {}, this.readOnly(), this.cacheable(), this.recomputeOnce = function (e) { | |
N.once(this, r, e) | |
}; | |
var r = function (t) { | |
var r = (n._dependentKeys, n._instanceMeta(this, t)), | |
i = n._callbacks(); | |
s.call(this, n, t), r.dependentArraysObserver.suspendArrayObservers(function () { | |
M(n._dependentKeys, function (t) { | |
if (u(this, t)) { | |
var i = e(this, t), | |
o = r.dependentArrays[t]; | |
i === o ? n._previousItemPropertyKeys[t] && (delete n._previousItemPropertyKeys[t], r.dependentArraysObserver.setupPropertyObservers(t, n._itemPropertyKeys[t])) : (r.dependentArrays[t] = i, o && r.dependentArraysObserver.teardownObservers(o, t), i && r.dependentArraysObserver.setupObservers(i, t)) | |
} | |
}, this) | |
}, this), M(n._dependentKeys, function (o) { | |
if (u(this, o)) { | |
var s = e(this, o); | |
s && a.call(this, s, i, n, t, r) | |
} | |
}, this) | |
}; | |
this.func = function (e) { | |
return r.call(this, e), n._instanceMeta(this, e).getValue() | |
} | |
} | |
function h(e) { | |
return e | |
} | |
function d(e) { | |
var t; | |
if (arguments.length > 1 && (t = R.call(arguments, 0, -1), e = R.call(arguments, -1)[0]), "object" != typeof e) throw new v("Reduce Computed Property declared without an options hash"); | |
if (!("initialValue" in e)) throw new v("Reduce Computed Property declared without an initial value"); | |
var n = new c(e); | |
return t && n.property.apply(n, t), n | |
} | |
var f = arguments, | |
p = f[f.length - 1], | |
m = (f[0].__d, f[1].get), | |
v = (f[2].set, f[3].__d), | |
g = f[4].guidFor, | |
y = f[4].meta, | |
_ = f[5].propertyWillChange, | |
b = f[5].propertyDidChange, | |
w = f[6].__d, | |
C = f[7].addObserver, | |
E = (f[7].observersFor, f[7].removeObserver), | |
O = f[7].addBeforeObserver, | |
P = f[7].removeBeforeObserver, | |
x = f[8].ComputedProperty, | |
A = f[9].create, | |
T = f[10].__d, | |
S = f[11].__d, | |
V = f[12].__d, | |
N = f[13].__d, | |
I = f[14].__d, | |
R = (f[4].isArray, [].slice), | |
D = A, | |
M = T.forEach, | |
k = y, | |
H = /^(.*)\.@each\.(.*)/, | |
j = /(.*\.@each){2,}/, | |
L = /\.\[\]$/; | |
t.prototype = { | |
setValue: function (e) { | |
this.instanceMeta.setValue(e, !0) | |
}, | |
getValue: function () { | |
return this.instanceMeta.getValue() | |
}, | |
setupObservers: function (e, t) { | |
this.dependentKeysByGuid[g(e)] = t, e.addArrayObserver(this, { | |
willChange: "dependentArrayWillChange", | |
didChange: "dependentArrayDidChange" | |
}), this.cp._itemPropertyKeys[t] && this.setupPropertyObservers(t, this.cp._itemPropertyKeys[t]) | |
}, | |
teardownObservers: function (e, t) { | |
var n = this.cp._itemPropertyKeys[t] || []; | |
delete this.dependentKeysByGuid[g(e)], this.teardownPropertyObservers(t, n), e.removeArrayObserver(this, { | |
willChange: "dependentArrayWillChange", | |
didChange: "dependentArrayDidChange" | |
}) | |
}, | |
suspendArrayObservers: function (e, t) { | |
var n = this.suspended; | |
this.suspended = !0, e.call(t), this.suspended = n | |
}, | |
setupPropertyObservers: function (t, n) { | |
var r = e(this.instanceMeta.context, t), | |
i = e(r, "length"), | |
o = new Array(i); | |
this.resetTransformations(t, o), M(r, function (e, i) { | |
var a = this.createPropertyObserverContext(r, i, this.trackedArraysByGuid[t]); | |
o[i] = a, M(n, function (t) { | |
O(e, t, this, a.beforeObserver), C(e, t, this, a.observer) | |
}, this) | |
}, this) | |
}, | |
teardownPropertyObservers: function (e, t) { | |
var n, r, i, o = this, | |
a = this.trackedArraysByGuid[e]; | |
a && a.apply(function (e, a, s) { | |
s !== S.DELETE && M(e, function (e) { | |
e.destroyed = !0, n = e.beforeObserver, r = e.observer, i = e.item, M(t, function (e) { | |
P(i, e, o, n), E(i, e, o, r) | |
}) | |
}) | |
}) | |
}, | |
createPropertyObserverContext: function (e, t, r) { | |
var i = new n(e, t, r); | |
return this.createPropertyObserver(i), i | |
}, | |
createPropertyObserver: function (e) { | |
var t = this; | |
e.beforeObserver = function (n, r) { | |
return t.itemPropertyWillChange(n, r, e.dependentArray, e) | |
}, e.observer = function (n, r) { | |
return t.itemPropertyDidChange(n, r, e.dependentArray, e) | |
} | |
}, | |
resetTransformations: function (e, t) { | |
this.trackedArraysByGuid[e] = new S(t) | |
}, | |
trackAdd: function (e, t, n) { | |
var r = this.trackedArraysByGuid[e]; | |
r && r.addItems(t, n) | |
}, | |
trackRemove: function (e, t, n) { | |
var r = this.trackedArraysByGuid[e]; | |
return r ? r.removeItems(t, n) : [] | |
}, | |
updateIndexes: function (t, n) { | |
var r = e(n, "length"); | |
t.apply(function (e, t, n) { | |
n !== S.DELETE && (n !== S.RETAIN || e.length !== r || 0 !== t) && M(e, function (e, n) { | |
e.index = n + t | |
}) | |
}) | |
}, | |
dependentArrayWillChange: function (t, n, a) { | |
function s(e) { | |
d[h].destroyed = !0, P(l, e, this, d[h].beforeObserver), E(l, e, this, d[h].observer) | |
} | |
if (!this.suspended) { | |
var u, l, c, h, d, f = this.callbacks.removedItem, | |
p = g(t), | |
m = this.dependentKeysByGuid[p], | |
v = this.cp._itemPropertyKeys[m] || [], | |
y = e(t, "length"), | |
_ = r(n, y, 0), | |
b = i(_, y, a); | |
for (d = this.trackRemove(m, _, b), h = b - 1; h >= 0 && (c = _ + h, !(c >= y)); --h) l = t.objectAt(c), M(v, s, this), u = o(t, l, c, this.instanceMeta.propertyName, this.cp), this.setValue(f.call(this.instanceMeta.context, this.getValue(), l, u, this.instanceMeta.sugarMeta)) | |
} | |
}, | |
dependentArrayDidChange: function (t, n, i, a) { | |
if (!this.suspended) { | |
var s, u, l = this.callbacks.addedItem, | |
c = g(t), | |
h = this.dependentKeysByGuid[c], | |
d = new Array(a), | |
f = this.cp._itemPropertyKeys[h], | |
p = e(t, "length"), | |
m = r(n, p, a); | |
M(t.slice(m, m + a), function (e, n) { | |
f && (u = d[n] = this.createPropertyObserverContext(t, m + n, this.trackedArraysByGuid[h]), M(f, function (t) { | |
O(e, t, this, u.beforeObserver), C(e, t, this, u.observer) | |
}, this)), s = o(t, e, m + n, this.instanceMeta.propertyName, this.cp), this.setValue(l.call(this.instanceMeta.context, this.getValue(), e, s, this.instanceMeta.sugarMeta)) | |
}, this), this.trackAdd(h, m, d) | |
} | |
}, | |
itemPropertyWillChange: function (t, n, r, i) { | |
var o = g(t); | |
this.changedItems[o] || (this.changedItems[o] = { | |
array: r, | |
observerContext: i, | |
obj: t, | |
previousValues: {} | |
}), this.changedItems[o].previousValues[n] = e(t, n) | |
}, | |
itemPropertyDidChange: function () { | |
this.flushChanges() | |
}, | |
flushChanges: function () { | |
var e, t, n, r = this.changedItems; | |
for (e in r) t = r[e], t.observerContext.destroyed || (this.updateIndexes(t.observerContext.trackedArray, t.observerContext.dependentArray), n = o(t.array, t.obj, t.observerContext.index, this.instanceMeta.propertyName, this.cp, t.previousValues), this.setValue(this.callbacks.removedItem.call(this.instanceMeta.context, this.getValue(), t.obj, n, this.instanceMeta.sugarMeta)), this.setValue(this.callbacks.addedItem.call(this.instanceMeta.context, this.getValue(), t.obj, n, this.instanceMeta.sugarMeta))); | |
this.changedItems = {} | |
} | |
}, l.prototype = { | |
getValue: function () { | |
return this.propertyName in this.cache ? this.cache[this.propertyName] : this.initialValue | |
}, | |
setValue: function (e, t) { | |
e !== this.cache[this.propertyName] && (t && _(this.context, this.propertyName), void 0 === e ? delete this.cache[this.propertyName] : this.cache[this.propertyName] = e, t && b(this.context, this.propertyName)) | |
} | |
}, c.prototype = D(x.prototype), c.prototype._callbacks = function () { | |
if (!this.callbacks) { | |
var e = this.options; | |
this.callbacks = { | |
removedItem: e.removedItem || h, | |
addedItem: e.addedItem || h | |
} | |
} | |
return this.callbacks | |
}, c.prototype._hasInstanceMeta = function (e, t) { | |
var n = g(e), | |
r = n + ":" + t; | |
return !!this._instanceMetas[r] | |
}, c.prototype._instanceMeta = function (e, n) { | |
var r = g(e), | |
i = r + ":" + n, | |
o = this._instanceMetas[i]; | |
return o || (o = this._instanceMetas[i] = new l(e, n, this.initialValue()), o.dependentArraysObserver = new t(this._callbacks(), this, o, e, n, o.sugarMeta)), o | |
}, c.prototype.initialValue = function () { | |
return "function" == typeof this.options.initialValue ? this.options.initialValue() : this.options.initialValue | |
}, c.prototype.resetValue = function () { | |
return this.initialValue() | |
}, c.prototype.itemPropertyKey = function (e, t) { | |
this._itemPropertyKeys[e] = this._itemPropertyKeys[e] || [], this._itemPropertyKeys[e].push(t) | |
}, c.prototype.clearItemPropertyKeys = function (e) { | |
this._itemPropertyKeys[e] && (this._previousItemPropertyKeys[e] = this._itemPropertyKeys[e], this._itemPropertyKeys[e] = []) | |
}, c.prototype.property = function () { | |
var e, t, n = this, | |
r = R.call(arguments), | |
i = new I; | |
return M(r, function (r) { | |
if (j.test(r)) throw new v("Nested @each properties not supported: " + r); | |
if (e = H.exec(r)) { | |
t = e[1]; | |
var o = e[2], | |
a = function (e) { | |
n.itemPropertyKey(t, e) | |
}; | |
w(o, a), i.add(t) | |
} else i.add(r) | |
}), x.prototype.property.apply(this, i.toArray()) | |
}, p.reduceComputed = d, p.ReduceComputedProperty = c | |
}), e(39, [3, 4, 5, 6, 13, 9, 8, 17, 34, 35, 40, 41, 42, 32, "exports"], function () { | |
function e(e) { | |
return E(e, { | |
initialValue: 0, | |
addedItem: function (e, t) { | |
return e + t | |
}, | |
removedItem: function (e, t) { | |
return e - t | |
} | |
}) | |
} | |
function t(e) { | |
return E(e, { | |
initialValue: -1 / 0, | |
addedItem: function (e, t) { | |
return Math.max(e, t) | |
}, | |
removedItem: function (e, t) { | |
return e > t ? e : void 0 | |
} | |
}) | |
} | |
function n(e) { | |
return E(e, { | |
initialValue: 1 / 0, | |
addedItem: function (e, t) { | |
return Math.min(e, t) | |
}, | |
removedItem: function (e, t) { | |
return t > e ? e : void 0 | |
} | |
}) | |
} | |
function r(e, t) { | |
var n = { | |
addedItem: function (e, n, r) { | |
var i = t.call(this, n); | |
return e.insertAt(r.index, i), e | |
}, | |
removedItem: function (e, t, n) { | |
return e.removeAt(n.index, 1), e | |
} | |
}; | |
return C(e, n) | |
} | |
function i(e, t) { | |
var n = function (e) { | |
return v(e, t) | |
}; | |
return r(e + ".@each." + t, n) | |
} | |
function o(e, t) { | |
var n = { | |
initialize: function (e, t, n) { | |
n.filteredArrayIndexes = new P | |
}, | |
addedItem: function (e, n, r, i) { | |
var o = !! t.call(this, n), | |
a = i.filteredArrayIndexes.addItem(r.index, o); | |
return o && e.insertAt(a, n), e | |
}, | |
removedItem: function (e, t, n, r) { | |
var i = r.filteredArrayIndexes.removeItem(n.index); | |
return i > -1 && e.removeAt(i), e | |
} | |
}; | |
return C(e, n) | |
} | |
function a(e, t, n) { | |
var r; | |
return r = 2 === arguments.length ? function (e) { | |
return v(e, t) | |
} : function (e) { | |
return v(e, t) === n | |
}, o(e + ".@each." + t, r) | |
} | |
function s() { | |
var e = S.call(arguments); | |
return e.push({ | |
initialize: function (e, t, n) { | |
n.itemCounts = {} | |
}, | |
addedItem: function (e, t, n, r) { | |
var i = g(t); | |
return r.itemCounts[i] ? ++r.itemCounts[i] : r.itemCounts[i] = 1, e.addObject(t), e | |
}, | |
removedItem: function (e, t, n, r) { | |
var i = g(t), | |
o = r.itemCounts; | |
return 0 === --o[i] && e.removeObject(t), e | |
} | |
}), C.apply(null, e) | |
} | |
function u() { | |
var e = function (e) { | |
return y.map(e.property._dependentKeys, function (e) { | |
return g(e) | |
}) | |
}, t = S.call(arguments); | |
return t.push({ | |
initialize: function (e, t, n) { | |
n.itemCounts = {} | |
}, | |
addedItem: function (t, n, r, i) { | |
var o = g(n), | |
a = (e(r), g(r.arrayChanged)), | |
s = r.property._dependentKeys.length, | |
u = i.itemCounts; | |
return u[o] || (u[o] = {}), void 0 === u[o][a] && (u[o][a] = 0), 1 === ++u[o][a] && s === x(u[o]).length && t.addObject(n), t | |
}, | |
removedItem: function (t, n, r, i) { | |
var o, a = g(n), | |
s = (e(r), g(r.arrayChanged)), | |
u = (r.property._dependentKeys.length, i.itemCounts); | |
return void 0 === u[a][s] && (u[a][s] = 0), 0 === --u[a][s] && (delete u[a][s], o = x(u[a]).length, 0 === o && delete u[a], t.removeObject(n)), t | |
} | |
}), C.apply(null, t) | |
} | |
function l(e, t) { | |
if (2 !== arguments.length) throw new w("setDiff requires exactly two dependent arrays."); | |
return C(e, t, { | |
addedItem: function (n, r, i) { | |
var o = v(this, e), | |
a = v(this, t); | |
return i.arrayChanged === o ? a.contains(r) || n.addObject(r) : n.removeObject(r), n | |
}, | |
removedItem: function (n, r, i) { | |
var o = v(this, e), | |
a = v(this, t); | |
return i.arrayChanged === a ? o.contains(r) && n.addObject(r) : n.removeObject(r), n | |
} | |
}) | |
} | |
function c(e, t, n, r) { | |
function i(e) { | |
return d.detectInstance(e) ? g(v(e, "content")) : g(e) | |
} | |
var o, a, s, u, l; | |
return arguments.length < 4 && (r = v(e, "length")), arguments.length < 3 && (n = 0), n === r ? n : (o = n + Math.floor((r - n) / 2), a = e.objectAt(o), u = i(a), l = i(t), u === l ? o : (s = this.order(a, t), 0 === s && (s = l > u ? -1 : 1), 0 > s ? this.binarySearch(e, t, o + 1, r) : s > 0 ? this.binarySearch(e, t, n, o) : o)) | |
} | |
function h(e, t) { | |
var n, r; | |
return "function" == typeof t ? n = function (e, n, r) { | |
r.order = t, r.binarySearch = c | |
} : (r = t, n = function (t, n, i) { | |
function o() { | |
var t, o, s, u = v(this, r), | |
l = i.sortProperties = [], | |
c = i.sortPropertyAscending = {}; | |
n.property.clearItemPropertyKeys(e), V(u, function (r) { | |
-1 !== (o = r.indexOf(":")) ? (t = r.substring(0, o), s = "desc" !== r.substring(o + 1).toLowerCase()) : (t = r, s = !0), l.push(t), c[t] = s, n.property.itemPropertyKey(e, t) | |
}), u.addObserver("@each", this, a) | |
} | |
function a() { | |
_.once(this, s, n.propertyName) | |
} | |
function s(e) { | |
o.call(this), n.property.recomputeOnce.call(this, e) | |
} | |
b(this, r, a), o.call(this), i.order = function (e, t) { | |
for (var n, r, i, o = t instanceof d, a = 0; a < this.sortProperties.length; ++a) | |
if (n = this.sortProperties[a], r = A(v(e, n), o ? t[n] : v(t, n)), 0 !== r) return i = this.sortPropertyAscending[n], i ? r : -1 * r; | |
return 0 | |
}, i.binarySearch = c | |
}), C(e, { | |
initialize: n, | |
addedItem: function (e, t, n, r) { | |
var i = r.binarySearch(e, t); | |
return e.insertAt(i, t), e | |
}, | |
removedItem: function (e, t, n, r) { | |
var i, o, a; | |
return n.previousValues ? (i = T({ | |
content: t | |
}, n.previousValues), a = d.create(i)) : a = t, o = r.binarySearch(e, a), e.removeAt(o), e | |
} | |
}) | |
} | |
var d, f = arguments, | |
p = f[f.length - 1], | |
m = f[0].__d, | |
v = f[1].get, | |
g = (f[2].set, f[3].isArray, f[3].guidFor), | |
y = f[4].__d, | |
_ = f[5].__d, | |
b = f[6].addObserver, | |
w = f[7].__d, | |
C = f[8].arrayComputed, | |
E = f[9].reduceComputed, | |
O = f[10].__d, | |
P = f[11].__d, | |
x = f[12].__d, | |
A = f[13].__d, | |
T = m.merge, | |
S = [].slice, | |
V = y.forEach, | |
N = i, | |
I = a, | |
R = s, | |
d = O.extend(); | |
p.sum = e, p.min = n, p.max = t, p.map = r, p.sort = h, p.setDiff = l, p.mapBy = i, p.mapProperty = N, p.filter = o, p.filterBy = a, p.filterProperty = I, p.uniq = s, p.union = R, p.intersect = u | |
}), e(43, [3, 4, 5, 13, 44, 45, 46, 12, 17, "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = e[0].__d, | |
r = e[1].get, | |
i = (e[2].set, e[3].__d), | |
o = e[4].__d, | |
a = e[5].__d, | |
s = e[6].ControllerMixin, | |
u = e[7].computed, | |
l = e[8].__d, | |
c = i.forEach, | |
h = i.replace, | |
d = o.extend(s, a, { | |
itemController: null, | |
lookupItemController: function () { | |
return r(this, "itemController") | |
}, | |
objectAtContent: function (e) { | |
var t = r(this, "length"), | |
n = r(this, "arrangedContent"), | |
i = n && n.objectAt(e); | |
if (e >= 0 && t > e) { | |
var o = this.lookupItemController(i); | |
if (o) return this.controllerAt(e, i, o) | |
} | |
return i | |
}, | |
arrangedContentDidChange: function () { | |
this._super(), this._resetSubControllers() | |
}, | |
arrayContentDidChange: function (e, t, n) { | |
var i = r(this, "_subControllers"), | |
o = i.slice(e, e + t); | |
c(o, function (e) { | |
e && e.destroy() | |
}), h(i, e, t, new Array(n)), this._super(e, t, n) | |
}, | |
init: function () { | |
this._super(), this.set("_subControllers", n.A()) | |
}, | |
content: u(function () { | |
return n.A() | |
}), | |
_isVirtual: !1, | |
controllerAt: function (e, t, n) { | |
var i, o = r(this, "container"), | |
a = r(this, "_subControllers"), | |
s = a[e]; | |
if (s) return s; | |
if (i = "controller:" + n, !o.has(i)) throw new l('Could not resolve itemController: "' + n + '"'); | |
var u; | |
return this._isVirtual && (u = r(this, "parentController")), u = u || this, s = o.lookupFactory(i).create({ | |
target: this, | |
parentController: u, | |
content: t | |
}), a[e] = s, s | |
}, | |
_subControllers: null, | |
_resetSubControllers: function () { | |
var e = r(this, "_subControllers"); | |
e && c(e, function (e) { | |
e && e.destroy() | |
}), this.set("_subControllers", n.A()) | |
} | |
}); | |
t.__d = d | |
}), e(46, [3, 47, 4, 31, 12, 48, "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = (e[0].__d, e[1].__d), | |
r = (e[2].get, e[3].Mixin), | |
i = e[4].computed, | |
o = e[5].__d, | |
a = r.create(o, { | |
isController: !0, | |
target: null, | |
container: null, | |
parentController: null, | |
store: null, | |
model: i.alias("content"), | |
deprecatedSendHandles: function (e) { | |
return !!this[e] | |
}, | |
deprecatedSend: function (e) { | |
var t = [].slice.call(arguments, 1); | |
this[e].apply(this, t) | |
} | |
}), | |
s = n.extend(a); | |
t.Controller = s, t.ControllerMixin = a | |
}), e(49, [46, 40, "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = e[0].ControllerMixin, | |
r = e[1].__d, | |
i = r.extend(n); | |
t.__d = i | |
}), e(50, [13, 6, 47, 51, 14, "exports"], function () { | |
function e(t, n, r, i) { | |
var u, l, c; | |
if ("object" != typeof t || null === t) return t; | |
if (n && (l = s(r, t)) >= 0) return i[l]; | |
if ("array" === o(t)) { | |
if (u = t.slice(), n) | |
for (l = u.length; --l >= 0;) u[l] = e(u[l], n, r, i) | |
} else if (a && a.detect(t)) u = t.copy(n, r, i); | |
else { | |
u = {}; | |
for (c in t) t.hasOwnProperty(c) && "__" !== c.substring(0, 2) && (u[c] = n ? e(t[c], n, r, i) : t[c]) | |
} | |
return n && (r.push(t), i.push(u)), u | |
} | |
function t(t, n) { | |
return "object" != typeof t || null === t ? t : a && a.detect(t) ? t.copy(n) : e(t, n, n ? [] : null, n ? [] : null) | |
} | |
var n = arguments, | |
r = n[n.length - 1], | |
i = n[0].__d, | |
o = n[1].typeOf, | |
a = (n[2].__d, n[3].__d), | |
s = (n[4].create, i.indexOf); | |
r.__d = t | |
}), e(52, ["exports"], function () { | |
function e(e, t) { | |
return e && "function" == typeof e.isEqual ? e.isEqual(t) : e === t | |
} | |
var t = arguments, | |
n = t[t.length - 1]; | |
n.isEqual = e | |
}), e(53, [3, 16, 12], function () { | |
var e = arguments, | |
t = (e[e.length - 1], e[0].__d), | |
n = e[1].__d, | |
r = e[2].computed, | |
i = Array.prototype.slice; | |
(t.EXTEND_PROTOTYPES === !0 || t.EXTEND_PROTOTYPES.Function) && (Function.prototype.property = function () { | |
var e = r(this); | |
return e.property.apply(e, arguments) | |
}, Function.prototype.observes = function () { | |
for (var e = function (e) { | |
t.push(e) | |
}, t = [], r = 0; r < arguments.length; ++r) n(arguments[r], e); | |
return this.__ember_observes__ = t, this | |
}, Function.prototype.observesImmediately = function () { | |
for (var e = 0, t = arguments.length; t > e; e++) { | |
arguments[e] | |
} | |
return this.observes.apply(this, arguments) | |
}, Function.prototype.observesBefore = function () { | |
for (var e = function (e) { | |
t.push(e) | |
}, t = [], r = 0; r < arguments.length; ++r) n(arguments[r], e); | |
return this.__ember_observesBefore__ = t, this | |
}, Function.prototype.on = function () { | |
var e = i.call(arguments); | |
return this.__ember_listens__ = e, this | |
}) | |
}), e(54, [3, 27, "exports"], function () { | |
var e = arguments, | |
n = e[e.length - 1], | |
r = e[0].__d, | |
i = e[1].__d, | |
o = t("rsvp"); | |
o.onerrorDefault = function (e) { | |
if (e instanceof Error) | |
if (r.testing) { | |
if (!r.Test || !r.Test.adapter) throw e; | |
r.Test.adapter.exception(e) | |
} else i.error(e.stack) | |
}, o.on("error", o.onerrorDefault), r.RSVP = o, n.__d = o | |
}), e(55, [3, 56], function () { | |
var e = arguments, | |
t = (e[e.length - 1], e[0].__d), | |
n = e[1].__d, | |
r = n.fmt, | |
i = n.w, | |
o = n.loc, | |
a = n.capitalize, | |
s = n.decamelize, | |
u = n.dasherize, | |
l = n.underscore, | |
c = n.capitalize, | |
h = n.classify; | |
(t.EXTEND_PROTOTYPES === !0 || t.EXTEND_PROTOTYPES.String) && (String.prototype.fmt = function () { | |
return r(this, arguments) | |
}, String.prototype.w = function () { | |
return i(this) | |
}, String.prototype.loc = function () { | |
return o(this, arguments) | |
}, String.prototype.camelize = function () { | |
return a(this) | |
}, String.prototype.decamelize = function () { | |
return s(this) | |
}, String.prototype.dasherize = function () { | |
return u(this) | |
}, String.prototype.underscore = function () { | |
return l(this) | |
}, String.prototype.classify = function () { | |
return h(this) | |
}, String.prototype.capitalize = function () { | |
return c(this) | |
}) | |
}), e(42, [13, 14, "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = e[0].__d, | |
r = e[1].create, | |
i = Object.keys; | |
if (i || r.isSimulated) { | |
var o = ["constructor", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "valueOf", "toLocaleString", "toString"], | |
a = function (e, t, r) { | |
"__" !== r.substring(0, 2) && "_super" !== r && (n.indexOf(t, r) >= 0 || ("function" != typeof e.hasOwnProperty || e.hasOwnProperty(r)) && t.push(r)) | |
}; | |
i = function (e) { | |
var t, n = []; | |
for (t in e) a(e, n, t); | |
for (var r = 0, i = o.length; i > r; r++) t = o[r], a(e, n, t); | |
return n | |
} | |
} | |
t.__d = i | |
}), e("ember-runtime", ["ember-metal", 52, 42, 32, 50, 57, 47, 36, 41, 58, 59, 44, 40, 60, 61, 62, 38, 56, 63, 64, 37, 33, 51, 65, 66, 67, 48, 68, 69, 70, 71, 72, 73, 45, 34, 35, 39, 43, 49, 46, 54, 55, 53], function () { | |
{ | |
var e = arguments; | |
e[e.length - 1] | |
} | |
i.compare = e[3].__d, i.copy = e[4].__d, i.isEqual = e[1].isEqual, i.keys = e[2].__d, i.Array = e[20].__d, i.Comparable = e[21].Comparable, i.Copyable = e[22].Copyable, i.SortableMixin = e[33].__d, i.Freezable = e[24].Freezable, i.FROZEN_ERROR = e[24].FROZEN_ERROR, i.DeferredMixin = e[27].__d, i.MutableEnumerable = e[28].__d, i.MutableArray = MutableArray, i.TargetActionSupport = TargetActionSupport, i.Evented = e[31].__d, i.PromiseProxyMixin = e[32].__d, i.Observable = e[25].__d, i.arrayComputed = e[34].arrayComputed, i.ArrayComputedProperty = e[34].ArrayComputedProperty, i.reduceComputed = e[35].reduceComputed, i.ReduceComputedProperty = e[35].ReduceComputedProperty, i.computed.sum = e[36].sum, i.computed.min = e[36].min, i.computed.max = e[36].max, i.computed.map = e[36].map, i.computed.sort = e[36].sort, i.computed.setDiff = e[36].setDiff, i.computed.mapBy = e[36].mapBy, i.computed.mapProperty = e[36].mapProperty, i.computed.filter = e[36].filter, i.computed.filterBy = e[36].filterBy, i.computed.filterProperty = e[36].filterProperty, i.computed.uniq = e[36].uniq, i.computed.union = e[36].union, i.computed.intersect = e[36].intersect, i.String = e[17].__d, i.Object = e[6].__d, i.TrackedArray = e[7].__d, i.SubArray = e[8].__d, i.Container = e[9].__d, i.Namespace = e[5].__d, i.Application = e[10].__d, i.Enumerable = e[23].__d, i.ArrayProxy = e[11].__d, i.ObjectProxy = e[12].__d, i.ActionHandler = e[26].__d, i.CoreObject = e[13].__d, i.EachArray = e[14].EachArray, i.EachProxy = e[14].EachProxy, i.NativeArray = e[15].__d, i.Set = e[16].__d, i.Deferred = e[18].__d, i.onLoad = e[19].onLoad, i.runLoadHooks = e[19].runLoadHooks, i.ArrayController = e[37].__d, i.ObjectController = e[38].__d, i.Controller = e[39].Controller, i.ControllerMixin = e[39].ControllerMixin | |
}), e(48, [31, 4, 6, "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = e[0].Mixin, | |
r = e[1].get, | |
o = e[2].typeOf, | |
a = n.create({ | |
mergedProperties: ["_actions"], | |
willMergeMixin: function (e) { | |
var t; | |
e._actions || ("object" === o(e.actions) ? t = "actions" : "object" === o(e.events) && (t = "events"), t && (e._actions = i.merge(e._actions || {}, e[t])), delete e[t]) | |
}, | |
send: function (e) { | |
var t, n = [].slice.call(arguments, 1); | |
if (this._actions && this._actions[e]) { | |
if (this._actions[e].apply(this, n) !== !0) return | |
} else if (!i.FEATURES.isEnabled("ember-routing-drop-deprecated-action-style") && this.deprecatedSend && this.deprecatedSendHandles && this.deprecatedSendHandles(e) && this.deprecatedSend.apply(this, [].slice.call(arguments)) !== !0) return; | |
(t = r(this, "target")) && t.send.apply(t, arguments) | |
} | |
}); | |
t.__d = a | |
}), e(37, [3, 4, 5, 12, 21, 65, 13, 31, 19, 22, 15, "exports"], function () { | |
var e = arguments, | |
n = e[e.length - 1], | |
r = e[0].__d, | |
i = e[1].get, | |
o = (e[2].set, e[3].computed), | |
a = e[3].cacheFor, | |
s = e[4].isNone, | |
u = (e[4].none, e[5].__d), | |
l = e[6].__d, | |
c = e[7].Mixin, | |
h = e[7].required, | |
d = e[8].propertyWillChange, | |
f = e[8].propertyDidChange, | |
p = e[9].addListener, | |
m = e[9].removeListener, | |
v = e[9].sendEvent, | |
g = e[9].hasListeners, | |
y = e[10].isWatching, | |
_ = l.map, | |
b = c.create(u, { | |
length: h(), | |
objectAt: function (e) { | |
return 0 > e || e >= i(this, "length") ? void 0 : i(this, e) | |
}, | |
objectsAt: function (e) { | |
var t = this; | |
return _(e, function (e) { | |
return t.objectAt(e) | |
}) | |
}, | |
nextObject: function (e) { | |
return this.objectAt(e) | |
}, | |
"[]": o(function (e, t) { | |
return void 0 !== t && this.replace(0, i(this, "length"), t), this | |
}), | |
firstObject: o(function () { | |
return this.objectAt(0) | |
}), | |
lastObject: o(function () { | |
return this.objectAt(i(this, "length") - 1) | |
}), | |
contains: function (e) { | |
return this.indexOf(e) >= 0 | |
}, | |
slice: function (e, t) { | |
var n = r.A(), | |
o = i(this, "length"); | |
for (s(e) && (e = 0), (s(t) || t > o) && (t = o), 0 > e && (e = o + e), 0 > t && (t = o + t); t > e;) n[n.length] = this.objectAt(e++); | |
return n | |
}, | |
indexOf: function (e, t) { | |
var n, r = i(this, "length"); | |
for (void 0 === t && (t = 0), 0 > t && (t += r), n = t; r > n; n++) | |
if (this.objectAt(n) === e) return n; | |
return -1 | |
}, | |
lastIndexOf: function (e, t) { | |
var n, r = i(this, "length"); | |
for ((void 0 === t || t >= r) && (t = r - 1), 0 > t && (t += r), n = t; n >= 0; n--) | |
if (this.objectAt(n) === e) return n; | |
return -1 | |
}, | |
addArrayObserver: function (e, t) { | |
var n = t && t.willChange || "arrayWillChange", | |
r = t && t.didChange || "arrayDidChange", | |
o = i(this, "hasArrayObservers"); | |
return o || d(this, "hasArrayObservers"), p(this, "@array:before", e, n), p(this, "@array:change", e, r), o || f(this, "hasArrayObservers"), this | |
}, | |
removeArrayObserver: function (e, t) { | |
var n = t && t.willChange || "arrayWillChange", | |
r = t && t.didChange || "arrayDidChange", | |
o = i(this, "hasArrayObservers"); | |
return o && d(this, "hasArrayObservers"), m(this, "@array:before", e, n), m(this, "@array:change", e, r), o && f(this, "hasArrayObservers"), this | |
}, | |
hasArrayObservers: o(function () { | |
return g(this, "@array:change") || g(this, "@array:before") | |
}), | |
arrayContentWillChange: function (e, t, n) { | |
void 0 === e ? (e = 0, t = n = -1) : (void 0 === t && (t = -1), void 0 === n && (n = -1)), y(this, "@each") && i(this, "@each"), v(this, "@array:before", [this, e, t, n]); | |
var r, o; | |
if (e >= 0 && t >= 0 && i(this, "hasEnumerableObservers")) { | |
r = [], o = e + t; | |
for (var a = e; o > a; a++) r.push(this.objectAt(a)) | |
} else r = t; | |
return this.enumerableContentWillChange(r, n), this | |
}, | |
arrayContentDidChange: function (e, t, n) { | |
void 0 === e ? (e = 0, t = n = -1) : (void 0 === t && (t = -1), void 0 === n && (n = -1)); | |
var r, o; | |
if (e >= 0 && n >= 0 && i(this, "hasEnumerableObservers")) { | |
r = [], o = e + n; | |
for (var s = e; o > s; s++) r.push(this.objectAt(s)) | |
} else r = n; | |
this.enumerableContentDidChange(t, r), v(this, "@array:change", [this, e, t, n]); | |
var u = i(this, "length"), | |
l = a(this, "firstObject"), | |
c = a(this, "lastObject"); | |
return this.objectAt(0) !== l && (d(this, "firstObject"), f(this, "firstObject")), this.objectAt(u - 1) !== c && (d(this, "lastObject"), f(this, "lastObject")), this | |
}, | |
"@each": o(function () { | |
if (!this.__each) { | |
var e = t("ember-runtime/system/each_proxy").EachProxy; | |
this.__each = new e(this) | |
} | |
return this.__each | |
}) | |
}); | |
n.__d = b | |
}), e(33, [31, "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = e[0].Mixin, | |
r = e[0].required, | |
i = n.create({ | |
compare: r(Function) | |
}); | |
t.__d = i | |
}), e(51, [4, 5, 31, 66, 56, 17, "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = e[0].get, | |
r = (e[1].set, e[2].required), | |
i = e[3].Freezable, | |
o = e[2].Mixin, | |
a = e[4].__d, | |
s = e[5].__d, | |
u = o.create({ | |
copy: r(Function), | |
frozenCopy: function () { | |
if (i && i.detect(this)) return n(this, "isFrozen") ? this : this.copy().freeze(); | |
throw new s(a.fmt("%@ does not support freezing", [this])) | |
} | |
}); | |
t.__d = u | |
}), e(68, [3, 4, 31, 12, 9, 54, "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = e[0].__d, | |
r = e[1].get, | |
i = e[2].Mixin, | |
o = e[3].computed, | |
a = e[4].__d, | |
s = e[5].__d; | |
if (n.FEATURES["ember-runtime-test-friendly-promises"]) { | |
var u = function () { | |
n.Test && n.Test.adapter && n.Test.adapter.asyncStart() | |
}, l = function () { | |
n.Test && n.Test.adapter && n.Test.adapter.asyncEnd() | |
}; | |
s.configure("async", function (e, t) { | |
var r = !a.currentRunLoop; | |
n.testing && r && u(), a.backburner.schedule("actions", function () { | |
n.testing && r && l(), e(t) | |
}) | |
}) | |
} else s.configure("async", function (e, t) { | |
a.backburner.schedule("actions", function () { | |
e(t) | |
}) | |
}); | |
s.Promise.prototype.fail = function (e, t) { | |
return this["catch"](e, t) | |
}; | |
var c = i.create({ | |
then: function (e, t, n) { | |
function i(t) { | |
return t === a ? e(s) : e(t) | |
} | |
var o, a, s; | |
return s = this, o = r(this, "_deferred"), a = o.promise, a.then(e && i, t, n) | |
}, | |
resolve: function (e) { | |
var t, n; | |
t = r(this, "_deferred"), n = t.promise, e === this ? t.resolve(n) : t.resolve(e) | |
}, | |
reject: function (e) { | |
r(this, "_deferred").reject(e) | |
}, | |
_deferred: o(function () { | |
return s.defer("Ember: DeferredMixin - " + this) | |
}) | |
}); | |
t.__d = c | |
}), e(65, [3, 4, 5, 6, 31, 13, 12, 19, 22, 32, "exports"], function () { | |
function e() { | |
return 0 === E.length ? {} : E.pop() | |
} | |
function t(e) { | |
return E.push(e), null | |
} | |
function n(e, t) { | |
function n(n) { | |
var i = a(n, e); | |
return r ? t === i : !! i | |
} | |
var r = 2 === arguments.length; | |
return n | |
} | |
var r = arguments, | |
i = r[r.length - 1], | |
o = r[0].__d, | |
a = r[1].get, | |
s = r[2].set, | |
u = r[3].apply, | |
l = r[4].Mixin, | |
c = r[4].required, | |
h = r[4].aliasMethod, | |
d = r[5].__d, | |
f = r[6].computed, | |
p = r[7].propertyWillChange, | |
m = r[7].propertyDidChange, | |
v = r[8].addListener, | |
g = r[8].removeListener, | |
y = r[8].sendEvent, | |
_ = r[8].hasListeners, | |
b = r[9].__d, | |
w = Array.prototype.slice, | |
C = d.indexOf, | |
E = [], | |
O = l.create({ | |
nextObject: c(Function), | |
firstObject: f(function () { | |
if (0 === a(this, "length")) return void 0; | |
var n, r = e(); | |
return n = this.nextObject(0, null, r), t(r), n | |
}).property("[]"), | |
lastObject: f(function () { | |
var n = a(this, "length"); | |
if (0 === n) return void 0; | |
var r, i = e(), | |
o = 0, | |
s = null; | |
do s = r, r = this.nextObject(o++, s, i); while (void 0 !== r); | |
return t(i), s | |
}).property("[]"), | |
contains: function (e) { | |
return void 0 !== this.find(function (t) { | |
return t === e | |
}) | |
}, | |
forEach: function (n, r) { | |
if ("function" != typeof n) throw new TypeError; | |
var i = a(this, "length"), | |
o = null, | |
s = e(); | |
void 0 === r && (r = null); | |
for (var u = 0; i > u; u++) { | |
var l = this.nextObject(u, o, s); | |
n.call(r, l, u, this), o = l | |
} | |
return o = null, s = t(s), this | |
}, | |
getEach: function (e) { | |
return this.mapBy(e) | |
}, | |
setEach: function (e, t) { | |
return this.forEach(function (n) { | |
s(n, e, t) | |
}) | |
}, | |
map: function (e, t) { | |
var n = o.A(); | |
return this.forEach(function (r, i, o) { | |
n[i] = e.call(t, r, i, o) | |
}), n | |
}, | |
mapBy: function (e) { | |
return this.map(function (t) { | |
return a(t, e) | |
}) | |
}, | |
mapProperty: h("mapBy"), | |
filter: function (e, t) { | |
var n = o.A(); | |
return this.forEach(function (r, i, o) { | |
e.call(t, r, i, o) && n.push(r) | |
}), n | |
}, | |
reject: function (e, t) { | |
return this.filter(function () { | |
return !u(t, e, arguments) | |
}) | |
}, | |
filterBy: function () { | |
return this.filter(u(this, n, arguments)) | |
}, | |
filterProperty: h("filterBy"), | |
rejectBy: function (e, t) { | |
var n = function (n) { | |
return a(n, e) === t | |
}, r = function (t) { | |
return !!a(t, e) | |
}, i = 2 === arguments.length ? n : r; | |
return this.reject(i) | |
}, | |
rejectProperty: h("rejectBy"), | |
find: function (n, r) { | |
var i = a(this, "length"); | |
void 0 === r && (r = null); | |
for (var o, s, u = null, l = !1, c = e(), h = 0; i > h && !l; h++) o = this.nextObject(h, u, c), (l = n.call(r, o, h, this)) && (s = o), u = o; | |
return o = u = null, c = t(c), s | |
}, | |
findBy: function () { | |
return this.find(u(this, n, arguments)) | |
}, | |
findProperty: h("findBy"), | |
every: function (e, t) { | |
return !this.find(function (n, r, i) { | |
return !e.call(t, n, r, i) | |
}) | |
}, | |
everyBy: h("isEvery"), | |
everyProperty: h("isEvery"), | |
isEvery: function () { | |
return this.every(u(this, n, arguments)) | |
}, | |
any: function (n, r) { | |
var i, o, s = a(this, "length"), | |
u = e(), | |
l = !1, | |
c = null; | |
for (void 0 === r && (r = null), o = 0; s > o && !l; o++) i = this.nextObject(o, c, u), l = n.call(r, i, o, this), c = i; | |
return i = c = null, u = t(u), l | |
}, | |
some: h("any"), | |
isAny: function () { | |
return this.any(u(this, n, arguments)) | |
}, | |
anyBy: h("isAny"), | |
someProperty: h("isAny"), | |
reduce: function (e, t, n) { | |
if ("function" != typeof e) throw new TypeError; | |
var r = t; | |
return this.forEach(function (t, i) { | |
r = e(r, t, i, this, n) | |
}, this), r | |
}, | |
invoke: function (e) { | |
var t, n = o.A(); | |
return arguments.length > 1 && (t = w.call(arguments, 1)), this.forEach(function (r, i) { | |
var o = r && r[e]; | |
"function" == typeof o && (n[i] = t ? u(r, o, t) : r[e]()) | |
}, this), n | |
}, | |
toArray: function () { | |
var e = o.A(); | |
return this.forEach(function (t, n) { | |
e[n] = t | |
}), e | |
}, | |
compact: function () { | |
return this.filter(function (e) { | |
return null != e | |
}) | |
}, | |
without: function (e) { | |
if (!this.contains(e)) return this; | |
var t = o.A(); | |
return this.forEach(function (n) { | |
n !== e && (t[t.length] = n) | |
}), t | |
}, | |
uniq: function () { | |
var e = o.A(); | |
return this.forEach(function (t) { | |
C(e, t) < 0 && e.push(t) | |
}), e | |
}, | |
"[]": f(function () { | |
return this | |
}), | |
addEnumerableObserver: function (e, t) { | |
var n = t && t.willChange || "enumerableWillChange", | |
r = t && t.didChange || "enumerableDidChange", | |
i = a(this, "hasEnumerableObservers"); | |
return i || p(this, "hasEnumerableObservers"), v(this, "@enumerable:before", e, n), v(this, "@enumerable:change", e, r), i || m(this, "hasEnumerableObservers"), this | |
}, | |
removeEnumerableObserver: function (e, t) { | |
var n = t && t.willChange || "enumerableWillChange", | |
r = t && t.didChange || "enumerableDidChange", | |
i = a(this, "hasEnumerableObservers"); | |
return i && p(this, "hasEnumerableObservers"), g(this, "@enumerable:before", e, n), g(this, "@enumerable:change", e, r), i && m(this, "hasEnumerableObservers"), this | |
}, | |
hasEnumerableObservers: f(function () { | |
return _(this, "@enumerable:change") || _(this, "@enumerable:before") | |
}), | |
enumerableContentWillChange: function (e, t) { | |
var n, r, i; | |
return n = "number" == typeof e ? e : e ? a(e, "length") : e = -1, r = "number" == typeof t ? t : t ? a(t, "length") : t = -1, i = 0 > r || 0 > n || r - n !== 0, -1 === e && (e = null), -1 === t && (t = null), p(this, "[]"), i && p(this, "length"), y(this, "@enumerable:before", [this, e, t]), this | |
}, | |
enumerableContentDidChange: function (e, t) { | |
var n, r, i; | |
return n = "number" == typeof e ? e : e ? a(e, "length") : e = -1, r = "number" == typeof t ? t : t ? a(t, "length") : t = -1, i = 0 > r || 0 > n || r - n !== 0, -1 === e && (e = null), -1 === t && (t = null), y(this, "@enumerable:change", [this, e, t]), i && m(this, "length"), m(this, "[]"), this | |
}, | |
sortBy: function () { | |
var e = arguments; | |
return this.toArray().sort(function (t, n) { | |
for (var r = 0; r < e.length; r++) { | |
var i = e[r], | |
o = a(t, i), | |
s = a(n, i), | |
u = b(o, s); | |
if (u) return u | |
} | |
return 0 | |
}) | |
} | |
}); | |
i.__d = O | |
}), e(72, [31, 22, "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = e[0].Mixin, | |
r = e[1].addListener, | |
i = e[1].removeListener, | |
o = e[1].hasListeners, | |
a = e[1].sendEvent, | |
s = n.create({ | |
on: function (e, t, n) { | |
return r(this, e, t, n), this | |
}, | |
one: function (e, t, n) { | |
return n || (n = t, t = null), r(this, e, t, n, !0), this | |
}, | |
trigger: function (e) { | |
var t, n, r = []; | |
for (t = 1, n = arguments.length; n > t; t++) r.push(arguments[t]); | |
a(this, e, r) | |
}, | |
off: function (e, t, n) { | |
return i(this, e, t, n), this | |
}, | |
has: function (e) { | |
return o(this, e) | |
} | |
}); | |
t.__d = s | |
}), e(66, [31, 4, 5, "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = e[0].Mixin, | |
r = e[1].get, | |
i = e[2].set, | |
o = n.create({ | |
isFrozen: !1, | |
freeze: function () { | |
return r(this, "isFrozen") ? this : (i(this, "isFrozen", !0), this) | |
} | |
}), | |
a = "Frozen object cannot be modified."; | |
t.Freezable = o, t.FROZEN_ERROR = a | |
}), e(70, [4, 5, 31, 17, 6, 37, 69, 65, "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = "Index out of range", | |
r = [], | |
i = e[0].get, | |
o = (e[1].set, e[2].Mixin), | |
a = e[2].required, | |
s = e[3].__d, | |
u = e[4].isArray, | |
l = e[5].__d, | |
c = e[6].__d, | |
h = e[7].__d, | |
d = o.create(l, c, { | |
replace: a(), | |
clear: function () { | |
var e = i(this, "length"); | |
return 0 === e ? this : (this.replace(0, e, r), this) | |
}, | |
insertAt: function (e, t) { | |
if (e > i(this, "length")) throw new s(n); | |
return this.replace(e, 0, [t]), this | |
}, | |
removeAt: function (e, t) { | |
if ("number" == typeof e) { | |
if (0 > e || e >= i(this, "length")) throw new s(n); | |
void 0 === t && (t = 1), this.replace(e, t, r) | |
} | |
return this | |
}, | |
pushObject: function (e) { | |
return this.insertAt(i(this, "length"), e), e | |
}, | |
pushObjects: function (e) { | |
if (!h.detect(e) && !u(e)) throw new TypeError("Must pass Ember.Enumerable to Ember.MutableArray#pushObjects"); | |
return this.replace(i(this, "length"), 0, e), this | |
}, | |
popObject: function () { | |
var e = i(this, "length"); | |
if (0 === e) return null; | |
var t = this.objectAt(e - 1); | |
return this.removeAt(e - 1, 1), t | |
}, | |
shiftObject: function () { | |
if (0 === i(this, "length")) return null; | |
var e = this.objectAt(0); | |
return this.removeAt(0), e | |
}, | |
unshiftObject: function (e) { | |
return this.insertAt(0, e), e | |
}, | |
unshiftObjects: function (e) { | |
return this.replace(0, 0, e), this | |
}, | |
reverseObjects: function () { | |
var e = i(this, "length"); | |
if (0 === e) return this; | |
var t = this.toArray().reverse(); | |
return this.replace(0, e, t), this | |
}, | |
setObjects: function (e) { | |
if (0 === e.length) return this.clear(); | |
var t = i(this, "length"); | |
return this.replace(0, t, e), this | |
}, | |
removeObject: function (e) { | |
for (var t = i(this, "length") || 0; --t >= 0;) { | |
var n = this.objectAt(t); | |
n === e && this.removeAt(t) | |
} | |
return this | |
}, | |
addObject: function (e) { | |
return this.contains(e) || this.pushObject(e), this | |
} | |
}); | |
t.__d = d | |
}), e(69, [13, 65, 31, 19, "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = e[0].__d, | |
r = e[1].__d, | |
i = e[2].Mixin, | |
o = e[2].required, | |
a = e[3].beginPropertyChanges, | |
s = e[3].endPropertyChanges, | |
u = n.forEach, | |
l = i.create(r, { | |
addObject: o(Function), | |
addObjects: function (e) { | |
return a(this), u(e, function (e) { | |
this.addObject(e) | |
}, this), s(this), this | |
}, | |
removeObject: o(Function), | |
removeObjects: function (e) { | |
return a(this), u(e, function (e) { | |
this.removeObject(e) | |
}, this), s(this), this | |
} | |
}); | |
t.__d = l | |
}), e(67, [3, 4, 5, 23, 29, 31, 22, 19, 8, 12, 6, 21, "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = (e[0].__d, e[1].get), | |
r = e[1].getWithDefault, | |
i = e[2].set, | |
o = e[3].__d, | |
a = e[4].__d, | |
s = e[5].Mixin, | |
u = e[6].hasListeners, | |
l = e[7].beginPropertyChanges, | |
c = e[7].propertyWillChange, | |
h = e[7].propertyDidChange, | |
d = e[7].endPropertyChanges, | |
f = e[8].addObserver, | |
p = e[8].addBeforeObserver, | |
m = e[8].removeObserver, | |
v = e[8].observersFor, | |
g = e[9].cacheFor, | |
y = e[10].apply, | |
_ = e[11].isNone, | |
b = Array.prototype.slice, | |
w = s.create({ | |
get: function (e) { | |
return n(this, e) | |
}, | |
getProperties: function () { | |
return y(null, o, [this].concat(b.call(arguments))) | |
}, | |
set: function (e, t) { | |
return i(this, e, t), this | |
}, | |
setProperties: function (e) { | |
return a(this, e) | |
}, | |
beginPropertyChanges: function () { | |
return l(), this | |
}, | |
endPropertyChanges: function () { | |
return d(), this | |
}, | |
propertyWillChange: function (e) { | |
return c(this, e), this | |
}, | |
propertyDidChange: function (e) { | |
return h(this, e), this | |
}, | |
notifyPropertyChange: function (e) { | |
return this.propertyWillChange(e), this.propertyDidChange(e), this | |
}, | |
addBeforeObserver: function (e, t, n) { | |
p(this, e, t, n) | |
}, | |
addObserver: function (e, t, n) { | |
f(this, e, t, n) | |
}, | |
removeObserver: function (e, t, n) { | |
m(this, e, t, n) | |
}, | |
hasObserverFor: function (e) { | |
return u(this, e + ":change") | |
}, | |
getWithDefault: function (e, t) { | |
return r(this, e, t) | |
}, | |
incrementProperty: function (e, t) { | |
return _(t) && (t = 1), i(this, e, (n(this, e) || 0) + t), n(this, e) | |
}, | |
decrementProperty: function (e, t) { | |
return _(t) && (t = 1), i(this, e, (n(this, e) || 0) - t), n(this, e) | |
}, | |
toggleProperty: function (e) { | |
return i(this, e, !n(this, e)), n(this, e) | |
}, | |
cacheFor: function (e) { | |
return g(this, e) | |
}, | |
observersForKey: function (e) { | |
return v(this, e) | |
} | |
}); | |
t.__d = w | |
}), e(73, [4, 5, 12, 31, 17, "exports"], function () { | |
function e(e, t) { | |
return o(e, "isFulfilled", !1), o(e, "isRejected", !1), t.then(function (t) { | |
return o(e, "isFulfilled", !0), o(e, "content", t), t | |
}, function (t) { | |
throw o(e, "isRejected", !0), o(e, "reason", t), t | |
}, "Ember: PromiseProxy") | |
} | |
function t(e) { | |
return function () { | |
var t = i(this, "promise"); | |
return t[e].apply(t, arguments) | |
} | |
} | |
var n = arguments, | |
r = n[n.length - 1], | |
i = n[0].get, | |
o = n[1].set, | |
a = n[2].computed, | |
s = n[3].Mixin, | |
u = n[4].__d, | |
l = a.not, | |
c = a.or, | |
h = s.create({ | |
reason: null, | |
isPending: l("isSettled").readOnly(), | |
isSettled: c("isRejected", "isFulfilled").readOnly(), | |
isRejected: !1, | |
isFulfilled: !1, | |
promise: a(function (t, n) { | |
if (2 === arguments.length) return e(this, n); | |
throw new u("PromiseProxy's promise must be set") | |
}), | |
then: t("then"), | |
"catch": t("catch"), | |
"finally": t("finally") | |
}); | |
r.__d = h | |
}), e(45, [3, 4, 5, 13, 31, 69, 32, 8, 12, "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = e[0].__d, | |
r = e[1].get, | |
i = (e[2].set, e[3].__d), | |
o = e[4].Mixin, | |
a = e[5].__d, | |
s = e[6].__d, | |
u = e[7].addObserver, | |
l = e[7].removeObserver, | |
c = e[8].computed, | |
h = e[4].beforeObserver, | |
d = e[4].observer, | |
f = i.forEach, | |
p = o.create(a, { | |
sortProperties: null, | |
sortAscending: !0, | |
sortFunction: s, | |
orderBy: function (e, t) { | |
var n = 0, | |
i = r(this, "sortProperties"), | |
o = r(this, "sortAscending"), | |
a = r(this, "sortFunction"); | |
return f(i, function (i) { | |
0 === n && (n = a(r(e, i), r(t, i)), 0 === n || o || (n = -1 * n)) | |
}), n | |
}, | |
destroy: function () { | |
var e = r(this, "content"), | |
t = r(this, "sortProperties"); | |
return e && t && f(e, function (e) { | |
f(t, function (t) { | |
l(e, t, this, "contentItemSortPropertyDidChange") | |
}, this) | |
}, this), this._super() | |
}, | |
isSorted: c.bool("sortProperties"), | |
arrangedContent: c("content", "sortProperties.@each", function () { | |
var e = r(this, "content"), | |
t = r(this, "isSorted"), | |
i = r(this, "sortProperties"), | |
o = this; | |
return e && t ? (e = e.slice(), e.sort(function (e, t) { | |
return o.orderBy(e, t) | |
}), f(e, function (e) { | |
f(i, function (t) { | |
u(e, t, this, "contentItemSortPropertyDidChange") | |
}, this) | |
}, this), n.A(e)) : e | |
}), | |
_contentWillChange: h("content", function () { | |
var e = r(this, "content"), | |
t = r(this, "sortProperties"); | |
e && t && f(e, function (e) { | |
f(t, function (t) { | |
l(e, t, this, "contentItemSortPropertyDidChange") | |
}, this) | |
}, this), this._super() | |
}), | |
sortAscendingWillChange: h("sortAscending", function () { | |
this._lastSortAscending = r(this, "sortAscending") | |
}), | |
sortAscendingDidChange: d("sortAscending", function () { | |
if (r(this, "sortAscending") !== this._lastSortAscending) { | |
var e = r(this, "arrangedContent"); | |
e.reverseObjects() | |
} | |
}), | |
contentArrayWillChange: function (e, t, n, i) { | |
var o = r(this, "isSorted"); | |
if (o) { | |
var a = r(this, "arrangedContent"), | |
s = e.slice(t, t + n), | |
u = r(this, "sortProperties"); | |
f(s, function (e) { | |
a.removeObject(e), f(u, function (t) { | |
l(e, t, this, "contentItemSortPropertyDidChange") | |
}, this) | |
}, this) | |
} | |
return this._super(e, t, n, i) | |
}, | |
contentArrayDidChange: function (e, t, n, i) { | |
var o = r(this, "isSorted"), | |
a = r(this, "sortProperties"); | |
if (o) { | |
var s = e.slice(t, t + i); | |
f(s, function (e) { | |
this.insertItemSorted(e), f(a, function (t) { | |
u(e, t, this, "contentItemSortPropertyDidChange") | |
}, this) | |
}, this) | |
} | |
return this._super(e, t, n, i) | |
}, | |
insertItemSorted: function (e) { | |
var t = r(this, "arrangedContent"), | |
n = r(t, "length"), | |
i = this._binarySearch(e, 0, n); | |
t.insertAt(i, e) | |
}, | |
contentItemSortPropertyDidChange: function (e) { | |
var t = r(this, "arrangedContent"), | |
n = t.indexOf(e), | |
i = t.objectAt(n - 1), | |
o = t.objectAt(n + 1), | |
a = i && this.orderBy(e, i), | |
s = o && this.orderBy(e, o); | |
(0 > a || s > 0) && (t.removeObject(e), this.insertItemSorted(e)) | |
}, | |
_binarySearch: function (e, t, n) { | |
var i, o, a, s; | |
return t === n ? t : (s = r(this, "arrangedContent"), i = t + Math.floor((n - t) / 2), o = s.objectAt(i), a = this.orderBy(o, e), 0 > a ? this._binarySearch(e, i + 1, n) : a > 0 ? this._binarySearch(e, t, i) : i) | |
} | |
}); | |
t.__d = p | |
}), e(71, [3, 4, 5, 31, 12, 6, "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = e[0].__d, | |
r = e[1].get, | |
i = (e[2].set, e[3].Mixin), | |
o = e[4].computed, | |
a = e[5].typeOf, | |
s = i.create({ | |
target: null, | |
action: null, | |
actionContext: null, | |
targetObject: o(function () { | |
var e = r(this, "target"); | |
if ("string" === a(e)) { | |
var t = r(this, e); | |
return void 0 === t && (t = r(n.lookup, e)), t | |
} | |
return e | |
}).property("target"), | |
actionContextObject: o(function () { | |
var e = r(this, "actionContext"); | |
if ("string" === a(e)) { | |
var t = r(this, e); | |
return void 0 === t && (t = r(n.lookup, e)), t | |
} | |
return e | |
}).property("actionContext"), | |
triggerAction: function (e) { | |
function t(e, t) { | |
var n = []; | |
return t && n.push(t), n.concat(e) | |
} | |
e = e || {}; | |
var n = e.action || r(this, "action"), | |
i = e.target || r(this, "targetObject"), | |
o = e.actionContext; | |
if ("undefined" == typeof o && (o = r(this, "actionContextObject") || this), i && n) { | |
var a; | |
return a = i.send ? i.send.apply(i, t(o, n)) : i[n].apply(i, t(o)), a !== !1 && (a = !0), a | |
} | |
return !1 | |
} | |
}); | |
t.__d = s | |
}), e(59, [57, "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = e[0].__d, | |
r = n.extend(); | |
t.__d = r | |
}), e(44, [3, 4, 5, 12, 31, 19, 17, 47, 70, 6, 65, 56, "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = e[0].__d, | |
r = e[1].get, | |
i = (e[2].set, e[3].computed), | |
o = e[4].beforeObserver, | |
a = e[4].observer, | |
s = e[5].beginPropertyChanges, | |
u = e[5].endPropertyChanges, | |
l = e[6].__d, | |
c = e[7].__d, | |
h = e[8].__d, | |
d = e[9].isArray, | |
f = e[9].apply, | |
p = e[10].__d, | |
m = (e[11].__d, "Index out of range"), | |
v = [], | |
g = i.alias, | |
y = n.K, | |
_ = c.extend(h, { | |
content: null, | |
arrangedContent: g("content"), | |
objectAtContent: function (e) { | |
return r(this, "arrangedContent").objectAt(e) | |
}, | |
replaceContent: function (e, t, n) { | |
r(this, "content").replace(e, t, n) | |
}, | |
_contentWillChange: o("content", function () { | |
this._teardownContent() | |
}), | |
_teardownContent: function () { | |
var e = r(this, "content"); | |
e && e.removeArrayObserver(this, { | |
willChange: "contentArrayWillChange", | |
didChange: "contentArrayDidChange" | |
}) | |
}, | |
contentArrayWillChange: y, | |
contentArrayDidChange: y, | |
_contentDidChange: a("content", function () { | |
r(this, "content"); | |
this._setupContent() | |
}), | |
_setupContent: function () { | |
var e = r(this, "content"); | |
e && e.addArrayObserver(this, { | |
willChange: "contentArrayWillChange", | |
didChange: "contentArrayDidChange" | |
}) | |
}, | |
_arrangedContentWillChange: o("arrangedContent", function () { | |
var e = r(this, "arrangedContent"), | |
t = e ? r(e, "length") : 0; | |
this.arrangedContentArrayWillChange(this, 0, t, void 0), this.arrangedContentWillChange(this), this._teardownArrangedContent(e) | |
}), | |
_arrangedContentDidChange: a("arrangedContent", function () { | |
var e = r(this, "arrangedContent"), | |
t = e ? r(e, "length") : 0; | |
this._setupArrangedContent(), this.arrangedContentDidChange(this), this.arrangedContentArrayDidChange(this, 0, void 0, t) | |
}), | |
_setupArrangedContent: function () { | |
var e = r(this, "arrangedContent"); | |
e && e.addArrayObserver(this, { | |
willChange: "arrangedContentArrayWillChange", | |
didChange: "arrangedContentArrayDidChange" | |
}) | |
}, | |
_teardownArrangedContent: function () { | |
var e = r(this, "arrangedContent"); | |
e && e.removeArrayObserver(this, { | |
willChange: "arrangedContentArrayWillChange", | |
didChange: "arrangedContentArrayDidChange" | |
}) | |
}, | |
arrangedContentWillChange: y, | |
arrangedContentDidChange: y, | |
objectAt: function (e) { | |
return r(this, "content") && this.objectAtContent(e) | |
}, | |
length: i(function () { | |
var e = r(this, "arrangedContent"); | |
return e ? r(e, "length") : 0 | |
}), | |
_replace: function (e, t, n) { | |
var i = r(this, "content"); | |
return i && this.replaceContent(e, t, n), this | |
}, | |
replace: function () { | |
if (r(this, "arrangedContent") !== r(this, "content")) throw new l("Using replace on an arranged ArrayProxy is not allowed."); | |
f(this, this._replace, arguments) | |
}, | |
_insertAt: function (e, t) { | |
if (e > r(this, "content.length")) throw new l(m); | |
return this._replace(e, 0, [t]), this | |
}, | |
insertAt: function (e, t) { | |
if (r(this, "arrangedContent") === r(this, "content")) return this._insertAt(e, t); | |
throw new l("Using insertAt on an arranged ArrayProxy is not allowed.") | |
}, | |
removeAt: function (e, t) { | |
if ("number" == typeof e) { | |
var n, i = r(this, "content"), | |
o = r(this, "arrangedContent"), | |
a = []; | |
if (0 > e || e >= r(this, "length")) throw new l(m); | |
for (void 0 === t && (t = 1), n = e; e + t > n; n++) a.push(i.indexOf(o.objectAt(n))); | |
for (a.sort(function (e, t) { | |
return t - e | |
}), s(), n = 0; n < a.length; n++) this._replace(a[n], 1, v); | |
u() | |
} | |
return this | |
}, | |
pushObject: function (e) { | |
return this._insertAt(r(this, "content.length"), e), e | |
}, | |
pushObjects: function (e) { | |
if (!p.detect(e) && !d(e)) throw new TypeError("Must pass Ember.Enumerable to Ember.MutableArray#pushObjects"); | |
return this._replace(r(this, "length"), 0, e), this | |
}, | |
setObjects: function (e) { | |
if (0 === e.length) return this.clear(); | |
var t = r(this, "length"); | |
return this._replace(0, t, e), this | |
}, | |
unshiftObject: function (e) { | |
return this._insertAt(0, e), e | |
}, | |
unshiftObjects: function (e) { | |
return this._replace(0, 0, e), this | |
}, | |
slice: function () { | |
var e = this.toArray(); | |
return e.slice.apply(e, arguments) | |
}, | |
arrangedContentArrayWillChange: function (e, t, n, r) { | |
this.arrayContentWillChange(t, n, r) | |
}, | |
arrangedContentArrayDidChange: function (e, t, n, r) { | |
this.arrayContentDidChange(t, n, r) | |
}, | |
init: function () { | |
this._super(), this._setupContent(), this._setupArrangedContent() | |
}, | |
willDestroy: function () { | |
this._teardownArrangedContent(), this._teardownContent() | |
} | |
}); | |
t.__d = _ | |
}), e(58, [5, "exports"], function () { | |
var e = arguments, | |
n = e[e.length - 1], | |
r = e[0].__d, | |
i = t("container")["default"]; | |
i.set = r, n.__d = i | |
}), e(60, [3, 4, 5, 6, 14, 15, 10, 22, 31, 13, 17, 42, 48, 18, 2, 12, 9, "exports"], function () { | |
function e() { | |
var e, t, n = !1, | |
r = function () { | |
n || r.proto(), S(this, l, j), S(this, "__nextSuper", H); | |
var i = c(this), | |
o = i.proto; | |
if (i.proto = this, e) { | |
var s = e; | |
e = null, a(this, this.reopen, s) | |
} | |
if (t) { | |
var u = t; | |
t = null; | |
for (var h = this.concatenatedProperties, f = 0, g = u.length; g > f; f++) { | |
var y = u[f]; | |
if ("object" != typeof y && void 0 !== y) throw new b("Ember.Object.create only accepts objects."); | |
if (y) | |
for (var _ = C(y), w = 0, O = _.length; O > w; w++) { | |
var P = _[w]; | |
if (y.hasOwnProperty(P)) { | |
var x = y[P]; | |
if (v.test(P)) { | |
var A = i.bindings; | |
A ? i.hasOwnProperty("bindings") || (A = i.bindings = T(i.bindings)) : A = i.bindings = {}, A[P] = x | |
} | |
var V = i.descs[P]; | |
if (h && M(h, P) >= 0) { | |
var N = this[P]; | |
x = N ? "function" == typeof N.concat ? N.concat(x) : d(N).concat(x) : d(x) | |
} | |
V ? V.set(this, P, x) : "function" != typeof this.setUnknownProperty || P in this ? D ? E(this, P, null, x) : this[P] = x : this.setUnknownProperty(P, x) | |
} | |
} | |
} | |
} | |
I(this, i), a(this, this.init, arguments), i.proto = o, p(this), m(this, "init") | |
}; | |
return r.toString = g.prototype.toString, r.willReopen = function () { | |
n && (r.PrototypeMixin = g.create(r.PrototypeMixin)), n = !1 | |
}, r._initMixins = function (t) { | |
e = t | |
}, r._initProperties = function (e) { | |
t = e | |
}, r.proto = function () { | |
var e = r.superclass; | |
return e && e.proto(), n || (n = !0, r.PrototypeMixin.applyPartial(r.prototype), f(r.prototype)), this.prototype | |
}, r | |
} | |
function t(e) { | |
return function () { | |
return e | |
} | |
} | |
var n = arguments, | |
r = n[n.length - 1], | |
i = n[0].__d, | |
o = (n[1].get, n[2].set, n[3].guidFor), | |
a = n[3].apply, | |
s = n[4].create, | |
u = n[3].generateGuid, | |
l = n[3].GUID_KEY, | |
c = n[3].meta, | |
h = n[3].META_KEY, | |
d = n[3].makeArray, | |
f = n[5].rewatch, | |
p = n[6].finishChains, | |
m = n[7].sendEvent, | |
v = n[8].IS_BINDING, | |
g = n[8].Mixin, | |
y = n[8].required, | |
_ = n[9].__d, | |
b = n[10].__d, | |
w = n[4].platform, | |
C = n[11].__d, | |
E = (n[12].__d, n[13].defineProperty), | |
O = n[14].Binding, | |
P = n[15].ComputedProperty, | |
x = n[16].__d, | |
A = n[5].destroy, | |
T = s, | |
S = w.defineProperty, | |
V = x.schedule, | |
N = g._apply, | |
I = g.finishPartial, | |
R = g.prototype.reopen, | |
D = i.ENV.MANDATORY_SETTER, | |
M = _.indexOf, | |
k = i.K, | |
H = { | |
configurable: !0, | |
writable: !0, | |
enumerable: !1, | |
value: void 0 | |
}, j = { | |
configurable: !0, | |
writable: !0, | |
enumerable: !1, | |
value: null | |
}, L = e(); | |
L.toString = function () { | |
return "Ember.CoreObject" | |
}, L.PrototypeMixin = g.create({ | |
reopen: function () { | |
return N(this, arguments, !0), this | |
}, | |
init: function () {}, | |
concatenatedProperties: null, | |
isDestroyed: !1, | |
isDestroying: !1, | |
destroy: function () { | |
return this.isDestroying ? void 0 : (this.isDestroying = !0, V("actions", this, this.willDestroy), V("destroy", this, this._scheduledDestroy), this) | |
}, | |
willDestroy: k, | |
_scheduledDestroy: function () { | |
this.isDestroyed || (A(this), this.isDestroyed = !0) | |
}, | |
bind: function (e, t) { | |
return t instanceof O || (t = O.from(t)), t.to(e).connect(this), t | |
}, | |
toString: function () { | |
var e = "function" == typeof this.toStringExtension, | |
n = e ? ":" + this.toStringExtension() : "", | |
r = "<" + this.constructor.toString() + ":" + o(this) + n + ">"; | |
return this.toString = t(r), r | |
} | |
}), L.PrototypeMixin.ownerConstructor = L, i.config.overridePrototypeMixin && i.config.overridePrototypeMixin(L.PrototypeMixin), L.__super__ = null; | |
var B = g.create({ | |
ClassMixin: y(), | |
PrototypeMixin: y(), | |
isClass: !0, | |
isMethod: !1, | |
extend: function () { | |
var t, n = e(); | |
return n.ClassMixin = g.create(this.ClassMixin), n.PrototypeMixin = g.create(this.PrototypeMixin), n.ClassMixin.ownerConstructor = n, n.PrototypeMixin.ownerConstructor = n, R.apply(n.PrototypeMixin, arguments), n.superclass = this, n.__super__ = this.prototype, t = n.prototype = T(this.prototype), t.constructor = n, u(t), c(t).proto = t, n.ClassMixin.apply(n), n | |
}, | |
createWithMixins: function () { | |
var e = this; | |
return arguments.length > 0 && this._initMixins(arguments), new e | |
}, | |
create: function () { | |
var e = this; | |
return arguments.length > 0 && this._initProperties(arguments), new e | |
}, | |
reopen: function () { | |
return this.willReopen(), a(this.PrototypeMixin, R, arguments), this | |
}, | |
reopenClass: function () { | |
return a(this.ClassMixin, R, arguments), N(this, arguments, !1), this | |
}, | |
detect: function (e) { | |
if ("function" != typeof e) return !1; | |
for (; e;) { | |
if (e === this) return !0; | |
e = e.superclass | |
} | |
return !1 | |
}, | |
detectInstance: function (e) { | |
return e instanceof this | |
}, | |
metaForProperty: function (e) { | |
var t = this.proto()[h], | |
n = t && t.descs[e]; | |
return n._meta || {} | |
}, | |
eachComputedProperty: function (e, t) { | |
var n, r = this.proto(), | |
i = c(r).descs, | |
o = {}; | |
for (var a in i) n = i[a], n instanceof P && e.call(t || this, a, n._meta || o) | |
} | |
}); | |
B.ownerConstructor = L, i.config.overrideClassMixin && i.config.overrideClassMixin(B), L.ClassMixin = B, B.apply(L), r.__d = L | |
}), e(63, [68, 4, 47, "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = e[0].__d, | |
r = (e[1].get, e[2].__d), | |
i = r.extend(n); | |
i.reopenClass({ | |
promise: function (e, t) { | |
var n = i.create(); | |
return e.call(t, n), n | |
} | |
}), t.__d = i | |
}), e(61, [3, 4, 5, 6, 13, 1, 37, 47, 12, 8, 22, 18, 19, "exports"], function () { | |
function e(e, t, n, r, i) { | |
var a, s = n._objects; | |
for (s || (s = n._objects = {}); --i >= r;) { | |
var u = e.objectAt(i); | |
u && (d(u, t, n, "contentKeyWillChange"), h(u, t, n, "contentKeyDidChange"), a = o(u), s[a] || (s[a] = []), s[a].push(i)) | |
} | |
} | |
function t(e, t, n, r, i) { | |
var a = n._objects; | |
a || (a = n._objects = {}); | |
for (var u, l; --i >= r;) { | |
var c = e.objectAt(i); | |
c && (f(c, t, n, "contentKeyWillChange"), p(c, t, n, "contentKeyDidChange"), l = o(c), u = a[l], u[s.call(u, i)] = null) | |
} | |
} | |
var n = arguments, | |
r = n[n.length - 1], | |
i = (n[0].__d, n[1].get), | |
o = (n[2].set, n[3].guidFor), | |
a = n[4].__d, | |
s = n[5].indexOf, | |
u = n[6].__d, | |
l = n[7].__d, | |
c = n[8].computed, | |
h = n[9].addObserver, | |
d = n[9].addBeforeObserver, | |
f = n[9].removeBeforeObserver, | |
p = n[9].removeObserver, | |
m = (n[3].typeOf, n[10].watchedEvents), | |
v = n[11].defineProperty, | |
g = n[12].beginPropertyChanges, | |
y = n[12].propertyDidChange, | |
_ = n[12].propertyWillChange, | |
b = n[12].endPropertyChanges, | |
w = n[12].changeProperties, | |
C = a.forEach, | |
E = l.extend(u, { | |
init: function (e, t, n) { | |
this._super(), this._keyName = t, this._owner = n, this._content = e | |
}, | |
objectAt: function (e) { | |
var t = this._content.objectAt(e); | |
return t && i(t, this._keyName) | |
}, | |
length: c(function () { | |
var e = this._content; | |
return e ? i(e, "length") : 0 | |
}) | |
}), | |
O = /^.+:(before|change)$/, | |
P = l.extend({ | |
init: function (e) { | |
this._super(), this._content = e, e.addArrayObserver(this), C(m(this), function (e) { | |
this.didAddListener(e) | |
}, this) | |
}, | |
unknownProperty: function (e) { | |
var t; | |
return t = new E(this._content, e, this), v(this, e, null, t), this.beginObservingContentKey(e), t | |
}, | |
arrayWillChange: function (e, n, r) { | |
var i, o, a = this._keys; | |
o = r > 0 ? n + r : -1, g(this); | |
for (i in a) a.hasOwnProperty(i) && (o > 0 && t(e, i, this, n, o), _(this, i)); | |
_(this._content, "@each"), b(this) | |
}, | |
arrayDidChange: function (t, n, r, i) { | |
var o, a = this._keys; | |
o = i > 0 ? n + i : -1, w(function () { | |
for (var r in a) a.hasOwnProperty(r) && (o > 0 && e(t, r, this, n, o), y(this, r)); | |
y(this._content, "@each") | |
}, this) | |
}, | |
didAddListener: function (e) { | |
O.test(e) && this.beginObservingContentKey(e.slice(0, -7)) | |
}, | |
didRemoveListener: function (e) { | |
O.test(e) && this.stopObservingContentKey(e.slice(0, -7)) | |
}, | |
beginObservingContentKey: function (t) { | |
var n = this._keys; | |
if (n || (n = this._keys = {}), n[t]) n[t]++; | |
else { | |
n[t] = 1; | |
var r = this._content, | |
o = i(r, "length"); | |
e(r, t, this, 0, o) | |
} | |
}, | |
stopObservingContentKey: function (e) { | |
var n = this._keys; | |
if (n && n[e] > 0 && --n[e] <= 0) { | |
var r = this._content, | |
o = i(r, "length"); | |
t(r, e, this, 0, o) | |
} | |
}, | |
contentKeyWillChange: function (e, t) { | |
_(this, t) | |
}, | |
contentKeyDidChange: function (e, t) { | |
y(this, t) | |
} | |
}); | |
r.EachArray = E, r.EachProxy = P | |
}), e(64, [3, 1, "exports"], function () { | |
function e(e, t) { | |
var n; | |
a[e] = a[e] || i.A(), a[e].pushObject(t), (n = s[e]) && t(n) | |
} | |
function t(e, t) { | |
s[e] = t, a[e] && o.call(a[e], function (e) { | |
e(t) | |
}) | |
} | |
var n = arguments, | |
r = n[n.length - 1], | |
i = n[0].__d, | |
o = n[1].forEach, | |
a = i.ENV.EMBER_LOAD_HOOKS || {}, s = {}; | |
r.onLoad = e, r.runLoadHooks = t | |
}), e(57, [3, 4, 1, 6, 31, 47, "exports"], function () { | |
function e(t, n, i) { | |
var a = t.length; | |
v[t.join(".")] = n; | |
for (var s in n) | |
if (g.call(n, s)) { | |
var u = n[s]; | |
if (t[a] = s, u && u.toString === r) u.toString = o(t.join(".")), u[y] = t.join("."); | |
else if (u && u.isNamespace) { | |
if (i[d(u)]) continue; | |
i[d(u)] = !0, e(t, u, i) | |
} | |
} | |
t.length = a | |
} | |
function t() { | |
var e, t, n = u.lookup; | |
if (!m.PROCESSED) | |
for (var r in n) | |
if ("parent" !== r && "top" !== r && "frameElement" !== r && "webkitStorageInfo" !== r && !("globalStorage" === r && n.StorageList && n.globalStorage instanceof n.StorageList || n.hasOwnProperty && !n.hasOwnProperty(r))) { | |
try { | |
e = u.lookup[r], t = e && e.isNamespace | |
} catch (i) { | |
continue | |
} | |
t && (e[y] = r) | |
} | |
} | |
function n(e) { | |
var t = e.superclass; | |
return t ? t[y] ? t[y] : n(t) : void 0 | |
} | |
function r() { | |
u.BOOTED || this[y] || i(); | |
var e; | |
if (this[y]) e = this[y]; | |
else if (this._toString) e = this._toString; | |
else { | |
var t = n(this); | |
e = t ? "(subclass of " + t + ")" : "(unknown mixin)", this.toString = o(e) | |
} | |
return e | |
} | |
function i() { | |
var n = !m.PROCESSED, | |
r = u.anyUnprocessedMixins; | |
if (n && (t(), m.PROCESSED = !0), n || r) { | |
for (var i, o = m.NAMESPACES, a = 0, s = o.length; s > a; a++) i = o[a], e([i.toString()], i, {}); | |
u.anyUnprocessedMixins = !1 | |
} | |
} | |
function o(e) { | |
return function () { | |
return e | |
} | |
} | |
var a = arguments, | |
s = a[a.length - 1], | |
u = a[0].__d, | |
l = a[1].get, | |
c = a[2].indexOf, | |
h = a[3].GUID_KEY, | |
d = a[3].guidFor, | |
f = a[4].Mixin, | |
p = a[5].__d, | |
m = p.extend({ | |
isNamespace: !0, | |
init: function () { | |
m.NAMESPACES.push(this), m.PROCESSED = !1 | |
}, | |
toString: function () { | |
var e = l(this, "name"); | |
return e ? e : (t(), this[h + "_name"]) | |
}, | |
nameClasses: function () { | |
e([this.toString()], this, {}) | |
}, | |
destroy: function () { | |
var e = m.NAMESPACES, | |
t = this.toString(); | |
t && (u.lookup[t] = void 0, delete m.NAMESPACES_BY_ID[t]), e.splice(c.call(e, this), 1), this._super() | |
} | |
}); | |
m.reopenClass({ | |
NAMESPACES: [u], | |
NAMESPACES_BY_ID: {}, | |
PROCESSED: !1, | |
processAll: i, | |
byName: function (e) { | |
return u.BOOTED || i(), v[e] | |
} | |
}); | |
var v = m.NAMESPACES_BY_ID, | |
g = {}.hasOwnProperty, | |
y = u.NAME_KEY = h + "_name"; | |
f.prototype.toString = r, s.__d = m | |
}), e(62, [3, 4, 5, 13, 31, 37, 70, 67, 51, 66, 50, "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = e[0].__d, | |
r = e[1].get, | |
i = (e[2].set, e[3].__d), | |
o = e[4].Mixin, | |
a = e[5].__d, | |
s = e[6].__d, | |
u = e[7].__d, | |
l = e[8].__d, | |
c = e[9].FROZEN_ERROR, | |
h = e[10].__d, | |
d = i._replace, | |
f = i.forEach, | |
p = o.create(s, u, l, { | |
get: function (e) { | |
return "length" === e ? this.length : "number" == typeof e ? this[e] : this._super(e) | |
}, | |
objectAt: function (e) { | |
return this[e] | |
}, | |
replace: function (e, t, n) { | |
if (this.isFrozen) throw c; | |
var i = n ? r(n, "length") : 0; | |
return this.arrayContentWillChange(e, t, i), 0 === i ? this.splice(e, t) : d(this, e, t, n), this.arrayContentDidChange(e, t, i), this | |
}, | |
unknownProperty: function (e, t) { | |
var n; | |
return void 0 !== t && void 0 === n && (n = this[e] = t), n | |
}, | |
indexOf: function (e, t) { | |
var n, r = this.length; | |
for (t = void 0 === t ? 0 : 0 > t ? Math.ceil(t) : Math.floor(t), 0 > t && (t += r), n = t; r > n; n++) | |
if (this[n] === e) return n; | |
return -1 | |
}, | |
lastIndexOf: function (e, t) { | |
var n, r = this.length; | |
for (t = void 0 === t ? r - 1 : 0 > t ? Math.ceil(t) : Math.floor(t), 0 > t && (t += r), n = t; n >= 0; n--) | |
if (this[n] === e) return n; | |
return -1 | |
}, | |
copy: function (e) { | |
return e ? this.map(function (e) { | |
return h(e, !0) | |
}) : this.slice() | |
} | |
}), | |
m = ["length"]; | |
f(p.keys(), function (e) { | |
Array.prototype[e] && m.push(e) | |
}), m.length > 0 && (p = p.without.apply(p, m)); | |
var v = function (e) { | |
return void 0 === e && (e = []), a.detect(e) ? e : p.apply(e) | |
}; | |
p.activate = function () { | |
p.apply(Array.prototype), v = function (e) { | |
return e || [] | |
} | |
}, (n.EXTEND_PROTOTYPES === !0 || n.EXTEND_PROTOTYPES.Array) && p.activate(), n.A = v, t.A = v, t.NativeArray = p, t.__d = p | |
}), e(47, [60, 67, "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = e[0].__d, | |
r = e[1].__d, | |
i = n.extend(r); | |
i.toString = function () { | |
return "Ember.Object" | |
}, t.__d = i | |
}), e(40, [3, 4, 5, 8, 19, 12, 18, 31, 6, 56, 47, "exports"], function () { | |
function e(e, t) { | |
var n = t.slice(8); | |
n in this || c(this, n) | |
} | |
function t(e, t) { | |
var n = t.slice(8); | |
n in this || h(this, n) | |
} | |
var n = arguments, | |
r = n[n.length - 1], | |
i = (n[0].__d, n[1].get), | |
o = n[2].set, | |
a = n[3].addObserver, | |
s = n[3].removeObserver, | |
u = n[3].addBeforeObserver, | |
l = n[3].removeBeforeObserver, | |
c = n[4].propertyWillChange, | |
h = n[4].propertyDidChange, | |
d = n[5].computed, | |
f = n[6].defineProperty, | |
p = n[7].observer, | |
m = n[8].meta, | |
v = (n[9].__d, n[10].__d), | |
g = v.extend({ | |
content: null, | |
_contentDidChange: p("content", function () {}), | |
isTruthy: d.bool("content"), | |
_debugContainerKey: null, | |
willWatchProperty: function (n) { | |
var r = "content." + n; | |
u(this, r, null, e), a(this, r, null, t) | |
}, | |
didUnwatchProperty: function (n) { | |
var r = "content." + n; | |
l(this, r, null, e), s(this, r, null, t) | |
}, | |
unknownProperty: function (e) { | |
var t = i(this, "content"); | |
return t ? i(t, e) : void 0 | |
}, | |
setUnknownProperty: function (e, t) { | |
var n = m(this); | |
if (n.proto === this) return f(this, e, null, t), t; | |
var r = i(this, "content"); | |
return o(r, e, t) | |
} | |
}); | |
r.__d = g | |
}), e(38, [3, 4, 5, 21, 6, 56, 60, 69, 65, 51, 66, 17, 19, 31, 12, "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = (e[0].__d, e[1].get), | |
r = e[2].set, | |
i = e[3].isNone, | |
o = e[4].guidFor, | |
a = e[5].__d, | |
s = e[6].__d, | |
u = e[7].__d, | |
l = e[8].__d, | |
c = e[9].__d, | |
h = e[10].Freezable, | |
d = e[10].FROZEN_ERROR, | |
f = e[11].__d, | |
p = e[12].propertyWillChange, | |
m = e[12].propertyDidChange, | |
v = e[13].aliasMethod, | |
g = e[14].computed, | |
y = s.extend(u, c, h, { | |
length: 0, | |
clear: function () { | |
if (this.isFrozen) throw new f(d); | |
var e = n(this, "length"); | |
if (0 === e) return this; | |
var t; | |
this.enumerableContentWillChange(e, 0), p(this, "firstObject"), p(this, "lastObject"); | |
for (var i = 0; e > i; i++) t = o(this[i]), delete this[t], delete this[i]; | |
return r(this, "length", 0), m(this, "firstObject"), m(this, "lastObject"), this.enumerableContentDidChange(e, 0), this | |
}, | |
isEqual: function (e) { | |
if (!l.detect(e)) return !1; | |
var t = n(this, "length"); | |
if (n(e, "length") !== t) return !1; | |
for (; --t >= 0;) | |
if (!e.contains(this[t])) return !1; | |
return !0 | |
}, | |
add: v("addObject"), | |
remove: v("removeObject"), | |
pop: function () { | |
if (n(this, "isFrozen")) throw new f(d); | |
var e = this.length > 0 ? this[this.length - 1] : null; | |
return this.remove(e), e | |
}, | |
push: v("addObject"), | |
shift: v("pop"), | |
unshift: v("push"), | |
addEach: v("addObjects"), | |
removeEach: v("removeObjects"), | |
init: function (e) { | |
this._super(), e && this.addObjects(e) | |
}, | |
nextObject: function (e) { | |
return this[e] | |
}, | |
firstObject: g(function () { | |
return this.length > 0 ? this[0] : void 0 | |
}), | |
lastObject: g(function () { | |
return this.length > 0 ? this[this.length - 1] : void 0 | |
}), | |
addObject: function (e) { | |
if (n(this, "isFrozen")) throw new f(d); | |
if (i(e)) return this; | |
var t, a = o(e), | |
s = this[a], | |
u = n(this, "length"); | |
return s >= 0 && u > s && this[s] === e ? this : (t = [e], this.enumerableContentWillChange(null, t), p(this, "lastObject"), u = n(this, "length"), this[a] = u, this[u] = e, r(this, "length", u + 1), m(this, "lastObject"), this.enumerableContentDidChange(null, t), this) | |
}, | |
removeObject: function (e) { | |
if (n(this, "isFrozen")) throw new f(d); | |
if (i(e)) return this; | |
var t, a, s = o(e), | |
u = this[s], | |
l = n(this, "length"), | |
c = 0 === u, | |
h = u === l - 1; | |
return u >= 0 && l > u && this[u] === e && (a = [e], this.enumerableContentWillChange(a, null), c && p(this, "firstObject"), h && p(this, "lastObject"), l - 1 > u && (t = this[l - 1], this[u] = t, this[o(t)] = u), delete this[s], delete this[l - 1], r(this, "length", l - 1), c && m(this, "firstObject"), h && m(this, "lastObject"), this.enumerableContentDidChange(a, null)), this | |
}, | |
contains: function (e) { | |
return this[o(e)] >= 0 | |
}, | |
copy: function () { | |
var e = this.constructor, | |
t = new e, | |
i = n(this, "length"); | |
for (r(t, "length", i); --i >= 0;) t[i] = this[i], t[o(this[i])] = i; | |
return t | |
}, | |
toString: function () { | |
var e, t = this.length, | |
n = []; | |
for (e = 0; t > e; e++) n[e] = this[e]; | |
return a.fmt("Ember.Set<%@>", [n.join(",")]) | |
} | |
}); | |
t.__d = y | |
}), e(56, [3, 6, "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = e[0].__d, | |
r = e[1].inspect, | |
i = /[ _]/g, | |
o = {}, a = /([a-z\d])([A-Z])/g, | |
s = /(\-|_|\.|\s)+(.)?/g, | |
u = /([a-z\d])([A-Z]+)/g, | |
l = /\-|\s+/g; | |
n.STRINGS = {}; | |
var c = { | |
fmt: function (e, t) { | |
var n = 0; | |
return e.replace(/%@([0-9]+)?/g, function (e, i) { | |
return i = i ? parseInt(i, 10) - 1 : n++, e = t[i], null === e ? "(null)" : void 0 === e ? "" : r(e) | |
}) | |
}, | |
loc: function (e, t) { | |
return e = n.STRINGS[e] || e, c.fmt(e, t) | |
}, | |
w: function (e) { | |
return e.split(/\s+/) | |
}, | |
decamelize: function (e) { | |
return e.replace(a, "$1_$2").toLowerCase() | |
}, | |
dasherize: function (e) { | |
var t, n = o, | |
r = n.hasOwnProperty(e); | |
return r ? n[e] : (t = c.decamelize(e).replace(i, "-"), n[e] = t, t) | |
}, | |
camelize: function (e) { | |
return e.replace(s, function (e, t, n) { | |
return n ? n.toUpperCase() : "" | |
}).replace(/^([A-Z])/, function (e) { | |
return e.toLowerCase() | |
}) | |
}, | |
classify: function (e) { | |
for (var t = e.split("."), n = [], r = 0, i = t.length; i > r; r++) { | |
var o = c.camelize(t[r]); | |
n.push(o.charAt(0).toUpperCase() + o.substr(1)) | |
} | |
return n.join(".") | |
}, | |
underscore: function (e) { | |
return e.replace(u, "$1_$2").replace(l, "_").toLowerCase() | |
}, | |
capitalize: function (e) { | |
return e.charAt(0).toUpperCase() + e.substr(1) | |
} | |
}; | |
t.__d = c | |
}), e(41, [4, 17, 13, "exports"], function () { | |
function e(e, t) { | |
this.type = e, this.count = t | |
} | |
function t(t) { | |
arguments.length < 1 && (t = 0), this._operations = t > 0 ? [new e(o, t)] : [] | |
} | |
var n = arguments, | |
r = n[n.length - 1], | |
i = (n[0].get, n[1].__d), | |
o = (n[2].__d, "r"), | |
a = "f"; | |
t.prototype = { | |
addItem: function (t, n) { | |
var r = -1, | |
i = n ? o : a, | |
s = this; | |
return this._findOperation(t, function (a, u, l, c, h) { | |
var d, f; | |
i === a.type ? ++a.count : t === l ? s._operations.splice(u, 0, new e(i, 1)) : (d = new e(i, 1), f = new e(a.type, c - t + 1), a.count = t - l, s._operations.splice(u + 1, 0, d, f)), n && (r = a.type === o ? h + (t - l) : h), s._composeAt(u) | |
}, function (t) { | |
s._operations.push(new e(i, 1)), n && (r = t), s._composeAt(s._operations.length - 1) | |
}), r | |
}, | |
removeItem: function (e) { | |
var t = -1, | |
n = this; | |
return this._findOperation(e, function (r, i, a, s, u) { | |
r.type === o && (t = u + (e - a)), r.count > 1 ? --r.count : (n._operations.splice(i, 1), n._composeAt(i)) | |
}, function () { | |
throw new i("Can't remove an item that has never been added.") | |
}), t | |
}, | |
_findOperation: function (e, t, n) { | |
var r, i, a, s, u, l = 0; | |
for (r = s = 0, i = this._operations.length; i > r; s = u + 1, ++r) { | |
if (a = this._operations[r], u = s + a.count - 1, e >= s && u >= e) return t(a, r, s, u, l), void 0; | |
a.type === o && (l += a.count) | |
} | |
n(l) | |
}, | |
_composeAt: function (e) { | |
var t, n = this._operations[e]; | |
n && (e > 0 && (t = this._operations[e - 1], t.type === n.type && (n.count += t.count, this._operations.splice(e - 1, 1), --e)), e < this._operations.length - 1 && (t = this._operations[e + 1], t.type === n.type && (n.count += t.count, this._operations.splice(e + 1, 1)))) | |
}, | |
toString: function () { | |
var e = ""; | |
return forEach(this._operations, function (t) { | |
e += " " + t.type + ":" + t.count | |
}), e.substring(1) | |
} | |
}, r.__d = t | |
}), e(36, [4, 13, "exports"], function () { | |
function e(e) { | |
arguments.length < 1 && (e = []); | |
var n = o(e, "length"); | |
this._operations = n ? [new t(u, n, e)] : [] | |
} | |
function t(e, t, n) { | |
this.type = e, this.count = t, this.items = n | |
} | |
function n(e, t, n, r) { | |
this.operation = e, this.index = t, this.split = n, this.rangeStart = r | |
} | |
var r = arguments, | |
i = r[r.length - 1], | |
o = r[0].get, | |
a = r[1].__d, | |
s = a.forEach, | |
u = "r", | |
l = "i", | |
c = "d"; | |
e.RETAIN = u, e.INSERT = l, e.DELETE = c, e.prototype = { | |
addItems: function (e, n) { | |
var r = o(n, "length"); | |
if (!(1 > r)) { | |
var i, a, s = this._findArrayOperation(e), | |
u = s.operation, | |
c = s.index, | |
h = s.rangeStart; | |
a = new t(l, r, n), u ? s.split ? (this._split(c, e - h, a), i = c + 1) : (this._operations.splice(c, 0, a), i = c) : (this._operations.push(a), i = c), this._composeInsert(i) | |
} | |
}, | |
removeItems: function (e, n) { | |
if (!(1 > n)) { | |
var r, i, o = this._findArrayOperation(e), | |
a = (o.operation, o.index), | |
s = o.rangeStart; | |
return r = new t(c, n), o.split ? (this._split(a, e - s, r), i = a + 1) : (this._operations.splice(a, 0, r), i = a), this._composeDelete(i) | |
} | |
}, | |
apply: function (e) { | |
var n = [], | |
r = 0; | |
s(this._operations, function (t) { | |
e(t.items, r, t.type), t.type !== c && (r += t.count, n = n.concat(t.items)) | |
}), this._operations = [new t(u, n.length, n)] | |
}, | |
_findArrayOperation: function (e) { | |
var t, r, i, o, a, s = !1; | |
for (t = o = 0, r = this._operations.length; r > t; ++t) | |
if (i = this._operations[t], i.type !== c) { | |
if (a = o + i.count - 1, e === o) break; | |
if (e > o && a >= e) { | |
s = !0; | |
break | |
} | |
o = a + 1 | |
} | |
return new n(i, t, s, o) | |
}, | |
_split: function (e, n, r) { | |
var i = this._operations[e], | |
o = i.items.slice(n), | |
a = new t(i.type, o.length, o); | |
i.count = n, i.items = i.items.slice(0, n), this._operations.splice(e + 1, 0, r, a) | |
}, | |
_composeInsert: function (e) { | |
var t = this._operations[e], | |
n = this._operations[e - 1], | |
r = this._operations[e + 1], | |
i = n && n.type, | |
o = r && r.type; | |
i === l ? (n.count += t.count, n.items = n.items.concat(t.items), o === l ? (n.count += r.count, n.items = n.items.concat(r.items), this._operations.splice(e, 2)) : this._operations.splice(e, 1)) : o === l && (t.count += r.count, t.items = t.items.concat(r.items), this._operations.splice(e + 1, 1)) | |
}, | |
_composeDelete: function (e) { | |
var t, n, r, i = this._operations[e], | |
o = i.count, | |
a = this._operations[e - 1], | |
s = a && a.type, | |
u = !1, | |
h = []; | |
s === c && (i = a, e -= 1); | |
for (var d = e + 1; o > 0; ++d) t = this._operations[d], n = t.type, r = t.count, n !== c ? (r > o ? (h = h.concat(t.items.splice(0, o)), t.count -= o, d -= 1, r = o, o = 0) : (r === o && (u = !0), h = h.concat(t.items), o -= r), n === l && (i.count -= r)) : i.count += r; | |
return i.count > 0 ? this._operations.splice(e + 1, d - 1 - e) : this._operations.splice(e, u ? 2 : 1), h | |
}, | |
toString: function () { | |
var e = ""; | |
return s(this._operations, function (t) { | |
e += " " + t.type + ":" + t.count | |
}), e.substring(1) | |
} | |
}, i.__d = e | |
}) | |
}(), | |
function () { | |
t("ember-runtime"); | |
var e = this && this.jQuery || i.imports && i.imports.jQuery; | |
e || "function" != typeof n || (e = n("jquery")), i.$ = e | |
}(), | |
function () { | |
if (i.$) { | |
var e = i.String.w("dragstart drag dragenter dragleave dragover drop dragend"); | |
i.EnumerableUtils.forEach(e, function (e) { | |
i.$.event.fixHooks[e] = { | |
props: ["dataTransfer"] | |
} | |
}) | |
} | |
}(), | |
function () { | |
function e(e) { | |
var t = e.shiftKey || e.metaKey || e.altKey || e.ctrlKey, | |
n = e.which > 1; | |
return !t && !n | |
} | |
var t = "undefined" != typeof document && function () { | |
var e = document.createElement("div"); | |
return e.innerHTML = "<div></div>", e.firstChild.innerHTML = "<script></script>", "" === e.firstChild.innerHTML | |
}(), | |
n = "undefined" != typeof document && function () { | |
var e = document.createElement("div"); | |
return e.innerHTML = "Test: <script type='text/x-placeholder'></script>Value", "Test:" === e.childNodes[0].nodeValue && " Value" === e.childNodes[2].nodeValue | |
}(), | |
r = function (e, t) { | |
if (e.getAttribute("id") === t) return e; | |
var n, i, o, a = e.childNodes.length; | |
for (n = 0; a > n; n++) | |
if (i = e.childNodes[n], o = 1 === i.nodeType && r(i, t)) return o | |
}, o = function (e, i) { | |
t && (i = "­" + i); | |
var o = []; | |
if (n && (i = i.replace(/(\s+)(<script id='([^']+)')/g, function (e, t, n, r) { | |
return o.push([r, t]), n | |
})), e.innerHTML = i, o.length > 0) { | |
var a, s = o.length; | |
for (a = 0; s > a; a++) { | |
var u = r(e, o[a][0]), | |
l = document.createTextNode(o[a][1]); | |
u.parentNode.insertBefore(l, u) | |
} | |
} | |
if (t) { | |
for (var c = e.firstChild; 1 === c.nodeType && !c.nodeName;) c = c.firstChild; | |
3 === c.nodeType && "" === c.nodeValue.charAt(0) && (c.nodeValue = c.nodeValue.slice(1)) | |
} | |
}, a = {}, s = function (e) { | |
if (void 0 !== a[e]) return a[e]; | |
var t = !0; | |
if ("select" === e.toLowerCase()) { | |
var n = document.createElement("select"); | |
o(n, '<option value="test">Test</option>'), t = 1 === n.options.length | |
} | |
return a[e] = t, t | |
}, u = function (e, t) { | |
var n = e.tagName; | |
if (s(n)) o(e, t); | |
else { | |
var r = e.outerHTML || (new XMLSerializer).serializeToString(e), | |
i = r.match(new RegExp("<" + n + "([^>]*)>", "i"))[0], | |
a = "</" + n + ">", | |
u = document.createElement("div"); | |
for (o(u, i + t + a), e = u.firstChild; e.tagName !== n;) e = e.nextSibling | |
} | |
return e | |
}; | |
i.ViewUtils = { | |
setInnerHTML: u, | |
isSimpleClick: e | |
} | |
}(), | |
function () { | |
function e(e) { | |
return e ? r.test(e) ? e.replace(o, "") : e : e | |
} | |
function t(e) { | |
var t = { | |
"<": "<", | |
">": ">", | |
'"': """, | |
"'": "'", | |
"`": "`" | |
}, n = function (e) { | |
return t[e] || "&" | |
}, r = e.toString(); | |
return s.test(r) ? r.replace(a, n) : r | |
} | |
var n = (i.get, i.set, function () { | |
this.seen = {}, this.list = [] | |
}); | |
n.prototype = { | |
add: function (e) { | |
e in this.seen || (this.seen[e] = !0, this.list.push(e)) | |
}, | |
toDOM: function () { | |
return this.list.join(" ") | |
} | |
}; | |
var r = /[^a-zA-Z0-9\-]/, | |
o = /[^a-zA-Z0-9\-]/g, | |
a = /&(?!\w+;)|[<>"'`]/g, | |
s = /[&<>"'`]/, | |
u = function () { | |
var e = document.createElement("div"), | |
t = document.createElement("input"); | |
return t.setAttribute("name", "foo"), e.appendChild(t), !! e.innerHTML.match("foo") | |
}(); | |
i.RenderBuffer = function (e) { | |
return new i._RenderBuffer(e) | |
}, i._RenderBuffer = function (e) { | |
this.tagNames = [e || null], this.buffer = "" | |
}, i._RenderBuffer.prototype = { | |
_element: null, | |
_hasElement: !0, | |
elementClasses: null, | |
classes: null, | |
elementId: null, | |
elementAttributes: null, | |
elementProperties: null, | |
elementTag: null, | |
elementStyle: null, | |
parentBuffer: null, | |
push: function (e) { | |
return this.buffer += e, this | |
}, | |
addClass: function (e) { | |
return this.elementClasses = this.elementClasses || new n, this.elementClasses.add(e), this.classes = this.elementClasses.list, this | |
}, | |
setClasses: function (e) { | |
this.elementClasses = null; | |
var t, n = e.length; | |
for (t = 0; n > t; t++) this.addClass(e[t]) | |
}, | |
id: function (e) { | |
return this.elementId = e, this | |
}, | |
attr: function (e, t) { | |
var n = this.elementAttributes = this.elementAttributes || {}; | |
return 1 === arguments.length ? n[e] : (n[e] = t, this) | |
}, | |
removeAttr: function (e) { | |
var t = this.elementAttributes; | |
return t && delete t[e], this | |
}, | |
prop: function (e, t) { | |
var n = this.elementProperties = this.elementProperties || {}; | |
return 1 === arguments.length ? n[e] : (n[e] = t, this) | |
}, | |
removeProp: function (e) { | |
var t = this.elementProperties; | |
return t && delete t[e], this | |
}, | |
style: function (e, t) { | |
return this.elementStyle = this.elementStyle || {}, this.elementStyle[e] = t, this | |
}, | |
begin: function (e) { | |
return this.tagNames.push(e || null), this | |
}, | |
pushOpeningTag: function () { | |
var n = this.currentTagName(); | |
if (n) { | |
if (this._hasElement && !this._element && 0 === this.buffer.length) return this._element = this.generateElement(), void 0; | |
var r, i, o = this.buffer, | |
a = this.elementId, | |
s = this.classes, | |
u = this.elementAttributes, | |
l = this.elementProperties, | |
c = this.elementStyle; | |
if (o += "<" + e(n), a && (o += ' id="' + t(a) + '"', this.elementId = null), s && (o += ' class="' + t(s.join(" ")) + '"', this.classes = null, this.elementClasses = null), c) { | |
o += ' style="'; | |
for (i in c) c.hasOwnProperty(i) && (o += i + ":" + t(c[i]) + ";"); | |
o += '"', this.elementStyle = null | |
} | |
if (u) { | |
for (r in u) u.hasOwnProperty(r) && (o += " " + r + '="' + t(u[r]) + '"'); | |
this.elementAttributes = null | |
} | |
if (l) { | |
for (i in l) | |
if (l.hasOwnProperty(i)) { | |
var h = l[i]; | |
(h || "number" == typeof h) && (o += h === !0 ? " " + i + '="' + i + '"' : " " + i + '="' + t(l[i]) + '"') | |
} | |
this.elementProperties = null | |
} | |
o += ">", this.buffer = o | |
} | |
}, | |
pushClosingTag: function () { | |
var t = this.tagNames.pop(); | |
t && (this.buffer += "</" + e(t) + ">") | |
}, | |
currentTagName: function () { | |
return this.tagNames[this.tagNames.length - 1] | |
}, | |
generateElement: function () { | |
var n, r, o, a = this.tagNames.pop(), | |
s = this.elementId, | |
l = this.classes, | |
c = this.elementAttributes, | |
h = this.elementProperties, | |
d = this.elementStyle, | |
f = ""; | |
o = c && c.name && !u ? "<" + e(a) + ' name="' + t(c.name) + '">' : a; | |
var p = document.createElement(o), | |
m = i.$(p); | |
if (s && (m.attr("id", s), this.elementId = null), l && (m.attr("class", l.join(" ")), this.classes = null, this.elementClasses = null), d) { | |
for (r in d) d.hasOwnProperty(r) && (f += r + ":" + d[r] + ";"); | |
m.attr("style", f), this.elementStyle = null | |
} | |
if (c) { | |
for (n in c) c.hasOwnProperty(n) && m.attr(n, c[n]); | |
this.elementAttributes = null | |
} | |
if (h) { | |
for (r in h) h.hasOwnProperty(r) && m.prop(r, h[r]); | |
this.elementProperties = null | |
} | |
return p | |
}, | |
element: function () { | |
var e = this.innerString(); | |
return e && (this._element = i.ViewUtils.setInnerHTML(this._element, e)), this._element | |
}, | |
string: function () { | |
if (this._hasElement && this._element) { | |
var e = this.element(), | |
t = e.outerHTML; | |
return "undefined" == typeof t ? i.$("<div/>").append(e).html() : t | |
} | |
return this.innerString() | |
}, | |
innerString: function () { | |
return this.buffer | |
} | |
} | |
}(), | |
function () { | |
{ | |
var e = i.get, | |
t = i.set; | |
i.String.fmt | |
} | |
i.EventDispatcher = i.Object.extend({ | |
events: { | |
touchstart: "touchStart", | |
touchmove: "touchMove", | |
touchend: "touchEnd", | |
touchcancel: "touchCancel", | |
keydown: "keyDown", | |
keyup: "keyUp", | |
keypress: "keyPress", | |
mousedown: "mouseDown", | |
mouseup: "mouseUp", | |
contextmenu: "contextMenu", | |
click: "click", | |
dblclick: "doubleClick", | |
mousemove: "mouseMove", | |
focusin: "focusIn", | |
focusout: "focusOut", | |
mouseenter: "mouseEnter", | |
mouseleave: "mouseLeave", | |
submit: "submit", | |
input: "input", | |
change: "change", | |
dragstart: "dragStart", | |
drag: "drag", | |
dragenter: "dragEnter", | |
dragleave: "dragLeave", | |
dragover: "dragOver", | |
drop: "drop", | |
dragend: "dragEnd" | |
}, | |
rootElement: "body", | |
setup: function (n, r) { | |
var o, a = e(this, "events"); | |
i.$.extend(a, n || {}), i.isNone(r) || t(this, "rootElement", r), r = i.$(e(this, "rootElement")), r.addClass("ember-application"); | |
for (o in a) a.hasOwnProperty(o) && this.setupHandler(r, o, a[o]) | |
}, | |
setupHandler: function (e, t, n) { | |
var r = this; | |
e.on(t + ".ember", ".ember-view", function (e, t) { | |
var o = i.View.views[this.id], | |
a = !0, | |
s = null; | |
return s = r._findNearestEventManager(o, n), s && s !== t ? a = r._dispatchEvent(s, e, n, o) : o ? a = r._bubbleEvent(o, e, n) : e.stopPropagation(), a | |
}), e.on(t + ".ember", "[data-ember-action]", function (e) { | |
var t = i.$(e.currentTarget).attr("data-ember-action"), | |
r = i.Handlebars.ActionHelper.registeredActions[t]; | |
return r && r.eventName === n ? r.handler(e) : void 0 | |
}) | |
}, | |
_findNearestEventManager: function (t, n) { | |
for (var r = null; t && (r = e(t, "eventManager"), !r || !r[n]);) t = e(t, "parentView"); | |
return r | |
}, | |
_dispatchEvent: function (e, t, n, r) { | |
var o = !0, | |
a = e[n]; | |
return "function" === i.typeOf(a) ? (o = i.run(e, a, t, r), t.stopPropagation()) : o = this._bubbleEvent(r, t, n), o | |
}, | |
_bubbleEvent: function (e, t, n) { | |
return i.run(e, e.handleEvent, n, t) | |
}, | |
destroy: function () { | |
var t = e(this, "rootElement"); | |
return i.$(t).off(".ember", "**").removeClass("ember-application"), this._super() | |
} | |
}) | |
}(), | |
function () { | |
var e = i.run.queues, | |
t = i.ArrayPolyfills.indexOf; | |
e.splice(t.call(e, "actions") + 1, 0, "render", "afterRender") | |
}(), | |
function () { | |
function e(e) { | |
e.buffer = null | |
} | |
function t() { | |
i.run.once(i.View, "notifyMutationListeners") | |
} | |
var n = {}, r = i.get, | |
o = i.set, | |
a = i.guidFor, | |
s = i.EnumerableUtils.forEach, | |
u = i.EnumerableUtils.addObject, | |
l = i.meta, | |
c = i.defineProperty, | |
h = i.computed(function () { | |
var e = this._childViews, | |
t = i.A(), | |
n = this; | |
return s(e, function (e) { | |
var n; | |
e.isVirtual ? (n = r(e, "childViews")) && t.pushObjects(n) : t.push(e) | |
}), t.replace = function (e, t, r) { | |
if (n instanceof i.ContainerView) return n.replace(e, t, r); | |
throw new i.Error("childViews is immutable") | |
}, t | |
}); | |
i.TEMPLATES = {}, i.CoreView = i.Object.extend(i.Evented, i.ActionHandler, { | |
isView: !0, | |
states: n, | |
init: function () { | |
this._super(), this.transitionTo("preRender"), this._isVisible = r(this, "isVisible") | |
}, | |
parentView: i.computed("_parentView", function () { | |
var e = this._parentView; | |
return e && e.isVirtual ? r(e, "parentView") : e | |
}), | |
state: null, | |
_parentView: null, | |
concreteView: i.computed("parentView", function () { | |
return this.isVirtual ? r(this, "parentView") : this | |
}), | |
instrumentName: "core_view", | |
instrumentDetails: function (e) { | |
e.object = this.toString() | |
}, | |
renderToBuffer: function (e, t) { | |
var n = "render." + this.instrumentName, | |
r = {}; | |
return this.instrumentDetails(r), i.instrument(n, r, function () { | |
return this._renderToBuffer(e, t) | |
}, this) | |
}, | |
_renderToBuffer: function (e) { | |
var t = this.tagName; | |
(null === t || void 0 === t) && (t = "div"); | |
var n = this.buffer = e && e.begin(t) || i.RenderBuffer(t); | |
return this.transitionTo("inBuffer", !1), this.beforeRender(n), this.render(n), this.afterRender(n), n | |
}, | |
trigger: function (e) { | |
this._super.apply(this, arguments); | |
var t = this[e]; | |
if (t) { | |
var n, r, i = []; | |
for (n = 1, r = arguments.length; r > n; n++) i.push(arguments[n]); | |
return t.apply(this, i) | |
} | |
}, | |
deprecatedSendHandles: function (e) { | |
return !!this[e] | |
}, | |
deprecatedSend: function (e) { | |
var t = [].slice.call(arguments, 1); | |
this[e].apply(this, t) | |
}, | |
has: function (e) { | |
return "function" === i.typeOf(this[e]) || this._super(e) | |
}, | |
destroy: function () { | |
var e = this._parentView; | |
if (this._super()) return this.removedFromDOM || this.destroyElement(), e && e.removeChild(this), this.transitionTo("destroying", !1), this | |
}, | |
clearRenderedChildren: i.K, | |
triggerRecursively: i.K, | |
invokeRecursively: i.K, | |
transitionTo: i.K, | |
destroyElement: i.K | |
}); | |
var d = i._ViewCollection = function (e) { | |
var t = this.views = e || []; | |
this.length = t.length | |
}; | |
d.prototype = { | |
length: 0, | |
trigger: function (e) { | |
for (var t, n = this.views, r = 0, i = n.length; i > r; r++) t = n[r], t.trigger && t.trigger(e) | |
}, | |
triggerRecursively: function (e) { | |
for (var t = this.views, n = 0, r = t.length; r > n; n++) t[n].triggerRecursively(e) | |
}, | |
invokeRecursively: function (e) { | |
for (var t, n = this.views, r = 0, i = n.length; i > r; r++) t = n[r], e(t) | |
}, | |
transitionTo: function (e, t) { | |
for (var n = this.views, r = 0, i = n.length; i > r; r++) n[r].transitionTo(e, t) | |
}, | |
push: function () { | |
this.length += arguments.length; | |
var e = this.views; | |
return e.push.apply(e, arguments) | |
}, | |
objectAt: function (e) { | |
return this.views[e] | |
}, | |
forEach: function (e) { | |
var t = this.views; | |
return s(t, e) | |
}, | |
clear: function () { | |
this.length = 0, this.views.length = 0 | |
} | |
}; | |
var f = []; | |
i.View = i.CoreView.extend({ | |
concatenatedProperties: ["classNames", "classNameBindings", "attributeBindings"], | |
isView: !0, | |
templateName: null, | |
layoutName: null, | |
template: i.computed("templateName", function (e, t) { | |
if (void 0 !== t) return t; | |
var n = r(this, "templateName"), | |
i = this.templateForName(n, "template"); | |
return i || r(this, "defaultTemplate") | |
}), | |
controller: i.computed("_parentView", function () { | |
var e = r(this, "_parentView"); | |
return e ? r(e, "controller") : null | |
}), | |
layout: i.computed(function () { | |
var e = r(this, "layoutName"), | |
t = this.templateForName(e, "layout"); | |
return t || r(this, "defaultLayout") | |
}).property("layoutName"), | |
_yield: function (e, t) { | |
var n = r(this, "template"); | |
n && n(e, t) | |
}, | |
templateForName: function (e) { | |
if (e) { | |
var t = this.container || i.Container && i.Container.defaultContainer; | |
return t && t.lookup("template:" + e) | |
} | |
}, | |
context: i.computed(function (e, t) { | |
return 2 === arguments.length ? (o(this, "_context", t), t) : r(this, "_context") | |
}).volatile(), | |
_context: i.computed(function () { | |
var e, t; | |
return (t = r(this, "controller")) ? t : (e = this._parentView, e ? r(e, "_context") : null) | |
}), | |
_contextDidChange: i.observer("context", function () { | |
this.rerender() | |
}), | |
isVisible: !0, | |
childViews: h, | |
_childViews: f, | |
_childViewsWillChange: i.beforeObserver("childViews", function () { | |
if (this.isVirtual) { | |
var e = r(this, "parentView"); | |
e && i.propertyWillChange(e, "childViews") | |
} | |
}), | |
_childViewsDidChange: i.observer("childViews", function () { | |
if (this.isVirtual) { | |
var e = r(this, "parentView"); | |
e && i.propertyDidChange(e, "childViews") | |
} | |
}), | |
nearestInstanceOf: function (e) { | |
for (var t = r(this, "parentView"); t;) { | |
if (t instanceof e) return t; | |
t = r(t, "parentView") | |
} | |
}, | |
nearestOfType: function (e) { | |
for (var t = r(this, "parentView"), n = e instanceof i.Mixin ? function (t) { | |
return e.detect(t) | |
} : function (t) { | |
return e.detect(t.constructor) | |
}; t;) { | |
if (n(t)) return t; | |
t = r(t, "parentView") | |
} | |
}, | |
nearestWithProperty: function (e) { | |
for (var t = r(this, "parentView"); t;) { | |
if (e in t) return t; | |
t = r(t, "parentView") | |
} | |
}, | |
nearestChildOf: function (e) { | |
for (var t = r(this, "parentView"); t;) { | |
if (r(t, "parentView") instanceof e) return t; | |
t = r(t, "parentView") | |
} | |
}, | |
_parentViewDidChange: i.observer("_parentView", function () { | |
this.isDestroying || (this.trigger("parentViewDidChange"), r(this, "parentView.controller") && !r(this, "controller") && this.notifyPropertyChange("controller")) | |
}), | |
_controllerDidChange: i.observer("controller", function () { | |
this.isDestroying || (this.rerender(), this.forEachChildView(function (e) { | |
e.propertyDidChange("controller") | |
})) | |
}), | |
cloneKeywords: function () { | |
var e = r(this, "templateData"), | |
t = e ? i.copy(e.keywords) : {}; | |
return o(t, "view", r(this, "concreteView")), o(t, "_view", this), o(t, "controller", r(this, "controller")), t | |
}, | |
render: function (e) { | |
var t = r(this, "layout") || r(this, "template"); | |
if (t) { | |
var n, i = r(this, "context"), | |
o = this.cloneKeywords(), | |
a = { | |
view: this, | |
buffer: e, | |
isRenderData: !0, | |
keywords: o, | |
insideGroup: r(this, "templateData.insideGroup") | |
}; | |
n = t(i, { | |
data: a | |
}), void 0 !== n && e.push(n) | |
} | |
}, | |
rerender: function () { | |
return this.currentState.rerender(this) | |
}, | |
clearRenderedChildren: function () { | |
for (var e = this.lengthBeforeRender, t = this.lengthAfterRender, n = this._childViews, r = t - 1; r >= e; r--) n[r] && n[r].destroy() | |
}, | |
_applyClassNameBindings: function (e) { | |
var t, n, r, o = this.classNames; | |
s(e, function (e) { | |
var a, s = i.View._parsePropertyPath(e), | |
l = function () { | |
n = this._classStringForProperty(e), t = this.$(), a && (t.removeClass(a), o.removeObject(a)), n ? (t.addClass(n), a = n) : a = null | |
}; | |
r = this._classStringForProperty(e), r && (u(o, r), a = r), this.registerObserver(this, s.path, l), this.one("willClearRender", function () { | |
a && (o.removeObject(a), a = null) | |
}) | |
}, this) | |
}, | |
_unspecifiedAttributeBindings: null, | |
_applyAttributeBindings: function (e, t) { | |
var n, o = this._unspecifiedAttributeBindings = this._unspecifiedAttributeBindings || {}; | |
s(t, function (t) { | |
var a = t.split(":"), | |
s = a[0], | |
u = a[1] || s; | |
s in this ? (this._setupAttributeBindingObservation(s, u), n = r(this, s), i.View.applyAttributeBindings(e, u, n)) : o[s] = u | |
}, this), this.setUnknownProperty = this._setUnknownProperty | |
}, | |
_setupAttributeBindingObservation: function (e, t) { | |
var n, o, a = function () { | |
o = this.$(), n = r(this, e), i.View.applyAttributeBindings(o, t, n) | |
}; | |
this.registerObserver(this, e, a) | |
}, | |
setUnknownProperty: null, | |
_setUnknownProperty: function (e, t) { | |
var n = this._unspecifiedAttributeBindings && this._unspecifiedAttributeBindings[e]; | |
return n && this._setupAttributeBindingObservation(e, n), c(this, e), o(this, e, t) | |
}, | |
_classStringForProperty: function (e) { | |
var t = i.View._parsePropertyPath(e), | |
n = t.path, | |
o = r(this, n); | |
return void 0 === o && i.isGlobalPath(n) && (o = r(i.lookup, n)), i.View._classStringForValue(n, o, t.className, t.falsyClassName) | |
}, | |
element: i.computed("_parentView", function (e, t) { | |
return void 0 !== t ? this.currentState.setElement(this, t) : this.currentState.getElement(this) | |
}), | |
$: function (e) { | |
return this.currentState.$(this, e) | |
}, | |
mutateChildViews: function (e) { | |
for (var t, n = this._childViews, r = n.length; --r >= 0;) t = n[r], e(this, t, r); | |
return this | |
}, | |
forEachChildView: function (e) { | |
var t = this._childViews; | |
if (!t) return this; | |
var n, r, i = t.length; | |
for (r = 0; i > r; r++) n = t[r], e(n); | |
return this | |
}, | |
appendTo: function (e) { | |
return this._insertElementLater(function () { | |
this.$().appendTo(e) | |
}), this | |
}, | |
replaceIn: function (e) { | |
return this._insertElementLater(function () { | |
i.$(e).empty(), this.$().appendTo(e) | |
}), this | |
}, | |
_insertElementLater: function (e) { | |
this._scheduledInsert = i.run.scheduleOnce("render", this, "_insertElement", e) | |
}, | |
_insertElement: function (e) { | |
this._scheduledInsert = null, this.currentState.insertElement(this, e) | |
}, | |
append: function () { | |
return this.appendTo(document.body) | |
}, | |
remove: function () { | |
this.removedFromDOM || this.destroyElement(), this.invokeRecursively(function (e) { | |
e.clearRenderedChildren && e.clearRenderedChildren() | |
}) | |
}, | |
elementId: null, | |
findElementInParentElement: function (e) { | |
var t = "#" + this.elementId; | |
return i.$(t)[0] || i.$(t, e)[0] | |
}, | |
createElement: function () { | |
if (r(this, "element")) return this; | |
var e = this.renderToBuffer(); | |
return o(this, "element", e.element()), this | |
}, | |
willInsertElement: i.K, | |
didInsertElement: i.K, | |
willClearRender: i.K, | |
invokeRecursively: function (e, t) { | |
for (var n, r, i, o = t === !1 ? this._childViews : [this]; o.length;) { | |
n = o.slice(), o = []; | |
for (var a = 0, s = n.length; s > a; a++) r = n[a], i = r._childViews ? r._childViews.slice(0) : null, e(r), i && o.push.apply(o, i) | |
} | |
}, | |
triggerRecursively: function (e) { | |
for (var t, n, r, i = [this]; i.length;) { | |
t = i.slice(), i = []; | |
for (var o = 0, a = t.length; a > o; o++) n = t[o], r = n._childViews ? n._childViews.slice(0) : null, n.trigger && n.trigger(e), r && i.push.apply(i, r) | |
} | |
}, | |
viewHierarchyCollection: function () { | |
for (var e, t = new d([this]), n = 0; n < t.length; n++) e = t.objectAt(n), e._childViews && t.push.apply(t, e._childViews); | |
return t | |
}, | |
destroyElement: function () { | |
return this.currentState.destroyElement(this) | |
}, | |
willDestroyElement: i.K, | |
_notifyWillDestroyElement: function () { | |
var e = this.viewHierarchyCollection(); | |
return e.trigger("willClearRender"), e.trigger("willDestroyElement"), e | |
}, | |
_elementDidChange: i.observer("element", function () { | |
this.forEachChildView(function (e) { | |
delete l(e).cache.element | |
}) | |
}), | |
parentViewDidChange: i.K, | |
instrumentName: "view", | |
instrumentDetails: function (e) { | |
e.template = r(this, "templateName"), this._super(e) | |
}, | |
_renderToBuffer: function (e, t) { | |
this.lengthBeforeRender = this._childViews.length; | |
var n = this._super(e, t); | |
return this.lengthAfterRender = this._childViews.length, n | |
}, | |
renderToBufferIfNeeded: function (e) { | |
return this.currentState.renderToBufferIfNeeded(this, e) | |
}, | |
beforeRender: function (e) { | |
this.applyAttributesToBuffer(e), e.pushOpeningTag() | |
}, | |
afterRender: function (e) { | |
e.pushClosingTag() | |
}, | |
applyAttributesToBuffer: function (e) { | |
var t = r(this, "classNameBindings"); | |
t.length && this._applyClassNameBindings(t); | |
var n = r(this, "attributeBindings"); | |
n.length && this._applyAttributeBindings(e, n), e.setClasses(this.classNames), e.id(this.elementId); | |
var i = r(this, "ariaRole"); | |
i && e.attr("role", i), r(this, "isVisible") === !1 && e.style("display", "none") | |
}, | |
tagName: null, | |
ariaRole: null, | |
classNames: ["ember-view"], | |
classNameBindings: f, | |
attributeBindings: f, | |
init: function () { | |
this.elementId = this.elementId || a(this), this._super(), this._childViews = this._childViews.slice(), this.classNameBindings = i.A(this.classNameBindings.slice()), this.classNames = i.A(this.classNames.slice()) | |
}, | |
appendChild: function (e, t) { | |
return this.currentState.appendChild(this, e, t) | |
}, | |
removeChild: function (e) { | |
if (!this.isDestroying) { | |
o(e, "_parentView", null); | |
var t = this._childViews; | |
return i.EnumerableUtils.removeObject(t, e), this.propertyDidChange("childViews"), this | |
} | |
}, | |
removeAllChildren: function () { | |
return this.mutateChildViews(function (e, t) { | |
e.removeChild(t) | |
}) | |
}, | |
destroyAllChildren: function () { | |
return this.mutateChildViews(function (e, t) { | |
t.destroy() | |
}) | |
}, | |
removeFromParent: function () { | |
var e = this._parentView; | |
return this.remove(), e && e.removeChild(this), this | |
}, | |
destroy: function () { | |
var e, t, n = this._childViews, | |
i = r(this, "parentView"), | |
o = this.viewName; | |
if (this._super()) { | |
for (e = n.length, t = e - 1; t >= 0; t--) n[t].removedFromDOM = !0; | |
for (o && i && i.set(o, null), e = n.length, t = e - 1; t >= 0; t--) n[t].destroy(); | |
return this | |
} | |
}, | |
createChildView: function (e, t) { | |
if (!e) throw new TypeError("createChildViews first argument must exist"); | |
if (e.isView && e._parentView === this && e.container === this.container) return e; | |
if (t = t || {}, t._parentView = this, i.CoreView.detect(e)) t.templateData = t.templateData || r(this, "templateData"), t.container = this.container, e = e.create(t), e.viewName && o(r(this, "concreteView"), e.viewName, e); | |
else if ("string" == typeof e) { | |
var n = "view:" + e, | |
a = this.container.lookupFactory(n); | |
t.templateData = r(this, "templateData"), e = a.create(t) | |
} else t.container = this.container, r(e, "templateData") || (t.templateData = r(this, "templateData")), i.setProperties(e, t); | |
return e | |
}, | |
becameVisible: i.K, | |
becameHidden: i.K, | |
_isVisibleDidChange: i.observer("isVisible", function () { | |
this._isVisible !== r(this, "isVisible") && i.run.scheduleOnce("render", this, this._toggleVisibility) | |
}), | |
_toggleVisibility: function () { | |
var e = this.$(); | |
if (e) { | |
var t = r(this, "isVisible"); | |
this._isVisible !== t && (e.toggle(t), this._isVisible = t, this._isAncestorHidden() || (t ? this._notifyBecameVisible() : this._notifyBecameHidden())) | |
} | |
}, | |
_notifyBecameVisible: function () { | |
this.trigger("becameVisible"), this.forEachChildView(function (e) { | |
var t = r(e, "isVisible"); | |
(t || null === t) && e._notifyBecameVisible() | |
}) | |
}, | |
_notifyBecameHidden: function () { | |
this.trigger("becameHidden"), this.forEachChildView(function (e) { | |
var t = r(e, "isVisible"); | |
(t || null === t) && e._notifyBecameHidden() | |
}) | |
}, | |
_isAncestorHidden: function () { | |
for (var e = r(this, "parentView"); e;) { | |
if (r(e, "isVisible") === !1) return !0; | |
e = r(e, "parentView") | |
} | |
return !1 | |
}, | |
clearBuffer: function () { | |
this.invokeRecursively(e) | |
}, | |
transitionTo: function (e, t) { | |
var n = this.currentState, | |
r = this.currentState = this.states[e]; | |
this.state = e, n && n.exit && n.exit(this), r.enter && r.enter(this), "inDOM" === e && delete i.meta(this).cache.element, t !== !1 && this.forEachChildView(function (t) { | |
t.transitionTo(e) | |
}) | |
}, | |
handleEvent: function (e, t) { | |
return this.currentState.handleEvent(this, e, t) | |
}, | |
registerObserver: function (e, t, n, r) { | |
if (r || "function" != typeof n || (r = n, n = null), e && "object" == typeof e) { | |
var o = this, | |
a = function () { | |
o.currentState.invokeObserver(this, r) | |
}, s = function () { | |
i.run.scheduleOnce("render", this, a) | |
}; | |
i.addObserver(e, t, n, s), this.one("willClearRender", function () { | |
i.removeObserver(e, t, n, s) | |
}) | |
} | |
} | |
}); | |
var p = { | |
prepend: function (e, n) { | |
e.$().prepend(n), t() | |
}, | |
after: function (e, n) { | |
e.$().after(n), t() | |
}, | |
html: function (e, n) { | |
e.$().html(n), t() | |
}, | |
replace: function (e) { | |
var n = r(e, "element"); | |
o(e, "element", null), e._insertElementLater(function () { | |
i.$(n).replaceWith(r(e, "element")), t() | |
}) | |
}, | |
remove: function (e) { | |
e.$().remove(), t() | |
}, | |
empty: function (e) { | |
e.$().empty(), t() | |
} | |
}; | |
i.View.reopen({ | |
domManager: p | |
}), i.View.reopenClass({ | |
_parsePropertyPath: function (e) { | |
var t, n, r = e.split(":"), | |
i = r[0], | |
o = ""; | |
return r.length > 1 && (t = r[1], 3 === r.length && (n = r[2]), o = ":" + t, n && (o += ":" + n)), { | |
path: i, | |
classNames: o, | |
className: "" === t ? void 0 : t, | |
falsyClassName: n | |
} | |
}, | |
_classStringForValue: function (e, t, n, r) { | |
if (n || r) return n && t ? n : r && !t ? r : null; | |
if (t === !0) { | |
var o = e.split("."); | |
return i.String.dasherize(o[o.length - 1]) | |
} | |
return t !== !1 && null != t ? t : null | |
} | |
}); | |
var m = i.Object.extend(i.Evented).create(); | |
i.View.addMutationListener = function (e) { | |
m.on("change", e) | |
}, i.View.removeMutationListener = function (e) { | |
m.off("change", e) | |
}, i.View.notifyMutationListeners = function () { | |
m.trigger("change") | |
}, i.View.views = {}, i.View.childViewsProperty = h, i.View.applyAttributeBindings = function (e, t, n) { | |
var r = i.typeOf(n); | |
"value" === t || "string" !== r && ("number" !== r || isNaN(n)) ? "value" === t || "boolean" === r ? i.isNone(n) || n === !1 ? (e.removeAttr(t), e.prop(t, "")) : n !== e.prop(t) && e.prop(t, n) : n || e.removeAttr(t) : n !== e.attr(t) && e.attr(t, n) | |
}, i.View.states = n | |
}(), | |
function () { | |
var e = (i.get, i.set); | |
i.View.states._default = { | |
appendChild: function () { | |
throw "You can't use appendChild outside of the rendering process" | |
}, | |
$: function () { | |
return void 0 | |
}, | |
getElement: function () { | |
return null | |
}, | |
handleEvent: function () { | |
return !0 | |
}, | |
destroyElement: function (t) { | |
return e(t, "element", null), t._scheduledInsert && (i.run.cancel(t._scheduledInsert), t._scheduledInsert = null), t | |
}, | |
renderToBufferIfNeeded: function () { | |
return !1 | |
}, | |
rerender: i.K, | |
invokeObserver: i.K | |
} | |
}(), | |
function () { | |
var e = i.View.states.preRender = i.create(i.View.states._default); | |
i.merge(e, { | |
insertElement: function (e, t) { | |
e.createElement(); | |
var n = e.viewHierarchyCollection(); | |
n.trigger("willInsertElement"), t.call(e); | |
var r = e.get("element"); | |
document.body.contains(r) && (n.transitionTo("inDOM", !1), n.trigger("didInsertElement")) | |
}, | |
renderToBufferIfNeeded: function (e, t) { | |
return e.renderToBuffer(t), !0 | |
}, | |
empty: i.K, | |
setElement: function (e, t) { | |
return null !== t && e.transitionTo("hasElement"), t | |
} | |
}) | |
}(), | |
function () { | |
var e = (i.get, i.set, i.View.states.inBuffer = i.create(i.View.states._default)); | |
i.merge(e, { | |
$: function (e) { | |
return e.rerender(), i.$() | |
}, | |
rerender: function () { | |
throw new i.Error("Something you did caused a view to re-render after it rendered but before it was inserted into the DOM.") | |
}, | |
appendChild: function (e, t, n) { | |
var r = e.buffer, | |
i = e._childViews; | |
return t = e.createChildView(t, n), i.length || (i = e._childViews = i.slice()), i.push(t), t.renderToBuffer(r), e.propertyDidChange("childViews"), t | |
}, | |
destroyElement: function (e) { | |
e.clearBuffer(); | |
var t = e._notifyWillDestroyElement(); | |
return t.transitionTo("preRender", !1), e | |
}, | |
empty: function () {}, | |
renderToBufferIfNeeded: function () { | |
return !1 | |
}, | |
insertElement: function () { | |
throw "You can't insert an element that has already been rendered" | |
}, | |
setElement: function (e, t) { | |
return null === t ? e.transitionTo("preRender") : (e.clearBuffer(), e.transitionTo("hasElement")), t | |
}, | |
invokeObserver: function (e, t) { | |
t.call(e) | |
} | |
}) | |
}(), | |
function () { | |
var e = i.get, | |
t = i.set, | |
n = i.View.states.hasElement = i.create(i.View.states._default); | |
i.merge(n, { | |
$: function (t, n) { | |
var r = e(t, "element"); | |
return n ? i.$(n, r) : i.$(r) | |
}, | |
getElement: function (t) { | |
var n = e(t, "parentView"); | |
return n && (n = e(n, "element")), n ? t.findElementInParentElement(n) : i.$("#" + e(t, "elementId"))[0] | |
}, | |
setElement: function (e, t) { | |
if (null !== t) throw "You cannot set an element to a non-null value when the element is already in the DOM."; | |
return e.transitionTo("preRender"), t | |
}, | |
rerender: function (e) { | |
return e.triggerRecursively("willClearRender"), e.clearRenderedChildren(), e.domManager.replace(e), e | |
}, | |
destroyElement: function (e) { | |
return e._notifyWillDestroyElement(), e.domManager.remove(e), t(e, "element", null), e._scheduledInsert && (i.run.cancel(e._scheduledInsert), e._scheduledInsert = null), e | |
}, | |
empty: function (e) { | |
var t, n, r = e._childViews; | |
if (r) | |
for (t = r.length, n = 0; t > n; n++) r[n]._notifyWillDestroyElement(); | |
e.domManager.empty(e) | |
}, | |
handleEvent: function (e, t, n) { | |
return e.has(t) ? e.trigger(t, n) : !0 | |
}, | |
invokeObserver: function (e, t) { | |
t.call(e) | |
} | |
}) | |
}(), | |
function () { | |
var e = i.View.states.hasElement, | |
t = i.View.states.inDOM = i.create(e); | |
i.merge(t, { | |
enter: function (e) { | |
e.isVirtual || (i.View.views[e.elementId] = e), e.addBeforeObserver("elementId", function () { | |
throw new i.Error("Changing a view's elementId after creation is not allowed") | |
}) | |
}, | |
exit: function (e) { | |
this.isVirtual || delete i.View.views[e.elementId] | |
}, | |
insertElement: function () { | |
throw "You can't insert an element into the DOM that has already been inserted" | |
} | |
}) | |
}(), | |
function () { | |
var e = "You can't call %@ on a view being destroyed", | |
t = i.String.fmt, | |
n = i.View.states.destroying = i.create(i.View.states._default); | |
i.merge(n, { | |
appendChild: function () { | |
throw t(e, ["appendChild"]) | |
}, | |
rerender: function () { | |
throw t(e, ["rerender"]) | |
}, | |
destroyElement: function () { | |
throw t(e, ["destroyElement"]) | |
}, | |
empty: function () { | |
throw t(e, ["empty"]) | |
}, | |
setElement: function () { | |
throw t(e, ["set('element', ...)"]) | |
}, | |
renderToBufferIfNeeded: function () { | |
return !1 | |
}, | |
insertElement: i.K | |
}) | |
}(), | |
function () { | |
i.View.cloneStates = function (e) { | |
var t = {}; | |
t._default = {}, t.preRender = i.create(t._default), t.destroying = i.create(t._default), t.inBuffer = i.create(t._default), t.hasElement = i.create(t._default), t.inDOM = i.create(t.hasElement); | |
for (var n in e) e.hasOwnProperty(n) && i.merge(t[n], e[n]); | |
return t | |
} | |
}(), | |
function () { | |
function e(e, t, n, r) { | |
t.triggerRecursively("willInsertElement"), n ? n.domManager.after(n, r.string()) : e.domManager.prepend(e, r.string()), t.forEach(function (e) { | |
e.transitionTo("inDOM"), e.propertyDidChange("element"), e.triggerRecursively("didInsertElement") | |
}) | |
} | |
var n = t("ember-runtime/mixins/mutable_array")["default"], | |
r = i.View.cloneStates(i.View.states), | |
o = i.get, | |
a = i.set, | |
s = i.EnumerableUtils.forEach, | |
u = i._ViewCollection; | |
i.ContainerView = i.View.extend(n, { | |
states: r, | |
init: function () { | |
this._super(); | |
var e = o(this, "childViews"); | |
i.defineProperty(this, "childViews", i.View.childViewsProperty); | |
var t = this._childViews; | |
s(e, function (e, n) { | |
var r; | |
"string" == typeof e ? (r = o(this, e), r = this.createChildView(r), a(this, e, r)) : r = this.createChildView(e), t[n] = r | |
}, this); | |
var n = o(this, "currentView"); | |
n && (t.length || (t = this._childViews = this._childViews.slice()), t.push(this.createChildView(n))) | |
}, | |
replace: function (e, t, n) { | |
var r = n ? o(n, "length") : 0; | |
if (this.arrayContentWillChange(e, t, r), this.childViewsWillChange(this._childViews, e, t), 0 === r) this._childViews.splice(e, t); | |
else { | |
var i = [e, t].concat(n); | |
n.length && !this._childViews.length && (this._childViews = this._childViews.slice()), this._childViews.splice.apply(this._childViews, i) | |
} | |
return this.arrayContentDidChange(e, t, r), this.childViewsDidChange(this._childViews, e, t, r), this | |
}, | |
objectAt: function (e) { | |
return this._childViews[e] | |
}, | |
length: i.computed(function () { | |
return this._childViews.length | |
}).volatile(), | |
render: function (e) { | |
this.forEachChildView(function (t) { | |
t.renderToBuffer(e) | |
}) | |
}, | |
instrumentName: "container", | |
childViewsWillChange: function (e, t, n) { | |
if (this.propertyWillChange("childViews"), n > 0) { | |
var r = e.slice(t, t + n); | |
this.currentState.childViewsWillChange(this, e, t, n), this.initializeViews(r, null, null) | |
} | |
}, | |
removeChild: function (e) { | |
return this.removeObject(e), this | |
}, | |
childViewsDidChange: function (e, t, n, r) { | |
if (r > 0) { | |
var i = e.slice(t, t + r); | |
this.initializeViews(i, this, o(this, "templateData")), this.currentState.childViewsDidChange(this, e, t, r) | |
} | |
this.propertyDidChange("childViews") | |
}, | |
initializeViews: function (e, t, n) { | |
s(e, function (e) { | |
a(e, "_parentView", t), !e.container && t && a(e, "container", t.container), o(e, "templateData") || a(e, "templateData", n) | |
}) | |
}, | |
currentView: null, | |
_currentViewWillChange: i.beforeObserver("currentView", function () { | |
var e = o(this, "currentView"); | |
e && e.destroy() | |
}), | |
_currentViewDidChange: i.observer("currentView", function () { | |
var e = o(this, "currentView"); | |
e && this.pushObject(e) | |
}), | |
_ensureChildrenAreInDOM: function () { | |
this.currentState.ensureChildrenAreInDOM(this) | |
} | |
}), i.merge(r._default, { | |
childViewsWillChange: i.K, | |
childViewsDidChange: i.K, | |
ensureChildrenAreInDOM: i.K | |
}), i.merge(r.inBuffer, { | |
childViewsDidChange: function () { | |
throw new i.Error("You cannot modify child views while in the inBuffer state") | |
} | |
}), i.merge(r.hasElement, { | |
childViewsWillChange: function (e, t, n, r) { | |
for (var i = n; n + r > i; i++) t[i].remove() | |
}, | |
childViewsDidChange: function (e) { | |
i.run.scheduleOnce("render", e, "_ensureChildrenAreInDOM") | |
}, | |
ensureChildrenAreInDOM: function (t) { | |
var n, r, o, a, s, l = t._childViews, | |
c = new u; | |
for (n = 0, r = l.length; r > n; n++) o = l[n], s || (s = i.RenderBuffer(), s._hasElement = !1), o.renderToBufferIfNeeded(s) ? c.push(o) : c.length ? (e(t, c, a, s), s = null, a = o, c.clear()) : a = o; | |
c.length && e(t, c, a, s) | |
} | |
}) | |
}(), | |
function () { | |
{ | |
var e = i.get, | |
t = i.set; | |
i.String.fmt | |
} | |
i.CollectionView = i.ContainerView.extend({ | |
content: null, | |
emptyViewClass: i.View, | |
emptyView: null, | |
itemViewClass: i.View, | |
init: function () { | |
var e = this._super(); | |
return this._contentDidChange(), e | |
}, | |
_contentWillChange: i.beforeObserver("content", function () { | |
var t = this.get("content"); | |
t && t.removeArrayObserver(this); | |
var n = t ? e(t, "length") : 0; | |
this.arrayWillChange(t, 0, n) | |
}), | |
_contentDidChange: i.observer("content", function () { | |
var t = e(this, "content"); | |
t && (this._assertArrayLike(t), t.addArrayObserver(this)); | |
var n = t ? e(t, "length") : 0; | |
this.arrayDidChange(t, 0, null, n) | |
}), | |
_assertArrayLike: function () {}, | |
destroy: function () { | |
if (this._super()) { | |
var t = e(this, "content"); | |
return t && t.removeArrayObserver(this), this._createdEmptyView && this._createdEmptyView.destroy(), this | |
} | |
}, | |
arrayWillChange: function (t, n, r) { | |
var o = e(this, "emptyView"); | |
o && o instanceof i.View && o.removeFromParent(); | |
var a, s, u, l = this._childViews; | |
u = this._childViews.length; | |
var c = r === u; | |
for (c && (this.currentState.empty(this), this.invokeRecursively(function (e) { | |
e.removedFromDOM = !0 | |
}, !1)), s = n + r - 1; s >= n; s--) a = l[s], a.destroy() | |
}, | |
arrayDidChange: function (n, r, o, a) { | |
var s, u, l, c, h, d, f = []; | |
if (c = n ? e(n, "length") : 0) | |
for (h = e(this, "itemViewClass"), "string" == typeof h && (h = e(h) || h), l = r; r + a > l; l++) u = n.objectAt(l), s = this.createChildView(h, { | |
content: u, | |
contentIndex: l | |
}), f.push(s); | |
else { | |
if (d = e(this, "emptyView"), !d) return; | |
"string" == typeof d && (d = e(d) || d), d = this.createChildView(d), f.push(d), t(this, "emptyView", d), i.CoreView.detect(d) && (this._createdEmptyView = d) | |
} | |
this.replace(r, 0, f) | |
}, | |
createChildView: function (n, r) { | |
n = this._super(n, r); | |
var o = e(n, "tagName"); | |
return (null === o || void 0 === o) && (o = i.CollectionView.CONTAINER_MAP[e(this, "tagName")], t(n, "tagName", o)), n | |
} | |
}), i.CollectionView.CONTAINER_MAP = { | |
ul: "li", | |
ol: "li", | |
table: "tr", | |
thead: "tr", | |
tbody: "tr", | |
tfoot: "tr", | |
tr: "td", | |
select: "option" | |
} | |
}(), | |
function () { | |
i.ComponentTemplateDeprecation = i.Mixin.create({ | |
willMergeMixin: function (e) { | |
this._super.apply(this, arguments); | |
var t, n, r = e.layoutName || e.layout; | |
e.templateName && !r && (t = "templateName", n = "layoutName", e.layoutName = e.templateName, delete e.templateName), e.template && !r && (t = "template", n = "layout", e.layout = e.template, delete e.template) | |
} | |
}) | |
}(), | |
function () { | |
var e = i.get, | |
t = i.set, | |
n = (i.isNone, Array.prototype.slice); | |
i.Component = i.View.extend(i.TargetActionSupport, i.ComponentTemplateDeprecation, { | |
init: function () { | |
this._super(), t(this, "context", this), t(this, "controller", this) | |
}, | |
defaultLayout: function (e, t) { | |
i.Handlebars.helpers.yield.call(e, t) | |
}, | |
template: i.computed(function (t, n) { | |
if (void 0 !== n) return n; | |
var r = e(this, "templateName"), | |
i = this.templateForName(r, "template"); | |
return i || e(this, "defaultTemplate") | |
}).property("templateName"), | |
templateName: null, | |
cloneKeywords: function () { | |
return { | |
view: this, | |
controller: this | |
} | |
}, | |
_yield: function (t, n) { | |
var r = n.data.view, | |
o = this._parentView, | |
a = e(this, "template"); | |
a && r.appendChild(i.View, { | |
isVirtual: !0, | |
tagName: "", | |
_contextView: o, | |
template: a, | |
context: e(o, "context"), | |
controller: e(o, "controller"), | |
templateData: { | |
keywords: o.cloneKeywords() | |
} | |
}) | |
}, | |
targetObject: i.computed(function () { | |
var t = e(this, "_parentView"); | |
return t ? e(t, "controller") : null | |
}).property("_parentView"), | |
sendAction: function (t) { | |
var r, i = n.call(arguments, 1); | |
r = void 0 === t ? e(this, "action") : e(this, t), void 0 !== r && this.triggerAction({ | |
action: r, | |
actionContext: i | |
}) | |
} | |
}) | |
}(), | |
function () { | |
i.ViewTargetActionSupport = i.Mixin.create(i.TargetActionSupport, { | |
target: i.computed.alias("controller"), | |
actionContext: i.computed.alias("context") | |
}) | |
}(), | |
function () { | |
e("metamorph", [], function () { | |
"use strict"; // Copyright: ©2014 Tilde, Inc. All rights reserved. | |
var e = function () {}, t = 0, | |
n = function () { | |
return "undefined" != typeof MetamorphENV ? MetamorphENV.DISABLE_RANGE_API : "undefined" !== ENV ? ENV.DISABLE_RANGE_API : !1 | |
}(), | |
r = !n && "undefined" != typeof document && "createRange" in document && "undefined" != typeof Range && Range.prototype.createContextualFragment, | |
i = "undefined" != typeof document && function () { | |
var e = document.createElement("div"); | |
return e.innerHTML = "<div></div>", e.firstChild.innerHTML = "<script></script>", "" === e.firstChild.innerHTML | |
}(), | |
o = document && function () { | |
var e = document.createElement("div"); | |
return e.innerHTML = "Test: <script type='text/x-placeholder'></script>Value", "Test:" === e.childNodes[0].nodeValue && " Value" === e.childNodes[2].nodeValue | |
}(), | |
a = function (n) { | |
var r; | |
r = this instanceof a ? this : new e, r.innerHTML = n; | |
var i = "metamorph-" + t++; | |
return r.start = i + "-start", r.end = i + "-end", r | |
}; | |
e.prototype = a.prototype; | |
var s, u, l, c, h, d, f, p, m; | |
if (c = function () { | |
return this.startTag() + this.innerHTML + this.endTag() | |
}, p = function () { | |
return "<script id='" + this.start + "' type='text/x-placeholder'></script>" | |
}, m = function () { | |
return "<script id='" + this.end + "' type='text/x-placeholder'></script>" | |
}, r) s = function (e, t) { | |
var n = document.createRange(), | |
r = document.getElementById(e.start), | |
i = document.getElementById(e.end); | |
return t ? (n.setStartBefore(r), n.setEndAfter(i)) : (n.setStartAfter(r), n.setEndBefore(i)), n | |
}, u = function (e, t) { | |
var n = s(this, t); | |
n.deleteContents(); | |
var r = n.createContextualFragment(e); | |
n.insertNode(r) | |
}, l = function () { | |
var e = s(this, !0); | |
e.deleteContents() | |
}, h = function (e) { | |
var t = document.createRange(); | |
t.setStart(e), t.collapse(!1); | |
var n = t.createContextualFragment(this.outerHTML()); | |
e.appendChild(n) | |
}, d = function (e) { | |
var t = document.createRange(), | |
n = document.getElementById(this.end); | |
t.setStartAfter(n), t.setEndAfter(n); | |
var r = t.createContextualFragment(e); | |
t.insertNode(r) | |
}, f = function (e) { | |
var t = document.createRange(), | |
n = document.getElementById(this.start); | |
t.setStartAfter(n), t.setEndAfter(n); | |
var r = t.createContextualFragment(e); | |
t.insertNode(r) | |
}; | |
else { | |
var v = { | |
select: [1, "<select multiple='multiple'>", "</select>"], | |
fieldset: [1, "<fieldset>", "</fieldset>"], | |
table: [1, "<table>", "</table>"], | |
tbody: [2, "<table><tbody>", "</tbody></table>"], | |
tr: [3, "<table><tbody><tr>", "</tr></tbody></table>"], | |
colgroup: [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"], | |
map: [1, "<map>", "</map>"], | |
_default: [0, "", ""] | |
}, g = function (e, t) { | |
if (e.getAttribute("id") === t) return e; | |
var n, r, i, o = e.childNodes.length; | |
for (n = 0; o > n; n++) | |
if (r = e.childNodes[n], i = 1 === r.nodeType && g(r, t)) return i | |
}, y = function (e, t) { | |
var n = []; | |
if (o && (t = t.replace(/(\s+)(<script id='([^']+)')/g, function (e, t, r, i) { | |
return n.push([i, t]), r | |
})), e.innerHTML = t, n.length > 0) { | |
var r, i = n.length; | |
for (r = 0; i > r; r++) { | |
var a = g(e, n[r][0]), | |
s = document.createTextNode(n[r][1]); | |
a.parentNode.insertBefore(s, a) | |
} | |
} | |
}, _ = function (e, t) { | |
var n = v[e.tagName.toLowerCase()] || v._default, | |
r = n[0], | |
o = n[1], | |
a = n[2]; | |
i && (t = "­" + t); | |
var s = document.createElement("div"); | |
y(s, o + t + a); | |
for (var u = 0; r >= u; u++) s = s.firstChild; | |
if (i) { | |
for (var l = s; 1 === l.nodeType && !l.nodeName;) l = l.firstChild; | |
3 === l.nodeType && "" === l.nodeValue.charAt(0) && (l.nodeValue = l.nodeValue.slice(1)) | |
} | |
return s | |
}, b = function (e) { | |
for (; | |
"" === e.parentNode.tagName;) e = e.parentNode; | |
return e | |
}, w = function (e, t) { | |
e.parentNode !== t.parentNode && t.parentNode.insertBefore(e, t.parentNode.firstChild) | |
}; | |
u = function (e, t) { | |
var n, r, i, o = b(document.getElementById(this.start)), | |
a = document.getElementById(this.end), | |
s = a.parentNode; | |
for (w(o, a), n = o.nextSibling; n;) { | |
if (r = n.nextSibling, i = n === a) { | |
if (!t) break; | |
a = n.nextSibling | |
} | |
if (n.parentNode.removeChild(n), i) break; | |
n = r | |
} | |
for (n = _(o.parentNode, e), t && o.parentNode.removeChild(o); n;) r = n.nextSibling, s.insertBefore(n, a), n = r | |
}, l = function () { | |
var e = b(document.getElementById(this.start)), | |
t = document.getElementById(this.end); | |
this.html(""), e.parentNode.removeChild(e), t.parentNode.removeChild(t) | |
}, h = function (e) { | |
for (var t, n = _(e, this.outerHTML()); n;) t = n.nextSibling, e.appendChild(n), n = t | |
}, d = function (e) { | |
var t, n, r = document.getElementById(this.end), | |
i = r.nextSibling, | |
o = r.parentNode; | |
for (n = _(o, e); n;) t = n.nextSibling, o.insertBefore(n, i), n = t | |
}, f = function (e) { | |
var t, n, r = document.getElementById(this.start), | |
i = r.parentNode; | |
n = _(i, e); | |
for (var o = r.nextSibling; n;) t = n.nextSibling, i.insertBefore(n, o), n = t | |
} | |
} | |
return a.prototype.html = function (e) { | |
return this.checkRemoved(), void 0 === e ? this.innerHTML : (u.call(this, e), this.innerHTML = e, void 0) | |
}, a.prototype.replaceWith = function (e) { | |
this.checkRemoved(), u.call(this, e, !0) | |
}, a.prototype.remove = l, a.prototype.outerHTML = c, a.prototype.appendTo = h, a.prototype.after = d, a.prototype.prepend = f, a.prototype.startTag = p, a.prototype.endTag = m, a.prototype.isRemoved = function () { | |
var e = document.getElementById(this.start), | |
t = document.getElementById(this.end); | |
return !e || !t | |
}, a.prototype.checkRemoved = function () { | |
if (this.isRemoved()) throw new Error("Cannot perform operations on a Metamorph that is not in the DOM.") | |
}, a | |
}) | |
}(), | |
function () { | |
"undefined" == typeof i && (i = {}), "undefined" == typeof i.assert && (i.assert = function () {}), "undefined" == typeof i.FEATURES && (i.FEATURES = { | |
isEnabled: function () {} | |
}); | |
var e = Object.create || function (e) { | |
function t() {} | |
return t.prototype = e, new t | |
}, t = i.imports && i.imports.Handlebars || this && this.Handlebars; | |
t || "function" != typeof n || (t = n("handlebars")), i.Handlebars = e(t), i.Handlebars.helper = function (e, t) { | |
i.View.detect(t) ? i.Handlebars.registerHelper(e, i.Handlebars.makeViewHelper(t)) : i.Handlebars.registerBoundHelper.apply(null, arguments) | |
}, i.Handlebars.makeViewHelper = function (e) { | |
return function (t) { | |
return i.Handlebars.helpers.view.call(this, e, t) | |
} | |
}, i.Handlebars.helpers = e(t.helpers), i.Handlebars.Compiler = function () {}, t.Compiler && (i.Handlebars.Compiler.prototype = e(t.Compiler.prototype)), i.Handlebars.Compiler.prototype.compiler = i.Handlebars.Compiler, i.Handlebars.JavaScriptCompiler = function () {}, t.JavaScriptCompiler && (i.Handlebars.JavaScriptCompiler.prototype = e(t.JavaScriptCompiler.prototype), i.Handlebars.JavaScriptCompiler.prototype.compiler = i.Handlebars.JavaScriptCompiler), i.Handlebars.JavaScriptCompiler.prototype.namespace = "Ember.Handlebars", i.Handlebars.JavaScriptCompiler.prototype.initializeBuffer = function () { | |
return "''" | |
}, i.Handlebars.JavaScriptCompiler.prototype.appendToBuffer = function (e) { | |
return "data.buffer.push(" + e + ");" | |
}; | |
var r = /helpers\.(.*?)\)/, | |
o = /helpers\['(.*?)'/, | |
a = /(.*blockHelperMissing\.call\(.*)(stack[0-9]+)(,.*)/; | |
i.Handlebars.JavaScriptCompiler.stringifyLastBlockHelperMissingInvocation = function (e) { | |
var t = e[e.length - 1], | |
n = (r.exec(t) || o.exec(t))[1], | |
i = a.exec(t); | |
e[e.length - 1] = i[1] + "'" + n + "'" + i[3] | |
}; | |
var s = i.Handlebars.JavaScriptCompiler.stringifyLastBlockHelperMissingInvocation, | |
u = i.Handlebars.JavaScriptCompiler.prototype.blockValue; | |
i.Handlebars.JavaScriptCompiler.prototype.blockValue = function () { | |
u.apply(this, arguments), s(this.source) | |
}; | |
var l = i.Handlebars.JavaScriptCompiler.prototype.ambiguousBlockValue; | |
i.Handlebars.JavaScriptCompiler.prototype.ambiguousBlockValue = function () { | |
l.apply(this, arguments), s(this.source) | |
}, i.Handlebars.Compiler.prototype.mustache = function (e) { | |
if (!e.params.length && !e.hash) { | |
var n = new t.AST.IdNode([{ | |
part: "_triageMustache" | |
}]); | |
e.escaped || (e.hash = e.hash || new t.AST.HashNode([]), e.hash.pairs.push(["unescaped", new t.AST.StringNode("true")])), e = new t.AST.MustacheNode([n].concat([e.id]), e.hash, !e.escaped) | |
} | |
return t.Compiler.prototype.mustache.call(this, e) | |
}, i.Handlebars.precompile = function (e) { | |
var n = t.parse(e), | |
r = { | |
knownHelpers: { | |
action: !0, | |
unbound: !0, | |
"bind-attr": !0, | |
template: !0, | |
view: !0, | |
_triageMustache: !0 | |
}, | |
data: !0, | |
stringParams: !0 | |
}, o = (new i.Handlebars.Compiler).compile(n, r); | |
return (new i.Handlebars.JavaScriptCompiler).compile(o, r, void 0, !0) | |
}, t.compile && (i.Handlebars.compile = function (e) { | |
var n = t.parse(e), | |
r = { | |
data: !0, | |
stringParams: !0 | |
}, o = (new i.Handlebars.Compiler).compile(n, r), | |
a = (new i.Handlebars.JavaScriptCompiler).compile(o, r, void 0, !0), | |
s = i.Handlebars.template(a); | |
return s.isMethod = !1, s | |
}) | |
}(), | |
function () { | |
function e(e, n, r, o) { | |
var a, s, u, l, c, h = [], | |
d = o.hash, | |
f = d.boundOptions, | |
p = t.call(o.types, 1); | |
for (c in f) f.hasOwnProperty(c) && (d[c] = i.Handlebars.get(e, f[c], o)); | |
for (a = 0, s = r.length; s > a; ++a) u = r[a], l = p[a], "ID" === l ? h.push(i.Handlebars.get(u.root, u.path, o)) : h.push(u.path); | |
return h.push(o), n.apply(e, h) | |
} | |
var t = Array.prototype.slice, | |
n = i.Handlebars.template, | |
r = i.Handlebars.normalizePath = function (e, t, n) { | |
var r, i, o = n && n.keywords || {}; | |
return r = t.split(".", 1)[0], o.hasOwnProperty(r) && (e = o[r], i = !0, t = t === r ? "" : t.substr(r.length + 1)), { | |
root: e, | |
path: t, | |
isKeyword: i | |
} | |
}, o = i.Handlebars.get = function (e, t, n) { | |
var o, a = n && n.data, | |
s = r(e, t, a); | |
return i.FEATURES.isEnabled("ember-handlebars-caps-lookup") ? o = i.isGlobalPath(t) ? i.get(i.lookup, t) : i.get(s.root, s.path) : (e = s.root, t = s.path, o = i.get(e, t), void 0 === o && e !== i.lookup && i.isGlobalPath(t) && (o = i.get(i.lookup, t))), o | |
}; | |
i.Handlebars.getEscaped = function (e, t, n) { | |
var r = o(e, t, n); | |
return null === r || void 0 === r ? r = "" : r instanceof Handlebars.SafeString || (r = String(r)), n.hash.unescaped || (r = Handlebars.Utils.escapeExpression(r)), r | |
}, i.Handlebars.resolveParams = function (e, t, n) { | |
for (var r, i, a = [], s = n.types, u = 0, l = t.length; l > u; u++) r = t[u], i = s[u], "ID" === i ? a.push(o(e, r, n)) : a.push(r); | |
return a | |
}, i.Handlebars.resolveHash = function (e, t, n) { | |
var r, i = {}, a = n.hashTypes; | |
for (var s in t) t.hasOwnProperty(s) && (r = a[s], i[s] = "ID" === r ? o(e, t[s], n) : t[s]); | |
return i | |
}, i.Handlebars.registerHelper("helperMissing", function (e) { | |
var n, r = "", | |
o = arguments[arguments.length - 1], | |
a = i.Handlebars.resolveHelper(o.data.view.container, e); | |
if (a) return a.apply(this, t.call(arguments, 1)); | |
throw n = "%@ Handlebars error: Could not find property '%@' on object %@.", o.data && (r = o.data.view), new i.Error(i.String.fmt(n, [r, e, this])) | |
}), i.Handlebars.registerHelper("blockHelperMissing", function (e) { | |
var n = arguments[arguments.length - 1], | |
r = i.Handlebars.resolveHelper(n.data.view.container, e); | |
return r ? r.apply(this, t.call(arguments, 1)) : Handlebars.helpers.helperMissing.call(this, e) | |
}), i.Handlebars.registerBoundHelper = function (e) { | |
var n = t.call(arguments, 1), | |
r = i.Handlebars.makeBoundHelper.apply(this, n); | |
i.Handlebars.registerHelper(e, r) | |
}, i.Handlebars.makeBoundHelper = function (n) { | |
function o() { | |
var o, s, u, l, c, h = t.call(arguments, 0, -1), | |
d = h.length, | |
f = arguments[arguments.length - 1], | |
p = [], | |
m = f.data, | |
v = m.isUnbound ? t.call(f.types, 1) : f.types, | |
g = f.hash, | |
y = m.view, | |
_ = f.contexts, | |
b = _ && _.length ? _[0] : this, | |
w = "", | |
C = i._SimpleHandlebarsView.prototype.normalizedValue, | |
E = g.boundOptions = {}; | |
for (u in g) i.IS_BINDING.test(u) && (E[u.slice(0, -7)] = g[u]); | |
var O = []; | |
for (m.properties = [], o = 0; d > o; ++o) | |
if (m.properties.push(h[o]), "ID" === v[o]) { | |
var P = r(b, h[o], m); | |
p.push(P), O.push(P) | |
} else m.isUnbound ? p.push({ | |
path: h[o] | |
}) : p.push(null); | |
if (m.isUnbound) return e(this, n, p, f); | |
var x = new i._SimpleHandlebarsView(null, null, !f.hash.unescaped, f.data); | |
x.normalizedValue = function () { | |
var e, t = []; | |
for (e in E) E.hasOwnProperty(e) && (c = r(b, E[e], m), x.path = c.path, x.pathRoot = c.root, g[e] = C.call(x)); | |
for (o = 0; d > o; ++o) c = p[o], c ? (x.path = c.path, x.pathRoot = c.root, t.push(C.call(x))) : t.push(h[o]); | |
return t.push(f), n.apply(b, t) | |
}, y.appendChild(x); | |
for (l in E) E.hasOwnProperty(l) && O.push(r(b, E[l], m)); | |
for (o = 0, s = O.length; s > o; ++o) c = O[o], y.registerObserver(c.root, c.path, x, x.rerender); | |
if ("ID" === v[0] && 0 !== p.length) { | |
var A = p[0], | |
T = A.root, | |
S = A.path; | |
i.isEmpty(S) || (w = S + "."); | |
for (var V = 0, N = a.length; N > V; V++) y.registerObserver(T, w + a[V], x, x.rerender) | |
} | |
} | |
var a = t.call(arguments, 1); | |
return o._rawFunction = n, o | |
}, i.Handlebars.template = function (e) { | |
var t = n(e); | |
return t.isTop = !0, t | |
} | |
}(), | |
function () { | |
i.String.htmlSafe = function (e) { | |
return new Handlebars.SafeString(e) | |
}; | |
var e = i.String.htmlSafe; | |
(i.EXTEND_PROTOTYPES === !0 || i.EXTEND_PROTOTYPES.String) && (String.prototype.htmlSafe = function () { | |
return e(this) | |
}) | |
}(), | |
function () { | |
i.Handlebars.resolvePaths = function (e) { | |
for (var t = [], n = e.contexts, r = e.roots, o = e.data, a = 0, s = n.length; s > a; a++) t.push(i.Handlebars.get(r[a], n[a], { | |
data: o | |
})); | |
return t | |
} | |
}(), | |
function () { | |
function e() { | |
i.run.once(i.View, "notifyMutationListeners") | |
} | |
var n = (i.set, i.get, t("metamorph")), | |
r = { | |
remove: function (t) { | |
t.morph.remove(), e() | |
}, | |
prepend: function (t, n) { | |
t.morph.prepend(n), e() | |
}, | |
after: function (t, n) { | |
t.morph.after(n), e() | |
}, | |
html: function (t, n) { | |
t.morph.html(n), e() | |
}, | |
replace: function (t) { | |
var n = t.morph; | |
t.transitionTo("preRender"), i.run.schedule("render", this, function () { | |
if (!t.isDestroying) { | |
t.clearRenderedChildren(); | |
var r = t.renderToBuffer(); | |
t.invokeRecursively(function (e) { | |
e.propertyWillChange("element") | |
}), t.triggerRecursively("willInsertElement"), n.replaceWith(r.string()), t.transitionTo("inDOM"), t.invokeRecursively(function (e) { | |
e.propertyDidChange("element") | |
}), t.triggerRecursively("didInsertElement"), e() | |
} | |
}) | |
}, | |
empty: function (t) { | |
t.morph.html(""), e() | |
} | |
}; | |
i._Metamorph = i.Mixin.create({ | |
isVirtual: !0, | |
tagName: "", | |
instrumentName: "metamorph", | |
init: function () { | |
this._super(), this.morph = n() | |
}, | |
beforeRender: function (e) { | |
e.push(this.morph.startTag()), e.pushOpeningTag() | |
}, | |
afterRender: function (e) { | |
e.pushClosingTag(), e.push(this.morph.endTag()) | |
}, | |
createElement: function () { | |
var e = this.renderToBuffer(); | |
this.outerHTML = e.string(), this.clearBuffer() | |
}, | |
domManager: r | |
}), i._MetamorphView = i.View.extend(i._Metamorph), i._SimpleMetamorphView = i.CoreView.extend(i._Metamorph) | |
}(), | |
function () { | |
function e(e, t, n, r) { | |
this.path = e, this.pathRoot = t, this.isEscaped = n, this.templateData = r, this.morph = a(), this.state = "preRender", this.updateId = null, this._parentView = null, this.buffer = null | |
} | |
var n = i.get, | |
r = i.set, | |
o = i.Handlebars.get, | |
a = t("metamorph"); | |
i._SimpleHandlebarsView = e, e.prototype = { | |
isVirtual: !0, | |
isView: !0, | |
destroy: function () { | |
this.updateId && (i.run.cancel(this.updateId), this.updateId = null), this._parentView && this._parentView.removeChild(this), this.morph = null, this.state = "destroyed" | |
}, | |
propertyWillChange: i.K, | |
propertyDidChange: i.K, | |
normalizedValue: function () { | |
var e, t, n = this.path, | |
r = this.pathRoot; | |
return "" === n ? e = r : (t = this.templateData, e = o(r, n, { | |
data: t | |
})), e | |
}, | |
renderToBuffer: function (e) { | |
var t = ""; | |
t += this.morph.startTag(), t += this.render(), t += this.morph.endTag(), e.push(t) | |
}, | |
render: function () { | |
var e = this.isEscaped, | |
t = this.normalizedValue(); | |
return null === t || void 0 === t ? t = "" : t instanceof Handlebars.SafeString || (t = String(t)), e && (t = Handlebars.Utils.escapeExpression(t)), t | |
}, | |
rerender: function () { | |
switch (this.state) { | |
case "preRender": | |
case "destroyed": | |
break; | |
case "inBuffer": | |
throw new i.Error("Something you did tried to replace an {{expression}} before it was inserted into the DOM."); | |
case "hasElement": | |
case "inDOM": | |
this.updateId = i.run.scheduleOnce("render", this, "update") | |
} | |
return this | |
}, | |
update: function () { | |
this.updateId = null, this.morph.html(this.render()) | |
}, | |
transitionTo: function (e) { | |
this.state = e | |
} | |
}; | |
var s = i.View.cloneStates(i.View.states), | |
u = i.merge; | |
u(s._default, { | |
rerenderIfNeeded: i.K | |
}), u(s.inDOM, { | |
rerenderIfNeeded: function (e) { | |
e.normalizedValue() !== e._lastNormalizedValue && e.rerender() | |
} | |
}), i._HandlebarsBoundView = i._MetamorphView.extend({ | |
instrumentName: "boundHandlebars", | |
states: s, | |
shouldDisplayFunc: null, | |
preserveContext: !1, | |
previousContext: null, | |
displayTemplate: null, | |
inverseTemplate: null, | |
path: null, | |
pathRoot: null, | |
normalizedValue: function () { | |
var e, t, r = n(this, "path"), | |
i = n(this, "pathRoot"), | |
a = n(this, "valueNormalizerFunc"); | |
return "" === r ? e = i : (t = n(this, "templateData"), e = o(i, r, { | |
data: t | |
})), a ? a(e) : e | |
}, | |
rerenderIfNeeded: function () { | |
this.currentState.rerenderIfNeeded(this) | |
}, | |
render: function (e) { | |
var t = n(this, "isEscaped"), | |
i = n(this, "shouldDisplayFunc"), | |
o = n(this, "preserveContext"), | |
a = n(this, "previousContext"), | |
s = n(this, "_contextController"), | |
u = n(this, "inverseTemplate"), | |
l = n(this, "displayTemplate"), | |
c = this.normalizedValue(); | |
if (this._lastNormalizedValue = c, i(c)) | |
if (r(this, "template", l), o) r(this, "_context", a); | |
else { | |
if (!l) return null === c || void 0 === c ? c = "" : c instanceof Handlebars.SafeString || (c = String(c)), t && (c = Handlebars.Utils.escapeExpression(c)), e.push(c), void 0; | |
s && (r(s, "content", c), c = s), r(this, "_context", c) | |
} else u ? (r(this, "template", u), o ? r(this, "_context", a) : r(this, "_context", c)) : r(this, "template", function () { | |
return "" | |
}); | |
return this._super(e) | |
} | |
}) | |
}(), | |
function () { | |
function e(e) { | |
return !i.isNone(e) | |
} | |
function t(e, t, n, r, o, l) { | |
var c, h, d, f = t.data, | |
p = t.fn, | |
m = t.inverse, | |
v = f.view, | |
g = this; | |
if (c = s(g, e, f), "object" == typeof this) { | |
if (f.insideGroup) { | |
h = function () { | |
i.run.once(v, "rerender") | |
}; | |
var y, _, b = a(g, e, t); | |
b = o ? o(b) : b, _ = n ? g : b, r(b) ? y = p : m && (y = m), y(_, { | |
data: t.data | |
}) | |
} else { | |
var w = v.createChildView(i._HandlebarsBoundView, { | |
preserveContext: n, | |
shouldDisplayFunc: r, | |
valueNormalizerFunc: o, | |
displayTemplate: p, | |
inverseTemplate: m, | |
path: e, | |
pathRoot: g, | |
previousContext: g, | |
isEscaped: !t.hash.unescaped, | |
templateData: t.data | |
}); | |
t.hash.controller && w.set("_contextController", this.container.lookupFactory("controller:" + t.hash.controller).create({ | |
container: g.container, | |
parentController: g, | |
target: g | |
})), v.appendChild(w), h = function () { | |
i.run.scheduleOnce("render", w, "rerenderIfNeeded") | |
} | |
} if ("" !== c.path && (v.registerObserver(c.root, c.path, h), l)) | |
for (d = 0; d < l.length; d++) v.registerObserver(c.root, c.path + "." + l[d], h) | |
} else f.buffer.push(u(g, e, t)) | |
} | |
function n(e, t, n) { | |
var r, o, a, l, c = n.data, | |
h = c.view; | |
if (r = s(e, t, c), a = r.root, a && "object" == typeof a) { | |
if (c.insideGroup) o = function () { | |
i.run.once(h, "rerender") | |
}, l = u(e, t, n), c.buffer.push(l); | |
else { | |
var d = new i._SimpleHandlebarsView(t, e, !n.hash.unescaped, n.data); | |
d._parentView = h, h.appendChild(d), o = function () { | |
i.run.scheduleOnce("render", d, "rerender") | |
} | |
} | |
"" !== r.path && h.registerObserver(r.root, r.path, o) | |
} else l = u(e, t, n), c.buffer.push(l) | |
} | |
function r(e) { | |
var t = e && o(e, "isTruthy"); | |
return "boolean" == typeof t ? t : i.isArray(e) ? 0 !== o(e, "length") : !! e | |
} | |
var o = i.get, | |
a = (i.set, i.String.fmt, i.Handlebars.get), | |
s = i.Handlebars.normalizePath, | |
u = i.Handlebars.getEscaped, | |
l = i.ArrayPolyfills.forEach, | |
c = i.create, | |
h = i.Handlebars, | |
d = h.helpers; | |
h.bind = t, h.registerHelper("_triageMustache", function (e, t) { | |
if (d[e]) return d[e].call(this, t); | |
var n = i.Handlebars.resolveHelper(t.data.view.container, e); | |
return n ? n.call(this, t) : d.bind.call(this, e, t) | |
}), i.Handlebars.resolveHelper = function (e, t) { | |
if (e && -1 !== t.indexOf("-")) { | |
var n = e.lookup("helper:" + t); | |
if (!n) { | |
var r = e.lookup("component-lookup:main"), | |
i = r.lookupFactory(t, e); | |
i && (n = h.makeViewHelper(i), e.register("helper:" + t, n)) | |
} | |
return n | |
} | |
}, h.registerHelper("bind", function (r, i) { | |
var o = i.contexts && i.contexts.length ? i.contexts[0] : this; | |
return i.fn ? t.call(o, r, i, !1, e) : n(o, r, i) | |
}), h.registerHelper("boundIf", function (e, n) { | |
var i = n.contexts && n.contexts.length ? n.contexts[0] : this; | |
return t.call(i, e, n, !0, r, r, ["isTruthy", "length"]) | |
}), h.registerHelper("unboundIf", function (e, t) { | |
var n, i, o = t.contexts && t.contexts.length ? t.contexts[0] : this, | |
u = t.data, | |
l = t.fn, | |
c = t.inverse; | |
n = s(o, e, u), i = a(o, e, t), r(i) || (l = c), l(o, { | |
data: u | |
}) | |
}), h.registerHelper("with", function (n, r) { | |
if (4 === arguments.length) { | |
var o, a, u, l, h; | |
r = arguments[3], o = arguments[2], a = arguments[0]; | |
var f = c(r); | |
if (f.data = c(r.data), f.data.keywords = c(r.data.keywords || {}), i.isGlobalPath(a)) h = a; | |
else { | |
l = s(this, a, r.data), a = l.path, u = l.root; | |
var p = i.$.expando + i.guidFor(u); | |
f.data.keywords[p] = u, h = a ? p + "." + a : p | |
} | |
return i.bind(f.data.keywords, o, h), t.call(this, a, f, !0, e) | |
} | |
return d.bind.call(r.contexts[0], n, r) | |
}), h.registerHelper("if", function (e, t) { | |
return t.data.isUnbound ? d.unboundIf.call(t.contexts[0], e, t) : d.boundIf.call(t.contexts[0], e, t) | |
}), h.registerHelper("unless", function (e, t) { | |
var n = t.fn, | |
r = t.inverse; | |
return t.fn = r, t.inverse = n, t.data.isUnbound ? d.unboundIf.call(t.contexts[0], e, t) : d.boundIf.call(t.contexts[0], e, t) | |
}), h.registerHelper("bind-attr", function (e) { | |
var t = e.hash, | |
n = e.data.view, | |
r = [], | |
o = this, | |
u = ++i.uuid, | |
c = t["class"]; | |
if (null != c) { | |
var d = h.bindClasses(this, c, n, u, e); | |
r.push('class="' + Handlebars.Utils.escapeExpression(d.join(" ")) + '"'), delete t["class"] | |
} | |
var f = i.keys(t); | |
return l.call(f, function (l) { | |
var c, h = t[l]; | |
c = s(o, h, e.data); | |
var d, f, p = "this" === h ? c.root : a(o, h, e), | |
m = i.typeOf(p); | |
d = function () { | |
var t = a(o, h, e), | |
r = n.$("[data-bindattr-" + u + "='" + u + "']"); | |
return r && 0 !== r.length ? (i.View.applyAttributeBindings(r, l, t), void 0) : (i.removeObserver(c.root, c.path, f), void 0) | |
}, "this" === h || c.isKeyword && "" === c.path || n.registerObserver(c.root, c.path, d), "string" === m || "number" === m && !isNaN(p) ? r.push(l + '="' + Handlebars.Utils.escapeExpression(p) + '"') : p && "boolean" === m && r.push(l + '="' + l + '"') | |
}, this), r.push("data-bindattr-" + u + '="' + u + '"'), new h.SafeString(r.join(" ")) | |
}), h.registerHelper("bindAttr", function () { | |
return h.helpers["bind-attr"].apply(this, arguments) | |
}), h.bindClasses = function (e, t, n, r, o) { | |
var u, c, h, d = [], | |
f = function (e, t, n) { | |
var r, o = t.path; | |
return r = "this" === o ? e : "" === o ? !0 : a(e, o, n), i.View._classStringForValue(o, r, t.className, t.falsyClassName) | |
}; | |
return l.call(t.split(" "), function (t) { | |
var a, l, p, m, v = i.View._parsePropertyPath(t), | |
g = v.path, | |
y = e; | |
"" !== g && "this" !== g && (m = s(e, g, o.data), y = m.root, g = m.path), l = function () { | |
u = f(e, v, o), h = r ? n.$("[data-bindattr-" + r + "='" + r + "']") : n.$(), h && 0 !== h.length ? (a && h.removeClass(a), u ? (h.addClass(u), a = u) : a = null) : i.removeObserver(y, g, p) | |
}, "" !== g && "this" !== g && n.registerObserver(y, g, l), c = f(e, v, o), c && (d.push(c), a = c) | |
}), d | |
} | |
}(), | |
function () { | |
function e(e, n) { | |
var r = n.hash, | |
o = n.hashTypes; | |
for (var a in r) | |
if ("ID" === o[a]) { | |
var s = r[a]; | |
i.IS_BINDING.test(a) || (r[a + "Binding"] = s, o[a + "Binding"] = "STRING", delete r[a], delete o[a]) | |
} | |
r.hasOwnProperty("idBinding") && (r.id = t.get(e, r.idBinding, n), o.id = "STRING", delete r.idBinding, delete o.idBinding) | |
} | |
var t = (i.get, i.set, i.Handlebars), | |
n = /^[a-z]/, | |
r = /^view\./; | |
t.ViewHelper = i.Object.create({ | |
propertiesFromHTMLOptions: function (e) { | |
var t = e.hash, | |
n = e.data, | |
r = {}, o = t["class"], | |
a = !1; | |
t.id && (r.elementId = t.id, a = !0), t.tag && (r.tagName = t.tag, a = !0), o && (o = o.split(" "), r.classNames = o, a = !0), t.classBinding && (r.classNameBindings = t.classBinding.split(" "), a = !0), t.classNameBindings && (void 0 === r.classNameBindings && (r.classNameBindings = []), r.classNameBindings = r.classNameBindings.concat(t.classNameBindings.split(" ")), a = !0), t.attributeBindings && (r.attributeBindings = null, a = !0), a && (t = i.$.extend({}, t), delete t.id, delete t.tag, delete t["class"], delete t.classBinding); | |
var s; | |
for (var u in t) t.hasOwnProperty(u) && i.IS_BINDING.test(u) && "string" == typeof t[u] && (s = this.contextualizeBindingPath(t[u], n), s && (t[u] = s)); | |
if (r.classNameBindings) | |
for (var l in r.classNameBindings) { | |
var c = r.classNameBindings[l]; | |
if ("string" == typeof c) { | |
var h = i.View._parsePropertyPath(c); | |
s = this.contextualizeBindingPath(h.path, n), s && (r.classNameBindings[l] = s + h.classNames) | |
} | |
} | |
return i.$.extend(t, r) | |
}, | |
contextualizeBindingPath: function (e, t) { | |
var n = i.Handlebars.normalizePath(null, e, t); | |
return n.isKeyword ? "templateData.keywords." + e : i.isGlobalPath(e) ? null : "this" === e || "" === e ? "_parentView.context" : "_parentView.context." + e | |
}, | |
helper: function (i, o, a) { | |
var s, u = a.data, | |
l = a.fn; | |
e(i, a), s = "string" == typeof o ? "STRING" === a.types[0] && n.test(o) && !r.test(o) ? u.view.container.lookupFactory("view:" + o) : t.get(i, o, a) : o; | |
var c = this.propertiesFromHTMLOptions(a, i), | |
h = u.view; | |
c.templateData = u; | |
var d = s.proto ? s.proto() : s; | |
l && (c.template = l), d.controller || d.controllerBinding || c.controller || c.controllerBinding || (c._context = i), h.appendChild(s, c) | |
} | |
}), t.registerHelper("view", function (e, n) { | |
return e && e.data && e.data.isRenderData && (n = e, e = "Ember.View"), t.ViewHelper.helper(this, e, n) | |
}) | |
}(), | |
function () { | |
{ | |
var e = i.get, | |
t = i.Handlebars.get; | |
i.String.fmt | |
} | |
i.Handlebars.registerHelper("collection", function (n, r) { | |
n && n.data && n.data.isRenderData && (r = n, n = void 0); { | |
var o, a, s, u = r.fn, | |
l = r.data, | |
c = r.inverse; | |
r.data.view | |
} | |
n ? (o = l.keywords.controller, a = o && o.container, s = t(this, n, r) || a.lookupFactory("view:" + n)) : s = i.CollectionView; | |
var h, d, f = r.hash, | |
p = {}, m = s.proto(); | |
f.itemView ? (o = l.keywords.controller, a = o.container, d = a.lookupFactory("view:" + f.itemView)) : d = f.itemViewClass ? t(m, f.itemViewClass, r) : m.itemViewClass, delete f.itemViewClass, delete f.itemView; | |
for (var v in f) f.hasOwnProperty(v) && (h = v.match(/^item(.)(.*)$/), h && "itemController" !== v && (p[h[1].toLowerCase() + h[2]] = f[v], delete f[v])); | |
u && (p.template = u, delete r.fn); | |
var g; | |
c && c !== i.Handlebars.VM.noop ? (g = e(m, "emptyViewClass"), g = g.extend({ | |
template: c, | |
tagName: p.tagName | |
})) : f.emptyViewClass && (g = t(this, f.emptyViewClass, r)), g && (f.emptyView = g), f.keyword || (p._context = i.computed.alias("content")); | |
var y = i.Handlebars.ViewHelper.propertiesFromHTMLOptions({ | |
data: l, | |
hash: p | |
}, this); | |
return f.itemViewClass = d.extend(y), i.Handlebars.helpers.view.call(this, s, r) | |
}) | |
}(), | |
function () { | |
var e = i.Handlebars.get; | |
i.Handlebars.registerHelper("unbound", function (t, n) { | |
var r, o, a, s = arguments[arguments.length - 1]; | |
return arguments.length > 2 ? (s.data.isUnbound = !0, r = i.Handlebars.helpers[arguments[0]] || i.Handlebars.helpers.helperMissing, a = r.apply(this, Array.prototype.slice.call(arguments, 1)), delete s.data.isUnbound, a) : (o = n.contexts && n.contexts.length ? n.contexts[0] : this, e(o, t, n)) | |
}) | |
}(), | |
function () { | |
var e = (i.get, i.Handlebars.get), | |
t = i.Handlebars.normalizePath, | |
n = [].slice; | |
i.Handlebars.registerHelper("log", function () { | |
var r = n.call(arguments, 0, -1), | |
o = arguments[arguments.length - 1], | |
a = i.Logger.log, | |
s = [], | |
u = !1; | |
u = !0; | |
for (var l = 0; l < r.length; l++) { | |
var c = o.types[l]; | |
if ("ID" !== c && u) s.push(r[l]); | |
else { | |
var h = o.contexts && o.contexts[l] || this, | |
d = t(h, r[l], o.data); | |
"this" === d.path ? s.push(d.root) : s.push(e(d.root, d.path, o)) | |
} | |
} | |
a.apply(a, s) | |
}), i.Handlebars.registerHelper("debugger", function () { | |
{ | |
var e = this; | |
i.inspect(e) | |
} | |
}) | |
}(), | |
function () { | |
{ | |
var e = i.get, | |
t = i.set; | |
i.String.fmt | |
} | |
i.Handlebars.EachView = i.CollectionView.extend(i._Metamorph, { | |
init: function () { | |
var n, r = e(this, "itemController"); | |
if (r) { | |
var o = e(this, "controller.container").lookupFactory("controller:array").create({ | |
_isVirtual: !0, | |
parentController: e(this, "controller"), | |
itemController: r, | |
target: e(this, "controller"), | |
_eachView: this | |
}); | |
this.disableContentObservers(function () { | |
t(this, "content", o), n = new i.Binding("content", "_eachView.dataSource").oneWay(), n.connect(o) | |
}), t(this, "_arrayController", o) | |
} else this.disableContentObservers(function () { | |
n = new i.Binding("content", "dataSource").oneWay(), n.connect(this) | |
}); | |
return this._super() | |
}, | |
_assertArrayLike: function () {}, | |
disableContentObservers: function (e) { | |
i.removeBeforeObserver(this, "content", null, "_contentWillChange"), i.removeObserver(this, "content", null, "_contentDidChange"), e.call(this), i.addBeforeObserver(this, "content", null, "_contentWillChange"), i.addObserver(this, "content", null, "_contentDidChange") | |
}, | |
itemViewClass: i._MetamorphView, | |
emptyViewClass: i._MetamorphView, | |
createChildView: function (n, r) { | |
n = this._super(n, r); | |
var o = e(this, "keyword"), | |
a = e(n, "content"); | |
if (o) { | |
var s = e(n, "templateData"); | |
s = i.copy(s), s.keywords = n.cloneKeywords(), t(n, "templateData", s), s.keywords[o] = a | |
} | |
return a && a.isController && t(n, "controller", a), n | |
}, | |
destroy: function () { | |
if (this._super()) { | |
var t = e(this, "_arrayController"); | |
return t && t.destroy(), this | |
} | |
} | |
}); | |
var n = i.Handlebars.GroupedEach = function (e, t, n) { | |
var r = this, | |
o = i.Handlebars.normalizePath(e, t, n.data); | |
this.context = e, this.path = t, this.options = n, this.template = n.fn, this.containingView = n.data.view, this.normalizedRoot = o.root, this.normalizedPath = o.path, this.content = this.lookupContent(), this.addContentObservers(), this.addArrayObservers(), this.containingView.on("willClearRender", function () { | |
r.destroy() | |
}) | |
}; | |
n.prototype = { | |
contentWillChange: function () { | |
this.removeArrayObservers() | |
}, | |
contentDidChange: function () { | |
this.content = this.lookupContent(), this.addArrayObservers(), this.rerenderContainingView() | |
}, | |
contentArrayWillChange: i.K, | |
contentArrayDidChange: function () { | |
this.rerenderContainingView() | |
}, | |
lookupContent: function () { | |
return i.Handlebars.get(this.normalizedRoot, this.normalizedPath, this.options) | |
}, | |
addArrayObservers: function () { | |
this.content && this.content.addArrayObserver(this, { | |
willChange: "contentArrayWillChange", | |
didChange: "contentArrayDidChange" | |
}) | |
}, | |
removeArrayObservers: function () { | |
this.content && this.content.removeArrayObserver(this, { | |
willChange: "contentArrayWillChange", | |
didChange: "contentArrayDidChange" | |
}) | |
}, | |
addContentObservers: function () { | |
i.addBeforeObserver(this.normalizedRoot, this.normalizedPath, this, this.contentWillChange), i.addObserver(this.normalizedRoot, this.normalizedPath, this, this.contentDidChange) | |
}, | |
removeContentObservers: function () { | |
i.removeBeforeObserver(this.normalizedRoot, this.normalizedPath, this.contentWillChange), i.removeObserver(this.normalizedRoot, this.normalizedPath, this.contentDidChange) | |
}, | |
render: function () { | |
if (this.content) { | |
var t = this.content, | |
n = e(t, "length"), | |
r = this.options.data, | |
i = this.template; | |
r.insideEach = !0; | |
for (var o = 0; n > o; o++) i(t.objectAt(o), { | |
data: r | |
}) | |
} | |
}, | |
rerenderContainingView: function () { | |
var e = this; | |
i.run.scheduleOnce("render", this, function () { | |
e.destroyed || e.containingView.rerender() | |
}) | |
}, | |
destroy: function () { | |
this.removeContentObservers(), this.content && this.removeArrayObservers(), this.destroyed = !0 | |
} | |
}, i.Handlebars.registerHelper("each", function (e, t) { | |
if (4 === arguments.length) { | |
var n = arguments[0]; | |
t = arguments[3], e = arguments[2], "" === e && (e = "this"), t.hash.keyword = n | |
} | |
return 1 === arguments.length && (t = e, e = "this"), t.hash.dataSourceBinding = e, !t.data.insideGroup || t.hash.groupedRows || t.hash.itemViewClass ? i.Handlebars.helpers.collection.call(this, "Ember.Handlebars.EachView", t) : (new i.Handlebars.GroupedEach(this, e, t).render(), void 0) | |
}) | |
}(), | |
function () { | |
i.Handlebars.registerHelper("template", function () { | |
return i.Handlebars.helpers.partial.apply(this, arguments) | |
}) | |
}(), | |
function () { | |
function e(e) { | |
return !i.isNone(e) | |
} | |
function t(e, t, n) { | |
var r = t.split("/"), | |
i = r[r.length - 1]; | |
r[r.length - 1] = "_" + i; | |
var o = n.data.view, | |
a = r.join("/"), | |
s = o.templateForName(a), | |
u = !s && o.templateForName(t); | |
(s = s || u)(e, { | |
data: n.data | |
}) | |
} | |
i.Handlebars.registerHelper("partial", function (n, r) { | |
var o = r.contexts && r.contexts.length ? r.contexts[0] : this; | |
return "ID" === r.types[0] ? (r.fn = function (e, r) { | |
var o = i.Handlebars.get(e, n, r); | |
t(e, o, r) | |
}, i.Handlebars.bind.call(o, n, r, !0, e)) : (t(o, n, r), void 0) | |
}) | |
}(), | |
function () { | |
{ | |
var e = i.get; | |
i.set | |
} | |
i.Handlebars.registerHelper("yield", function (t) { | |
for (var n = t.data.view; n && !e(n, "layout");) n = n._contextView ? n._contextView : e(n, "parentView"); | |
n._yield(this, t) | |
}) | |
}(), | |
function () { | |
i.Handlebars.registerHelper("loc", function (e) { | |
return i.String.loc(e) | |
}) | |
}(), | |
function () { | |
{ | |
var e = i.set; | |
i.get | |
} | |
i.Checkbox = i.View.extend({ | |
classNames: ["ember-checkbox"], | |
tagName: "input", | |
attributeBindings: ["type", "checked", "indeterminate", "disabled", "tabindex", "name", "autofocus", "form"], | |
type: "checkbox", | |
checked: !1, | |
disabled: !1, | |
indeterminate: !1, | |
init: function () { | |
this._super(), this.on("change", this, this._updateElementValue) | |
}, | |
didInsertElement: function () { | |
this._super(), this.get("element").indeterminate = !! this.get("indeterminate") | |
}, | |
_updateElementValue: function () { | |
e(this, "checked", this.$().prop("checked")) | |
} | |
}) | |
}(), | |
function () { | |
function e(e, n, r) { | |
var i = t(n, e), | |
o = t(n, "onEvent"), | |
a = t(n, "value"); | |
(o === e || "keyPress" === o && "key-press" === e) && n.sendAction("action", a), n.sendAction(e, a), (i || o === e) && (t(n, "bubbles") || r.stopPropagation()) | |
} | |
var t = i.get, | |
n = i.set; | |
i.TextSupport = i.Mixin.create(i.TargetActionSupport, { | |
value: "", | |
attributeBindings: ["placeholder", "disabled", "maxlength", "tabindex", "readonly", "autofocus", "form", "selectionDirection", "spellcheck", "required"], | |
placeholder: null, | |
disabled: !1, | |
maxlength: null, | |
init: function () { | |
this._super(), this.on("focusOut", this, this._elementValueDidChange), this.on("change", this, this._elementValueDidChange), this.on("paste", this, this._elementValueDidChange), this.on("cut", this, this._elementValueDidChange), this.on("input", this, this._elementValueDidChange), this.on("keyUp", this, this.interpretKeyEvents) | |
}, | |
action: null, | |
onEvent: "enter", | |
bubbles: !1, | |
interpretKeyEvents: function (e) { | |
var t = i.TextSupport.KEY_EVENTS, | |
n = t[e.keyCode]; | |
return this._elementValueDidChange(), n ? this[n](e) : void 0 | |
}, | |
_elementValueDidChange: function () { | |
n(this, "value", this.$().val()) | |
}, | |
insertNewline: function (t) { | |
e("enter", this, t), e("insert-newline", this, t) | |
}, | |
cancel: function (t) { | |
e("escape-press", this, t) | |
}, | |
focusIn: function (t) { | |
e("focus-in", this, t) | |
}, | |
focusOut: function (t) { | |
e("focus-out", this, t) | |
}, | |
keyPress: function (t) { | |
e("key-press", this, t) | |
} | |
}), i.TextSupport.KEY_EVENTS = { | |
13: "insertNewline", | |
27: "cancel" | |
} | |
}(), | |
function () { | |
i.get, i.set; | |
i.TextField = i.Component.extend(i.TextSupport, { | |
classNames: ["ember-text-field"], | |
tagName: "input", | |
attributeBindings: ["type", "value", "size", "pattern", "name", "min", "max", "accept", "autocomplete", "autosave", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "inputmode", "list", "multiple", "pattern", "step", "width"], | |
value: "", | |
type: "text", | |
size: null, | |
pattern: null, | |
min: null, | |
max: null | |
}) | |
}(), | |
function () { | |
{ | |
var e = i.get; | |
i.set | |
} | |
i.TextArea = i.Component.extend(i.TextSupport, { | |
classNames: ["ember-text-area"], | |
tagName: "textarea", | |
attributeBindings: ["rows", "cols", "name", "selectionEnd", "selectionStart", "wrap"], | |
rows: null, | |
cols: null, | |
_updateElementValue: i.observer("value", function () { | |
var t = e(this, "value"), | |
n = this.$(); | |
n && t !== n.val() && n.val(t) | |
}), | |
init: function () { | |
this._super(), this.on("didInsertElement", this, this._updateElementValue) | |
} | |
}) | |
}(), | |
function () { | |
{ | |
var e = i.set, | |
t = i.get, | |
n = i.EnumerableUtils.indexOf, | |
r = i.EnumerableUtils.indexesOf, | |
o = i.EnumerableUtils.forEach, | |
a = i.EnumerableUtils.replace, | |
s = i.isArray; | |
i.Handlebars.compile | |
} | |
i.SelectOption = i.View.extend({ | |
tagName: "option", | |
attributeBindings: ["value", "selected"], | |
defaultTemplate: function (e, t) { | |
t = { | |
data: t.data, | |
hash: {} | |
}, i.Handlebars.helpers.bind.call(e, "view.label", t) | |
}, | |
init: function () { | |
this.labelPathDidChange(), this.valuePathDidChange(), this._super() | |
}, | |
selected: i.computed(function () { | |
var e = t(this, "content"), | |
r = t(this, "parentView.selection"); | |
return t(this, "parentView.multiple") ? r && n(r, e.valueOf()) > -1 : e == r | |
}).property("content", "parentView.selection"), | |
labelPathDidChange: i.observer("parentView.optionLabelPath", function () { | |
var e = t(this, "parentView.optionLabelPath"); | |
e && i.defineProperty(this, "label", i.computed(function () { | |
return t(this, e) | |
}).property(e)) | |
}), | |
valuePathDidChange: i.observer("parentView.optionValuePath", function () { | |
var e = t(this, "parentView.optionValuePath"); | |
e && i.defineProperty(this, "value", i.computed(function () { | |
return t(this, e) | |
}).property(e)) | |
}) | |
}), i.SelectOptgroup = i.CollectionView.extend({ | |
tagName: "optgroup", | |
attributeBindings: ["label"], | |
selectionBinding: "parentView.selection", | |
multipleBinding: "parentView.multiple", | |
optionLabelPathBinding: "parentView.optionLabelPath", | |
optionValuePathBinding: "parentView.optionValuePath", | |
itemViewClassBinding: "parentView.optionView" | |
}), i.Select = i.View.extend({ | |
tagName: "select", | |
classNames: ["ember-select"], | |
defaultTemplate: i.Handlebars.template(function (e, t, n, r, o) { | |
function a(e, t) { | |
var r, i = ""; | |
return t.buffer.push('<option value="">'), r = n._triageMustache.call(e, "view.prompt", { | |
hash: {}, | |
hashTypes: {}, | |
hashContexts: {}, | |
contexts: [e], | |
types: ["ID"], | |
data: t | |
}), (r || 0 === r) && t.buffer.push(r), t.buffer.push("</option>"), i | |
} | |
function s(e, t) { | |
var r; | |
r = n.each.call(e, "view.groupedContent", { | |
hash: {}, | |
hashTypes: {}, | |
hashContexts: {}, | |
inverse: p.noop, | |
fn: p.program(4, u, t), | |
contexts: [e], | |
types: ["ID"], | |
data: t | |
}), r || 0 === r ? t.buffer.push(r) : t.buffer.push("") | |
} | |
function u(e, t) { | |
t.buffer.push(f(n.view.call(e, "view.groupView", { | |
hash: { | |
content: "content", | |
label: "label" | |
}, | |
hashTypes: { | |
content: "ID", | |
label: "ID" | |
}, | |
hashContexts: { | |
content: e, | |
label: e | |
}, | |
contexts: [e], | |
types: ["ID"], | |
data: t | |
}))) | |
} | |
function l(e, t) { | |
var r; | |
r = n.each.call(e, "view.content", { | |
hash: {}, | |
hashTypes: {}, | |
hashContexts: {}, | |
inverse: p.noop, | |
fn: p.program(7, c, t), | |
contexts: [e], | |
types: ["ID"], | |
data: t | |
}), r || 0 === r ? t.buffer.push(r) : t.buffer.push("") | |
} | |
function c(e, t) { | |
t.buffer.push(f(n.view.call(e, "view.optionView", { | |
hash: { | |
content: "" | |
}, | |
hashTypes: { | |
content: "ID" | |
}, | |
hashContexts: { | |
content: e | |
}, | |
contexts: [e], | |
types: ["ID"], | |
data: t | |
}))) | |
} | |
this.compilerInfo = [4, ">= 1.0.0"], n = this.merge(n, i.Handlebars.helpers), o = o || {}; | |
var h, d = "", | |
f = this.escapeExpression, | |
p = this; | |
return h = n["if"].call(t, "view.prompt", { | |
hash: {}, | |
hashTypes: {}, | |
hashContexts: {}, | |
inverse: p.noop, | |
fn: p.program(1, a, o), | |
contexts: [t], | |
types: ["ID"], | |
data: o | |
}), (h || 0 === h) && o.buffer.push(h), h = n["if"].call(t, "view.optionGroupPath", { | |
hash: {}, | |
hashTypes: {}, | |
hashContexts: {}, | |
inverse: p.program(6, l, o), | |
fn: p.program(3, s, o), | |
contexts: [t], | |
types: ["ID"], | |
data: o | |
}), (h || 0 === h) && o.buffer.push(h), d | |
}), | |
attributeBindings: ["multiple", "disabled", "tabindex", "name", "required", "autofocus", "form", "size"], | |
multiple: !1, | |
disabled: !1, | |
required: !1, | |
content: null, | |
selection: null, | |
value: i.computed(function (e, n) { | |
if (2 === arguments.length) return n; | |
var r = t(this, "optionValuePath").replace(/^content\.?/, ""); | |
return r ? t(this, "selection." + r) : t(this, "selection") | |
}).property("selection"), | |
prompt: null, | |
optionLabelPath: "content", | |
optionValuePath: "content", | |
optionGroupPath: null, | |
groupView: i.SelectOptgroup, | |
groupedContent: i.computed(function () { | |
var e = t(this, "optionGroupPath"), | |
n = i.A(), | |
r = t(this, "content") || []; | |
return o(r, function (r) { | |
var o = t(r, e); | |
t(n, "lastObject.label") !== o && n.pushObject({ | |
label: o, | |
content: i.A() | |
}), t(n, "lastObject.content").push(r) | |
}), n | |
}).property("optionGroupPath", "content.@each"), | |
optionView: i.SelectOption, | |
_change: function () { | |
t(this, "multiple") ? this._changeMultiple() : this._changeSingle() | |
}, | |
selectionDidChange: i.observer("selection.@each", function () { | |
var n = t(this, "selection"); | |
if (t(this, "multiple")) { | |
if (!s(n)) return e(this, "selection", i.A([n])), void 0; | |
this._selectionDidChangeMultiple() | |
} else this._selectionDidChangeSingle() | |
}), | |
valueDidChange: i.observer("value", function () { | |
var e, n = t(this, "content"), | |
r = t(this, "value"), | |
i = t(this, "optionValuePath").replace(/^content\.?/, ""), | |
o = i ? t(this, "selection." + i) : t(this, "selection"); | |
r !== o && (e = n ? n.find(function (e) { | |
return r === (i ? t(e, i) : e) | |
}) : null, this.set("selection", e)) | |
}), | |
_triggerChange: function () { | |
var e = t(this, "selection"), | |
n = t(this, "value"); | |
i.isNone(e) || this.selectionDidChange(), i.isNone(n) || this.valueDidChange(), this._change() | |
}, | |
_changeSingle: function () { | |
var n = this.$()[0].selectedIndex, | |
r = t(this, "content"), | |
i = t(this, "prompt"); | |
if (r && t(r, "length")) { | |
if (i && 0 === n) return e(this, "selection", null), void 0; | |
i && (n -= 1), e(this, "selection", r.objectAt(n)) | |
} | |
}, | |
_changeMultiple: function () { | |
var n = this.$("option:selected"), | |
r = t(this, "prompt"), | |
i = r ? 1 : 0, | |
o = t(this, "content"), | |
u = t(this, "selection"); | |
if (o && n) { | |
var l = n.map(function () { | |
return this.index - i | |
}).toArray(), | |
c = o.objectsAt(l); | |
s(u) ? a(u, 0, t(u, "length"), c) : e(this, "selection", c) | |
} | |
}, | |
_selectionDidChangeSingle: function () { | |
var e = this.get("element"); | |
if (e) { | |
var r = t(this, "content"), | |
i = t(this, "selection"), | |
o = r ? n(r, i) : -1, | |
a = t(this, "prompt"); | |
a && (o += 1), e && (e.selectedIndex = o) | |
} | |
}, | |
_selectionDidChangeMultiple: function () { | |
var e, i = t(this, "content"), | |
o = t(this, "selection"), | |
a = i ? r(i, o) : [-1], | |
s = t(this, "prompt"), | |
u = s ? 1 : 0, | |
l = this.$("option"); | |
l && l.each(function () { | |
e = this.index > -1 ? this.index - u : -1, this.selected = n(a, e) > -1 | |
}) | |
}, | |
init: function () { | |
this._super(), this.on("didInsertElement", this, this._triggerChange), this.on("change", this, this._change) | |
} | |
}) | |
}(), | |
function () { | |
i.Handlebars.registerHelper("input", function (e) { | |
var t = e.hash, | |
n = (e.hashTypes, t.type), | |
r = t.on; | |
return delete t.type, delete t.on, "checkbox" === n ? i.Handlebars.helpers.view.call(this, i.Checkbox, e) : (n && (t.type = n), t.onEvent = r || "enter", i.Handlebars.helpers.view.call(this, i.TextField, e)) | |
}), i.Handlebars.registerHelper("textarea", function (e) { | |
e.hash, e.hashTypes; | |
return i.Handlebars.helpers.view.call(this, i.TextArea, e) | |
}) | |
}(), | |
function () { | |
i.ComponentLookup = i.Object.extend({ | |
lookupFactory: function (e, t) { | |
t = t || this.container; | |
var n = "component:" + e, | |
r = "template:components/" + e, | |
o = t && t.has(r); | |
o && t.injection(n, "layout", r); | |
var a = t.lookupFactory(n); | |
return o || a ? (a || (t.register(n, i.Component), a = t.lookupFactory(n)), a) : void 0 | |
} | |
}) | |
}(), | |
function () { | |
function e() { | |
i.Handlebars.bootstrap(i.$(document)) | |
} | |
function t(e) { | |
e.register("component-lookup:main", i.ComponentLookup) | |
} | |
i.Handlebars.bootstrap = function (e) { | |
var t = 'script[type="text/x-handlebars"], script[type="text/x-raw-handlebars"]'; | |
i.$(t, e).each(function () { | |
var e = i.$(this), | |
t = "text/x-raw-handlebars" === e.attr("type") ? i.$.proxy(Handlebars.compile, Handlebars) : i.$.proxy(i.Handlebars.compile, i.Handlebars), | |
n = e.attr("data-template-name") || e.attr("id") || "application", | |
r = t(e.html()); | |
if (void 0 !== i.TEMPLATES[n]) throw new i.Error('Template named "' + n + '" already exists.'); | |
i.TEMPLATES[n] = r, e.remove() | |
}) | |
}, i.onLoad("Ember.Application", function (n) { | |
n.initializer({ | |
name: "domTemplates", | |
initialize: e | |
}), n.initializer({ | |
name: "registerComponentLookup", | |
after: "domTemplates", | |
initialize: t | |
}) | |
}) | |
}(), | |
function () { | |
i.runLoadHooks("Ember.Handlebars", i.Handlebars) | |
}(), | |
function () { | |
e("route-recognizer", ["exports"], function () { | |
function e(e) { | |
return "[object Array]" === Object.prototype.toString.call(e) | |
} | |
function t(e) { | |
this.string = e | |
} | |
function n(e) { | |
this.name = e | |
} | |
function r(e) { | |
this.name = e | |
} | |
function i() {} | |
function o(e, o, a) { | |
"/" === e.charAt(0) && (e = e.substr(1)); | |
for (var s = e.split("/"), u = [], l = 0, c = s.length; c > l; l++) { | |
var h, d = s[l]; | |
(h = d.match(/^:([^\/]+)$/)) ? (u.push(new n(h[1])), o.push(h[1]), a.dynamics++) : (h = d.match(/^\*([^\/]+)$/)) ? (u.push(new r(h[1])), o.push(h[1]), a.stars++) : "" === d ? u.push(new i) : (u.push(new t(d)), a.statics++) | |
} | |
return u | |
} | |
function a(e) { | |
this.charSpec = e, this.nextStates = [] | |
} | |
function s(e) { | |
return e.sort(function (e, t) { | |
if (e.types.stars !== t.types.stars) return e.types.stars - t.types.stars; | |
if (e.types.stars) { | |
if (e.types.statics !== t.types.statics) return t.types.statics - e.types.statics; | |
if (e.types.dynamics !== t.types.dynamics) return t.types.dynamics - e.types.dynamics | |
} | |
return e.types.dynamics !== t.types.dynamics ? e.types.dynamics - t.types.dynamics : e.types.statics !== t.types.statics ? t.types.statics - e.types.statics : 0 | |
}) | |
} | |
function u(e, t) { | |
for (var n = [], r = 0, i = e.length; i > r; r++) { | |
var o = e[r]; | |
n = n.concat(o.match(t)) | |
} | |
return n | |
} | |
function l(e) { | |
this.queryParams = e || {} | |
} | |
function c(e, t, n) { | |
for (var r = e.handlers, i = e.regex, o = t.match(i), a = 1, s = new l(n), u = 0, c = r.length; c > u; u++) { | |
for (var h = r[u], d = h.names, f = {}, p = 0, m = d.length; m > p; p++) f[d[p]] = o[a++]; | |
s.push({ | |
handler: h.handler, | |
params: f, | |
isDynamic: !! d.length | |
}) | |
} | |
return s | |
} | |
function h(e, t) { | |
return t.eachChar(function (t) { | |
e = e.put(t) | |
}), e | |
} | |
function d(e, t, n) { | |
this.path = e, this.matcher = t, this.delegate = n | |
} | |
function f(e) { | |
this.routes = {}, this.children = {}, this.target = e | |
} | |
function p(e, t, n) { | |
return function (r, i) { | |
var o = e + r; | |
return i ? (i(p(o, t, n)), void 0) : new d(e + r, t, n) | |
} | |
} | |
function m(e, t, n) { | |
for (var r = 0, i = 0, o = e.length; o > i; i++) r += e[i].path.length; | |
t = t.substr(r); | |
var a = { | |
path: t, | |
handler: n | |
}; | |
e.push(a) | |
} | |
function v(e, t, n, r) { | |
var i = t.routes; | |
for (var o in i) | |
if (i.hasOwnProperty(o)) { | |
var a = e.slice(); | |
m(a, o, i[o]), t.children[o] ? v(a, t.children[o], n, r) : n.call(r, a) | |
} | |
} | |
var g = arguments, | |
y = g[g.length - 1], | |
_ = ["/", ".", "*", "+", "?", "|", "(", ")", "[", "]", "{", "}", "\\"], | |
b = new RegExp("(\\" + _.join("|\\") + ")", "g"); | |
t.prototype = { | |
eachChar: function (e) { | |
for (var t, n = this.string, r = 0, i = n.length; i > r; r++) t = n.charAt(r), e({ | |
validChars: t | |
}) | |
}, | |
regex: function () { | |
return this.string.replace(b, "\\$1") | |
}, | |
generate: function () { | |
return this.string | |
} | |
}, n.prototype = { | |
eachChar: function (e) { | |
e({ | |
invalidChars: "/", | |
repeat: !0 | |
}) | |
}, | |
regex: function () { | |
return "([^/]+)" | |
}, | |
generate: function (e) { | |
return e[this.name] | |
} | |
}, r.prototype = { | |
eachChar: function (e) { | |
e({ | |
invalidChars: "", | |
repeat: !0 | |
}) | |
}, | |
regex: function () { | |
return "(.+)" | |
}, | |
generate: function (e) { | |
return e[this.name] | |
} | |
}, i.prototype = { | |
eachChar: function () {}, | |
regex: function () { | |
return "" | |
}, | |
generate: function () { | |
return "" | |
} | |
}, a.prototype = { | |
get: function (e) { | |
for (var t = this.nextStates, n = 0, r = t.length; r > n; n++) { | |
var i = t[n], | |
o = i.charSpec.validChars === e.validChars; | |
if (o = o && i.charSpec.invalidChars === e.invalidChars) return i | |
} | |
}, | |
put: function (e) { | |
var t; | |
return (t = this.get(e)) ? t : (t = new a(e), this.nextStates.push(t), e.repeat && t.nextStates.push(t), t) | |
}, | |
match: function (e) { | |
for (var t, n, r, i = this.nextStates, o = [], a = 0, s = i.length; s > a; a++) t = i[a], n = t.charSpec, "undefined" != typeof (r = n.validChars) ? -1 !== r.indexOf(e) && o.push(t) : "undefined" != typeof (r = n.invalidChars) && -1 === r.indexOf(e) && o.push(t); | |
return o | |
} | |
}; | |
var w = Object.create || function (e) { | |
function t() {} | |
return t.prototype = e, new t | |
}; | |
l.prototype = w({ | |
splice: Array.prototype.splice, | |
slice: Array.prototype.slice, | |
push: Array.prototype.push, | |
length: 0, | |
queryParams: null | |
}); | |
var C = function () { | |
this.rootState = new a, this.names = {} | |
}; | |
C.prototype = { | |
add: function (e, t) { | |
for (var n, r = this.rootState, a = "^", s = { | |
statics: 0, | |
dynamics: 0, | |
stars: 0 | |
}, u = [], l = [], c = !0, d = 0, f = e.length; f > d; d++) { | |
var p = e[d], | |
m = [], | |
v = o(p.path, m, s); | |
l = l.concat(v); | |
for (var g = 0, y = v.length; y > g; g++) { | |
var _ = v[g]; | |
_ instanceof i || (c = !1, r = r.put({ | |
validChars: "/" | |
}), a += "/", r = h(r, _), a += _.regex()) | |
} | |
var b = { | |
handler: p.handler, | |
names: m | |
}; | |
u.push(b) | |
} | |
c && (r = r.put({ | |
validChars: "/" | |
}), a += "/"), r.handlers = u, r.regex = new RegExp(a + "$"), r.types = s, (n = t && t.as) && (this.names[n] = { | |
segments: l, | |
handlers: u | |
}) | |
}, | |
handlersFor: function (e) { | |
var t = this.names[e], | |
n = []; | |
if (!t) throw new Error("There is no route named " + e); | |
for (var r = 0, i = t.handlers.length; i > r; r++) n.push(t.handlers[r]); | |
return n | |
}, | |
hasRoute: function (e) { | |
return !!this.names[e] | |
}, | |
generate: function (e, t) { | |
var n = this.names[e], | |
r = ""; | |
if (!n) throw new Error("There is no route named " + e); | |
for (var o = n.segments, a = 0, s = o.length; s > a; a++) { | |
var u = o[a]; | |
u instanceof i || (r += "/", r += u.generate(t)) | |
} | |
return "/" !== r.charAt(0) && (r = "/" + r), t && t.queryParams && (r += this.generateQueryString(t.queryParams, n.handlers)), r | |
}, | |
generateQueryString: function (t) { | |
var n = [], | |
r = []; | |
for (var i in t) t.hasOwnProperty(i) && r.push(i); | |
r.sort(); | |
for (var o = 0, a = r.length; a > o; o++) { | |
i = r[o]; | |
var s = t[i]; | |
if (s !== !1 && null != s) { | |
var u = i; | |
if (e(s)) | |
for (var l = 0, c = s.length; c > l; l++) { | |
var h = i + "[]=" + encodeURIComponent(s[l]); | |
n.push(h) | |
} else s !== !0 ? (u += "=" + encodeURIComponent(s), n.push(u)) : n.push(u) | |
} | |
} | |
return 0 === n.length ? "" : "?" + n.join("&") | |
}, | |
parseQueryString: function (e) { | |
for (var t = e.split("&"), n = {}, r = 0; r < t.length; r++) { | |
var i, o = t[r].split("="), | |
a = decodeURIComponent(o[0]), | |
s = a.length, | |
u = !1; | |
1 === o.length ? i = !0 : (s > 2 && "[]" === a.slice(s - 2) && (u = !0, a = a.slice(0, s - 2), n[a] || (n[a] = [])), i = o[1] ? decodeURIComponent(o[1]) : ""), u ? n[a].push(i) : n[a] = i | |
} | |
return n | |
}, | |
recognize: function (e) { | |
var t, n, r, i, o = [this.rootState], | |
a = {}, l = !1; | |
if (e = decodeURI(e), i = e.indexOf("?"), -1 !== i) { | |
var h = e.substr(i + 1, e.length); | |
e = e.substr(0, i), a = this.parseQueryString(h) | |
} | |
for ("/" !== e.charAt(0) && (e = "/" + e), t = e.length, t > 1 && "/" === e.charAt(t - 1) && (e = e.substr(0, t - 1), l = !0), n = 0, r = e.length; r > n && (o = u(o, e.charAt(n)), o.length); n++); | |
var d = []; | |
for (n = 0, r = o.length; r > n; n++) o[n].handlers && d.push(o[n]); | |
o = s(d); | |
var f = d[0]; | |
return f && f.handlers ? (l && "(.+)$" === f.regex.source.slice(-5) && (e += "/"), c(f, e, a)) : void 0 | |
} | |
}, y.__d = C, d.prototype = { | |
to: function (e, t) { | |
var n = this.delegate; | |
if (n && n.willAddRoute && (e = n.willAddRoute(this.matcher.target, e)), this.matcher.add(this.path, e), t) { | |
if (0 === t.length) throw new Error("You must have an argument in the function passed to `to`"); | |
this.matcher.addChild(this.path, e, t, this.delegate) | |
} | |
return this | |
} | |
}, f.prototype = { | |
add: function (e, t) { | |
this.routes[e] = t | |
}, | |
addChild: function (e, t, n, r) { | |
var i = new f(t); | |
this.children[e] = i; | |
var o = p(e, i, r); | |
r && r.contextEntered && r.contextEntered(t, o), n(o) | |
} | |
}, C.prototype.map = function (e, t) { | |
var n = new f; | |
e(p("", n, this.delegate)), v([], n, function (e) { | |
t ? t(this, e) : this.add(e) | |
}, this) | |
} | |
}) | |
}(), | |
function () { | |
e("router/handler-info", ["./utils", "rsvp", "exports"], function () { | |
function e(e) { | |
e && u(this, e) | |
} | |
function t(t) { | |
e.call(this, t) | |
} | |
function n(t) { | |
e.call(this, t), this.params = this.params || {} | |
} | |
function r(t) { | |
e.call(this, t) | |
} | |
function i(e, t) { | |
if (!e ^ !t) return !1; | |
if (!e) return !0; | |
for (var n in e) | |
if (e.hasOwnProperty(n) && e[n] !== t[n]) return !1; | |
return !0 | |
} | |
var o = arguments, | |
a = o[o.length - 1], | |
s = o[0].bind, | |
u = o[0].merge, | |
l = o[0].oCreate, | |
c = o[0].serialize, | |
h = o[0].promiseLabel, | |
d = o[1].resolve; | |
e.prototype = { | |
name: null, | |
handler: null, | |
params: null, | |
context: null, | |
log: function (e, t) { | |
e.log && e.log(this.name + ": " + t) | |
}, | |
promiseLabel: function (e) { | |
return h("'" + this.name + "' " + e) | |
}, | |
resolve: function (e, t, n) { | |
var r = s(this.checkForAbort, this, t), | |
i = s(this.runBeforeModelHook, this, e, n), | |
o = s(this.getModel, this, e, n), | |
a = s(this.runAfterModelHook, this, e, n), | |
u = s(this.becomeResolved, this, n); | |
return d(void 0, this.promiseLabel("Start handler")).then(r, null, this.promiseLabel("Check for abort")).then(i, null, this.promiseLabel("Before model")).then(r, null, this.promiseLabel("Check if aborted during 'beforeModel' hook")).then(o, null, this.promiseLabel("Model")).then(r, null, this.promiseLabel("Check if aborted in 'model' hook")).then(a, null, this.promiseLabel("After model")).then(r, null, this.promiseLabel("Check if aborted in 'afterModel' hook")).then(u, null, this.promiseLabel("Become resolved")) | |
}, | |
runBeforeModelHook: function (e, t) { | |
return t.trigger && t.trigger(!0, "willResolveModel", t, this.handler), this.runSharedModelHook(e, t, "beforeModel", []) | |
}, | |
runAfterModelHook: function (e, t, n) { | |
var r = this.name; | |
return this.stashResolvedModel(t, n), this.runSharedModelHook(e, t, "afterModel", [n]).then(function () { | |
return t.resolvedModels[r] | |
}, null, this.promiseLabel("Ignore fulfillment value and return model value")) | |
}, | |
runSharedModelHook: function (e, t, n, r) { | |
this.log(t, "calling " + n + " hook"), this.queryParams && r.push(this.queryParams), r.push(t); | |
var i = this.handler; | |
return e(function () { | |
return i[n] && i[n].apply(i, r) | |
}, this.promiseLabel("Handle " + n)) | |
}, | |
getModel: function () { | |
throw new Error("This should be overridden by a subclass of HandlerInfo") | |
}, | |
checkForAbort: function (e, t) { | |
return d(e(), this.promiseLabel("Check for abort")).then(function () { | |
return t | |
}, null, this.promiseLabel("Ignore fulfillment value and continue")) | |
}, | |
stashResolvedModel: function (e, t) { | |
e.resolvedModels = e.resolvedModels || {}, e.resolvedModels[this.name] = t | |
}, | |
becomeResolved: function (e, n) { | |
var r = this.params || c(this.handler, n, this.names); | |
return e && (this.stashResolvedModel(e, n), e.params = e.params || {}, e.params[this.name] = r), new t({ | |
context: n, | |
name: this.name, | |
handler: this.handler, | |
params: r | |
}) | |
}, | |
shouldSupercede: function (e) { | |
if (!e) return !0; | |
var t = e.context === this.context; | |
return e.name !== this.name || this.hasOwnProperty("context") && !t || this.hasOwnProperty("params") && !i(this.params, e.params) | |
} | |
}, t.prototype = l(e.prototype), t.prototype.resolve = function (e, t, n) { | |
return n && n.resolvedModels && (n.resolvedModels[this.name] = this.context), d(this, this.promiseLabel("Resolve")) | |
}, n.prototype = l(e.prototype), n.prototype.getModel = function (e, t) { | |
var n = this.params; | |
t && t.queryParams && (n = {}, u(n, this.params), n.queryParams = t.queryParams); | |
var r = "function" == typeof this.handler.deserialize ? "deserialize" : "model"; | |
return this.runSharedModelHook(e, t, r, [n]) | |
}, r.prototype = l(e.prototype), r.prototype.getModel = function (e, t) { | |
return this.log(t, this.name + ": resolving provided model"), d(this.context) | |
}, a.HandlerInfo = e, a.ResolvedHandlerInfo = t, a.UnresolvedHandlerInfoByParam = n, a.UnresolvedHandlerInfoByObject = r | |
}), e("router/router", ["route-recognizer", "rsvp", "./utils", "./transition-state", "./transition", "./transition-intent/named-transition-intent", "./transition-intent/url-transition-intent", "exports"], function () { | |
function e() { | |
this.recognizer = new h, this.reset() | |
} | |
function t(e, t, i) { | |
var o = r(e.state, t); | |
g(o.exited, function (e) { | |
var t = e.handler; | |
delete t.context, t.exit && t.exit() | |
}); | |
var a = e.oldState = e.state; | |
e.state = t; | |
var s = e.currentHandlerInfos = o.unchanged.slice(); | |
try { | |
g(o.updatedContext, function (e) { | |
return n(s, e, !1, i) | |
}), g(o.entered, function (e) { | |
return n(s, e, !0, i) | |
}) | |
} catch (l) { | |
throw e.state = a, e.currentHandlerInfos = a.handlerInfos, l | |
} | |
e.state.queryParams = u(e, s, t.queryParams) | |
} | |
function n(e, t, n, r) { | |
var i = t.handler, | |
o = t.context; | |
if (n && i.enter && i.enter(r), r && r.isAborted) throw new x; | |
if (i.context = o, i.contextDidChange && i.contextDidChange(), i.setup && i.setup(o, r), r && r.isAborted) throw new x; | |
return e.push(t), !0 | |
} | |
function r(e, t) { | |
var n, r, i, o, a, s = e.handlerInfos, | |
u = t.handlerInfos, | |
l = { | |
updatedContext: [], | |
exited: [], | |
entered: [], | |
unchanged: [] | |
}; | |
for (o = 0, a = u.length; a > o; o++) { | |
var c = s[o], | |
h = u[o]; | |
c && c.handler === h.handler || (n = !0), n ? (l.entered.push(h), c && l.exited.unshift(c)) : r || c.context !== h.context || i ? (r = !0, l.updatedContext.push(h)) : l.unchanged.push(c) | |
} | |
for (o = u.length, a = s.length; a > o; o++) l.exited.unshift(s[o]); | |
return l | |
} | |
function i(e, t, n) { | |
var r = e.urlMethod; | |
if (r) { | |
for (var i = e.router, o = t.handlerInfos, a = o[o.length - 1].name, s = {}, u = o.length - 1; u >= 0; --u) { | |
var l = o[u]; | |
y(s, l.params), l.handler.inaccessibleByURL && (r = null) | |
} | |
if (r) { | |
s.queryParams = t.queryParams; | |
var c = i.recognizer.generate(a, s); | |
"replaceQuery" === r ? c !== n && i.replaceURL(c) : "replace" === r ? i.replaceURL(c) : i.updateURL(c) | |
} | |
} | |
} | |
function o(e, n) { | |
try { | |
m(e.router, e.sequence, "Resolved all models on destination route; finalizing transition."); { | |
var r = e.router, | |
o = n.handlerInfos; | |
e.sequence | |
} | |
return t(r, n, e), e.isAborted ? (r.state.handlerInfos = r.currentHandlerInfos, d(O(e))) : (i(e, n, e.intent.url), e.isActive = !1, r.activeTransition = null, p(r, r.currentHandlerInfos, !0, ["didTransition"]), r.didTransition && r.didTransition(r.currentHandlerInfos), m(r, e.sequence, "TRANSITION COMPLETE."), o[o.length - 1].handler) | |
} catch (a) { | |
if (!(a instanceof x)) { | |
var s = e.state.handlerInfos; | |
e.trigger(!0, "error", a, e, s[s.length - 1].handler), e.abort() | |
} | |
throw a | |
} | |
} | |
function a(e, t, n) { | |
var r = t[0] || "/", | |
i = t[t.length - 1], | |
o = {}; | |
i && i.hasOwnProperty("queryParams") && (o = S.call(t).queryParams); | |
var a; | |
if (0 === t.length) { | |
m(e, "Updating query params"); | |
var s = e.state.handlerInfos; | |
a = new A({ | |
name: s[s.length - 1].name, | |
contexts: [], | |
queryParams: o | |
}) | |
} else "/" === r.charAt(0) ? (m(e, "Attempting URL transition to " + r), a = new T({ | |
url: r | |
})) : (m(e, "Attempting transition to " + r), a = new A({ | |
name: t[0], | |
contexts: v.call(t, 1), | |
queryParams: o | |
})); | |
return e.transitionByIntent(a, n) | |
} | |
function s(e, t) { | |
if (e.length !== t.length) return !1; | |
for (var n = 0, r = e.length; r > n; ++n) | |
if (e[n] !== t[n]) return !1; | |
return !0 | |
} | |
function u(e, t, n) { | |
var r = []; | |
p(e, t, !0, ["finalizeQueryParamChange", n, r]); | |
for (var i = {}, o = 0, a = r.length; a > o; ++o) { | |
var s = r[o]; | |
i[s.key] = s.value | |
} | |
return i | |
} | |
var l = arguments, | |
c = l[l.length - 1], | |
h = l[0].__d, | |
d = (l[1].resolve, l[1].reject), | |
f = (l[1].async, l[1].Promise), | |
p = l[2].trigger, | |
m = l[2].log, | |
v = l[2].slice, | |
g = l[2].forEach, | |
y = l[2].merge, | |
_ = l[2].serialize, | |
b = l[2].extractQueryParams, | |
w = l[2].getChangelist, | |
C = l[2].promiseLabel, | |
E = l[3].TransitionState, | |
O = l[4].logAbort, | |
P = l[4].Transition, | |
x = l[4].TransitionAborted, | |
A = l[5].NamedTransitionIntent, | |
T = l[6].URLTransitionIntent, | |
S = Array.prototype.pop; | |
e.prototype = { | |
map: function (e) { | |
this.recognizer.delegate = this.delegate, this.recognizer.map(e, function (e, t) { | |
for (var n = t.length - 1, r = !0; n >= 0 && r; --n) { | |
var i = t[n]; | |
e.add(t, { | |
as: i.handler | |
}), r = "/" === i.path || "" === i.path || ".index" === i.handler.slice(-6) | |
} | |
}) | |
}, | |
hasRoute: function (e) { | |
return this.recognizer.hasRoute(e) | |
}, | |
transitionByIntent: function (e, n) { | |
var r, a = !! this.activeTransition, | |
l = a ? this.activeTransition.state : this.state, | |
c = this; | |
try { | |
var h = e.applyToState(l, this.recognizer, this.getHandler, n); | |
if (s(h.handlerInfos, l.handlerInfos)) { | |
var d = w(l.queryParams, h.queryParams); | |
return d ? (this._changedQueryParams = d.changed, p(this, h.handlerInfos, !0, ["queryParamsDidChange", d.changed, d.all, d.removed]), this._changedQueryParams = null, !a && this.activeTransition ? this.activeTransition : (l.queryParams = u(this, h.handlerInfos, h.queryParams), r = new P(this), r.urlMethod = "replace", r.promise = r.promise.then(function (e) { | |
return i(r, l, !0), c.didTransition && c.didTransition(c.currentHandlerInfos), e | |
}, null, C("Transition complete")), r)) : new P(this) | |
} | |
return n ? (t(this, h), void 0) : (r = new P(this, e, h), this.activeTransition && this.activeTransition.abort(), this.activeTransition = r, r.promise = r.promise.then(function (e) { | |
return c.async(function () { | |
return o(r, e.state) | |
}, "Finalize transition") | |
}, null, C("Settle transition promise when transition is finalized")), a || p(this, this.state.handlerInfos, !0, ["willTransition", r]), r) | |
} catch (f) { | |
return new P(this, e, null, f) | |
} | |
}, | |
reset: function () { | |
this.state && g(this.state.handlerInfos, function (e) { | |
var t = e.handler; | |
t.exit && t.exit() | |
}), this.state = new E, this.currentHandlerInfos = null | |
}, | |
activeTransition: null, | |
handleURL: function (e) { | |
var t = v.call(arguments); | |
return "/" !== e.charAt(0) && (t[0] = "/" + e), a(this, t).method("replaceQuery") | |
}, | |
updateURL: function () { | |
throw new Error("updateURL is not implemented") | |
}, | |
replaceURL: function (e) { | |
this.updateURL(e) | |
}, | |
transitionTo: function () { | |
return a(this, arguments) | |
}, | |
intermediateTransitionTo: function () { | |
a(this, arguments, !0) | |
}, | |
refresh: function (e) { | |
for (var t = this.activeTransition ? this.activeTransition.state : this.state, n = t.handlerInfos, r = {}, i = 0, o = n.length; o > i; ++i) { | |
var a = n[i]; | |
r[a.name] = a.params || {} | |
} | |
m(this, "Starting a refresh transition"); | |
var s = new A({ | |
name: n[n.length - 1].name, | |
pivotHandler: e || n[0].handler, | |
contexts: [], | |
queryParams: this._changedQueryParams || t.queryParams || {} | |
}); | |
return this.transitionByIntent(s, !1) | |
}, | |
replaceWith: function () { | |
return a(this, arguments).method("replace") | |
}, | |
generate: function (e) { | |
for (var t = b(v.call(arguments, 1)), n = t[0], r = t[1], i = new A({ | |
name: e, | |
contexts: n | |
}), o = i.applyToState(this.state, this.recognizer, this.getHandler), a = {}, s = 0, u = o.handlerInfos.length; u > s; ++s) { | |
var l = o.handlerInfos[s], | |
c = l.params || _(l.handler, l.context, l.names); | |
y(a, c) | |
} | |
return a.queryParams = r, this.recognizer.generate(e, a) | |
}, | |
isActive: function (e) { | |
var t, n, r = b(v.call(arguments, 1)), | |
i = r[0], | |
o = r[1], | |
a = this.state.queryParams, | |
u = this.state.handlerInfos; | |
if (!u.length) return !1; | |
var l = u[u.length - 1].name, | |
c = this.recognizer.handlersFor(l), | |
h = 0; | |
for (n = c.length; n > h && (t = u[h], t.name !== e); ++h); | |
if (h === c.length) return !1; | |
var d = new E; | |
d.handlerInfos = u.slice(0, h + 1), c = c.slice(0, h + 1); | |
var f = new A({ | |
name: l, | |
contexts: i | |
}), | |
p = f.applyToHandlers(d, c, this.getHandler, l, !0, !0), | |
m = {}; | |
y(m, o); | |
for (var g in a) a.hasOwnProperty(g) && m.hasOwnProperty(g) && (m[g] = a[g]); | |
return s(p.handlerInfos, d.handlerInfos) && !w(m, o) | |
}, | |
trigger: function () { | |
var e = v.call(arguments); | |
p(this, this.currentHandlerInfos, !1, e) | |
}, | |
async: function (e, t) { | |
return new f(function (t) { | |
t(e()) | |
}, t) | |
}, | |
log: null | |
}, c.Router = e | |
}), e("router/transition-intent", ["./utils", "exports"], function () { | |
function e(e) { | |
e && r(this, e), this.data = this.data || {} | |
} | |
var t = arguments, | |
n = t[t.length - 1], | |
r = t[0].merge; | |
e.prototype.applyToState = function (e) { | |
return e | |
}, n.TransitionIntent = e | |
}), e("router/transition-intent/named-transition-intent", ["../transition-intent", "../transition-state", "../handler-info", "../utils", "exports"], function () { | |
function e(e) { | |
r.call(this, e) | |
} | |
var t = arguments, | |
n = t[t.length - 1], | |
r = t[0].TransitionIntent, | |
i = t[1].TransitionState, | |
o = t[2].UnresolvedHandlerInfoByParam, | |
a = t[2].UnresolvedHandlerInfoByObject, | |
s = t[3].isParam, | |
u = t[3].forEach, | |
l = t[3].extractQueryParams, | |
c = t[3].oCreate, | |
h = t[3].merge; | |
e.prototype = c(r.prototype), e.prototype.applyToState = function (e, t, n, r) { | |
var i = l([this.name].concat(this.contexts)), | |
o = i[0], | |
a = (i[1], t.handlersFor(o[0])), | |
s = a[a.length - 1].handler; | |
return this.applyToHandlers(e, a, n, s, r) | |
}, e.prototype.applyToHandlers = function (e, t, n, r, o, a) { | |
var s, u = new i, | |
l = this.contexts.slice(0), | |
c = t.length, | |
d = []; | |
if (this.pivotHandler) | |
for (s = 0; s < t.length; ++s) | |
if (n(t[s].handler) === this.pivotHandler) { | |
c = s; | |
break | |
}!this.pivotHandler; | |
for (s = t.length - 1; s >= 0; --s) { | |
var f = t[s], | |
p = f.handler, | |
m = n(p), | |
v = e.handlerInfos[s], | |
g = null; | |
if (f.names.length > 0 ? g = s >= c ? this.createParamHandlerInfo(p, m, f.names, l, v) : this.getHandlerInfoForDynamicSegment(p, m, f.names, l, v, r) : (g = this.createParamHandlerInfo(p, m, f.names, l, v), d.unshift(s)), a) { | |
g = g.becomeResolved(null, g.context); | |
var y = v && v.context; | |
f.names.length > 0 && g.context === y && (g.params = v && v.params), g.context = y | |
} | |
var _ = v; | |
(s >= c || g.shouldSupercede(v)) && (c = Math.min(s, c), _ = g), o && !a && (_ = _.becomeResolved(null, _.context)), u.handlerInfos.unshift(_) | |
} | |
if (l.length > 0) throw new Error("More context objects were passed than there are dynamic segments for the route: " + r); | |
return o || this.invalidateNonDynamicHandlers(u.handlerInfos, d, c), h(u.queryParams, e.queryParams), h(u.queryParams, this.queryParams || {}), u | |
}, e.prototype.invalidateNonDynamicHandlers = function (e, t, n) { | |
u(t, function (t) { | |
if (t >= n) { | |
var r = e[t]; | |
e[t] = new o({ | |
name: r.name, | |
handler: r.handler, | |
params: {} | |
}) | |
} | |
}) | |
}, e.prototype.getHandlerInfoForDynamicSegment = function (e, t, n, r, i) { | |
{ | |
var o; | |
n.length | |
} | |
return r.length > 0 ? (o = r[r.length - 1], s(o) ? this.createParamHandlerInfo(e, t, n, r, i) : (r.pop(), new a({ | |
name: e, | |
handler: t, | |
context: o, | |
names: n | |
}))) : i && i.name === e ? i : i | |
}, e.prototype.createParamHandlerInfo = function (e, t, n, r, i) { | |
for (var a = {}, u = n.length; u--;) { | |
var l = i && e === i.name && i.params || {}, c = r[r.length - 1], | |
h = n[u]; | |
if (s(c)) a[h] = "" + r.pop(); | |
else { | |
if (!l.hasOwnProperty(h)) throw new Error("You didn't provide enough string/numeric parameters to satisfy all of the dynamic segments for route " + e); | |
a[h] = l[h] | |
} | |
} | |
return new o({ | |
name: e, | |
handler: t, | |
params: a | |
}) | |
}, n.NamedTransitionIntent = e | |
}), e("router/transition-intent/url-transition-intent", ["../transition-intent", "../transition-state", "../handler-info", "../utils", "exports"], function () { | |
function e(e) { | |
i.call(this, e) | |
} | |
function t(e) { | |
this.message = e || "UnrecognizedURLError", this.name = "UnrecognizedURLError" | |
} | |
var n = arguments, | |
r = n[n.length - 1], | |
i = n[0].TransitionIntent, | |
o = n[1].TransitionState, | |
a = n[2].UnresolvedHandlerInfoByParam, | |
s = n[3].oCreate, | |
u = n[3].merge; | |
e.prototype = s(i.prototype), e.prototype.applyToState = function (e, n, r) { | |
var i, s, l = new o, | |
c = n.recognize(this.url); | |
if (!c) throw new t(this.url); | |
var h = !1; | |
for (i = 0, s = c.length; s > i; ++i) { | |
var d = c[i], | |
f = d.handler, | |
p = r(f); | |
if (p.inaccessibleByURL) throw new t(this.url); | |
var m = new a({ | |
name: f, | |
handler: p, | |
params: d.params | |
}), | |
v = e.handlerInfos[i]; | |
h || m.shouldSupercede(v) ? (h = !0, l.handlerInfos[i] = m) : l.handlerInfos[i] = v | |
} | |
return u(l.queryParams, c.queryParams), l | |
}, r.URLTransitionIntent = e | |
}), e("router/transition-state", ["./handler-info", "./utils", "rsvp", "exports"], function () { | |
function e() { | |
this.handlerInfos = [], this.queryParams = {}, this.params = {} | |
} | |
var t = arguments, | |
n = t[t.length - 1], | |
r = (t[0].ResolvedHandlerInfo, t[1].forEach), | |
i = t[1].promiseLabel, | |
o = t[2].resolve, | |
a = t[2].reject; | |
e.prototype = { | |
handlerInfos: null, | |
queryParams: null, | |
params: null, | |
promiseLabel: function (e) { | |
var t = ""; | |
return r(this.handlerInfos, function (e) { | |
"" !== t && (t += "."), t += e.name | |
}), i("'" + t + "': " + e) | |
}, | |
resolve: function (e, t, n) { | |
function s() { | |
return o(t(), i("Check if should continue"))["catch"](function (e) { | |
return f = !0, a(e) | |
}, i("Handle abort")) | |
} | |
function u(e) { | |
var t = d.handlerInfos, | |
r = n.resolveIndex >= t.length ? t.length - 1 : n.resolveIndex; | |
return a({ | |
error: e, | |
handlerWithError: d.handlerInfos[r].handler, | |
wasAborted: f, | |
state: d | |
}) | |
} | |
function l(e) { | |
d.handlerInfos[n.resolveIndex++] = e; | |
var t = e.handler; | |
return t && t.redirect && t.redirect(e.context, n), s().then(c, null, i("Resolve handler")) | |
} | |
function c() { | |
if (n.resolveIndex === d.handlerInfos.length) return { | |
error: null, | |
state: d | |
}; | |
var t = d.handlerInfos[n.resolveIndex]; | |
return t.resolve(e, s, n).then(l, null, i("Proceed")) | |
} | |
var h = this.params; | |
r(this.handlerInfos, function (e) { | |
h[e.name] = e.params || {} | |
}), n = n || {}, n.resolveIndex = 0; | |
var d = this, | |
f = !1; | |
return o(null, this.promiseLabel("Start transition")).then(c, null, this.promiseLabel("Resolve handler"))["catch"](u, this.promiseLabel("Handle error")) | |
} | |
}, n.TransitionState = e | |
}), e("router/transition", ["rsvp", "./handler-info", "./utils", "exports"], function () { | |
function e(n, r, i, u) { | |
function l() { | |
return c.isAborted ? o(void 0, h("Transition aborted - reject")) : void 0 | |
} | |
var c = this; | |
if (this.state = i || n.state, this.intent = r, this.router = n, this.data = this.intent && this.intent.data || {}, this.resolvedModels = {}, this.queryParams = {}, u) return this.promise = o(u), void 0; | |
if (i) { | |
this.params = i.params, this.queryParams = i.queryParams; | |
var d = i.handlerInfos.length; | |
d && (this.targetName = i.handlerInfos[i.handlerInfos.length - 1].name); | |
for (var f = 0; d > f; ++f) { | |
var p = i.handlerInfos[f]; | |
if (!(p instanceof s)) break; | |
this.pivotHandler = p.handler | |
} | |
this.sequence = e.currentSequence++, this.promise = i.resolve(n.async, l, this)["catch"](function (e) { | |
return e.wasAborted ? o(t(c)) : (c.trigger("error", e.error, c, e.handlerWithError), c.abort(), o(e.error)) | |
}, h("Handle Abort")) | |
} else this.promise = a(this.state), this.params = {} | |
} | |
function t(e) { | |
return c(e.router, e.sequence, "detected abort."), new n | |
} | |
function n(e) { | |
this.message = e || "TransitionAborted", this.name = "TransitionAborted" | |
} | |
var r = arguments, | |
i = r[r.length - 1], | |
o = r[0].reject, | |
a = r[0].resolve, | |
s = r[1].ResolvedHandlerInfo, | |
u = r[2].trigger, | |
l = r[2].slice, | |
c = r[2].log, | |
h = r[2].promiseLabel; | |
e.currentSequence = 0, e.prototype = { | |
targetName: null, | |
urlMethod: "update", | |
intent: null, | |
params: null, | |
pivotHandler: null, | |
resolveIndex: 0, | |
handlerInfos: null, | |
resolvedModels: null, | |
isActive: !0, | |
state: null, | |
promise: null, | |
data: null, | |
then: function (e, t) { | |
return this.promise.then(e, t) | |
}, | |
abort: function () { | |
return this.isAborted ? this : (c(this.router, this.sequence, this.targetName + ": transition was aborted"), this.isAborted = !0, this.isActive = !1, this.router.activeTransition = null, this) | |
}, | |
retry: function () { | |
return this.abort(), this.router.transitionByIntent(this.intent, !1) | |
}, | |
method: function (e) { | |
return this.urlMethod = e, this | |
}, | |
trigger: function (e) { | |
var t = l.call(arguments); | |
"boolean" == typeof e ? t.shift() : e = !1, u(this.router, this.state.handlerInfos.slice(0, this.resolveIndex + 1), e, t) | |
}, | |
followRedirects: function () { | |
var e = this.router; | |
return this.promise["catch"](function (t) { | |
return e.activeTransition ? e.activeTransition.followRedirects() : o(t) | |
}) | |
}, | |
toString: function () { | |
return "Transition (sequence " + this.sequence + ")" | |
}, | |
log: function (e) { | |
c(this.router, this.sequence, e) | |
} | |
}, e.prototype.send = e.prototype.trigger, i.Transition = e, i.logAbort = t, i.TransitionAborted = n | |
}), e("router/utils", ["exports"], function () { | |
function e(e) { | |
return "[object Array]" === Object.prototype.toString.call(e) | |
} | |
function t(e, t) { | |
for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]) | |
} | |
function n(e) { | |
var t, n, r = e && e.length; | |
return r && r > 0 && e[r - 1] && e[r - 1].hasOwnProperty("queryParams") ? (n = e[r - 1].queryParams, t = p.call(e, 0, r - 1), [t, n]) : [e, null] | |
} | |
function r(t) { | |
for (var n in t) | |
if ("number" == typeof t[n]) t[n] = "" + t[n]; | |
else if (e(t[n])) | |
for (var r = 0, i = t[n].length; i > r; r++) t[n][r] = "" + t[n][r] | |
} | |
function i(e, t, n) { | |
e.log && (3 === arguments.length ? e.log("Transition #" + t + ": " + n) : (n = t, e.log(n))) | |
} | |
function o(e, t) { | |
var n = arguments; | |
return function (r) { | |
var i = p.call(n, 2); | |
return i.push(r), e.apply(t, i) | |
} | |
} | |
function a(e) { | |
return "string" == typeof e || e instanceof String || "number" == typeof e || e instanceof Number | |
} | |
function s(e, t) { | |
for (var n = 0, r = e.length; r > n && !1 !== t(e[n]); n++); | |
} | |
function u(e, t, n) { | |
var r = {}; | |
if (a(t)) return r[n[0]] = t, r; | |
if (e.serialize) return e.serialize(t, n); | |
if (1 === n.length) { | |
var i = n[0]; | |
return r[i] = /_id$/.test(i) ? t.id : t, r | |
} | |
} | |
function l(e, t, n, r) { | |
if (e.triggerEvent) return e.triggerEvent(t, n, r), void 0; | |
var i = r.shift(); | |
if (!t) { | |
if (n) return; | |
throw new Error("Could not trigger event '" + i + "'. There are no active handlers") | |
} | |
for (var o = !1, a = t.length - 1; a >= 0; a--) { | |
var s = t[a], | |
u = s.handler; | |
if (u.events && u.events[i]) { | |
if (u.events[i].apply(u, r) !== !0) return; | |
o = !0 | |
} | |
} | |
if (!o && !n) throw new Error("Nothing handled the event '" + i + "'.") | |
} | |
function c(n, i) { | |
var o, a = { | |
all: {}, | |
changed: {}, | |
removed: {} | |
}; | |
t(a.all, i); | |
var s = !1; | |
r(n), r(i); | |
for (o in n) n.hasOwnProperty(o) && (i.hasOwnProperty(o) || (s = !0, a.removed[o] = n[o])); | |
for (o in i) | |
if (i.hasOwnProperty(o)) | |
if (e(n[o]) && e(i[o])) | |
if (n[o].length !== i[o].length) a.changed[o] = i[o], s = !0; | |
else | |
for (var u = 0, l = n[o].length; l > u; u++) n[o][u] !== i[o][u] && (a.changed[o] = i[o], s = !0); | |
else n[o] !== i[o] && (a.changed[o] = i[o], s = !0); | |
return s && a | |
} | |
function h(e) { | |
return "Router: " + e | |
} | |
var d = arguments, | |
f = d[d.length - 1], | |
p = Array.prototype.slice, | |
m = Object.create || function (e) { | |
function t() {} | |
return t.prototype = e, new t | |
}; | |
f.trigger = l, f.log = i, f.oCreate = m, f.merge = t, f.extractQueryParams = n, f.bind = o, f.isParam = a, f.forEach = s, f.slice = p, f.serialize = u, f.getChangelist = c, f.coerceQueryParamsToString = r, f.promiseLabel = h | |
}), e("router", ["./router/router", "exports"], function () { | |
var e = arguments, | |
t = e[e.length - 1], | |
n = e[0].Router; | |
t.Router = n | |
}) | |
}(), | |
function () { | |
function e(e) { | |
this.parent = e, this.matches = [] | |
} | |
function t(e, t, n) { | |
n = n || {}, "string" != typeof n.path && (n.path = "/" + t), e.parent && "application" !== e.parent && (t = e.parent + "." + t), e.push(n.path, t, null) | |
} | |
e.prototype = { | |
resource: function (n, r, o) { | |
if (2 === arguments.length && "function" == typeof r && (o = r, r = {}), 1 === arguments.length && (r = {}), "string" != typeof r.path && (r.path = "/" + n), o) { | |
var a = new e(n); | |
t(a, "loading"), t(a, "error", { | |
path: "/_unused_dummy_error_path_route_" + n + "/:error" | |
}), o.call(a), this.push(r.path, n, a.generate()) | |
} else this.push(r.path, n, null); | |
i.FEATURES.isEnabled("ember-routing-named-substates") && (n = n.split(".").pop(), t(this, n + "_loading"), t(this, n + "_error", { | |
path: "/_unused_dummy_error_path_route_" + n + "/:error" | |
})) | |
}, | |
push: function (e, t, n) { | |
var r = t.split("."); | |
("" === e || "/" === e || "index" === r[r.length - 1]) && (this.explicitIndex = !0), this.matches.push([e, t, n]) | |
}, | |
route: function (e, n) { | |
t(this, e, n), i.FEATURES.isEnabled("ember-routing-named-substates") && (t(this, e + "_loading"), t(this, e + "_error", { | |
path: "/_unused_dummy_error_path_route_" + e + "/:error" | |
})) | |
}, | |
generate: function () { | |
var e = this.matches; | |
return this.explicitIndex || this.route("index", { | |
path: "/" | |
}), | |
function (t) { | |
for (var n = 0, r = e.length; r > n; n++) { | |
var i = e[n]; | |
t(i[0]).to(i[1], i[2]) | |
} | |
} | |
} | |
}, e.map = function (t) { | |
var n = new e; | |
return t.call(n), n | |
}, i.RouterDSL = e | |
}(), | |
function () { | |
var e = i.get; | |
i.controllerFor = function (e, t, n) { | |
return e.lookup("controller:" + t, n) | |
}, i.generateControllerFactory = function (e, t, n) { | |
var r, o, a, s; | |
return s = n && i.isArray(n) ? "array" : n ? "object" : "basic", a = "controller:" + s, r = e.lookupFactory(a).extend({ | |
isGenerated: !0, | |
toString: function () { | |
return "(generated " + t + " controller)" | |
} | |
}), o = "controller:" + t, e.register(o, r), r | |
}, i.generateController = function (t, n, r) { | |
i.generateControllerFactory(t, n, r); | |
var o = "controller:" + n, | |
a = t.lookup(o); | |
return e(a, "namespace.LOG_ACTIVE_GENERATION"), a | |
} | |
}(), | |
function () { | |
function e(e, t) { | |
var r = e.controllerName || e.routeName, | |
i = n(r, e.container), | |
o = d(i, "queryParams"); | |
o && v(o, function (e) { | |
var n, i = e.split(":"); | |
n = i.length > 1 ? i[1] : "application" !== r ? r + "[" + e + "]" : e; | |
var o = r + ":" + e; | |
t.queryParams[o] = n, t.translations[i[0]] = o | |
}) | |
} | |
function n(e, t) { | |
var n = t.normalize("controller:" + e); | |
if (t.cache.has(n)) return t.lookup(n); | |
var r = t.lookupFactory(n); | |
return r && "function" == typeof r.proto ? r.proto() : {} | |
} | |
function r(e) { | |
var t, n, r = {}; | |
for (n in e) t = i.Router._descopeQueryParam(e[n]), r[t] = r[t] ? r[t] + 1 : 1; | |
for (n in e) t = i.Router._descopeQueryParam(e[n]), 1 === r[t] && (e[n] = t) | |
} | |
function o(e, t, n) { | |
for (var r = t.state.handlerInfos, i = !1, o = r.length - 1; o >= 0; --o) { | |
var a = r[o], | |
s = a.handler; | |
if (i) { | |
if (n(s, r[o + 1].handler) !== !0) return !1 | |
} else e === s && (i = !0) | |
} | |
return !0 | |
} | |
function a(e, t, n) { | |
var r, o = e.router, | |
a = t.routeName.split(".").pop(), | |
u = "application" === e.routeName ? "" : e.routeName + "."; | |
return i.FEATURES.isEnabled("ember-routing-named-substates") && (r = u + a + "_" + n, s(o, r)) ? r : (r = u + n, s(o, r) ? r : void 0) | |
} | |
function s(e, t) { | |
var n = e.container; | |
return e.hasRoute(t) && (n.has("template:" + t) || n.has("route:" + t)) | |
} | |
function u(e, t, n) { | |
var r = n.shift(); | |
if (!e) { | |
if (t) return; | |
throw new i.Error("Can't trigger action '" + r + "' because your app hasn't finished transitioning into its first route. To trigger an action on destination routes during a transition, you can call `.send()` on the `Transition` object passed to the `model/beforeModel/afterModel` hooks.") | |
} | |
for (var o = !1, a = e.length - 1; a >= 0; a--) { | |
var s = e[a], | |
u = s.handler; | |
if (u._actions && u._actions[r]) { | |
if (u._actions[r].apply(u, n) !== !0) return; | |
o = !0 | |
} | |
} | |
if (y[r]) return y[r].apply(null, n), void 0; | |
if (!o && !t) throw new i.Error("Nothing handled the action '" + r + "'. If you did handle the action, this error can be caused by returning true from an action handler in a controller, causing the action to bubble.") | |
} | |
function l(e) { | |
var t = e.container.lookup("controller:application"); | |
if (t) { | |
var n = e.router.currentHandlerInfos, | |
r = i.Router._routePath(n); | |
"currentPath" in t || p(t, "currentPath"), f(t, "currentPath", r), "currentRouteName" in t || p(t, "currentRouteName"), f(t, "currentRouteName", n[n.length - 1].name) | |
} | |
} | |
var c = t("router"), | |
h = c.Router, | |
d = (c.Transition, i.get), | |
f = i.set, | |
p = (i.String.fmt, i.defineProperty), | |
m = Array.prototype.slice, | |
v = i.EnumerableUtils.forEach, | |
g = i._MetamorphView; | |
i.Router = i.Object.extend(i.Evented, { | |
location: "hash", | |
init: function () { | |
this.router = this.constructor.router || this.constructor.map(i.K), this._activeViews = {}, this._setupLocation(), d(this, "namespace.LOG_TRANSITIONS_INTERNAL") && (this.router.log = i.Logger.debug) | |
}, | |
url: i.computed(function () { | |
return d(this, "location").getURL() | |
}), | |
startRouting: function () { | |
this.router = this.router || this.constructor.map(i.K); | |
var e = this.router, | |
t = d(this, "location"), | |
n = this.container, | |
r = this, | |
o = d(this, "initialURL"); | |
d(t, "cancelRouterSetup") || (this._setupRouter(e, t), n.register("view:default", g), n.register("view:toplevel", i.View.extend()), t.onUpdateURL(function (e) { | |
r.handleURL(e) | |
}), "undefined" == typeof o && (o = t.getURL()), this.handleURL(o)) | |
}, | |
didTransition: function (e) { | |
l(this), this._cancelLoadingEvent(), this.notifyPropertyChange("url"), i.run.once(this, this.trigger, "didTransition"), d(this, "namespace").LOG_TRANSITIONS && i.Logger.log("Transitioned into '" + i.Router._routePath(e) + "'") | |
}, | |
handleURL: function (e) { | |
return this._doTransition("handleURL", [e]) | |
}, | |
transitionTo: function () { | |
return this._doTransition("transitionTo", arguments) | |
}, | |
intermediateTransitionTo: function () { | |
this.router.intermediateTransitionTo.apply(this.router, arguments), l(this); | |
var e = this.router.currentHandlerInfos; | |
d(this, "namespace").LOG_TRANSITIONS && i.Logger.log("Intermediate-transitioned into '" + i.Router._routePath(e) + "'") | |
}, | |
replaceWith: function () { | |
return this._doTransition("replaceWith", arguments) | |
}, | |
generate: function () { | |
var e = this.router.generate.apply(this.router, arguments); | |
return this.location.formatURL(e) | |
}, | |
isActive: function () { | |
var e = this.router; | |
return e.isActive.apply(e, arguments) | |
}, | |
send: function () { | |
this.router.trigger.apply(this.router, arguments) | |
}, | |
hasRoute: function (e) { | |
return this.router.hasRoute(e) | |
}, | |
reset: function () { | |
this.router.reset() | |
}, | |
_lookupActiveView: function (e) { | |
var t = this._activeViews[e]; | |
return t && t[0] | |
}, | |
_connectActiveView: function (e, t) { | |
var n = this._activeViews[e]; | |
n && n[0].off("willDestroyElement", this, n[1]); | |
var r = function () { | |
delete this._activeViews[e] | |
}; | |
this._activeViews[e] = [t, r], t.one("willDestroyElement", this, r) | |
}, | |
_setupLocation: function () { | |
var e = d(this, "location"), | |
t = d(this, "rootURL"); | |
if ("string" == typeof e && this.container) { | |
var n = this.container.lookup("location:" + e); | |
if ("undefined" != typeof n) e = f(this, "location", n); | |
else { | |
var r = { | |
implementation: e | |
}; | |
e = f(this, "location", i.Location.create(r)) | |
} | |
} | |
"string" == typeof t && (e.rootURL = t), "function" == typeof e.initState && e.initState() | |
}, | |
_getHandlerFunction: function () { | |
var e = {}, t = this.container, | |
n = t.lookupFactory("route:basic"), | |
r = this; | |
return function (i) { | |
var o = "route:" + i, | |
a = t.lookup(o); | |
return e[i] ? a : (e[i] = !0, a || (t.register(o, n.extend()), a = t.lookup(o), d(r, "namespace.LOG_ACTIVE_GENERATION")), a.routeName = i, a) | |
} | |
}, | |
_setupRouter: function (e, t) { | |
var n, r = this; | |
e.getHandler = this._getHandlerFunction(); | |
var o = function () { | |
t.setURL(n) | |
}; | |
if (e.updateURL = function (e) { | |
n = e, i.run.once(o) | |
}, t.replaceURL) { | |
var a = function () { | |
t.replaceURL(n) | |
}; | |
e.replaceURL = function (e) { | |
n = e, i.run.once(a) | |
} | |
} | |
e.didTransition = function (e) { | |
r.didTransition(e) | |
} | |
}, | |
_doTransition: function (e, t) { | |
t = m.call(t), t[0] = t[0] || "/"; | |
var n, r = t[0], | |
o = !1; | |
if (i.FEATURES.isEnabled("query-params-new")) { | |
var a = t[t.length - 1]; | |
a && a.hasOwnProperty("queryParams") && (1 === t.length && (o = !0, r = null), n = t[t.length - 1].queryParams) | |
} | |
if (!o && "/" !== r.charAt(0), n) { | |
if (!r) { | |
var s = this.router.activeTransition ? this.router.activeTransition.state.handlerInfos : this.router.state.handlerInfos; | |
r = s[s.length - 1].name, t.unshift(r) | |
} | |
var u = this._queryParamNamesFor(r); | |
i.Router._translateQueryParams(n, u.translations, r); | |
var l; | |
for (var c in n) { | |
var h = i.Router._descopeQueryParam(c); | |
c in u.queryParams ? (l = n[c], delete n[c], n[u.queryParams[c]] = l) : h in u.validQueryParams && (l = n[c], delete n[c], n[h] = l) | |
} | |
} | |
var d = this.router[e].apply(this.router, t); | |
return d.then(null, function (e) { | |
e && "UnrecognizedURLError" === e.name | |
}, "Ember: Check for Router unrecognized URL error"), d | |
}, | |
_scheduleLoadingEvent: function (e, t) { | |
this._cancelLoadingEvent(), this._loadingStateTimer = i.run.scheduleOnce("routerTransitions", this, "_fireLoadingEvent", e, t) | |
}, | |
_fireLoadingEvent: function (e, t) { | |
this.router.activeTransition && e.trigger(!0, "loading", e, t) | |
}, | |
_cancelLoadingEvent: function () { | |
this._loadingStateTimer && i.run.cancel(this._loadingStateTimer), this._loadingStateTimer = null | |
}, | |
_queryParamNamesFor: function (t) { | |
var n = this.router.recognizer.handlersFor(t), | |
o = { | |
queryParams: i.create(null), | |
translations: i.create(null), | |
validQueryParams: i.create(null) | |
}, a = this.router; | |
v(n, function (t) { | |
var n = a.getHandler(t.handler); | |
e(n, o) | |
}), r(o.queryParams); | |
for (var s in o.queryParams) o.validQueryParams[o.queryParams[s]] = !0; | |
return o | |
}, | |
_queryParamNamesForSingle: function (t) { | |
var n = { | |
queryParams: i.create(null), | |
translations: i.create(null) | |
}, r = this.router.getHandler(t); | |
if (e(r, n), "application" !== t) { | |
var o = this._queryParamNamesFor(t); | |
for (var a in n.queryParams) n.queryParams[a] = o.queryParams[a] | |
} | |
return n | |
}, | |
_queryParamOverrides: function (e, t, r) { | |
for (var i in t) { | |
var o = i.split(":"), | |
a = n(o[0], this.container); | |
e[t[i]] = d(a, o[1]), r && r(i, t[i], i) | |
} | |
} | |
}); | |
var y = { | |
willResolveModel: function (e, t) { | |
t.router._scheduleLoadingEvent(e, t) | |
}, | |
error: function (e, t, n) { | |
var r = n.router, | |
u = o(n, t, function (t, n) { | |
var i = a(t, n, "error"); | |
return i ? (r.intermediateTransitionTo(i, e), void 0) : !0 | |
}); | |
return u ? s(n.router, "application_error") ? (r.intermediateTransitionTo("application_error", e), void 0) : (i.Logger.error("Error while loading route: " + (e && e.stack)), void 0) : void 0 | |
}, | |
loading: function (e, t) { | |
var n = t.router, | |
r = o(t, e, function (t, r) { | |
var i = a(t, r, "loading"); | |
return i ? (n.intermediateTransitionTo(i), void 0) : e.pivotHandler !== t ? !0 : void 0 | |
}); | |
return r && s(t.router, "application_loading") ? (n.intermediateTransitionTo("application_loading"), void 0) : void 0 | |
} | |
}; | |
i.Router.reopenClass({ | |
router: null, | |
map: function (e) { | |
var t = this.router; | |
t || (t = new h, t.callbacks = [], t.triggerEvent = u, this.reopenClass({ | |
router: t | |
})); | |
var n = i.RouterDSL.map(function () { | |
this.resource("application", { | |
path: "/" | |
}, function () { | |
for (var n = 0; n < t.callbacks.length; n++) t.callbacks[n].call(this); | |
e.call(this) | |
}) | |
}); | |
return t.callbacks.push(e), t.map(n.generate()), t | |
}, | |
_routePath: function (e) { | |
function t(e, t) { | |
for (var n = 0, r = e.length; r > n; ++n) | |
if (e[n] !== t[n]) return !1; | |
return !0 | |
} | |
for (var n = [], r = 1, i = e.length; i > r; r++) { | |
for (var o = e[r].name, a = o.split("."), s = m.call(n); s.length && !t(s, a);) s.shift(); | |
n.push.apply(n, a.slice(s.length)) | |
} | |
return n.join(".") | |
}, | |
_translateQueryParams: function (e, t) { | |
for (var n in e) e.hasOwnProperty(n) && n in t && (e[t[n]] = e[n], delete e[n]) | |
}, | |
_descopeQueryParam: function (e) { | |
var t = /\[(.+)\]/, | |
n = e.match(t); | |
return n = n ? n[1] : e | |
} | |
}) | |
}(), | |
function () { | |
function e(e) { | |
var t = e.router.router.state.handlerInfos; | |
if (t) | |
for (var n, r, i = 0, o = t.length; o > i; i++) { | |
if (r = t[i].handler, r === e) return n; | |
n = r | |
} | |
} | |
function t(n) { | |
var r, i = e(n); | |
if (i) return (r = i.lastRenderedTemplate) ? r : t(i) | |
} | |
function n(e, n, r, o) { | |
o = o || {}, o.into = o.into ? o.into.replace(/\//g, ".") : t(e), o.outlet = o.outlet || "main", o.name = n, o.template = r, o.LOG_VIEW_LOOKUPS = u(e.router, "namespace.LOG_VIEW_LOOKUPS"); | |
var a, s = o.controller, | |
l = o.model; | |
if (s = o.controller ? o.controller : (a = e.container.lookup("controller:" + n)) ? a : e.controllerName || e.routeName, "string" == typeof s) { | |
var c = s; | |
if (s = e.container.lookup("controller:" + c), !s) throw new i.Error("You passed `controller: '" + c + "'` into the `render` method, but no such controller could be found.") | |
} | |
return i.FEATURES.isEnabled("ember-routing-add-model-option") && l && s.set("content", l), o.controller = s, o | |
} | |
function r(e, t, n) { | |
if (e) n.LOG_VIEW_LOOKUPS; | |
else { | |
var r = n.into ? "view:default" : "view:toplevel"; | |
e = t.lookup(r), n.LOG_VIEW_LOOKUPS | |
} | |
return u(e, "templateName") || (l(e, "template", n.template), l(e, "_debugTemplateName", n.name)), l(e, "renderedName", n.name), l(e, "controller", n.controller), e | |
} | |
function o(e, t, n) { | |
if (n.into) { | |
var r = e.router._lookupActiveView(n.into), | |
i = s(r, n.outlet); | |
e.teardownOutletViews || (e.teardownOutletViews = []), d(e.teardownOutletViews, 0, 0, [i]), r.connectOutlet(n.outlet, t) | |
} else { | |
var o = u(e, "router.namespace.rootElement"); | |
e.teardownTopLevelView && e.teardownTopLevelView(), e.router._connectActiveView(n.name, t), e.teardownTopLevelView = a(t), t.appendTo(o) | |
} | |
} | |
function a(e) { | |
return function () { | |
e.destroy() | |
} | |
} | |
function s(e, t) { | |
return function () { | |
e.disconnectOutlet(t) | |
} | |
} | |
var u = i.get, | |
l = i.set, | |
c = i.getProperties, | |
h = (i.String.classify, i.String.fmt, i.EnumerableUtils.forEach), | |
d = i.EnumerableUtils.replace; | |
i.Route = i.Object.extend(i.ActionHandler, { | |
exit: function () { | |
i.FEATURES.isEnabled("query-params-new") && this.controller._deactivateQueryParamObservers(), this.deactivate(), this.teardownViews() | |
}, | |
enter: function () { | |
this.activate() | |
}, | |
viewName: null, | |
templateName: null, | |
controllerName: null, | |
_actions: { | |
finalizeQueryParamChange: function (e, t) { | |
if (i.FEATURES.isEnabled("query-params-new")) { | |
var n = this.controller, | |
r = n._queryParamChangesDuringSuspension, | |
o = u(n, "_queryParamHash"); | |
for (var a in o) | |
if (o.hasOwnProperty(a)) { | |
var s = !1, | |
c = i.Router._descopeQueryParam(a); | |
if (o[a] in e ? s = o[a] : void 0 !== e[c] && (s = c), s) { | |
if (n._finalizingQueryParams = !0, !(r && a in r)) { | |
var h = e[s]; | |
h = i.isArray(h) ? i.A(h) : h, l(n, a, h) | |
} | |
n._finalizingQueryParams = !1, delete e[s] | |
} | |
for (var d = { | |
longform: o[a], | |
shortform: c, | |
value: i.copy(u(n, a)) | |
}, f = !1, p = 0, m = t.length; m > p; p++) t[p].key === c && (f = !0, t[p].key = t[p].longform); | |
d.key = f ? o[a] : c, t.unshift(d) | |
} | |
return n._queryParamChangesDuringSuspension = null, !0 | |
} | |
} | |
}, | |
events: null, | |
mergedProperties: ["events"], | |
deactivate: i.K, | |
activate: i.K, | |
transitionTo: function () { | |
var e = this.router; | |
return e.transitionTo.apply(e, arguments) | |
}, | |
intermediateTransitionTo: function () { | |
var e = this.router; | |
e.intermediateTransitionTo.apply(e, arguments) | |
}, | |
refresh: function () { | |
return this.router.router.refresh(this).method("replace") | |
}, | |
replaceWith: function () { | |
var e = this.router; | |
return e.replaceWith.apply(e, arguments) | |
}, | |
send: function () { | |
return this.router.send.apply(this.router, arguments) | |
}, | |
setup: function (e, t) { | |
var n = this.controllerName || this.routeName, | |
r = this.controllerFor(n, !0); | |
r || (r = this.generateController(n, e)), this.controller = r, i.FEATURES.isEnabled("query-params-new") && ("application" !== n && (this.controller._queryParamScope = n), this.controller._activateQueryParamObservers()), this.setupControllers ? this.setupControllers(r, e) : i.FEATURES.isEnabled("query-params-new") ? (r._finalizingQueryParams = !0, r._queryParamChangesDuringSuspension = {}, this.setupController(r, e, t), r._finalizingQueryParams = !1) : this.setupController(r, e), this.renderTemplates ? this.renderTemplates(e) : this.renderTemplate(r, e) | |
}, | |
beforeModel: i.K, | |
afterModel: i.K, | |
redirect: i.K, | |
contextDidChange: function () { | |
this.currentModel = this.context | |
}, | |
model: function (e, t) { | |
var n, r, o, a; | |
for (var s in e) "queryParams" !== s && ((n = s.match(/^(.*)_id$/)) && (r = n[1], a = e[s]), o = !0); | |
if (!r && o) return i.copy(e); | |
if (!r) { | |
if (t.resolveIndex !== t.state.handlerInfos.length - 1) return; | |
var u = t.state.handlerInfos[t.resolveIndex - 1].context; | |
return u | |
} | |
return this.findModel(r, a) | |
}, | |
deserialize: function (e, t) { | |
return i.FEATURES.isEnabled("query-params-new") ? this.model(this.paramsFor(this.routeName), t) : this.model(e, t) | |
}, | |
findModel: function () { | |
var e = u(this, "store"); | |
return e.find.apply(e, arguments) | |
}, | |
store: i.computed(function () { | |
{ | |
var e = this.container; | |
this.routeName, u(this, "router.namespace") | |
} | |
return { | |
find: function (t, n) { | |
var r = e.lookupFactory("model:" + t); | |
if (r) return r.find(n) | |
} | |
} | |
}), | |
serialize: function (e, t) { | |
if (!(t.length < 1) && e) { | |
var n = t[0], | |
r = {}; | |
return /_id$/.test(n) && 1 === t.length ? r[n] = u(e, "id") : r = c(e, t), r | |
} | |
}, | |
setupController: function (e, t) { | |
e && void 0 !== t && l(e, "model", t) | |
}, | |
controllerFor: function (e) { | |
var t, n = this.container, | |
r = n.lookup("route:" + e); | |
return r && r.controllerName && (e = r.controllerName), t = n.lookup("controller:" + e) | |
}, | |
generateController: function (e, t) { | |
var n = this.container; | |
return t = t || this.modelFor(e), i.generateController(n, e, t) | |
}, | |
modelFor: function (e) { | |
var t = this.container.lookup("route:" + e), | |
n = this.router.router.activeTransition; | |
if (n) { | |
var r = t && t.routeName || e; | |
if (n.resolvedModels.hasOwnProperty(r)) return n.resolvedModels[r] | |
} | |
return t && t.currentModel | |
}, | |
renderTemplate: function () { | |
this.render() | |
}, | |
render: function (e, t) { | |
"object" != typeof e || t || (t = e, e = this.routeName), t = t || {}; | |
var i; | |
e ? (e = e.replace(/\//g, "."), i = e) : (e = this.routeName, i = this.templateName || e); | |
var a = t.view || this.viewName || e, | |
s = this.container, | |
l = s.lookup("view:" + a), | |
c = l ? l.get("template") : null; | |
return c || (c = s.lookup("template:" + i)), l || c ? (t = n(this, e, c, t), l = r(l, s, t), "main" === t.outlet && (this.lastRenderedTemplate = e), o(this, l, t), void 0) : (u(this.router, "namespace.LOG_VIEW_LOOKUPS"), void 0) | |
}, | |
disconnectOutlet: function (e) { | |
if (!e || "string" == typeof e) { | |
var n = e; | |
e = {}, e.outlet = n | |
} | |
e.parentView = e.parentView ? e.parentView.replace(/\//g, ".") : t(this), e.outlet = e.outlet || "main"; | |
var r = this.router._lookupActiveView(e.parentView); | |
r && r.disconnectOutlet(e.outlet) | |
}, | |
willDestroy: function () { | |
this.teardownViews() | |
}, | |
teardownViews: function () { | |
this.teardownTopLevelView && this.teardownTopLevelView(); | |
var e = this.teardownOutletViews || []; | |
h(e, function (e) { | |
e() | |
}), delete this.teardownTopLevelView, delete this.teardownOutletViews, delete this.lastRenderedTemplate | |
} | |
}), i.FEATURES.isEnabled("query-params-new") && i.Route.reopen({ | |
paramsFor: function (e) { | |
var t = this.container.lookup("route:" + e); | |
if (!t) return {}; | |
var n, r, i = this.router.router.activeTransition, | |
o = this.router._queryParamNamesForSingle(t.routeName); | |
if (i) n = i.params[e] || {}, r = i.queryParams; | |
else { | |
var a = this.router.router.state; | |
n = a.params[e] || {}, r = a.queryParams | |
} | |
return this.router._queryParamOverrides(n, o.queryParams, function (e, t, i) { | |
var o = t in r ? r[t] : n[t]; | |
delete n[t], n[i.split(":").pop()] = o | |
}), n | |
} | |
}) | |
}(), | |
function () { | |
i.onLoad("Ember.Handlebars", function () { | |
function e(e, n, i) { | |
return r.call(t(e, n, i), function (t, r) { | |
return null === t ? n[r] : a(e, t, i) | |
}) | |
} | |
function t(e, t, a) { | |
function s(e, t) { | |
return "controller" === t ? t : i.ControllerMixin.detect(e) ? s(o(e, "model"), t ? t + ".model" : "model") : t | |
} | |
var u = n(e, t, a), | |
l = a.types; | |
return r.call(u, function (e, n) { | |
return "ID" === l[n] ? s(e, t[n]) : null | |
}) | |
} | |
var n = i.Handlebars.resolveParams, | |
r = i.ArrayPolyfills.map, | |
o = i.get, | |
a = i.Handlebars.get; | |
i.Router.resolveParams = e, i.Router.resolvePaths = t | |
}) | |
}(), | |
function () { | |
var e = i.get, | |
t = (i.set, i.String.fmt, Array.prototype.slice); | |
i.onLoad("Ember.Handlebars", function () { | |
function n(e) { | |
var t = e.options.types, | |
n = e.options.data; | |
return s(e.context, e.params, { | |
types: t, | |
data: n | |
}) | |
} | |
var r = i.Object.extend({ | |
values: null | |
}), | |
o = i.Router.resolveParams, | |
a = i.Router._translateQueryParams, | |
s = i.Router.resolvePaths, | |
u = i.ViewUtils.isSimpleClick, | |
l = i.LinkView = i.View.extend({ | |
tagName: "a", | |
currentWhen: null, | |
title: null, | |
rel: null, | |
activeClass: "active", | |
loadingClass: "loading", | |
disabledClass: "disabled", | |
_isDisabled: !1, | |
replace: !1, | |
attributeBindings: ["href", "title", "rel"], | |
classNameBindings: ["active", "loading", "disabled"], | |
eventName: "click", | |
init: function () { | |
this._super.apply(this, arguments); | |
var t = e(this, "eventName"); | |
this.on(t, this, this._invoke) | |
}, | |
_paramsChanged: function () { | |
this.notifyPropertyChange("resolvedParams") | |
}, | |
_setupPathObservers: function () { | |
var e, t, r, o = this.parameters, | |
a = o.options.linkTextPath, | |
s = n(o), | |
u = s.length; | |
for (a && (r = i.Handlebars.normalizePath(o.context, a, o.options.data), this.registerObserver(r.root, r.path, this, this.rerender)), t = 0; u > t; t++) e = s[t], null !== e && (r = i.Handlebars.normalizePath(o.context, e, o.options.data), this.registerObserver(r.root, r.path, this, this._paramsChanged)); | |
var l = this.queryParamsObject; | |
if (l) { | |
var c = l.values; | |
for (var h in c) c.hasOwnProperty(h) && "ID" === l.types[h] && (r = i.Handlebars.normalizePath(o.context, c[h], o.options.data), this.registerObserver(r.root, r.path, this, this._paramsChanged)) | |
} | |
}, | |
afterRender: function () { | |
this._super.apply(this, arguments), this._setupPathObservers() | |
}, | |
concreteView: i.computed(function () { | |
return e(this, "parentView") | |
}).property("parentView"), | |
disabled: i.computed(function (t, n) { | |
return void 0 !== n && this.set("_isDisabled", n), n ? e(this, "disabledClass") : !1 | |
}), | |
active: i.computed(function () { | |
if (e(this, "loading")) return !1; | |
var t = e(this, "router"), | |
n = e(this, "routeArgs"), | |
r = n.slice(1), | |
o = (e(this, "resolvedParams"), this.currentWhen || n[0]); | |
this.currentWhen && (r = [], i.FEATURES.isEnabled("query-params-new") && r.push({ | |
queryParams: e(this, "queryParams") | |
})); | |
var a = t.isActive.apply(t, [o].concat(r)); | |
return a ? e(this, "activeClass") : void 0 | |
}).property("resolvedParams", "routeArgs"), | |
loading: i.computed(function () { | |
return e(this, "routeArgs") ? void 0 : e(this, "loadingClass") | |
}).property("routeArgs"), | |
router: i.computed(function () { | |
return e(this, "controller").container.lookup("router:main") | |
}), | |
_invoke: function (t) { | |
if (!u(t)) return !0; | |
if (this.preventDefault !== !1 && t.preventDefault(), this.bubbles === !1 && t.stopPropagation(), e(this, "_isDisabled")) return !1; | |
if (e(this, "loading")) return i.Logger.warn("This link-to is in an inactive loading state because at least one of its parameters presently has a null/undefined value, or the provided route name is invalid."), !1; | |
var n, r = e(this, "router"), | |
o = e(this, "routeArgs"); | |
n = e(this, "replace") ? r.replaceWith.apply(r, o) : r.transitionTo.apply(r, o); | |
var a = r.router.generate.apply(r.router, e(this, "routeArgs")); | |
i.run.scheduleOnce("routerTransitions", this, this._eagerUpdateUrl, n, a) | |
}, | |
_eagerUpdateUrl: function (t, n) { | |
if (t.isActive && t.urlMethod) { | |
0 === n.indexOf("#") && (n = n.slice(1)); | |
var r = e(this, "router.router"); | |
"update" === t.urlMethod ? r.updateURL(n) : "replace" === t.urlMethod && r.replaceURL(n), t.method(null) | |
} | |
}, | |
resolvedParams: i.computed(function () { | |
var t = this.parameters, | |
n = t.options, | |
r = n.types, | |
i = n.data; | |
if (0 === t.params.length) { | |
var a = this.container.lookup("controller:application"); | |
return [e(a, "currentRouteName")] | |
} | |
return o(t.context, t.params, { | |
types: r, | |
data: i | |
}) | |
}).property("router.url"), | |
routeArgs: i.computed(function () { | |
var t = e(this, "resolvedParams").slice(0), | |
n = e(this, "router"), | |
r = t[0]; | |
if (r) { | |
var o = n.router.recognizer.handlersFor(r), | |
a = o[o.length - 1].handler; | |
r !== a && (this.set("currentWhen", r), r = o[o.length - 1].handler, t[0] = r); | |
for (var s = 1, u = t.length; u > s; ++s) { | |
var l = t[s]; | |
if (null === l || "undefined" == typeof l) return | |
} | |
return i.FEATURES.isEnabled("query-params-new") && t.push({ | |
queryParams: e(this, "queryParams") | |
}), t | |
} | |
}).property("resolvedParams", "queryParams"), | |
queryParamsObject: null, | |
queryParams: i.computed(function () { | |
var t = e(this, "queryParamsObject"), | |
n = {}; | |
t && i.merge(n, t.values); | |
var r = e(this, "resolvedParams"), | |
o = e(this, "router"), | |
s = r[0], | |
u = o._queryParamNamesFor(s), | |
l = u.queryParams, | |
c = u.translations, | |
h = {}; | |
a(n, c, s); | |
var d = this.parameters; | |
return o._queryParamOverrides(h, l, function (e, r) { | |
if (e in n) { | |
var o, a = e.split(":"), | |
s = t.types[a[1]]; | |
if ("ID" === s) { | |
var u = i.Handlebars.normalizePath(d.context, n[e], d.options.data); | |
o = i.Handlebars.get(u.root, u.path, d.options) | |
} else o = n[e]; | |
delete n[e], h[r] = o | |
} | |
}), h | |
}).property("resolvedParams.[]"), | |
href: i.computed(function () { | |
if ("a" === e(this, "tagName")) { | |
var t = e(this, "router"), | |
n = e(this, "routeArgs"); | |
return n ? t.generate.apply(t, n) : e(this, "loadingHref") | |
} | |
}).property("routeArgs"), | |
loadingHref: "#" | |
}); | |
l.toString = function () { | |
return "LinkView" | |
}, i.Handlebars.registerHelper("link-to", function () { | |
var e = t.call(arguments, -1)[0], | |
n = t.call(arguments, 0, -1), | |
o = e.hash; | |
if (n[n.length - 1] instanceof r && (o.queryParamsObject = n.pop()), o.disabledBinding = o.disabledWhen, !e.fn) { | |
var a = n.shift(), | |
s = e.types.shift(), | |
u = this; | |
"ID" === s ? (e.linkTextPath = a, e.fn = function () { | |
return i.Handlebars.getEscaped(u, a, e) | |
}) : e.fn = function () { | |
return a | |
} | |
} | |
return o.parameters = { | |
context: this, | |
options: e, | |
params: n | |
}, i.Handlebars.helpers.view.call(this, l, e) | |
}), i.FEATURES.isEnabled("query-params-new") && i.Handlebars.registerHelper("query-params", function (e) { | |
return r.create({ | |
values: e.hash, | |
types: e.hashTypes | |
}) | |
}), i.Handlebars.registerHelper("linkTo", function () { | |
return i.Handlebars.helpers["link-to"].apply(this, arguments) | |
}) | |
}) | |
}(), | |
function () { | |
i.get, i.set; | |
i.onLoad("Ember.Handlebars", function (e) { | |
e.OutletView = i.ContainerView.extend(i._Metamorph), e.registerHelper("outlet", function (t, n) { | |
var r, i, o, a, s; | |
for (t && t.data && t.data.isRenderData && (n = t, t = "main"), i = n.data.view.container, r = n.data.view; !r.get("template.isTop");) r = r.get("_parentView"); | |
return o = n.hash.view, o && (s = "view:" + o), a = o ? i.lookupFactory(s) : n.hash.viewClass || e.OutletView, n.data.view.set("outletSource", r), n.hash.currentViewBinding = "_view.outletSource._outlets." + t, e.helpers.view.call(this, a, n) | |
}) | |
}) | |
}(), | |
function () { | |
i.get, i.set; | |
i.onLoad("Ember.Handlebars", function () { | |
i.Handlebars.registerHelper("render", function (e, t, n) { | |
var r, o, a, s, u, l = arguments.length; | |
if (r = (n || t).data.keywords.controller.container, o = r.lookup("router:main"), 2 === l) n = t, t = void 0; | |
else { | |
if (3 !== l) throw i.Error("You must pass a templateName to render"); | |
u = i.Handlebars.get(n.contexts[1], t, n) | |
} | |
e = e.replace(/\//g, "."), s = r.lookup("view:" + e) || r.lookup("view:default"); | |
var c = n.hash.controller || e, | |
h = "controller:" + c; | |
n.hash.controller; | |
var d = n.data.keywords.controller; | |
if (l > 2) { | |
var f = r.lookupFactory(h) || i.generateControllerFactory(r, c, u); | |
a = f.create({ | |
model: u, | |
parentController: d, | |
target: d | |
}) | |
} else a = r.lookup(h) || i.generateController(r, c), a.setProperties({ | |
target: d, | |
parentController: d | |
}); | |
var p = n.contexts[1]; | |
p && s.registerObserver(p, t, function () { | |
a.set("model", i.Handlebars.get(p, t, n)) | |
}), n.hash.viewName = i.String.camelize(e); | |
var m = "template:" + e; | |
n.hash.template = r.lookup(m), n.hash.controller = a, o && !u && o._connectActiveView(e, s), i.Handlebars.helpers.view.call(this, s, n) | |
}) | |
}) | |
}(), | |
function () { | |
i.onLoad("Ember.Handlebars", function () { | |
function e(e, n) { | |
var r = []; | |
n && r.push(n); | |
var i = e.options.types.slice(1), | |
o = e.options.data; | |
return r.concat(t(e.context, e.params, { | |
types: i, | |
data: o | |
})) | |
} | |
var t = i.Router.resolveParams, | |
n = i.ViewUtils.isSimpleClick, | |
r = i.Handlebars, | |
o = r.get, | |
a = r.SafeString, | |
s = i.ArrayPolyfills.forEach, | |
u = (i.get, Array.prototype.slice), | |
l = r.ActionHelper = { | |
registeredActions: {} | |
}, c = ["alt", "shift", "meta", "ctrl"], | |
h = /^click|mouse|touch/, | |
d = function (e, t) { | |
if ("undefined" == typeof t) { | |
if (h.test(e.type)) return n(e); | |
t = "" | |
} | |
if (t.indexOf("any") >= 0) return !0; | |
var r = !0; | |
return s.call(c, function (n) { | |
e[n + "Key"] && -1 === t.indexOf(n) && (r = !1) | |
}), r | |
}; | |
l.registerAction = function (t, n, r) { | |
var a = ++i.uuid; | |
return l.registeredActions[a] = { | |
eventName: n.eventName, | |
handler: function (a) { | |
if (!d(a, r)) return !0; | |
n.preventDefault !== !1 && a.preventDefault(), n.bubbles === !1 && a.stopPropagation(); | |
var s, u = n.target; | |
u = u.target ? o(u.root, u.target, u.options) : u.root, n.boundProperty && (s = o(u, t, n.options), ("undefined" == typeof s || "function" == typeof s) && (s = t)), s || (s = t), i.run(function () { | |
u.send ? u.send.apply(u, e(n.parameters, s)) : u[s].apply(u, e(n.parameters)) | |
}) | |
} | |
}, n.view.on("willClearRender", function () { | |
delete l.registeredActions[a] | |
}), a | |
}, r.registerHelper("action", function (e) { | |
var t = arguments[arguments.length - 1], | |
n = u.call(arguments, 1, -1), | |
r = t.hash, | |
i = t.data.keywords.controller, | |
o = { | |
eventName: r.on || "click", | |
parameters: { | |
context: this, | |
options: t, | |
params: n | |
}, | |
view: t.data.view, | |
bubbles: r.bubbles, | |
preventDefault: r.preventDefault, | |
target: { | |
options: t | |
}, | |
boundProperty: "ID" === t.types[0] | |
}; | |
r.target ? (o.target.root = this, o.target.target = r.target) : i && (o.target.root = i); | |
var s = l.registerAction(e, o, r.allowedKeys); | |
return new a('data-ember-action="' + s + '"') | |
}) | |
}) | |
}(), | |
function () { | |
var e = i.get, | |
t = (i.set, i.EnumerableUtils.map, {}); | |
i.ControllerMixin.reopen({ | |
transitionToRoute: function () { | |
var t = e(this, "target"), | |
n = t.transitionToRoute || t.transitionTo; | |
return n.apply(t, arguments) | |
}, | |
transitionTo: function () { | |
return this.transitionToRoute.apply(this, arguments) | |
}, | |
replaceRoute: function () { | |
var t = e(this, "target"), | |
n = t.replaceRoute || t.replaceWith; | |
return n.apply(t, arguments) | |
}, | |
replaceWith: function () { | |
return this.replaceRoute.apply(this, arguments) | |
} | |
}), i.FEATURES.isEnabled("query-params-new") && i.ControllerMixin.reopen({ | |
concatenatedProperties: ["queryParams"], | |
queryParams: null, | |
_queryParamScope: null, | |
_finalizingQueryParams: !1, | |
_queryParamHash: i.computed(function () { | |
var e = {}, t = this.queryParams; | |
if (!t) return e; | |
for (var n = 0, r = t.length; r > n; ++n) { | |
var i = t[n], | |
o = i.split(":"), | |
a = o[0], | |
s = o[1]; | |
s || (s = this._queryParamScope ? this._queryParamScope + "[" + a + "]" : a), e[a] = s | |
} | |
return e | |
}), | |
_activateQueryParamObservers: function () { | |
var t = e(this, "_queryParamHash"); | |
for (var n in t) t.hasOwnProperty(n) && (this.addObserver(n, this, this._queryParamChanged), this.addObserver(n + ".[]", this, this._queryParamChanged)) | |
}, | |
_deactivateQueryParamObservers: function () { | |
var t = e(this, "_queryParamHash"); | |
for (var n in t) t.hasOwnProperty(n) && (this.removeObserver(n, this, this._queryParamChanged), this.removeObserver(n + ".[]", this, this._queryParamChanged)) | |
}, | |
_queryParamChanged: function (n, r) { | |
if (".[]" === r.slice(r.length - 3) && (r = r.substr(0, r.length - 3)), this._finalizingQueryParams) { | |
var o = this._queryParamChangesDuringSuspension; | |
return o && (o[r] = !0), void 0 | |
} | |
var a = e(this, "_queryParamHash"); | |
t[a[r]] = i.copy(e(this, r)), i.run.once(this, this._fireQueryParamTransition) | |
}, | |
_fireQueryParamTransition: function () { | |
this.transitionToRoute({ | |
queryParams: t | |
}), t = {} | |
}, | |
_queryParamChangesDuringSuspension: null | |
}) | |
}(), | |
function () { | |
var e = i.get, | |
t = i.set; | |
i.View.reopen({ | |
init: function () { | |
t(this, "_outlets", {}), this._super() | |
}, | |
connectOutlet: function (n, r) { | |
if (this._pendingDisconnections && delete this._pendingDisconnections[n], this._hasEquivalentView(n, r)) return r.destroy(), void 0; | |
var i = e(this, "_outlets"), | |
o = e(this, "container"), | |
a = o && o.lookup("router:main"), | |
s = e(r, "renderedName"); | |
t(i, n, r), a && s && a._connectActiveView(s, r) | |
}, | |
_hasEquivalentView: function (t, n) { | |
var r = e(this, "_outlets." + t); | |
return r && r.constructor === n.constructor && r.get("template") === n.get("template") && r.get("context") === n.get("context") | |
}, | |
disconnectOutlet: function (e) { | |
this._pendingDisconnections || (this._pendingDisconnections = {}), this._pendingDisconnections[e] = !0, i.run.once(this, "_finishDisconnections") | |
}, | |
_finishDisconnections: function () { | |
if (!this.isDestroyed) { | |
var n = e(this, "_outlets"), | |
r = this._pendingDisconnections; | |
this._pendingDisconnections = null; | |
for (var i in r) t(n, i, null) | |
} | |
} | |
}) | |
}(), | |
function () { | |
var e = i.run.queues, | |
t = i.ArrayPolyfills.indexOf; | |
e.splice(t.call(e, "actions") + 1, 0, "routerTransitions") | |
}(), | |
function () { | |
i.get, i.set; | |
i.Location = { | |
create: function (e) { | |
var t = e && e.implementation, | |
n = this.implementations[t]; | |
return n.create.apply(n, arguments) | |
}, | |
registerImplementation: function (e, t) { | |
this.implementations[e] = t | |
}, | |
implementations: {}, | |
getHash: function () { | |
var e = window.location.href, | |
t = e.indexOf("#"); | |
return -1 === t ? "" : e.substr(t) | |
} | |
} | |
}(), | |
function () { | |
var e = i.get, | |
t = i.set; | |
i.NoneLocation = i.Object.extend({ | |
implementation: "none", | |
path: "", | |
getURL: function () { | |
return e(this, "path") | |
}, | |
setURL: function (e) { | |
t(this, "path", e) | |
}, | |
onUpdateURL: function (e) { | |
this.updateCallback = e | |
}, | |
handleURL: function (e) { | |
t(this, "path", e), this.updateCallback(e) | |
}, | |
formatURL: function (e) { | |
return e | |
} | |
}) | |
}(), | |
function () { | |
var e = i.get, | |
t = i.set, | |
n = i.Location.getHash; | |
i.HashLocation = i.Object.extend({ | |
implementation: "hash", | |
init: function () { | |
t(this, "location", e(this, "location") || window.location) | |
}, | |
getURL: function () { | |
return n().substr(1) | |
}, | |
setURL: function (n) { | |
e(this, "location").hash = n, t(this, "lastSetURL", n) | |
}, | |
replaceURL: function (n) { | |
e(this, "location").replace("#" + n), t(this, "lastSetURL", n) | |
}, | |
onUpdateURL: function (n) { | |
var r = this, | |
o = i.guidFor(this); | |
i.$(window).on("hashchange.ember-location-" + o, function () { | |
i.run(function () { | |
var i = r.getURL(); | |
e(r, "lastSetURL") !== i && (t(r, "lastSetURL", null), n(i)) | |
}) | |
}) | |
}, | |
formatURL: function (e) { | |
return "#" + e | |
}, | |
willDestroy: function () { | |
var e = i.guidFor(this); | |
i.$(window).off("hashchange.ember-location-" + e) | |
} | |
}) | |
}(), | |
function () { | |
var e = i.get, | |
t = i.set, | |
n = !1, | |
r = window.history && "state" in window.history; | |
i.HistoryLocation = i.Object.extend({ | |
implementation: "history", | |
init: function () { | |
t(this, "location", e(this, "location") || window.location), t(this, "baseURL", i.$("base").attr("href") || "") | |
}, | |
initState: function () { | |
t(this, "history", e(this, "history") || window.history), this.replaceState(this.formatURL(this.getURL())) | |
}, | |
rootURL: "/", | |
getURL: function () { | |
var t = e(this, "rootURL"), | |
n = e(this, "location"), | |
r = n.pathname, | |
o = e(this, "baseURL"); | |
t = t.replace(/\/$/, ""), o = o.replace(/\/$/, ""); | |
var a = r.replace(o, "").replace(t, ""); | |
if (i.FEATURES.isEnabled("query-params-new")) { | |
var s = n.search || ""; | |
a += s | |
} | |
return a | |
}, | |
setURL: function (e) { | |
var t = this.getState(); | |
e = this.formatURL(e), t && t.path === e || this.pushState(e) | |
}, | |
replaceURL: function (e) { | |
var t = this.getState(); | |
e = this.formatURL(e), t && t.path === e || this.replaceState(e) | |
}, | |
getState: function () { | |
return r ? e(this, "history").state : this._historyState | |
}, | |
pushState: function (t) { | |
var n = { | |
path: t | |
}; | |
e(this, "history").pushState(n, null, t), r || (this._historyState = n), this._previousURL = this.getURL() | |
}, | |
replaceState: function (t) { | |
var n = { | |
path: t | |
}; | |
e(this, "history").replaceState(n, null, t), r || (this._historyState = n), this._previousURL = this.getURL() | |
}, | |
onUpdateURL: function (e) { | |
var t = i.guidFor(this), | |
r = this; | |
i.$(window).on("popstate.ember-location-" + t, function () { | |
(n || (n = !0, r.getURL() !== r._previousURL)) && e(r.getURL()) | |
}) | |
}, | |
formatURL: function (t) { | |
var n = e(this, "rootURL"), | |
r = e(this, "baseURL"); | |
return "" !== t ? (n = n.replace(/\/$/, ""), r = r.replace(/\/$/, "")) : r.match(/^\//) && n.match(/^\//) && (r = r.replace(/\/$/, "")), r + n + t | |
}, | |
willDestroy: function () { | |
var e = i.guidFor(this); | |
i.$(window).off("popstate.ember-location-" + e) | |
} | |
}) | |
}(), | |
function () { | |
{ | |
var e = (i.get, i.set), | |
t = document.documentMode, | |
n = window.history, | |
r = window.location, | |
o = i.Location.getHash; | |
i.AutoLocation = { | |
rootURL: "/", | |
_location: r, | |
getOrigin: function () { | |
var e = this._location, | |
t = e.origin; | |
return t || (t = e.protocol + "//" + e.hostname, e.port && (t += ":" + e.port)), t | |
}, | |
supportsHistory: function () { | |
var e = window.navigator.userAgent; | |
return -1 !== e.indexOf("Android 2") && -1 !== e.indexOf("Mobile Safari") && -1 === e.indexOf("Chrome") ? !1 : !! (n && "pushState" in n) | |
}(), | |
supportsHashChange: "onhashchange" in window && (void 0 === t || t > 7), | |
create: function (t) { | |
t && t.rootURL && (this.rootURL = t.rootURL); | |
var n, r, o, a = !1, | |
s = this.getFullPath(); | |
this.supportsHistory ? (r = this.getHistoryPath(), s === r ? n = i.HistoryLocation : (a = !0, this.replacePath(r))) : this.supportsHashChange && (o = this.getHashPath(), s === o ? n = i.HashLocation : (a = !0, this.replacePath(o))), n || (n = i.NoneLocation); | |
var u = n.create.apply(n, arguments); | |
return a && e(u, "cancelRouterSetup", !0), u | |
}, | |
replacePath: function (e) { | |
this._location.replace(this.getOrigin() + e) | |
}, | |
getPath: function () { | |
var e = r.pathname; | |
return "/" !== e.charAt(0) && (e = "/" + e), e | |
}, | |
getFullPath: function () { | |
return this.getPath() + o().substr(1) | |
}, | |
getHistoryPath: function () { | |
var e = this.getPath(), | |
t = o().substr(1), | |
n = e + t; | |
return n.replace(/\/\//, "/") | |
}, | |
getHashPath: function () { | |
var e = this.getHistoryPath(), | |
t = new RegExp("(" + this.rootURL + ")(.+)"), | |
n = e.replace(t, "$1#/$2"); | |
return n = n.replace(/\/\//, "/") | |
} | |
} | |
} | |
}(), | |
function () { | |
function e(t, n, r, i) { | |
var o, a = t.name, | |
s = t.incoming, | |
u = t.incomingNames, | |
l = u.length; | |
if (r || (r = {}), i || (i = []), !r.hasOwnProperty(a)) { | |
for (i.push(a), r[a] = !0, o = 0; l > o; o++) e(s[u[o]], n, r, i); | |
n(t, i), i.pop() | |
} | |
} | |
function t() { | |
this.names = [], this.vertices = {} | |
} | |
t.prototype.add = function (e) { | |
if (e) { | |
if (this.vertices.hasOwnProperty(e)) return this.vertices[e]; | |
var t = { | |
name: e, | |
incoming: {}, | |
incomingNames: [], | |
hasOutgoing: !1, | |
value: null | |
}; | |
return this.vertices[e] = t, this.names.push(e), t | |
} | |
}, t.prototype.map = function (e, t) { | |
this.add(e).value = t | |
}, t.prototype.addEdge = function (t, n) { | |
function r(e, t) { | |
if (e.name === n) throw new i.Error("cycle detected: " + n + " <- " + t.join(" <- ")) | |
} | |
if (t && n && t !== n) { | |
var o = this.add(t), | |
a = this.add(n); | |
a.incoming.hasOwnProperty(t) || (e(o, r), o.hasOutgoing = !0, a.incoming[t] = o, a.incomingNames.push(t)) | |
} | |
}, t.prototype.topsort = function (t) { | |
var n, r, i = {}, o = this.vertices, | |
a = this.names, | |
s = a.length; | |
for (n = 0; s > n; n++) r = o[a[n]], r.hasOutgoing || e(r, t, i) | |
}, t.prototype.addEdges = function (e, t, n, r) { | |
var i; | |
if (this.map(e, t), n) | |
if ("string" == typeof n) this.addEdge(e, n); | |
else | |
for (i = 0; i < n.length; i++) this.addEdge(e, n[i]); | |
if (r) | |
if ("string" == typeof r) this.addEdge(r, e); | |
else | |
for (i = 0; i < r.length; i++) this.addEdge(r[i], e) | |
}, i.DAG = t | |
}(), | |
function () { | |
var e = i.get, | |
t = i.String.classify, | |
n = i.String.capitalize, | |
r = i.String.decamelize; | |
i.DefaultResolver = i.Object.extend({ | |
namespace: null, | |
normalize: function (e) { | |
var t = e.split(":", 2), | |
n = t[0], | |
r = t[1]; | |
if ("template" !== n) { | |
var i = r; | |
return i.indexOf(".") > -1 && (i = i.replace(/\.(.)/g, function (e) { | |
return e.charAt(1).toUpperCase() | |
})), r.indexOf("_") > -1 && (i = i.replace(/_(.)/g, function (e) { | |
return e.charAt(1).toUpperCase() | |
})), n + ":" + i | |
} | |
return e | |
}, | |
resolve: function (e) { | |
var t = this.parseName(e), | |
n = t.resolveMethodName; | |
if (!t.name || !t.type) throw new TypeError("Invalid fullName: `" + e + "`, must be of the form `type:name` "); | |
if (this[n]) { | |
var r = this[n](t); | |
if (r) return r | |
} | |
return this.resolveOther(t) | |
}, | |
parseName: function (r) { | |
var o = r.split(":"), | |
a = o[0], | |
s = o[1], | |
u = s, | |
l = e(this, "namespace"), | |
c = l; | |
if ("template" !== a && -1 !== u.indexOf("/")) { | |
var h = u.split("/"); | |
u = h[h.length - 1]; | |
var d = n(h.slice(0, -1).join(".")); | |
c = i.Namespace.byName(d) | |
} | |
return { | |
fullName: r, | |
type: a, | |
fullNameWithoutType: s, | |
name: u, | |
root: c, | |
resolveMethodName: "resolve" + t(a) | |
} | |
}, | |
resolveTemplate: function (e) { | |
var t = e.fullNameWithoutType.replace(/\./g, "/"); | |
return i.TEMPLATES[t] ? i.TEMPLATES[t] : (t = r(t), i.TEMPLATES[t] ? i.TEMPLATES[t] : void 0) | |
}, | |
useRouterNaming: function (e) { | |
e.name = e.name.replace(/\./g, "_"), "basic" === e.name && (e.name = "") | |
}, | |
resolveController: function (e) { | |
return this.useRouterNaming(e), this.resolveOther(e) | |
}, | |
resolveRoute: function (e) { | |
return this.useRouterNaming(e), this.resolveOther(e) | |
}, | |
resolveView: function (e) { | |
return this.useRouterNaming(e), this.resolveOther(e) | |
}, | |
resolveHelper: function (e) { | |
return this.resolveOther(e) || i.Handlebars.helpers[e.fullNameWithoutType] | |
}, | |
resolveModel: function (n) { | |
var r = t(n.name), | |
i = e(n.root, r); | |
return i ? i : void 0 | |
}, | |
resolveOther: function (n) { | |
var r = t(n.name) + t(n.type), | |
i = e(n.root, r); | |
return i ? i : void 0 | |
}, | |
lookupDescription: function (e) { | |
var n = this.parseName(e); | |
if ("template" === n.type) return "template at " + n.fullNameWithoutType.replace(/\./g, "/"); | |
var r = n.root + "." + t(n.name); | |
return "model" !== n.type && (r += t(n.type)), r | |
}, | |
makeToString: function (e) { | |
return e.toString() | |
} | |
}) | |
}(), | |
function () { | |
function e(e) { | |
this._container = e | |
} | |
function t(e) { | |
function t(e) { | |
return r.resolve(e) | |
} | |
e.get("resolver"); | |
var n = e.get("resolver") || e.get("Resolver") || i.DefaultResolver, | |
r = n.create({ | |
namespace: e | |
}); | |
return t.describe = function (e) { | |
return r.lookupDescription(e) | |
}, t.makeToString = function (e, t) { | |
return r.makeToString(e, t) | |
}, t.normalize = function (e) { | |
return r.normalize ? r.normalize(e) : e | |
}, t | |
} | |
var n = i.get, | |
r = i.set; | |
e.deprecate = function (e) { | |
return function () { | |
var t = this._container; | |
return t[e].apply(t, arguments) | |
} | |
}, e.prototype = { | |
_container: null, | |
lookup: e.deprecate("lookup"), | |
resolve: e.deprecate("resolve"), | |
register: e.deprecate("register") | |
}; | |
var o = i.Application = i.Namespace.extend(i.DeferredMixin, { | |
rootElement: "body", | |
eventDispatcher: null, | |
customEvents: null, | |
_readinessDeferrals: 1, | |
init: function () { | |
if (this.$ || (this.$ = i.$), this.__container__ = this.buildContainer(), this.Router = this.defaultRouter(), this._super(), this.scheduleInitialize(), i.libraries.registerCoreLibrary("Handlebars", i.Handlebars.VERSION), i.libraries.registerCoreLibrary("jQuery", i.$().jquery), i.LOG_VERSION) { | |
i.LOG_VERSION = !1; | |
var e = Math.max.apply(this, i.A(i.libraries).mapBy("name.length")); | |
i.libraries.each(function (t) { | |
new Array(e - t.length + 1).join(" ") | |
}) | |
} | |
}, | |
buildContainer: function () { | |
var e = this.__container__ = o.buildContainer(this); | |
return e | |
}, | |
defaultRouter: function () { | |
if (this.Router !== !1) { | |
var e = this.__container__; | |
return this.Router && (e.unregister("router:main"), e.register("router:main", this.Router)), e.lookupFactory("router:main") | |
} | |
}, | |
scheduleInitialize: function () { | |
var e = this; | |
!this.$ || this.$.isReady ? i.run.schedule("actions", e, "_initialize") : this.$().ready(function () { | |
i.run(e, "_initialize") | |
}) | |
}, | |
deferReadiness: function () { | |
this._readinessDeferrals++ | |
}, | |
advanceReadiness: function () { | |
this._readinessDeferrals--, 0 === this._readinessDeferrals && i.run.once(this, this.didBecomeReady) | |
}, | |
register: function () { | |
var e = this.__container__; | |
e.register.apply(e, arguments) | |
}, | |
inject: function () { | |
var e = this.__container__; | |
e.injection.apply(e, arguments) | |
}, | |
initialize: function () {}, | |
_initialize: function () { | |
if (!this.isDestroyed) { | |
if (this.Router) { | |
var e = this.__container__; | |
e.unregister("router:main"), e.register("router:main", this.Router) | |
} | |
return this.runInitializers(), i.runLoadHooks("application", this), this.advanceReadiness(), this | |
} | |
}, | |
reset: function () { | |
function e() { | |
var e = this.__container__.lookup("router:main"); | |
e.reset(), i.run(this.__container__, "destroy"), this.buildContainer(), i.run.schedule("actions", this, function () { | |
this._initialize() | |
}) | |
} | |
this._readinessDeferrals = 1, i.run.join(this, e) | |
}, | |
runInitializers: function () { | |
var e, t, r = n(this.constructor, "initializers"), | |
o = this.__container__, | |
a = new i.DAG, | |
s = this; | |
for (e in r) t = r[e], a.addEdges(t.name, t.initialize, t.before, t.after); | |
a.topsort(function (e) { | |
var t = e.value; | |
t(o, s) | |
}) | |
}, | |
didBecomeReady: function () { | |
this.setupEventDispatcher(), this.ready(), this.startRouting(), i.testing || (i.Namespace.processAll(), i.BOOTED = !0), this.resolve(this) | |
}, | |
setupEventDispatcher: function () { | |
var e = n(this, "customEvents"), | |
t = n(this, "rootElement"), | |
i = this.__container__.lookup("event_dispatcher:main"); | |
r(this, "eventDispatcher", i), i.setup(e, t) | |
}, | |
startRouting: function () { | |
var e = this.__container__.lookup("router:main"); | |
e && e.startRouting() | |
}, | |
handleURL: function (e) { | |
var t = this.__container__.lookup("router:main"); | |
t.handleURL(e) | |
}, | |
ready: i.K, | |
resolver: null, | |
Resolver: null, | |
willDestroy: function () { | |
i.BOOTED = !1, this.__container__.lookup("router:main").reset(), this.__container__.destroy() | |
}, | |
initializer: function (e) { | |
this.constructor.initializer(e) | |
} | |
}); | |
i.Application.reopenClass({ | |
initializers: {}, | |
initializer: function (e) { | |
void 0 !== this.superclass.initializers && this.superclass.initializers === this.initializers && this.reopenClass({ | |
initializers: i.create(this.initializers) | |
}), this.initializers[e.name] = e | |
}, | |
buildContainer: function (n) { | |
var r = new i.Container; | |
return i.Container.defaultContainer = new e(r), r.set = i.set, r.resolver = t(n), r.normalize = r.resolver.normalize, r.describe = r.resolver.describe, r.makeToString = r.resolver.makeToString, r.optionsForType("component", { | |
singleton: !1 | |
}), r.optionsForType("view", { | |
singleton: !1 | |
}), r.optionsForType("template", { | |
instantiate: !1 | |
}), r.optionsForType("helper", { | |
instantiate: !1 | |
}), r.register("application:main", n, { | |
instantiate: !1 | |
}), r.register("controller:basic", i.Controller, { | |
instantiate: !1 | |
}), r.register("controller:object", i.ObjectController, { | |
instantiate: !1 | |
}), r.register("controller:array", i.ArrayController, { | |
instantiate: !1 | |
}), r.register("route:basic", i.Route, { | |
instantiate: !1 | |
}), r.register("event_dispatcher:main", i.EventDispatcher), r.register("router:main", i.Router), r.injection("router:main", "namespace", "application:main"), r.register("location:auto", i.AutoLocation), r.register("location:hash", i.HashLocation), r.register("location:history", i.HistoryLocation), r.register("location:none", i.NoneLocation), r.injection("controller", "target", "router:main"), r.injection("controller", "namespace", "application:main"), r.injection("route", "router", "router:main"), r | |
} | |
}), i.runLoadHooks("Ember.Application", i.Application) | |
}(), | |
function () { | |
function e(e, t, n) { | |
var r, o, a, s = []; | |
for (o = 0, a = n.length; a > o; o++) r = n[o], -1 === r.indexOf(":") && (r = "controller:" + r), t.has(r) || s.push(r); | |
if (s.length) throw new i.Error(i.inspect(e) + " needs [ " + s.join(", ") + " ] but " + (s.length > 1 ? "they" : "it") + " could not be found") | |
} | |
var t = i.get, | |
n = (i.set, i.computed(function () { | |
var e = this; | |
return { | |
needs: t(e, "needs"), | |
container: t(e, "container"), | |
unknownProperty: function (t) { | |
var n, r, o, a = this.needs; | |
for (r = 0, o = a.length; o > r; r++) | |
if (n = a[r], n === t) return this.container.lookup("controller:" + t); | |
var s = i.inspect(e) + "#needs does not include `" + t + "`. To access the " + t + " controller from " + i.inspect(e) + ", " + i.inspect(e) + " should have a `needs` property that is an array of the controllers it has access to."; | |
throw new ReferenceError(s) | |
}, | |
setUnknownProperty: function (t) { | |
throw new Error("You cannot overwrite the value of `controllers." + t + "` of " + i.inspect(e)) | |
} | |
} | |
})); | |
i.ControllerMixin.reopen({ | |
concatenatedProperties: ["needs"], | |
needs: [], | |
init: function () { | |
var n = t(this, "needs"), | |
r = t(n, "length"); | |
r > 0 && (this.container && e(this, this.container, n), t(this, "controllers")), this._super.apply(this, arguments) | |
}, | |
controllerFor: function (e) { | |
return i.controllerFor(t(this, "container"), e) | |
}, | |
controllers: n | |
}) | |
}(), | |
function () { | |
i.DataAdapter = i.Object.extend({ | |
init: function () { | |
this._super(), this.releaseMethods = i.A() | |
}, | |
container: null, | |
attributeLimit: 3, | |
releaseMethods: i.A(), | |
getFilters: function () { | |
return i.A() | |
}, | |
watchModelTypes: function (e, t) { | |
var n, r = this.getModelTypes(), | |
o = this, | |
a = i.A(); | |
n = r.map(function (e) { | |
var n = o.wrapModelType(e); | |
return a.push(o.observeModelType(e, t)), n | |
}), e(n); | |
var s = function () { | |
a.forEach(function (e) { | |
e() | |
}), o.releaseMethods.removeObject(s) | |
}; | |
return this.releaseMethods.pushObject(s), s | |
}, | |
watchRecords: function (e, t, n, r) { | |
var o, a = this, | |
s = i.A(), | |
u = this.getRecords(e), | |
l = function (e) { | |
n([e]) | |
}, c = u.map(function (e) { | |
return s.push(a.observeRecord(e, l)), a.wrapRecord(e) | |
}), | |
h = function (e, n, i, o) { | |
for (var u = n; n + o > u; u++) { | |
var c = e.objectAt(u), | |
h = a.wrapRecord(c); | |
s.push(a.observeRecord(c, l)), t([h]) | |
} | |
i && r(n, i) | |
}, d = { | |
didChange: h, | |
willChange: i.K | |
}; | |
return u.addArrayObserver(a, d), o = function () { | |
s.forEach(function (e) { | |
e() | |
}), u.removeArrayObserver(a, d), a.releaseMethods.removeObject(o) | |
}, t(c), this.releaseMethods.pushObject(o), o | |
}, | |
willDestroy: function () { | |
this._super(), this.releaseMethods.forEach(function (e) { | |
e() | |
}) | |
}, | |
detect: function () { | |
return !1 | |
}, | |
columnsForType: function () { | |
return i.A() | |
}, | |
observeModelType: function (e, t) { | |
var n = this, | |
r = this.getRecords(e), | |
o = function () { | |
t([n.wrapModelType(e)]) | |
}, a = { | |
didChange: function () { | |
i.run.scheduleOnce("actions", this, o) | |
}, | |
willChange: i.K | |
}; | |
r.addArrayObserver(this, a); | |
var s = function () { | |
r.removeArrayObserver(n, a) | |
}; | |
return s | |
}, | |
wrapModelType: function (e) { | |
var t, n = this.getRecords(e); | |
return t = { | |
name: e.toString(), | |
count: i.get(n, "length"), | |
columns: this.columnsForType(e), | |
object: e | |
} | |
}, | |
getModelTypes: function () { | |
var e = i.A(i.Namespace.NAMESPACES), | |
t = i.A(), | |
n = this; | |
return e.forEach(function (e) { | |
for (var r in e) | |
if (e.hasOwnProperty(r)) { | |
var i = e[r]; | |
n.detect(i) && t.push(i) | |
} | |
}), t | |
}, | |
getRecords: function () { | |
return i.A() | |
}, | |
wrapRecord: function (e) { | |
var t = { | |
object: e | |
}; | |
return t.columnValues = this.getRecordColumnValues(e), t.searchKeywords = this.getRecordKeywords(e), t.filterValues = this.getRecordFilterValues(e), t.color = this.getRecordColor(e), t | |
}, | |
getRecordColumnValues: function () { | |
return {} | |
}, | |
getRecordKeywords: function () { | |
return i.A() | |
}, | |
getRecordFilterValues: function () { | |
return {} | |
}, | |
getRecordColor: function () { | |
return null | |
}, | |
observeRecord: function () { | |
return function () {} | |
} | |
}) | |
}() | |
}(), "undefined" == typeof location || "localhost" !== location.hostname && "127.0.0.1" !== location.hostname || Ember.Logger.warn("You are running a production build of Ember on localhost and won't receive detailed error messages. If you want full error messages please use the non-minified build provided on the Ember website."); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment