Created
September 18, 2015 09:48
-
-
Save andymason/2d0bfa5811b117eaa1b4 to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
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
(function e(b, g, d) { | |
function c(n, k) { | |
if (!g[n]) { | |
if (!b[n]) { | |
var j = typeof require == "function" && require; | |
if (!k && j) { | |
return j(n, !0) | |
} | |
if (a) { | |
return a(n, !0) | |
} | |
var m = new Error("Cannot find module '" + n + "'"); | |
throw m.code = "MODULE_NOT_FOUND", m | |
} | |
var h = g[n] = { | |
exports: {} | |
}; | |
b[n][0].call(h.exports, function(l) { | |
var o = b[n][1][l]; | |
return c(o ? o : l) | |
}, h, h.exports, e, b, g, d) | |
} | |
return g[n].exports | |
} | |
var a = typeof require == "function" && require; | |
for (var f = 0; f < d.length; f++) { | |
c(d[f]) | |
} | |
return c | |
})({ | |
1: [function(d, f, b) { | |
var g = d("./ac-browser/BrowserData"); | |
var a = /applewebkit/i; | |
var h = d("./ac-browser/IE"); | |
var c = g.create(); | |
c.isWebKit = function(j) { | |
var k = j || window.navigator.userAgent; | |
return k ? !!a.test(k) : false | |
}; | |
c.lowerCaseUserAgent = navigator.userAgent.toLowerCase(); | |
if (c.name === "IE") { | |
c.IE = { | |
documentMode: h.getDocumentMode() | |
} | |
} | |
f.exports = c | |
}, { | |
"./ac-browser/BrowserData": 2, | |
"./ac-browser/IE": 3 | |
}], | |
2: [function(b, c, a) { | |
b("ac-polyfills/Array/prototype.filter"); | |
b("ac-polyfills/Array/prototype.some"); | |
var d = b("./data"); | |
function f() {} | |
f.prototype = { | |
__getBrowserVersion: function(h, j) { | |
var g; | |
if (!h || !j) { | |
return | |
} | |
var k = d.browser.filter(function(l) { | |
return l.identity === j | |
}); | |
k.some(function(n) { | |
var l = n.versionSearch || j; | |
var m = h.indexOf(l); | |
if (m > -1) { | |
g = parseFloat(h.substring(m + l.length + 1)); | |
return true | |
} | |
}); | |
return g | |
}, | |
__getName: function(g) { | |
return this.__getIdentityStringFromArray(g) | |
}, | |
__getIdentity: function(g) { | |
if (g.string) { | |
return this.__matchSubString(g) | |
} else { | |
if (g.prop) { | |
return g.identity | |
} | |
} | |
}, | |
__getIdentityStringFromArray: function(g) { | |
for (var k = 0, h = g.length, j; k < h; k++) { | |
j = this.__getIdentity(g[k]); | |
if (j) { | |
return j | |
} | |
} | |
}, | |
__getOS: function(g) { | |
return this.__getIdentityStringFromArray(g) | |
}, | |
__getOSVersion: function(j, m) { | |
if (!j || !m) { | |
return | |
} | |
var l = d.os.filter(function(n) { | |
return n.identity === m | |
})[0]; | |
var g = l.versionSearch || m; | |
var k = new RegExp(g + " ([\\d_\\.]+)", "i"); | |
var h = j.match(k); | |
if (h !== null) { | |
return h[1].replace(/_/g, ".") | |
} | |
}, | |
__matchSubString: function(h) { | |
var g = h.subString; | |
if (g) { | |
var j = g.test ? !!g.test(h.string) : h.string.indexOf(g) > -1; | |
if (j) { | |
return h.identity | |
} | |
} | |
} | |
}; | |
f.create = function() { | |
var g = new f(); | |
var h = {}; | |
h.name = g.__getName(d.browser); | |
h.version = g.__getBrowserVersion(d.versionString, h.name); | |
h.os = g.__getOS(d.os); | |
h.osVersion = g.__getOSVersion(d.versionString, h.os); | |
return h | |
}; | |
c.exports = f | |
}, { | |
"./data": 4, | |
"ac-polyfills/Array/prototype.filter": 387, | |
"ac-polyfills/Array/prototype.some": 391 | |
}], | |
3: [function(b, c, a) { | |
c.exports = { | |
getDocumentMode: function() { | |
var d; | |
if (document.documentMode) { | |
d = parseInt(document.documentMode, 10) | |
} else { | |
d = 5; | |
if (document.compatMode) { | |
if (document.compatMode === "CSS1Compat") { | |
d = 7 | |
} | |
} | |
} | |
return d | |
} | |
} | |
}, {}], | |
4: [function(b, c, a) { | |
c.exports = { | |
browser: [{ | |
string: window.navigator.userAgent, | |
subString: "Edge", | |
identity: "Edge" | |
}, { | |
string: window.navigator.userAgent, | |
subString: "Chrome", | |
identity: "Chrome" | |
}, { | |
string: window.navigator.userAgent, | |
subString: /silk/i, | |
identity: "Silk" | |
}, { | |
string: window.navigator.userAgent, | |
subString: "OmniWeb", | |
versionSearch: "OmniWeb/", | |
identity: "OmniWeb" | |
}, { | |
string: window.navigator.userAgent, | |
subString: /mobile\/[^\s]*\ssafari\//i, | |
identity: "Safari Mobile", | |
versionSearch: "Version" | |
}, { | |
string: window.navigator.vendor, | |
subString: "Apple", | |
identity: "Safari", | |
versionSearch: "Version" | |
}, { | |
prop: window.opera, | |
identity: "Opera", | |
versionSearch: "Version" | |
}, { | |
string: window.navigator.vendor, | |
subString: "iCab", | |
identity: "iCab" | |
}, { | |
string: window.navigator.vendor, | |
subString: "KDE", | |
identity: "Konqueror" | |
}, { | |
string: window.navigator.userAgent, | |
subString: "Firefox", | |
identity: "Firefox" | |
}, { | |
string: window.navigator.vendor, | |
subString: "Camino", | |
identity: "Camino" | |
}, { | |
string: window.navigator.userAgent, | |
subString: "Netscape", | |
identity: "Netscape" | |
}, { | |
string: window.navigator.userAgent, | |
subString: "MSIE", | |
identity: "IE", | |
versionSearch: "MSIE" | |
}, { | |
string: window.navigator.userAgent, | |
subString: "Trident", | |
identity: "IE", | |
versionSearch: "rv" | |
}, { | |
string: window.navigator.userAgent, | |
subString: "Gecko", | |
identity: "Mozilla", | |
versionSearch: "rv" | |
}, { | |
string: window.navigator.userAgent, | |
subString: "Mozilla", | |
identity: "Netscape", | |
versionSearch: "Mozilla" | |
}], | |
os: [{ | |
string: window.navigator.platform, | |
subString: "Win", | |
identity: "Windows", | |
versionSearch: "Windows NT" | |
}, { | |
string: window.navigator.platform, | |
subString: "Mac", | |
identity: "OS X" | |
}, { | |
string: window.navigator.userAgent, | |
subString: "iPhone", | |
identity: "iOS", | |
versionSearch: "iPhone OS" | |
}, { | |
string: window.navigator.userAgent, | |
subString: "iPad", | |
identity: "iOS", | |
versionSearch: "CPU OS" | |
}, { | |
string: window.navigator.userAgent, | |
subString: /android/i, | |
identity: "Android" | |
}, { | |
string: window.navigator.platform, | |
subString: "Linux", | |
identity: "Linux" | |
}], | |
versionString: window.navigator.userAgent || window.navigator.appVersion || undefined | |
} | |
}, {}], | |
5: [function(b, c, a) { | |
b("ac-polyfills/Array/prototype.slice"); | |
b("ac-polyfills/Element/prototype.classList"); | |
var d = b("./className/add"); | |
c.exports = function f() { | |
var j = Array.prototype.slice.call(arguments); | |
var h = j.shift(j); | |
var g; | |
if (h.classList && h.classList.add) { | |
h.classList.add.apply(h.classList, j); | |
return | |
} | |
for (g = 0; g < j.length; g++) { | |
d(h, j[g]) | |
} | |
} | |
}, { | |
"./className/add": 7, | |
"ac-polyfills/Array/prototype.slice": 390, | |
"ac-polyfills/Element/prototype.classList": 393 | |
}], | |
6: [function(b, c, a) { | |
c.exports = { | |
add: b("./className/add"), | |
contains: b("./className/contains"), | |
remove: b("./className/remove") | |
} | |
}, { | |
"./className/add": 7, | |
"./className/contains": 8, | |
"./className/remove": 10 | |
}], | |
7: [function(b, c, a) { | |
var d = b("./contains"); | |
c.exports = function f(h, g) { | |
if (!d(h, g)) { | |
h.className += " " + g | |
} | |
} | |
}, { | |
"./contains": 8 | |
}], | |
8: [function(b, c, a) { | |
var f = b("./getTokenRegExp"); | |
c.exports = function d(h, g) { | |
return f(g).test(h.className) | |
} | |
}, { | |
"./getTokenRegExp": 9 | |
}], | |
9: [function(b, c, a) { | |
c.exports = function d(f) { | |
return new RegExp("(\\s|^)" + f + "(\\s|$)") | |
} | |
}, {}], | |
10: [function(c, d, b) { | |
var f = c("./contains"); | |
var g = c("./getTokenRegExp"); | |
d.exports = function a(j, h) { | |
if (f(j, h)) { | |
j.className = j.className.replace(g(h), "$1").trim() | |
} | |
} | |
}, { | |
"./contains": 8, | |
"./getTokenRegExp": 9 | |
}], | |
11: [function(b, d, a) { | |
b("ac-polyfills/Element/prototype.classList"); | |
var f = b("./className/contains"); | |
d.exports = function c(h, g) { | |
if (h.classList && h.classList.contains) { | |
return h.classList.contains(g) | |
} | |
return f(h, g) | |
} | |
}, { | |
"./className/contains": 8, | |
"ac-polyfills/Element/prototype.classList": 393 | |
}], | |
12: [function(b, c, a) { | |
c.exports = { | |
add: b("./add"), | |
contains: b("./contains"), | |
remove: b("./remove"), | |
toggle: b("./toggle") | |
} | |
}, { | |
"./add": 5, | |
"./contains": 11, | |
"./remove": 13, | |
"./toggle": 14 | |
}], | |
13: [function(d, f, c) { | |
d("ac-polyfills/Array/prototype.slice"); | |
d("ac-polyfills/Element/prototype.classList"); | |
var b = d("./className/remove"); | |
f.exports = function a() { | |
var j = Array.prototype.slice.call(arguments); | |
var h = j.shift(j); | |
var g; | |
if (h.classList && h.classList.remove) { | |
h.classList.remove.apply(h.classList, j); | |
return | |
} | |
for (g = 0; g < j.length; g++) { | |
b(h, j[g]) | |
} | |
} | |
}, { | |
"./className/remove": 10, | |
"ac-polyfills/Array/prototype.slice": 390, | |
"ac-polyfills/Element/prototype.classList": 393 | |
}], | |
14: [function(c, d, b) { | |
c("ac-polyfills/Element/prototype.classList"); | |
var f = c("./className"); | |
d.exports = function a(k, j, l) { | |
var h = (typeof l !== "undefined"); | |
var g; | |
if (k.classList && k.classList.toggle) { | |
if (h) { | |
return k.classList.toggle(j, l) | |
} | |
return k.classList.toggle(j) | |
} | |
if (h) { | |
g = !!l | |
} else { | |
g = !f.contains(k, j) | |
} | |
if (g) { | |
f.add(k, j) | |
} else { | |
f.remove(k, j) | |
} | |
return g | |
} | |
}, { | |
"./className": 6, | |
"ac-polyfills/Element/prototype.classList": 393 | |
}], | |
15: [function(c, d, b) { | |
var g = c("./ac-clock/Clock"), | |
f = c("./ac-clock/ThrottledClock"), | |
a = c("./ac-clock/sharedClockInstance"); | |
a.Clock = g; | |
a.ThrottledClock = f; | |
d.exports = a | |
}, { | |
"./ac-clock/Clock": 16, | |
"./ac-clock/ThrottledClock": 17, | |
"./ac-clock/sharedClockInstance": 18 | |
}], | |
16: [function(c, d, b) { | |
var g; | |
var f = c("ac-event-emitter").EventEmitter; | |
var a = new Date().getTime(); | |
function h() { | |
f.call(this); | |
this.lastFrameTime = null; | |
this._animationFrame = null; | |
this._active = false; | |
this._startTime = null; | |
this._boundOnAnimationFrame = this._onAnimationFrame.bind(this); | |
this._getTime = Date.now || function() { | |
return new Date().getTime() | |
} | |
} | |
g = h.prototype = new f(null); | |
g.start = function() { | |
if (this._active) { | |
return | |
} | |
this._tick() | |
}; | |
g.stop = function() { | |
if (this._active) { | |
window.cancelAnimationFrame(this._animationFrame) | |
} | |
this._animationFrame = null; | |
this.lastFrameTime = null; | |
this._active = false | |
}; | |
g.destroy = function() { | |
this.stop(); | |
this.off(); | |
var j; | |
for (j in this) { | |
if (this.hasOwnProperty(j)) { | |
this[j] = null | |
} | |
} | |
}; | |
g.isRunning = function() { | |
return this._active | |
}; | |
g._tick = function() { | |
if (!this._active) { | |
this._active = true | |
} | |
this._animationFrame = window.requestAnimationFrame(this._boundOnAnimationFrame) | |
}; | |
g._onAnimationFrame = function(m) { | |
var n = 0; | |
var j = this._getTime(); | |
if (this.lastFrameTime === null) { | |
this.lastFrameTime = j - a | |
} else { | |
n = m - this.lastFrameTime | |
} | |
var l = 0, | |
k; | |
if (n !== 0) { | |
l = 1000 / n | |
} | |
k = { | |
time: m, | |
delta: n, | |
fps: l, | |
naturalFps: l, | |
timeNow: j | |
}; | |
this.trigger("update", k); | |
this.trigger("draw", k); | |
this._animationFrame = null; | |
this.lastFrameTime = m; | |
if (this._active !== false) { | |
this._tick() | |
} else { | |
this.lastFrameTime = null | |
} | |
}; | |
d.exports = h | |
}, { | |
"ac-event-emitter": 19 | |
}], | |
17: [function(c, d, b) { | |
var g; | |
var a = c("./sharedClockInstance"), | |
f = c("ac-event-emitter").EventEmitter; | |
function h(k, j) { | |
if (k === null) { | |
return | |
} | |
f.call(this); | |
j = j || {}; | |
this._fps = k || null; | |
this._clock = j.clock || a; | |
this._lastThrottledTime = null; | |
this._clockEvent = null; | |
this._clock.on("update", this._onClockUpdate, this) | |
} | |
g = h.prototype = new f(null); | |
g.setFps = function(j) { | |
this._fps = j; | |
return this | |
}; | |
g.getFps = function() { | |
return this._fps | |
}; | |
g.start = function() { | |
this._clock.start(); | |
return this | |
}; | |
g.stop = function() { | |
this._clock.stop(); | |
return this | |
}; | |
g.isRunning = function() { | |
return this._clock.isRunning() | |
}; | |
g.destroy = function() { | |
this._clock.off("update", this._onClockUpdate, this); | |
this._clock.destroy.call(this) | |
}; | |
g._onClockUpdate = function(j) { | |
if (this._lastThrottledTime === null) { | |
this._lastThrottledTime = this._clock.lastFrameTime | |
} | |
var k = j.time - this._lastThrottledTime; | |
if (!this._fps) { | |
throw new TypeError("FPS is not defined.") | |
} | |
if (k < (1000 / this._fps)) { | |
return | |
} | |
this._clockEvent = j; | |
this._clockEvent.delta = k; | |
this._clockEvent.fps = 1000 / k; | |
this._lastThrottledTime = this._clockEvent.time; | |
this._clock.once("draw", this._onClockDraw, this); | |
this.trigger("update", this._clockEvent) | |
}; | |
g._onClockDraw = function() { | |
this.trigger("draw", this._clockEvent) | |
}; | |
d.exports = h | |
}, { | |
"./sharedClockInstance": 18, | |
"ac-event-emitter": 19 | |
}], | |
18: [function(b, c, a) { | |
var d = b("./Clock"); | |
c.exports = new d() | |
}, { | |
"./Clock": 16 | |
}], | |
19: [function(b, c, a) { | |
c.exports.EventEmitter = b("./ac-event-emitter/EventEmitter") | |
}, { | |
"./ac-event-emitter/EventEmitter": 20 | |
}], | |
20: [function(d, c, f) { | |
var h = "EventEmitter:propagation"; | |
var l = function(m) { | |
if (m) { | |
this.context = m | |
} | |
}; | |
var g = l.prototype; | |
var j = function() { | |
if (!this.hasOwnProperty("_events") && typeof this._events !== "object") { | |
this._events = {} | |
} | |
return this._events | |
}; | |
var a = function(n, p) { | |
var q = n[0]; | |
var r = n[1]; | |
var o = n[2]; | |
if ((typeof q !== "string" && typeof q !== "object") || q === null || Array.isArray(q)) { | |
throw new TypeError("Expecting event name to be a string or object.") | |
} | |
if ((typeof q === "string") && !r) { | |
throw new Error("Expecting a callback function to be provided.") | |
} | |
if (r && (typeof r !== "function")) { | |
if (typeof q === "object" && typeof r === "object") { | |
o = r | |
} else { | |
throw new TypeError("Expecting callback to be a function.") | |
} | |
} | |
if (typeof q === "object") { | |
for (var m in q) { | |
p.call(this, m, q[m], o) | |
} | |
} | |
if (typeof q === "string") { | |
q = q.split(" "); | |
q.forEach(function(s) { | |
p.call(this, s, r, o) | |
}, this) | |
} | |
}; | |
var k = function(p, q) { | |
var m; | |
var n; | |
var o; | |
m = j.call(this)[p]; | |
if (!m || m.length === 0) { | |
return | |
} | |
m = m.slice(); | |
this._stoppedImmediatePropagation = false; | |
for (n = 0, o = m.length; n < o; n++) { | |
if (this._stoppedImmediatePropagation || q(m[n], n)) { | |
break | |
} | |
} | |
}; | |
var b = function(n, o, p) { | |
var m = -1; | |
k.call(this, o, function(r, q) { | |
if (r.callback === p) { | |
m = q; | |
return true | |
} | |
}); | |
if (m === -1) { | |
return | |
} | |
n[o].splice(m, 1) | |
}; | |
g.on = function() { | |
var m = j.call(this); | |
a.call(this, arguments, function(o, p, n) { | |
m[o] = m[o] || (m[o] = []); | |
m[o].push({ | |
callback: p, | |
context: n | |
}) | |
}); | |
return this | |
}; | |
g.once = function() { | |
a.call(this, arguments, function(n, p, m) { | |
var o = function(q) { | |
p.call(m || this, q); | |
this.off(n, o) | |
}; | |
this.on(n, o, this) | |
}); | |
return this | |
}; | |
g.off = function(o, q) { | |
var n = j.call(this); | |
if (arguments.length === 0) { | |
this._events = {} | |
} else { | |
if (!o || (typeof o !== "string" && typeof o !== "object") || Array.isArray(o)) { | |
throw new TypeError("Expecting event name to be a string or object.") | |
} | |
} | |
if (typeof o === "object") { | |
for (var p in o) { | |
b.call(this, n, p, o[p]) | |
} | |
} | |
if (typeof o === "string") { | |
var m = o.split(" "); | |
if (m.length === 1) { | |
if (q) { | |
b.call(this, n, o, q) | |
} else { | |
n[o] = [] | |
} | |
} else { | |
m.forEach(function(r) { | |
n[r] = [] | |
}) | |
} | |
} | |
return this | |
}; | |
g.trigger = function(n, o, m) { | |
if (!n) { | |
throw new Error("trigger method requires an event name") | |
} | |
if (typeof n !== "string") { | |
throw new TypeError("Expecting event names to be a string.") | |
} | |
if (m && typeof m !== "boolean") { | |
throw new TypeError("Expecting doNotPropagate to be a boolean.") | |
} | |
n = n.split(" "); | |
n.forEach(function(p) { | |
k.call(this, p, function(q) { | |
q.callback.call(q.context || this.context || this, o) | |
}.bind(this)); | |
if (!m) { | |
k.call(this, h, function(r) { | |
var q = p; | |
if (r.prefix) { | |
q = r.prefix + q | |
} | |
r.emitter.trigger(q, o) | |
}) | |
} | |
}, this); | |
return this | |
}; | |
g.propagateTo = function(n, o) { | |
var m = j.call(this); | |
if (!m[h]) { | |
this._events[h] = [] | |
} | |
m[h].push({ | |
emitter: n, | |
prefix: o | |
}) | |
}; | |
g.stopPropagatingTo = function(p) { | |
var n = j.call(this); | |
if (!p) { | |
n[h] = []; | |
return | |
} | |
var q = n[h]; | |
var o = q.length; | |
var m; | |
for (m = 0; m < o; m++) { | |
if (q[m].emitter === p) { | |
q.splice(m, 1); | |
break | |
} | |
} | |
}; | |
g.stopImmediatePropagation = function() { | |
this._stoppedImmediatePropagation = true | |
}; | |
g.has = function(m, t, q) { | |
var p = j.call(this); | |
var n = p[m]; | |
if (arguments.length === 0) { | |
return Object.keys(p) | |
} | |
if (!n) { | |
return false | |
} | |
if (!t) { | |
return (n.length > 0) ? true : false | |
} | |
for (var o = 0, r = n.length; o < r; o++) { | |
var s = n[o]; | |
if (q && t && s.context === q && s.callback === t) { | |
return true | |
} else { | |
if (t && !q && s.callback === t) { | |
return true | |
} | |
} | |
} | |
return false | |
}; | |
c.exports = l | |
}, {}], | |
21: [function(b, c, a) { | |
c.exports = { | |
Clip: b("./ac-clip/Clip") | |
} | |
}, { | |
"./ac-clip/Clip": 22 | |
}], | |
22: [function(c, b, d) { | |
var g = c("ac-object/create"); | |
var l = c("ac-easing").createPredefined; | |
var a = c("ac-clock"); | |
var k = c("ac-easing").Ease; | |
var m = c("ac-event-emitter").EventEmitter; | |
var j = "ease"; | |
function h(p, o, r, n) { | |
n = n || {}; | |
this._options = n; | |
this._target = p; | |
this._duration = o * 1000; | |
this._delay = (n.delay || 0) * 1000; | |
this._remainingDelay = this._delay; | |
this._progress = 0; | |
this._clock = n.clock || a; | |
this._playing = false; | |
this._getTime = Date.now || function() { | |
return new Date().getTime() | |
}; | |
this._isYoyo = n.yoyo; | |
this._direction = 1; | |
this._loop = n.loop || 0; | |
this._loopCount = 0; | |
this._propsTo = r || {}; | |
this._propsFrom = n.propsFrom || {}; | |
this._onStart = n.onStart || null; | |
this._onUpdate = n.onUpdate || null; | |
this._onDraw = n.onDraw || null; | |
this._onComplete = n.onComplete || null; | |
var q = n.ease || j; | |
this._ease = (typeof q === "function") ? new k(q) : l(q); | |
this._start = this._start.bind(this); | |
this._update = this._update.bind(this); | |
this._draw = this._draw.bind(this); | |
this._isPrepared = false; | |
h._add(this) | |
} | |
var f = h.prototype = g(m.prototype); | |
h.COMPLETE = "complete"; | |
h.PAUSE = "pause"; | |
h.PLAY = "play"; | |
f.play = function() { | |
if (!this._playing) { | |
this._playing = true; | |
if (this._delay === 0 || this._remainingDelay === 0) { | |
this._start() | |
} else { | |
if (!this._isPrepared) { | |
this._setDiff(); | |
this._updateProps() | |
} | |
this._startTimeout = setTimeout(this._start, this._remainingDelay); | |
this._delayStart = this._getTime() | |
} | |
} | |
return this | |
}; | |
f.pause = function() { | |
if (this._playing) { | |
if (this._startTimeout) { | |
this._remainingDelay = this._getTime() - this._delayStart; | |
clearTimeout(this._startTimeout) | |
} | |
this._stop(); | |
this.trigger(h.PAUSE, this._getDetails()) | |
} | |
return this | |
}; | |
f.destroy = function() { | |
this.pause(); | |
this._options = null; | |
this._target = null; | |
this._storeTarget = null; | |
this._ease = null; | |
this._clock = null; | |
this._propsTo = null; | |
this._propsFrom = null; | |
this._storePropsTo = null; | |
this._storePropsFrom = null; | |
this._propsDiff = null; | |
this._propsEase = null; | |
this._onStart = null; | |
this._onUpdate = null; | |
this._onDraw = null; | |
this._onComplete = null; | |
h._remove(this); | |
return this | |
}; | |
f.reset = function() { | |
if (!this._isPrepared) { | |
return | |
} | |
this._stop(); | |
this._resetLoop(this._target, this._storeTarget); | |
this._direction = 1; | |
this._loop = this._options.loop || 0; | |
this._loopCount = 0; | |
this._propsFrom = this._storePropsFrom; | |
this._propsTo = this._storePropsTo; | |
this._progress = 0; | |
this._setStartTime(); | |
if (this._onUpdate) { | |
this._onUpdate.call(this, this._getDetails()) | |
} | |
if (this._onDraw) { | |
this._onDraw.call(this, this._getDetails()) | |
} | |
return this | |
}; | |
f.isPlaying = function() { | |
return this._playing | |
}; | |
f.getTarget = function() { | |
return this._target | |
}; | |
f.setCurrentTime = function(n) { | |
this.setProgress(n * 1000 / this._duration); | |
return this.getCurrentTime() | |
}; | |
f.getCurrentTime = function() { | |
return (this.getProgress() * this._duration) / 1000 | |
}; | |
f.setProgress = function(n) { | |
this._progress = Math.min(1, Math.max(0, n)); | |
this._setStartTime(); | |
if (!this._isPrepared) { | |
this._setDiff() | |
} | |
if (this._playing && n === 1) { | |
this._completeProps(); | |
if (this._onUpdate) { | |
this._onUpdate.call(this, this._getDetails()) | |
} | |
if (this._onDraw) { | |
this._onDraw.call(this, this._getDetails()) | |
} | |
this._complete() | |
} else { | |
this._updateProps(); | |
if (this._onUpdate) { | |
this._onUpdate.call(this, this._getDetails()) | |
} | |
if (this._onDraw) { | |
this._onDraw.call(this, this._getDetails()) | |
} | |
} | |
return this.getProgress() | |
}; | |
f.getProgress = function() { | |
return this._progress | |
}; | |
f._resetLoop = function(o, n) { | |
var p; | |
for (p in n) { | |
if (n.hasOwnProperty(p)) { | |
if (n[p] !== null) { | |
if (typeof n[p] === "object") { | |
this._resetLoop(o[p], n[p]) | |
} else { | |
o[p] = n[p] | |
} | |
} | |
} | |
} | |
}; | |
f._addPropsFrom = function() { | |
var n; | |
for (n in this._propsFrom) { | |
if (this._propsFrom.hasOwnProperty(n) && this._propsTo[n] === undefined && this._target[n] !== undefined) { | |
this._propsTo[n] = this._target[n] | |
} | |
} | |
}; | |
f._cloneTarget = function() { | |
var n = {}; | |
this._cloneTargetLoop(this._propsTo, this._target, n); | |
return n | |
}; | |
f._cloneTargetLoop = function(r, p, n) { | |
var o; | |
var q; | |
for (q in r) { | |
if (p.hasOwnProperty(q)) { | |
o = typeof p[q]; | |
if (p[q] !== null && o === "object") { | |
n[q] = {}; | |
this._cloneTargetLoop(r[q], p[q], n[q]) | |
} else { | |
if (r[q] && o === "number") { | |
n[q] = p[q] | |
} | |
} | |
} | |
} | |
}; | |
f._prepareProperties = function() { | |
if (!this._isPrepared) { | |
this._addPropsFrom(); | |
this._storeTarget = this._cloneTarget(); | |
this._storePropsTo = this._propsTo; | |
this._storePropsFrom = this._propsFrom; | |
this._isPrepared = true | |
} | |
}; | |
f._setStartTime = function() { | |
this._startTime = this._getTime() - (this.getProgress() * this._duration) | |
}; | |
f._setDiff = function() { | |
if (!this._isPrepared) { | |
this._prepareProperties() | |
} | |
this._propsDiff = {}; | |
this._setDiffLoop(this._propsTo, this._propsFrom, this._target, this._propsDiff) | |
}; | |
f._setDiffLoop = function(s, r, p, o) { | |
var n; | |
var q; | |
for (q in s) { | |
if (s.hasOwnProperty(q)) { | |
n = typeof s[q]; | |
if (s[q] !== null && n === "object") { | |
r[q] = r[q] || {}; | |
o[q] = o[q] || {}; | |
this._setDiffLoop(s[q], r[q], p[q], o[q]) | |
} else { | |
if (n === "number" && p[q] !== undefined) { | |
if (r[q] !== undefined) { | |
p[q] = r[q] | |
} else { | |
r[q] = p[q] | |
} | |
o[q] = s[q] - p[q] | |
} else { | |
s[q] = null; | |
r[q] = null | |
} | |
} | |
} | |
} | |
}; | |
f._getDetails = function() { | |
return { | |
target: this.getTarget(), | |
progress: this.getProgress(), | |
clip: this | |
} | |
}; | |
f._start = function() { | |
this._startTimeout = null; | |
this._remainingDelay = 0; | |
this._setStartTime(); | |
this._clock.on("update", this._update); | |
this._clock.on("draw", this._draw); | |
if (!this._clock.isRunning()) { | |
this._clock.start() | |
} | |
this._setDiff(); | |
this._playing = true; | |
this._running = true; | |
if (this._onStart) { | |
this._onStart.call(this, this._getDetails()) | |
} | |
this.trigger(h.PLAY, this._getDetails()) | |
}; | |
f._stop = function() { | |
this._playing = false; | |
this._running = false; | |
this._clock.off("update", this._update); | |
this._clock.off("draw", this._draw) | |
}; | |
f._updateProps = function() { | |
var n; | |
if (this._direction === 1) { | |
n = this._ease.getValue(this._progress) | |
} else { | |
n = 1 - this._ease.getValue(1 - this._progress) | |
} | |
this._updatePropsLoop(this._propsTo, this._propsFrom, this._target, this._propsDiff, n) | |
}; | |
f._updatePropsLoop = function(s, r, p, o, n) { | |
var q; | |
for (q in s) { | |
if (s.hasOwnProperty(q) && s[q] !== null) { | |
if (typeof s[q] !== "number") { | |
this._updatePropsLoop(s[q], r[q], p[q], o[q], n) | |
} else { | |
p[q] = r[q] + (o[q] * n) | |
} | |
} | |
} | |
}; | |
f._completeProps = function() { | |
this._completePropsLoop(this._propsTo, this._target) | |
}; | |
f._completePropsLoop = function(p, n) { | |
var o; | |
for (o in p) { | |
if (p.hasOwnProperty(o) && p[o] !== null) { | |
if (typeof p[o] !== "number") { | |
this._completePropsLoop(p[o], n[o]) | |
} else { | |
n[o] = p[o] | |
} | |
} | |
} | |
}; | |
f._complete = function() { | |
if (this._isYoyo && ((this._loop > 0 && this._loopCount <= this._loop) || (this._loop === 0 && this._loopCount === 0))) { | |
this._propsFrom = (this._direction === 1) ? this._storePropsTo : this._storePropsFrom; | |
this._propsTo = (this._direction === 1) ? this._storePropsFrom : this._storePropsTo; | |
this._direction *= -1; | |
if (this._direction === -1) { | |
++this._loopCount | |
} | |
this.setProgress(0); | |
this._start() | |
} else { | |
if (this._loopCount < this._loop) { | |
++this._loopCount; | |
this.setProgress(0); | |
this._start() | |
} else { | |
if (this._onComplete) { | |
this._onComplete.call(this, this._getDetails()) | |
} | |
this.trigger(h.COMPLETE, this._getDetails()); | |
if (this._options && this._options.destroyOnComplete) { | |
this.destroy() | |
} | |
} | |
} | |
}; | |
f._update = function(n) { | |
if (this._running) { | |
this._progress = (n.timeNow - this._startTime) / this._duration; | |
if (this._progress >= 1) { | |
this._progress = 1; | |
this._running = false; | |
this._completeProps() | |
} else { | |
this._updateProps() | |
} | |
if (this._onUpdate) { | |
this._onUpdate.call(this, this._getDetails()) | |
} | |
} | |
}; | |
f._draw = function(n) { | |
if (this._onDraw) { | |
this._onDraw.call(this, this._getDetails()) | |
} | |
if (!this._running) { | |
this._stop(); | |
if (this._progress === 1) { | |
this._complete() | |
} | |
} | |
}; | |
h._instantiate = function() { | |
this._clips = []; | |
return this | |
}; | |
h._add = function(n) { | |
this._clips.push(n) | |
}; | |
h._remove = function(o) { | |
var n = this._clips.indexOf(o); | |
if (n > -1) { | |
this._clips.splice(n, 1) | |
} | |
}; | |
h.getAll = function(p) { | |
if (p !== undefined) { | |
var n = []; | |
var o = this._clips.length; | |
while (o--) { | |
if (this._clips[o].getTarget() === p) { | |
n.push(this._clips[o]) | |
} | |
} | |
return n | |
} | |
return Array.prototype.slice.call(this._clips) | |
}; | |
h.destroyAll = function(p) { | |
var n = this.getAll(p); | |
if (this._clips.length === n.length) { | |
this._clips = [] | |
} | |
var o = n.length; | |
while (o--) { | |
n[o].destroy() | |
} | |
return n | |
}; | |
h.to = function(p, o, q, n) { | |
n = n || {}; | |
if (n.destroyOnComplete === undefined) { | |
n.destroyOnComplete = true | |
} | |
return new h(p, o, q, n).play() | |
}; | |
h.from = function(q, p, n, o) { | |
o = o || {}; | |
o.propsFrom = n; | |
if (o.destroyOnComplete === undefined) { | |
o.destroyOnComplete = true | |
} | |
return new h(q, p, o.propsTo, o).play() | |
}; | |
b.exports = h._instantiate() | |
}, { | |
"ac-clock": 15, | |
"ac-easing": 126, | |
"ac-event-emitter": 19, | |
"ac-object/create": 376 | |
}], | |
23: [function(b, c, a) { | |
arguments[4][15][0].apply(a, arguments) | |
}, { | |
"./ac-clock/Clock": 24, | |
"./ac-clock/ThrottledClock": 25, | |
"./ac-clock/sharedClockInstance": 26, | |
dup: 15 | |
}], | |
24: [function(c, d, b) { | |
var g; | |
var f = c("ac-event-emitter-micro").EventEmitterMicro; | |
var a = new Date().getTime(); | |
function h() { | |
f.call(this); | |
this.lastFrameTime = null; | |
this._animationFrame = null; | |
this._active = false; | |
this._startTime = null; | |
this._boundOnAnimationFrame = this._onAnimationFrame.bind(this); | |
this._getTime = Date.now || function() { | |
return new Date().getTime() | |
} | |
} | |
g = h.prototype = new f(null); | |
g.start = function() { | |
if (this._active) { | |
return | |
} | |
this._tick() | |
}; | |
g.stop = function() { | |
if (this._active) { | |
window.cancelAnimationFrame(this._animationFrame) | |
} | |
this._animationFrame = null; | |
this.lastFrameTime = null; | |
this._active = false | |
}; | |
g.destroy = function() { | |
this.stop(); | |
this.off(); | |
var j; | |
for (j in this) { | |
if (this.hasOwnProperty(j)) { | |
this[j] = null | |
} | |
} | |
}; | |
g.isRunning = function() { | |
return this._active | |
}; | |
g._tick = function() { | |
if (!this._active) { | |
this._active = true | |
} | |
this._animationFrame = window.requestAnimationFrame(this._boundOnAnimationFrame) | |
}; | |
g._onAnimationFrame = function(m) { | |
var n = 0; | |
var j = this._getTime(); | |
if (this.lastFrameTime === null) { | |
this.lastFrameTime = j - a | |
} else { | |
n = m - this.lastFrameTime | |
} | |
var l = 0, | |
k; | |
if (n !== 0) { | |
l = 1000 / n | |
} | |
k = { | |
time: m, | |
delta: n, | |
fps: l, | |
naturalFps: l, | |
timeNow: j | |
}; | |
this.trigger("update", k); | |
this.trigger("draw", k); | |
this._animationFrame = null; | |
this.lastFrameTime = m; | |
if (this._active !== false) { | |
this._tick() | |
} else { | |
this.lastFrameTime = null | |
} | |
}; | |
d.exports = h | |
}, { | |
"ac-event-emitter-micro": 217 | |
}], | |
25: [function(c, d, b) { | |
var g; | |
var a = c("./sharedClockInstance"), | |
f = c("ac-event-emitter-micro").EventEmitterMicro; | |
function h(k, j) { | |
if (k === null) { | |
return | |
} | |
f.call(this); | |
j = j || {}; | |
this._fps = k || null; | |
this._clock = j.clock || a; | |
this._lastThrottledTime = null; | |
this._clockEvent = null; | |
this._boundOnClockDraw = this._onClockDraw.bind(this); | |
this._boundOnClockUpdate = this._onClockUpdate.bind(this); | |
this._clock.on("update", this._boundOnClockUpdate) | |
} | |
g = h.prototype = new f(null); | |
g.setFps = function(j) { | |
this._fps = j; | |
return this | |
}; | |
g.getFps = function() { | |
return this._fps | |
}; | |
g.start = function() { | |
this._clock.start(); | |
return this | |
}; | |
g.stop = function() { | |
this._clock.stop(); | |
return this | |
}; | |
g.isRunning = function() { | |
return this._clock.isRunning() | |
}; | |
g.destroy = function() { | |
this._clock.off("update", this._boundOnClockUpdate); | |
this._clock.destroy.call(this) | |
}; | |
g._onClockUpdate = function(j) { | |
if (this._lastThrottledTime === null) { | |
this._lastThrottledTime = this._clock.lastFrameTime | |
} | |
var k = j.time - this._lastThrottledTime; | |
if (!this._fps) { | |
throw new TypeError("FPS is not defined.") | |
} | |
if (k < (1000 / this._fps)) { | |
return | |
} | |
this._clockEvent = j; | |
this._clockEvent.delta = k; | |
this._clockEvent.fps = 1000 / k; | |
this._lastThrottledTime = this._clockEvent.time; | |
this._clock.once("draw", this._boundOnClockDraw); | |
this.trigger("update", this._clockEvent) | |
}; | |
g._onClockDraw = function() { | |
this.trigger("draw", this._clockEvent) | |
}; | |
d.exports = h | |
}, { | |
"./sharedClockInstance": 26, | |
"ac-event-emitter-micro": 217 | |
}], | |
26: [function(b, c, a) { | |
arguments[4][18][0].apply(a, arguments) | |
}, { | |
"./Clock": 24, | |
dup: 18 | |
}], | |
27: [function(b, c, a) { | |
c.exports = { | |
path: b("./ac-path/path") | |
} | |
}, { | |
"./ac-path/path": 28 | |
}], | |
28: [function(b, c, a) { | |
function d(f) { | |
return d.parse(f) | |
} | |
d.basename = function(g, f) { | |
d._assertStr(g); | |
var j; | |
var h = g.match(/[^/]*$/)[0]; | |
if (f) { | |
j = h.match(new RegExp("(.*)" + f + "$")); | |
if (j) { | |
h = j[1] | |
} | |
} | |
return h | |
}; | |
d.dirname = function(g) { | |
d._assertStr(g); | |
var f = g.match(/^(.*)\b\/|.*/); | |
return f[1] || g | |
}; | |
d.extname = function(f) { | |
d._assertStr(f); | |
var g = f.match(/\.[^.]*$/); | |
return g ? g[0] : "" | |
}; | |
d.filename = function(f) { | |
d._assertStr(f); | |
return d.basename(f, d.extname(f)) | |
}; | |
d.format = function(g, h) { | |
d._assertObj(g); | |
var f = (g.dirname) ? g.dirname + "/" : ""; | |
if (g.basename) { | |
f += g.basename | |
} else { | |
if (g.filename) { | |
f += g.filename; | |
if (g.extname) { | |
f += g.extname | |
} | |
} | |
} | |
if (h) { | |
if (typeof h === "string") { | |
f += "?" + h | |
} else { | |
if (Object.prototype.toString.call(h) === Object.prototype.toString.call([])) { | |
f += "?" + h.join("&") | |
} | |
} | |
} | |
return f | |
}; | |
d.isAbsolute = function(f) { | |
d._assertStr(f); | |
return (!!f.match(/(^http(s?))/)) | |
}; | |
d.isRootRelative = function(f) { | |
d._assertStr(f); | |
return !!f.match(/^\/(?!\/)/) | |
}; | |
d.parse = function(f) { | |
d._assertStr(f); | |
return { | |
dirname: d.dirname(f), | |
basename: d.basename(f), | |
filename: d.filename(f), | |
extname: d.extname(f) | |
} | |
}; | |
d._assertStr = function(f) { | |
d._assertType(f, "string") | |
}; | |
d._assertObj = function(f) { | |
d._assertType(f, "object") | |
}; | |
d._assertType = function(h, f) { | |
var g = typeof h; | |
if (g === "undefined" || g !== f) { | |
throw new TypeError("path param must be of type " + f) | |
} | |
}; | |
c.exports = d | |
}, {}], | |
29: [function(b, c, a) { | |
c.exports = { | |
cname: b("./ac-cname/cname") | |
} | |
}, { | |
"./ac-cname/cname": 30 | |
}], | |
30: [function(c, d, a) { | |
var f = c("ac-path").path; | |
function b(g) { | |
return b.addPrefix(g) | |
} | |
b._prefix = (function() { | |
var g = "http://images.apple.com/global/elements/blank.gif"; | |
return g.replace(/global\/.*/, "") | |
}()); | |
b.addPrefix = function(g) { | |
if (f.isAbsolute(g)) { | |
return g | |
} | |
b._assertRootRelative(g); | |
g = b._prefix + g.replace(/^\//, ""); | |
g = g.replace(/(^.+)(\/105\/)/, "$1/"); | |
return g | |
}; | |
b.formatUrl = function(k, g, m, l) { | |
var j = f.format({ | |
dirname: k, | |
filename: g, | |
extname: m | |
}, l); | |
if (f.isAbsolute(j)) { | |
return j | |
} | |
b._assertRootRelative(k); | |
var h = b.addPrefix(j); | |
return h | |
}; | |
b._assertRootRelative = function(g) { | |
if (!f.isRootRelative(g)) { | |
throw new URIError("Only root-relative paths are currently supported") | |
} | |
}; | |
d.exports = b | |
}, { | |
"ac-path": 27 | |
}], | |
31: [function(b, c, a) { | |
c.exports = { | |
log: b("./ac-console/log") | |
} | |
}, { | |
"./ac-console/log": 32 | |
}], | |
32: [function(d, f, b) { | |
var a = "f7c9180f-5c45-47b4-8de4-428015f096c0"; | |
var c = !!(function() { | |
try { | |
return window.localStorage.getItem(a) | |
} catch (h) {} | |
}()); | |
f.exports = function g() { | |
if (window.console && typeof console.log !== "undefined" && c) { | |
console.log.apply(console, Array.prototype.slice.call(arguments, 0)) | |
} | |
} | |
}, {}], | |
33: [function(b, c, a) { | |
arguments[4][19][0].apply(a, arguments) | |
}, { | |
"./ac-event-emitter/EventEmitter": 34, | |
dup: 19 | |
}], | |
34: [function(b, c, a) { | |
arguments[4][20][0].apply(a, arguments) | |
}, { | |
dup: 20 | |
}], | |
35: [function(b, c, a) { | |
c.exports.DOMEmitter = b("./ac-dom-emitter/DOMEmitter") | |
}, { | |
"./ac-dom-emitter/DOMEmitter": 36 | |
}], | |
36: [function(b, c, a) { | |
var g; | |
var f = b("ac-event-emitter").EventEmitter; | |
var d = "dom-emitter"; | |
function h(j) { | |
if (j === null) { | |
return | |
} | |
this.el = j; | |
this._bindings = {}; | |
this._eventEmitter = new f() | |
} | |
g = h.prototype; | |
g._parseEventNames = function(j) { | |
if (!j) { | |
return [j] | |
} | |
return j.split(" ") | |
}; | |
g._onListenerEvent = function(k, j) { | |
this.trigger(k, j, false) | |
}; | |
g._setListener = function(j) { | |
this._bindings[j] = this._onListenerEvent.bind(this, j); | |
this._addEventListener(j, this._bindings[j]) | |
}; | |
g._removeListener = function(j) { | |
this._removeEventListener(j, this._bindings[j]); | |
delete this._bindings[j] | |
}; | |
g._addEventListener = function(k, l, j) { | |
if (this.el.addEventListener) { | |
this.el.addEventListener(k, l, j) | |
} else { | |
if (this.el.attachEvent) { | |
this.el.attachEvent("on" + k, l) | |
} else { | |
target["on" + k] = l | |
} | |
} | |
return this | |
}; | |
g._removeEventListener = function(k, l, j) { | |
if (this.el.removeEventListener) { | |
this.el.removeEventListener(k, l, j) | |
} else { | |
this.el.detachEvent("on" + k, l) | |
} | |
return this | |
}; | |
g._triggerInternalEvent = function(j, k) { | |
this.trigger(d + ":" + j, k) | |
}; | |
g.on = function(j, l, k) { | |
j = this._parseEventNames(j); | |
j.forEach(function(o, n, m) { | |
if (!this.has(m)) { | |
this._setListener(m) | |
} | |
this._triggerInternalEvent("willon", { | |
evt: m, | |
callback: o, | |
context: n | |
}); | |
this._eventEmitter.on(m, o, n); | |
this._triggerInternalEvent("didon", { | |
evt: m, | |
callback: o, | |
context: n | |
}) | |
}.bind(this, l, k)); | |
return this | |
}; | |
g.off = function(j, m, l) { | |
var k = Array.prototype.slice.call(arguments, 0); | |
j = this._parseEventNames(j); | |
j.forEach(function(r, q, o, n) { | |
if (o.length === 0) { | |
this._eventEmitter.off(); | |
var p; | |
for (p in this._bindings) { | |
if (this._bindings.hasOwnProperty(p)) { | |
this._removeListener(p) | |
} | |
} | |
return | |
} | |
this._triggerInternalEvent("willoff", { | |
evt: n, | |
callback: r, | |
context: q | |
}); | |
this._eventEmitter.off(n, r, q); | |
this._triggerInternalEvent("didoff", { | |
evt: n, | |
callback: r, | |
context: q | |
}); | |
if (!this.has(n)) { | |
this._removeListener(n) | |
} | |
}.bind(this, m, l, k)); | |
return this | |
}; | |
g.once = function(j, l, k) { | |
j = this._parseEventNames(j); | |
j.forEach(function(o, n, m) { | |
if (!this.has(m)) { | |
this._setListener(m) | |
} | |
this._triggerInternalEvent("willonce", { | |
evt: m, | |
callback: o, | |
context: n | |
}); | |
this._eventEmitter.once.call(this, m, o, n); | |
this._triggerInternalEvent("didonce", { | |
evt: m, | |
callback: o, | |
context: n | |
}) | |
}.bind(this, l, k)); | |
return this | |
}; | |
g.has = function(j, l, k) { | |
if (this._eventEmitter && this._eventEmitter.has.apply(this._eventEmitter, arguments)) { | |
return true | |
} | |
return false | |
}; | |
g.trigger = function(j, k, l) { | |
j = this._parseEventNames(j); | |
j.forEach(function(n, o, m) { | |
this._eventEmitter.trigger(m, n, o) | |
}.bind(this, k, l)); | |
return this | |
}; | |
g.destroy = function() { | |
this._triggerInternalEvent("willdestroy"); | |
this.off(); | |
this.el = this._eventEmitter = this._bindings = null | |
}; | |
c.exports = h | |
}, { | |
"ac-event-emitter": 33 | |
}], | |
37: [function(c, d, b) { | |
var g = c("./utils/addEventListener"); | |
var a = c("./shared/getEventType"); | |
d.exports = function f(l, j, k, h) { | |
j = a(l, j); | |
return g(l, j, k, h) | |
} | |
}, { | |
"./shared/getEventType": 46, | |
"./utils/addEventListener": 50 | |
}], | |
38: [function(d, f, c) { | |
var a = d("./utils/dispatchEvent"); | |
var b = d("./shared/getEventType"); | |
f.exports = function g(k, j, h) { | |
j = b(k, j); | |
return a(k, j, h) | |
} | |
}, { | |
"./shared/getEventType": 46, | |
"./utils/dispatchEvent": 51 | |
}], | |
39: [function(b, c, a) { | |
c.exports = { | |
addEventListener: b("./addEventListener"), | |
dispatchEvent: b("./dispatchEvent"), | |
preventDefault: b("./preventDefault"), | |
removeEventListener: b("./removeEventListener"), | |
stop: b("./stop"), | |
stopPropagation: b("./stopPropagation"), | |
target: b("./target") | |
} | |
}, { | |
"./addEventListener": 37, | |
"./dispatchEvent": 38, | |
"./preventDefault": 44, | |
"./removeEventListener": 45, | |
"./stop": 47, | |
"./stopPropagation": 48, | |
"./target": 49 | |
}], | |
40: [function(g, j, d) { | |
var h = g("./utils/eventTypeAvailable"); | |
var b = g("./shared/camelCasedEventTypes"); | |
var f = g("./shared/prefixHelper"); | |
var c = {}; | |
j.exports = function a(m, l) { | |
var n; | |
var o; | |
var k; | |
l = l || "div"; | |
m = m.toLowerCase(); | |
if (!(l in c)) { | |
c[l] = {} | |
} | |
o = c[l]; | |
if (m in o) { | |
return o[m] | |
} | |
if (h(m, l)) { | |
return o[m] = m | |
} | |
if (m in b) { | |
for (k = 0; k < b[m].length; k++) { | |
n = b[m][k]; | |
if (h(n.toLowerCase(), l)) { | |
return o[m] = n | |
} | |
} | |
} | |
for (k = 0; k < f.evt.length; k++) { | |
n = f.evt[k] + m; | |
if (h(n, l)) { | |
f.reduce(k); | |
return o[m] = n | |
} | |
} | |
return o[m] = false | |
} | |
}, { | |
"./shared/camelCasedEventTypes": 41, | |
"./shared/prefixHelper": 42, | |
"./utils/eventTypeAvailable": 43 | |
}], | |
41: [function(b, c, a) { | |
c.exports = { | |
transitionend: ["webkitTransitionEnd", "MSTransitionEnd"], | |
animationstart: ["webkitAnimationStart", "MSAnimationStart"], | |
animationend: ["webkitAnimationEnd", "MSAnimationEnd"], | |
animationiteration: ["webkitAnimationIteration", "MSAnimationIteration"], | |
fullscreenchange: ["MSFullscreenChange"], | |
fullscreenerror: ["MSFullscreenError"] | |
} | |
}, {}], | |
42: [function(b, d, a) { | |
var j = ["-webkit-", "-moz-", "-ms-"]; | |
var f = ["Webkit", "Moz", "ms"]; | |
var h = ["webkit", "moz", "ms"]; | |
var c = function() { | |
this.initialize() | |
}; | |
var g = c.prototype; | |
g.initialize = function() { | |
this.reduced = false; | |
this.css = j; | |
this.dom = f; | |
this.evt = h | |
}; | |
g.reduce = function(k) { | |
if (!this.reduced) { | |
this.reduced = true; | |
this.css = [this.css[k]]; | |
this.dom = [this.dom[k]]; | |
this.evt = [this.evt[k]] | |
} | |
}; | |
d.exports = new c() | |
}, {}], | |
43: [function(c, f, b) { | |
var a = { | |
window: window, | |
document: document | |
}; | |
f.exports = function d(j, g) { | |
var h; | |
j = "on" + j; | |
if (!(g in a)) { | |
a[g] = document.createElement(g) | |
} | |
h = a[g]; | |
if (j in h) { | |
return true | |
} | |
if ("setAttribute" in h) { | |
h.setAttribute(j, "return;"); | |
return (typeof h[j] === "function") | |
} | |
return false | |
} | |
}, {}], | |
44: [function(c, d, a) { | |
d.exports = function b(f) { | |
f = f || window.event; | |
if (f.preventDefault) { | |
f.preventDefault() | |
} else { | |
f.returnValue = false | |
} | |
} | |
}, {}], | |
45: [function(d, f, c) { | |
var b = d("./utils/removeEventListener"); | |
var a = d("./shared/getEventType"); | |
f.exports = function g(l, j, k, h) { | |
j = a(l, j); | |
return b(l, j, k, h) | |
} | |
}, { | |
"./shared/getEventType": 46, | |
"./utils/removeEventListener": 52 | |
}], | |
46: [function(c, f, b) { | |
var d = c("ac-prefixer/getEventType"); | |
f.exports = function a(k, j) { | |
var h; | |
var g; | |
if ("tagName" in k) { | |
h = k.tagName | |
} else { | |
if (k === window) { | |
h = "window" | |
} else { | |
h = "document" | |
} | |
} | |
g = d(j, h); | |
if (g) { | |
return g | |
} | |
return j | |
} | |
}, { | |
"ac-prefixer/getEventType": 40 | |
}], | |
47: [function(d, g, b) { | |
var a = d("./stopPropagation"); | |
var c = d("./preventDefault"); | |
g.exports = function f(h) { | |
h = h || window.event; | |
a(h); | |
c(h); | |
h.stopped = true; | |
h.returnValue = false | |
} | |
}, { | |
"./preventDefault": 44, | |
"./stopPropagation": 48 | |
}], | |
48: [function(c, d, b) { | |
d.exports = function a(f) { | |
f = f || window.event; | |
if (f.stopPropagation) { | |
f.stopPropagation() | |
} else { | |
f.cancelBubble = true | |
} | |
} | |
}, {}], | |
49: [function(b, c, a) { | |
c.exports = function d(f) { | |
f = f || window.event; | |
return (typeof f.target !== "undefined") ? f.target : f.srcElement | |
} | |
}, {}], | |
50: [function(b, c, a) { | |
c.exports = function d(j, g, h, f) { | |
if (j.addEventListener) { | |
j.addEventListener(g, h, !!f) | |
} else { | |
j.attachEvent("on" + g, h) | |
} | |
return j | |
} | |
}, {}], | |
51: [function(b, c, a) { | |
b("ac-polyfills/CustomEvent"); | |
c.exports = function d(j, h, g) { | |
var f; | |
if (j.dispatchEvent) { | |
if (g) { | |
f = new CustomEvent(h, g) | |
} else { | |
f = new CustomEvent(h) | |
} | |
j.dispatchEvent(f) | |
} else { | |
f = document.createEventObject(); | |
if (g && "detail" in g) { | |
f.detail = g.detail | |
} | |
j.fireEvent("on" + h, f) | |
} | |
return j | |
} | |
}, { | |
"ac-polyfills/CustomEvent": 392 | |
}], | |
52: [function(b, c, a) { | |
c.exports = function d(j, g, h, f) { | |
if (j.removeEventListener) { | |
j.removeEventListener(g, h, !!f) | |
} else { | |
j.detachEvent("on" + g, h) | |
} | |
return j | |
} | |
}, {}], | |
53: [function(d, f, c) { | |
var b = d("./utils/getBoundingClientRect"); | |
f.exports = function a(g, j) { | |
var h = 1; | |
if (j) { | |
h = b(g).width / g.offsetWidth | |
} | |
return { | |
width: g.scrollWidth * h, | |
height: g.scrollHeight * h | |
} | |
} | |
}, { | |
"./utils/getBoundingClientRect": 64 | |
}], | |
54: [function(d, f, c) { | |
var b = d("./utils/getBoundingClientRect"); | |
f.exports = function a(g, j) { | |
var h; | |
if (j) { | |
h = b(g); | |
return { | |
width: h.width, | |
height: h.height | |
} | |
} | |
return { | |
width: g.offsetWidth, | |
height: g.offsetHeight | |
} | |
} | |
}, { | |
"./utils/getBoundingClientRect": 64 | |
}], | |
55: [function(g, h, f) { | |
var c = g("./getDimensions"); | |
var d = g("./utils/getBoundingClientRect"); | |
var b = g("./getScrollX"); | |
var a = g("./getScrollY"); | |
h.exports = function j(k, q) { | |
var m; | |
var p; | |
var n; | |
var l; | |
var o; | |
if (q) { | |
m = d(k); | |
p = b(); | |
n = a(); | |
return { | |
top: m.top + n, | |
right: m.right + p, | |
bottom: m.bottom + n, | |
left: m.left + p | |
} | |
} | |
l = c(k, q); | |
m = { | |
top: k.offsetTop, | |
left: k.offsetLeft, | |
width: l.width, | |
height: l.height | |
}; | |
while (k = k.offsetParent) { | |
m.top += k.offsetTop; | |
m.left += k.offsetLeft | |
} | |
return { | |
top: m.top, | |
right: m.left + m.width, | |
bottom: m.top + m.height, | |
left: m.left | |
} | |
} | |
}, { | |
"./getDimensions": 54, | |
"./getScrollX": 59, | |
"./getScrollY": 60, | |
"./utils/getBoundingClientRect": 64 | |
}], | |
56: [function(c, f, b) { | |
var a = c("./getDimensions"); | |
var g = c("./getPixelsInViewport"); | |
f.exports = function d(k, l) { | |
var j = g(k, l); | |
var h = a(k, l).height; | |
return (j / h) | |
} | |
}, { | |
"./getDimensions": 54, | |
"./getPixelsInViewport": 57 | |
}], | |
57: [function(c, d, b) { | |
var a = c("./getViewportPosition"); | |
d.exports = function f(h, l) { | |
var k = document.documentElement.clientHeight; | |
var g = a(h, l); | |
var j; | |
if (g.top >= k || g.bottom <= 0) { | |
return 0 | |
} | |
j = (g.bottom - g.top); | |
if (g.top < 0) { | |
j += g.top | |
} | |
if (g.bottom > k) { | |
j -= g.bottom - k | |
} | |
return j | |
} | |
}, { | |
"./getViewportPosition": 61 | |
}], | |
58: [function(d, f, c) { | |
var a = d("./getDimensions"); | |
var b = d("./utils/getBoundingClientRect"); | |
f.exports = function g(j, m) { | |
var l; | |
var h; | |
var k; | |
if (m) { | |
l = b(j); | |
if (j.offsetParent) { | |
h = b(j.offsetParent); | |
l.top -= h.top; | |
l.left -= h.left | |
} | |
} else { | |
k = a(j, m); | |
l = { | |
top: j.offsetTop, | |
left: j.offsetLeft, | |
width: k.width, | |
height: k.height | |
} | |
} | |
return { | |
top: l.top, | |
right: l.left + l.width, | |
bottom: l.top + l.height, | |
left: l.left | |
} | |
} | |
}, { | |
"./getDimensions": 54, | |
"./utils/getBoundingClientRect": 64 | |
}], | |
59: [function(c, d, b) { | |
d.exports = function a(f) { | |
var g; | |
f = f || window; | |
if (f === window) { | |
g = window.pageXOffset; | |
if (!g) { | |
f = document.documentElement || document.body.parentNode || document.body | |
} else { | |
return g | |
} | |
} | |
return f.scrollLeft | |
} | |
}, {}], | |
60: [function(c, d, b) { | |
d.exports = function a(f) { | |
var g; | |
f = f || window; | |
if (f === window) { | |
g = window.pageYOffset; | |
if (!g) { | |
f = document.documentElement || document.body.parentNode || document.body | |
} else { | |
return g | |
} | |
} | |
return f.scrollTop | |
} | |
}, {}], | |
61: [function(g, h, f) { | |
var j = g("./getPagePosition"); | |
var d = g("./utils/getBoundingClientRect"); | |
var c = g("./getScrollX"); | |
var b = g("./getScrollY"); | |
h.exports = function a(l, o) { | |
var k; | |
var n; | |
var m; | |
if (o) { | |
k = d(l); | |
return { | |
top: k.top, | |
right: k.right, | |
bottom: k.bottom, | |
left: k.left | |
} | |
} | |
k = j(l); | |
n = c(); | |
m = b(); | |
return { | |
top: k.top - m, | |
right: k.right - n, | |
bottom: k.bottom - m, | |
left: k.left - n | |
} | |
} | |
}, { | |
"./getPagePosition": 55, | |
"./getScrollX": 59, | |
"./getScrollY": 60, | |
"./utils/getBoundingClientRect": 64 | |
}], | |
62: [function(b, c, a) { | |
c.exports = { | |
getContentDimensions: b("./getContentDimensions"), | |
getDimensions: b("./getDimensions"), | |
getPagePosition: b("./getPagePosition"), | |
getPercentInViewport: b("./getPercentInViewport"), | |
getPixelsInViewport: b("./getPixelsInViewport"), | |
getPosition: b("./getPosition"), | |
getScrollX: b("./getScrollX"), | |
getScrollY: b("./getScrollY"), | |
getViewportPosition: b("./getViewportPosition"), | |
isInViewport: b("./isInViewport") | |
} | |
}, { | |
"./getContentDimensions": 53, | |
"./getDimensions": 54, | |
"./getPagePosition": 55, | |
"./getPercentInViewport": 56, | |
"./getPixelsInViewport": 57, | |
"./getPosition": 58, | |
"./getScrollX": 59, | |
"./getScrollY": 60, | |
"./getViewportPosition": 61, | |
"./isInViewport": 63 | |
}], | |
63: [function(b, d, a) { | |
var g = b("./getPixelsInViewport"); | |
var c = b("./getPercentInViewport"); | |
d.exports = function f(k, l, h) { | |
var j; | |
h = h || 0; | |
if (typeof h === "string" && h.slice(-2) === "px") { | |
h = parseInt(h, 10); | |
j = g(k, l) | |
} else { | |
j = c(k, l) | |
} | |
return (j > 0 && j >= h) | |
} | |
}, { | |
"./getPercentInViewport": 56, | |
"./getPixelsInViewport": 57 | |
}], | |
64: [function(c, d, b) { | |
d.exports = function a(f) { | |
var g = f.getBoundingClientRect(); | |
return { | |
top: g.top, | |
right: g.right, | |
bottom: g.bottom, | |
left: g.left, | |
width: g.width || g.right - g.left, | |
height: g.height || g.bottom - g.top | |
} | |
} | |
}, {}], | |
65: [function(b, c, a) { | |
c.exports = 8 | |
}, {}], | |
66: [function(b, c, a) { | |
c.exports = 11 | |
}, {}], | |
67: [function(b, c, a) { | |
c.exports = 9 | |
}, {}], | |
68: [function(b, c, a) { | |
c.exports = 10 | |
}, {}], | |
69: [function(b, c, a) { | |
c.exports = 1 | |
}, {}], | |
70: [function(b, c, a) { | |
c.exports = 3 | |
}, {}], | |
71: [function(c, d, b) { | |
d.exports = function a(g) { | |
var f = document.createDocumentFragment(); | |
var h; | |
if (g) { | |
h = document.createElement("div"); | |
h.innerHTML = g; | |
while (h.firstChild) { | |
f.appendChild(h.firstChild) | |
} | |
} | |
return f | |
} | |
}, {}], | |
72: [function(d, f, c) { | |
d("ac-polyfills/Array/prototype.slice"); | |
d("ac-polyfills/Array/prototype.filter"); | |
var g = d("./internal/isNodeType"); | |
var a = d("./ELEMENT_NODE"); | |
f.exports = function b(j, h) { | |
h = h || a; | |
j = Array.prototype.slice.call(j); | |
return j.filter(function(k) { | |
return g(k, h) | |
}) | |
} | |
}, { | |
"./ELEMENT_NODE": 69, | |
"./internal/isNodeType": 80, | |
"ac-polyfills/Array/prototype.filter": 387, | |
"ac-polyfills/Array/prototype.slice": 390 | |
}], | |
73: [function(c, d, a) { | |
d.exports = function b(g, f) { | |
if ("hasAttribute" in g) { | |
return g.hasAttribute(f) | |
} | |
return (g.attributes.getNamedItem(f) !== null) | |
} | |
}, {}], | |
74: [function(b, c, a) { | |
c.exports = { | |
createDocumentFragment: b("./createDocumentFragment"), | |
filterByNodeType: b("./filterByNodeType"), | |
hasAttribute: b("./hasAttribute"), | |
indexOf: b("./indexOf"), | |
insertAfter: b("./insertAfter"), | |
insertBefore: b("./insertBefore"), | |
insertFirstChild: b("./insertFirstChild"), | |
insertLastChild: b("./insertLastChild"), | |
isComment: b("./isComment"), | |
isDocument: b("./isDocument"), | |
isDocumentFragment: b("./isDocumentFragment"), | |
isDocumentType: b("./isDocumentType"), | |
isElement: b("./isElement"), | |
isNode: b("./isNode"), | |
isNodeList: b("./isNodeList"), | |
isTextNode: b("./isTextNode"), | |
remove: b("./remove"), | |
replace: b("./replace"), | |
COMMENT_NODE: b("./COMMENT_NODE"), | |
DOCUMENT_FRAGMENT_NODE: b("./DOCUMENT_FRAGMENT_NODE"), | |
DOCUMENT_NODE: b("./DOCUMENT_NODE"), | |
DOCUMENT_TYPE_NODE: b("./DOCUMENT_TYPE_NODE"), | |
ELEMENT_NODE: b("./ELEMENT_NODE"), | |
TEXT_NODE: b("./TEXT_NODE") | |
} | |
}, { | |
"./COMMENT_NODE": 65, | |
"./DOCUMENT_FRAGMENT_NODE": 66, | |
"./DOCUMENT_NODE": 67, | |
"./DOCUMENT_TYPE_NODE": 68, | |
"./ELEMENT_NODE": 69, | |
"./TEXT_NODE": 70, | |
"./createDocumentFragment": 71, | |
"./filterByNodeType": 72, | |
"./hasAttribute": 73, | |
"./indexOf": 75, | |
"./insertAfter": 76, | |
"./insertBefore": 77, | |
"./insertFirstChild": 78, | |
"./insertLastChild": 79, | |
"./isComment": 82, | |
"./isDocument": 83, | |
"./isDocumentFragment": 84, | |
"./isDocumentType": 85, | |
"./isElement": 86, | |
"./isNode": 87, | |
"./isNodeList": 88, | |
"./isTextNode": 89, | |
"./remove": 90, | |
"./replace": 91 | |
}], | |
75: [function(c, d, b) { | |
c("ac-polyfills/Array/prototype.indexOf"); | |
c("ac-polyfills/Array/prototype.slice"); | |
var g = c("./internal/validate"); | |
var a = c("./filterByNodeType"); | |
d.exports = function f(l, j) { | |
var h = l.parentNode; | |
var k; | |
if (!h) { | |
return 0 | |
} | |
k = h.childNodes; | |
if (j !== false) { | |
k = a(k, j) | |
} else { | |
k = Array.prototype.slice.call(k) | |
} | |
return k.indexOf(l) | |
} | |
}, { | |
"./filterByNodeType": 72, | |
"./internal/validate": 81, | |
"ac-polyfills/Array/prototype.indexOf": 389, | |
"ac-polyfills/Array/prototype.slice": 390 | |
}], | |
76: [function(b, c, a) { | |
var f = b("./internal/validate"); | |
c.exports = function d(g, h) { | |
f.insertNode(g, true, "insertAfter"); | |
f.childNode(h, true, "insertAfter"); | |
f.hasParentNode(h, "insertAfter"); | |
if (!h.nextSibling) { | |
return h.parentNode.appendChild(g) | |
} | |
return h.parentNode.insertBefore(g, h.nextSibling) | |
} | |
}, { | |
"./internal/validate": 81 | |
}], | |
77: [function(c, d, a) { | |
var f = c("./internal/validate"); | |
d.exports = function b(g, h) { | |
f.insertNode(g, true, "insertBefore"); | |
f.childNode(h, true, "insertBefore"); | |
f.hasParentNode(h, "insertBefore"); | |
return h.parentNode.insertBefore(g, h) | |
} | |
}, { | |
"./internal/validate": 81 | |
}], | |
78: [function(c, d, b) { | |
var f = c("./internal/validate"); | |
d.exports = function a(g, h) { | |
f.insertNode(g, true, "insertFirstChild"); | |
f.parentNode(h, true, "insertFirstChild"); | |
if (!h.firstChild) { | |
return h.appendChild(g) | |
} | |
return h.insertBefore(g, h.firstChild) | |
} | |
}, { | |
"./internal/validate": 81 | |
}], | |
79: [function(b, c, a) { | |
var d = b("./internal/validate"); | |
c.exports = function f(g, h) { | |
d.insertNode(g, true, "insertLastChild"); | |
d.parentNode(h, true, "insertLastChild"); | |
return h.appendChild(g) | |
} | |
}, { | |
"./internal/validate": 81 | |
}], | |
80: [function(b, c, a) { | |
var d = b("../isNode"); | |
c.exports = function f(h, g) { | |
if (!d(h)) { | |
return false | |
} | |
if (typeof g === "number") { | |
return (h.nodeType === g) | |
} | |
return (g.indexOf(h.nodeType) !== -1) | |
} | |
}, { | |
"../isNode": 87 | |
}], | |
81: [function(g, d, k) { | |
var b = g("./isNodeType"); | |
var c = g("../COMMENT_NODE"); | |
var l = g("../DOCUMENT_FRAGMENT_NODE"); | |
var j = g("../ELEMENT_NODE"); | |
var h = g("../TEXT_NODE"); | |
var n = [j, h, c, l]; | |
var f = " must be an Element, TextNode, Comment, or Document Fragment"; | |
var q = [j, h, c]; | |
var m = " must be an Element, TextNode, or Comment"; | |
var o = [j, l]; | |
var p = " must be an Element, or Document Fragment"; | |
var a = " must have a parentNode"; | |
d.exports = { | |
parentNode: function(r, u, t, s) { | |
s = s || "target"; | |
if ((r || u) && !b(r, o)) { | |
throw new TypeError(t + ": " + s + p) | |
} | |
}, | |
childNode: function(r, u, t, s) { | |
s = s || "target"; | |
if (!r && !u) { | |
return | |
} | |
if (!b(r, q)) { | |
throw new TypeError(t + ": " + s + m) | |
} | |
}, | |
insertNode: function(r, u, t, s) { | |
s = s || "node"; | |
if (!r && !u) { | |
return | |
} | |
if (!b(r, n)) { | |
throw new TypeError(t + ": " + s + f) | |
} | |
}, | |
hasParentNode: function(r, t, s) { | |
s = s || "target"; | |
if (!r.parentNode) { | |
throw new TypeError(t + ": " + s + a) | |
} | |
} | |
} | |
}, { | |
"../COMMENT_NODE": 65, | |
"../DOCUMENT_FRAGMENT_NODE": 66, | |
"../ELEMENT_NODE": 69, | |
"../TEXT_NODE": 70, | |
"./isNodeType": 80 | |
}], | |
82: [function(c, d, a) { | |
var g = c("./internal/isNodeType"); | |
var f = c("./COMMENT_NODE"); | |
d.exports = function b(h) { | |
return g(h, f) | |
} | |
}, { | |
"./COMMENT_NODE": 65, | |
"./internal/isNodeType": 80 | |
}], | |
83: [function(c, d, b) { | |
var g = c("./internal/isNodeType"); | |
var a = c("./DOCUMENT_NODE"); | |
d.exports = function f(h) { | |
return g(h, a) | |
} | |
}, { | |
"./DOCUMENT_NODE": 67, | |
"./internal/isNodeType": 80 | |
}], | |
84: [function(c, d, b) { | |
var g = c("./internal/isNodeType"); | |
var a = c("./DOCUMENT_FRAGMENT_NODE"); | |
d.exports = function f(h) { | |
return g(h, a) | |
} | |
}, { | |
"./DOCUMENT_FRAGMENT_NODE": 66, | |
"./internal/isNodeType": 80 | |
}], | |
85: [function(b, c, a) { | |
var g = b("./internal/isNodeType"); | |
var f = b("./DOCUMENT_TYPE_NODE"); | |
c.exports = function d(h) { | |
return g(h, f) | |
} | |
}, { | |
"./DOCUMENT_TYPE_NODE": 68, | |
"./internal/isNodeType": 80 | |
}], | |
86: [function(c, d, b) { | |
var g = c("./internal/isNodeType"); | |
var a = c("./ELEMENT_NODE"); | |
d.exports = function f(h) { | |
return g(h, a) | |
} | |
}, { | |
"./ELEMENT_NODE": 69, | |
"./internal/isNodeType": 80 | |
}], | |
87: [function(b, c, a) { | |
c.exports = function d(f) { | |
return !!(f && f.nodeType) | |
} | |
}, {}], | |
88: [function(c, d, b) { | |
var f = /^\[object (HTMLCollection|NodeList|Object)\]$/; | |
d.exports = function a(g) { | |
if (!g) { | |
return false | |
} | |
if (typeof g.length !== "number") { | |
return false | |
} | |
if (typeof g[0] === "object" && (!g[0] || !g[0].nodeType)) { | |
return false | |
} | |
return f.test(Object.prototype.toString.call(g)) | |
} | |
}, {}], | |
89: [function(c, d, a) { | |
var g = c("./internal/isNodeType"); | |
var b = c("./TEXT_NODE"); | |
d.exports = function f(h) { | |
return g(h, b) | |
} | |
}, { | |
"./TEXT_NODE": 70, | |
"./internal/isNodeType": 80 | |
}], | |
90: [function(c, d, b) { | |
var f = c("./internal/validate"); | |
d.exports = function a(g) { | |
f.childNode(g, true, "remove"); | |
if (!g.parentNode) { | |
return g | |
} | |
return g.parentNode.removeChild(g) | |
} | |
}, { | |
"./internal/validate": 81 | |
}], | |
91: [function(b, d, a) { | |
var f = b("./internal/validate"); | |
d.exports = function c(g, h) { | |
f.insertNode(g, true, "insertFirstChild", "newNode"); | |
f.childNode(h, true, "insertFirstChild", "oldNode"); | |
f.hasParentNode(h, "insertFirstChild", "oldNode"); | |
return h.parentNode.replaceChild(g, h) | |
} | |
}, { | |
"./internal/validate": 81 | |
}], | |
92: [function(c, d, b) { | |
var f = c("ac-prefixer/getStyleProperty"); | |
var g = c("ac-prefixer/stripPrefixes"); | |
d.exports = function a() { | |
var k = Array.prototype.slice.call(arguments); | |
var p = k.shift(k); | |
var m = window.getComputedStyle(p); | |
var l = {}; | |
var o; | |
var h; | |
var n; | |
var j; | |
if (typeof k[0] !== "string") { | |
k = k[0] | |
} | |
for (j = 0; j < k.length; j++) { | |
o = k[j]; | |
h = f(o); | |
if (h) { | |
o = g(h); | |
n = m[h]; | |
if (!n || n === "auto") { | |
n = null | |
} | |
if (n) { | |
n = g(n) | |
} | |
} else { | |
n = null | |
} | |
l[o] = n | |
} | |
return l | |
} | |
}, { | |
"ac-prefixer/getStyleProperty": 96, | |
"ac-prefixer/stripPrefixes": 102 | |
}], | |
93: [function(b, c, a) { | |
c.exports = { | |
getStyle: b("./getStyle"), | |
setStyle: b("./setStyle") | |
} | |
}, { | |
"./getStyle": 92, | |
"./setStyle": 105 | |
}], | |
94: [function(c, d, b) { | |
d.exports = function a(j) { | |
var h; | |
var g; | |
var f; | |
if (!j && j !== 0) { | |
return "" | |
} | |
if (Array.isArray(j)) { | |
return j + "" | |
} | |
if (typeof j === "object") { | |
h = ""; | |
g = Object.keys(j); | |
for (f = 0; f < g.length; f++) { | |
h += g[f] + "(" + j[g[f]] + ") " | |
} | |
return h.trim() | |
} | |
return j | |
} | |
}, {}], | |
95: [function(d, f, c) { | |
var b = d("./shared/stylePropertyCache"); | |
var h = d("./getStyleProperty"); | |
var g = d("./getStyleValue"); | |
f.exports = function a(l, k) { | |
var j; | |
l = h(l); | |
if (!l) { | |
return false | |
} | |
j = b[l].css; | |
if (typeof k !== "undefined") { | |
k = g(l, k); | |
if (k === false) { | |
return false | |
} | |
j += ":" + k + ";" | |
} | |
return j | |
} | |
}, { | |
"./getStyleProperty": 96, | |
"./getStyleValue": 97, | |
"./shared/stylePropertyCache": 100 | |
}], | |
96: [function(f, d, h) { | |
var a = f("./shared/stylePropertyCache"); | |
var j = f("./shared/getStyleTestElement"); | |
var b = f("./utils/toCSS"); | |
var l = f("./utils/toDOM"); | |
var k = f("./shared/prefixHelper"); | |
var c = function(p, m) { | |
var n = b(p); | |
var o = (m === false) ? false : b(m); | |
a[p] = a[m] = a[n] = a[o] = { | |
dom: m, | |
css: o | |
}; | |
return m | |
}; | |
d.exports = function g(q) { | |
var o; | |
var m; | |
var p; | |
var n; | |
q += ""; | |
if (q in a) { | |
return a[q].dom | |
} | |
p = j(); | |
q = l(q); | |
m = q.charAt(0).toUpperCase() + q.substring(1); | |
if (q === "filter") { | |
o = ["WebkitFilter", "filter"] | |
} else { | |
o = (q + " " + k.dom.join(m + " ") + m).split(" ") | |
} | |
for (n = 0; n < o.length; n++) { | |
if (typeof p.style[o[n]] !== "undefined") { | |
if (n !== 0) { | |
k.reduce(n - 1) | |
} | |
return c(q, o[n]) | |
} | |
} | |
return c(q, false) | |
} | |
}, { | |
"./shared/getStyleTestElement": 98, | |
"./shared/prefixHelper": 99, | |
"./shared/stylePropertyCache": 100, | |
"./utils/toCSS": 103, | |
"./utils/toDOM": 104 | |
}], | |
97: [function(d, b, h) { | |
var f = d("./getStyleProperty"); | |
var l = d("./shared/styleValueAvailable"); | |
var k = d("./shared/prefixHelper"); | |
var a = d("./shared/stylePropertyCache"); | |
var j = {}; | |
var m = /(\([^\)]+\))/gi; | |
var g = /([^ ,;\(]+(\([^\)]+\))?)/gi; | |
b.exports = function c(p, o) { | |
var n; | |
o += ""; | |
p = f(p); | |
if (!p) { | |
return false | |
} | |
if (l(p, o)) { | |
return o | |
} | |
n = a[p].css; | |
o = o.replace(g, function(r) { | |
var q; | |
var u; | |
var t; | |
var s; | |
if (r[0] === "#" || !isNaN(r[0])) { | |
return r | |
} | |
u = r.replace(m, ""); | |
t = n + ":" + u; | |
if (t in j) { | |
if (j[t] === false) { | |
return "" | |
} | |
return r.replace(u, j[t]) | |
} | |
q = k.css.map(function(v) { | |
return v + r | |
}); | |
q = [r].concat(q); | |
for (s = 0; s < q.length; s++) { | |
if (l(p, q[s])) { | |
if (s !== 0) { | |
k.reduce(s - 1) | |
} | |
j[t] = q[s].replace(m, ""); | |
return q[s] | |
} | |
} | |
j[t] = false; | |
return "" | |
}); | |
o = o.trim(); | |
return (o === "") ? false : o | |
} | |
}, { | |
"./getStyleProperty": 96, | |
"./shared/prefixHelper": 99, | |
"./shared/stylePropertyCache": 100, | |
"./shared/styleValueAvailable": 101 | |
}], | |
98: [function(c, d, b) { | |
var f; | |
d.exports = function a() { | |
if (!f) { | |
f = document.createElement("_") | |
} else { | |
f.style.cssText = ""; | |
f.removeAttribute("style") | |
} | |
return f | |
}; | |
d.exports.resetElement = function() { | |
f = null | |
} | |
}, {}], | |
99: [function(b, c, a) { | |
arguments[4][42][0].apply(a, arguments) | |
}, { | |
dup: 42 | |
}], | |
100: [function(b, c, a) { | |
c.exports = {} | |
}, {}], | |
101: [function(c, b, d) { | |
var a = c("./stylePropertyCache"); | |
var f = c("./getStyleTestElement"); | |
var j = false; | |
var l; | |
var k; | |
var g = function() { | |
var m; | |
if (!j) { | |
j = true; | |
l = ("CSS" in window && "supports" in window.CSS); | |
k = false; | |
m = f(); | |
try { | |
m.style.width = "invalid" | |
} catch (n) { | |
k = true | |
} | |
} | |
}; | |
b.exports = function h(p, o) { | |
var n; | |
var m; | |
g(); | |
if (l) { | |
p = a[p].css; | |
return CSS.supports(p, o) | |
} | |
m = f(); | |
n = m.style[p]; | |
if (k) { | |
try { | |
m.style[p] = o | |
} catch (q) { | |
return false | |
} | |
} else { | |
m.style[p] = o | |
} | |
return (m.style[p] && m.style[p] !== n) | |
}; | |
b.exports.resetFlags = function() { | |
j = false | |
} | |
}, { | |
"./getStyleTestElement": 98, | |
"./stylePropertyCache": 100 | |
}], | |
102: [function(c, d, a) { | |
var b = /(-webkit-|-moz-|-ms-)|^(webkit|moz|ms)/gi; | |
d.exports = function f(g) { | |
g = String.prototype.replace.call(g, b, ""); | |
return g.charAt(0).toLowerCase() + g.substring(1) | |
} | |
}, {}], | |
103: [function(c, d, b) { | |
var f = /^(webkit|moz|ms)/gi; | |
d.exports = function a(h) { | |
var g; | |
if (h.toLowerCase() === "cssfloat") { | |
return "float" | |
} | |
if (f.test(h)) { | |
h = "-" + h | |
} | |
return h.replace(/([A-Z]+)([A-Z][a-z])/g, "$1-$2").replace(/([a-z\d])([A-Z])/g, "$1-$2").toLowerCase() | |
} | |
}, {}], | |
104: [function(b, c, a) { | |
var f = /-([a-z])/g; | |
c.exports = function d(h) { | |
var g; | |
if (h.toLowerCase() === "float") { | |
return "cssFloat" | |
} | |
h = h.replace(f, function(k, j) { | |
return j.toUpperCase() | |
}); | |
if (h.substr(0, 2) === "Ms") { | |
h = "ms" + h.substring(2) | |
} | |
return h | |
} | |
}, {}], | |
105: [function(d, f, c) { | |
var a = d("ac-prefixer/getStyleCSS"); | |
var g = d("ac-prefixer/getStyleProperty"); | |
var b = d("./internal/normalizeValue"); | |
f.exports = function h(p, m) { | |
var l = ""; | |
var k; | |
var o; | |
var j; | |
var n; | |
var q; | |
if (typeof m !== "object") { | |
throw new TypeError("setStyle: styles must be an Object") | |
} | |
for (o in m) { | |
n = b(m[o]); | |
if (!n && n !== 0) { | |
j = g(o); | |
if ("removeAttribute" in p.style) { | |
p.style.removeAttribute(j) | |
} else { | |
p.style[j] = "" | |
} | |
} else { | |
k = a(o, n); | |
if (k !== false) { | |
l += " " + k | |
} | |
} | |
} | |
if (l.length) { | |
q = p.style.cssText; | |
if (q.charAt(q.length - 1) !== ";") { | |
q += ";" | |
} | |
q += l; | |
p.style.cssText = q | |
} | |
return p | |
} | |
}, { | |
"./internal/normalizeValue": 94, | |
"ac-prefixer/getStyleCSS": 95, | |
"ac-prefixer/getStyleProperty": 96 | |
}], | |
106: [function(c, f, b) { | |
var g = c("ac-dom-nodes/isElement"); | |
var a = c("./matchesSelector"); | |
var h = c("./internal/validate"); | |
f.exports = function d(l, k, j) { | |
h.childNode(l, true, "ancestors"); | |
h.selector(k, false, "ancestors"); | |
if (j && g(l) && (!k || a(l, k))) { | |
return l | |
} | |
if (l !== document.body) { | |
while ((l = l.parentNode) && g(l)) { | |
if (!k || a(l, k)) { | |
return l | |
} | |
if (l === document.body) { | |
break | |
} | |
} | |
} | |
return null | |
} | |
}, { | |
"./internal/validate": 113, | |
"./matchesSelector": 115, | |
"ac-dom-nodes/isElement": 86 | |
}], | |
107: [function(c, d, b) { | |
var g = c("ac-dom-nodes/isElement"); | |
var a = c("./matchesSelector"); | |
var h = c("./internal/validate"); | |
d.exports = function f(m, k, j) { | |
var l = []; | |
h.childNode(m, true, "ancestors"); | |
h.selector(k, false, "ancestors"); | |
if (j && g(m) && (!k || a(m, k))) { | |
l.push(m) | |
} | |
if (m !== document.body) { | |
while ((m = m.parentNode) && g(m)) { | |
if (!k || a(m, k)) { | |
l.push(m) | |
} | |
if (m === document.body) { | |
break | |
} | |
} | |
} | |
return l | |
} | |
}, { | |
"./internal/validate": 113, | |
"./matchesSelector": 115, | |
"ac-dom-nodes/isElement": 86 | |
}], | |
108: [function(d, g, c) { | |
var b = d("ac-dom-nodes/filterByNodeType"); | |
var a = d("./filterBySelector"); | |
var h = d("./internal/validate"); | |
g.exports = function f(l, j) { | |
var k; | |
h.parentNode(l, true, "children"); | |
h.selector(j, false, "children"); | |
k = l.children || l.childNodes; | |
k = b(k); | |
if (j) { | |
k = a(k, j) | |
} | |
return k | |
} | |
}, { | |
"./filterBySelector": 109, | |
"./internal/validate": 113, | |
"ac-dom-nodes/filterByNodeType": 72 | |
}], | |
109: [function(d, f, c) { | |
d("ac-polyfills/Array/prototype.slice"); | |
d("ac-polyfills/Array/prototype.filter"); | |
var b = d("./matchesSelector"); | |
var g = d("./internal/validate"); | |
f.exports = function a(j, h) { | |
g.selector(h, true, "filterBySelector"); | |
j = Array.prototype.slice.call(j); | |
return j.filter(function(k) { | |
return b(k, h) | |
}) | |
} | |
}, { | |
"./internal/validate": 113, | |
"./matchesSelector": 115, | |
"ac-polyfills/Array/prototype.filter": 387, | |
"ac-polyfills/Array/prototype.slice": 390 | |
}], | |
110: [function(b, d, a) { | |
var c = b("./children"); | |
var g = b("./internal/validate"); | |
d.exports = function f(k, h) { | |
var j; | |
g.parentNode(k, true, "firstChild"); | |
g.selector(h, false, "firstChild"); | |
if (k.firstElementChild && !h) { | |
return k.firstElementChild | |
} | |
j = c(k, h); | |
if (j.length) { | |
return j[0] | |
} | |
return null | |
} | |
}, { | |
"./children": 108, | |
"./internal/validate": 113 | |
}], | |
111: [function(b, c, a) { | |
c.exports = { | |
ancestor: b("./ancestor"), | |
ancestors: b("./ancestors"), | |
children: b("./children"), | |
filterBySelector: b("./filterBySelector"), | |
firstChild: b("./firstChild"), | |
lastChild: b("./lastChild"), | |
matchesSelector: b("./matchesSelector"), | |
nextSibling: b("./nextSibling"), | |
nextSiblings: b("./nextSiblings"), | |
previousSibling: b("./previousSibling"), | |
previousSiblings: b("./previousSiblings"), | |
querySelector: b("./querySelector"), | |
querySelectorAll: b("./querySelectorAll"), | |
siblings: b("./siblings") | |
} | |
}, { | |
"./ancestor": 106, | |
"./ancestors": 107, | |
"./children": 108, | |
"./filterBySelector": 109, | |
"./firstChild": 110, | |
"./lastChild": 114, | |
"./matchesSelector": 115, | |
"./nextSibling": 116, | |
"./nextSiblings": 117, | |
"./previousSibling": 118, | |
"./previousSiblings": 119, | |
"./querySelector": 120, | |
"./querySelectorAll": 121, | |
"./siblings": 125 | |
}], | |
112: [function(b, c, a) { | |
c.exports = window.Element ? (function(d) { | |
return d.matches || d.matchesSelector || d.webkitMatchesSelector || d.mozMatchesSelector || d.msMatchesSelector || d.oMatchesSelector | |
}(Element.prototype)) : null | |
}, {}], | |
113: [function(g, c, j) { | |
g("ac-polyfills/Array/prototype.indexOf"); | |
var p = g("ac-dom-nodes/isNode"); | |
var b = g("ac-dom-nodes/COMMENT_NODE"); | |
var l = g("ac-dom-nodes/DOCUMENT_FRAGMENT_NODE"); | |
var k = g("ac-dom-nodes/DOCUMENT_NODE"); | |
var h = g("ac-dom-nodes/ELEMENT_NODE"); | |
var f = g("ac-dom-nodes/TEXT_NODE"); | |
var a = function(s, r) { | |
if (!p(s)) { | |
return false | |
} | |
if (typeof r === "number") { | |
return (s.nodeType === r) | |
} | |
return (r.indexOf(s.nodeType) !== -1) | |
}; | |
var n = [h, k, l]; | |
var o = " must be an Element, Document, or Document Fragment"; | |
var q = [h, f, b]; | |
var m = " must be an Element, TextNode, or Comment"; | |
var d = " must be a string"; | |
c.exports = { | |
parentNode: function(r, u, t, s) { | |
s = s || "node"; | |
if ((r || u) && !a(r, n)) { | |
throw new TypeError(t + ": " + s + o) | |
} | |
}, | |
childNode: function(r, u, t, s) { | |
s = s || "node"; | |
if (!r && !u) { | |
return | |
} | |
if (!a(r, q)) { | |
throw new TypeError(t + ": " + s + m) | |
} | |
}, | |
selector: function(r, u, t, s) { | |
s = s || "selector"; | |
if ((r || u) && typeof r !== "string") { | |
throw new TypeError(t + ": " + s + d) | |
} | |
} | |
} | |
}, { | |
"ac-dom-nodes/COMMENT_NODE": 65, | |
"ac-dom-nodes/DOCUMENT_FRAGMENT_NODE": 66, | |
"ac-dom-nodes/DOCUMENT_NODE": 67, | |
"ac-dom-nodes/ELEMENT_NODE": 69, | |
"ac-dom-nodes/TEXT_NODE": 70, | |
"ac-dom-nodes/isNode": 87, | |
"ac-polyfills/Array/prototype.indexOf": 389 | |
}], | |
114: [function(b, d, a) { | |
var c = b("./children"); | |
var g = b("./internal/validate"); | |
d.exports = function f(k, h) { | |
var j; | |
g.parentNode(k, true, "lastChild"); | |
g.selector(h, false, "lastChild"); | |
if (k.lastElementChild && !h) { | |
return k.lastElementChild | |
} | |
j = c(k, h); | |
if (j.length) { | |
return j[j.length - 1] | |
} | |
return null | |
} | |
}, { | |
"./children": 108, | |
"./internal/validate": 113 | |
}], | |
115: [function(d, f, c) { | |
var g = d("ac-dom-nodes/isElement"); | |
var j = d("./internal/validate"); | |
var a = d("./internal/nativeMatches"); | |
var h = d("./shims/matchesSelector"); | |
f.exports = function b(l, k) { | |
j.selector(k, true, "matchesSelector"); | |
if (!g(l)) { | |
return false | |
} | |
if (!a) { | |
return h(l, k) | |
} | |
return a.call(l, k) | |
} | |
}, { | |
"./internal/nativeMatches": 112, | |
"./internal/validate": 113, | |
"./shims/matchesSelector": 122, | |
"ac-dom-nodes/isElement": 86 | |
}], | |
116: [function(c, d, b) { | |
var f = c("ac-dom-nodes/isElement"); | |
var a = c("./matchesSelector"); | |
var h = c("./internal/validate"); | |
d.exports = function g(k, j) { | |
h.childNode(k, true, "nextSibling"); | |
h.selector(j, false, "nextSibling"); | |
if (k.nextElementSibling && !j) { | |
return k.nextElementSibling | |
} | |
while (k = k.nextSibling) { | |
if (f(k)) { | |
if (!j || a(k, j)) { | |
return k | |
} | |
} | |
} | |
return null | |
} | |
}, { | |
"./internal/validate": 113, | |
"./matchesSelector": 115, | |
"ac-dom-nodes/isElement": 86 | |
}], | |
117: [function(d, f, b) { | |
var g = d("ac-dom-nodes/isElement"); | |
var a = d("./matchesSelector"); | |
var h = d("./internal/validate"); | |
f.exports = function c(l, j) { | |
var k = []; | |
h.childNode(l, true, "nextSiblings"); | |
h.selector(j, false, "nextSiblings"); | |
while (l = l.nextSibling) { | |
if (g(l)) { | |
if (!j || a(l, j)) { | |
k.push(l) | |
} | |
} | |
} | |
return k | |
} | |
}, { | |
"./internal/validate": 113, | |
"./matchesSelector": 115, | |
"ac-dom-nodes/isElement": 86 | |
}], | |
118: [function(c, d, b) { | |
var g = c("ac-dom-nodes/isElement"); | |
var a = c("./matchesSelector"); | |
var h = c("./internal/validate"); | |
d.exports = function f(k, j) { | |
h.childNode(k, true, "previousSibling"); | |
h.selector(j, false, "previousSibling"); | |
if (k.previousElementSibling && !j) { | |
return k.previousElementSibling | |
} | |
while (k = k.previousSibling) { | |
if (g(k)) { | |
if (!j || a(k, j)) { | |
return k | |
} | |
} | |
} | |
return null | |
} | |
}, { | |
"./internal/validate": 113, | |
"./matchesSelector": 115, | |
"ac-dom-nodes/isElement": 86 | |
}], | |
119: [function(c, d, b) { | |
var f = c("ac-dom-nodes/isElement"); | |
var a = c("./matchesSelector"); | |
var h = c("./internal/validate"); | |
d.exports = function g(l, j) { | |
var k = []; | |
h.childNode(l, true, "previousSiblings"); | |
h.selector(j, false, "previousSiblings"); | |
while (l = l.previousSibling) { | |
if (f(l)) { | |
if (!j || a(l, j)) { | |
k.push(l) | |
} | |
} | |
} | |
return k.reverse() | |
} | |
}, { | |
"./internal/validate": 113, | |
"./matchesSelector": 115, | |
"ac-dom-nodes/isElement": 86 | |
}], | |
120: [function(c, d, a) { | |
var h = c("./internal/validate"); | |
var b = c("./shims/querySelector"); | |
var g = ("querySelector" in document); | |
d.exports = function f(j, k) { | |
k = k || document; | |
h.parentNode(k, true, "querySelector", "context"); | |
h.selector(j, true, "querySelector"); | |
if (!g) { | |
return b(j, k) | |
} | |
return k.querySelector(j) | |
} | |
}, { | |
"./internal/validate": 113, | |
"./shims/querySelector": 123 | |
}], | |
121: [function(b, c, a) { | |
b("ac-polyfills/Array/prototype.slice"); | |
var h = b("./internal/validate"); | |
var g = b("./shims/querySelectorAll"); | |
var f = ("querySelectorAll" in document); | |
c.exports = function d(j, k) { | |
k = k || document; | |
h.parentNode(k, true, "querySelectorAll", "context"); | |
h.selector(j, true, "querySelectorAll"); | |
if (!f) { | |
return g(j, k) | |
} | |
return Array.prototype.slice.call(k.querySelectorAll(j)) | |
} | |
}, { | |
"./internal/validate": 113, | |
"./shims/querySelectorAll": 124, | |
"ac-polyfills/Array/prototype.slice": 390 | |
}], | |
122: [function(c, d, b) { | |
var f = c("../querySelectorAll"); | |
d.exports = function a(l, g) { | |
var k = l.parentNode || document; | |
var h = f(g, k); | |
var j; | |
for (j = 0; j < h.length; j++) { | |
if (h[j] === l) { | |
return true | |
} | |
} | |
return false | |
} | |
}, { | |
"../querySelectorAll": 121 | |
}], | |
123: [function(b, c, a) { | |
var d = b("./querySelectorAll"); | |
c.exports = function f(h, j) { | |
var g = d(h, j); | |
return g.length ? g[0] : null | |
} | |
}, { | |
"./querySelectorAll": 124 | |
}], | |
124: [function(c, b, f) { | |
c("ac-polyfills/Array/prototype.indexOf"); | |
var k = c("ac-dom-nodes/isElement"); | |
var h = c("ac-dom-nodes/isDocumentFragment"); | |
var l = c("ac-dom-nodes/remove"); | |
var d = "_ac_qsa_"; | |
var j = function(o, m) { | |
var n; | |
if (m === document) { | |
return true | |
} | |
n = o; | |
while ((n = n.parentNode) && k(n)) { | |
if (n === m) { | |
return true | |
} | |
} | |
return false | |
}; | |
var g = function(m) { | |
if ("recalc" in m) { | |
m.recalc(false) | |
} else { | |
document.recalc(false) | |
} | |
window.scrollBy(0, 0) | |
}; | |
b.exports = function a(m, o) { | |
var q = document.createElement(); | |
var r = d + (Math.random() + "").slice(-6); | |
var n = []; | |
var p; | |
o = o || document; | |
document[r] = []; | |
q.innerHTML = "x<style>*{display:recalc;}" + m + '{ac-qsa:expression(document["' + r + '"] && document["' + r + '"].push(this));}'; | |
q = q.lastChild; | |
if (h(o)) { | |
o.appendChild(q) | |
} else { | |
document.documentElement.firstChild.appendChild(q) | |
} | |
g(o); | |
while (document[r].length) { | |
p = document[r].shift(); | |
p.style.removeAttribute("ac-qsa"); | |
if (n.indexOf(p) === -1 && j(p, o)) { | |
n.push(p) | |
} | |
} | |
document[r] = null; | |
l(q); | |
g(o); | |
return n | |
} | |
}, { | |
"ac-dom-nodes/isDocumentFragment": 84, | |
"ac-dom-nodes/isElement": 86, | |
"ac-dom-nodes/remove": 90, | |
"ac-polyfills/Array/prototype.indexOf": 389 | |
}], | |
125: [function(b, d, a) { | |
var c = b("./children"); | |
var g = b("./internal/validate"); | |
d.exports = function f(k, h) { | |
var j = []; | |
g.childNode(k, true, "siblings"); | |
g.selector(h, false, "siblings"); | |
if (k.parentNode) { | |
j = c(k.parentNode, h); | |
j = j.filter(function(l) { | |
return (l !== k) | |
}) | |
} | |
return j | |
} | |
}, { | |
"./children": 108, | |
"./internal/validate": 113 | |
}], | |
126: [function(b, c, a) { | |
c.exports = { | |
createBezier: b("./ac-easing/createBezier"), | |
createPredefined: b("./ac-easing/createPredefined"), | |
createStep: b("./ac-easing/createStep"), | |
Ease: b("./ac-easing/Ease") | |
} | |
}, { | |
"./ac-easing/Ease": 127, | |
"./ac-easing/createBezier": 128, | |
"./ac-easing/createPredefined": 129, | |
"./ac-easing/createStep": 130 | |
}], | |
127: [function(b, c, a) { | |
var g = "Ease expects an easing function."; | |
function f(j, h) { | |
if (typeof j !== "function") { | |
throw new TypeError(g) | |
} | |
this.easingFunction = j; | |
this.cssString = h || null | |
} | |
var d = f.prototype; | |
d.getValue = function(h) { | |
return this.easingFunction(h, 0, 1, 1) | |
}; | |
c.exports = f | |
}, {}], | |
128: [function(b, c, a) { | |
var f = b("./Ease"); | |
var h = b("./helpers/KeySpline"); | |
var d = "Bezier curve expects exactly four (4) numbers. Given: "; | |
c.exports = function g(k, q, j, p) { | |
var r = Array.prototype.slice.call(arguments); | |
var n = r.every(function(s) { | |
return (typeof s === "number") | |
}); | |
if (r.length !== 4 || !n) { | |
throw new TypeError(d + r) | |
} | |
var o = new h(k, q, j, p); | |
var l = function(u, s, v, t) { | |
return o.get(u / t) * v + s | |
}; | |
var m = "cubic-bezier(" + r.join(", ") + ")"; | |
return new f(l, m) | |
} | |
}, { | |
"./Ease": 127, | |
"./helpers/KeySpline": 131 | |
}], | |
129: [function(c, a, d) { | |
var j = c("./createStep"); | |
var f = c("./helpers/cssAliases"); | |
var b = c("./helpers/easingFunctions"); | |
var h = c("./Ease"); | |
var g = 'Easing function "%TYPE%" not recognized among the following: ' + Object.keys(b).join(", "); | |
a.exports = function k(l) { | |
var m; | |
if (l === "step-start") { | |
return j(1, "start") | |
} else { | |
if (l === "step-end") { | |
return j(1, "end") | |
} else { | |
m = b[l] | |
} | |
} | |
if (!m) { | |
throw new Error(g.replace("%TYPE%", l)) | |
} | |
return new h(m, f[l]) | |
} | |
}, { | |
"./Ease": 127, | |
"./createStep": 130, | |
"./helpers/cssAliases": 132, | |
"./helpers/easingFunctions": 133 | |
}], | |
130: [function(d, f, c) { | |
var g = d("./Ease"); | |
var b = "Step function expects a numeric value greater than zero. Given: "; | |
var a = 'Step function direction must be either "start" or "end" (default). Given: '; | |
f.exports = function h(j, m) { | |
m = m || "end"; | |
if (typeof j !== "number" || j < 1) { | |
throw new TypeError(b + j) | |
} | |
if (m !== "start" && m !== "end") { | |
throw new TypeError(a + m) | |
} | |
var l = function(r, n, s, q) { | |
var p = s / j; | |
var o = Math[(m === "start") ? "floor" : "ceil"](r / q * j); | |
return n + p * o | |
}; | |
var k = "steps(" + j + ", " + m + ")"; | |
return new g(l, k) | |
} | |
}, { | |
"./Ease": 127 | |
}], | |
131: [function(b, c, a) { | |
/*! MIT License | |
* | |
* KeySpline - use bezier curve for transition easing function | |
* Copyright (c) 2012 Gaetan Renaudeau <[email protected]> | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a | |
* copy of this software and associated documentation files (the "Software"), | |
* to deal in the Software without restriction, including without limitation | |
* the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
* and/or sell copies of the Software, and to permit persons to whom the | |
* Software is furnished to do so, subject to the following conditions: | |
* | |
* The above copyright notice and this permission notice shall be included in | |
* all copies or substantial portions of the Software. | |
* | |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | |
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |
* DEALINGS IN THE SOFTWARE. | |
*/ | |
; | |
function d(p, m, o, k) { | |
this.get = function(q) { | |
if (p === m && o === k) { | |
return q | |
} | |
return g(l(q), m, k) | |
}; | |
function j(q, r) { | |
return 1 - 3 * r + 3 * q | |
} | |
function h(q, r) { | |
return 3 * r - 6 * q | |
} | |
function f(q) { | |
return 3 * q | |
} | |
function g(s, q, r) { | |
return ((j(q, r) * s + h(q, r)) * s + f(q)) * s | |
} | |
function n(s, q, r) { | |
return 3 * j(q, r) * s * s + 2 * h(q, r) * s + f(q) | |
} | |
function l(t) { | |
var r = t; | |
for (var s = 0; s < 4; ++s) { | |
var u = n(r, p, o); | |
if (u === 0) { | |
return r | |
} | |
var q = g(r, p, o) - t; | |
r -= q / u | |
} | |
return r | |
} | |
} | |
c.exports = d | |
}, {}], | |
132: [function(c, d, b) { | |
var a = { | |
linear: "cubic-bezier(0, 0, 1, 1)", | |
ease: "cubic-bezier(0.25, 0.1, 0.25, 1)", | |
"ease-in": "cubic-bezier(0.42, 0, 1, 1)", | |
"ease-out": "cubic-bezier(0, 0, 0.58, 1)", | |
"ease-in-out": "cubic-bezier(0.42, 0, 0.58, 1)", | |
"ease-in-cubic": "cubic-bezier(0.55, 0.055, 0.675, 0.19)", | |
"ease-out-cubic": "cubic-bezier(0.215, 0.61, 0.355, 1)", | |
"ease-in-out-cubic": "cubic-bezier(0.645, 0.045, 0.355, 1)", | |
"ease-in-quad": "cubic-bezier(0.55, 0.085, 0.68, 0.53)", | |
"ease-out-quad": "cubic-bezier(0.25, 0.46, 0.45, 0.94)", | |
"ease-in-out-quad": "cubic-bezier(0.455, 0.03, 0.515, 0.955)", | |
"ease-in-quart": "cubic-bezier(0.895, 0.03, 0.685, 0.22)", | |
"ease-out-quart": "cubic-bezier(0.165, 0.84, 0.44, 1)", | |
"ease-in-out-quart": "cubic-bezier(0.77, 0, 0.175, 1)", | |
"ease-in-quint": "cubic-bezier(0.755, 0.05, 0.855, 0.06)", | |
"ease-out-quint": "cubic-bezier(0.23, 1, 0.32, 1)", | |
"ease-in-out-quint": "cubic-bezier(0.86, 0, 0.07, 1)", | |
"ease-in-sine": "cubic-bezier(0.47, 0, 0.745, 0.715)", | |
"ease-out-sine": "cubic-bezier(0.39, 0.575, 0.565, 1)", | |
"ease-in-out-sine": "cubic-bezier(0.445, 0.05, 0.55, 0.95)", | |
"ease-in-expo": "cubic-bezier(0.95, 0.05, 0.795, 0.035)", | |
"ease-out-expo": "cubic-bezier(0.19, 1, 0.22, 1)", | |
"ease-in-out-expo": "cubic-bezier(1, 0, 0, 1)", | |
"ease-in-circ": "cubic-bezier(0.6, 0.04, 0.98, 0.335)", | |
"ease-out-circ": "cubic-bezier(0.075, 0.82, 0.165, 1)", | |
"ease-in-out-circ": "cubic-bezier(0.785, 0.135, 0.15, 0.86)", | |
"ease-in-back": "cubic-bezier(0.6, -0.28, 0.735, 0.045)", | |
"ease-out-back": "cubic-bezier(0.175, 0.885, 0.32, 1.275)", | |
"ease-in-out-back": "cubic-bezier(0.68, -0.55, 0.265, 1.55)" | |
}; | |
a.easeIn = a["ease-in"]; | |
a.easeOut = a["ease-out"]; | |
a.easeInOut = a["ease-in-out"]; | |
a.easeInCubic = a["ease-in-cubic"]; | |
a.easeOutCubic = a["ease-out-cubic"]; | |
a.easeInOutCubic = a["ease-in-out-cubic"]; | |
a.easeInQuad = a["ease-in-quad"]; | |
a.easeOutQuad = a["ease-out-quad"]; | |
a.easeInOutQuad = a["ease-in-out-quad"]; | |
a.easeInQuart = a["ease-in-quart"]; | |
a.easeOutQuart = a["ease-out-quart"]; | |
a.easeInOutQuart = a["ease-in-out-quart"]; | |
a.easeInQuint = a["ease-in-quint"]; | |
a.easeOutQuint = a["ease-out-quint"]; | |
a.easeInOutQuint = a["ease-in-out-quint"]; | |
a.easeInSine = a["ease-in-sine"]; | |
a.easeOutSine = a["ease-out-sine"]; | |
a.easeInOutSine = a["ease-in-out-sine"]; | |
a.easeInExpo = a["ease-in-expo"]; | |
a.easeOutExpo = a["ease-out-expo"]; | |
a.easeInOutExpo = a["ease-in-out-expo"]; | |
a.easeInCirc = a["ease-in-circ"]; | |
a.easeOutCirc = a["ease-out-circ"]; | |
a.easeInOutCirc = a["ease-in-out-circ"]; | |
a.easeInBack = a["ease-in-back"]; | |
a.easeOutBack = a["ease-out-back"]; | |
a.easeInOutBack = a["ease-in-out-back"]; | |
d.exports = a | |
}, {}], | |
133: [function(d, b, G) { | |
var K = d("../createBezier"); | |
var x = K(0.25, 0.1, 0.25, 1).easingFunction; | |
var g = K(0.42, 0, 1, 1).easingFunction; | |
var D = K(0, 0, 0.58, 1).easingFunction; | |
var y = K(0.42, 0, 0.58, 1).easingFunction; | |
var v = function(R, P, S, Q) { | |
return S * R / Q + P | |
}; | |
var h = function(R, P, S, Q) { | |
return S * (R /= Q) * R + P | |
}; | |
var O = function(R, P, S, Q) { | |
return -S * (R /= Q) * (R - 2) + P | |
}; | |
var E = function(R, P, S, Q) { | |
if ((R /= Q / 2) < 1) { | |
return S / 2 * R * R + P | |
} | |
return -S / 2 * ((--R) * (R - 2) - 1) + P | |
}; | |
var j = function(R, P, S, Q) { | |
return S * (R /= Q) * R * R + P | |
}; | |
var a = function(R, P, S, Q) { | |
return S * ((R = R / Q - 1) * R * R + 1) + P | |
}; | |
var k = function(R, P, S, Q) { | |
if ((R /= Q / 2) < 1) { | |
return S / 2 * R * R * R + P | |
} | |
return S / 2 * ((R -= 2) * R * R + 2) + P | |
}; | |
var p = function(R, P, S, Q) { | |
return S * (R /= Q) * R * R * R + P | |
}; | |
var n = function(R, P, S, Q) { | |
return -S * ((R = R / Q - 1) * R * R * R - 1) + P | |
}; | |
var q = function(R, P, S, Q) { | |
if ((R /= Q / 2) < 1) { | |
return S / 2 * R * R * R * R + P | |
} | |
return -S / 2 * ((R -= 2) * R * R * R - 2) + P | |
}; | |
var z = function(R, P, S, Q) { | |
return S * (R /= Q) * R * R * R * R + P | |
}; | |
var w = function(R, P, S, Q) { | |
return S * ((R = R / Q - 1) * R * R * R * R + 1) + P | |
}; | |
var A = function(R, P, S, Q) { | |
if ((R /= Q / 2) < 1) { | |
return S / 2 * R * R * R * R * R + P | |
} | |
return S / 2 * ((R -= 2) * R * R * R * R + 2) + P | |
}; | |
var c = function(R, P, S, Q) { | |
return -S * Math.cos(R / Q * (Math.PI / 2)) + S + P | |
}; | |
var M = function(R, P, S, Q) { | |
return S * Math.sin(R / Q * (Math.PI / 2)) + P | |
}; | |
var C = function(R, P, S, Q) { | |
return -S / 2 * (Math.cos(Math.PI * R / Q) - 1) + P | |
}; | |
var H = function(R, P, S, Q) { | |
return (R === 0) ? P : S * Math.pow(2, 10 * (R / Q - 1)) + P | |
}; | |
var B = function(R, P, S, Q) { | |
return (R === Q) ? P + S : S * (-Math.pow(2, -10 * R / Q) + 1) + P | |
}; | |
var s = function(R, P, S, Q) { | |
if (R === 0) { | |
return P | |
} else { | |
if (R === Q) { | |
return P + S | |
} else { | |
if ((R /= Q / 2) < 1) { | |
return S / 2 * Math.pow(2, 10 * (R - 1)) + P | |
} | |
} | |
} | |
return S / 2 * (-Math.pow(2, -10 * --R) + 2) + P | |
}; | |
var m = function(R, P, S, Q) { | |
return -S * (Math.sqrt(1 - (R /= Q) * R) - 1) + P | |
}; | |
var f = function(R, P, S, Q) { | |
return S * Math.sqrt(1 - (R = R / Q - 1) * R) + P | |
}; | |
var J = function(R, P, S, Q) { | |
if ((R /= Q / 2) < 1) { | |
return -S / 2 * (Math.sqrt(1 - R * R) - 1) + P | |
} | |
return S / 2 * (Math.sqrt(1 - (R -= 2) * R) + 1) + P | |
}; | |
var F = function(T, R, V, S) { | |
var P = 1.70158; | |
var U = 0; | |
var Q = V; | |
if (T === 0) { | |
return R | |
} else { | |
if ((T /= S) === 1) { | |
return R + V | |
} | |
} | |
if (!U) { | |
U = S * 0.3 | |
} | |
if (Q < Math.abs(V)) { | |
Q = V; | |
P = U / 4 | |
} else { | |
P = U / (2 * Math.PI) * Math.asin(V / Q) | |
} | |
return -(Q * Math.pow(2, 10 * (T -= 1)) * Math.sin((T * S - P) * (2 * Math.PI) / U)) + R | |
}; | |
var I = function(T, R, V, S) { | |
var P = 1.70158; | |
var U = 0; | |
var Q = V; | |
if (T === 0) { | |
return R | |
} else { | |
if ((T /= S) === 1) { | |
return R + V | |
} | |
} | |
if (!U) { | |
U = S * 0.3 | |
} | |
if (Q < Math.abs(V)) { | |
Q = V; | |
P = U / 4 | |
} else { | |
P = U / (2 * Math.PI) * Math.asin(V / Q) | |
} | |
return Q * Math.pow(2, -10 * T) * Math.sin((T * S - P) * (2 * Math.PI) / U) + V + R | |
}; | |
var u = function(T, R, V, S) { | |
var P = 1.70158; | |
var U = 0; | |
var Q = V; | |
if (T === 0) { | |
return R | |
} else { | |
if ((T /= S / 2) === 2) { | |
return R + V | |
} | |
} | |
if (!U) { | |
U = S * (0.3 * 1.5) | |
} | |
if (Q < Math.abs(V)) { | |
Q = V; | |
P = U / 4 | |
} else { | |
P = U / (2 * Math.PI) * Math.asin(V / Q) | |
} | |
if (T < 1) { | |
return -0.5 * (Q * Math.pow(2, 10 * (T -= 1)) * Math.sin((T * S - P) * (2 * Math.PI) / U)) + R | |
} | |
return Q * Math.pow(2, -10 * (T -= 1)) * Math.sin((T * S - P) * (2 * Math.PI) / U) * 0.5 + V + R | |
}; | |
var t = function(S, Q, T, R, P) { | |
if (P === undefined) { | |
P = 1.70158 | |
} | |
return T * (S /= R) * S * ((P + 1) * S - P) + Q | |
}; | |
var r = function(S, Q, T, R, P) { | |
if (P === undefined) { | |
P = 1.70158 | |
} | |
return T * ((S = S / R - 1) * S * ((P + 1) * S + P) + 1) + Q | |
}; | |
var l = function(S, Q, T, R, P) { | |
if (P === undefined) { | |
P = 1.70158 | |
} | |
if ((S /= R / 2) < 1) { | |
return T / 2 * (S * S * (((P *= (1.525)) + 1) * S - P)) + Q | |
} | |
return T / 2 * ((S -= 2) * S * (((P *= (1.525)) + 1) * S + P) + 2) + Q | |
}; | |
var L = function(R, P, S, Q) { | |
if ((R /= Q) < (1 / 2.75)) { | |
return S * (7.5625 * R * R) + P | |
} else { | |
if (R < (2 / 2.75)) { | |
return S * (7.5625 * (R -= (1.5 / 2.75)) * R + 0.75) + P | |
} else { | |
if (R < (2.5 / 2.75)) { | |
return S * (7.5625 * (R -= (2.25 / 2.75)) * R + 0.9375) + P | |
} | |
} | |
} | |
return S * (7.5625 * (R -= (2.625 / 2.75)) * R + 0.984375) + P | |
}; | |
var o = function(R, P, S, Q) { | |
return S - L(Q - R, 0, S, Q) + P | |
}; | |
var N = function(R, P, S, Q) { | |
if (R < Q / 2) { | |
return o(R * 2, 0, S, Q) * 0.5 + P | |
} | |
return L(R * 2 - Q, 0, S, Q) * 0.5 + S * 0.5 + P | |
}; | |
b.exports = { | |
linear: v, | |
ease: x, | |
easeIn: g, | |
"ease-in": g, | |
easeOut: D, | |
"ease-out": D, | |
easeInOut: y, | |
"ease-in-out": y, | |
easeInCubic: j, | |
"ease-in-cubic": j, | |
easeOutCubic: a, | |
"ease-out-cubic": a, | |
easeInOutCubic: k, | |
"ease-in-out-cubic": k, | |
easeInQuad: h, | |
"ease-in-quad": h, | |
easeOutQuad: O, | |
"ease-out-quad": O, | |
easeInOutQuad: E, | |
"ease-in-out-quad": E, | |
easeInQuart: p, | |
"ease-in-quart": p, | |
easeOutQuart: n, | |
"ease-out-quart": n, | |
easeInOutQuart: q, | |
"ease-in-out-quart": q, | |
easeInQuint: z, | |
"ease-in-quint": z, | |
easeOutQuint: w, | |
"ease-out-quint": w, | |
easeInOutQuint: A, | |
"ease-in-out-quint": A, | |
easeInSine: c, | |
"ease-in-sine": c, | |
easeOutSine: M, | |
"ease-out-sine": M, | |
easeInOutSine: C, | |
"ease-in-out-sine": C, | |
easeInExpo: H, | |
"ease-in-expo": H, | |
easeOutExpo: B, | |
"ease-out-expo": B, | |
easeInOutExpo: s, | |
"ease-in-out-expo": s, | |
easeInCirc: m, | |
"ease-in-circ": m, | |
easeOutCirc: f, | |
"ease-out-circ": f, | |
easeInOutCirc: J, | |
"ease-in-out-circ": J, | |
easeInBack: t, | |
"ease-in-back": t, | |
easeOutBack: r, | |
"ease-out-back": r, | |
easeInOutBack: l, | |
"ease-in-out-back": l, | |
easeInElastic: F, | |
"ease-in-elastic": F, | |
easeOutElastic: I, | |
"ease-out-elastic": I, | |
easeInOutElastic: u, | |
"ease-in-out-elastic": u, | |
easeInBounce: o, | |
"ease-in-bounce": o, | |
easeOutBounce: L, | |
"ease-out-bounce": L, | |
easeInOutBounce: N, | |
"ease-in-out-bounce": N | |
} | |
}, { | |
"../createBezier": 128 | |
}], | |
134: [function(j, c, y) { | |
var t = Object.prototype.toString; | |
var m = Object.prototype.hasOwnProperty; | |
var b = typeof Array.prototype.indexOf === "function" ? function(A, B) { | |
return A.indexOf(B) | |
} : function(A, C) { | |
for (var B = 0; B < A.length; B++) { | |
if (A[B] === C) { | |
return B | |
} | |
} | |
return -1 | |
}; | |
var l = Array.isArray || function(A) { | |
return t.call(A) == "[object Array]" | |
}; | |
var w = Object.keys || function(C) { | |
var A = []; | |
for (var B in C) { | |
if (C.hasOwnProperty(B)) { | |
A.push(B) | |
} | |
} | |
return A | |
}; | |
var v = typeof Array.prototype.forEach === "function" ? function(A, B) { | |
return A.forEach(B) | |
} : function(A, C) { | |
for (var B = 0; B < A.length; B++) { | |
C(A[B]) | |
} | |
}; | |
var n = function(A, E, B) { | |
if (typeof A.reduce === "function") { | |
return A.reduce(E, B) | |
} | |
var D = B; | |
for (var C = 0; C < A.length; C++) { | |
D = E(D, A[C]) | |
} | |
return D | |
}; | |
var z = /^[0-9]+$/; | |
function d(D, C) { | |
if (D[C].length == 0) { | |
return D[C] = {} | |
} | |
var B = {}; | |
for (var A in D[C]) { | |
if (m.call(D[C], A)) { | |
B[A] = D[C][A] | |
} | |
} | |
D[C] = B; | |
return B | |
} | |
function r(E, C, B, F) { | |
var A = E.shift(); | |
if (m.call(Object.prototype, B)) { | |
return | |
} | |
if (!A) { | |
if (l(C[B])) { | |
C[B].push(F) | |
} else { | |
if ("object" == typeof C[B]) { | |
C[B] = F | |
} else { | |
if ("undefined" == typeof C[B]) { | |
C[B] = F | |
} else { | |
C[B] = [C[B], F] | |
} | |
} | |
} | |
} else { | |
var D = C[B] = C[B] || []; | |
if ("]" == A) { | |
if (l(D)) { | |
if ("" != F) { | |
D.push(F) | |
} | |
} else { | |
if ("object" == typeof D) { | |
D[w(D).length] = F | |
} else { | |
D = C[B] = [C[B], F] | |
} | |
} | |
} else { | |
if (~b(A, "]")) { | |
A = A.substr(0, A.length - 1); | |
if (!z.test(A) && l(D)) { | |
D = d(C, B) | |
} | |
r(E, D, A, F) | |
} else { | |
if (!z.test(A) && l(D)) { | |
D = d(C, B) | |
} | |
r(E, D, A, F) | |
} | |
} | |
} | |
} | |
function f(E, D, H) { | |
if (~b(D, "]")) { | |
var G = D.split("["), | |
A = G.length, | |
F = A - 1; | |
r(G, E, "base", H) | |
} else { | |
if (!z.test(D) && l(E.base)) { | |
var C = {}; | |
for (var B in E.base) { | |
C[B] = E.base[B] | |
} | |
E.base = C | |
} | |
o(E.base, D, H) | |
} | |
return E | |
} | |
function p(D) { | |
if ("object" != typeof D) { | |
return D | |
} | |
if (l(D)) { | |
var A = []; | |
for (var C in D) { | |
if (m.call(D, C)) { | |
A.push(D[C]) | |
} | |
} | |
return A | |
} | |
for (var B in D) { | |
D[B] = p(D[B]) | |
} | |
return D | |
} | |
function g(B) { | |
var A = { | |
base: {} | |
}; | |
v(w(B), function(C) { | |
f(A, C, B[C]) | |
}); | |
return p(A.base) | |
} | |
function h(B) { | |
var A = n(String(B).split("&"), function(C, G) { | |
var H = b(G, "="), | |
F = u(G), | |
D = G.substr(0, F || H), | |
E = G.substr(F || H, G.length), | |
E = E.substr(b(E, "=") + 1, E.length); | |
if ("" == D) { | |
D = G, E = "" | |
} | |
if ("" == D) { | |
return C | |
} | |
return f(C, q(D), q(E)) | |
}, { | |
base: {} | |
}).base; | |
return p(A) | |
} | |
y.parse = function(A) { | |
if (null == A || "" == A) { | |
return {} | |
} | |
return "object" == typeof A ? g(A) : h(A) | |
}; | |
var s = y.stringify = function(B, A) { | |
if (l(B)) { | |
return k(B, A) | |
} else { | |
if ("[object Object]" == t.call(B)) { | |
return x(B, A) | |
} else { | |
if ("string" == typeof B) { | |
return a(B, A) | |
} else { | |
return A + "=" + encodeURIComponent(String(B)) | |
} | |
} | |
} | |
}; | |
function a(B, A) { | |
if (!A) { | |
throw new TypeError("stringify expects an object") | |
} | |
return A + "=" + encodeURIComponent(B) | |
} | |
function k(A, D) { | |
var B = []; | |
if (!D) { | |
throw new TypeError("stringify expects an object") | |
} | |
for (var C = 0; C < A.length; C++) { | |
B.push(s(A[C], D + "[" + C + "]")) | |
} | |
return B.join("&") | |
} | |
function x(G, F) { | |
var B = [], | |
E = w(G), | |
D; | |
for (var C = 0, A = E.length; C < A; ++C) { | |
D = E[C]; | |
if ("" == D) { | |
continue | |
} | |
if (null == G[D]) { | |
B.push(encodeURIComponent(D) + "=") | |
} else { | |
B.push(s(G[D], F ? F + "[" + encodeURIComponent(D) + "]" : encodeURIComponent(D))) | |
} | |
} | |
return B.join("&") | |
} | |
function o(C, B, D) { | |
var A = C[B]; | |
if (m.call(Object.prototype, B)) { | |
return | |
} | |
if (undefined === A) { | |
C[B] = D | |
} else { | |
if (l(A)) { | |
A.push(D) | |
} else { | |
C[B] = [A, D] | |
} | |
} | |
} | |
function u(D) { | |
var A = D.length, | |
C, E; | |
for (var B = 0; B < A; ++B) { | |
E = D[B]; | |
if ("]" == E) { | |
C = false | |
} | |
if ("[" == E) { | |
C = true | |
} | |
if ("=" == E && !C) { | |
return B | |
} | |
} | |
} | |
function q(B) { | |
try { | |
return decodeURIComponent(B.replace(/\+/g, " ")) | |
} catch (A) { | |
return B | |
} | |
} | |
}, {}], | |
135: [function(b, c, a) { | |
c.exports = { | |
clone: b("./ac-object/clone"), | |
create: b("./ac-object/create"), | |
defaults: b("./ac-object/defaults"), | |
extend: b("./ac-object/extend"), | |
getPrototypeOf: b("./ac-object/getPrototypeOf"), | |
isDate: b("./ac-object/isDate"), | |
isEmpty: b("./ac-object/isEmpty"), | |
isRegExp: b("./ac-object/isRegExp"), | |
toQueryParameters: b("./ac-object/toQueryParameters") | |
} | |
}, { | |
"./ac-object/clone": 136, | |
"./ac-object/create": 137, | |
"./ac-object/defaults": 138, | |
"./ac-object/extend": 139, | |
"./ac-object/getPrototypeOf": 140, | |
"./ac-object/isDate": 141, | |
"./ac-object/isEmpty": 142, | |
"./ac-object/isRegExp": 143, | |
"./ac-object/toQueryParameters": 144 | |
}], | |
136: [function(b, c, a) { | |
var f = b("./extend"); | |
c.exports = function d(g) { | |
return f({}, g) | |
} | |
}, { | |
"./extend": 139 | |
}], | |
137: [function(b, d, a) { | |
var f = function() {}; | |
d.exports = function c(g) { | |
if (arguments.length > 1) { | |
throw new Error("Second argument not supported") | |
} | |
if (g === null || typeof g !== "object") { | |
throw new TypeError("Object prototype may only be an Object.") | |
} | |
if (typeof Object.create === "function") { | |
return Object.create(g) | |
} else { | |
f.prototype = g; | |
return new f() | |
} | |
} | |
}, {}], | |
138: [function(b, c, a) { | |
var f = b("./extend"); | |
c.exports = function d(h, g) { | |
if (typeof h !== "object") { | |
throw new TypeError("defaults: must provide a defaults object") | |
} | |
g = g || {}; | |
if (typeof g !== "object") { | |
throw new TypeError("defaults: options must be a typeof object") | |
} | |
return f({}, h, g) | |
} | |
}, { | |
"./extend": 139 | |
}], | |
139: [function(c, d, b) { | |
var a = Object.prototype.hasOwnProperty; | |
d.exports = function f() { | |
var h; | |
var g; | |
if (arguments.length < 2) { | |
h = [{}, arguments[0]] | |
} else { | |
h = [].slice.call(arguments) | |
} | |
g = h.shift(); | |
h.forEach(function(k) { | |
if (k != null) { | |
for (var j in k) { | |
if (a.call(k, j)) { | |
g[j] = k[j] | |
} | |
} | |
} | |
}); | |
return g | |
} | |
}, {}], | |
140: [function(c, d, b) { | |
var a = Object.prototype.hasOwnProperty; | |
d.exports = function f(j) { | |
if (Object.getPrototypeOf) { | |
return Object.getPrototypeOf(j) | |
} else { | |
if (typeof j !== "object") { | |
throw new Error("Requested prototype of a value that is not an object.") | |
} else { | |
if (typeof this.__proto__ === "object") { | |
return j.__proto__ | |
} else { | |
var g = j.constructor; | |
var h; | |
if (a.call(j, "constructor")) { | |
h = g; | |
if (!(delete j.constructor)) { | |
return null | |
} | |
g = j.constructor; | |
j.constructor = h | |
} | |
return g ? g.prototype : null | |
} | |
} | |
} | |
} | |
}, {}], | |
141: [function(b, d, a) { | |
d.exports = function c(f) { | |
return Object.prototype.toString.call(f) === "[object Date]" | |
} | |
}, {}], | |
142: [function(c, d, b) { | |
var a = Object.prototype.hasOwnProperty; | |
d.exports = function f(g) { | |
var h; | |
if (typeof g !== "object") { | |
throw new TypeError("ac-base.Object.isEmpty : Invalid parameter - expected object") | |
} | |
for (h in g) { | |
if (a.call(g, h)) { | |
return false | |
} | |
} | |
return true | |
} | |
}, {}], | |
143: [function(c, d, b) { | |
d.exports = function a(f) { | |
return window.RegExp ? f instanceof RegExp : false | |
} | |
}, {}], | |
144: [function(c, f, b) { | |
var a = c("qs"); | |
f.exports = function d(g) { | |
if (typeof g !== "object") { | |
throw new TypeError("toQueryParameters error: argument is not an object") | |
} | |
return a.stringify(g) | |
} | |
}, { | |
qs: 134 | |
}], | |
145: [function(b, d, a) { | |
var c = b("./ac-element-engagement/ElementEngagement"); | |
d.exports = new c(); | |
d.exports.ElementEngagement = c | |
}, { | |
"./ac-element-engagement/ElementEngagement": 146 | |
}], | |
146: [function(c, b, f) { | |
var g; | |
var d = c("ac-object"); | |
var h = c("ac-element-tracker").ElementTracker; | |
var k = { | |
timeToEngage: 500, | |
inViewThreshold: 0.75, | |
stopOnEngaged: true | |
}; | |
var j = { | |
thresholdEnterTime: 0, | |
thresholdExitTime: 0, | |
inThreshold: false, | |
engaged: false, | |
tracking: true | |
}; | |
var a = function() { | |
h.call(this) | |
}; | |
g = a.prototype = d.create(h.prototype); | |
g._decorateTrackedElement = function(m, l) { | |
var n; | |
n = d.defaults(k, l || {}); | |
d.extend(m, n); | |
d.extend(m, j) | |
}; | |
g._attachElementListeners = function(l) { | |
l.on("thresholdenter", this._thresholdEnter, this); | |
l.on("thresholdexit", this._thresholdExit, this); | |
l.on("enterview", this._enterView, this); | |
l.on("exitview", this._exitView, this) | |
}; | |
g._removeElementListeners = function(l) { | |
l.off("thresholdenter", this._thresholdEnter); | |
l.off("thresholdexit", this._thresholdExit); | |
l.off("enterview", this._enterView); | |
l.off("exitview", this._exitView) | |
}; | |
g._attachAllElementListeners = function() { | |
this.elements.forEach(function(l) { | |
if (!l.stopOnEngaged) { | |
this._attachElementListeners(l) | |
} else { | |
if (!l.engaged) { | |
this._attachElementListeners(l) | |
} | |
} | |
}, this) | |
}; | |
g._removeAllElementListeners = function() { | |
this.elements.forEach(function(l) { | |
this._removeElementListeners(l) | |
}, this) | |
}; | |
g._elementInViewPastThreshold = function(n) { | |
var l = this.windowDelegate.innerHeight(); | |
var m = false; | |
if (n.pixelsInView === l) { | |
m = true | |
} else { | |
m = (n.percentInView > n.inViewThreshold) | |
} | |
return m | |
}; | |
g._ifInView = function(l, n) { | |
var m = l.inThreshold; | |
h.prototype._ifInView.apply(this, arguments); | |
if (!m && this._elementInViewPastThreshold(l)) { | |
l.inThreshold = true; | |
l.trigger("thresholdenter", l); | |
if (typeof l.timeToEngage === "number" && l.timeToEngage >= 0) { | |
l.engagedTimeout = window.setTimeout(this._engaged.bind(this, l), l.timeToEngage) | |
} | |
} | |
}; | |
g._ifAlreadyInView = function(l) { | |
var m = l.inThreshold; | |
h.prototype._ifAlreadyInView.apply(this, arguments); | |
if (m && !this._elementInViewPastThreshold(l)) { | |
l.inThreshold = false; | |
l.trigger("thresholdexit", l); | |
if (l.engagedTimeout) { | |
window.clearTimeout(l.engagedTimeout); | |
l.engagedTimeout = null | |
} | |
} | |
}; | |
g._engaged = function(l) { | |
l.engagedTimeout = null; | |
this._elementEngaged(l); | |
l.trigger("engaged", l); | |
this.trigger("engaged", l) | |
}; | |
g._thresholdEnter = function(l) { | |
l.thresholdEnterTime = Date.now(); | |
l.thresholdExitTime = 0; | |
this.trigger("thresholdenter", l) | |
}; | |
g._thresholdExit = function(l) { | |
l.thresholdExitTime = Date.now(); | |
this.trigger("thresholdexit", l) | |
}; | |
g._enterView = function(l) { | |
this.trigger("enterview", l) | |
}; | |
g._exitView = function(l) { | |
this.trigger("exitview", l) | |
}; | |
g._elementEngaged = function(l) { | |
l.engaged = true; | |
if (l.stopOnEngaged) { | |
this.stop(l) | |
} | |
}; | |
g.stop = function(l) { | |
if (this.tracking && !l) { | |
this._removeAllElementListeners(); | |
h.prototype.stop.call(this) | |
} | |
if (l && l.tracking) { | |
l.tracking = false; | |
this._removeElementListeners(l) | |
} | |
}; | |
g.start = function(l) { | |
if (!l) { | |
this._attachAllElementListeners() | |
} | |
if (l && !l.tracking) { | |
if (!l.stopOnEngaged) { | |
l.tracking = true; | |
this._attachElementListeners(l) | |
} else { | |
if (!l.engaged) { | |
l.tracking = true; | |
this._attachElementListeners(l) | |
} | |
} | |
} | |
if (!this.tracking) { | |
h.prototype.start.call(this) | |
} else { | |
this.refreshAllElementStates() | |
} | |
}; | |
g.addElement = function(n, l) { | |
var m = h.prototype.addElement.call(this, n); | |
this._decorateTrackedElement(m, l); | |
return m | |
}; | |
g.addElements = function(m, l) { | |
[].forEach.call(m, function(n) { | |
this.addElement(n, l) | |
}, this) | |
}; | |
b.exports = a | |
}, { | |
"ac-element-tracker": 214, | |
"ac-object": 135 | |
}], | |
147: [function(b, c, a) { | |
c.exports = { | |
flatten: b("./ac-array/flatten"), | |
intersection: b("./ac-array/intersection"), | |
toArray: b("./ac-array/toArray"), | |
union: b("./ac-array/union"), | |
unique: b("./ac-array/unique"), | |
without: b("./ac-array/without") | |
} | |
}, { | |
"./ac-array/flatten": 148, | |
"./ac-array/intersection": 149, | |
"./ac-array/toArray": 150, | |
"./ac-array/union": 151, | |
"./ac-array/unique": 152, | |
"./ac-array/without": 153 | |
}], | |
148: [function(b, c, a) { | |
c.exports = function d(h) { | |
var f = []; | |
var g = function(j) { | |
if (Array.isArray(j)) { | |
j.forEach(g) | |
} else { | |
f.push(j) | |
} | |
}; | |
h.forEach(g); | |
return f | |
} | |
}, {}], | |
149: [function(b, c, a) { | |
c.exports = function d(n) { | |
if (!n) { | |
return [] | |
} | |
var m = arguments.length; | |
var k = 0; | |
var g = n.length; | |
var f = []; | |
var l; | |
for (k; k < g; k++) { | |
l = n[k]; | |
if (f.indexOf(l) > -1) { | |
continue | |
} | |
for (var h = 1; h < m; h++) { | |
if (arguments[h].indexOf(l) < 0) { | |
break | |
} | |
} | |
if (h === m) { | |
f.push(l) | |
} | |
} | |
return f | |
} | |
}, {}], | |
150: [function(b, d, a) { | |
d.exports = function c(f) { | |
return Array.prototype.slice.call(f) | |
} | |
}, {}], | |
151: [function(b, c, a) { | |
var g = b("./flatten"); | |
var f = b("./unique"); | |
c.exports = function d(h) { | |
return f(g(Array.prototype.slice.call(arguments))) | |
} | |
}, { | |
"./flatten": 148, | |
"./unique": 152 | |
}], | |
152: [function(b, c, a) { | |
c.exports = function d(g) { | |
var f = function(h, j) { | |
if (h.indexOf(j) < 0) { | |
h.push(j) | |
} | |
return h | |
}; | |
return g.reduce(f, []) | |
} | |
}, {}], | |
153: [function(b, d, a) { | |
d.exports = function c(f, n, m) { | |
var k; | |
var h = f.indexOf(n); | |
var l = f.length; | |
if (h >= 0) { | |
if (m) { | |
k = f.slice(0, l); | |
var j, g = 0; | |
for (j = h; j < l; j++) { | |
if (f[j] === n) { | |
k.splice(j - g, 1); | |
g++ | |
} | |
} | |
} else { | |
if (h === (l - 1)) { | |
k = f.slice(0, (l - 1)) | |
} else { | |
if (h === 0) { | |
k = f.slice(1) | |
} else { | |
k = f.slice(0, h); | |
k = k.concat(f.slice(h + 1)) | |
} | |
} | |
} | |
} else { | |
return f | |
} | |
return k | |
} | |
}, {}], | |
154: [function(c, d, b) { | |
var a = c("./ac-dom-styles/vendorTransformHelper"); | |
var f = {}; | |
f.setStyle = function(h, j) { | |
var g; | |
var k; | |
var l; | |
if ((typeof j !== "string" && typeof j !== "object") || Array.isArray(j)) { | |
throw new TypeError("styles argument must be either an object or a string") | |
} | |
g = f.setStyle.__explodeStyleStringToObject(j); | |
for (l in g) { | |
if (g.hasOwnProperty(l)) { | |
k = l.replace(/-(\w)/g, f.setStyle.__camelCaseReplace); | |
f.setStyle.__setStyle(h, k, g, g[l]) | |
} | |
} | |
return h | |
}; | |
f.setStyle.__explodeStyleStringToObject = function(l) { | |
var j = (typeof l === "object") ? l : {}; | |
var m; | |
var k; | |
var g; | |
var h; | |
if (typeof l === "string") { | |
m = l.split(";"); | |
g = m.length; | |
for (h = 0; h < g; h += 1) { | |
k = m[h].indexOf(":"); | |
if (k > 0) { | |
j[m[h].substr(0, k).trim()] = m[h].substr(k + 1).trim() | |
} | |
} | |
} | |
return j | |
}; | |
f.setStyle.__setStyle = function(j, k, h, g) { | |
if (typeof j.style[k] !== "undefined") { | |
j.style[k] = g | |
} | |
}; | |
f.setStyle.__camelCaseReplace = function(h, j, k, g) { | |
return (k === 0) && (g.substr(1, 3) !== "moz") ? j : j.toUpperCase() | |
}; | |
f.getStyle = function(h, k, g) { | |
var j; | |
k = k.replace(/-(\w)/g, f.setStyle.__camelCaseReplace); | |
k = (k === "float") ? "cssFloat" : k; | |
g = g || window.getComputedStyle(h, null); | |
j = g ? g[k] : null; | |
if (k === "opacity") { | |
return j ? parseFloat(j) : 1 | |
} | |
return j === "auto" ? null : j | |
}; | |
f.setVendorPrefixStyle = function(g, k, j) { | |
if (typeof k !== "string") { | |
throw new TypeError("ac-dom-styles.setVendorPrefixStyle: property must be a string") | |
} | |
if (typeof j !== "string" && typeof j !== "number") { | |
throw new TypeError("ac-dom-styles.setVendorPrefixStyle: value must be a string or a number") | |
} | |
var h = ["", "webkit", "Moz", "ms", "O"]; | |
var m; | |
var l; | |
j += ""; | |
k = k.replace(/-(webkit|moz|ms|o)-/i, ""); | |
k = k.replace(/^(webkit|Moz|ms|O)/, ""); | |
k = k.charAt(0).toLowerCase() + k.slice(1); | |
k = k.replace(/-(\w)/, function(n, o) { | |
return o.toUpperCase() | |
}); | |
j = j.replace(/-(webkit|moz|ms|o)-/, "-vendor-"); | |
h.forEach(function(n) { | |
m = (n === "") ? k : n + k.charAt(0).toUpperCase() + k.slice(1); | |
l = (n === "") ? j.replace("-vendor-", "") : j.replace("-vendor-", "-" + n.charAt(0).toLowerCase() + n.slice(1) + "-"); | |
if (m in g.style) { | |
f.setStyle(g, m + ":" + l) | |
} | |
}) | |
}; | |
f.getVendorPrefixStyle = function(h, k) { | |
if (typeof k !== "string") { | |
throw new TypeError("ac-dom-styles.getVendorPrefixStyle: property must be a string") | |
} | |
var j = ["", "webkit", "Moz", "ms", "O"]; | |
var g; | |
k = k.replace(/-(webkit|moz|ms|o)-/i, ""); | |
k = k.replace(/^(webkit|Moz|ms|O)/, "").charAt(0).toLowerCase() + k.slice(1); | |
k = k.replace(/-(\w)/, function(l, m) { | |
return m.toUpperCase() | |
}); | |
j.some(function(m, l) { | |
var n = (m === "") ? k : m + k.charAt(0).toUpperCase() + k.slice(1); | |
if (n in h.style) { | |
g = f.getStyle(h, n); | |
return true | |
} | |
}); | |
return g | |
}; | |
f.setVendorPrefixTransform = function(g, h) { | |
if ((typeof h !== "string" && typeof h !== "object") || Array.isArray(h) || h === null) { | |
throw new TypeError("ac-dom-styles.setVendorPrefixTransform: transformFunctions argument must be either an object or a string") | |
} | |
f.setVendorPrefixStyle(g, "transform", a.convert2dFunctions(h)) | |
}; | |
c("./ac-dom-styles/ie")(f); | |
d.exports = f | |
}, { | |
"./ac-dom-styles/ie": 155, | |
"./ac-dom-styles/vendorTransformHelper": 156 | |
}], | |
155: [function(b, c, a) { | |
c.exports = function(d) { | |
if (typeof window.getComputedStyle !== "function") { | |
d.getStyle = function(j, h, g) { | |
var f; | |
var k; | |
g = g || j.currentStyle; | |
if (g) { | |
h = h.replace(/-(\w)/g, d.setStyle.__camelCaseReplace); | |
h = h === "float" ? "styleFloat" : h; | |
k = g[h] || null; | |
return k === "auto" ? null : k | |
} | |
} | |
} | |
} | |
}, {}], | |
156: [function(c, d, b) { | |
var a = { | |
__objectifiedFunctions: {}, | |
__paramMaps: { | |
translate: "p1, p2, 0", | |
translateX: "p1, 0, 0", | |
translateY: "0, p1, 0", | |
scale: "p1, p2, 1", | |
scaleX: "p1, 1, 1", | |
scaleY: "1, p1, 1", | |
rotate: "0, 0, 1, p1", | |
matrix: "p1, p2, 0, 0, p3, p4, 0, 0, 0, 0, 1, 0, p5, p6, 0, 1" | |
}, | |
convert2dFunctions: function(g) { | |
var f; | |
this.__init(g); | |
for (var h in this.__objectifiedFunctions) { | |
if (this.__objectifiedFunctions.hasOwnProperty(h)) { | |
f = this.__objectifiedFunctions[h].replace(" ", "").split(","); | |
if (h in this.__paramMaps) { | |
for (var j in this.__paramMaps) { | |
if (h === j) { | |
this.valuesToSet.push(this.__stripFunctionAxis(h) + "3d(" + this.__map2DTransformParams(f, this.__paramMaps[h]) + ")") | |
} | |
} | |
} else { | |
this.valuesToSet.push(h + "(" + this.__objectifiedFunctions[h] + ")") | |
} | |
} | |
} | |
return this.valuesToSet.join(" ") | |
}, | |
__init: function(f) { | |
this.valuesToSet = []; | |
this.__objectifiedFunctions = (typeof f === "object") ? f : {}; | |
if (typeof f === "string") { | |
this.__objectifiedFunctions = this.__objectifyFunctionString(f) | |
} | |
}, | |
__map2DTransformParams: function(f, g) { | |
f.forEach(function(j, h) { | |
g = g.replace("p" + (h + 1), j) | |
}); | |
return g | |
}, | |
__splitFunctionStringToArray: function(f) { | |
return f.match(/[\w]+\(.+?\)/g) | |
}, | |
__splitFunctionNameAndParams: function(f) { | |
return f.match(/(.*)\((.*)\)/) | |
}, | |
__stripFunctionAxis: function(f) { | |
return f.match(/([a-z]+)(|X|Y)$/)[1] | |
}, | |
__objectifyFunctionString: function(f) { | |
var g = this; | |
var h; | |
this.__splitFunctionStringToArray(f).forEach(function(j) { | |
h = g.__splitFunctionNameAndParams(j); | |
g.__objectifiedFunctions[h[1]] = h[2] | |
}); | |
return this.__objectifiedFunctions | |
} | |
}; | |
d.exports = a | |
}, {}], | |
157: [function(b, c, a) { | |
var g = b("ac-dom-styles"); | |
var h = {}; | |
var f = function() { | |
return { | |
x: window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft, | |
y: window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop | |
} | |
}; | |
var d = function() { | |
return { | |
height: window.innerHeight || document.documentElement.clientHeight, | |
width: window.innerWidth || document.documentElement.clientWidth | |
} | |
}; | |
h.cumulativeOffset = function(k) { | |
var l = h.getBoundingBox(k); | |
var j = f(); | |
var m = [l.top + j.y, l.left + j.x]; | |
m.top = m[0]; | |
m.left = m[1]; | |
return m | |
}; | |
h.getBoundingBox = function(l) { | |
var m = l.getBoundingClientRect(); | |
var k = m.width || m.right - m.left; | |
var j = m.height || m.bottom - m.top; | |
return { | |
top: m.top, | |
right: m.right, | |
bottom: m.bottom, | |
left: m.left, | |
width: k, | |
height: j | |
} | |
}; | |
h.getInnerDimensions = function(o) { | |
var p = h.getBoundingBox(o); | |
var n = p.width; | |
var j = p.height; | |
var m; | |
var k; | |
var l = window.getComputedStyle ? window.getComputedStyle(o, null) : null; | |
["padding", "border"].forEach(function(q) { | |
["Top", "Right", "Bottom", "Left"].forEach(function(r) { | |
m = q === "border" ? q + r + "Width" : q + r; | |
k = parseFloat(g.getStyle(o, m, l)); | |
k = isNaN(k) ? 0 : k; | |
if (r === "Right" || r === "Left") { | |
n -= k | |
} | |
if (r === "Top" || r === "Bottom") { | |
j -= k | |
} | |
}) | |
}); | |
return { | |
width: n, | |
height: j | |
} | |
}; | |
h.getOuterDimensions = function(m) { | |
var o = h.getBoundingBox(m); | |
var l = o.width; | |
var j = o.height; | |
var n; | |
var k = window.getComputedStyle ? window.getComputedStyle(m, null) : null; | |
["margin"].forEach(function(p) { | |
["Top", "Right", "Bottom", "Left"].forEach(function(q) { | |
n = parseFloat(g.getStyle(m, p + q, k)); | |
n = isNaN(n) ? 0 : n; | |
if (q === "Right" || q === "Left") { | |
l += n | |
} | |
if (q === "Top" || q === "Bottom") { | |
j += n | |
} | |
}) | |
}); | |
return { | |
width: l, | |
height: j | |
} | |
}; | |
h.pixelsInViewport = function(l, k) { | |
var m; | |
var n = d(); | |
k = k || h.getBoundingBox(l); | |
var j = k.top; | |
if (j >= 0) { | |
m = n.height - j; | |
if (m > k.height) { | |
m = k.height | |
} | |
} else { | |
m = k.height + j | |
} | |
if (m < 0) { | |
m = 0 | |
} | |
if (m > n.height) { | |
m = n.height | |
} | |
return m | |
}; | |
h.percentInViewport = function(k) { | |
var j = h.getBoundingBox(k); | |
var l = h.pixelsInViewport(k, j); | |
return l / j.height | |
}; | |
h.isInViewport = function(l, k) { | |
var j = h.percentInViewport(l); | |
if (typeof k !== "number" || 1 < k || k < 0) { | |
k = 0 | |
} | |
return (j > k || j === 1) | |
}; | |
b("./ac-dom-metrics/ie")(h); | |
c.exports = h | |
}, { | |
"./ac-dom-metrics/ie": 158, | |
"ac-dom-styles": 154 | |
}], | |
158: [function(b, c, a) { | |
c.exports = function(d) { | |
if (!("getBoundingClientRect" in document.createElement("_"))) { | |
d.getBoundingBox = function(h) { | |
var k = h.offsetLeft; | |
var j = h.offsetTop; | |
var g = h.offsetWidth; | |
var f = h.offsetHeight; | |
return { | |
top: j, | |
right: k + g, | |
bottom: j + f, | |
left: k, | |
width: g, | |
height: f | |
} | |
} | |
} | |
} | |
}, {}], | |
159: [function(b, c, a) { | |
arguments[4][19][0].apply(a, arguments) | |
}, { | |
"./ac-event-emitter/EventEmitter": 160, | |
dup: 19 | |
}], | |
160: [function(b, c, a) { | |
arguments[4][20][0].apply(a, arguments) | |
}, { | |
dup: 20 | |
}], | |
161: [function(b, c, a) { | |
arguments[4][134][0].apply(a, arguments) | |
}, { | |
dup: 134 | |
}], | |
162: [function(b, c, a) { | |
arguments[4][135][0].apply(a, arguments) | |
}, { | |
"./ac-object/clone": 163, | |
"./ac-object/create": 164, | |
"./ac-object/defaults": 165, | |
"./ac-object/extend": 166, | |
"./ac-object/getPrototypeOf": 167, | |
"./ac-object/isDate": 168, | |
"./ac-object/isEmpty": 169, | |
"./ac-object/isRegExp": 170, | |
"./ac-object/toQueryParameters": 171, | |
dup: 135 | |
}], | |
163: [function(b, c, a) { | |
arguments[4][136][0].apply(a, arguments) | |
}, { | |
"./extend": 166, | |
dup: 136 | |
}], | |
164: [function(b, c, a) { | |
arguments[4][137][0].apply(a, arguments) | |
}, { | |
dup: 137 | |
}], | |
165: [function(b, c, a) { | |
arguments[4][138][0].apply(a, arguments) | |
}, { | |
"./extend": 166, | |
dup: 138 | |
}], | |
166: [function(b, c, a) { | |
arguments[4][139][0].apply(a, arguments) | |
}, { | |
dup: 139 | |
}], | |
167: [function(b, c, a) { | |
arguments[4][140][0].apply(a, arguments) | |
}, { | |
dup: 140 | |
}], | |
168: [function(b, c, a) { | |
arguments[4][141][0].apply(a, arguments) | |
}, { | |
dup: 141 | |
}], | |
169: [function(b, c, a) { | |
arguments[4][142][0].apply(a, arguments) | |
}, { | |
dup: 142 | |
}], | |
170: [function(b, c, a) { | |
arguments[4][143][0].apply(a, arguments) | |
}, { | |
dup: 143 | |
}], | |
171: [function(b, c, a) { | |
arguments[4][144][0].apply(a, arguments) | |
}, { | |
dup: 144, | |
qs: 161 | |
}], | |
172: [function(b, d, a) { | |
var c = {}; | |
c.addEventListener = function(k, h, j, g) { | |
if (k.addEventListener) { | |
k.addEventListener(h, j, g) | |
} else { | |
if (k.attachEvent) { | |
k.attachEvent("on" + h, j) | |
} else { | |
k["on" + h] = j | |
} | |
} | |
return k | |
}; | |
c.dispatchEvent = function(h, g) { | |
if (document.createEvent) { | |
h.dispatchEvent(new CustomEvent(g)) | |
} else { | |
h.fireEvent("on" + g, document.createEventObject()) | |
} | |
return h | |
}; | |
c.removeEventListener = function(k, h, j, g) { | |
if (k.removeEventListener) { | |
k.removeEventListener(h, j, g) | |
} else { | |
k.detachEvent("on" + h, j) | |
} | |
return k | |
}; | |
var f = /^(webkit|moz|ms|o)/i; | |
c.addVendorPrefixEventListener = function(k, h, j, g) { | |
if (f.test(h)) { | |
h = h.replace(f, "") | |
} else { | |
h = h.charAt(0).toUpperCase() + h.slice(1) | |
} | |
if (/WebKit/i.test(window.navigator.userAgent)) { | |
return c.addEventListener(k, "webkit" + h, j, g) | |
} else { | |
if (/Opera/i.test(window.navigator.userAgent)) { | |
return c.addEventListener(k, "O" + h, j, g) | |
} else { | |
if (/Gecko/i.test(window.navigator.userAgent)) { | |
return c.addEventListener(k, h.toLowerCase(), j, g) | |
} else { | |
h = h.charAt(0).toLowerCase() + h.slice(1); | |
return c.addEventListener(k, h, j, g) | |
} | |
} | |
} | |
}; | |
c.removeVendorPrefixEventListener = function(k, h, j, g) { | |
if (f.test(h)) { | |
h = h.replace(f, "") | |
} else { | |
h = h.charAt(0).toUpperCase() + h.slice(1) | |
} | |
c.removeEventListener(k, "webkit" + h, j, g); | |
c.removeEventListener(k, "O" + h, j, g); | |
c.removeEventListener(k, h.toLowerCase(), j, g); | |
h = h.charAt(0).toLowerCase() + h.slice(1); | |
return c.removeEventListener(k, h, j, g) | |
}; | |
c.stop = function(g) { | |
if (!g) { | |
g = window.event | |
} | |
if (g.stopPropagation) { | |
g.stopPropagation() | |
} else { | |
g.cancelBubble = true | |
} | |
if (g.preventDefault) { | |
g.preventDefault() | |
} | |
g.stopped = true; | |
g.returnValue = false | |
}; | |
c.target = function(g) { | |
return (typeof g.target !== "undefined") ? g.target : g.srcElement | |
}; | |
d.exports = c | |
}, {}], | |
173: [function(b, c, a) { | |
var d = { | |
querySelector: b("./ac-dom-traversal/querySelector"), | |
querySelectorAll: b("./ac-dom-traversal/querySelectorAll"), | |
ancestor: b("./ac-dom-traversal/ancestor"), | |
ancestors: b("./ac-dom-traversal/ancestors"), | |
children: b("./ac-dom-traversal/children"), | |
firstChild: b("./ac-dom-traversal/firstChild"), | |
lastChild: b("./ac-dom-traversal/lastChild"), | |
siblings: b("./ac-dom-traversal/siblings"), | |
nextSibling: b("./ac-dom-traversal/nextSibling"), | |
nextSiblings: b("./ac-dom-traversal/nextSiblings"), | |
previousSibling: b("./ac-dom-traversal/previousSibling"), | |
previousSiblings: b("./ac-dom-traversal/previousSiblings"), | |
filterBySelector: b("./ac-dom-traversal/filterBySelector"), | |
matchesSelector: b("./ac-dom-traversal/matchesSelector") | |
}; | |
b("./ac-dom-traversal/shims/ie")(d); | |
c.exports = d | |
}, { | |
"./ac-dom-traversal/ancestor": 174, | |
"./ac-dom-traversal/ancestors": 175, | |
"./ac-dom-traversal/children": 176, | |
"./ac-dom-traversal/filterBySelector": 177, | |
"./ac-dom-traversal/firstChild": 178, | |
"./ac-dom-traversal/lastChild": 181, | |
"./ac-dom-traversal/matchesSelector": 182, | |
"./ac-dom-traversal/nextSibling": 183, | |
"./ac-dom-traversal/nextSiblings": 184, | |
"./ac-dom-traversal/previousSibling": 185, | |
"./ac-dom-traversal/previousSiblings": 186, | |
"./ac-dom-traversal/querySelector": 187, | |
"./ac-dom-traversal/querySelectorAll": 188, | |
"./ac-dom-traversal/shims/ie": 189, | |
"./ac-dom-traversal/siblings": 190 | |
}], | |
174: [function(d, g, c) { | |
var a = d("ac-dom-nodes"); | |
var b = d("./matchesSelector"); | |
var h = d("./helpers/validate"); | |
g.exports = function f(k, j) { | |
h.childNode(k, true, "ancestors"); | |
h.selector(j, false, "ancestors"); | |
if (k !== document.body) { | |
while ((k = k.parentNode) && a.isElement(k)) { | |
if (!j || b(k, j)) { | |
return k | |
} | |
if (k === document.body) { | |
break | |
} | |
} | |
} | |
return null | |
} | |
}, { | |
"./helpers/validate": 180, | |
"./matchesSelector": 182, | |
"ac-dom-nodes": 74 | |
}], | |
175: [function(d, f, c) { | |
var a = d("ac-dom-nodes"); | |
var b = d("./matchesSelector"); | |
var h = d("./helpers/validate"); | |
f.exports = function g(l, j) { | |
var k = []; | |
h.childNode(l, true, "ancestors"); | |
h.selector(j, false, "ancestors"); | |
if (l !== document.body) { | |
while ((l = l.parentNode) && a.isElement(l)) { | |
if (!j || b(l, j)) { | |
k.push(l) | |
} | |
if (l === document.body) { | |
break | |
} | |
} | |
} | |
return k | |
} | |
}, { | |
"./helpers/validate": 180, | |
"./matchesSelector": 182, | |
"ac-dom-nodes": 74 | |
}], | |
176: [function(d, g, c) { | |
var a = d("ac-dom-nodes"); | |
var b = d("./filterBySelector"); | |
var h = d("./helpers/validate"); | |
g.exports = function f(l, j) { | |
var k; | |
h.parentNode(l, true, "children"); | |
h.selector(j, false, "children"); | |
k = l.children || l.childNodes; | |
k = a.filterByNodeType(k); | |
if (j) { | |
k = b(k, j) | |
} | |
return k | |
} | |
}, { | |
"./filterBySelector": 177, | |
"./helpers/validate": 180, | |
"ac-dom-nodes": 74 | |
}], | |
177: [function(d, f, c) { | |
var b = d("./matchesSelector"); | |
var g = d("./helpers/validate"); | |
f.exports = function a(j, h) { | |
g.selector(h, true, "filterBySelector"); | |
j = Array.prototype.slice.call(j); | |
return j.filter(function(k) { | |
return b(k, h) | |
}) | |
} | |
}, { | |
"./helpers/validate": 180, | |
"./matchesSelector": 182 | |
}], | |
178: [function(b, d, a) { | |
var c = b("./children"); | |
var g = b("./helpers/validate"); | |
d.exports = function f(k, h) { | |
var j; | |
g.parentNode(k, true, "firstChild"); | |
g.selector(h, false, "firstChild"); | |
if (k.firstElementChild && !h) { | |
return k.firstElementChild | |
} | |
j = c(k, h); | |
if (j.length) { | |
return j[0] | |
} | |
return null | |
} | |
}, { | |
"./children": 176, | |
"./helpers/validate": 180 | |
}], | |
179: [function(b, c, a) { | |
c.exports = window.Element ? (function(d) { | |
return d.matches || d.matchesSelector || d.webkitMatchesSelector || d.mozMatchesSelector || d.msMatchesSelector || d.oMatchesSelector | |
}(Element.prototype)) : null | |
}, {}], | |
180: [function(d, b, f) { | |
var k = d("ac-dom-nodes"); | |
var a = function(n, m) { | |
if (!k.isNode(n)) { | |
return false | |
} | |
if (typeof m === "number") { | |
return (n.nodeType === m) | |
} | |
return (m.indexOf(n.nodeType) !== -1) | |
}; | |
var h = [k.ELEMENT_NODE, k.DOCUMENT_NODE, k.DOCUMENT_FRAGMENT_NODE]; | |
var j = " must be an Element, Document, or Document Fragment"; | |
var l = [k.ELEMENT_NODE, k.TEXT_NODE, k.COMMENT_NODE]; | |
var g = " must be an Element, TextNode, or Comment"; | |
var c = " must be a string"; | |
b.exports = { | |
parentNode: function(m, p, o, n) { | |
n = n || "node"; | |
if ((m || p) && !a(m, h)) { | |
throw new TypeError(o + ": " + n + j) | |
} | |
}, | |
childNode: function(m, p, o, n) { | |
n = n || "node"; | |
if (!m && !p) { | |
return | |
} | |
if (!a(m, l)) { | |
throw new TypeError(o + ": " + n + g) | |
} | |
}, | |
selector: function(m, p, o, n) { | |
n = n || "selector"; | |
if ((m || p) && typeof m !== "string") { | |
throw new TypeError(o + ": " + n + c) | |
} | |
} | |
} | |
}, { | |
"ac-dom-nodes": 74 | |
}], | |
181: [function(b, d, a) { | |
var c = b("./children"); | |
var g = b("./helpers/validate"); | |
d.exports = function f(k, h) { | |
var j; | |
g.parentNode(k, true, "lastChild"); | |
g.selector(h, false, "lastChild"); | |
if (k.lastElementChild && !h) { | |
return k.lastElementChild | |
} | |
j = c(k, h); | |
if (j.length) { | |
return j[j.length - 1] | |
} | |
return null | |
} | |
}, { | |
"./children": 176, | |
"./helpers/validate": 180 | |
}], | |
182: [function(f, g, d) { | |
var b = f("ac-dom-nodes"); | |
var a = f("./helpers/nativeMatches"); | |
var h = f("./helpers/validate"); | |
g.exports = function c(k, j) { | |
h.selector(j, true, "matchesSelector"); | |
return b.isElement(k) ? a.call(k, j) : false | |
} | |
}, { | |
"./helpers/nativeMatches": 179, | |
"./helpers/validate": 180, | |
"ac-dom-nodes": 74 | |
}], | |
183: [function(d, f, c) { | |
var a = d("ac-dom-nodes"); | |
var b = d("./matchesSelector"); | |
var h = d("./helpers/validate"); | |
f.exports = function g(k, j) { | |
h.childNode(k, true, "nextSibling"); | |
h.selector(j, false, "nextSibling"); | |
if (k.nextElementSibling && !j) { | |
return k.nextElementSibling | |
} | |
while (k = k.nextSibling) { | |
if (a.isElement(k)) { | |
if (!j || b(k, j)) { | |
return k | |
} | |
} | |
} | |
return null | |
} | |
}, { | |
"./helpers/validate": 180, | |
"./matchesSelector": 182, | |
"ac-dom-nodes": 74 | |
}], | |
184: [function(f, g, c) { | |
var a = f("ac-dom-nodes"); | |
var b = f("./matchesSelector"); | |
var h = f("./helpers/validate"); | |
g.exports = function d(l, j) { | |
var k = []; | |
h.childNode(l, true, "nextSiblings"); | |
h.selector(j, false, "nextSiblings"); | |
while (l = l.nextSibling) { | |
if (a.isElement(l)) { | |
if (!j || b(l, j)) { | |
k.push(l) | |
} | |
} | |
} | |
return k | |
} | |
}, { | |
"./helpers/validate": 180, | |
"./matchesSelector": 182, | |
"ac-dom-nodes": 74 | |
}], | |
185: [function(d, f, c) { | |
var a = d("ac-dom-nodes"); | |
var b = d("./matchesSelector"); | |
var h = d("./helpers/validate"); | |
f.exports = function g(k, j) { | |
h.childNode(k, true, "previousSibling"); | |
h.selector(j, false, "previousSibling"); | |
if (k.previousElementSibling && !j) { | |
return k.previousElementSibling | |
} | |
while (k = k.previousSibling) { | |
if (a.isElement(k)) { | |
if (!j || b(k, j)) { | |
return k | |
} | |
} | |
} | |
return null | |
} | |
}, { | |
"./helpers/validate": 180, | |
"./matchesSelector": 182, | |
"ac-dom-nodes": 74 | |
}], | |
186: [function(d, f, c) { | |
var a = d("ac-dom-nodes"); | |
var b = d("./matchesSelector"); | |
var h = d("./helpers/validate"); | |
f.exports = function g(l, j) { | |
var k = []; | |
h.childNode(l, true, "previousSiblings"); | |
h.selector(j, false, "previousSiblings"); | |
while (l = l.previousSibling) { | |
if (a.isElement(l)) { | |
if (!j || b(l, j)) { | |
k.push(l) | |
} | |
} | |
} | |
return k.reverse() | |
} | |
}, { | |
"./helpers/validate": 180, | |
"./matchesSelector": 182, | |
"ac-dom-nodes": 74 | |
}], | |
187: [function(b, c, a) { | |
var f = b("./helpers/validate"); | |
c.exports = function d(g, h) { | |
h = h || document; | |
f.parentNode(h, true, "querySelector", "context"); | |
f.selector(g, true, "querySelector"); | |
return h.querySelector(g) | |
} | |
}, { | |
"./helpers/validate": 180 | |
}], | |
188: [function(b, c, a) { | |
var f = b("./helpers/validate"); | |
c.exports = function d(g, h) { | |
h = h || document; | |
f.parentNode(h, true, "querySelectorAll", "context"); | |
f.selector(g, true, "querySelectorAll"); | |
return Array.prototype.slice.call(h.querySelectorAll(g)) | |
} | |
}, { | |
"./helpers/validate": 180 | |
}], | |
189: [function(d, f, c) { | |
var g = d("../vendor/sizzle/sizzle"); | |
var b = d("ac-dom-nodes"); | |
var a = d("../helpers/nativeMatches"); | |
var h = d("../helpers/validate"); | |
f.exports = function(k, j) { | |
if (j || !("querySelectorAll" in document)) { | |
k.querySelectorAll = function(l, n) { | |
var m; | |
var o; | |
n = n || document; | |
h.parentNode(n, true, "querySelectorAll", "context"); | |
h.selector(l, true, "querySelectorAll"); | |
if (b.isDocumentFragment(n)) { | |
m = k.children(n); | |
o = []; | |
m.forEach(function(q) { | |
var p; | |
if (g.matchesSelector(q, l)) { | |
o.push(q) | |
} | |
p = g(l, q); | |
if (p.length) { | |
o = o.concat(p) | |
} | |
}); | |
return o | |
} | |
return g(l, n) | |
}; | |
k.querySelector = function(m, n) { | |
var l; | |
n = n || document; | |
h.parentNode(n, true, "querySelector", "context"); | |
h.selector(m, true, "querySelector"); | |
l = k.querySelectorAll(m, n); | |
return l.length ? l[0] : null | |
} | |
} | |
if (j || !a) { | |
k.matchesSelector = function(m, l) { | |
return g.matchesSelector(m, l) | |
} | |
} | |
} | |
}, { | |
"../helpers/nativeMatches": 179, | |
"../helpers/validate": 180, | |
"../vendor/sizzle/sizzle": 191, | |
"ac-dom-nodes": 74 | |
}], | |
190: [function(b, d, a) { | |
var c = b("./children"); | |
var g = b("./helpers/validate"); | |
d.exports = function f(k, h) { | |
var j = []; | |
g.childNode(k, true, "siblings"); | |
g.selector(h, false, "siblings"); | |
if (k.parentNode) { | |
j = c(k.parentNode, h); | |
j = j.filter(function(l) { | |
return (l !== k) | |
}) | |
} | |
return j | |
} | |
}, { | |
"./children": 176, | |
"./helpers/validate": 180 | |
}], | |
191: [function(b, c, a) { | |
/*! | |
* Sizzle CSS Selector Engine | |
* Copyright 2012, The Dojo Foundation | |
* Released under the MIT, BSD, and GPL Licenses. | |
* More information: http://sizzlejs.com/ | |
*/ | |
(function(ae, w) { | |
var aj, E, v, h, o, m = ae.document, | |
p = m.documentElement, | |
M = "undefined", | |
q = false, | |
n = true, | |
u = 0, | |
z = [].slice, | |
ai = [].push, | |
am = ("sizcache" + Math.random()).replace(".", ""), | |
P = "[\\x20\\t\\r\\n\\f]", | |
y = "(?:\\\\.|[-\\w]|[^\\x00-\\xa0])", | |
x = "(?:[\\w#_-]|[^\\x00-\\xa0]|\\\\.)", | |
ar = "([*^$|!~]?=)", | |
ab = "\\[" + P + "*(" + y + "+)" + P + "*(?:" + ar + P + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + x + "+)|)|)" + P + "*\\]", | |
at = ":(" + y + "+)(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|(.*))\\)|)", | |
R = ":(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\)|)(?=[^-]|$)", | |
t = P + "*([\\x20\\t\\r\\n\\f>+~])" + P + "*", | |
s = "(?=[^\\x20\\t\\r\\n\\f])(?:\\\\.|" + ab + "|" + at.replace(2, 7) + "|[^\\\\(),])+", | |
ak = new RegExp("^" + P + "+|((?:^|[^\\\\])(?:\\\\.)*)" + P + "+$", "g"), | |
V = new RegExp("^" + t), | |
J = new RegExp(s + "?(?=" + P + "*,|$)", "g"), | |
Z = new RegExp("^(?:(?!,)(?:(?:^|,)" + P + "*" + s + ")*?|" + P + "*(.*?))(\\)|$)"), | |
ap = new RegExp(s.slice(19, -6) + "\\x20\\t\\r\\n\\f>+~])+|" + t, "g"), | |
aa = /^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/, | |
af = /[\x20\t\r\n\f]*[+~]/, | |
an = /:not\($/, | |
F = /h\d/i, | |
ac = /input|select|textarea|button/i, | |
I = /\\(?!\\)/g, | |
U = { | |
ID: new RegExp("^#(" + y + "+)"), | |
CLASS: new RegExp("^\\.(" + y + "+)"), | |
NAME: new RegExp("^\\[name=['\"]?(" + y + "+)['\"]?\\]"), | |
TAG: new RegExp("^(" + y.replace("[-", "[-\\*") + "+)"), | |
ATTR: new RegExp("^" + ab), | |
PSEUDO: new RegExp("^" + at), | |
CHILD: new RegExp("^:(only|nth|last|first)-child(?:\\(" + P + "*(even|odd|(([+-]|)(\\d*)n|)" + P + "*(?:([+-]|)" + P + "*(\\d+)|))" + P + "*\\)|)", "i"), | |
POS: new RegExp(R, "ig"), | |
needsContext: new RegExp("^" + P + "*[>+~]|" + R, "i") | |
}, | |
ah = {}, | |
G = [], | |
B = {}, | |
K = [], | |
ao = function(au) { | |
au.sizzleFilter = true; | |
return au | |
}, | |
j = function(au) { | |
return function(av) { | |
return av.nodeName.toLowerCase() === "input" && av.type === au | |
} | |
}, | |
H = function(au) { | |
return function(aw) { | |
var av = aw.nodeName.toLowerCase(); | |
return (av === "input" || av === "button") && aw.type === au | |
} | |
}, | |
X = function(au) { | |
var av = false, | |
ax = m.createElement("div"); | |
try { | |
av = au(ax) | |
} catch (aw) {} | |
ax = null; | |
return av | |
}, | |
D = X(function(av) { | |
av.innerHTML = "<select></select>"; | |
var au = typeof av.lastChild.getAttribute("multiple"); | |
return au !== "boolean" && au !== "string" | |
}), | |
f = X(function(av) { | |
av.id = am + 0; | |
av.innerHTML = "<a name='" + am + "'></a><div name='" + am + "'></div>"; | |
p.insertBefore(av, p.firstChild); | |
var au = m.getElementsByName && m.getElementsByName(am).length === 2 + m.getElementsByName(am + 0).length; | |
o = !m.getElementById(am); | |
p.removeChild(av); | |
return au | |
}), | |
l = X(function(au) { | |
au.appendChild(m.createComment("")); | |
return au.getElementsByTagName("*").length === 0 | |
}), | |
T = X(function(au) { | |
au.innerHTML = "<a href='#'></a>"; | |
return au.firstChild && typeof au.firstChild.getAttribute !== M && au.firstChild.getAttribute("href") === "#" | |
}), | |
S = X(function(au) { | |
au.innerHTML = "<div class='hidden e'></div><div class='hidden'></div>"; | |
if (!au.getElementsByClassName || au.getElementsByClassName("e").length === 0) { | |
return false | |
} | |
au.lastChild.className = "e"; | |
return au.getElementsByClassName("e").length !== 1 | |
}); | |
var ad = function(ax, au, az, aC) { | |
az = az || []; | |
au = au || m; | |
var aA, av, aB, aw, ay = au.nodeType; | |
if (ay !== 1 && ay !== 9) { | |
return [] | |
} | |
if (!ax || typeof ax !== "string") { | |
return az | |
} | |
aB = A(au); | |
if (!aB && !aC) { | |
if ((aA = aa.exec(ax))) { | |
if ((aw = aA[1])) { | |
if (ay === 9) { | |
av = au.getElementById(aw); | |
if (av && av.parentNode) { | |
if (av.id === aw) { | |
az.push(av); | |
return az | |
} | |
} else { | |
return az | |
} | |
} else { | |
if (au.ownerDocument && (av = au.ownerDocument.getElementById(aw)) && Q(au, av) && av.id === aw) { | |
az.push(av); | |
return az | |
} | |
} | |
} else { | |
if (aA[2]) { | |
ai.apply(az, z.call(au.getElementsByTagName(ax), 0)); | |
return az | |
} else { | |
if ((aw = aA[3]) && S && au.getElementsByClassName) { | |
ai.apply(az, z.call(au.getElementsByClassName(aw), 0)); | |
return az | |
} | |
} | |
} | |
} | |
} | |
return al(ax, au, az, aC, aB) | |
}; | |
var W = ad.selectors = { | |
cacheLength: 50, | |
match: U, | |
order: ["ID", "TAG"], | |
attrHandle: {}, | |
createPseudo: ao, | |
find: { | |
ID: o ? function(ax, aw, av) { | |
if (typeof aw.getElementById !== M && !av) { | |
var au = aw.getElementById(ax); | |
return au && au.parentNode ? [au] : [] | |
} | |
} : function(ax, aw, av) { | |
if (typeof aw.getElementById !== M && !av) { | |
var au = aw.getElementById(ax); | |
return au ? au.id === ax || typeof au.getAttributeNode !== M && au.getAttributeNode("id").value === ax ? [au] : w : [] | |
} | |
}, | |
TAG: l ? function(au, av) { | |
if (typeof av.getElementsByTagName !== M) { | |
return av.getElementsByTagName(au) | |
} | |
} : function(au, ay) { | |
var ax = ay.getElementsByTagName(au); | |
if (au === "*") { | |
var az, aw = [], | |
av = 0; | |
for (; | |
(az = ax[av]); av++) { | |
if (az.nodeType === 1) { | |
aw.push(az) | |
} | |
} | |
return aw | |
} | |
return ax | |
} | |
}, | |
relative: { | |
">": { | |
dir: "parentNode", | |
first: true | |
}, | |
" ": { | |
dir: "parentNode" | |
}, | |
"+": { | |
dir: "previousSibling", | |
first: true | |
}, | |
"~": { | |
dir: "previousSibling" | |
} | |
}, | |
preFilter: { | |
ATTR: function(au) { | |
au[1] = au[1].replace(I, ""); | |
au[3] = (au[4] || au[5] || "").replace(I, ""); | |
if (au[2] === "~=") { | |
au[3] = " " + au[3] + " " | |
} | |
return au.slice(0, 4) | |
}, | |
CHILD: function(au) { | |
au[1] = au[1].toLowerCase(); | |
if (au[1] === "nth") { | |
if (!au[2]) { | |
ad.error(au[0]) | |
} | |
au[3] = +(au[3] ? au[4] + (au[5] || 1) : 2 * (au[2] === "even" || au[2] === "odd")); | |
au[4] = +((au[6] + au[7]) || au[2] === "odd") | |
} else { | |
if (au[2]) { | |
ad.error(au[0]) | |
} | |
} | |
return au | |
}, | |
PSEUDO: function(au) { | |
var av, aw = au[4]; | |
if (U.CHILD.test(au[0])) { | |
return null | |
} | |
if (aw && (av = Z.exec(aw)) && av.pop()) { | |
au[0] = au[0].slice(0, av[0].length - aw.length - 1); | |
aw = av[0].slice(0, -1) | |
} | |
au.splice(2, 3, aw || au[3]); | |
return au | |
} | |
}, | |
filter: { | |
ID: o ? function(au) { | |
au = au.replace(I, ""); | |
return function(av) { | |
return av.getAttribute("id") === au | |
} | |
} : function(au) { | |
au = au.replace(I, ""); | |
return function(aw) { | |
var av = typeof aw.getAttributeNode !== M && aw.getAttributeNode("id"); | |
return av && av.value === au | |
} | |
}, | |
TAG: function(au) { | |
if (au === "*") { | |
return function() { | |
return true | |
} | |
} | |
au = au.replace(I, "").toLowerCase(); | |
return function(av) { | |
return av.nodeName && av.nodeName.toLowerCase() === au | |
} | |
}, | |
CLASS: function(au) { | |
var av = ah[au]; | |
if (!av) { | |
av = ah[au] = new RegExp("(^|" + P + ")" + au + "(" + P + "|$)"); | |
G.push(au); | |
if (G.length > W.cacheLength) { | |
delete ah[G.shift()] | |
} | |
} | |
return function(aw) { | |
return av.test(aw.className || (typeof aw.getAttribute !== M && aw.getAttribute("class")) || "") | |
} | |
}, | |
ATTR: function(aw, av, au) { | |
if (!av) { | |
return function(ax) { | |
return ad.attr(ax, aw) != null | |
} | |
} | |
return function(ay) { | |
var ax = ad.attr(ay, aw), | |
az = ax + ""; | |
if (ax == null) { | |
return av === "!=" | |
} | |
switch (av) { | |
case "=": | |
return az === au; | |
case "!=": | |
return az !== au; | |
case "^=": | |
return au && az.indexOf(au) === 0; | |
case "*=": | |
return au && az.indexOf(au) > -1; | |
case "$=": | |
return au && az.substr(az.length - au.length) === au; | |
case "~=": | |
return (" " + az + " ").indexOf(au) > -1; | |
case "|=": | |
return az === au || az.substr(0, au.length + 1) === au + "-" | |
} | |
} | |
}, | |
CHILD: function(av, ax, ay, aw) { | |
if (av === "nth") { | |
var au = u++; | |
return function(aC) { | |
var az, aD, aB = 0, | |
aA = aC; | |
if (ay === 1 && aw === 0) { | |
return true | |
} | |
az = aC.parentNode; | |
if (az && (az[am] !== au || !aC.sizset)) { | |
for (aA = az.firstChild; aA; aA = aA.nextSibling) { | |
if (aA.nodeType === 1) { | |
aA.sizset = ++aB; | |
if (aA === aC) { | |
break | |
} | |
} | |
} | |
az[am] = au | |
} | |
aD = aC.sizset - aw; | |
if (ay === 0) { | |
return aD === 0 | |
} else { | |
return (aD % ay === 0 && aD / ay >= 0) | |
} | |
} | |
} | |
return function(aA) { | |
var az = aA; | |
switch (av) { | |
case "only": | |
case "first": | |
while ((az = az.previousSibling)) { | |
if (az.nodeType === 1) { | |
return false | |
} | |
} | |
if (av === "first") { | |
return true | |
} | |
az = aA; | |
case "last": | |
while ((az = az.nextSibling)) { | |
if (az.nodeType === 1) { | |
return false | |
} | |
} | |
return true | |
} | |
} | |
}, | |
PSEUDO: function(ay, ax, av, au) { | |
var aw = W.pseudos[ay] || W.pseudos[ay.toLowerCase()]; | |
if (!aw) { | |
ad.error("unsupported pseudo: " + ay) | |
} | |
if (!aw.sizzleFilter) { | |
return aw | |
} | |
return aw(ax, av, au) | |
} | |
}, | |
pseudos: { | |
not: ao(function(au, aw, av) { | |
var ax = r(au.replace(ak, "$1"), aw, av); | |
return function(ay) { | |
return !ax(ay) | |
} | |
}), | |
enabled: function(au) { | |
return au.disabled === false | |
}, | |
disabled: function(au) { | |
return au.disabled === true | |
}, | |
checked: function(au) { | |
var av = au.nodeName.toLowerCase(); | |
return (av === "input" && !!au.checked) || (av === "option" && !!au.selected) | |
}, | |
selected: function(au) { | |
if (au.parentNode) { | |
au.parentNode.selectedIndex | |
} | |
return au.selected === true | |
}, | |
parent: function(au) { | |
return !!au.firstChild | |
}, | |
empty: function(au) { | |
return !au.firstChild | |
}, | |
contains: ao(function(au) { | |
return function(av) { | |
return (av.textContent || av.innerText || d(av)).indexOf(au) > -1 | |
} | |
}), | |
has: ao(function(au) { | |
return function(av) { | |
return ad(au, av).length > 0 | |
} | |
}), | |
header: function(au) { | |
return F.test(au.nodeName) | |
}, | |
text: function(aw) { | |
var av, au; | |
return aw.nodeName.toLowerCase() === "input" && (av = aw.type) === "text" && ((au = aw.getAttribute("type")) == null || au.toLowerCase() === av) | |
}, | |
radio: j("radio"), | |
checkbox: j("checkbox"), | |
file: j("file"), | |
password: j("password"), | |
image: j("image"), | |
submit: H("submit"), | |
reset: H("reset"), | |
button: function(av) { | |
var au = av.nodeName.toLowerCase(); | |
return au === "input" && av.type === "button" || au === "button" | |
}, | |
input: function(au) { | |
return ac.test(au.nodeName) | |
}, | |
focus: function(au) { | |
var av = au.ownerDocument; | |
return au === av.activeElement && (!av.hasFocus || av.hasFocus()) && !!(au.type || au.href) | |
}, | |
active: function(au) { | |
return au === au.ownerDocument.activeElement | |
} | |
}, | |
setFilters: { | |
first: function(aw, av, au) { | |
return au ? aw.slice(1) : [aw[0]] | |
}, | |
last: function(ax, aw, av) { | |
var au = ax.pop(); | |
return av ? ax : [au] | |
}, | |
even: function(az, ay, ax) { | |
var aw = [], | |
av = ax ? 1 : 0, | |
au = az.length; | |
for (; av < au; av = av + 2) { | |
aw.push(az[av]) | |
} | |
return aw | |
}, | |
odd: function(az, ay, ax) { | |
var aw = [], | |
av = ax ? 0 : 1, | |
au = az.length; | |
for (; av < au; av = av + 2) { | |
aw.push(az[av]) | |
} | |
return aw | |
}, | |
lt: function(aw, av, au) { | |
return au ? aw.slice(+av) : aw.slice(0, +av) | |
}, | |
gt: function(aw, av, au) { | |
return au ? aw.slice(0, +av + 1) : aw.slice(+av + 1) | |
}, | |
eq: function(ax, aw, av) { | |
var au = ax.splice(+aw, 1); | |
return av ? ax : au | |
} | |
} | |
}; | |
W.setFilters.nth = W.setFilters.eq; | |
W.filters = W.pseudos; | |
if (!T) { | |
W.attrHandle = { | |
href: function(au) { | |
return au.getAttribute("href", 2) | |
}, | |
type: function(au) { | |
return au.getAttribute("type") | |
} | |
} | |
} | |
if (f) { | |
W.order.push("NAME"); | |
W.find.NAME = function(au, av) { | |
if (typeof av.getElementsByName !== M) { | |
return av.getElementsByName(au) | |
} | |
} | |
} | |
if (S) { | |
W.order.splice(1, 0, "CLASS"); | |
W.find.CLASS = function(aw, av, au) { | |
if (typeof av.getElementsByClassName !== M && !au) { | |
return av.getElementsByClassName(aw) | |
} | |
} | |
} | |
try { | |
z.call(p.childNodes, 0)[0].nodeType | |
} catch (aq) { | |
z = function(av) { | |
var aw, au = []; | |
for (; | |
(aw = this[av]); av++) { | |
au.push(aw) | |
} | |
return au | |
} | |
} | |
var A = ad.isXML = function(au) { | |
var av = au && (au.ownerDocument || au).documentElement; | |
return av ? av.nodeName !== "HTML" : false | |
}; | |
var Q = ad.contains = p.compareDocumentPosition ? function(av, au) { | |
return !!(av.compareDocumentPosition(au) & 16) | |
} : p.contains ? function(av, au) { | |
var ax = av.nodeType === 9 ? av.documentElement : av, | |
aw = au.parentNode; | |
return av === aw || !!(aw && aw.nodeType === 1 && ax.contains && ax.contains(aw)) | |
} : function(av, au) { | |
while ((au = au.parentNode)) { | |
if (au === av) { | |
return true | |
} | |
} | |
return false | |
}; | |
var d = ad.getText = function(ay) { | |
var ax, av = "", | |
aw = 0, | |
au = ay.nodeType; | |
if (au) { | |
if (au === 1 || au === 9 || au === 11) { | |
if (typeof ay.textContent === "string") { | |
return ay.textContent | |
} else { | |
for (ay = ay.firstChild; ay; ay = ay.nextSibling) { | |
av += d(ay) | |
} | |
} | |
} else { | |
if (au === 3 || au === 4) { | |
return ay.nodeValue | |
} | |
} | |
} else { | |
for (; | |
(ax = ay[aw]); aw++) { | |
av += d(ax) | |
} | |
} | |
return av | |
}; | |
ad.attr = function(ax, aw) { | |
var au, av = A(ax); | |
if (!av) { | |
aw = aw.toLowerCase() | |
} | |
if (W.attrHandle[aw]) { | |
return W.attrHandle[aw](ax) | |
} | |
if (D || av) { | |
return ax.getAttribute(aw) | |
} | |
au = ax.getAttributeNode(aw); | |
return au ? typeof ax[aw] === "boolean" ? ax[aw] ? aw : null : au.specified ? au.value : null : null | |
}; | |
ad.error = function(au) { | |
throw new Error("Syntax error, unrecognized expression: " + au) | |
}; | |
[0, 0].sort(function() { | |
return (n = 0) | |
}); | |
if (p.compareDocumentPosition) { | |
v = function(av, au) { | |
if (av === au) { | |
q = true; | |
return 0 | |
} | |
return (!av.compareDocumentPosition || !au.compareDocumentPosition ? av.compareDocumentPosition : av.compareDocumentPosition(au) & 4) ? -1 : 1 | |
} | |
} else { | |
v = function(aC, aB) { | |
if (aC === aB) { | |
q = true; | |
return 0 | |
} else { | |
if (aC.sourceIndex && aB.sourceIndex) { | |
return aC.sourceIndex - aB.sourceIndex | |
} | |
} | |
var az, av, aw = [], | |
au = [], | |
ay = aC.parentNode, | |
aA = aB.parentNode, | |
aD = ay; | |
if (ay === aA) { | |
return h(aC, aB) | |
} else { | |
if (!ay) { | |
return -1 | |
} else { | |
if (!aA) { | |
return 1 | |
} | |
} | |
} | |
while (aD) { | |
aw.unshift(aD); | |
aD = aD.parentNode | |
} | |
aD = aA; | |
while (aD) { | |
au.unshift(aD); | |
aD = aD.parentNode | |
} | |
az = aw.length; | |
av = au.length; | |
for (var ax = 0; ax < az && ax < av; ax++) { | |
if (aw[ax] !== au[ax]) { | |
return h(aw[ax], au[ax]) | |
} | |
} | |
return ax === az ? h(aC, au[ax], -1) : h(aw[ax], aB, 1) | |
}; | |
h = function(av, au, aw) { | |
if (av === au) { | |
return aw | |
} | |
var ax = av.nextSibling; | |
while (ax) { | |
if (ax === au) { | |
return -1 | |
} | |
ax = ax.nextSibling | |
} | |
return 1 | |
} | |
} | |
ad.uniqueSort = function(av) { | |
var aw, au = 1; | |
if (v) { | |
q = n; | |
av.sort(v); | |
if (q) { | |
for (; | |
(aw = av[au]); au++) { | |
if (aw === av[au - 1]) { | |
av.splice(au--, 1) | |
} | |
} | |
} | |
} | |
return av | |
}; | |
function C(av, az, ay, aw) { | |
var ax = 0, | |
au = az.length; | |
for (; ax < au; ax++) { | |
ad(av, az[ax], ay, aw) | |
} | |
} | |
function Y(au, aw, aA, aB, av, az) { | |
var ax, ay = W.setFilters[aw.toLowerCase()]; | |
if (!ay) { | |
ad.error(aw) | |
} | |
if (au || !(ax = av)) { | |
C(au || "*", aB, (ax = []), av) | |
} | |
return ax.length > 0 ? ay(ax, aA, az) : [] | |
} | |
function ag(aE, au, aC, aw, aI) { | |
var az, av, ay, aK, aB, aJ, aD, aH, aF = 0, | |
aG = aI.length, | |
ax = U.POS, | |
aA = new RegExp("^" + ax.source + "(?!" + P + ")", "i"), | |
aL = function() { | |
var aN = 1, | |
aM = arguments.length - 2; | |
for (; aN < aM; aN++) { | |
if (arguments[aN] === w) { | |
az[aN] = w | |
} | |
} | |
}; | |
for (; aF < aG; aF++) { | |
ax.exec(""); | |
aE = aI[aF]; | |
aK = []; | |
ay = 0; | |
aB = aw; | |
while ((az = ax.exec(aE))) { | |
aH = ax.lastIndex = az.index + az[0].length; | |
if (aH > ay) { | |
aD = aE.slice(ay, az.index); | |
ay = aH; | |
aJ = [au]; | |
if (V.test(aD)) { | |
if (aB) { | |
aJ = aB | |
} | |
aB = aw | |
} | |
if ((av = an.test(aD))) { | |
aD = aD.slice(0, -5).replace(V, "$&*") | |
} | |
if (az.length > 1) { | |
az[0].replace(aA, aL) | |
} | |
aB = Y(aD, az[1], az[2], aJ, aB, av) | |
} | |
} | |
if (aB) { | |
aK = aK.concat(aB); | |
if ((aD = aE.slice(ay)) && aD !== ")") { | |
C(aD, aK, aC, aw) | |
} else { | |
ai.apply(aC, aK) | |
} | |
} else { | |
ad(aE, au, aC, aw) | |
} | |
} | |
return aG === 1 ? aC : ad.uniqueSort(aC) | |
} | |
function g(aA, aw, aD) { | |
var aF, aE, aG, ay = [], | |
aB = 0, | |
aC = Z.exec(aA), | |
av = !aC.pop() && !aC.pop(), | |
aH = av && aA.match(J) || [""], | |
au = W.preFilter, | |
ax = W.filter, | |
az = !aD && aw !== m; | |
for (; | |
(aE = aH[aB]) != null && av; aB++) { | |
ay.push(aF = []); | |
if (az) { | |
aE = " " + aE | |
} | |
while (aE) { | |
av = false; | |
if ((aC = V.exec(aE))) { | |
aE = aE.slice(aC[0].length); | |
av = aF.push({ | |
part: aC.pop().replace(ak, " "), | |
captures: aC | |
}) | |
} | |
for (aG in ax) { | |
if ((aC = U[aG].exec(aE)) && (!au[aG] || (aC = au[aG](aC, aw, aD)))) { | |
aE = aE.slice(aC.shift().length); | |
av = aF.push({ | |
part: aG, | |
captures: aC | |
}) | |
} | |
} | |
if (!av) { | |
break | |
} | |
} | |
} | |
if (!av) { | |
ad.error(aA) | |
} | |
return ay | |
} | |
function N(ay, ax, aw) { | |
var au = ax.dir, | |
av = u++; | |
if (!ay) { | |
ay = function(az) { | |
return az === aw | |
} | |
} | |
return ax.first ? function(aA, az) { | |
while ((aA = aA[au])) { | |
if (aA.nodeType === 1) { | |
return ay(aA, az) && aA | |
} | |
} | |
} : function(aB, aA) { | |
var az, aC = av + "." + E, | |
aD = aC + "." + aj; | |
while ((aB = aB[au])) { | |
if (aB.nodeType === 1) { | |
if ((az = aB[am]) === aD) { | |
return false | |
} else { | |
if (typeof az === "string" && az.indexOf(aC) === 0) { | |
if (aB.sizset) { | |
return aB | |
} | |
} else { | |
aB[am] = aD; | |
if (ay(aB, aA)) { | |
aB.sizset = true; | |
return aB | |
} | |
aB.sizset = false | |
} | |
} | |
} | |
} | |
} | |
} | |
function L(au, av) { | |
return au ? function(ay, ax) { | |
var aw = av(ay, ax); | |
return aw && au(aw === true ? ay : aw, ax) | |
} : av | |
} | |
function O(az, ax, au) { | |
var aw, ay, av = 0; | |
for (; | |
(aw = az[av]); av++) { | |
if (W.relative[aw.part]) { | |
ay = N(ay, W.relative[aw.part], ax) | |
} else { | |
aw.captures.push(ax, au); | |
ay = L(ay, W.filter[aw.part].apply(null, aw.captures)) | |
} | |
} | |
return ay | |
} | |
function k(au) { | |
return function(ax, aw) { | |
var ay, av = 0; | |
for (; | |
(ay = au[av]); av++) { | |
if (ay(ax, aw)) { | |
return true | |
} | |
} | |
return false | |
} | |
} | |
var r = ad.compile = function(au, ax, av) { | |
var aA, az, aw, ay = B[au]; | |
if (ay && ay.context === ax) { | |
ay.dirruns++; | |
return ay | |
} | |
az = g(au, ax, av); | |
for (aw = 0; | |
(aA = az[aw]); aw++) { | |
az[aw] = O(aA, ax, av) | |
} | |
ay = B[au] = k(az); | |
ay.context = ax; | |
ay.runs = ay.dirruns = 0; | |
K.push(au); | |
if (K.length > W.cacheLength) { | |
delete B[K.shift()] | |
} | |
return ay | |
}; | |
ad.matches = function(av, au) { | |
return ad(av, null, null, au) | |
}; | |
ad.matchesSelector = function(au, av) { | |
return ad(av, null, null, [au]).length > 0 | |
}; | |
var al = function(ay, av, aA, aE, aD) { | |
ay = ay.replace(ak, "$1"); | |
var au, aF, aB, aG, aw, ax, aI, aJ, az, aC = ay.match(J), | |
aH = ay.match(ap), | |
aK = av.nodeType; | |
if (U.POS.test(ay)) { | |
return ag(ay, av, aA, aE, aC) | |
} | |
if (aE) { | |
au = z.call(aE, 0) | |
} else { | |
if (aC && aC.length === 1) { | |
if (aH.length > 1 && aK === 9 && !aD && (aC = U.ID.exec(aH[0]))) { | |
av = W.find.ID(aC[1], av, aD)[0]; | |
if (!av) { | |
return aA | |
} | |
ay = ay.slice(aH.shift().length) | |
} | |
aJ = ((aC = af.exec(aH[0])) && !aC.index && av.parentNode) || av; | |
az = aH.pop(); | |
ax = az.split(":not")[0]; | |
for (aB = 0, aG = W.order.length; aB < aG; aB++) { | |
aI = W.order[aB]; | |
if ((aC = U[aI].exec(ax))) { | |
au = W.find[aI]((aC[1] || "").replace(I, ""), aJ, aD); | |
if (au == null) { | |
continue | |
} | |
if (ax === az) { | |
ay = ay.slice(0, ay.length - az.length) + ax.replace(U[aI], ""); | |
if (!ay) { | |
ai.apply(aA, z.call(au, 0)) | |
} | |
} | |
break | |
} | |
} | |
} | |
} | |
if (ay) { | |
aF = r(ay, av, aD); | |
E = aF.dirruns; | |
if (au == null) { | |
au = W.find.TAG("*", (af.test(ay) && av.parentNode) || av) | |
} | |
for (aB = 0; | |
(aw = au[aB]); aB++) { | |
aj = aF.runs++; | |
if (aF(aw, av)) { | |
aA.push(aw) | |
} | |
} | |
} | |
return aA | |
}; | |
if (m.querySelectorAll) { | |
(function() { | |
var az, aA = al, | |
ay = /'|\\/g, | |
aw = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g, | |
av = [], | |
au = [":active"], | |
ax = p.matchesSelector || p.mozMatchesSelector || p.webkitMatchesSelector || p.oMatchesSelector || p.msMatchesSelector; | |
X(function(aB) { | |
aB.innerHTML = "<select><option selected></option></select>"; | |
if (!aB.querySelectorAll("[selected]").length) { | |
av.push("\\[" + P + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)") | |
} | |
if (!aB.querySelectorAll(":checked").length) { | |
av.push(":checked") | |
} | |
}); | |
X(function(aB) { | |
aB.innerHTML = "<p test=''></p>"; | |
if (aB.querySelectorAll("[test^='']").length) { | |
av.push("[*^$]=" + P + "*(?:\"\"|'')") | |
} | |
aB.innerHTML = "<input type='hidden'>"; | |
if (!aB.querySelectorAll(":enabled").length) { | |
av.push(":enabled", ":disabled") | |
} | |
}); | |
av = av.length && new RegExp(av.join("|")); | |
al = function(aG, aC, aH, aJ, aI) { | |
if (!aJ && !aI && (!av || !av.test(aG))) { | |
if (aC.nodeType === 9) { | |
try { | |
ai.apply(aH, z.call(aC.querySelectorAll(aG), 0)); | |
return aH | |
} catch (aF) {} | |
} else { | |
if (aC.nodeType === 1 && aC.nodeName.toLowerCase() !== "object") { | |
var aE = aC.getAttribute("id"), | |
aB = aE || am, | |
aD = af.test(aG) && aC.parentNode || aC; | |
if (aE) { | |
aB = aB.replace(ay, "\\$&") | |
} else { | |
aC.setAttribute("id", aB) | |
} | |
try { | |
ai.apply(aH, z.call(aD.querySelectorAll(aG.replace(J, "[id='" + aB + "'] $&")), 0)); | |
return aH | |
} catch (aF) {} finally { | |
if (!aE) { | |
aC.removeAttribute("id") | |
} | |
} | |
} | |
} | |
} | |
return aA(aG, aC, aH, aJ, aI) | |
}; | |
if (ax) { | |
X(function(aC) { | |
az = ax.call(aC, "div"); | |
try { | |
ax.call(aC, "[test!='']:sizzle"); | |
au.push(W.match.PSEUDO) | |
} catch (aB) {} | |
}); | |
au = new RegExp(au.join("|")); | |
ad.matchesSelector = function(aC, aE) { | |
aE = aE.replace(aw, "='$1']"); | |
if (!A(aC) && !au.test(aE) && (!av || !av.test(aE))) { | |
try { | |
var aB = ax.call(aC, aE); | |
if (aB || az || aC.document && aC.document.nodeType !== 11) { | |
return aB | |
} | |
} catch (aD) {} | |
} | |
return ad(aE, null, null, [aC]).length > 0 | |
} | |
} | |
})() | |
} | |
if (typeof c === "object" && c.exports) { | |
c.exports = ad | |
} else { | |
ae.Sizzle = ad | |
} | |
})(window) | |
}, {}], | |
192: [function(b, c, a) { | |
c.exports = { | |
DOMEmitter: b("./ac-dom-emitter/DOMEmitter") | |
} | |
}, { | |
"./ac-dom-emitter/DOMEmitter": 193 | |
}], | |
193: [function(c, b, d) { | |
var f; | |
var k = c("ac-event-emitter").EventEmitter, | |
g = c("ac-dom-events"), | |
a = c("ac-dom-traversal"); | |
var j = "dom-emitter"; | |
function h(l) { | |
if (l === null) { | |
return | |
} | |
this.el = l; | |
this._bindings = {}; | |
this._delegateFuncs = {}; | |
this._eventEmitter = new k() | |
} | |
f = h.prototype; | |
f._parseEventNames = function(l) { | |
if (!l) { | |
return [l] | |
} | |
return l.split(" ") | |
}; | |
f._onListenerEvent = function(m, l) { | |
this.trigger(m, l, false) | |
}; | |
f._setListener = function(l) { | |
this._bindings[l] = this._onListenerEvent.bind(this, l); | |
g.addEventListener(this.el, l, this._bindings[l]) | |
}; | |
f._removeListener = function(l) { | |
g.removeEventListener(this.el, l, this._bindings[l]); | |
this._bindings[l] = null | |
}; | |
f._triggerInternalEvent = function(l, m) { | |
this.trigger(j + ":" + l, m) | |
}; | |
f._normalizeArgumentsAndCall = function(l, n) { | |
var r = {}; | |
if (l.length === 0) { | |
n.call(this, r); | |
return | |
} | |
if (typeof l[0] === "string" || l[0] === null) { | |
l = this._cleanStringData(l); | |
r.events = l[0]; | |
if (typeof l[1] === "string") { | |
r.delegateQuery = l[1]; | |
r.callback = l[2]; | |
r.context = l[3] | |
} else { | |
r.callback = l[1]; | |
r.context = l[2] | |
} | |
n.call(this, r); | |
return | |
} | |
var m, p, q = ":", | |
o = l[0]; | |
for (m in o) { | |
if (o.hasOwnProperty(m)) { | |
r = {}; | |
p = this._cleanStringData(m.split(q)); | |
r.events = p[0]; | |
r.delegateQuery = p[1]; | |
r.callback = o[m]; | |
r.context = l[1]; | |
n.call(this, r) | |
} | |
} | |
}; | |
f._registerDelegateFunc = function(n, p, q, l, o) { | |
var m = this._delegateFunc.bind(this, n, p, q, o); | |
this._delegateFuncs[p] = this._delegateFuncs[p] || {}; | |
this._delegateFuncs[p][n] = this._delegateFuncs[p][n] || []; | |
this._delegateFuncs[p][n].push({ | |
func: l, | |
context: o, | |
delegateFunc: m | |
}); | |
return m | |
}; | |
f._cleanStringData = function(o) { | |
var n = false; | |
if (typeof o === "string") { | |
o = [o]; | |
n = true | |
} | |
var m = [], | |
q, s, r, p, l = o.length; | |
for (q = 0; q < l; q++) { | |
s = o[q]; | |
if (typeof s === "string") { | |
if (s === "" || s === " ") { | |
continue | |
} | |
r = s.length; | |
while (s[0] === " ") { | |
s = s.slice(1, r); | |
r-- | |
} | |
while (s[r - 1] === " ") { | |
s = s.slice(0, r - 1); | |
r-- | |
} | |
} | |
m.push(s) | |
} | |
if (n) { | |
return m[0] | |
} | |
return m | |
}; | |
f._unregisterDelegateFunc = function(n, q, l, p) { | |
if (!this._delegateFuncs[q] || !this._delegateFuncs[q][n]) { | |
return | |
} | |
var o = this._getDelegateFuncBindingIdx(n, q, l, p), | |
m; | |
if (o > -1) { | |
m = this._delegateFuncs[q][n][o].delegateFunc; | |
this._delegateFuncs[q][n].splice(o, 1); | |
if (this._delegateFuncs[q][n].length === 0) { | |
this._delegateFuncs[q][n] = null | |
} | |
} | |
return m | |
}; | |
f._unregisterDelegateFuncs = function(l, n) { | |
if (!this._delegateFuncs[n]) { | |
return | |
} | |
if (l !== null && !this._delegateFuncs[n][l]) { | |
return | |
} | |
if (l === null) { | |
var m; | |
for (m in this._delegateFuncs[n]) { | |
if (this._delegateFuncs[n].hasOwnProperty(m)) { | |
this._unbindDelegateFunc(m, n) | |
} | |
} | |
return | |
} | |
this._unbindDelegateFunc(l, n) | |
}; | |
f._unbindDelegateFunc = function(l, n) { | |
var o, p, m = 0; | |
while (this._delegateFuncs[n][l] && this._delegateFuncs[n][l][m]) { | |
o = this._delegateFuncs[n][l][m]; | |
p = this._delegateFuncs[n][l][m].length; | |
this._off({ | |
events: l, | |
delegateQuery: n, | |
callback: o.func, | |
context: o.context | |
}); | |
if (this._delegateFuncs[n][l] && p === this._delegateFuncs[n][l].length) { | |
m++ | |
} | |
} | |
o = p = null | |
}; | |
f._unregisterDelegateFuncsByEvent = function(l) { | |
var m; | |
for (m in this._delegateFuncs) { | |
if (this._delegateFuncs.hasOwnProperty(m)) { | |
this._unregisterDelegateFuncs(l, m) | |
} | |
} | |
}; | |
f._delegateFunc = function(l, p, r, n, q) { | |
if (a.matchesSelector(g.target(q), p)) { | |
var m = Array.prototype.slice.call(arguments, 0), | |
o = m.slice(4, m.length); | |
n = n || window; | |
if (typeof q.detail === "object") { | |
o[0] = q.detail | |
} | |
r.call(n, o) | |
} | |
}; | |
f.on = function() { | |
this._normalizeArgumentsAndCall(Array.prototype.slice.call(arguments, 0), this._on); | |
return this | |
}; | |
f.once = function() { | |
this._normalizeArgumentsAndCall(Array.prototype.slice.call(arguments, 0), this._once); | |
return this | |
}; | |
f.off = function() { | |
this._normalizeArgumentsAndCall(Array.prototype.slice.call(arguments, 0), this._off); | |
return this | |
}; | |
f._on = function(p) { | |
var m = p.events, | |
q = p.callback, | |
o = p.delegateQuery, | |
n = p.context, | |
l = p.unboundCallback || q; | |
m = this._parseEventNames(m); | |
m.forEach(function(v, r, t, u, s) { | |
if (!this.has(s)) { | |
this._setListener(s) | |
} | |
if (typeof u === "string") { | |
v = this._registerDelegateFunc(s, u, v, r, t) | |
} | |
this._triggerInternalEvent("willon", { | |
evt: s, | |
callback: v, | |
context: t, | |
delegateQuery: u | |
}); | |
this._eventEmitter.on(s, v, t); | |
this._triggerInternalEvent("didon", { | |
evt: s, | |
callback: v, | |
context: t, | |
delegateQuery: u | |
}) | |
}.bind(this, q, l, n, o)); | |
m = q = l = o = n = null | |
}; | |
f._off = function(q) { | |
var m = q.events, | |
r = q.callback, | |
p = q.delegateQuery, | |
o = q.context, | |
l = q.unboundCallback || r; | |
if (typeof m === "undefined") { | |
this._eventEmitter.off(); | |
var n; | |
for (n in this._bindings) { | |
if (this._bindings.hasOwnProperty(n)) { | |
this._removeListener(n) | |
} | |
} | |
for (n in this._delegateFuncs) { | |
if (this._delegateFuncs.hasOwnProperty(n)) { | |
this._delegateFuncs[n] = null | |
} | |
} | |
return | |
} | |
m = this._parseEventNames(m); | |
m.forEach(function(w, s, u, v, t) { | |
if (typeof v === "string" && typeof s === "function") { | |
w = this._unregisterDelegateFunc(t, v, s, u); | |
if (!w) { | |
return | |
} | |
} | |
if (typeof v === "string" && typeof w === "undefined") { | |
this._unregisterDelegateFuncs(t, v); | |
return | |
} | |
if (typeof t === "string" && typeof w === "undefined") { | |
this._unregisterDelegateFuncsByEvent(t); | |
if (typeof v === "string") { | |
return | |
} | |
} | |
this._triggerInternalEvent("willoff", { | |
evt: t, | |
callback: w, | |
context: u, | |
delegateQuery: v | |
}); | |
this._eventEmitter.off(t, w, u); | |
this._triggerInternalEvent("didoff", { | |
evt: t, | |
callback: w, | |
context: u, | |
delegateQuery: v | |
}); | |
if (!this.has(t)) { | |
this._removeListener(t) | |
} | |
}.bind(this, r, l, o, p)); | |
m = r = l = p = o = null | |
}; | |
f._once = function(o) { | |
var l = o.events, | |
p = o.callback, | |
n = o.delegateQuery, | |
m = o.context; | |
l = this._parseEventNames(l); | |
l.forEach(function(t, r, s, q) { | |
if (typeof s === "string") { | |
return this._handleDelegateOnce(q, t, r, s) | |
} | |
if (!this.has(q)) { | |
this._setListener(q) | |
} | |
this._triggerInternalEvent("willonce", { | |
evt: q, | |
callback: t, | |
context: r, | |
delegateQuery: s | |
}); | |
this._eventEmitter.once.call(this, q, t, r); | |
this._triggerInternalEvent("didonce", { | |
evt: q, | |
callback: t, | |
context: r, | |
delegateQuery: s | |
}) | |
}.bind(this, p, m, n)); | |
l = p = n = m = null | |
}; | |
f._handleDelegateOnce = function(l, o, m, n) { | |
this._triggerInternalEvent("willonce", { | |
evt: l, | |
callback: o, | |
context: m, | |
delegateQuery: n | |
}); | |
this._on({ | |
events: l, | |
context: m, | |
delegateQuery: n, | |
callback: this._getDelegateOnceCallback.bind(this, l, o, m, n), | |
unboundCallback: o | |
}); | |
this._triggerInternalEvent("didonce", { | |
evt: l, | |
callback: o, | |
context: m, | |
delegateQuery: n | |
}); | |
return this | |
}; | |
f._getDelegateOnceCallback = function(l, q, n, p) { | |
var m = Array.prototype.slice.call(arguments, 0), | |
o = m.slice(4, m.length); | |
q.apply(n, o); | |
this._off({ | |
events: l, | |
delegateQuery: p, | |
callback: q, | |
context: n | |
}) | |
}; | |
f._getDelegateFuncBindingIdx = function(s, p, n, l, t) { | |
var r = -1; | |
if (this._delegateFuncs[p] && this._delegateFuncs[p][s]) { | |
var o, m, q = this._delegateFuncs[p][s].length; | |
for (o = 0; o < q; o++) { | |
m = this._delegateFuncs[p][s][o]; | |
if (t && typeof n === "undefined") { | |
n = m.func | |
} | |
if (m.func === n && m.context === l) { | |
r = o; | |
break | |
} | |
} | |
} | |
return r | |
}; | |
f._triggerDelegateEvents = function(o, q, r) { | |
var n = a.querySelectorAll(q, this.el); | |
var p, s, l = n.length; | |
for (p = 0; p < l; p++) { | |
s = n[p]; | |
if (document.createEvent) { | |
s.dispatchEvent(new CustomEvent(o, { | |
bubbles: true, | |
cancelable: false, | |
detail: r | |
})) | |
} else { | |
var m = document.createEventObject(); | |
m.detail = r; | |
s.fireEvent("on" + o, m) | |
} | |
return s | |
} | |
}; | |
f.has = function(l, q, p, n) { | |
var o, r; | |
if (typeof q === "string") { | |
o = q; | |
r = p | |
} else { | |
r = q; | |
n = p | |
} | |
if (o) { | |
var m = this._getDelegateFuncBindingIdx(l, o, r, n, true); | |
if (m > -1) { | |
return true | |
} | |
return false | |
} | |
if (this._eventEmitter && this._eventEmitter.has.apply(this._eventEmitter, arguments)) { | |
return true | |
} | |
return false | |
}; | |
f.trigger = function(m, l, n, q) { | |
m = this._parseEventNames(m); | |
var o, p; | |
if (typeof l === "string") { | |
o = this._cleanStringData(l); | |
p = n | |
} else { | |
p = l; | |
q = n | |
} | |
m = this._cleanStringData(m); | |
m.forEach(function(s, t, u, r) { | |
if (s) { | |
this._triggerDelegateEvents(r, s, t); | |
return | |
} | |
this._eventEmitter.trigger(r, t, u) | |
}.bind(this, o, p, q)); | |
return this | |
}; | |
f.propagateTo = function(l, m) { | |
this._eventEmitter.propagateTo(l, m); | |
return this | |
}; | |
f.stopPropagatingTo = function(l) { | |
this._eventEmitter.stopPropagatingTo(l); | |
return this | |
}; | |
f.destroy = function() { | |
this._triggerInternalEvent("willdestroy"); | |
this.off(); | |
this.el = this._eventEmitter = this._bindings = this._delegateFuncs = null | |
}; | |
b.exports = h | |
}, { | |
"ac-dom-events": 172, | |
"ac-dom-traversal": 173, | |
"ac-event-emitter": 159 | |
}], | |
194: [function(b, c, a) { | |
c.exports = { | |
SharedInstance: b("./ac-shared-instance/SharedInstance") | |
} | |
}, { | |
"./ac-shared-instance/SharedInstance": 195 | |
}], | |
195: [function(d, h, c) { | |
var j = window, | |
g = "AC", | |
a = "SharedInstance", | |
f = j[g]; | |
var b = (function() { | |
var k = {}; | |
return { | |
get: function(m, l) { | |
var n = null; | |
if (k[m] && k[m][l]) { | |
n = k[m][l] | |
} | |
return n | |
}, | |
set: function(n, l, m) { | |
if (!k[n]) { | |
k[n] = {} | |
} | |
if (typeof m === "function") { | |
k[n][l] = new m() | |
} else { | |
k[n][l] = m | |
} | |
return k[n][l] | |
}, | |
share: function(n, l, m) { | |
var o = this.get(n, l); | |
if (!o) { | |
o = this.set(n, l, m) | |
} | |
return o | |
}, | |
remove: function(m, l) { | |
var n = typeof l; | |
if (n === "string" || n === "number") { | |
if (!k[m] || !k[m][l]) { | |
return | |
} | |
k[m][l] = null; | |
return | |
} | |
if (k[m]) { | |
k[m] = null | |
} | |
} | |
} | |
}()); | |
if (!f) { | |
f = j[g] = {} | |
} | |
if (!f[a]) { | |
f[a] = b | |
} | |
h.exports = f[a] | |
}, {}], | |
196: [function(b, c, a) { | |
c.exports = { | |
WindowDelegate: b("./ac-window-delegate/WindowDelegate"), | |
WindowDelegateOptimizer: b("./ac-window-delegate/WindowDelegateOptimizer"), | |
WindowDelegateCustomEvent: b("./ac-window-delegate/WindowDelegateCustomEvent") | |
} | |
}, { | |
"./ac-window-delegate/WindowDelegate": 199, | |
"./ac-window-delegate/WindowDelegateCustomEvent": 200, | |
"./ac-window-delegate/WindowDelegateOptimizer": 201 | |
}], | |
197: [function(b, c, a) { | |
var f = b("ac-event-emitter").EventEmitter; | |
var g = function() { | |
this._emitter = new f(); | |
this._customEvents = {} | |
}; | |
var d = g.prototype; | |
d.on = function(h, k, j) { | |
this._activateCustomEvents(h); | |
this._emitterOn.apply(this, arguments); | |
return this | |
}; | |
d.once = function(h, k, j) { | |
this._emitterOnce.apply(this, arguments); | |
return this | |
}; | |
d.off = function(h, k, j) { | |
this._emitterOff.apply(this, arguments); | |
this._deactivateCustomEvents(h); | |
return this | |
}; | |
d.has = function(h, k, j) { | |
return this._emitter.has.apply(this._emitter, arguments) | |
}; | |
d.trigger = function() { | |
this._emitter.trigger.apply(this._emitter, arguments); | |
return this | |
}; | |
d.propagateTo = function() { | |
this._emitter.propagateTo.apply(this._emitter, arguments); | |
return this | |
}; | |
d.stopPropagatingTo = function() { | |
this._emitter.stopPropagatingTo.apply(this._emitter, arguments); | |
return this | |
}; | |
d.add = function(h) { | |
this._customEvents[h.name] = h | |
}; | |
d.canHandleCustomEvent = function(h) { | |
return this._customEvents.hasOwnProperty(h) | |
}; | |
d.isHandlingCustomEvent = function(h) { | |
if (this._customEvents[h] && this._customEvents[h].active) { | |
return true | |
} | |
return false | |
}; | |
d._activateCustomEvents = function(l) { | |
var j = l.split(" "), | |
k, m, h = j.length; | |
for (m = 0; m < h; m++) { | |
k = j[m]; | |
if (this._customEvents[k] && !this._customEvents[k].active) { | |
this._customEvents[k].initialize(); | |
this._customEvents[k].active = true | |
} | |
} | |
}; | |
d._deactivateCustomEvents = function(k) { | |
var l; | |
if (!k || k.length === 0) { | |
for (l in this._customEvents) { | |
if (this._customEvents.hasOwnProperty(l)) { | |
this._deactivateCustomEvent(l) | |
} | |
} | |
return | |
} | |
var j = k.split(" "), | |
h = j.length; | |
for (l = 0; l < h; l++) { | |
this._deactivateCustomEvent(j[l]) | |
} | |
}; | |
d._deactivateCustomEvent = function(h) { | |
if (!this.has(h) && this._customEvents[h] && this._customEvents[h].active) { | |
this._customEvents[h].deinitialize(); | |
this._customEvents[h].active = false | |
} | |
}; | |
d._emitterOn = function() { | |
this._emitter.on.apply(this._emitter, arguments) | |
}; | |
d._emitterOnce = function() { | |
this._emitter.once.apply(this._emitter, arguments) | |
}; | |
d._emitterOff = function() { | |
this._emitter.off.apply(this._emitter, arguments) | |
}; | |
c.exports = g | |
}, { | |
"ac-event-emitter": 159 | |
}], | |
198: [function(b, c, a) { | |
var g = b("ac-event-emitter").EventEmitter; | |
var f; | |
var d = function(h) { | |
g.call(this); | |
this.optimizers = h; | |
this._events = {}; | |
this._properties = {}; | |
this._initialize() | |
}; | |
f = d.prototype = new g(null); | |
f.canOptimizeEvent = function(h) { | |
return this._events.hasOwnProperty(h) | |
}; | |
f.canOptimizeProperty = function(h) { | |
return this._properties.hasOwnProperty(h) | |
}; | |
f.isOptimizingEvent = function(h) { | |
if (this._events[h] && this._events[h].active) { | |
return true | |
} | |
return false | |
}; | |
f.isOptimizingProperty = function(h) { | |
if (this._properties[h] && this._properties[h].active) { | |
return true | |
} | |
return false | |
}; | |
f.add = function(h) { | |
this._setOptimizerEvents(h); | |
this._setOptimizerProperties(h); | |
h.on("update", this._onUpdate, this); | |
h.on("activate", this._onActivate, this); | |
h.on("deactivate", this._onDeactivate, this) | |
}; | |
f.get = function(h) { | |
if (this.isOptimizingProperty(h)) { | |
return this._properties[h].value | |
} | |
return null | |
}; | |
f.set = function(j, h) { | |
if (!this._properties[j]) { | |
return false | |
} | |
this._properties[j].value = h; | |
return this | |
}; | |
f.getOptimizerByEvent = function(h) { | |
if (this._events[h]) { | |
return this._events[h] | |
} | |
return null | |
}; | |
f._initialize = function() { | |
var j, h; | |
for (j in this.optimizers) { | |
if (this.optimizers.hasOwnProperty(j)) { | |
this.add(this.optimizers[j]) | |
} | |
} | |
}; | |
f._onUpdate = function(h) { | |
this.set(h.prop, h.val) | |
}; | |
f._onActivate = function(j) { | |
var k = j.propertyNames, | |
l, h = k.length; | |
for (l = 0; l < h; l++) { | |
this._properties[k[l]].active = true | |
} | |
}; | |
f._onDeactivate = function(j) { | |
var k = j.propertyNames, | |
l, h = k.length; | |
for (l = 0; l < h; l++) { | |
this._properties[k[l]].active = false | |
} | |
}; | |
f._setOptimizerEvents = function(j) { | |
var l, k = j.eventNames, | |
h = k.length; | |
for (l = 0; l < h; l++) { | |
this._setOptimizerEvent(k[l], j) | |
} | |
}; | |
f._setOptimizerEvent = function(j, h) { | |
if (this._events[j]) { | |
return | |
} | |
this._events[j] = h | |
}; | |
f._setOptimizerProperties = function(k) { | |
var l, j = k.propertyNames, | |
h = j.length; | |
for (l = 0; l < h; l++) { | |
this._setOptimizerProperty(j[l]) | |
} | |
}; | |
f._setOptimizerProperty = function(h) { | |
if (this._properties.hasOwnProperty(h)) { | |
return | |
} | |
this._properties[h] = {}; | |
this._properties[h].active = false; | |
this._properties[h].value = null | |
}; | |
c.exports = d | |
}, { | |
"ac-event-emitter": 159 | |
}], | |
199: [function(d, b, g) { | |
var j; | |
var c = d("ac-shared-instance").SharedInstance, | |
m = d("ac-dom-emitter").DOMEmitter, | |
k = d("./OptimizerController"), | |
f = d("./CustomEventController"), | |
h = d("./queries/queries"), | |
n = d("./optimizers/optimizers"); | |
var l = "ac-window-delegate:WindowDelegate", | |
a = "2.0.1"; | |
function o() { | |
this._emitter = new m(window); | |
this._controllers = { | |
optimizer: new k(n), | |
customEvent: new f() | |
}; | |
var p; | |
for (p in h) { | |
if (h.hasOwnProperty(p)) { | |
this[p] = this._getProperty.bind(this, p); | |
h[p] = h[p].bind(this) | |
} | |
} | |
this._bindEvents() | |
} | |
j = o.prototype; | |
j.on = function(p, s, q) { | |
var r = this._seperateCustomEvents(p); | |
this._optimizeEvents(r.standardEvents); | |
this._customEventOn(r.customEvents, s, q); | |
this._emitterOn.apply(this, arguments); | |
return this | |
}; | |
j.once = function(p, s, q) { | |
var r = this._seperateCustomEvents(p); | |
this._optimizeEvents(r.standardEvents); | |
this._customEventOnce(r.customEvents, s, q); | |
this._emitterOnce.apply(this, arguments); | |
return this | |
}; | |
j.off = function(q, v, r) { | |
var u = this._seperateCustomEvents(q), | |
s = false; | |
if (!q) { | |
s = true | |
} | |
this._customEventOff(u.customEvents, v, r, s); | |
this._emitterOff.apply(this, arguments); | |
if (s) { | |
try { | |
var p; | |
for (p in this._controllers.optimizer._events) { | |
if (this._controllers.optimizer._events.hasOwnProperty(p) && this._shouldDeoptimizeEvent(p, true)) { | |
this._deoptimizeEvent(p) | |
} | |
} | |
this._bindEvents() | |
} catch (t) {} | |
} | |
return this | |
}; | |
j.has = function(p, r, q) { | |
return this._emitter.has.apply(this._emitter, arguments) | |
}; | |
j.trigger = function() { | |
this._emitter.trigger.apply(this._emitter, arguments); | |
return this | |
}; | |
j.propagateTo = function() { | |
this._emitter.propagateTo.apply(this._emitter, arguments); | |
return this | |
}; | |
j.stopPropagatingTo = function() { | |
this._emitter.stopPropagatingTo.apply(this._emitter, arguments); | |
return this | |
}; | |
j.addOptimizer = function(p) { | |
this._controllers.optimizer.add(p); | |
return this | |
}; | |
j.addCustomEvent = function(p) { | |
this._controllers.customEvent.add(p); | |
return this | |
}; | |
j._emitterOn = function() { | |
this._emitter.on.apply(this._emitter, arguments) | |
}; | |
j._emitterOnce = function() { | |
this._emitter.once.apply(this._emitter, arguments) | |
}; | |
j._emitterOff = function() { | |
this._emitter.off.apply(this._emitter, arguments) | |
}; | |
j._onEventUnbound = function(q) { | |
var p = q.evt; | |
if (this._shouldDeoptimizeEvent(p)) { | |
this._deoptimizeEvent(p) | |
} | |
}; | |
j._customEventOn = function(p, r, q) { | |
if (p.length === 0) { | |
return | |
} | |
this._controllers.customEvent.on(p.join(" "), r, q) | |
}; | |
j._customEventOnce = function(p, r, q) { | |
if (p.length === 0) { | |
return | |
} | |
this._controllers.customEvent.once(p.join(" "), r, q) | |
}; | |
j._customEventOff = function(p, s, q, r) { | |
if (!r && p.length === 0) { | |
return | |
} | |
if (r && p.length === 0) { | |
this._controllers.customEvent.off(); | |
return | |
} | |
this._controllers.customEvent.off(p.join(" "), s, q) | |
}; | |
j._getProperty = function(r, p) { | |
var q = null; | |
if (!p) { | |
q = this._getOptimizedValue(r) | |
} | |
if (q === null) { | |
q = h[r].call(this, p) | |
} | |
return q | |
}; | |
j._optimizeEvents = function(r) { | |
var q, s, p = r.length; | |
for (s = 0; s < p; s++) { | |
q = r[s]; | |
if (this._shouldOptimizeEvent(q)) { | |
this._optimizeEvent(q) | |
} | |
} | |
}; | |
j._shouldOptimizeEvent = function(p) { | |
if (this._controllers.optimizer.canOptimizeEvent(p) && !this._controllers.optimizer.isOptimizingEvent(p)) { | |
return true | |
} | |
return false | |
}; | |
j._shouldDeoptimizeEvent = function(p, q) { | |
if (this._controllers.optimizer.isOptimizingEvent(p) && (q || this._emitter._eventEmitter._events[p].length <= 1)) { | |
return true | |
} | |
return false | |
}; | |
j._optimizeEvent = function(q) { | |
var p = this._controllers.optimizer.getOptimizerByEvent(q); | |
p.activate(); | |
this._emitterOn(q, p.callback, p) | |
}; | |
j._deoptimizeEvent = function(q) { | |
var p = this._controllers.optimizer.getOptimizerByEvent(q); | |
p.deactivate(); | |
this._emitterOff(q, p.callback, p) | |
}; | |
j._getOptimizedValue = function(p) { | |
return this._controllers.optimizer.get(p) | |
}; | |
j._seperateCustomEvents = function(t) { | |
var q = { | |
customEvents: [], | |
standardEvents: [] | |
}; | |
if (typeof t === "string") { | |
var u = t.split(" "), | |
r, s, p = u.length; | |
for (s = 0; s < p; s++) { | |
r = u[s]; | |
if (this._controllers.customEvent.canHandleCustomEvent(r)) { | |
q.customEvents.push(r) | |
} else { | |
q.standardEvents.push(r) | |
} | |
} | |
} | |
return q | |
}; | |
j._bindEvents = function() { | |
this._emitter.on("dom-emitter:didoff", this._onEventUnbound, this) | |
}; | |
b.exports = c.share(l, a, o) | |
}, { | |
"./CustomEventController": 197, | |
"./OptimizerController": 198, | |
"./optimizers/optimizers": 204, | |
"./queries/queries": 213, | |
"ac-dom-emitter": 192, | |
"ac-shared-instance": 194 | |
}], | |
200: [function(c, d, a) { | |
var g = c("ac-event-emitter").EventEmitter; | |
function b(h, k, j) { | |
g.call(this); | |
this.name = h; | |
this.active = false; | |
this._initializeFunc = k; | |
this._deinitializeFunc = j | |
} | |
var f = b.prototype = new g(null); | |
f.initialize = function() { | |
if (this._initializeFunc) { | |
this._initializeFunc() | |
} | |
return this | |
}; | |
f.deinitialize = function() { | |
if (this._deinitializeFunc) { | |
this._deinitializeFunc() | |
} | |
return this | |
}; | |
d.exports = b | |
}, { | |
"ac-event-emitter": 159 | |
}], | |
201: [function(c, d, b) { | |
var g = c("ac-event-emitter").EventEmitter; | |
function a(h, j) { | |
g.call(this); | |
this.active = false; | |
this.eventNames = h.eventNames; | |
this.propertyNames = h.propertyNames; | |
this.options = h.options || {}; | |
this.callback = j | |
} | |
var f = a.prototype = new g(null); | |
f.update = function(j, h) { | |
this.trigger("update", { | |
prop: j, | |
val: h | |
}) | |
}; | |
f.activate = function() { | |
this.active = true; | |
this.trigger("activate", this) | |
}; | |
f.deactivate = function() { | |
this.active = false; | |
this.trigger("deactivate", this) | |
}; | |
d.exports = a | |
}, { | |
"ac-event-emitter": 159 | |
}], | |
202: [function(f, g, b) { | |
var a = f("../../WindowDelegateOptimizer"), | |
d = f("../../queries/queries"); | |
var c = { | |
eventNames: ["resize"], | |
propertyNames: ["clientWidth", "clientHeight", "innerWidth", "innerHeight"] | |
}; | |
var h = new a(c, function(m) { | |
var l, k = c.propertyNames, | |
j = k.length; | |
for (l = 0; l < j; l++) { | |
this.update(k[l], d[k[l]](true)) | |
} | |
}); | |
g.exports = h | |
}, { | |
"../../WindowDelegateOptimizer": 201, | |
"../../queries/queries": 213 | |
}], | |
203: [function(g, h, b) { | |
var a = g("../../WindowDelegateOptimizer"), | |
f = g("../../queries/queries"); | |
var d = { | |
eventNames: ["scroll"], | |
propertyNames: ["scrollX", "scrollY", "maxScrollX", "maxScrollY"] | |
}; | |
var c = new a(d, function(m) { | |
var l, k = d.propertyNames, | |
j = k.length; | |
for (l = 0; l < j; l++) { | |
this.update(k[l], f[k[l]](true)) | |
} | |
}); | |
h.exports = c | |
}, { | |
"../../WindowDelegateOptimizer": 201, | |
"../../queries/queries": 213 | |
}], | |
204: [function(d, f, b) { | |
var c = d("./events/resize"), | |
a = d("./events/scroll"); | |
f.exports = [c, a] | |
}, { | |
"./events/resize": 202, | |
"./events/scroll": 203 | |
}], | |
205: [function(b, c, a) { | |
var d = function(f) { | |
return document.documentElement.clientHeight | |
}; | |
c.exports = d | |
}, {}], | |
206: [function(b, c, a) { | |
var d = function(f) { | |
return document.documentElement.clientWidth | |
}; | |
c.exports = d | |
}, {}], | |
207: [function(b, d, a) { | |
var c = function(f) { | |
return window.innerHeight || this.clientHeight(f) | |
}; | |
d.exports = c | |
}, {}], | |
208: [function(b, c, a) { | |
var d = function(f) { | |
return window.innerWidth || this.clientWidth(f) | |
}; | |
c.exports = d | |
}, {}], | |
209: [function(c, d, a) { | |
var b = function(f) { | |
return document.body.scrollWidth - this.innerWidth() | |
}; | |
d.exports = b | |
}, {}], | |
210: [function(c, d, b) { | |
var a = function(f) { | |
return document.body.scrollHeight - this.innerHeight() | |
}; | |
d.exports = a | |
}, {}], | |
211: [function(b, c, a) { | |
var d = function(f) { | |
var h = window.pageXOffset; | |
if (!h) { | |
var g = document.documentElement || document.body.parentNode || document.body; | |
h = g.scrollLeft | |
} | |
return h | |
}; | |
c.exports = d | |
}, {}], | |
212: [function(b, c, a) { | |
var d = function(f) { | |
var h = window.pageYOffset; | |
if (!h) { | |
var g = document.documentElement || document.body.parentNode || document.body; | |
h = g.scrollTop | |
} | |
return h | |
}; | |
c.exports = d | |
}, {}], | |
213: [function(j, g, l) { | |
var b = j("./methods/innerWidth"), | |
k = j("./methods/innerHeight"), | |
d = j("./methods/clientWidth"), | |
m = j("./methods/clientHeight"), | |
c = j("./methods/scrollX"), | |
a = j("./methods/scrollY"), | |
h = j("./methods/maxScrollX"), | |
f = j("./methods/maxScrollY"); | |
g.exports = { | |
innerWidth: b, | |
innerHeight: k, | |
clientWidth: d, | |
clientHeight: m, | |
scrollX: c, | |
scrollY: a, | |
maxScrollX: h, | |
maxScrollY: f | |
} | |
}, { | |
"./methods/clientHeight": 205, | |
"./methods/clientWidth": 206, | |
"./methods/innerHeight": 207, | |
"./methods/innerWidth": 208, | |
"./methods/maxScrollX": 209, | |
"./methods/maxScrollY": 210, | |
"./methods/scrollX": 211, | |
"./methods/scrollY": 212 | |
}], | |
214: [function(b, c, a) { | |
var d = b("./ac-element-tracker/ElementTracker"); | |
c.exports = new d(); | |
c.exports.ElementTracker = d | |
}, { | |
"./ac-element-tracker/ElementTracker": 215 | |
}], | |
215: [function(d, c, h) { | |
var j; | |
var g = d("ac-object"); | |
var l = d("ac-dom-nodes"); | |
var a = d("ac-dom-metrics"); | |
var m = d("ac-array"); | |
var o = d("ac-window-delegate").WindowDelegate; | |
var k = d("./TrackedElement"); | |
var p = d("ac-event-emitter").EventEmitter; | |
var f = { | |
autoStart: false | |
}; | |
function b(r, q) { | |
this.options = g.clone(f); | |
this.options = typeof q === "object" ? g.extend(this.options, q) : this.options; | |
this.windowDelegate = o; | |
this.tracking = false; | |
this.elements = []; | |
if (r && (Array.isArray(r) || l.isNodeList(r) || l.isElement(r))) { | |
this.addElements(r) | |
} | |
if (this.options.autoStart) { | |
this.start() | |
} | |
} | |
j = b.prototype = g.create(p.prototype); | |
var n = /^\[object (HTMLCollection|NodeList|Object)\]$/; | |
j._registerElements = function(q) { | |
q = [].concat(q); | |
q.forEach(function(s) { | |
if (this._elementInDOM(s)) { | |
var r = new k(s); | |
r.offsetTop = r.element.offsetTop; | |
this.elements.push(r) | |
} | |
}, this) | |
}; | |
j._registerTrackedElements = function(q) { | |
var r = [].concat(q); | |
r.forEach(function(s) { | |
if (this._elementInDOM(s.element)) { | |
s.offsetTop = s.element.offsetTop; | |
this.elements.push(s) | |
} | |
}, this) | |
}; | |
j._elementInDOM = function(s) { | |
var r = false; | |
var q = document.getElementsByTagName("body")[0]; | |
if (l.isElement(s) && q.contains(s)) { | |
r = true | |
} | |
return r | |
}; | |
j._onVPChange = function() { | |
this.elements.forEach(function(q) { | |
this.refreshElementState(q) | |
}, this) | |
}; | |
j._elementPercentInView = function(q) { | |
return q.pixelsInView / q.height | |
}; | |
j._elementPixelsInView = function(r) { | |
var u = 0; | |
var t = r.top; | |
var s = r.bottom; | |
var q = this.windowDelegate.innerHeight(); | |
if (t <= 0 && s >= q) { | |
u = q | |
} else { | |
if (t >= 0 && t < q && s > q) { | |
u = q - t | |
} else { | |
if (t < 0 && (s < q && s >= 0)) { | |
u = r.bottom | |
} else { | |
if (t >= 0 && s <= q) { | |
u = r.height | |
} | |
} | |
} | |
} | |
return u | |
}; | |
j._ifInView = function(q, r) { | |
if (!r) { | |
q.trigger("enterview", q) | |
} | |
}; | |
j._ifAlreadyInView = function(q) { | |
if (!q.inView) { | |
q.trigger("exitview", q) | |
} | |
}; | |
j.addElements = function(q) { | |
q = l.isNodeList(q) ? m.toArray(q) : [].concat(q); | |
q.forEach(function(r) { | |
this.addElement(r) | |
}, this) | |
}; | |
j.addElement = function(r) { | |
var q; | |
if (l.isElement(r)) { | |
q = new k(r); | |
this._registerTrackedElements(q) | |
} | |
return q | |
}; | |
j.removeElement = function(s) { | |
var r = []; | |
var q; | |
this.elements.forEach(function(t, u) { | |
if (t === s || t.element === s) { | |
r.push(u) | |
} | |
}); | |
q = this.elements.filter(function(u, t) { | |
return r.indexOf(t) < 0 ? true : false | |
}); | |
this.elements = q | |
}; | |
j.stop = function() { | |
if (this.tracking === true) { | |
this.tracking = false; | |
this.windowDelegate.off("scroll resize orientationchange", this._onVPChange) | |
} | |
}; | |
j.start = function() { | |
if (this.tracking === false) { | |
this.tracking = true; | |
this.windowDelegate.on("scroll resize orientationchange", this._onVPChange, this); | |
this.refreshAllElementStates() | |
} | |
}; | |
j.refreshAllElementStates = function() { | |
this.elements.forEach(function(q) { | |
this.refreshElementState(q) | |
}, this) | |
}; | |
j.refreshElementState = function(q) { | |
var r = a.getBoundingBox(q.element); | |
var s = q.inView; | |
q = g.extend(q, r); | |
q.pixelsInView = this._elementPixelsInView(q); | |
q.percentInView = this._elementPercentInView(q); | |
q.inView = q.pixelsInView > 0; | |
if (q.inView) { | |
this._ifInView(q, s) | |
} | |
if (s) { | |
this._ifAlreadyInView(q) | |
} | |
return q | |
}; | |
c.exports = b | |
}, { | |
"./TrackedElement": 216, | |
"ac-array": 147, | |
"ac-dom-metrics": 157, | |
"ac-dom-nodes": 74, | |
"ac-event-emitter": 159, | |
"ac-object": 162, | |
"ac-window-delegate": 196 | |
}], | |
216: [function(d, f, c) { | |
var g; | |
var j = d("ac-dom-emitter").DOMEmitter; | |
var a = d("ac-dom-nodes"); | |
var b = d("ac-object"); | |
function h(k) { | |
if (a.isElement(k)) { | |
this.element = k | |
} else { | |
throw new TypeError("TrackedElement: " + k + " is not a valid DOM element") | |
} | |
this.inView = false; | |
this.percentInView = 0; | |
this.pixelsInView = 0; | |
this.offsetTop = 0; | |
this.top = 0; | |
this.right = 0; | |
this.bottom = 0; | |
this.left = 0; | |
this.width = 0; | |
this.height = 0; | |
j.call(this, k) | |
} | |
g = h.prototype = b.create(j.prototype); | |
f.exports = h | |
}, { | |
"ac-dom-emitter": 35, | |
"ac-dom-nodes": 74, | |
"ac-object": 162 | |
}], | |
217: [function(b, c, a) { | |
c.exports = { | |
EventEmitterMicro: b("./ac-event-emitter-micro/EventEmitterMicro") | |
} | |
}, { | |
"./ac-event-emitter-micro/EventEmitterMicro": 218 | |
}], | |
218: [function(b, c, a) { | |
function f() { | |
this._events = {} | |
} | |
var d = f.prototype; | |
d.on = function(g, h) { | |
this._events[g] = this._events[g] || []; | |
this._events[g].unshift(h) | |
}; | |
d.once = function(g, k) { | |
var j = this; | |
function h(l) { | |
j.off(g, h); | |
if (l !== undefined) { | |
k(l) | |
} else { | |
k() | |
} | |
} | |
this.on(g, h) | |
}; | |
d.off = function(g, j) { | |
if (g in this._events === false) { | |
return | |
} | |
var h = this._events[g].indexOf(j); | |
if (h === -1) { | |
return | |
} | |
this._events[g].splice(h, 1) | |
}; | |
d.trigger = function(g, j) { | |
if (g in this._events === false) { | |
return | |
} | |
for (var h = this._events[g].length - 1; h >= 0; h--) { | |
if (j !== undefined) { | |
this._events[g][h](j) | |
} else { | |
this._events[g][h]() | |
} | |
} | |
}; | |
d.destroy = function() { | |
for (var g in this._events) { | |
this._events[g] = null | |
} | |
this._events = null | |
}; | |
c.exports = f | |
}, {}], | |
219: [function(b, c, a) { | |
c.exports = { | |
EventEmitter: b("./ac-event-emitter/EventEmitter") | |
} | |
}, { | |
"./ac-event-emitter/EventEmitter": 220 | |
}], | |
220: [function(d, c, f) { | |
var h = "EventEmitter:propagation"; | |
var m = function(n) { | |
if (n) { | |
this.context = n | |
} | |
}; | |
var g = m.prototype; | |
var j = function() { | |
if (!this.hasOwnProperty("_events") && typeof this._events !== "object") { | |
this._events = {} | |
} | |
return this._events | |
}; | |
var k = function(n) { | |
if (typeof Array.isArray === "function") { | |
return Array.isArray(n) | |
} | |
return Object.prototype.toString.call(n) === "[object Array]" | |
}; | |
var a = function(o, s) { | |
var r = o[0]; | |
var u = o[1]; | |
var q = o[2]; | |
var n; | |
var t; | |
var p; | |
if ((typeof r !== "string" && typeof r !== "object") || r === null || k(r)) { | |
throw new TypeError("Expecting event name to be a string or object.") | |
} | |
if ((typeof r === "string") && !u) { | |
throw new Error("Expecting a callback function to be provided.") | |
} | |
if (u && (typeof u !== "function")) { | |
if (typeof r === "object" && typeof u === "object") { | |
q = u | |
} else { | |
throw new TypeError("Expecting callback to be a function.") | |
} | |
} | |
s.call(this, r, u, q) | |
}; | |
var l = function(r, s, p) { | |
var n; | |
var o; | |
var q; | |
n = j.call(this)[r]; | |
if (!n || n.length === 0) { | |
return | |
} | |
n = n.slice(); | |
this._stoppedImmediatePropagation = false; | |
for (o = 0, q = n.length; o < q; o += 1) { | |
if (this._stoppedImmediatePropagation || s.call(p, n[o], o)) { | |
break | |
} | |
} | |
}; | |
var b = function(o, p, q) { | |
var n = -1; | |
l.call(this, p, function(s, r) { | |
if (s.callback === q) { | |
n = r; | |
return true | |
} | |
}); | |
if (n === -1) { | |
return | |
} | |
o[p].splice(n, 1) | |
}; | |
g.on = function() { | |
var n = j.call(this); | |
a.call(this, arguments, function(p, q, o) { | |
n[p] = n[p] || (n[p] = []); | |
n[p].push({ | |
callback: q, | |
context: o | |
}) | |
}); | |
return this | |
}; | |
g.once = function() { | |
a.call(this, arguments, function(o, q, n) { | |
var p = function(r) { | |
q.call(n || this, r); | |
this.off(o, p) | |
}; | |
this.on(o, p, this) | |
}); | |
return this | |
}; | |
g.off = function(s, t) { | |
var q = j.call(this); | |
var n; | |
var p; | |
var r; | |
var o; | |
if (arguments.length === 0) { | |
this._events = {} | |
} else { | |
if (!s || (typeof s !== "string" && typeof s !== "object") || Array.isArray(s)) { | |
throw new TypeError("Expecting event name to be a string or object.") | |
} | |
} | |
if (typeof s === "object") { | |
for (n in s) { | |
if (s.hasOwnProperty(n)) { | |
b.call(this, q, n, s[n]) | |
} | |
} | |
} | |
if (typeof s === "string") { | |
p = s.split(" "); | |
if (p.length === 1) { | |
if (t) { | |
b.call(this, q, s, t) | |
} else { | |
q[s] = [] | |
} | |
} else { | |
for (o = 0, r = p.length; o < r; o += 1) { | |
q[p[o]] = [] | |
} | |
} | |
} | |
return this | |
}; | |
g.trigger = function(s, t, o) { | |
var p; | |
var r; | |
var n; | |
var q; | |
if (!s) { | |
throw new Error("trigger method requires an event name") | |
} | |
if (typeof s !== "string") { | |
throw new TypeError("Expecting event names to be a string.") | |
} | |
if (o && typeof o !== "boolean") { | |
throw new TypeError("Expecting doNotPropagate to be a boolean.") | |
} | |
s = s.split(" "); | |
for (q = 0, r = s.length; q < r; q += 1) { | |
n = s[q]; | |
l.call(this, n, function(u) { | |
u.callback.call(u.context || this.context || this, t) | |
}, this); | |
if (!o) { | |
p = n; | |
l.call(this, h, function(u) { | |
if (u.prefix) { | |
p = u.prefix + p | |
} | |
u.emitter.trigger(p, t) | |
}) | |
} | |
} | |
return this | |
}; | |
g.propagateTo = function(o, p) { | |
var n = j.call(this); | |
if (!n[h]) { | |
this._events[h] = [] | |
} | |
n[h].push({ | |
emitter: o, | |
prefix: p | |
}) | |
}; | |
g.stopPropagatingTo = function(q) { | |
var o = j.call(this); | |
if (!q) { | |
o[h] = []; | |
return | |
} | |
var r = o[h]; | |
var p = r.length; | |
var n; | |
for (n = 0; n < p; n += 1) { | |
if (r[n].emitter === q) { | |
r.splice(n, 1); | |
break | |
} | |
} | |
}; | |
g.stopImmediatePropagation = function() { | |
this._stoppedImmediatePropagation = true | |
}; | |
g.has = function(u, v, n) { | |
var w = j.call(this); | |
var r = w[u]; | |
var s; | |
var q; | |
var o; | |
var p; | |
var t; | |
if (arguments.length === 0) { | |
p = []; | |
for (t in w) { | |
if (w.hasOwnProperty(t)) { | |
p.push(t) | |
} | |
} | |
return p | |
} | |
if (!r) { | |
return false | |
} | |
if (!v) { | |
return (r.length > 0) ? true : false | |
} | |
for (q = 0, o = r.length; q < o; q += 1) { | |
s = r[q]; | |
if ((n && v && s.context === n && s.callback === v) || (v && !n && s.callback === v)) { | |
return true | |
} | |
} | |
return false | |
}; | |
c.exports = m | |
}, {}], | |
221: [function(b, c, a) { | |
var g = b("./helpers/globals"); | |
var f = b("ac-function/once"); | |
var d = function() { | |
var h = g.getDocument(); | |
var j = h.createElement("canvas"); | |
return !!(typeof j.getContext === "function" && j.getContext("2d")) | |
}; | |
c.exports = f(d); | |
c.exports.original = d | |
}, { | |
"./helpers/globals": 229, | |
"ac-function/once": 243 | |
}], | |
222: [function(c, d, b) { | |
var h = c("ac-browser"); | |
var a = c("./touchAvailable").original; | |
var f = c("ac-function/once"); | |
function g() { | |
return (!a() || (h.os === "iOS" && h.version >= 8) || h.name === "Chrome") | |
} | |
d.exports = f(g); | |
d.exports.original = g | |
}, { | |
"./touchAvailable": 258, | |
"ac-browser": 238, | |
"ac-function/once": 243 | |
}], | |
223: [function(c, d, b) { | |
var g = c("./helpers/globals"); | |
var f = c("ac-function/once"); | |
function a() { | |
var l = false; | |
var h = g.getDocument(); | |
var k = g.getNavigator(); | |
try { | |
if ("cookie" in h && !!k.cookieEnabled) { | |
h.cookie = "ac_feature_cookie=1"; | |
l = (h.cookie.indexOf("ac_feature_cookie") !== -1); | |
h.cookie = "ac_feature_cookie=; expires=Thu, 01 Jan 1970 00:00:01 GMT;" | |
} | |
} catch (j) {} | |
return l | |
} | |
d.exports = f(a); | |
d.exports.original = a | |
}, { | |
"./helpers/globals": 229, | |
"ac-function/once": 243 | |
}], | |
224: [function(c, d, b) { | |
var g = c("ac-prefixer/getStyleValue"); | |
var f = c("ac-function/once"); | |
function a() { | |
var h = ["linear-gradient(to bottom right, #9f9, white)", "linear-gradient(top left, #9f9, white)", "gradient(linear, left top, right bottom, from(#9f9), to(white))"]; | |
return h.some(function(j) { | |
return !!g("background-image", j) | |
}) | |
} | |
d.exports = f(a); | |
d.exports.original = a | |
}, { | |
"ac-function/once": 243, | |
"ac-prefixer/getStyleValue": 246 | |
}], | |
225: [function(c, d, b) { | |
var g = c("ac-prefixer/getStyleValue"); | |
var f = c("ac-prefixer/getStyleProperty"); | |
var h = c("ac-function/memoize"); | |
function a(k, j) { | |
if (typeof j !== "undefined") { | |
return !!g(k, j) | |
} else { | |
return !!f(k) | |
} | |
} | |
d.exports = h(a); | |
d.exports.original = a | |
}, { | |
"ac-function/memoize": 242, | |
"ac-prefixer/getStyleProperty": 245, | |
"ac-prefixer/getStyleValue": 246 | |
}], | |
226: [function(b, c, a) { | |
var f = b("ac-prefixer/getStyleValue"); | |
var d = b("ac-function/once"); | |
function g() { | |
return !!f("margin", "1vw 1vh") | |
} | |
c.exports = d(g); | |
c.exports.original = g | |
}, { | |
"ac-function/once": 243, | |
"ac-prefixer/getStyleValue": 246 | |
}], | |
227: [function(b, d, a) { | |
var f = b("./helpers/globals"); | |
var g = b("ac-function/memoize"); | |
function c(h, k) { | |
var j = f.getDocument(); | |
var l; | |
k = k || "div"; | |
l = j.createElement(k); | |
return (h in l) | |
} | |
d.exports = g(c); | |
d.exports.original = c | |
}, { | |
"./helpers/globals": 229, | |
"ac-function/memoize": 242 | |
}], | |
228: [function(c, f, b) { | |
var a = c("ac-prefixer/getEventType"); | |
var g = c("ac-function/memoize"); | |
function d(j, h) { | |
return !!a(j, h) | |
} | |
f.exports = g(d); | |
f.exports.original = d | |
}, { | |
"ac-function/memoize": 242, | |
"ac-prefixer/getEventType": 244 | |
}], | |
229: [function(b, c, a) { | |
c.exports = { | |
getWindow: function() { | |
return window | |
}, | |
getDocument: function() { | |
return document | |
}, | |
getNavigator: function() { | |
return navigator | |
} | |
} | |
}, {}], | |
230: [function(b, c, a) { | |
c.exports = { | |
canvasAvailable: b("./canvasAvailable"), | |
continuousScrollEventsAvailable: b("./continuousScrollEventsAvailable"), | |
cookiesAvailable: b("./cookiesAvailable"), | |
cssLinearGradientAvailable: b("./cssLinearGradientAvailable"), | |
cssPropertyAvailable: b("./cssPropertyAvailable"), | |
cssViewportUnitsAvailable: b("./cssViewportUnitsAvailable"), | |
elementAttributeAvailable: b("./elementAttributeAvailable"), | |
eventTypeAvailable: b("./eventTypeAvailable"), | |
isDesktop: b("./isDesktop"), | |
isHandheld: b("./isHandheld"), | |
isRetina: b("./isRetina"), | |
isTablet: b("./isTablet"), | |
localStorageAvailable: b("./localStorageAvailable"), | |
mediaElementsAvailable: b("./mediaElementsAvailable"), | |
mediaQueriesAvailable: b("./mediaQueriesAvailable"), | |
sessionStorageAvailable: b("./sessionStorageAvailable"), | |
svgAvailable: b("./svgAvailable"), | |
threeDTransformsAvailable: b("./threeDTransformsAvailable"), | |
touchAvailable: b("./touchAvailable"), | |
webGLAvailable: b("./webGLAvailable") | |
} | |
}, { | |
"./canvasAvailable": 221, | |
"./continuousScrollEventsAvailable": 222, | |
"./cookiesAvailable": 223, | |
"./cssLinearGradientAvailable": 224, | |
"./cssPropertyAvailable": 225, | |
"./cssViewportUnitsAvailable": 226, | |
"./elementAttributeAvailable": 227, | |
"./eventTypeAvailable": 228, | |
"./isDesktop": 231, | |
"./isHandheld": 232, | |
"./isRetina": 233, | |
"./isTablet": 234, | |
"./localStorageAvailable": 235, | |
"./mediaElementsAvailable": 236, | |
"./mediaQueriesAvailable": 237, | |
"./sessionStorageAvailable": 255, | |
"./svgAvailable": 256, | |
"./threeDTransformsAvailable": 257, | |
"./touchAvailable": 258, | |
"./webGLAvailable": 259 | |
}], | |
231: [function(d, f, b) { | |
var a = d("./touchAvailable").original; | |
var h = d("./helpers/globals"); | |
var g = d("ac-function/once"); | |
function c() { | |
var j = h.getWindow(); | |
return (!a() && !j.orientation) | |
} | |
f.exports = g(c); | |
f.exports.original = c | |
}, { | |
"./helpers/globals": 229, | |
"./touchAvailable": 258, | |
"ac-function/once": 243 | |
}], | |
232: [function(f, g, c) { | |
var d = f("./isDesktop").original; | |
var a = f("./isTablet").original; | |
var h = f("ac-function/once"); | |
function b() { | |
return (!d() && !a()) | |
} | |
g.exports = h(b); | |
g.exports.original = b | |
}, { | |
"./isDesktop": 231, | |
"./isTablet": 234, | |
"ac-function/once": 243 | |
}], | |
233: [function(b, c, a) { | |
var d = b("./helpers/globals"); | |
c.exports = function f() { | |
var g = d.getWindow(); | |
return ("devicePixelRatio" in g && g.devicePixelRatio >= 1.5) | |
} | |
}, { | |
"./helpers/globals": 229 | |
}], | |
234: [function(f, g, c) { | |
var d = f("./isDesktop").original; | |
var j = f("./helpers/globals"); | |
var h = f("ac-function/once"); | |
var b = 600; | |
function a() { | |
var l = j.getWindow(); | |
var k = l.screen.width; | |
if (l.orientation && l.screen.height < k) { | |
k = l.screen.height | |
} | |
return (!d() && k >= b) | |
} | |
g.exports = h(a); | |
g.exports.original = a | |
}, { | |
"./helpers/globals": 229, | |
"./isDesktop": 231, | |
"ac-function/once": 243 | |
}], | |
235: [function(c, d, a) { | |
var g = c("./helpers/globals"); | |
var f = c("ac-function/once"); | |
function b() { | |
var k = g.getWindow(); | |
var j = false; | |
try { | |
j = !!(k.localStorage && k.localStorage.non_existent !== null) | |
} catch (h) {} | |
return j | |
} | |
d.exports = f(b); | |
d.exports.original = b | |
}, { | |
"./helpers/globals": 229, | |
"ac-function/once": 243 | |
}], | |
236: [function(b, c, a) { | |
var g = b("./helpers/globals"); | |
var d = b("ac-function/once"); | |
function f() { | |
var h = g.getWindow(); | |
return ("HTMLMediaElement" in h) | |
} | |
c.exports = d(f); | |
c.exports.original = f | |
}, { | |
"./helpers/globals": 229, | |
"ac-function/once": 243 | |
}], | |
237: [function(c, d, b) { | |
c("ac-polyfills/matchMedia"); | |
var g = c("./helpers/globals"); | |
var f = c("ac-function/once"); | |
function a() { | |
var j = g.getWindow(); | |
var h = j.matchMedia("only all"); | |
return !!(h && h.matches) | |
} | |
d.exports = f(a); | |
d.exports.original = a | |
}, { | |
"./helpers/globals": 229, | |
"ac-function/once": 243, | |
"ac-polyfills/matchMedia": 395 | |
}], | |
238: [function(b, c, a) { | |
arguments[4][1][0].apply(a, arguments) | |
}, { | |
"./ac-browser/BrowserData": 239, | |
"./ac-browser/IE": 240, | |
dup: 1 | |
}], | |
239: [function(b, c, a) { | |
var d = b("./data"); | |
function f() {} | |
f.prototype = { | |
__getBrowserVersion: function(h, j) { | |
var g; | |
if (!h || !j) { | |
return | |
} | |
var k = d.browser.filter(function(l) { | |
return l.identity === j | |
}); | |
k.some(function(n) { | |
var l = n.versionSearch || j; | |
var m = h.indexOf(l); | |
if (m > -1) { | |
g = parseFloat(h.substring(m + l.length + 1)); | |
return true | |
} | |
}); | |
return g | |
}, | |
__getName: function(g) { | |
return this.__getIdentityStringFromArray(g) | |
}, | |
__getIdentity: function(g) { | |
if (g.string) { | |
return this.__matchSubString(g) | |
} else { | |
if (g.prop) { | |
return g.identity | |
} | |
} | |
}, | |
__getIdentityStringFromArray: function(g) { | |
for (var k = 0, h = g.length, j; k < h; k++) { | |
j = this.__getIdentity(g[k]); | |
if (j) { | |
return j | |
} | |
} | |
}, | |
__getOS: function(g) { | |
return this.__getIdentityStringFromArray(g) | |
}, | |
__getOSVersion: function(j, m) { | |
if (!j || !m) { | |
return | |
} | |
var l = d.os.filter(function(n) { | |
return n.identity === m | |
})[0]; | |
var g = l.versionSearch || m; | |
var k = new RegExp(g + " ([\\d_\\.]+)", "i"); | |
var h = j.match(k); | |
if (h !== null) { | |
return h[1].replace(/_/g, ".") | |
} | |
}, | |
__matchSubString: function(h) { | |
var g = h.subString; | |
if (g) { | |
var j = g.test ? !!g.test(h.string) : h.string.indexOf(g) > -1; | |
if (j) { | |
return h.identity | |
} | |
} | |
} | |
}; | |
f.create = function() { | |
var g = new f(); | |
var h = {}; | |
h.name = g.__getName(d.browser); | |
h.version = g.__getBrowserVersion(d.versionString, h.name); | |
h.os = g.__getOS(d.os); | |
h.osVersion = g.__getOSVersion(d.versionString, h.os); | |
return h | |
}; | |
c.exports = f | |
}, { | |
"./data": 241 | |
}], | |
240: [function(b, c, a) { | |
arguments[4][3][0].apply(a, arguments) | |
}, { | |
dup: 3 | |
}], | |
241: [function(b, c, a) { | |
c.exports = { | |
browser: [{ | |
string: window.navigator.userAgent, | |
subString: "Chrome", | |
identity: "Chrome" | |
}, { | |
string: window.navigator.userAgent, | |
subString: /silk/i, | |
identity: "Silk" | |
}, { | |
string: window.navigator.userAgent, | |
subString: "OmniWeb", | |
versionSearch: "OmniWeb/", | |
identity: "OmniWeb" | |
}, { | |
string: window.navigator.userAgent, | |
subString: /mobile\/[^\s]*\ssafari\//i, | |
identity: "Safari Mobile", | |
versionSearch: "Version" | |
}, { | |
string: window.navigator.vendor, | |
subString: "Apple", | |
identity: "Safari", | |
versionSearch: "Version" | |
}, { | |
prop: window.opera, | |
identity: "Opera", | |
versionSearch: "Version" | |
}, { | |
string: window.navigator.vendor, | |
subString: "iCab", | |
identity: "iCab" | |
}, { | |
string: window.navigator.vendor, | |
subString: "KDE", | |
identity: "Konqueror" | |
}, { | |
string: window.navigator.userAgent, | |
subString: "Firefox", | |
identity: "Firefox" | |
}, { | |
string: window.navigator.vendor, | |
subString: "Camino", | |
identity: "Camino" | |
}, { | |
string: window.navigator.userAgent, | |
subString: "Netscape", | |
identity: "Netscape" | |
}, { | |
string: window.navigator.userAgent, | |
subString: "MSIE", | |
identity: "IE", | |
versionSearch: "MSIE" | |
}, { | |
string: window.navigator.userAgent, | |
subString: "Trident", | |
identity: "IE", | |
versionSearch: "rv" | |
}, { | |
string: window.navigator.userAgent, | |
subString: "Gecko", | |
identity: "Mozilla", | |
versionSearch: "rv" | |
}, { | |
string: window.navigator.userAgent, | |
subString: "Mozilla", | |
identity: "Netscape", | |
versionSearch: "Mozilla" | |
}], | |
os: [{ | |
string: window.navigator.platform, | |
subString: "Win", | |
identity: "Windows", | |
versionSearch: "Windows NT" | |
}, { | |
string: window.navigator.platform, | |
subString: "Mac", | |
identity: "OS X" | |
}, { | |
string: window.navigator.userAgent, | |
subString: "iPhone", | |
identity: "iOS", | |
versionSearch: "iPhone OS" | |
}, { | |
string: window.navigator.userAgent, | |
subString: "iPad", | |
identity: "iOS", | |
versionSearch: "CPU OS" | |
}, { | |
string: window.navigator.userAgent, | |
subString: /android/i, | |
identity: "Android" | |
}, { | |
string: window.navigator.platform, | |
subString: "Linux", | |
identity: "Linux" | |
}], | |
versionString: window.navigator.userAgent || window.navigator.appVersion || undefined | |
} | |
}, {}], | |
242: [function(c, d, b) { | |
var a = function() { | |
var h = ""; | |
var g; | |
for (g = 0; g < arguments.length; g++) { | |
if (g > 0) { | |
h += "," | |
} | |
h += arguments[g] | |
} | |
return h | |
}; | |
d.exports = function f(j, h) { | |
h = h || a; | |
var g = function() { | |
var k = arguments; | |
var l = h.apply(this, k); | |
if (!(l in g.cache)) { | |
g.cache[l] = j.apply(this, k) | |
} | |
return g.cache[l] | |
}; | |
g.cache = {}; | |
return g | |
} | |
}, {}], | |
243: [function(b, c, a) { | |
c.exports = function d(g) { | |
var f; | |
return function() { | |
if (typeof f === "undefined") { | |
f = g.apply(this, arguments) | |
} | |
return f | |
} | |
} | |
}, {}], | |
244: [function(b, c, a) { | |
arguments[4][40][0].apply(a, arguments) | |
}, { | |
"./shared/camelCasedEventTypes": 247, | |
"./shared/prefixHelper": 249, | |
"./utils/eventTypeAvailable": 252, | |
dup: 40 | |
}], | |
245: [function(b, c, a) { | |
arguments[4][96][0].apply(a, arguments) | |
}, { | |
"./shared/getStyleTestElement": 248, | |
"./shared/prefixHelper": 249, | |
"./shared/stylePropertyCache": 250, | |
"./utils/toCSS": 253, | |
"./utils/toDOM": 254, | |
dup: 96 | |
}], | |
246: [function(b, c, a) { | |
arguments[4][97][0].apply(a, arguments) | |
}, { | |
"./getStyleProperty": 245, | |
"./shared/prefixHelper": 249, | |
"./shared/stylePropertyCache": 250, | |
"./shared/styleValueAvailable": 251, | |
dup: 97 | |
}], | |
247: [function(b, c, a) { | |
arguments[4][41][0].apply(a, arguments) | |
}, { | |
dup: 41 | |
}], | |
248: [function(b, c, a) { | |
arguments[4][98][0].apply(a, arguments) | |
}, { | |
dup: 98 | |
}], | |
249: [function(b, c, a) { | |
arguments[4][42][0].apply(a, arguments) | |
}, { | |
dup: 42 | |
}], | |
250: [function(b, c, a) { | |
arguments[4][100][0].apply(a, arguments) | |
}, { | |
dup: 100 | |
}], | |
251: [function(b, c, a) { | |
arguments[4][101][0].apply(a, arguments) | |
}, { | |
"./getStyleTestElement": 248, | |
"./stylePropertyCache": 250, | |
dup: 101 | |
}], | |
252: [function(b, c, a) { | |
arguments[4][43][0].apply(a, arguments) | |
}, { | |
dup: 43 | |
}], | |
253: [function(b, c, a) { | |
arguments[4][103][0].apply(a, arguments) | |
}, { | |
dup: 103 | |
}], | |
254: [function(b, c, a) { | |
arguments[4][104][0].apply(a, arguments) | |
}, { | |
dup: 104 | |
}], | |
255: [function(c, d, b) { | |
var g = c("./helpers/globals"); | |
var f = c("ac-function/once"); | |
function a() { | |
var k = g.getWindow(); | |
var h = false; | |
try { | |
if ("sessionStorage" in k && typeof k.sessionStorage.setItem === "function") { | |
k.sessionStorage.setItem("ac_feature", "test"); | |
h = true; | |
k.sessionStorage.removeItem("ac_feature", "test") | |
} | |
} catch (j) {} | |
return h | |
} | |
d.exports = f(a); | |
d.exports.original = a | |
}, { | |
"./helpers/globals": 229, | |
"ac-function/once": 243 | |
}], | |
256: [function(c, d, b) { | |
var g = c("./helpers/globals"); | |
var f = c("ac-function/once"); | |
function a() { | |
var h = g.getDocument(); | |
return !!h.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image", "1.1") | |
} | |
d.exports = f(a); | |
d.exports.original = a | |
}, { | |
"./helpers/globals": 229, | |
"ac-function/once": 243 | |
}], | |
257: [function(b, c, a) { | |
var g = b("ac-prefixer/getStyleValue"); | |
var d = b("ac-function/once"); | |
function f() { | |
return !!(g("perspective", "1px") && g("transform", "translateZ(0)")) | |
} | |
c.exports = d(f); | |
c.exports.original = f | |
}, { | |
"ac-function/once": 243, | |
"ac-prefixer/getStyleValue": 246 | |
}], | |
258: [function(c, d, b) { | |
var g = c("./helpers/globals"); | |
var f = c("ac-function/once"); | |
function a() { | |
var k = g.getWindow(); | |
var h = g.getDocument(); | |
var j = g.getNavigator(); | |
return !!(("ontouchstart" in k) || (k.DocumentTouch && h instanceof k.DocumentTouch) || (j.maxTouchPoints > 0) || (j.msMaxTouchPoints > 0)) | |
} | |
d.exports = f(a); | |
d.exports.original = a | |
}, { | |
"./helpers/globals": 229, | |
"ac-function/once": 243 | |
}], | |
259: [function(c, d, b) { | |
var g = c("./helpers/globals"); | |
var f = c("ac-function/once"); | |
function a() { | |
var h = g.getDocument(); | |
var j = h.createElement("canvas"); | |
if (typeof j.getContext === "function") { | |
return !!(j.getContext("webgl") || j.getContext("experimental-webgl")) | |
} | |
return false | |
} | |
d.exports = f(a); | |
d.exports.original = a | |
}, { | |
"./helpers/globals": 229, | |
"ac-function/once": 243 | |
}], | |
260: [function(b, c, a) { | |
arguments[4][15][0].apply(a, arguments) | |
}, { | |
"./ac-clock/Clock": 261, | |
"./ac-clock/ThrottledClock": 262, | |
"./ac-clock/sharedClockInstance": 263, | |
dup: 15 | |
}], | |
261: [function(b, c, a) { | |
arguments[4][16][0].apply(a, arguments) | |
}, { | |
"ac-event-emitter": 264, | |
dup: 16 | |
}], | |
262: [function(b, c, a) { | |
arguments[4][17][0].apply(a, arguments) | |
}, { | |
"./sharedClockInstance": 263, | |
"ac-event-emitter": 264, | |
dup: 17 | |
}], | |
263: [function(b, c, a) { | |
arguments[4][18][0].apply(a, arguments) | |
}, { | |
"./Clock": 261, | |
dup: 18 | |
}], | |
264: [function(b, c, a) { | |
arguments[4][19][0].apply(a, arguments) | |
}, { | |
"./ac-event-emitter/EventEmitter": 265, | |
dup: 19 | |
}], | |
265: [function(b, c, a) { | |
arguments[4][20][0].apply(a, arguments) | |
}, { | |
dup: 20 | |
}], | |
266: [function(c, d, b) { | |
function a(f, h) { | |
var g; | |
return function() { | |
var k = arguments; | |
var l = this; | |
var j = function() { | |
g = null; | |
f.apply(l, k) | |
}; | |
clearTimeout(g); | |
g = setTimeout(j, h) | |
} | |
} | |
d.exports = a | |
}, {}], | |
267: [function(d, f, b) { | |
var c = d("ac-dom-events/preventDefault"); | |
var a = d("ac-dom-events/stopPropagation"); | |
function h(k) { | |
if (k.touches && k.touches.length === 0) { | |
return false | |
} | |
if (typeof k.pageX !== "number") { | |
return false | |
} | |
return true | |
} | |
function g(k) { | |
this.originalEvent = k; | |
if (h(k)) { | |
this.pageX = k.touches ? k.touches[0].pageX : this.originalEvent.pageX; | |
this.pageY = k.touches ? k.touches[0].pageY : this.originalEvent.pageY | |
} | |
} | |
var j = g.prototype; | |
j.preventDefault = function() { | |
c(this.originalEvent) | |
}; | |
j.stopPropagation = function() { | |
a(this.originalEvent) | |
}; | |
f.exports = g | |
}, { | |
"ac-dom-events/preventDefault": 44, | |
"ac-dom-events/stopPropagation": 48 | |
}], | |
268: [function(d, b, h) { | |
var m = d("ac-event-emitter").EventEmitter; | |
var f = d("ac-dom-events/addEventListener"); | |
var c = d("ac-dom-events/removeEventListener"); | |
var g = d("./PointerEvent"); | |
var l = d("ac-object/create"); | |
var k = d("./util/inputs"); | |
function a(o, n) { | |
this.options = n || {}; | |
this.element = o; | |
this._listeners = []; | |
if (n.mouse === true) { | |
this._listeners.push(k.MOUSE) | |
} | |
if (n.touch === true) { | |
this._listeners.push(k.TOUCH) | |
} | |
this._boundMove = this._move.bind(this); | |
this._boundEnd = this._end.bind(this); | |
this._boundCancel = this._cancel.bind(this); | |
this._boundStart = this._start.bind(this); | |
this._hasFiredStart = false; | |
this._startEvent = null | |
} | |
var j = a.prototype = l(m.prototype); | |
j._start = function(o) { | |
for (var n = 0; n < this._listeners.length; n += 1) { | |
f(this.element, this._listeners[n].MOVE_EVENT, this._boundMove); | |
f(this.element, this._listeners[n].END_EVENT, this._boundEnd); | |
f(this.element, this._listeners[n].CANCEL_EVENT, this._boundCancel) | |
} | |
this._startEvent = new g(o) | |
}; | |
j._move = function(n) { | |
if (this._hasFiredStart === false) { | |
this._hasFiredStart = true; | |
this.trigger("start", this._startEvent) | |
} | |
this.trigger("move", new g(n)) | |
}; | |
j._end = function(n) { | |
this._removeAllListeners(); | |
this.trigger("end", new g(n)); | |
this._hasFiredStart = false; | |
this._startEvent = null | |
}; | |
j._cancel = function(n) { | |
this._removeAllListeners(); | |
this.trigger("cancel", new g(n)); | |
this._hasFiredStart = false; | |
this._startEvent = null | |
}; | |
j._removeAllListeners = function() { | |
for (var n = 0; n < this._listeners.length; n += 1) { | |
c(this.element, this._listeners[n].MOVE_EVENT, this._boundMove); | |
c(this.element, this._listeners[n].END_EVENT, this._boundEnd); | |
c(this.element, this._listeners[n].CANCEL_EVENT, this._boundCancel) | |
} | |
}; | |
j.activate = function() { | |
for (var n = 0; n < this._listeners.length; n += 1) { | |
f(this.element, this._listeners[n].START_EVENT, this._boundStart) | |
} | |
}; | |
j.destroy = function() { | |
this._boundStart = null; | |
this._boundEnd = null; | |
this._boundCancel = null | |
}; | |
a.create = function(o, n) { | |
return new a(o, n) | |
}; | |
b.exports = a | |
}, { | |
"./PointerEvent": 267, | |
"./util/inputs": 269, | |
"ac-dom-events/addEventListener": 37, | |
"ac-dom-events/removeEventListener": 45, | |
"ac-event-emitter": 264, | |
"ac-object/create": 376 | |
}], | |
269: [function(c, d, b) { | |
var a = { | |
MOUSE: { | |
START_EVENT: "mousedown", | |
MOVE_EVENT: "mousemove", | |
END_EVENT: "mouseup", | |
CANCEL_EVENT: "mouseleave" | |
}, | |
TOUCH: { | |
START_EVENT: "touchstart", | |
MOVE_EVENT: "touchmove", | |
END_EVENT: "touchend", | |
CANCEL_EVENT: "touchcancel" | |
} | |
}; | |
d.exports = a | |
}, {}], | |
270: [function(b, c, a) { | |
arguments[4][147][0].apply(a, arguments) | |
}, { | |
"./ac-array/flatten": 271, | |
"./ac-array/intersection": 272, | |
"./ac-array/toArray": 273, | |
"./ac-array/union": 274, | |
"./ac-array/unique": 275, | |
"./ac-array/without": 276, | |
dup: 147 | |
}], | |
271: [function(b, c, a) { | |
arguments[4][148][0].apply(a, arguments) | |
}, { | |
dup: 148 | |
}], | |
272: [function(b, c, a) { | |
arguments[4][149][0].apply(a, arguments) | |
}, { | |
dup: 149 | |
}], | |
273: [function(b, c, a) { | |
arguments[4][150][0].apply(a, arguments) | |
}, { | |
dup: 150 | |
}], | |
274: [function(b, c, a) { | |
arguments[4][151][0].apply(a, arguments) | |
}, { | |
"./flatten": 271, | |
"./unique": 275, | |
dup: 151 | |
}], | |
275: [function(b, c, a) { | |
arguments[4][152][0].apply(a, arguments) | |
}, { | |
dup: 152 | |
}], | |
276: [function(b, c, a) { | |
arguments[4][153][0].apply(a, arguments) | |
}, { | |
dup: 153 | |
}], | |
277: [function(b, c, a) { | |
arguments[4][194][0].apply(a, arguments) | |
}, { | |
"./ac-shared-instance/SharedInstance": 278, | |
dup: 194 | |
}], | |
278: [function(b, c, a) { | |
arguments[4][195][0].apply(a, arguments) | |
}, { | |
dup: 195 | |
}], | |
279: [function(b, c, a) { | |
c.exports = { | |
CID: b("./ac-mvc-cid/CID") | |
} | |
}, { | |
"./ac-mvc-cid/CID": 280 | |
}], | |
280: [function(c, f, b) { | |
var a = c("ac-shared-instance").SharedInstance; | |
var g = "ac-mvc-cid:CID", | |
d = "1.0.0"; | |
function j() { | |
this._idCount = 0 | |
} | |
var h = j.prototype; | |
h._cidPrefix = "cid"; | |
h.getNewCID = function() { | |
var k = this._cidPrefix + "-" + this._idCount; | |
this._idCount++; | |
return k | |
}; | |
f.exports = a.share(g, d, j) | |
}, { | |
"ac-shared-instance": 277 | |
}], | |
281: [function(b, c, a) { | |
arguments[4][134][0].apply(a, arguments) | |
}, { | |
dup: 134 | |
}], | |
282: [function(b, c, a) { | |
arguments[4][135][0].apply(a, arguments) | |
}, { | |
"./ac-object/clone": 283, | |
"./ac-object/create": 284, | |
"./ac-object/defaults": 285, | |
"./ac-object/extend": 286, | |
"./ac-object/getPrototypeOf": 287, | |
"./ac-object/isDate": 288, | |
"./ac-object/isEmpty": 289, | |
"./ac-object/isRegExp": 290, | |
"./ac-object/toQueryParameters": 291, | |
dup: 135 | |
}], | |
283: [function(b, c, a) { | |
arguments[4][136][0].apply(a, arguments) | |
}, { | |
"./extend": 286, | |
dup: 136 | |
}], | |
284: [function(b, c, a) { | |
arguments[4][137][0].apply(a, arguments) | |
}, { | |
dup: 137 | |
}], | |
285: [function(b, c, a) { | |
arguments[4][138][0].apply(a, arguments) | |
}, { | |
"./extend": 286, | |
dup: 138 | |
}], | |
286: [function(b, c, a) { | |
arguments[4][139][0].apply(a, arguments) | |
}, { | |
dup: 139 | |
}], | |
287: [function(b, c, a) { | |
arguments[4][140][0].apply(a, arguments) | |
}, { | |
dup: 140 | |
}], | |
288: [function(b, c, a) { | |
arguments[4][141][0].apply(a, arguments) | |
}, { | |
dup: 141 | |
}], | |
289: [function(b, c, a) { | |
arguments[4][142][0].apply(a, arguments) | |
}, { | |
dup: 142 | |
}], | |
290: [function(b, c, a) { | |
arguments[4][143][0].apply(a, arguments) | |
}, { | |
dup: 143 | |
}], | |
291: [function(b, c, a) { | |
arguments[4][144][0].apply(a, arguments) | |
}, { | |
dup: 144, | |
qs: 281 | |
}], | |
292: [function(b, c, a) { | |
c.exports = { | |
Collection: b("./ac-mvc-collection/Collection") | |
} | |
}, { | |
"./ac-mvc-collection/Collection": 293 | |
}], | |
293: [function(d, b, k) { | |
var g = d("ac-object"), | |
n = d("ac-array"), | |
c = d("ac-mvc-cid").CID, | |
o = d("ac-event-emitter").EventEmitter; | |
var j = ["every", "filter", "forEach", "map", "reduce", "reduceRight", "some", "slice", "sort", "reverse", "indexOf", "lastIndexOf"]; | |
var m = ["intersection", "union", "unique", "without"]; | |
var a = { | |
add: "add", | |
remove: "remove", | |
set: "set", | |
reset: "reset", | |
empty: "empty", | |
destroy: "destroy" | |
}; | |
function f(s, p, q, r) { | |
if (typeof s[p] !== "undefined") { | |
return | |
} | |
s[p] = (function(t, u) { | |
return function() { | |
var w = n.toArray(arguments), | |
v = u.concat(w); | |
return t.apply(this, v) | |
} | |
}(q, r)) | |
} | |
function h(p) { | |
o.call(this); | |
this.options = g.defaults(this.defaultOptions, p || {}); | |
this.models = []; | |
this.cid = c.getNewCID(); | |
if (this.options.ModelType) { | |
this.ModelType = this.options.ModelType | |
} | |
if (this.ModelType) { | |
this._modelsObject = {} | |
} | |
this.on(a.add, this._addToModelsObject, this); | |
this.on(a.remove, this._removeFromModelsObject, this); | |
if (this.options.models) { | |
this.add(this.options.models) | |
} | |
} | |
var l = h.prototype = g.create(o.prototype); | |
l.defaultOptions = {}; | |
l.count = function() { | |
if (!this.models) { | |
return null | |
} | |
return this.models.length | |
}; | |
l.add = function(q, p) { | |
p = p || {}; | |
if (typeof q === "undefined") { | |
q = [] | |
} | |
q = this._returnAsArray(q); | |
q = this._createModels(q); | |
if (this.models.length === 0) { | |
this.models = q | |
} else { | |
this.models = this.models.concat(q) | |
} | |
this._trigger(a.add, { | |
models: q | |
}, p); | |
return this | |
}; | |
l.remove = function(u, s) { | |
s = s || {}; | |
if (!u) { | |
return [] | |
} | |
u = this._returnAsArray(u); | |
var r = [], | |
t, q, p = u.length; | |
for (t = 0; t < p; t++) { | |
q = this.indexOf(u[t]); | |
if (q > -1) { | |
r.push(u[t]); | |
this.spliceWithOptions([q, 1], { | |
silent: true | |
}) | |
} | |
} | |
if (r.length > 0) { | |
this._trigger(a.remove, { | |
models: r | |
}, s) | |
} | |
return r | |
}; | |
l.reset = function(q, p) { | |
p = p || {}; | |
this.empty(p); | |
this.add(q, p); | |
this._trigger(a.reset, { | |
models: this.models | |
}, p); | |
return this | |
}; | |
l.empty = function(q) { | |
q = q || {}; | |
var p = this.slice(0); | |
this.models = []; | |
if (this._modelsObject) { | |
this._modelsObject = {} | |
} | |
if (p.length > 0) { | |
this._trigger(a.remove, { | |
models: p | |
}, q); | |
this._trigger(a.empty, { | |
models: p | |
}, q) | |
} | |
return p | |
}; | |
l.destroy = function(p) { | |
p = p || {}; | |
var r = this.empty(p); | |
this._trigger(a.destroy, { | |
models: r | |
}, p); | |
this.off(); | |
var q; | |
for (q in this) { | |
if (this.hasOwnProperty(q)) { | |
this[q] = null | |
} | |
} | |
}; | |
l.get = function(s) { | |
var q = this._getModelByID(s); | |
if (q) { | |
return q | |
} | |
var r, p = this.models.length; | |
for (r = 0; r < p; r++) { | |
if ((typeof this.models[r].id !== "undefined" && this.models[r].id === s) || (typeof this.models[r].cid !== "undefined" && this.models[r].cid === s)) { | |
q = this.models[r]; | |
break | |
} | |
} | |
return q | |
}; | |
l.set = function(t, B) { | |
B = B || {}; | |
if (typeof t === "undefined") { | |
t = [] | |
} | |
t = this._returnAsArray(t); | |
var u, p = "id", | |
y = t.length, | |
z = [], | |
C = [], | |
s = {}, | |
A; | |
if (this.ModelType && this.ModelType.prototype.idAttribute) { | |
p = this.ModelType.prototype.idAttribute | |
} | |
if (B.matchParameter) { | |
p = B.matchParameter | |
} | |
for (u = 0; u < y; u++) { | |
A = null; | |
if (typeof t[u] === "object") { | |
A = this.get(t[u][p]) | |
} | |
if (A) { | |
if (this.ModelType) { | |
A.set(t[u]); | |
s[A.cid] = true | |
} else { | |
A = t[u] | |
} | |
C.push(A); | |
continue | |
} | |
if (this.ModelType) { | |
t[u] = this._createModel(t[u]) | |
} | |
if (this.ModelType || this.indexOf(t[u]) === -1) { | |
z.push(t[u]) | |
} | |
C.push(t[u]) | |
} | |
var r, w = C.length, | |
x = [], | |
q, v; | |
y = this.models.length; | |
for (u = 0; u < y; u++) { | |
v = this.models[u]; | |
if (this.ModelType) { | |
q = true; | |
if (s[v.cid]) { | |
q = false | |
} | |
} else { | |
q = true; | |
for (r = 0; r < w; r++) { | |
if (v === C[r]) { | |
q = false; | |
break | |
} | |
} | |
} | |
if (q) { | |
x.push(v) | |
} | |
} | |
this.models = C; | |
if (z.length > 0) { | |
this._trigger(a.add, { | |
models: z | |
}, B) | |
} | |
if (x.length > 0) { | |
this._trigger(a.remove, { | |
models: x | |
}, B) | |
} | |
this._trigger(a.set, { | |
models: C | |
}, B); | |
return x | |
}; | |
l.at = function(p) { | |
if (!this.models) { | |
return | |
} | |
return this.models[p] | |
}; | |
l.find = function(w, y) { | |
if (typeof w !== "object") { | |
console.warn("Collection.protoype.find query needs to be an object"); | |
return [] | |
} | |
y = y || {}; | |
var z = [], | |
v = false, | |
t = 0, | |
s, r, p = null, | |
x = 0, | |
u = this.models.length, | |
q = u; | |
if (y.reverse) { | |
x = u - 1; | |
q = -1; | |
v = true | |
} | |
if (y.limit) { | |
p = y.limit | |
} | |
for (r = x; | |
(v ? r > q : r < q); | |
(v ? r-- : r++)) { | |
s = this.models[r]; | |
if (this._modelMatchesProperties(s, w)) { | |
if (v) { | |
z.unshift(s) | |
} else { | |
z.push(s) | |
} | |
t++; | |
if (p && t >= p) { | |
break | |
} | |
} | |
} | |
return z | |
}; | |
l.push = function() { | |
return this.pushWithOptions(n.toArray(arguments)) | |
}; | |
l.pop = function() { | |
return this.popWithOptions(n.toArray(arguments)) | |
}; | |
l.shift = function() { | |
return this.shiftWithOptions(n.toArray(arguments)) | |
}; | |
l.unshift = function() { | |
return this.unshiftWithOptions(n.toArray(arguments)) | |
}; | |
l.splice = function() { | |
return this.spliceWithOptions(n.toArray(arguments)) | |
}; | |
l.pushWithOptions = function(r, q) { | |
q = q || {}; | |
var s = this._createModels(r), | |
p = Array.prototype.push.apply(this.models, s); | |
if (s.length > 0) { | |
this._trigger(a.add, { | |
models: s | |
}, q) | |
} | |
return p | |
}; | |
l.popWithOptions = function(q, p) { | |
p = p || {}; | |
var r = Array.prototype.pop.call(this.models); | |
if (r) { | |
this._trigger(a.remove, { | |
models: [r] | |
}, p) | |
} | |
return r | |
}; | |
l.shiftWithOptions = function(q, p) { | |
p = p || {}; | |
var r = Array.prototype.shift.call(this.models); | |
if (r) { | |
this._trigger(a.remove, { | |
models: [r] | |
}, p) | |
} | |
return r | |
}; | |
l.unshiftWithOptions = function(r, q) { | |
q = q || {}; | |
var s = this._createModels(r), | |
p = Array.prototype.unshift.apply(this.models, s); | |
if (s.length > 0) { | |
this._trigger(a.add, { | |
models: s | |
}, q) | |
} | |
return p | |
}; | |
l.spliceWithOptions = function(r, q) { | |
q = q || {}; | |
var s = [r[0], r[1]], | |
p, u, t; | |
if (r.length > 2) { | |
p = r.slice(2, r.length); | |
u = this._createModels(p); | |
s = s.concat(u) | |
} | |
t = Array.prototype.splice.apply(this.models, s); | |
if (t.length > 0) { | |
this._trigger(a.remove, { | |
models: t | |
}, q) | |
} | |
if (u) { | |
this._trigger(a.add, { | |
models: u | |
}, q) | |
} | |
return t | |
}; | |
l._trigger = function(p, r, q) { | |
q = q || {}; | |
if (!q.silent) { | |
this.trigger(p, r) | |
} | |
}; | |
l._getModelByID = function(p) { | |
if (this.ModelType && this._modelsObject && this._modelsObject[p]) { | |
return this._modelsObject[p] | |
} | |
return null | |
}; | |
l._createModel = function(p) { | |
if (p instanceof this.ModelType || p instanceof h) { | |
return p | |
} | |
return new this.ModelType(p) | |
}; | |
l._createModels = function(r) { | |
if (!this.ModelType) { | |
return Array.prototype.slice.call(r, 0) | |
} | |
var q = [], | |
s, t, p = r.length; | |
for (t = 0; t < p; t++) { | |
s = r[t]; | |
if (!(s instanceof this.ModelType)) { | |
s = this._createModel(s) | |
} | |
q.push(s) | |
} | |
return q | |
}; | |
l._modelMatchesProperties = function(p, r) { | |
var q; | |
for (q in r) { | |
if (r.hasOwnProperty(q)) { | |
if (this._getPropFromModel(p, q) !== r[q]) { | |
return false | |
} | |
} | |
} | |
return true | |
}; | |
l._getPropFromModel = function(p, q) { | |
if (this.ModelType) { | |
return p.get(q) | |
} | |
return p[q] | |
}; | |
l._addToModelsObject = function(p) { | |
if (!this._modelsObject || !p.models) { | |
this._modelsObject = {} | |
} | |
p.models.forEach(function(q) { | |
this._modelsObject[q.id] = q; | |
this._modelsObject[q.cid] = q | |
}, this) | |
}; | |
l._removeFromModelsObject = function(p) { | |
if (!this._modelsObject || !p.models) { | |
this._modelsObject = {} | |
} | |
p.models.forEach(function(q) { | |
this._modelsObject[q.id] = null; | |
this._modelsObject[q.cid] = null | |
}, this) | |
}; | |
l._returnAsArray = function(p) { | |
if (!Array.isArray(p)) { | |
p = [p] | |
} | |
return p | |
}; | |
l._acArrayProxy = function(q) { | |
var p = n.toArray(arguments); | |
p[0] = this.models; | |
return n[q].apply(n, p) | |
}; | |
l._arrayPrototypeProxy = function(q) { | |
var p = n.toArray(arguments); | |
p.shift(); | |
return Array.prototype[q].apply(this.models, p) | |
}; | |
j.forEach(function(p) { | |
if (typeof Array.prototype[p] === "function") { | |
f(this, p, this._arrayPrototypeProxy, [p]) | |
} | |
}, l); | |
m.forEach(function(p) { | |
if (typeof n[p] === "function") { | |
f(this, p, this._acArrayProxy, [p]) | |
} | |
}, l); | |
b.exports = h | |
}, { | |
"ac-array": 270, | |
"ac-event-emitter": 264, | |
"ac-mvc-cid": 279, | |
"ac-object": 282 | |
}], | |
294: [function(b, c, a) { | |
arguments[4][194][0].apply(a, arguments) | |
}, { | |
"./ac-shared-instance/SharedInstance": 295, | |
dup: 194 | |
}], | |
295: [function(b, c, a) { | |
arguments[4][195][0].apply(a, arguments) | |
}, { | |
dup: 195 | |
}], | |
296: [function(b, c, a) { | |
arguments[4][279][0].apply(a, arguments) | |
}, { | |
"./ac-mvc-cid/CID": 297, | |
dup: 279 | |
}], | |
297: [function(b, c, a) { | |
arguments[4][280][0].apply(a, arguments) | |
}, { | |
"ac-shared-instance": 294, | |
dup: 280 | |
}], | |
298: [function(b, c, a) { | |
arguments[4][134][0].apply(a, arguments) | |
}, { | |
dup: 134 | |
}], | |
299: [function(b, c, a) { | |
arguments[4][135][0].apply(a, arguments) | |
}, { | |
"./ac-object/clone": 300, | |
"./ac-object/create": 301, | |
"./ac-object/defaults": 302, | |
"./ac-object/extend": 303, | |
"./ac-object/getPrototypeOf": 304, | |
"./ac-object/isDate": 305, | |
"./ac-object/isEmpty": 306, | |
"./ac-object/isRegExp": 307, | |
"./ac-object/toQueryParameters": 308, | |
dup: 135 | |
}], | |
300: [function(b, c, a) { | |
arguments[4][136][0].apply(a, arguments) | |
}, { | |
"./extend": 303, | |
dup: 136 | |
}], | |
301: [function(b, c, a) { | |
arguments[4][137][0].apply(a, arguments) | |
}, { | |
dup: 137 | |
}], | |
302: [function(b, c, a) { | |
arguments[4][138][0].apply(a, arguments) | |
}, { | |
"./extend": 303, | |
dup: 138 | |
}], | |
303: [function(b, c, a) { | |
arguments[4][139][0].apply(a, arguments) | |
}, { | |
dup: 139 | |
}], | |
304: [function(b, c, a) { | |
arguments[4][140][0].apply(a, arguments) | |
}, { | |
dup: 140 | |
}], | |
305: [function(b, c, a) { | |
arguments[4][141][0].apply(a, arguments) | |
}, { | |
dup: 141 | |
}], | |
306: [function(b, c, a) { | |
arguments[4][142][0].apply(a, arguments) | |
}, { | |
dup: 142 | |
}], | |
307: [function(b, c, a) { | |
arguments[4][143][0].apply(a, arguments) | |
}, { | |
dup: 143 | |
}], | |
308: [function(b, c, a) { | |
arguments[4][144][0].apply(a, arguments) | |
}, { | |
dup: 144, | |
qs: 298 | |
}], | |
309: [function(b, c, a) { | |
c.exports = { | |
Model: b("./ac-mvc-model/Model") | |
} | |
}, { | |
"./ac-mvc-model/Model": 310 | |
}], | |
310: [function(c, d, b) { | |
var g = c("ac-event-emitter").EventEmitter; | |
var a = c("ac-object"); | |
var h = c("ac-mvc-cid").CID; | |
var j = function(k) { | |
this.attributes = a.defaults(this.defaultAttributes, k || {}); | |
this.cid = h.getNewCID(); | |
if (this.attributes[this.idAttribute]) { | |
this.id = this.attributes[this.idAttribute] | |
} | |
}; | |
var f = j.prototype = a.create(g.prototype); | |
f.defaultAttributes = {}; | |
f.idAttribute = "id"; | |
f._trigger = function(m, l, k) { | |
k = k || {}; | |
if (k.silent !== true) { | |
this.trigger(m, l) | |
} | |
}; | |
f._triggerChange = function(m, l, k) { | |
return this._trigger("change:" + m, l, k) | |
}; | |
f.get = function(k) { | |
if (!this.attributes) { | |
return | |
} | |
return this.attributes[k] | |
}; | |
f.set = function(l, k) { | |
if (!this.attributes) { | |
return | |
} | |
var p; | |
var o; | |
var n; | |
var m = {}; | |
var q = false; | |
for (p in l) { | |
if (l.hasOwnProperty(p)) { | |
n = this.get(p); | |
if ((typeof n === "object" && typeof l[p] === "object" && JSON.stringify(n) === JSON.stringify(l[p])) || (n === l[p])) { | |
continue | |
} | |
q = true; | |
this.attributes[p] = l[p]; | |
o = { | |
value: l[p], | |
previous: n | |
}; | |
m[p] = o; | |
this._triggerChange(p, o, k) | |
} | |
} | |
if (q) { | |
this._trigger("change", m, k) | |
} | |
}; | |
f.has = function(k) { | |
if (!this.attributes) { | |
return false | |
} | |
return (this.attributes[k] !== undefined) | |
}; | |
f.eachAttribute = function(l, k) { | |
if (!this.attributes) { | |
return | |
} | |
var m; | |
for (m in this.attributes) { | |
if (this.attributes.hasOwnProperty(m)) { | |
l.call(k, { | |
attribute: m, | |
value: this.attributes[m] | |
}) | |
} | |
} | |
}; | |
f.destroy = function() { | |
this.trigger("destroy"); | |
this.off(); | |
var k; | |
for (k in this) { | |
if (this.hasOwnProperty(k)) { | |
this[k] = null | |
} | |
} | |
}; | |
d.exports = j | |
}, { | |
"ac-event-emitter": 264, | |
"ac-mvc-cid": 296, | |
"ac-object": 299 | |
}], | |
311: [function(c, d, b) { | |
function a(h, g) { | |
h = h || {}; | |
this.position = h.position || { | |
x: 0, | |
y: 0 | |
}; | |
this.velocity = h.velocity || { | |
x: 0, | |
y: 0 | |
}; | |
this.mass = h.mass || 1; | |
this.options = g || {} | |
} | |
var f = a.prototype; | |
f.draw = function() {}; | |
d.exports = a | |
}, {}], | |
312: [function(b, c, a) { | |
c.exports = { | |
Particle: b("./Particle"), | |
spring: b("./spring") | |
} | |
}, { | |
"./Particle": 311, | |
"./spring": 313 | |
}], | |
313: [function(b, d, a) { | |
function c(n, m) { | |
var o = n.mass; | |
var q = 0, | |
h = 10, | |
g = new Date().getTime(), | |
j = 0; | |
function k() { | |
var s = new Date().getTime(); | |
var r = (s - g); | |
g = s; | |
if (r > 25) { | |
r = 25 | |
} | |
j += r; | |
while (j >= h) { | |
j -= h; | |
l() | |
} | |
f() | |
} | |
function l() { | |
var s = 0.02; | |
var t = p.stiffness * ((n.position.x - 0) - p.equilibrium); | |
var u = p.damping * n.velocity.x; | |
var r = (t + u) / o; | |
n.velocity.x += r * s; | |
n.position.x += n.velocity.x * s | |
} | |
function f() {} | |
var p = { | |
equilibrium: m, | |
stiffness: -30, | |
damping: -8, | |
update: function(r) { | |
k() | |
} | |
}; | |
return p | |
} | |
d.exports = { | |
create: c | |
} | |
}, {}], | |
314: [function(b, c, a) { | |
c.exports = { | |
Routes: b("./ac-routes/Routes"), | |
Route: b("./ac-routes/Route") | |
} | |
}, { | |
"./ac-routes/Route": 315, | |
"./ac-routes/Routes": 316 | |
}], | |
315: [function(b, c, a) { | |
function f(j, l, h, k, g) { | |
this.path = j; | |
this.callback = l; | |
this.context = h; | |
this.greedy = k || false; | |
this.priority = g || 0; | |
if (typeof this.priority !== "number") { | |
throw new Error("Priority must be a Number.") | |
} | |
this.identifierPattern = "([a-zA-Z0-9\\-\\_]+)"; | |
this.tokensRe = new RegExp(":" + this.identifierPattern, "g"); | |
this.matcher = this._createRouteMatcher(j) | |
} | |
var d = f.prototype; | |
d._createRouteMatcher = function(h) { | |
if (h && h.exec) { | |
return { | |
pattern: h | |
} | |
} else { | |
if (h === "/") { | |
return { | |
pattern: /^\/$/ | |
} | |
} else { | |
if (typeof h !== "string") { | |
throw new Error("path must be either a string or regex") | |
} | |
} | |
} | |
var g = this._extractRouteTokens(h); | |
var k = h.replace(this.tokensRe, this.identifierPattern); | |
var j = new RegExp(k, "g"); | |
return { | |
pattern: j, | |
routeTokens: g | |
} | |
}; | |
d._extractRouteTokens = function(k) { | |
var g = k.replace(this.tokensRe, ":" + this.identifierPattern); | |
var j = new RegExp(g, "g"); | |
var h = j.exec(k); | |
if (h && h.length > 1) { | |
h = h.slice(1) | |
} else { | |
h = null | |
} | |
return h | |
}; | |
d.match = function(h) { | |
this.matcher.pattern.lastIndex = 0; | |
var g = this.matcher.pattern.exec(h); | |
if (g) { | |
var j = (g.length) ? g.slice(1) : []; | |
var k = this.callback; | |
if (k && typeof k === "function") { | |
k.apply(this.context || this, j); | |
return true | |
} | |
} | |
return false | |
}; | |
c.exports = f | |
}, {}], | |
316: [function(c, d, b) { | |
var g = c("./Route"); | |
function a(h) { | |
this._routes = {}; | |
if (h) { | |
this.addRoutes(h) | |
} | |
} | |
var f = a.prototype; | |
f._getIndex = function(k, l, j) { | |
if (this._routes[k] !== undefined) { | |
var h = this._routes[k].length; | |
while (--h > -1) { | |
if (this._routes[k][h].callback === l && this._routes[k][h].context === j) { | |
return h | |
} | |
} | |
} | |
return -1 | |
}; | |
f.match = function(k) { | |
var j, h; | |
for (j in this._routes) { | |
h = this._routes[j].length; | |
while (--h > -1) { | |
if (this._routes[j][h].match(k) && this._routes[j][h].greedy) { | |
break | |
} | |
} | |
} | |
}; | |
f.add = function(j) { | |
if (this._routes[j.path] === undefined) { | |
this._routes[j.path] = [j] | |
} else { | |
if (!this.get(j.path, j.callback, j.context)) { | |
var k, h = this._routes[j.path].length; | |
if (h > 0) { | |
for (k = 0; k < h; ++k) { | |
if (this._routes[j.path][k].priority > j.priority) { | |
this._routes[j.path].splice(k, 0, j); | |
return j | |
} | |
} | |
} | |
this._routes[j.path].push(j) | |
} | |
} | |
return j | |
}; | |
f.remove = function(h) { | |
var j = this._getIndex(h.path, h.callback, h.context); | |
if (j > -1) { | |
this._routes[h.path].splice(j, 1); | |
return h | |
} | |
return false | |
}; | |
f.get = function(k, l, j) { | |
var h = this._getIndex(k, l, j); | |
if (h > -1) { | |
return this._routes[k][h] | |
} | |
return false | |
}; | |
f.createRoute = function(l, n, k, m, j) { | |
var h = new g(l, n, k, m, j); | |
this.add(h); | |
return h | |
}; | |
f.addRoutes = function(j) { | |
if (j instanceof Array) { | |
var l, k, h = j.length; | |
for (l = 0; l < h; ++l) { | |
k = j[l]; | |
if (k && typeof k === "object") { | |
this.add(k) | |
} | |
} | |
} else { | |
throw new Error("routes must be an Array.") | |
} | |
}; | |
f.removeRoutes = function(j) { | |
if (j instanceof Array) { | |
var l, k, h = j.length; | |
for (l = 0; l < h; ++l) { | |
k = j[l]; | |
if (k && typeof k === "object") { | |
this.remove(k) | |
} | |
} | |
} else { | |
throw new Error("routes must be an Array.") | |
} | |
}; | |
f.getRoutes = function(h) { | |
if (this._routes[h] === undefined) { | |
return [] | |
} | |
return this._routes[h] | |
}; | |
d.exports = a | |
}, { | |
"./Route": 315 | |
}], | |
317: [function(c, d, b) { | |
function a(g) { | |
this.options = g || {} | |
} | |
var f = a.prototype; | |
f.onExit = function() {}; | |
f.onEnter = function() {}; | |
d.exports = a | |
}, {}], | |
318: [function(d, f, b) { | |
var c = d("ac-object"); | |
var h = d("ac-event-emitter").EventEmitter; | |
function a(j) { | |
this.options = j || {}; | |
this.previousState = null; | |
this.currentState = j.currentState || null | |
} | |
var g = a.prototype = c.create(h.prototype); | |
g.handleInput = function(k, l) { | |
var j = this.currentState[k]; | |
if (typeof j === "function") { | |
return this.currentState[k](this, l) | |
} | |
}; | |
g.gotoPreviousState = function(j) { | |
this.changeState(this.previousState, j) | |
}; | |
g.changeState = function(l, k) { | |
this.previousState = this.currentState; | |
this.currentState = l; | |
var j = [this.previousState.onExit(this, k), this.currentState.onEnter(this, k)]; | |
return Promise.all(j) | |
}; | |
f.exports = a | |
}, { | |
"ac-event-emitter": 264, | |
"ac-object": 380 | |
}], | |
319: [function(b, c, a) { | |
c.exports = { | |
StateMachine: b("./StateMachine"), | |
State: b("./State") | |
} | |
}, { | |
"./State": 317, | |
"./StateMachine": 318 | |
}], | |
320: [function(b, c, a) { | |
var g = b("./ac-gallery/Gallery"); | |
var f = b("./ac-gallery/SlideGallery"); | |
var d = b("./ac-gallery/FadeGallery"); | |
c.exports = { | |
Gallery: g, | |
SlideGallery: f, | |
FadeGallery: d | |
} | |
}, { | |
"./ac-gallery/FadeGallery": 321, | |
"./ac-gallery/Gallery": 322, | |
"./ac-gallery/SlideGallery": 323 | |
}], | |
321: [function(c, d, a) { | |
var h = c("./Gallery"); | |
var b = c("ac-eclipse").Clip; | |
var f = c("ac-dom-styles/setStyle"); | |
var g = h.extend({ | |
initialize: function() { | |
this._boundCreateClip = this._createClip.bind(this); | |
this.canSpring = false | |
}, | |
_createClip: function(m, j, n, o, l) { | |
var k = new b(m, n, { | |
opacity: 1 | |
}, { | |
onStart: function() { | |
f(j, { | |
zIndex: 1 | |
}); | |
f(m, { | |
zIndex: 2 | |
}) | |
}, | |
onComplete: function() { | |
f(j, { | |
opacity: 0 | |
}); | |
window.requestAnimationFrame(l) | |
}, | |
ease: o | |
}); | |
return k | |
}, | |
drawInitial: function(k) { | |
var j = k.get("element"); | |
f(j, { | |
zIndex: 2, | |
opacity: 1 | |
}); | |
this.model.forEach(function(l) { | |
if (l.id !== k.id) { | |
f(l.get("element"), { | |
zIndex: 1, | |
opacity: 0 | |
}) | |
} | |
}, this) | |
}, | |
draw: function(j, l, k) { | |
var n = j.get("element"); | |
var m = l.get("element"); | |
var p = k.easing || this.getEasing(); | |
var o = k.duration || this.getDuration(); | |
return new Promise(function(s, r) { | |
var q = this._createClip(n, m, o, p, s); | |
q.play() | |
}.bind(this)) | |
}, | |
destroy: function() { | |
this._boundCreateClip = null | |
} | |
}); | |
d.exports = g | |
}, { | |
"./Gallery": 322, | |
"ac-dom-styles/setStyle": 105, | |
"ac-eclipse": "ac-eclipse" | |
}], | |
322: [function(c, b, h) { | |
var f = c("ac-object/defaults"); | |
var n = c("ac-object/create"); | |
var p = c("ac-object/extend"); | |
var o = c("./model/GalleryCollection"); | |
var r = c("ac-event-emitter").EventEmitter; | |
var a = c("ac-routes").Routes; | |
var q = c("ac-state-machine").StateMachine; | |
var g = c("./states/factory"); | |
var l = 'Could not create gallery: "id" is missing'; | |
var j = 'Could not create gallery: "el" was not specified'; | |
var d = { | |
duration: 0.4, | |
easing: "linear", | |
endless: false, | |
initial: 0 | |
}; | |
function m(s) { | |
this.options = f(d, s || {}); | |
this.id = this.options.id; | |
if (!this.id) { | |
throw new Error(l) | |
} | |
this.model = this.options.model || new o(); | |
this.model.setSelected(this.options.initial); | |
this.stateMachine = new q({ | |
currentState: g.create("initialize", this) | |
}); | |
this.routes = s.routes || new a(); | |
this.routes.add(this.routes.createRoute(this.id + "/show/:id", this.show, this)); | |
this.routes.add(this.routes.createRoute(this.id + "/previous", this.showPrevious, this)); | |
this.routes.add(this.routes.createRoute(this.id + "/next", this.showNext, this)); | |
this.el = this.options.el; | |
if (!this.el) { | |
throw new Error(j) | |
} | |
this.easing = this.options.easing || this.easing; | |
this.duration = this.options.duration || this.duration; | |
this.initialize(s); | |
this.show(this.model.getSelected()) | |
} | |
var k = m.prototype = n(r.prototype); | |
k.sendGalleryEvent = function(s) { | |
this.trigger(s.type, s.data) | |
}; | |
k.easing = "linear"; | |
k.duration = 0.4; | |
k.getSlideAt = function(s) { | |
return this.model.at(s) | |
}; | |
k.setDuration = function(s) { | |
this.duration = s | |
}; | |
k.getDuration = function() { | |
return this.duration | |
}; | |
k.setEasing = function(s) { | |
this.easing = s | |
}; | |
k.getEasing = function() { | |
return this.easing | |
}; | |
k.cancelDraw = function() {}; | |
k.initialize = function() {}; | |
k.drawInitial = function() {}; | |
k.beforeDraw = function() {}; | |
k.draw = function() {}; | |
k.afterDraw = function() {}; | |
k.destroy = function() {}; | |
k.drawBounceInProgress = function() {}; | |
k.drawBounceOutProgress = function() {}; | |
k.drawProgress = function() {}; | |
k.drawSnap = function() {}; | |
k.drawResize = function() {}; | |
k.removeStyles = function() {}; | |
k.resize = function() {}; | |
k.setProgress = function(s) { | |
this.stateMachine.handleInput("seek", { | |
progress: s | |
}) | |
}; | |
k.snap = function(s) { | |
this.stateMachine.handleInput("pointerUp", { | |
progress: s | |
}) | |
}; | |
k.getSelected = function() { | |
return this.model.getSelected() | |
}; | |
k.getItems = function() { | |
return this.model.models | |
}; | |
k.setEngaged = function(s) { | |
this.stateMachine.handleInput("engagementChange", { | |
engaged: s | |
}) | |
}; | |
k.slideAt = function() { | |
var s = this.model.at.apply(this.model, arguments); | |
if (!s) { | |
return null | |
} | |
return s | |
}; | |
k.getPreviousState = function() { | |
return this.stateMachine.previousState | |
}; | |
k.getCurrentState = function() { | |
return this.stateMachine.currentState | |
}; | |
k.isEndless = function() { | |
return this.model.isEndless() | |
}; | |
k.indexOf = function(s) { | |
return this.model.indexOf(s) | |
}; | |
k.count = function() { | |
return this.model.count() | |
}; | |
k.getNext = function() { | |
return this.model.getNext() | |
}; | |
k.getPrevious = function() { | |
return this.model.getPrevious() | |
}; | |
k.getSelectedIndex = function() { | |
return this.model.indexOfSelected() | |
}; | |
k.showNext = function(s) { | |
var t = this.model.getNext(); | |
return this.show(t, s) | |
}; | |
k.showPrevious = function(s) { | |
var t = this.model.getPrevious(); | |
return this.show(t, s) | |
}; | |
k.getLastIndex = function() { | |
return this.model.count() - 1 | |
}; | |
k.getLast = function() { | |
return this.model.getLast() | |
}; | |
k.getFirst = function() { | |
return this.model.at(0) | |
}; | |
k.show = function(t, s) { | |
this.stateMachine.handleInput("onDraw", { | |
query: t, | |
options: s | |
}) | |
}; | |
k.clear = function() { | |
this.stateMachine.handleInput("onClear") | |
}; | |
k.dealloc = function() { | |
this.stateMachine.handleInput("onDealloc") | |
}; | |
m.create = c("./factory/create"); | |
m.extend = function(v) { | |
var u = this; | |
var t = function() { | |
u.apply(this, arguments) | |
}; | |
var s = n(this.prototype); | |
t.prototype = p(s, v); | |
p(t, this); | |
return t | |
}; | |
b.exports = m | |
}, { | |
"./factory/create": 325, | |
"./model/GalleryCollection": 331, | |
"./states/factory": 341, | |
"ac-event-emitter": 264, | |
"ac-object/create": 376, | |
"ac-object/defaults": 377, | |
"ac-object/extend": 378, | |
"ac-routes": 314, | |
"ac-state-machine": 319 | |
}], | |
323: [function(c, a, f) { | |
var l = c("./Gallery"); | |
var k = c("ac-eclipse").Clip; | |
var h = c("ac-dom-styles/setStyle"); | |
var j = c("ac-dom-metrics/getDimensions"); | |
var n = c("ac-dom-events/addEventListener"); | |
var o = c("ac-dom-events/removeEventListener"); | |
var g = c("./SlideGallery/feature-detect"); | |
var d = c("./model/SlideGalleryTransformData"); | |
var m = "Could not create SlideGallery: no `slideEl` option was specified"; | |
var b = l.extend({ | |
_bounceInClip: null, | |
_bounceOutClip: null, | |
_getBounceInClip: function() { | |
if (this._bounceInClip !== null) { | |
return this._bounceInClip | |
} | |
var q = this._getTransformStyles(this.getFirst(), this.getFirst(), { | |
addDistance: j(this.options.el).width | |
}); | |
var p = this._getTransformStyles(this.getFirst(), this.getLast()); | |
this._bounceInClip = new k(this.options.slideEl, this.getDuration() * this.count(), q, { | |
ease: "linear", | |
propsFrom: p | |
}); | |
return this._bounceInClip | |
}, | |
_getBounceOutClip: function() { | |
if (this._bounceOutClip !== null) { | |
return this._bounceOutClip | |
} | |
var q = this._getTransformStyles(this.getLast(), this.getFirst(), { | |
addDistance: -j(this.options.el).width | |
}); | |
var p = this._getTransformStyles(this.getLast(), this.getFirst()); | |
this._bounceOutClip = new k(this.options.slideEl, this.getDuration(), q, { | |
ease: "linear", | |
propsFrom: p | |
}); | |
return this._bounceOutClip | |
}, | |
_renderProgress: function(q, p) { | |
q.setProgress(p) | |
}, | |
_clip: null, | |
_toClip: function() { | |
if (this._clip) { | |
return this._clip | |
} | |
var q = this._getTransformStyles(this.getLast(), this.getFirst()); | |
var p = this._getTransformStyles(this.getFirst(), this.getLast()); | |
this._clip = new k(this.options.slideEl, this.getDuration(), q, { | |
ease: "linear", | |
propsFrom: p | |
}); | |
return this._clip | |
}, | |
initialize: function(p) { | |
if (!p.slideEl) { | |
throw new Error(m) | |
} | |
}, | |
drawBounceOutProgress: function(p) { | |
var q = this._getBounceOutClip(); | |
this._renderProgress(q, p) | |
}, | |
drawBounceInProgress: function(p) { | |
var q = this._getBounceInClip(); | |
this._renderProgress(q, p) | |
}, | |
drawProgress: function(p) { | |
var q = this._toClip(); | |
return this._renderProgress(q, p) | |
}, | |
drawInitial: function(p) { | |
this.drawSnap(p) | |
}, | |
drawSnap: function(q, t, s) { | |
var u = this._toClip(); | |
var p = this.indexOf(q); | |
var r = p / (this.count() - 1); | |
u.setProgress(r) | |
}, | |
removeStyles: function() { | |
h(this.options.slideEl, { | |
transition: null, | |
transform: null | |
}) | |
}, | |
drawResize: function(p, r, q) { | |
this._clip = null; | |
this._bounceInClip = null; | |
this._bounceOutClip = null; | |
this.drawSnap(p, r, q) | |
}, | |
_getTransitionProp: function() { | |
if (g.canUseTransform()) { | |
return "transform" | |
} | |
return "left" | |
}, | |
_transitionEndString: "transitionend", | |
_drawCSSTransition: function(q, s, r) { | |
var p = this._getTransitionProp(); | |
return new Promise(function(v, u) { | |
var t = function(w) { | |
if (w.target === this.options.slideEl) { | |
h(this.options.slideEl, { | |
transition: null | |
}); | |
o(this.options.slideEl, this._transitionEndString, t); | |
v() | |
} | |
}.bind(this); | |
n(this.options.slideEl, this._transitionEndString, t); | |
q.transition = p + " " + r + "s " + s; | |
h(this.options.slideEl, q) | |
}.bind(this)) | |
}, | |
_drawRAFTransition: function(p, r, q) { | |
return new Promise(function(u, t) { | |
var s = new k(this.options.slideEl, q, p, { | |
easing: r, | |
onComplete: u, | |
inlineStyles: true | |
}); | |
s.play() | |
}.bind(this)) | |
}, | |
_getTransformStyles: function(p, s, r) { | |
var q = new d(this, p, s, r); | |
q.calculate(); | |
q.setStyles(this.didCalculateStyles(q.styles, p, s)); | |
return q.renderStylesObject() | |
}, | |
didCalculateStyles: function(r, p, q) { | |
return r | |
}, | |
draw: function(p, r, q) { | |
var t = q.duration || this.getDuration(); | |
var u = q.easing || this.getEasing(); | |
var s = this._getTransformStyles(p, r); | |
if (g.canUseCSSTransitions()) { | |
return this._drawCSSTransition(s, u, t) | |
} else { | |
return this._drawRAFTransition(s, u, t) | |
} | |
}, | |
destroy: function() { | |
this.removeStyles(); | |
this._bounceInClip = null; | |
this._bounceOutClip = null; | |
this._clip = null | |
} | |
}); | |
a.exports = b | |
}, { | |
"./Gallery": 322, | |
"./SlideGallery/feature-detect": 324, | |
"./model/SlideGalleryTransformData": 333, | |
"ac-dom-events/addEventListener": 37, | |
"ac-dom-events/removeEventListener": 45, | |
"ac-dom-metrics/getDimensions": 54, | |
"ac-dom-styles/setStyle": 105, | |
"ac-eclipse": "ac-eclipse" | |
}], | |
324: [function(c, d, b) { | |
var a = c("ac-feature/cssPropertyAvailable"); | |
d.exports = { | |
canUseCSSTransitions: function() { | |
return a("transition") | |
}, | |
canUseTransform: function() { | |
return a("transform") | |
} | |
} | |
}, { | |
"ac-feature/cssPropertyAvailable": 225 | |
}], | |
325: [function(f, b, r) { | |
var d = f("./../model/GalleryCollection"); | |
var g = f("ac-object/defaults"); | |
var m = f("ac-dom-nodes/isElement"); | |
var j = f("./../inputs/pointer"); | |
var n = f("./../inputs/Trigger"); | |
var s = f("./../inputs/Keyboard"); | |
var t = f("./../inputs/Engagement"); | |
var c = f("./../inputs/resize"); | |
var q = f("./../observer/analytics"); | |
var k = f("./../observer/trigger"); | |
var p = "Could not create gallery: triggerSelector should be a string"; | |
var h = 'Could not create gallery: no "model" was specified'; | |
var o = { | |
keyboard: true, | |
trigger: { | |
events: ["click"] | |
} | |
}; | |
function l(v, u) { | |
u = u || {}; | |
u.models = v.map(function(w) { | |
if (m(w)) { | |
return { | |
id: w.id, | |
element: w | |
} | |
} | |
return w | |
}); | |
return new d(u) | |
} | |
b.exports = function a(z) { | |
z = z || {}; | |
z = g(o, z); | |
if (!z.model) { | |
throw new Error(h) | |
} | |
z.model = l(z.model, { | |
endless: z.endless | |
}); | |
var y = new this(z); | |
var x = {}; | |
var B = {}; | |
x.resize = c(y, z.resize); | |
if (z.pointer) { | |
var w = z.pointer; | |
w.element = w.el || y.el; | |
x.pointer = j(y, w) | |
} | |
if (z.triggerSelector) { | |
if (typeof z.triggerSelector !== "string") { | |
throw new Error(p) | |
} else { | |
x.trigger = n(y, { | |
selector: z.triggerSelector, | |
events: z.trigger.events | |
}); | |
B.trigger = k(y, { | |
selector: z.triggerSelector | |
}) | |
} | |
} | |
if (z.keyboard === true) { | |
y.keyboard = s(y) | |
} | |
var v = z.engagementElement || y.el; | |
x.engagement = t(y, { | |
el: v | |
}); | |
var A = y.id; | |
if (y.el && y.el.getAttribute("data-analytics-id")) { | |
A = y.el.getAttribute("data-analytics-id") | |
} | |
var u = { | |
galleryName: A | |
}; | |
q(y, u); | |
y.inputs = x; | |
y.observers = B; | |
return y | |
} | |
}, { | |
"./../inputs/Engagement": 326, | |
"./../inputs/Keyboard": 327, | |
"./../inputs/Trigger": 328, | |
"./../inputs/pointer": 329, | |
"./../inputs/resize": 330, | |
"./../model/GalleryCollection": 331, | |
"./../observer/analytics": 335, | |
"./../observer/trigger": 336, | |
"ac-dom-nodes/isElement": 86, | |
"ac-object/defaults": 377 | |
}], | |
326: [function(c, d, b) { | |
var h = c("ac-element-tracker").ElementTracker; | |
var f = c("ac-object/create"); | |
var a = { | |
handleEngagementChange: function(j) { | |
this.stateMachine.handleInput("engagementChange", { | |
engaged: j | |
}) | |
}, | |
isNotEngaged: function() { | |
this.handleEngagementChange(false) | |
}, | |
isEngaged: function() { | |
this.handleEngagementChange(true) | |
}, | |
onEnterView: function() { | |
this.isEngaged() | |
}, | |
onExitView: function() { | |
this.isNotEngaged() | |
} | |
}; | |
d.exports = function g(j, k) { | |
k = k || {}; | |
var m = new h(); | |
var l = m.addElement(k.el); | |
var n = f(a); | |
n.stateMachine = j.stateMachine; | |
n.onEnterView = n.onEnterView.bind(n); | |
n.onExitView = n.onExitView.bind(n); | |
m.refreshElementState(l); | |
if (l.inView) { | |
n.onEnterView() | |
} else { | |
n.onExitView() | |
} | |
l.on("enterview", n.onEnterView); | |
l.on("exitview", n.onExitView); | |
m.start(); | |
j.once("destroy", function() { | |
l.off("enterview", n.onEnterView); | |
l.off("exitview", n.onExitView); | |
m = null; | |
l = null | |
}); | |
return n | |
} | |
}, { | |
"ac-element-tracker": 214, | |
"ac-object/create": 376 | |
}], | |
327: [function(f, g, d) { | |
var j = f("ac-dom-events/addEventListener"); | |
var b = f("ac-dom-events/removeEventListener"); | |
var h = f("ac-object/create"); | |
var c = { | |
keyDown: function(k) { | |
this.stateMachine.handleInput("keydown", { | |
interactionEvent: k | |
}) | |
} | |
}; | |
g.exports = function a(m, n) { | |
n = n || {}; | |
var k = h(c); | |
k.stateMachine = m.stateMachine; | |
var l = function(o) { | |
k.keyDown(o) | |
}; | |
j(document, "keydown", l); | |
m.once("destroy", function() { | |
b(document, "keydown", l); | |
l = null | |
}); | |
return k | |
} | |
}, { | |
"ac-dom-events/addEventListener": 37, | |
"ac-dom-events/removeEventListener": 45, | |
"ac-object/create": 376 | |
}], | |
328: [function(b, a, c) { | |
var k = b("ac-dom-events/addEventListener"); | |
var m = b("ac-dom-events/removeEventListener"); | |
var h = b("ac-dom-events"); | |
var j = b("ac-object/create"); | |
var l = b("ac-dom-traversal/matchesSelector"); | |
var f = b("ac-dom-traversal/ancestor"); | |
var g = { | |
triggerInteraction: function(o) { | |
var n = h.target(o); | |
var p = null; | |
if (l(n, this.selector)) { | |
p = n | |
} else { | |
if (l(n, this.selector + " *")) { | |
p = f(n, this.selector) | |
} | |
} | |
if (p) { | |
h.preventDefault(o); | |
this.stateMachine.handleInput("trigger", { | |
interactionEvent: o, | |
target: p | |
}) | |
} | |
} | |
}; | |
a.exports = function d(n, p) { | |
var o = j(g); | |
o.selector = p.selector; | |
o.stateMachine = n.stateMachine; | |
var q = function(r) { | |
o.triggerInteraction(r) | |
}; | |
p.events.forEach(function(r) { | |
k(document, r, q) | |
}); | |
n.once("destroy", function() { | |
p.events.forEach(function(r) { | |
m(document, r, q) | |
}); | |
o = null | |
}); | |
return o | |
} | |
}, { | |
"ac-dom-events": 39, | |
"ac-dom-events/addEventListener": 37, | |
"ac-dom-events/removeEventListener": 45, | |
"ac-dom-traversal/ancestor": 106, | |
"ac-dom-traversal/matchesSelector": 115, | |
"ac-object/create": 376 | |
}], | |
329: [function(c, d, b) { | |
var h = c("ac-gesture/PointerMove"); | |
var f = c("ac-object/create"); | |
var j = { | |
onPointerMove: function(k) { | |
this.stateMachine.handleInput("pointerMove", { | |
interactionEvent: k | |
}) | |
}, | |
onPointerDown: function(l) { | |
var k = { | |
interactionEvent: l, | |
element: this.gesture.element | |
}; | |
this.stateMachine.handleInput("pointerDown", k) | |
}, | |
onPointerUp: function(k) { | |
this.stateMachine.handleInput("pointerUp", { | |
interactionEvent: k | |
}) | |
} | |
}; | |
var g = { | |
interactions: [], | |
handledDown: false, | |
isMovingHorizontal: function() { | |
if (this.interactions.length < 4) { | |
return null | |
} | |
var q = this.interactions[0]; | |
var m = this.interactions[this.interactions.length - 1]; | |
var r = m.pageX - q.pageX; | |
var p = m.pageY - q.pageY; | |
var l = Math.atan2(p, r); | |
var o = l * (180 / Math.PI); | |
var k = 75; | |
var n = Math.abs(o) < k || Math.abs(o) > (180 - k); | |
return n | |
}, | |
onPointerMove: function(k) { | |
if (this.interactions.length < 4) { | |
this.interactions.push(k); | |
return | |
} | |
if (this.isMovingHorizontal()) { | |
if (!this.handledDown) { | |
this.handledDown = true; | |
this.parent.onPointerDown(this.interactions[0]) | |
} | |
this.parent.onPointerMove(k) | |
} | |
}, | |
onPointerDown: function(k) { | |
this.interactions.push(k) | |
}, | |
onPointerUp: function(k) { | |
if (this.handledDown === true) { | |
this.parent.onPointerUp(k) | |
} | |
this.interactions = []; | |
this.handledDown = false | |
} | |
}; | |
d.exports = function a(k, l) { | |
l = l || {}; | |
var m = h.create(l.element, l); | |
var o = f(j); | |
o.stateMachine = k.stateMachine; | |
o.gesture = m; | |
var n = f(g); | |
n.parent = o; | |
m.on("start", function(p) { | |
n.onPointerDown(p) | |
}); | |
m.on("move", function(p) { | |
n.onPointerMove(p) | |
}); | |
m.on("end", function(p) { | |
n.onPointerUp(p) | |
}); | |
m.on("cancel", function(p) { | |
n.onPointerUp(p) | |
}); | |
m.activate(); | |
k.once("destroy", function() { | |
m.off(); | |
m._removeAllListeners(); | |
m.destroy(); | |
m = null | |
}); | |
return n | |
} | |
}, { | |
"ac-gesture/PointerMove": 268, | |
"ac-object/create": 376 | |
}], | |
330: [function(d, f, c) { | |
var b = d("ac-function/debounce"); | |
var h = d("ac-dom-events/addEventListener"); | |
var a = d("ac-dom-events/removeEventListener"); | |
var g = d("ac-object/create"); | |
var j = { | |
resize: function(k) { | |
this.stateMachine.handleInput("resize", k) | |
} | |
}; | |
f.exports = function(l, n) { | |
n = n || {}; | |
if (typeof n.debounceTimeout === "number") { | |
n.debounceTimeout = n.debounceTimeout | |
} else { | |
n.debounceTimeout = 300 | |
} | |
var m = g(j); | |
m.stateMachine = l.stateMachine; | |
var o = b(function(p) { | |
m.resize(p) | |
}, n.debounceTimeout); | |
h(window, "resize", o); | |
function k() { | |
a(window, "resize", o); | |
o = null | |
} | |
l.once("destroy", k); | |
return m | |
} | |
}, { | |
"ac-dom-events/addEventListener": 37, | |
"ac-dom-events/removeEventListener": 45, | |
"ac-function/debounce": 266, | |
"ac-object/create": 376 | |
}], | |
331: [function(c, d, b) { | |
var g = c("ac-mvc-collection").Collection; | |
var j = c("ac-mvc-model").Model; | |
var f = c("ac-object/create"); | |
function a() { | |
g.apply(this, arguments); | |
this._selected = null | |
} | |
var h = a.prototype = f(g.prototype); | |
h.ModelType = j; | |
h.query = function(l) { | |
var k; | |
if (typeof l === "number") { | |
k = this.at(l) | |
} else { | |
if (typeof l === "string") { | |
k = this.get(l) | |
} else { | |
if (this.indexOf(l) !== -1) { | |
k = l | |
} | |
} | |
} | |
return k | |
}; | |
h.isEndless = function() { | |
return !!this.options.endless | |
}; | |
h.getPrevious = function() { | |
var k = this.indexOf(this._selected) - 1; | |
var l; | |
if (this.isEndless() === true && k < 0) { | |
k = this.models.length - 1 | |
} | |
l = this.models[k]; | |
if (l === undefined) { | |
l = null | |
} | |
return l | |
}; | |
h.getNext = function() { | |
var k = this.indexOf(this._selected) + 1; | |
var l; | |
if (this.isEndless() === true && k === this.models.length) { | |
k = 0 | |
} | |
l = this.at(k); | |
if (l === undefined) { | |
l = null | |
} | |
return l | |
}; | |
h.getFirst = function() { | |
return this.at(0) | |
}; | |
h.getLast = function() { | |
return this.at(this.models.length - 1) | |
}; | |
h.count = function() { | |
return this.models.length | |
}; | |
h.setSelected = function(k) { | |
this._selected = this.query(k) | |
}; | |
h.getSelected = function() { | |
return this._selected | |
}; | |
h.indexOfSelected = function() { | |
return this.indexOf(this._selected) | |
}; | |
d.exports = a | |
}, { | |
"ac-mvc-collection": 292, | |
"ac-mvc-model": 309, | |
"ac-object/create": 376 | |
}], | |
332: [function(c, d, b) { | |
var g = "Could not trigger event: Event data is invalid"; | |
function f(h, j) { | |
j = j || {}; | |
this.data = j || {}; | |
this.type = h | |
} | |
function a(h) { | |
if (!h || !h.incoming || !h.outgoing) { | |
throw new TypeError(g) | |
} | |
} | |
f.create = function(h, j) { | |
return new f(h, j) | |
}; | |
f.createWillShowEvent = function(h) { | |
a(h); | |
return new f("willShow", h) | |
}; | |
f.createDidShowEvent = function(h) { | |
a(h); | |
return new f("didShow", h) | |
}; | |
d.exports = f | |
}, {}], | |
333: [function(d, f, c) { | |
var h = d("./../SlideGallery/feature-detect"); | |
var b = d("ac-dom-metrics/getDimensions"); | |
function a(k, j, m, l) { | |
this.gallery = k; | |
this.incoming = j; | |
this.outgoing = m; | |
this.options = l || {}; | |
this.styles = {} | |
} | |
var g = a.prototype; | |
g._getTranslateXDistance = function(j) { | |
var k = this.gallery.indexOf(j); | |
var m = 0; | |
for (var l = 0; l < k; l += 1) { | |
m += b(this.gallery.slideAt(l).get("element")).width | |
} | |
return -m | |
}; | |
g._convertTranslateXToLeftIfNoTransformSupport = function() { | |
if (!h.canUseTransform()) { | |
this.styles.left = this.styles.transform.translateX; | |
this.styles.transform = undefined | |
} | |
}; | |
g.calculate = function() { | |
var j = this._getTranslateXDistance(this.incoming); | |
this.styles = this._buildTransformObject(j) | |
}; | |
g.setStyles = function(j) { | |
this.styles = j | |
}; | |
g._buildTransformObject = function(j) { | |
return { | |
transform: { | |
translateX: j, | |
translateZ: 0 | |
} | |
} | |
}; | |
g._addUnits = function() { | |
if (!/px/.test(this.styles.transform.translateX)) { | |
this.styles.transform.translateX += "px" | |
} | |
}; | |
g.renderStylesObject = function() { | |
if (typeof this.options.addDistance === "number") { | |
this.styles.transform.translateX = parseInt(this.styles.transform.translateX) + this.options.addDistance | |
} | |
if (this.options.invert === true) { | |
this.styles.transform.translateX = -(parseInt(this.styles.transform.translateX)) | |
} | |
this._addUnits(); | |
this._convertTranslateXToLeftIfNoTransformSupport(); | |
return this.styles | |
}; | |
f.exports = a | |
}, { | |
"./../SlideGallery/feature-detect": 324, | |
"ac-dom-metrics/getDimensions": 54 | |
}], | |
334: [function(b, c, a) { | |
function f(g) { | |
this.options = g || {}; | |
this._interactions = []; | |
this._particle = this.options.particle; | |
this.pixelDistance = this.options.pixelDistance; | |
this.distance = this.options.distance | |
} | |
var d = f.prototype; | |
d.destroy = function() { | |
this._particle = null | |
}; | |
d._updateFromInteraction = function() { | |
if (this._interactions.length < 2) { | |
return | |
} | |
var m = this._interactions[0]; | |
var l = this._interactions[1]; | |
var n = -(l.pageX - m.pageX); | |
var h = this.pixelDistance; | |
var k = this.distance; | |
var g = n / h; | |
var j = (k * g); | |
this._particle.velocity = { | |
x: j, | |
y: j | |
}; | |
this._particle.position.x += this._particle.velocity.x; | |
this._particle.position.y += this._particle.velocity.y; | |
this._removeInteraction() | |
}; | |
d._onUpdate = function(g) { | |
this._updateFromInteraction() | |
}; | |
d._removeInteraction = function() { | |
this._interactions.shift() | |
}; | |
d.addInteraction = function(g) { | |
if (this._interactions.length === 2) { | |
this._removeInteraction() | |
} | |
this._interactions.push(g); | |
this._onUpdate() | |
}; | |
d.onPointerDown = function(g) { | |
this.addInteraction(g) | |
}; | |
d.onPointerMove = function(g) { | |
g.preventDefault(); | |
this.addInteraction(g) | |
}; | |
d.onPointerUp = function(g) { | |
this._interactions = [] | |
}; | |
d.isMovingHorizontally = function() { | |
if (this._interactions.length < 4) { | |
return null | |
} | |
var l = this._interactions[0]; | |
var h = this._interactions[this._interactions.length - 1]; | |
var m = h.x - l.x; | |
var k = h.y - l.y; | |
var g = Math.atan2(k, m); | |
var j = g * (180 / Math.PI); | |
return (j < 15) | |
}; | |
c.exports = f | |
}, {}], | |
335: [function(c, d, b) { | |
var f; | |
try { | |
f = c("ac-analytics").observer.Gallery | |
} catch (g) {} | |
d.exports = function a(j, h) { | |
if (!f) { | |
return | |
} | |
var k = new f(j, h); | |
j.once("destroy", function() { | |
if (k.gallery) { | |
k.removeListener() | |
} | |
k = null | |
}) | |
} | |
}, { | |
"ac-analytics": "ac-analytics" | |
}], | |
336: [function(d, c, f) { | |
var k = d("ac-object/create"); | |
var b = d("ac-dom-traversal/querySelectorAll"); | |
var j = d("ac-classlist/add"); | |
var g = d("ac-classlist/remove"); | |
var a = "current"; | |
var l = "disabled"; | |
var h = { | |
paintPaddleNavs: function(m, n) { | |
if (this.gallery.isEndless()) { | |
return | |
} | |
if (m === this.gallery.getFirst()) { | |
this.disablePreviousPaddles() | |
} else { | |
if (n && n === this.gallery.getFirst()) { | |
this.enablePreviousPaddles() | |
} | |
} | |
if (m === this.gallery.getLast()) { | |
this.disableNextPaddles() | |
} else { | |
if (n && n === this.gallery.getLast()) { | |
this.enableNextPaddles() | |
} | |
} | |
}, | |
generateFullSelector: function(n, m) { | |
return this.selector + '[href="#' + n + "/show/" + m + '"]' | |
}, | |
addClassNameToElements: function(n, m) { | |
n.forEach(function(o) { | |
j(o, m) | |
}) | |
}, | |
removeClassNameFromElements: function(n, m) { | |
n.forEach(function(o) { | |
g(o, m) | |
}) | |
}, | |
getElementsPointingToSlide: function(n) { | |
var m = this.generateFullSelector(this.gallery.id, n.id); | |
return b(m) | |
}, | |
getNextPaddleNavs: function() { | |
var m = this.selector + '[href="#' + this.gallery.id + '/next"]'; | |
return b(m) | |
}, | |
getPreviousPaddleNavs: function() { | |
var m = this.selector + '[href="#' + this.gallery.id + '/previous"]'; | |
return b(m) | |
}, | |
disableNextPaddles: function() { | |
var m = this.getNextPaddleNavs(); | |
this.addClassNameToElements(m, l) | |
}, | |
enableNextPaddles: function() { | |
var m = this.getNextPaddleNavs(); | |
this.removeClassNameFromElements(m, l) | |
}, | |
disablePreviousPaddles: function() { | |
var m = this.getPreviousPaddleNavs(); | |
this.addClassNameToElements(m, l) | |
}, | |
enablePreviousPaddles: function() { | |
var m = this.getPreviousPaddleNavs(); | |
this.removeClassNameFromElements(m, l) | |
}, | |
onWillShow: function(m) { | |
var n = this.getElementsPointingToSlide(m.incoming); | |
this.addClassNameToElements(n, a); | |
var o = this.getElementsPointingToSlide(m.outgoing); | |
this.removeClassNameFromElements(o, a); | |
if (this.gallery.isEndless()) { | |
return | |
} | |
if (m.incoming === this.gallery.getFirst()) { | |
this.disablePreviousPaddles() | |
} else { | |
if (m.outgoing === this.gallery.getFirst()) { | |
this.enablePreviousPaddles() | |
} | |
} | |
if (m.incoming === this.gallery.getLast()) { | |
this.disableNextPaddles() | |
} else { | |
if (m.outgoing === this.gallery.getLast()) { | |
this.enableNextPaddles() | |
} | |
} | |
this.paintPaddleNavs(m.incoming, m.outgoing) | |
}, | |
onReady: function() { | |
var n = this.gallery.getSelected(); | |
var m = b(this.selector); | |
this.removeClassNameFromElements(m, a); | |
var o = this.getElementsPointingToSlide(n); | |
this.addClassNameToElements(o, a); | |
this.paintPaddleNavs(n) | |
} | |
}; | |
c.exports = function(m, o) { | |
o = o || {}; | |
var n = k(h); | |
n.selector = o.selector; | |
n.gallery = m; | |
n.onWillShow = n.onWillShow.bind(n); | |
n.onReady = n.onReady.bind(n); | |
m.on("willShow", n.onWillShow); | |
m.once("ready", n.onReady); | |
m.once("destroy", function() { | |
m.off("willShow", n.onWillShow); | |
m.off("ready", n.onReady); | |
var p = n.getElementsPointingToSlide(m.getSelected()); | |
n.removeClassNameFromElements(p, a); | |
n = null | |
}); | |
return n | |
} | |
}, { | |
"ac-classlist/add": 5, | |
"ac-classlist/remove": 13, | |
"ac-dom-traversal/querySelectorAll": 121, | |
"ac-object/create": 376 | |
}], | |
337: [function(c, d, b) { | |
var a = c("ac-state-machine").State; | |
var f = c("ac-object/create"); | |
var j = c("./factory"); | |
var h = function(k, l) { | |
a.apply(this, arguments); | |
this.gallery = k; | |
this.options = l || {} | |
}; | |
var g = h.prototype = f(a.prototype); | |
g.onDealloc = function(l, k) { | |
l.changeState(j.create("dealloc", this.gallery), k) | |
}; | |
d.exports = h | |
}, { | |
"./factory": 341, | |
"ac-object/create": 376, | |
"ac-state-machine": 319 | |
}], | |
338: [function(b, c, a) { | |
var g = b("./GalleryState"); | |
var d = b("ac-object/create"); | |
var h = function() { | |
g.apply(this, arguments) | |
}; | |
var f = h.prototype = d(g.prototype); | |
f.name = "dealloc"; | |
f.onEnter = function(k, j) { | |
this.gallery.destroy(); | |
this.gallery.trigger("destroy"); | |
this.gallery.off() | |
}; | |
c.exports = h | |
}, { | |
"./GalleryState": 337, | |
"ac-object/create": 376 | |
}], | |
339: [function(b, a, f) { | |
var d = b("./GalleryState"); | |
var h = b("ac-object/create"); | |
var k = b("./../model/UserDrag"); | |
var c = b("./factory"); | |
function j() { | |
d.apply(this, arguments); | |
this.index = (typeof this.options.startIndex === "number") ? this.options.startIndex : this.gallery.getSelectedIndex(); | |
this.count = this.gallery.count(); | |
this.stops = this._generateStops(); | |
this.particle = this.options.particle || this._createParticle(); | |
this.distance = this.stops[1] | |
} | |
var g = j.prototype = h(d.prototype); | |
g.name = "dragging"; | |
g._createParticle = function() { | |
return { | |
position: { | |
x: this.stops[this.index], | |
y: this.stops[this.index] | |
}, | |
mass: 0.5 | |
} | |
}; | |
g._generateStops = function() { | |
var n = this.count - 1; | |
var m = []; | |
var l = 0; | |
while (l <= n) { | |
m.push(l / n); | |
l += 1 | |
} | |
return m | |
}; | |
g.onEnter = function(m, l) { | |
if (m.previousState.name !== "seeking") { | |
this.userDragModel = new k({ | |
pixelDistance: l.element.offsetWidth, | |
startIndex: this.startIndex, | |
count: this.count, | |
particle: this.particle, | |
distance: this.distance | |
}); | |
this.userDragModel.onPointerDown(l.interactionEvent); | |
m.changeState(c.create("seeking", this.gallery), { | |
progress: this.particle.position.x | |
}) | |
} | |
}; | |
g.onExit = function(m, l) { | |
if (m.currentState.name !== "seeking") { | |
this.userDragModel.destroy(); | |
this.userDragModel = null; | |
this.boundOnPointerComplete = null; | |
this.gallery = null | |
} | |
}; | |
g.pointerMove = function(n, m) { | |
this.userDragModel.onPointerMove(m.interactionEvent); | |
var l = this.particle.position; | |
n.changeState(c.create("seeking", this.gallery), { | |
progress: l.x | |
}) | |
}; | |
g.getNextPosition = function() { | |
var l = this.index; | |
if (this.particle.velocity.x > 0) { | |
l += 1; | |
if (l >= this.stops.length) { | |
l = this.stops.length - 1 | |
} | |
} else { | |
l -= 1; | |
if (l < 0) { | |
l = 0 | |
} | |
} | |
return this.stops[l] | |
}; | |
g.getNextIndex = function() { | |
return this.stops.indexOf(this.getNextPosition()) | |
}; | |
g.pointerUp = function(m, l) { | |
this.userDragModel.onPointerUp(l.interactionEvent); | |
if (this.gallery.canSpring !== false) { | |
m.changeState(c.create("springing", this.gallery, { | |
particle: this.particle, | |
equilibrium: this.getNextPosition(), | |
index: this.getNextIndex(), | |
interactionEvent: l.interactionEvent | |
}), l) | |
} else { | |
l = l || {}; | |
l.incoming = this.gallery.slideAt(this.getNextIndex()); | |
l.outgoing = this.gallery.getSelected(); | |
m.changeState(c.create("drawing", this.gallery), l) | |
} | |
}; | |
a.exports = j | |
}, { | |
"./../model/UserDrag": 334, | |
"./GalleryState": 337, | |
"./factory": 341, | |
"ac-object/create": 376 | |
}], | |
340: [function(c, b, h) { | |
var a = c("ac-console"); | |
var k = c("ac-object/create"); | |
var f = c("./GalleryState"); | |
var d = c("./factory"); | |
var g = c("./../model/GalleryEvent"); | |
var l = function() { | |
f.apply(this, arguments); | |
this._nextState = "idle" | |
}; | |
var j = l.prototype = k(f.prototype); | |
j.name = "drawing"; | |
j.engagementChange = function(n, m) { | |
this._nextState = "not_engaged" | |
}; | |
j.pointerMove = function(n, m) { | |
m.interactionEvent.preventDefault() | |
}; | |
j.onDealloc = function(n, m) { | |
this._nextState = "dealloc" | |
}; | |
j.onEnter = function(o, p) { | |
var u = this.gallery; | |
var n = p.incoming; | |
var q = p.outgoing; | |
var t = p.options || {}; | |
var m = t.interactionEvent || p.interactionEvent || u.interactionEvent; | |
var r = { | |
incoming: n, | |
outgoing: q, | |
interactionEvent: m, | |
options: t | |
}; | |
var s = Promise.resolve(); | |
if (n !== q) { | |
u.sendGalleryEvent(g.createWillShowEvent(r)); | |
s = s.then(u.beforeDraw.bind(u, n, q, t)).then(u.draw.bind(u, n, q, t)).then(u.afterDraw.bind(u, n, q, t)) | |
} else { | |
this._nextState = "idle" | |
} | |
return s.then(function() { | |
o.changeState(d.create(this._nextState, u), { | |
incoming: n, | |
outgoing: q, | |
event: r | |
}) | |
}.bind(this))["catch"](function(v) { | |
a.log(v) | |
}) | |
}; | |
j.onExit = function(o, n) { | |
var m = this.gallery; | |
if (o.currentState.name !== "dealloc" && m.getSelected() !== n.incoming) { | |
m.model.setSelected(n.incoming); | |
m.sendGalleryEvent(g.createDidShowEvent(n.event)) | |
} | |
this._nextState = null | |
}; | |
b.exports = l | |
}, { | |
"./../model/GalleryEvent": 332, | |
"./GalleryState": 337, | |
"./factory": 341, | |
"ac-console": 31, | |
"ac-object/create": 376 | |
}], | |
341: [function(c, d, b) { | |
var a; | |
d.exports = { | |
create: function f(j, g, h) { | |
var k = a[j]; | |
if (!k) { | |
throw new Error('Could not create state: state "' + j + '" not found') | |
} | |
return new k(g, h) | |
} | |
}; | |
a = { | |
initialize: c("./initialize"), | |
idle: c("./idle"), | |
not_engaged: c("./not_engaged"), | |
seeking: c("./seeking"), | |
resize: c("./resize"), | |
dealloc: c("./dealloc"), | |
drawing: c("./drawing"), | |
dragging: c("./dragging"), | |
springing: c("./springing") | |
} | |
}, { | |
"./dealloc": 338, | |
"./dragging": 339, | |
"./drawing": 340, | |
"./idle": 342, | |
"./initialize": 343, | |
"./not_engaged": 344, | |
"./resize": 345, | |
"./seeking": 346, | |
"./springing": 347 | |
}], | |
342: [function(b, c, a) { | |
var g = b("./GalleryState"); | |
var d = b("ac-object/create"); | |
var h = b("./factory"); | |
var j = function() { | |
g.apply(this, arguments) | |
}; | |
var f = j.prototype = d(g.prototype); | |
f.name = "idle"; | |
f.engagementChange = function(l, k) { | |
if (k.engaged === false) { | |
l.changeState(h.create("not_engaged", this.gallery), k) | |
} | |
}; | |
f.seek = function(l, k) { | |
l.changeState(h.create("seeking", this.gallery), k) | |
}; | |
f.trigger = function(m, k) { | |
var l = k.target; | |
this.gallery.interactionEvent = k.interactionEvent; | |
this.gallery.routes.match(l.getAttribute("href")) | |
}; | |
f.keydown = function(n, m) { | |
var l = m.interactionEvent; | |
var k = ("which" in l) ? l.which : l.keyCode; | |
if (k === 37) { | |
this.gallery.showPrevious(m) | |
} else { | |
if (k === 39) { | |
this.gallery.showNext(m) | |
} | |
} | |
}; | |
f.resize = function(l, k) { | |
l.changeState(h.create("resize", this.gallery), k) | |
}; | |
f.onClear = function() { | |
this.gallery.removeStyles() | |
}; | |
f.pointerDown = function(l, k) { | |
l.changeState(h.create("dragging", this.gallery), k) | |
}; | |
f.seek = function(l, k) { | |
l.changeState(h.create("seeking", this.gallery), k) | |
}; | |
f.onDraw = function(o, n) { | |
var k = this.gallery.model.query(n.query); | |
var m = this.gallery.model.getSelected(); | |
var l = n.options || {}; | |
if (!k || k === m) { | |
return | |
} | |
o.changeState(h.create("drawing", this.gallery), { | |
incoming: k, | |
outgoing: m, | |
options: l | |
}) | |
}; | |
c.exports = j | |
}, { | |
"./GalleryState": 337, | |
"./factory": 341, | |
"ac-object/create": 376 | |
}], | |
343: [function(b, a, g) { | |
var d = b("./GalleryState"); | |
var j = b("ac-object/create"); | |
var f = b("./../model/GalleryEvent"); | |
var c = b("./factory"); | |
function k() { | |
d.apply(this, arguments); | |
this._engaged = true | |
} | |
var h = k.prototype = j(d.prototype); | |
h.name = "initialize"; | |
h.engagementChange = function(m, l) { | |
this._engaged = l.engaged | |
}; | |
h.onDraw = function(o, m) { | |
var l = this.gallery.model.query(m.query); | |
var n = this.gallery.drawInitial(l); | |
return Promise.resolve().then(n).then(function() { | |
var p = "idle"; | |
if (this._engaged === false) { | |
p = "not_engaged" | |
} | |
o.changeState(c.create(p, this.gallery)) | |
}.bind(this)) | |
}; | |
h.onExit = function(n, m) { | |
var l = f.create("ready", { | |
incoming: this.gallery.getSelected() | |
}); | |
this.gallery.sendGalleryEvent(l); | |
this._engaged = null | |
}; | |
a.exports = k | |
}, { | |
"./../model/GalleryEvent": 332, | |
"./GalleryState": 337, | |
"./factory": 341, | |
"ac-object/create": 376 | |
}], | |
344: [function(c, d, b) { | |
var h = c("./GalleryState"); | |
var f = c("ac-object/create"); | |
var j = c("./factory"); | |
function a() { | |
h.apply(this, arguments) | |
} | |
var g = a.prototype = f(h.prototype); | |
g.name = "not_engaged"; | |
g.resize = function(l, k) { | |
l.changeState(j.create("resize", this.gallery), k) | |
}; | |
g.engagementChange = function(l, k) { | |
if (k.engaged === true) { | |
l.changeState(j.create("idle", this.gallery)) | |
} | |
}; | |
d.exports = a | |
}, { | |
"./GalleryState": 337, | |
"./factory": 341, | |
"ac-object/create": 376 | |
}], | |
345: [function(c, d, b) { | |
var j = c("./GalleryState"); | |
var g = c("./../model/GalleryEvent"); | |
var f = c("ac-object/create"); | |
var a = function() { | |
j.apply(this, arguments) | |
}; | |
var h = a.prototype = f(j.prototype); | |
h.name = "resize"; | |
h.onEnter = function(m, l) { | |
this.gallery.sendGalleryEvent(g.create("resizing")); | |
var k = this.gallery.getSelected(); | |
Promise.resolve().then(this.gallery.drawResize.bind(this.gallery, k)).then(function() { | |
m.changeState(m.previousState, l) | |
}.bind(this)) | |
}; | |
h.onExit = function(l, k) { | |
this.gallery.sendGalleryEvent(g.create("resized")) | |
}; | |
d.exports = a | |
}, { | |
"./../model/GalleryEvent": 332, | |
"./GalleryState": 337, | |
"ac-object/create": 376 | |
}], | |
346: [function(c, d, b) { | |
var j = c("./GalleryState"); | |
var g = c("ac-object/create"); | |
var f = c("./../model/GalleryEvent"); | |
function a() { | |
j.apply(this, arguments) | |
} | |
var h = a.prototype = g(j.prototype); | |
h.name = "seeking"; | |
h.drawProgress = function(k) { | |
if (k < 0) { | |
return this.gallery.drawBounceInProgress(Math.abs(k)) | |
} else { | |
if (k > 1) { | |
return this.gallery.drawBounceOutProgress(k - 1) | |
} else { | |
return this.gallery.drawProgress(k) | |
} | |
} | |
}; | |
h.onEnter = function(m, k) { | |
var l = { | |
progress: k.progress | |
}; | |
this.gallery.sendGalleryEvent(f.create("willseek", l)); | |
this.drawProgress(k.progress); | |
this.gallery.sendGalleryEvent(f.create("didseek", l)); | |
m.changeState(m.previousState, k) | |
}; | |
h.onExit = function(l, k) { | |
this.gallery = null | |
}; | |
d.exports = a | |
}, { | |
"./../model/GalleryEvent": 332, | |
"./GalleryState": 337, | |
"ac-object/create": 376 | |
}], | |
347: [function(d, b, h) { | |
var g = d("./GalleryState"); | |
var k = d("ac-object/create"); | |
var f = d("./factory"); | |
var a = d("ac-clock").Clock; | |
var c = d("ac-physics").spring; | |
function l() { | |
g.apply(this, arguments); | |
this.particle = this.options.particle; | |
this.equilibrium = this.options.equilibrium; | |
this.index = this.options.index; | |
this.spring = c.create(this.particle, this.equilibrium); | |
this.spring.stiffness = -60; | |
this.spring.damping = -10; | |
this.interactionEvent = null; | |
this.clock = new a(); | |
this.clock.start(); | |
this._clockUpdate = this._clockUpdate.bind(this); | |
this._clockDraw = this._clockDraw.bind(this); | |
this.clock.on("update", this._clockUpdate); | |
this.clock.on("draw", this._clockDraw) | |
} | |
var j = l.prototype = k(g.prototype); | |
j.name = "springing"; | |
j.onEnter = function(n, m) { | |
if (n.previousState.name !== "seeking") { | |
if (m.interactionEvent.originalEvent) { | |
this.interactionEvent = m.interactionEvent.originalEvent | |
} else { | |
this.interactionEvent = m.interactionEvent | |
} | |
this._setLastPosition(); | |
this.fsm = n | |
} | |
}; | |
j.onExit = function(n, m) { | |
if (n.currentState.name !== "seeking") { | |
this.clock.stop(); | |
this.clock.off(); | |
this.equilibrium = null; | |
this.index = null; | |
this.fsm = null; | |
this.particle = null; | |
this.spring = null; | |
this.clock = null; | |
this.lastPosition = null; | |
this.interactionEvent = null | |
} | |
}; | |
j.pointerDown = function(n, m) { | |
n.changeState(f.create("dragging", this.gallery, { | |
particle: this.particle, | |
startIndex: this.index | |
}), m) | |
}; | |
j._clockUpdate = function(m) { | |
var n = Math.abs(this.particle.position.x - this.spring.equilibrium); | |
if (m.fps === 0) { | |
return | |
} | |
if (n > 0.0005) { | |
this.spring.update(m) | |
} else { | |
this.particle.position.x = this.spring.equilibrium | |
} | |
}; | |
j._clockDraw = function(m) { | |
var n; | |
if (this._shouldDraw()) { | |
n = Math.abs(this.particle.position.x - this.spring.equilibrium); | |
this._setLastPosition(); | |
if (n !== 0) { | |
this.fsm.changeState(f.create("seeking", this.gallery), { | |
progress: this.particle.position.x | |
}) | |
} else { | |
this.fsm.changeState(f.create("drawing", this.gallery), { | |
incoming: this.gallery.slideAt(this.index), | |
outgoing: this.gallery.getSelected(), | |
options: { | |
interactionEvent: this.interactionEvent | |
} | |
}) | |
} | |
} | |
}; | |
j._setLastPosition = function() { | |
this.lastPosition = { | |
x: this.particle.position.x, | |
y: this.particle.position.y | |
} | |
}; | |
j._shouldDraw = function() { | |
if (this.lastPosition.x === this.particle.position.x && this.lastPosition.y === this.particle.position.y) { | |
return false | |
} | |
return true | |
}; | |
b.exports = l | |
}, { | |
"./GalleryState": 337, | |
"./factory": 341, | |
"ac-clock": 260, | |
"ac-object/create": 376, | |
"ac-physics": 312 | |
}], | |
348: [function(b, c, a) { | |
var d = b("./ac-color/Color"); | |
d.decimalToHex = b("./ac-color/static/decimalToHex"); | |
d.hexToDecimal = b("./ac-color/static/hexToDecimal"); | |
d.hexToRgb = b("./ac-color/static/hexToRgb"); | |
d.isColor = b("./ac-color/static/isColor"); | |
d.isHex = b("./ac-color/static/isHex"); | |
d.isRgb = b("./ac-color/static/isRgb"); | |
d.isRgba = b("./ac-color/static/isRgba"); | |
d.mixColors = b("./ac-color/static/mixColors"); | |
d.rgbaToArray = b("./ac-color/static/rgbaToArray"); | |
d.rgbToArray = b("./ac-color/static/rgbToArray"); | |
d.rgbToDecimal = b("./ac-color/static/rgbToDecimal"); | |
d.rgbToHex = b("./ac-color/static/rgbToHex"); | |
d.rgbToHsl = b("./ac-color/static/rgbToHsl"); | |
d.rgbToHsv = b("./ac-color/static/rgbToHsv"); | |
d.rgbaToObject = b("./ac-color/static/rgbaToObject"); | |
d.rgbToObject = b("./ac-color/static/rgbToObject"); | |
d.shortToLongHex = b("./ac-color/static/shortToLongHex"); | |
c.exports = { | |
Color: d | |
} | |
}, { | |
"./ac-color/Color": 349, | |
"./ac-color/static/decimalToHex": 351, | |
"./ac-color/static/hexToDecimal": 352, | |
"./ac-color/static/hexToRgb": 353, | |
"./ac-color/static/isColor": 354, | |
"./ac-color/static/isHex": 355, | |
"./ac-color/static/isRgb": 356, | |
"./ac-color/static/isRgba": 357, | |
"./ac-color/static/mixColors": 358, | |
"./ac-color/static/rgbToArray": 359, | |
"./ac-color/static/rgbToDecimal": 360, | |
"./ac-color/static/rgbToHex": 361, | |
"./ac-color/static/rgbToHsl": 362, | |
"./ac-color/static/rgbToHsv": 363, | |
"./ac-color/static/rgbToObject": 364, | |
"./ac-color/static/rgbaToArray": 365, | |
"./ac-color/static/rgbaToObject": 366, | |
"./ac-color/static/shortToLongHex": 367 | |
}], | |
349: [function(d, a, r) { | |
var h = d("./helpers/cssColorNames"); | |
var n = d("./static/hexToRgb"); | |
var m = d("./static/isColor"); | |
var f = d("./static/isHex"); | |
var b = d("./static/isRgba"); | |
var q = d("./static/mixColors"); | |
var l = d("./static/rgbaToArray"); | |
var o = d("./static/rgbToArray"); | |
var t = d("./static/rgbToDecimal"); | |
var j = d("./static/rgbToHex"); | |
var c = d("./static/rgbaToObject"); | |
var k = d("./static/rgbToObject"); | |
var p = d("./static/shortToLongHex"); | |
function s(u) { | |
if (!m(u) && !h.nameToRgbObject[u]) { | |
throw new Error(u + " is not a supported color.") | |
} | |
this._setColor(u) | |
} | |
var g = s.prototype; | |
g._setColor = function(u) { | |
this._color = {}; | |
if (f(u)) { | |
this._color.hex = p(u); | |
this._color.rgb = { | |
color: n(u) | |
} | |
} else { | |
if (b(u)) { | |
this._color.rgba = { | |
color: u | |
}; | |
var w = this.rgbaObject(); | |
this._color.rgb = { | |
color: "rgb(" + w.r + ", " + w.g + ", " + w.b + ")" | |
} | |
} else { | |
if (h.nameToRgbObject[u]) { | |
var v = h.nameToRgbObject[u]; | |
this._color.rgb = { | |
object: v, | |
color: "rgb(" + v.r + ", " + v.g + ", " + v.b + ")" | |
} | |
} else { | |
this._color.rgb = { | |
color: u | |
} | |
} | |
} | |
} | |
}; | |
g.rgb = function() { | |
return this._color.rgb.color | |
}; | |
g.rgba = function() { | |
if (this._color.rgba === undefined) { | |
var u = this.rgbObject(); | |
this._color.rgba = { | |
color: "rgba(" + u.r + ", " + u.g + ", " + u.b + ", 1)" | |
} | |
} | |
return this._color.rgba.color | |
}; | |
g.hex = function() { | |
if (this._color.hex === undefined) { | |
this._color.hex = j.apply(this, this.rgbArray()) | |
} | |
return this._color.hex | |
}; | |
g.decimal = function() { | |
if (this._color.decimal === undefined) { | |
this._color.decimal = t(this.rgb()) | |
} | |
return this._color.decimal | |
}; | |
g.cssName = function() { | |
return h.rgbToName[this.rgb()] || null | |
}; | |
g.rgbArray = function() { | |
if (this._color.rgb.array === undefined) { | |
this._color.rgb.array = o(this.rgb()) | |
} | |
return this._color.rgb.array | |
}; | |
g.rgbaArray = function() { | |
if (this._color.rgba === undefined) { | |
this.rgba() | |
} | |
if (this._color.rgba.array === undefined) { | |
this._color.rgba.array = l(this.rgba()) | |
} | |
return this._color.rgba.array | |
}; | |
g.rgbObject = function() { | |
if (this._color.rgb.object === undefined) { | |
this._color.rgb.object = k(this.rgb()) | |
} | |
return this._color.rgb.object | |
}; | |
g.rgbaObject = function() { | |
if (this._color.rgba === undefined) { | |
this.rgba() | |
} | |
if (this._color.rgba.object === undefined) { | |
this._color.rgba.object = c(this.rgba()) | |
} | |
return this._color.rgba.object | |
}; | |
g.getRed = function() { | |
return this.rgbObject().r | |
}; | |
g.getGreen = function() { | |
return this.rgbObject().g | |
}; | |
g.getBlue = function() { | |
return this.rgbObject().b | |
}; | |
g.getAlpha = function() { | |
if (this._color.rgba === undefined) { | |
return 1 | |
} | |
return this.rgbaObject().a | |
}; | |
g.setRed = function(u) { | |
if (u !== this.getRed()) { | |
this._setColor("rgba(" + u + ", " + this.getGreen() + ", " + this.getBlue() + ", " + this.getAlpha() + ")") | |
} | |
return this.rgbObject().r | |
}; | |
g.setGreen = function(u) { | |
if (u !== this.getGreen()) { | |
this._setColor("rgba(" + this.getRed() + ", " + u + ", " + this.getBlue() + ", " + this.getAlpha() + ")") | |
} | |
return this.rgbObject().g | |
}; | |
g.setBlue = function(u) { | |
if (u !== this.getBlue()) { | |
this._setColor("rgba(" + this.getRed() + ", " + this.getGreen() + ", " + u + ", " + this.getAlpha() + ")") | |
} | |
return this.rgbObject().b | |
}; | |
g.setAlpha = function(u) { | |
if (u !== this.getAlpha()) { | |
this._setColor("rgba(" + this.getRed() + ", " + this.getGreen() + ", " + this.getBlue() + ", " + u + ")") | |
} | |
return this.rgbaObject().a | |
}; | |
g.mix = function(u, v) { | |
var w = k(q(this.rgb(), u, v)); | |
this._setColor("rgba(" + w.r + ", " + w.g + ", " + w.b + ", " + this.getAlpha() + ")"); | |
return this.rgb() | |
}; | |
g.clone = function() { | |
return new s(this.rgb()) | |
}; | |
a.exports = s | |
}, { | |
"./helpers/cssColorNames": 350, | |
"./static/hexToRgb": 353, | |
"./static/isColor": 354, | |
"./static/isHex": 355, | |
"./static/isRgba": 357, | |
"./static/mixColors": 358, | |
"./static/rgbToArray": 359, | |
"./static/rgbToDecimal": 360, | |
"./static/rgbToHex": 361, | |
"./static/rgbToObject": 364, | |
"./static/rgbaToArray": 365, | |
"./static/rgbaToObject": 366, | |
"./static/shortToLongHex": 367 | |
}], | |
350: [function(b, c, a) { | |
var d = { | |
"rgb(240, 248, 255)": "aliceblue", | |
"rgb(250, 235, 215)": "antiquewhite", | |
"rgb(0, 0, 0)": "black", | |
"rgb(0, 0, 255)": "blue", | |
"rgb(0, 255, 255)": "cyan", | |
"rgb(0, 0, 139)": "darkblue", | |
"rgb(0, 139, 139)": "darkcyan", | |
"rgb(0, 100, 0)": "darkgreen", | |
"rgb(0, 206, 209)": "darkturquoise", | |
"rgb(0, 191, 255)": "deepskyblue", | |
"rgb(0, 128, 0)": "green", | |
"rgb(0, 255, 0)": "lime", | |
"rgb(0, 0, 205)": "mediumblue", | |
"rgb(0, 250, 154)": "mediumspringgreen", | |
"rgb(0, 0, 128)": "navy", | |
"rgb(0, 255, 127)": "springgreen", | |
"rgb(0, 128, 128)": "teal", | |
"rgb(25, 25, 112)": "midnightblue", | |
"rgb(30, 144, 255)": "dodgerblue", | |
"rgb(32, 178, 170)": "lightseagreen", | |
"rgb(34, 139, 34)": "forestgreen", | |
"rgb(46, 139, 87)": "seagreen", | |
"rgb(47, 79, 79)": "darkslategray", | |
"rgb(50, 205, 50)": "limegreen", | |
"rgb(60, 179, 113)": "mediumseagreen", | |
"rgb(64, 224, 208)": "turquoise", | |
"rgb(65, 105, 225)": "royalblue", | |
"rgb(70, 130, 180)": "steelblue", | |
"rgb(72, 61, 139)": "darkslateblue", | |
"rgb(72, 209, 204)": "mediumturquoise", | |
"rgb(75, 0, 130)": "indigo", | |
"rgb(85, 107, 47)": "darkolivegreen", | |
"rgb(95, 158, 160)": "cadetblue", | |
"rgb(100, 149, 237)": "cornflowerblue", | |
"rgb(102, 205, 170)": "mediumaquamarine", | |
"rgb(105, 105, 105)": "dimgray", | |
"rgb(106, 90, 205)": "slateblue", | |
"rgb(107, 142, 35)": "olivedrab", | |
"rgb(112, 128, 144)": "slategray", | |
"rgb(119, 136, 153)": "lightslategray", | |
"rgb(123, 104, 238)": "mediumslateblue", | |
"rgb(124, 252, 0)": "lawngreen", | |
"rgb(127, 255, 212)": "aquamarine", | |
"rgb(127, 255, 0)": "chartreuse", | |
"rgb(128, 128, 128)": "gray", | |
"rgb(128, 0, 0)": "maroon", | |
"rgb(128, 128, 0)": "olive", | |
"rgb(128, 0, 128)": "purple", | |
"rgb(135, 206, 250)": "lightskyblue", | |
"rgb(135, 206, 235)": "skyblue", | |
"rgb(138, 43, 226)": "blueviolet", | |
"rgb(139, 0, 139)": "darkmagenta", | |
"rgb(139, 0, 0)": "darkred", | |
"rgb(139, 69, 19)": "saddlebrown", | |
"rgb(143, 188, 143)": "darkseagreen", | |
"rgb(144, 238, 144)": "lightgreen", | |
"rgb(147, 112, 219)": "mediumpurple", | |
"rgb(148, 0, 211)": "darkviolet", | |
"rgb(152, 251, 152)": "palegreen", | |
"rgb(153, 50, 204)": "darkorchid", | |
"rgb(154, 205, 50)": "yellowgreen", | |
"rgb(160, 82, 45)": "sienna", | |
"rgb(165, 42, 42)": "brown", | |
"rgb(169, 169, 169)": "darkgray", | |
"rgb(173, 255, 47)": "greenyellow", | |
"rgb(173, 216, 230)": "lightblue", | |
"rgb(175, 238, 238)": "paleturquoise", | |
"rgb(176, 196, 222)": "lightsteelblue", | |
"rgb(176, 224, 230)": "powderblue", | |
"rgb(178, 34, 34)": "firebrick", | |
"rgb(184, 134, 11)": "darkgoldenrod", | |
"rgb(186, 85, 211)": "mediumorchid", | |
"rgb(188, 143, 143)": "rosybrown", | |
"rgb(189, 183, 107)": "darkkhaki", | |
"rgb(192, 192, 192)": "silver", | |
"rgb(199, 21, 133)": "mediumvioletred", | |
"rgb(205, 92, 92)": "indianred", | |
"rgb(205, 133, 63)": "peru", | |
"rgb(210, 105, 30)": "chocolate", | |
"rgb(210, 180, 140)": "tan", | |
"rgb(211, 211, 211)": "lightgray", | |
"rgb(216, 191, 216)": "thistle", | |
"rgb(218, 165, 32)": "goldenrod", | |
"rgb(218, 112, 214)": "orchid", | |
"rgb(219, 112, 147)": "palevioletred", | |
"rgb(220, 20, 60)": "crimson", | |
"rgb(220, 220, 220)": "gainsboro", | |
"rgb(221, 160, 221)": "plum", | |
"rgb(222, 184, 135)": "burlywood", | |
"rgb(224, 255, 255)": "lightcyan", | |
"rgb(230, 230, 250)": "lavender", | |
"rgb(233, 150, 122)": "darksalmon", | |
"rgb(238, 232, 170)": "palegoldenrod", | |
"rgb(238, 130, 238)": "violet", | |
"rgb(240, 255, 255)": "azure", | |
"rgb(240, 255, 240)": "honeydew", | |
"rgb(240, 230, 140)": "khaki", | |
"rgb(240, 128, 128)": "lightcoral", | |
"rgb(244, 164, 96)": "sandybrown", | |
"rgb(245, 245, 220)": "beige", | |
"rgb(245, 255, 250)": "mintcream", | |
"rgb(245, 222, 179)": "wheat", | |
"rgb(245, 245, 245)": "whitesmoke", | |
"rgb(248, 248, 255)": "ghostwhite", | |
"rgb(250, 250, 210)": "lightgoldenrodyellow", | |
"rgb(250, 240, 230)": "linen", | |
"rgb(250, 128, 114)": "salmon", | |
"rgb(253, 245, 230)": "oldlace", | |
"rgb(255, 228, 196)": "bisque", | |
"rgb(255, 235, 205)": "blanchedalmond", | |
"rgb(255, 127, 80)": "coral", | |
"rgb(255, 248, 220)": "cornsilk", | |
"rgb(255, 140, 0)": "darkorange", | |
"rgb(255, 20, 147)": "deeppink", | |
"rgb(255, 250, 240)": "floralwhite", | |
"rgb(255, 215, 0)": "gold", | |
"rgb(255, 105, 180)": "hotpink", | |
"rgb(255, 255, 240)": "ivory", | |
"rgb(255, 240, 245)": "lavenderblush", | |
"rgb(255, 250, 205)": "lemonchiffon", | |
"rgb(255, 182, 193)": "lightpink", | |
"rgb(255, 160, 122)": "lightsalmon", | |
"rgb(255, 255, 224)": "lightyellow", | |
"rgb(255, 0, 255)": "magenta", | |
"rgb(255, 228, 225)": "mistyrose", | |
"rgb(255, 228, 181)": "moccasin", | |
"rgb(255, 222, 173)": "navajowhite", | |
"rgb(255, 165, 0)": "orange", | |
"rgb(255, 69, 0)": "orangered", | |
"rgb(255, 239, 213)": "papayawhip", | |
"rgb(255, 218, 185)": "peachpuff", | |
"rgb(255, 192, 203)": "pink", | |
"rgb(255, 0, 0)": "red", | |
"rgb(255, 245, 238)": "seashell", | |
"rgb(255, 250, 250)": "snow", | |
"rgb(255, 99, 71)": "tomato", | |
"rgb(255, 255, 255)": "white", | |
"rgb(255, 255, 0)": "yellow", | |
"rgb(102, 51, 153)": "rebeccapurple" | |
}; | |
var f = { | |
aqua: { | |
r: 0, | |
g: 255, | |
b: 255 | |
}, | |
aliceblue: { | |
r: 240, | |
g: 248, | |
b: 255 | |
}, | |
antiquewhite: { | |
r: 250, | |
g: 235, | |
b: 215 | |
}, | |
black: { | |
r: 0, | |
g: 0, | |
b: 0 | |
}, | |
blue: { | |
r: 0, | |
g: 0, | |
b: 255 | |
}, | |
cyan: { | |
r: 0, | |
g: 255, | |
b: 255 | |
}, | |
darkblue: { | |
r: 0, | |
g: 0, | |
b: 139 | |
}, | |
darkcyan: { | |
r: 0, | |
g: 139, | |
b: 139 | |
}, | |
darkgreen: { | |
r: 0, | |
g: 100, | |
b: 0 | |
}, | |
darkturquoise: { | |
r: 0, | |
g: 206, | |
b: 209 | |
}, | |
deepskyblue: { | |
r: 0, | |
g: 191, | |
b: 255 | |
}, | |
green: { | |
r: 0, | |
g: 128, | |
b: 0 | |
}, | |
lime: { | |
r: 0, | |
g: 255, | |
b: 0 | |
}, | |
mediumblue: { | |
r: 0, | |
g: 0, | |
b: 205 | |
}, | |
mediumspringgreen: { | |
r: 0, | |
g: 250, | |
b: 154 | |
}, | |
navy: { | |
r: 0, | |
g: 0, | |
b: 128 | |
}, | |
springgreen: { | |
r: 0, | |
g: 255, | |
b: 127 | |
}, | |
teal: { | |
r: 0, | |
g: 128, | |
b: 128 | |
}, | |
midnightblue: { | |
r: 25, | |
g: 25, | |
b: 112 | |
}, | |
dodgerblue: { | |
r: 30, | |
g: 144, | |
b: 255 | |
}, | |
lightseagreen: { | |
r: 32, | |
g: 178, | |
b: 170 | |
}, | |
forestgreen: { | |
r: 34, | |
g: 139, | |
b: 34 | |
}, | |
seagreen: { | |
r: 46, | |
g: 139, | |
b: 87 | |
}, | |
darkslategray: { | |
r: 47, | |
g: 79, | |
b: 79 | |
}, | |
darkslategrey: { | |
r: 47, | |
g: 79, | |
b: 79 | |
}, | |
limegreen: { | |
r: 50, | |
g: 205, | |
b: 50 | |
}, | |
mediumseagreen: { | |
r: 60, | |
g: 179, | |
b: 113 | |
}, | |
turquoise: { | |
r: 64, | |
g: 224, | |
b: 208 | |
}, | |
royalblue: { | |
r: 65, | |
g: 105, | |
b: 225 | |
}, | |
steelblue: { | |
r: 70, | |
g: 130, | |
b: 180 | |
}, | |
darkslateblue: { | |
r: 72, | |
g: 61, | |
b: 139 | |
}, | |
mediumturquoise: { | |
r: 72, | |
g: 209, | |
b: 204 | |
}, | |
indigo: { | |
r: 75, | |
g: 0, | |
b: 130 | |
}, | |
darkolivegreen: { | |
r: 85, | |
g: 107, | |
b: 47 | |
}, | |
cadetblue: { | |
r: 95, | |
g: 158, | |
b: 160 | |
}, | |
cornflowerblue: { | |
r: 100, | |
g: 149, | |
b: 237 | |
}, | |
mediumaquamarine: { | |
r: 102, | |
g: 205, | |
b: 170 | |
}, | |
dimgray: { | |
r: 105, | |
g: 105, | |
b: 105 | |
}, | |
dimgrey: { | |
r: 105, | |
g: 105, | |
b: 105 | |
}, | |
slateblue: { | |
r: 106, | |
g: 90, | |
b: 205 | |
}, | |
olivedrab: { | |
r: 107, | |
g: 142, | |
b: 35 | |
}, | |
slategray: { | |
r: 112, | |
g: 128, | |
b: 144 | |
}, | |
slategrey: { | |
r: 112, | |
g: 128, | |
b: 144 | |
}, | |
lightslategray: { | |
r: 119, | |
g: 136, | |
b: 153 | |
}, | |
lightslategrey: { | |
r: 119, | |
g: 136, | |
b: 153 | |
}, | |
mediumslateblue: { | |
r: 123, | |
g: 104, | |
b: 238 | |
}, | |
lawngreen: { | |
r: 124, | |
g: 252, | |
b: 0 | |
}, | |
aquamarine: { | |
r: 127, | |
g: 255, | |
b: 212 | |
}, | |
chartreuse: { | |
r: 127, | |
g: 255, | |
b: 0 | |
}, | |
gray: { | |
r: 128, | |
g: 128, | |
b: 128 | |
}, | |
grey: { | |
r: 128, | |
g: 128, | |
b: 128 | |
}, | |
maroon: { | |
r: 128, | |
g: 0, | |
b: 0 | |
}, | |
olive: { | |
r: 128, | |
g: 128, | |
b: 0 | |
}, | |
purple: { | |
r: 128, | |
g: 0, | |
b: 128 | |
}, | |
lightskyblue: { | |
r: 135, | |
g: 206, | |
b: 250 | |
}, | |
skyblue: { | |
r: 135, | |
g: 206, | |
b: 235 | |
}, | |
blueviolet: { | |
r: 138, | |
g: 43, | |
b: 226 | |
}, | |
darkmagenta: { | |
r: 139, | |
g: 0, | |
b: 139 | |
}, | |
darkred: { | |
r: 139, | |
g: 0, | |
b: 0 | |
}, | |
saddlebrown: { | |
r: 139, | |
g: 69, | |
b: 19 | |
}, | |
darkseagreen: { | |
r: 143, | |
g: 188, | |
b: 143 | |
}, | |
lightgreen: { | |
r: 144, | |
g: 238, | |
b: 144 | |
}, | |
mediumpurple: { | |
r: 147, | |
g: 112, | |
b: 219 | |
}, | |
darkviolet: { | |
r: 148, | |
g: 0, | |
b: 211 | |
}, | |
palegreen: { | |
r: 152, | |
g: 251, | |
b: 152 | |
}, | |
darkorchid: { | |
r: 153, | |
g: 50, | |
b: 204 | |
}, | |
yellowgreen: { | |
r: 154, | |
g: 205, | |
b: 50 | |
}, | |
sienna: { | |
r: 160, | |
g: 82, | |
b: 45 | |
}, | |
brown: { | |
r: 165, | |
g: 42, | |
b: 42 | |
}, | |
darkgray: { | |
r: 169, | |
g: 169, | |
b: 169 | |
}, | |
darkgrey: { | |
r: 169, | |
g: 169, | |
b: 169 | |
}, | |
greenyellow: { | |
r: 173, | |
g: 255, | |
b: 47 | |
}, | |
lightblue: { | |
r: 173, | |
g: 216, | |
b: 230 | |
}, | |
paleturquoise: { | |
r: 175, | |
g: 238, | |
b: 238 | |
}, | |
lightsteelblue: { | |
r: 176, | |
g: 196, | |
b: 222 | |
}, | |
powderblue: { | |
r: 176, | |
g: 224, | |
b: 230 | |
}, | |
firebrick: { | |
r: 178, | |
g: 34, | |
b: 34 | |
}, | |
darkgoldenrod: { | |
r: 184, | |
g: 134, | |
b: 11 | |
}, | |
mediumorchid: { | |
r: 186, | |
g: 85, | |
b: 211 | |
}, | |
rosybrown: { | |
r: 188, | |
g: 143, | |
b: 143 | |
}, | |
darkkhaki: { | |
r: 189, | |
g: 183, | |
b: 107 | |
}, | |
silver: { | |
r: 192, | |
g: 192, | |
b: 192 | |
}, | |
mediumvioletred: { | |
r: 199, | |
g: 21, | |
b: 133 | |
}, | |
indianred: { | |
r: 205, | |
g: 92, | |
b: 92 | |
}, | |
peru: { | |
r: 205, | |
g: 133, | |
b: 63 | |
}, | |
chocolate: { | |
r: 210, | |
g: 105, | |
b: 30 | |
}, | |
tan: { | |
r: 210, | |
g: 180, | |
b: 140 | |
}, | |
lightgray: { | |
r: 211, | |
g: 211, | |
b: 211 | |
}, | |
lightgrey: { | |
r: 211, | |
g: 211, | |
b: 211 | |
}, | |
thistle: { | |
r: 216, | |
g: 191, | |
b: 216 | |
}, | |
goldenrod: { | |
r: 218, | |
g: 165, | |
b: 32 | |
}, | |
orchid: { | |
r: 218, | |
g: 112, | |
b: 214 | |
}, | |
palevioletred: { | |
r: 219, | |
g: 112, | |
b: 147 | |
}, | |
crimson: { | |
r: 220, | |
g: 20, | |
b: 60 | |
}, | |
gainsboro: { | |
r: 220, | |
g: 220, | |
b: 220 | |
}, | |
plum: { | |
r: 221, | |
g: 160, | |
b: 221 | |
}, | |
burlywood: { | |
r: 222, | |
g: 184, | |
b: 135 | |
}, | |
lightcyan: { | |
r: 224, | |
g: 255, | |
b: 255 | |
}, | |
lavender: { | |
r: 230, | |
g: 230, | |
b: 250 | |
}, | |
darksalmon: { | |
r: 233, | |
g: 150, | |
b: 122 | |
}, | |
palegoldenrod: { | |
r: 238, | |
g: 232, | |
b: 170 | |
}, | |
violet: { | |
r: 238, | |
g: 130, | |
b: 238 | |
}, | |
azure: { | |
r: 240, | |
g: 255, | |
b: 255 | |
}, | |
honeydew: { | |
r: 240, | |
g: 255, | |
b: 240 | |
}, | |
khaki: { | |
r: 240, | |
g: 230, | |
b: 140 | |
}, | |
lightcoral: { | |
r: 240, | |
g: 128, | |
b: 128 | |
}, | |
sandybrown: { | |
r: 244, | |
g: 164, | |
b: 96 | |
}, | |
beige: { | |
r: 245, | |
g: 245, | |
b: 220 | |
}, | |
mintcream: { | |
r: 245, | |
g: 255, | |
b: 250 | |
}, | |
wheat: { | |
r: 245, | |
g: 222, | |
b: 179 | |
}, | |
whitesmoke: { | |
r: 245, | |
g: 245, | |
b: 245 | |
}, | |
ghostwhite: { | |
r: 248, | |
g: 248, | |
b: 255 | |
}, | |
lightgoldenrodyellow: { | |
r: 250, | |
g: 250, | |
b: 210 | |
}, | |
linen: { | |
r: 250, | |
g: 240, | |
b: 230 | |
}, | |
salmon: { | |
r: 250, | |
g: 128, | |
b: 114 | |
}, | |
oldlace: { | |
r: 253, | |
g: 245, | |
b: 230 | |
}, | |
bisque: { | |
r: 255, | |
g: 228, | |
b: 196 | |
}, | |
blanchedalmond: { | |
r: 255, | |
g: 235, | |
b: 205 | |
}, | |
coral: { | |
r: 255, | |
g: 127, | |
b: 80 | |
}, | |
cornsilk: { | |
r: 255, | |
g: 248, | |
b: 220 | |
}, | |
darkorange: { | |
r: 255, | |
g: 140, | |
b: 0 | |
}, | |
deeppink: { | |
r: 255, | |
g: 20, | |
b: 147 | |
}, | |
floralwhite: { | |
r: 255, | |
g: 250, | |
b: 240 | |
}, | |
fuchsia: { | |
r: 255, | |
g: 0, | |
b: 255 | |
}, | |
gold: { | |
r: 255, | |
g: 215, | |
b: 0 | |
}, | |
hotpink: { | |
r: 255, | |
g: 105, | |
b: 180 | |
}, | |
ivory: { | |
r: 255, | |
g: 255, | |
b: 240 | |
}, | |
lavenderblush: { | |
r: 255, | |
g: 240, | |
b: 245 | |
}, | |
lemonchiffon: { | |
r: 255, | |
g: 250, | |
b: 205 | |
}, | |
lightpink: { | |
r: 255, | |
g: 182, | |
b: 193 | |
}, | |
lightsalmon: { | |
r: 255, | |
g: 160, | |
b: 122 | |
}, | |
lightyellow: { | |
r: 255, | |
g: 255, | |
b: 224 | |
}, | |
magenta: { | |
r: 255, | |
g: 0, | |
b: 255 | |
}, | |
mistyrose: { | |
r: 255, | |
g: 228, | |
b: 225 | |
}, | |
moccasin: { | |
r: 255, | |
g: 228, | |
b: 181 | |
}, | |
navajowhite: { | |
r: 255, | |
g: 222, | |
b: 173 | |
}, | |
orange: { | |
r: 255, | |
g: 165, | |
b: 0 | |
}, | |
orangered: { | |
r: 255, | |
g: 69, | |
b: 0 | |
}, | |
papayawhip: { | |
r: 255, | |
g: 239, | |
b: 213 | |
}, | |
peachpuff: { | |
r: 255, | |
g: 218, | |
b: 185 | |
}, | |
pink: { | |
r: 255, | |
g: 192, | |
b: 203 | |
}, | |
red: { | |
r: 255, | |
g: 0, | |
b: 0 | |
}, | |
seashell: { | |
r: 255, | |
g: 245, | |
b: 238 | |
}, | |
snow: { | |
r: 255, | |
g: 250, | |
b: 250 | |
}, | |
tomato: { | |
r: 255, | |
g: 99, | |
b: 71 | |
}, | |
white: { | |
r: 255, | |
g: 255, | |
b: 255 | |
}, | |
yellow: { | |
r: 255, | |
g: 255, | |
b: 0 | |
}, | |
rebeccapurple: { | |
r: 102, | |
g: 51, | |
b: 153 | |
} | |
}; | |
c.exports = { | |
rgbToName: d, | |
nameToRgbObject: f | |
} | |
}, {}], | |
351: [function(c, d, b) { | |
d.exports = function a(f) { | |
return "#" + (f).toString(16) | |
} | |
}, {}], | |
352: [function(c, d, a) { | |
d.exports = function b(f) { | |
return parseInt(f.substr(1), 16) | |
} | |
}, {}], | |
353: [function(d, f, c) { | |
var a = d("./shortToLongHex"); | |
f.exports = function b(h) { | |
h = a(h); | |
var g = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(h); | |
return g ? "rgb(" + parseInt(g[1], 16) + ", " + parseInt(g[2], 16) + ", " + parseInt(g[3], 16) + ")" : null | |
} | |
}, { | |
"./shortToLongHex": 367 | |
}], | |
354: [function(c, f, b) { | |
var h = c("./isRgb"); | |
var g = c("./isRgba"); | |
var a = c("./isHex"); | |
f.exports = function d(j) { | |
return a(j) || h(j) || g(j) | |
} | |
}, { | |
"./isHex": 355, | |
"./isRgb": 356, | |
"./isRgba": 357 | |
}], | |
355: [function(c, d, b) { | |
d.exports = function a(g) { | |
var f = /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i; | |
return f.test(g) | |
} | |
}, {}], | |
356: [function(b, c, a) { | |
c.exports = function d(g) { | |
var f = /^rgb\(\s*([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5]),\s*([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5]),\s*([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])\s*\)$/; | |
return f.exec(g) !== null | |
} | |
}, {}], | |
357: [function(b, c, a) { | |
c.exports = function d(g) { | |
var f = /^rgba\(\s*([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5]),\s*([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5]),\s*([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5]),\s*(0(\.\d+)?|1(\.0+)?)\s*\)$/; | |
return f.exec(g) !== null | |
} | |
}, {}], | |
358: [function(d, f, c) { | |
var b = d("./isHex"); | |
var a = d("./hexToRgb"); | |
var h = d("./rgbToObject"); | |
f.exports = function g(o, n, m) { | |
o = b(o) ? a(o) : o; | |
n = b(n) ? a(n) : n; | |
o = h(o); | |
n = h(n); | |
var l = o.r + ((n.r - o.r) * m); | |
var k = o.g + ((n.g - o.g) * m); | |
var j = o.b + ((n.b - o.b) * m); | |
return "rgb(" + Math.round(l) + ", " + Math.round(k) + ", " + Math.round(j) + ")" | |
} | |
}, { | |
"./hexToRgb": 353, | |
"./isHex": 355, | |
"./rgbToObject": 364 | |
}], | |
359: [function(b, c, a) { | |
var d = b("./rgbToObject"); | |
c.exports = function f(g) { | |
var h = d(g); | |
return [h.r, h.g, h.b] | |
} | |
}, { | |
"./rgbToObject": 364 | |
}], | |
360: [function(d, f, b) { | |
var c = d("./hexToDecimal"); | |
var h = d("./rgbToArray"); | |
var g = d("./rgbToHex"); | |
f.exports = function a(j) { | |
var k = g.apply(this, h(j)); | |
return c(k) | |
} | |
}, { | |
"./hexToDecimal": 352, | |
"./rgbToArray": 359, | |
"./rgbToHex": 361 | |
}], | |
361: [function(b, c, a) { | |
c.exports = function d(j, h, f) { | |
return "#" + ((1 << 24) + (j << 16) + (h << 8) + f).toString(16).slice(1) | |
} | |
}, {}], | |
362: [function(c, d, b) { | |
d.exports = function a(f, n, p) { | |
if (arguments.length !== 3) { | |
return false | |
} | |
f /= 255; | |
n /= 255; | |
p /= 255; | |
var q = Math.max(f, n, p); | |
var k = Math.min(f, n, p); | |
var o = q + k; | |
var t = q - k; | |
var m; | |
var u; | |
var j = (o / 2); | |
if (q === k) { | |
m = u = 0 | |
} else { | |
u = j > 0.5 ? t / (2 - q - k) : t / o; | |
switch (q) { | |
case f: | |
m = (n - p) / t; | |
break; | |
case n: | |
m = 2 + ((p - f) / t); | |
break; | |
case p: | |
m = 4 + ((f - n) / t); | |
break | |
} | |
m *= 60; | |
if (m < 0) { | |
m += 360 | |
} | |
} | |
return ([m, Math.round(100 * u), Math.round(100 * j)]) | |
} | |
}, {}], | |
363: [function(c, d, a) { | |
d.exports = function b(f, n, o) { | |
if (arguments.length !== 3) { | |
return false | |
} | |
var j = f / 255; | |
var k = n / 255; | |
var q = o / 255; | |
var p = Math.max(j, k, q); | |
var l = Math.min(j, k, q); | |
var m; | |
var w; | |
var u = p; | |
var t = p - l; | |
w = p === 0 ? 0 : t / p; | |
if (p === l) { | |
m = 0 | |
} else { | |
switch (p) { | |
case j: | |
m = (k - q) / t + (k < q ? 6 : 0); | |
break; | |
case k: | |
m = (q - j) / t + 2; | |
break; | |
case q: | |
m = (j - k) / t + 4; | |
break | |
} | |
m /= 6 | |
} | |
return [Math.round(360 * m), Math.round(100 * w), Math.round(100 * u)] | |
} | |
}, {}], | |
364: [function(b, c, a) { | |
c.exports = function d(g) { | |
var h = /rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)/; | |
var f = h.exec(g); | |
return { | |
r: Number(f[1]), | |
g: Number(f[2]), | |
b: Number(f[3]) | |
} | |
} | |
}, {}], | |
365: [function(b, c, a) { | |
var f = b("./rgbaToObject"); | |
c.exports = function d(g) { | |
var h = f(g); | |
return [h.r, h.g, h.b, h.a] | |
} | |
}, { | |
"./rgbaToObject": 366 | |
}], | |
366: [function(b, c, a) { | |
c.exports = function d(g) { | |
var h = /rgba\(\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*(0(\.\d+)?|1(\.0+)?)\s*\)/; | |
var f = h.exec(g); | |
return { | |
r: Number(f[1]), | |
g: Number(f[2]), | |
b: Number(f[3]), | |
a: Number(f[4]) | |
} | |
} | |
}, {}], | |
367: [function(c, d, b) { | |
d.exports = function a(g) { | |
var f = /^#?([a-f\d])([a-f\d])([a-f\d])$/i; | |
g = g.replace(f, function(j, l, k, h) { | |
return "#" + l + l + k + k + h + h | |
}); | |
return g | |
} | |
}, {}], | |
368: [function(b, c, a) { | |
c.exports = { | |
Bar: b("./ac-graph/Bar"), | |
CurvedLine: b("./ac-graph/CurvedLine"), | |
Donut: b("./ac-graph/Donut") | |
} | |
}, { | |
"./ac-graph/Bar": 369, | |
"./ac-graph/CurvedLine": 370, | |
"./ac-graph/Donut": 371 | |
}], | |
369: [function(d, f, b) { | |
var c = d("ac-clip").Clip; | |
var j = d("ac-clock"); | |
var h = d("ac-color").Color; | |
function a(l, k) { | |
try { | |
this.resolutionFactor = (!!window.devicePixelRatio) ? Math.ceil(window.devicePixelRatio) : 1; | |
this.el = l; | |
this.set(k) | |
} catch (m) { | |
console.log("Bar graph failure: " + m); | |
return | |
} | |
} | |
var g = a.prototype; | |
g.play = function() { | |
if (this.clips && this.clips.length > 0) { | |
var n; | |
for (var m = 0, k = this.clips.length; m < k; m += 1) { | |
n = this.clips[m]; | |
n.play() | |
} | |
} | |
}; | |
g.set = function(m) { | |
this.options = m || {}; | |
this.clock = this.options.clock || j; | |
if (!this.options.bars) { | |
throw "No graph data provided" | |
} | |
this.calcHeight = (this.options.bars.length * this.options.barHeight) + (this.options.bars.length * this.options.barMargin * 2); | |
this.width = this.options.width || this._getSizeFromEl().width; | |
this.height = this.options.height || this.calcHeight; | |
if (this.canvas) { | |
this.context.clearRect(0, 0, this.width, this.height) | |
} else { | |
this.canvas = this.options.canvas || this._createCanvas() | |
} | |
if (!!this.canvas.getContext("2d")) { | |
this.context = this.canvas.getContext("2d") | |
} else { | |
throw "Canvas not supported" | |
} | |
this.canvas.width = this.width * this.resolutionFactor; | |
this.canvas.height = this.height * this.resolutionFactor; | |
this.context.scale(this.resolutionFactor, this.resolutionFactor); | |
this.options.barHeight = this.options.barHeight || 10; | |
this.options.barMargin = this.options.barMargin || this.options.barHeight; | |
this.options.duration = this.options.duration || 1; | |
this.options.verticalRule = this.options.verticalRule || {}; | |
this.options.verticalRule.lineWidth = this.options.verticalRule.lineWidth || 2; | |
this.options.verticalRule.color = this.options.verticalRule.color || "#ddd"; | |
this.options.verticalRule.number = this.options.verticalRule.number || 5; | |
for (var n = 0, l = this.options.bars.length; n < l; n++) { | |
this.options.bars[n].percent = this.options.bars[n].percent || 0.5; | |
this.options.bars[n].colorStart = this.options.bars[n].colorStart || "#ccc"; | |
this.options.bars[n].colorEnd = this.options.bars[n].colorEnd || "#777" | |
} | |
this.options.padding = this.options.padding || this.options.verticalRule.lineWidth / 2; | |
this.points = []; | |
var p = { | |
_progress: 0 | |
}; | |
var o = { | |
_progress: 1 | |
}; | |
var k = new c(p, this.options.duration, o, { | |
onDraw: this._onDraw.bind(this), | |
onStart: this.options.onStart, | |
onUpdate: this.options.onUpdate, | |
onComplete: this.options.onComplete | |
}); | |
this.clips = []; | |
this.clips.push(k) | |
}; | |
g._barWidth = function(k) { | |
return (this.width - (this.options.padding * 2)) * k | |
}; | |
g._createCanvas = function() { | |
var k = document.createElement("canvas"); | |
this.el.appendChild(k); | |
return k | |
}; | |
g._getGradient = function(l) { | |
var n = this.context.createLinearGradient(this._x(0), 0, this._x(l.percent), 0); | |
var k = new h(l.colorStart); | |
var m = new h(l.colorEnd); | |
n.addColorStop(0, k.rgb()); | |
n.addColorStop(1, m.rgb()); | |
return n | |
}; | |
g._getSizeFromEl = function() { | |
return { | |
height: this.el.offsetHeight, | |
width: this.el.offsetWidth | |
} | |
}; | |
g._onDraw = function(r) { | |
var u = r.target; | |
var v = this.context; | |
v.clearRect(0, 0, this.canvas.width, this.canvas.height); | |
v.save(); | |
for (var n = 0, k = this.options.verticalRule.number; n < k; n++) { | |
var s = this.options.verticalRule; | |
if (s.number > 0) { | |
var o = this._x(n / (k - 1)); | |
v.beginPath(); | |
v.strokeStyle = s.color; | |
v.lineWidth = s.lineWidth; | |
v.moveTo(o, this._y(0)); | |
v.lineTo(o, this._y(1)); | |
v.stroke() | |
} | |
} | |
for (var t = 0, p = this.options.bars.length; t < p; t++) { | |
var q = this.options.bars[t]; | |
var m = ((t * 2 + 1) * this.options.barMargin) + (t * this.options.barHeight); | |
v.fillStyle = this._getGradient(q); | |
v.fillRect(this._x(0), m, this._barWidth(q.percent) * u._progress, this.options.barHeight) | |
} | |
v.restore() | |
}; | |
g._x = function(k) { | |
return (this.width - (this.options.padding * 2)) * k + this.options.padding | |
}; | |
g._y = function(k) { | |
return this.height * (1 - k) | |
}; | |
f.exports = a | |
}, { | |
"ac-clip": 21, | |
"ac-clock": 23, | |
"ac-color": 348 | |
}], | |
370: [function(d, c, f) { | |
var k = d("ac-clip").Clip; | |
var a = d("ac-clock"); | |
var b = d("ac-color").Color; | |
var j = d("./curvedLine/spline"); | |
function g(m, l) { | |
try { | |
this.resolutionFactor = (!!window.devicePixelRatio) ? Math.ceil(window.devicePixelRatio) : 1; | |
this.el = m; | |
this.set(l); | |
this._drawThesePieces(this.drawOnEvent.load, { | |
_progress: 1, | |
atPoint: this.points.length | |
}) | |
} catch (n) { | |
console.log("Curved line graph failure: " + n); | |
return | |
} | |
} | |
var h = g.prototype; | |
h.play = function() { | |
if (this.clips && this.clips.length > 0) { | |
for (var n = 0, m = this.clips.length; n < m; n++) { | |
this.clips[n].play() | |
} | |
} | |
}; | |
h.set = function(m) { | |
this.options = m || {}; | |
this.clock = this.options.clock || a; | |
if (!this.options.graphData) { | |
throw "No graph data provided" | |
} | |
this.graphData = this.options.graphData; | |
this.duration = this.options.duration || 2; | |
this.drawOnEvent = { | |
none: [], | |
load: [], | |
play: [] | |
}; | |
this.width = this.options.width || this._getSizeFromEl().width; | |
this.height = this.options.height || this._getSizeFromEl().height; | |
if (this.canvas) { | |
this.context.clearRect(0, 0, this.width, this.height) | |
} else { | |
this.canvas = this.options.canvas || this._createCanvas() | |
} | |
if (!!this.canvas.getContext("2d")) { | |
this.context = this.canvas.getContext("2d") | |
} else { | |
throw "Canvas not supported" | |
} | |
this.canvas.width = this.width * this.resolutionFactor; | |
this.canvas.height = this.height * this.resolutionFactor; | |
this.context.scale(this.resolutionFactor, this.resolutionFactor); | |
this.options.spline = this.options.spline || {}; | |
this.options.spline.draw = this.options.spline.draw || "play"; | |
this.drawOnEvent[this.options.spline.draw].push("spline"); | |
this.options.spline.tension = this.options.spline.tension || 0.4; | |
this.options.spline.lineWidth = this.options.spline.lineWidth || 2.5; | |
this.options.spline.colorStart = this.options.spline.colorStart ? this.options.spline.colorStart : "rgb(214,214,214)"; | |
this.options.spline.colorEnd = this.options.spline.colorEnd ? this.options.spline.colorEnd : "rgb(0,0,0)"; | |
this.options.splineDots = this.options.splineDots || {}; | |
this.options.splineDots.draw = this.options.splineDots.draw || "play"; | |
this.drawOnEvent[this.options.splineDots.draw].push("splineDots"); | |
this.options.splineDots.show = this.options.splineDots.show || "all"; | |
this.options.splineDots.size = this.options.splineDots.size || 8; | |
this.options.splineDots.fillColor = this.options.splineDots.fillColor || "matchSpline"; | |
this.options.splineDots.strokeColor = this.options.splineDots.strokeColor || "transparent"; | |
this.options.splineDots.strokeWidth = this.options.splineDots.strokeWidth || 0; | |
this.options.xAxis = this.options.xAxis || {}; | |
this.options.xAxis.draw = this.options.xAxis.draw || "load"; | |
this.drawOnEvent[this.options.xAxis.draw].push("xAxis"); | |
this.options.xAxis.show = this.options.xAxis.show || "all"; | |
this.options.xAxis.lineWidth = this.options.xAxis.lineWidth || 1.5; | |
this.options.xAxis.color = this.options.xAxis.color || "#d2d2d2"; | |
this.options.verticalRule = this.options.verticalRule || {}; | |
this.options.verticalRule.draw = this.options.verticalRule.draw || "play"; | |
this.drawOnEvent[this.options.verticalRule.draw].push("verticalRule"); | |
this.options.verticalRule.lineWidth = this.options.verticalRule.lineWidth || 1.5; | |
this.options.verticalRule.color = this.options.verticalRule.color || "#f7f7f7"; | |
this.options.verticalRule.lineLength = this.options.verticalRule.lineLength || "toSpline"; | |
this.options.xDots = this.options.xDots || {}; | |
this.options.xDots.draw = this.options.xDots.draw || "play"; | |
this.drawOnEvent[this.options.xDots.draw].push("xDots"); | |
this.options.xDots.size = this.options.xDots.size || 4; | |
this.options.xDots.fillColor = this.options.xDots.fillColor || "#d2d2d2"; | |
this.options.xDots.strokeColor = this.options.xDots.strokeColor || "transparent"; | |
this.options.xDots.strokeWidth = this.options.xDots.strokeWidth || 0; | |
this.options.padding = this.options.padding || this.options.splineDots.size; | |
this.points = []; | |
this._calculateGraphData(); | |
var o = { | |
_progress: 0, | |
atPoint: 0 | |
}; | |
var n = { | |
_progress: 1, | |
atPoint: this.points.length | |
}; | |
var l = new k(o, this.duration, n, { | |
onDraw: this._onDraw.bind(this), | |
onStart: this.options.onStart, | |
onUpdate: this.options.onUpdate, | |
onComplete: this.options.onComplete | |
}); | |
this.clips = []; | |
this.clips.push(l) | |
}; | |
h._calculateGraphData = function() { | |
var n; | |
var m; | |
var p; | |
var o; | |
var l = this.graphData.length - 1; | |
this.lineData = []; | |
for (o = 0; o <= l; o += 1) { | |
n = this.graphData[o]; | |
p = (o / l); | |
m = { | |
x: this._x(p), | |
y: this._y(n), | |
percent: n | |
}; | |
this.points.push(m); | |
this.lineData.push(this.points[o].x); | |
this.lineData.push(this.points[o].y) | |
} | |
this.universalGradient = this._getGradient(this.options.spline.colorStart, this.options.spline.colorEnd, 1) | |
}; | |
h._createCanvas = function() { | |
var l = document.createElement("canvas"); | |
this.el.appendChild(l); | |
return l | |
}; | |
h._drawThesePieces = function(n, o) { | |
for (var p = 0, m = n.length; p < m; p++) { | |
this[n[p]](o) | |
} | |
}; | |
h._getColor = function(l) { | |
switch (l) { | |
case "matchSpline": | |
return this.universalGradient; | |
case "transparent": | |
return l; | |
default: | |
return new b(l).rgb() | |
} | |
}; | |
h._getGradient = function(q, r, p) { | |
var s = this.context.createLinearGradient(this._x(0), this._y(0), this._x(1), this._y(1)); | |
var n = new b(q); | |
var m = new b(r); | |
s.addColorStop(0, n.rgba()); | |
s.addColorStop(p, m.rgba()); | |
var l = p + 0.001; | |
if (l < 1) { | |
var o = new b(r); | |
o.setAlpha(0); | |
s.addColorStop(l, o.rgba()) | |
} | |
return s | |
}; | |
h._getSizeFromEl = function() { | |
return { | |
height: this.el.offsetHeight, | |
width: this.el.offsetWidth | |
} | |
}; | |
h._onDraw = function(l) { | |
this.context.clearRect(0, 0, this.canvas.width, this.canvas.height); | |
this.context.save(); | |
this._drawThesePieces(this.drawOnEvent.load, { | |
_progress: 1, | |
atPoint: this.points.length | |
}); | |
this._drawThesePieces(this.drawOnEvent.play, l.target); | |
this.context.restore() | |
}; | |
h._x = function(l) { | |
return (this.width - (this.options.padding * 2)) * l + this.options.padding | |
}; | |
h._y = function(l) { | |
return (this.height - (this.options.padding * 2)) * (1 - l) + this.options.padding | |
}; | |
h.spline = function(m) { | |
var n = (m._progress < 1) ? this._getGradient(this.options.spline.colorStart, this.options.spline.colorEnd, m._progress) : this.universalGradient; | |
this.context.globalCompositeOperation = "source-over"; | |
this.context.beginPath(); | |
var l = j.getCurvePoints(this.lineData, this.options.spline.tension, false, 32); | |
j.drawLines(this.context, l); | |
this.context.lineWidth = this.options.spline.lineWidth; | |
this.context.lineCap = "round"; | |
this.context.strokeStyle = n; | |
this.context.stroke() | |
}; | |
h.splineDots = function(o) { | |
var q = this.options.splineDots; | |
var n = (o.atPoint < this.points.length) ? Math.floor(o.atPoint) : this.points.length; | |
for (var p = 0; p < n; p++) { | |
var m = this.points[p]; | |
if ((q.show === "all") || (q.show === "ends" && (p === 0 || p === this.points.length - 1))) { | |
this._drawCircle({ | |
x: m.x, | |
y: m.y, | |
size: q.size, | |
fillColor: this._getColor(q.fillColor), | |
strokeColor: this._getColor(q.strokeColor), | |
strokeWidth: q.strokeWidth | |
}) | |
} | |
} | |
}; | |
h.xAxis = function(l) { | |
this.context.globalCompositeOperation = "destination-over"; | |
this.context.beginPath(); | |
this.context.strokeStyle = this._getColor(this.options.xAxis.color); | |
this.context.lineWidth = this.options.xAxis.lineWidth; | |
this.context.moveTo(this._x(0), this._y(0)); | |
this.context.lineTo(this._x(1 * l._progress), this._y(0)); | |
this.context.stroke() | |
}; | |
h.xDots = function(p) { | |
var o = this.options.xDots; | |
var n = (p.atPoint < this.points.length) ? Math.floor(p.atPoint) + 1 : this.points.length; | |
for (var q = 0; q < n; q++) { | |
var m = this.points[q]; | |
this.context.globalCompositeOperation = "source-over"; | |
this._drawCircle({ | |
x: m.x, | |
y: this._y(0), | |
size: o.size, | |
fillColor: this._getColor(o.fillColor), | |
strokeColor: this._getColor(o.strokeColor), | |
strokeWidth: o.strokeWidth | |
}) | |
} | |
}; | |
h.verticalRule = function(o) { | |
var q = this.options.verticalRule; | |
var n = (o.atPoint < this.points.length) ? Math.floor(o.atPoint) + 1 : this.points.length; | |
for (var p = 0; p < n; p++) { | |
var m = this.points[p]; | |
var s = (Math.floor(o.atPoint) == p) ? o.atPoint - p : 1; | |
var r = (q.lineLength === "full") ? this._y(1 * s) : this._y(m.percent * s); | |
this.context.globalCompositeOperation = "destination-over"; | |
this.context.beginPath(); | |
this.context.strokeStyle = this._getColor(q.color); | |
this.context.lineWidth = q.lineWidth; | |
this.context.moveTo(m.x, this._y(0)); | |
this.context.lineTo(m.x, r); | |
this.context.stroke() | |
} | |
}; | |
h._drawCircle = function(m) { | |
var l = this.context; | |
l.beginPath(); | |
l.arc(m.x, m.y, m.size / 2, 0, Math.PI * 2); | |
l.fillStyle = m.fillColor; | |
l.fill(); | |
if (m.strokeWidth > 0) { | |
l.strokeStyle = m.strokeColor; | |
l.lineWidth = m.strokeWidth; | |
l.stroke() | |
} | |
}; | |
c.exports = g | |
}, { | |
"./curvedLine/spline": 372, | |
"ac-clip": 21, | |
"ac-clock": 23, | |
"ac-color": 348 | |
}], | |
371: [function(c, d, a) { | |
var b = c("ac-clip").Clip; | |
var j = c("ac-clock"); | |
var h = c("ac-color").Color; | |
function f(l, k) { | |
try { | |
this.resolutionFactor = (!!window.devicePixelRatio) ? Math.ceil(window.devicePixelRatio) : 1; | |
this.el = l; | |
this.set(k) | |
} catch (m) { | |
console.log("Donut graph failure: " + m); | |
return | |
} | |
} | |
var g = f.prototype; | |
g.convert = { | |
_degreesToAngle: function(k) { | |
return k * (Math.PI / 180) | |
} | |
}; | |
g.play = function() { | |
if (this.segments && this.segments.length > 0) { | |
this.clock.on("draw", this._onDraw); | |
if (!this.clock.isRunning()) { | |
this.clock.start() | |
} | |
var k = this.segments.length; | |
while (k--) { | |
this.segments[k].clip.play() | |
} | |
} | |
}; | |
g.set = function(k) { | |
this.options = k || {}; | |
this.clock = this.options.clock || j; | |
if (!this.options.segments) { | |
throw "No graph data provided" | |
} | |
this.size = this.options.size || this._getSizeFromEl(); | |
this.centerPoint = this.size / 2; | |
if (this.canvas) { | |
this.context.clearRect(0, 0, this.size, this.size) | |
} else { | |
this.canvas = this.options.canvas || this._createCanvas() | |
} | |
if (!!this.canvas.getContext("2d")) { | |
this.context = this.canvas.getContext("2d") | |
} else { | |
throw "Canvas not supported" | |
} | |
this.canvas.setAttribute("class", "donut-graph-canvas"); | |
this.segments = this.options.segments; | |
this.canvas.width = this.size * this.resolutionFactor; | |
this.canvas.height = this.size * this.resolutionFactor; | |
this.context.scale(this.resolutionFactor, this.resolutionFactor); | |
this._onDraw = this._onDraw.bind(this); | |
for (var l = 0; l < this.segments.length; l++) { | |
this.segments[l].color = this.segments[l].color || "#ccc"; | |
this.segments[l].color = new h(this.segments[l].color).rgb(); | |
this.segments[l].delay = this.segments[l].delay || 0; | |
this.segments[l].duration = this.segments[l].duration || 0.5; | |
this.segments[l].easing = this.segments[l].easing || "easeInOutQuint"; | |
this.segments[l].label = this.segments[l].label || ""; | |
this.segments[l].lineWidth = this.segments[l].lineWidth || 2; | |
this.segments[l].percent = this.segments[l].percent || 1; | |
this.segments[l].size = this.segments[l].size || this.size; | |
var o = (this.segments[l].startAngle || 0) - 90; | |
this.segments[l].startAngle = this.convert._degreesToAngle(o); | |
this.segments[l].endAngle = this.convert._degreesToAngle(o + (360 * (this.segments[l].percent))); | |
var n = { | |
_progress: 0, | |
_endAngle: this.segments[l].startAngle | |
}; | |
var m = { | |
_progress: 1, | |
_endAngle: this.segments[l].endAngle | |
}; | |
this.segments[l].clip = new b(n, this.segments[l].duration, m, { | |
ease: this.segments[l].easing, | |
delay: this.segments[l].delay, | |
clock: this.clock, | |
onStart: this.segments[l].onStart, | |
onUpdate: this.segments[l].onUpdate, | |
onComplete: this.segments[l].onComplete | |
}) | |
} | |
}; | |
g._createCanvas = function() { | |
var k = document.createElement("canvas"); | |
this.el.appendChild(k); | |
return k | |
}; | |
g._drawArc = function(l, o, n, k, m) { | |
this.context.lineWidth = k; | |
this.context.beginPath(); | |
this.context.strokeStyle = m; | |
this.context.arc(this.centerPoint, this.centerPoint, (n * 0.5) - (k * 0.5), l, o); | |
this.context.stroke() | |
}; | |
g._getSizeFromEl = function() { | |
return Math.min(this.el.offsetWidth, this.el.offsetHeight) | |
}; | |
g._onDraw = function(n) { | |
this.context.clearRect(0, 0, this.size, this.size); | |
var l, m = false; | |
for (var k = 0; k < this.segments.length; k++) { | |
l = this.segments[k]; | |
if (l.clip.isPlaying() && !m) { | |
m = true | |
} | |
if (l.label) { | |
l.label.innerHTML = Math.round(l.percent * l.clip._progress * 100) | |
} | |
this._drawArc(l.startAngle, l.clip._target._endAngle, l.size, l.lineWidth, l.color) | |
} | |
if (!m) { | |
this.clock.off("draw", this._onDraw) | |
} | |
}; | |
d.exports = f | |
}, { | |
"ac-clip": 21, | |
"ac-clock": 23, | |
"ac-color": 348 | |
}], | |
372: [function(b, c, a) { | |
/*! | |
* Smooth curves on canvas version 1.3 | |
* | |
* By Ken Fyrstenberg Nilsen (c) 2013 | |
* Abdias Software, http://abdiassoftware.com/ | |
* | |
* MIT licensed. | |
*/ | |
; | |
var f = function(L, p, B, z) { | |
p = typeof p === "number" ? p : 0.5; | |
z = typeof z === "number" ? z : 16; | |
var m, M = [], | |
s, r, o, E, n, C, G, F, D, A, H, w, J, u, v, I, q, l, k, j, h, K = L.length; | |
m = L.concat(); | |
m.unshift(L[1]); | |
m.unshift(L[0]); | |
m.push(L[K - 2], L[K - 1]); | |
for (J = 2; J < K; J += 2) { | |
l = m[J]; | |
k = m[J + 1]; | |
j = m[J + 2]; | |
h = m[J + 3]; | |
o = (j - m[J - 2]) * p; | |
E = (m[J + 4] - l) * p; | |
n = (h - m[J - 1]) * p; | |
C = (m[J + 5] - k) * p; | |
for (w = 0; w <= z; w += 1) { | |
H = w / z; | |
v = Math.pow(H, 2); | |
u = v * H; | |
q = v * 3; | |
I = u * 2; | |
G = I - q + 1; | |
F = q - I; | |
D = u - 2 * v + H; | |
A = u - v; | |
s = G * l + F * j + D * o + A * E; | |
r = G * k + F * h + D * n + A * C; | |
M.push(s, r) | |
} | |
} | |
return M | |
}; | |
var g = function(j, m) { | |
var k, h; | |
j.moveTo(m[0], m[1]); | |
for (k = 2, h = m.length - 1; k < h; k += 2) { | |
j.lineTo(m[k], m[k + 1]) | |
} | |
}; | |
var d = function(k, n, p, q, h, m) { | |
m = m || false; | |
var o, j; | |
k.beginPath(); | |
g(k, f(n, p, q, h)); | |
if (m) { | |
k.stroke(); | |
k.beginPath(); | |
for (o = 0, j = n.length; o < j; o += 2) { | |
k.rect(n[o] - 2, n[o + 1] - 2, 4, 4) | |
} | |
} | |
}; | |
c.exports = { | |
drawCurve: d, | |
drawLines: g, | |
getCurvePoints: f | |
} | |
}, {}], | |
373: [function(b, c, a) { | |
c.exports = { | |
MotionEmitter: b("./ac-motion-emitter/MotionEmitter") | |
} | |
}, { | |
"./ac-motion-emitter/MotionEmitter": 374 | |
}], | |
374: [function(d, f, b) { | |
var h = d("ac-event-emitter-micro").EventEmitterMicro, | |
a = d("ac-object"), | |
j = d("ac-clock"); | |
function c(k) { | |
h.call(this); | |
this.options = k || {}; | |
this.min = this.options.min || 0; | |
this.max = this.options.max || 1; | |
this._boundHandleClockUpdate = this._handleClockUpdate.bind(this); | |
this._boundHandleClockDraw = this._handleClockDraw.bind(this); | |
if (this.options.easingFunction) { | |
this.easingFunction = this.options.easingFunction | |
} | |
this.clock = this.options.clock || j; | |
this.usesSharedClock = (this.clock === j); | |
this._isRunning = false; | |
this.specificity = this.options.specificity || 4; | |
this.friction = this.options.friction || 10; | |
this._targetValue = null; | |
this._currentValue = null; | |
this._shouldUpdate = false; | |
this._shouldEmitChange = false | |
} | |
var g = c.prototype = a.create(h.prototype); | |
g.destroy = function() { | |
this.trigger("destroy"); | |
this.stop(); | |
this.off(); | |
if (!this.usesSharedClock) { | |
this.clock.destroy() | |
} | |
var k; | |
for (k in this) { | |
if (this.hasOwnProperty(k)) { | |
this[k] = null | |
} | |
} | |
this._isRunning = false | |
}; | |
g.start = function() { | |
if (!this.clock || this._isRunning) { | |
return | |
} | |
this._bindEvents(); | |
this._isRunning = true; | |
this.clock.start() | |
}; | |
g.stop = function() { | |
if (!this.clock || !this._isRunning) { | |
return | |
} | |
this._unbindEvents(); | |
this._isRunning = false; | |
if (!this.usesSharedClock) { | |
this.clock.stop() | |
} | |
}; | |
g.isRunning = function() { | |
return this._isRunning | |
}; | |
g.setProgress = function(k) { | |
if (this._targetValue === k) { | |
return | |
} | |
this._targetValue = k; | |
this._shouldUpdate = true | |
}; | |
g.updateValue = function(p) { | |
if (this._currentValue === null) { | |
this._currentValue = this._targetValue | |
} | |
var o = 1; | |
if (this.easingFunction) { | |
var t = this.max - this.min, | |
u = this.max - (this.max - this._targetValue) / t, | |
q = this.max - (this.max - this._currentValue) / t, | |
k = 1 - Math.abs(u - q), | |
r = this.easingFunction(k, 0, 1, 1); | |
o = 1 + (r - k) | |
} | |
var s = 1; | |
if (p && p.naturalFps !== p.fps) { | |
s = p.naturalFps / p.fps | |
} | |
var l = this._targetValue - this._currentValue, | |
m = l * o * s * (1 / this.friction), | |
n = parseFloat((this._currentValue + m).toFixed(this.specificity)); | |
if (n === this._currentValue) { | |
this._currentValue = this._targetValue | |
} else { | |
this._currentValue = n | |
} | |
this._shouldEmitChange = true | |
}; | |
g._bindEvents = function() { | |
this.clock.on("update", this._boundHandleClockUpdate); | |
this.clock.on("draw", this._boundHandleClockDraw) | |
}; | |
g._unbindEvents = function() { | |
this.clock.off("update", this._boundHandleClockUpdate); | |
this.clock.off("draw", this._boundHandleClockDraw) | |
}; | |
g._handleClockUpdate = function(k) { | |
if (this._shouldUpdate) { | |
this.updateValue(k) | |
} | |
if (!this._shouldEmitChange) { | |
return | |
} | |
k.progress = this._currentValue; | |
this.trigger("update", k) | |
}; | |
g._handleClockDraw = function(k) { | |
if (!this._shouldEmitChange) { | |
return | |
} | |
k.progress = this._currentValue; | |
this.trigger("draw", k); | |
if (this._targetValue === this._currentValue) { | |
this._shouldUpdate = false; | |
this._shouldEmitChange = false; | |
return | |
} | |
this._shouldUpdate = true | |
}; | |
f.exports = c | |
}, { | |
"ac-clock": 23, | |
"ac-event-emitter-micro": 217, | |
"ac-object": 380 | |
}], | |
375: [function(c, d, b) { | |
c("ac-polyfills/Array/isArray"); | |
var h = c("./extend"); | |
var a = Object.prototype.hasOwnProperty; | |
var f = function(j, k) { | |
var l; | |
for (l in k) { | |
if (a.call(k, l)) { | |
if (k[l] === null) { | |
j[l] = null | |
} else { | |
if (typeof k[l] === "object") { | |
j[l] = Array.isArray(k[l]) ? [] : {}; | |
f(j[l], k[l]) | |
} else { | |
j[l] = k[l] | |
} | |
} | |
} | |
} | |
return j | |
}; | |
d.exports = function g(k, j) { | |
if (j) { | |
return f({}, k) | |
} | |
return h({}, k) | |
} | |
}, { | |
"./extend": 378, | |
"ac-polyfills/Array/isArray": 386 | |
}], | |
376: [function(b, c, a) { | |
arguments[4][137][0].apply(a, arguments) | |
}, { | |
dup: 137 | |
}], | |
377: [function(b, c, a) { | |
arguments[4][138][0].apply(a, arguments) | |
}, { | |
"./extend": 378, | |
dup: 138 | |
}], | |
378: [function(c, d, b) { | |
c("ac-polyfills/Array/prototype.forEach"); | |
var a = Object.prototype.hasOwnProperty; | |
d.exports = function f() { | |
var h; | |
var g; | |
if (arguments.length < 2) { | |
h = [{}, arguments[0]] | |
} else { | |
h = [].slice.call(arguments) | |
} | |
g = h.shift(); | |
h.forEach(function(k) { | |
if (k != null) { | |
for (var j in k) { | |
if (a.call(k, j)) { | |
g[j] = k[j] | |
} | |
} | |
} | |
}); | |
return g | |
} | |
}, { | |
"ac-polyfills/Array/prototype.forEach": 388 | |
}], | |
379: [function(b, c, a) { | |
arguments[4][140][0].apply(a, arguments) | |
}, { | |
dup: 140 | |
}], | |
380: [function(b, c, a) { | |
c.exports = { | |
clone: b("./clone"), | |
create: b("./create"), | |
defaults: b("./defaults"), | |
extend: b("./extend"), | |
getPrototypeOf: b("./getPrototypeOf"), | |
isDate: b("./isDate"), | |
isEmpty: b("./isEmpty"), | |
isRegExp: b("./isRegExp"), | |
toQueryParameters: b("./toQueryParameters") | |
} | |
}, { | |
"./clone": 375, | |
"./create": 376, | |
"./defaults": 377, | |
"./extend": 378, | |
"./getPrototypeOf": 379, | |
"./isDate": 381, | |
"./isEmpty": 382, | |
"./isRegExp": 383, | |
"./toQueryParameters": 385 | |
}], | |
381: [function(b, c, a) { | |
arguments[4][141][0].apply(a, arguments) | |
}, { | |
dup: 141 | |
}], | |
382: [function(b, c, a) { | |
arguments[4][142][0].apply(a, arguments) | |
}, { | |
dup: 142 | |
}], | |
383: [function(b, c, a) { | |
arguments[4][143][0].apply(a, arguments) | |
}, { | |
dup: 143 | |
}], | |
384: [function(b, c, a) { | |
arguments[4][134][0].apply(a, arguments) | |
}, { | |
dup: 134 | |
}], | |
385: [function(b, c, a) { | |
arguments[4][144][0].apply(a, arguments) | |
}, { | |
dup: 144, | |
qs: 384 | |
}], | |
386: [function(b, c, a) { | |
if (!Array.isArray) { | |
Array.isArray = function(d) { | |
return Object.prototype.toString.call(d) === "[object Array]" | |
} | |
} | |
}, {}], | |
387: [function(b, c, a) { | |
if (!Array.prototype.filter) { | |
Array.prototype.filter = function d(l, k) { | |
var j = Object(this); | |
var f = j.length >>> 0; | |
var h; | |
var g = []; | |
if (typeof l !== "function") { | |
throw new TypeError(l + " is not a function") | |
} | |
for (h = 0; h < f; h += 1) { | |
if (h in j && l.call(k, j[h], h, j)) { | |
g.push(j[h]) | |
} | |
} | |
return g | |
} | |
} | |
}, {}], | |
388: [function(b, c, a) { | |
if (!Array.prototype.forEach) { | |
Array.prototype.forEach = function d(k, j) { | |
var h = Object(this); | |
var f; | |
var g; | |
if (typeof k !== "function") { | |
throw new TypeError("No function object passed to forEach.") | |
} | |
for (f = 0; f < this.length; f += 1) { | |
g = h[f]; | |
k.call(j, g, f, h) | |
} | |
} | |
} | |
}, {}], | |
389: [function(b, c, a) { | |
if (!Array.prototype.indexOf) { | |
Array.prototype.indexOf = function d(g, h) { | |
var j = h || 0; | |
var f = 0; | |
if (j < 0) { | |
j = this.length + h - 1; | |
if (j < 0) { | |
throw "Wrapped past beginning of array while looking up a negative start index." | |
} | |
} | |
for (f = 0; f < this.length; f++) { | |
if (this[f] === g) { | |
return f | |
} | |
} | |
return (-1) | |
} | |
} | |
}, {}], | |
390: [function(b, c, a) { | |
(function() { | |
var d = Array.prototype.slice; | |
try { | |
d.call(document.documentElement) | |
} catch (f) { | |
Array.prototype.slice = function(n, j) { | |
j = (typeof j !== "undefined") ? j : this.length; | |
if (Object.prototype.toString.call(this) === "[object Array]") { | |
return d.call(this, n, j) | |
} | |
var l, h = [], | |
k, g = this.length; | |
var o = n || 0; | |
o = (o >= 0) ? o : g + o; | |
var m = (j) ? j : g; | |
if (j < 0) { | |
m = g + j | |
} | |
k = m - o; | |
if (k > 0) { | |
h = new Array(k); | |
if (this.charAt) { | |
for (l = 0; l < k; l++) { | |
h[l] = this.charAt(o + l) | |
} | |
} else { | |
for (l = 0; l < k; l++) { | |
h[l] = this[o + l] | |
} | |
} | |
} | |
return h | |
} | |
} | |
}()) | |
}, {}], | |
391: [function(b, c, a) { | |
if (!Array.prototype.some) { | |
Array.prototype.some = function d(k, j) { | |
var g = Object(this); | |
var f = g.length >>> 0; | |
var h; | |
if (typeof k !== "function") { | |
throw new TypeError(k + " is not a function") | |
} | |
for (h = 0; h < f; h += 1) { | |
if (h in g && k.call(j, g[h], h, g) === true) { | |
return true | |
} | |
} | |
return false | |
} | |
} | |
}, {}], | |
392: [function(b, c, a) { | |
if (document.createEvent) { | |
try { | |
new window.CustomEvent("click") | |
} catch (d) { | |
window.CustomEvent = (function() { | |
function f(h, j) { | |
j = j || { | |
bubbles: false, | |
cancelable: false, | |
detail: undefined | |
}; | |
var g = document.createEvent("CustomEvent"); | |
g.initCustomEvent(h, j.bubbles, j.cancelable, j.detail); | |
return g | |
} | |
f.prototype = window.Event.prototype; | |
return f | |
}()) | |
} | |
} | |
}, {}], | |
393: [function(b, c, a) { | |
/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js*/ | |
; | |
if ("document" in self) { | |
if (!("classList" in document.createElement("_"))) { | |
(function(o) { | |
if (!("Element" in o)) { | |
return | |
} | |
var d = "classList", | |
k = "prototype", | |
r = o.Element[k], | |
f = Object, | |
p = String[k].trim || function() { | |
return this.replace(/^\s+|\s+$/g, "") | |
}, | |
g = Array[k].indexOf || function(v) { | |
var u = 0, | |
t = this.length; | |
for (; u < t; u++) { | |
if (u in this && this[u] === v) { | |
return u | |
} | |
} | |
return -1 | |
}, | |
s = function(t, u) { | |
this.name = t; | |
this.code = DOMException[t]; | |
this.message = u | |
}, | |
l = function(u, t) { | |
if (t === "") { | |
throw new s("SYNTAX_ERR", "An invalid or illegal string was specified") | |
} | |
if (/\s/.test(t)) { | |
throw new s("INVALID_CHARACTER_ERR", "String contains an invalid character") | |
} | |
return g.call(u, t) | |
}, | |
h = function(x) { | |
var w = p.call(x.getAttribute("class") || ""), | |
v = w ? w.split(/\s+/) : [], | |
u = 0, | |
t = v.length; | |
for (; u < t; u++) { | |
this.push(v[u]) | |
} | |
this._updateClassName = function() { | |
x.setAttribute("class", this.toString()) | |
} | |
}, | |
j = h[k] = [], | |
n = function() { | |
return new h(this) | |
}; | |
s[k] = Error[k]; | |
j.item = function(t) { | |
return this[t] || null | |
}; | |
j.contains = function(t) { | |
t += ""; | |
return l(this, t) !== -1 | |
}; | |
j.add = function() { | |
var x = arguments, | |
w = 0, | |
u = x.length, | |
v, t = false; | |
do { | |
v = x[w] + ""; | |
if (l(this, v) === -1) { | |
this.push(v); | |
t = true | |
} | |
} while (++w < u); | |
if (t) { | |
this._updateClassName() | |
} | |
}; | |
j.remove = function() { | |
var y = arguments, | |
x = 0, | |
u = y.length, | |
w, t = false, | |
v; | |
do { | |
w = y[x] + ""; | |
v = l(this, w); | |
while (v !== -1) { | |
this.splice(v, 1); | |
t = true; | |
v = l(this, w) | |
} | |
} while (++x < u); | |
if (t) { | |
this._updateClassName() | |
} | |
}; | |
j.toggle = function(u, v) { | |
u += ""; | |
var t = this.contains(u), | |
w = t ? v !== true && "remove" : v !== false && "add"; | |
if (w) { | |
this[w](u) | |
} | |
if (v === true || v === false) { | |
return v | |
} else { | |
return !t | |
} | |
}; | |
j.toString = function() { | |
return this.join(" ") | |
}; | |
if (f.defineProperty) { | |
var q = { | |
get: n, | |
enumerable: true, | |
configurable: true | |
}; | |
try { | |
f.defineProperty(r, d, q) | |
} catch (m) { | |
if (m.number === -2146823252) { | |
q.enumerable = false; | |
f.defineProperty(r, d, q) | |
} | |
} | |
} else { | |
if (f[k].__defineGetter__) { | |
r.__defineGetter__(d, n) | |
} | |
} | |
}(self)) | |
} else { | |
(function() { | |
var f = document.createElement("_"); | |
f.classList.add("c1", "c2"); | |
if (!f.classList.contains("c2")) { | |
var g = function(j) { | |
var h = DOMTokenList.prototype[j]; | |
DOMTokenList.prototype[j] = function(m) { | |
var l, k = arguments.length; | |
for (l = 0; l < k; l++) { | |
m = arguments[l]; | |
h.call(this, m) | |
} | |
} | |
}; | |
g("add"); | |
g("remove") | |
} | |
f.classList.toggle("c3", false); | |
if (f.classList.contains("c3")) { | |
var d = DOMTokenList.prototype.toggle; | |
DOMTokenList.prototype.toggle = function(h, j) { | |
if (1 in arguments && !this.contains(h) === !j) { | |
return j | |
} else { | |
return d.call(this, h) | |
} | |
} | |
} | |
f = null | |
}()) | |
} | |
} | |
}, {}], | |
394: [function(b, c, a) { | |
if (!Object.create) { | |
var d = function() {}; | |
Object.create = function(f) { | |
if (arguments.length > 1) { | |
throw new Error("Second argument not supported") | |
} | |
if (f === null || typeof f !== "object") { | |
throw new TypeError("Object prototype may only be an Object.") | |
} | |
d.prototype = f; | |
return new d() | |
} | |
} | |
}, {}], | |
395: [function(b, c, a) { | |
window.matchMedia = window.matchMedia || (function(j, k) { | |
var g, d = j.documentElement, | |
f = d.firstElementChild || d.firstChild, | |
h = j.createElement("body"), | |
l = j.createElement("div"); | |
l.id = "mq-test-1"; | |
l.style.cssText = "position:absolute;top:-100em"; | |
h.style.background = "none"; | |
h.appendChild(l); | |
return function(m) { | |
l.innerHTML = '­<style media="' + m + '"> #mq-test-1 { width:42px; }</style>'; | |
d.insertBefore(h, f); | |
g = l.offsetWidth === 42; | |
d.removeChild(h); | |
return { | |
matches: g, | |
media: m | |
} | |
} | |
}(document)) | |
}, {}], | |
396: [function(b, c, a) { | |
arguments[4][19][0].apply(a, arguments) | |
}, { | |
"./ac-event-emitter/EventEmitter": 397, | |
dup: 19 | |
}], | |
397: [function(b, c, a) { | |
arguments[4][20][0].apply(a, arguments) | |
}, { | |
dup: 20 | |
}], | |
398: [function(b, c, a) { | |
arguments[4][134][0].apply(a, arguments) | |
}, { | |
dup: 134 | |
}], | |
399: [function(b, c, a) { | |
arguments[4][135][0].apply(a, arguments) | |
}, { | |
"./ac-object/clone": 400, | |
"./ac-object/create": 401, | |
"./ac-object/defaults": 402, | |
"./ac-object/extend": 403, | |
"./ac-object/getPrototypeOf": 404, | |
"./ac-object/isDate": 405, | |
"./ac-object/isEmpty": 406, | |
"./ac-object/isRegExp": 407, | |
"./ac-object/toQueryParameters": 408, | |
dup: 135 | |
}], | |
400: [function(b, c, a) { | |
arguments[4][136][0].apply(a, arguments) | |
}, { | |
"./extend": 403, | |
dup: 136 | |
}], | |
401: [function(b, c, a) { | |
arguments[4][137][0].apply(a, arguments) | |
}, { | |
dup: 137 | |
}], | |
402: [function(b, c, a) { | |
arguments[4][138][0].apply(a, arguments) | |
}, { | |
"./extend": 403, | |
dup: 138 | |
}], | |
403: [function(b, c, a) { | |
arguments[4][139][0].apply(a, arguments) | |
}, { | |
dup: 139 | |
}], | |
404: [function(b, c, a) { | |
arguments[4][140][0].apply(a, arguments) | |
}, { | |
dup: 140 | |
}], | |
405: [function(b, c, a) { | |
arguments[4][141][0].apply(a, arguments) | |
}, { | |
dup: 141 | |
}], | |
406: [function(b, c, a) { | |
arguments[4][142][0].apply(a, arguments) | |
}, { | |
dup: 142 | |
}], | |
407: [function(b, c, a) { | |
arguments[4][143][0].apply(a, arguments) | |
}, { | |
dup: 143 | |
}], | |
408: [function(b, c, a) { | |
arguments[4][144][0].apply(a, arguments) | |
}, { | |
dup: 144, | |
qs: 398 | |
}], | |
409: [function(b, c, a) { | |
c.exports = { | |
BreakpointsDelegate: b("./ac-breakpoints-delegate/BreakpointsDelegate") | |
} | |
}, { | |
"./ac-breakpoints-delegate/BreakpointsDelegate": 410 | |
}], | |
410: [function(f, b, k) { | |
var d = f("ac-shared-instance").SharedInstance, | |
g = f("ac-object"), | |
r = f("ac-window-delegate").WindowDelegate, | |
c = f("ac-window-delegate").WindowDelegateCustomEvent, | |
q = f("ac-event-emitter").EventEmitter; | |
var n = "ac-breakpoints-delegate:BreakpointsDelegate", | |
a = "2.0.0-2"; | |
var o = "breakpoint", | |
p = "resize orientationchange"; | |
var h = { | |
large: { | |
"min-width": 1069, | |
"max-width": 1441, | |
content: 980, | |
oldie: true | |
}, | |
xlarge: { | |
"min-width": 1442, | |
content: 980 | |
}, | |
medium: { | |
"min-width": 736, | |
"max-width": 1068, | |
content: 692 | |
}, | |
small: { | |
"min-width": 320, | |
"max-width": 735, | |
content: 288, | |
"max-device-width": 768 | |
} | |
}; | |
var j = { | |
minWidth: "min-width", | |
maxWidth: "max-width", | |
maxDeviceWidth: "max-device-width", | |
content: "content", | |
oldIE: "oldie" | |
}; | |
function m(s) { | |
this._customEvent = new c(o, this._onBreakpointListenerAdded.bind(this), this._onBreakpointListenerRemoved.bind(this)); | |
this.setBreakpoints(h) | |
} | |
var l = m.prototype; | |
l.initialize = function() { | |
this._breakpoint = null; | |
this._lastBreakpoint = null; | |
this._handleOldIE(); | |
this._handleDevices(); | |
this._breakpointOrder = this._setBreakpointOrder(); | |
if (!this._isOldIE) { | |
this._handleResize() | |
} | |
}; | |
l.getCustomEvent = function() { | |
return this._customEvent | |
}; | |
l.getBreakpoint = function() { | |
if (!this._customEvent.active) { | |
this._handleResize() | |
} | |
return this._breakpoint | |
}; | |
l.setBreakpoints = function(s) { | |
this.breakpoints = g.clone(s); | |
this.initialize() | |
}; | |
l._handleResize = function() { | |
var w = r.innerWidth(), | |
x; | |
var v, u, t, s = this._breakpointOrder.length; | |
for (v = 0; v < s; v++) { | |
u = this._breakpointOrder[v]; | |
t = this.breakpoints[u]; | |
if (t._breakPosition > w) { | |
break | |
} | |
} | |
if (v > 0) { | |
v = v - 1 | |
} | |
x = this.breakpoints[this._breakpointOrder[v]]; | |
if (!this._breakpoint) { | |
this._breakpoint = x; | |
return | |
} | |
if (x.name === this._breakpoint.name) { | |
return | |
} | |
this._lastBreakpoint = this._breakpoint; | |
this._breakpoint = x; | |
r.trigger(o, { | |
incoming: this._breakpoint, | |
outgoing: this._lastBreakpoint | |
}) | |
}; | |
l._setBreakpointOrder = function() { | |
var w = 0, | |
t = [], | |
s = [], | |
v = j.minWidth, | |
u; | |
for (u in this.breakpoints) { | |
if (this.breakpoints.hasOwnProperty(u)) { | |
this.breakpoints[u].name = u; | |
t.push(this.breakpoints[u][v]) | |
} | |
} | |
t.sort(function(y, x) { | |
return y - x | |
}); | |
t.forEach(function(y) { | |
var x; | |
for (x in this.breakpoints) { | |
if (this.breakpoints.hasOwnProperty(x)) { | |
if (this.breakpoints[x][v] === y) { | |
s.push(x) | |
} | |
} | |
} | |
}, this); | |
s.forEach(function(y, x) { | |
this.breakpoints[y]._breakPosition = w; | |
if (s[x + 1]) { | |
w = this.breakpoints[s[x + 1]][v] | |
} | |
}, this); | |
return s | |
}; | |
l._handleOldIE = function() { | |
var s = document.documentElement, | |
u = j.oldIE; | |
if (s.className.indexOf("no-" + u) > -1 || s.className.indexOf(u) === -1) { | |
return | |
} | |
this._isOldIE = true; | |
this._replaceBreakpoints(function(v) { | |
return v[u] === true | |
}); | |
var t; | |
for (t in this.breakpoints) { | |
if (this.breakpoints.hasOwnProperty(t)) { | |
this._breakpoint = this.breakpoints[t]; | |
return | |
} | |
} | |
}; | |
l._handleDevices = function() { | |
var s = j.maxDeviceWidth; | |
this._replaceBreakpoints(function(t) { | |
if (typeof t[s] !== "number") { | |
return true | |
} | |
if (window.screen && window.screen.width <= t[s]) { | |
return true | |
} | |
return false | |
}) | |
}; | |
l._replaceBreakpoints = function(v) { | |
var t, u = {}, | |
s; | |
for (t in this.breakpoints) { | |
if (this.breakpoints.hasOwnProperty(t)) { | |
s = this.breakpoints[t]; | |
if (v(s)) { | |
u[t] = g.clone(this.breakpoints[t]) | |
} | |
} | |
} | |
this.breakpoints = u | |
}; | |
l._onBreakpointListenerAdded = function() { | |
r.on(p, this._handleResize, this) | |
}; | |
l._onBreakpointListenerRemoved = function() { | |
r.off(p, this._handleResize, this) | |
}; | |
b.exports = d.share(n, a, m) | |
}, { | |
"ac-event-emitter": 396, | |
"ac-object": 399, | |
"ac-shared-instance": 411, | |
"ac-window-delegate": 448 | |
}], | |
411: [function(b, c, a) { | |
arguments[4][194][0].apply(a, arguments) | |
}, { | |
"./ac-shared-instance/SharedInstance": 412, | |
dup: 194 | |
}], | |
412: [function(b, c, a) { | |
arguments[4][195][0].apply(a, arguments) | |
}, { | |
dup: 195 | |
}], | |
413: [function(b, c, a) { | |
var d = b("./ac-prefixer/Prefixer"); | |
c.exports = new d(); | |
c.exports.Prefixer = d | |
}, { | |
"./ac-prefixer/Prefixer": 414 | |
}], | |
414: [function(d, b, g) { | |
var l = d("./Prefixer/camelCasedEvents"); | |
var o = /(\([^\)]+\))/gi; | |
var h = /([^ ,;\(]+(\([^\)]+\))?)/gi; | |
var k = /(-webkit-|-moz-|-ms-)|^(webkit|moz|ms)/gi; | |
var a = /^(webkit|moz|ms)/gi; | |
var f = ["-webkit-", "-moz-", "-ms-"]; | |
var m = ["Webkit", "Moz", "ms"]; | |
var n = ["webkit", "moz", "ms"]; | |
function c() { | |
this._supportsAvailable = ("CSS" in window && "supports" in window.CSS); | |
this._cssPrefixes = f; | |
this._domPrefixes = m; | |
this._evtPrefixes = n; | |
this._styleProperties = {}; | |
this._styleValues = {}; | |
this._eventTypes = {} | |
} | |
var j = c.prototype; | |
j.getEventType = function(q) { | |
var r; | |
var p; | |
q = q.toLowerCase(); | |
if (q in this._eventTypes) { | |
return this._eventTypes[q] | |
} | |
if (this._checkEventType("on" + q)) { | |
return this._eventTypes[q] = q | |
} | |
if (l[q]) { | |
for (r in l[q]) { | |
if (this._checkEventType(r)) { | |
return this._eventTypes[q] = l[q][r] | |
} | |
} | |
} | |
for (p = 0; p < this._evtPrefixes.length; p++) { | |
if (this._checkEventType("on" + this._evtPrefixes[p] + q)) { | |
this._eventTypes[q] = this._evtPrefixes[p] + q; | |
this._reduceAvailablePrefixes(p); | |
return this._eventTypes[q] | |
} | |
} | |
return this._eventTypes[q] = q | |
}; | |
j._checkEventType = function(p) { | |
return (p in window || p in document) | |
}; | |
j.getStyleProperty = function(s) { | |
var r; | |
var p; | |
var q; | |
s += ""; | |
if (s in this._styleProperties) { | |
return this._styleProperties[s].dom | |
} | |
s = this._toDOM(s); | |
this._prepareTestElement(); | |
p = s.charAt(0).toUpperCase() + s.substr(1); | |
if (s === "filter") { | |
r = ["WebkitFilter", "filter"] | |
} else { | |
r = (s + " " + this._domPrefixes.join(p + " ") + p).split(" ") | |
} | |
for (q = 0; q < r.length; q++) { | |
if (this._el.style[r[q]] !== undefined) { | |
if (q !== 0) { | |
this._reduceAvailablePrefixes(q - 1) | |
} | |
this._memoizeStyleProperty(s, r[q]); | |
return r[q] | |
} | |
} | |
this._memoizeStyleProperty(s, false); | |
return false | |
}; | |
j._memoizeStyleProperty = function(s, p) { | |
var q = this._toCSS(s); | |
var r = (p === false) ? false : this._toCSS(p); | |
this._styleProperties[s] = this._styleProperties[p] = this._styleProperties[q] = this._styleProperties[r] = { | |
dom: p, | |
css: r | |
} | |
}; | |
j.getStyleCSS = function(r, q) { | |
var p; | |
r = this.getStyleProperty(r); | |
if (!r) { | |
return false | |
} | |
p = this._styleProperties[r].css; | |
if (typeof q !== "undefined") { | |
q = this.getStyleValue(r, q); | |
if (q === false) { | |
return false | |
} | |
p += ":" + q + ";" | |
} | |
return p | |
}; | |
j.getStyleValue = function(r, q) { | |
var p; | |
q += ""; | |
r = this.getStyleProperty(r); | |
if (!r) { | |
return false | |
} | |
if (this._testStyleValue(r, q)) { | |
return q | |
} | |
p = this._styleProperties[r].css; | |
q = q.replace(h, function(t) { | |
var s; | |
var w; | |
var v; | |
var u; | |
if (t[0] === "#" || !isNaN(t[0])) { | |
return t | |
} | |
w = t.replace(o, ""); | |
v = p + ":" + w; | |
if (v in this._styleValues) { | |
if (this._styleValues[v] === false) { | |
return "" | |
} | |
return t.replace(w, this._styleValues[v]) | |
} | |
s = this._cssPrefixes.map(function(x) { | |
return x + t | |
}); | |
s = [t].concat(s); | |
for (u = 0; u < s.length; u++) { | |
if (this._testStyleValue(r, s[u])) { | |
if (u !== 0) { | |
this._reduceAvailablePrefixes(u - 1) | |
} | |
this._styleValues[v] = s[u].replace(o, ""); | |
return s[u] | |
} | |
} | |
this._styleValues[v] = false; | |
return "" | |
}.bind(this)); | |
q = q.trim(); | |
return (q === "") ? false : q | |
}; | |
j._testStyleValue = function(r, q) { | |
var p; | |
if (this._supportsAvailable) { | |
r = this._styleProperties[r].css; | |
return CSS.supports(r, q) | |
} | |
this._prepareTestElement(); | |
p = this._el.style[r]; | |
try { | |
this._el.style[r] = q | |
} catch (s) { | |
return false | |
} | |
return (this._el.style[r] && this._el.style[r] !== p) | |
}; | |
j.stripPrefixes = function(p) { | |
p = String.prototype.replace.call(p, k, ""); | |
return p.charAt(0).toLowerCase() + p.slice(1) | |
}; | |
j._reduceAvailablePrefixes = function(p) { | |
if (this._cssPrefixes.length !== 1) { | |
this._cssPrefixes = [this._cssPrefixes[p]]; | |
this._domPrefixes = [this._domPrefixes[p]]; | |
this._evtPrefixes = [this._evtPrefixes[p]] | |
} | |
}; | |
j._toDOM = function(q) { | |
var p; | |
if (q.toLowerCase() === "float") { | |
return "cssFloat" | |
} | |
q = q.replace(/-([a-z])/g, function(s, r) { | |
return r.toUpperCase() | |
}); | |
if (q.substr(0, 2) === "Ms") { | |
q = "ms" + q.substr(2) | |
} | |
return q | |
}; | |
j._toCSS = function(q) { | |
var p; | |
if (q.toLowerCase() === "cssfloat") { | |
return "float" | |
} | |
if (a.test(q)) { | |
q = "-" + q | |
} | |
return q.replace(/([A-Z]+)([A-Z][a-z])/g, "$1-$2").replace(/([a-z\d])([A-Z])/g, "$1-$2").toLowerCase() | |
}; | |
j._prepareTestElement = function() { | |
if (!this._el) { | |
this._el = document.createElement("_") | |
} else { | |
this._el.style.cssText = ""; | |
this._el.removeAttribute("style") | |
} | |
}; | |
b.exports = c | |
}, { | |
"./Prefixer/camelCasedEvents": 415 | |
}], | |
415: [function(b, c, a) { | |
c.exports = { | |
transitionend: { | |
onwebkittransitionend: "webkitTransitionEnd", | |
onmstransitionend: "MSTransitionEnd" | |
}, | |
animationstart: { | |
onwebkitanimationstart: "webkitAnimationStart", | |
onmsanimationstart: "MSAnimationStart" | |
}, | |
animationend: { | |
onwebkitanimationend: "webkitAnimationEnd", | |
onmsanimationend: "MSAnimationEnd" | |
}, | |
animationiteration: { | |
onwebkitanimationiteration: "webkitAnimationIteration", | |
onmsanimationiteration: "MSAnimationIteration" | |
}, | |
fullscreenchange: { | |
onmsfullscreenchange: "MSFullscreenChange" | |
}, | |
fullscreenerror: { | |
onmsfullscreenerror: "MSFullscreenError" | |
} | |
} | |
}, {}], | |
416: [function(b, c, a) { | |
c.exports = { | |
addEventListener: b("./ac-dom-events/addEventListener"), | |
dispatchEvent: b("./ac-dom-events/dispatchEvent"), | |
preventDefault: b("./ac-dom-events/preventDefault"), | |
removeEventListener: b("./ac-dom-events/removeEventListener"), | |
stop: b("./ac-dom-events/stop"), | |
stopPropagation: b("./ac-dom-events/stopPropagation"), | |
target: b("./ac-dom-events/target") | |
} | |
}, { | |
"./ac-dom-events/addEventListener": 417, | |
"./ac-dom-events/dispatchEvent": 418, | |
"./ac-dom-events/preventDefault": 419, | |
"./ac-dom-events/removeEventListener": 420, | |
"./ac-dom-events/stop": 421, | |
"./ac-dom-events/stopPropagation": 422, | |
"./ac-dom-events/target": 423 | |
}], | |
417: [function(b, c, a) { | |
var f = b("ac-prefixer"); | |
c.exports = function d(k, h, j, g) { | |
h = f.getEventType(h); | |
if (k.addEventListener) { | |
k.addEventListener(h, j, g) | |
} else { | |
h = "on" + h.toLowerCase(); | |
k.attachEvent(h, j) | |
} | |
return k | |
} | |
}, { | |
"ac-prefixer": 413 | |
}], | |
418: [function(b, c, a) { | |
c.exports = function d(j, h, g) { | |
var f; | |
h = h.toLowerCase(); | |
if (window.CustomEvent) { | |
if (g) { | |
f = new CustomEvent(h, g) | |
} else { | |
f = new CustomEvent(h) | |
} | |
j.dispatchEvent(f) | |
} else { | |
f = document.createEventObject(); | |
if (g && "detail" in g) { | |
f.detail = g.detail | |
} | |
j.fireEvent("on" + h, f) | |
} | |
return j | |
} | |
}, {}], | |
419: [function(b, c, a) { | |
arguments[4][44][0].apply(a, arguments) | |
}, { | |
dup: 44 | |
}], | |
420: [function(b, c, a) { | |
var f = b("ac-prefixer"); | |
c.exports = function d(k, h, j, g) { | |
h = f.getEventType(h); | |
if (k.removeEventListener) { | |
k.removeEventListener(h, j, g) | |
} else { | |
h = "on" + h.toLowerCase(); | |
k.detachEvent(h, j) | |
} | |
return k | |
} | |
}, { | |
"ac-prefixer": 413 | |
}], | |
421: [function(b, c, a) { | |
arguments[4][47][0].apply(a, arguments) | |
}, { | |
"./preventDefault": 419, | |
"./stopPropagation": 422, | |
dup: 47 | |
}], | |
422: [function(b, c, a) { | |
arguments[4][48][0].apply(a, arguments) | |
}, { | |
dup: 48 | |
}], | |
423: [function(b, c, a) { | |
c.exports = function d(f) { | |
f = f || window.event; | |
return (typeof f.target !== "undefined") ? f.target : f.srcElement | |
} | |
}, {}], | |
424: [function(b, c, a) { | |
arguments[4][173][0].apply(a, arguments) | |
}, { | |
"./ac-dom-traversal/ancestor": 425, | |
"./ac-dom-traversal/ancestors": 426, | |
"./ac-dom-traversal/children": 427, | |
"./ac-dom-traversal/filterBySelector": 428, | |
"./ac-dom-traversal/firstChild": 429, | |
"./ac-dom-traversal/lastChild": 432, | |
"./ac-dom-traversal/matchesSelector": 433, | |
"./ac-dom-traversal/nextSibling": 434, | |
"./ac-dom-traversal/nextSiblings": 435, | |
"./ac-dom-traversal/previousSibling": 436, | |
"./ac-dom-traversal/previousSiblings": 437, | |
"./ac-dom-traversal/querySelector": 438, | |
"./ac-dom-traversal/querySelectorAll": 439, | |
"./ac-dom-traversal/shims/ie": 440, | |
"./ac-dom-traversal/siblings": 441, | |
dup: 173 | |
}], | |
425: [function(b, c, a) { | |
arguments[4][174][0].apply(a, arguments) | |
}, { | |
"./helpers/validate": 431, | |
"./matchesSelector": 433, | |
"ac-dom-nodes": 74, | |
dup: 174 | |
}], | |
426: [function(b, c, a) { | |
arguments[4][175][0].apply(a, arguments) | |
}, { | |
"./helpers/validate": 431, | |
"./matchesSelector": 433, | |
"ac-dom-nodes": 74, | |
dup: 175 | |
}], | |
427: [function(b, c, a) { | |
arguments[4][176][0].apply(a, arguments) | |
}, { | |
"./filterBySelector": 428, | |
"./helpers/validate": 431, | |
"ac-dom-nodes": 74, | |
dup: 176 | |
}], | |
428: [function(b, c, a) { | |
arguments[4][177][0].apply(a, arguments) | |
}, { | |
"./helpers/validate": 431, | |
"./matchesSelector": 433, | |
dup: 177 | |
}], | |
429: [function(b, c, a) { | |
arguments[4][178][0].apply(a, arguments) | |
}, { | |
"./children": 427, | |
"./helpers/validate": 431, | |
dup: 178 | |
}], | |
430: [function(b, c, a) { | |
arguments[4][179][0].apply(a, arguments) | |
}, { | |
dup: 179 | |
}], | |
431: [function(b, c, a) { | |
arguments[4][180][0].apply(a, arguments) | |
}, { | |
"ac-dom-nodes": 74, | |
dup: 180 | |
}], | |
432: [function(b, c, a) { | |
arguments[4][181][0].apply(a, arguments) | |
}, { | |
"./children": 427, | |
"./helpers/validate": 431, | |
dup: 181 | |
}], | |
433: [function(b, c, a) { | |
arguments[4][182][0].apply(a, arguments) | |
}, { | |
"./helpers/nativeMatches": 430, | |
"./helpers/validate": 431, | |
"ac-dom-nodes": 74, | |
dup: 182 | |
}], | |
434: [function(b, c, a) { | |
arguments[4][183][0].apply(a, arguments) | |
}, { | |
"./helpers/validate": 431, | |
"./matchesSelector": 433, | |
"ac-dom-nodes": 74, | |
dup: 183 | |
}], | |
435: [function(b, c, a) { | |
arguments[4][184][0].apply(a, arguments) | |
}, { | |
"./helpers/validate": 431, | |
"./matchesSelector": 433, | |
"ac-dom-nodes": 74, | |
dup: 184 | |
}], | |
436: [function(b, c, a) { | |
arguments[4][185][0].apply(a, arguments) | |
}, { | |
"./helpers/validate": 431, | |
"./matchesSelector": 433, | |
"ac-dom-nodes": 74, | |
dup: 185 | |
}], | |
437: [function(b, c, a) { | |
arguments[4][186][0].apply(a, arguments) | |
}, { | |
"./helpers/validate": 431, | |
"./matchesSelector": 433, | |
"ac-dom-nodes": 74, | |
dup: 186 | |
}], | |
438: [function(b, c, a) { | |
arguments[4][187][0].apply(a, arguments) | |
}, { | |
"./helpers/validate": 431, | |
dup: 187 | |
}], | |
439: [function(b, c, a) { | |
arguments[4][188][0].apply(a, arguments) | |
}, { | |
"./helpers/validate": 431, | |
dup: 188 | |
}], | |
440: [function(b, c, a) { | |
arguments[4][189][0].apply(a, arguments) | |
}, { | |
"../helpers/nativeMatches": 430, | |
"../helpers/validate": 431, | |
"../vendor/sizzle/sizzle": 442, | |
"ac-dom-nodes": 74, | |
dup: 189 | |
}], | |
441: [function(b, c, a) { | |
arguments[4][190][0].apply(a, arguments) | |
}, { | |
"./children": 427, | |
"./helpers/validate": 431, | |
dup: 190 | |
}], | |
442: [function(b, c, a) { | |
arguments[4][191][0].apply(a, arguments) | |
}, { | |
dup: 191 | |
}], | |
443: [function(b, c, a) { | |
c.exports = { | |
DOMEmitter: b("./ac-dom-emitter/DOMEmitter") | |
} | |
}, { | |
"./ac-dom-emitter/DOMEmitter": 444 | |
}], | |
444: [function(c, b, d) { | |
var f; | |
var l = c("ac-event-emitter").EventEmitter, | |
k = c("./DOMEmitterEvent"), | |
g = c("ac-dom-events"), | |
a = c("ac-dom-traversal"); | |
var j = "dom-emitter"; | |
function h(m) { | |
if (m === null) { | |
return | |
} | |
this.el = m; | |
this._bindings = {}; | |
this._delegateFuncs = {}; | |
this._eventEmitter = new l() | |
} | |
f = h.prototype; | |
f.on = function() { | |
this._normalizeArgumentsAndCall(Array.prototype.slice.call(arguments, 0), this._on); | |
return this | |
}; | |
f.once = function() { | |
this._normalizeArgumentsAndCall(Array.prototype.slice.call(arguments, 0), this._once); | |
return this | |
}; | |
f.off = function() { | |
this._normalizeArgumentsAndCall(Array.prototype.slice.call(arguments, 0), this._off); | |
return this | |
}; | |
f.has = function(m, r, q, o) { | |
var p, s; | |
if (typeof r === "string") { | |
p = r; | |
s = q | |
} else { | |
s = r; | |
o = q | |
} | |
if (p) { | |
var n = this._getDelegateFuncBindingIdx(m, p, s, o, true); | |
if (n > -1) { | |
return true | |
} | |
return false | |
} | |
if (this._eventEmitter && this._eventEmitter.has.apply(this._eventEmitter, arguments)) { | |
return true | |
} | |
return false | |
}; | |
f.trigger = function(o, n, p, t) { | |
o = this._parseEventNames(o); | |
o = this._cleanStringData(o); | |
var r, s, q, m = o.length; | |
if (typeof n === "string") { | |
r = this._cleanStringData(n); | |
s = p | |
} else { | |
s = n; | |
t = p | |
} | |
for (q = 0; q < m; q++) { | |
this._triggerDOMEvents(o[q], s, r) | |
} | |
return this | |
}; | |
f.emitterTrigger = function(n, p, q) { | |
if (!this._eventEmitter) { | |
return this | |
} | |
n = this._parseEventNames(n); | |
n = this._cleanStringData(n); | |
p = new k(p, this); | |
var o, m = n.length; | |
for (o = 0; o < m; o++) { | |
this._eventEmitter.trigger(n[o], p, q) | |
} | |
return this | |
}; | |
f.propagateTo = function(m, n) { | |
this._eventEmitter.propagateTo(m, n); | |
return this | |
}; | |
f.stopPropagatingTo = function(m) { | |
this._eventEmitter.stopPropagatingTo(m); | |
return this | |
}; | |
f.stopImmediatePropagation = function() { | |
this._eventEmitter.stopImmediatePropagation(); | |
return this | |
}; | |
f.destroy = function() { | |
this._triggerInternalEvent("willdestroy"); | |
this.off(); | |
var m; | |
for (m in this) { | |
if (this.hasOwnProperty(m)) { | |
this[m] = null | |
} | |
} | |
}; | |
f._parseEventNames = function(m) { | |
if (!m) { | |
return [m] | |
} | |
return m.split(" ") | |
}; | |
f._onListenerEvent = function(o, n) { | |
var m = new k(n, this); | |
this._eventEmitter.trigger(o, m, false) | |
}; | |
f._setListener = function(m) { | |
this._bindings[m] = this._onListenerEvent.bind(this, m); | |
g.addEventListener(this.el, m, this._bindings[m]) | |
}; | |
f._removeListener = function(m) { | |
g.removeEventListener(this.el, m, this._bindings[m]); | |
this._bindings[m] = null | |
}; | |
f._triggerInternalEvent = function(m, n) { | |
this.emitterTrigger(j + ":" + m, n) | |
}; | |
f._normalizeArgumentsAndCall = function(m, o) { | |
var s = {}; | |
if (m.length === 0) { | |
o.call(this, s); | |
return | |
} | |
if (typeof m[0] === "string" || m[0] === null) { | |
m = this._cleanStringData(m); | |
s.events = m[0]; | |
if (typeof m[1] === "string") { | |
s.delegateQuery = m[1]; | |
s.callback = m[2]; | |
s.context = m[3] | |
} else { | |
s.callback = m[1]; | |
s.context = m[2] | |
} | |
o.call(this, s); | |
return | |
} | |
var n, q, r = ":", | |
p = m[0]; | |
for (n in p) { | |
if (p.hasOwnProperty(n)) { | |
s = {}; | |
q = this._cleanStringData(n.split(r)); | |
s.events = q[0]; | |
s.delegateQuery = q[1]; | |
s.callback = p[n]; | |
s.context = m[1]; | |
o.call(this, s) | |
} | |
} | |
}; | |
f._registerDelegateFunc = function(o, q, r, m, p) { | |
var n = this._delegateFunc.bind(this, o, q, r, p); | |
this._delegateFuncs[q] = this._delegateFuncs[q] || {}; | |
this._delegateFuncs[q][o] = this._delegateFuncs[q][o] || []; | |
this._delegateFuncs[q][o].push({ | |
func: m, | |
context: p, | |
delegateFunc: n | |
}); | |
return n | |
}; | |
f._cleanStringData = function(p) { | |
var o = false; | |
if (typeof p === "string") { | |
p = [p]; | |
o = true | |
} | |
var n = [], | |
r, t, s, q, m = p.length; | |
for (r = 0; r < m; r++) { | |
t = p[r]; | |
if (typeof t === "string") { | |
if (t === "" || t === " ") { | |
continue | |
} | |
s = t.length; | |
while (t[0] === " ") { | |
t = t.slice(1, s); | |
s-- | |
} | |
while (t[s - 1] === " ") { | |
t = t.slice(0, s - 1); | |
s-- | |
} | |
} | |
n.push(t) | |
} | |
if (o) { | |
return n[0] | |
} | |
return n | |
}; | |
f._unregisterDelegateFunc = function(o, r, m, q) { | |
if (!this._delegateFuncs[r] || !this._delegateFuncs[r][o]) { | |
return | |
} | |
var p = this._getDelegateFuncBindingIdx(o, r, m, q), | |
n; | |
if (p > -1) { | |
n = this._delegateFuncs[r][o][p].delegateFunc; | |
this._delegateFuncs[r][o].splice(p, 1); | |
if (this._delegateFuncs[r][o].length === 0) { | |
this._delegateFuncs[r][o] = null | |
} | |
} | |
return n | |
}; | |
f._unregisterDelegateFuncs = function(m, o) { | |
if (!this._delegateFuncs[o]) { | |
return | |
} | |
if (m !== null && !this._delegateFuncs[o][m]) { | |
return | |
} | |
if (m === null) { | |
var n; | |
for (n in this._delegateFuncs[o]) { | |
if (this._delegateFuncs[o].hasOwnProperty(n)) { | |
this._unbindDelegateFunc(n, o) | |
} | |
} | |
return | |
} | |
this._unbindDelegateFunc(m, o) | |
}; | |
f._unbindDelegateFunc = function(m, o) { | |
var p, q, n = 0; | |
while (this._delegateFuncs[o][m] && this._delegateFuncs[o][m][n]) { | |
p = this._delegateFuncs[o][m][n]; | |
q = this._delegateFuncs[o][m][n].length; | |
this._off({ | |
events: m, | |
delegateQuery: o, | |
callback: p.func, | |
context: p.context | |
}); | |
if (this._delegateFuncs[o][m] && q === this._delegateFuncs[o][m].length) { | |
n++ | |
} | |
} | |
p = q = null | |
}; | |
f._unregisterDelegateFuncsByEvent = function(m) { | |
var n; | |
for (n in this._delegateFuncs) { | |
if (this._delegateFuncs.hasOwnProperty(n)) { | |
this._unregisterDelegateFuncs(m, n) | |
} | |
} | |
}; | |
f._delegateFunc = function(m, q, s, o, r) { | |
if (this._targetHasDelegateAncestor(r.target, q)) { | |
var n = Array.prototype.slice.call(arguments, 0), | |
p = n.slice(4, n.length); | |
o = o || window; | |
if (typeof r.detail === "object") { | |
p[0] = r.detail | |
} | |
s.apply(o, p) | |
} | |
}; | |
f._targetHasDelegateAncestor = function(o, n) { | |
var m = o; | |
while (m && m !== this.el && m !== document.documentElement) { | |
if (a.matchesSelector(m, n)) { | |
return true | |
} | |
m = m.parentNode | |
} | |
return false | |
}; | |
f._on = function(q) { | |
var n = q.events, | |
r = q.callback, | |
p = q.delegateQuery, | |
o = q.context, | |
m = q.unboundCallback || r; | |
n = this._parseEventNames(n); | |
n.forEach(function(w, s, u, v, t) { | |
if (!this.has(t)) { | |
this._setListener(t) | |
} | |
if (typeof v === "string") { | |
w = this._registerDelegateFunc(t, v, w, s, u) | |
} | |
this._triggerInternalEvent("willon", { | |
evt: t, | |
callback: w, | |
context: u, | |
delegateQuery: v | |
}); | |
this._eventEmitter.on(t, w, u); | |
this._triggerInternalEvent("didon", { | |
evt: t, | |
callback: w, | |
context: u, | |
delegateQuery: v | |
}) | |
}.bind(this, r, m, o, p)); | |
n = r = m = p = o = null | |
}; | |
f._off = function(r) { | |
var n = r.events, | |
s = r.callback, | |
q = r.delegateQuery, | |
p = r.context, | |
m = r.unboundCallback || s; | |
if (typeof n === "undefined") { | |
this._eventEmitter.off(); | |
var o; | |
for (o in this._bindings) { | |
if (this._bindings.hasOwnProperty(o)) { | |
this._removeListener(o) | |
} | |
} | |
for (o in this._delegateFuncs) { | |
if (this._delegateFuncs.hasOwnProperty(o)) { | |
this._delegateFuncs[o] = null | |
} | |
} | |
return | |
} | |
n = this._parseEventNames(n); | |
n.forEach(function(x, t, v, w, u) { | |
if (typeof w === "string" && typeof t === "function") { | |
x = this._unregisterDelegateFunc(u, w, t, v); | |
if (!x) { | |
return | |
} | |
} | |
if (typeof w === "string" && typeof x === "undefined") { | |
this._unregisterDelegateFuncs(u, w); | |
return | |
} | |
if (typeof u === "string" && typeof x === "undefined") { | |
this._unregisterDelegateFuncsByEvent(u); | |
if (typeof w === "string") { | |
return | |
} | |
} | |
this._triggerInternalEvent("willoff", { | |
evt: u, | |
callback: x, | |
context: v, | |
delegateQuery: w | |
}); | |
this._eventEmitter.off(u, x, v); | |
this._triggerInternalEvent("didoff", { | |
evt: u, | |
callback: x, | |
context: v, | |
delegateQuery: w | |
}); | |
if (!this.has(u)) { | |
this._removeListener(u) | |
} | |
}.bind(this, s, m, p, q)); | |
n = s = m = q = p = null | |
}; | |
f._once = function(p) { | |
var m = p.events, | |
q = p.callback, | |
o = p.delegateQuery, | |
n = p.context; | |
m = this._parseEventNames(m); | |
m.forEach(function(u, s, t, r) { | |
if (typeof t === "string") { | |
return this._handleDelegateOnce(r, u, s, t) | |
} | |
if (!this.has(r)) { | |
this._setListener(r) | |
} | |
this._triggerInternalEvent("willonce", { | |
evt: r, | |
callback: u, | |
context: s, | |
delegateQuery: t | |
}); | |
this._eventEmitter.once.call(this, r, u, s); | |
this._triggerInternalEvent("didonce", { | |
evt: r, | |
callback: u, | |
context: s, | |
delegateQuery: t | |
}) | |
}.bind(this, q, n, o)); | |
m = q = o = n = null | |
}; | |
f._handleDelegateOnce = function(m, p, n, o) { | |
this._triggerInternalEvent("willonce", { | |
evt: m, | |
callback: p, | |
context: n, | |
delegateQuery: o | |
}); | |
this._on({ | |
events: m, | |
context: n, | |
delegateQuery: o, | |
callback: this._getDelegateOnceCallback.bind(this, m, p, n, o), | |
unboundCallback: p | |
}); | |
this._triggerInternalEvent("didonce", { | |
evt: m, | |
callback: p, | |
context: n, | |
delegateQuery: o | |
}); | |
return this | |
}; | |
f._getDelegateOnceCallback = function(m, r, o, q) { | |
var n = Array.prototype.slice.call(arguments, 0), | |
p = n.slice(4, n.length); | |
r.apply(o, p); | |
this._off({ | |
events: m, | |
delegateQuery: q, | |
callback: r, | |
context: o | |
}) | |
}; | |
f._getDelegateFuncBindingIdx = function(t, q, o, m, u) { | |
var s = -1; | |
if (this._delegateFuncs[q] && this._delegateFuncs[q][t]) { | |
var p, n, r = this._delegateFuncs[q][t].length; | |
for (p = 0; p < r; p++) { | |
n = this._delegateFuncs[q][t][p]; | |
if (u && typeof o === "undefined") { | |
o = n.func | |
} | |
if (n.func === o && n.context === m) { | |
s = p; | |
break | |
} | |
} | |
} | |
return s | |
}; | |
f._triggerDOMEvents = function(o, r, q) { | |
var n = [this.el]; | |
if (q) { | |
n = a.querySelectorAll(q, this.el) | |
} | |
var p, s, m = n.length; | |
for (p = 0; p < m; p++) { | |
g.dispatchEvent(n[p], o, { | |
bubbles: true, | |
cancelable: true, | |
detail: r | |
}) | |
} | |
}; | |
b.exports = h | |
}, { | |
"./DOMEmitterEvent": 445, | |
"ac-dom-events": 416, | |
"ac-dom-traversal": 424, | |
"ac-event-emitter": 446 | |
}], | |
445: [function(b, c, a) { | |
var f = b("ac-dom-events"); | |
var d; | |
var g = function(j, h) { | |
this._domEmitter = h; | |
this.originalEvent = j || {}; | |
this._originalTarget = f.target(this.originalEvent); | |
this.target = this._originalTarget || this._domEmitter.el; | |
this.currentTarget = this._domEmitter.el; | |
this.timeStamp = this.originalEvent.timeStamp || Date.now(); | |
if (this._isDOMEvent(this.originalEvent)) { | |
if (typeof this.originalEvent.detail === "object") { | |
this.data = this.originalEvent.detail | |
} | |
} else { | |
if (j) { | |
this.data = this.originalEvent; | |
this.originalEvent = {} | |
} | |
} | |
}; | |
d = g.prototype; | |
d.preventDefault = function() { | |
f.preventDefault(this.originalEvent) | |
}; | |
d.stopPropagation = function() { | |
f.stopPropagation(this.originalEvent) | |
}; | |
d.stopImmediatePropagation = function() { | |
if (this.originalEvent.stopImmediatePropagation) { | |
this.originalEvent.stopImmediatePropagation() | |
} | |
this._domEmitter.stopImmediatePropagation() | |
}; | |
d._isDOMEvent = function(h) { | |
if (this._originalTarget || (document.createEvent !== "undefined" && typeof CustomEvent !== "undefined" && h instanceof CustomEvent)) { | |
return true | |
} | |
return false | |
}; | |
c.exports = g | |
}, { | |
"ac-dom-events": 416 | |
}], | |
446: [function(b, c, a) { | |
arguments[4][19][0].apply(a, arguments) | |
}, { | |
"./ac-event-emitter/EventEmitter": 447, | |
dup: 19 | |
}], | |
447: [function(b, c, a) { | |
arguments[4][20][0].apply(a, arguments) | |
}, { | |
dup: 20 | |
}], | |
448: [function(b, c, a) { | |
arguments[4][196][0].apply(a, arguments) | |
}, { | |
"./ac-window-delegate/WindowDelegate": 451, | |
"./ac-window-delegate/WindowDelegateCustomEvent": 452, | |
"./ac-window-delegate/WindowDelegateOptimizer": 453, | |
dup: 196 | |
}], | |
449: [function(b, c, a) { | |
arguments[4][197][0].apply(a, arguments) | |
}, { | |
"ac-event-emitter": 446, | |
dup: 197 | |
}], | |
450: [function(b, c, a) { | |
arguments[4][198][0].apply(a, arguments) | |
}, { | |
"ac-event-emitter": 446, | |
dup: 198 | |
}], | |
451: [function(d, b, g) { | |
var j; | |
var c = d("ac-shared-instance").SharedInstance, | |
m = d("ac-dom-emitter").DOMEmitter, | |
k = d("./OptimizerController"), | |
f = d("./CustomEventController"), | |
h = d("./queries/queries"), | |
n = d("./optimizers/optimizers"); | |
var l = "ac-window-delegate:WindowDelegate", | |
a = "3.0.0-4"; | |
function o() { | |
this._emitter = new m(window); | |
this._controllers = { | |
optimizer: new k(n), | |
customEvent: new f() | |
}; | |
var p; | |
for (p in h) { | |
if (h.hasOwnProperty(p)) { | |
this[p] = this._getProperty.bind(this, p); | |
h[p] = h[p].bind(this) | |
} | |
} | |
this._bindEvents() | |
} | |
j = o.prototype; | |
j.on = function(p, s, q) { | |
var r = this._seperateCustomEvents(p); | |
this._optimizeEvents(r.standardEvents); | |
this._customEventOn(r.customEvents, s, q); | |
this._emitterOn.apply(this, arguments); | |
return this | |
}; | |
j.once = function(p, s, q) { | |
var r = this._seperateCustomEvents(p); | |
this._optimizeEvents(r.standardEvents); | |
this._customEventOnce(r.customEvents, s, q); | |
this._emitterOnce.apply(this, arguments); | |
return this | |
}; | |
j.off = function(q, v, r) { | |
var u = this._seperateCustomEvents(q), | |
s = false; | |
if (!q) { | |
s = true | |
} | |
this._customEventOff(u.customEvents, v, r, s); | |
this._emitterOff.apply(this, arguments); | |
if (s) { | |
try { | |
var p; | |
for (p in this._controllers.optimizer._events) { | |
if (this._controllers.optimizer._events.hasOwnProperty(p) && this._shouldDeoptimizeEvent(p, true)) { | |
this._deoptimizeEvent(p) | |
} | |
} | |
this._bindEvents() | |
} catch (t) {} | |
} | |
return this | |
}; | |
j.has = function(p, r, q) { | |
return this._emitter.has.apply(this._emitter, arguments) | |
}; | |
j.trigger = function() { | |
this._emitter.trigger.apply(this._emitter, arguments); | |
return this | |
}; | |
j.emitterTrigger = function() { | |
this._emitter.emitterTrigger.apply(this._emitter, arguments); | |
return this | |
}; | |
j.propagateTo = function() { | |
this._emitter.propagateTo.apply(this._emitter, arguments); | |
return this | |
}; | |
j.stopPropagatingTo = function() { | |
this._emitter.stopPropagatingTo.apply(this._emitter, arguments); | |
return this | |
}; | |
j.addOptimizer = function(p) { | |
this._controllers.optimizer.add(p); | |
return this | |
}; | |
j.addCustomEvent = function(p) { | |
this._controllers.customEvent.add(p); | |
return this | |
}; | |
j._emitterOn = function() { | |
this._emitter.on.apply(this._emitter, arguments) | |
}; | |
j._emitterOnce = function() { | |
this._emitter.once.apply(this._emitter, arguments) | |
}; | |
j._emitterOff = function() { | |
this._emitter.off.apply(this._emitter, arguments) | |
}; | |
j._onEventUnbound = function(q) { | |
var p = q.data.evt; | |
if (this._shouldDeoptimizeEvent(p)) { | |
this._deoptimizeEvent(p) | |
} | |
}; | |
j._customEventOn = function(p, r, q) { | |
if (p.length === 0) { | |
return | |
} | |
this._controllers.customEvent.on(p.join(" "), r, q) | |
}; | |
j._customEventOnce = function(p, r, q) { | |
if (p.length === 0) { | |
return | |
} | |
this._controllers.customEvent.once(p.join(" "), r, q) | |
}; | |
j._customEventOff = function(p, s, q, r) { | |
if (!r && p.length === 0) { | |
return | |
} | |
if (r && p.length === 0) { | |
this._controllers.customEvent.off(); | |
return | |
} | |
this._controllers.customEvent.off(p.join(" "), s, q) | |
}; | |
j._getProperty = function(r, p) { | |
var q = null; | |
if (!p) { | |
q = this._getOptimizedValue(r) | |
} | |
if (q === null) { | |
q = h[r].call(this, p) | |
} | |
return q | |
}; | |
j._optimizeEvents = function(r) { | |
var q, s, p = r.length; | |
for (s = 0; s < p; s++) { | |
q = r[s]; | |
if (this._shouldOptimizeEvent(q)) { | |
this._optimizeEvent(q) | |
} | |
} | |
}; | |
j._shouldOptimizeEvent = function(p) { | |
if (this._controllers.optimizer.canOptimizeEvent(p) && !this._controllers.optimizer.isOptimizingEvent(p)) { | |
return true | |
} | |
return false | |
}; | |
j._shouldDeoptimizeEvent = function(p, q) { | |
if (this._controllers.optimizer.isOptimizingEvent(p) && (q || this._emitter._eventEmitter._events[p].length <= 1)) { | |
return true | |
} | |
return false | |
}; | |
j._optimizeEvent = function(q) { | |
var p = this._controllers.optimizer.getOptimizerByEvent(q); | |
p.activate(); | |
this._emitterOn(q, p.callback, p) | |
}; | |
j._deoptimizeEvent = function(q) { | |
var p = this._controllers.optimizer.getOptimizerByEvent(q); | |
p.deactivate(); | |
this._emitterOff(q, p.callback, p) | |
}; | |
j._getOptimizedValue = function(p) { | |
return this._controllers.optimizer.get(p) | |
}; | |
j._seperateCustomEvents = function(t) { | |
var q = { | |
customEvents: [], | |
standardEvents: [] | |
}; | |
if (typeof t === "string") { | |
var u = t.split(" "), | |
r, s, p = u.length; | |
for (s = 0; s < p; s++) { | |
r = u[s]; | |
if (this._controllers.customEvent.canHandleCustomEvent(r)) { | |
q.customEvents.push(r) | |
} else { | |
q.standardEvents.push(r) | |
} | |
} | |
} | |
return q | |
}; | |
j._bindEvents = function() { | |
this._emitter.on("dom-emitter:didoff", this._onEventUnbound, this) | |
}; | |
b.exports = c.share(l, a, o) | |
}, { | |
"./CustomEventController": 449, | |
"./OptimizerController": 450, | |
"./optimizers/optimizers": 456, | |
"./queries/queries": 465, | |
"ac-dom-emitter": 443, | |
"ac-shared-instance": 411 | |
}], | |
452: [function(b, c, a) { | |
arguments[4][200][0].apply(a, arguments) | |
}, { | |
"ac-event-emitter": 446, | |
dup: 200 | |
}], | |
453: [function(b, c, a) { | |
arguments[4][201][0].apply(a, arguments) | |
}, { | |
"ac-event-emitter": 446, | |
dup: 201 | |
}], | |
454: [function(b, c, a) { | |
arguments[4][202][0].apply(a, arguments) | |
}, { | |
"../../WindowDelegateOptimizer": 453, | |
"../../queries/queries": 465, | |
dup: 202 | |
}], | |
455: [function(b, c, a) { | |
arguments[4][203][0].apply(a, arguments) | |
}, { | |
"../../WindowDelegateOptimizer": 453, | |
"../../queries/queries": 465, | |
dup: 203 | |
}], | |
456: [function(b, c, a) { | |
arguments[4][204][0].apply(a, arguments) | |
}, { | |
"./events/resize": 454, | |
"./events/scroll": 455, | |
dup: 204 | |
}], | |
457: [function(b, c, a) { | |
arguments[4][205][0].apply(a, arguments) | |
}, { | |
dup: 205 | |
}], | |
458: [function(b, c, a) { | |
arguments[4][206][0].apply(a, arguments) | |
}, { | |
dup: 206 | |
}], | |
459: [function(b, c, a) { | |
arguments[4][207][0].apply(a, arguments) | |
}, { | |
dup: 207 | |
}], | |
460: [function(b, c, a) { | |
arguments[4][208][0].apply(a, arguments) | |
}, { | |
dup: 208 | |
}], | |
461: [function(b, c, a) { | |
arguments[4][209][0].apply(a, arguments) | |
}, { | |
dup: 209 | |
}], | |
462: [function(b, c, a) { | |
arguments[4][210][0].apply(a, arguments) | |
}, { | |
dup: 210 | |
}], | |
463: [function(b, c, a) { | |
arguments[4][211][0].apply(a, arguments) | |
}, { | |
dup: 211 | |
}], | |
464: [function(b, c, a) { | |
arguments[4][212][0].apply(a, arguments) | |
}, { | |
dup: 212 | |
}], | |
465: [function(b, c, a) { | |
arguments[4][213][0].apply(a, arguments) | |
}, { | |
"./methods/clientHeight": 457, | |
"./methods/clientWidth": 458, | |
"./methods/innerHeight": 459, | |
"./methods/innerWidth": 460, | |
"./methods/maxScrollX": 461, | |
"./methods/maxScrollY": 462, | |
"./methods/scrollX": 463, | |
"./methods/scrollY": 464, | |
dup: 213 | |
}], | |
466: [function(b, c, a) { | |
c.exports = { | |
Viewport: b("./ac-viewport/Viewport") | |
} | |
}, { | |
"./ac-viewport/Viewport": 467 | |
}], | |
467: [function(d, b, g) { | |
var c = d("ac-shared-instance").SharedInstance, | |
l = d("ac-window-delegate").WindowDelegate, | |
j = d("ac-breakpoints-delegate").BreakpointsDelegate; | |
var k = "ac-viewport:Viewport", | |
a = "3.0.0-1"; | |
var h; | |
function f(n) { | |
var o, m = l; | |
for (o in m) { | |
if (m.hasOwnProperty(o)) { | |
this[o] = m[o] | |
} else { | |
h[o] = m[o] | |
} | |
} | |
this.addCustomEvent(j.getCustomEvent()) | |
} | |
h = f.prototype; | |
h.getBreakpoint = function() { | |
return j.getBreakpoint() | |
}; | |
h.setBreakpoints = function(m) { | |
return j.setBreakpoints(m) | |
}; | |
b.exports = c.share(k, a, f) | |
}, { | |
"ac-breakpoints-delegate": 409, | |
"ac-shared-instance": 411, | |
"ac-window-delegate": 448 | |
}], | |
468: [function(b, c, a) { | |
c.exports = { | |
ScrollMotionEmitter: b("./ac-scroll-motion-emitter/ScrollMotionEmitter"), | |
ElementScrollMotionEmitter: b("./ac-scroll-motion-emitter/ElementScrollMotionEmitter") | |
} | |
}, { | |
"./ac-scroll-motion-emitter/ElementScrollMotionEmitter": 469, | |
"./ac-scroll-motion-emitter/ScrollMotionEmitter": 470 | |
}], | |
469: [function(d, f, c) { | |
var b = d("ac-object"), | |
j = d("ac-viewport").Viewport, | |
h = d("./ScrollMotionEmitter"); | |
function a(l, k) { | |
k = k || {}; | |
if (!(l instanceof HTMLElement)) { | |
return null | |
} | |
this.el = l; | |
this.options = k; | |
if (this.options.offsetTop) { | |
this.offsetTop = this.options.offsetTop | |
} | |
if (this.options.offsetBottom) { | |
this.offsetBottom = this.options.offsetBottom | |
} | |
this.setEmitterBounds(); | |
this._boundHandleResize = this._handleResize.bind(this); | |
this._bindResizeEvents(); | |
h.call(this, k) | |
} | |
var g = a.prototype = b.create(h.prototype); | |
g.setEmitterBounds = function() { | |
this._elementBounds = this.el.getBoundingClientRect(); | |
var o = j.scrollY(), | |
l = this._elementBounds.top + o, | |
k = this._elementBounds.bottom + o, | |
n = this.offsetTop || 0, | |
m = this.offsetBottom || 0; | |
if (typeof this.offsetTop === "function") { | |
n = this.offsetTop() | |
} | |
if (typeof this.offsetBottom === "function") { | |
m = this.offsetBottom() | |
} | |
this.min = this.options.min = l + n; | |
this.max = this.options.max = k + m | |
}; | |
g.destroy = function() { | |
j.off("resize orientationchange", this._boundHandleResize); | |
h.prototype.destroy.call(this) | |
}; | |
g._bindResizeEvents = function() { | |
j.on("resize orientationchange", this._boundHandleResize) | |
}; | |
g._handleClockUpdate = function(k) { | |
if (this._shouldUpdateOnResize) { | |
this.setEmitterBounds(); | |
this.handleScroll(); | |
this._shouldUpdateOnResize = false | |
} | |
h.prototype._handleClockUpdate.call(this, k) | |
}; | |
g._handleResize = function() { | |
this._shouldUpdateOnResize = true | |
}; | |
f.exports = a | |
}, { | |
"./ScrollMotionEmitter": 470, | |
"ac-object": 380, | |
"ac-viewport": 466 | |
}], | |
470: [function(d, f, b) { | |
var a = d("ac-object"), | |
j = d("ac-viewport").Viewport, | |
c = d("ac-motion-emitter").MotionEmitter; | |
function h(k) { | |
k = k || {}; | |
if (typeof k.min !== "number" || typeof k.max !== "number") { | |
return null | |
} | |
c.call(this, k); | |
this.smooth = this.options.smooth || false; | |
if (!this.options.overrideScroll) { | |
this._bindScrollEvents() | |
} | |
} | |
var g = h.prototype = a.create(c.prototype); | |
g.updateValue = function(k) { | |
if (this.smooth) { | |
return c.prototype.updateValue.call(this, k) | |
} | |
if (this._currentValue === this._targetValue) { | |
this._shouldEmitChange = false; | |
return | |
} | |
this._currentValue = this._targetValue; | |
this._shouldEmitChange = true | |
}; | |
g.handleScroll = function(l) { | |
if (typeof l !== "number") { | |
l = j.scrollY() | |
} | |
var k; | |
if (l < this.min) { | |
k = this.min | |
} else { | |
if (l > this.max) { | |
k = this.max | |
} else { | |
k = l | |
} | |
} | |
k = (k - this.min) / (this.max - this.min); | |
this.setProgress(k) | |
}; | |
g.destroy = function() { | |
if (this._boundHandleScroll) { | |
j.off("scroll", this._boundHandleScroll) | |
} | |
return c.prototype.destroy.call(this) | |
}; | |
g._bindScrollEvents = function() { | |
this._boundHandleScroll = this.handleScroll.bind(this); | |
j.on("scroll", this._boundHandleScroll) | |
}; | |
f.exports = h | |
}, { | |
"ac-motion-emitter": 373, | |
"ac-object": 380, | |
"ac-viewport": 466 | |
}], | |
471: [function(b, c, a) { | |
arguments[4][221][0].apply(a, arguments) | |
}, { | |
"./helpers/globals": 479, | |
"ac-function/once": 492, | |
dup: 221 | |
}], | |
472: [function(b, c, a) { | |
arguments[4][222][0].apply(a, arguments) | |
}, { | |
"./touchAvailable": 507, | |
"ac-browser": 487, | |
"ac-function/once": 492, | |
dup: 222 | |
}], | |
473: [function(b, c, a) { | |
arguments[4][223][0].apply(a, arguments) | |
}, { | |
"./helpers/globals": 479, | |
"ac-function/once": 492, | |
dup: 223 | |
}], | |
474: [function(b, c, a) { | |
arguments[4][224][0].apply(a, arguments) | |
}, { | |
"ac-function/once": 492, | |
"ac-prefixer/getStyleValue": 495, | |
dup: 224 | |
}], | |
475: [function(b, c, a) { | |
arguments[4][225][0].apply(a, arguments) | |
}, { | |
"ac-function/memoize": 491, | |
"ac-prefixer/getStyleProperty": 494, | |
"ac-prefixer/getStyleValue": 495, | |
dup: 225 | |
}], | |
476: [function(b, c, a) { | |
arguments[4][226][0].apply(a, arguments) | |
}, { | |
"ac-function/once": 492, | |
"ac-prefixer/getStyleValue": 495, | |
dup: 226 | |
}], | |
477: [function(b, c, a) { | |
arguments[4][227][0].apply(a, arguments) | |
}, { | |
"./helpers/globals": 479, | |
"ac-function/memoize": 491, | |
dup: 227 | |
}], | |
478: [function(b, c, a) { | |
arguments[4][228][0].apply(a, arguments) | |
}, { | |
"ac-function/memoize": 491, | |
"ac-prefixer/getEventType": 493, | |
dup: 228 | |
}], | |
479: [function(b, c, a) { | |
arguments[4][229][0].apply(a, arguments) | |
}, { | |
dup: 229 | |
}], | |
480: [function(b, c, a) { | |
c.exports = { | |
canvasAvailable: b("./canvasAvailable"), | |
continuousScrollEventsAvailable: b("./continuousScrollEventsAvailable"), | |
cookiesAvailable: b("./cookiesAvailable"), | |
cssLinearGradientAvailable: b("./cssLinearGradientAvailable"), | |
cssPropertyAvailable: b("./cssPropertyAvailable"), | |
cssViewportUnitsAvailable: b("./cssViewportUnitsAvailable"), | |
elementAttributeAvailable: b("./elementAttributeAvailable"), | |
eventTypeAvailable: b("./eventTypeAvailable"), | |
isDesktop: b("./isDesktop"), | |
isHandheld: b("./isHandheld"), | |
isRetina: b("./isRetina"), | |
isTablet: b("./isTablet"), | |
localStorageAvailable: b("./localStorageAvailable"), | |
mediaElementsAvailable: b("./mediaElementsAvailable"), | |
sessionStorageAvailable: b("./sessionStorageAvailable"), | |
svgAvailable: b("./svgAvailable"), | |
threeDTransformsAvailable: b("./threeDTransformsAvailable"), | |
touchAvailable: b("./touchAvailable"), | |
webGLAvailable: b("./webGLAvailable") | |
} | |
}, { | |
"./canvasAvailable": 471, | |
"./continuousScrollEventsAvailable": 472, | |
"./cookiesAvailable": 473, | |
"./cssLinearGradientAvailable": 474, | |
"./cssPropertyAvailable": 475, | |
"./cssViewportUnitsAvailable": 476, | |
"./elementAttributeAvailable": 477, | |
"./eventTypeAvailable": 478, | |
"./isDesktop": 481, | |
"./isHandheld": 482, | |
"./isRetina": 483, | |
"./isTablet": 484, | |
"./localStorageAvailable": 485, | |
"./mediaElementsAvailable": 486, | |
"./sessionStorageAvailable": 504, | |
"./svgAvailable": 505, | |
"./threeDTransformsAvailable": 506, | |
"./touchAvailable": 507, | |
"./webGLAvailable": 508 | |
}], | |
481: [function(b, c, a) { | |
arguments[4][231][0].apply(a, arguments) | |
}, { | |
"./helpers/globals": 479, | |
"./touchAvailable": 507, | |
"ac-function/once": 492, | |
dup: 231 | |
}], | |
482: [function(b, c, a) { | |
arguments[4][232][0].apply(a, arguments) | |
}, { | |
"./isDesktop": 481, | |
"./isTablet": 484, | |
"ac-function/once": 492, | |
dup: 232 | |
}], | |
483: [function(b, c, a) { | |
arguments[4][233][0].apply(a, arguments) | |
}, { | |
"./helpers/globals": 479, | |
dup: 233 | |
}], | |
484: [function(d, f, b) { | |
var c = d("./isDesktop").original; | |
var h = d("./helpers/globals"); | |
var g = d("ac-function/once"); | |
function a() { | |
var k = h.getWindow(); | |
var j = k.screen.width; | |
if (k.orientation && k.screen.height < j) { | |
j = k.screen.height | |
} | |
return (!c() && j >= 600) | |
} | |
f.exports = g(a); | |
f.exports.original = a | |
}, { | |
"./helpers/globals": 479, | |
"./isDesktop": 481, | |
"ac-function/once": 492 | |
}], | |
485: [function(b, c, a) { | |
arguments[4][235][0].apply(a, arguments) | |
}, { | |
"./helpers/globals": 479, | |
"ac-function/once": 492, | |
dup: 235 | |
}], | |
486: [function(b, c, a) { | |
arguments[4][236][0].apply(a, arguments) | |
}, { | |
"./helpers/globals": 479, | |
"ac-function/once": 492, | |
dup: 236 | |
}], | |
487: [function(b, c, a) { | |
arguments[4][1][0].apply(a, arguments) | |
}, { | |
"./ac-browser/BrowserData": 488, | |
"./ac-browser/IE": 489, | |
dup: 1 | |
}], | |
488: [function(b, c, a) { | |
arguments[4][239][0].apply(a, arguments) | |
}, { | |
"./data": 490, | |
dup: 239 | |
}], | |
489: [function(b, c, a) { | |
arguments[4][3][0].apply(a, arguments) | |
}, { | |
dup: 3 | |
}], | |
490: [function(b, c, a) { | |
arguments[4][241][0].apply(a, arguments) | |
}, { | |
dup: 241 | |
}], | |
491: [function(b, c, a) { | |
arguments[4][242][0].apply(a, arguments) | |
}, { | |
dup: 242 | |
}], | |
492: [function(b, c, a) { | |
arguments[4][243][0].apply(a, arguments) | |
}, { | |
dup: 243 | |
}], | |
493: [function(b, c, a) { | |
arguments[4][40][0].apply(a, arguments) | |
}, { | |
"./shared/camelCasedEventTypes": 496, | |
"./shared/prefixHelper": 498, | |
"./utils/eventTypeAvailable": 501, | |
dup: 40 | |
}], | |
494: [function(b, c, a) { | |
arguments[4][96][0].apply(a, arguments) | |
}, { | |
"./shared/getStyleTestElement": 497, | |
"./shared/prefixHelper": 498, | |
"./shared/stylePropertyCache": 499, | |
"./utils/toCSS": 502, | |
"./utils/toDOM": 503, | |
dup: 96 | |
}], | |
495: [function(b, c, a) { | |
arguments[4][97][0].apply(a, arguments) | |
}, { | |
"./getStyleProperty": 494, | |
"./shared/prefixHelper": 498, | |
"./shared/stylePropertyCache": 499, | |
"./shared/styleValueAvailable": 500, | |
dup: 97 | |
}], | |
496: [function(b, c, a) { | |
arguments[4][41][0].apply(a, arguments) | |
}, { | |
dup: 41 | |
}], | |
497: [function(b, c, a) { | |
arguments[4][98][0].apply(a, arguments) | |
}, { | |
dup: 98 | |
}], | |
498: [function(b, c, a) { | |
arguments[4][42][0].apply(a, arguments) | |
}, { | |
dup: 42 | |
}], | |
499: [function(b, c, a) { | |
arguments[4][100][0].apply(a, arguments) | |
}, { | |
dup: 100 | |
}], | |
500: [function(b, c, a) { | |
arguments[4][101][0].apply(a, arguments) | |
}, { | |
"./getStyleTestElement": 497, | |
"./stylePropertyCache": 499, | |
dup: 101 | |
}], | |
501: [function(b, c, a) { | |
arguments[4][43][0].apply(a, arguments) | |
}, { | |
dup: 43 | |
}], | |
502: [function(b, c, a) { | |
arguments[4][103][0].apply(a, arguments) | |
}, { | |
dup: 103 | |
}], | |
503: [function(b, c, a) { | |
arguments[4][104][0].apply(a, arguments) | |
}, { | |
dup: 104 | |
}], | |
504: [function(b, c, a) { | |
arguments[4][255][0].apply(a, arguments) | |
}, { | |
"./helpers/globals": 479, | |
"ac-function/once": 492, | |
dup: 255 | |
}], | |
505: [function(b, c, a) { | |
arguments[4][256][0].apply(a, arguments) | |
}, { | |
"./helpers/globals": 479, | |
"ac-function/once": 492, | |
dup: 256 | |
}], | |
506: [function(b, c, a) { | |
arguments[4][257][0].apply(a, arguments) | |
}, { | |
"ac-function/once": 492, | |
"ac-prefixer/getStyleValue": 495, | |
dup: 257 | |
}], | |
507: [function(b, c, a) { | |
arguments[4][258][0].apply(a, arguments) | |
}, { | |
"./helpers/globals": 479, | |
"ac-function/once": 492, | |
dup: 258 | |
}], | |
508: [function(c, d, b) { | |
var g = c("./helpers/globals"); | |
var f = c("ac-function/once"); | |
function a() { | |
var h = g.getDocument(); | |
var j = h.createElement("canvas"); | |
return !!(typeof j.getContext === "function" && j.getContext("webgl")) | |
} | |
d.exports = f(a); | |
d.exports.original = a | |
}, { | |
"./helpers/globals": 479, | |
"ac-function/once": 492 | |
}], | |
509: [function(b, c, a) { | |
c.exports = { | |
fade: b("./ac-solar/fade"), | |
fadeIn: b("./ac-solar/fadeIn"), | |
fadeOut: b("./ac-solar/fadeOut"), | |
move: b("./ac-solar/move"), | |
moveX: b("./ac-solar/moveX"), | |
moveY: b("./ac-solar/moveY"), | |
scroll: b("./ac-solar/scroll"), | |
scrollX: b("./ac-solar/scrollX"), | |
scrollY: b("./ac-solar/scrollY") | |
} | |
}, { | |
"./ac-solar/fade": 510, | |
"./ac-solar/fadeIn": 511, | |
"./ac-solar/fadeOut": 512, | |
"./ac-solar/move": 513, | |
"./ac-solar/moveX": 514, | |
"./ac-solar/moveY": 515, | |
"./ac-solar/scroll": 516, | |
"./ac-solar/scrollX": 517, | |
"./ac-solar/scrollY": 518 | |
}], | |
510: [function(c, d, a) { | |
var b = c("ac-eclipse").Clip; | |
d.exports = function f(h, l, k, j, g) { | |
g = g || {}; | |
g.propsFrom = g.propsFrom || {}; | |
g.propsFrom.opacity = l; | |
return b.to(h, j, { | |
opacity: k | |
}, g) | |
} | |
}, { | |
"ac-eclipse": "ac-eclipse" | |
}], | |
511: [function(d, f, b) { | |
var c = d("ac-eclipse").Clip; | |
f.exports = function a(h, j, g) { | |
return c.to(h, j, { | |
opacity: 1 | |
}, g) | |
} | |
}, { | |
"ac-eclipse": "ac-eclipse" | |
}], | |
512: [function(c, d, a) { | |
var b = c("ac-eclipse").Clip; | |
d.exports = function f(h, j, g) { | |
return b.to(h, j, { | |
opacity: 0 | |
}, g) | |
} | |
}, { | |
"ac-eclipse": "ac-eclipse" | |
}], | |
513: [function(f, g, c) { | |
var b = f("ac-feature").cssPropertyAvailable; | |
var d = f("ac-eclipse").Clip; | |
g.exports = function a(k, h, n, l, j) { | |
var m; | |
if (b("transform")) { | |
m = { | |
transform: { | |
translateX: h, | |
translateY: n | |
} | |
} | |
} else { | |
m = { | |
left: h + "px", | |
top: n + "px" | |
} | |
} | |
return d.to(k, l, m, j) | |
} | |
}, { | |
"ac-eclipse": "ac-eclipse", | |
"ac-feature": 480 | |
}], | |
514: [function(f, g, c) { | |
var b = f("ac-feature").cssPropertyAvailable; | |
var d = f("ac-eclipse").Clip; | |
var a = f("./move"); | |
g.exports = function h(l, j, m, k) { | |
return a(l, j, 0, m, k) | |
} | |
}, { | |
"./move": 513, | |
"ac-eclipse": "ac-eclipse", | |
"ac-feature": 480 | |
}], | |
515: [function(f, g, c) { | |
var b = f("ac-feature").cssPropertyAvailable; | |
var d = f("ac-eclipse").Clip; | |
var a = f("./move"); | |
g.exports = function h(k, m, l, j) { | |
return a(k, 0, m, l, j) | |
} | |
}, { | |
"./move": 513, | |
"ac-eclipse": "ac-eclipse", | |
"ac-feature": 480 | |
}], | |
516: [function(d, f, b) { | |
var c = d("ac-eclipse").Clip; | |
f.exports = function a(g, o, k, h, r) { | |
r = r || {}; | |
var q = g.scrollLeft; | |
var m = g.scrollTop; | |
var n = { | |
x: q, | |
y: m | |
}; | |
var p = { | |
x: o, | |
y: k | |
}; | |
if (typeof r.onDraw === "function") { | |
var l = r.onDraw | |
} | |
var j = function(s) { | |
g.scrollLeft = n.x; | |
g.scrollTop = n.y; | |
if (l) { | |
l.call(this, s) | |
} | |
}; | |
r.onDraw = j; | |
return c.to(n, h, p, r) | |
} | |
}, { | |
"ac-eclipse": "ac-eclipse" | |
}], | |
517: [function(d, f, b) { | |
var c = d("ac-eclipse").Clip; | |
var a = d("./scroll"); | |
f.exports = function g(k, h, l, j) { | |
return this.scroll(k, h, 0, l, j) | |
} | |
}, { | |
"./scroll": 516, | |
"ac-eclipse": "ac-eclipse" | |
}], | |
518: [function(d, f, b) { | |
var c = d("ac-eclipse").Clip; | |
var a = d("./scroll"); | |
f.exports = function g(j, l, k, h) { | |
return this.scroll(j, 0, l, k, h) | |
} | |
}, { | |
"./scroll": 516, | |
"ac-eclipse": "ac-eclipse" | |
}], | |
519: [function(b, c, a) { | |
c.exports = { | |
Swipe: b("./ac-swipe/Swipe") | |
} | |
}, { | |
"./ac-swipe/Swipe": 520 | |
}], | |
520: [function(c, f, b) { | |
var d = c("ac-object").create; | |
var a = c("ac-feature/touchAvailable"); | |
var h = c("ac-event-emitter").EventEmitter; | |
function j(k) { | |
if (!a()) { | |
return | |
} | |
this.el = k; | |
this.minSwipeInPixels = 72; | |
this.fingerCount = 0; | |
this.startX = 0; | |
this.startY = 0; | |
this.currentX = 0; | |
this.currentY = 0; | |
this.swipeLength = 0; | |
this.swipeAngle = 0; | |
this.swipeDirection = 0; | |
this.eventTriggered = false; | |
this._init() | |
} | |
j.TOUCH_START = "touchstart"; | |
j.TOUCH_MOVE = "touchmove"; | |
j.TOUCH_END = "touchend"; | |
j.TOUCH_CANCEL = "touchcancel"; | |
j.SWIPE_RIGHT = "swiperight"; | |
j.SWIPE_LEFT = "swipeleft"; | |
j.SWIPE_UP = "swipeup"; | |
j.SWIPE_DOWN = "swipedown"; | |
var g = j.prototype = d(h.prototype); | |
j.prototype.constructor = j; | |
g.destroy = function() { | |
removeEventListener(this.el, j.TOUCH_START, this._boundFunctions._touchStart); | |
removeEventListener(this.el, j.TOUCH_MOVE, this._boundFunctions._touchMove); | |
removeEventListener(this.el, j.TOUCH_END, this._boundFunctions._touchEnd); | |
removeEventListener(this.el, j.TOUCH_CANCEL, this._boundFunctions._touchCancel); | |
this.el = null; | |
this._boundFunctions = null; | |
this.off() | |
}; | |
g._init = function() { | |
this._boundFunctions = { | |
_touchStart: this._touchStart.bind(this), | |
_touchMove: this._touchMove.bind(this), | |
_touchEnd: this._touchEnd.bind(this), | |
_touchCancel: this._touchCancel.bind(this) | |
}; | |
this.el.addEventListener(j.TOUCH_START, this._boundFunctions._touchStart, false); | |
this.el.addEventListener(j.TOUCH_MOVE, this._boundFunctions._touchMove, false); | |
this.el.addEventListener(j.TOUCH_END, this._boundFunctions._touchEnd, false); | |
this.el.addEventListener(j.TOUCH_CANCEL, this._boundFunctions._touchCancel, false) | |
}; | |
g._touchStart = function(k) { | |
this.fingerCount = k.touches.length; | |
if (this.fingerCount === 1) { | |
this.startX = k.touches[0].screenX; | |
this.startY = k.touches[0].screenY | |
} else { | |
this._touchCancel() | |
} | |
}; | |
g._touchMove = function(k) { | |
if (k.touches.length === 1) { | |
this.currentX = k.touches[0].screenX; | |
this.currentY = k.touches[0].screenY; | |
this._setSwipeLength.call(this) | |
} else { | |
this._touchCancel() | |
} | |
}; | |
g._touchEnd = function(m) { | |
if (this.fingerCount === 1 && this.currentX !== 0) { | |
this._setSwipeLength(); | |
var l = Math.abs(this.startX - this.currentX); | |
var k = Math.abs(this.startY - this.currentY); | |
if (k > l) { | |
this._touchCancel(); | |
return | |
} | |
if (this.swipeLength >= this.minSwipeInPixels && !this.eventTriggered) { | |
this._setSwipeAngle(); | |
this._setSwipeDirection(); | |
this._triggerSwipeEvent() | |
} | |
} else { | |
this._touchCancel() | |
} | |
}; | |
g._touchCancel = function() { | |
this._reset() | |
}; | |
g._setSwipeLength = function() { | |
this.swipeLength = Math.round(Math.sqrt(Math.pow(this.currentX - this.startX, 2) + Math.pow(this.currentY - this.startY, 2))) | |
}; | |
g._setSwipeAngle = function() { | |
var m = this.startX - this.currentX; | |
var l = this.currentY - this.startY; | |
var k = Math.atan2(l, m); | |
this.swipeAngle = Math.round(k * 180 / Math.PI); | |
if (this.swipeAngle < 0) { | |
this.swipeAngle = 360 - Math.abs(this.swipeAngle) | |
} | |
}; | |
g._setSwipeDirection = function() { | |
if ((this.swipeAngle <= 45) && (this.swipeAngle >= 0) || (this.swipeAngle <= 360) && (this.swipeAngle >= 315)) { | |
this.swipeDirection = j.SWIPE_LEFT | |
} else { | |
if ((this.swipeAngle >= 135) && (this.swipeAngle <= 225)) { | |
this.swipeDirection = j.SWIPE_RIGHT | |
} else { | |
if ((this.swipeAngle > 45) && (this.swipeAngle < 135)) { | |
this.swipeDirection = j.SWIPE_DOWN | |
} else { | |
this.swipeDirection = j.SWIPE_UP | |
} | |
} | |
} | |
}; | |
g._triggerSwipeEvent = function() { | |
this.trigger(this.swipeDirection, { | |
cancelable: true | |
}); | |
this.eventTriggered = true; | |
this._touchCancel() | |
}; | |
g._reset = function() { | |
this.fingerCount = 0; | |
this.startX = 0; | |
this.startY = 0; | |
this.currentX = 0; | |
this.currentY = 0; | |
this.swipeLength = 0; | |
this.swipeAngle = 0; | |
this.swipeDirection = 0; | |
this.eventTriggered = false | |
}; | |
f.exports = j | |
}, { | |
"ac-event-emitter": 219, | |
"ac-feature/touchAvailable": 258, | |
"ac-object": 380 | |
}], | |
521: [function(b, c, a) { | |
c.exports = { | |
viewports: { | |
large: { | |
"min-width": 1069, | |
"max-width": 1441, | |
content: 980, | |
oldie: true | |
}, | |
xlarge: { | |
"min-width": 1442, | |
content: 980 | |
}, | |
medium: { | |
"min-width": 736, | |
"max-width": 1068, | |
content: 692 | |
}, | |
small: { | |
"min-width": 320, | |
"max-width": 735, | |
content: 288, | |
"max-device-width": 768 | |
} | |
}, | |
"viewports-smallondesktop": { | |
large: { | |
"min-width": 1069, | |
"max-width": 1441, | |
content: 980, | |
oldie: true | |
}, | |
xlarge: { | |
"min-width": 1442, | |
content: 980 | |
}, | |
medium: { | |
"min-width": 736, | |
"max-width": 1068, | |
content: 692 | |
}, | |
small: { | |
"min-width": 320, | |
"max-width": 735, | |
content: 288 | |
} | |
}, | |
"viewports-mobilefirst": { | |
small: { | |
"min-width": 320, | |
"max-width": 735, | |
content: 288, | |
oldie: true | |
}, | |
medium: { | |
"min-width": 736, | |
"max-width": 1068, | |
content: 692 | |
}, | |
large: { | |
"min-width": 1069, | |
"max-width": 1441, | |
content: 980 | |
}, | |
xlarge: { | |
"min-width": 1442, | |
content: 980 | |
} | |
} | |
} | |
}, {}], | |
522: [function(b, f, a) { | |
var d = b("./ac-ajax/Ajax"); | |
var c = b("./ac-ajax/Request"); | |
f.exports = new d(); | |
f.exports.Ajax = d; | |
f.exports.Request = c | |
}, { | |
"./ac-ajax/Ajax": 523, | |
"./ac-ajax/Request": 524 | |
}], | |
523: [function(c, g, b) { | |
var f = c("./Request"); | |
var h = c("./XDomain-request"); | |
var a = c("./URLParser"); | |
var d = function() {}; | |
d._Request = f; | |
d.prototype = { | |
_defaults: { | |
method: "get", | |
timeout: 5000 | |
}, | |
_extend: function() { | |
for (var k = 1; k < arguments.length; k++) { | |
for (var j in arguments[k]) { | |
if (arguments[k].hasOwnProperty(j)) { | |
arguments[0][j] = arguments[k][j] | |
} | |
} | |
} | |
return arguments[0] | |
}, | |
_getOptions: function(j, k) { | |
return this._extend({}, this._defaults, k, j) | |
}, | |
_isCrossDomainRequest: function(m) { | |
var l = new a(); | |
var k = l.parse(window.location.href).origin; | |
var j = l.parse(m).origin; | |
l.destroy(); | |
return (j !== k) | |
}, | |
create: function(j) { | |
return new f(j) | |
}, | |
cors: function(k) { | |
var j = (window.XDomainRequest && document.documentMode < 10) ? h : f; | |
return new j(k) | |
}, | |
get: function(k) { | |
var j; | |
k = this._getOptions({ | |
method: "get" | |
}, k); | |
if (this._isCrossDomainRequest(k.url)) { | |
j = this.cors(k) | |
} else { | |
j = this.create(k) | |
} | |
return j.send() | |
}, | |
getJSON: function(j) { | |
return this.get(j).then(function(k) { | |
return JSON.parse(k.responseText) | |
}) | |
}, | |
head: function(j) { | |
j = this._getOptions({ | |
method: "head" | |
}, j); | |
return this.create(j).send() | |
}, | |
isCrossDomainRequest: function(j) { | |
return this._isCrossDomainRequest(j) | |
}, | |
post: function(j) { | |
j = this._getOptions({ | |
method: "post" | |
}, j); | |
return this.create(j).send() | |
} | |
}; | |
g.exports = d | |
}, { | |
"./Request": 524, | |
"./URLParser": 525, | |
"./XDomain-request": 526 | |
}], | |
524: [function(b, d, a) { | |
var c = function(f) { | |
this._initialize(f) | |
}; | |
c.create = function() { | |
var f = function() {}; | |
f.prototype = c.prototype; | |
return new f() | |
}; | |
c.prototype = { | |
_addReadyStateChangeHandler: function() { | |
this.xhr.onreadystatechange = function(f) { | |
if (this.xhr.readyState === 4) { | |
clearTimeout(this._timeout); | |
if (this.xhr.status >= 200 && this.xhr.status < 300) { | |
this.resolve(this.xhr) | |
} else { | |
this.reject(this.xhr) | |
} | |
} | |
}.bind(this) | |
}, | |
_getPromise: function() { | |
this.promise = new Promise(function(g, f) { | |
this.resolve = g; | |
this.reject = f | |
}.bind(this)) | |
}, | |
_getTransport: function() { | |
return new XMLHttpRequest() | |
}, | |
_initialize: function(h) { | |
var g = this._validateConfiguration(h); | |
if (g) { | |
throw g | |
} | |
this._configuration = h; | |
var f = this._configuration.method.toUpperCase(); | |
this.xhr = this._getTransport(); | |
this._getPromise(); | |
this.xhr.open(f, this._configuration.url); | |
this._setRequestHeaders(h.headers); | |
this._addReadyStateChangeHandler() | |
}, | |
_sendXHR: function() { | |
if (this.xhr) { | |
if (this._configuration && this._configuration.data) { | |
this.xhr.send(this._configuration.data) | |
} else { | |
this.xhr.send() | |
} | |
} | |
}, | |
_setRequestHeaders: function(f) { | |
if (f) { | |
f.forEach(function(g) { | |
this.xhr.setRequestHeader(g.name, g.value) | |
}, this) | |
} | |
}, | |
_setTimeout: function(f) { | |
if (!f) { | |
if (this._configuration && this._configuration.timeout) { | |
f = this._configuration.timeout | |
} else { | |
clearTimeout(this._timeout); | |
this._timeout = null | |
} | |
} | |
if (this._timeout !== null) { | |
clearTimeout(this._timeout) | |
} | |
if (f > 0) { | |
this._timeout = setTimeout(function() { | |
this.xhr.abort(); | |
this.reject() | |
}.bind(this), f) | |
} | |
}, | |
_timeout: null, | |
_validateConfiguration: function(h) { | |
if (!h) { | |
return "Must provide a configuration object" | |
} | |
var g = []; | |
var f = h.headers; | |
if (!h.url) { | |
g.push("Must provide a url") | |
} | |
if (!h.method) { | |
g.push("Must provide a method") | |
} | |
if (f) { | |
if (!Array.isArray(f)) { | |
return "Must provide an array of headers" | |
} | |
this._validateHeaders(f, g) | |
} | |
return g.join(", ") | |
}, | |
_validateHeaders: function(h, j) { | |
for (var g = 0, f = h.length; g < f; g++) { | |
if (!h[g].hasOwnProperty("name") || !h[g].hasOwnProperty("value")) { | |
j.push("Must provide a name and value key for all headers"); | |
break | |
} | |
} | |
}, | |
promise: null, | |
reject: null, | |
resolve: null, | |
send: function() { | |
this._setTimeout(); | |
this._sendXHR(); | |
return this.promise | |
}, | |
xhr: null | |
}; | |
d.exports = c | |
}, {}], | |
525: [function(c, d, b) { | |
var a = function() { | |
this.parser = null | |
}; | |
var f = a.prototype; | |
f.parse = function(l) { | |
var j; | |
var m; | |
var h; | |
var g; | |
var k; | |
if (typeof l !== "string") { | |
throw new TypeError(l + " must be a string") | |
} | |
if (!this.parser) { | |
this.parser = document.createElement("a") | |
} | |
this._qualifyPath(l); | |
h = this.parser.hostname; | |
m = this.parser.protocol; | |
g = this._normalizePort(this.parser); | |
j = this.parser.origin || this._constructOriginString(this.parser, g); | |
k = this.parser.search; | |
return { | |
originalPath: l, | |
qualifiedPath: this.parser.href, | |
protocol: m, | |
hostname: h, | |
origin: j, | |
port: g, | |
search: k | |
} | |
}; | |
f.destroy = function() { | |
this.parser = null | |
}; | |
f._constructOriginString = function(j, g) { | |
var h = g ? ":" + g : ""; | |
return j.protocol + "//" + j.hostname + h | |
}; | |
f._normalizePort = function(g) { | |
return (g.port === "80" || g.port === "443" || g.port === "0") ? "" : g.port | |
}; | |
f._qualifyPath = function(g) { | |
this.parser.href = g; | |
this.parser.href = this.parser.href | |
}; | |
d.exports = a | |
}, {}], | |
526: [function(b, d, a) { | |
var c = b("./Request"); | |
var f = function(g) { | |
c.apply(this, arguments) | |
}; | |
f.prototype = c.create(); | |
f.prototype._getTransport = function() { | |
return new XDomainRequest() | |
}; | |
f.prototype._addReadyStateChangeHandler = function() { | |
this.xhr.ontimeout = function() { | |
this.reject(this.xhr) | |
}.bind(this); | |
this.xhr.onerror = function() { | |
this.reject(this.xhr) | |
}.bind(this); | |
this.xhr.onload = function() { | |
this.resolve(this.xhr) | |
}.bind(this) | |
}; | |
f.prototype._setTimeout = function(g) { | |
if (!g) { | |
if (this._configuration && this._configuration.timeout) { | |
g = this._configuration.timeout | |
} | |
} | |
if (g > 0) { | |
this.xhr.timeout = g | |
} | |
}; | |
f.prototype._sendXHR = function() { | |
setTimeout(function() { | |
c.prototype._sendXHR.call(this) | |
}.bind(this), 0) | |
}; | |
d.exports = f | |
}, { | |
"./Request": 524 | |
}], | |
527: [function(b, c, a) { | |
arguments[4][134][0].apply(a, arguments) | |
}, { | |
dup: 134 | |
}], | |
528: [function(b, c, a) { | |
c.exports = { | |
isString: b("./ac-string/isString"), | |
toCamelCase: b("./ac-string/toCamelCase"), | |
queryStringToObject: b("./ac-string/queryStringToObject"), | |
toQueryPair: b("./ac-string/toQueryPair"), | |
queryParameters: b("./ac-string/queryParameters"), | |
supplant: b("./ac-string/supplant") | |
} | |
}, { | |
"./ac-string/isString": 529, | |
"./ac-string/queryParameters": 530, | |
"./ac-string/queryStringToObject": 531, | |
"./ac-string/supplant": 532, | |
"./ac-string/toCamelCase": 533, | |
"./ac-string/toQueryPair": 534 | |
}], | |
529: [function(c, d, b) { | |
d.exports = function a(f) { | |
return (typeof f === "string") | |
} | |
}, {}], | |
530: [function(d, f, c) { | |
var a = d("./queryStringToObject"); | |
f.exports = function b() { | |
var g = {}; | |
var h = window.location.toString().split("?")[1]; | |
if (typeof h === "string") { | |
g = a(h) | |
} | |
return g | |
} | |
}, { | |
"./queryStringToObject": 531 | |
}], | |
531: [function(d, f, c) { | |
var a = d("qs"); | |
f.exports = function b(g) { | |
if (typeof g !== "string") { | |
throw new TypeError("QueryStringToObject error: argument must be a string") | |
} | |
return a.parse(g) | |
} | |
}, { | |
qs: 527 | |
}], | |
532: [function(b, c, a) { | |
c.exports = function d(h, g, f) { | |
if (!g) { | |
return h | |
} | |
f = f || /{([^{}]*)}/g; | |
return h.replace(f, function(k, j) { | |
var l = g[j]; | |
return typeof l === "string" || typeof l === "number" ? l : k | |
}) | |
} | |
}, {}], | |
533: [function(b, c, a) { | |
c.exports = function d(f) { | |
if (typeof f !== "string") { | |
throw new TypeError("Argument must be of type String.") | |
} | |
return f.replace(/-+(.)?/g, function(g, h) { | |
return h ? h.toUpperCase() : "" | |
}) | |
} | |
}, {}], | |
534: [function(b, c, a) { | |
c.exports = function d(f, g) { | |
if (typeof f !== "string" || typeof g !== "string") { | |
throw new TypeError("toQueryPair error: argument must be a string") | |
} | |
return encodeURIComponent(f) + "=" + encodeURIComponent(g) | |
} | |
}, {}], | |
535: [function(c, d, b) { | |
var a = c("./ac-vatman/vat-client"); | |
var f = c("./ac-vatman/vat-resource"); | |
var g = { | |
createPlayer: c("./ac-vatman/factory/createPlayer"), | |
vatClient: a, | |
vatResource: f | |
}; | |
d.exports = g | |
}, { | |
"./ac-vatman/factory/createPlayer": 536, | |
"./ac-vatman/vat-client": 543, | |
"./ac-vatman/vat-resource": 544 | |
}], | |
536: [function(c, a, g) { | |
var n = c("./../featureDetection/canPlayType"); | |
var d = c("./../featureDetection/canPlayTypeNatively"); | |
var m = c("./../featureDetection/canPlayTypeQuicktime"); | |
var l = c("./../featureDetection/featureDetect").shouldPlayQuicktime; | |
var j = c("./../featureDetection/featureDetect").textTrackDisablingNotAvailable; | |
function h(p, o) { | |
o.type = "quicktime"; | |
return p.create(o) | |
} | |
function k(p, o) { | |
return p.create(o) | |
} | |
function f(o) { | |
var q = this.findTextTrackModelFromNativeTrack(o); | |
var p = this.getEnabledTextTracks(); | |
p.forEach(function(r) { | |
if (q.cid !== r.cid) { | |
r.disable() | |
} | |
}); | |
if (q.get("mode") === "disabled") { | |
q.hide() | |
} | |
} | |
function b(r, q) { | |
q = q || {}; | |
var p = "video/quicktime"; | |
var o = "video/mp4"; | |
var s; | |
if (d(p) || d(o) && (!l())) { | |
s = k(r, q) | |
} else { | |
if (m(p)) { | |
q.type = "quicktime"; | |
s = h(r, q) | |
} | |
} | |
if (s && !j()) { | |
s.on("addtrack", f, s) | |
} | |
return s | |
} | |
a.exports = b | |
}, { | |
"./../featureDetection/canPlayType": 537, | |
"./../featureDetection/canPlayTypeNatively": 538, | |
"./../featureDetection/canPlayTypeQuicktime": 539, | |
"./../featureDetection/featureDetect": 540 | |
}], | |
537: [function(b, d, a) { | |
var f = b("./canPlayTypeNatively"); | |
var c = b("./canPlayTypeQuicktime"); | |
function g(j) { | |
var h = f(j); | |
if (!h) { | |
h = c(j) | |
} | |
return h | |
} | |
d.exports = g | |
}, { | |
"./canPlayTypeNatively": 538, | |
"./canPlayTypeQuicktime": 539 | |
}], | |
538: [function(c, d, b) { | |
var f; | |
function a() { | |
return document.createElement("video") | |
} | |
d.exports = function g(j) { | |
var k = ""; | |
var h = a(); | |
if (typeof h.canPlayType === "function") { | |
k = h.canPlayType(j) | |
} | |
return k | |
} | |
}, {}], | |
539: [function(c, f, b) { | |
var a = c("./quicktime"); | |
f.exports = function d(g) { | |
var h = ""; | |
if (g === "video/quicktime" && a.getPluginVersion() !== undefined) { | |
h = "maybe" | |
} | |
return h | |
} | |
}, { | |
"./quicktime": 541 | |
}], | |
540: [function(b, c, a) { | |
var f = b("ac-browser"); | |
var d = f.name.toLowerCase(); | |
c.exports = { | |
shouldPlayMOV: function() { | |
return (d === "safari" || d === "safari mobile") | |
}, | |
shouldPlayQuicktime: function() { | |
return (d === "ie" && f.version < 9) | |
}, | |
textTrackDisablingNotAvailable: function() { | |
return (d === "safari mobile" && f.version === 7) | |
} | |
} | |
}, { | |
"ac-browser": 1 | |
}], | |
541: [function(b, c, a) { | |
c.exports = { | |
getPlugins: function() { | |
return navigator.plugins | |
}, | |
getPluginVersion: function() { | |
var j; | |
var k = /(\d+\.){2}(\d+){1}$/; | |
var d = this.getPlugins(); | |
if (d && d[0]) { | |
for (var h = 0; h < d.length; h++) { | |
var f = (/QuickTime/i.test(d[h].name) && typeof j === "undefined"); | |
if (f) { | |
if (d[h].version) { | |
j = d[h].version | |
} else { | |
if (k.test(d[h].name)) { | |
j = d[h].name.match(k); | |
j = j[0] || undefined | |
} | |
} | |
} | |
} | |
} else { | |
var g = ["QuickTime.QuickTime", "QuickTimeCheckObject.QuickTimeCheck.1"]; | |
g.forEach(function(m) { | |
var n; | |
var l; | |
try { | |
n = new ActiveXObject(m); | |
l = (typeof n === "object" && typeof n.QuickTimeVersion !== "undefined" && typeof j === "undefined"); | |
if (l) { | |
j = n.QuickTimeVersion | |
} | |
} catch (o) {} | |
}) | |
} | |
return j | |
} | |
} | |
}, {}], | |
542: [function(b, c, a) { | |
c.exports = { | |
bg: "българÑки език", | |
cs: "Czech", | |
el: "Greek", | |
de: "German", | |
da: "Danish", | |
en: "English", | |
es: "Spanish", | |
et: "Estonian", | |
fi: "Finnish", | |
fr: "Français", | |
hr: "Croatian", | |
hu: "Hungarian", | |
it: "Italian", | |
ja: "Japanese", | |
ko: "Korean", | |
lt: "Lithuanian", | |
lv: "Latvian", | |
nl: "Dutch", | |
no: "Norsk", | |
pl: "Polish", | |
pt: "Portuguese", | |
ro: "Romanian", | |
ru: "Russian", | |
sk: "Slovak", | |
sv: "Swedish", | |
tr: "Turkish", | |
zh: "Chinese" | |
} | |
}, {}], | |
543: [function(d, b, g) { | |
var k = d("ac-ajax"); | |
var h = d("ac-string"); | |
var l = /(-[a-z]{2}-([a-z]{2}-){0,})[0-9]{8}_r[0-9].+\.mov$/; | |
var a = /_r[0-9].+\.mov$/; | |
var j = /((-([a-z]{2}))*)-[0-9]+/; | |
var o = /((-([a-z]{2}))*)-/; | |
var c = "m"; | |
var f = "_{width}x{height}{suffix}." + c + "p4"; | |
var n = [{ | |
width: 416, | |
height: 234, | |
type: "baseline-high", | |
suffix: "h" | |
}, { | |
width: 416, | |
height: 234, | |
type: "small", | |
suffix: "h" | |
}, { | |
width: 416, | |
height: 234, | |
type: "baseline-low", | |
suffix: "l" | |
}, { | |
width: 416, | |
height: 234, | |
type: "baseline-medium", | |
suffix: "m" | |
}, { | |
width: 640, | |
height: 360, | |
type: "medium", | |
suffix: "h" | |
}, { | |
width: 848, | |
height: 480, | |
type: "large", | |
suffix: "" | |
}, { | |
width: 960, | |
height: 540, | |
type: "large", | |
suffix: "" | |
}, { | |
width: 1280, | |
height: 720, | |
type: "large", | |
suffix: "h" | |
}, { | |
width: 1280, | |
height: 720, | |
type: "large", | |
suffix: "l" | |
}]; | |
var p = { | |
create: function() { | |
var m = function() {}; | |
m.prototype = this; | |
return new m() | |
}, | |
getSource: function(m, r, q) { | |
var t = n; | |
if (!m) { | |
throw "Must provide a vatRefMovie" | |
} | |
if (!r) { | |
throw "Must provide a width" | |
} | |
if (q) { | |
t = t.filter(function(u) { | |
return u.type === q | |
}) | |
} | |
var s = t.reduce(function(u, v) { | |
return Math.abs(v.width - r) < Math.abs(u.width - r) ? v : u | |
}); | |
return m.replace(a, h.supplant(f, s)) | |
}, | |
getConfigPath: function(m) { | |
return m.replace(l, "-current.json") | |
}, | |
getConfig: function(m) { | |
return k.getJSON({ | |
url: this.getConfigPath(m) | |
}) | |
}, | |
getVTTSource: function(m) { | |
return m.replace(a, "_cc.vtt") | |
} | |
}; | |
b.exports = p | |
}, { | |
"ac-ajax": 522, | |
"ac-string": 528 | |
}], | |
544: [function(c, d, b) { | |
var a = c("./vat-client"); | |
var h = c("./localization/language"); | |
var g = c("./featureDetection/featureDetect").shouldPlayMOV; | |
var f = { | |
create: function(k) { | |
if (!k) { | |
throw "Must provide a vatRefMovie." | |
} | |
var l = function() {}; | |
l.prototype = this; | |
var j = new l(); | |
j.vatRefMovie = k; | |
j.vatVTTSource = []; | |
return j | |
}, | |
getSource: function(k, j) { | |
return a.getSource(this.vatRefMovie, k, j) | |
}, | |
getConfig: function() { | |
return a.getConfig(this.vatRefMovie) | |
}, | |
getVTTSource: function() { | |
return a.getVTTSource(this.vatRefMovie) | |
}, | |
_getCaptionsSrcLang: function(k) { | |
var j = ""; | |
if (typeof k === "string" && k.indexOf("-") !== -1) { | |
j = k.split("-")[0] | |
} | |
return j | |
}, | |
_isNewVTTSrc: function(j) { | |
return (this.vatVTTSource.indexOf(j) === -1) | |
}, | |
_handleCaptions: function(l) { | |
var m; | |
var j = ""; | |
var k = {}; | |
this.getConfig().then(function(n) { | |
if (!n.metadata.captions) { | |
return | |
} | |
m = this.getVTTSource(); | |
if (m && (this._isNewVTTSrc(m) === true)) { | |
if (n.metadata.lang) { | |
j = this._getCaptionsSrcLang(n.metadata.lang) | |
} | |
k.kind = "caption"; | |
k.src = m; | |
k.mode = "hidden"; | |
if (j) { | |
k.srclang = j; | |
k.label = h[j] || null | |
} | |
l.addTextTrackFromRemoteVTT(k); | |
this.vatVTTSource.push(m) | |
} | |
}.bind(this)) | |
}, | |
setPlayerSrc: function(j, m, k) { | |
var l = this.vatRefMovie; | |
if (!g()) { | |
l = this.getSource(m, k) | |
} | |
j.setSrc(l); | |
this._handleCaptions(j) | |
} | |
}; | |
d.exports = f | |
}, { | |
"./featureDetection/featureDetect": 540, | |
"./localization/language": 542, | |
"./vat-client": 543 | |
}], | |
545: [function(b, c, a) { | |
arguments[4][19][0].apply(a, arguments) | |
}, { | |
"./ac-event-emitter/EventEmitter": 546, | |
dup: 19 | |
}], | |
546: [function(b, c, a) { | |
arguments[4][20][0].apply(a, arguments) | |
}, { | |
dup: 20 | |
}], | |
547: [function(b, c, a) { | |
arguments[4][134][0].apply(a, arguments) | |
}, { | |
dup: 134 | |
}], | |
548: [function(b, c, a) { | |
arguments[4][135][0].apply(a, arguments) | |
}, { | |
"./ac-object/clone": 549, | |
"./ac-object/create": 550, | |
"./ac-object/defaults": 551, | |
"./ac-object/extend": 552, | |
"./ac-object/getPrototypeOf": 553, | |
"./ac-object/isDate": 554, | |
"./ac-object/isEmpty": 555, | |
"./ac-object/isRegExp": 556, | |
"./ac-object/toQueryParameters": 557, | |
dup: 135 | |
}], | |
549: [function(b, c, a) { | |
arguments[4][136][0].apply(a, arguments) | |
}, { | |
"./extend": 552, | |
dup: 136 | |
}], | |
550: [function(b, c, a) { | |
arguments[4][137][0].apply(a, arguments) | |
}, { | |
dup: 137 | |
}], | |
551: [function(b, c, a) { | |
arguments[4][138][0].apply(a, arguments) | |
}, { | |
"./extend": 552, | |
dup: 138 | |
}], | |
552: [function(b, c, a) { | |
arguments[4][139][0].apply(a, arguments) | |
}, { | |
dup: 139 | |
}], | |
553: [function(b, c, a) { | |
arguments[4][140][0].apply(a, arguments) | |
}, { | |
dup: 140 | |
}], | |
554: [function(b, c, a) { | |
arguments[4][141][0].apply(a, arguments) | |
}, { | |
dup: 141 | |
}], | |
555: [function(b, c, a) { | |
arguments[4][142][0].apply(a, arguments) | |
}, { | |
dup: 142 | |
}], | |
556: [function(b, c, a) { | |
arguments[4][143][0].apply(a, arguments) | |
}, { | |
dup: 143 | |
}], | |
557: [function(b, c, a) { | |
arguments[4][144][0].apply(a, arguments) | |
}, { | |
dup: 144, | |
qs: 547 | |
}], | |
558: [function(b, c, a) { | |
arguments[4][409][0].apply(a, arguments) | |
}, { | |
"./ac-breakpoints-delegate/BreakpointsDelegate": 559, | |
dup: 409 | |
}], | |
559: [function(f, b, k) { | |
var d = f("ac-shared-instance").SharedInstance, | |
g = f("ac-object"), | |
r = f("ac-window-delegate").WindowDelegate, | |
c = f("ac-window-delegate").WindowDelegateCustomEvent, | |
q = f("ac-event-emitter").EventEmitter; | |
var n = "ac-breakpoints-delegate:BreakpointsDelegate", | |
a = "2.1.0-1"; | |
var o = "breakpoint", | |
p = "resize orientationchange"; | |
var h = { | |
large: { | |
"min-width": 1069, | |
"max-width": 1441, | |
content: 980, | |
oldie: true | |
}, | |
xlarge: { | |
"min-width": 1442, | |
content: 980 | |
}, | |
medium: { | |
"min-width": 736, | |
"max-width": 1068, | |
content: 692 | |
}, | |
small: { | |
"min-width": 320, | |
"max-width": 735, | |
content: 288, | |
"max-device-width": 768 | |
} | |
}; | |
var j = { | |
minWidth: "min-width", | |
maxWidth: "max-width", | |
maxDeviceWidth: "max-device-width", | |
content: "content", | |
oldIE: "oldie" | |
}; | |
function m(s) { | |
this._customEvent = new c(o, this._onBreakpointListenerAdded.bind(this), this._onBreakpointListenerRemoved.bind(this)); | |
this.setBreakpoints(h) | |
} | |
var l = m.prototype; | |
l.initialize = function() { | |
this._breakpoint = null; | |
this._lastBreakpoint = null; | |
this._handleOldIE(); | |
this._breakpointOrder = this._setBreakpointOrder(); | |
if (!this._isOldIE) { | |
this._handleResize() | |
} | |
}; | |
l.getCustomEvent = function() { | |
return this._customEvent | |
}; | |
l.getBreakpoint = function() { | |
if (!this._customEvent.active) { | |
this._handleResize() | |
} | |
return this._breakpoint | |
}; | |
l.setBreakpoints = function(s) { | |
this.breakpoints = g.clone(s); | |
this.initialize() | |
}; | |
l._handleResize = function() { | |
var w = r.clientWidth(), | |
x; | |
var v, u, t, s = this._breakpointOrder.length; | |
for (v = 0; v < s; v++) { | |
u = this._breakpointOrder[v]; | |
t = this.breakpoints[u]; | |
if (t._breakPosition > w) { | |
break | |
} | |
} | |
if (v > 0) { | |
v = v - 1 | |
} | |
x = this.breakpoints[this._breakpointOrder[v]]; | |
if (!this._breakpoint) { | |
this._breakpoint = x; | |
return | |
} | |
if (x.name === this._breakpoint.name) { | |
return | |
} | |
this._lastBreakpoint = this._breakpoint; | |
this._breakpoint = x; | |
r.trigger(o, { | |
incoming: this._breakpoint, | |
outgoing: this._lastBreakpoint | |
}) | |
}; | |
l._setBreakpointOrder = function() { | |
var w = 0, | |
t = [], | |
s = [], | |
v = j.minWidth, | |
u; | |
for (u in this.breakpoints) { | |
if (this.breakpoints.hasOwnProperty(u)) { | |
this.breakpoints[u].name = u; | |
t.push(this.breakpoints[u][v]) | |
} | |
} | |
t.sort(function(y, x) { | |
return y - x | |
}); | |
t.forEach(function(y) { | |
var x; | |
for (x in this.breakpoints) { | |
if (this.breakpoints.hasOwnProperty(x)) { | |
if (this.breakpoints[x][v] === y) { | |
s.push(x) | |
} | |
} | |
} | |
}, this); | |
s.forEach(function(y, x) { | |
this.breakpoints[y]._breakPosition = w; | |
if (s[x + 1]) { | |
w = this.breakpoints[s[x + 1]][v] | |
} | |
}, this); | |
return s | |
}; | |
l._handleOldIE = function() { | |
var s = document.documentElement, | |
u = j.oldIE; | |
if (s.className.indexOf("no-" + u) > -1 || s.className.indexOf(u) === -1) { | |
return | |
} | |
this._isOldIE = true; | |
this._replaceBreakpoints(function(v) { | |
return v[u] === true | |
}); | |
var t; | |
for (t in this.breakpoints) { | |
if (this.breakpoints.hasOwnProperty(t)) { | |
this._breakpoint = this.breakpoints[t]; | |
return | |
} | |
} | |
}; | |
l._replaceBreakpoints = function(v) { | |
var t, u = {}, | |
s; | |
for (t in this.breakpoints) { | |
if (this.breakpoints.hasOwnProperty(t)) { | |
s = this.breakpoints[t]; | |
if (v(s)) { | |
u[t] = g.clone(this.breakpoints[t]) | |
} | |
} | |
} | |
this.breakpoints = u | |
}; | |
l._onBreakpointListenerAdded = function() { | |
r.on(p, this._handleResize, this) | |
}; | |
l._onBreakpointListenerRemoved = function() { | |
r.off(p, this._handleResize, this) | |
}; | |
b.exports = d.share(n, a, m) | |
}, { | |
"ac-event-emitter": 545, | |
"ac-object": 548, | |
"ac-shared-instance": 560, | |
"ac-window-delegate": 597 | |
}], | |
560: [function(b, c, a) { | |
arguments[4][194][0].apply(a, arguments) | |
}, { | |
"./ac-shared-instance/SharedInstance": 561, | |
dup: 194 | |
}], | |
561: [function(b, c, a) { | |
arguments[4][195][0].apply(a, arguments) | |
}, { | |
dup: 195 | |
}], | |
562: [function(b, c, a) { | |
arguments[4][413][0].apply(a, arguments) | |
}, { | |
"./ac-prefixer/Prefixer": 563, | |
dup: 413 | |
}], | |
563: [function(b, c, a) { | |
arguments[4][414][0].apply(a, arguments) | |
}, { | |
"./Prefixer/camelCasedEvents": 564, | |
dup: 414 | |
}], | |
564: [function(b, c, a) { | |
arguments[4][415][0].apply(a, arguments) | |
}, { | |
dup: 415 | |
}], | |
565: [function(b, c, a) { | |
arguments[4][416][0].apply(a, arguments) | |
}, { | |
"./ac-dom-events/addEventListener": 566, | |
"./ac-dom-events/dispatchEvent": 567, | |
"./ac-dom-events/preventDefault": 568, | |
"./ac-dom-events/removeEventListener": 569, | |
"./ac-dom-events/stop": 570, | |
"./ac-dom-events/stopPropagation": 571, | |
"./ac-dom-events/target": 572, | |
dup: 416 | |
}], | |
566: [function(b, c, a) { | |
arguments[4][417][0].apply(a, arguments) | |
}, { | |
"ac-prefixer": 562, | |
dup: 417 | |
}], | |
567: [function(b, c, a) { | |
arguments[4][418][0].apply(a, arguments) | |
}, { | |
dup: 418 | |
}], | |
568: [function(b, c, a) { | |
arguments[4][44][0].apply(a, arguments) | |
}, { | |
dup: 44 | |
}], | |
569: [function(b, c, a) { | |
arguments[4][420][0].apply(a, arguments) | |
}, { | |
"ac-prefixer": 562, | |
dup: 420 | |
}], | |
570: [function(b, c, a) { | |
arguments[4][47][0].apply(a, arguments) | |
}, { | |
"./preventDefault": 568, | |
"./stopPropagation": 571, | |
dup: 47 | |
}], | |
571: [function(b, c, a) { | |
arguments[4][48][0].apply(a, arguments) | |
}, { | |
dup: 48 | |
}], | |
572: [function(b, c, a) { | |
arguments[4][423][0].apply(a, arguments) | |
}, { | |
dup: 423 | |
}], | |
573: [function(b, c, a) { | |
arguments[4][173][0].apply(a, arguments) | |
}, { | |
"./ac-dom-traversal/ancestor": 574, | |
"./ac-dom-traversal/ancestors": 575, | |
"./ac-dom-traversal/children": 576, | |
"./ac-dom-traversal/filterBySelector": 577, | |
"./ac-dom-traversal/firstChild": 578, | |
"./ac-dom-traversal/lastChild": 581, | |
"./ac-dom-traversal/matchesSelector": 582, | |
"./ac-dom-traversal/nextSibling": 583, | |
"./ac-dom-traversal/nextSiblings": 584, | |
"./ac-dom-traversal/previousSibling": 585, | |
"./ac-dom-traversal/previousSiblings": 586, | |
"./ac-dom-traversal/querySelector": 587, | |
"./ac-dom-traversal/querySelectorAll": 588, | |
"./ac-dom-traversal/shims/ie": 589, | |
"./ac-dom-traversal/siblings": 590, | |
dup: 173 | |
}], | |
574: [function(b, c, a) { | |
arguments[4][174][0].apply(a, arguments) | |
}, { | |
"./helpers/validate": 580, | |
"./matchesSelector": 582, | |
"ac-dom-nodes": 74, | |
dup: 174 | |
}], | |
575: [function(b, c, a) { | |
arguments[4][175][0].apply(a, arguments) | |
}, { | |
"./helpers/validate": 580, | |
"./matchesSelector": 582, | |
"ac-dom-nodes": 74, | |
dup: 175 | |
}], | |
576: [function(b, c, a) { | |
arguments[4][176][0].apply(a, arguments) | |
}, { | |
"./filterBySelector": 577, | |
"./helpers/validate": 580, | |
"ac-dom-nodes": 74, | |
dup: 176 | |
}], | |
577: [function(b, c, a) { | |
arguments[4][177][0].apply(a, arguments) | |
}, { | |
"./helpers/validate": 580, | |
"./matchesSelector": 582, | |
dup: 177 | |
}], | |
578: [function(b, c, a) { | |
arguments[4][178][0].apply(a, arguments) | |
}, { | |
"./children": 576, | |
"./helpers/validate": 580, | |
dup: 178 | |
}], | |
579: [function(b, c, a) { | |
arguments[4][179][0].apply(a, arguments) | |
}, { | |
dup: 179 | |
}], | |
580: [function(b, c, a) { | |
arguments[4][180][0].apply(a, arguments) | |
}, { | |
"ac-dom-nodes": 74, | |
dup: 180 | |
}], | |
581: [function(b, c, a) { | |
arguments[4][181][0].apply(a, arguments) | |
}, { | |
"./children": 576, | |
"./helpers/validate": 580, | |
dup: 181 | |
}], | |
582: [function(b, c, a) { | |
arguments[4][182][0].apply(a, arguments) | |
}, { | |
"./helpers/nativeMatches": 579, | |
"./helpers/validate": 580, | |
"ac-dom-nodes": 74, | |
dup: 182 | |
}], | |
583: [function(b, c, a) { | |
arguments[4][183][0].apply(a, arguments) | |
}, { | |
"./helpers/validate": 580, | |
"./matchesSelector": 582, | |
"ac-dom-nodes": 74, | |
dup: 183 | |
}], | |
584: [function(b, c, a) { | |
arguments[4][184][0].apply(a, arguments) | |
}, { | |
"./helpers/validate": 580, | |
"./matchesSelector": 582, | |
"ac-dom-nodes": 74, | |
dup: 184 | |
}], | |
585: [function(b, c, a) { | |
arguments[4][185][0].apply(a, arguments) | |
}, { | |
"./helpers/validate": 580, | |
"./matchesSelector": 582, | |
"ac-dom-nodes": 74, | |
dup: 185 | |
}], | |
586: [function(b, c, a) { | |
arguments[4][186][0].apply(a, arguments) | |
}, { | |
"./helpers/validate": 580, | |
"./matchesSelector": 582, | |
"ac-dom-nodes": 74, | |
dup: 186 | |
}], | |
587: [function(b, c, a) { | |
arguments[4][187][0].apply(a, arguments) | |
}, { | |
"./helpers/validate": 580, | |
dup: 187 | |
}], | |
588: [function(b, c, a) { | |
arguments[4][188][0].apply(a, arguments) | |
}, { | |
"./helpers/validate": 580, | |
dup: 188 | |
}], | |
589: [function(b, c, a) { | |
arguments[4][189][0].apply(a, arguments) | |
}, { | |
"../helpers/nativeMatches": 579, | |
"../helpers/validate": 580, | |
"../vendor/sizzle/sizzle": 591, | |
"ac-dom-nodes": 74, | |
dup: 189 | |
}], | |
590: [function(b, c, a) { | |
arguments[4][190][0].apply(a, arguments) | |
}, { | |
"./children": 576, | |
"./helpers/validate": 580, | |
dup: 190 | |
}], | |
591: [function(b, c, a) { | |
arguments[4][191][0].apply(a, arguments) | |
}, { | |
dup: 191 | |
}], | |
592: [function(b, c, a) { | |
arguments[4][443][0].apply(a, arguments) | |
}, { | |
"./ac-dom-emitter/DOMEmitter": 593, | |
dup: 443 | |
}], | |
593: [function(b, c, a) { | |
arguments[4][444][0].apply(a, arguments) | |
}, { | |
"./DOMEmitterEvent": 594, | |
"ac-dom-events": 565, | |
"ac-dom-traversal": 573, | |
"ac-event-emitter": 595, | |
dup: 444 | |
}], | |
594: [function(b, c, a) { | |
arguments[4][445][0].apply(a, arguments) | |
}, { | |
"ac-dom-events": 565, | |
dup: 445 | |
}], | |
595: [function(b, c, a) { | |
arguments[4][19][0].apply(a, arguments) | |
}, { | |
"./ac-event-emitter/EventEmitter": 596, | |
dup: 19 | |
}], | |
596: [function(b, c, a) { | |
arguments[4][20][0].apply(a, arguments) | |
}, { | |
dup: 20 | |
}], | |
597: [function(b, c, a) { | |
arguments[4][196][0].apply(a, arguments) | |
}, { | |
"./ac-window-delegate/WindowDelegate": 600, | |
"./ac-window-delegate/WindowDelegateCustomEvent": 601, | |
"./ac-window-delegate/WindowDelegateOptimizer": 602, | |
dup: 196 | |
}], | |
598: [function(b, c, a) { | |
arguments[4][197][0].apply(a, arguments) | |
}, { | |
"ac-event-emitter": 595, | |
dup: 197 | |
}], | |
599: [function(b, c, a) { | |
arguments[4][198][0].apply(a, arguments) | |
}, { | |
"ac-event-emitter": 595, | |
dup: 198 | |
}], | |
600: [function(b, c, a) { | |
arguments[4][451][0].apply(a, arguments) | |
}, { | |
"./CustomEventController": 598, | |
"./OptimizerController": 599, | |
"./optimizers/optimizers": 605, | |
"./queries/queries": 614, | |
"ac-dom-emitter": 592, | |
"ac-shared-instance": 560, | |
dup: 451 | |
}], | |
601: [function(b, c, a) { | |
arguments[4][200][0].apply(a, arguments) | |
}, { | |
"ac-event-emitter": 595, | |
dup: 200 | |
}], | |
602: [function(b, c, a) { | |
arguments[4][201][0].apply(a, arguments) | |
}, { | |
"ac-event-emitter": 595, | |
dup: 201 | |
}], | |
603: [function(b, c, a) { | |
arguments[4][202][0].apply(a, arguments) | |
}, { | |
"../../WindowDelegateOptimizer": 602, | |
"../../queries/queries": 614, | |
dup: 202 | |
}], | |
604: [function(b, c, a) { | |
arguments[4][203][0].apply(a, arguments) | |
}, { | |
"../../WindowDelegateOptimizer": 602, | |
"../../queries/queries": 614, | |
dup: 203 | |
}], | |
605: [function(b, c, a) { | |
arguments[4][204][0].apply(a, arguments) | |
}, { | |
"./events/resize": 603, | |
"./events/scroll": 604, | |
dup: 204 | |
}], | |
606: [function(b, c, a) { | |
arguments[4][205][0].apply(a, arguments) | |
}, { | |
dup: 205 | |
}], | |
607: [function(b, c, a) { | |
arguments[4][206][0].apply(a, arguments) | |
}, { | |
dup: 206 | |
}], | |
608: [function(b, c, a) { | |
arguments[4][207][0].apply(a, arguments) | |
}, { | |
dup: 207 | |
}], | |
609: [function(b, c, a) { | |
arguments[4][208][0].apply(a, arguments) | |
}, { | |
dup: 208 | |
}], | |
610: [function(b, c, a) { | |
arguments[4][209][0].apply(a, arguments) | |
}, { | |
dup: 209 | |
}], | |
611: [function(b, c, a) { | |
arguments[4][210][0].apply(a, arguments) | |
}, { | |
dup: 210 | |
}], | |
612: [function(b, c, a) { | |
arguments[4][211][0].apply(a, arguments) | |
}, { | |
dup: 211 | |
}], | |
613: [function(b, c, a) { | |
arguments[4][212][0].apply(a, arguments) | |
}, { | |
dup: 212 | |
}], | |
614: [function(b, c, a) { | |
arguments[4][213][0].apply(a, arguments) | |
}, { | |
"./methods/clientHeight": 606, | |
"./methods/clientWidth": 607, | |
"./methods/innerHeight": 608, | |
"./methods/innerWidth": 609, | |
"./methods/maxScrollX": 610, | |
"./methods/maxScrollY": 611, | |
"./methods/scrollX": 612, | |
"./methods/scrollY": 613, | |
dup: 213 | |
}], | |
615: [function(b, c, a) { | |
arguments[4][466][0].apply(a, arguments) | |
}, { | |
"./ac-viewport/Viewport": 616, | |
dup: 466 | |
}], | |
616: [function(b, c, a) { | |
arguments[4][467][0].apply(a, arguments) | |
}, { | |
"ac-breakpoints-delegate": 558, | |
"ac-shared-instance": 560, | |
"ac-window-delegate": 597, | |
dup: 467 | |
}], | |
617: [function(b, c, a) { | |
var h = b("ac-analytics"); | |
var g = b("ac-event-emitter").EventEmitter; | |
var j = b("ac-browser"); | |
function d(k) { | |
this.player = k; | |
this.sources = {}; | |
this.currentStubPlayer = null; | |
this.playerType = ""; | |
this.videoType = "" | |
} | |
var f = d.prototype; | |
f.activate = function() { | |
this.player.on("play", function() { | |
this.setCurrentStubPlayer(); | |
this._proxyEvent("play") | |
}, this); | |
this.player.on("ended", function() { | |
this._proxyEvent("ended") | |
}, this); | |
this.player.on("timeupdate", function() { | |
this._proxyEvent("timeupdate") | |
}, this, this); | |
this.player.on("texttrackshow", function() { | |
this._proxyEvent("captions-enabled") | |
}, this); | |
this.player.on("durationchange", this.setCurrentStubPlayer, this) | |
}; | |
f.getEventData = function() { | |
return { | |
playerType: (this.playerType || null), | |
videoType: (this.videoType || null) | |
} | |
}; | |
f._createObserver = function(l) { | |
var k; | |
if (h && h.observer && h.observer.Video) { | |
k = new h.observer.Video(l) | |
} | |
return k | |
}; | |
f._proxyEvent = function(k) { | |
if (this.currentStubPlayer) { | |
this.currentStubPlayer.trigger(k, this.getEventData()) | |
} | |
}; | |
f.setCurrentStubPlayer = function() { | |
var l = this.player.getCurrentSrc(); | |
var k = this.getCurrentSourceObject(l); | |
if (k && k.stubPlayer) { | |
this.currentStubPlayer = k.stubPlayer; | |
this.playerType = (j.name.toLowerCase() === "ie" && j.version < 9) ? "quicktime" : "html5"; | |
if (l && l.attributes && l.attributes.src) { | |
this.videoType = l.attributes.src.split(".").pop() | |
} | |
} | |
}; | |
f.getSourceObjectByCID = function(m) { | |
var k; | |
for (var l in this.sources) { | |
if (this.sources.hasOwnProperty(l)) { | |
if (this.sources[l].cid === m) { | |
k = this.sources[l]; | |
break | |
} | |
} | |
} | |
return k | |
}; | |
f.getCurrentSourceObject = function(k) { | |
var l; | |
if (k) { | |
l = this.getSourceObjectByCID(k.cid) | |
} | |
return l | |
}; | |
f.addSourceObject = function(k, l, n) { | |
var m = this._createStubPlayer(k); | |
this.sources[l] = { | |
stubPlayer: m, | |
observer: this._createObserver(m), | |
cid: n | |
} | |
}; | |
f._createStubPlayer = function(k) { | |
var l = new g(); | |
l.el = k; | |
return l | |
}; | |
c.exports = d | |
}, { | |
"ac-analytics": "ac-analytics", | |
"ac-browser": 1, | |
"ac-event-emitter": 219 | |
}], | |
618: [function(h, c, u) { | |
h("ac-polyfills/Element/prototype.classList"); | |
var g = h("ac-dom-traversal/querySelector"); | |
var p = h("ac-dom-traversal/querySelectorAll"); | |
var b = h("ac-element-tracker").ElementTracker; | |
var s = h("ac-viewport").Viewport; | |
var l = h("ac-feature"); | |
var q = h("ac-browser"); | |
var a = h("ac-films").create; | |
var j = h("./model/SectionMap"); | |
var r = h("./model/DataAttributes"); | |
var t = h("./sharedsections/BaseSection"); | |
var f = h("./ClipRegistry"); | |
var o = h("./TimeoutRegistry"); | |
var d = h("./LocalNavStyleChanger"); | |
var k = h("./FilmsEmitterProxy"); | |
function n() { | |
this.name = this.name || "[NOT SET]"; | |
this._mainEl = g(".main"); | |
this._sections = []; | |
this._visibleSections = []; | |
this._elementTracker = new b(null, { | |
autoStart: true | |
}); | |
this._currentSection = null; | |
this._sectionUnderLocalNav = null; | |
this.setupEventBindings(); | |
this.setupSections(); | |
this._updateSectionVisibility(this._getScrollY(), this._getVisibleBottomOfPage()); | |
this.setupLocalNavStyleChanger(); | |
this.setupFilmsController(); | |
if (!document.body.classList.contains("js-ready")) { | |
document.body.classList.add("js-ready") | |
} | |
} | |
var m = n.prototype; | |
m.destroy = function() { | |
this.teardownEvents(); | |
for (var w = 0, v = this._sections.length; w < v; w++) { | |
this._sections[w].destroy() | |
} | |
this._elementTracker.stop(); | |
this._elementTracker = null; | |
this._sections = null; | |
this._currentSection = null; | |
this._sectionUnderLocalNav = null; | |
this._visibleSections = null; | |
this._boundFunctions = null; | |
this._mainEl = null; | |
if (this._scrollClip) { | |
this._scrollClip.destroy(); | |
this._scrollClip = null | |
} | |
}; | |
m.setupEventBindings = function() { | |
this._boundFunctions = { | |
onViewportChange: this._onViewportMetricsChange.bind(this), | |
onBreakpoint: this._onBreakpoint.bind(this), | |
onPageDidAppear: this._onPageDidAppear.bind(this), | |
onPageWillDisappear: this._onPageWillDisappear.bind(this) | |
}; | |
s.on("scroll resize orientationchange", this._boundFunctions.onViewportChange); | |
s.on("breakpoint", this._boundFunctions.onBreakpoint) | |
}; | |
m.teardownEvents = function() { | |
this._elementTracker.windowDelegate.off("scroll resize orientationchange", this._boundFunctions.onViewportChange); | |
this._elementTracker.off(); | |
s.off("scroll resize orientationchange", this._boundFunctions.onViewportChange); | |
s.off("breakpoint", this._boundFunctions.onBreakpoint) | |
}; | |
m.setupSections = function() { | |
var x = p(".section", this._mainEl); | |
for (var A = 0, v = x.length; A < v; A++) { | |
var z = x[A]; | |
var y = this._elementTracker.addElement(z); | |
this._elementTracker.refreshElementState(y); | |
var B = z.hasAttribute(r.SECTION_TYPE) ? z.getAttribute(r.SECTION_TYPE) : "BaseSection"; | |
if (!j.hasOwnProperty(B)) { | |
throw "BasePage::setupSections no section type '" + B + "'found!" | |
} | |
var w = j[B]; | |
var C = new w(z, y, A); | |
C.setupEvents(); | |
this._sections.push(C) | |
} | |
}; | |
m.setupFilmsController = function() { | |
var v; | |
if (q.os.toLowerCase() === "ios" && l.isHandheld()) { | |
v = p(".ac-video:not([data-offscreen-modal])") | |
} else { | |
v = p(".ac-video") | |
} | |
var w; | |
if (v.length > 0) { | |
w = a(v, { | |
modal: true, | |
deep: true | |
}); | |
k.hasFilms = true; | |
if (w && w.modalVideo) { | |
w.modalVideo.on("close", function() { | |
k.trigger("close") | |
}) | |
} | |
} | |
}; | |
m.setupLocalNavStyleChanger = function() { | |
var v = this._mainEl.getAttribute("data-page-type"); | |
d.initialize(this._currentSection, v) | |
}; | |
m._activateSection = function(v) { | |
if (this._currentSection == v) { | |
return | |
} | |
if (this._currentSection) { | |
this._currentSection.deactivate() | |
} | |
this._currentSection = v; | |
this._currentSection.activate() | |
}; | |
m._updateSectionVisibility = function(y, w) { | |
var x = this._sections[0]; | |
var z = []; | |
var B = 0; | |
for (var A = 0, v = this._sections.length; A < v; A++) { | |
var C = this._sections[A]; | |
if (C.trackedElement.pixelsInView > 0.000001) { | |
z.push(C) | |
} | |
if (C.trackedElement.pixelsInView > B) { | |
x = C; | |
B = C.trackedElement.pixelsInView | |
} | |
} | |
for (A = 0, v = Math.max(this._visibleSections.length, z.length); A < v; A++) { | |
if (this._visibleSections[A] && z.indexOf(this._visibleSections[A]) === -1) { | |
this._visibleSections[A].onViewWillDisappear(y, w) | |
} | |
if (z[A] && this._visibleSections.indexOf(z[A]) === -1) { | |
z[A].onViewWillAppear(y, w) | |
} | |
} | |
this._visibleSections = z; | |
this._activateSection(x) | |
}; | |
m._onPageDidAppear = function(v) { | |
var w = g(".section-hero .icon-paddledown", this._mainEl); | |
if (w) { | |
f.add(new Clip(w, 1.5, { | |
destroyOnComplete: true, | |
opacity: 1 | |
}).play()) | |
} | |
}; | |
m._onPageWillDisappear = function(v) { | |
f.destroyClips(); | |
o.clearTimeouts(); | |
this.destroy() | |
}; | |
m._onBreakpoint = function(y) { | |
var w = this._getScrollY(); | |
var v = this._getVisibleBottomOfPage(); | |
for (var x = 0; x < this._sections.length; x++) { | |
this._sections[x].onBreakpoint(y.data.incoming, y.data.outgoing, w, v) | |
} | |
}; | |
m._onViewportMetricsChange = function(B) { | |
var x = this._getScrollY(); | |
var w = this._getVisibleBottomOfPage(); | |
var A = B.type || B.originalEvent.type; | |
if (A == "resize" || A == "orientation") { | |
for (z = 0, v = this._sections.length; z < v; z++) { | |
this._sections[z].onResize(B, x, w) | |
} | |
} | |
this._updateSectionVisibility(x, w); | |
var y = (A == "scroll"); | |
this._sectionUnderLocalNav = this._visibleSections[0]; | |
for (var z = 0, v = this._visibleSections.length; z < v; z++) { | |
if (y) { | |
this._visibleSections[z].onScroll(B, x, w) | |
} | |
if (x + d.height > this._visibleSections[z].scrollToPosition) { | |
this._sectionUnderLocalNav = this._visibleSections[z] | |
} | |
} | |
d.setCurrentSection(this._sectionUnderLocalNav) | |
}; | |
m._getSectionForTracker = function(x) { | |
for (var w = 0, v = this._sections.length; w < v; w++) { | |
if (this._sections[w].trackedElement === x) { | |
return this._sections[w] | |
} | |
} | |
return null | |
}; | |
m._getScrollY = function() { | |
return window.pageYOffset || document.body.scrollTop | |
}; | |
m._getVisibleBottomOfPage = function() { | |
return (window.pageYOffset || document.body.scrollTop) + window.innerHeight | |
}; | |
c.exports = n | |
}, { | |
"./ClipRegistry": 619, | |
"./FilmsEmitterProxy": 621, | |
"./LocalNavStyleChanger": 622, | |
"./TimeoutRegistry": 623, | |
"./model/DataAttributes": 633, | |
"./model/SectionMap": 636, | |
"./sharedsections/BaseSection": 676, | |
"ac-browser": 1, | |
"ac-dom-traversal/querySelector": 120, | |
"ac-dom-traversal/querySelectorAll": 121, | |
"ac-element-tracker": 214, | |
"ac-feature": 230, | |
"ac-films": "ac-films", | |
"ac-polyfills/Element/prototype.classList": 393, | |
"ac-viewport": 615 | |
}], | |
619: [function(b, c, a) { | |
b("ac-polyfills/Object/create"); | |
var g = 0; | |
var f = function() { | |
this.clips = {} | |
}; | |
var d = f.prototype; | |
f.prototype.constructor = f; | |
d.add = function(j) { | |
var h = "registry-item-" + g; | |
g++; | |
this._destroyClip(h); | |
this.clips[h] = j; | |
return this.clips[h] | |
}; | |
d.remove = function(h) { | |
this._destroyClip(h) | |
}; | |
d.destroyClips = function() { | |
for (var h in this.clips) { | |
if (this.clips.hasOwnProperty(i)) { | |
this._destroyClip(i) | |
} | |
} | |
this.clips = {} | |
}; | |
d.destroy = function() { | |
this.destroyClips(); | |
this.clips = null | |
}; | |
d._destroyClip = function(h) { | |
if (this.clips[h]) { | |
this.clips[h].destroy(); | |
this.clips[h] = null | |
} | |
}; | |
c.exports = new f() | |
}, { | |
"ac-polyfills/Object/create": 394 | |
}], | |
620: [function(c, d, b) { | |
var g = c("ac-viewport").Viewport; | |
var f; | |
var a = function(h) { | |
h = h || {}; | |
this.els = {}; | |
this.worldSpace = {}; | |
if (h.els) { | |
var j; | |
for (j in h.els) { | |
if (h.els.hasOwnProperty(j)) { | |
this.add(j, h.els[j]) | |
} | |
} | |
} | |
this._boundOnBreakpoint = this._onBreakpoint.bind(this); | |
g.on("breakpoint", this._boundOnBreakpoint) | |
}; | |
f = a.prototype; | |
f.add = function(h, j) { | |
this.els[h] = { | |
el: j | |
}; | |
this.initializeElement(h) | |
}; | |
f.initializeElements = function() { | |
var h; | |
for (h in this.els) { | |
if (this.els.hasOwnProperty(h)) { | |
this.initializeElement(h) | |
} | |
} | |
}; | |
f.initializeElement = function(j) { | |
var h = this.els[j].el.getBoundingClientRect(), | |
k = g.scrollY(); | |
this.els[j].position = { | |
width: h.width, | |
height: h.height, | |
top: h.top + k, | |
left: h.left, | |
centerX: (h.width / 2) + h.left, | |
centerY: (h.height / 2) + h.top + k | |
} | |
}; | |
f.remove = function(h) { | |
this.els[h] = null | |
}; | |
f.calculate = function() { | |
var h; | |
for (h in this.els) { | |
if (this.els.hasOwnProperty(h)) { | |
this.worldSpace[h] = this.getWorldSpace(h) | |
} | |
} | |
}; | |
f.getDistance = function(n, m) { | |
var h = this.worldSpace[n], | |
o = this.worldSpace[m]; | |
var k = h.x - o.x, | |
j = h.y - o.y, | |
l = Math.sqrt(Math.pow(k, 2) + Math.pow(j, 2)); | |
return l | |
}; | |
f.getWorldSpace = function(h) { | |
var j = this.els[h], | |
l = j.position, | |
k; | |
if (this.parallaxOffsets && this.parallaxOffsets[h]) { | |
k = this.parallaxOffsets[h] | |
} else { | |
k = { | |
x: 0, | |
y: 0, | |
r: 0 | |
} | |
} | |
return { | |
x: l.centerX + k.x, | |
y: l.centerY + k.y, | |
r: k.r | |
} | |
}; | |
f._onBreakpoint = function() { | |
window.requestAnimationFrame(this.initializeElements.bind(this)) | |
}; | |
d.exports = a | |
}, { | |
"ac-viewport": 615 | |
}], | |
621: [function(d, f, b) { | |
var h = d("ac-event-emitter-micro").EventEmitterMicro, | |
a = d("ac-object"); | |
var g; | |
var c = function() { | |
h.call(this); | |
this.didClose = false; | |
this.hasFilms = false; | |
this.hasAutoplay = false; | |
this.once("close", this._onClose.bind(this)) | |
}; | |
g = c.prototype = a.create(h.prototype); | |
g._onClose = function() { | |
this.didClose = true | |
}; | |
f.exports = new c() | |
}, { | |
"ac-event-emitter-micro": 217, | |
"ac-object": 380 | |
}], | |
622: [function(c, b, g) { | |
c("ac-polyfills/Element/prototype.classList"); | |
var l = c("ac-console").log; | |
var f = c("./model/DataAttributes"), | |
h = c("ac-dom-traversal").querySelector; | |
var k = { | |
light: "ac-localnav-light", | |
dark: "ac-localnav-dark" | |
}; | |
var a = { | |
"section-light": "light", | |
"section-lightgray": "light", | |
"section-dark": "dark", | |
"section-darkgray": "dark", | |
"section-darkergray": "dark", | |
"section-superdarkgray": "dark" | |
}; | |
var d = "light"; | |
var m = function() { | |
this._currentTheme = ""; | |
this._lastTheme = ""; | |
this._currentPageNavLink = null; | |
this._section = null; | |
this._localNav = null; | |
this.height = 0 | |
}; | |
var j = m.prototype; | |
j.initialize = function(o, n) { | |
this._getLocalNav(); | |
this.setCurrentSection(o); | |
this.setCurrentPage(n) | |
}; | |
j.setCurrentPage = function(n) { | |
var o = h(".localnav-link[" + f.JUMP_SECTION_NAME + "=" + n + "]"); | |
if (o === this._currentPageNavLink) { | |
return | |
} | |
if (this._currentPageNavLink) { | |
this._currentPageNavLink.classList.remove("current") | |
} | |
if (o) { | |
o.classList.add("current"); | |
this._currentPageNavLink = o | |
} | |
}; | |
j.setCurrentSection = function(o) { | |
if (!o || this._section && this._section === o) { | |
return | |
} | |
this._section = o; | |
for (var n in a) { | |
if (this._section.element.classList.contains(n)) { | |
this.setTheme(a[n]); | |
return | |
} | |
} | |
this.setTheme(d) | |
}; | |
j.setTheme = function(n) { | |
if (!k[n] || this._currentTheme === n) { | |
return | |
} | |
for (var o in k) { | |
if (o !== n) { | |
this._localNav.classList.remove(k[o]) | |
} else { | |
this._localNav.classList.add(k[o]) | |
} | |
} | |
}; | |
j.removeThemes = function() { | |
this._currentTheme = null; | |
for (var n in k) { | |
this._localNav.classList.remove(k[n]) | |
} | |
}; | |
j._getLocalNav = function(n) { | |
if (!this._localNav || n) { | |
this._localNav = h("#ac-localnav"); | |
this.height = this._localNav.clientHeight | |
} | |
return this._localNav | |
}; | |
m.SECTION_THEME_NAMES = a; | |
b.exports = new m() | |
}, { | |
"./model/DataAttributes": 633, | |
"ac-console": 31, | |
"ac-dom-traversal": 111, | |
"ac-polyfills/Element/prototype.classList": 393 | |
}], | |
623: [function(b, c, a) { | |
function f() { | |
this._timeouts = [] | |
} | |
var d = f.prototype = {}; | |
d.setTimeout = function(h, g) { | |
var j = setTimeout(h, g); | |
this._timeouts.push(j); | |
return j | |
}; | |
d.clearTimeouts = function() { | |
for (var h = 0, g = this._timeouts.length; h < g; h++) { | |
clearTimeout(this._timeouts[h]) | |
} | |
this._timeouts = [] | |
}; | |
c.exports = new f() | |
}, {}], | |
624: [function(d, c, f) { | |
var b = d("ac-dom-traversal/querySelectorAll"); | |
var k = d("ac-solar"); | |
var h = d("ac-dom-styles/setStyle"); | |
var j = d("ac-viewport").Viewport; | |
var a = function(n, p, m) { | |
var l = this; | |
var m = m || {}; | |
this.el = n; | |
this.ee = m.elementEngagement || d("./sharedElementEngagement").getInstance(); | |
this.config = JSON.parse(this.el.getAttribute("data-animate-in")); | |
if (!this.config) { | |
this.config = {} | |
} | |
this.viewportMap = { | |
large: "l", | |
medium: "m", | |
small: "s" | |
}; | |
this.currentViewport = this.viewportMap[p]; | |
this.animations = []; | |
var o = b("[data-animate-child]", this.el); | |
if (o.length > 0) { | |
o.forEach(function(r, q) { | |
l.animations.push({ | |
el: r, | |
data: JSON.parse(r.getAttribute("data-animate-child")) | |
}) | |
}) | |
} else { | |
this.animations.push({ | |
el: this.el, | |
data: this.config | |
}) | |
} | |
this.animations.forEach(this._configAnimations.bind(this)); | |
this._configElementEngagment(); | |
this._track(); | |
this._initialize() | |
}; | |
var g = a.prototype; | |
g._configAnimations = function(n) { | |
var l = this.currentViewport; | |
var m = n.data; | |
if (m[l]) { | |
n.offsetX = m[l].offsetX || 0; | |
n.offsetY = m[l].offsetY || 0; | |
n.fadeIn = m[l].fadeIn || false | |
} else { | |
n.offsetX = m.offsetX || 0; | |
n.offsetY = m.offsetY || 0; | |
n.fadeIn = m.fadeIn || false | |
} | |
n.initialized = n.initialized || false; | |
n.animated = n.animated || false; | |
n.inView = n.inView || false; | |
n.duration = m.duration || 500; | |
n.delay = m.delay || 500; | |
n.repeat = m.repeat || false | |
}; | |
g._configElementEngagment = function() { | |
this.timeToEngage = this.config.timeToEngage || 500; | |
this.threshold = this.config.threshold || 0.75 | |
}; | |
g._track = function() { | |
this.trackedEl = this.ee.addElement(this.el, { | |
timeToEngage: this.timeToEngage, | |
inViewThreshold: this.threshold | |
}); | |
this.trackedEl.on("engaged", this._onThresholdEnter.bind(this)); | |
this.trackedEl.on("enterview", this._onEnterView.bind(this)); | |
this.trackedEl.on("exitview", this._onExitView.bind(this)) | |
}; | |
g._initialize = function() { | |
this.animations.forEach(function(l) { | |
if (!l.inView) { | |
k.move(l.el, l.offsetX, l.offsetY, 0); | |
if (l.fadeIn) { | |
l.el.style.opacity = 0 | |
} | |
l.initialized = true | |
} | |
}) | |
}; | |
g._onThresholdEnter = function() { | |
this.animations.forEach(function(l) { | |
if (!l.initialized || l.animated) { | |
return | |
} | |
if (l.fadeIn) { | |
k.fadeIn(l.el, l.duration / 1000, { | |
delay: l.delay / 1000, | |
ease: l.ease | |
}) | |
} | |
k.move(l.el, 0, 0, l.duration / 1000, { | |
delay: l.delay / 1000, | |
ease: l.ease | |
}); | |
l.animated = true | |
}) | |
}; | |
g._onEnterView = function() { | |
this.animations.forEach(function(l) { | |
l.inView = true | |
}) | |
}; | |
g._onExitView = function() { | |
this.animations.forEach(function(l) { | |
l.inView = false; | |
if (l.repeat || !l.initialized) { | |
l._initialize() | |
} | |
}) | |
}; | |
g.destroy = function() { | |
this.ee.stop(this.trackedEl); | |
this.trackedEl.off() | |
}; | |
g.updateAnimationOnBreakpoint = function(m) { | |
this.currentViewport = this.viewportMap[m]; | |
var l = this; | |
this.animations.forEach(function(n) { | |
l._configAnimations(n); | |
if (!n.animated) { | |
l._initialize() | |
} | |
}) | |
}; | |
c.exports = a | |
}, { | |
"./sharedElementEngagement": 625, | |
"ac-dom-styles/setStyle": 105, | |
"ac-dom-traversal/querySelectorAll": 121, | |
"ac-solar": 509, | |
"ac-viewport": 615 | |
}], | |
625: [function(b, d, a) { | |
var c = b("ac-element-engagement").ElementEngagement; | |
d.exports = (function() { | |
var g; | |
function f() { | |
var h = new c(); | |
return h | |
} | |
return { | |
getInstance: function() { | |
if (!g) { | |
g = f() | |
} | |
return g | |
} | |
} | |
})() | |
}, { | |
"ac-element-engagement": 145 | |
}], | |
626: [function(c, b, g) { | |
var m = c("../../../../../node_modules/ac-toolkit/src/json/exports.json"); | |
var j = c("ac-viewport").Viewport; | |
var k = c("ac-dom-metrics/getContentDimensions"); | |
var l = c("ac-dom-metrics/utils/getBoundingClientRect"); | |
var n = c("ac-dom-traversal/querySelector"); | |
var a = c("ac-dom-traversal/querySelectorAll"); | |
var o = c("ac-dom-styles/setStyle"); | |
var f = c("ac-eclipse").Clip; | |
function d(p) { | |
this.togglenavEl = p.togglenavEl; | |
this.togglenavItemSelector = p.togglenavItemSelector || "li"; | |
if (!this.togglenavEl) { | |
throw new Error("CenteredTogglenav must be given a togglenav element") | |
} | |
this.togglenavItems = a(this.togglenavItemSelector, this.togglenavEl); | |
this.firstTogglenavItem = this.togglenavItems[0]; | |
this.lastTogglenavItem = this.togglenavItems[this.togglenavItems.length - 1]; | |
j.setBreakpoints(m.viewports); | |
this._padTogglenavItems() | |
} | |
var h = d.prototype; | |
h.update = function() { | |
this._padTogglenavItems(); | |
this._centerCurrentTogglenavItem() | |
}; | |
h._padTogglenavItems = function() { | |
if (j.getBreakpoint().name !== "small") { | |
o(this.firstTogglenavItem.parentNode, { | |
paddingLeft: 0 | |
}); | |
o(this.lastTogglenavItem.parentNode, { | |
paddingRight: 0 | |
}); | |
return | |
} | |
var q = Math.round(this.togglenavEl.clientWidth / 2); | |
var p = k(this.togglenavEl).width / 2; | |
var t = q - p; | |
var s = k(this.firstTogglenavItem); | |
var r = k(this.lastTogglenavItem); | |
var v, u; | |
if (t > 0) { | |
v = Math.round(q - t - s.width / 2); | |
u = Math.round(q - t - r.width / 2) | |
} else { | |
v = Math.round(q - s.width / 2); | |
u = Math.round(q - r.width / 2) | |
} | |
o(this.firstTogglenavItem.parentNode, { | |
paddingLeft: v + "px" | |
}); | |
o(this.lastTogglenavItem.parentNode, { | |
paddingRight: u + "px" | |
}) | |
}; | |
h._centerCurrentTogglenavItem = function() { | |
var t = Math.round(this.togglenavEl.clientWidth / 2); | |
var x = n(".current", this.togglenavEl); | |
var u = l(x); | |
var p = Math.round(x.offsetLeft + u.width / 2); | |
var s = Math.round(p - t); | |
var q = { | |
x: this.togglenavEl.scrollLeft | |
}; | |
var w = { | |
x: s | |
}; | |
var v = function() { | |
this.togglenavEl.scrollLeft = q.x | |
}.bind(this); | |
var r = new f(q, 0.6, w, { | |
ease: "cubic-bezier(.35,.01,.34,1)", | |
onDraw: v | |
}); | |
r.play() | |
}; | |
h.destroy = function() {}; | |
b.exports = d | |
}, { | |
"../../../../../node_modules/ac-toolkit/src/json/exports.json": 521, | |
"ac-dom-metrics/getContentDimensions": 53, | |
"ac-dom-metrics/utils/getBoundingClientRect": 64, | |
"ac-dom-styles/setStyle": 105, | |
"ac-dom-traversal/querySelector": 120, | |
"ac-dom-traversal/querySelectorAll": 121, | |
"ac-eclipse": "ac-eclipse", | |
"ac-viewport": 615 | |
}], | |
627: [function(d, b, g) { | |
var m = d("ac-dom-traversal/querySelector"); | |
var a = d("ac-dom-traversal/querySelectorAll"); | |
var f = d("ac-dom-nodes/insertFirstChild"); | |
var j = d("ac-dom-nodes/insertAfter"); | |
var o = d("ac-classlist"); | |
var c = d("ac-gallery").SlideGallery; | |
var k = d("ac-gallery").Gallery; | |
var l = k.extend({ | |
beforeDraw: function(p, r, q) { | |
o.remove(r.get("element"), "current") | |
}, | |
afterDraw: function(p, r, q) { | |
setTimeout(function() { | |
o.add(p.get("element"), "current") | |
}, 400) | |
} | |
}); | |
function n(p) { | |
this.galleryWrapper = p; | |
this.galleryType = (o.contains(this.galleryWrapper, "ac-gallery-fade")) ? "fade" : "slide"; | |
this.galleryId = this.galleryWrapper.id; | |
this.viewfinder = document.getElementById(this.galleryId); | |
this.galleryContentElements = a(".ac-gallery-content", this.element); | |
this.triggerClass = this.galleryId + "-trigger"; | |
this.dotnav = m(".dotnav", this.element); | |
this.dotnavExpected = o.contains(this.galleryWrapper, "ac-gallery-has-dotnav"); | |
this.paddlenav = m(".paddlenav", this.element); | |
this.paddlenavExpected = o.contains(this.galleryWrapper, "ac-gallery-has-paddlenav"); | |
this.togglenav = m(".togglenav", this.element); | |
this.togglenavExpected = o.contains(this.galleryWrapper, "ac-gallery-has-togglenav"); | |
this._boundFunctions = { | |
_willShowSlide: this._willShowSlide.bind(this) | |
}; | |
if (!this.dotnav && this.dotnavExpected) { | |
this._setupDotnav() | |
} | |
if (!this.paddlenav && this.paddlenavExpected) { | |
this._setupPaddlenav() | |
} | |
if (!this.togglenav && this.togglenavExpected) { | |
this._setupTogglenav() | |
} | |
this._createGallery() | |
} | |
var h = n.prototype; | |
h._setupDotnav = function() { | |
var r = document.createElement("nav"), | |
q = document.createElement("ul"); | |
var p = this; | |
this.galleryContentElements.forEach(function(t, s) { | |
q.innerHTML += '<li><a href="#' + p.galleryId + "/show/" + t.id + '" class="dotnav-item ' + p.triggerClass + '">Item ' + (s + 1) + "</a></li>" | |
}); | |
r.className = "dotnav"; | |
f(q, r); | |
j(r, this.galleryWrapper) | |
}; | |
h._setupPaddlenav = function() { | |
var p = document.createElement("nav"); | |
p.innerHTML += '<a class="paddlenav-arrow paddlenav-arrow-left ' + this.triggerClass + '" href="#' + this.galleryId + '/previous"></a>'; | |
p.innerHTML += '<a class="paddlenav-arrow paddlenav-arrow-right ' + this.triggerClass + '" href="#' + this.galleryId + '/next"></a>'; | |
p.className = "paddlenav"; | |
j(p, this.galleryWrapper) | |
}; | |
h._setupTogglenav = function() { | |
var r = document.createElement("nav"), | |
q = document.createElement("ul"); | |
var p = this; | |
this.galleryContentElements.forEach(function(t, s) { | |
var u = t.getAttribute("data-slide-title"); | |
q.innerHTML += '<li><a href="#' + p.galleryId + "/show/" + t.id + '" class="togglenav-button ' + p.triggerClass + '">' + u + "</a></li>" | |
}); | |
r.className = "togglenav"; | |
f(q, r); | |
j(r, this.galleryWrapper) | |
}; | |
h._willShowSlide = function(p) { | |
this.galleryContentElements.forEach(function(q) { | |
o.remove(q, "current") | |
}); | |
o.add(m("#" + p.incoming.id), "current") | |
}; | |
h._createGallery = function() { | |
switch (this.galleryType) { | |
case "fade": | |
var p = l.create({ | |
id: this.galleryId, | |
el: this.viewfinder, | |
model: this.galleryContentElements, | |
triggerSelector: "." + this.triggerClass, | |
easing: "cubic-bezier(.35,.01,.34,1)", | |
pointer: { | |
touch: true | |
} | |
}); | |
break; | |
default: | |
var p = c.create({ | |
el: this.viewfinder, | |
id: this.galleryId, | |
slideEl: document.getElementById(this.galleryId + "-slides"), | |
easing: "cubic-bezier(.35,.01,.34,1)", | |
model: this.galleryContentElements, | |
triggerSelector: "." + this.triggerClass, | |
duration: 0, | |
pointer: { | |
mouse: true, | |
touch: true | |
} | |
}); | |
break | |
} | |
this.gallery = p | |
}; | |
h.setupEvents = function() {}; | |
h.teardownEvents = function() { | |
this.gallery.off() | |
}; | |
h.destroy = function() { | |
this.gallery.off(); | |
this.gallery = null | |
}; | |
b.exports = n | |
}, { | |
"ac-classlist": 12, | |
"ac-dom-nodes/insertAfter": 76, | |
"ac-dom-nodes/insertFirstChild": 78, | |
"ac-dom-traversal/querySelector": 120, | |
"ac-dom-traversal/querySelectorAll": 121, | |
"ac-gallery": 320 | |
}], | |
628: [function(f, c, h) { | |
var q = f("../../../../../node_modules/ac-toolkit/src/json/exports.json"); | |
var l = f("../AnalyticsTranslator"); | |
var d = f("../model/EnabledFeatures"); | |
var b = f("ac-dom-traversal").querySelectorAll; | |
var j = f("ac-dom-traversal").querySelector; | |
var g = f("ac-vatman"); | |
var o = f("ac-event-emitter-micro").EventEmitterMicro; | |
var n = f("ac-viewport").Viewport; | |
var a = f("ac-video").Player; | |
var p = /object|embed/i; | |
function k(t, s) { | |
o.call(this, null); | |
d.init(); | |
this.el = t; | |
this.triggerElement = s; | |
this.isReady = false; | |
this.isDimensionMeasured = false; | |
this.video = m(t); | |
var r; | |
if (this.video) { | |
this.analyticsTranslator = new l(this.video); | |
this.analyticsTranslator.activate(); | |
s.id = r = t.id; | |
s.setAttribute("data-analytics-id", r); | |
this.analyticsTranslator.addSourceObject(s, r, this.video.getCurrentSrc().cid) | |
} | |
this.container = j("figure", this.el); | |
this.sectionCopy = j(".section-copy", this.el); | |
this.button = j(".icon-play", this.el); | |
n.setBreakpoints(q.viewports); | |
this.isReady = false; | |
this.bind() | |
} | |
k.prototype = new o(null); | |
k.prototype.aspectRatio = 1920 / 1080; | |
k.prototype.ieLimit = 3000; | |
k.prototype.videoHeightRatio = 0.75; | |
k.prototype.bind = function() { | |
var r = j("a", this.el); | |
if (!(d.IS_TABLET || d.IS_HANDHELD)) { | |
if (d.IS_IE) { | |
r.addEventListener("click", function(s) { | |
s.preventDefault(); | |
this.onCalloutClicked(); | |
this.onclick() | |
}.bind(this)) | |
} | |
} | |
this.onViewReady(); | |
this.video.on("canplay", this.onCanPlay.bind(this)); | |
this.video.on("acv-no-support", this.onNoSupport.bind(this)); | |
this.video.on("play", this.onplay.bind(this)); | |
this.video.on("pause", this.onpause.bind(this)); | |
this.video.on("loadedmetadata", this.onmetadata.bind(this)); | |
this.video.on("ended", this.onended.bind(this)) | |
}; | |
k.prototype.onCanPlay = function() { | |
this.isReady = true | |
}; | |
k.prototype.onViewReady = function() { | |
var t = getComputedStyle(this.container).backgroundImage, | |
s = t.replace("url(", "").replace(")", ""), | |
r, u; | |
if (d.IS_HANDHELD || d.IS_TABLET) { | |
r = this.container.clientHeight; | |
this.el.classList.add("acv-view-ready"); | |
this.video.getMediaElement().id = "video-" + this.el.id | |
} | |
if (d.IS_ANDROID) { | |
this.el.classList.add("acv-android") | |
} | |
if (d.IS_HANDHELD || d.IS_TABLET) { | |
this.el.classList.add("acv-native"); | |
this.video.setPoster(s) | |
} | |
if (d.IS_TABLET) { | |
this.el.classList.add("acv-inline-playback") | |
} | |
this.triggerElement.removeAttribute("style"); | |
this.itemHeight = this.el.clientHeight; | |
u = this.onclick.bind(this); | |
this.video.el.removeEventListener("click", u); | |
this.video.el.addEventListener("click", u) | |
}; | |
k.prototype.onclick = function(r) { | |
if (this.video.getPaused()) { | |
this.play() | |
} else { | |
this.pause() | |
} | |
}; | |
k.prototype.onCalloutClicked = function() { | |
var r = this.onclick.bind(this); | |
this.isReady = true; | |
this.triggerElement.removeEventListener("click", r); | |
this.triggerElement.addEventListener("click", r) | |
}; | |
k.prototype.onpause = function() { | |
if (d.IS_TABLET && !this.isReady) { | |
return | |
} | |
if (!d.IS_TABLET) { | |
this.button.style.display = ""; | |
this.el.classList.remove("video-playing"); | |
this.el.classList.add("video-paused") | |
} | |
}; | |
k.prototype.onplay = function() { | |
if (!this.isDimensionMeasured) { | |
this.onmetadata() | |
} | |
this.el.classList.add("video-playing"); | |
this.el.classList.remove("video-paused") | |
}; | |
k.prototype.unbind = function() { | |
this.el.classList.remove("video-playing"); | |
this.el.classList.remove("video-paused"); | |
this.off() | |
}; | |
k.prototype.onmetadata = function() { | |
this.aspectRatio = this.video.getMediaWidth() / this.video.getMediaHeight(); | |
this.onDimensionMeasured = true | |
}; | |
k.prototype.onended = function() { | |
if (d.IS_HANDHELD && d.IS_IOS) { | |
this.video.mediaController.playableObject.el.webkitExitFullScreen() | |
} | |
}; | |
k.prototype.play = function() { | |
if (this.video) { | |
if (this.video.getPreload() === "none") { | |
this.video.setPreload("auto") | |
} | |
if (this.video.getReadyState() !== 4) { | |
this.video.on("readystatechange", function() { | |
if (this.video.getReadyState() === 4) { | |
this.video.play() | |
} | |
}, this); | |
if (d.IS_TABLET) { | |
this.video.mediaController.playableObject.el.load() | |
} | |
} else { | |
this.video.play(); | |
if (d.IS_HANDHELD) { | |
this.onplay() | |
} | |
} | |
} | |
}; | |
k.prototype.pause = function() { | |
if (this.video) { | |
if (this.video.getReadyState() !== 4) {} else { | |
this.video.pause() | |
} | |
this.onpause() | |
} | |
}; | |
k.prototype.onNoSupport = function() { | |
this.el.classList.add("acv-no-support") | |
}; | |
function m(u) { | |
var y = "target-" + u.id.replace("#", ""); | |
var s = j(".icon-play", u); | |
var v = j(".ac-video", u); | |
var A = j("figure", u); | |
var z = getComputedStyle(A).backgroundImage; | |
var C = z.replace("url(", "").replace(")", "").replace('"', "").replace('"', ""); | |
var B; | |
var r = v.getAttribute("href"); | |
s.setAttribute("data-acv-target", y); | |
v.setAttribute("data-acv-controlbar", "controlBarDefault"); | |
v.setAttribute("data-acv-poster", C); | |
var w = { | |
width: "1920", | |
height: "1080", | |
loop: false | |
}; | |
r = g.vatClient.getSource(r, window.innerWidth); | |
var x = {}; | |
if (!d.IS_TABLET) { | |
x.controls = false | |
} | |
if (d.IS_IE) { | |
r += "?" + new Date().getTime() | |
} | |
var t = { | |
autoplay: false, | |
src: r, | |
loop: false | |
}; | |
if (d.IS_IE) { | |
t.preload = "none" | |
} | |
B = a.create(t, x); | |
B.appendTo(v.parentNode); | |
return B | |
} | |
c.exports = k | |
}, { | |
"../../../../../node_modules/ac-toolkit/src/json/exports.json": 521, | |
"../AnalyticsTranslator": 617, | |
"../model/EnabledFeatures": 634, | |
"ac-dom-traversal": 111, | |
"ac-event-emitter-micro": 217, | |
"ac-vatman": 535, | |
"ac-video": "ac-video", | |
"ac-viewport": 615 | |
}], | |
629: [function(c, b, f) { | |
var a = c("./BasicDecorator"); | |
var k = a.prototype; | |
var j = c("ac-viewport").Viewport; | |
var h = c("ac-dom-metrics").getDimensions; | |
var d = function(n, m, o) { | |
var l = {}; | |
a.call(this, n, m, o, l); | |
this._boundOnTrackingScroll = this._onTrackingScroll.bind(this) | |
}; | |
var g = d.prototype = Object.create(a.prototype); | |
d.prototype.constructor = d; | |
g._initMediaObject = function() { | |
k._initMediaObject.call(this); | |
this.alreadyPlayed = false; | |
var l = j.clientHeight(); | |
var m = h(this.el).height; | |
this.threshold = l / m - 0.2; | |
if (this.threshold > 1) { | |
this.threshold = 1 | |
} | |
}; | |
g._onTrackingScroll = function() { | |
if (this.trackedElement && this.trackedElement.percentInView >= this.threshold && !this.mediaObj.isDestroyed) { | |
if (!this.mediaObj.getEnhanced()) { | |
return | |
} | |
this.mediaObj.play(); | |
j.off("scroll", this._boundOnTrackingScroll); | |
this.trackedElement = null; | |
this.alreadyPlayed = true | |
} | |
}; | |
g._onEnhanced = function() { | |
k._onEnhanced.call(this); | |
if (this.trackedElement.percentInView >= this.threshold) { | |
this.mediaObj.play(); | |
this.alreadyPlayed = true | |
} | |
}; | |
g.onMediaObjectEnterView = function(l) { | |
if (!this.alreadyPlayed && !this.mediaObj.isDestroyed) { | |
if (!this.mediaObj.getEnhanced()) { | |
return | |
} | |
if (this.trackedElement.percentInView < this.threshold) { | |
j.on("scroll", this._boundOnTrackingScroll) | |
} else { | |
this.mediaObj.play(); | |
this.alreadyPlayed = true | |
} | |
} else { | |
if (this.alreadyPlayed && !this.mediaObj.isDestroyed) { | |
if (!this.mediaObj.getEnhanced()) { | |
return | |
} | |
this.mediaObj.play() | |
} | |
} | |
}; | |
g.onMediaObjectExitView = function(l) { | |
k.onMediaObjectExitView.call(this); | |
if (!this.mediaObj.isDestroyed && this.alreadyPlayed) { | |
this.mediaObj.reset() | |
} | |
}; | |
b.exports = d | |
}, { | |
"./BasicDecorator": 630, | |
"ac-dom-metrics": 62, | |
"ac-viewport": 615 | |
}], | |
630: [function(f, b, h) { | |
var p = f("ac-dom-events"); | |
var n = f("ac-viewport").Viewport; | |
var k = f("ac-media-object"); | |
var m = f("ac-cname").cname; | |
var c = f("../../model/EnabledFeatures"); | |
var j = f("ac-dom-traversal").querySelector; | |
var g = f("ac-dom-events").addEventListener; | |
var d = "/105/media/"; | |
var o = "/iphone-6s/2015/dhs3b549_75f9_422a_9470_4a09e709b350/"; | |
var a = function(s, r, t, q) { | |
c.init(); | |
this.retina = ""; | |
if (c.IS_RETINA) { | |
this.retina = "_2x" | |
} | |
this.el = s; | |
this.trackedElement = r; | |
this.data = t; | |
this.isLoaded = false; | |
this.shouldEnhance = true; | |
this.options = q || { | |
frameRate: 30 | |
}; | |
this.currentViewport = this.currentViewport || n.getBreakpoint().name; | |
if (this.currentViewport === "xlarge") { | |
this.currentViewport = "large" | |
} | |
this._boundOnLoad = this._onLoad.bind(this); | |
this._boundOnEnhanced = this._onEnhanced.bind(this); | |
this._boundOnShouldEnhance = this._onShouldEnhanced.bind(this); | |
this.boundOnMediaObjectEnterView = this.onMediaObjectEnterView.bind(this); | |
this.boundOnMediaObjectExitView = this.onMediaObjectExitView.bind(this); | |
this._initMediaObject(); | |
this.addEvents() | |
}; | |
var l = a.prototype; | |
l._initMediaObject = function() { | |
this.mediaSrc = this._createMediaSrc(this.data.name, this.data.locale, this.data.type); | |
this.mediaObj = this._createMediaObject(); | |
if (!this.mediaObj.isDestroyed) { | |
this.mediaObj.on("loaded", this._boundOnLoad); | |
this.mediaObj.on("enhanced", this._boundOnEnhanced); | |
this.mediaObj.on("shouldenhance", this._boundOnShouldEnhance); | |
this.mediaObj.load() | |
} | |
this._setupMobileTrigger() | |
}; | |
l._setupMobileTrigger = function() { | |
if (c.TOUCH) { | |
this.playTrigger = j(".mediaObject-play", this.el); | |
g(this.playTrigger, "click", this._playOnMobile.bind(this)) | |
} | |
}; | |
l._onLoad = function() { | |
this.isLoaded = true; | |
if (this.shouldEnhance) { | |
this.mediaObj.enhance() | |
} | |
}; | |
l._onShouldEnhanced = function() { | |
this.shouldEnhance = true; | |
if (this.isLoaded) { | |
this.mediaObj.enhance() | |
} | |
}; | |
l._onEnhanced = function() {}; | |
l._createMediaSrc = function(s, q, t) { | |
var q = q || "us"; | |
var r = m.addPrefix(d + q + o + s); | |
if (t === "flow") { | |
return { | |
basePath: r + "/" + this.currentViewport + "/" + t | |
} | |
} else { | |
if (t === "video") { | |
if (c.TOUCH || c.IS_IE) { | |
if (c.IS_IOS) { | |
return { | |
basePath: r, | |
filename: this.currentViewport, | |
fileFormat: "mp4" | |
} | |
} else { | |
return { | |
basePath: r, | |
filename: "android_" + this.currentViewport, | |
fileFormat: "mp4" | |
} | |
} | |
} else { | |
return { | |
basePath: r + "/split_files/" + this.currentViewport + this.retina, | |
splitFileLoading: true | |
} | |
} | |
} else { | |
return | |
} | |
} | |
}; | |
l._createMediaObject = function() { | |
var q = {}; | |
if (this.data.type === "flow") { | |
q = k.createFlow(this.el, this.mediaSrc, this.options) | |
} else { | |
if (this.data.type === "video" || this.data.type === "split_file") { | |
q = k.createVideo(this.el, this.mediaSrc, this.options) | |
} else { | |
q.isDestroyed = true | |
} | |
} | |
return q | |
}; | |
l._playOnMobile = function(q) { | |
q.preventDefault(); | |
this.mediaObj.play() | |
}; | |
l.addEvents = function() { | |
if (this.trackedElement) { | |
this.trackedElement.on("enterview", this.boundOnMediaObjectEnterView); | |
this.trackedElement.on("exitview", this.boundOnMediaObjectExitView) | |
} | |
}; | |
l.onMediaObjectEnterView = function(q) { | |
if (this.mediaObj.isDestroyed) { | |
return | |
} | |
}; | |
l.onMediaObjectExitView = function(q) { | |
if (this.mediaObj.isDestroyed) { | |
return | |
} | |
}; | |
b.exports = a | |
}, { | |
"../../model/EnabledFeatures": 634, | |
"ac-cname": 29, | |
"ac-dom-events": 39, | |
"ac-dom-traversal": 111, | |
"ac-media-object": "ac-media-object", | |
"ac-viewport": 615 | |
}], | |
631: [function(c, d, b) { | |
var a = c("ac-viewport").Viewport; | |
var h = c("./BasicDecorator"); | |
var j = h.prototype; | |
var g = function(m, n) { | |
var k = {}; | |
var l = null; | |
h.call(this, m, l, n, k) | |
}; | |
var f = g.prototype = Object.create(h.prototype); | |
g.prototype.constructor = g; | |
f._initMediaObject = function() { | |
this.mediaSrc = this._createMediaSrc(this.data.name, this.data.locale, this.data.type); | |
this.mediaObj = this._createMediaObject(); | |
this._setupMobileTrigger() | |
}; | |
d.exports = g | |
}, { | |
"./BasicDecorator": 630, | |
"ac-viewport": 615 | |
}], | |
632: [function(d, b, g) { | |
var h = d("ac-dom-traversal").querySelector; | |
var f = d("ac-dom-events").addEventListener; | |
var o = d("ac-classlist"); | |
var l = d("ac-viewport").Viewport; | |
var k = d("ac-dom-metrics").getDimensions; | |
var c = d("../../model/EnabledFeatures"); | |
var a = d("./BasicDecorator"); | |
var m = a.prototype; | |
var n = function(r, q, s) { | |
var p = {}; | |
a.call(this, r, q, s, p); | |
this._boundOnTrackingScroll = this._onTrackingScroll.bind(this) | |
}; | |
var j = n.prototype = Object.create(a.prototype); | |
n.prototype.constructor = n; | |
j._initMediaObject = function() { | |
m._initMediaObject.call(this); | |
this.alreadyPlayed = false; | |
var p = l.clientHeight(); | |
var q = k(this.el).height; | |
this.threshold = p / q - 0.2; | |
if (this.threshold > 1) { | |
this.threshold = 1 | |
} | |
this.replayTrigger = h(".mediaObject-replay", this.el.parentNode); | |
this.endframe = h(".mediaObject-endframe", this.el); | |
if (this.replayTrigger && !this.mediaObj.isDestroyed && !c.TOUCH) { | |
f(this.replayTrigger, "click", this._onClicked.bind(this)); | |
f(this.endframe, "transitionend", this._playMediaObject.bind(this)); | |
this.mediaObj.on("ended", this._onEnded.bind(this)) | |
} | |
}; | |
j._onTrackingScroll = function() { | |
if (this.trackedElement && this.trackedElement.percentInView >= this.threshold && !this.mediaObj.isDestroyed) { | |
if (!this.mediaObj.getEnhanced()) { | |
return | |
} | |
this.mediaObj.play(); | |
l.off("scroll", this._boundOnTrackingScroll); | |
this.trackedElement = null; | |
this.alreadyPlayed = true | |
} | |
}; | |
j._onClicked = function(p) { | |
this.triggerClicked = true; | |
if (!this.mediaObj.isDestroyed) { | |
o.remove(this.el, "mediaObject-ended"); | |
this.mediaObj.reset(); | |
p.preventDefault() | |
} | |
}; | |
j._playMediaObject = function(p) { | |
if (this.triggerClicked) { | |
this.mediaObj.play() | |
} | |
this.triggerClicked = false | |
}; | |
j._onEnded = function(p) { | |
o.add(this.replayTrigger, "active") | |
}; | |
j._onEnhanced = function() { | |
m._onEnhanced.call(this); | |
if (this.trackedElement.percentInView >= this.threshold) { | |
this.mediaObj.play(); | |
this.alreadyPlayed = true | |
} | |
}; | |
j.onMediaObjectEnterView = function(p) { | |
if (!this.alreadyPlayed && !this.mediaObj.isDestroyed) { | |
if (!this.mediaObj.getEnhanced()) { | |
return | |
} | |
if (this.trackedElement.percentInView < this.threshold) { | |
l.on("scroll", this._boundOnTrackingScroll) | |
} else { | |
this.mediaObj.play(); | |
this.alreadyPlayed = true | |
} | |
} | |
}; | |
j.onMediaObjectExitView = function(p) { | |
m.onMediaObjectExitView.call(this); | |
if (!this.mediaObj.isDestroyed && this.alreadyPlayed) { | |
this.mediaObj.goToPercent(1) | |
} | |
}; | |
b.exports = n | |
}, { | |
"../../model/EnabledFeatures": 634, | |
"./BasicDecorator": 630, | |
"ac-classlist": 12, | |
"ac-dom-events": 39, | |
"ac-dom-metrics": 62, | |
"ac-dom-traversal": 111, | |
"ac-viewport": 615 | |
}], | |
633: [function(b, c, a) { | |
c.exports = { | |
PAGE_TYPE: "data-page-type", | |
SECTION_TYPE: "data-section-type", | |
JUMP_SECTION_NAME: "data-page-jump-name" | |
} | |
}, {}], | |
634: [function(c, d, b) { | |
var a = c("ac-feature"); | |
var f = c("ac-browser"); | |
d.exports = { | |
TOUCH: undefined, | |
CSS_FILTER: undefined, | |
CSS_ANIMATION: undefined, | |
SVG: undefined, | |
VIDEO: undefined, | |
CSS_OBJECT_FIT: undefined, | |
POSITION_FIXED: undefined, | |
PAGE_JUMP: undefined, | |
IS_IOS7: undefined, | |
WEB_GL: undefined, | |
IS_DESKTOP: undefined, | |
IS_HANDHELD: undefined, | |
IS_RETINA: undefined, | |
IS_TABLET: undefined, | |
IS_IE: undefined, | |
IS_FIREFOX: undefined, | |
IS_IOS: undefined, | |
IS_CHROME: undefined, | |
IS_ANDROID: undefined, | |
init: function() { | |
var g = document.getElementsByTagName("html")[0]; | |
this.TOUCH = g.classList.contains("touch"); | |
this.CSS_FILTER = g.classList.contains("cssFilter"); | |
this.CSS_ANIMATION = g.classList.contains("cssAnimation"); | |
this.SVG = g.classList.contains("svg"); | |
this.VIDEO = g.classList.contains("video"); | |
this.CSS_OBJECT_FIT = g.classList.contains("cssObjectFit"); | |
this.POSITION_FIXED = g.classList.contains("positionFixed"); | |
this.PAGE_JUMP = g.classList.contains("pageJump"); | |
this.IS_IOS7 = g.classList.contains("ios7"); | |
this.IS_IOS = g.classList.contains("ios"); | |
this.WEB_GL = this.webGLAvailable(); | |
this.IS_DESKTOP = a.isDesktop(); | |
this.IS_HANDHELD = a.isHandheld(); | |
this.IS_RETINA = a.isRetina(); | |
this.IS_TABLET = a.isTablet(); | |
this.IS_IE = f.name.toLowerCase() === "ie"; | |
this.IS_FIREFOX = f.name.toLowerCase() === "firefox"; | |
this.IS_CHROME = f.name.toLowerCase() === "chrome"; | |
this.IS_ANDROID = f.os.toLowerCase() === "android" | |
}, | |
webGLAvailable: function() { | |
var g = f.lowerCaseUserAgent, | |
k = f.os.toLowerCase(), | |
m = "8f191", | |
l = "9b176", | |
j = g.match(m), | |
h = g.match(l); | |
if (k === "ios" && (j && j.length > -1) || (h && h.length > -1)) { | |
return false | |
} | |
return a.webGLAvailable() | |
} | |
} | |
}, { | |
"ac-browser": 1, | |
"ac-feature": 230 | |
}], | |
635: [function(b, c, a) { | |
c.exports = { | |
overview: b("../pages/overview/OverviewPage"), | |
threedtouch: b("../BasePage"), | |
design: b("../BasePage"), | |
cameras: b("../BasePage"), | |
photos: b("../BasePage"), | |
technology: b("../BasePage"), | |
ios: b("../BasePage"), | |
specs: b("../BasePage"), | |
accessories: b("../BasePage"), | |
films: b("../BasePage") | |
} | |
}, { | |
"../BasePage": 618, | |
"../pages/overview/OverviewPage": 650 | |
}], | |
636: [function(b, c, a) { | |
c.exports = { | |
BaseSection: b("../sharedsections/BaseSection"), | |
ScrollAnimationSection: b("../sharedsections/ScrollAnimationSection"), | |
VideoGallerySection: b("../sharedsections/VideoGallerySection"), | |
BasicGallerySection: b("../sharedsections/BasicGallerySection"), | |
AnimatedGallerySection: b("../sharedsections/AnimatedGallerySection"), | |
MediaObjectSection: b("../sharedsections/MediaObjectSection"), | |
ColorPickerGallerySection: b("../sharedsections/ColorPickerGallerySection"), | |
EngagementAnimationSection: b("../sharedsections/EngagementAnimationSection"), | |
PanoramaSection: b("../sharedsections/PanoramaSection"), | |
FadeInHeroSection: b("../sharedsections/FadeInHeroSection"), | |
OverviewHeroSection: b("../pages/overview/OverviewHeroSection"), | |
GalleryOnSmallSection: b("../pages/3dTouch/GalleryOnSmallSection"), | |
DesignSeamlessSection: b("../pages/design/DesignSeamlessSection"), | |
PinAndScaleSection: b("../pages/technology/PinAndScaleSection"), | |
ThreeDTouchSection: b("../pages/technology/ThreeDTouchSection") | |
} | |
}, { | |
"../pages/3dTouch/GalleryOnSmallSection": 637, | |
"../pages/design/DesignSeamlessSection": 638, | |
"../pages/overview/OverviewHeroSection": 648, | |
"../pages/technology/PinAndScaleSection": 668, | |
"../pages/technology/ThreeDTouchSection": 669, | |
"../sharedsections/AnimatedGallerySection": 675, | |
"../sharedsections/BaseSection": 676, | |
"../sharedsections/BasicGallerySection": 677, | |
"../sharedsections/ColorPickerGallerySection": 678, | |
"../sharedsections/EngagementAnimationSection": 679, | |
"../sharedsections/FadeInHeroSection": 680, | |
"../sharedsections/MediaObjectSection": 681, | |
"../sharedsections/PanoramaSection": 682, | |
"../sharedsections/ScrollAnimationSection": 684, | |
"../sharedsections/VideoGallerySection": 685 | |
}], | |
637: [function(f, c, j) { | |
f("ac-polyfills/Object/create"); | |
var h = f("../../sharedsections/BasicGallerySection"); | |
var a = f("ac-dom-metrics"); | |
var n = f("ac-dom-nodes"); | |
var b = f("ac-dom-traversal").querySelectorAll; | |
var k = f("ac-dom-traversal").querySelector; | |
var g = f("ac-dom-traversal").nextSibling; | |
var q = f("../../utils/BrowserPrefixed"); | |
var s = f("ac-classlist"); | |
var p = f("ac-viewport").Viewport; | |
var d = f("ac-gallery").SlideGallery; | |
var o = f("../../sharedsections/BaseSection"); | |
var r = o.prototype; | |
function m(v, u, t) { | |
this.name = "GalleryOnSmallSection"; | |
o.call(this, v, u, t); | |
this.currentBreakpoint = p.getBreakpoint().name; | |
if (this.currentBreakpoint === "small") { | |
this._initGalleries() | |
} | |
} | |
var l = m.prototype = Object.create(o.prototype); | |
m.prototype.constructor = m; | |
l._initGalleries = function() { | |
var t = b(".ac-gallery", this.element); | |
this._galleries = []; | |
t.forEach(function(u, v) { | |
this._galleries[v] = this._createGallery(u, v) | |
}.bind(this)); | |
this.setupGalleryEvents() | |
}; | |
l._createGallery = function(D, w) { | |
var C = D.id; | |
var y = document.getElementById(C); | |
var x = Array.prototype.slice.call(b(".ac-gallery-content", D)); | |
var B = C + "-trigger"; | |
var A = b(".dotnav", D); | |
var u = s.contains(D, "ac-gallery-has-dotnav"); | |
var t = b(".paddlenav", D); | |
var z = s.contains(D, "ac-gallery-has-paddlenav"); | |
if (!A[0] && u) { | |
this._setupDotnav(D, x, C, B) | |
} | |
if (!t[0] && z) { | |
this._setupPaddlenav(D, C, B) | |
} | |
x.forEach(function(E, F) { | |
if (F === 0) { | |
s.add(E, "current") | |
} else { | |
s.remove(E, "current") | |
} | |
}); | |
var v = d.extend({ | |
drawResize: function(E, G, F) { | |
this._clip = null; | |
if (!this.currentBreakpoint === "small") { | |
this.drawSnap(E, G, F) | |
} | |
}, | |
destroy: function() { | |
this.trigger("destroy"); | |
this.removeStyles(); | |
this._bounceInClip = null; | |
this._bounceOutClip = null; | |
this._clip = null | |
} | |
}); | |
return v.create({ | |
el: y, | |
id: C, | |
slideEl: document.getElementById(C + "-slides"), | |
easing: "cubic-bezier(.35,.01,.34,1)", | |
model: x, | |
triggerSelector: "." + B, | |
duration: 0.6, | |
pointer: { | |
mouse: true, | |
touch: true | |
} | |
}) | |
}; | |
l._setupDotnav = function(t, x, w, z) { | |
var y = document.createElement("nav"), | |
v = document.createElement("ul"); | |
var u = this; | |
x.forEach(function(B, A) { | |
v.innerHTML += '<li><a href="#' + w + "/show/" + B.id + '" class="dotnav-item ' + z + '">Item ' + (A + 1) + "</a></li>" | |
}); | |
y.className = "dotnav"; | |
y.setAttribute("aria-hidden", true); | |
n.insertFirstChild(v, y); | |
n.insertAfter(y, t) | |
}; | |
l._setupPaddlenav = function(t, u, w) { | |
var v = document.createElement("nav"); | |
v.innerHTML += '<a class="paddlenav-arrow paddlenav-arrow-left ' + w + '" href="#' + u + '/previous"></a>'; | |
v.innerHTML += '<a class="paddlenav-arrow paddlenav-arrow-right ' + w + '" href="#' + u + '/next"></a>'; | |
v.className = "paddlenav"; | |
n.insertLastChild(v, t) | |
}; | |
l._destroyGalleries = function() { | |
if (this._galleries) { | |
this._galleries.forEach(function(t, u) { | |
t.destroy(); | |
var w = g(t.el, ".dotnav"); | |
n.remove(w); | |
var v = Array.prototype.slice.call(b(".ac-gallery-content", t.el)); | |
v.forEach(function(x, y) { | |
s.add(x, "current") | |
}) | |
}.bind(this)) | |
} | |
this.teardownGalleryEvents() | |
}; | |
l._willShowSlide = function(t) { | |
if (t.outgoing) { | |
var v = t.outgoing.id, | |
x = k('[data-slide-link="' + v + '"]'), | |
u = t.incoming.id, | |
w = k('[data-slide-link="' + u + '"]'); | |
s.remove(document.getElementById(v), "current"); | |
s.add(document.getElementById(u), "current"); | |
if (x && w) { | |
s.remove(x, "current"); | |
s.add(k('[data-slide-link="' + u + '"]'), "current") | |
} | |
} | |
}; | |
l._didShowSlide = function(t) {}; | |
l.setupGalleryEvents = function() { | |
this._boundFunctions = { | |
_boundRaf: this.onRequestAnimationFrame.bind(this), | |
_willShowSlide: this._willShowSlide.bind(this), | |
_didShowSlide: this._didShowSlide.bind(this) | |
}; | |
if (this._galleries) { | |
this._galleries.forEach(function(t, u) { | |
t.on("willShow", this._boundFunctions._willShowSlide); | |
t.on("didShow", this._boundFunctions._didShowSlide) | |
}.bind(this)) | |
} | |
}; | |
l.teardownGalleryEvents = function() { | |
if (this._galleries) { | |
this._galleries.forEach(function(t, u) { | |
t.off() | |
}.bind(this)) | |
} | |
}; | |
l.activate = function() { | |
r.activate.call(this) | |
}; | |
l.deactivate = function() { | |
r.deactivate.call(this) | |
}; | |
l.onBreakpoint = function(v, w, u, t) { | |
this.currentBreakpoint = v.name; | |
if (v.name === "xlarge" || w.name === "xlarge") { | |
return | |
} | |
if (this.currentBreakpoint === "small") { | |
this._initGalleries() | |
} else { | |
this._destroyGalleries() | |
} | |
}; | |
l.destroy = function() { | |
r.destroy.call(this) | |
}; | |
c.exports = m | |
}, { | |
"../../sharedsections/BaseSection": 676, | |
"../../sharedsections/BasicGallerySection": 677, | |
"../../utils/BrowserPrefixed": 686, | |
"ac-classlist": 12, | |
"ac-dom-metrics": 62, | |
"ac-dom-nodes": 74, | |
"ac-dom-traversal": 111, | |
"ac-gallery": 320, | |
"ac-polyfills/Object/create": 394, | |
"ac-viewport": 615 | |
}], | |
638: [function(f, c, h) { | |
var l = f("../../sharedsections/ParallaxWebGLSection"); | |
var n = l.prototype; | |
var o = f("./DesignWebGLEffects"); | |
var j = f("ac-dom-traversal/querySelector"); | |
var g = f("ac-object"); | |
var d = f("../../model/EnabledFeatures"); | |
var m = f("ac-viewport").Viewport; | |
var b = f("../../utils/animationCapable"); | |
function a(r, q, p) { | |
this.name = "DesignSeamlessSection - " + (r.querySelector("h1") || r.querySelector("h2")).innerText; | |
l.call(this, r, q, p); | |
if (!b) { | |
return | |
} | |
this._webGLReady = false; | |
this._initializeTargets(); | |
if (d.WEB_GL) { | |
this.initializeWebGL() | |
} | |
this.setAnimationKeys(); | |
this.on("animation-reinit", this.setAnimationKeys.bind(this)) | |
} | |
var k = a.prototype = g.create(l.prototype); | |
k._initializeTargets = function() { | |
this.animationContainers = { | |
silver: j(".medium-show .image-finish-silver .device-container", this.element), | |
spacegray: j(".medium-show .image-finish-spacegray .device-container", this.element), | |
gold: j(".medium-show .image-finish-gold .device-container", this.element), | |
rosegold: j(".medium-show .image-finish-rosegold .device-container", this.element) | |
}; | |
this.animationContainersSmall = { | |
silver: j(".small-show .image-finish-silver .device-container", this.element), | |
spacegray: j(".small-show .image-finish-spacegray .device-container", this.element), | |
gold: j(".small-show .image-finish-gold .device-container", this.element), | |
rosegold: j(".small-show .image-finish-rosegold .device-container", this.element) | |
}; | |
this.setAnimationKeys(); | |
this.effectsObj = o | |
}; | |
k.setAnimationKeys = function() { | |
var p, q = this.scrollAnimations[0]; | |
if (this.scrollAnimations.length > 1) { | |
p = { | |
silver: this.scrollAnimations[1].animations[0], | |
spacegray: this.scrollAnimations[0].animations[1], | |
gold: this.scrollAnimations[1].animations[1], | |
rosegold: this.scrollAnimations[0].animations[0] | |
} | |
} else { | |
p = { | |
silver: this.scrollAnimations[0].animations[0], | |
spacegray: this.scrollAnimations[0].animations[1], | |
gold: this.scrollAnimations[0].animations[2], | |
rosegold: this.scrollAnimations[0].animations[3] | |
} | |
} | |
this.animationKeys = p | |
}; | |
k.initializeWebGL = function() { | |
this.webGLEffects = []; | |
var p = document.querySelector("[data-webgl-location]"); | |
var r = document.createElement("script"); | |
r.src = p.getAttribute("data-webgl-location"); | |
document.body.appendChild(r); | |
if (!!window.THREE || !!window.WAGNER) { | |
this._onWebGLReady(); | |
return | |
} | |
var q = setInterval(function() { | |
if (!!window.THREE || !!window.WAGNER) { | |
clearInterval(q); | |
this._onWebGLReady() | |
} | |
}.bind(this), 200) | |
}; | |
k._onWebGLReady = function() { | |
if (this._didCallThreeReady) { | |
return | |
} | |
this._didCallThreeReady = true; | |
this._initializeWebGLForDeviceGroup({ | |
small: false | |
}); | |
this._initializeWebGLForDeviceGroup({ | |
small: true | |
}); | |
this._webGLReady = true | |
}; | |
k._initializeWebGLForDeviceGroup = function(t) { | |
t = t || {}; | |
var q = this.animationContainers; | |
if (t.small) { | |
q = this.animationContainersSmall | |
} | |
var u, r, p, s, v; | |
for (u in this.effectsObj) { | |
if (this.effectsObj.hasOwnProperty(u)) { | |
r = this.effectsObj[u]; | |
p = r.length; | |
for (s = 0; s < p; s++) { | |
if (!this.webGLEffects[u]) { | |
this.webGLEffects[u] = [] | |
} | |
v = new r[s](this, { | |
subpath: "design", | |
small: t.small | |
}); | |
v.initialize(); | |
q[u].appendChild(v.el); | |
this.webGLEffects[u].push(v); | |
setTimeout(function(w) { | |
w.setSize() | |
}.bind(this, v), 0) | |
} | |
} | |
} | |
}; | |
k.activate = function() { | |
n.activate.call(this) | |
}; | |
k.deactivate = function() { | |
n.deactivate.call(this) | |
}; | |
k.animateIn = function() { | |
n.animateIn.call(this) | |
}; | |
k.onRequestAnimationFrame = function() { | |
n.onRequestAnimationFrame.call(this); | |
if (!b) { | |
return | |
} | |
if (this.distanceCalculator) { | |
this.distanceCalculator.calculate() | |
} | |
if (this._webGLReady) { | |
var r, q, p; | |
for (r in this.webGLEffects) { | |
if (this.webGLEffects.hasOwnProperty(r)) { | |
p = this.webGLEffects[r].length; | |
for (q = 0; q < p; q++) { | |
this.webGLEffects[r][q].drawScene() | |
} | |
} | |
} | |
} | |
}; | |
k.onScroll = function(r, q, p) { | |
n.onScroll.call(this, r, q, p) | |
}; | |
k.onResize = function(r, q, p) { | |
n.onResize.call(this, r, q, p) | |
}; | |
k.onViewWillAppear = function(q, p) { | |
n.onViewWillAppear.call(this, q, p) | |
}; | |
k.onViewWillDisappear = function(q, p) { | |
n.onViewWillDisappear.call(this, q, p) | |
}; | |
k.destroy = function() { | |
n.destroy.call(this) | |
}; | |
c.exports = a | |
}, { | |
"../../model/EnabledFeatures": 634, | |
"../../sharedsections/ParallaxWebGLSection": 683, | |
"../../utils/animationCapable": 687, | |
"./DesignWebGLEffects": 639, | |
"ac-dom-traversal/querySelector": 120, | |
"ac-object": 380, | |
"ac-viewport": 615 | |
}], | |
639: [function(b, c, a) { | |
var g = b("./webgl/shadow-passes/RoseGoldShadowPass"), | |
d = b("./webgl/shadow-passes/SilverShadowPass"), | |
h = b("./webgl/shadow-passes/GoldShadowPass"), | |
f = b("./webgl/shadow-passes/SpaceGrayShadowPass"); | |
c.exports = { | |
silver: [d], | |
spacegray: [f], | |
gold: [h], | |
rosegold: [g] | |
} | |
}, { | |
"./webgl/shadow-passes/GoldShadowPass": 640, | |
"./webgl/shadow-passes/RoseGoldShadowPass": 641, | |
"./webgl/shadow-passes/SilverShadowPass": 642, | |
"./webgl/shadow-passes/SpaceGrayShadowPass": 643 | |
}], | |
640: [function(c, b, f) { | |
var j = c("../../../../webgl/types/ShadowPassPlayer"), | |
m = c("../../../../webgl/shaders/shaders.json"), | |
l = c("ac-viewport").Viewport, | |
d = c("ac-object"); | |
var g; | |
var a = { | |
large: { | |
width: 271, | |
height: 1069 | |
}, | |
medium: { | |
width: 156, | |
height: 615 | |
}, | |
small: { | |
width: 357, | |
height: 331 | |
} | |
}; | |
var k = {}; | |
var h = function(p, o) { | |
this.context = p; | |
this.renderSmall = o.small || false; | |
this.setBreakpointName(); | |
this.setDimensions(); | |
j.call(this, p, { | |
width: this.dimensions.width, | |
height: this.dimensions.height, | |
className: "gold-shadow-pass", | |
subpath: o.subpath | |
}); | |
this.settings = { | |
scrollStart: 0.6, | |
scrollEnd: 1, | |
scrollXStart: 0.001, | |
scrollYStart: -1.3, | |
dropOffX: 0, | |
dropOffY: 0, | |
scrollDistanceX: -0.0101, | |
scrollDistanceY: 0.7, | |
distanceX: 1, | |
distanceY: 1, | |
rotate: 0, | |
bloom: 1, | |
feather: 1, | |
distanceBloom: 0, | |
distanceFeather: 0, | |
invert: false | |
}; | |
this.settings.rotate = this.settings.rotate * Math.PI / 180; | |
this.updateSettings(); | |
var n = this.getImageTextureUniforms(); | |
n.maskCenter = { | |
type: "v3", | |
value: new THREE.Vector3() | |
}; | |
n.showPasses = { | |
type: "f", | |
value: 0 | |
}; | |
n.bloom = { | |
type: "f", | |
value: this.settings.bloom | |
}; | |
n.feather = { | |
type: "f", | |
value: this.settings.feather | |
}; | |
n.distanceX = { | |
type: "f", | |
value: this.settings.distanceX | |
}; | |
n.distanceY = { | |
type: "f", | |
value: this.settings.distanceY | |
}; | |
n.dropOffX = { | |
type: "f", | |
value: this.settings.dropOffX | |
}; | |
n.dropOffY = { | |
type: "f", | |
value: this.settings.dropOffY | |
}; | |
n.rotate = { | |
type: "f", | |
value: this.settings.rotate | |
}; | |
n.shadowMap.value.magFilter = n.shadowMap.value.minFilter = THREE.LinearFilter; | |
this.meshOptions = { | |
width: this.options.width, | |
height: this.options.height, | |
uniforms: n, | |
vertexShader: m.vertex, | |
fragmentShader: m["shadow-pass"] | |
}; | |
l.on("breakpoint", this.onBreakpoint.bind(this)) | |
}; | |
g = h.prototype = d.create(j.prototype); | |
g.cameraOptions = { | |
nearClip: 1, | |
farClip: 5000, | |
fov: 45 | |
}; | |
g.getImageTextureUniforms = function() { | |
var n = { | |
extension: "jpg" | |
}; | |
return this.getTextureUniforms({ | |
shadowMap: this.getAssetURL("hero_gold_s", n) | |
}) | |
}; | |
g.setBreakpointName = function() { | |
this.breakpointName = l.getBreakpoint().name; | |
if (this.breakpointName === "xlarge") { | |
this.breakpointName = "large" | |
} | |
}; | |
g.setDimensions = function() { | |
var n = this.breakpointName, | |
o = a[n]; | |
this.dimensions = { | |
width: o.width, | |
height: o.height, | |
left: -o.width / 2, | |
top: -o.height / 2 | |
} | |
}; | |
g.updateSettings = function() { | |
this.setBreakpointName(); | |
var n = this.breakpointName; | |
var o; | |
for (o in k[n]) { | |
if (k[n].hasOwnProperty(o)) { | |
this.settings[o] = k[n][o] | |
} | |
} | |
}; | |
g.render = function() { | |
if (this.breakpointName === "small") { | |
if (this.renderSmall) { | |
this._shouldUpdate = true; | |
this._renderSmall(); | |
return | |
} | |
this._shouldUpdate = false; | |
return | |
} | |
this._shouldUpdate = false | |
}; | |
g._renderSmall = function() { | |
var p = this.context.animationKeys.gold.progress; | |
var q = this.settings.scrollStart, | |
o = this.settings.scrollEnd; | |
if (p < q) { | |
p = q | |
} else { | |
if (p > o) { | |
p = o | |
} | |
} | |
p = (p - q) / (o - q); | |
if (this.settings.invert) { | |
p = 1 - p | |
} | |
var n = this.settings.scrollXStart + (p * this.settings.scrollDistanceX); | |
var s = this.settings.scrollYStart + (p * this.settings.scrollDistanceY); | |
var r = this.settings.bloom + (p * this.settings.distanceBloom); | |
this.setMaskCenter(n, s); | |
this.setBloom(r) | |
}; | |
g.onBreakpoint = function() { | |
this.setBreakpointName(); | |
this.updateSettings(); | |
this.setDimensions(); | |
this.resizeTo(this.dimensions.width, this.dimensions.height) | |
}; | |
g.setMaskCenter = function(n, o) { | |
this.material.uniforms.maskCenter.value.x = n; | |
this.material.uniforms.maskCenter.value.y = o | |
}; | |
g.setBloom = function(n) { | |
this.material.uniforms.bloom.value = n | |
}; | |
g.setFeather = function(n) { | |
this.material.uniforms.feather.value = n | |
}; | |
b.exports = h | |
}, { | |
"../../../../webgl/shaders/shaders.json": 691, | |
"../../../../webgl/types/ShadowPassPlayer": 695, | |
"ac-object": 380, | |
"ac-viewport": 615 | |
}], | |
641: [function(d, b, g) { | |
var j = d("../../../../webgl/types/ShadowPassPlayer"), | |
m = d("../../../../webgl/shaders/shaders.json"), | |
l = d("ac-viewport").Viewport, | |
f = d("ac-object"); | |
var h; | |
var a = { | |
large: { | |
width: 825, | |
height: 741 | |
}, | |
medium: { | |
width: 474, | |
height: 425 | |
}, | |
small: { | |
width: 308, | |
height: 380 | |
} | |
}; | |
var k = {}; | |
var c = function(p, o) { | |
this.context = p; | |
this.renderSmall = o.small || false; | |
this.setBreakpointName(); | |
this.setDimensions(); | |
j.call(this, p, { | |
width: this.dimensions.width, | |
height: this.dimensions.height, | |
className: "rosegold-shadow-pass", | |
subpath: o.subpath | |
}); | |
this.settings = { | |
scrollStart: 0.7, | |
scrollEnd: 1, | |
scrollXStart: 0.001, | |
scrollYStart: -1.3, | |
dropOffX: 0, | |
dropOffY: 0, | |
scrollDistanceX: -0.0101, | |
scrollDistanceY: 0.7, | |
distanceX: 1, | |
distanceY: 1, | |
rotate: 0, | |
bloom: 1, | |
feather: 1, | |
distanceBloom: 0, | |
distanceFeather: 0, | |
invert: false | |
}; | |
this.settings.rotate = this.settings.rotate * Math.PI / 180; | |
this.updateSettings(); | |
var n = this.getImageTextureUniforms(); | |
n.maskCenter = { | |
type: "v3", | |
value: new THREE.Vector3() | |
}; | |
n.showPasses = { | |
type: "f", | |
value: 0 | |
}; | |
n.bloom = { | |
type: "f", | |
value: this.settings.bloom | |
}; | |
n.feather = { | |
type: "f", | |
value: this.settings.feather | |
}; | |
n.distanceX = { | |
type: "f", | |
value: this.settings.distanceX | |
}; | |
n.distanceY = { | |
type: "f", | |
value: this.settings.distanceY | |
}; | |
n.dropOffX = { | |
type: "f", | |
value: this.settings.dropOffX | |
}; | |
n.dropOffY = { | |
type: "f", | |
value: this.settings.dropOffY | |
}; | |
n.rotate = { | |
type: "f", | |
value: this.settings.rotate | |
}; | |
n.shadowMap.value.magFilter = n.shadowMap.value.minFilter = THREE.LinearFilter; | |
this.meshOptions = { | |
width: this.options.width, | |
height: this.options.height, | |
uniforms: n, | |
vertexShader: m.vertex, | |
fragmentShader: m["shadow-pass"] | |
}; | |
l.on("breakpoint", this.onBreakpoint.bind(this)) | |
}; | |
h = c.prototype = f.create(j.prototype); | |
h.cameraOptions = { | |
nearClip: 1, | |
farClip: 5000, | |
fov: 45 | |
}; | |
h.getImageTextureUniforms = function() { | |
var n = { | |
extension: "jpg" | |
}; | |
return this.getTextureUniforms({ | |
shadowMap: this.getAssetURL("hero_rosegold_s", n) | |
}) | |
}; | |
h.setBreakpointName = function() { | |
this.breakpointName = l.getBreakpoint().name; | |
if (this.breakpointName === "xlarge") { | |
this.breakpointName = "large" | |
} | |
}; | |
h.setDimensions = function() { | |
var n = this.breakpointName, | |
o = a[n]; | |
this.dimensions = { | |
width: o.width, | |
height: o.height, | |
left: -o.width / 2, | |
top: -o.height / 2 | |
} | |
}; | |
h.updateSettings = function() { | |
this.setBreakpointName(); | |
var n = this.breakpointName; | |
var o; | |
for (o in k[n]) { | |
if (k[n].hasOwnProperty(o)) { | |
this.settings[o] = k[n][o] | |
} | |
} | |
}; | |
h.render = function() { | |
if (this.breakpointName === "small") { | |
if (this.renderSmall) { | |
this._shouldUpdate = true; | |
this._renderSmall(); | |
return | |
} | |
this._shouldUpdate = false; | |
return | |
} | |
if (this.renderSmall || typeof this.context.animationKeys.rosegold !== "object") { | |
this._shouldUpdate = false; | |
return | |
} | |
this._shouldUpdate = true; | |
var p = this.context.animationKeys.rosegold.progress; | |
var q = this.settings.scrollStart, | |
o = this.settings.scrollEnd; | |
if (p < q) { | |
p = q | |
} else { | |
if (p > o) { | |
p = o | |
} | |
} | |
p = (p - q) / (o - q); | |
if (this.settings.invert) { | |
p = 1 - p | |
} | |
var n = this.settings.scrollXStart + (p * this.settings.scrollDistanceX); | |
var s = this.settings.scrollYStart + (p * this.settings.scrollDistanceY); | |
var r = this.settings.bloom + (p * this.settings.distanceBloom); | |
this.setMaskCenter(n, s); | |
this.setBloom(r) | |
}; | |
h._renderSmall = function() { | |
var p = this.context.animationKeys.rosegold.progress; | |
var q = this.settings.scrollStart, | |
o = this.settings.scrollEnd; | |
if (p < q) { | |
p = q | |
} else { | |
if (p > o) { | |
p = o | |
} | |
} | |
p = (p - q) / (o - q); | |
if (this.settings.invert) { | |
p = 1 - p | |
} | |
var n = this.settings.scrollXStart + (p * this.settings.scrollDistanceX); | |
var s = this.settings.scrollYStart + (p * this.settings.scrollDistanceY); | |
var r = this.settings.bloom + (p * this.settings.distanceBloom); | |
this.setMaskCenter(n, s); | |
this.setBloom(r) | |
}; | |
h.onBreakpoint = function() { | |
this.setBreakpointName(); | |
this.updateSettings(); | |
this.setDimensions(); | |
this.resizeTo(this.dimensions.width, this.dimensions.height) | |
}; | |
h.setMaskCenter = function(n, o) { | |
this.material.uniforms.maskCenter.value.x = n; | |
this.material.uniforms.maskCenter.value.y = o | |
}; | |
h.setBloom = function(n) { | |
this.material.uniforms.bloom.value = n | |
}; | |
h.setFeather = function(n) { | |
this.material.uniforms.feather.value = n | |
}; | |
b.exports = c | |
}, { | |
"../../../../webgl/shaders/shaders.json": 691, | |
"../../../../webgl/types/ShadowPassPlayer": 695, | |
"ac-object": 380, | |
"ac-viewport": 615 | |
}], | |
642: [function(c, b, f) { | |
var h = c("../../../../webgl/types/ShadowPassPlayer"), | |
m = c("../../../../webgl/shaders/shaders.json"), | |
l = c("ac-viewport").Viewport, | |
d = c("ac-object"); | |
var g; | |
var a = { | |
large: { | |
width: 933, | |
height: 554 | |
}, | |
medium: { | |
width: 536, | |
height: 319 | |
}, | |
small: { | |
width: 308, | |
height: 371 | |
} | |
}; | |
var k = { | |
large: { | |
scrollStart: 0, | |
scrollEnd: 0.33, | |
scrollMin: -17, | |
scrollMax: 53, | |
scrollXStart: 0.9, | |
scrollYStart: 0.1, | |
scrollDistanceX: -0.47, | |
scrollDistanceY: 0, | |
rotate: 5.7246799465414, | |
invert: false | |
}, | |
medium: { | |
scrollStart: 0, | |
scrollEnd: 0.33, | |
scrollMin: -3, | |
scrollMax: 3, | |
invert: false, | |
scrollXStart: 0.98, | |
scrollYStart: 0, | |
scrollDistanceX: -0.62, | |
scrollDistanceY: 0, | |
rotate: 5.7246799465414 | |
}, | |
small: { | |
scrollStart: 0, | |
scrollEnd: 1, | |
scrollMin: 0, | |
scrollMax: 1, | |
scrollXStart: 0.67, | |
scrollYStart: 0.3, | |
scrollDistanceX: -0.47, | |
scrollDistanceY: -0.2, | |
rotate: 5.2743849995268635, | |
invert: true | |
} | |
}; | |
var j = function(p, o) { | |
this.context = p; | |
this.renderSmall = o.small || false; | |
this.setBreakpointName(); | |
this.setDimensions(); | |
h.call(this, p, { | |
width: this.dimensions.width, | |
height: this.dimensions.height, | |
className: "silver-shadow-pass", | |
subpath: o.subpath | |
}); | |
this.settings = { | |
scrollStart: 0, | |
scrollEnd: 0.33, | |
scrollXStart: 0.9, | |
scrollYStart: 0, | |
dropOffX: 0, | |
dropOffY: 0, | |
scrollDistanceX: -0.47, | |
scrollDistanceY: 0, | |
distanceX: 3.7, | |
distanceY: 0, | |
rotate: 328, | |
bloom: 1, | |
feather: 1, | |
distanceBloom: 0, | |
distanceFeather: 0, | |
invert: false | |
}; | |
this.settings.rotate = this.settings.rotate * Math.PI / 180; | |
this.updateSettings(); | |
var n = this.getImageTextureUniforms(); | |
n.maskCenter = { | |
type: "v3", | |
value: new THREE.Vector3() | |
}; | |
n.showPasses = { | |
type: "f", | |
value: 0 | |
}; | |
n.bloom = { | |
type: "f", | |
value: this.settings.bloom | |
}; | |
n.feather = { | |
type: "f", | |
value: this.settings.feather | |
}; | |
n.distanceX = { | |
type: "f", | |
value: this.settings.distanceX | |
}; | |
n.distanceY = { | |
type: "f", | |
value: this.settings.distanceY | |
}; | |
n.dropOffX = { | |
type: "f", | |
value: this.settings.dropOffX | |
}; | |
n.dropOffY = { | |
type: "f", | |
value: this.settings.dropOffY | |
}; | |
n.rotate = { | |
type: "f", | |
value: this.settings.rotate | |
}; | |
n.shadowMap.value.magFilter = n.shadowMap.value.minFilter = THREE.LinearFilter; | |
this.meshOptions = { | |
width: this.options.width, | |
height: this.options.height, | |
uniforms: n, | |
vertexShader: m.vertex, | |
fragmentShader: m["shadow-pass"] | |
}; | |
l.on("breakpoint", this.onBreakpoint.bind(this)) | |
}; | |
g = j.prototype = d.create(h.prototype); | |
g.cameraOptions = { | |
nearClip: 1, | |
farClip: 5000, | |
fov: 45 | |
}; | |
g.getImageTextureUniforms = function() { | |
var n = { | |
extension: "jpg" | |
}; | |
return this.getTextureUniforms({ | |
shadowMap: this.getAssetURL("hero_silver_s", n) | |
}) | |
}; | |
g.setBreakpointName = function() { | |
this.breakpointName = l.getBreakpoint().name; | |
if (this.breakpointName === "xlarge") { | |
this.breakpointName = "large" | |
} | |
}; | |
g.setDimensions = function() { | |
var n = this.breakpointName, | |
o = a[n]; | |
this.dimensions = { | |
width: o.width, | |
height: o.height, | |
left: -o.width / 2, | |
top: -o.height / 2 | |
} | |
}; | |
g.updateSettings = function() { | |
this.setBreakpointName(); | |
var n = this.breakpointName; | |
var o; | |
for (o in k[n]) { | |
if (k[n].hasOwnProperty(o)) { | |
this.settings[o] = k[n][o] | |
} | |
} | |
}; | |
g.render = function(q) { | |
if (this.breakpointName === "small") { | |
if (this.renderSmall) { | |
this._shouldUpdate = true; | |
this._renderSmall(); | |
return | |
} | |
this._shouldUpdate = false; | |
return | |
} | |
if (this.renderSmall || typeof this.context.animationKeys.silver !== "object" || typeof this.context.animationKeys.gold !== "object") { | |
this._shouldUpdate = false; | |
return | |
} | |
this._shouldUpdate = true; | |
var r = this.settings; | |
var z = this.context.animationKeys.gold.transY, | |
u = this.context.animationKeys.silver.transY; | |
var p = z - u; | |
var s = r.scrollMin; | |
var v = r.scrollMax; | |
var n = (v - p) / (v - s); | |
if (n < 0) { | |
n = 0 | |
} else { | |
if (n > 1) { | |
n = 1 | |
} | |
} | |
if (r.invert) { | |
n = 1 - n | |
} | |
var w = r.scrollXStart + (n * r.scrollDistanceX); | |
var t = r.scrollYStart + (n * r.scrollDistanceY); | |
var o = r.bloom + (n * r.distanceBloom); | |
this.setMaskCenter(w, t); | |
this.setRotate(this.settings.rotate); | |
this.setBloom(o) | |
}; | |
g._renderSmall = function() { | |
var r = this.settings; | |
if (typeof this.context.animationKeys.silver !== "object") { | |
return | |
} | |
var u = this.context.animationKeys.silver.progress; | |
var q = r.scrollMin; | |
var o = r.scrollMax; | |
var p = (o - u) / (o - q); | |
if (p < 0) { | |
p = 0 | |
} else { | |
if (p > 1) { | |
p = 1 | |
} | |
} | |
if (r.invert) { | |
p = 1 - p | |
} | |
var n = r.scrollXStart + (p * r.scrollDistanceX); | |
var t = r.scrollYStart + (p * r.scrollDistanceY); | |
var s = r.bloom + (p * r.distanceBloom); | |
this.setMaskCenter(n, t); | |
this.setRotate(this.settings.rotate); | |
this.setBloom(s) | |
}; | |
g.onBreakpoint = function() { | |
this.setBreakpointName(); | |
this.updateSettings(); | |
this.setDimensions(); | |
this.resizeTo(this.dimensions.width, this.dimensions.height) | |
}; | |
g.setMaskCenter = function(n, o) { | |
this.material.uniforms.maskCenter.value.x = n; | |
this.material.uniforms.maskCenter.value.y = o | |
}; | |
g.setRotate = function(n) { | |
this.material.uniforms.rotate.value = n | |
}; | |
g.setBloom = function(n) { | |
this.material.uniforms.bloom.value = n | |
}; | |
g.setFeather = function(n) { | |
this.material.uniforms.feather.value = n | |
}; | |
b.exports = j | |
}, { | |
"../../../../webgl/shaders/shaders.json": 691, | |
"../../../../webgl/types/ShadowPassPlayer": 695, | |
"ac-object": 380, | |
"ac-viewport": 615 | |
}], | |
643: [function(c, b, f) { | |
var h = c("../../../../webgl/types/ShadowPassPlayer"), | |
m = c("../../../../webgl/shaders/shaders.json"), | |
k = c("ac-viewport").Viewport, | |
d = c("ac-object"); | |
var g; | |
var a = { | |
large: { | |
width: 572, | |
height: 1081 | |
}, | |
medium: { | |
width: 329, | |
height: 621 | |
}, | |
small: { | |
width: 356, | |
height: 403 | |
} | |
}; | |
var j = { | |
large: { | |
scrollMin: -20, | |
scrollMax: 42, | |
scrollXStart: 1.4, | |
scrollYStart: -1.7, | |
scrollDistanceX: -0.57, | |
scrollDistanceY: 1, | |
distanceX: 3.3 | |
}, | |
medium: { | |
scrollMin: -25, | |
scrollMax: 50, | |
scrollXStart: 1.4, | |
scrollYStart: -1.7, | |
scrollDistanceX: -0.83, | |
scrollDistanceY: 1.3, | |
distanceX: 3.3 | |
}, | |
small: { | |
scrollMin: 0, | |
scrollMax: 10, | |
scrollXStart: 0, | |
scrollYStart: 1.2, | |
scrollDistanceX: 0.29, | |
scrollDistanceY: -1.1 | |
} | |
}; | |
var l = function(p, o) { | |
this.context = p; | |
this.renderSmall = o.small || false; | |
this.setBreakpointName(); | |
this.setDimensions(); | |
h.call(this, p, { | |
width: this.dimensions.width, | |
height: this.dimensions.height, | |
className: "spacegray-shadow-pass", | |
subpath: o.subpath | |
}); | |
this.settings = { | |
scrollStart: 0, | |
scrollEnd: 0.2, | |
scrollXStart: 1.2, | |
scrollYStart: 0.5, | |
dropOffX: 0, | |
dropOffY: 0, | |
scrollDistanceX: -1, | |
scrollDistanceY: -1.2, | |
distanceX: 3.3, | |
distanceY: 1, | |
rotate: 312.1, | |
bloom: 1.1, | |
feather: 1, | |
distanceBloom: 0, | |
distanceFeather: 0, | |
invert: false | |
}; | |
this.settings.rotate = this.settings.rotate * Math.PI / 180; | |
this.updateSettings(); | |
var n = this.getImageTextureUniforms(); | |
n.maskCenter = { | |
type: "v3", | |
value: new THREE.Vector3() | |
}; | |
n.showPasses = { | |
type: "f", | |
value: 0 | |
}; | |
n.bloom = { | |
type: "f", | |
value: this.settings.bloom | |
}; | |
n.feather = { | |
type: "f", | |
value: this.settings.feather | |
}; | |
n.distanceX = { | |
type: "f", | |
value: this.settings.distanceX | |
}; | |
n.distanceY = { | |
type: "f", | |
value: this.settings.distanceY | |
}; | |
n.dropOffX = { | |
type: "f", | |
value: this.settings.dropOffX | |
}; | |
n.dropOffY = { | |
type: "f", | |
value: this.settings.dropOffY | |
}; | |
n.rotate = { | |
type: "f", | |
value: this.settings.rotate | |
}; | |
n.shadowMap.value.magFilter = n.shadowMap.value.minFilter = THREE.LinearFilter; | |
this.meshOptions = { | |
width: this.options.width, | |
height: this.options.height, | |
uniforms: n, | |
vertexShader: m.vertex, | |
fragmentShader: m["shadow-pass"] | |
}; | |
k.on("breakpoint", this.onBreakpoint.bind(this)) | |
}; | |
g = l.prototype = d.create(h.prototype); | |
g.cameraOptions = { | |
nearClip: 1, | |
farClip: 5000, | |
fov: 45 | |
}; | |
g.getImageTextureUniforms = function() { | |
var n = { | |
extension: "jpg" | |
}; | |
return this.getTextureUniforms({ | |
shadowMap: this.getAssetURL("hero_spacegray_s", n) | |
}) | |
}; | |
g.setBreakpointName = function() { | |
this.breakpointName = k.getBreakpoint().name; | |
if (this.breakpointName === "xlarge") { | |
this.breakpointName = "large" | |
} | |
}; | |
g.setDimensions = function() { | |
var n = this.breakpointName, | |
o = a[n]; | |
this.dimensions = { | |
width: o.width, | |
height: o.height, | |
left: -o.width / 2, | |
top: -o.height / 2 | |
} | |
}; | |
g.updateSettings = function() { | |
this.setBreakpointName(); | |
var n = this.breakpointName; | |
var o; | |
for (o in j[n]) { | |
if (j[n].hasOwnProperty(o)) { | |
this.settings[o] = j[n][o] | |
} | |
} | |
}; | |
g.render = function() { | |
if (this.breakpointName === "small") { | |
if (this.renderSmall) { | |
this._shouldUpdate = true; | |
this._renderSmall(); | |
return | |
} | |
this._shouldUpdate = false; | |
return | |
} | |
if (this.renderSmall || typeof this.context.animationKeys.gold !== "object" || typeof this.context.animationKeys.spacegray !== "object") { | |
this._shouldUpdate = false; | |
return | |
} | |
this._shouldUpdate = true; | |
var r = this.settings; | |
var w = this.context.animationKeys.gold.transY, | |
q = this.context.animationKeys.spacegray.transY; | |
var p = w - q; | |
var s = r.scrollMin; | |
var u = r.scrollMax; | |
var n = (u - p) / (u - s); | |
if (n < 0) { | |
n = 0 | |
} else { | |
if (n > 1) { | |
n = 1 | |
} | |
} | |
n = 1 - n; | |
if (r.invert) { | |
n = 1 - n | |
} | |
var v = r.scrollXStart + (n * r.scrollDistanceX); | |
var t = r.scrollYStart + (n * r.scrollDistanceY); | |
var o = r.bloom + (n * r.distanceBloom); | |
this.setMaskCenter(v, t); | |
this.setBloom(o) | |
}; | |
g._renderSmall = function() { | |
var r = this.settings; | |
var v = this.context.animationKeys.rosegold.transY, | |
q = this.context.animationKeys.spacegray.transY; | |
var p = v - q; | |
var s = r.scrollMin; | |
var u = r.scrollMax; | |
var n = (u - p) / (u - s); | |
if (n < 0) { | |
n = 0 | |
} else { | |
if (n > 1) { | |
n = 1 | |
} | |
} | |
n = 1 - n; | |
if (r.invert) { | |
n = 1 - n | |
} | |
var w = r.scrollXStart + (n * r.scrollDistanceX); | |
var t = r.scrollYStart + (n * r.scrollDistanceY); | |
var o = r.bloom + (n * r.distanceBloom); | |
this.setMaskCenter(w, t); | |
this.setBloom(o) | |
}; | |
g.onBreakpoint = function() { | |
this.setBreakpointName(); | |
this.updateSettings(); | |
this.setDimensions(); | |
this.resizeTo(this.dimensions.width, this.dimensions.height) | |
}; | |
g.setMaskCenter = function(n, o) { | |
this.material.uniforms.maskCenter.value.x = n; | |
this.material.uniforms.maskCenter.value.y = o | |
}; | |
g.setBloom = function(n) { | |
this.material.uniforms.bloom.value = n | |
}; | |
g.setFeather = function(n) { | |
this.material.uniforms.feather.value = n | |
}; | |
b.exports = l | |
}, { | |
"../../../../webgl/shaders/shaders.json": 691, | |
"../../../../webgl/types/ShadowPassPlayer": 695, | |
"ac-object": 380, | |
"ac-viewport": 615 | |
}], | |
644: [function(d, f, c) { | |
var j = d("ac-event-emitter-micro").EventEmitterMicro; | |
var b = d("../../ElementDistanceCalculator"); | |
var a = d("ac-object"); | |
var h; | |
var g = function(l) { | |
b.call(this, { | |
els: l.distanceElements | |
}); | |
this.context = l; | |
this.parallaxOffsets = {}; | |
var k; | |
for (k in this.els) { | |
if (this.els.hasOwnProperty(k)) { | |
this.parallaxOffsets[k] = { | |
x: 0, | |
y: 0, | |
r: 0 | |
} | |
} | |
} | |
}; | |
h = g.prototype = a.create(b.prototype); | |
h.calculate = function() { | |
this.calculateAdditionalOffsets(); | |
b.prototype.calculate.call(this) | |
}; | |
h.calculateAdditionalOffsets = function() { | |
var n = this.els, | |
k = this.context.parallaxHandler, | |
p = this.context.introPlayer, | |
l, o; | |
var m; | |
for (m in n) { | |
if (n.hasOwnProperty(m)) { | |
if (k && k.positions[m]) { | |
l = k.positions[m].transY || 0 | |
} else { | |
l = 0 | |
} | |
if (p && p.positions[m]) { | |
o = p.positions[m].transY || 0 | |
} else { | |
o = 0 | |
} | |
this.parallaxOffsets[m].y = (l + o) || 0 | |
} | |
} | |
}; | |
f.exports = g | |
}, { | |
"../../ElementDistanceCalculator": 620, | |
"ac-event-emitter-micro": 217, | |
"ac-object": 380 | |
}], | |
645: [function(f, c, j) { | |
var k, p = f("ac-event-emitter-micro").EventEmitterMicro, | |
h = f("ac-object"), | |
o = f("./webgl/shadow-passes/SpaceGrayShadowPass"), | |
d = f("./webgl/shadow-passes/RoseGoldShadowPass"), | |
n = f("./webgl/shadow-passes/SilverShadowPass"), | |
q = f("./webgl/gradient-pass/RoseGoldLogoPass"), | |
m = f("./webgl/matcap/RoseGoldButtons"), | |
g = f("./webgl/gradient-pass/SpaceGrayLogoPass"), | |
a = f("./webgl/matcap/SpaceGrayCamera"), | |
l = f("ac-browser"); | |
var b = function(s, r) { | |
p.call(this); | |
this.context = s; | |
this.effects = r.effects; | |
this._boundStart = this._start.bind(this); | |
if (l.name.toLowerCase() === "safari") { | |
this.poolSize = Infinity | |
} | |
}; | |
k = b.prototype = h.create(p.prototype); | |
k.poolSize = 16; | |
k.timeoutDuration = 500; | |
k.delay = 0; | |
k._priority = [d, o, n, m, q, g]; | |
k._order = ["spacegray", "gold", "rosegold", "silver"]; | |
k.start = function() { | |
this._active = 0; | |
this._loaded = 0; | |
this._priorityLoaded = 0; | |
this._lastItem = 0; | |
this._total = 0; | |
this._items = []; | |
this._allowReady = false; | |
this._didTimeout = false; | |
this._didTriggerPriorityLoaded = false; | |
this._timeout = setTimeout(this._onTimeout.bind(this), this.timeoutDuration); | |
if (!this.context.webGLEffects) { | |
this.context.webGLEffects = {} | |
} | |
var s = this.effects, | |
v, u, z, A, x = this._order.length, | |
w; | |
for (v = 0; v < x; v++) { | |
z = this._order[v]; | |
if (!this.context.webGLEffects[z]) { | |
this.context.webGLEffects[z] = [] | |
} | |
w = s[z].length; | |
for (u = 0; u < w; u++) { | |
this._total++; | |
A = new s[z][u](this.context, { | |
subpath: "overview" | |
}); | |
A.once("textures-loaded", this._handleTexturesLoaded.bind(this, s[z][u], z)); | |
A.createScene(); | |
this.context.animationContainers[z].appendChild(A.el); | |
this.context.webGLEffects[z].push(A); | |
this._items.push({ | |
type: z, | |
effect: A | |
}) | |
} | |
} | |
var r = this._priority.length, | |
t = this._items.length, | |
y = -1; | |
for (v = 0; v < r; v++) { | |
for (u = 0; u < t; u++) { | |
if (this._items[u].effect instanceof this._priority[v]) { | |
y = u; | |
break | |
} | |
} | |
if (y > -1) { | |
this._items = this._moveArrayIdx(this._items, y, 0) | |
} | |
y = -1 | |
} | |
this._start(); | |
this.context._webGLReady = true | |
}; | |
k._moveArrayIdx = function(r, t, u) { | |
if (u >= r.length) { | |
var s = u - r.length; | |
while ((s--) + 1) { | |
r.push(undefined) | |
} | |
} | |
r.splice(u, 0, r.splice(t, 1)[0]); | |
return r | |
}; | |
k._start = function() { | |
var r = this.getNextEffect(); | |
if (!r) { | |
return | |
} | |
r = r.effect; | |
r.createMesh(); | |
r.scene.add(r.mesh); | |
setTimeout(function(s) { | |
s.setSize(); | |
this._start() | |
}.bind(this, r), 0) | |
}; | |
k.getNextEffect = function() { | |
if (this._active >= this.poolSize) { | |
return null | |
} | |
this._active++; | |
var r = this._lastItem; | |
this._lastItem++; | |
return this._items[r] | |
}; | |
k._handleTexturesLoaded = function(s, r) { | |
this._loaded++; | |
this._active--; | |
if (this._priority.indexOf(s) > -1) { | |
this._priorityLoaded++; | |
if (this._priorityLoaded >= this._priority.length) { | |
this._allowReady = true; | |
if (this._didTimeout && !this._didTriggerPriorityLoaded) { | |
this._didTriggerPriorityLoaded = true; | |
setTimeout(function() { | |
this.trigger("ready") | |
}.bind(this), 0); | |
return | |
} | |
} | |
} | |
if (this._loaded >= this._total) { | |
if (this._didTimeout || this._didTriggerPriorityLoaded) { | |
return | |
} | |
if (this._timeout) { | |
clearTimeout(this._timeout); | |
this._timeout = null | |
} | |
this.trigger("ready"); | |
return | |
} | |
setTimeout(this._boundStart, this.delay) | |
}; | |
k._onTimeout = function() { | |
if (this._didTimeout) { | |
return | |
} | |
this._didTimeout = true; | |
if (this._allowReady) { | |
this.trigger("ready") | |
} | |
}; | |
c.exports = b | |
}, { | |
"./webgl/gradient-pass/RoseGoldLogoPass": 657, | |
"./webgl/gradient-pass/SpaceGrayLogoPass": 658, | |
"./webgl/matcap/RoseGoldButtons": 660, | |
"./webgl/matcap/SpaceGrayCamera": 664, | |
"./webgl/shadow-passes/RoseGoldShadowPass": 665, | |
"./webgl/shadow-passes/SilverShadowPass": 666, | |
"./webgl/shadow-passes/SpaceGrayShadowPass": 667, | |
"ac-browser": 1, | |
"ac-event-emitter-micro": 217, | |
"ac-object": 380 | |
}], | |
646: [function(d, c, h) { | |
var n = d("ac-event-emitter-micro").EventEmitterMicro, | |
m = d("ac-dom-emitter").DOMEmitter, | |
g = d("ac-object"), | |
a = d("./OverviewEffectsQueue"), | |
b = d("ac-dom-traversal/querySelectorAll"), | |
l = d("ac-dom-styles/getStyle"); | |
var k; | |
var j = 1200; | |
var f = function(o) { | |
n.call(this); | |
this.context = o; | |
this.loadedCount = 0; | |
this.requiredCount = 0; | |
this._imagesLoaded = false; | |
this._webGLLoaded = false; | |
this._didTimeout = false; | |
this._boundOnMaxTimeout = this._onMaxTimeout.bind(this); | |
this._timeout = null; | |
this.imageContainers = b(".image-hero-container .device-container") | |
}; | |
k = f.prototype = g.create(n.prototype); | |
k.load = function() { | |
try { | |
var q = []; | |
if (this.context._shouldUseWebGL) { | |
this._loadWebGL() | |
} else { | |
this._webGLLoaded = true | |
} | |
if (this.context.supportsMasking) { | |
q = this.getCSSUrlsFromArr(this.imageContainers, "maskBoxImage").concat(q) | |
} | |
var p, r, o = q.length; | |
this.requiredCount = o; | |
for (r = 0; r < o; r++) { | |
p = new m(new Image()); | |
p.once("load", this._onImageLoad.bind(this, p)); | |
p.el.src = q[r] | |
} | |
this._timeout = setTimeout(this._boundOnMaxTimeout, j); | |
if (q.length === 0) { | |
this._onImageLoad() | |
} | |
} catch (s) { | |
this._onMaxTimeout() | |
} | |
}; | |
k._onMaxTimeout = function() { | |
this._didTimeout = true; | |
this.trigger("complete") | |
}; | |
k._loadWebGL = function() { | |
this.context.webGLEffects = []; | |
var o = document.querySelector("[data-webgl-location]"); | |
var q = document.createElement("script"); | |
q.src = o.getAttribute("data-webgl-location"); | |
q.async = true; | |
document.body.appendChild(q); | |
if (!!window.THREE) { | |
this._onWebGLReady(); | |
return | |
} | |
var p = setInterval(function() { | |
if (!!window.THREE) { | |
clearInterval(p); | |
this._onWebGLReady() | |
} | |
}.bind(this), 100) | |
}; | |
k._onWebGLReady = function() { | |
this.context.effectsQueue = new a(this.context, { | |
effects: this.context.effectsObj | |
}); | |
this.context.effectsQueue.once("ready", this._handleEffectsQueueReady.bind(this)); | |
this.context.effectsQueue.start() | |
}; | |
k._onImageLoad = function(o) { | |
this.loadedCount++; | |
if (this.loadedCount >= this.requiredCount) { | |
this._imagesLoaded = true; | |
if (this._webGLLoaded) { | |
if (this._timeout) { | |
clearTimeout(this._timeout); | |
this._timeout = null | |
} | |
if (!this._didTimeout) { | |
this.trigger("complete") | |
} | |
} | |
} | |
if (o) { | |
setTimeout(o.destroy.bind(o), 0) | |
} | |
}; | |
k._handleEffectsQueueReady = function() { | |
this._webGLLoaded = true; | |
if (this._imagesLoaded) { | |
if (this._timeout) { | |
clearTimeout(this._timeout); | |
this._timeout = null | |
} | |
if (!this._didTimeout) { | |
this.trigger("complete") | |
} | |
} | |
}; | |
k.getCSSUrlsFromArr = function(q, u) { | |
var p = [], | |
t, s, r, o = q.length; | |
for (s = 0; s < o; s++) { | |
t = l(q[s], u)[u]; | |
r = t.match(/\((.*?)\)/); | |
if (r && r[1]) { | |
r = r[1]; | |
r.replace(/('|")/g, ""); | |
p.push(r) | |
} | |
} | |
return p | |
}; | |
c.exports = f | |
}, { | |
"./OverviewEffectsQueue": 645, | |
"ac-dom-emitter": 35, | |
"ac-dom-styles/getStyle": 92, | |
"ac-dom-traversal/querySelectorAll": 121, | |
"ac-event-emitter-micro": 217, | |
"ac-object": 380 | |
}], | |
647: [function(b, d, a) { | |
var j = b("ac-viewport").Viewport, | |
h = b("ac-dom-styles/setStyle"), | |
g = b("ac-dom-traversal/querySelector"); | |
var f; | |
var c = function(k) { | |
this.context = k; | |
this.targets = { | |
shadow: this.context.distanceElements.shadow, | |
introContent: g(".section-intro-content"), | |
heroContentContainer: g(".hero-content-container"), | |
paddingContainer: g(".hero-section-padding") | |
}; | |
j.on("resize orientationchange", this._handleResize.bind(this)); | |
this._handleResize() | |
}; | |
f = c.prototype; | |
f._handleResize = function() { | |
var k = j.clientHeight(), | |
l = k / 2; | |
h(this.targets.heroContentContainer, { | |
height: k + "px" | |
}); | |
h(this.targets.paddingContainer, { | |
height: k + "px" | |
}); | |
h(this.targets.introContent, { | |
marginTop: Math.round(-l) + "px" | |
}) | |
}; | |
d.exports = c | |
}, { | |
"ac-dom-styles/setStyle": 105, | |
"ac-dom-traversal/querySelector": 120, | |
"ac-viewport": 615 | |
}], | |
648: [function(m, c, E) { | |
var n = m("ac-console").log; | |
var D = m("../../sharedsections/BaseSection"); | |
var w = D.prototype; | |
var u = m("./OverviewWebGLEffects"); | |
var A = m("./OverviewIntroAnimationPlayer"); | |
var q = m("./OverviewSectionsLoadingQueue"); | |
var x = m("../../model/EnabledFeatures"); | |
var f = m("ac-dom-traversal/querySelector"); | |
var o = m("./OverviewParallaxHandler"); | |
var s = m("./OverviewDistancePlayer"); | |
var z = m("./OverviewShadowStyleChanger"); | |
var v = m("./OverviewVideoPlayer"); | |
var l = m("./OverviewHeroPaddingHandler"); | |
var B = m("./OverviewStatusProxy"); | |
var C = m("ac-object"); | |
var y = m("ac-viewport").Viewport; | |
var k = m("ac-browser"); | |
var h = m("ac-classlist"); | |
var j = m("ac-clock").Clock; | |
var b = m("ac-clock").ThrottledClock; | |
var a = m("ac-feature"); | |
var g = m("../../utils/animationCapable"); | |
var r = m("./OverviewFileLoader"); | |
var p = m("../../FilmsEmitterProxy"); | |
function d(H, G, F) { | |
try { | |
B.overviewSection = this; | |
this.name = "OverviewHeroSection - " + (H.querySelector("h1") || H.querySelector("h2")).innerText; | |
D.call(this, H, G, F); | |
this.scrollTop = y.scrollY(); | |
this._uiIntroTimeoutDuration = 6000; | |
this.preventGLRender = false; | |
this.introPlaying = false; | |
this.introComplete = false; | |
this._playIntro = false; | |
this._webGLReady = false; | |
this._imagesReady = false; | |
this._videosReady = false; | |
this._shouldPlayIntroMotion = false; | |
this._videoReadyEvent = null; | |
this._shouldRenderGL = false; | |
this._videoPlayerStarted = false; | |
this._animationTimeout = null; | |
this._isSafari = k.name.toLowerCase().indexOf("safari") > -1; | |
this._isDesktop = a.isDesktop(); | |
this._isIOS = k.os.toLowerCase() === "ios"; | |
this._isIOSHandheld = this._isIOS && a.isHandheld(); | |
this.initializeTargets(); | |
window.requestAnimationFrame(function() { | |
this.initializePaddingHandler() | |
}.bind(this)); | |
this._loadingInitialize() | |
} catch (I) { | |
this._onError(I) | |
} | |
} | |
var t = d.prototype = C.create(D.prototype); | |
t.introClassTarget = document.documentElement; | |
t.introClassName = "intro-active"; | |
t.introFallbackClassName = "intro-fallback"; | |
t.introUIHideClassName = "intro-ui-hide"; | |
t.introLoadClassName = "intro-load"; | |
t._isFilmAutoplay = function() { | |
if (h.contains(this.introClassTarget, "modal-open")) { | |
return true | |
} | |
return false | |
}; | |
t._canSupportWebGLHero = function() { | |
if (x.WEB_GL) { | |
if (this._isIOS && this._getMaxAnisotropy() < 3) { | |
return false | |
} | |
return true | |
} | |
return false | |
}; | |
t._loadingInitialize = function(F) { | |
F = F || {}; | |
if (!F.filmsCallback) { | |
if (!this._sectionQueueLoader) { | |
this._sectionQueueLoader = new q(this) | |
} | |
this.supportsMasking = false; | |
if (h.contains(this.introClassTarget, "mask-box-image")) { | |
this.supportsMasking = true | |
} | |
this.clock = new j(); | |
this.clock.on("draw", this.onClockDraw.bind(this)); | |
if (this._canSupportWebGLHero()) { | |
if (!this.supportsMasking) { | |
u.silver.shift() | |
} | |
this.webGLClock = new b(80); | |
this._setWebGLFPS(); | |
this.webGLClock.on("draw", this.onWebGLClockDraw.bind(this)); | |
this._shouldUseWebGL = true; | |
y.on("breakpoint", this._setWebGLFPS.bind(this)) | |
} | |
this._fileLoader = new r(this); | |
this._fileLoader.once("complete", this._handleFileLoaderReady.bind(this)); | |
this._fileLoader.load() | |
} | |
if (!this._hiddenAutoplayVideoID) { | |
var G = f("[data-offscreen-modal]"); | |
this._hiddenAutoplayVideoID = G.id | |
} | |
p.hasAutoplay = false; | |
if (!p.hasAddedAutoplay && !this._isIOSHandheld && window.location && window.location.hash && window.location.hash.indexOf(this._hiddenAutoplayVideoID) > -1) { | |
p.hasAutoplay = true; | |
p.hasAddedAutoplay = true | |
} | |
if (p.hasAutoplay) { | |
this.preventGLRender = true; | |
window.scroll(0, 0); | |
p.once("close", this._onFilmsClosed.bind(this)); | |
return | |
} | |
if (this._isSafari) { | |
setTimeout(this._onInitializationDelayComplete.bind(this), 75); | |
return | |
} | |
this._onInitializationDelayComplete() | |
}; | |
t._setWebGLFPS = function() { | |
if (!this.webGLClock) { | |
return | |
} | |
var F = y.getBreakpoint().name; | |
if ((this._isDesktop && !this._isSafari && this._getMaxAnisotropy() > 2) && (window.devicePixelRatio < 1.5 || F === "small" || F === "medium")) { | |
this.webGLClock.setFps(80); | |
return | |
} | |
this.webGLClock.setFps(45) | |
}; | |
t._getMaxAnisotropy = function() { | |
if (typeof this._maxAnisotropy === "number") { | |
return this._maxAnisotropy | |
} | |
var F = 0; | |
try { | |
var G = document.createElement("canvas"), | |
J = G.getContext("experimental-webgl"); | |
var H = (J.getExtension("EXT_texture_filter_anisotropic") || J.getExtension("MOZ_EXT_texture_filter_anisotropic") || J.getExtension("WEBKIT_EXT_texture_filter_anisotropic")); | |
if (H) { | |
F = J.getParameter(H.MAX_TEXTURE_MAX_ANISOTROPY_EXT) | |
} | |
} catch (I) {} | |
this._maxAnisotropy = F; | |
return this._maxAnisotropy | |
}; | |
t._onInitializationDelayComplete = function(F) { | |
try { | |
if (h.contains(this.introClassTarget, this.introLoadClassName)) { | |
if (this.scrollTop < 20) { | |
this._playIntro = true | |
} else { | |
this.triggerAllClassNameFallback() | |
} | |
} | |
this.videoContainers = { | |
gold: f(".image-hero-gold .device-container"), | |
silver: f(".image-hero-silver .device-container") | |
}; | |
this._boundHandleVideoPause = this._handleVideoPause.bind(this); | |
this.initializeDistancePlayer(); | |
if (!this._playIntro) { | |
this._initializeAdditionalMotion() | |
} | |
if (a.isDesktop() && h.contains(this.introClassTarget, "mp4") && h.contains(this.introClassTarget, "no-ff")) { | |
this.initializeVideoPlayer() | |
} | |
if (this._playIntro) { | |
h.add(this.introClassTarget, this.introClassName); | |
h.add(this.introClassTarget, this.introUIHideClassName); | |
this.initializePlayer(); | |
this.introPlayer.once("complete", this._handleIntroAnimationComplete.bind(this)); | |
if (this.videoPlayer) { | |
this._videoStartLoadTime = Date.now(); | |
this.videoPlayer.on("appended", this._onVideoPlayerStateChange.bind(this)); | |
this.videoPlayer.on("timeout", this._onVideoPlayerStateChange.bind(this)) | |
} else { | |
if (this._imagesReady) { | |
this._playIntroMotion() | |
} else { | |
this._shouldPlayIntroMotion = true | |
} | |
} | |
} else {} | |
if (this.isActive) { | |
this.clock.start(); | |
if (this.webGLClock) { | |
this._shouldRenderGL = true; | |
this.webGLClock.start() | |
} | |
} | |
} catch (G) { | |
this._onError(G) | |
} | |
}; | |
t._onFilmsClosed = function() { | |
h.add(this.introClassTarget, this.introClassName); | |
h.add(this.introClassTarget, this.introUIHideClassName); | |
h.add(this.introClassTarget, this.introLoadClassName); | |
h.remove(this.introClassTarget, this.introFallbackClassName); | |
if (window.introLoadTimeout) { | |
clearTimeout(window.introLoadTimeout); | |
window.introLoadTimeout = null | |
} | |
window.requestAnimationFrame(function() { | |
window.requestAnimationFrame(function() { | |
this._loadingInitialize({ | |
filmsCallback: true | |
}); | |
setTimeout(function() { | |
h.remove(this.introClassTarget, this.introUIHideClassName) | |
}.bind(this), 150) | |
}.bind(this)) | |
}.bind(this), 0); | |
setTimeout(function() { | |
this.triggerAllClassNameFallback() | |
}.bind(this), 6000) | |
}; | |
t.triggerAllClassNameFallback = function() { | |
this._removeIntroLoadClassName(); | |
this._handleIntroUIHideComplete(); | |
this._handleIntroComplete() | |
}; | |
t._handleFileLoaderReady = function() { | |
this._imagesReady = true; | |
if (this.videoPlayer) { | |
if (this._videosReady) { | |
this._playVideoIntroMotion() | |
} | |
return | |
} | |
if (this._shouldPlayIntroMotion) { | |
this._playIntroMotion() | |
} | |
}; | |
t._handleIntroAnimationComplete = function() { | |
this._handleIntroComplete(); | |
this.introComplete = true | |
}; | |
t._initializeAdditionalMotion = function() { | |
if (g) { | |
if (!this.parallaxHandler) { | |
this.initializeParallaxHandler() | |
} | |
if (!this.shadowStyleChanger) { | |
this.initializeShadowStyleChanger() | |
} | |
this.preventGLRender = false | |
} | |
}; | |
t._onVideoPlayerStateChange = function(F) { | |
if (F.key === "gold") { | |
this._videoReadyEvent = F; | |
this._videosReady = true; | |
if (this._imagesReady) { | |
this._playVideoIntroMotion() | |
} | |
} | |
}; | |
t._playIntroMotion = function() { | |
if (this.introPlaying) { | |
return | |
} | |
this.introPlaying = true; | |
this.introPlayer.once("play", function() { | |
this._removeIntroLoadClassName(); | |
this._initializeAdditionalMotion() | |
}.bind(this)); | |
setTimeout(this.introPlayer.play.bind(this.introPlayer), 0) | |
}; | |
t._playVideoIntroMotion = function() { | |
if (this.introPlaying) { | |
return | |
} | |
var F = Date.now() - this._videoStartLoadTime; | |
this.introPlaying = true; | |
this.introPlayer.once("play", function() { | |
setTimeout(function() { | |
this._initializeAdditionalMotion(); | |
if (this._videoReadyEvent.name === "appended" && this.videoPlayer.activeStatus.gold) { | |
window.requestAnimationFrame(function() { | |
this.videoPlayer.playVideo("gold"); | |
this._videoReadyEvent = null | |
}.bind(this)) | |
} | |
this.videoPlayer.on("pause", this._boundHandleVideoPause) | |
}.bind(this), 250); | |
window.requestAnimationFrame(function() { | |
this._removeIntroLoadClassName() | |
}.bind(this)) | |
}.bind(this)); | |
setTimeout(function(G) { | |
this.introPlayer.play(G) | |
}.bind(this, F), 0) | |
}; | |
t._removeIntroLoadClassName = function() { | |
if (window.introLoadTimeout) { | |
clearTimeout(window.introLoadTimeout); | |
window.introLoadTimeout = null | |
} | |
this._animationTimeout = setTimeout(this._onUIAnimationTimeoutComplete.bind(this), this._uiIntroTimeoutDuration); | |
h.remove(this.introClassTarget, this.introLoadClassName) | |
}; | |
t._onUIAnimationTimeoutComplete = function() { | |
this._handleIntroUIHideComplete(); | |
this.introComplete = true | |
}; | |
t.initializeTargets = function() { | |
this.parallaxContainers = { | |
silver: f(".image-hero-silver"), | |
spacegray: f(".image-hero-spacegray"), | |
gold: f(".image-hero-gold"), | |
rosegold: f(".image-hero-rosegold"), | |
headline: f(".hero-logo-motion-container"), | |
headline_links: f(".hero-logo-motion-container .more-links") | |
}; | |
this.animationContainers = { | |
silver: f(".image-hero-silver .device-container"), | |
spacegray: f(".image-hero-spacegray .device-container"), | |
gold: f(".image-hero-gold .device-container"), | |
rosegold: f(".image-hero-rosegold .device-container"), | |
headline: f(".hero-logo-content-container") | |
}; | |
this.distanceElements = { | |
silver: f(".image-hero-silver .device"), | |
spacegray: f(".image-hero-spacegray .device"), | |
gold: f(".image-hero-gold .device"), | |
rosegold: f(".image-hero-rosegold .device"), | |
shadow: f(".image-hero-shadow"), | |
sectiontop: f(".hero-section-top") | |
}; | |
this.effectsObj = u | |
}; | |
t.initializePaddingHandler = function() { | |
this.paddingHandler = new l(this) | |
}; | |
t.initializeVideoPlayer = function() { | |
this.videoPlayer = new v(this) | |
}; | |
t.initializeParallaxHandler = function() { | |
this.parallaxHandler = new o(this); | |
this.parallaxHandler.handleScroll() | |
}; | |
t.initializeWebGL = function() {}; | |
t.initializePlayer = function() { | |
this.introPlayer = new A(this) | |
}; | |
t.initializeDistancePlayer = function() { | |
this.distanceCalculator = new s(this) | |
}; | |
t.initializeShadowStyleChanger = function() { | |
this.shadowStyleChanger = new z(this) | |
}; | |
t._handleIntroComplete = function() { | |
this._handleIntroUIHideComplete(); | |
h.remove(this.introClassTarget, this.introClassName); | |
if (!B.ready) { | |
B.trigger("ready") | |
} | |
this.introPlaying = false | |
}; | |
t._handleIntroUIHideComplete = function() { | |
if (this._sectionQueueLoader) { | |
this._sectionQueueLoader.start() | |
} | |
}; | |
t._onWebGLReady = function() {}; | |
t._onError = function(F) { | |
this._removeIntroLoadClassName(); | |
this._handleIntroComplete(); | |
this._handleIntroUIHideComplete() | |
}; | |
t._handleVideoPause = function(F) { | |
if (F.key === "gold") { | |
this.videoPlayer.enableAutoplay[F.key] = true | |
} | |
}; | |
t.onClockDraw = function() { | |
if (this.distanceCalculator) { | |
this.distanceCalculator.calculate(); | |
if (!this.webGLClock && this.shadowStyleChanger) { | |
this.shadowStyleChanger.setProgress(); | |
this.shadowStyleChanger.render() | |
} | |
} | |
}; | |
t.onWebGLClockDraw = function() { | |
if (!this._shouldRenderGL || this.preventGLRender) { | |
return | |
} | |
if (this.distanceCalculator && this.shadowStyleChanger) { | |
this.shadowStyleChanger.setProgress(); | |
this.shadowStyleChanger.render() | |
} | |
if (this._webGLReady) { | |
var H, G, F; | |
for (H in this.webGLEffects) { | |
if (this.webGLEffects.hasOwnProperty(H)) { | |
F = this.webGLEffects[H].length; | |
for (G = 0; G < F; G++) { | |
this.webGLEffects[H][G].drawScene() | |
} | |
} | |
} | |
} | |
}; | |
t.activate = function() { | |
w.activate.call(this) | |
}; | |
t.deactivate = function() { | |
w.deactivate.call(this) | |
}; | |
t.animateIn = function() { | |
w.animateIn.call(this) | |
}; | |
t.onRequestAnimationFrame = function() { | |
w.onRequestAnimationFrame.call(this) | |
}; | |
t.onScroll = function(H, G, F) { | |
w.onScroll.call(this, H, G, F); | |
this.scrollTop = G; | |
if (this.parallaxHandler) { | |
this.parallaxHandler.handleScroll() | |
} | |
if (B.ready) { | |
return | |
} | |
if (!this._sectionScrollReadyTarget) { | |
this.setSectionScrollReadyTarget() | |
} | |
if (G >= this._sectionScrollReadyTarget) { | |
this.triggerAllClassNameFallback() | |
} | |
}; | |
t.setSectionScrollReadyTarget = function() { | |
this._sectionScrollReadyTarget = this.element.getBoundingClientRect().height / 6 | |
}; | |
t.onResize = function(H, G, F) { | |
w.onResize.call(this, H, G, F); | |
if (B.ready) { | |
return | |
} | |
this.setSectionScrollReadyTarget() | |
}; | |
t.onViewWillAppear = function(G, F) { | |
w.onViewWillAppear.call(this, G, F); | |
if (this.clock) { | |
this.clock.start() | |
} | |
if (this.webGLClock) { | |
this._shouldRenderGL = true; | |
this.webGLClock.start() | |
} | |
}; | |
t.onViewWillDisappear = function(G, F) { | |
w.onViewWillDisappear.call(this, G, F); | |
if (this.clock) { | |
this.clock.stop() | |
} | |
if (this.webGLClock) { | |
this._shouldRenderGL = false | |
} | |
if (this._sectionQueueLoader) { | |
this._sectionQueueLoader.revealAll() | |
} | |
}; | |
t.destroy = function() { | |
w.destroy.call(this) | |
}; | |
c.exports = d | |
}, { | |
"../../FilmsEmitterProxy": 621, | |
"../../model/EnabledFeatures": 634, | |
"../../sharedsections/BaseSection": 676, | |
"../../utils/animationCapable": 687, | |
"./OverviewDistancePlayer": 644, | |
"./OverviewFileLoader": 646, | |
"./OverviewHeroPaddingHandler": 647, | |
"./OverviewIntroAnimationPlayer": 649, | |
"./OverviewParallaxHandler": 651, | |
"./OverviewSectionsLoadingQueue": 652, | |
"./OverviewShadowStyleChanger": 653, | |
"./OverviewStatusProxy": 654, | |
"./OverviewVideoPlayer": 655, | |
"./OverviewWebGLEffects": 656, | |
"ac-browser": 1, | |
"ac-classlist": 12, | |
"ac-clock": 23, | |
"ac-console": 31, | |
"ac-dom-traversal/querySelector": 120, | |
"ac-feature": 230, | |
"ac-object": 380, | |
"ac-viewport": 615 | |
}], | |
649: [function(f, c, k) { | |
var r = f("ac-event-emitter-micro").EventEmitterMicro; | |
var o = f("ac-eclipse").Clip; | |
var j = f("ac-object"); | |
var q = f("ac-viewport").Viewport; | |
var m = f("../../ClipRegistry"); | |
var n = f("ac-browser"); | |
var l; | |
var h = { | |
ease: "cubic-bezier(0.350, 0.990, 0.310, 1.000)", | |
duration: 4, | |
delay: 0 | |
}; | |
var d = 0; | |
var a = 0.6; | |
var p = { | |
gold: { | |
large: { | |
translateY: function() { | |
var t = 0, | |
s = this.context.animationContainers.gold.getBoundingClientRect().height / 3; | |
return -((q.innerHeight() * 1.2) + t) + "px" | |
}, | |
translateX: function() { | |
return (q.innerWidth() * 0.2) + "px" | |
} | |
}, | |
medium: { | |
translateY: function() { | |
var t = 0, | |
s = this.context.animationContainers.gold.getBoundingClientRect().height / 3; | |
return -((q.innerHeight() * 1.2) + t) + "px" | |
}, | |
translateX: function() { | |
return (q.innerWidth() * 0.2) + "px" | |
} | |
}, | |
small: { | |
translateY: function() { | |
var t = 0, | |
s = this.context.animationContainers.gold.getBoundingClientRect().height / 3; | |
return -((q.innerHeight() * 1.2) + t) + "px" | |
}, | |
translateX: function() { | |
return (q.innerWidth() * 0.2) + "px" | |
} | |
} | |
}, | |
headline: { | |
large: { | |
translateY: "10px" | |
}, | |
medium: { | |
translateY: "10px" | |
}, | |
small: { | |
translateY: "10px" | |
} | |
} | |
}; | |
var g = { | |
els: { | |
silver: { | |
animation: { | |
transform: { | |
translateY: function() { | |
return q.innerHeight() + "px" | |
}, | |
rotate: "-15deg" | |
} | |
} | |
}, | |
gold: { | |
delay: 0, | |
duration: h.duration, | |
animation: { | |
transform: { | |
rotate: "-25deg" | |
} | |
} | |
}, | |
rosegold: { | |
duration: h.duration + 0.1, | |
animation: { | |
transform: { | |
translateY: function() { | |
return q.innerHeight() + "px" | |
}, | |
rotate: "-30deg" | |
} | |
} | |
}, | |
spacegray: { | |
duration: h.duration, | |
animation: { | |
transform: { | |
translateY: function() { | |
return -q.innerHeight() / 1.2 + "px" | |
}, | |
rotate: "-25deg" | |
} | |
} | |
}, | |
headline: { | |
delay: 0, | |
duration: h.duration, | |
animation: { | |
opacity: 0, | |
transform: {} | |
} | |
} | |
} | |
}; | |
var b = function(s) { | |
r.call(this); | |
this.context = s; | |
this.clock = this.context.clock; | |
this.animationOptions = j.clone(g); | |
this.useInlineStyles = false; | |
this.positions = {} | |
}; | |
l = b.prototype = j.create(r.prototype); | |
l.play = function(t) { | |
if (this._didPlay) { | |
return | |
} | |
this._didPlay = true; | |
if (typeof t === "number") { | |
var s = t / 1000; | |
d -= s; | |
if (d < 0) { | |
d = 0 | |
} | |
} | |
this._createClips(); | |
this._clipsComplete = 0; | |
setTimeout(function() { | |
var u = this.context.animationContainers.headline; | |
u.style.display = "none"; | |
u.offsetHeight; | |
u.style.display = ""; | |
window.requestAnimationFrame(function() { | |
this.startTime = Date.now(); | |
var w, v = this.clips.length; | |
for (w = 0; w < v; w++) { | |
this.clips[w].play() | |
} | |
this.trigger("play") | |
}.bind(this)) | |
}.bind(this), d * 1000) | |
}; | |
l.stop = function() {}; | |
l._createClips = function() { | |
this.clips = []; | |
var v = this.context.animationContainers, | |
t = this.animationOptions, | |
y = q.getBreakpoint().name; | |
if (y === "xlarge") { | |
y = "large" | |
} | |
var x, w, z, u, A, s; | |
for (x in v) { | |
if (v.hasOwnProperty(x)) { | |
this.positions[x] = {}; | |
if (p[x] && p[x][y]) { | |
for (w in p[x][y]) { | |
if (p[x][y].hasOwnProperty(w)) { | |
t.els[x].animation.transform[w] = p[x][y][w] | |
} | |
} | |
} | |
if (t.els[x].animation.transform) { | |
for (u in t.els[x].animation.transform) { | |
if (t.els[x].animation.transform.hasOwnProperty(u)) { | |
if (typeof t.els[x].animation.transform[u] === "function") { | |
t.els[x].animation.transform[u] = t.els[x].animation.transform[u].call(this) | |
} | |
} | |
} | |
} | |
if (x === "headline") { | |
z = false | |
} else { | |
z = this.useInlineStyles | |
} | |
A = { | |
ease: t.els[x].ease || h.ease, | |
delay: t.els[x].delay || h.delay, | |
propsFrom: t.els[x].animation, | |
inlineStyles: z, | |
clock: this.clock, | |
onUpdate: this._onClipUpdate.bind(this, x, t.els[x].animation), | |
onComplete: this._onClipComplete.bind(this, x), | |
removeStylesOnComplete: false | |
}; | |
if (x === "headline") { | |
A.removeStylesOnComplete = false | |
} | |
s = new o(v[x], t.els[x].duration || h.duration, null, A); | |
this.clips.push(m.add(s)) | |
} | |
} | |
}; | |
l._onClipUpdate = function(v, t, w) { | |
var s = t.transform.translateY, | |
u = w.progress; | |
if (!s) { | |
return | |
} | |
if (!this._didTriggerUIComplete && u >= a) { | |
this._onClipUIComplete() | |
} | |
this.positions[v].progress = u; | |
this.positions[v].transY = (1 - u) * parseInt(s) | |
}; | |
l._onClipUIComplete = function() { | |
if (this._didTriggerUIComplete) { | |
return | |
} | |
this._didTriggerUIComplete = true; | |
this.trigger("ui-complete") | |
}; | |
l._onClipComplete = function(s, t) { | |
this._clipsComplete++; | |
if (this.clips.length === this._clipsComplete) { | |
this.trigger("complete") | |
} | |
}; | |
c.exports = b | |
}, { | |
"../../ClipRegistry": 619, | |
"ac-browser": 1, | |
"ac-eclipse": "ac-eclipse", | |
"ac-event-emitter-micro": 217, | |
"ac-object": 380, | |
"ac-viewport": 615 | |
}], | |
650: [function(c, d, b) { | |
var h = c("../../BasePage"); | |
var a = c("ac-object"); | |
var f; | |
var g = function() { | |
h.call(this) | |
}; | |
f = g.prototype = a.create(h.prototype); | |
d.exports = g | |
}, { | |
"../../BasePage": 618, | |
"ac-object": 380 | |
}], | |
651: [function(b, a, f) { | |
var l = b("ac-event-emitter-micro").EventEmitterMicro; | |
var d = b("ac-scroll-motion-emitter").ElementScrollMotionEmitter; | |
var c = b("ac-object"); | |
var k = b("ac-viewport").Viewport; | |
var h = b("ac-dom-styles/setStyle"); | |
var g; | |
var m = { | |
silver: { | |
translateY: { | |
large: 100, | |
medium: 100, | |
small: 50 | |
}, | |
offsetBottoms: { | |
large: -1000, | |
medium: -800, | |
small: -500 | |
}, | |
rotate: -10 | |
}, | |
gold: { | |
translateY: { | |
large: -200, | |
medium: -200, | |
small: -100 | |
}, | |
rotate: 0 | |
}, | |
rosegold: { | |
translateY: { | |
large: -120, | |
medium: -120, | |
small: -60 | |
}, | |
rotate: -14 | |
}, | |
spacegray: { | |
translateY: { | |
large: -400, | |
medium: -400, | |
small: -200 | |
}, | |
rotate: 0 | |
}, | |
headline: { | |
translateY: { | |
large: 100, | |
medium: 100, | |
small: 100 | |
}, | |
rotate: 0 | |
}, | |
headline_links: { | |
opacity: 0 | |
} | |
}; | |
var j = function(n) { | |
l.call(this); | |
this.context = n; | |
this.clock = this.context.clock; | |
this.setBreakpointName(); | |
this.initializeScrollEmitters(); | |
k.on("breakpoint", this._handleBreakpointChange.bind(this)) | |
}; | |
g = j.prototype = c.create(l.prototype); | |
g.initializeScrollEmitters = function() { | |
this.emitters = {}; | |
this.positions = {}; | |
var p = this.context.parallaxContainers; | |
var o, n; | |
for (o in p) { | |
if (p.hasOwnProperty(o)) { | |
if (o !== "headline_links") { | |
this.positions[o] = {}; | |
n = { | |
smooth: true, | |
friction: 20, | |
clock: this.clock | |
}; | |
if (o === "headline") { | |
n.smooth = false | |
} | |
if (m[o].offsetTops) { | |
n.offsetTop = function(q) { | |
return m[q].offsetTops[this.breakpointName] | |
}.bind(this, o) | |
} | |
if (m[o].offsetBottoms) { | |
n.offsetBottom = function(q) { | |
return m[q].offsetBottoms[this.breakpointName] | |
}.bind(this, o) | |
} | |
this.emitters[o] = new d(this.context.element, n); | |
this.emitters[o].on("update", this._handleScrollEmitterUpdate.bind(this, o)); | |
this.emitters[o].start() | |
} | |
} | |
} | |
}; | |
g.setBreakpointName = function() { | |
this.breakpointName = k.getBreakpoint().name; | |
if (this.breakpointName === "xlarge") { | |
this.breakpointName = "large" | |
} | |
}; | |
g.handleScroll = function() { | |
var n; | |
for (n in this.emitters) { | |
if (this.emitters.hasOwnProperty(n)) { | |
this.emitters[n].handleScroll() | |
} | |
} | |
}; | |
g._handleScrollEmitterUpdate = function(q, s) { | |
var p = s.progress; | |
if (q === "rosegold") { | |
var r = 5; | |
if (this.breakpointName === "small") { | |
r = r * 5 | |
} | |
var o = (1 - p * r); | |
if (o < 0) { | |
o = 0 | |
} else { | |
if (o > 1) { | |
o = 1 | |
} | |
} | |
h(this.context.parallaxContainers.headline_links, { | |
opacity: o | |
}) | |
} | |
var t = p * m[q].translateY[this.breakpointName], | |
n = p * m[q].rotate; | |
this.positions[q].transY = t; | |
this.positions[q].rotate = n; | |
this.positions[q].progress = p; | |
h(this.context.parallaxContainers[q], { | |
transform: "translate3d(0px," + this.positions[q].transY + "px,0px) rotate(" + this.positions[q].rotate + "deg)" | |
}) | |
}; | |
g._handleBreakpointChange = function() { | |
this.setBreakpointName() | |
}; | |
a.exports = j | |
}, { | |
"ac-dom-styles/setStyle": 105, | |
"ac-event-emitter-micro": 217, | |
"ac-object": 380, | |
"ac-scroll-motion-emitter": 468, | |
"ac-viewport": 615 | |
}], | |
652: [function(f, c, g) { | |
var b = f("ac-dom-traversal/querySelectorAll"), | |
j = f("ac-viewport").Viewport, | |
a = f("ac-classlist"), | |
d = f("../../model/EnabledFeatures"); | |
var h; | |
var k = function(l) { | |
this.context = l; | |
this.imageFigures = b(".image-figure"); | |
this._documentTarget = document.documentElement; | |
this._revealCount = 0; | |
this._activeCount = 0; | |
this._revealedAll = false; | |
this._boundOnRevealed = this._onRevealed.bind(this) | |
}; | |
h = k.prototype; | |
h.revealDelay = 500; | |
h.poolSize = 2; | |
h.revealClassName = "intro-ui-hide"; | |
h.start = function() { | |
if (this._revealedAll) { | |
return | |
} | |
if (!this.context._playIntro || d.IS_TABLET) { | |
this.revealAll(); | |
return | |
} | |
var m, l = this.imageFigures.length; | |
for (m = 0; m < l; m++) { | |
a.add(this.imageFigures[m], this.revealClassName) | |
} | |
window.requestAnimationFrame(function() { | |
a.remove(this._documentTarget, this.revealClassName); | |
this._start() | |
}.bind(this)) | |
}; | |
h._start = function() { | |
var l = this.getNextImage(); | |
if (!l) { | |
return | |
} | |
a.remove(l, this.revealClassName); | |
setTimeout(this._boundOnRevealed, this.revealDelay) | |
}; | |
h._onRevealed = function() { | |
this._activeCount--; | |
if (this._revealCount >= this.imageFigures.length) { | |
this._revealedAll = true; | |
return | |
} | |
this._start() | |
}; | |
h.getNextImage = function() { | |
if (this._activeCount >= this.poolSize) { | |
return null | |
} | |
this._activeCount++; | |
var l = this.imageFigures[this._revealCount]; | |
this._revealCount++; | |
return l | |
}; | |
h.revealAll = function() { | |
a.remove(this._documentTarget, this.revealClassName); | |
var m, l = this.imageFigures.length; | |
for (m = 0; m < l; m++) { | |
a.remove(this.imageFigures[m], this.revealClassName) | |
} | |
this._revealedAll = true | |
}; | |
c.exports = k | |
}, { | |
"../../model/EnabledFeatures": 634, | |
"ac-classlist": 12, | |
"ac-dom-traversal/querySelectorAll": 121, | |
"ac-viewport": 615 | |
}], | |
653: [function(b, c, a) { | |
var j = b("ac-viewport").Viewport; | |
var f = b("ac-dom-styles/setStyle"); | |
var d; | |
var g = { | |
transform: { | |
scale: 1.1 | |
}, | |
opacity: 0.98 | |
}; | |
var h = function(k) { | |
this.context = k; | |
this.el = this.context.distanceElements.shadow; | |
this.settings = { | |
scrollStart: 0, | |
scrollEnd: 1, | |
invert: false | |
}; | |
this.setBreakpointName(); | |
j.on("breakpoint", this.setBreakpointName.bind(this)) | |
}; | |
d = h.prototype; | |
d.setProgress = function() { | |
var l = this.context.parallaxHandler.positions.silver.progress; | |
var m = this.settings.scrollStart, | |
k = this.settings.scrollEnd; | |
if (l < m) { | |
l = m | |
} else { | |
if (l > k) { | |
l = k | |
} | |
} | |
l = (l - m) / (k - m); | |
if (this.settings.invert) { | |
l = 1 - l | |
} | |
this.progress = l | |
}; | |
d.render = function() { | |
var l = this.progress * g.transform.scale, | |
k = this.progress * k; | |
f(this.el, { | |
transform: "scale3d(" + l + "," + l + ", 1)", | |
opacity: k | |
}) | |
}; | |
d.setBreakpointName = function() { | |
this.breakpointName = j.getBreakpoint().name; | |
if (this.breakpointName === "xlarge") { | |
this.breakpointName = "large" | |
} | |
}; | |
c.exports = h | |
}, { | |
"ac-dom-styles/setStyle": 105, | |
"ac-viewport": 615 | |
}], | |
654: [function(c, d, b) { | |
var h = c("ac-event-emitter-micro").EventEmitterMicro, | |
a = c("ac-object"); | |
var g; | |
var f = function() { | |
h.call(this); | |
this.ready = false; | |
this.once("ready", this._onReady.bind(this)); | |
if (!window.AC) { | |
window.AC = {} | |
} | |
window.AC.OverviewStatusProxy = this | |
}; | |
g = f.prototype = a.create(h.prototype); | |
g._onReady = function() { | |
this.ready = true | |
}; | |
d.exports = new f() | |
}, { | |
"ac-event-emitter-micro": 217, | |
"ac-object": 380 | |
}], | |
655: [function(h, c, l) { | |
var r = h("ac-event-emitter-micro").EventEmitterMicro; | |
var m = h("ac-dom-traversal/querySelector"); | |
var f = h("../../model/EnabledFeatures"); | |
var b = h("ac-classlist"); | |
var k = h("ac-object"); | |
var q = h("ac-dom-emitter").DOMEmitter; | |
var p = h("ac-viewport").Viewport; | |
var o = h("ac-cname").cname; | |
var a = h("ac-classlist"); | |
var n; | |
var j = false; | |
var s = "/105/media/us/iphone-6s/2015/dhs3b549_75f9_422a_9470_4a09e709b350/overview/hero"; | |
var g = { | |
gold: { | |
"1x": "gold_device_screen", | |
"2x": "gold_device_screen_2x" | |
}, | |
silver: { | |
"1x": "silver_device_screen", | |
"2x": "silver_device_screen_2x" | |
} | |
}; | |
var d = function(t) { | |
r.call(this); | |
this.context = t; | |
this.loaded = {}; | |
this.playOnLoads = {}; | |
this.loadingTimeouts = { | |
gold: null, | |
silver: null | |
}; | |
this.activeStatus = { | |
gold: false, | |
silver: false | |
}; | |
this.appendedStatus = { | |
gold: false, | |
silver: false | |
}; | |
this.visibilityStatus = { | |
gold: false, | |
silver: false | |
}; | |
this.timeoutTriggered = { | |
gold: false, | |
silver: false | |
}; | |
this.enableAutoplay = { | |
gold: true, | |
silver: true | |
}; | |
this.elementHeights = { | |
gold: this.getElementHeight("gold"), | |
silver: this.getElementHeight("silver") | |
}; | |
this.setBreakpointName(); | |
this.shouldPlay = { | |
gold: true, | |
silver: true | |
}; | |
this.inView = { | |
gold: false, | |
silver: false | |
}; | |
this.wasInView = { | |
gold: false, | |
silver: false | |
}; | |
this.createVideos(); | |
this.initialize(); | |
this._bindEvents(); | |
this.playVideosIfNeeded(); | |
this.context.clock.on("draw", this.playVideosIfNeeded.bind(this)) | |
}; | |
n = d.prototype = k.create(r.prototype); | |
n.activeClass = "active"; | |
n.hiddenClass = "hidden"; | |
n.loadingTimeoutDuration = 2250; | |
n.initialize = function() { | |
var t; | |
for (t in this.videos) { | |
if (this.videos.hasOwnProperty(t)) { | |
this.activateVideo(t, this.videos[t]) | |
} | |
} | |
}; | |
n._onLoadingTimeout = function(u, v) { | |
this.timeoutTriggered[u] = true; | |
var t = "timeout"; | |
this.trigger(t, { | |
key: u, | |
videoEmitter: v, | |
wrapperEl: this.wrappers[u], | |
name: t | |
}) | |
}; | |
n.appendVideoElement = function(u, v) { | |
if (!this.context.videoContainers[u]) { | |
return | |
} | |
this.context.videoContainers[u].appendChild(this.wrappers[u]); | |
this.appendedStatus[u] = true; | |
var t = "appended"; | |
this.trigger(t, { | |
key: u, | |
videoEl: v.el, | |
wrapperEl: this.wrappers[u], | |
name: t | |
}) | |
}; | |
n.getElementHeight = function(t) { | |
return this.context.parallaxContainers[t].getBoundingClientRect().height | |
}; | |
n._bindEvents = function() { | |
p.on("breakpoint", function() { | |
this.setBreakpointName(); | |
this.elementHeights = { | |
gold: this.getElementHeight("gold"), | |
silver: this.getElementHeight("silver") | |
} | |
}.bind(this)) | |
}; | |
n.playVideosIfNeeded = function() { | |
this.handleAutoplay("silver"); | |
this.handleAutoplay("gold") | |
}; | |
n.isInView = function(v) { | |
var u = 20; | |
if (this.inView[v]) { | |
u = 4 | |
} | |
var w = this.context.distanceCalculator.getWorldSpace(v).y, | |
z = this.context.scrollTop, | |
x = p.innerHeight() + z, | |
y = w - this.elementHeights[v] / u, | |
t = w + this.elementHeights[v] / u; | |
return (x >= y && z <= t) | |
}; | |
n.addActiveClass = function(t) { | |
this.activeStatus[t] = true; | |
a.add(this.videos[t].el, this.activeClass) | |
}; | |
n.removeActiveClass = function(t) { | |
this.activeStatus[t] = false; | |
a.remove(this.videos[t].el, this.activeClass) | |
}; | |
n.handleAutoplay = function(u) { | |
if (!this.enableAutoplay[u] || !this.appendedStatus[u]) { | |
return | |
} | |
var t = this.inView[u] = this.isInView(u); | |
if (u === "gold" && this.context.introPlaying) { | |
t = true | |
} | |
if (this.shouldPlay[u] && t) { | |
this.shouldPlay[u] = false; | |
if (!this.loaded[u]) { | |
this.playOnLoads[u] = true; | |
return | |
} else { | |
this.playVideo(u) | |
} | |
} else { | |
if (!this.shouldPlay[u] && !t) { | |
this._handleViewReset(u) | |
} | |
} | |
if (!t && !this.activeStatus[u]) { | |
this.addActiveClass(u) | |
} | |
if (j) { | |
if (t) { | |
this.makeVisible(u); | |
return | |
} | |
this.makeInvisible(u) | |
} | |
}; | |
n.resetAll = function() { | |
var t; | |
for (t in this.videos) { | |
if (this.videos.hasOwnProperty(t)) { | |
this._handleViewReset(t) | |
} | |
} | |
}; | |
n.makeVisible = function(t) { | |
if (this.wasInView[t]) { | |
return | |
} | |
this.wasInView[t] = true; | |
a.remove(this.videos[t].el, this.hiddenClass) | |
}; | |
n.makeInvisible = function(t) { | |
if (!this.wasInView[t]) { | |
return | |
} | |
this.wasInView[t] = false; | |
a.add(this.videos[t].el, this.hiddenClass) | |
}; | |
n.createVideos = function() { | |
var t = "1x"; | |
if (window.devicePixelRatio > 1.5) { | |
t = "2x" | |
} | |
this.videos = {}; | |
this.wrappers = {}; | |
var u, v, w; | |
for (u in g) { | |
if (g.hasOwnProperty(u)) { | |
v = document.createElement("video"); | |
v.src = o.formatUrl(s, g[u][t], ".mp4"); | |
v.className = "device-video"; | |
this.videos[u] = new q(v); | |
w = document.createElement("div"); | |
w.className = "device-video-mask"; | |
w.appendChild(v); | |
this.wrappers[u] = w | |
} | |
} | |
}; | |
n.activateVideo = function(u, v) { | |
var t = v.el; | |
v.once("canplaythrough", this._onCanPlayThrough.bind(this, u, v)); | |
v.on("pause", this._onPause.bind(this, u, v)); | |
this.loadingTimeouts[u] = setTimeout(this._onLoadingTimeout.bind(this, u, v), this.loadingTimeoutDuration); | |
t.load() | |
}; | |
n.playVideo = function(u, t) { | |
if (this.videos[u]) { | |
if (!a.contains(this.videos[u].el, this.activeClass)) { | |
a.add(this.videos[u].el, this.activeClass); | |
window.requestAnimationFrame(function() { | |
if (this.videos[u].el.paused) { | |
this.videos[u].el.play() | |
} | |
}.bind(this)) | |
} else { | |
this.videos[u].el.play() | |
} | |
} | |
}; | |
n._onCanPlayThrough = function(t, u) { | |
this.loaded[t] = true; | |
if (!this.appendedStatus[t]) { | |
this.appendVideoElement(t, u) | |
} | |
if (this.timeoutTriggered[t]) { | |
return | |
} | |
if (this.loadingTimeouts[t]) { | |
clearTimeout(this.loadingTimeouts[t]); | |
this.loadingTimeouts[t] = null; | |
if (this.context.introPlaying && t === "gold") { | |
this.playVideo(t, true) | |
} | |
} | |
if (this.playOnLoads[t]) { | |
this.playVideo(t) | |
} | |
}; | |
n._onPause = function(t, u) { | |
this.trigger("pause", { | |
key: t, | |
videoEl: u.el, | |
wrapperEl: this.wrappers[t] | |
}) | |
}; | |
n._handleViewReset = function(t) { | |
var u = this.videos[t]; | |
if (u) { | |
this.shouldPlay[t] = true; | |
this.removeActiveClass(t); | |
u.el.pause(); | |
u.el.currentTime = 0 | |
} | |
}; | |
n.setBreakpointName = function() { | |
this.breakpointName = p.getBreakpoint().name; | |
if (this.breakpointName === "xlarge") { | |
this.breakpointName = "large" | |
} | |
}; | |
c.exports = d | |
}, { | |
"../../model/EnabledFeatures": 634, | |
"ac-classlist": 12, | |
"ac-cname": 29, | |
"ac-dom-emitter": 35, | |
"ac-dom-traversal/querySelector": 120, | |
"ac-event-emitter-micro": 217, | |
"ac-object": 380, | |
"ac-viewport": 615 | |
}], | |
656: [function(d, b, h) { | |
var m = d("./webgl/shadow-passes/SpaceGrayShadowPass"), | |
c = d("./webgl/shadow-passes/RoseGoldShadowPass"), | |
l = d("./webgl/shadow-passes/SilverShadowPass"); | |
var o = d("./webgl/gradient-pass/RoseGoldLogoPass"), | |
g = d("./webgl/gradient-pass/SpaceGrayLogoPass"); | |
var p = d("./webgl/matcap/SilverTouchID"), | |
j = d("./webgl/matcap/GoldTouchID"), | |
a = d("./webgl/matcap/SpaceGrayCamera"), | |
n = d("./webgl/matcap/SpaceGrayButton"), | |
f = d("./webgl/matcap/RoseGoldCamera"), | |
k = d("./webgl/matcap/RoseGoldButtons"); | |
b.exports = { | |
silver: [l, p], | |
spacegray: [m, a, g], | |
gold: [j], | |
rosegold: [c, f, k, o] | |
} | |
}, { | |
"./webgl/gradient-pass/RoseGoldLogoPass": 657, | |
"./webgl/gradient-pass/SpaceGrayLogoPass": 658, | |
"./webgl/matcap/GoldTouchID": 659, | |
"./webgl/matcap/RoseGoldButtons": 660, | |
"./webgl/matcap/RoseGoldCamera": 661, | |
"./webgl/matcap/SilverTouchID": 662, | |
"./webgl/matcap/SpaceGrayButton": 663, | |
"./webgl/matcap/SpaceGrayCamera": 664, | |
"./webgl/shadow-passes/RoseGoldShadowPass": 665, | |
"./webgl/shadow-passes/SilverShadowPass": 666, | |
"./webgl/shadow-passes/SpaceGrayShadowPass": 667 | |
}], | |
657: [function(c, b, f) { | |
var l = c("../../../../webgl/types/MaterialCapturePlayer"), | |
k = c("../../../../webgl/shaders/shaders.json"), | |
d = c("ac-object"), | |
a = c("ac-motion-emitter").MotionEmitter, | |
h = c("ac-viewport").Viewport; | |
var g; | |
var j = function(o, m, p) { | |
this.context = o; | |
this.context = o; | |
this._lastScrollPos = null; | |
this._lastTimeInPxThreshold = null; | |
this._minFriction = 5; | |
this._maxFriction = 40; | |
this.settings = { | |
progressRangeMin: 0, | |
progressRangeMax: 1, | |
matcapRangeMin: -1, | |
matcapRangeMax: 1 | |
}; | |
this.animationRanges = { | |
xlarge: { | |
min: 0, | |
max: 0.2 | |
}, | |
large: { | |
min: 0, | |
max: 0.2 | |
}, | |
medium: { | |
min: 0, | |
max: 0.2 | |
}, | |
small: { | |
min: 0, | |
max: 0.2 | |
} | |
}; | |
this.introAnimationRanges = { | |
xlarge: { | |
min: 0, | |
max: 0.7 | |
}, | |
large: { | |
min: 0, | |
max: 0.7 | |
}, | |
medium: { | |
min: 0, | |
max: 0.7 | |
}, | |
small: { | |
min: 0, | |
max: 0.7 | |
} | |
}; | |
var n = this.getSizeForBreakpoint(); | |
l.call(this, o, { | |
width: n, | |
height: n, | |
className: this.className, | |
subpath: m.subpath | |
}); | |
if (p) { | |
return | |
} | |
this.meshOptions = { | |
width: this.options.width, | |
height: this.options.height, | |
uniforms: this.getImageTextureUniforms(), | |
vertexShader: k.vertex, | |
fragmentShader: k["gradient-pass"] | |
} | |
}; | |
g = j.prototype = d.create(l.prototype); | |
g.sizes = { | |
small: 64, | |
defaults: 128 | |
}; | |
g.className = "rosegold-logo-matcap"; | |
g.getImagePaths = function() { | |
var m = { | |
allowXLarge: true | |
}; | |
return { | |
maskMap: this.getAssetURL("hero_rosegold_logo_alpha", m), | |
gradientMap: this.getAssetURL("rosegold_logo_gradient", { | |
retina: false, | |
extension: "jpg", | |
ignoreBreakpoint: true | |
}) | |
} | |
}; | |
g.renderIntroProgressOffset = function() { | |
if (!this.context.introPlayer.positions.spacegray) { | |
return | |
} | |
var p = this.context.introPlayer.positions.spacegray.progress; | |
var o = this.introAnimationRanges[this.breakpointName].min, | |
m = this.introAnimationRanges[this.breakpointName].max; | |
var n = p; | |
if (n < o) { | |
n = o | |
} else { | |
if (n > m) { | |
n = m | |
} | |
} | |
n = 1 - (m - n) / (m - o); | |
this._introOffsetProgress = n | |
}; | |
g.render = function() { | |
if (this.context.introPlayer && !this.context.introComplete) { | |
this.renderIntroProgressOffset() | |
} | |
if (!this._introOffsetProgress) { | |
this._introOffsetProgress = 1 | |
} | |
var o = 0, | |
q = this.settings.progressRangeMin, | |
n = this.settings.progressRangeMax; | |
if (this.context.parallaxHandler) { | |
var r = this.context.parallaxHandler.positions.spacegray.progress; | |
var p = this.settings.scrollMin, | |
m = this.settings.scrollMax; | |
o = (m - r) / (m - p); | |
if (o < 0) { | |
o = 0 | |
} else { | |
if (o > 1) { | |
o = 1 | |
} | |
} | |
if (o < q) { | |
o = q | |
} else { | |
if (o > n) { | |
o = n | |
} | |
} | |
} | |
o = (o * (-1 / n)); | |
if (typeof this._introOffsetProgress === "number") { | |
o += this._introOffsetProgress | |
} | |
if (isNaN(o)) { | |
return | |
} | |
o = (o * (this.settings.matcapRangeMax - this.settings.matcapRangeMin)) + this.settings.matcapRangeMin; | |
o = (o + 1) / 2; | |
this.setProgress(o) | |
}; | |
b.exports = j | |
}, { | |
"../../../../webgl/shaders/shaders.json": 691, | |
"../../../../webgl/types/MaterialCapturePlayer": 693, | |
"ac-motion-emitter": 373, | |
"ac-object": 380, | |
"ac-viewport": 615 | |
}], | |
658: [function(c, b, f) { | |
var l = c("../../../../webgl/types/MaterialCapturePlayer"), | |
k = c("../../../../webgl/shaders/shaders.json"), | |
d = c("ac-object"), | |
a = c("ac-motion-emitter").MotionEmitter, | |
h = c("ac-viewport").Viewport; | |
var g; | |
var j = function(o, m, p) { | |
this.context = o; | |
this.context = o; | |
this._lastScrollPos = null; | |
this._lastTimeInPxThreshold = null; | |
this._minFriction = 5; | |
this._maxFriction = 40; | |
this.settings = { | |
progressRangeMin: 0, | |
progressRangeMax: 1, | |
matcapRangeMin: 0, | |
matcapRangeMax: 1 | |
}; | |
this.animationRanges = { | |
xlarge: { | |
min: 0, | |
max: 0.2 | |
}, | |
large: { | |
min: 0, | |
max: 0.2 | |
}, | |
medium: { | |
min: 0, | |
max: 0.2 | |
}, | |
small: { | |
min: 0, | |
max: 0.2 | |
} | |
}; | |
this.introAnimationRanges = { | |
xlarge: { | |
min: 0, | |
max: 0.7 | |
}, | |
large: { | |
min: 0, | |
max: 0.7 | |
}, | |
medium: { | |
min: 0, | |
max: 0.7 | |
}, | |
small: { | |
min: 0, | |
max: 0.7 | |
} | |
}; | |
var n = this.getSizeForBreakpoint(); | |
l.call(this, o, { | |
width: n, | |
height: n, | |
className: this.className, | |
subpath: m.subpath | |
}); | |
if (p) { | |
return | |
} | |
this.meshOptions = { | |
width: this.options.width, | |
height: this.options.height, | |
uniforms: this.getImageTextureUniforms(), | |
vertexShader: k.vertex, | |
fragmentShader: k["gradient-pass"] | |
} | |
}; | |
g = j.prototype = d.create(l.prototype); | |
g.sizes = { | |
small: 64, | |
defaults: 128 | |
}; | |
g.className = "spacegray-logo-matcap"; | |
g.getImagePaths = function() { | |
var m = { | |
allowXLarge: true | |
}; | |
return { | |
maskMap: this.getAssetURL("hero_spacegray_logo_alpha", m), | |
gradientMap: this.getAssetURL("spacegray_logo_gradient", { | |
retina: false, | |
extension: "jpg", | |
ignoreBreakpoint: true | |
}) | |
} | |
}; | |
g.renderIntroProgressOffset = function() { | |
if (!this.context.introPlayer.positions.spacegray) { | |
return | |
} | |
var p = this.context.introPlayer.positions.spacegray.progress; | |
var o = this.introAnimationRanges[this.breakpointName].min, | |
m = this.introAnimationRanges[this.breakpointName].max; | |
var n = p; | |
if (n < o) { | |
n = o | |
} else { | |
if (n > m) { | |
n = m | |
} | |
} | |
n = 1 - (m - n) / (m - o); | |
this._introOffsetProgress = n | |
}; | |
g.render = function() { | |
if (this.context.introPlayer && !this.context.introComplete) { | |
this.renderIntroProgressOffset() | |
} | |
if (!this._introOffsetProgress) { | |
this._introOffsetProgress = 1 | |
} | |
var o = 0, | |
q = this.settings.progressRangeMin, | |
n = this.settings.progressRangeMax; | |
if (this.context.parallaxHandler) { | |
var r = this.context.parallaxHandler.positions.spacegray.progress; | |
var p = this.settings.scrollMin, | |
m = this.settings.scrollMax; | |
o = (m - r) / (m - p); | |
if (o < 0) { | |
o = 0 | |
} else { | |
if (o > 1) { | |
o = 1 | |
} | |
} | |
if (o < q) { | |
o = q | |
} else { | |
if (o > n) { | |
o = n | |
} | |
} | |
} | |
o = (o * (-1 / n)); | |
if (typeof this._introOffsetProgress === "number") { | |
o += this._introOffsetProgress | |
} | |
if (isNaN(o)) { | |
return | |
} | |
o = (o * (this.settings.matcapRangeMax - this.settings.matcapRangeMin)) + this.settings.matcapRangeMin; | |
o = (o + 1) / 2; | |
this.setProgress(o) | |
}; | |
b.exports = j | |
}, { | |
"../../../../webgl/shaders/shaders.json": 691, | |
"../../../../webgl/types/MaterialCapturePlayer": 693, | |
"ac-motion-emitter": 373, | |
"ac-object": 380, | |
"ac-viewport": 615 | |
}], | |
659: [function(b, a, d) { | |
var k = b("../../../../webgl/types/MaterialCapturePlayer"), | |
j = b("../../../../webgl/shaders/shaders.json"), | |
c = b("ac-object"), | |
h = b("ac-viewport").Viewport; | |
var f; | |
var g = function(n, l, o) { | |
this.context = n; | |
this.animationRanges = { | |
xlarge: { | |
min: 0, | |
max: 0.2 | |
}, | |
large: { | |
min: 0, | |
max: 0.2 | |
}, | |
medium: { | |
min: 0, | |
max: 0.2 | |
}, | |
small: { | |
min: 0, | |
max: 0.2 | |
} | |
}; | |
this.introAnimationRanges = { | |
xlarge: { | |
min: 0, | |
max: 0.85 | |
}, | |
large: { | |
min: 0, | |
max: 0.85 | |
}, | |
medium: { | |
min: 0, | |
max: 0.85 | |
}, | |
small: { | |
min: 0, | |
max: 0.85 | |
} | |
}; | |
var m = this.getSizeForBreakpoint(); | |
this.settings = { | |
progressRangeMin: 0, | |
progressRangeMax: 1, | |
matcapRangeMin: -1, | |
matcapRangeMax: 1 | |
}; | |
k.call(this, n, { | |
width: m, | |
height: m, | |
className: this.className, | |
subpath: l.subpath | |
}); | |
if (o) { | |
return | |
} | |
this.meshOptions = { | |
width: this.options.width, | |
height: this.options.height, | |
uniforms: this.getImageTextureUniforms(), | |
vertexShader: j.vertex, | |
fragmentShader: j["material-capture"] | |
} | |
}; | |
f = g.prototype = c.create(k.prototype); | |
f.composerPasses = 0; | |
f.className = "gold-touch-id-matcap"; | |
f.sizes = { | |
small: 32, | |
defaults: 64 | |
}; | |
f.getImagePaths = function() { | |
var l = { | |
allowXLarge: true | |
}; | |
return { | |
maskMap: this.getAssetURL("hero_gold_touch_id_alpha", l), | |
normalMap: this.getAssetURL("hero_gold_touch_id_normals", l), | |
matcapMap: this.getAssetURL("gold_touch_id_matcap", { | |
retina: false, | |
extension: "jpg", | |
ignoreBreakpoint: true | |
}) | |
} | |
}; | |
f.renderIntroProgressOffset = function() { | |
if (!this.context.introPlayer.positions.spacegray) { | |
return | |
} | |
var o = this.context.introPlayer.positions.gold.progress; | |
var n = this.introAnimationRanges[this.breakpointName].min, | |
l = this.introAnimationRanges[this.breakpointName].max; | |
var m = o; | |
if (m < n) { | |
m = n | |
} else { | |
if (m > l) { | |
m = l | |
} | |
} | |
m = 1 - (l - m) / (l - n); | |
this._introOffsetProgress = m | |
}; | |
f.render = function() { | |
if (this.context.introPlayer && !this.context.introComplete) { | |
this.renderIntroProgressOffset() | |
} | |
if (!this._introOffsetProgress) { | |
this._introOffsetProgress = 1 | |
} | |
var n = 0, | |
p = this.settings.progressRangeMin, | |
m = this.settings.progressRangeMax; | |
if (this.context.parallaxHandler) { | |
var q = this.context.parallaxHandler.positions.gold.progress; | |
var o = this.settings.scrollMin, | |
l = this.settings.scrollMax; | |
n = (l - q) / (l - o); | |
if (n < 0) { | |
n = 0 | |
} else { | |
if (n > 1) { | |
n = 1 | |
} | |
} | |
if (n < p) { | |
n = p | |
} else { | |
if (n > m) { | |
n = m | |
} | |
} | |
} | |
n = (n * (-1 / m)); | |
if (typeof this._introOffsetProgress === "number") { | |
n += this._introOffsetProgress | |
} | |
if (isNaN(n)) { | |
return | |
} | |
n = (n * (this.settings.matcapRangeMax - this.settings.matcapRangeMin)) + this.settings.matcapRangeMin; | |
this.setProgress(n - 1) | |
}; | |
a.exports = g | |
}, { | |
"../../../../webgl/shaders/shaders.json": 691, | |
"../../../../webgl/types/MaterialCapturePlayer": 693, | |
"ac-object": 380, | |
"ac-viewport": 615 | |
}], | |
660: [function(c, b, f) { | |
var l = c("../../../../webgl/types/MaterialCapturePlayer"), | |
k = c("../../../../webgl/shaders/shaders.json"), | |
d = c("ac-object"), | |
a = c("ac-motion-emitter").MotionEmitter, | |
j = c("ac-viewport").Viewport; | |
var g; | |
var h = function(o, m, p) { | |
this.context = o; | |
var n = this.getSizeForBreakpoint(); | |
this.settings = { | |
progressRangeMin: 0, | |
progressRangeMax: 1, | |
matcapRangeMin: -1, | |
matcapRangeMax: 1, | |
matcapOffset: 0 | |
}; | |
this.settings = { | |
progressRangeMin: 0, | |
progressRangeMax: 1, | |
matcapRangeMin: -1, | |
matcapRangeMax: 1 | |
}; | |
this.animationRanges = { | |
xlarge: { | |
min: 0, | |
max: 0.33 | |
}, | |
large: { | |
min: 0, | |
max: 0.33 | |
}, | |
medium: { | |
min: 0, | |
max: 0.33 | |
}, | |
small: { | |
min: 0, | |
max: 0.33 | |
} | |
}; | |
this.introAnimationRanges = { | |
xlarge: { | |
min: 0.2, | |
max: 0.6 | |
}, | |
large: { | |
min: 0.2, | |
max: 0.6 | |
}, | |
medium: { | |
min: 0.2, | |
max: 0.6 | |
}, | |
small: { | |
min: 0.2, | |
max: 0.6 | |
} | |
}; | |
l.call(this, o, { | |
width: n, | |
height: n, | |
className: this.className, | |
subpath: m.subpath | |
}); | |
if (p) { | |
return | |
} | |
this.meshOptions = { | |
width: this.options.width, | |
height: this.options.height, | |
uniforms: this.getImageTextureUniforms(), | |
vertexShader: k.vertex, | |
fragmentShader: k["material-capture"] | |
}; | |
this.motionEmitter = new a({ | |
min: 0, | |
max: 1, | |
clock: this.context.clock, | |
friction: 5 | |
}); | |
this.motionEmitter.on("draw", function(q) { | |
this.setProgress(q.progress) | |
}.bind(this)); | |
this.motionEmitter.start() | |
}; | |
g = h.prototype = d.create(l.prototype); | |
g.sizes = { | |
small: 128, | |
defaults: 256 | |
}; | |
g.className = "rosegold-buttons-matcap"; | |
g.getImagePaths = function() { | |
var m = { | |
allowXLarge: true | |
}; | |
return { | |
maskMap: this.getAssetURL("hero_rosegold_buttons_alpha", m), | |
normalMap: this.getAssetURL("hero_rosegold_buttons_normals", m), | |
matcapMap: this.getAssetURL("rosegold_buttons_matcap", { | |
retina: false, | |
extension: "jpg", | |
ignoreBreakpoint: true | |
}) | |
} | |
}; | |
g.renderIntroProgressOffset = function() { | |
if (!this.context.introPlayer.positions.spacegray) { | |
return | |
} | |
var p = this.context.introPlayer.positions.spacegray.progress; | |
var o = this.introAnimationRanges[this.breakpointName].min, | |
m = this.introAnimationRanges[this.breakpointName].max; | |
var n = p; | |
if (n < o) { | |
n = o | |
} else { | |
if (n > m) { | |
n = m | |
} | |
} | |
n = 1 - (m - n) / (m - o); | |
this._introOffsetProgress = n | |
}; | |
g.render = function() { | |
if (this.context.introPlayer && !this.context.introComplete) { | |
this.renderIntroProgressOffset() | |
} | |
if (!this._introOffsetProgress) { | |
this._introOffsetProgress = 1 | |
} | |
var o = 0, | |
q = this.settings.progressRangeMin, | |
n = this.settings.progressRangeMax; | |
if (this.context.parallaxHandler) { | |
var r = this.context.parallaxHandler.positions.rosegold.progress; | |
var p = this.settings.scrollMin, | |
m = this.settings.scrollMax; | |
o = (m - r) / (m - p); | |
if (o < 0) { | |
o = 0 | |
} else { | |
if (o > 1) { | |
o = 1 | |
} | |
} | |
if (o < q) { | |
o = q | |
} else { | |
if (o > n) { | |
o = n | |
} | |
} | |
} | |
o = (o * (-1 / n)); | |
if (typeof this._introOffsetProgress === "number") { | |
o += this._introOffsetProgress | |
} | |
if (isNaN(o)) { | |
return | |
} | |
o = (o * (this.settings.matcapRangeMax - this.settings.matcapRangeMin)) + this.settings.matcapRangeMin; | |
this.motionEmitter.setProgress(o - 1) | |
}; | |
b.exports = h | |
}, { | |
"../../../../webgl/shaders/shaders.json": 691, | |
"../../../../webgl/types/MaterialCapturePlayer": 693, | |
"ac-motion-emitter": 373, | |
"ac-object": 380, | |
"ac-viewport": 615 | |
}], | |
661: [function(b, a, f) { | |
var k = b("../../../../webgl/types/MaterialCapturePlayer"), | |
j = b("../../../../webgl/shaders/shaders.json"), | |
d = b("ac-object"), | |
h = b("ac-viewport").Viewport; | |
var g; | |
var c = function(n, l, o) { | |
this.context = n; | |
var m = this.getSizeForBreakpoint(); | |
this.settings = { | |
progressRangeMin: 0, | |
progressRangeMax: 1, | |
matcapRangeMin: -1, | |
matcapRangeMax: 1, | |
matcapOffset: 0 | |
}; | |
this.animationRanges = { | |
xlarge: { | |
min: 0, | |
max: 62 | |
}, | |
large: { | |
min: 0, | |
max: 62 | |
}, | |
medium: { | |
min: 0, | |
max: 62 | |
}, | |
small: { | |
min: 0, | |
max: 62 | |
} | |
}; | |
this.introAnimationRanges = { | |
xlarge: { | |
min: 0, | |
max: 1000 | |
}, | |
large: { | |
min: 0, | |
max: 1800 | |
}, | |
medium: { | |
min: 0, | |
max: 1400 | |
}, | |
small: { | |
min: 0, | |
max: 1200 | |
} | |
}; | |
k.call(this, n, { | |
width: m, | |
height: m, | |
className: this.className, | |
subpath: l.subpath | |
}); | |
if (o) { | |
return | |
} | |
this.meshOptions = { | |
width: this.options.width, | |
height: this.options.height, | |
uniforms: this.getImageTextureUniforms(), | |
vertexShader: j.vertex, | |
fragmentShader: j["material-capture"] | |
} | |
}; | |
g = c.prototype = d.create(k.prototype); | |
g.composerPasses = 0; | |
g.sizes = { | |
xlarge: 64, | |
large: 64, | |
defaults: 32 | |
}; | |
g.className = "rosegold-camera-matcap"; | |
g.getImagePaths = function() { | |
var l = { | |
allowXLarge: true | |
}; | |
return { | |
maskMap: this.getAssetURL("hero_rosegold_camera_alpha", l), | |
normalMap: this.getAssetURL("hero_rosegold_camera_normals", l), | |
matcapMap: this.getAssetURL("rosegold_camera_matcap", { | |
retina: false, | |
extension: "jpg", | |
ignoreBreakpoint: true | |
}) | |
} | |
}; | |
g.renderIntroProgressOffset = function(q) { | |
var p = this.introAnimationRanges[this.breakpointName].min, | |
l = this.introAnimationRanges[this.breakpointName].max; | |
var n = (l - q) / (l - p); | |
if (n < 0) { | |
n = 0 | |
} else { | |
if (n > 1) { | |
n = 1 | |
} | |
} | |
var o = 0, | |
m = 1; | |
if (n < o) { | |
n = o | |
} else { | |
if (n > m) { | |
n = m | |
} | |
} | |
n = 1 - (n * (1 / m)); | |
this._introOffsetProgress = n | |
}; | |
g.render = function() { | |
var q = this.context.distanceCalculator.parallaxOffsets.rosegold.y || 0; | |
if (this.context.introPlayer && !this.context.introComplete) { | |
this.renderIntroProgressOffset(q) | |
} | |
q = -q; | |
var p = this.settings.scrollMin, | |
l = this.settings.scrollMax; | |
var n = (l - q) / (l - p); | |
if (n < 0) { | |
n = 0 | |
} else { | |
if (n > 1) { | |
n = 1 | |
} | |
} | |
var o = this.settings.progressRangeMin, | |
m = this.settings.progressRangeMax; | |
if (n < o) { | |
n = o | |
} else { | |
if (n > m) { | |
n = m | |
} | |
} | |
if (typeof this._introOffsetProgress === "number") { | |
n += this._introOffsetProgress | |
} | |
n = n * (1 / m); | |
n = (n * (this.settings.matcapRangeMax - this.settings.matcapRangeMin)) + this.settings.matcapRangeMin; | |
this.setProgress(n * 2 + this.settings.matcapOffset) | |
}; | |
a.exports = c | |
}, { | |
"../../../../webgl/shaders/shaders.json": 691, | |
"../../../../webgl/types/MaterialCapturePlayer": 693, | |
"ac-object": 380, | |
"ac-viewport": 615 | |
}], | |
662: [function(b, a, d) { | |
var k = b("../../../../webgl/types/MaterialCapturePlayer"), | |
h = b("../../../../webgl/shaders/shaders.json"), | |
c = b("ac-object"), | |
g = b("ac-viewport").Viewport; | |
var f; | |
var j = function(n, l, o) { | |
this.context = n; | |
this.useGLScale = false; | |
var m = this.getSizeForBreakpoint(); | |
this.settings = { | |
progressRangeMin: 0, | |
progressRangeMax: 1, | |
matcapRangeMin: -1, | |
matcapRangeMax: 1, | |
matcapOffset: 0 | |
}; | |
this.animationRanges = { | |
xlarge: { | |
min: 0, | |
max: 100 | |
}, | |
large: { | |
min: 0, | |
max: 100 | |
}, | |
medium: { | |
min: 0, | |
max: 100 | |
}, | |
small: { | |
min: 0, | |
max: 100 | |
} | |
}; | |
this.introAnimationRanges = { | |
xlarge: { | |
min: 0, | |
max: 1000 | |
}, | |
large: { | |
min: 0, | |
max: 1800 | |
}, | |
medium: { | |
min: 0, | |
max: 1400 | |
}, | |
small: { | |
min: 0, | |
max: 1200 | |
} | |
}; | |
k.call(this, n, { | |
width: m, | |
height: m, | |
className: this.className, | |
subpath: l.subpath | |
}); | |
if (o) { | |
return | |
} | |
this.meshOptions = { | |
width: this.options.width, | |
height: this.options.height, | |
uniforms: this.getImageTextureUniforms(), | |
vertexShader: h.vertex, | |
fragmentShader: h["material-capture"] | |
} | |
}; | |
f = j.prototype = c.create(k.prototype); | |
f.sizes = { | |
xlarge: 128, | |
defaults: 64 | |
}; | |
f.className = "silver-touch-id-matcap"; | |
f.composerPasses = 0; | |
f.getImagePaths = function() { | |
var l = { | |
allowXLarge: true | |
}; | |
return { | |
maskMap: this.getAssetURL("hero_silver_touch_id_alpha", l), | |
normalMap: this.getAssetURL("hero_silver_touch_id_normals", l), | |
matcapMap: this.getAssetURL("silver_touch_id_matcap", { | |
retina: false, | |
extension: "jpg", | |
ignoreBreakpoint: true | |
}) | |
} | |
}; | |
f.renderIntroProgressOffset = function(q) { | |
var p = this.introAnimationRanges[this.breakpointName].min, | |
l = this.introAnimationRanges[this.breakpointName].max; | |
var n = (l - q) / (l - p); | |
if (n < 0) { | |
n = 0 | |
} else { | |
if (n > 1) { | |
n = 1 | |
} | |
} | |
var o = 0, | |
m = 1; | |
if (n < o) { | |
n = o | |
} else { | |
if (n > m) { | |
n = m | |
} | |
} | |
n = 1 - (n * (1 / m)); | |
this._introOffsetProgress = n | |
}; | |
f.render = function() { | |
var q = this.context.distanceCalculator.parallaxOffsets.silver.y || 0; | |
if (this.context.introPlayer && !this.context.introComplete) { | |
this.renderIntroProgressOffset(q) | |
} | |
var p = this.settings.scrollMin, | |
l = this.settings.scrollMax; | |
var n = (l - q) / (l - p); | |
if (n < 0) { | |
n = 0 | |
} else { | |
if (n > 1) { | |
n = 1 | |
} | |
} | |
var o = this.settings.progressRangeMin, | |
m = this.settings.progressRangeMax; | |
if (n < o) { | |
n = o | |
} else { | |
if (n > m) { | |
n = m | |
} | |
} | |
if (this._introOffsetProgress) { | |
n += this._introOffsetProgress | |
} | |
n = n * (1 / m); | |
n = (n * (this.settings.matcapRangeMax - this.settings.matcapRangeMin)) + this.settings.matcapRangeMin; | |
this.setProgress(n += this.settings.matcapOffset) | |
}; | |
a.exports = j | |
}, { | |
"../../../../webgl/shaders/shaders.json": 691, | |
"../../../../webgl/types/MaterialCapturePlayer": 693, | |
"ac-object": 380, | |
"ac-viewport": 615 | |
}], | |
663: [function(b, a, d) { | |
var k = b("../../../../webgl/types/MaterialCapturePlayer"), | |
j = b("../../../../webgl/shaders/shaders.json"), | |
c = b("ac-object"), | |
g = b("ac-viewport").Viewport; | |
var f; | |
var h = function(n, l, o) { | |
this.context = n; | |
this.settings = { | |
progressRangeMin: 0, | |
progressRangeMax: 1, | |
matcapRangeMin: 0.11, | |
matcapRangeMax: 1 | |
}; | |
this.animationRanges = { | |
xlarge: { | |
min: 0, | |
max: 0.2 | |
}, | |
large: { | |
min: 0, | |
max: 0.2 | |
}, | |
medium: { | |
min: 0, | |
max: 0.2 | |
}, | |
small: { | |
min: 0, | |
max: 0.2 | |
} | |
}; | |
this.introAnimationRanges = { | |
xlarge: { | |
min: 0, | |
max: 0.7 | |
}, | |
large: { | |
min: 0, | |
max: 0.85 | |
}, | |
medium: { | |
min: 0, | |
max: 0.7 | |
}, | |
small: { | |
min: 0, | |
max: 0.7 | |
} | |
}; | |
var m = this.getSizeForBreakpoint(); | |
k.call(this, n, { | |
width: m, | |
height: m, | |
className: this.className, | |
subpath: l.subpath | |
}); | |
if (o) { | |
return | |
} | |
this.meshOptions = { | |
width: this.options.width, | |
height: this.options.height, | |
uniforms: this.getImageTextureUniforms(), | |
vertexShader: j.vertex, | |
fragmentShader: j["material-capture"] | |
} | |
}; | |
f = h.prototype = c.create(k.prototype); | |
f.sizes = { | |
xlarge: 128, | |
defaults: 64 | |
}; | |
f.className = "spacegray-button-matcap"; | |
f.getImagePaths = function() { | |
var l = { | |
allowXLarge: true | |
}; | |
return { | |
maskMap: this.getAssetURL("hero_spacegray_button_alpha", l), | |
normalMap: this.getAssetURL("hero_spacegray_button_normals", l), | |
matcapMap: this.getAssetURL("spacegray_buttons_matcap", { | |
retina: false, | |
extension: "jpg", | |
ignoreBreakpoint: true | |
}) | |
} | |
}; | |
f.renderIntroProgressOffset = function() { | |
if (!this.context.introPlayer.positions.spacegray) { | |
return | |
} | |
var o = this.context.introPlayer.positions.spacegray.progress; | |
var n = this.introAnimationRanges[this.breakpointName].min, | |
l = this.introAnimationRanges[this.breakpointName].max; | |
var m = o; | |
if (m < n) { | |
m = n | |
} else { | |
if (m > l) { | |
m = l | |
} | |
} | |
m = 1 - (l - m) / (l - n); | |
this._introOffsetProgress = m | |
}; | |
f.render = function() { | |
if (this.context.introPlayer && !this.context.introComplete) { | |
this.renderIntroProgressOffset() | |
} | |
if (!this._introOffsetProgress) { | |
this._introOffsetProgress = 1 | |
} | |
var n = 0, | |
p = this.settings.progressRangeMin, | |
m = this.settings.progressRangeMax; | |
if (this.context.parallaxHandler) { | |
var q = this.context.parallaxHandler.positions.spacegray.progress; | |
var o = this.settings.scrollMin, | |
l = this.settings.scrollMax; | |
n = (l - q) / (l - o); | |
if (n < 0) { | |
n = 0 | |
} else { | |
if (n > 1) { | |
n = 1 | |
} | |
} | |
if (n < p) { | |
n = p | |
} else { | |
if (n > m) { | |
n = m | |
} | |
} | |
} | |
n = (n * (-1 / m)); | |
if (typeof this._introOffsetProgress === "number") { | |
n += this._introOffsetProgress | |
} | |
if (isNaN(n)) { | |
return | |
} | |
n = (n * (this.settings.matcapRangeMax - this.settings.matcapRangeMin)) + this.settings.matcapRangeMin; | |
this.setProgress(n - 1) | |
}; | |
a.exports = h | |
}, { | |
"../../../../webgl/shaders/shaders.json": 691, | |
"../../../../webgl/types/MaterialCapturePlayer": 693, | |
"ac-object": 380, | |
"ac-viewport": 615 | |
}], | |
664: [function(d, c, g) { | |
var l = d("../../../../webgl/types/MaterialCapturePlayer"), | |
k = d("../../../../webgl/shaders/shaders.json"), | |
f = d("ac-object"), | |
b = d("ac-motion-emitter").MotionEmitter, | |
j = d("ac-viewport").Viewport; | |
var h; | |
var a = function(o, m, p) { | |
this.context = o; | |
this._lastScrollPos = null; | |
this._lastTimeInPxThreshold = null; | |
this._minFriction = 5; | |
this._maxFriction = 40; | |
this.settings = { | |
progressRangeMin: 0, | |
progressRangeMax: 0.43, | |
matcapRangeMin: -1, | |
matcapRangeMax: 1 | |
}; | |
this.animationRanges = { | |
xlarge: { | |
min: 850, | |
max: 899 | |
}, | |
large: { | |
min: 612, | |
max: 651 | |
}, | |
medium: { | |
min: 490, | |
max: 519 | |
}, | |
small: { | |
min: 350, | |
max: 379 | |
} | |
}; | |
this.introAnimationRanges = { | |
xlarge: { | |
min: this.animationRanges.xlarge.max, | |
max: 1800 | |
}, | |
large: { | |
min: this.animationRanges.large.max, | |
max: 1800 | |
}, | |
medium: { | |
min: this.animationRanges.medium.max, | |
max: 1400 | |
}, | |
small: { | |
min: this.animationRanges.small.max, | |
max: 1200 | |
} | |
}; | |
var n = this.getSizeForBreakpoint(); | |
l.call(this, o, { | |
width: n, | |
height: n, | |
className: this.className, | |
subpath: m.subpath | |
}); | |
if (p) { | |
return | |
} | |
this.meshOptions = { | |
width: this.options.width, | |
height: this.options.height, | |
uniforms: this.getImageTextureUniforms(), | |
vertexShader: k.vertex, | |
fragmentShader: k["material-capture"] | |
}; | |
this.frictionEaser = new b({ | |
min: this._minFriction, | |
max: this._maxFriction, | |
clock: this.context.clock, | |
friction: 20 | |
}); | |
this.frictionEaser.on("update", function(q) { | |
this.motionEmitter.friction = Math.round(q.progress) | |
}.bind(this)); | |
this.motionEmitter = new b({ | |
min: 0, | |
max: 1, | |
clock: this.context.clock, | |
friction: 5 | |
}); | |
this.motionEmitter.on("draw", function(q) { | |
this.setProgress(q.progress) | |
}.bind(this)); | |
this.frictionEaser.start(); | |
this.motionEmitter.start(); | |
j.on("scroll", this._handleScrollDirectionChange.bind(this)) | |
}; | |
h = a.prototype = f.create(l.prototype); | |
h.composerPasses = 0; | |
h.className = "spacegray-camera-matcap"; | |
h.sizes = { | |
small: 32, | |
defaults: 64 | |
}; | |
h.getImagePaths = function() { | |
var m = { | |
allowXLarge: true | |
}; | |
return { | |
maskMap: this.getAssetURL("hero_spacegray_camera_alpha", m), | |
normalMap: this.getAssetURL("hero_spacegray_camera_normals", m), | |
matcapMap: this.getAssetURL("spacegray_camera_matcap", { | |
retina: false, | |
extension: "jpg", | |
ignoreBreakpoint: true | |
}) | |
} | |
}; | |
h.renderIntroProgressOffset = function(r) { | |
var q = this.introAnimationRanges[this.breakpointName].min, | |
m = this.introAnimationRanges[this.breakpointName].max; | |
var o = (m - r) / (m - q); | |
if (o < 0) { | |
o = 0 | |
} else { | |
if (o > 1) { | |
o = 1 | |
} | |
} | |
var p = 0, | |
n = 1; | |
if (o < p) { | |
o = p | |
} else { | |
if (o > n) { | |
o = n | |
} | |
} | |
o = 1 - (o * (1 / n)); | |
this._introOffsetProgress = o | |
}; | |
h.render = function() { | |
var r = this.context.distanceCalculator.getDistance("spacegray", "gold"); | |
if (this.context.introPlayer && !this.context.introComplete) { | |
this.renderIntroProgressOffset(r) | |
} | |
var q = this.settings.scrollMin, | |
m = this.settings.scrollMax; | |
var o = (m - r) / (m - q); | |
if (o < 0) { | |
o = 0 | |
} else { | |
if (o > 1) { | |
o = 1 | |
} | |
} | |
var p = this.settings.progressRangeMin, | |
n = this.settings.progressRangeMax; | |
if (o < p) { | |
o = p | |
} else { | |
if (o > n) { | |
o = n | |
} | |
} | |
if (this._introOffsetProgress) { | |
o -= this._introOffsetProgress | |
} | |
o = o * (1 / n); | |
o = (o * (this.settings.matcapRangeMax - this.settings.matcapRangeMin)) + this.settings.matcapRangeMin; | |
this.motionEmitter.setProgress(o) | |
}; | |
h._handleScrollDirectionChange = function() { | |
var o = j.scrollY(), | |
n = 100, | |
m = Date.now(); | |
if (!this._lastScrollPos) { | |
this._lastScrollPos = o | |
} | |
if (o > this._lastScrollPos && o < n) { | |
this._lastTimeInPxThreshold = m | |
} | |
if (o > this._lastScrollPos || m - this._lastTimeInPxThreshold < 700) { | |
this.frictionEaser.setProgress(this._minFriction) | |
} else { | |
this.frictionEaser.setProgress(this._maxFriction) | |
} | |
this._lastScrollPos = o | |
}; | |
c.exports = a | |
}, { | |
"../../../../webgl/shaders/shaders.json": 691, | |
"../../../../webgl/types/MaterialCapturePlayer": 693, | |
"ac-motion-emitter": 373, | |
"ac-object": 380, | |
"ac-viewport": 615 | |
}], | |
665: [function(d, b, g) { | |
var j = d("../../../../webgl/types/ShadowPassPlayer"), | |
l = d("../../../../webgl/shaders/shaders.json"), | |
k = d("ac-viewport").Viewport, | |
f = d("ac-object"); | |
var h; | |
var a = { | |
xlarge: { | |
width: 1015, | |
height: 583 | |
}, | |
large: { | |
width: 738, | |
height: 424 | |
}, | |
medium: { | |
width: 587, | |
height: 337 | |
}, | |
small: { | |
width: 458, | |
height: 263 | |
} | |
}; | |
var c = function(o, n, p) { | |
this.context = o; | |
this.setBreakpointName(); | |
this.setDimensions(); | |
j.call(this, o, { | |
width: this.dimensions.width, | |
height: this.dimensions.height, | |
className: this.className, | |
subpath: n.subpath | |
}); | |
if (p) { | |
return | |
} | |
this.settings = { | |
scrollStart: 0, | |
scrollEnd: 0.4, | |
scrollXStart: 0.4, | |
scrollYStart: 1.2, | |
scrollDistanceX: 0, | |
scrollDistanceY: -1.3, | |
distanceX: 1, | |
distanceY: 1, | |
dropOffX: 0, | |
dropOffY: 0, | |
rotate: 0, | |
bloom: 1, | |
feather: 1, | |
distanceBloom: 0, | |
distanceFeather: 0, | |
invert: true | |
}; | |
this.settings.rotate = this.settings.rotate * Math.PI / 180; | |
this.updateSettings(); | |
var m = this.getImageTextureUniforms(); | |
m.maskCenter = { | |
type: "v3", | |
value: new THREE.Vector3() | |
}; | |
m.showPasses = { | |
type: "f", | |
value: 0 | |
}; | |
m.bloom = { | |
type: "f", | |
value: this.settings.bloom | |
}; | |
m.feather = { | |
type: "f", | |
value: this.settings.feather | |
}; | |
m.distanceX = { | |
type: "f", | |
value: this.settings.distanceX | |
}; | |
m.distanceY = { | |
type: "f", | |
value: this.settings.distanceY | |
}; | |
m.dropOffX = { | |
type: "f", | |
value: this.settings.dropOffX | |
}; | |
m.dropOffY = { | |
type: "f", | |
value: this.settings.dropOffY | |
}; | |
m.rotate = { | |
type: "f", | |
value: this.settings.rotate | |
}; | |
m.shadowMap.value.magFilter = m.shadowMap.value.minFilter = THREE.LinearFilter; | |
this.meshOptions = { | |
width: this.options.width, | |
height: this.options.height, | |
uniforms: m, | |
vertexShader: l.vertex, | |
fragmentShader: l["shadow-pass"] | |
}; | |
k.on("breakpoint", this.onBreakpoint.bind(this)) | |
}; | |
h = c.prototype = f.create(j.prototype); | |
h.cameraOptions = { | |
nearClip: 1, | |
farClip: 5000, | |
fov: 45 | |
}; | |
h.className = "rosegold-shadow-pass"; | |
h.getImagePaths = function() { | |
var m = { | |
extension: "jpg" | |
}; | |
return { | |
shadowMap: this.getAssetURL("hero_rosegold_s", m) | |
} | |
}; | |
h.setBreakpointName = function() { | |
this.breakpointName = k.getBreakpoint().name | |
}; | |
h.setDimensions = function() { | |
var m = this.breakpointName, | |
n = a[m]; | |
this.dimensions = { | |
width: n.width, | |
height: n.height, | |
left: -n.width / 2, | |
top: -n.height / 2 | |
} | |
}; | |
h.updateSettings = function() { | |
var m = this.breakpointName | |
}; | |
h.render = function() { | |
var o = 0; | |
if (this.context.parallaxHandler) { | |
o = this.context.parallaxHandler.positions.rosegold.progress | |
} | |
var q = this.settings.scrollStart; | |
var n = this.settings.scrollEnd; | |
var p = (n - o) / (n - q); | |
if (p < 0) { | |
p = 0 | |
} else { | |
if (p > 1) { | |
p = 1 | |
} | |
} | |
if (this.settings.invert) { | |
p = 1 - p | |
} | |
var m = this.settings.scrollXStart + (p * this.settings.scrollDistanceX); | |
var s = this.settings.scrollYStart + (p * this.settings.scrollDistanceY); | |
var r = this.settings.bloom + (p * this.settings.distanceBloom); | |
this.setMaskCenter(m, s); | |
this.setBloom(r) | |
}; | |
h.onBreakpoint = function() { | |
this.setBreakpointName(); | |
this.updateSettings(); | |
this.setDimensions(); | |
this.resizeTo(this.dimensions.width, this.dimensions.height) | |
}; | |
h.setMaskCenter = function(m, n) { | |
this.material.uniforms.maskCenter.value.x = m; | |
this.material.uniforms.maskCenter.value.y = n | |
}; | |
h.setBloom = function(m) { | |
this.material.uniforms.bloom.value = m | |
}; | |
b.exports = c | |
}, { | |
"../../../../webgl/shaders/shaders.json": 691, | |
"../../../../webgl/types/ShadowPassPlayer": 695, | |
"ac-object": 380, | |
"ac-viewport": 615 | |
}], | |
666: [function(c, b, f) { | |
var h = c("../../../../webgl/types/ShadowPassPlayer"), | |
l = c("../../../../webgl/shaders/shaders.json"), | |
k = c("ac-viewport").Viewport, | |
d = c("ac-object"); | |
var g; | |
var a = { | |
xlarge: { | |
width: 759, | |
height: 977 | |
}, | |
large: { | |
width: 552, | |
height: 711 | |
}, | |
medium: { | |
width: 440, | |
height: 566 | |
}, | |
small: { | |
width: 342, | |
height: 441 | |
} | |
}; | |
var j = function(o, n, p) { | |
this.context = o; | |
this.setBreakpointName(); | |
this.setDimensions(); | |
h.call(this, o, { | |
width: this.dimensions.width, | |
height: this.dimensions.height, | |
className: this.className, | |
subpath: n.subpath | |
}); | |
if (p) { | |
return | |
} | |
this.settings = { | |
scrollStart: 0, | |
scrollEnd: 1, | |
scrollXStart: 0.4, | |
scrollYStart: 1, | |
scrollDistanceX: 0, | |
scrollDistanceY: -0.65, | |
distanceX: 0.1, | |
distanceY: 3.5, | |
dropOffX: 0, | |
dropOffY: 0, | |
rotate: 0, | |
bloom: 0.7, | |
feather: 1, | |
distanceBloom: 0, | |
distanceFeather: 0, | |
invert: true | |
}; | |
this.settings.rotate = this.settings.rotate * Math.PI / 180; | |
this.updateSettings(); | |
var m = this.getImageTextureUniforms(); | |
m.maskCenter = { | |
type: "v3", | |
value: new THREE.Vector3() | |
}; | |
m.showPasses = { | |
type: "f", | |
value: 0 | |
}; | |
m.bloom = { | |
type: "f", | |
value: this.settings.bloom | |
}; | |
m.feather = { | |
type: "f", | |
value: this.settings.feather | |
}; | |
m.distanceX = { | |
type: "f", | |
value: this.settings.distanceX | |
}; | |
m.distanceY = { | |
type: "f", | |
value: this.settings.distanceY | |
}; | |
m.dropOffX = { | |
type: "f", | |
value: this.settings.dropOffX | |
}; | |
m.dropOffY = { | |
type: "f", | |
value: this.settings.dropOffY | |
}; | |
m.rotate = { | |
type: "f", | |
value: this.settings.rotate | |
}; | |
m.shadowMap.value.magFilter = m.shadowMap.value.minFilter = THREE.LinearFilter; | |
this.meshOptions = { | |
width: this.options.width, | |
height: this.options.height, | |
uniforms: m, | |
vertexShader: l.vertex, | |
fragmentShader: l["shadow-pass"] | |
}; | |
k.on("breakpoint", this.onBreakpoint.bind(this)) | |
}; | |
g = j.prototype = d.create(h.prototype); | |
g.cameraOptions = { | |
nearClip: 1, | |
farClip: 5000, | |
fov: 45 | |
}; | |
g.className = "silver-shadow-pass"; | |
g.getImagePaths = function() { | |
var m = { | |
extension: "jpg" | |
}; | |
if (!this.context.supportsMasking) { | |
m.extension = "png" | |
} | |
return { | |
shadowMap: this.getAssetURL("hero_silver_s", m) | |
} | |
}; | |
g.setBreakpointName = function() { | |
this.breakpointName = k.getBreakpoint().name | |
}; | |
g.setDimensions = function() { | |
var m = this.breakpointName, | |
n = a[m]; | |
this.dimensions = { | |
width: n.width, | |
height: n.height, | |
left: -n.width / 2, | |
top: -n.height / 2 | |
} | |
}; | |
g.updateSettings = function() { | |
var m = this.breakpointName | |
}; | |
g.render = function() { | |
var o = 0; | |
if (this.context.parallaxHandler) { | |
o = this.context.parallaxHandler.positions.silver.progress | |
} | |
var q = this.settings.scrollStart; | |
var n = this.settings.scrollEnd; | |
var p = (n - o) / (n - q); | |
if (p < 0) { | |
p = 0 | |
} else { | |
if (p > 1) { | |
p = 1 | |
} | |
} | |
if (this.settings.invert) { | |
p = 1 - p | |
} | |
var m = this.settings.scrollXStart + (p * this.settings.scrollDistanceX); | |
var s = this.settings.scrollYStart + (p * this.settings.scrollDistanceY); | |
var r = this.settings.bloom + (p * this.settings.distanceBloom); | |
this.setMaskCenter(m, s); | |
this.setBloom(r) | |
}; | |
g.onBreakpoint = function() { | |
this.setBreakpointName(); | |
this.updateSettings(); | |
this.setDimensions(); | |
this.resizeTo(this.dimensions.width, this.dimensions.height) | |
}; | |
g.setMaskCenter = function(m, n) { | |
this.material.uniforms.maskCenter.value.x = m; | |
this.material.uniforms.maskCenter.value.y = n | |
}; | |
g.setBloom = function(m) { | |
this.material.uniforms.bloom.value = m | |
}; | |
b.exports = j | |
}, { | |
"../../../../webgl/shaders/shaders.json": 691, | |
"../../../../webgl/types/ShadowPassPlayer": 695, | |
"ac-object": 380, | |
"ac-viewport": 615 | |
}], | |
667: [function(c, b, g) { | |
var k = c("../../../../webgl/types/ShadowPassPlayer"), | |
n = c("../../../../webgl/shaders/shaders.json"), | |
l = c("ac-viewport").Viewport, | |
f = c("ac-easing"), | |
d = c("ac-object"); | |
var a = { | |
xlarge: { | |
width: 1148, | |
height: 442 | |
}, | |
large: { | |
width: 835, | |
height: 322 | |
}, | |
medium: { | |
width: 665, | |
height: 256 | |
}, | |
small: { | |
width: 518, | |
height: 199 | |
} | |
}; | |
var j = { | |
xlarge: { | |
scrollMin: 895, | |
scrollMax: 899 | |
}, | |
large: { | |
scrollMin: 642, | |
scrollMax: 651 | |
}, | |
medium: { | |
scrollMin: 513, | |
scrollMax: 519 | |
}, | |
small: { | |
scrollMin: 393, | |
scrollMax: 405 | |
} | |
}; | |
var h; | |
var m = function(q, p, r) { | |
this.context = q; | |
this.setBreakpointName(); | |
this.setDimensions(); | |
k.call(this, q, { | |
width: this.dimensions.width, | |
height: this.dimensions.height, | |
className: this.className, | |
subpath: p.subpath | |
}); | |
if (r) { | |
return | |
} | |
this.settings = { | |
introStart: 0, | |
introEnd: 1, | |
introXStart: -1.47, | |
introYStart: 0.67, | |
scrollStart: 0, | |
scrollEnd: 0.5, | |
scrollXStart: 0, | |
scrollYStart: 0, | |
dropOffX: 0, | |
dropOffY: 0, | |
introDistanceX: 1, | |
introDistanceY: -0.01, | |
scrollDistanceX: 0, | |
scrollDistanceY: 0, | |
distanceX: 2.6, | |
distanceY: 1, | |
rotate: 1.2, | |
bloom: 0.7, | |
distanceBloom: -1, | |
feather: 1, | |
distanceFeather: 1, | |
invert: true | |
}; | |
this.settings.rotate = this.settings.rotate * Math.PI / 180; | |
this.easing = f.createBezier(0.1, 0.48, 0.475, 1); | |
this._lastIntroProgress = null; | |
this.updateSettings(); | |
var o = this.getImageTextureUniforms(); | |
o.maskCenter = { | |
type: "v3", | |
value: new THREE.Vector3() | |
}; | |
o.showPasses = { | |
type: "f", | |
value: 0 | |
}; | |
o.bloom = { | |
type: "f", | |
value: this.settings.bloom | |
}; | |
o.feather = { | |
type: "f", | |
value: this.settings.feather | |
}; | |
o.distanceX = { | |
type: "f", | |
value: this.settings.distanceX | |
}; | |
o.distanceY = { | |
type: "f", | |
value: this.settings.distanceY | |
}; | |
o.dropOffX = { | |
type: "f", | |
value: this.settings.dropOffX | |
}; | |
o.dropOffY = { | |
type: "f", | |
value: this.settings.dropOffY | |
}; | |
o.rotate = { | |
type: "f", | |
value: this.settings.rotate | |
}; | |
o.shadowMap.value.magFilter = o.shadowMap.value.minFilter = THREE.LinearFilter; | |
this.meshOptions = { | |
width: this.options.width, | |
height: this.options.height, | |
uniforms: o, | |
vertexShader: n.vertex, | |
fragmentShader: n["shadow-pass"] | |
}; | |
l.on("breakpoint", this.onBreakpoint.bind(this)) | |
}; | |
h = m.prototype = d.create(k.prototype); | |
h.cameraOptions = { | |
nearClip: 1, | |
farClip: 5000, | |
fov: 45 | |
}; | |
h.className = "spacegray-shadow-pass"; | |
h.setBreakpointName = function() { | |
this.breakpointName = l.getBreakpoint().name | |
}; | |
h.setDimensions = function() { | |
var o = this.breakpointName, | |
p = a[o]; | |
this.dimensions = { | |
width: p.width, | |
height: p.height, | |
left: -p.width / 2, | |
top: -p.height / 2 | |
} | |
}; | |
h.getImagePaths = function() { | |
var o = { | |
extension: "jpg" | |
}; | |
return { | |
shadowMap: this.getAssetURL("hero_spacegray_s", o) | |
} | |
}; | |
h.updateSettings = function() { | |
var o = this.breakpointName; | |
this.settings.scrollMin = j[o].scrollMin; | |
this.settings.scrollMax = j[o].scrollMax | |
}; | |
h.render = function() { | |
if (this.context.introPlayer && !this.context.introComplete) { | |
this.handleIntroShadow() | |
} else { | |
var v = 1; | |
if (typeof this._lastIntroProgress === "number") { | |
v = this._lastIntroProgress | |
} | |
this.handleIntroShadow(v) | |
} | |
var r = this.settings.scrollStart, | |
p = this.settings.scrollEnd; | |
var u = 0; | |
if (this.context.parallaxHandler) { | |
u = this.context.parallaxHandler.positions.spacegray.progress | |
} | |
var q = (p - u) / (p - r); | |
if (q < 0) { | |
q = 0 | |
} else { | |
if (q > 1) { | |
q = 1 | |
} | |
} | |
if (this.settings.invert) { | |
q = 1 - q | |
} | |
var o = this.settings.scrollXStart + (q * this.settings.scrollDistanceX); | |
var t = this.settings.scrollYStart + (q * this.settings.scrollDistanceY); | |
var s = this.settings.bloom + (q * this.settings.distanceBloom); | |
if (this._introX) { | |
o += this._introX | |
} | |
if (this._introY) { | |
t += this._introY | |
} | |
this.setMaskCenter(o, t); | |
this.setBloom(s) | |
}; | |
h.handleIntroShadow = function(u) { | |
var s = 0, | |
p = this.settings.introEnd, | |
r = this.settings.introStart; | |
if (this.context.introPlayer && this.context.introPlayer.positions && this.context.introPlayer.positions.spacegray) { | |
s = this.context.introPlayer.positions.spacegray.progress | |
} | |
if (typeof u === "number") { | |
s = u | |
} | |
var q = (p - s) / (p - r); | |
if (q < 0) { | |
q = 0 | |
} else { | |
if (q > 1) { | |
q = 1 | |
} | |
} | |
if (this.settings.invert) { | |
q = 1 - q | |
} | |
if (q < 1) { | |
q = this.easing.getValue(q) | |
} | |
var o = this.settings.introXStart + (q * this.settings.introDistanceX); | |
var t = this.settings.introYStart + (q * this.settings.introDistanceY); | |
this._introX = o; | |
this._introY = t; | |
this._lastIntroProgress = q | |
}; | |
h.onBreakpoint = function() { | |
this.setBreakpointName(); | |
this.updateSettings(); | |
this.setDimensions(); | |
this.resizeTo(this.dimensions.width, this.dimensions.height) | |
}; | |
h.setMaskCenter = function(o, p) { | |
this.material.uniforms.maskCenter.value.x = o; | |
this.material.uniforms.maskCenter.value.y = p | |
}; | |
h.setBloom = function(o) { | |
this.material.uniforms.bloom.value = o | |
}; | |
b.exports = m | |
}, { | |
"../../../../webgl/shaders/shaders.json": 691, | |
"../../../../webgl/types/ShadowPassPlayer": 695, | |
"ac-easing": 126, | |
"ac-object": 380, | |
"ac-viewport": 615 | |
}], | |
668: [function(j, a, w) { | |
j("ac-polyfills/Object/create"); | |
var k = j("ac-console").log; | |
var b = j("ac-dom-metrics"); | |
var m = j("ac-dom-styles"); | |
var n = j("ac-dom-traversal"); | |
var l = j("../../utils/BrowserPrefixed"); | |
var s = j("ac-scroll-motion-emitter").ElementScrollMotionEmitter; | |
var r = j("ac-viewport").Viewport; | |
var p = j("ac-easing").createPredefined; | |
var v = j("ac-browser"); | |
var c = (j("ac-feature").isTablet() || j("ac-feature").isHandheld()); | |
var d = !c && j("../../utils/animationCapable"); | |
var g = j("ac-motion-emitter").MotionEmitter; | |
var h = j("ac-graph"); | |
var u = j("../../sharedsections/BaseSection"); | |
var q = u.prototype; | |
var t = j("../../utils/mathutils"); | |
function f(A, z, y) { | |
var x = this; | |
this.name = "PinAndScaleSection"; | |
u.call(this, A, z, y); | |
this._initLineGraphs(); | |
if (!d || this.breakpoint == "small") { | |
this.element.classList.add("static") | |
} | |
this.pinned = false; | |
this.swap = { | |
large: 350, | |
medium: 380 | |
}; | |
this.scaleMin = { | |
large: 0.75, | |
medium: 0.6 | |
}; | |
this.scaleMax = { | |
large: 1, | |
medium: 1 | |
}; | |
this.pinAndScaleWrapperEl = n.querySelector("#pin-and-scale-wrapper", this.element); | |
this.pinnedContentEl = n.querySelector(".pinned-content", this.element); | |
this.deviceEl = n.querySelector(".device-a9-m9", this.element); | |
this.a9 = n.querySelector(".image-a9-inside", this.element); | |
this.m9 = n.querySelector(".image-m9-inside", this.element); | |
this._initMetrics(); | |
this._initMotionEmitter(); | |
this._setStyle(); | |
this.rafWhenVisible = true | |
} | |
var o = f.prototype = Object.create(u.prototype); | |
f.prototype.constructor = f; | |
o._initMotionEmitter = function() { | |
this.motionEmitter = new g({ | |
min: 0, | |
max: 1 | |
}); | |
if (d && this.viewport != "small") { | |
this.motionEmitter.start() | |
} | |
}; | |
o._initMetrics = function() { | |
this.windowHeight = r.clientHeight(); | |
this.windowWidth = r.clientWidth(); | |
this.pin = (this.windowHeight > 1000) ? 400 : 150; | |
this.sectionTop = b.getPagePosition(this.element).top; | |
this.sectionHeight = b.getDimensions(this.element).height; | |
this.deviceTop = b.getPagePosition(this.pinnedContentEl).top; | |
this.deviceRight = this.windowWidth - b.getPagePosition(this.deviceEl).right; | |
this.breakpoint = r.getBreakpoint().name; | |
if (this.breakpoint == "xlarge") { | |
this.breakpoint = "large" | |
} | |
this.pinStart = this.deviceTop - this.pin; | |
this.pinEnd = this.sectionTop + this.sectionHeight - this.windowHeight; | |
this.unPinnedTop = this.sectionHeight - (this.deviceTop - this.sectionTop) - this.windowHeight + this.pin; | |
this.cpuGraphScrollThreshold = b.getPagePosition(this.cpuGraphEl).top - this.windowHeight + b.getDimensions(this.cpuGraphEl).height; | |
this.gpuGraphScrollThreshold = b.getPagePosition(this.gpuGraphEl).top - this.windowHeight + b.getDimensions(this.gpuGraphEl).height | |
}; | |
o._initLineGraphs = function() { | |
this.cpuGraphEl = document.getElementById("graph-cpu-performance"); | |
this.gpuGraphEl = document.getElementById("graph-gpu-performance"); | |
this.cpuGraph = new h.CurvedLine(this.cpuGraphEl, { | |
graphData: [0.088, 0.095, 0.1, 0.12, 0.18, 0.28, 0.5, 0.8, 1], | |
duration: 1.5, | |
spline: { | |
lineWidth: 4, | |
colorStart: "#96c951", | |
colorEnd: "#038aca", | |
tension: 0.7 | |
}, | |
splineDots: { | |
show: "all", | |
draw: "play", | |
fillColor: "matchSpline", | |
size: 7 | |
}, | |
verticalRule: { | |
color: "#f2f2f2", | |
lineWidth: 1, | |
lineLength: "toSpline" | |
}, | |
xAxis: { | |
show: true, | |
draw: "play", | |
lineWidth: 1, | |
color: "#d6d6d6" | |
}, | |
xDots: { | |
show: true | |
} | |
}); | |
this.gpuGraph = new h.CurvedLine(this.gpuGraphEl, { | |
graphData: [0.088, 0.095, 0.1, 0.12, 0.18, 0.28, 0.44, 0.65, 1], | |
duration: 1.5, | |
spline: { | |
lineWidth: 4, | |
colorStart: "#fcde38", | |
colorEnd: "#ef582b", | |
tension: 0.7 | |
}, | |
splineDots: { | |
show: "all", | |
draw: "play", | |
fillColor: "matchSpline", | |
size: 7 | |
}, | |
verticalRule: { | |
color: "#f2f2f2", | |
lineWidth: 1, | |
lineLength: "toSpline" | |
}, | |
xAxis: { | |
show: true, | |
draw: "play", | |
lineWidth: 1, | |
color: "#d6d6d6" | |
}, | |
xDots: { | |
show: true | |
} | |
}) | |
}; | |
o.setupEvents = function() { | |
window.motionEmitter = this.motionEmitter; | |
this.motionEmitter.on("draw", this.scaleDevice.bind(this)) | |
}; | |
o.teardownEvents = function() { | |
q.teardownEvents.call(this) | |
}; | |
o.activate = function() { | |
q.activate.call(this) | |
}; | |
o.deactivate = function() { | |
q.deactivate.call(this) | |
}; | |
o.animateIn = function() { | |
q.animateIn.call(this) | |
}; | |
o._setStyle = function() { | |
if (!d || this.breakpoint == "small") { | |
return | |
} | |
var x = t.map(this.scroll, this.pinStart, this.pinEnd, 0, 1); | |
var B = Math.min(x * 2.5, 1); | |
var y = (x >= 0 && x <= 1); | |
var A = (x > 1); | |
var z = (x > 0.6); | |
if (y && !this.pinned) { | |
this.pinned = true; | |
this.deviceEl.classList.add("pinned"); | |
this.deviceEl.style.top = this.pin + "px"; | |
this.deviceEl.style.right = this.deviceRight + "px" | |
} else { | |
if (!y && this.pinned) { | |
this.pinned = false; | |
this.deviceEl.classList.remove("pinned"); | |
this.deviceEl.style.top = "auto"; | |
this.deviceEl.style.right = 0 | |
} | |
} | |
if (z && !this.logoAnimated) { | |
this.logoAnimated = true; | |
this.deviceEl.classList.add("show-m9-logo") | |
} else { | |
if (!z) { | |
this.logoAnimated = false; | |
this.deviceEl.classList.remove("show-m9-logo") | |
} | |
} | |
var C = t.clamp(B, 0, 1); | |
if (isNaN(C)) { | |
C = 0 | |
} | |
this.motionEmitter.setProgress(C); | |
if (A && !this.unpinned) { | |
this.motionEmitter.setProgress(1); | |
this.motionEmitter.trigger("draw", { | |
progress: 1 | |
}); | |
this.unpinned = true; | |
this.deviceEl.style.top = this.unPinnedTop + "px" | |
} else { | |
if (!A && this.unpinned) { | |
this.unpinned = false | |
} | |
} | |
}; | |
o._checkToPlayGraphs = function() { | |
if (this.scroll > this.cpuGraphScrollThreshold && !this.cpuGraphHasPlayed) { | |
this.cpuGraphHasPlayed = true; | |
this.cpuGraph.play(); | |
this.cpuGraphEl.classList.add("animate") | |
} | |
if (this.scroll > this.gpuGraphScrollThreshold && !this.gpuGraphHasPlayed) { | |
this.gpuGraphHasPlayed = true; | |
this.gpuGraph.play(); | |
this.gpuGraphEl.classList.add("animate") | |
} | |
}; | |
o._removeStyle = function() { | |
this.pinned = false; | |
this.unpinned = false; | |
this.logoAnimated = false; | |
this.deviceEl.classList.remove("pinned"); | |
this.deviceEl.classList.remove("show-m9-logo"); | |
this.deviceEl.style.top = "auto"; | |
this.deviceEl.style.right = 0; | |
this.deviceEl.style[l.transform] = "" | |
}; | |
o.scaleDevice = function(x) { | |
var y = t.map(x.progress, 0, 1, this.scaleMin[this.breakpoint], this.scaleMax[this.breakpoint]); | |
this.deviceEl.style[l.transform] = "scale(" + y + "," + y + ") translate3d(0,0,0)" | |
}; | |
o.onRequestAnimationFrame = function() { | |
q.onRequestAnimationFrame.call(this); | |
this.scroll = r.scrollY(); | |
this._checkToPlayGraphs(); | |
if (!d || this.breakpoint == "small") { | |
return | |
} | |
this._setStyle() | |
}; | |
o.onScroll = function(z, y, x) { | |
q.onScroll.call(this, z, y, x) | |
}; | |
o.onResize = function(z, y, x) { | |
q.onResize.call(this, z, y, x); | |
this._removeStyle(); | |
this._initMetrics(); | |
this._setStyle() | |
}; | |
o.onBreakpoint = function(z, A, y, x) { | |
this.breakpoint = r.getBreakpoint().name; | |
this.motionEmitter.stop(); | |
if (this.breakpoint == "xlarge") { | |
this.breakpoint = "large" | |
} | |
if (this.breakpoint == "small" || !d) { | |
this._removeStyle() | |
} else { | |
this.motionEmitter.start() | |
} | |
this._initMetrics(); | |
this._setStyle() | |
}; | |
o.onViewWillAppear = function(y, x) { | |
q.onViewWillAppear.call(this, y, x) | |
}; | |
o.onViewWillDisappear = function(y, x) { | |
this._removeStyle(); | |
q.onViewWillDisappear.call(this, y, x) | |
}; | |
o.destroy = function() { | |
q.destroy.call(this) | |
}; | |
a.exports = f | |
}, { | |
"../../sharedsections/BaseSection": 676, | |
"../../utils/BrowserPrefixed": 686, | |
"../../utils/animationCapable": 687, | |
"../../utils/mathutils": 690, | |
"ac-browser": 1, | |
"ac-console": 31, | |
"ac-dom-metrics": 62, | |
"ac-dom-styles": 93, | |
"ac-dom-traversal": 111, | |
"ac-easing": 126, | |
"ac-feature": 230, | |
"ac-graph": 368, | |
"ac-motion-emitter": 373, | |
"ac-polyfills/Object/create": 394, | |
"ac-scroll-motion-emitter": 468, | |
"ac-viewport": 615 | |
}], | |
669: [function(f, a, t) { | |
f("ac-polyfills/Object/create"); | |
var q = f("ac-dom-metrics"); | |
var r = f("../../engagementAnimation/EngagementAnimation"); | |
var k = f("../../scrollAnimation/ScrollAnimation"); | |
var l = f("ac-dom-traversal/querySelectorAll"); | |
var b = f("ac-dom-traversal/querySelector"); | |
var d = f("../../gallery/TextFadeGallery"); | |
var m = f("ac-element-engagement").ElementEngagement; | |
var h = f("ac-gallery").FadeGallery; | |
var p = f("ac-classlist"); | |
var o = f("ac-viewport").Viewport; | |
var c = f("../../utils/animationCapable"); | |
var s = f("../../sharedsections/BaseSection"); | |
var n = s.prototype; | |
function g(x, w, v) { | |
var u = this; | |
this.name = "ThreeDTouchSection"; | |
s.call(this, x, w, v); | |
if (!c) { | |
x.classList.add("static") | |
} | |
this.breakpoint = o.getBreakpoint().name; | |
if (this.beakpoint === "xlarge") { | |
this.beakpoint = "large" | |
} | |
this.emitterEls = l("[data-scroll-emitter]", this.element); | |
this.scrollAnimationEls = l("[data-scroll-animation]", this.element); | |
this.animationEls = l("[data-animate-in]", this.element); | |
this.galleryEl = b(".ac-gallery"); | |
this._initialize(); | |
this.rafWhenVisible = true | |
} | |
var j = g.prototype = Object.create(s.prototype); | |
g.prototype.constructor = g; | |
j._initialize = function() { | |
var u = this; | |
this.scrollAnimations = []; | |
this.engagementAnimations = []; | |
if (this.scrollAnimations.length == 0 && c) { | |
this.emitterEls.forEach(function(v) { | |
u.scrollAnimations.push(new k(v)) | |
}) | |
} else { | |
if (!c) { | |
this.scrollAnimationEls.forEach(function(v) { | |
v.classList.add("show") | |
}) | |
} | |
} | |
if (this.breakpoint == "small") { | |
this.gallery = new d(this.galleryEl); | |
return | |
} | |
if (!this._animationElementTracker) { | |
this._animationElementTracker = new m() | |
} | |
this.animationEls.forEach(function(w, v) { | |
u.engagementAnimations[v] = new r(w, u.breakpoint, { | |
elementEngagement: u._animationElementTracker | |
}) | |
}) | |
}; | |
j.setupEvents = function() { | |
this.scrollAnimations.forEach(function(u) { | |
u.setupEvents() | |
}) | |
}; | |
j.teardownEvents = function() { | |
this.scrollAnimations.forEach(function(u) { | |
u.teardownEvents() | |
}); | |
n.teardownEvents.call(this) | |
}; | |
j.activate = function() { | |
n.activate.call(this) | |
}; | |
j.deactivate = function() { | |
n.deactivate.call(this) | |
}; | |
j.animateIn = function() { | |
n.animateIn.call(this) | |
}; | |
j.onRequestAnimationFrame = function() { | |
n.onRequestAnimationFrame.call(this) | |
}; | |
j.onScroll = function(w, v, u) { | |
n.onScroll.call(this, w, v, u); | |
if (!c) { | |
return | |
} | |
this.scrollAnimations.forEach(function(x) { | |
x.handleScroll() | |
}) | |
}; | |
j.onResize = function(w, v, u) { | |
n.onResize.call(this, w, v, u) | |
}; | |
j.onBreakpoint = function(w, x, v, u) { | |
this.breakpoint = w.name; | |
if (w.name == "xlarge" || x.name == "xlarge") { | |
return | |
} | |
if (w.name == "small" || x.name == "small") { | |
this._destroy(); | |
this._initialize(); | |
return | |
} | |
this.scrollAnimations.forEach(function(y) { | |
y.setScale(w.name) | |
}); | |
this.engagementAnimations.forEach(function(z, y) { | |
z.updateAnimationOnBreakpoint(w.name) | |
}) | |
}; | |
j.onViewWillAppear = function(v, u) { | |
n.onViewWillAppear.call(this, v, u); | |
if (this._animationElementTracker) { | |
this._animationElementTracker.start() | |
} | |
}; | |
j.onViewWillDisappear = function(v, u) { | |
n.onViewWillDisappear.call(this, v, u) | |
}; | |
j._destroy = function() { | |
if (this.gallery) { | |
this.gallery.teardownEvents() | |
} | |
this.gallery = null; | |
if (this.engagementAnimations) { | |
this.engagementAnimations.forEach(function(v, u) { | |
if (typeof v.destroy === "function") { | |
v.destroy() | |
} | |
v.trackedEl.el.removeAttribute("style") | |
}); | |
this.engagementAnimations = null | |
} | |
}; | |
j.destroy = function() { | |
n.destroy.call(this); | |
this._destroy() | |
}; | |
a.exports = g | |
}, { | |
"../../engagementAnimation/EngagementAnimation": 624, | |
"../../gallery/TextFadeGallery": 627, | |
"../../scrollAnimation/ScrollAnimation": 674, | |
"../../sharedsections/BaseSection": 676, | |
"../../utils/animationCapable": 687, | |
"ac-classlist": 12, | |
"ac-dom-metrics": 62, | |
"ac-dom-traversal/querySelector": 120, | |
"ac-dom-traversal/querySelectorAll": 121, | |
"ac-element-engagement": 145, | |
"ac-gallery": 320, | |
"ac-polyfills/Object/create": 394, | |
"ac-viewport": 615 | |
}], | |
670: [function(b, c, a) { | |
var d = b("ac-dom-traversal"); | |
var j = b("ac-dom-metrics"); | |
var h = b("ac-viewport").Viewport; | |
var g = function(k) { | |
this.element = k; | |
this._imageContainerEl = d.querySelector(".panorama-image", this.element); | |
this._wrapperEl = d.querySelector(".panorama-image-wrapper", this.element); | |
this.centerScrollPosition() | |
}; | |
var f = g.prototype; | |
f.centerScrollPosition = function() { | |
this._wrapperEl.scrollLeft = (this._wrapperEl.scrollWidth - h.innerWidth()) / 2 | |
}; | |
c.exports = g | |
}, { | |
"ac-dom-metrics": 62, | |
"ac-dom-traversal": 111, | |
"ac-viewport": 615 | |
}], | |
671: [function(c, a, d) { | |
var h = c("ac-dom-events"); | |
var g = c("ac-dom-traversal"); | |
var l = c("ac-classlist"); | |
var j = c("ac-viewport").Viewport; | |
var b = c("../utils/BrowserPrefixed"); | |
function k(m) { | |
this.cursorEl = g.querySelector(".cursor"); | |
this._controller = m; | |
this.offset = { | |
x: Math.round(this.cursorEl.offsetLeft + this.cursorEl.clientWidth / 2), | |
y: Math.round(this.cursorEl.offsetTop + this.cursorEl.clientHeight / 2) | |
}; | |
this.mouse = { | |
x: 0, | |
y: 0 | |
}; | |
this.mousePanorama = { | |
x: 0, | |
y: 0 | |
}; | |
this.isOverPanorama = false; | |
this._boundOnMouseMove = this.onMouseMoveDocument.bind(this); | |
h.addEventListener(document.body, "mousemove", this._boundOnMouseMove, false) | |
} | |
var f = k.prototype; | |
f.onMouseMoveDocument = function(m) { | |
m.preventDefault(); | |
this.mouse.x = m.pageX + this.offset.x; | |
this.mouse.y = m.pageY - this.offset.y; | |
this.cursorEl.style[b.transform] = "translate(" + this.mouse.x + "px, " + this.mouse.y + "px)" | |
}; | |
f.onMouseMovePanorama = function(m) { | |
if (m) { | |
m.preventDefault() | |
} | |
this.mousePanorama.x = this.map(m.clientX, 0, j.innerWidth(), 1, -1); | |
this.mousePanorama.y = m.clientY | |
}; | |
f.onMouseOverPanorama = function(m) { | |
if (m) { | |
m.preventDefault() | |
} | |
if (!this.isOverPanorama) { | |
this.isOverPanorama = true; | |
l.add(this.cursorEl, "active") | |
} | |
}; | |
f.onMouseOutPanorama = function(m) { | |
if (m) { | |
m.preventDefault() | |
} | |
if (this.isOverPanorama) { | |
this.isOverPanorama = false; | |
l.remove(this.cursorEl, "active") | |
} | |
}; | |
f.lerp = function(n, o, m) { | |
return o + (m - o) * n | |
}; | |
f.map = function(q, p, n, o, m) { | |
return this.lerp(this.norm(q, p, n), o, m) | |
}; | |
f.norm = function(o, n, m) { | |
return (o - n) / (m - n) | |
}; | |
f.setZoomIn = function() { | |
l.remove(this.cursorEl, "out") | |
}; | |
f.setZoomOut = function() { | |
l.add(this.cursorEl, "out") | |
}; | |
f.hideZoom = function() { | |
l.add(this.cursorEl, "hidden") | |
}; | |
f.showZoom = function() { | |
l.remove(this.cursorEl, "hidden") | |
}; | |
f.applyIECompatability = function() { | |
h.removeEventListener(document.body, "mousemove", this._boundOnMouseMove); | |
this.cursorEl.style.visibility = "hidden"; | |
this.onMouseMoveDocument = this._boundOnMouseMove = this.setZoomIn = this.setZoomOut = this.hideZoom = this.showZoom = function() {} | |
}; | |
a.exports = k | |
}, { | |
"../utils/BrowserPrefixed": 686, | |
"ac-classlist": 12, | |
"ac-dom-events": 39, | |
"ac-dom-traversal": 111, | |
"ac-viewport": 615 | |
}], | |
672: [function(c, b, d) { | |
var l = c("ac-dom-traversal"); | |
var r = c("ac-classlist"); | |
var m = c("ac-dom-events"); | |
var j = c("ac-browser"); | |
var o = c("ac-dom-styles"); | |
var n = c("ac-viewport").Viewport; | |
var a = (c("ac-feature").isTablet() || c("ac-feature").isHandheld()); | |
var k = c("ac-clip").Clip; | |
var g = c("./SinglePanorama"); | |
var p = c("./InlinePanorama"); | |
var q = c("./PanoramaCursor"); | |
function h(s) { | |
this._options = s; | |
this._zoomPanoramas = []; | |
this._inlinePanoramas = []; | |
this._containerEl = document.getElementById("main"); | |
this._containerChildrenEl = l.children(this._containerEl); | |
this._currentPanorama = null; | |
this.cursor = null; | |
this.scrollBarWidth = c("../utils/getScrollBarWidth")(); | |
this.setBreakpoint(); | |
this._createSinglePanoramas(); | |
if (!a && !j.IE) { | |
this._initCursor(); | |
this._setupEvents() | |
} | |
} | |
var f = h.prototype; | |
f._createSinglePanoramas = function() { | |
var v = l.querySelectorAll(".panorama"); | |
var w = this._containerChildrenEl; | |
for (var t = 0; t < v.length; t++) { | |
var u = v[t]; | |
if (!a && !j.IE) { | |
var x = new g(u, this); | |
x.setupSiblings(w); | |
this._zoomPanoramas.push(x) | |
} else { | |
var s = new p(u); | |
this._inlinePanoramas.push(s) | |
} | |
} | |
}; | |
f._initCursor = function() { | |
this.cursor = new q(this) | |
}; | |
f._setupEvents = function() { | |
var s = this; | |
this.boundOnResize = this.onResize.bind(this); | |
this._boundOnPanoramaZoomed = this.onPanoramaZoomed.bind(this); | |
window.addEventListener("keydown", function(t) { | |
if (t.keyCode === 27) { | |
t.preventDefault(); | |
t.stopPropagation(); | |
if (s._currentPanorama) { | |
s._currentPanorama.close() | |
} | |
} | |
}) | |
}; | |
f.setBreakpoint = function(s) { | |
if (s) { | |
this.breakpoint = s | |
} else { | |
this.breakpoint = n.getBreakpoint().name | |
} | |
}; | |
f.onPanoramaScroll = function(v) { | |
var s = this; | |
if (v != this._currentPanorama && this._currentPanorama != null) { | |
this._currentPanorama.close(); | |
return | |
} | |
this._currentPanorama = v; | |
for (var t = 0; t < this._containerChildrenEl.length; t++) { | |
var u = this._containerChildrenEl[t]; | |
if (u == v.element) { | |
continue | |
} | |
u.classList.add("fade-out") | |
} | |
r.add(v.siblingElPrev, "slide-up"); | |
r.add(v.siblingElNext, "slide-down"); | |
document.body.classList.add("no-scroll"); | |
l.querySelector("#main").style.overflow = "visible"; | |
document.body.style["padding-right"] = this.scrollBarWidth + "px"; | |
this.showCloseButton(); | |
this.cursor.setZoomOut(); | |
this.animateScrollTo(this._currentPanorama.getScrollOffset(), this._boundOnPanoramaZoomed) | |
}; | |
f.onPanoramaZoomed = function() { | |
this._currentPanorama.boundBeginZoom(); | |
this.cursor.showZoom() | |
}; | |
f.showCloseButton = function() { | |
if (!a && !j.IE) { | |
return | |
} | |
}; | |
f.onPanoramaClosed = function(u) { | |
for (var s = 0; s < this._containerChildrenEl.length; s++) { | |
var t = this._containerChildrenEl[s]; | |
if (t == this.element) { | |
continue | |
} | |
r.remove(t, "fade-out") | |
} | |
r.remove(u.siblingElPrev, "slide-up"); | |
r.remove(u.siblingElNext, "slide-down"); | |
r.remove(document.body, "no-scroll"); | |
document.body.style["padding-right"] = 0; | |
this._currentPanorama = null; | |
this.cursor.setZoomIn() | |
}; | |
f.onResize = function(s) { | |
if (this._currentPanorama != null && this._currentPanorama.state === g.STATE.ZOOMED) { | |
this._currentPanorama.close() | |
} | |
this._zoomPanoramas.forEach(function(t) { | |
t.initMetrics() | |
}) | |
}; | |
f.animateScrollTo = function(w, s) { | |
var v = n.scrollY(); | |
var u = (Math.abs(w - v) / 600) * 1.2; | |
this.cursor.hideZoom(); | |
var t = { | |
x: n.scrollX(), | |
y: v | |
}; | |
new k(t, u, { | |
y: w | |
}, { | |
ease: "easeInOutCubic", | |
onUpdate: function() { | |
window.scrollTo(t.x, t.y) | |
}, | |
onComplete: s | |
}).play() | |
}; | |
b.exports = h | |
}, { | |
"../utils/getScrollBarWidth": 688, | |
"./InlinePanorama": 670, | |
"./PanoramaCursor": 671, | |
"./SinglePanorama": 673, | |
"ac-browser": 1, | |
"ac-classlist": 12, | |
"ac-clip": 21, | |
"ac-dom-events": 39, | |
"ac-dom-styles": 93, | |
"ac-dom-traversal": 111, | |
"ac-feature": 230, | |
"ac-viewport": 615 | |
}], | |
673: [function(d, b, f) { | |
var m = d("ac-dom-events"); | |
var l = d("ac-dom-traversal"); | |
var o = d("ac-dom-styles"); | |
var n = d("ac-viewport").Viewport; | |
var c = d("../utils/BrowserPrefixed"); | |
var a = d("ac-dom-metrics"); | |
var j = d("ac-eclipse").Clip; | |
var k = 0.07; | |
function h(q, p) { | |
this.element = q; | |
this._controller = p; | |
this._aspectRatio = 958 / 3200; | |
this._imageContainerEl = l.querySelector(".panorama-image", this.element); | |
this._wrapperEl = l.querySelector(".panorama-image-wrapper", this.element); | |
this._imageContainerEl.style.cursor = "none"; | |
this._image = null; | |
this.siblingElPrev = null; | |
this.siblingElNext = null; | |
this.state = h.STATE.CLOSED; | |
this._scale = 1; | |
this._tx = 0; | |
this._zoomClipProgress = 0; | |
this._imageDimensions = a.getDimensions(this._imageContainerEl); | |
this._hasLoadedZoomedImage = false; | |
this._doNotLoadZoomedImage = false; | |
this.initMetrics(); | |
this._setupZoomImageURLs(); | |
this._bindEvents(); | |
this._setupEvents() | |
} | |
h.STATE = { | |
ZOOMED: 1, | |
CLOSED: 2 | |
}; | |
var g = h.prototype; | |
g.setupSiblings = function(p) { | |
var q = p.indexOf(this.element); | |
if (q === -1) { | |
throw new Error("SinglePanorama - Section not in sibling collection.") | |
} | |
if (q != 0) { | |
this.siblingElPrev = p[q - 1] | |
} | |
if (q !== p.length - 1) { | |
this.siblingElNext = p[q + 1] | |
} | |
}; | |
g.destroy = function() { | |
this._controller = null; | |
this.teardownEvents() | |
}; | |
g._bindEvents = function() { | |
this._boundOnMouseOver = this.onMouseOver.bind(this); | |
this._boundOnMouseMove = this.onMouseMove.bind(this); | |
this._boundOnMouseMoveAfterZoomOut = this.onMouseMoveAfterZoomOut.bind(this); | |
this._boundOnClick = this.onMouseClick.bind(this); | |
this._boundOnMouseOut = this.onMouseOut.bind(this); | |
this._boundOnTouchMove = this.onTouchMove.bind(this); | |
this._boundOnTouchStart = this.onTouchStart.bind(this); | |
this._boundOnImageLoaded = this.onImageLoaded.bind(this); | |
this._boundRaf = this.onRequestAnimationFrame.bind(this); | |
this.boundBeginZoom = this.beginZoom.bind(this) | |
}; | |
g.initMetrics = function() { | |
this.windowWidth = n.clientWidth(); | |
this.windowHeight = n.clientHeight(); | |
this.imgContainerWidth = a.getDimensions(this._imageContainerEl).width; | |
this.imageContainerHeight = this.imgContainerWidth * this._aspectRatio; | |
this.scaleTarget = this.windowHeight * 1.05 / this.imageContainerHeight | |
}; | |
g._setupZoomImageURLs = function() { | |
var p = o.getStyle(this._imageContainerEl, ["backgroundImage"]).backgroundImage; | |
this._imageSrcRegular = p.match(/\((.*?)\)/)[1].replace(/('|")/g, ""); | |
this._imageSrcZoom = this._imageSrcRegular.replace(/_small|_medium|_large/g, "_zoom"); | |
if (this._imageSrcZoom.indexOf("_2x") > -1) { | |
this._imageSrcZoom = this._imageSrcZoom.replace("_2x", "") | |
} | |
}; | |
g._loadZoomImage = function() { | |
if (this._doNotLoadZoomedImage) { | |
return | |
} | |
if (this._image != null) { | |
if (this._image.parentNode !== null) { | |
this._image.parentNode.removeChild(this._image); | |
this._image.removeEventListener("load", this._boundOnImageLoaded) | |
} | |
this._image = null | |
} | |
this._image = new Image(); | |
this._image.addEventListener("load", this._boundOnImageLoaded); | |
this._image.src = this._imageSrcZoom; | |
this._image.classList.add("zoom") | |
}; | |
g.onImageLoaded = function(p) { | |
this._image.removeEventListener("load", this._boundOnImageLoaded); | |
if (this.state == h.STATE.ZOOMED) { | |
this._imageContainerEl.appendChild(this._image); | |
o.setStyle(this._imageContainerEl, { | |
backgroundImage: "none" | |
}); | |
this._hasLoadedZoomedImage = true | |
} | |
}; | |
g._setupEvents = function() { | |
m.addEventListener(this._imageContainerEl, "mouseover", this._boundOnMouseOver); | |
m.addEventListener(this.element, "click", this._boundOnClick); | |
m.addEventListener(this.element, "mousemove", this._boundOnMouseMove); | |
m.addEventListener(this._imageContainerEl, "mouseout", this._boundOnMouseOut) | |
}; | |
g.teardownEvents = function() { | |
m.removeEventListener(this._imageContainerEl, "mouseover", this._boundOnMouseOver); | |
m.removeEventListener(this.element, "click", this._boundOnClick); | |
m.removeEventListener(this.element, "mousemove", this._boundOnMouseMove); | |
m.removeEventListener(this._imageContainerEl, "mouseout", this._boundOnMouseOut) | |
}; | |
g.onMouseOver = function(p) { | |
this._controller.cursor.onMouseOverPanorama(p) | |
}; | |
g.onMouseMove = function(p) { | |
this._controller.cursor.onMouseMovePanorama(p) | |
}; | |
g.onMouseMoveAfterZoomOut = function(p) { | |
this._imageContainerEl.style.cursor = "none"; | |
m.removeEventListener(this.element, "mousemove", this._boundOnMouseMoveAfterZoomOut) | |
}; | |
g.onTouchStart = function(p) { | |
this.touchStartCoor = [p.touches[0].clientX, p.touches[0].clientY] | |
}; | |
g.onTouchMove = function(q) { | |
var r = this._calcDistance(this.touchStartCoor, [q.touches[0].clientX, q.touches[0].clientY]); | |
var p = this; | |
if (r > 30) { | |
window.clearTimeout(this.touchTimeout); | |
m.removeEventListener(this.element, this.clickEvent, this._boundOnClick); | |
this.touchTimeout = setTimeout(function() { | |
m.addEventListener(p.element, p.clickEvent, p._boundOnClick) | |
}, 200) | |
} | |
}; | |
g.onMouseClick = function(p) { | |
m.stop(p); | |
p.stopImmediatePropagation(); | |
if (this.state == h.STATE.CLOSED) { | |
this.beginScroll() | |
} else { | |
if (this.state == h.STATE.ZOOMED && this._zoomClipProgress == 1) { | |
this.close(null) | |
} | |
} | |
}; | |
g.onMouseOut = function(p) { | |
this._controller.cursor.onMouseOutPanorama(p) | |
}; | |
g.beginScroll = function() { | |
this.state = h.STATE.ZOOMED; | |
this._controller.onPanoramaScroll(this) | |
}; | |
g.beginZoom = function() { | |
var p = this; | |
this._imageContainerEl.style[c.transition] = "none"; | |
this._wrapperEl.style[c.transition] = "none"; | |
this.element.classList.add("zoom"); | |
var q = { | |
transform: { | |
scale: this.scaleTarget | |
} | |
}; | |
this.zoomClip = new j(this._imageContainerEl, 1.3, q, { | |
ease: "easeOutCubic", | |
onUpdate: function(r) { | |
p._zoomClipProgress = r.progress | |
}, | |
onComplete: function() { | |
p._loadZoomImage() | |
}, | |
destroyOnComplete: true | |
}).play(); | |
requestAnimationFrame(this._boundRaf) | |
}; | |
g.close = function(p) { | |
this.state = h.STATE.CLOSED; | |
this._controller.onPanoramaClosed(this); | |
this.element.classList.remove("zoom"); | |
this._imageContainerEl.style[c.transition] = "opacity 1s, " + c.transform + " 0.8s"; | |
this._imageContainerEl.style[c.transform] = "scale(1,1) translate3d(0,0,0)"; | |
this._wrapperEl.style[c.transition] = c.transform + " 0.8s"; | |
this._wrapperEl.style[c.transform] = "none"; | |
o.setStyle(this._imageContainerEl, { | |
backgroundImage: "url(" + this._imageSrcRegular + ")" | |
}); | |
if (this._image !== null) { | |
this._imageContainerEl.removeChild(this._image); | |
this._image = null | |
} | |
this._zoomClipProgress = 0; | |
this._tx = 0; | |
this._hasLoadedZoomedImage = false; | |
this.onMouseOut(); | |
this._imageContainerEl.style.cursor = "auto"; | |
m.addEventListener(this.element, "mousemove", this._boundOnMouseMoveAfterZoomOut) | |
}; | |
g._getTranslateX = function() { | |
if (this.state != h.STATE.ZOOMED) { | |
return this._tx = 0 | |
} | |
var r = this._controller.cursor.mousePanorama.x; | |
var p = (this.imgContainerWidth * this.scaleTarget * this._zoomClipProgress - this.windowWidth) / 2; | |
var q = r * p; | |
if (this._zoomClipProgress == 1) { | |
q = Math.max(q, -p + (this._controller.scrollBarWidth * this.scaleTarget)) | |
} | |
this._tx += (q - this._tx) * k; | |
this._tx = Math.round(this._tx * 10000) / 10000; | |
return this._tx | |
}; | |
g.getScrollOffset = function() { | |
var p = Math.round(this.element.offsetTop - (n.innerHeight() * 0.5) + (this._imageContainerEl.offsetHeight * 0.5)); | |
return p | |
}; | |
g._panImage = function() { | |
var p = this._getTranslateX(); | |
this._wrapperEl.style[c.transform] = "translate3d(" + p + "px, 0, 0)" | |
}; | |
g.onRequestAnimationFrame = function() { | |
if (this.state === h.STATE.ZOOMED && !this._transformRemoved) { | |
this._panImage(); | |
requestAnimationFrame(this._boundRaf) | |
} | |
}; | |
g.applyIECompatability = function() { | |
this.element.style.cursor = "pointer" | |
}; | |
g._calcDistance = function(q, p) { | |
return Math.sqrt(Math.pow(q[0] - p[0], 2) + Math.pow(q[1] - p[1], 2)) | |
}; | |
b.exports = h | |
}, { | |
"../utils/BrowserPrefixed": 686, | |
"ac-dom-events": 39, | |
"ac-dom-metrics": 62, | |
"ac-dom-styles": 93, | |
"ac-dom-traversal": 111, | |
"ac-eclipse": "ac-eclipse", | |
"ac-viewport": 615 | |
}], | |
674: [function(d, c, h) { | |
var b = d("ac-dom-traversal/querySelectorAll"); | |
var p = d("ac-dom-styles/setStyle"); | |
var m = d("ac-viewport").Viewport; | |
var a = d("ac-dom-metrics"); | |
var n = d("ac-console").log; | |
var g = d("ac-scroll-motion-emitter").ElementScrollMotionEmitter; | |
var l = d("../utils/BrowserPrefixed"); | |
var f = d("ac-dom-events/addEventListener"); | |
var o = AC.images; | |
var j = function(q) { | |
this.el = q; | |
this.boundFunctions = { | |
_setElementStyle: this._setElementStyle.bind(this), | |
_initTransformOrigin: this._initTransformOrigin.bind(this) | |
}; | |
this._initAnimations(); | |
this._initElementScrollMotionEmitter(); | |
this.elementScrollMotionEmitter.start(); | |
this.handleScroll() | |
}; | |
var k = j.prototype; | |
k._initAnimations = function() { | |
var q = this; | |
this.animations = []; | |
this.animationEls = b("[data-scroll-animation]", this.el); | |
this.animationEls.forEach(function(u, t) { | |
if (u.hasAttribute("data-scroll-emitter")) { | |
q.animationEls.splice(t, 1) | |
} | |
}); | |
var s = this.el.getAttribute("data-scroll-emitter"); | |
var r = s ? JSON.parse(s) : {}; | |
this.resolve = r.resolve || 0.5; | |
this.begin = r.begin || 1; | |
if (this.el.hasAttribute("data-scroll-animation")) { | |
this.animationEls.push(this.el) | |
} | |
this.el.classList.add("show"); | |
f(this.el, "transitionend", function() { | |
q.el.style[l.transition] = "none" | |
}); | |
this.animationEls.forEach(function(v, u) { | |
q.animations[u] = {}; | |
q.animations[u].el = v; | |
var w = JSON.parse(v.getAttribute("data-scroll-animation")); | |
if (!w) { | |
w = {} | |
} | |
if (w.offsetX && !w.offsetXStart) { | |
w.offsetXStart = -0.5 * w.offsetX | |
} | |
if (w.offsetY && !w.offsetXStart) { | |
w.offsetYStart = -0.5 * w.offsetY | |
} | |
if (typeof w.offsetY == "string" && w.offsetY.match(/%/)) { | |
var t = parseInt(w.offsetY.replace("%", "")) / 100; | |
w.offsetY = t * a.getDimensions(v).height | |
} | |
q.animations[u].data = w; | |
q.animations[u].key = q._getImageMapKey(v) | |
}); | |
this.animations.forEach(this.boundFunctions._initTransformOrigin); | |
this.setScale(m.getBreakpoint().name) | |
}; | |
k._initElementScrollMotionEmitter = function() { | |
var s = m.clientHeight(); | |
var r = (typeof this.begin == "string" && this.begin.match(/px/)) ? parseInt(this.begin.replace("px", "")) : -s * this.begin; | |
var q = (typeof this.resolve == "string" && this.resolve.match(/px/)) ? parseInt(this.resolve.replace("px", "")) : -s * this.resolve; | |
this.elementScrollMotionEmitter = new g(this.el, { | |
smooth: true, | |
overrideScroll: true, | |
offsetTop: r, | |
offsetBottom: q, | |
friction: 12 | |
}) | |
}; | |
k._initTransformOrigin = function(r) { | |
if (r.data.origin == "false") { | |
return | |
} | |
var q = m.clientWidth() / 2 - r.el.getBoundingClientRect().left; | |
p(r.el, { | |
"transform-origin": q + "px 50%" | |
}) | |
}; | |
k._getImageMapKey = function(v) { | |
var u = v.classList; | |
var t; | |
if (!this.page) { | |
var w = window.location.pathname.split("/"); | |
this.page = w[w.length - 2]; | |
if (this.page == "iphone-6s") { | |
this.page = "overview" | |
} | |
} | |
for (var s = 0, r = u.length; s < r; s++) { | |
var q = u[s]; | |
if (q.match(/image-/)) { | |
t = q; | |
break | |
} | |
} | |
if (t) { | |
return this.page + "_" + t.replace("image-", "").replace("-", "_") | |
} | |
}; | |
k._lerp = function(r, q) { | |
return r * (1 - this._progress) + q * this._progress | |
}; | |
k.handleScroll = function() { | |
this.elementScrollMotionEmitter.handleScroll() | |
}; | |
k.setScale = function(q) { | |
var t, r, s; | |
this.animations.forEach(function(u) { | |
if (u.data[q + "Scale"]) { | |
u.scaleMultiplier = u.data[q + "Scale"] | |
} else { | |
u.scaleMultiplier = 1 | |
} | |
if (u.data[q]) { | |
u.translationMultiplier = u.data[q]; | |
return | |
} | |
t = o[u.key]; | |
if (!t || !t[q]) { | |
u.translationMultiplier = 1; | |
if (!t) { | |
n(u.key) | |
} | |
} else { | |
r = parseInt(t[q].width.replace("px", "")); | |
s = parseInt(t.large.width.replace("px", "")); | |
u.translationMultiplier = r / s | |
} | |
}) | |
}; | |
k.setupEvents = function() { | |
this.elementScrollMotionEmitter.on("draw", this.update.bind(this)) | |
}; | |
k.teardownEvents = function() { | |
this.elementScrollMotionEmitter.off() | |
}; | |
k._setElementStyle = function(t, B) { | |
var z = t.data.offsetY * t.translationMultiplier; | |
var C = t.data.offsetX * t.translationMultiplier; | |
this.animations[B].progress = this._progress; | |
this.animations[B].transY = t.data.offsetY ? this._lerp(-0.5 * z, 0.5 * z) : 0; | |
this.animations[B].transX = t.data.offsetX ? this._lerp(t.data.offsetXStart, t.data.offsetXStart + C) : 0; | |
this.animations[B].rotate = t.data.rotate ? this._lerp(0, t.data.rotate) : 0; | |
var v = this.animations[B].transY; | |
var x = this.animations[B].transX; | |
var u = this.animations[B].rotate; | |
var q = t.data.scaleStart || 1; | |
var w = t.data.scale || 1; | |
var r = (q + w) / 2; | |
q = (q - r) * t.scaleMultiplier + r; | |
w = (w - r) * t.scaleMultiplier + r; | |
var A = t.data.opacityStart ? t.data.opacityStart : 1; | |
var s = t.data.scale ? this._lerp(q, w) : 1; | |
var y = t.data.opacity ? this._lerp(A, t.data.opacity) : 1; | |
t.el.style[l.transform] = "scale(" + s + "," + s + ") translate3d(" + x + "px," + v + "px,0) rotate(" + u + "deg)"; | |
t.el.style.opacity = y | |
}; | |
k.update = function(r) { | |
var q = this; | |
this._progress = r.progress; | |
this.animations.forEach(this.boundFunctions._setElementStyle) | |
}; | |
k.destroy = function() { | |
this.teardownEvents(); | |
this.elementScrollMotionEmitter.destroy(); | |
this.elementScrollMotionEmitter = null | |
}; | |
c.exports = j | |
}, { | |
"../utils/BrowserPrefixed": 686, | |
"ac-console": 31, | |
"ac-dom-events/addEventListener": 37, | |
"ac-dom-metrics": 62, | |
"ac-dom-styles/setStyle": 105, | |
"ac-dom-traversal/querySelectorAll": 121, | |
"ac-scroll-motion-emitter": 468, | |
"ac-viewport": 615 | |
}], | |
675: [function(d, b, g) { | |
d("ac-polyfills/Object/create"); | |
var m = d("../mediaObject/decorators/GalleryDecorator"); | |
var l = d("ac-dom-emitter").DOMEmitter; | |
var a = d("ac-dom-traversal/querySelectorAll"); | |
var o = d("ac-dom-traversal/querySelector"); | |
var c = d("../model/EnabledFeatures"); | |
var f = d("./BasicGallerySection"); | |
var n = f.prototype; | |
var p = d("ac-classlist"); | |
var k = d("ac-solar"); | |
function j(t, s, r) { | |
f.call(this, t, s, r); | |
this.outgoingIndex = 0; | |
this.incomingIndex = 1; | |
this.animatedIn = false; | |
this.initialLoad = false; | |
var u = a("[data-mediaobject]", t); | |
this._mediaObjects = []; | |
var q = this; | |
u.forEach(function(x, w) { | |
var x = x || "[NO ELEMENT]"; | |
var z = x.getAttribute("data-mediaobject"); | |
z = JSON.parse(z); | |
var y, v; | |
v = new m(x, z); | |
y = v.mediaObj; | |
q._mediaObjects.push(y) | |
}) | |
} | |
var h = j.prototype = Object.create(f.prototype); | |
j.prototype.constructor = j; | |
h.load = function(q) { | |
if (!q.isDestroyed) { | |
q.on("loaded", this._onLoad.bind(q)); | |
q.load() | |
} | |
}; | |
h._onLoad = function() { | |
this.enhance() | |
}; | |
h._willShowSlide = function(q) { | |
if (q.outgoing) { | |
this.animatedIn = true; | |
var s = q.outgoing.id, | |
u = o('[data-slide-link="' + s + '"]'), | |
r = q.incoming.id, | |
t = o('[data-slide-link="' + r + '"]'); | |
this.outgoingIndex = s.substr(s.length - 1) - 1, this.incomingIndex = r.substr(r.length - 1) - 1; | |
p.remove(document.getElementById(s), "current"); | |
p.add(document.getElementById(r), "current"); | |
if (!this._mediaObjects[this.incomingIndex].isDestroyed) { | |
if (!c.IS_HANDHELD) { | |
this._fadeToBeginning(this._mediaObjects[this.outgoingIndex]); | |
this._mediaObjects[this.incomingIndex].play(); | |
this._hideStartframe(this._mediaObjects[this.incomingIndex]) | |
} | |
if (this._mediaObjects[this.incomingIndex + 1] && !this._mediaObjects[this.incomingIndex + 1].getLoaded()) { | |
this.load(this._mediaObjects[this.incomingIndex + 1]) | |
} | |
} | |
if (u && t) { | |
p.remove(u, "current"); | |
p.add(o('[data-slide-link="' + r + '"]'), "current") | |
} | |
} | |
}; | |
h._fadeToBeginning = function(r) { | |
r.pause(); | |
var s = o(".mediaObject-startframe", r.el); | |
var q = {}; | |
q.onComplete = function(t) { | |
r.reset() | |
}; | |
k.fadeIn(s, 0.7, q) | |
}; | |
h._hideStartframe = function(q) { | |
var r = o(".mediaObject-startframe", q.el); | |
r.style.opacity = 0 | |
}; | |
h._didShowSlide = function(r) { | |
this.animatedIn = true; | |
var t = r.outgoing.id, | |
s = r.incoming.id; | |
var u = t.substr(t.length - 1) - 1, | |
q = s.substr(s.length - 1) - 1 | |
}; | |
h.activate = function() { | |
n.activate.call(this); | |
if (!this._mediaObjects[this.incomingIndex].isDestroyed) { | |
if (this.animatedIn && !c.IS_HANDHELD) { | |
this._mediaObjects[this.incomingIndex].play() | |
} else { | |
if (this.initialLoad && !c.IS_HANDHELD) { | |
this._mediaObjects[this.outgoingIndex].play() | |
} else { | |
this.load(this._mediaObjects[this.incomingIndex]); | |
this.load(this._mediaObjects[this.outgoingIndex]); | |
this._mediaObjects[this.outgoingIndex].on("enhanced", function() { | |
this.play() | |
}.bind(this._mediaObjects[this.outgoingIndex])); | |
this.initialLoad = true | |
} | |
} | |
} | |
}; | |
h.deactivate = function() { | |
n.deactivate.call(this); | |
if (!this._mediaObjects[this.incomingIndex].isDestroyed) { | |
this._mediaObjects[this.incomingIndex].reset() | |
} | |
}; | |
h.onBreakpoint = function(t, w, s, r) { | |
if (t.name === "xlarge" || w.name === "xlarge") { | |
return | |
} | |
for (var u = 0, q = this._mediaObjects.length; u < q; u++) { | |
var v = this._mediaObjects[u]; | |
if (v.isDestroyed) { | |
return | |
} | |
if (!v.getDestroyed() && t.name !== w.name) { | |
v.destroy(); | |
v.isDestroyed = true | |
} | |
} | |
}; | |
b.exports = j | |
}, { | |
"../mediaObject/decorators/GalleryDecorator": 631, | |
"../model/EnabledFeatures": 634, | |
"./BasicGallerySection": 677, | |
"ac-classlist": 12, | |
"ac-dom-emitter": 35, | |
"ac-dom-traversal/querySelector": 120, | |
"ac-dom-traversal/querySelectorAll": 121, | |
"ac-polyfills/Object/create": 394, | |
"ac-solar": 509 | |
}], | |
676: [function(c, b, f) { | |
c("ac-polyfills/Object/create"); | |
c("ac-polyfills/Element/prototype.classList"); | |
var j = c("ac-console").log; | |
var a = c("ac-dom-metrics"); | |
var d = c("./../model/DataAttributes"), | |
k = c("ac-event-emitter-micro").EventEmitterMicro, | |
l = k.prototype; | |
function h(o, n, m) { | |
k.call(this); | |
this.element = o; | |
this.trackedElement = n; | |
this.rafWhenVisible = this.rafWhenVisible || false; | |
this._index = m; | |
this._hasAnimatedIn = false; | |
this.isActive = false; | |
this.name = this.name || this.element.className; | |
this._rafId = -1; | |
this.scrollToPosition = 0; | |
this.updateScrollToPosition(); | |
this._boundFunctions = { | |
_boundRaf: this.onRequestAnimationFrame.bind(this) | |
}; | |
if (this.element.hasAttribute(d.JUMP_SECTION_NAME)) { | |
var p = this.element.getElementsByTagName("a")[0]; | |
p.addEventListener("click", this._boundFunctions._onClick, false) | |
} | |
} | |
var g = h.prototype = Object.create(k.prototype); | |
h.prototype.constructor = h; | |
g.destroy = function() { | |
this.teardownEvents(); | |
cancelAnimationFrame(this._rafId); | |
this.trackedElement = null; | |
this.element = null; | |
this._boundFunctions = null; | |
l.destroy.call(this) | |
}; | |
g.activate = function() { | |
j("BaseSection::activate " + this.name); | |
this.element.classList.add("animated"); | |
this.element.classList.add("active"); | |
if (!this._hasAnimatedIn) { | |
this.animateIn(); | |
this._hasAnimatedIn = true | |
} | |
this.isActive = true; | |
if (!this.rafWhenVisible) { | |
this._rafId = requestAnimationFrame(this._boundFunctions._boundRaf) | |
} | |
}; | |
g.deactivate = function() { | |
this.element.classList.remove("active"); | |
this.isActive = false; | |
if (!this.rafWhenVisible) { | |
cancelAnimationFrame(this._rafId) | |
} | |
}; | |
g.animateIn = function() {}; | |
g.onRequestAnimationFrame = function() { | |
this._rafId = requestAnimationFrame(this._boundFunctions._boundRaf) | |
}; | |
g.onResize = function(o, n, m) { | |
this.updateScrollToPosition() | |
}; | |
g.onBreakpoint = function(o, p, n, m) {}; | |
g.onScroll = function(o, n, m) {}; | |
g.onViewWillAppear = function(n, m) { | |
if (this.rafWhenVisible) { | |
this._rafId = requestAnimationFrame(this._boundFunctions._boundRaf) | |
} | |
}; | |
g.onViewWillDisappear = function(n, m) { | |
if (this.rafWhenVisible) { | |
cancelAnimationFrame(this._rafId) | |
} | |
}; | |
g.updateScrollToPosition = function() { | |
return this.scrollToPosition = a.getPagePosition(this.element).top | |
}; | |
g.setupEvents = function() {}; | |
g.teardownEvents = function() {}; | |
g.getURL = function() { | |
return this.element.getAttribute(d.JUMP_SECTION_NAME) | |
}; | |
g.getName = function() { | |
if (!this.element.hasAttribute(d.JUMP_SECTION_NAME)) { | |
return this.element.className.split("") | |
} | |
var m = this.getURL(); | |
return m.replace(/-/g, "") | |
}; | |
b.exports = h | |
}, { | |
"./../model/DataAttributes": 633, | |
"ac-console": 31, | |
"ac-dom-metrics": 62, | |
"ac-event-emitter-micro": 217, | |
"ac-polyfills/Element/prototype.classList": 393, | |
"ac-polyfills/Object/create": 394 | |
}], | |
677: [function(c, a, t) { | |
c("ac-polyfills/Object/create"); | |
var o = c("../model/EnabledFeatures"); | |
var d = c("../utils/BrowserPrefixed"); | |
var r = c("./BaseSection"); | |
var n = r.prototype; | |
var b = c("ac-dom-traversal/querySelector"); | |
var s = c("ac-dom-traversal/querySelectorAll"); | |
var g = c("ac-dom-nodes/insertFirstChild"); | |
var q = c("ac-dom-nodes/insertAfter"); | |
var m = c("ac-browser"); | |
var p = c("ac-classlist"); | |
var u = c("ac-swipe").Swipe; | |
var l = c("ac-gallery").SlideGallery; | |
var f = c("ac-gallery").FadeGallery; | |
var k = c("../gallery/CenteredTogglenav"); | |
function j(x, w, v) { | |
r.call(this, x, w, v); | |
this.init() | |
} | |
var h = j.prototype = Object.create(r.prototype); | |
j.prototype.constructor = j; | |
h.init = function() { | |
this.galleryWrapper = b(".ac-gallery", this.element); | |
this.galleryId = this.galleryWrapper.id; | |
this.viewfinder = document.getElementById(this.galleryId); | |
this.galleryContentElements = Array.prototype.slice.call(s(".ac-gallery-content", this.element)); | |
this.triggerClass = this.galleryId + "-trigger"; | |
this.dotnav = b(".dotnav", this.element); | |
this.dotnavExpected = p.contains(this.galleryWrapper, "ac-gallery-has-dotnav"); | |
this.paddlenav = b(".paddlenav", this.element); | |
this.paddlenavExpected = p.contains(this.galleryWrapper, "ac-gallery-has-paddlenav"); | |
this.togglenav = b(".togglenav", this.element); | |
this.togglenavExpected = p.contains(this.galleryWrapper, "ac-gallery-has-togglenav"); | |
this._setGalleryType(); | |
this._boundFunctions = { | |
_boundRaf: this.onRequestAnimationFrame.bind(this), | |
_willShowSlide: this._willShowSlide.bind(this), | |
_didShowSlide: this._didShowSlide.bind(this), | |
_showNextSlide: function() { | |
this.gallery.showNext() | |
}.bind(this), | |
_showPreviousSlide: function() { | |
this.gallery.showPrevious() | |
}.bind(this) | |
}; | |
if (!this.dotnav && this.dotnavExpected) { | |
this.dotnav = this._setupDotnav() | |
} | |
if (!this.paddlenav && this.paddlenavExpected) { | |
this.paddlenav = this._setupPaddlenav() | |
} | |
if (!this.togglenav && this.togglenavExpected) { | |
this.togglenav = this._setupTogglenav() | |
} | |
this._createGallery(); | |
if (this.togglenav) { | |
this.centeredTogglenav = new k({ | |
togglenavEl: this.togglenav, | |
togglenavItemSelector: "." + this.triggerClass | |
}) | |
} | |
if (o.IS_HANDHELD && this.galleryType === "slide") { | |
this.swipeEl = new u(this.galleryWrapper); | |
this.swipeEl.on(u.SWIPE_LEFT, this._boundFunctions._showNextSlide, false); | |
this.swipeEl.on(u.SWIPE_RIGHT, this._boundFunctions._showPreviousSlide, false) | |
} | |
}; | |
h._setGalleryType = function() { | |
var v = (m.name === "IE" && m.version <= 8); | |
if (v) { | |
p.replace(this.galleryWrapper, "ac-gallery-slide", "ac-gallery-fade") | |
} | |
this.galleryType = (p.contains(this.galleryWrapper, "ac-gallery-fade")) ? "fade" : "slide" | |
}; | |
h._setupDotnav = function() { | |
var x = document.createElement("nav"), | |
w = document.createElement("ul"); | |
var v = this; | |
this.galleryContentElements.forEach(function(z, y) { | |
w.innerHTML += '<li><a href="#' + v.galleryId + "/show/" + z.id + '" class="dotnav-item ' + v.triggerClass + '">Item ' + (y + 1) + "</a></li>" | |
}); | |
x.className = "dotnav"; | |
x.setAttribute("aria-hidden", true); | |
g(w, x); | |
q(x, this.galleryWrapper); | |
return x | |
}; | |
h._setupPaddlenav = function() { | |
var v = document.createElement("nav"); | |
v.innerHTML += '<a class="paddlenav-arrow paddlenav-arrow-left ' + this.triggerClass + '" href="#' + this.galleryId + '/previous"></a>'; | |
v.innerHTML += '<a class="paddlenav-arrow paddlenav-arrow-right ' + this.triggerClass + '" href="#' + this.galleryId + '/next"></a>'; | |
v.className = "paddlenav"; | |
ac_dom.insertLastChild(v, this.galleryWrapper); | |
return v | |
}; | |
h._setupTogglenav = function() { | |
var x = document.createElement("nav"), | |
w = document.createElement("ul"); | |
var v = this; | |
this.galleryContentElements.forEach(function(z, y) { | |
var A = z.getAttribute("data-slide-title"); | |
w.innerHTML += '<li><a href="#' + v.galleryId + "/show/" + z.id + '" class="togglenav-button ' + v.triggerClass + '">' + A + "</a></li>" | |
}); | |
x.className = "togglenav gallery-togglenav"; | |
g(w, x); | |
q(x, this.galleryWrapper); | |
return x | |
}; | |
h._willShowSlide = function(v) { | |
if (v.incoming) { | |
if (v.outgoing) { | |
p.add(this.galleryWrapper, "ac-gallery-is-transitioning"); | |
var x = v.outgoing.id, | |
z = b('[data-slide-link="' + x + '"]'); | |
p.add(document.getElementById(x), "transitioning"); | |
p.remove(document.getElementById(x), "current"); | |
if (z) { | |
p.add(z, "transitioning"); | |
p.remove(z, "current") | |
} | |
} | |
var w = v.incoming.id, | |
y = b('[data-slide-link="' + w + '"]'); | |
p.add(document.getElementById(w), "current"); | |
if (y) { | |
p.add(y, "current") | |
} | |
} | |
if (this.centeredTogglenav) { | |
this.centeredTogglenav.update() | |
} | |
}; | |
h._didShowSlide = function(v) { | |
p.remove(this.galleryWrapper, "ac-gallery-is-transitioning"); | |
if (v.outgoing) { | |
var x = v.outgoing.id; | |
p.remove(document.getElementById(x), "transitioning") | |
} | |
var y = v.incoming.attributes.element.getAttribute("data-buylink"); | |
var w = b(".buylink-target", this.element); | |
if (y && w) { | |
w.href = y | |
} | |
}; | |
h._createGallery = function() { | |
switch (this.galleryType) { | |
case "fade": | |
var v = f.create({ | |
id: this.galleryId, | |
el: this.viewfinder, | |
model: this.galleryContentElements, | |
triggerSelector: "." + this.triggerClass, | |
easing: "cubic-bezier(.35,.01,.34,1)", | |
duration: 0.6, | |
pointer: { | |
touch: true | |
} | |
}); | |
break; | |
default: | |
var v = l.create({ | |
el: this.viewfinder, | |
id: this.galleryId, | |
slideEl: document.getElementById(this.galleryId + "-slides"), | |
easing: "cubic-bezier(.35,.01,.34,1)", | |
model: this.galleryContentElements, | |
triggerSelector: "." + this.triggerClass, | |
duration: 0.6, | |
pointer: { | |
mouse: true, | |
touch: (!o.IS_HANDHELD) | |
} | |
}); | |
break | |
} | |
this.gallery = v | |
}; | |
h.setupEvents = function() { | |
this.gallery.on("willShow", this._boundFunctions._willShowSlide); | |
this.gallery.on("didShow", this._boundFunctions._didShowSlide); | |
this.gallery.once("ready", this._boundFunctions._willShowSlide) | |
}; | |
h.teardownEvents = function() { | |
n.teardownEvents.call(this) | |
}; | |
h.activate = function() { | |
n.activate.call(this) | |
}; | |
h.deactivate = function() { | |
n.deactivate.call(this) | |
}; | |
h.animateIn = function() { | |
n.animateIn.call(this) | |
}; | |
h.onRequestAnimationFrame = function() { | |
n.onRequestAnimationFrame.call(this) | |
}; | |
h.onScroll = function(x, w, v) { | |
n.onScroll.call(this, x, w, v) | |
}; | |
h.onResize = function(x, w, v) { | |
n.onResize.call(this, x, w, v); | |
if (this.centeredTogglenav) { | |
this.centeredTogglenav.update() | |
} | |
}; | |
h.onBreakpoint = function(x, y, w, v) { | |
if (this.centeredTogglenav) { | |
this.centeredTogglenav.update() | |
} | |
}; | |
h.onViewWillAppear = function(w, v) { | |
n.onViewWillAppear.call(this, w, v) | |
}; | |
h.onViewWillDisappear = function(w, v) { | |
n.onViewWillDisappear.call(this, w, v) | |
}; | |
h.destroy = function() { | |
n.destroy.call(this) | |
}; | |
a.exports = j | |
}, { | |
"../gallery/CenteredTogglenav": 626, | |
"../model/EnabledFeatures": 634, | |
"../utils/BrowserPrefixed": 686, | |
"./BaseSection": 676, | |
"ac-browser": 1, | |
"ac-classlist": 12, | |
"ac-dom-nodes/insertAfter": 76, | |
"ac-dom-nodes/insertFirstChild": 78, | |
"ac-dom-traversal/querySelector": 120, | |
"ac-dom-traversal/querySelectorAll": 121, | |
"ac-gallery": 320, | |
"ac-polyfills/Object/create": 394, | |
"ac-swipe": 519 | |
}], | |
678: [function(f, d, g) { | |
f("ac-polyfills/Object/create"); | |
var c = f("ac-dom-metrics"); | |
var p = f("../utils/BrowserPrefixed"); | |
var o = f("./BaseSection"); | |
var q = o.prototype; | |
var r = f("ac-dom-traversal/querySelector"); | |
var b = f("ac-dom-traversal/querySelectorAll"); | |
var m = f("ac-dom-events/addEventListener"); | |
var a = f("ac-dom-events/removeEventListener"); | |
var s = f("ac-classlist"); | |
var k = f("ac-gallery").FadeGallery; | |
var l = f("ac-analytics"); | |
var j = l.createBasicObserverSuite(); | |
function n(v, u, t) { | |
this.name = "ColorPickerGallerySection"; | |
o.call(this, v, u, t); | |
this.rafWhenVisible = false; | |
this.galleryWrapper = r(".ac-gallery", this.element); | |
this.galleryId = this.galleryWrapper.id; | |
this.galleryShortName = this.galleryWrapper.id.split("-")[2]; | |
this.gallerySlideWrapper = document.getElementById(this.galleryId + "-slides"); | |
this.deviceLinksEle = r("[data-target-type=device]", this.element); | |
this.deviceLinksAll = Array.prototype.slice.call(b("a.colorselector-link", this.deviceLinksEle)); | |
this.caseLinksEle = r("[data-target-type=case]", this.element); | |
this.caseLinksAll = Array.prototype.slice.call(b("a.colorselector-link", this.caseLinksEle)); | |
this.prodLink6s = r(".buynow-6s", this.element); | |
this.prodLink6sPlus = r(".buynow-6s-plus", this.element); | |
this._textLocalizationFn = this._createTextLocalizationFn(); | |
this._prepGalleryMarkup(); | |
this.gallGalleryElements = Array.prototype.slice.call(b(".ac-gallery-content", this.element)); | |
this.fadeGallery = k.create({ | |
id: this.galleryId, | |
el: this.galleryWrapper, | |
model: this.gallGalleryElements, | |
easing: "ease", | |
pointer: { | |
touch: false | |
} | |
}); | |
this._boundFunctions._handleDidShow = function(w) { | |
this._updateSelectorLinks(this._getColorGalleryData(w)); | |
this._setSlideVisibilityClassification(w, "didShow") | |
}.bind(this); | |
this._boundFunctions._handleWillShow = function(w) { | |
this._updateSelectorLinks(this._getColorGalleryData(w)); | |
this._setSlideVisibilityClassification(w, "willShow") | |
}.bind(this); | |
this.fadeGallery.on("didShow", this._boundFunctions._handleDidShow); | |
this.fadeGallery.on("willShow", this._boundFunctions._handleWillShow); | |
this.fadeGallery.once("ready", this._boundFunctions._handleWillShow) | |
} | |
var h = n.prototype = Object.create(o.prototype); | |
n.prototype.constructor = n; | |
h._setSlideVisibilityClassification = function(t, u) { | |
switch (u) { | |
case "didShow": | |
s.remove(document.getElementById(t.outgoing.id), "current"); | |
break; | |
case "willShow": | |
s.add(document.getElementById(t.incoming.id), "current"); | |
break | |
} | |
}; | |
h._getLinkToggleElement = function(u, v) { | |
var t = null; | |
Array.prototype.slice.call(b("[data-target-type=" + u + "] a[data-color-name] ", this.element)).forEach(function(w) { | |
if (r(".colorselector-caption", w).getAttribute("data-color-name") === v) { | |
t = w | |
} | |
}); | |
return t | |
}; | |
h._updateSelectorLinks = function(v) { | |
var t = r("a.current", this.deviceLinksEle), | |
u = r("a.current", this.caseLinksEle); | |
if (t && t.getAttribute("data-color-name") !== v.deviceColor) { | |
s.remove(t, "current") | |
} | |
if (u && u.getAttribute("data-color-name") !== v.caseColor) { | |
s.remove(u, "current"); | |
this._updateProdLinks(v) | |
} | |
s.add(this._getLinkToggleElement("device", v.deviceColor), "current"); | |
s.add(this._getLinkToggleElement("case", v.caseColor), "current") | |
}; | |
h._getColorClickData = function(u) { | |
var F = r(".colorselector-caption", u).getAttribute("data-color-name"), | |
y = u.getAttribute("data-color-name"), | |
t = u.parentNode.parentNode.getAttribute("data-target-type"), | |
v = (t == "case") ? "device" : "case", | |
D = r("[data-target-type=" + v + "] a.current .colorselector-caption", this.element).getAttribute("data-color-name"), | |
C = r("[data-target-type=" + v + "] a.current", this.element).getAttribute("data-color-name"), | |
E = (t == "case") ? F : D, | |
B = (t == "case") ? y : C, | |
x = (t == "device") ? F : D, | |
z = (t == "device") ? y : C, | |
w = (u.href && u.href.indexOf("/shop/goto/product/") != -1) ? u.href : undefined, | |
A = (w && u.getAttribute("data-url-plus")) ? w.substring(0, w.lastIndexOf("/") + 1) + u.getAttribute("data-url-plus") : undefined; | |
return { | |
caseLinkUrl6s: w, | |
caseLinkUrl6sPlus: A, | |
isCurrent: s.contains(u, "current"), | |
thisColorTarget: u, | |
targetType: t, | |
caseColor: E, | |
caseColorLocal: B, | |
deviceColor: x, | |
deviceColorLocal: z, | |
galleryTarget: [this.galleryId, "view", x.split(/\s+/).join(""), E.split(/\s+/).join("")].join("-").toLowerCase() | |
} | |
}; | |
h._getColorGalleryData = function(u) { | |
var v = this._getLinkToggleElement("case", r(".case-color-name", document.getElementById(u.incoming.id)).getAttribute("data-color-name-case")); | |
if (v) { | |
var w = v.href; | |
var t = (w && v.getAttribute("data-url-plus")) ? w.substring(0, w.lastIndexOf("/") + 1) + v.getAttribute("data-url-plus") : null | |
} | |
return { | |
caseLinkUrl6s: w, | |
caseLinkUrl6sPlus: t, | |
isCurrent: false, | |
thisColorTarget: null, | |
targetType: null, | |
caseColor: document.getElementById(u.incoming.id).getAttribute("data-color-name-case"), | |
caseColorLocal: r(".case-color-name", document.getElementById(u.incoming.id)).innerHTML, | |
deviceColor: document.getElementById(u.incoming.id).getAttribute("data-color-name-device"), | |
deviceColorLocal: r(".device-color-name", document.getElementById(u.incoming.id)).innerHTML, | |
galleryTarget: u.incoming.id | |
} | |
}; | |
h._updateProdLinks = function(t) { | |
if (this.prodLink6s && t.caseLinkUrl6s) { | |
this.prodLink6s.href = t.caseLinkUrl6s | |
} | |
if (this.prodLink6sPlus && t.caseLinkUrl6sPlus) { | |
this.prodLink6sPlus.href = t.caseLinkUrl6sPlus | |
} | |
}; | |
h._handleColorClick = function(t) { | |
t.preventDefault(); | |
var v = t.currentTarget; | |
var u = this._getColorClickData(v); | |
if (!u.isCurrent) { | |
j.click.track(t, (v || null)); | |
this._updateSelectorLinks(u); | |
this.fadeGallery.show(u.galleryTarget); | |
this._updateProdLinks(u) | |
} | |
}; | |
h._colorLinkDataAttribute = function(w, u) { | |
var v = r(".colorselector-caption", w); | |
if (v) { | |
var t = (u || !v.getAttribute("data-color-name")) ? v.innerHTML.toString() : v.getAttribute("data-color-name"); | |
w.setAttribute("data-color-name", t); | |
return w.getAttribute("data-color-name") | |
} | |
return "" | |
}; | |
h._prepGalleryMarkup = function() { | |
var t = this; | |
t.deviceLinksAll.forEach(function(w) { | |
var v = t._colorLinkDataAttribute(w), | |
u = t._colorLinkDataAttribute(w, true); | |
t.caseLinksAll.forEach(function(D) { | |
var B = t._colorLinkDataAttribute(D), | |
x = t._colorLinkDataAttribute(D, true), | |
C = [t.galleryId, "view", v, B].join("-").split(/\s+/).join("").toLowerCase(); | |
if (!document.getElementById(C)) { | |
var y = document.createElement("figure"); | |
y.setAttribute("data-color-name-device", v); | |
y.setAttribute("data-color-name-case", B); | |
y.id = C; | |
var E = '<div class="small-text-right caption caption-text">' + t._textLocalizationFn(u, x) + "</div>"; | |
var F = v.split(/\s+/).join("").toLowerCase(), | |
z = B.split(/\s+/).join("").toLowerCase(), | |
A = [t.galleryShortName, F, z].join("_"); | |
y.className = "image-device-and-case ac-gallery-content " + A; | |
y.innerHTML = E; | |
t.gallerySlideWrapper.appendChild(y) | |
} else { | |
var y = document.getElementById(C); | |
y.setAttribute("data-color-name-device", v); | |
y.setAttribute("data-color-name-case", B) | |
} | |
}) | |
}) | |
}; | |
h._createTextLocalizationFn = function() { | |
var u = r(".product-name", this.element), | |
v = u.innerHTML; | |
var w = r(".color-description", this.element), | |
x = w.innerHTML.split(/>[^<]+<\//).join("><!--COLORNAME--></"), | |
t = x.split("<!--COLORNAME-->"); | |
return function(y, A) { | |
var z = '<p class="product-name">' + v + "</p>"; | |
z += '<p class="product-name">' + t[0] + y + t[1] + A + t[2] + "</p>"; | |
return z | |
} | |
}; | |
h.setupEvents = function() { | |
var t = this; | |
this.colorTargets = Array.prototype.slice.call(b("a.colorselector-link", this.element)); | |
this._boundFunctions._handleColorClick = this._handleColorClick.bind(this); | |
this.colorTargets.forEach(function(u) { | |
m(u, "click", t._boundFunctions._handleColorClick, false) | |
}); | |
this.fadeGallery.on("didShow", this._boundFunctions._handleDidShow) | |
}; | |
h.teardownEvents = function() { | |
var t = this; | |
this.colorTargets.forEach(function(u) { | |
a(u, "click", t._boundFunctions._handleColorClick) | |
}); | |
q.teardownEvents.call(this) | |
}; | |
h.activate = function() { | |
q.activate.call(this) | |
}; | |
h.deactivate = function() { | |
q.deactivate.call(this) | |
}; | |
h.animateIn = function() { | |
q.animateIn.call(this) | |
}; | |
h.onRequestAnimationFrame = function() { | |
q.onRequestAnimationFrame.call(this) | |
}; | |
h.onScroll = function(v, u, t) { | |
q.onScroll.call(this, v, u, t) | |
}; | |
h.onResize = function(v, u, t) { | |
q.onResize.call(this, v, u, t) | |
}; | |
h.onBreakpoint = function(v, w, u, t) {}; | |
h.onViewWillAppear = function(u, t) { | |
q.onViewWillAppear.call(this, u, t) | |
}; | |
h.onViewWillDisappear = function(u, t) { | |
q.onViewWillDisappear.call(this, u, t) | |
}; | |
h.destroy = function() { | |
q.destroy.call(this) | |
}; | |
d.exports = n | |
}, { | |
"../utils/BrowserPrefixed": 686, | |
"./BaseSection": 676, | |
"ac-analytics": "ac-analytics", | |
"ac-classlist": 12, | |
"ac-dom-events/addEventListener": 37, | |
"ac-dom-events/removeEventListener": 45, | |
"ac-dom-metrics": 62, | |
"ac-dom-traversal/querySelector": 120, | |
"ac-dom-traversal/querySelectorAll": 121, | |
"ac-gallery": 320, | |
"ac-polyfills/Object/create": 394 | |
}], | |
679: [function(h, g, l) { | |
h("ac-polyfills/Object/create"); | |
var c = h("ac-dom-metrics"); | |
var o = h("../utils/BrowserPrefixed"); | |
var a = h("../engagementAnimation/EngagementAnimation"); | |
var f = h("ac-dom-traversal/querySelectorAll"); | |
var b = h("ac-element-engagement").ElementEngagement; | |
var k = h("ac-viewport").Viewport; | |
var d = h("../utils/animationCapable"); | |
var n = h("./BaseSection"); | |
var p = n.prototype; | |
function j(u, t, s) { | |
this.name = "EngagementAnimationSection"; | |
n.call(this, u, t, s); | |
var v = k.getBreakpoint().name; | |
if (v === "xlarge") { | |
v = "large" | |
} | |
this.animations = []; | |
var r = f("[data-animate-in]"); | |
var q = this; | |
if (d) { | |
this._animationElementTracker = new b(); | |
r.forEach(function(x, w) { | |
q.animations[w] = new a(x, v, { | |
elementEngagement: q._animationElementTracker | |
}) | |
}) | |
} | |
} | |
var m = j.prototype = Object.create(n.prototype); | |
j.prototype.constructor = j; | |
m.setupEvents = function() {}; | |
m.teardownEvents = function() { | |
p.teardownEvents.call(this) | |
}; | |
m.activate = function() { | |
p.activate.call(this); | |
this._animationElementTracker.start() | |
}; | |
m.deactivate = function() { | |
p.deactivate.call(this) | |
}; | |
m.animateIn = function() { | |
p.animateIn.call(this) | |
}; | |
m.onRequestAnimationFrame = function() { | |
p.onRequestAnimationFrame.call(this) | |
}; | |
m.onScroll = function(s, r, q) { | |
p.onScroll.call(this, s, r, q) | |
}; | |
m.onResize = function(s, r, q) { | |
p.onResize.call(this, s, r, q) | |
}; | |
m.onBreakpoint = function(t, u, s, q) { | |
var r = this; | |
if (t.name === "xlarge" || u.name === "xlarge") { | |
return | |
} | |
this.animations.forEach(function(w, v) { | |
w.updateAnimationOnBreakpoint(t.name) | |
}) | |
}; | |
m.onViewWillAppear = function(r, q) { | |
p.onViewWillAppear.call(this, r, q) | |
}; | |
m.onViewWillDisappear = function(r, q) { | |
p.onViewWillDisappear.call(this, r, q) | |
}; | |
m.destroy = function() { | |
p.destroy.call(this) | |
}; | |
g.exports = j | |
}, { | |
"../engagementAnimation/EngagementAnimation": 624, | |
"../utils/BrowserPrefixed": 686, | |
"../utils/animationCapable": 687, | |
"./BaseSection": 676, | |
"ac-dom-metrics": 62, | |
"ac-dom-traversal/querySelectorAll": 121, | |
"ac-element-engagement": 145, | |
"ac-polyfills/Object/create": 394, | |
"ac-viewport": 615 | |
}], | |
680: [function(c, b, d) { | |
c("ac-polyfills/Object/create"); | |
var a = c("ac-dom-metrics"); | |
var h = c("../utils/BrowserPrefixed"); | |
var g = c("./BaseSection"); | |
var j = g.prototype; | |
function k(n, m, l) { | |
this.name = "FadeInHeroSection"; | |
g.call(this, n, m, l); | |
this.rafWhenVisible = false; | |
this.element.classList.add("reveal") | |
} | |
var f = k.prototype = Object.create(g.prototype); | |
k.prototype.constructor = k; | |
f.setupEvents = function() {}; | |
f.teardownEvents = function() { | |
j.teardownEvents.call(this) | |
}; | |
f.activate = function() { | |
j.activate.call(this) | |
}; | |
f.deactivate = function() { | |
j.deactivate.call(this) | |
}; | |
f.animateIn = function() { | |
j.animateIn.call(this) | |
}; | |
f.onRequestAnimationFrame = function() { | |
j.onRequestAnimationFrame.call(this) | |
}; | |
f.onScroll = function(n, m, l) { | |
j.onScroll.call(this, n, m, l) | |
}; | |
f.onResize = function(n, m, l) { | |
j.onResize.call(this, n, m, l) | |
}; | |
f.onBreakpoint = function(n, o, m, l) {}; | |
f.onViewWillAppear = function(m, l) { | |
j.onViewWillAppear.call(this, m, l) | |
}; | |
f.onViewWillDisappear = function(m, l) { | |
j.onViewWillDisappear.call(this, m, l) | |
}; | |
f.destroy = function() { | |
j.destroy.call(this) | |
}; | |
b.exports = k | |
}, { | |
"../utils/BrowserPrefixed": 686, | |
"./BaseSection": 676, | |
"ac-dom-metrics": 62, | |
"ac-polyfills/Object/create": 394 | |
}], | |
681: [function(h, c, t) { | |
h("ac-polyfills/Object/create"); | |
var j = h("../mediaObject/decorators/BasicDecorator"); | |
var r = h("../mediaObject/decorators/AutoplayDecorator"); | |
var f = h("../mediaObject/decorators/ReplayDecorator"); | |
var o = h("../model/EnabledFeatures"); | |
var p = h("../pages/overview/OverviewStatusProxy"); | |
var b = h("ac-dom-events"); | |
var g = h("ac-dom-emitter").DOMEmitter; | |
var m = h("ac-dom-traversal").querySelectorAll; | |
var d = h("ac-dom-traversal").querySelector; | |
var q = h("ac-viewport").Viewport; | |
var a = h("ac-element-tracker").ElementTracker; | |
var u = h("ac-classlist"); | |
var s = h("./BaseSection"); | |
var n = s.prototype; | |
function k(x, w, v) { | |
s.call(this, x, w, v); | |
var z = m("[data-mediaobject]", x); | |
this.mediaObjectContainers = z; | |
this._mediaObjectElementTracker = new a(null, { | |
autoStart: false | |
}); | |
this._mediaObjects = []; | |
this._boundOnInit = this._init.bind(this); | |
var y = d(".page-overview", document.documentElement); | |
if (this.mediaObjectContainers) { | |
if (y) { | |
if (p.ready) { | |
this._boundOnInit() | |
} else { | |
p.on("ready", this._boundOnInit) | |
} | |
} else { | |
this._boundOnInit() | |
} | |
} | |
} | |
var l = k.prototype = Object.create(s.prototype); | |
k.prototype.constructor = k; | |
l.mediaObjectsVisibleClass = "mediaObjects-visible"; | |
l._init = function() { | |
this.mediaObjectContainers.forEach(function(y, x) { | |
var y = y || "[NO ELEMENT]"; | |
var A = y.getAttribute("data-mediaobject"); | |
A = JSON.parse(A); | |
if (!this.shouldBeStatic(A)) { | |
var w = this._mediaObjectElementTracker.addElement(y); | |
var z, v; | |
if (A.decorator === "replay") { | |
v = new f(y, w, A); | |
z = v.mediaObj; | |
z.decorator = A.decorator | |
} else { | |
if (A.decorator === "autoplay") { | |
v = new r(y, w, A); | |
z = v.mediaObj; | |
z.decorator = A.decorator | |
} else { | |
v = new j(y, w, A); | |
z = v.mediaObj; | |
z.decorator = "basic" | |
} | |
} | |
if (A.name === "overview/3dtouch") { | |
v.shouldEnhance = false | |
} | |
this._mediaObjects.push(z); | |
this._mediaObjectElementTracker.refreshElementState(w) | |
} | |
}.bind(this)) | |
}; | |
l.onBreakpoint = function(y, B, x, w) { | |
if (y.name === "xlarge" || B.name === "xlarge") { | |
return | |
} | |
if (this.mediaObjectContainers) { | |
for (var z = 0, v = this._mediaObjects.length; z < v; z++) { | |
var A = this._mediaObjects[z]; | |
if (A.isDestroyed) { | |
return | |
} | |
if (!A.getDestroyed() && y.name !== B.name) { | |
A.destroy(); | |
A.isDestroyed = true | |
} | |
} | |
} | |
}; | |
l.shouldBeStatic = function(v) { | |
if (v["static"] === q.getBreakpoint().name) { | |
return true | |
} else { | |
if (v["static"] === "touch" && o.TOUCH) { | |
return true | |
} else { | |
return false | |
} | |
} | |
}; | |
l.activate = function() { | |
n.activate.call(this) | |
}; | |
l.deactivate = function() { | |
n.activate.call(this) | |
}; | |
l.teardownEvents = function() { | |
n.teardownEvents.call(this) | |
}; | |
l.onScroll = function(x, w, v) { | |
n.onScroll.call(this, x, w, v) | |
}; | |
l.onResize = function(x, w, v) { | |
n.onResize.call(this, x, w, v) | |
}; | |
l.animateIn = function() { | |
n.animateIn.call(this) | |
}; | |
l.onViewWillAppear = function(w, v) { | |
n.onViewWillAppear.call(this, w, v); | |
this._mediaObjects.forEach(function(x) { | |
if (!x.isDestroyed && !x.getEnhanced()) { | |
x.trigger("shouldenhance") | |
} | |
}); | |
if (!p.ready && p.overviewSection) { | |
p.overviewSection.triggerAllClassNameFallback() | |
} | |
if (this.mediaObjectContainers) { | |
this._mediaObjectElementTracker.start() | |
} | |
if (this.mediaObjectContainers) { | |
u.add(this.element, this.mediaObjectsVisibleClass) | |
} | |
}; | |
l.onViewWillDisappear = function(w, v) { | |
n.onViewWillDisappear.call(this, w, v); | |
if (this.mediaObjectContainers) { | |
u.remove(this.element, this.mediaObjectsVisibleClass) | |
} | |
}; | |
l.destroy = function() { | |
n.destroy.call(this) | |
}; | |
c.exports = k | |
}, { | |
"../mediaObject/decorators/AutoplayDecorator": 629, | |
"../mediaObject/decorators/BasicDecorator": 630, | |
"../mediaObject/decorators/ReplayDecorator": 632, | |
"../model/EnabledFeatures": 634, | |
"../pages/overview/OverviewStatusProxy": 654, | |
"./BaseSection": 676, | |
"ac-classlist": 12, | |
"ac-dom-emitter": 35, | |
"ac-dom-events": 39, | |
"ac-dom-traversal": 111, | |
"ac-element-tracker": 214, | |
"ac-polyfills/Object/create": 394, | |
"ac-viewport": 615 | |
}], | |
682: [function(c, b, f) { | |
c("ac-polyfills/Object/create"); | |
var a = c("ac-dom-metrics"); | |
var l = c("../utils/BrowserPrefixed"); | |
var h = c("../panorama/PanoramasController"); | |
var d = c("ac-feature"); | |
var j = c("ac-browser"); | |
var k = c("./BaseSection"); | |
var n = k.prototype; | |
function m(q, p, o) { | |
this.name = "PanoramaSection"; | |
k.call(this, q, p, o); | |
if ((j.IE && j.IE.documentMode < 9)) { | |
return | |
} | |
this.panoramasController = new h(); | |
this.rafWhenVisible = false | |
} | |
var g = m.prototype = Object.create(k.prototype); | |
m.prototype.constructor = m; | |
g.setupEvents = function() {}; | |
g.teardownEvents = function() { | |
n.teardownEvents.call(this) | |
}; | |
g.activate = function() { | |
n.activate.call(this) | |
}; | |
g.deactivate = function() { | |
n.deactivate.call(this) | |
}; | |
g.animateIn = function() { | |
n.animateIn.call(this) | |
}; | |
g.onRequestAnimationFrame = function() { | |
n.onRequestAnimationFrame.call(this) | |
}; | |
g.onScroll = function(q, p, o) { | |
n.onScroll.call(this, q, p, o) | |
}; | |
g.onResize = function(q, p, o) { | |
n.onResize.call(this, q, p, o); | |
this.panoramasController.boundOnResize() | |
}; | |
g.onBreakpoint = function(q, r, p, o) { | |
this.panoramasController.setBreakpoint(q) | |
}; | |
g.onViewWillAppear = function(p, o) { | |
n.onViewWillAppear.call(this, p, o) | |
}; | |
g.onViewWillDisappear = function(p, o) { | |
n.onViewWillDisappear.call(this, p, o) | |
}; | |
g.destroy = function() { | |
n.destroy.call(this) | |
}; | |
b.exports = m | |
}, { | |
"../panorama/PanoramasController": 672, | |
"../utils/BrowserPrefixed": 686, | |
"./BaseSection": 676, | |
"ac-browser": 1, | |
"ac-dom-metrics": 62, | |
"ac-feature": 230, | |
"ac-polyfills/Object/create": 394 | |
}], | |
683: [function(c, a, g) { | |
var l = c("./ScrollAnimationSection"); | |
var n = l.prototype; | |
var b = c("../model/EnabledFeatures"); | |
var d = c("../ElementDistanceCalculator"); | |
var h = c("ac-dom-traversal/querySelector"); | |
var f = c("ac-object"); | |
var m = c("ac-viewport").Viewport; | |
function k(q, p, o) { | |
this.name = "ParallaxWebGLSection - " + (q.querySelector("h1") || q.querySelector("h2")).innerText; | |
l.call(this, q, p, o); | |
this._didInit = false; | |
this._hasThree = false; | |
if (!b.WEB_GL) { | |
return | |
} | |
this.initializeTargets(); | |
this._initializeWebGLEffects(); | |
m.on("breakpoint", this._handleBreakpoint.bind(this)) | |
} | |
var j = k.prototype = f.create(l.prototype); | |
j.initializeTargets = function() {}; | |
j._initializeWebGLEffects = function() { | |
this.distanceCalculator = new d({ | |
els: this.devices | |
}); | |
this.effects = {}; | |
if (!!window.THREE) { | |
this._onThreeReady(); | |
return | |
} | |
var o = setInterval(function() { | |
if (!!window.THREE) { | |
clearInterval(o); | |
this._onThreeReady() | |
} | |
}.bind(this), 200) | |
}; | |
j._getScrollAnimationByKey = function(o) { | |
return this.scrollAnimations[0].animations[this.animationKeys[o]] | |
}; | |
j._onThreeReady = function() { | |
var p, o; | |
for (p in this.devices) { | |
if (this.devices.hasOwnProperty(p)) { | |
o = this.effectsObj[p]; | |
if (o.length > 0) { | |
this.effects[p] = []; | |
o.forEach(function(r, q) { | |
var s = new q(this, r); | |
s.initialize(); | |
this.effects[r].push(s); | |
this.devices[r].appendChild(s.el); | |
s.setSize() | |
}.bind(this, p)) | |
} | |
} | |
} | |
this._didInit = true | |
}; | |
j._handleBreakpoint = function() { | |
if (this.distanceCalculator) { | |
this.distanceCalculator.initializeElements() | |
} | |
}; | |
j.activate = function() { | |
n.activate.call(this) | |
}; | |
j.deactivate = function() { | |
n.deactivate.call(this) | |
}; | |
j.animateIn = function() { | |
n.animateIn.call(this) | |
}; | |
j.onRequestAnimationFrame = function() { | |
n.onRequestAnimationFrame.call(this); | |
return; | |
if (!this._didInit) { | |
return | |
} | |
return; | |
this.distanceCalculator.parallaxOffsets = {}; | |
var q; | |
for (q in this.animationKeys) { | |
if (this |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment