#1 JavaScript::Eval (size: 2462, repeated: 1) /* Copyright (C) YOOtheme GmbH, YOOtheme Proprietary Use License (http://www.yootheme.com/license) */
(function(d) {
var e = function() {};
d.extend(e.prototype, {
name: "spotlight",
options: {
effect: "fade",
duration: 300,
transition: "swing",
cls: "spotlight",
overlaySelector: ".overlay",
overlayDefault: "overlay-default"
},
initialize: function(c, a) {
a = d.extend({}, this.options, a, c.data());
c.attr("data-spotlight") && d.each(c.attr("data-spotlight").split(";"), function(b, c) {
var d = c.match(/\s*([A-Z_]*?)\s*:\s*(.+)\s*/i);
d && (a[d[1]] = d[2])
});
var b = c.children(a.overlaySelector).first();
b.length || (b = d("<div>").addClass(a.overlayDefault).appendTo(c));
b.css({
position: "absolute",
visibility: "hidden",
display: "block"
}).wrapInner("<div>");
c.css({
position: "relative",
overflow: "hidden"
}).addClass(a.cls);
c.bind({
mouseenter: function() {
b.stop().css({
visibility: "visible",
width: c.width(),
height: "top" == a.effect || "bottom" == a.effect ? "auto" : c.height()
});
switch (a.effect) {
case "right":
b.css({
right: -1 * b.width(),
top: 0,
bottom: 0
}).animate({
right: 0
}, a.duration, a.transition);
break;
case "left":
b.css({
left: -1 * b.width(),
top: 0,
bottom: 0
}).animate({
left: 0
}, a.duration, a.transition);
break;
case "top":
b.css({
left: 0,
top: -1 * b.height()
}).animate({
top: 0
}, a.duration, a.transition);
break;
case "bottom":
b.css({
left: 0,
bottom: -1 * b.height()
}).animate({
bottom: 0
}, a.duration, a.transition);
break;
default:
b.show().css({
opacity: 0,
top: 0,
left: 0
}).animate({
opacity: 1
}, a.duration, a.transition, function() {
d.support.opacity || (b.get(0).filter = "", b.attr("style", ("" + b.attr("style")).replace(/alpha\(opacity=([\d.]+)\)/i, "")))
})
}
},
mouseleave: function() {
b.stop();
switch (a.effect) {
case "right":
b.animate({
right: -1 * b.width()
}, a.duration, a.transition);
break;
case "left":
b.animate({
left: -1 * b.width()
}, a.duration, a.transition);
break;
case "top":
b.animate({
top: -1 * b.height()
}, a.duration, a.transition);
break;
case "bottom":
b.animate({
bottom: -1 * b.height()
}, a.duration, a.transition);
break;
default:
b.animate({
opacity: 0
}, a.duration, a.transition, function() {
b.hide()
})
}
}
})
}
});
d.fn[e.prototype.name] = function() {
var c = arguments,
a = c[0] ? c[0] : null;
return this.each(function() {
var b = d(this);
if (e.prototype[a] && b.data(e.prototype.name) && "initialize" != a) b.data(e.prototype.name)[a].apply(b.data(e.prototype.name), Array.prototype.slice.call(c, 1));
else if (!a || d.isPlainObject(a)) {
var f = new e;
e.prototype.initialize && f.initialize.apply(f, d.merge([b], c));
b.data(e.prototype.name, f)
} else d.error("Method " + a + " does not exist on jQuery." + e.name)
})
}
})(jQuery); |
#2 JavaScript::Eval (size: 16548, repeated: 1) /* Copyright (C) YOOtheme GmbH, YOOtheme Proprietary Use License (http://www.yootheme.com/license) */
/*
Lightbox Plugin is based on Fancybox (http://fancybox.net, Janis Skarnelis, MIT License)
*/
(function(b) {
var i, m, s, q, e, C, k, B, j, y, z, D, r = 0,
c = {},
o = [],
p = 0,
a = {},
g = [],
A = null,
t = new Image,
E, F = 1,
G = /\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,
K = /[^\.]\.(swf)\s*$/i,
H = /(\/\/.*?youtube\.[a-z]+)\/watch\?v=([^&]+)&?(.*)/,
L = /youtu\.be\/(.*)/,
I = /(\/\/.*?)vimeo\.[a-z]+\/([0-9]+).*?/,
M = /\.(mp4|ogv|webm|flv)(.*)?$/i,
u = 0,
v = "",
n, f, h = !1,
w = b.extend(b("<div/>")[0], {
prop: 0
});
_abort = function() {
s.hide();
t.onerror = t.onload = null;
A && A.abort();
m.empty()
};
_error = function() {
!1 === c.onError(o, r, c) ? (s.hide(), h = !1) : (c.titleShow = !1, c.width = "auto", c.height = "auto", m.html('<p id="lightbox-error">The requested content cannot be loaded.<br />Please try again later.</p>'), _process_inline())
};
_start = function() {
var d = o[r],
a, l, e, f, j, g;
_abort();
c = b.extend({}, i.defaults, "undefined" == typeof b(d).data(i.name) ? c : b(d).data(i.name));
b(d).attr("data-lightbox") && b.each(b(d).attr("data-lightbox").split(";"), function(a, d) {
var b = d.match(/\s*([A-Z_]*?)\s*:\s*(.+)\s*/i);
if (b && (c[b[1]] = b[2], "true" === c[b[1]] || "false" === c[b[1]])) c[b[1]] = eval(b[2])
});
g = c.onStart(o, r, c);
if (!1 === g) h = !1;
else {
"object" == typeof g && (c = b.extend(c, g));
e = c.title || (d.nodeName ? b(d).attr("title") : d.title) || "";
d.nodeName && !c.orig && (c.orig = b(d).children("img:first").length ? b(d).children("img:first") : b(d));
"" === e && (c.orig && c.titleFromAlt) && (e = c.orig.attr("alt"));
a = c.href || (d.nodeName ? b(d).attr("href") : d.href) || null;
if (/^(?:javascript)/i.test(a) || "#" == a) a = null;
c.type ? (l = c.type, a || (a = c.content)) : c.content ? l = "html" : a && (a.match(G) ? l = "image" : a.match(K) ? l = "swf" : a.match(M) ? l = "video" : a.match(H) ? (a = a.replace(H, "$1/embed/$2?$3").replace("/(.*)?$/", ""), l = "iframe") : a.match(L) ? (l = a.split("/"), a = "//www.youtube.com/embed/" + l[l.length - 1], l = "iframe") : a.match(I) ? (a = a.replace(I, "$1player.vimeo.com/video/$2"), l = "iframe") : l = -1 != a.indexOf("http://") && -1 == a.indexOf(location.hostname.toLowerCase()) ? "iframe" : 0 === a.indexOf("#wk-") ? window.wk_ajax_render_url ? "widget" : !1 : 0 === a.indexOf("#") ? "inline" : "ajax");
if (l) switch ("inline" == l && (d = a.substr(a.indexOf("#")), l = 0 < b(d).length ? "inline" : "ajax"), c.type = l, c.href = a, c.title = e, c.autoDimensions && ("iframe" !== c.type && "swf" !== c.type && "video" !== c.type && "widget" !== c.type) && (c.width = "auto", c.height = "auto"), c.modal && (c.overlayShow = !0, c.hideOnOverlayClick = !1, c.hideOnContentClick = !1, c.enableEscapeButton = !1, c.showCloseButton = !1), c.padding = parseInt(c.padding, 10), c.margin = parseInt(c.margin, 10), m.css("padding", c.padding + c.margin), b(".lightbox-inline-tmp").unbind("lightbox-cancel").bind("lightbox-change", function() {
b(this).replaceWith(k.children())
}), l) {
case "html":
m.html(c.content);
_process_inline();
break;
case "video":
h = !1;
c.scrolling = "no";
var n = "auto" == c.width ? 320 : c.width,
d = "auto" == c.height ? 240 : c.height;
e = [];
e.push('src="' + a + '"');
e.push('width="' + n + '"');
e.push('height="' + d + '"');
e.push('preload="none"');
"undefined" != b.type(c.autoplay) && e.push('autoplay="' + c.autoplay + '"');
"undefined" != b.type(c.controls) && e.push('controls="' + c.controls + '"');
"undefined" != b.type(c.loop) && e.push('loop="' + c.loop + '"');
"undefined" != b.type(c.poster) && e.push('poster="' + c.poster + '"');
m.html("<video " + e.join(" ") + " /></video>");
b.fn.mediaelementplayer && b("video", m).each(function() {
var a = new mejs.MediaElementPlayer(this);
n > b(window).width() && a.setPlayerSize("100%", "100%")
});
c.width = "auto";
c.height = "auto";
_process_inline();
break;
case "inline":
if (!0 === b(d).parent().is("#lightbox-content")) {
h = !1;
break
}
b('<div class="lightbox-inline-tmp" />').hide().insertBefore(b(d)).bind("lightbox-cleanup", function() {
b(this).replaceWith(k.children())
}).bind("lightbox-cancel", function() {
b(this).replaceWith(m.children())
});
b(d).appendTo(m);
_process_inline();
break;
case "image":
h = !1;
i.showActivity();
t = new Image;
t.onerror = function() {
_error()
};
t.onload = function() {
h = true;
t.onerror = t.onload = null;
_process_image()
};
t.src = a;
break;
case "swf":
c.scrolling = "no";
c.autoDimensions = !1;
f = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + c.width + '" height="' + c.height + '"><param name="movie" value="' + a + '"></param>';
j = "";
b.each(c.swf, function(a, d) {
f = f + ('<param name="' + a + '" value="' + d + '"></param>');
j = j + (" " + a + '="' + d + '"')
});
f += '<embed src="' + a + '" type="application/x-shockwave-flash" width="' + c.width + '" height="' + c.height + '"' + j + "></embed></object>";
m.html(f);
_process_inline();
break;
case "ajax":
h = !1;
i.showActivity();
c.ajax.win = c.ajax.success;
A = b.ajax(b.extend({}, c.ajax, {
url: a,
data: c.ajax.data || {},
error: function(a) {
a.status > 0 && _error()
},
success: function(d, b, e) {
if ((typeof e == "object" ? e : A).status == 200) {
if (typeof c.ajax.win == "function") {
g = c.ajax.win(a, d, b, e);
if (g === false) {
s.hide();
return
}
if (typeof g == "string" || typeof g == "object") d = g
}
m.html(d);
_process_inline()
}
}
}));
break;
case "widget":
h = !1;
c.autoDimensions = !1;
i.showActivity();
c.ajax.win = c.ajax.success;
A = b.ajax(b.extend({}, c.ajax, {
url: wk_ajax_render_url(a.split("-")[1]),
data: c.ajax.data || {},
error: function(a) {
a.status > 0 && _error()
},
success: function(d, e, l) {
if ((typeof l == "object" ? l : A).status == 200) {
if (typeof c.ajax.win == "function") {
g = c.ajax.win(a, d, e, l);
if (g === false) {
s.hide();
return
}
if (typeof g == "string" || typeof g == "object") d = g
}
m.html(d);
_process_inline();
$widgetkit.lazyload(b("#lightbox-content"))
}
}
}));
break;
case "iframe":
c.autoDimensions = !1, _show()
} else _error()
}
};
_process_inline = function() {
m.wrapInner('<div style="width:' + ("auto" == c.width ? "auto" : c.width + "px") + ";height:" + ("auto" == c.height ? "auto" : c.height + "px") + ";overflow: " + ("auto" == c.scrolling ? "auto" : "yes" == c.scrolling ? "scroll" : "hidden") + '"></div>');
c.width = m.width();
c.height = m.height();
_show()
};
_process_image = function() {
c.width = t.width;
c.height = t.height;
b("<img />").attr({
id: "lightbox-img",
src: t.src,
alt: c.title
}).appendTo(m);
_show()
};
_show = function() {
var d, J;
s.hide();
e.is(":visible") && !1 === a.onCleanup(g, p, a) ? (b.event.trigger("lightbox-cancel"), h = !1) : (h = !0, b(k.add(q)).unbind(), b(window).unbind("resize.fb scroll.fb"), b(document).unbind("keydown.fb"), e.is(":visible") && "outside" !== a.titlePosition && e.css("height", e.height()), g = o, p = r, a = c, a.overlayShow ? (q.css({
"background-color": a.overlayColor,
opacity: a.overlayOpacity,
cursor: a.hideOnOverlayClick ? "pointer" : "auto",
height: b(document).height()
}), q.is(":visible") || q.show()) : q.hide(), f = _get_zoom_to(), _process_title(), e.is(":visible")) ? (b(B.add(y).add(z)).hide(), d = e.position(), n = {
top: d.top,
left: d.left,
width: e.width(),
height: e.height()
}, J = n.width == f.width && n.height == f.height, k.fadeTo(a.changeFade, 0.3, function() {
var d = function() {
k.html(m.contents()).fadeTo(a.changeFade, 1, _finish)
};
b.event.trigger("lightbox-change");
k.empty().removeAttr("filter").css({
"border-width": a.padding,
width: f.width - a.padding * 2,
height: a.type == "image" || a.type == "swf" || a.type == "iframe" ? f.height - u - a.padding * 2 : "auto"
});
if (J) d();
else {
w.prop = 0;
b(w).animate({
prop: 1
}, {
duration: a.changeSpeed,
easing: a.easingChange,
step: _draw,
complete: d
})
}
})) : (e.removeAttr("style"), k.css("border-width", a.padding), k.css("-webkit-transform", "translateZ(0)"), "elastic" == a.transitionIn ? (n = _get_zoom_from(), k.html(m.contents()), e.show(), a.opacity && (f.opacity = 0), w.prop = 0, b(w).animate({
prop: 1
}, {
duration: a.speedIn,
easing: a.easingIn,
step: _draw,
complete: _finish
})) : ("inside" == a.titlePosition && 0 < u && j.show(), k.css({
width: f.width - 2 * a.padding,
height: "image" == a.type || "swf" == a.type || "iframe" == a.type ? f.height - u - 2 * a.padding : "auto"
}).html(m.contents()), e.css(f).fadeIn("none" == a.transitionIn ? 0 : a.speedIn, _finish)))
};
_format_title = function(d) {
return d && d.length ? '<div id="lightbox-title-' + a.titlePosition + '">' + d + "</div>" : !1
};
_process_title = function() {
v = a.title || "";
u = 0;
j.empty().removeAttr("style").removeClass();
if (!1 !== a.titleShow && (v = b.isFunction(a.titleFormat) ? a.titleFormat(v, g, p, a) : _format_title(v)) && "" !== v) switch (j.addClass("lightbox-title-" + a.titlePosition).html(v).appendTo("body").show(), a.titlePosition) {
case "inside":
j.css({
width: f.width - 2 * a.padding,
marginLeft: a.padding,
marginRight: a.padding
});
u = j.outerHeight(!0);
j.appendTo(C);
f.height += u;
break;
case "over":
j.css({
marginLeft: a.padding,
width: f.width - 2 * a.padding,
bottom: a.padding
}).appendTo(C);
break;
case "float":
j.css("left", -1 * parseInt((j.width() - f.width - 40) / 2, 10)).appendTo(e);
break;
default:
j.css({
width: f.width - 2 * a.padding,
paddingLeft: a.padding,
paddingRight: a.padding
}).appendTo(e)
}
j.hide()
};
_set_navigation = function() {
(a.enableEscapeButton || a.enableKeyboardNav) && b(document).bind("keydown.fb", function(d) {
if (27 == d.keyCode && a.enableEscapeButton) d.preventDefault(), i.close();
else if ((37 == d.keyCode || 39 == d.keyCode) && a.enableKeyboardNav && "INPUT" !== d.target.tagName && "TEXTAREA" !== d.target.tagName && "SELECT" !== d.target.tagName) d.preventDefault(), i[37 == d.keyCode ? "prev" : "next"]()
});
a.showNavArrows ? ((a.cyclic && 1 < g.length || 0 !== p) && y.show(), (a.cyclic && 1 < g.length || p != g.length - 1) && z.show()) : (y.hide(), z.hide())
};
_finish = function() {
b.support.opacity || (k.get(0).style.removeAttribute("filter"), e.get(0).style.removeAttribute("filter"));
e.css("height", "auto");
"image" !== a.type && ("swf" !== a.type && "iframe" !== a.type) && k.css("height", "auto");
v && v.length && j.show();
a.showCloseButton && B.show();
_set_navigation();
a.hideOnContentClick && k.bind("click", i.close);
a.hideOnOverlayClick && q.bind("click", i.close);
b(window).bind("resize.fb", i.resize);
a.centerOnScroll && b(window).bind("scroll.fb", i.center);
"iframe" == a.type && b('<iframe id="lightbox-frame" name="lightbox-frame' + (new Date).getTime() + '" frameborder="0" hspace="0" ' + (!b.support.opacity ? 'allowtransparency="true""' : "") + ' scrolling="' + c.scrolling + '" src="' + a.href + '"></iframe>').appendTo(k);
e.show();
h = !1;
i.center();
a.onComplete(g, p, a);
_preload_images()
};
_preload_images = function() {
var a, b;
g.length - 1 > p && (a = g[p + 1].href, "undefined" !== typeof a && a.match(G) && (b = new Image, b.src = a));
0 < p && (a = g[p - 1].href, "undefined" !== typeof a && a.match(G) && (b = new Image, b.src = a))
};
_draw = function(d) {
var b = {
width: parseInt(n.width + (f.width - n.width) * d, 10),
height: parseInt(n.height + (f.height - n.height) * d, 10),
top: parseInt(n.top + (f.top - n.top) * d, 10),
left: parseInt(n.left + (f.left - n.left) * d, 10)
};
"undefined" !== typeof f.opacity && (b.opacity = 0.5 > d ? 0.5 : d);
e.css(b);
k.css({
width: b.width - 2 * a.padding,
height: b.height - u * d - 2 * a.padding
})
};
_get_viewport = function() {
return [b(window).width() - 2 * a.margin, b(window).height() - 2 * a.margin, b(document).scrollLeft() + a.margin, b(document).scrollTop() + a.margin]
};
_get_zoom_to = function() {
var d = _get_viewport(),
b = {},
e = a.autoScale,
f = 2 * a.padding;
b.width = -1 < a.width.toString().indexOf("%") ? parseInt(d[0] * parseFloat(a.width) / 100, 10) : parseInt(a.width) + f;
b.height = -1 < a.height.toString().indexOf("%") ? parseInt(d[1] * parseFloat(a.height) / 100, 10) : parseInt(a.height) + f;
if (e && (b.width > d[0] || b.height > d[1])) if ("image" == c.type || "swf" == c.type) {
if (e = a.width / a.height, b.width > d[0] && (b.width = d[0], b.height = parseInt((b.width - f) / e + f, 10)), b.height > d[1]) b.height = d[1], b.width = parseInt((b.height - f) * e + f, 10)
} else b.width = Math.min(b.width, d[0]), b.height = Math.min(b.height, d[1]);
b.top = parseInt(Math.max(d[3] - 20, d[3] + 0.5 * (d[1] - b.height - 40)), 10);
b.left = parseInt(Math.max(d[2] - 20, d[2] + 0.5 * (d[0] - b.width - 40)), 10);
return b
};
_get_obj_pos = function(a) {
var b = a.offset();
b.top += parseInt(a.css("paddingTop"), 10) || 0;
b.left += parseInt(a.css("paddingLeft"), 10) || 0;
b.top += parseInt(a.css("border-top-width"), 10) || 0;
b.left += parseInt(a.css("border-left-width"), 10) || 0;
b.width = a.width();
b.height = a.height();
return b
};
_get_zoom_from = function() {
var d = c.orig ? b(c.orig) : !1,
e = {};
d && d.length ? (d = _get_obj_pos(d), e = {
width: d.width + 2 * a.padding,
height: d.height + 2 * a.padding,
top: d.top - a.padding - 20,
left: d.left - a.padding - 20
}) : (d = _get_viewport(), e = {
width: 2 * a.padding,
height: 2 * a.padding,
top: parseInt(d[3] + 0.5 * d[1], 10),
left: parseInt(d[2] + 0.5 * d[0], 10)
});
return e
};
_animate_loading = function() {
s.is(":visible") ? (b("div", s).css("top", -40 * F + "px"), F = (F + 1) % 12) : clearInterval(E)
};
var x = function() {};
x.prototype = b.extend(x.prototype, {
name: "lightbox",
defaults: {
padding: 10,
margin: 40,
opacity: !1,
modal: !1,
cyclic: !1,
scrolling: "auto",
width: 560,
height: 340,
autoScale: !0,
autoDimensions: !0,
centerOnScroll: !1,
ajax: {},
swf: {
wmode: "transparent"
},
hideOnOverlayClick: !0,
hideOnContentClick: !1,
overlayShow: !0,
overlayOpacity: 0.7,
overlayColor: "#777",
titleShow: !0,
titlePosition: "float",
titleFormat: null,
titleFromAlt: !1,
transitionIn: "fade",
transitionOut: "fade",
speedIn: 300,
speedOut: 300,
changeSpeed: 300,
changeFade: "fast",
easingIn: "swing",
easingOut: "swing",
showCloseButton: !0,
showNavArrows: !0,
enableEscapeButton: !0,
enableKeyboardNav: !0,
onStart: function() {},
onCancel: function() {},
onComplete: function() {},
onCleanup: function() {},
onClosed: function() {},
onError: function() {}
},
init: function() {
var d = this;
b("#lightbox-wrap").length || (b("body").append(m = b('<div id="lightbox-tmp"></div>'), s = b('<div id="lightbox-loading"><div></div></div>'), q = b('<div id="lightbox-overlay"></div>'), e = b('<div id="lightbox-wrap"></div>')), D = q.show().position(), q.hide(), 0 != D.top && q.css("top", -1 * D.top), C = b('<div id="lightbox-outer"></div>').appendTo(e), C.append(k = b('<div id="lightbox-content"></div>'), B = b('<a id="lightbox-close"></a>'), j = b('<div id="lightbox-title"></div>'), y = b('<a href="javascript:;" id="lightbox-left"><span id="lightbox-left-ico"></span></a>'), z = b('<a href="javascript:;" id="lightbox-right"><span id="lightbox-right-ico"></span></a>')), B.bind("click", this.close), s.bind("click", this.cancel), y.bind("click", function(a) {
a.preventDefault();
d.prev()
}), z.bind("click", function(a) {
a.preventDefault();
d.next()
}), b.fn.mousewheel && e.bind("mousewheel.fb", function(b, c) {
(h || "image" == a.type) && b.preventDefault();
d[0 < c ? "prev" : "next"]()
}))
},
open: function(a, c) {
var e;
if (!h) {
h = !0;
e = "undefined" !== typeof c ? c : {};
o = [];
r = parseInt(e.index, 10) || 0;
if (b.isArray(a)) {
for (var f = 0, g = a.length; f < g; f++)"object" == typeof a[f] ? b(a[f]).data(i.name, b.extend({}, e, a[f])) : a[f] = b({}).data(i.name, b.extend({
content: a[f]
}, e));
o = b.merge(o, a)
} else "object" == typeof a ? b(a).data(i.name, b.extend({}, e, a)) : a = b({}).data(i.name, b.extend({
content: a
}, e)), o.push(a);
if (r > o.length || 0 > r) r = 0;
_start()
}
},
showActivity: function() {
clearInterval(E);
s.show();
E = setInterval(_animate_loading, 66)
},
hideActivity: function() {
s.hide()
},
next: function() {
return this.pos(p + 1)
},
prev: function() {
return this.pos(p - 1)
},
pos: function(b) {
h || (b = parseInt(b), o = g, -1 < b && b < g.length ? (r = b, _start()) : a.cyclic && 1 < g.length && (r = b >= g.length ? 0 : g.length - 1, _start()))
},
cancel: function() {
h || (h = !0, b.event.trigger("lightbox-cancel"), _abort(), c.onCancel(o, r, c), h = !1)
},
close: function() {
function d() {
q.fadeOut("fast");
j.empty().hide();
e.hide();
b.event.trigger("lightbox-cleanup");
k.empty();
a.onClosed(g, p, a);
g = c = [];
p = r = 0;
a = c = {};
h = !1
}
if (!h && !e.is(":hidden")) if (h = !0, a && !1 === a.onCleanup(g, p, a)) h = !1;
else if (_abort(), b(B.add(y).add(z)).hide(), b(k.add(q)).unbind(), b(window).unbind("resize.fb scroll.fb"), b(document).unbind("keydown.fb"), k.find("iframe").attr("src", "about:blank"), "inside" !== a.titlePosition && j.empty(), e.stop(), "elastic" == a.transitionOut) {
n = _get_zoom_from();
var i = e.position();
f = {
top: i.top,
left: i.left,
width: e.width(),
height: e.height()
};
a.opacity && (f.opacity = 1);
j.empty().hide();
w.prop = 1;
b(w).animate({
prop: 0
}, {
duration: a.speedOut,
easing: a.easingOut,
step: _draw,
complete: d
})
} else e.fadeOut("none" == a.transitionOut ? 0 : a.speedOut, d)
},
resize: function() {
q.is(":visible") && q.css("height", b(document).height());
if ("image" == a.type) {
f = _get_zoom_to();
switch (a.titlePosition) {
case "float":
j.css("left", -1 * parseInt((j.width() - f.width - 40) / 2, 10));
break;
default:
j.css("width", f.width - 2 * a.padding)
}
e.is(":visible") && (pos = e.position(), n = {
top: pos.top,
left: pos.left,
width: e.width(),
height: e.height()
}, equal = n.width == f.width && n.height == f.height, k.css({
width: f.width - 2 * a.padding,
height: "image" == a.type || "swf" == a.type || "iframe" == a.type ? f.height - u - 2 * a.padding : "auto"
}), equal || (w.prop = 0, b(w).animate({
prop: 1
}, {
duration: a.changeSpeed,
easing: a.easingChange,
step: _draw
})))
}
i.center(!0)
},
center: function(b) {
var c, f;
if (!h && (f = !0 === b ? 1 : 0, c = _get_viewport(), f || !(e.width() > c[0] || e.height() > c[1]))) e.stop().animate({
top: parseInt(Math.max(c[3] - 20, c[3] + 0.5 * (c[1] - k.height() - 40) - a.padding)),
left: parseInt(Math.max(c[2] - 20, c[2] + 0.5 * (c[0] - k.width() - 40) - a.padding))
}, "number" == typeof b ? b : 200)
}
});
b.fn[x.prototype.name] = function() {
var a = arguments,
c = a[0] ? a[0] : {};
return this.each(function() {
b(this).data(x.prototype.name, c).unbind("click." + x.prototype.name).bind("click." + x.prototype.name, function(a) {
a.preventDefault();
h || (h = !0, b(this).blur(), o = [], r = 0, (a = b(this).attr("data-lightbox") || "") && (a = a.match(/group:([^;]+)/i)) ? (o = b('a[data-lightbox*="' + a[0] + '"], area[data-lightbox*="' + a[0] + '"]'), r = o.index(this)) : o.push(this), _start())
})
})
};
b(document).ready(function() {
i = new x;
i.init();
b[x.prototype.name] = i
})
})(jQuery); |
#3 JavaScript::Eval (size: 34, repeated: 8) new Function('event', final_body); |
#4 JavaScript::Eval (size: 12478, repeated: 2) r = function(a, b, c) {
((function() {
function D(a, b, c) {
if (a === b) return a !== 0 || 1 / a == 1 / b;
if (a == null || b == null) return a === b;
a._chain && (a = a._wrapped), b._chain && (b = b._wrapped);
if (a.isEqual && z.isFunction(a.isEqual)) return a.isEqual(b);
if (b.isEqual && z.isFunction(b.isEqual)) return b.isEqual(a);
var d = l.call(a);
if (d != l.call(b)) return !1;
switch (d) {
case "[object String]":
return a == String(b);
case "[object Number]":
return a != +a ? b != +b : a == 0 ? 1 / a == 1 / b : a == +b;
case "[object Date]":
case "[object Boolean]":
return +a == +b;
case "[object RegExp]":
return a.source == b.source && a.global == b.global && a.multiline == b.multiline && a.ignoreCase == b.ignoreCase
}
if (typeof a != "object" || typeof b != "object") return !1;
var e = c.length;
while (e--) if (c[e] == a) return !0;
c.push(a);
var f = 0,
g = !0;
if (d == "[object Array]") {
f = a.length, g = f == b.length;
if (g) while (f--) if (!(g = f in a == f in b && D(a[f], b[f], c))) break
} else {
if ("constructor" in a != "constructor" in b || a.constructor != b.constructor) return !1;
for (var h in a) if (z.has(a, h)) {
f++;
if (!(g = z.has(b, h) && D(a[h], b[h], c))) break
}
if (g) {
for (h in b) if (z.has(b, h) && !(f--)) break;
g = !f
}
}
return c.pop(), g
}
var a = this,
d = a._,
e = {},
f = Array.prototype,
g = Object.prototype,
h = Function.prototype,
i = f.push,
j = f.slice,
k = f.unshift,
l = g.toString,
m = g.hasOwnProperty,
n = f.forEach,
o = f.map,
p = f.reduce,
q = f.reduceRight,
r = f.filter,
s = f.every,
t = f.some,
u = f.indexOf,
v = f.lastIndexOf,
w = Array.isArray,
x = Object.keys,
y = h.bind,
z = function(a) {
return new L(a)
};
typeof b != "undefined" ? (typeof c != "undefined" && c.exports && (b = c.exports = z), b._ = z) : a._ = z, z.VERSION = "1.3.3";
var A = z.each = z.forEach = function(a, b, c) {
if (a == null) return;
if (n && a.forEach === n) a.forEach(b, c);
else if (a.length === +a.length) {
for (var d = 0, f = a.length; d < f; d++) if (d in a && b.call(c, a[d], d, a) === e) return
} else for (var g in a) if (z.has(a, g) && b.call(c, a[g], g, a) === e) return
};
z.map = z.collect = function(a, b, c) {
var d = [];
return a == null ? d : o && a.map === o ? a.map(b, c) : (A(a, function(a, e, f) {
d[d.length] = b.call(c, a, e, f)
}), a.length === +a.length && (d.length = a.length), d)
}, z.reduce = z.foldl = z.inject = function(a, b, c, d) {
var e = arguments.length > 2;
a == null && (a = []);
if (p && a.reduce === p) return d && (b = z.bind(b, d)), e ? a.reduce(b, c) : a.reduce(b);
A(a, function(a, f, g) {
e ? c = b.call(d, c, a, f, g) : (c = a, e = !0)
});
if (!e) throw new TypeError("Reduce of empty array with no initial value");
return c
}, z.reduceRight = z.foldr = function(a, b, c, d) {
var e = arguments.length > 2;
a == null && (a = []);
if (q && a.reduceRight === q) return d && (b = z.bind(b, d)), e ? a.reduceRight(b, c) : a.reduceRight(b);
var f = z.toArray(a).reverse();
return d && !e && (b = z.bind(b, d)), e ? z.reduce(f, b, c, d) : z.reduce(f, b)
}, z.find = z.detect = function(a, b, c) {
var d;
return B(a, function(a, e, f) {
if (b.call(c, a, e, f)) return d = a, !0
}), d
}, z.filter = z.select = function(a, b, c) {
var d = [];
return a == null ? d : r && a.filter === r ? a.filter(b, c) : (A(a, function(a, e, f) {
b.call(c, a, e, f) && (d[d.length] = a)
}), d)
}, z.reject = function(a, b, c) {
var d = [];
return a == null ? d : (A(a, function(a, e, f) {
b.call(c, a, e, f) || (d[d.length] = a)
}), d)
}, z.every = z.all = function(a, b, c) {
var d = !0;
return a == null ? d : s && a.every === s ? a.every(b, c) : (A(a, function(a, f, g) {
if (!(d = d && b.call(c, a, f, g))) return e
}), !! d)
};
var B = z.some = z.any = function(a, b, c) {
b || (b = z.identity);
var d = !1;
return a == null ? d : t && a.some === t ? a.some(b, c) : (A(a, function(a, f, g) {
if (d || (d = b.call(c, a, f, g))) return e
}), !! d)
};
z.include = z.contains = function(a, b) {
var c = !1;
return a == null ? c : u && a.indexOf === u ? a.indexOf(b) != -1 : (c = B(a, function(a) {
return a === b
}), c)
}, z.invoke = function(a, b) {
var c = j.call(arguments, 2);
return z.map(a, function(a) {
return (z.isFunction(b) ? b || a : a[b]).apply(a, c)
})
}, z.pluck = function(a, b) {
return z.map(a, function(a) {
return a[b]
})
}, z.max = function(a, b, c) {
if (!b && z.isArray(a) && a[0] === +a[0] && a.length < 65535) return Math.max.apply(Math, a);
if (!b && z.isEmpty(a)) return -Infinity;
var d = {
computed: -Infinity
};
return A(a, function(a, e, f) {
var g = b ? b.call(c, a, e, f) : a;
g >= d.computed && (d = {
value: a,
computed: g
})
}), d.value
}, z.min = function(a, b, c) {
if (!b && z.isArray(a) && a[0] === +a[0] && a.length < 65535) return Math.min.apply(Math, a);
if (!b && z.isEmpty(a)) return Infinity;
var d = {
computed: Infinity
};
return A(a, function(a, e, f) {
var g = b ? b.call(c, a, e, f) : a;
g < d.computed && (d = {
value: a,
computed: g
})
}), d.value
}, z.shuffle = function(a) {
var b = [],
c;
return A(a, function(a, d, e) {
c = Math.floor(Math.random() * (d + 1)), b[d] = b[c], b[c] = a
}), b
}, z.sortBy = function(a, b, c) {
var d = z.isFunction(b) ? b : function(a) {
return a[b]
};
return z.pluck(z.map(a, function(a, b, e) {
return {
value: a,
criteria: d.call(c, a, b, e)
}
}).sort(function(a, b) {
var c = a.criteria,
d = b.criteria;
return c === void 0 ? 1 : d === void 0 ? -1 : c < d ? -1 : c > d ? 1 : 0
}), "value")
}, z.groupBy = function(a, b) {
var c = {},
d = z.isFunction(b) ? b : function(a) {
return a[b]
};
return A(a, function(a, b) {
var e = d(a, b);
(c[e] || (c[e] = [])).push(a)
}), c
}, z.sortedIndex = function(a, b, c) {
c || (c = z.identity);
var d = c(b),
e = 0,
f = a.length;
while (e < f) {
var g = e + f >> 1;
c(a[g]) < d ? e = g + 1 : f = g
}
return e
}, z.toArray = function(a) {
return a ? z.isArray(a) ? j.call(a) : z.isArguments(a) ? j.call(a) : a.toArray && z.isFunction(a.toArray) ? a.toArray() : z.values(a) : []
}, z.size = function(a) {
return z.isArray(a) ? a.length : z.keys(a).length
}, z.first = z.head = z.take = function(a, b, c) {
return b != null && !c ? j.call(a, 0, b) : a[0]
}, z.initial = function(a, b, c) {
return j.call(a, 0, a.length - (b == null || c ? 1 : b))
}, z.last = function(a, b, c) {
return b != null && !c ? j.call(a, Math.max(a.length - b, 0)) : a[a.length - 1]
}, z.rest = z.tail = function(a, b, c) {
return j.call(a, b == null || c ? 1 : b)
}, z.compact = function(a) {
return z.filter(a, function(a) {
return !!a
})
}, z.flatten = function(a, b) {
return function c(a, d) {
return A(a, function(a) {
z.isArray(a) ? b ? i.apply(d, a) : c(a, d) : d.push(a)
}), d
}(a, [])
}, z.without = function(a) {
return z.difference(a, j.call(arguments, 1))
}, z.uniq = z.unique = function(a, b, c) {
var d = c ? z.map(a, c) : a,
e = [];
return a.length < 3 && (b = !0), z.reduce(d, function(c, d, f) {
if (b ? z.last(c) !== d || !c.length : !z.include(c, d)) c.push(d), e.push(a[f]);
return c
}, []), e
}, z.union = function() {
return z.uniq(z.flatten(arguments, !0))
}, z.intersection = z.intersect = function(a) {
var b = j.call(arguments, 1);
return z.filter(z.uniq(a), function(a) {
return z.every(b, function(b) {
return z.indexOf(b, a) >= 0
})
})
}, z.difference = function(a) {
var b = z.flatten(j.call(arguments, 1), !0);
return z.filter(a, function(a) {
return !z.include(b, a)
})
}, z.zip = function() {
var a = j.call(arguments),
b = z.max(z.pluck(a, "length")),
c = new Array(b);
for (var d = 0; d < b; d++) c[d] = z.pluck(a, "" + d);
return c
}, z.indexOf = function(a, b, c) {
if (a == null) return -1;
var d, e;
if (c) return d = z.sortedIndex(a, b), a[d] === b ? d : -1;
if (u && a.indexOf === u) return a.indexOf(b);
for (d = 0, e = a.length; d < e; d++) if (d in a && a[d] === b) return d;
return -1
}, z.lastIndexOf = function(a, b) {
if (a == null) return -1;
if (v && a.lastIndexOf === v) return a.lastIndexOf(b);
var c = a.length;
while (c--) if (c in a && a[c] === b) return c;
return -1
}, z.range = function(a, b, c) {
arguments.length <= 1 && (b = a || 0, a = 0), c = arguments[2] || 1;
var d = Math.max(Math.ceil((b - a) / c), 0),
e = 0,
f = new Array(d);
while (e < d) f[e++] = a, a += c;
return f
};
var C = function() {};
z.bind = function(a, b) {
var c, d;
if (a.bind === y && y) return y.apply(a, j.call(arguments, 1));
if (!z.isFunction(a)) throw new TypeError;
return d = j.call(arguments, 2), c = function() {
if (this instanceof c) {
C.prototype = a.prototype;
var e = new C,
f = a.apply(e, d.concat(j.call(arguments)));
return Object(f) === f ? f : e
}
return a.apply(b, d.concat(j.call(arguments)))
}
}, z.bindAll = function(a) {
var b = j.call(arguments, 1);
return b.length == 0 && (b = z.functions(a)), A(b, function(b) {
a[b] = z.bind(a[b], a)
}), a
}, z.memoize = function(a, b) {
var c = {};
return b || (b = z.identity), function() {
var d = b.apply(this, arguments);
return z.has(c, d) ? c[d] : c[d] = a.apply(this, arguments)
}
}, z.delay = function(a, b) {
var c = j.call(arguments, 2);
return setTimeout(function() {
return a.apply(null, c)
}, b)
}, z.defer = function(a) {
return z.delay.apply(z, [a, 1].concat(j.call(arguments, 1)))
}, z.throttle = function(a, b) {
var c, d, e, f, g, h, i = z.debounce(function() {
g = f = !1
}, b);
return function() {
c = this, d = arguments;
var j = function() {
e = null, g && a.apply(c, d), i()
};
return e || (e = setTimeout(j, b)), f ? g = !0 : (f = !0, h = a.apply(c, d)), i(), h
}
}, z.debounce = function(a, b, c) {
var d;
return function() {
var e = this,
f = arguments,
g = function() {
d = null, c || a.apply(e, f)
},
h = c && !d;
clearTimeout(d), d = setTimeout(g, b), h && a.apply(e, f)
}
}, z.once = function(a) {
var b = !1,
c;
return function() {
return b ? c : (b = !0, c = a.apply(this, arguments))
}
}, z.wrap = function(a, b) {
return function() {
var c = [a].concat(j.call(arguments, 0));
return b.apply(this, c)
}
}, z.compose = function() {
var a = arguments;
return function() {
var b = arguments;
for (var c = a.length - 1; c >= 0; c--) b = [a[c].apply(this, b)];
return b[0]
}
}, z.after = function(a, b) {
return a <= 0 ? b() : function() {
if (--a < 1) return b.apply(this, arguments)
}
}, z.keys = x ||
function(a) {
if (a !== Object(a)) throw new TypeError("Invalid object");
var b = [];
for (var c in a) z.has(a, c) && (b[b.length] = c);
return b
}, z.values = function(a) {
return z.map(a, z.identity)
}, z.functions = z.methods = function(a) {
var b = [];
for (var c in a) z.isFunction(a[c]) && b.push(c);
return b.sort()
}, z.extend = function(a) {
return A(j.call(arguments, 1), function(b) {
for (var c in b) a[c] = b[c]
}), a
}, z.pick = function(a) {
var b = {};
return A(z.flatten(j.call(arguments, 1)), function(c) {
c in a && (b[c] = a[c])
}), b
}, z.defaults = function(a) {
return A(j.call(arguments, 1), function(b) {
for (var c in b) a[c] == null && (a[c] = b[c])
}), a
}, z.clone = function(a) {
return z.isObject(a) ? z.isArray(a) ? a.slice() : z.extend({}, a) : a
}, z.tap = function(a, b) {
return b(a), a
}, z.isEqual = function(a, b) {
return D(a, b, [])
}, z.isEmpty = function(a) {
if (a == null) return !0;
if (z.isArray(a) || z.isString(a)) return a.length === 0;
for (var b in a) if (z.has(a, b)) return !1;
return !0
}, z.isElement = function(a) {
return !!a && a.nodeType == 1
}, z.isArray = w ||
function(a) {
return l.call(a) == "[object Array]"
}, z.isObject = function(a) {
return a === Object(a)
}, z.isArguments = function(a) {
return l.call(a) == "[object Arguments]"
}, z.isArguments(arguments) || (z.isArguments = function(a) {
return !!a && !! z.has(a, "callee")
}), z.isFunction = function(a) {
return l.call(a) == "[object Function]"
}, z.isString = function(a) {
return l.call(a) == "[object String]"
}, z.isNumber = function(a) {
return l.call(a) == "[object Number]"
}, z.isFinite = function(a) {
return z.isNumber(a) && isFinite(a)
}, z.isNaN = function(a) {
return a !== a
}, z.isBoolean = function(a) {
return a === !0 || a === !1 || l.call(a) == "[object Boolean]"
}, z.isDate = function(a) {
return l.call(a) == "[object Date]"
}, z.isRegExp = function(a) {
return l.call(a) == "[object RegExp]"
}, z.isNull = function(a) {
return a === null
}, z.isUndefined = function(a) {
return a === void 0
}, z.has = function(a, b) {
return m.call(a, b)
}, z.noConflict = function() {
return a._ = d, this
}, z.identity = function(a) {
return a
}, z.times = function(a, b, c) {
for (var d = 0; d < a; d++) b.call(c, d)
}, z.escape = function(a) {
return ("" + a).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'").replace(/\//g, "/")
}, z.result = function(a, b) {
if (a == null) return null;
var c = a[b];
return z.isFunction(c) ? c.call(a) : c
}, z.mixin = function(a) {
A(z.functions(a), function(b) {
N(b, z[b] = a[b])
})
};
var E = 0;
z.uniqueId = function(a) {
var b = E++;
return a ? a + b : b
}, z.templateSettings = {
evaluate: /<%([\s\S]+?)%>/g,
interpolate: /<%=([\s\S]+?)%>/g,
escape: /<%-([\s\S]+?)%>/g
};
var F = /.^/,
G = {
"\\": "\\",
"'": "'",
r: "\r",
n: "\n",
t: "\t",
u2028: "\u2028",
u2029: "\u2029"
};
for (var H in G) G[G[H]] = H;
var I = /\\|'|\r|\n|\t|\u2028|\u2029/g,
J = /\\(\\|'|r|n|t|u2028|u2029)/g,
K = function(a) {
return a.replace(J, function(a, b) {
return G[b]
})
};
z.template = function(a, b, c) {
c = z.defaults(c || {}, z.templateSettings);
var d = "__p+='" + a.replace(I, function(a) {
return "\\" + G[a]
}).replace(c.escape || F, function(a, b) {
return "'+\n((__t=(" + K(b) + "))==null?'':_.escape(__t))+\n'"
}).replace(c.interpolate || F, function(a, b) {
return "'+\n((__t=(" + K(b) + "))==null?'':__t)+\n'"
}).replace(c.evaluate || F, function(a, b) {
return "';\n" + K(b) + "\n__p+='"
}) + "';\n";
c.variable || (d = "with(obj||{}){\n" + d + "}\n"), d = "var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'')};\n" + d + "return __p;\n";
var e = new Function(c.variable || "obj", "_", d);
if (b) return e(b, z);
var f = function(a) {
return e.call(this, a, z)
};
return f.source = "function(" + (c.variable || "obj") + "){\n" + d + "}", f
}, z.chain = function(a) {
return z(a).chain()
};
var L = function(a) {
this._wrapped = a
};
z.prototype = L.prototype;
var M = function(a, b) {
return b ? z(a).chain() : a
},
N = function(a, b) {
L.prototype[a] = function() {
var a = j.call(arguments);
return k.call(a, this._wrapped), M(b.apply(z, a), this._chain)
}
};
z.mixin(z), A(["pop", "push", "reverse", "shift", "sort", "splice", "unshift"], function(a) {
var b = f[a];
L.prototype[a] = function() {
var c = this._wrapped;
return b.apply(c, arguments), (a == "shift" || a == "splice") && c.length === 0 && delete c[0], M(c, this._chain)
}
}), A(["concat", "join", "slice"], function(a) {
var b = f[a];
L.prototype[a] = function() {
return M(b.apply(this._wrapped, arguments), this._chain)
}
}), L.prototype.chain = function() {
return this._chain = !0, this
}, L.prototype.value = function() {
return this._wrapped
}
})).call(this)
};
//@ sourceURL=vendor/underscore |
#5 JavaScript::Eval (size: 16103, repeated: 2) r = function(a, b, c) {
((function() {
var c = function() {
return this
}(),
d = c.Backbone,
e = Array.prototype.slice,
f = Array.prototype.splice,
g;
typeof b != "undefined" ? g = b : g = c.Backbone = {}, g.VERSION = "0.9.1";
var h = c._;
!h && typeof a != "undefined" && (h = a("_"));
var i = c.jQuery || c.Zepto || c.ender;
g.setDomLibrary = function(a) {
i = a
}, g.noConflict = function() {
return c.Backbone = d, this
}, g.emulateHTTP = !1, g.emulateJSON = !1, g.Events = {
on: function(a, b, c) {
if (b === i.noop) return this;
var d;
a = a.split(/\s+/);
var e = this._callbacks || (this._callbacks = {});
while (d = a.shift()) {
var f = e[d] || (e[d] = {}),
g = f.tail || (f.tail = f.next = {});
g.callback = b, g.context = c, f.tail = g.next = {}
}
return this
},
off: function(a, b, c) {
if (b === i.noop) return this;
var d, e, f;
if (!a) delete this._callbacks;
else if (e = this._callbacks) {
a = a.split(/\s+/);
while (d = a.shift()) {
f = e[d], delete e[d];
if (!b || !f) continue;
while ((f = f.next) && f.next) if (f.callback !== b || !! c && f.context !== c) this.on(d, f.callback, f.context);
else continue
}
}
return this
},
trigger: function(a) {
var b, c, d, f, g, h, i;
if (!(d = this._callbacks)) return this;
h = d.all, (a = a.split(/\s+/)).push(null);
while (b = a.shift()) {
h && a.push({
next: h.next,
tail: h.tail,
event: b
});
if (!(c = d[b])) continue;
a.push({
next: c.next,
tail: c.tail
})
}
i = e.call(arguments, 1);
while (c = a.pop()) {
f = c.tail, g = c.event ? [c.event].concat(i) : i;
while ((c = c.next) !== f) c.callback.apply(c.context || this, g)
}
return this
},
one: function(a, b, c) {
var d = this,
e, f = function(a) {
var e = function() {
d.off(a, e, c), b.apply(this, arguments)
};
return e
};
a = a.split(/\s+/);
while (e = a.shift()) d.on(e, f(e), c);
return this
}
}, g.Events.bind = g.Events.on, g.Events.unbind = g.Events.off, g.Model = function(a, b) {
var c;
a || (a = {}), b && b.parse && (a = this.parse(a));
if (c = w(this, "defaults")) a = h.extend({}, c, a);
b && b.collection && (this.collection = b.collection), this.attributes = {}, this._escapedAttributes = {}, this.cid = h.uniqueId("c");
if (!this.set(a, {
silent: !0
})) throw new Error("Can't create an invalid model");
delete this._changed, this._previousAttributes = h.clone(this.attributes), this.initialize.apply(this, arguments)
}, h.extend(g.Model.prototype, g.Events, {
idAttribute: "id",
initialize: function() {},
toJSON: function() {
return h.clone(this.attributes)
},
get: function(a) {
return this.attributes[a]
},
escape: function(a) {
var b;
if (b = this._escapedAttributes[a]) return b;
var c = this.attributes[a];
return this._escapedAttributes[a] = h.escape(c == null ? "" : "" + c)
},
has: function(a) {
return this.attributes[a] != null
},
set: function(a, b, c) {
var d, e, f;
h.isObject(a) || a == null ? (d = a, c = b) : (d = {}, d[a] = b), c || (c = {});
if (!d) return this;
d instanceof g.Model && (d = d.attributes);
if (c.unset) for (e in d) d[e] = void 0;
if (!this._validate(d, c)) return !1;
this.idAttribute in d && (this.id = d[this.idAttribute]);
var i = this.attributes,
j = this._escapedAttributes,
k = this._previousAttributes || {},
l = this._setting;
this._changed || (this._changed = {}), this._setting = !0;
for (e in d) {
f = d[e], h.isEqual(i[e], f) || delete j[e], c.unset ? delete i[e] : i[e] = f, this._changing && !h.isEqual(this._changed[e], f) && (this.trigger("change:" + e, this, f, c), this._moreChanges = !0), delete this._changed[e];
if (!h.isEqual(k[e], f) || h.has(i, e) != h.has(k, e)) this._changed[e] = f
}
return l || (!c.silent && this.hasChanged() && this.change(c), this._setting = !1), this
},
unset: function(a, b) {
return (b || (b = {})).unset = !0, this.set(a, null, b)
},
clear: function(a) {
return (a || (a = {})).unset = !0, this.set(h.clone(this.attributes), a)
},
fetch: function(a) {
a = a ? h.clone(a) : {};
var b = this,
c = a.success;
return a.success = function(d, e, f) {
b.lastFetchTime = Date.now();
if (!b.set(b.parse(d, f), a)) return !1;
c && c(b, d)
}, a.error = g.wrapError(a.error, b, a), (this.sync || g.sync).call(this, "read", this, a)
},
save: function(a, b, c) {
var d, e;
h.isObject(a) || a == null ? (d = a, c = b) : (d = {}, d[a] = b), c = c ? h.clone(c) : {}, c.wait && (e = h.clone(this.attributes));
var f = h.extend({}, c, {
silent: !0
});
if (d && !this.set(d, c.wait ? f : c)) return !1;
var i = this,
j = c.success;
c.success = function(a, b, e) {
var f = i.parse(a, e);
c.wait && (f = h.extend(d || {}, f));
if (!i.set(f, c)) return !1;
j ? j(i, a) : i.trigger("sync", i, a, c)
}, c.error = g.wrapError(c.error, i, c);
var k = this.isNew() ? "create" : "update",
l = (this.sync || g.sync).call(this, k, this, c);
return c.wait && this.set(e, f), l
},
destroy: function(a) {
a = a ? h.clone(a) : {};
var b = this,
c = a.success,
d = function() {
b.trigger("destroy", b, b.collection, a)
};
if (this.isNew()) return d();
a.success = function(e) {
a.wait && d(), c ? c(b, e) : b.trigger("sync", b, e, a)
}, a.error = g.wrapError(a.error, b, a);
var e = (this.sync || g.sync).call(this, "delete", this, a);
return a.wait || d(), e
},
url: function() {
var a = w(this.collection, "url") || w(this, "urlRoot") || x();
return this.isNew() ? a : a + (a.charAt(a.length - 1) == "/" ? "" : "/") + encodeURIComponent(this.id)
},
parse: function(a, b) {
return a
},
clone: function() {
return new this.constructor(this.attributes)
},
isNew: function() {
return this.id == null
},
change: function(a) {
if (this._changing || !this.hasChanged()) return this;
this._changing = !0, this._moreChanges = !0;
for (var b in this._changed) this.trigger("change:" + b, this, this._changed[b], a);
while (this._moreChanges) this._moreChanges = !1, this.trigger("change", this, a);
return this._previousAttributes = h.clone(this.attributes), delete this._changed, this._changing = !1, this
},
hasChanged: function(a) {
return arguments.length ? this._changed && h.has(this._changed, a) : !h.isEmpty(this._changed)
},
changedAttributes: function(a) {
if (!a) return this.hasChanged() ? h.clone(this._changed) : !1;
var b, c = !1,
d = this._previousAttributes;
for (var e in a) {
if (h.isEqual(d[e], b = a[e])) continue;
(c || (c = {}))[e] = b
}
return c
},
previous: function(a) {
return !arguments.length || !this._previousAttributes ? null : this._previousAttributes[a]
},
previousAttributes: function() {
return h.clone(this._previousAttributes)
},
isValid: function() {
return !this.validate(this.attributes)
},
_validate: function(a, b) {
if (b.silent || !this.validate) return !0;
a = h.extend({}, this.attributes, a);
var c = this.validate(a, b);
return c ? (b && b.error ? b.error(this, c, b) : this.trigger("error", this, c, b), !1) : !0
}
}), g.Collection = function(a, b) {
b || (b = {}), b.comparator && (this.comparator = b.comparator), this._reset(), this.initialize.apply(this, arguments), a && this.reset(a, {
silent: !0,
parse: b.parse
})
}, h.extend(g.Collection.prototype, g.Events, {
model: g.Model,
initialize: function() {},
toJSON: function() {
return this.map(function(a) {
return a.toJSON()
})
},
add: function(a, b) {
var c, d, e, g, i, j, k = {},
l = {};
b || (b = {}), a = h.isArray(a) ? a.slice() : [a];
for (c = 0, e = a.length; c < e; c++) {
if (!(g = a[c] = this._prepareModel(a[c], b))) throw new Error("Can't add an invalid model to a collection");
if (k[i = g.cid] || this._byCid[i] || (j = g.id) != null && (l[j] || this._byId[j])) throw new Error("Can't add the same model to a collection twice");
k[i] = l[j] = g
}
for (c = 0; c < e; c++)(g = a[c]).on("all", this._onModelEvent, this), this._byCid[g.cid] = g, g.id != null && (this._byId[g.id] = g);
this.length += e, d = b.at != null ? b.at : this.models.length, f.apply(this.models, [d, 0].concat(a)), this.comparator && this.sort({
silent: !0
});
if (b.silent) return this;
for (c = 0, e = this.models.length; c < e; c++) {
if (!k[(g = this.models[c]).cid]) continue;
b.index = c, g.trigger("add", g, this, b)
}
return this
},
remove: function(a, b) {
var c, d, e, f;
b || (b = {}), a = h.isArray(a) ? a.slice() : [a];
for (c = 0, d = a.length; c < d; c++) {
f = this.getByCid(a[c]) || this.get(a[c]);
if (!f) continue;
delete this._byId[f.id], delete this._byCid[f.cid], e = this.indexOf(f), this.models.splice(e, 1), this.length--, b.silent || (b.index = e, f.trigger("remove", f, this, b)), this._removeReference(f)
}
return this
},
get: function(a) {
return a == null ? null : this._byId[a.id != null ? a.id : a]
},
getByCid: function(a) {
return a && this._byCid[a.cid || a]
},
at: function(a) {
return this.models[a]
},
sort: function(a) {
a || (a = {});
if (!this.comparator) throw new Error("Cannot sort a set without a comparator");
var b = h.bind(this.comparator, this);
return this.comparator.length == 1 ? this.models = this.sortBy(b) : this.models.sort(b), a.silent || this.trigger("reset", this, a), this
},
pluck: function(a) {
return h.map(this.models, function(b) {
return b.get(a)
})
},
reset: function(a, b) {
a || (a = []), b || (b = {});
for (var c = 0, d = this.models.length; c < d; c++) this._removeReference(this.models[c]);
return this._reset(), this.add(a, {
silent: !0,
parse: b.parse
}), b.silent || this.trigger("reset", this, b), this
},
fetch: function(a) {
a = a ? h.clone(a) : {}, a.parse === undefined && (a.parse = !0);
var b = this,
c = a.success;
return a.success = function(d, e, f) {
b.lastFetchTime = Date.now(), b[a.add ? "add" : "reset"](b.parse(d, f), a), c && c(b, d)
}, a.error = g.wrapError(a.error, b, a), (this.sync || g.sync).call(this, "read", this, a)
},
create: function(a, b) {
var c = this;
b = b ? h.clone(b) : {}, a = this._prepareModel(a, b);
if (!a) return !1;
b.wait || c.add(a, b);
var d = b.success;
return b.success = function(e, f, g) {
b.wait && c.add(e, b), d ? d(e, f) : e.trigger("sync", a, f, b)
}, a.save(null, b), a
},
parse: function(a, b) {
return a
},
chain: function() {
return h(this.models).chain()
},
_reset: function(a) {
this.length = 0, this.models = [], this._byId = {}, this._byCid = {}
},
_prepareModel: function(a, b) {
if (a instanceof g.Model) a.collection || (a.collection = this);
else {
var c = a;
b.collection = this, a = new this.model(c, b), a._validate(a.attributes, b) || (a = !1)
}
return a
},
_removeReference: function(a) {
this == a.collection && delete a.collection, a.off("all", this._onModelEvent, this)
},
_onModelEvent: function(a, b, c, d) {
if (a != "add" && a != "remove" || c == this) a == "destroy" && this.remove(b, d), b && a === "change:" + b.idAttribute && (delete this._byId[b.previous(b.idAttribute)], this._byId[b.id] = b), this.trigger.apply(this, arguments);
else return
}
});
var j = ["forEach", "each", "map", "reduce", "reduceRight", "find", "detect", "filter", "select", "reject", "every", "all", "some", "any", "include", "contains", "invoke", "max", "min", "sortBy", "sortedIndex", "toArray", "size", "first", "initial", "rest", "last", "without", "indexOf", "shuffle", "lastIndexOf", "isEmpty", "groupBy"];
h.each(j, function(a) {
g.Collection.prototype[a] = function() {
return h[a].apply(h, [this.models].concat(h.toArray(arguments)))
}
}), g.Router = function(a) {
a || (a = {}), a.routes && (this.routes = a.routes), this._bindRoutes(), this.initialize.apply(this, arguments)
};
var k = /:\w+/g,
l = /\*\w+/g,
m = /[-[\]{}()+?.,\\^$|#\s]/g;
h.extend(g.Router.prototype, g.Events, {
initialize: function() {},
route: function(a, b, c) {
return g.history || (g.history = new g.History), h.isRegExp(a) || (a = this._routeToRegExp(a)), c || (c = this[b]), g.history.route(a, h.bind(function(d) {
var e = this._extractParameters(a, d);
c && c.apply(this, e), this.trigger.apply(this, ["route:" + b].concat(e)), g.history.trigger("route", this, b, e)
}, this)), this
},
navigate: function(a, b) {
g.history.navigate(a, b)
},
_bindRoutes: function() {
if (!this.routes) return;
var a = [];
for (var b in this.routes) a.unshift([b, this.routes[b]]);
for (var c = 0, d = a.length; c < d; c++) this.route(a[c][0], a[c][1], this[a[c][1]])
},
_routeToRegExp: function(a) {
return a = a.replace(m, "\\$&").replace(k, "([^/]+)").replace(l, "(.*?)"), new RegExp("^" + a + "$")
},
_extractParameters: function(a, b) {
return a.exec(b).slice(1)
}
}), g.History = function() {
this.handlers = [], h.bindAll(this, "checkUrl")
};
var n = /^[#\/]/,
o = /msie [\w.]+/,
p = !1;
h.extend(g.History.prototype, g.Events, {
interval: 50,
getFragment: function(a, b) {
if (a == null) if (this._hasPushState || b) {
a = window.location.pathname;
var c = window.location.search;
c && (a += c)
} else a = window.location.hash;
return a = decodeURIComponent(a), a.indexOf(this.options.root) || (a = a.substr(this.options.root.length)), a.replace(n, "")
},
start: function(a) {
if (p) throw new Error("Backbone.history has already been started");
this.options = h.extend({}, {
root: "/"
}, this.options, a), this._wantsHashChange = this.options.hashChange !== !1, this._wantsPushState = !! this.options.pushState, this._hasPushState = !! (this.options.pushState && window.history && window.history.pushState);
var b = this.getFragment(),
c = document.documentMode,
d = o.exec(navigator.userAgent.toLowerCase()) && (!c || c <= 7);
d && (this.iframe = i('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo("body")[0].contentWindow, this.navigate(b)), this._hasPushState ? i(window).bind("popstate", this.checkUrl) : this._wantsHashChange && "onhashchange" in window && !d ? i(window).bind("hashchange", this.checkUrl) : this._wantsHashChange && (this._checkUrlInterval = setInterval(this.checkUrl, this.interval)), this.fragment = b, p = !0;
var e = window.location,
f = e.pathname == this.options.root;
if (this._wantsHashChange && this._wantsPushState && !this._hasPushState && !f) return this.fragment = this.getFragment(null, !0), window.location.replace(this.options.root + "#" + this.fragment), !0;
if (!this.options.silent) return this.loadUrl()
},
stop: function() {
i(window).unbind("popstate", this.checkUrl).unbind("hashchange", this.checkUrl), clearInterval(this._checkUrlInterval), p = !1
},
route: function(a, b) {
this.handlers.unshift({
route: a,
callback: b
})
},
checkUrl: function(a) {
var b = this.getFragment();
b == this.fragment && this.iframe && (b = this.getFragment(this.iframe.location.hash));
if (b == this.fragment || b == decodeURIComponent(this.fragment)) return !1;
this.iframe && this.navigate(b), this.loadUrl() || this.loadUrl(window.location.hash)
},
loadUrl: function(a) {
var b = this.fragment = this.getFragment(a),
c = h.any(this.handlers, function(a) {
if (a.route.test(b)) return a.callback(b), !0
});
return c
},
navigate: function(a, b) {
if (!p) return !1;
if (!b || b === !0) b = {
trigger: b
};
var c = (a || "").replace(n, "");
if (this.fragment == c || this.fragment == decodeURIComponent(c)) return;
this._hasPushState ? (c.indexOf(this.options.root) != 0 && (c = this.options.root + c), this.fragment = c, window.history[b.replace ? "replaceState" : "pushState"]({}, document.title, c)) : this._wantsHashChange ? (this.fragment = c, this._updateHash(window.location, c, b.replace), this.iframe && c != this.getFragment(this.iframe.location.hash) && (b.replace || this.iframe.document.open().close(), this._updateHash(this.iframe.location, c, b.replace))) : window.location.assign(this.options.root + a), b.trigger && this.loadUrl(a)
},
_updateHash: function(a, b, c) {
c ? a.replace(a.toString().replace(/(javascript:|#).*$/, "") + "#" + b) : a.hash = b
}
}), g.View = function(a) {
this.cid = h.uniqueId("view"), this._configure(a || {}), this._ensureElement(), this.initialize.apply(this, arguments), this.delegateEvents()
};
var q = /^(\S+)\s*(.*)$/,
r = ["model", "collection", "el", "id", "attributes", "className", "tagName"];
h.extend(g.View.prototype, g.Events, {
tagName: "div",
$: function(a) {
return this.$el.find(a)
},
initialize: function() {},
render: function() {
return this
},
remove: function() {
return this.$el.remove(), this
},
make: function(a, b, c) {
var d = document.createElement(a);
return b && i(d).attr(b), c && i(d).html(c), d
},
setElement: function(a, b) {
return this.$el = i(a), this.el = this.$el[0], b !== !1 && this.delegateEvents(), this
},
delegateEvents: function(a) {
if (!a && !(a = w(this, "events"))) return;
this.undelegateEvents();
for (var b in a) {
var c = a[b];
h.isFunction(c) || (c = this[a[b]]);
if (!c) throw new Error('Event "' + a[b] + '" does not exist');
var d = b.match(q),
e = d[1],
f = d[2];
c = h.bind(c, this), e += ".delegateEvents" + this.cid, f === "" ? this.$el.bind(e, c) : this.$el.delegate(f, e, c)
}
},
undelegateEvents: function() {
this.$el.unbind(".delegateEvents" + this.cid)
},
_configure: function(a) {
this.options && (a = h.extend({}, this.options, a));
for (var b = 0, c = r.length; b < c; b++) {
var d = r[b];
a[d] && (this[d] = a[d])
}
this.options = a
},
_ensureElement: function() {
if (!this.el) {
var a = w(this, "attributes") || {};
this.id && (a.id = this.id), this.className && (a["class"] = this.className), this.setElement(this.make(this.tagName, a), !1)
} else this.setElement(this.el, !1)
}
});
var s = function(a, b) {
var c = v(this, a, b);
return c.extend = this.extend, c
};
g.Model.extend = g.Collection.extend = g.Router.extend = g.View.extend = s;
var t = {
create: "POST",
update: "PUT",
"delete": "DELETE",
read: "GET"
};
g.sync = function(a, b, c) {
var d = t[a],
e = {
type: d,
dataType: "json"
};
return c.url || (e.url = w(b, "url") || x()), !c.data && b && (a == "create" || a == "update") && (e.contentType = "application/json", e.data = JSON.stringify(b.toJSON())), g.emulateJSON && (e.contentType = "application/x-www-form-urlencoded", e.data = e.data ? {
model: e.data
} : {}), g.emulateHTTP && (d === "PUT" || d === "DELETE") && (g.emulateJSON && (e.data._method = d), e.type = "POST", e.beforeSend = function(a) {
a.setRequestHeader("X-HTTP-Method-Override", d)
}), e.type !== "GET" && !g.emulateJSON && (e.processData = !1), i.ajax(h.extend(e, c))
}, g.wrapError = function(a, b, c) {
return function(d, e) {
e = d === b ? e : d, a ? a(b, e, c) : b.trigger("error", b, e, c)
}
};
var u = function() {},
v = function(a, b, c) {
var d;
return b && b.hasOwnProperty("constructor") ? d = b.constructor : d = function() {
a.apply(this, arguments)
}, h.extend(d, a), u.prototype = a.prototype, d.prototype = new u, b && h.extend(d.prototype, b), c && h.extend(d, c), d.prototype.constructor = d, d.__super__ = a.prototype, d
},
w = function(a, b) {
return !a || !a[b] ? null : h.isFunction(a[b]) ? a[b]() : a[b]
},
x = function() {
throw new Error('A "url" property or function must be specified')
}
})).call(this)
};
//@ sourceURL=backbone |
#6 JavaScript::Eval (size: 956, repeated: 2) r = function(a, b, c) {
(function() {
var a = {
getPurchaseTitle: function(a, b) {
var c = a.purchase_url,
d = this._shops;
if (c && !a.purchase_title) {
a.purchase_title = b || "Buy";
for (var e in d) if (d["Getty Images"].test(c)) a.purchase_title = "License";
else if (d[e].test(c)) {
a.purchase_title += " on " + e;
break
}
}
return a.purchase_title
},
getStoreName: function(a) {
var b = a.purchase_url,
c = this._shops,
d;
if (b) for (var e in c) if (c[e].test(b)) {
d = e;
break
}
return d
},
_shops: {
Amazon: /amazon\.(co\.(jp|uk)|com|de)/,
Beatport: /beatport\.(com|it)/,
iTunes: /apple\.com/,
Juno: /juno(\.co\.uk|download\.com)/,
"Digital Tunes": /digital-tunes\.net/,
'zero"': /zero-inch\.com/,
whatpeopleplay: /whatpeopleplay\.com/,
DJdownload: /djdownload\.com/,
Minno: /soundra\.in/,
Flattr: /flattr\.com/,
Ganxy: /ganxy\.com/,
"Getty Images": /soundcloud\.(.*-)?gettyimages\.com/
}
};
typeof c != "undefined" && c.exports ? c.exports = a : (window.SC = window.SC || {}, window.SC.OnlineStores = a)
})()
};
//@ sourceURL=vendor/js-online-stores/online-stores |
#7 JavaScript::Eval (size: 372, repeated: 2) r = function(a, b, c) {
b.api = {
LOAD_PROGRESS: "loadProgres",
PLAY_PROGRESS: "playProgress",
PLAY: "play",
PAUSE: "pause",
FINISH: "finish",
SEEK: "seek",
READY: "ready",
OPEN_SHARE_PANEL: "sharePanelOpened",
SHARE: "share",
CLICK_DOWNLOAD: "downloadClicked",
CLICK_BUY: "buyClicked"
}, b.bridge = {
REMOVE_LISTENER: "removeEventListener",
ADD_LISTENER: "addEventListener"
}
};
//@ sourceURL=lib/api/events |
#8 JavaScript::Eval (size: 269, repeated: 2) r = function(a, b, c) {
c.exports = {
GET_VOLUME: "getVolume",
GET_DURATION: "getDuration",
GET_POSITION: "getPosition",
GET_SOUNDS: "getSounds",
GET_CURRENT_SOUND: "getCurrentSound",
GET_CURRENT_SOUND_INDEX: "getCurrentSoundIndex",
IS_PAUSED: "isPaused"
}
};
//@ sourceURL=lib/api/getters |
#9 JavaScript::Eval (size: 183, repeated: 2) r = function(a, b, c) {
c.exports = {
PLAY: "play",
PAUSE: "pause",
TOGGLE: "toggle",
SEEK_TO: "seekTo",
SET_VOLUME: "setVolume",
NEXT: "next",
PREV: "prev",
SKIP: "skip"
}
};
//@ sourceURL=lib/api/setters |
#10 JavaScript::Eval (size: 210, repeated: 2) r = function(a, b, c) {
c.exports = {
SOUND: "sound",
PLAYLIST: "playlist",
USER_SOUNDS: "user-sounds",
USER_FAVORITES: "user-favorites",
GROUP_SOUNDS: "group-sounds",
APP_SOUNDS: "app-sounds"
}
};
//@ sourceURL=config/resources |
#11 JavaScript::Eval (size: 159, repeated: 2) r = function(a, b, c) {
c.exports = {
scaleImage: {
fn: a("lib/helpers/image-helper").scaleImage,
url: "/lib/workers/scale-image-worker.js"
}
}
};
//@ sourceURL=lib/workers |
#12 JavaScript::Eval (size: 2356, repeated: 2) r = function(a, b, c) {
function A() {
var b = $.Deferred();
return B().tracking === "delayed" ? ($(document).one("click", b.resolve), (h || (h = a("lib/event-bus"))).on(x.PLAY, b.resolve)) : b.resolve(), b
}
function B() {
var b, c;
return b = (d || (d = a("_"))).extend({}, v || (v = a("config/widget-params")), (n || (n = a("backbone"))).history.getOptions()), c = (d || (d = a("_"))).pick(b, (d || (d = a("_"))).keys(v || (v = a("config/widget-params")))), c
}
function C() {
var b = new(t || (t = a("models/user")));
return b.on("change", function() {
y.set("me", (d || (d = a("_"))).extend({
lastFetchTime: b.lastFetchTime
}, b.attributes))
}), b
}
function D(b) {
if (!(g || (g = a("lib/connect"))).isLoggedIn()) return $.Deferred().reject();
var c = (q || (q = a("config"))).get("me"),
d = y.get("me"),
e = arguments[1],
f;
return c.baseUrl = "me", b === undefined && (b = 2), e || (e = $.Deferred().done(function() {
(t || (t = a("models/user"))).instances.add(c), (h || (h = a("lib/event-bus"))).trigger("connect:hasUserData")
})), d ? (f = d.lastFetchTime || Date.now(), delete d.lastFetchTime, c.lastFetchTime = f, c.set(d), e.resolve()) : c.fetch().done(e.resolve).fail(function(c) {
c.status === 401 ? ((g || (g = a("lib/connect"))).logout(), e.reject(c)) : b ? D(b - 1, e) : e.reject(c)
}), e
}
var d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x = a("tracking-events").Audible,
y = new(o || (o = a("lib/persistent-store")))("auth"),
z;
c.exports = {
start: (d || (d = a("_"))).once(function() {
if (!(m || (m = a("lib/support"))).newWidget || !1)(k || (k = a("lib/flash-widget"))).start();
else {
var b = window.soundManager = new window.SoundManager;
b.setup(s || (s = a("config/soundmanager"))), b.beginDelayedInit(), b.onready(z)
}
})
}, z = (d || (d = a("_"))).once(function() {
window.soundManager.didFlashBlock && (h || (h = a("lib/event-bus"))).trigger(x.BLOCKED), (f || (f = a("lib/api-wrapper"))).initialize(), (h || (h = a("lib/event-bus"))).on("widget:ready", (e || (e = a("lib/api/api-bridge"))).start, e || (e = a("lib/api/api-bridge"))), (q || (q = a("config"))).set("me", C()).set("router", (new(p || (p = a("router")))).setRoutes(r || (r = a("config/routes")))).set("playQueue", new(l || (l = a("lib/play-queue")))).set("appView", (new(u || (u = a("views/widget-container")))({
el: $("#widget")
})).render()).set("widgetParams", B()), A().done((w || (w = a("lib/tracking"))).init), D().always(function() {
(i || (i = a("lib/experiments"))).setup(j || (j = a("config/experiments"))).fetch().done(function() {
(n || (n = a("backbone"))).history.start({
pushState: !0,
root: (q || (q = a("config"))).get("app_root")
})
})
})
})
};
//@ sourceURL=application |
#13 JavaScript::Eval (size: 4333, repeated: 2) r = function(a, b, c) {
function G(a, b) {
var c, d, e, f = b ? b.permalink_url : undefined,
g = !1,
h = !1,
i;
switch (a) {
case j.PLAY:
c = x, d = "Track Play", i = "play", g = !0;
break;
case j.PAUSE:
c = x, d = "Track Pause", i = "pause", g = !0;
break;
case j.PROGRESS_10:
c = x, d = "10percent", g = !0;
break;
case j.PROGRESS_95:
c = x, d = "95percent", g = !0;
break;
case j.FINISH:
c = x, d = "Track Complete", i = "stop", g = !0;
break;
case j.BLOCKED:
c = y, d = "Flash Blocked";
break;
case k.LIKE_BUTTON:
c = w, d = "Like button clicked", i = "Like";
break;
case k.SHARE_PANEL:
c = w, d = "Share panel opened", i = "Share_main";
break;
case k.DOWNLOAD:
c = w, d = "Player - download button clicked", i = "Download";
break;
case k.BUY:
c = w, d = "Player - buy button clicked", i = "Buy";
break;
case k.SCRUBBER:
c = w, d = "Waveform Click Play", i = "Waveform Click Play", h = !0;
break;
case l.SEEKED:
c = w, d = "Seeking in the waveform";
break;
case m.FOCUSED:
c = w, d = "Comment form focused", i = "Comment_main", g = !0;
break;
case m.SUBMIT:
c = w, d = "Comment form submit";
break;
case m.POSTED:
c = w, d = "Comment has been posted", i = "Comment_post";
break;
case n.EMBED_CODE_BUTTON:
c = w, d = "Share panel - embed code button clicked", i = "Share::embed";
break;
case n.EMBED_CODE_INPUT:
c = w, d = "Share panel - embed code input clicked";
break;
case n.LINK_BUTTON:
c = w, d = "Share panel - link button clicked", i = "Share::link";
break;
case n.LINK_INPUT:
c = w, d = "Share panel - link input clicked";
break;
case n.EMAIL_BUTTON:
c = v, d = "email - clicked", i = "Share::email", H(e, f, !0);
break;
case n.SHARE_ICON:
c = v, e = b.shareIconType, d = e + " - clicked", i = "Share::" + e, H(e, f, !0);
break;
case n.SHARE_BUTTON:
c = v, e = b.shareButtonType, d = e + " - " + z[e], i = "Share::" + e + "_" + z[e], H(e, f);
break;
case o.CLICKED:
c = w, d = "Artwork cliked", i = "Artwork clicked";
break;
case p.SCROLL_STARTED:
c = w, d = "Playlist Scroll", i = "Playlist Scroll";
break;
case p.EXTRA_FETCH:
c = w, d = "Playlist Scroll 50";
break;
case q.TITLE:
c = w, d = "Sound Title Link Click", i = "Links_to_mothership::title_link";
break;
case q.UPLOADER:
c = w, d = "Sound Uploader Link Click", i = "Links_to_mothership::uploader_link";
break;
case r.CLICKED:
c = w, d = "Set Title Link Click";
break;
case s.UPLOADER:
c = w, d = "Set Uploader Link Click";
break;
case s.ARTWORK:
c = w, d = "Set Artwork Click", i = "Artwork clicked"
}
c && d && I(c, d, f, g), i && (c === x ? J(i, f, b) : K(i, f, h))
}
function H(a, b, c) {
var d = c ? "share icon is clicked" : z[a];
_gaq.push(["_trackSocial", a, d, b])
}
function I(b, c, d, e) {
var f = [b, c, d].join("::");
if (e) {
A.hasOwnProperty(d) || (A[d] = {});
if (!A[d].hasOwnProperty(c)) A[d][c] = !0;
else return
}
b === y && (g || (g = a("lib/analytics"))).trackClick(u, f), _gaq.push(["_trackEvent", b, c, d])
}
function J(b, c, d) {
var e = ["sound", E, d.permalink_url].join("::"),
f = (i || (i = a("lib/math"))).precise(d.duration / 1e3, 1),
h = (i || (i = a("lib/math"))).precise(f / 4, 1);
(g || (g = a("lib/analytics"))).trackAudioEvent(u, e, b, h, f)
}
function K(b, c, d) {
var e = [b, c, E].join("::");
if (d) {
B.hasOwnProperty(c) || (B[c] = {});
if (!B[c].hasOwnProperty(b)) B[c][b] = !0;
else return
}(g || (g = a("lib/analytics"))).trackClick(u, e)
}
function L(a, b, c) {
return F.test(a || "") || I(y, "JS - " + a, "file:" + b + "; line:" + c), !1
}
function M(a) {
var b = a.get("xhr");
b && b.status.toString().indexOf("5") === 0 && I(y, b.status + " - " + b.statusText, "url:" + b.url)
}
function N() {
var b = ["sound", E, window.location.href];
(g || (g = a("lib/analytics"))).trackPageView(u, b.join("::"))
}
var d, e, f, g, h, i, j = a("tracking-events").Audible,
k = a("tracking-events").Track,
l = a("tracking-events").Scrubber,
m = a("tracking-events").Commenting,
n = a("tracking-events").SharePanel,
o = a("tracking-events").Artwork,
p = a("tracking-events").SoundsList,
q = a("tracking-events").Title,
r = a("tracking-events").SetHeader,
s = a("tracking-events").Details,
t = [j, k, l, m, n, o, p, q, r, s],
u = 0,
v = "widgetshare",
w = "UI",
x = "Tracks",
y = "Error",
z = {
facebook: "liked",
twitter: "tweeted",
google: "plus one"
},
A = {},
B = {},
C = 0,
D = {},
E = (h || (h = a("lib/url"))).parse(document.referrer).host,
F;
F = /Location\.toString/, d = c.exports = {
init: (e || (e = a("_"))).once(function() {
(g || (g = a("lib/analytics"))).initialize(), (e || (e = a("_"))).each(t, function(b) {
(e || (e = a("_"))).each(b, function(b) {
(f || (f = a("lib/event-bus"))).on(b, G.bind(null, b))
})
}), window.onerror = L, (f || (f = a("lib/event-bus"))).on("exception", M).on("layout:change", N)
}),
startTiming: function() {
return C++, D[C] = Date.now(), C
},
endTiming: function(a, b) {
var c, e;
c = D[a], c && (e = Date.now() - c, d.trackTiming(b.category, b.variable, e, b.label)), d.clearTiming(a)
},
clearTiming: function(a) {
delete D[a]
},
trackTiming: function(b, c, d, e) {
(g || (g = a("lib/analytics"))).trackTiming(b, c, d, e, 10)
}
}
};
//@ sourceURL=lib/tracking |
#14 JavaScript::Eval (size: 828, repeated: 2) r = function(a, b, c) {
function g(b, c) {
var d = b.getAttribute("data-id"),
f = e[d],
g, h, i;
f.__path ? (h = a(f.__path), delete f.__path) : (h = f.__class, delete f.__class), delete e[d], f.key && (i = f.key, delete f.key), g = c.addSubview(new h(f), i), g.render(), b.parentNode.replaceChild(g.el, b)
}
function h(b, c) {
var g, h;
return typeof b == "string" ? (c.hash.__path = b, h = a(b)) : (c.hash.__class = b, h = b), c.hash.args && ((d || (d = a("_"))).isFunction(c.hash.args) && (c.hash.args = c.hash.args(this)), c.hash = (d || (d = a("_"))).extend({}, c.hash.args, c.hash)), delete c.hash.args, c.hash.className && (c.hash.className = [h.prototype.className, c.hash.className].filter(Boolean).join(" ")), g = f++, e[g] = c.hash, '<view data-id="' + g + '"></view>'
}
function i(a) {
a.$("view").each(function() {
g(this, a)
})
}
var d, e = {},
f = 0;
b.handlebarHelper = h, b.replacePlaceholders = i
};
//@ sourceURL=lib/subview-plugin |
#15 JavaScript::Eval (size: 2443, repeated: 2) r = function(a, b, c) {
function h(a) {
try {
var b = !! a.getItem,
c = !1,
d;
try {
d = Date.now(), a.setItem(d, d), a.removeItem(d), c = !0
} catch (e) {} finally {}
return b && c
} catch (f) {
return !1
} finally {}
}
var d, e, f, g;
d = c.exports = {}, g = {
newWidget: function() {
return typeof window.JSON == "undefined" ? !1 : (f || (f = a("lib/browser"))).isIEMobile ? !0 : document.documentMode <= 8 || (f || (f = a("lib/browser"))).isIE6 || (f || (f = a("lib/browser"))).isIE7 || (f || (f = a("lib/browser"))).isIE8 ? !1 : !0
},
sessionStorage: function() {
try {
return typeof sessionStorage != "undefined" && h(sessionStorage)
} catch (a) {
return !1
} finally {}
},
localStorage: function() {
try {
return typeof localStorage != "undefined" && h(localStorage)
} catch (a) {
return !1
} finally {}
},
flash: function() {
var a = !1,
b = navigator,
c = b.plugins,
d = window.ActiveXObject,
e, f, g;
if (c && c.length) f = "application/x-shockwave-flash", g = b.mimeTypes, g && g[f] && g[f].enabledPlugin && g[f].enabledPlugin.description && (a = !0);
else if (typeof d != "undefined") {
try {
e = new d("ShockwaveFlash.ShockwaveFlash")
} catch (h) {} finally {}
a = !! e
}
return a
},
HTML5Audio: function() {
try {
return !!window.hasOwnProperty("Audio") && !! (new window.Audio).canPlayType('audio/mpeg; codecs="mp3"')
} catch (a) {
return !1
} finally {}
},
webSocket: function() {
return typeof window.WebSocket != "undefined"
},
WebWorker: function() {
return !1
},
BlobBuilder: function() {
return window.MozBlobBuilder || window.WebKitBlobBuilder || window.BlobBuilder
},
URL: function() {
return window.webkitURL || window.URL
},
touch: function() {
try {
return window.hasOwnProperty("ontouchstart")
} catch (a) {
return !1
} finally {}
},
speech: function() {
return "onwebkitspeechchange" in document.createElement("input")
},
corsImg: function() {
return !1
},
transform3d: function() {
var a = document.createElement("modernizr"),
b = a.style,
c = document.head || document.getElementsByTagName("head")[0],
d = document.documentElement,
e = " -webkit- -moz- -o- -ms- -khtml- ".split(" "),
f = "@media (" + e.join("transform-3d),(") + "modernizr)",
g = document.createElement("style"),
h = document.createElement("div"),
i = 0,
j, k;
return j = function(a) {
while (a[i]) {
if (typeof b[a[i]] != "undefined") return !0;
i++
}
}, k = !! j(["perspectiveProperty", "WebkitPerspective", "MozPerspective", "OPerspective", "msPerspective"]), k && typeof d.style.webkitPerspective != "undefined" && (k = null, g.textContent = f + "{#modernizr{height:3px}}", c.appendChild(g), h.id = "modernizr", d.appendChild(h), k = h.offsetHeight === 3 ? !0 : !1, g.parentNode.removeChild(g), h.parentNode.removeChild(h)), k
}
}, (e || (e = a("_"))).each(g, function(a, b) {
d[b] = !! a()
}), g = null
};
//@ sourceURL=lib/support |
#16 JavaScript::Eval (size: 1829, repeated: 2) r = function(a, b, c) {
function l(a, b) {
return [h, a, b].join(i)
}
function m(a) {
var b = a.storage;
if (b) try {
return b.setItem(a.keyName, JSON.stringify(a._store)), !0
} catch (c) {
return !1
} finally {}
}
function n(b) {
var c;
return b === "local" && (g || (g = a("lib/support"))).localStorage ? c = window.localStorage : b === "session" && (g || (g = a("lib/support"))).sessionStorage && (c = window.sessionStorage), c
}
function o(a) {
var b = {},
c = a.storage;
return c && (b = JSON.parse(c.getItem(a.keyName) || "{}")), b
}
function p(b) {
var c, d, f, g, h;
h = {
dontPersist: !0
};
if (!b.key) {
(e || (e = a("_"))).each((e || (e = a("_"))).values(k.local).concat((e || (e = a("_"))).values(k.session)), function(a) {
a.reset(h)
});
return
}
j.lastIndex = 0, c = j.exec(b.key), c && (f = c[1], d = c[2], f && d && (g = k[f][d], g && (e || (e = a("_"))).each(o(g), function(a, b) {
g.set(b, a, h)
})))
}
function q() {
if (!(g || (g = a("lib/support"))).localStorage) return;
var b = [],
c = localStorage.length,
d, e;
for (d = 0; d < c; d++) e = localStorage.key(d), e.indexOf(h + i) !== 0 && b.push(e);
b.forEach(function(a) {
localStorage.removeItem(a)
})
}
var d, e, f, g, h = "WIDGET",
i = "::",
j = new RegExp("^" + h + i + "(\\S+?)" + i + "(\\S+)"),
k = {
local: {},
session: {}
};
q(), d = c.exports = new(f || (f = a("lib/mixin")))({
storage: null,
keyName: null,
type: null,
namespace: null,
around: {
initialize: function(b, c, d) {
d = d || "local";
if (k[d][c]) return k[d][c];
k[d][c] = this, b(), this.type = d, this.namespace = c, this.storage = n(d, c), this.keyName = l(d, c), this._store = o(this), this.length = (e || (e = a("_"))).keys(this._store).length
}
},
after: {
set: function(a, b, c) {
var d = !c || !c.dontPersist,
e;
d && (e = m(this), e || this.unset(a))
},
unset: function(a, b) {
(!b || !b.dontPersist) && m(this)
},
reset: function(a) {
(!a || !a.dontPersist) && m(this)
}
},
dispose: function() {
this.storage.removeItem(this.keyName), this.reset({
dontPersist: !0
}), delete k[this.type][this.namespace]
},
write: function() {
m(this)
}
}), window.addEventListener("storage", p, !1)
};
//@ sourceURL=lib/mixins/persistent |
#17 JavaScript::Eval (size: 2023, repeated: 2) r = function(a, b, c) {
function p() {
if (n) return;
var b = (f || (f = a("lib/connect"))).isLoggedIn() ? "" : "anonymous-";
n = new(g || (g = a("lib/persistent-store")))("experiments-" + b + (f || (f = a("lib/connect"))).getUserIdentifier()), n.each(function(a, b) {
o.hasOwnProperty(b) && q(b).indexOf(a) > -1 ? t(b, a) : n.unset(b)
})
}
function q(b) {
var c = [],
d = o[b];
return d && (c = (e || (e = a("_"))).pluck(d.groups, "value")), c
}
function r(a, b) {
var c = o[b],
d = 0,
e, f;
e = c.groups.reduce(function(a, b) {
return a + (b.ratio || 0)
}, 0);
for (f = Math.floor(b.length / 2); f--;) a *= b.charCodeAt(f * 2) / b.charCodeAt(f * 2 + 1);
a = Math.floor(a) % e, c.groups.some(function(c) {
d += c.ratio || 0;
if (a < d) return t(b, c.value), !0
})
}
function s(a, b) {
var c = b.map(function(a) {
return $.ajax({
url: d.getRolloutAPIEndpoint(a),
type: "GET"
}).done(t.bind(this, a))
});
return $.whenAll(c)
}
function t(a, b) {
m.isReadOnly || m.set(a, b), n && n.set(a, b)
}
function u(a) {
return a === "false" ? !1 : a === "true" ? !0 : /^[0-9.]+$/.test(a) ? parseFloat(a) : a
}
function v() {
var b = new(i || (i = a("lib/store")));
return (h || (h = a("lib/mixins/read-only"))).applyTo(b), b
}
var d, e, f, g, h, i, j, k = "i1/me/features/",
l = 1e4,
m, n, o;
d = c.exports = {
setup: function(a) {
return this.reset(), o = a, p(), this
},
get: function(a) {
return m ? m.get(a) : undefined
},
reset: function() {
n && (n.dispose(), n = null), m = v()
},
fetch: function(b) {
!o && !1 && window.console.warn("Experiments config is not defined.");
var c = [],
d = (f || (f = a("lib/connect"))).getUserIdentifier(),
g = !0,
h = (j || (j = a("lib/url"))).parseQueryString(window.location.search),
i;
return p(), (e || (e = a("_"))).each(o, function(b, i) {
var j = h["exp_" + i],
k = !0,
l = b.rolloutId && (f || (f = a("lib/connect"))).isLoggedIn();
j !== undefined ? m.set(i, u(j)) : k = m.get(i) !== undefined, l ? (c.push(i), k || (g = !1, t(i, (e || (e = a("_"))).last(q(i))))) : k || r(d, i)
}), g ? (m.makeReadOnly(), clearTimeout(this._fetchTimeoutId), this._fetchTimeoutId = setTimeout(s.bind(null, d, c), b || l), i = $.Deferred().resolve()) : i = s(d, c).always(m.makeReadOnly.bind(m)), i
},
serialize: function() {
return m ? m.map(function(a, b) {
return b + ":" + a
}).join(",") : ""
},
getRolloutAPIEndpoint: function(a) {
return k + a
}
}
};
//@ sourceURL=lib/experiments |
#18 JavaScript::Eval (size: 3007, repeated: 2) r = function(a, b, c) {
function r() {
return (f || (f = a("config"))).get("nowPlaying")
}
function s() {
var b = r(),
c = (f || (f = a("config"))).get("playQueue"),
d;
return b ? d = b : c && (d = c.current()), d
}
function t(a) {
var b = r();
a && (b && b.stop(), a.play(), a.seek(0))
}
function u(b) {
var c, d = (f || (f = a("config"))).get("playQueue"),
e = s();
switch (b) {
case (i || (i = a("lib/api/getters"))).GET_VOLUME:
c = e ? e.getVolume() : p;
break;
case (i || (i = a("lib/api/getters"))).GET_POSITION:
c = e ? e.currentTime() : p;
break;
case (i || (i = a("lib/api/getters"))).GET_DURATION:
c = e ? e.duration() : p;
break;
case (i || (i = a("lib/api/getters"))).GET_CURRENT_SOUND:
c = e ? e.toJSON() : p;
break;
case (i || (i = a("lib/api/getters"))).GET_CURRENT_SOUND_INDEX:
c = d ? d.cursor : -1;
break;
case (i || (i = a("lib/api/getters"))).GET_SOUNDS:
c = d ? d.getSounds().map(function(a) {
return a.toJSON()
}) : [];
break;
case (i || (i = a("lib/api/getters"))).IS_PAUSED:
c = e ? e.isPaused() : !1
}
return c
}
function v(b, c) {
var d = (f || (f = a("config"))).get("playQueue"),
e = s();
if (e) switch (b) {
case (h || (h = a("lib/api/setters"))).SET_VOLUME:
e.setVolume(c);
break;
case (h || (h = a("lib/api/setters"))).SEEK_TO:
e.seek(c);
break;
case (h || (h = a("lib/api/setters"))).PLAY:
e.play();
break;
case (h || (h = a("lib/api/setters"))).PAUSE:
e.pause();
break;
case (h || (h = a("lib/api/setters"))).TOGGLE:
e.toggle()
}
if (d) switch (b) {
case (h || (h = a("lib/api/setters"))).NEXT:
t(d.next());
break;
case (h || (h = a("lib/api/setters"))).PREV:
t(d.prev());
break;
case (h || (h = a("lib/api/setters"))).SKIP:
t(d.get(c))
}
}
function w(b, c) {
if (!window.parent.postMessage || window.parent === window) return !1;
var d = JSON.stringify({
widgetId: (f || (f = a("config"))).get("widget_id"),
method: b,
value: (e || (e = a("_"))).isUndefined(c) ? null : c
});
window.parent.postMessage(d, "*")
}
function x(b, c, d) {
(d || (e || (e = a("_"))).indexOf(q, b) > -1) && w(b, c)
}
function y(b) {
return (e || (e = a("_"))).indexOf((e || (e = a("_"))).values(j), b) > -1
}
function z(a) {
y(a) && q.push(a)
}
function A(b) {
y(b) && (q = (e || (e = a("_"))).without(q, b))
}
function B(b) {
var c, d, f;
try {
c = JSON.parse(b.data)
} catch (g) {
return
} finally {}
d = c.method;
if (!d) return;
(e || (e = a("_"))).indexOf(m, d) > -1 ? w(d, u(d)) : (e || (e = a("_"))).indexOf(n, d) > -1 ? v(d, c.value) : (e || (e = a("_"))).indexOf(o, d) > -1 && (f = c.value, f && (d === k.ADD_LISTENER ? z(f) : A(f)))
}
function C(a) {
var b = a.currentTime();
return {
loadedProgress: a.loadProgress(),
currentPosition: b,
relativePosition: a.progress()
}
}
var d, e, f, g, h, i, j = a("lib/api/events").api,
k = a("lib/api/events").bridge,
l, m = (e || (e = a("_"))).values(i || (i = a("lib/api/getters"))),
n = (e || (e = a("_"))).values(h || (h = a("lib/api/setters"))),
o = (e || (e = a("_"))).values(k),
p, q = [];
d = c.exports = {
start: (e || (e = a("_"))).once(function() {
window.addEventListener ? window.addEventListener("message", B, !1) : window.attachEvent("onmessage", B), (e || (e = a("_"))).each((l || (l = a("lib/api/events-map"))).audio, function(b, c) {
(g || (g = a("lib/event-bus"))).on(b, function(a) {
a.sound && a.sound.isNowPlaying() && x(c, C(a.sound))
})
}), (e || (e = a("_"))).each((l || (l = a("lib/api/events-map"))).ui, function(b, c) {
(g || (g = a("lib/event-bus"))).on(b, function(a, b) {
b = b && b.shareButtonType ? b : null, x(c, b)
})
}), w(j.READY)
})
}
};
//@ sourceURL=lib/api/api-bridge |
#19 JavaScript::Eval (size: 1693, repeated: 2) r = function(a, b, c) {
function s(a, b, c) {
var d = window.screenX + (window.outerWidth - b) / 2,
e = window.screenY + (window.outerHeight - c) / 2;
return window.open(a, "connectWithSoundCloud", ["location=1", "width=" + b, "height=" + c, "top=" + e, "left=" + d, "toolbar=no", "scrollbars=yes"].join(","))
}
var d, e, f, g, h, i, j, k = 150,
l = "v=2",
m = (g || (g = a("config"))).get("app_root") + "callback.html",
n = "oauth_token",
o = new(j || (j = a("lib/persistent-store")))("anonymous-user"),
p = new(j || (j = a("lib/persistent-store")))("auth"),
q, r;
p.on(n, function(a) {
d.setAuthToken(a.current)
}), d = c.exports = (e || (e = a("_"))).extend({}, (f || (f = a("lib/backbone"))).Events, {
setAuthToken: function(a) {
p.set(n, a)
},
getAuthToken: function() {
return p.get(n)
},
isLoggedIn: function() {
return !!this.getAuthToken()
},
login: function() {
var b;
return r ? q && !q.closed && q.focus && q.focus() : (r = $.Deferred().fail(function() {
r = null
}), this.isLoggedIn() ? r.resolve() : (b = (i || (i = a("lib/url"))).stringify({
host: (g || (g = a("config"))).get("api_host").replace("api.", ""),
path: ["connect"],
query: {
client_id: (g || (g = a("config"))).get("client_id"),
response_type: "token",
scope: "non-expiring",
display: "popup",
redirect_uri: location.protocol + "//" + location.host + m + "?" + l
}
}), q = s(b, 360, 450), function c() {
(!q || q.closed) && !d.isLoggedIn() ? r.reject() : q.closed ? (h || (h = a("lib/event-bus"))).one("connect:hasUserData", r.resolve).trigger("connect:login", "login") : setTimeout(c, k)
}())), r
},
logout: function() {
p.reset(), (h || (h = a("lib/event-bus"))).trigger("connect:logout", "logout")
},
getUserIdentifier: function() {
var a;
return d.isLoggedIn() ? a = d.currentUserId() : (a = o.get("id"), a || (a = Math.floor(Math.random() * 1e3), o.set("id", a))), a
},
currentUserId: function() {
return (g || (g = a("config"))).get("me").id
}
})
};
//@ sourceURL=lib/connect |
#20 JavaScript::Eval (size: 7804, repeated: 2) r = function(a, b, c) {
function x(a, b) {
return a.triggerEvent.bind(a, b)
}
function y(a) {
var b;
this.streamInfo = this.choosePreferredStream(a), this._expirationTimeoutId || (b = this.getExpirationTime(this.streamInfo), this._expirationTimeoutId = setTimeout(function() {
this.resetInitAudio(!0), this.streamInfo = null, this._expirationTimeoutId = null, delete r[this.sound.id], delete this.sound._requests[this.sound.url("streamsUrl")]
}.bind(this), Math.floor((b - Date.now()) * .9))), this._initAudioDefer && this._initAudioDefer.resolve()
}
function z() {
var b;
b = this.sound.get("secret_token"), this.streamInfo = {
url: (h || (h = a("lib/url"))).modify(this.sound.get("stream_url"), {
query: {
client_id: (i || (i = a("config"))).get("client_id"),
skip_logging: "true"
}
}),
protocol: s
}, b && (this.streamInfo.url = (h || (h = a("lib/url"))).modify(this.streamInfo.url, {
secret_token: b
})), this._initAudioDefer.resolve()
}
function A() {
var b = !this._timingId;
!b && this.currentTime() !== 0 && ((n || (n = a("lib/tracking"))).endTiming(this._timingId, {
category: "audio",
variable: this.streamInfo.protocol + ":loadingTime",
label: Math.round((k || (k = a("lib/math"))).precise(this.sound.duration(), -4) / 1e3) + "s"
}), b = !0), b && (delete this._timingId, this.off("time", A, this))
}
var d, e, f, g, h, i, j, k, l, m, n, o = a("tracking-events").Audible,
p = {
muted: !1,
volume: 100
},
q = [{
name: o.PROGRESS_10,
value: .1
}, {
name: o.PROGRESS_95,
value: .95
}],
r = {},
s = "http",
t = "rtmp",
u = {
bitrate: Infinity,
protocols: (j || (j = a("lib/support"))).flash ? [t, s] : [s],
extensions: ["mp3"]
},
v = 12e4,
w = {
TIME: "time",
PLAY: "play",
PLAY_START: "playstart",
PAUSE: "pause",
FINISH: "finish",
SEEK: "seeked",
LOOP: "loop",
LOADING: "loading"
};
d = c.exports = Class.extend([(f || (f = a("lib/backbone"))).Events,
{
controller: null,
sound: null,
streamSettings: null,
streamInfo: null,
registerPlays: !0,
_cancelLooping: !0,
initialize: function(b, c) {
(e || (e = a("_"))).bindAll(this, "audioFinish", "onTime"), this.sound = b, this.currentProgress = q.slice(), this.streamSettings = (e || (e = a("_"))).extend({}, u, c), (m || (m = a("lib/experiments"))).get("use_rtmp_stream") || (this.streamSettings.protocols = this.streamSettings.protocols.filter(function(a) {
return a !== t
})), this.on("all", this.onAll).on(w.PLAY, this.onPlay, this).on(w.PAUSE, this.onPause, this).on(w.FINISH, this.onFinish, this)
},
onTime: function() {
this.triggerEvent(w.TIME), this.currentProgress.length && this.sound.progress() >= this.currentProgress[0].value && ((g || (g = a("lib/event-bus"))).trigger(this.currentProgress[0].name, this.sound.getCurrentSound().toJSON()), this.currentProgress.shift())
},
onAll: function(a) {
this.sound.trigger.apply(this.sound, arguments)
},
onPlay: function() {
this.registerPlays && (this.registerPlay(), this.registerPlays = !1), this.onTimeInterval = setInterval(this.onTime, 40), (g || (g = a("lib/event-bus"))).trigger(o.PLAY, this.sound.getCurrentSound().toJSON())
},
onPause: function() {
clearInterval(this.onTimeInterval), delete this.onTimeInterval, (g || (g = a("lib/event-bus"))).trigger(o.PAUSE, this.sound.getCurrentSound().toJSON())
},
onFinish: function() {
this.sound.stop(), this.registerPlays = !0, (g || (g = a("lib/event-bus"))).trigger(o.FINISH, this.sound.getCurrentSound().toJSON())
},
_initAudioDefer: null,
_expirationTimeoutId: null,
initAudio: function() {
return this._initAudioDefer || (this._initAudioDefer = $.Deferred()), this._initAudioDefer.isResolved() && this.streamInfo ? this._initAudioDefer : ((l || (l = a("lib/browser"))).isSafari && (l || (l = a("lib/browser"))).isMobile ? z.call(this) : this.sound.fetchStreams().done(y.bind(this)).fail(this.resetInitAudio.bind(this)), this._initAudioDefer)
},
_isObfuscatedStreamUsed: !1,
createAudioController: function(b) {
var c, d;
if (this.controller) return;
c = {
id: "audio-" + this.sound.resource_id,
url: b.url,
autoLoad: !1
}, b.protocol === t && ((e || (e = a("_"))).extend(c, {
rtmp: !0,
url: this.getRtmpFilePath(b.url),
serverURL: this.getRtmpServerAddress(b.url),
duration: this.sound.get("duration")
}), this._isObfuscatedStreamUsed = !0), d = {
onpause: w.PAUSE,
onstop: w.PAUSE,
whileloading: w.LOADING
}, (e || (e = a("_"))).each(d, function(a, b) {
c[b] = x(this, a)
}, this), c.onfinish = this.audioFinish, this.controller = soundManager.createSound(c)
},
audioFinish: function() {
this._isPlayActionQueued = !1, this.triggerEvent(w.PAUSE, !0), this.triggerEvent(w.FINISH)
},
choosePreferredStream: function(b) {
var c = {},
d = this.streamSettings,
f = d.bitrate,
g = d.protocols,
h = d.extensions,
i = r[this.sound.id];
return i ? i : ((e || (e = a("_"))).each(b, function(a, b) {
var d = b.split("_"),
e = d[0],
f = d[1],
g = d[2];
c[e] = c[e] || {}, c[e][f] = c[e][f] || {}, c[e][f][g] = e === t ? this.transformRtmpStreamUrl(a, f) : a
}, this), g.every(function(b) {
return h.every(function(d) {
if (c[b] && c[b][d]) {
var g = (e || (e = a("_"))).sortBy((e || (e = a("_"))).keys(c[b][d]).map(Number), function(a) {
return a
}),
h = f === Infinity,
j = f === -Infinity;
h || j ? f = g[h ? "pop" : "shift"]() : f = g.sort(function(a, b) {
return Math.abs(b - f) - Math.abs(a - f)
}).pop(), i = r[this.sound.id] = {
url: c[b][d][f],
bitrate: f,
protocol: b,
extension: d
}
}
return !i
}, this), !i
}, this), i)
},
transformRtmpStreamUrl: function(a, b) {
return a.replace(/([a-z0-9.]+\?)/i, function(a) {
return a = a.replace("." + b, ""), b + ":" + a
})
},
getExpirationTime: function(b) {
var c = (h || (h = a("lib/url"))).parse(b.url),
d;
switch (b.protocol) {
case t:
d = Date.now() + v;
break;
case s:
d = parseInt(c.query.Expires, 10) * 1e3
}
return d
},
getRtmpFilePath: function(b) {
var c = (h || (h = a("lib/url"))).parse(b);
return c.file + "?" + $.param(c.query)
},
getRtmpServerAddress: function(b) {
var c = (h || (h = a("lib/url"))).parse(b);
return b.substr(0, b.indexOf(c.file))
},
registerPlay: function() {
var b = this.sound.getOriginalSound(),
c = b.get("playback_count");
return b.set("playback_count", c + 1), $.ajax({
type: "POST",
url: (h || (h = a("lib/url"))).stringify({
path: ["tracks", b.id, "plays"],
query: {
secret_token: this.sound.get("secret_token")
}
})
}).fail(function() {
b.set("playback_count", c)
})
},
toggle: function() {
this[this.isPaused() ? "play" : "pause"]()
},
play: function() {
if (!this.sound.isStreamable()) return;
this.currentTime() === 0 && (this._timingId = (n || (n = a("lib/tracking"))).startTiming(), this.on("time", A, this)), this.triggerEvent(w.PLAY_START), this.initAudio().done(function() {
clearTimeout(this._expirationTimeoutId), this.createAudioController(this.streamInfo), this.toggleMute(p.muted), this.setVolume(p.volume), this.controller.play()
}.bind(this)), this._isPlayActionQueued = !0, this.triggerEvent(w.PLAY)
},
pause: function() {
this._isPlayActionQueued = !1, this._timingId && (n || (n = a("lib/tracking"))).clearTiming(this._timingId), this.controller ? this.controller.pause() : this.triggerEvent(w.PAUSE)
},
resetInitAudio: function(a) {
this._initAudioDefer && (a || !this._initAudioDefer.isResolved()) && (this._initAudioDefer.reject(), this._initAudioDefer = null)
},
triggerEvent: function(b, c) {
var d = this.getEvent(b);
c || (g || (g = a("lib/event-bus"))).trigger(b, d), this.trigger(b, d)
},
getEvent: function(a) {
return {
sound: this.sound,
type: a
}
},
dispose: function() {
this.off(), delete this.controller, delete this.sound
},
seek: function(a) {
if (this.controller) {
var b = this.currentTime(),
c;
this.controller.setPosition(a), c = function() {
this.currentTime() !== b ? this.isPlaying() && this.triggerEvent("seeked") : setTimeout(c, 20)
}.bind(this), c()
}
},
seekRelative: function(a) {
this.controller && this.seek(this.currentTime() + a)
},
currentTime: function() {
return this.controller && this.controller.position || 0
},
loadProgress: function() {
var a = 0;
return this.controller && (a = this._isObfuscatedStreamUsed ? 1 : this.controller.bytesLoaded / this.controller.bytesTotal), a
},
buffered: function() {
return this.controller && this.controller.duration || 0
},
isPaused: function() {
return !this.isPlaying()
},
isPlaying: function() {
return this.controller && this.controller.playState && !this.controller.paused || this._isPlayActionQueued
},
_isPlayActionQueued: !1,
toggleMute: function(a) {
this.controller && (p.muted = a === undefined ? !p.muted : !! a, this.controller[p.muted ? "mute" : "unmute"]())
},
getVolume: function() {
return this.controller ? this.controller.volume : p.volume
},
setVolume: function(a) {
a = Math.max(0, Math.min(100, a === undefined ? 1 : parseInt(a, 10))), p.volume = a, this.controller && this.controller.setVolume(a)
}
}]), d.Events = w
};
//@ sourceURL=lib/audio |
#21 JavaScript::Eval (size: 233, repeated: 2) r = function(a, b, c) {
return require("vendor/handlebars-runtime").template(function(a, b, c, d, e) {
c = c || a.helpers;
var f, g = this;
return '<div class="scrubberPosition__indicator"></div>\n'
})
};
//@ sourceURL=views/sound/scrubber-position.tmpl |
#22 JavaScript::Eval (size: 224, repeated: 2) r = function(a, b, c) {
return require("vendor/handlebars-runtime").template(function(a, b, c, d, e) {
c = c || a.helpers;
var f, g = this;
return '<div class="scrubber__positionIndicator"></div>\n'
})
};
//@ sourceURL=views/sound/scrubber.tmpl |
#23 JavaScript::Eval (size: 368, repeated: 2) r = function(a, b, c) {
return require("vendor/handlebars-runtime").template(function(a, b, c, d, e) {
c = c || a.helpers;
var f = "",
g, h, i, j = this,
k = this.escapeExpression;
return f += '<div class="timeIndicator__current"></div>\n<div class="timeIndicator__total">', g = b.duration, h = c.$timecode, g = h.call(b, g, {
hash: {}
}), f += k(g) + "</div>\n", f
})
};
//@ sourceURL=views/sound/time-indicator.tmpl |
#24 JavaScript::Eval (size: 609, repeated: 2) r = function(a, b, c) {
return require("vendor/handlebars-runtime").template(function(a, b, c, d, e) {
function l(a, b) {
return "g-button-pause"
}
function m(a, b) {
return "Pause"
}
function n(a, b) {
return "Play"
}
c = c || a.helpers;
var f = "",
g, h, i, j, k = this;
f += '<button class="sc-button g-button-play sc-button-large ', g = b.isPlaying, h = c["if"], j = k.program(1, l, e), j.hash = {}, j.fn = j, j.inverse = k.noop, g = h.call(b, g, j);
if (g || g === 0) f += g;
f += '">\n\t', g = b.isPlaying, h = c["if"], j = k.program(3, m, e), j.hash = {}, j.fn = j, j.inverse = k.program(5, n, e), g = h.call(b, g, j);
if (g || g === 0) f += g;
return f += "\n</button>\n", f
})
};
//@ sourceURL=views/sound/play-button.tmpl |
#25 JavaScript::Eval (size: 1181, repeated: 2) r = function(a, b, c) {
return require("vendor/handlebars-runtime").template(function(a, b, c, d, e) {
function p(a, b) {
return ' <div class="progressBar__progressLoad sc-border-box g-all-transitions-200"></div> '
}
c = c || a.helpers;
var f = "",
g, h, i, j, k = this,
l = "function",
m = c.helperMissing,
n = void 0,
o = this.escapeExpression;
f += '<div class="progressBar__upperPart" style="height: ', g = b.upperPartHeight, typeof g === l ? g = g.call(b, {
hash: {}
}) : g === n && (g = m.call(b, "upperPartHeight", {
hash: {}
})), f += o(g) + ';"> <div class="progressBar__upperPartBottomLine"></div> <div class="progressBar__progressPlay sc-border-box"></div> ', g = b._options, g = g === null || g === undefined || g === !1 ? g : g.dark, h = c.unless, j = k.program(1, p, e), j.hash = {}, j.fn = j, j.inverse = k.noop, g = h.call(b, g, j);
if (g || g === 0) f += g;
return f += '\n</div>\n<div class="progressBar__lowerPart" style="top: ', g = b.upperPartHeight, typeof g === l ? g = g.call(b, {
hash: {}
}) : g === n && (g = m.call(b, "upperPartHeight", {
hash: {}
})), f += o(g) + "; height: ", g = b.lowerPartHeight, typeof g === l ? g = g.call(b, {
hash: {}
}) : g === n && (g = m.call(b, "lowerPartHeight", {
hash: {}
})), f += o(g) + ';"> <div class="progressBar__progressPlay sc-border-box"></div>\n</div>\n', f
})
};
//@ sourceURL=views/sound/progress-bar.tmpl |
#26 JavaScript::Eval (size: 1731, repeated: 2) r = function(a, b, c) {
return require("vendor/handlebars-runtime").template(function(a, b, c, d, e) {
function p(a, b) {
var c = "",
d;
return c += ' <a class="soundTitle__username sc-link-dark sc-truncate" href="', d = a.user, d = d === null || d === undefined || d === !1 ? d : d.permalink_url, typeof d === l ? d = d.call(a, {
hash: {}
}) : d === n && (d = m.call(a, "user.permalink_url", {
hash: {}
})), c += o(d) + '">', d = a.user, d = d === null || d === undefined || d === !1 ? d : d.username, typeof d === l ? d = d.call(a, {
hash: {}
}) : d === n && (d = m.call(a, "user.username", {
hash: {}
})), c += o(d) + "</a><br/>\n", c
}
function q(a, b) {
var d = "",
e, f;
d += ' <a class="soundTitle__title sc-link-dark sc-truncate" href="', e = a.permalink_url, typeof e === l ? e = e.call(a, {
hash: {}
}) : e === n && (e = m.call(a, "permalink_url", {
hash: {}
})), d += o(e) + '">', e = a.title, typeof e === l ? e = e.call(a, {
hash: {}
}) : e === n && (e = m.call(a, "title", {
hash: {}
})), d += o(e), e = a.show_time, f = c["if"], j = k.program(4, r, b), j.hash = {}, j.fn = j, j.inverse = k.noop, e = f.call(a, e, j);
if (e || e === 0) d += e;
return d += "</a>\n", d
}
function r(a, b) {
var c = "",
d;
return c += '<span class="soundItem__total">', d = a.total, typeof d === l ? d = d.call(a, {
hash: {}
}) : d === n && (d = m.call(a, "total", {
hash: {}
})), c += o(d) + "</span>", c
}
function s(a, b) {
var c = "",
d;
return c += ' <span class="soundTitle__title sc-link-dark sc-truncate">', d = a.title, typeof d === l ? d = d.call(a, {
hash: {}
}) : d === n && (d = m.call(a, "title", {
hash: {}
})), c += o(d) + "</span>\n", c
}
c = c || a.helpers;
var f = "",
g, h, i, j, k = this,
l = "function",
m = c.helperMissing,
n = void 0,
o = this.escapeExpression;
g = b.show_user, h = c["if"], j = k.program(1, p, e), j.hash = {}, j.fn = j, j.inverse = k.noop, g = h.call(b, g, j);
if (g || g === 0) f += g;
f += "\n", g = b.shareable, h = c["if"], j = k.program(3, q, e), j.hash = {}, j.fn = j, j.inverse = k.program(6, s, e), g = h.call(b, g, j);
if (g || g === 0) f += g;
return f += "\n", f
})
};
//@ sourceURL=views/sound/title.tmpl |
#27 JavaScript::Eval (size: 1781, repeated: 2) r = function(a, b, c) {
return require("vendor/handlebars-runtime").template(function(a, b, c, d, e) {
function p(a, b) {
var c = "",
d;
return c += '\n<li class="soundStats__item" title="', d = a.playback_count, typeof d === l ? d = d.call(a, {
hash: {}
}) : d === n && (d = m.call(a, "playback_count", {
hash: {}
})), c += o(d) + ' Plays"> <ins class="soundStats__icon soundStats__playbackIcon">#</ins>', d = a.playback_count, typeof d === l ? d = d.call(a, {
hash: {}
}) : d === n && (d = m.call(a, "playback_count", {
hash: {}
})), c += o(d) + "\n</li>\n", c
}
function q(a, b) {
var c = "",
d;
return c += '\n<li class="soundStats__item" title="', d = a.comment_count, typeof d === l ? d = d.call(a, {
hash: {}
}) : d === n && (d = m.call(a, "comment_count", {
hash: {}
})), c += o(d) + ' Comments"> <ins class="soundStats__icon soundStats__commentIcon">#</ins>', d = a.comment_count, typeof d === l ? d = d.call(a, {
hash: {}
}) : d === n && (d = m.call(a, "comment_count", {
hash: {}
})), c += o(d) + "\n</li>\n", c
}
function r(a, b) {
var c = "",
d;
return c += '\n<li class="soundStats__item" title="', d = a.favoritings_count, typeof d === l ? d = d.call(a, {
hash: {}
}) : d === n && (d = m.call(a, "favoritings_count", {
hash: {}
})), c += o(d) + ' Likes"> <ins class="soundStats__icon soundStats__favIcon">#</ins>', d = a.favoritings_count, typeof d === l ? d = d.call(a, {
hash: {}
}) : d === n && (d = m.call(a, "favoritings_count", {
hash: {}
})), c += o(d) + "\n</li>\n", c
}
c = c || a.helpers;
var f = "",
g, h, i, j, k = this,
l = "function",
m = c.helperMissing,
n = void 0,
o = this.escapeExpression;
g = b.show_playcount, h = c["if"], j = k.program(1, p, e), j.hash = {}, j.fn = j, j.inverse = k.noop, g = h.call(b, g, j);
if (g || g === 0) f += g;
f += "\n", g = b.comment_count, h = c["if"], j = k.program(3, q, e), j.hash = {}, j.fn = j, j.inverse = k.noop, g = h.call(b, g, j);
if (g || g === 0) f += g;
f += "\n", g = b.favoritings_count, h = c["if"], j = k.program(5, r, e), j.hash = {}, j.fn = j, j.inverse = k.noop, g = h.call(b, g, j);
if (g || g === 0) f += g;
return f += "\n", f
})
};
//@ sourceURL=views/sound/stats.tmpl |
#28 JavaScript::Eval (size: 4370, repeated: 2) r = function(a, b, c) {
return require("vendor/handlebars-runtime").template(function(a, b, c, d, e) {
function p(a, b) {
var d = "",
e, f, g;
d += ' <div class="waveform__layer waveform__progressBar"> ', e = "views/sound/progress-bar", f = {}, g = a.model, g = g === null || g === undefined || g === !1 ? g : g._resource_id, f.resource_id = g, g = a.model, g = g === null || g === undefined || g === !1 ? g : g._resource_type, f.resource_type = g, g = a.upperPartHeight, f.upperPartHeight = g, g = "progressBar", f.key = g, g = c.$view, j = {}, j.hash = f, e = g.call(a, e, j), d += l(e) + ' </div> <div class="waveform__layer waveform__highlight g-all-transitions-200" style="height:', e = a.upperPartHeightPercent, typeof e === m ? e = e.call(a, {
hash: {}
}) : e === o && (e = n.call(a, "upperPartHeightPercent", {
hash: {}
})), d += l(e) + ';"></div> <div class="waveform__layer waveform__scrubberPosition" style="height:', e = a.upperPartHeightPercent, typeof e === m ? e = e.call(a, {
hash: {}
}) : e === o && (e = n.call(a, "upperPartHeightPercent", {
hash: {}
})), d += l(e) + ';"> ', e = "views/sound/scrubber-position", f = {}, g = a.model, g = g === null || g === undefined || g === !1 ? g : g._resource_id, f.resource_id = g, g = a.model, g = g === null || g === undefined || g === !1 ? g : g._resource_type, f.resource_type = g, g = "scrubberPosition", f.key = g, g = c.$view, j = {}, j.hash = f, e = g.call(a, e, j), d += l(e) + ' </div> <div class="waveform__layer"> ', e = "views/sound/waveform-mask", f = {}, g = a.model, g = g === null || g === undefined || g === !1 ? g : g._resource_id, f.resource_id = g, g = a.model, g = g === null || g === undefined || g === !1 ? g : g._resource_type, f.resource_type = g, g = a.upperPartHeight, f.upperPartHeight = g, g = "waveformMask", f.key = g, g = c.$view, j = {}, j.hash = f, e = g.call(a, e, j), d += l(e) + " </div> ", e = a.isCommentable, f = c["if"], j = k.program(2, q, b), j.hash = {}, j.fn = j, j.inverse = k.noop, e = f.call(a, e, j);
if (e || e === 0) d += e;
return d += ' <div class="waveform__layer" style="height:', e = a.upperPartHeightPercent, typeof e === m ? e = e.call(a, {
hash: {}
}) : e === o && (e = n.call(a, "upperPartHeightPercent", {
hash: {}
})), d += l(e) + ';"> ', e = "views/sound/time-indicator", f = {}, g = a.model, g = g === null || g === undefined || g === !1 ? g : g._resource_id, f.resource_id = g, g = a.model, g = g === null || g === undefined || g === !1 ? g : g._resource_type, f.resource_type = g, g = c.$view, j = {}, j.hash = f, e = g.call(a, e, j), d += l(e) + ' </div> <div class="waveform__layer waveform__scrubber" style="height:', e = a.upperPartHeightPercent, typeof e === m ? e = e.call(a, {
hash: {}
}) : e === o && (e = n.call(a, "upperPartHeightPercent", {
hash: {}
})), d += l(e) + ';"> ', e = "views/sound/scrubber", f = {}, g = a.model, g = g === null || g === undefined || g === !1 ? g : g._resource_id, f.resource_id = g, g = a.model, g = g === null || g === undefined || g === !1 ? g : g._resource_type, f.resource_type = g, g = "scrubber", f.key = g, g = c.$view, j = {}, j.hash = f, e = g.call(a, e, j), d += l(e) + " </div>\n", d
}
function q(a, b) {
var d = "",
e, f, g;
return d += ' <div class="waveform__layer"> ', e = "views/sound/waveform-comments", f = {}, g = a.upperPartHeight, f.defaultHeight = g, g = a.model, g = g === null || g === undefined || g === !1 ? g : g.id, f.sound_id = g, g = "waveformComments", f.key = g, g = c.$view, j = {}, j.hash = f, e = g.call(a, e, j), d += l(e) + " </div> ", d
}
function r(a, b) {
var d = "",
e, f, g;
d += ' <div class="waveform__layer waveform__progressBar"> ', e = "views/sound/progress-bar", f = {}, g = a.model, g = g === null || g === undefined || g === !1 ? g : g._resource_id, f.resource_id = g, g = a.model, g = g === null || g === undefined || g === !1 ? g : g._resource_type, f.resource_type = g, g = a.upperPartHeight, f.upperPartHeight = g, g = "progressBar", f.key = g, g = c.$view, j = {}, j.hash = f, e = g.call(a, e, j), d += l(e) + ' </div> <div class="waveform__layer"> ', e = "views/sound/waveform-mask", f = {}, g = a.model, g = g === null || g === undefined || g === !1 ? g : g._resource_id, f.resource_id = g, g = a.model, g = g === null || g === undefined || g === !1 ? g : g._resource_type, f.resource_type = g, g = a.upperPartHeight, f.upperPartHeight = g, g = "waveformMask", f.key = g, g = c.$view, j = {}, j.hash = f, e = g.call(a, e, j), d += l(e) + ' </div> <div style="height:', e = a.upperPartHeightPercent, typeof e === m ? e = e.call(a, {
hash: {}
}) : e === o && (e = n.call(a, "upperPartHeightPercent", {
hash: {}
})), d += l(e) + ';" class="waveform__emptyWaveform sc-font sc-type-light"> <span class="waveform__emptyMessage"> ', e = a.isProcessing, f = c["if"], j = k.program(5, s, b), j.hash = {}, j.fn = j, j.inverse = k.noop, e = f.call(a, e, j);
if (e || e === 0) d += e;
return d += " </span> </div>\n", d
}
function s(a, b) {
return "This sound is being processed"
}
c = c || a.helpers;
var f = "",
g, h, i, j, k = this,
l = this.escapeExpression,
m = "function",
n = c.helperMissing,
o = void 0;
g = b.isProcessing, h = c.unless, j = k.program(1, p, e), j.hash = {}, j.fn = j, j.inverse = k.program(4, r, e), g = h.call(b, g, j);
if (g || g === 0) f += g;
return f += "\n", f
})
};
//@ sourceURL=views/sound/waveform.tmpl |
#29 JavaScript::Eval (size: 1972, repeated: 2) r = function(a, b, c) {
return require("vendor/handlebars-runtime").template(function(a, b, c, d, e) {
function p(a, b) {
var d = "",
e, f, g;
return d += " ", e = "views/sound/like", f = {}, g = a._resource_id, f.resource_id = g, g = a._resource_type, f.resource_type = g, g = c.$view, j = {}, j.hash = f, e = g.call(a, e, j), d += l(e) + " ", d
}
function q(a, b) {
var c = "",
d;
return c += ' <a class="sound__shareLink g-button-responsive g-button g-button-share" href="', d = a.permalink_url, typeof d === m ? d = d.call(a, {
hash: {}
}) : d === o && (d = n.call(a, "permalink_url", {
hash: {}
})), c += l(d) + '">Share</a> ', c
}
function r(a, b) {
var c = "",
d;
return c += ' <a href="', d = a.purchase_url, typeof d === m ? d = d.call(a, {
hash: {}
}) : d === o && (d = n.call(a, "purchase_url", {
hash: {}
})), c += l(d) + '" title="', d = a.purchase_title, typeof d === m ? d = d.call(a, {
hash: {}
}) : d === o && (d = n.call(a, "purchase_title", {
hash: {}
})), c += l(d) + '" class="sound__purchase sc-link-dark g-text-shadow">', d = a.purchase_title, typeof d === m ? d = d.call(a, {
hash: {}
}) : d === o && (d = n.call(a, "purchase_title", {
hash: {}
})), c += l(d) + "</a>\n", c
}
function s(a, b) {
var d = "",
e, f;
d += " ", e = a.downloadable, f = c["if"], j = k.program(8, t, b), j.hash = {}, j.fn = j, j.inverse = k.noop, e = f.call(a, e, j);
if (e || e === 0) d += e;
return d += "\n", d
}
function t(a, b) {
var c = "",
d;
return c += ' <a href="', d = a.public_download_url, typeof d === m ? d = d.call(a, {
hash: {}
}) : d === o && (d = n.call(a, "public_download_url", {
hash: {}
})), c += l(d) + '" class="sc-link-dark g-text-shadow sound__download">Download</a> ', c
}
c = c || a.helpers;
var f = "",
g, h, i, j, k = this,
l = this.escapeExpression,
m = "function",
n = c.helperMissing,
o = void 0;
f += '<div class="sc-button-group"> ', g = b.show_like_button, h = c["if"], j = k.program(1, p, e), j.hash = {}, j.fn = j, j.inverse = k.noop, g = h.call(b, g, j);
if (g || g === 0) f += g;
f += " ", g = b.is_shareable, h = c["if"], j = k.program(3, q, e), j.hash = {}, j.fn = j, j.inverse = k.noop, g = h.call(b, g, j);
if (g || g === 0) f += g;
f += "\n</div> ", g = b.show_buy_button, h = c["if"], j = k.program(5, r, e), j.hash = {}, j.fn = j, j.inverse = k.program(7, s, e), g = h.call(b, g, j);
if (g || g === 0) f += g;
return f += "\n", f
})
};
//@ sourceURL=views/sound/actions.tmpl |
#30 JavaScript::Eval (size: 1562, repeated: 2) r = function(a, b, c) {
return require("vendor/handlebars-runtime").template(function(a, b, c, d, e) {
function p(a, b) {
var d = "",
e, f, g;
return d += ' <a href="', e = a.permalink_url, typeof e === l ? e = e.call(a, {
hash: {}
}) : e === n && (e = m.call(a, "permalink_url", {
hash: {}
})), d += o(e) + '" title="Open SoundCloud page"> ', e = "lib/views/image", f = {}, g = a, f.modelData = g, g = a.imageSize, f.size = g, g = "artwork__img g-opacity-transition", f.className = g, g = c.$view, j = {}, j.hash = f, e = g.call(a, e, j), d += o(e) + ' <ins class="artwork__flipIndicator">#</ins> </a> ', d
}
function q(a, b) {
var d = "",
e, f, g;
return d += " ", e = "lib/views/image", f = {}, g = a, f.modelData = g, g = a.imageSize, f.size = g, g = "artwork__img g-opacity-transition", f.className = g, g = c.$view, j = {}, j.hash = f, e = g.call(a, e, j), d += o(e) + " ", d
}
function r(a, b) {
var d = "",
e, f, g;
return d += ' <div class="artwork__flipFace artwork__flipBack"> ', e = "lib/views/image", f = {}, g = a.user, f.modelData = g, g = a.imageSize, f.size = g, g = "artwork__userAvatar g-shadow-bottom", f["class"] = g, g = c.$view, j = {}, j.hash = f, e = g.call(a, e, j), d += o(e) + " </div> ", d
}
c = c || a.helpers;
var f = "",
g, h, i, j, k = this,
l = "function",
m = c.helperMissing,
n = void 0,
o = this.escapeExpression;
f += '<div class="artwork__flipContainer g-transform-3d g-transform-origin__right g-all-transitions-200"> <div class="artwork__flipFace"> ', g = b.show_user, h = c["if"], j = k.program(1, p, e), j.hash = {}, j.fn = j, j.inverse = k.program(3, q, e), g = h.call(b, g, j);
if (g || g === 0) f += g;
f += " </div> ", g = b.show_user, h = c["if"], j = k.program(5, r, e), j.hash = {}, j.fn = j, j.inverse = k.noop, g = h.call(b, g, j);
if (g || g === 0) f += g;
return f += "\n</div>\n", f
})
};
//@ sourceURL=views/sound/artwork.tmpl |
#31 JavaScript::Eval (size: 1266, repeated: 2) r = function(a, b, c) {
return require("vendor/handlebars-runtime").template(function(a, b, c, d, e) {
function p(a, b, d) {
var e = "",
f, g, h;
return e += " <", f = d.itemTagName, typeof f === l ? f = f.call(a, {
hash: {}
}) : f === n && (f = m.call(a, "...itemTagName", {
hash: {}
})), e += o(f) + ' class="', f = d.itemClassName, typeof f === l ? f = f.call(a, {
hash: {}
}) : f === n && (f = m.call(a, "...itemClassName", {
hash: {}
})), e += o(f) + '" ', f = a, g = d.itemAttrsFn, typeof g === l ? f = g.call(a, f, {
hash: {}
}) : g === n ? f = m.call(a, "...itemAttrsFn", f, {
hash: {}
}) : f = g, e += o(f) + "> ", f = d.Subview, g = {}, h = d.subviewArgsFn, g.args = h, h = c.$view, j = {}, j.hash = g, f = h.call(a, f, j), e += o(f) + " </", f = d.itemTagName, typeof f === l ? f = f.call(a, {
hash: {}
}) : f === n && (f = m.call(a, "...itemTagName", {
hash: {}
})), e += o(f) + "> ", e
}
c = c || a.helpers;
var f = "",
g, h, i, j, k = this,
l = "function",
m = c.helperMissing,
n = void 0,
o = this.escapeExpression;
f += '<div class="waveformComments__pointer ', g = b._options, g = g === null || g === undefined || g === !1 ? g : g.size, typeof g === l ? g = g.call(b, {
hash: {}
}) : g === n && (g = m.call(b, "_options.size", {
hash: {}
})), f += o(g) + '"></div>\n<ul class="waveformComments__threads sc-list-nostyle"> ', g = b.timestamps, h = c.each, j = k.programWithDepth(p, e, b), j.hash = {}, j.fn = j, j.inverse = k.noop, g = h.call(b, g, j);
if (g || g === 0) f += g;
return f += "\n</ul>\n", f
})
};
//@ sourceURL=views/sound/waveform-comments.tmpl |
#32 JavaScript::Eval (size: 987, repeated: 2) r = function(a, b, c) {
return require("vendor/handlebars-runtime").template(function(a, b, c, d, e) {
function p(a, b, d) {
var e = "",
f, g, h;
return e += " <", f = d.itemTagName, typeof f === l ? f = f.call(a, {
hash: {}
}) : f === n && (f = m.call(a, "...itemTagName", {
hash: {}
})), e += o(f) + ' class="', f = d.itemClassName, typeof f === l ? f = f.call(a, {
hash: {}
}) : f === n && (f = m.call(a, "...itemClassName", {
hash: {}
})), e += o(f) + '" ', f = a, g = d.itemAttrsFn, typeof g === l ? f = g.call(a, f, {
hash: {}
}) : g === n ? f = m.call(a, "...itemAttrsFn", f, {
hash: {}
}) : f = g, e += o(f) + "> ", f = d.Subview, g = {}, h = d.subviewArgsFn, g.args = h, h = c.$view, j = {}, j.hash = g, f = h.call(a, f, j), e += o(f) + " </", f = d.itemTagName, typeof f === l ? f = f.call(a, {
hash: {}
}) : f === n && (f = m.call(a, "...itemTagName", {
hash: {}
})), e += o(f) + ">\n", e
}
c = c || a.helpers;
var f = "",
g, h, i, j, k = this,
l = "function",
m = c.helperMissing,
n = void 0,
o = this.escapeExpression;
g = b.collection, h = c.each, j = k.programWithDepth(p, e, b), j.hash = {}, j.fn = j, j.inverse = k.noop, g = h.call(b, g, j);
if (g || g === 0) f += g;
return f += "\n", f
})
};
//@ sourceURL=lib/views/list.tmpl |
#33 JavaScript::Eval (size: 1271, repeated: 2) r = function(a, b, c) {
return require("vendor/handlebars-runtime").template(function(a, b, c, d, e) {
function p(a, b, d) {
var e = "",
f, g, h;
return e += ' <li class="waveformThread__avatar g-all-transitions-200" data-', f = d.comment_id_attr, typeof f === l ? f = f.call(a, {
hash: {}
}) : f === n && (f = m.call(a, "...comment_id_attr", {
hash: {}
})), e += o(f) + '="', f = a.id, typeof f === l ? f = f.call(a, {
hash: {}
}) : f === n && (f = m.call(a, "id", {
hash: {}
})), e += o(f) + '">', f = a.user, g = {}, h = 20, g.size = h, h = "100%", g.width = h, h = "100%", g.height = h, h = c.$image, j = {}, j.hash = g, f = h.call(a, f, j), e += o(f) + "</li> ", e
}
function q(a, b) {
var d = "",
e, f, g;
return d += ' <li class="waveformThread__avatar g-all-transitions-200">', e = a.current_user, f = {}, g = 20, f.size = g, g = "100%", f.width = g, g = "100%", f.height = g, g = c.$image, j = {}, j.hash = f, e = g.call(a, e, j), d += o(e) + "</li> ", d
}
c = c || a.helpers;
var f = "",
g, h, i, j, k = this,
l = "function",
m = c.helperMissing,
n = void 0,
o = this.escapeExpression;
f += '<ul class="waveformThread__list g-all-transitions-200 sc-list-nostyle"> ', g = b.comments, h = c.each, j = k.programWithDepth(p, e, b), j.hash = {}, j.fn = j, j.inverse = k.noop, g = h.call(b, g, j);
if (g || g === 0) f += g;
f += " ", g = b.current_user, h = c["if"], j = k.program(3, q, e), j.hash = {}, j.fn = j, j.inverse = k.noop, g = h.call(b, g, j);
if (g || g === 0) f += g;
return f += "\n</ul>\n", f
})
};
//@ sourceURL=views/sound/waveform-thread.tmpl |
#34 JavaScript::Eval (size: 2433, repeated: 2) r = function(a, b, c) {
return require("vendor/handlebars-runtime").template(function(a, b, c, d, e) {
function q(a, b) {
return "Right"
}
function r(a, b) {
return "Left"
}
function s(a, b) {
return "Left"
}
function t(a, b) {
return "Right"
}
function u(a, b) {
var d = "",
e, f, g;
return d += " ", e = "views/sound/stats", f = {}, g = a._resource_id, f.resource_id = g, g = a._resource_type, f.resource_type = g, g = c.$view, k = {}, k.hash = f, e = g.call(a, e, k), d += m(e) + " ", d
}
c = c || a.helpers;
var f = "",
g, h, i, j, k, l = this,
m = this.escapeExpression,
n = "function",
o = c.helperMissing,
p = void 0;
f += '<div class="sound__art sc-border-box sound__art', g = b.show_ad, h = c["if"], k = l.program(1, q, e), k.hash = {}, k.fn = k, k.inverse = l.program(3, r, e), g = h.call(b, g, k);
if (g || g === 0) f += g;
f += '"> ', g = "views/sound/artwork", h = {}, i = b._resource_id, h.resource_id = i, i = b._resource_type, h.resource_type = i, i = "artwork", h.key = i, i = c.$view, k = {}, k.hash = h, g = i.call(b, g, k), f += m(g) + '\n</div>\n<div class="sound__content sound__content', g = b.show_ad, h = c["if"], k = l.program(5, s, e), k.hash = {}, k.fn = k, k.inverse = l.program(7, t, e), g = h.call(b, g, k);
if (g || g === 0) f += g;
f += '"> <div class="sound__controls"> ', g = "views/sound/play-button", h = {}, i = b._resource_id, h.resource_id = i, i = b._resource_type, h.resource_type = i, i = c.$view, k = {}, k.hash = h, g = i.call(b, g, k), f += m(g) + ' <div class="sound__title"> ', g = "views/sound/title", h = {}, i = b._resource_id, h.resource_id = i, i = b._resource_type, h.resource_type = i, i = c.$view, k = {}, k.hash = h, g = i.call(b, g, k), f += m(g) + " </div> ", g = "views/sound/actions", h = {}, i = b._resource_id, h.resource_id = i, i = b._resource_type, h.resource_type = i, i = c.$view, k = {}, k.hash = h, g = i.call(b, g, k), f += m(g) + ' </div> <div class="sound__main g-border-top g-shadow-top"> <div class="sound__waveform"> ', g = "views/sound/waveform", h = {}, i = b._resource_id, h.resource_id = i, i = b._resource_type, h.resource_type = i, i = c.$view, k = {}, k.hash = h, g = i.call(b, g, k), f += m(g) + ' </div> <div class="sound__lowerPart g-border-top g-shadow-top"> <div class="sound__meta"> ', g = b._params, g = g === null || g === undefined || g === !1 ? g : g.show_playcount, h = c["if"], k = l.program(9, u, e), k.hash = {}, k.fn = k, k.inverse = l.noop, g = h.call(b, g, k);
if (g || g === 0) f += g;
return f += ' <a class="sound__permalink g-sc-logo" href="', g = b.sc_logo_link, typeof g === n ? g = g.call(b, {
hash: {}
}) : g === p && (g = o.call(b, "sc_logo_link", {
hash: {}
})), f += m(g) + '" title="Listen on SoundCloud">SoundCloud.com</a> </div> <div class="sound__comments"></div> </div> </div> <div class="sound__sharePanel g-top-transition"></div>\n</div>\n', f
})
};
//@ sourceURL=views/sound/sound.tmpl |
#35 JavaScript::Eval (size: 3823, repeated: 2) r = function(a, b, c) {
var d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s;
i = /default_avatar/, l = /^.*(artworks|avatars)-0*([0-9]+)-[a-z0-9]+-([a-z0-9]+)\.jpg.*$/i, r = /\/images\/default\/.*?x[0-9]+(?:-[a-z0-9]+)?\.png$/, j = {
artworks: {},
avatars: {}
}, h = [
[20, "t20x20"],
[50, "t50x50"],
[120, "t120x120"],
[200, "t200x200"]
], m = ["alt", "class", "height", "src", "title", "width"], q = {
cloud: {
40: "/player/assets/images/default/cloudx40-72176be9.png",
50: "/player/assets/images/default/cloudx50-72176be9.png",
80: "/player/assets/images/default/cloudx80-72176be9.png",
120: "/player/assets/images/default/cloudx120-72176be9.png",
200: "/player/assets/images/default/cloudx200-72176be9.png"
},
group: {
40: "/player/assets/images/default/groupx40-72176be9.png",
50: "/player/assets/images/default/groupx50-72176be9.png",
80: "/player/assets/images/default/groupx80-72176be9.png",
120: "/player/assets/images/default/groupx120-72176be9.png",
200: "/player/assets/images/default/groupx200-72176be9.png"
},
user: {
40: "/player/assets/images/default/userx40-72176be9.png",
50: "/player/assets/images/default/userx50-72176be9.png",
80: "/player/assets/images/default/userx80-72176be9.png",
120: "/player/assets/images/default/userx120-72176be9.png",
200: "/player/assets/images/default/userx200-72176be9.png"
}
}, d = c.exports = {
load: function(b) {
var c = new Image,
d = $.Deferred();
return (g || (g = a("lib/support"))).corsImg && (c.crossOrigin = location.host, b += "?xd=true"), $(c).on("load", function() {
d.resolve(this)
}).on("error", function() {
d.reject(this)
}), c.src = b, d
},
markup: function(b, c) {
return (f || (f = a("_"))).defaults(c, {
src: d.urlFrom(b, c.size),
width: c.size,
height: c.size,
alt: d.getAltText(b)
}), d.getMarkup(c)
},
getMarkup: function(b) {
var c = [],
d;
return (f || (f = a("_"))).each(b, function(b, d) {
(f || (f = a("_"))).indexOf(m, d) !== -1 && c.push(d + '="' + b + '"')
}), d = k(b.src), d && (j[d.type][d.key] = j[d.type][d.key] | Math.pow(2, d.index)), "<img " + c.join(" ") + ">"
},
getAltText: function(b) {
return b.username ? (e || (e = a("lib/helpers/name-helper"))).fetch(b, !0) + " avatar" : (e || (e = a("lib/helpers/name-helper"))).fetch(b)
},
getPlaceholderUrl: function(b, c) {
var e, g, i, l, m;
i = k(d.setFormat(b, c));
if (i) {
e = i.key;
if (j[i.type][e]) {
g = (f || (f = a("_"))).find(h, function(a, b) {
return m = b, c <= a[0]
});
while (m >= 0) {
if (j[i.type][e] & Math.pow(2, m)) {
l = h[m];
break
}--m
}
}
if (g && l === g) return !1;
if (l) return d.setFormat(b, l[0])
}
return null
},
urlFrom: function(a, b) {
var c = a && (a.artwork_url || a.avatar_url || a.user && a.user.avatar_url) || "";
return !c || i.test(c) ? p(a.kind, b) : b ? d.setFormat(c, b) : c
},
setFormat: function(a, b) {
if (r.test(a)) return a.replace(/[0-9]+((?:-[a-z0-9]+)?\.png)$/, s(b) + "$1");
l.lastIndex = 0;
var c = l.exec(a),
d = c[1],
e = c[3],
f = o(d, b);
return f ? a.replace(e, f) : a
},
scaleImage: function(a) {
var b = a.width,
c = a.height,
d = a.imageData,
e = a.scaledWidth,
f = a.scaledHeight,
g = a.scaledImageData,
h = a.bgColor,
i = h[0],
j = h[1],
k = h[2],
l = a.upperPartHeight * f,
m = f - l,
o = e / b,
p, q, r, s, t, u, v, w;
for (p = 0; p < e; ++p) {
t = Math.ceil(p / o), u = n(d, b, c, t) * 2 / c, v = Math.floor(u * l), w = Math.floor((1 - u) * m + l);
for (q = 0; q < v; ++q) r = (q * e + p) * 4, g.data[r] = i, g.data[r + 1] = j, g.data[r + 2] = k, g.data[r + 3] = 255;
for (q = w; q < f; ++q) r = (q * e + p) * 4, g.data[r] = i, g.data[r + 1] = j, g.data[r + 2] = k, g.data[r + 3] = 255
}
return g
}
}, k = function(b) {
var c, d, e;
return l.lastIndex = 0, c = b.replace(l, function(b, c, g, i) {
return (f || (f = a("_"))).find(h, function(a, b) {
if (a[1] === i) return d = b, !0
}), e = c, g
}), e ? {
index: d,
key: parseInt(c, 10),
type: e
} : null
}, n = function(a, b, c, d) {
var e = b,
f = 0,
g = c >> 1,
h, i;
while (f < g) h = f + g >> 1, i = (h * e + d) * 4 + 3, a.data[i] === 255 ? f = h + 1 : g = h;
return f
}, o = function(b, c) {
var d = (f || (f = a("_"))).find(h, function(a) {
return a[0] >= c
}) || (f || (f = a("_"))).last(h);
return d[1] === "t20x20" && b === "artworks" ? "tiny" : d[1]
}, p = function(a, b) {
return (q[a] || q.cloud)[s(b)]
}, s = function() {
var b = Object.keys(q.cloud),
c;
return b.sort(function(a, b) {
return a - b
}), c = (f || (f = a("_"))).last(b), (f || (f = a("_"))).memoize(function(a) {
var d, e;
for (d = 0; e = b[d]; ++d) if (e >= a) return e;
return c
})
}()
};
//@ sourceURL=lib/helpers/image-helper |
#36 JavaScript::Eval (size: 1671, repeated: 2) r = function(a, b, c) {
var d, e, f, g, h, i, j, k, l, m, n, o;
d = c.exports = (f || (f = a("lib/backbone"))).Router.extend({
match: function(b) {
return (f || (f = a("lib/backbone"))).history.loadUrl(b)
},
setRoutes: function(b) {
return (b || (b = a("config/routes"))).forEach(function(b) {
b.route && this.route(b.route, b.name, function(c) {
if ((e || (e = a("_"))).some(l || (l = a("config/permalink-routes")), function(a) {
return b.route === a.route
})) return n.call(this);
if (b.name === "error") return o(c);
this.apply(c, b.name)
})
}, this), this
},
apply: function(b, c) {
var d = (j || (j = a("config"))).get("appView"),
f = (e || (e = a("_"))).find(k || (k = a("config/routes")), function(a) {
return a.name === c
}),
i;
if (!f) throw new Error('Layout "' + c + '" is not defined.');
this.setupDeferred && this.setupDeferred.reject(), d && (this.setupDeferred = (h || (h = a("lib/loader"))).load(f.view).done(function(c) {
i = new c({
resource_type: f.resourceType,
resource_id: (e || (e = a("_"))).isNaN(Number(b)) ? b : Number(b)
}), d._teardown(), d.addSubview(i), d.$el.append(i.render().el), (g || (g = a("lib/event-bus"))).trigger("layout:change", d)
}))
}
}), n = function() {
$.ajax({
url: (j || (j = a("config"))).get("api_host") + "resolve",
dataType: "json",
data: {
url: "http://soundcloud.com" + (f || (f = a("lib/backbone"))).history.getFragment(),
"_status_code_map[302]": 200
}
}).done(function(b) {
var c = (m || (m = a("lib/url"))).parse(b.location);
this.navigate("?url=http://" + c.host + c.path.split(".")[0], {
trigger: !0,
replace: !0
})
}.bind(this)).fail(function(b) {
if (b.status === 404) return o((f || (f = a("lib/backbone"))).history.getFragment())
})
}, o = function(b) {
(i || (i = a("models/exception"))).raise({
fatal: !0,
message: b === "" ? "No SoundCloud widget URL was provided" : "" + b + " is not valid SoundCloud widget URL"
})
}
};
//@ sourceURL=router |
#37 JavaScript::Eval (size: 6531, repeated: 2) r = function(a, b, c) {
var d, e, f, g, h, i, j, k, l, m, n, o;
o = c.exports = (d || (d = a("lib/backbone"))).View.extend(g || (g = a("lib/views/mixins/stateful")), {
ModelClass: null,
requiredAttributes: null,
observedAttributes: null,
css: null,
template: $.noop,
LoadingView: null,
loadingViewArgs: null,
loadingTemplate: function() {
return ""
},
element2selector: {},
_element2selector_cache: null,
defaults: null,
disposed: !1,
subviews: null,
_subviews_keys: null,
_lastEventId: null,
constructorArguments: null,
_whenInsertedDefer: null,
_deferreds: null,
initialize: function(b) {
b = l(this.constructor, b || {}), this.constructorArguments = (i || (i = a("_"))).clone(b), b.resource_id && this.ModelClass ? this.model = this.getModel(b.resource_id, b.resource_type) : typeof this.collection == "function" && (this.collection = new this.collection), this._deferreds = [], this.subviews = [], this._subviews_keys = [], this.resetElementCache(), this._setup.call(this, b), this.model ? this.setupModelListeners() : this.collection && this.setupCollectionListeners()
},
_setup: function() {
this.setup.apply(this, arguments)
},
setup: $.noop,
_dispose: function() {
if (this.disposed) return;
this._teardown(), this.dispose(), this.disposed = !0;
while (this._deferreds.length) typeof this._deferreds[0] == "number" ? clearTimeout(this._deferreds.shift()) : this._deferreds[0].reject("viewDisposed");
this.off(), this.model && (this.teardownModelListeners(), this.model.release()), this.collection && (this.teardownCollectionListeners(), this.collection.release()), this.$el.remove(), delete this.el, delete this.$el, delete this.model, delete this.collection, this.constructorArguments = null
},
dispose: $.noop,
_teardown: function() {
this.resetElementCache(), this.disposeSubviews(), this._whenInsertedDefer && (this._whenInsertedDefer.reject(), this._whenInsertedDefer = null), this.teardown()
},
teardown: $.noop,
disposeSubviews: function() {
while (this.subviews.length) this.subviews.pop()._dispose();
this.subviews = [], this._subviews_keys = []
},
getModel: function(a, b) {
var c, d, e, f, g;
return f = {
id: a,
resource_type: b
}, e = this.ModelClass.getClass ? this.ModelClass.getClass(f) : this.ModelClass, c = e.hashFn(f), d = e.instances.get(c), d ? d.hold() : (g = {
id: a
}, b && (g.resource_type = b), d = new e(g)), d
},
setupModelListeners: function(a) {
m.call(this, !0, a)
},
teardownModelListeners: function(a) {
m.call(this, !1, a)
},
setupCollectionListeners: function(a) {
n.call(this, !0, a)
},
teardownCollectionListeners: function(a) {
n.call(this, !1, a)
},
getRequiredAttributes: function(a) {
var b = this.requiredAttributes;
return a || (a = this.model), b && !Array.isArray(b) && (b = b[a.resource_type]), b || []
},
getObservedAttributes: function(a) {
var b = this.observedAttributes,
c;
return a || (a = this.model), c = this.getRequiredAttributes(a), b && !Array.isArray(b) && (b = b[a.resource_type]), b ? b.concat(c) : c
},
addDeferred: function(a) {
return typeof a == "number" ? this._deferreds.push(a) : a.state() === "pending" && (a.always(function() {
var b = this._deferreds.indexOf(a);
b > -1 && this._deferreds.splice(b, 1)
}.bind(this)), this._deferreds.push(a)), a
},
addSubview: function(a, b) {
return this.subviews.push(a), this._subviews_keys.push(b), b && (this.subviews[b] = a), a
},
removeSubview: function(a) {
for (var b = this.subviews.length; b--;) if (this.subviews[b] === a) {
this._subviews_keys[b] && delete this.subviews[this._subviews_keys[b]], this.subviews.splice(b, 1), this._subviews_keys.splice(b, 1);
return
}
},
getElement: function(a) {
var b, c, d;
return this._element2selector_cache[a] === b && (d = this.className.split(" ").shift(), c = this.element2selector[a] || "." + d + "__" + a, this._element2selector_cache[a] = this.$(c)), this._element2selector_cache[a]
},
resetElementCache: function() {
this._element2selector_cache = {}
},
render: function() {
var b = this.hasData(),
c = this.getTemplate(b),
d = this.model || this.collection,
e = b || !d ? this._getTemplateData() : d.toJSON();
return c && ((h || (h = a("lib/template"))).render(c.bind(this), e, this.el), (h || (h = a("lib/template"))).subviews(this)), this.css && (f || (f = a("lib/css"))).insert(this.css, this.colorCustomizable ?
function(b) {
var c = (k || (k = a("lib/customization"))).getColorParams();
return (i || (i = a("_"))).each(c, function(a, b) {
c[b] = " " + a + " "
}), (j || (j = a("lib/utils"))).supplant(b, c, !0)
} : undefined), b ? this.renderDecorate() : d && (!c && this.LoadingView && this.addSubview(new this.LoadingView((i || (i = a("_"))).result(this, "loadingViewArgs")), "loading").render().$el.appendTo(this.el), this.fetchData(d).fail(this.onFetchFail.bind(this))), this
},
onFetchFail: $.noop,
renderDecorate: $.noop,
rerender: function() {
this.disposed || (this._teardown(), this.render())
},
getTemplate: function(a) {
return a || !this.LoadingView && !this.loadingTemplate ? this.template : this.LoadingView ? null : this.loadingTemplate
},
_getTemplateData: function() {
var b = {};
return this.model ? b = this.getModelData() : this.collection && (b = this.getCollectionData()), b._options = (i || (i = a("_"))).clone(this.options), b._params = (e || (e = a("config"))).get("widgetParams"), b = this.getTemplateData(b) || b, b
},
getTemplateData: $.noop,
getCollectionData: function() {
return this.collection.toJSON()
},
getModelData: function() {
return this.model.toJSON()
},
fetchData: function(a) {
return a.fetch({
attrs: this.getObservedAttributes(a)
})
},
hasData: function(a) {
return a = a || this.model || this.collection, a ? a.hasDataForView(this) : !0
},
scrollIntoView: function(b) {
var c, d = this.$el.offset(),
e, f, g, h, j, k, l;
b = (i || (i = a("_"))).defaults({}, b, {
position: "auto"
});
if (!d) return !1;
k = $(".g-main-scroll-area").first(), k.length || (k = $("#content")), g = $(document).scrollTop(), l = k.offset().top, e = g + l, f = g + $(window).height(), h = Math.floor(d.top), j = Math.floor(h + this.$el.height()), c = h > e && j < f, c || (b.position === "top" || b.position === "auto" && h < e ? window.scrollTo(0, h - l) : this.el.scrollIntoView(!1))
},
isEquivalentTo: function(b, c) {
var d = c || {};
return this.constructor === b && (i || (i = a("_"))).isEqual(l(b, d), this.constructorArguments)
},
whenInserted: function(a) {
var b = this._whenInsertedDefer,
c, d, e;
return b || (a = a || document.body, d = function(e) {
e.closest(a).length !== 0 ? b.resolve() : c = setTimeout(d, 100)
}.bind(null, this.$el), this._whenInsertedDefer = b = $.Deferred(), b.fail(function() {
clearTimeout(c)
}), d()), b
},
onModelChange: function(a, b, c, d) {
this._lastEventId !== d && (this._lastEventId = d, this.rerender())
},
onCollectionReset: function() {
this.rerender()
},
onAdd: $.noop,
onRemove: $.noop
}), o.prototype.$$ = o.prototype.getElement, l = function(b, c) {
return (i || (i = a("_"))).defaults(c, b.prototype.defaults), b === o ? c : l(b.__super__.constructor, c)
}, m = function(a, b) {
var c, d;
b = b || this.model, c = a ? b.on : b.off, d = this.getObservedAttributes(b), d.forEach(function(a) {
c.call(b, "change:" + a, this.onModelChange, this)
}.bind(this))
}, n = function(a, b) {
var c;
b = b || this.collection, c = a ? "on" : "off", b[c]("add", this.onAdd, this)[c]("remove", this.onRemove, this)[c]("reset", this.onCollectionReset, this)
}
};
//@ sourceURL=lib/view |
#38 JavaScript::Eval (size: 2954, repeated: 2) r = function(a, b, c) {
var d, e, f, g, h, i, j, k, l, m, n = a("lib/view"),
o, p = $.support.cors,
q = a("tracking-events").Track;
d = c.exports = n.extend(l || (l = a("lib/views/mixins/timed-comments")), {
className: "sound",
css: a("views/sound/sound.css"),
template: a("views/sound/sound.tmpl"),
ModelClass: g || (g = a("models/audible")),
requiredAttributes: ["permalink"],
events: {
"click .sound__shareLink": "onShareLinkClick"
},
setup: function() {
var b = (h || (h = a("config"))).get("widgetParams");
b && b.show_artwork && this.toggleState("artVisible", !0), this.model.on("play", this.onSoundPlay, this).on("finish", this.onSoundFinish, this)
},
dispose: function() {
this.model.off("play", this.onSoundPlay, this).off("finish", this.onSoundFinish, this)
},
renderDecorate: function() {
this.model.isPlaying() && this.showAd()
},
onSoundPlay: function() {
this.showAd()
},
onSoundFinish: function() {
(h || (h = a("config"))).get("playQueue").last() === this.model && this.isShareable() && this.showSharePanel()
},
onShareLinkClick: function(b) {
b.preventDefault();
var c = this.model;
this.showSharePanel([c.resource_type, c.id].join("_")), (o || (o = a("lib/event-bus"))).trigger(q.SHARE_PANEL, this.model.toJSON())
},
onCurrentCommentChange: function(b) {
this.commentForm && this.commentForm.$el.hide(), this.commentView && this.commentView._dispose(), this.commentView = this.addSubview(new(j || (j = a("views/comment/comment-view")))({
resource_id: b
})), this.$$("comments").show(), this.$$("comments").append(this.commentView.render().el)
},
showSharePanel: function() {
var b = this.subviews.sharePanel;
b || (b = this.addSubview(new(k || (k = a("views/share/share-panel")))({
resource_id: this.model.resource_id,
onClose: this.toggleState.bind(this, "shareVisible", !1)
}), "sharePanel"), this.$$("sharePanel").append(b.render().el)), this.toggleState("shareVisible", !0), (o || (o = a("lib/event-bus"))).trigger((m || (m = a("tracking-events"))).SharePanel.OPENED)
},
showAd: function() {
if (!this.model.hasAd()) return;
var b = this.subviews.artwork;
this.toggleState("adVisible", !0), this._isAdInserted || (this._isAdInserted = !0, b && (this.removeSubview(b), b._dispose()), (f || (f = a("lib/ads"))).insertAd(this.$$("art"), (f || (f = a("lib/ads"))).providers.EXPO9))
},
showCommentForm: function(b) {
return this.commentForm || (this.commentForm = this.addSubview(new(i || (i = a("views/comment/comment-form")))({
sound_id: this.model.id
})), this.$$("comments").append(this.commentForm.render().el)), this.commentForm.$el.show(), b && this.commentForm.updateTimestamp(b), this.commentForm
},
onCurrentTimestamp: function(a) {
this.commentView && this.commentView.$el.hide(), p && this.showCommentForm(a), this.$$("comments").toggle(p)
},
onActiveTimestamp: function(a) {
this.commentView && this.commentView.$el.hide(), p && this.showCommentForm().updateTimestamp(a).focus()
},
onInitialState: function() {
this.$$("comments").hide(), this.commentForm && this.commentForm.blur()
},
getTemplateData: function(b) {
var c = this.model;
return (e || (e = a("_"))).extend(b, {
show_ad: c.hasAd(),
sc_logo_link: c.isShareable() ? b.permalink_url : "http://soundcloud.com/"
})
}
})
};
//@ sourceURL=views/sound/sound |
#39 JavaScript::Eval (size: 2060, repeated: 2) r = function(a, b, c) {
var d, e, f, g, h, i, j, k, l;
l = function() {
throw new Error("Abstract method should be implemented in subclass")
}, d = c.exports = (j || (j = a("lib/model"))).extend({
getCurrentSound: l,
getSounds: l,
getNumSounds: l,
getSoundAt: l,
getSoundIndex: l,
getSoundIndexAt: l,
getRelativeTrackLength: l,
initAudio: function() {
var a = this.getCurrentSound();
a && a.audio.initAudio()
},
setup: function() {
this.on("error", function(b, c, d) {
(k || (k = a("models/exception"))).raise({
fatal: !0,
source: b,
xhr: c
})
}), this.on("destroy", this.pause, this)
},
isNowPlaying: function() {
return (f || (f = a("config"))).get("nowPlaying") === this
},
likesChanged: function(a) {
this.set({
likes_count: Math.max(0, (this.get("likes_count") || 0) + (a ? 1 : -1))
})
},
getEmbedCode: function() {
var b = [],
c = (f || (f = a("config"))).get("widgetParams"),
d;
return (e || (e = a("_"))).each(c, function(c, d) {
d in (g || (g = a("config/widget-params"))) && c !== (g || (g = a("config/widget-params")))[d] && b.push(d)
}), d = (e || (e = a("_"))).pick.apply(e || (e = a("_")), [c].concat(b)), (h || (h = a("vendor/embed/embed")))({
type: "track",
id: this.id,
secret_token: this.get("secret_token"),
params: d
})
},
getShareURL: function() {
return this.get("permalink_url") + (this.get("sharing") === "private" ? "/" + this.get("secret_token") : "")
},
useAsPlayQueue: function() {
(f || (f = a("config"))).get("playQueue").set(this)
},
play: l,
pause: l,
seek: l,
isPlaying: l,
isProcessing: l,
isEditing: l,
loadProgress: l,
currentTime: l,
toggle: function() {
this[this.isPlaying() ? "pause" : "play"]()
},
stop: function() {
this.seek(0), this.pause()
},
isPaused: function() {
return !this.isPlaying()
},
seekRelative: function(a) {
this.seek(this.currentTime() + a)
},
duration: function() {
return this.get("duration")
},
progress: function() {
return this.currentTime() / this.duration()
},
timecode: function() {
return (i || (i = a("lib/helpers/datetime-helper"))).timecode(this.currentTime())
},
toggleMute: function(a) {
var b = this.getCurrentSound();
b && b.audio.toggleMute(a)
},
getVolume: function() {
var a = this.getCurrentSound(),
b;
return a && (b = a.audio.getVolume()), b
},
setVolume: function(a) {
var b = this.getCurrentSound();
b && b.audio.setVolume(a)
}
})
};
//@ sourceURL=models/audible-interface |
#40 JavaScript::Eval (size: 684, repeated: 2) r = function(a, b, c) {
var d, e, f, g, h, i, j, k, l;
l = new(g || (g = a("lib/persistent-store")))("broadcast"), h = String(Date.now()).substr(-8) * 1e3 + Math.floor(Math.random() * 1e3), l.on("broadcast", function(a) {
var b = a.current;
b && b.appId !== h && k.call(d, b)
}), d = c.exports = (e || (e = a("_"))).extend({}, (f || (f = a("lib/backbone"))).Events, {
broadcast: function(a, b) {
var c, d;
return typeof a == "string" ? (c = [].slice.call(arguments, 1), b = a, a = {}) : c = [].slice.call(arguments, 2), d = j(b, c), l.set("broadcast", d), a.excludeThis || k.call(this, d), this
}
}), j = function(a, b) {
return {
type: a,
timestamp: Date.now(),
appId: h,
args: b
}
}, k = function(a) {
this.trigger.apply(this, ["broadcast:" + a.type].concat(a.args || []))
}
};
//@ sourceURL=lib/event-bus |
#41 JavaScript::Eval (size: 2488, repeated: 2) r = function(a, b, c) {
var d, e, f, g, h, i, j, k, l = "90GaSwazbrh1_m.png",
m = "/images/player-waveform-medium.png",
n = 4,
o = 500,
p = new(i || (i = a("lib/worker-pool")))((h || (h = a("lib/workers"))).scaleImage, n),
q = new(e || (e = a("lib/store")))({
maxLength: o
});
l = ((k || (k = a("lib/support"))).corsImg ? "//w1.sndcdn.com/" : "/_waveform/") + l, d = c.exports = (j || (j = a("lib/views/canvas-view"))).extend({
className: "g-box-full waveformMask",
defaults: {
upperPartHeight: .5,
bgColor: [245, 245, 245],
dividerColor: [128, 128, 128],
dividerWidth: 1
},
ModelClass: g || (g = a("models/audible")),
waveformImages: null,
onCanvasInserted: function() {
this.renderWaveform()
},
onCanvasResize: function() {
this.renderWaveform()
},
renderWaveform: function() {
if (this.disposed) return;
var b, c, e = this.options,
g = this.context,
h = this.elHeight,
i = this.model.getSounds(),
j = i.length > 0,
n = 0,
o = this.elWidth - (j ? e.dividerWidth * (i.length - 1) : 0),
r, s;
this.waveformImages ? (this.clearCanvas(), c = this.waveformImages.map(function(a, b) {
r = j ? Math.round(o * this.model.getRelativeTrackLength(b)) : o;
if (r) {
var c = n,
f = r,
i = h,
k = [a.src.replace(/^.*\//, ""), i, f].join("|"),
l = q.get(k);
return l ? (s = $.Deferred().resolve(l), this.trigger(d.Events.CACHED)) : s = p.addTask({
width: a.width,
height: a.height,
imageData: this.getImageData(a, 0, 0, a.width, a.height),
scaledWidth: f,
scaledHeight: i,
scaledImageData: this.createImageData(r, h),
bgColor: e.bgColor,
upperPartHeight: e.upperPartHeight
}).defer, s.done(function(a) {
q.has(k) || q.set(k, a), b && (g.fillStyle = "rgb(" + e.dividerColor.join(",") + ")", g.fillRect(c - e.dividerWidth, 0, e.dividerWidth, h)), g.putImageData(a, c, 0)
}), n += r + e.dividerWidth, s
}
return $.Deferred().resolve()
}, this), $.when.apply($, c).then(function() {
this.trigger(d.Events.RENDERED)
}.bind(this))) : (j ? b = i.map(function(b) {
var c = b.get("waveform_url");
return c.indexOf(m) > -1 && (c = l), (k || (k = a("lib/support"))).corsImg || (c = b.proxiedUrl("waveform_url")), (f || (f = a("lib/helpers/image-helper"))).load(c)
}) : b = [(f || (f = a("lib/helpers/image-helper"))).load(l)], $.when.apply($, b).then(function() {
this.waveformImages = [].slice.call(arguments), this.renderWaveform()
}.bind(this)))
},
getImageData: function(a, b, c, d, e) {
var f = document.createElement("canvas"),
g = a.width,
h = a.height,
i;
return f.width = g, f.height = h, i = f.getContext("2d"), i.drawImage(a, 0, 0, g, h, 0, 0, g, h), i.getImageData(b, c, d, e)
},
createImageData: function(a, b) {
var c = document.createElement("canvas"),
d;
return c.width = a, c.height = b, d = c.getContext("2d"), d.getImageData(0, 0, a, b)
}
}, {
Events: {
RENDERED: "waveform-mask.rendered",
CACHED: "waveform-mask.cached"
}
})
};
//@ sourceURL=views/sound/waveform-mask |
#42 JavaScript::Eval (size: 3301, repeated: 2) r = function(a, b, c) {
var d, e, f, g, h, i, j, k, l = (i || (i = a("lib/audio"))).Events,
m = {
PLAY: "audio:play",
PAUSE: "audio:pause",
FINISH: "audio:finish",
PLAY_START: "audio:playstart"
};
d = c.exports = (f || (f = a("models/audible-interface"))).extend({
resource_type: "sound",
audio: null,
submodelMap: {
user: j || (j = a("models/user"))
},
timeOffset: 0,
playlist: null,
originalSound: null,
setup: function(b, c) {
(f || (f = a("models/audible-interface"))).prototype.setup.apply(this, arguments), this.audio = new(i || (i = a("lib/audio")))(this), (e || (e = a("_"))).proxy(this.audio, this, "isPlaying", "loadProgress", "currentTime");
if (!c || !c.suppressGlobalEvents) {
var d = [
[l.PLAY, m.PLAY],
[l.PAUSE, m.PAUSE],
[l.FINISH, m.FINISH],
[l.PLAY_START, m.PLAY_START]
];
d.forEach(function(b) {
this.on(b[0], (g || (g = a("lib/event-bus"))).trigger.bind(g || (g = a("lib/event-bus")), b[1]))
}, this)
}
},
isEmbeddable: function(b) {
b = b || this.toJSON();
if (!document && !this.lastFetchTime) return !0;
var c = (k || (k = a("lib/url"))).parse(document.referrer),
d = b.domain_lockings || [];
return d.length ? (e || (e = a("_"))).any(d, function(b) {
var d = c.host && c.host.match((k || (k = a("lib/url"))).parse(b.domain).host);
return d && d.length
}) : !0
},
baseUrl: function() {
return (k || (k = a("lib/url"))).stringify({
path: ["tracks", this.id]
})
},
streamsUrl: function() {
return (k || (k = a("lib/url"))).stringify({
path: ["i1", "tracks", this.id, "streams"]
})
},
fetchStreams: function() {
return this.fetch({
url: this.url("streamsUrl"),
jqAjax: !0,
saveRequest: !0
})
},
extractSecretToken: function(b) {
return (k || (k = a("lib/url"))).parse(b.stream_url).query.secret_token
},
play: function() {
this.playlist ? (this.playlist.seek(this.timeOffset + this.currentTime()), this.playlist.play()) : this.audio.play()
},
pause: function() {
this.playlist ? this.playlist.pause() : this.audio.pause()
},
seek: function(a) {
var b = this.loadProgress() * this.duration();
this.audio.seek(Math.min(a, b))
},
getSounds: function() {
return [this]
},
getNumSounds: function() {
return 1
},
getSoundAt: function(a) {
return this
},
getCurrentSound: function() {
return this
},
getSoundIndex: function(a) {
return 0
},
getSoundIndexAt: function(a) {
return 0
},
isStreamable: function() {
return !!this.signedUrl("stream_url")
},
isProcessing: function() {
return this.get("state") !== "finished"
},
isEditing: function() {
return !1
},
isShareable: function() {
return this.get("embeddable_by") !== "none" && this.get("sharing") !== "private"
},
hasAd: function() {
var a = this.get("user");
return !1
},
getRelativeTrackLength: function(a) {
return 1
},
getOriginalSound: function() {
return this.originalSound || this
},
updateCommentCount: function(a) {
var b = this.get("comment_count");
this.set({
comment_count: b + (a ? 1 : -1)
})
},
progress: function() {
var a = this.duration(),
b;
if (this.playlist) {
b = this.playlist.currentTime();
if (b <= this.timeOffset) return 0;
if (b >= this.timeOffset + a) return 1
}
return this.currentTime() / a
},
toJSON: function() {
var b = (h || (h = a("lib/model"))).prototype.toJSON.apply(this, arguments);
return b._playlist = {}, this.playlist && (e || (e = a("_"))).each(["id", "permalink", "permalink_url", "secret_token", "user_id"], function(a) {
b._playlist[a] = this.get(a)
}.bind(this.playlist)), b
}
}, {
Events: m,
hashFn: function(a) {
var b = a.resource_id;
return b ? typeof b == "object" ? [b.playlist_id, b.sound_id].join("_") : b : a.id || null
},
resolve: function(b, c, d) {
return (h || (h = a("lib/model")))._resolve(this, [b, c, d], function(a) {
var d = a.get("user");
return d && a.get("permalink") === c && d.permalink === b
})
}
})
};
//@ sourceURL=models/sound |
#43 JavaScript::Eval (size: 4290, repeated: 2) r = function(a, b, c) {
var d, e, f, g, h, i, j, k, l = Array.prototype.slice;
d = (g || (g = a("lib/backbone"))).Model.extend({
resource_type: null,
lastFetchTime: null,
_submodels: null,
submodelMap: null,
initialize: function() {
this._submodels = [], (e || (e = a("_"))).each(this.submodelMap, function(a, b) {
this.on("change:" + b, this.createSubmodel.bind(this, a, b))
}, this), this.setup.apply(this, arguments), (e || (e = a("_"))).each(this.submodelMap, function(a, b) {
this.get(b) && this.createSubmodel(a, b)
}, this)
},
setup: $.noop,
createSubmodel: function(a, b) {
this.addSubmodel(new a(this.get(b)))
},
addSubmodel: function() {
l.call(arguments).forEach(function(a) {
this._submodels.indexOf(a) === -1 ? this._submodels.push(a) : a.release()
}.bind(this))
},
getAttributesToBeSaved: function() {
var b = this.toJSON(),
c = {};
return c[(f || (f = a("lib/api-wrapper"))).toAPIResource(this.resource_type)] = b, c
},
save: function(b, c) {
return (g || (g = a("lib/backbone"))).Model.prototype.save.call(this, b, (e || (e = a("_"))).extend({
url: this.saveUrl(),
data: $.param(this.getAttributesToBeSaved())
}, c)).done(function(a) {
this.set(a), this.updateResourceId()
}.bind(this))
},
saveUrl: function() {
var b = (e || (e = a("_"))).result(this, "baseUrl");
return this.isNew() && (b = b.split("/").slice(0, -1).join("/")), b
},
destroy: function(b) {
return (g || (g = a("lib/backbone"))).Model.prototype.destroy.call(this, (e || (e = a("_"))).extend({
url: this.destroyUrl()
}, b))
},
destroyUrl: function() {
return (e || (e = a("_"))).result(this, "baseUrl")
},
baseUrl: function() {
throw new Error("baseUrl should be defined for every model")
},
url: function(b) {
var c = this.getSecretToken(),
d = (e || (e = a("_"))).result(this, b || "baseUrl");
return c ? (k || (k = a("lib/url"))).modify(d, {
query: {
secret_token: c
}
}) : d
},
getSecretToken: function() {
return this.get("secret_token") || (i || (i = a("config"))).get("widgetParams").secret_token
},
signedUrl: function(b) {
var c = this.get(b),
d;
return c ? (d = {
scheme: "http",
query: {
client_id: (i || (i = a("config"))).get("client_id")
}
}, (h || (h = a("lib/connect"))).isLoggedIn() && (d.scheme = "https", d.query.oauth_token = (h || (h = a("lib/connect"))).getAuthToken()), this.get("secret_token") && (d.query.secret_token = this.get("secret_token")), (k || (k = a("lib/url"))).modify(c, d)) : null
},
proxiedUrl: function(a) {
return a === "waveform_url" ? "/_waveform/" + this.get(a).split("/").pop() : this.get(a)
},
toJSON: function() {
var b = (g || (g = a("lib/backbone"))).Model.prototype.toJSON.apply(this, arguments);
return b._resource_id = this.resource_id, b._resource_type = this.resource_type, b
},
parse: function(b) {
var c;
return typeof this.baseUrl == "string" && (c = (k || (k = a("lib/url"))).parse(this.baseUrl).query.secret_token), c || (c = this.extractSecretToken(b)), c && (b.secret_token = c), b
},
extractSecretToken: $.noop,
toString: function() {
return this.resource_type ? this.resource_type + " (" + (this.isNew() ? "new" : this.resource_id) + ")" + ": " + (this.attributes.permalink || this.attributes.title || this.attributes.name) : Object.prototype.toString.call(this)
},
hasDataForView: function(a) {
return a.getRequiredAttributes(this).every(Object.prototype.hasOwnProperty, this.attributes)
},
updateResourceId: function() {
var a = this.constructor.hashFn(this.attributes),
b = this.resource_id;
a && (this.resource_id = a, this.constructor.instances.changeKey(b, a))
}
}, {
_resolve: function(b, c, d) {
var e = b.instances.find(d),
f = $.Deferred(),
g;
return e ? f.resolve(e) : (g = (k || (k = a("lib/url"))).stringify({
path: "resolve",
query: {
url: (k || (k = a("lib/url"))).stringify({
scheme: document.location.protocol.replace(/:/, ""),
host: (i || (i = a("config"))).get("api_host").replace(/^https?:\/\/api\./, ""),
path: c
}),
"_status_code_map[302]": 200,
_status_format: "json"
}
}), $.getJSON(g).done(function(a) {
e = b.getNewInstance({}), e.baseUrl = a.location, e.fetch().done(function() {
b.instances.add(e), e.release(), f.resolve(e)
}).fail(f.reject)
}).fail(f.reject)), f
}
}), c.exports = (j || (j = a("lib/single"))).applyTo(d, {
hashFn: function(a, b) {
return a && a.id || null
},
onCleanup: function(b) {
b._submodels && b._submodels.length && ((e || (e = a("_"))).invoke(b._submodels, "release"), b._submodels.length = 0)
},
prepareArgs: function(a, b) {
return b = b || {}, a = a || {}, b.parse && (a = this.parse(a)), [a, b]
},
prepareInstance: function(b, c) {
return c = c || {}, c.collection && (this.lastFetchTime = Date.now()), (e || (e = a("_"))).isEmpty(b) || this.set(b), delete this.attributes.resource_id, this
},
getIncrementValue: function(a, b) {
var c = b && b.collection;
return c ? c.constructor.instances.countFor(c.resource_id) : 1
}
})
};
//@ sourceURL=lib/model |
#44 JavaScript::Eval (size: 1672, repeated: 2) r = function(a, b, c) {
var d, e, f, g, h, i, j, k;
d = c.exports = (g || (g = a("lib/model"))).extend({
_currentRequests: null,
onToggle: $.noop,
next_href: null,
_fetchDefer: null,
setup: function() {
this._currentRequests = new(h || (h = a("lib/store")))
},
url: function(b) {
var c = (j || (j = a("_"))).result(this, "baseUrl").replace(/\/?$/, "/");
return b ? c + b : this.next_href === null ? (i || (i = a("lib/url"))).modify(c + "ids", {
query: {
linked_partitioning: 1,
limit: 5e3
}
}) : this.next_href
},
fetch: function() {
return (e || (e = a("lib/connect"))).isLoggedIn() ? (this._fetchDefer || (this._fetchDefer = $.Deferred(), k.call(this)), this._fetchDefer) : $.Deferred().resolve()
},
parse: function(b) {
return this.next_href = b.next_href || !1, (j || (j = a("_"))).reduce(b.collection, function(a, b) {
return a[b] = !0, a
}, {})
},
toggle: function(a, b, c) {
var d = !! this.get(a),
e = typeof b == "boolean" ? b : !d;
e !== d && (e ? this.set(a, !0) : this.unset(a), this.onToggle(a, e), c || this.setRemote(a, e))
},
setRemote: function(b, c) {
var d = this._currentRequests.get(b),
e;
d || (d = $.ajax({
url: this.url(b),
type: c ? "PUT" : "DELETE"
}), this._currentRequests.set(b, d), e = this, d.always(function() {
this._currentRequests.unset(b)
}.bind(this)).done(function() {
var a = e.get(b);
(this.type === "DELETE" && a || this.type === "PUT" && !a) && e.setRemote(b, a)
}).fail(function() {
this.toggle(b, !c, !0)
}.bind(this)).fail((f || (f = a("models/exception"))).ajaxNonFatal("Could not toggle value")))
},
hasDataForView: function() {
return !!this.lastFetchTime
}
}, {
neverRelease: !0,
hashFn: function() {
return 1
}
}), k = function() {
var b = this.url();
b && (e || (e = a("lib/connect"))).isLoggedIn() ? (g || (g = a("lib/model"))).prototype.fetch.apply(this, arguments).done(k.bind(this)).fail(this._fetchDefer.reject) : this._fetchDefer.reject()
}
};
//@ sourceURL=models/id-list |
#45 JavaScript::Eval (size: 2237, repeated: 2) r = function(a, b, c) {
var d, e, f, g, h, i, j, k = $.noop;
d = c.exports = new(g || (g = a("lib/mixin")))({
stateMachine: null,
applyTo: function(b, c) {
c = c || {}, c.noStateMachine || this.after(b, {
setup: function() {
var b = (i || (i = a("lib/timed-comments-state-machine"))).States;
this.stateMachine = new(i || (i = a("lib/timed-comments-state-machine")))(this.options.sound_id || this.options.resource_id, this.collection), (f || (f = a("config"))).get("widgetParams").show_comments && this.onState(b.INITIAL, this.onInitialState).onState(b.CURRENT_COMMENT, this.onCurrentCommentChange).onState(b.ACTIVE_TIMESTAMP, this.onActiveTimestamp).onState(b.CURRENT_TIMESTAMP, this.onCurrentTimestamp)
}
}), this.before(b, {
setup: function() {
this._stateHandlers = {}, this.sound = new(h || (h = a("models/sound")))({
id: this.options.sound_id || this.options.resource_id
}), c.noCollection || (this.collection = new(j || (j = a("collections/timed-comments")))([], {
sound_id: this.sound.id,
secret_token: this.sound.get("secret_token")
}))
}
})
},
before: {
dispose: function() {
this.sound.release(), delete this.sound;
var b = this.stateMachine,
c = this;
(e || (e = a("_"))).each(this._stateHandlers, function(a, d) {
a.forEach(function(a) {
b.off(d, a, c)
})
}), this._stateHandlers = {}, b && b.release()
}
},
override: {
getCollectionData: function() {
return []
}
},
getCurrentCommentId: function() {
return this.stateMachine.currentCommentId
},
getCurrentComment: function() {
return this.collection.get(this.getCurrentCommentId())
},
getCurrentCommentTimestamp: function() {
var a = this.getCurrentComment();
return a && a.get("timestamp")
},
getCurrentState: function() {
return this.stateMachine.currentState
},
goToState: function(a) {
var b = this.stateMachine;
b.goToState.apply(b, arguments)
},
interacting: function(b) {
var c = this.stateMachine;
if ((e || (e = a("_"))).isUndefined(b)) return c.interactingWithComments;
c.interactingWithComments = b
},
onState: function(a, b) {
return this._stateHandlers[a] = this._stateHandlers[a] || [], this.stateMachine.on(a, b, this), this._stateHandlers[a].push(b), this
},
isActiveTimestampState: function() {
return !!this.stateMachine.activeTimestamp && this.getCurrentState() === (i || (i = a("lib/timed-comments-state-machine"))).States.ACTIVE_TIMESTAMP
},
defaults: {
onInitialState: k,
onActiveTimestamp: k,
onCurrentTimestamp: k,
onCurrentCommentChange: k
}
})
};
//@ sourceURL=lib/views/mixins/timed-comments |
#46 JavaScript::Eval (size: 4888, repeated: 2) r = function(a, b, c) {
var d, e, f, g, h, i, j, k = $.support.cors,
l = (h || (h = a("lib/timed-comments-state-machine"))).States;
d = c.exports = (g || (g = a("lib/views/list"))).extend(i || (i = a("lib/views/mixins/timed-comments")), {
tagName: "div",
className: "waveformComments g-opacity-transition",
itemClassName: "waveformComments__thread",
css: a("views/sound/waveform-comments.css"),
template: a("views/sound/waveform-comments.tmpl"),
Subview: j || (j = a("views/sound/waveform-thread")),
defaults: {
size: "small",
sound_id: null,
bulkFetch: 5e3,
defaultHeight: .5,
expandedHeight: 1
},
defaultAvatarWidth: 10,
events: {
click: "onClick",
mousemove: "onMouseMove",
mouseleave: "onMouseLeave"
},
setup: function() {
(e || (e = a("_"))).bindAll(this, "initDimensions", "onHoverIntent"), $(window).on("resize", this.initDimensions), this.$el.hoverIntent({
sensitivity: 1,
interval: 40,
over: this.onHoverIntent,
timeout: 0,
out: this.onHoverIntent
})
},
dispose: function() {
$(window).off("resize", this.initDimensions)
},
renderDecorate: function() {
this.whenInserted().done(this.initDimensions), this.collection.length ? this.preloadCommentAvatars() : this.toggleState("visible", !0)
},
initDimensions: function() {
this.offset = this.$el.offset(), this.elWidth = this.$el.width(), this.elHeight = this.$el.height()
},
onCollectionReset: function() {
this.rerender(), this.preloadCommentAvatars()
},
onRemove: function(a) {
var b = a.get("timestamp"),
c = this.getWaveformThreadViewByTimestamp(b);
c && (c.removeCommentAvatar(a.id), this.collection.getThreadComments(b).length || (this.removeSubview(c), c._dispose()))
},
onClick: function(a) {
if (!k) return;
var b, c;
c = this.collection.get(this.getCommentIdByMouseEvent(a)), c ? b = c.get("timestamp") : b = this.getTimestampByMouseEvent(a), this.goToState(l.ACTIVE_TIMESTAMP, b)
},
onMouseLeave: function(a) {
var b = this.getCurrentState();
(b === l.CURRENT_COMMENT || b === l.CURRENT_TIMESTAMP) && a.pageY < this.$el.offset().top + this.options.defaultHeight * this.$el.height() && this.goToState(l.INITIAL)
},
onCurrentCommentChange: function(a) {
if (a) {
var b = this.collection.get(a).get("timestamp");
this.highlightThread(b)
}
},
onCurrentTimestamp: function(a) {
this.highlightThread(a)
},
onActiveTimestamp: function(a) {
this.highlightThread(a)
},
onMouseMove: function(a) {
if (!this.interacting()) return !0;
var b = this.getCommentIdByMouseEvent(a),
c;
b ? this.goToState(l.CURRENT_COMMENT, b, !0) : (c = this.getTimestampByMouseEvent(a), this.goToState(l.CURRENT_TIMESTAMP, c))
},
onHoverIntent: function(a) {
if (this.disposed) return;
var b = a.type,
c = b === "mouseenter";
c ? clearTimeout(this.hoverIntentTimeout) : this.getCurrentState() !== l.ACTIVE_TIMESTAMP && (this.hoverIntentTimeout = setTimeout(function() {
!this.interacting() && this.sound.isPlaying() && this.goToState(l.INITIAL)
}.bind(this), 100)), this.interacting(c)
},
onInitialState: function() {
this.getWaveformThreadViews().forEach(function(a) {
a.toggle(!1)
}), this.hidePointer()
},
highlightThread: function(a) {
this.getWaveformThreadViews().forEach(function(b) {
b.toggle(b.getTimestamp() === a)
}), this.showPointer(a)
},
preloadCommentAvatars: function() {
var a = this.getWaveformThreadViews(),
b = a.length,
c = function() {
!this.disposed && !--b && this.toggleState("visible", !0)
}.bind(this);
a.forEach(function(a) {
return a.whenAvatarsLoaded().always(c)
})
},
getTimestampByMouseEvent: function(a) {
var b;
return this.offset && (b = Math.floor((a.clientX - this.offset.left) / this.elWidth * this.sound.duration())), b
},
getCommentIdByMouseEvent: function(a) {
var b = [],
c, d;
return this.elWidth && (d = Math.floor(this.defaultAvatarWidth / 2 / this.elWidth * this.sound.duration()), c = this.getTimestampByMouseEvent(a), b = this.collection.getThreadComments(c, d)), b.length ? b[0].id : null
},
getWaveformThreadViewByTimestamp: function(a) {
return this.getWaveformThreadViews(function(b) {
return b.getTimestamp() === a
})
},
getWaveformThreadViews: function(b) {
var c = function() {
return !0
};
return b = b || c, (e || (e = a("_")))[b === c ? "filter" : "find"](this.subviews, function(c) {
return c instanceof(j || (j = a("views/sound/waveform-thread"))) && b(c)
})
},
showPointer: function(b) {
if (this.elWidth && k) {
b = (e || (e = a("_"))).isObject(b) ? this.getTimestampByMouseEvent(b) : b;
var c = b / this.sound.duration();
this.$$("pointer").css({
left: c * 100 + "%"
}), this.toggleState("visiblePointer", !0)
}
},
hidePointer: function() {
this.toggleState("visiblePointer", !1)
},
getListContainer: function() {
return this.$$("threads")
},
getListItemAttributes: function(b) {
var c = b !== (f || (f = a("models/comment"))).EMPTY_TIMESTAMP,
d = {};
return c ? d.left = b / this.sound.duration() * 100 + "%" : d.right = this.defaultAvatarWidth / 2 + "px", b ? {
style: d
} : {}
},
getListItemAttributesData: function(a) {
return a.options.timestamp
},
getSubviewArgs: function(b) {
var c = b instanceof this.collection.model;
return b = c ? b.get("timestamp") : Math.floor(b), (e || (e = a("_"))).extend({
timestamp: b,
visible: c,
parentElement: this.el,
collection: this.collection
}, this.options)
},
getTemplateData: function() {
return (e || (e = a("_"))).extend((g || (g = a("lib/views/list"))).prototype.getTemplateData.apply(this, arguments), {
timestamps: this.collection.getTimestamps()
})
}
})
};
//@ sourceURL=views/sound/waveform-comments |
#47 JavaScript::Eval (size: 1216, repeated: 2) r = function(a, b, c) {
var d, e, f, g, h, i, j;
h = {
MAIN_COLOR: "#FF6600",
MAIN_CONTRAST_COLOR: "#FFFFFF",
MAIN_CONTRAST_COLOR2: "#333333",
WAVEFORM_BG_COLOR: "#EFEFEF"
}, i = {
color: "MAIN_COLOR",
waveformbg: "WAVEFORM_BG_COLOR"
}, d = c.exports = {
getColorParams: function() {
if (!this.getColorParams.__cached) {
var b = (e || (e = a("_"))).clone(h),
c = (f || (f = a("backbone"))).history.getOptions(),
d = /^#[a-f0-9]{3}$/i;
(e || (e = a("_"))).each(i, function(a, e) {
var f = c[e];
f && (f[0] !== "#" && (f = "#" + f), d.test(f) && (f = f.replace(/([a-z0-9])/gi, "$1$1")), b[a] = f)
}), (g || (g = a("lib/color"))).match(b.MAIN_COLOR, b.MAIN_CONTRAST_COLOR) || (b.MAIN_CONTRAST_COLOR = b.MAIN_CONTRAST_COLOR2), b.MAIN_COLOR_RGB = (g || (g = a("lib/color"))).hex2rgbString(b.MAIN_COLOR), b.MAIN_COLOR_BURN = (g || (g = a("lib/color"))).burn(b.MAIN_COLOR, .35), b.MAIN_COLOR_LIGHTER = (g || (g = a("lib/color"))).rgb2hex((g || (g = a("lib/color"))).lighten(b.MAIN_COLOR_RGB.split(","), .15)), b.MAIN_COLOR_DARKER = (g || (g = a("lib/color"))).rgb2hex((g || (g = a("lib/color"))).darken(b.MAIN_COLOR_RGB.split(","), .1)), this.getColorParams.__cached = b
}
return this.getColorParams.__cached
},
isAlternativeContrastColor: function() {
var a = this.getColorParams();
return a.MAIN_CONTRAST_COLOR === h.MAIN_CONTRAST_COLOR2
}
}
};
//@ sourceURL=lib/customization |
#48 JavaScript::Eval (size: 3025, repeated: 2) r = function(a, b, c) {
var d, e, f, g, h, i, j = 250,
k = 3e3,
l = 1e3,
m = {
INITIAL: "timed-comment-sm:initial",
CURRENT_COMMENT: "timed-comment-sm:current-comment",
CURRENT_TIMESTAMP: "timed-comment-sm:current-timestamp",
ACTIVE_TIMESTAMP: "timed-comment-sm:active-timestamp"
};
d = function(b, c) {
this.collection = c, this.collection.on("add", this.onAdd, this).on("remove", this.onRemove, this), this.on(m.INITIAL, this.onInitialState, this).on(m.CURRENT_COMMENT, this.onCurrentComment, this).on(m.CURRENT_TIMESTAMP, this.onCurrentTimestamp, this).on(m.ACTIVE_TIMESTAMP, this.onActiveTimestamp, this), this.sound = new(h || (h = a("models/sound")))({
id: b
}), this.sound.on("time", this.onAudioTime, this)
}, d.States = m, d.extend = (f || (f = a("lib/backbone"))).Model.extend, (e || (e = a("_"))).extend(d.prototype, (f || (f = a("lib/backbone"))).Events, {
constructor: d,
currentCommentId: null,
activeTimestamp: null,
currentTimestamp: null,
commentQuotaTimeout: null,
commentQuotaExceeded: !0,
commentIntervalTimeout: null,
commentIntervalExceeded: !0,
currentState: m.INITIAL,
interactingWithComments: !1,
dispose: function() {
this.off(), this.sound.off("time", this.onAudioTime, this), this.sound.release(), this.collection.off("add", this.onAdd, this).off("remove", this.onRemove, this)
},
onInitialState: function() {
this.activeTimestamp = null, this.currentCommentId = null, this.currentTimestamp = null
},
onCurrentComment: function(a) {
this.activeTimestamp = null, this.currentCommentId = a, this.currentTimestamp = null
},
onCurrentTimestamp: function(a) {
this.activeTimestamp = null, this.currentCommentId = null, this.currentTimestamp = a
},
onActiveTimestamp: function(a) {
this.activeTimestamp = a, this.currentCommentId = null, this.currentTimestamp = null
},
goToState: function(a) {
var b = this.canGoToState.apply(this, arguments);
return b && (this.currentState = a, this.trigger.apply(this, arguments)), b
},
canGoToState: function(a) {
var b = !1,
c = this.activeTimestamp && this.currentState === m.ACTIVE_TIMESTAMP;
switch (a) {
case m.CURRENT_TIMESTAMP:
b = !c;
break;
case m.CURRENT_COMMENT:
b = this.commentIntervalExceeded && arguments[1] !== this.currentCommentId && !c;
break;
case m.INITIAL:
b = !0;
break;
case m.ACTIVE_TIMESTAMP:
b = arguments[1] !== this.activeTimestamp
}
return b
},
onAdd: function() {
this.sound.updateCommentCount(!0)
},
onRemove: function() {
this.sound.updateCommentCount(!1)
},
onAudioTime: (e || (e = a("_"))).throttle(function() {
if (!this.disposed) {
var a = this.sound.isPlaying(),
b;
a && !this.interactingWithComments && (b = this.collection.getThreadComments(this.sound.currentTime(), j), b.length ? this.goToState(m.CURRENT_COMMENT, b[0].id) && (clearTimeout(this.commentIntervalTimeout), this.commentIntervalExceeded = !1, setTimeout(function() {
this.commentIntervalExceeded = !0
}.bind(this), l), clearTimeout(this.commentQuotaTimeout), this.commentQuotaExceeded = !1, this.commentQuotaTimeout = setTimeout(function() {
this.commentQuotaExceeded = !0, this.onAudioTime()
}.bind(this), k)) : this.commentQuotaExceeded && this.goToState(m.CURRENT_TIMESTAMP, this.sound.currentTime()))
}
}, 200)
}), c.exports = (g || (g = a("lib/single"))).applyTo(d, {
cleanupInstantly: !0,
hashFn: function(a, b) {
return a
}
})
};
//@ sourceURL=lib/timed-comments-state-machine |
#49 JavaScript::Eval (size: 1548, repeated: 2) r = function(a, b, c) {
var d, e, f, g, h, i, j = a("lib/view"),
k, l = a("tracking-events").Artwork;
d = c.exports = j.extend({
template: a("views/sound/artwork.tmpl"),
css: a("views/sound/artwork.css"),
ModelClass: h || (h = a("models/audible")),
className: "artwork",
events: {
click: "onClick",
mouseover: "onHover",
mouseout: "onHover"
},
defaults: {
imageSize: 150,
centered: !0
},
setup: function() {
var b = this.options,
c = b.imageSize,
d;
(g || (g = a("lib/support"))).transform3d && this.toggleState("transform3d", !0), d = {
width: c,
height: c
}, b.centered && (d.margin = "0 auto"), this.$el.css(d), this.hasFlipContent = (f || (f = a("config"))).get("widgetParams").show_user
},
flip: function() {
this.toggleState("flipped", !0)
},
unflip: function() {
this.toggleState("flipped", !1)
},
unflipTimeout: function() {
this.unflip(), clearTimeout(this.flipTimeout), this.flipTimeout = null
},
onClick: function(b) {
this.hasFlipContent && (this.flipTimeout ? this.unflipTimeout() : (this.flip(), this.flipTimeout = (e || (e = a("_"))).delay(this.unflipTimeout.bind(this), 5e3))), (i || (i = a("lib/event-bus"))).trigger(l.CLICKED, this.model.toJSON())
},
onHover: function(b) {
if (!this.hasFlipContent || (g || (g = a("lib/support"))).touch) return;
if (b.type === "mouseover") {
if (!this.subviews.userInfo) {
var c = new(k || (k = a("views/user/info")))({
resource_id: this.model.get("user").id
});
this.addSubview(c, "userInfo"), this.$$("flipBack").append(c.render().el)
}
this.flip()
} else this.flipTimeout || this.unflip()
},
getTemplateData: function(b) {
return (e || (e = a("_"))).extend(b, (f || (f = a("config"))).get("widgetParams"), {
imageSize: this.options.imageSize
})
}
})
};
//@ sourceURL=views/sound/artwork |
#50 JavaScript::Eval (size: 3367, repeated: 2) r = function(a, b, c) {
var d, e, f, g, h, i, j = a("lib/view"),
k = $(document),
l = (h || (h = a("config"))).get("appView").$el,
m = a("tracking-events").Scrubber,
n = {
CLICK: "click:scrubber",
MOUSE_MOVE: "mousemove:scrubber",
MOUSE_ENTER: "mouseenter:scrubber",
MOUSE_LEAVE: "mouseleave:scrubber"
},
o, p, k = $(document),
q = 500,
r = 50,
s = (f || (f = a("lib/support"))).touch ? "touchstart" : "mousedown",
t = (f || (f = a("lib/support"))).touch ? "touchmove" : "mousemove",
u = (f || (f = a("lib/support"))).touch ? "touchend" : "mouseup";
d = c.exports = j.extend({
template: a("views/sound/scrubber.tmpl"),
css: a("views/sound/scrubber.css"),
className: "scrubber",
ModelClass: i || (i = a("models/audible")),
events: {
mouseenter: "onMouseEnter",
mouseleave: "onMouseLeave"
},
states: {
"selection-disabled": function(a) {
a ? (document.onselectstart = function() {
return !1
}, l.addClass("sc-selection-disabled")) : (document.onselectstart = null, l.removeClass("sc-selection-disabled"))
}
},
setup: function() {
this.events = this.events || {}, this.events[s] = "onPointerDown", this.events[t] = "onPointerMove", this.delegateEvents(), this.scrubbingEnabled = !0, this.scrubb = (e || (e = a("_"))).throttle(this.scrubb.bind(this), r), this.unscrubb = this.unscrubb.bind(this), this._onWindowResize = (e || (e = a("_"))).debounce(this.rerender.bind(this), 100), $(window).on("resize", this._onWindowResize), this.model.on("play", this.startedPlaying, this), this.model.on("pause", this.pausedPlaying, this)
},
dispose: function() {
$(window).off("resize", this._onWindowResize), this.model.off("play", this.startedPlaying, this), this.model.off("pause", this.pausedPlaying, this)
},
renderDecorate: function() {
this.width = this.xCoord = null
},
startedPlaying: function() {
this.scrubbingEnabled = !1, (e || (e = a("_"))).delay(function() {
this.scrubbingEnabled = !0
}.bind(this), q)
},
pausedPlaying: function() {
this.scrubbingEnabled = !1
},
getWidth: function() {
return this.width = this.width || this.$el.width(), this.width
},
getCoords: function() {
return this.coord || (this.coord = this.$el.offset(), this.coord.right = this.coord.left + this.$el.width(), this.coord.bottom = this.coord.top + this.$el.height()), this.coord
},
getLoadedWidth: function() {
return this.model.loadProgress() * this.getWidth()
},
onPointerDown: function(b) {
this.trigger(n.CLICK), this.scrubbingEnabled && this.model.isPlaying() && (this.model.seek(o.call(this, b.originalEvent.pageX)), (g || (g = a("lib/event-bus"))).trigger(m.SEEKED, this.model.toJSON()), k.on(t, this.scrubb).on(u, this.unscrubb))
},
onPointerMove: function(a) {
var b = this.model.isPlaying(),
c = a.originalEvent.pageX - this.getCoords().left;
!this.scrubbingEnabled || !b || c > this.getLoadedWidth() || c <= 0 ? this.trigger(n.MOUSE_LEAVE) : this.trigger(n.MOUSE_MOVE, c - 1)
},
scrubb: function(b) {
if (!p.call(this, b)) return k.trigger(u);
this.toggleState("selection-disabled", !0), this.model.seek(o.call(this, b.originalEvent.pageX)), (g || (g = a("lib/event-bus"))).trigger(m.SEEKED, this.model.toJSON())
},
unscrubb: function() {
this.toggleState("selection-disabled", !1), k.off(t, this.scrubb).on(u, this.unscrubb), (f || (f = a("lib/support"))).touch && this.trigger(n.MOUSE_LEAVE)
},
onMouseEnter: function() {
this.model.initAudio(), this.trigger(n.MOUSE_ENTER)
},
onMouseLeave: function() {
this.trigger(n.MOUSE_LEAVE)
}
}, {
Events: n
}), o = function(a) {
var b;
return b = (a - this.getCoords().left) / this.getWidth(), Math.floor(b * this.model.duration())
}, p = function(a) {
var b = a.originalEvent.pageX,
c = a.originalEvent.pageY,
d = this.getCoords();
return b >= d.left && b <= d.right && c >= d.top && c <= d.bottom
}
};
//@ sourceURL=views/sound/scrubber |
#51 JavaScript::Eval (size: 2817, repeated: 2) r = function(a, b, c) {
var d, e, f, g, h, i, j = {},
k, l;
d = (e || (e = a("lib/backbone"))).Collection.extend({
next_href: null,
lastFetchTime: null,
model: j,
defaults: {
offset: 0,
limit: 5,
onEmpty: $.noop,
secret_token: null
},
initialize: function(a, b) {
this.options = b = l(this.constructor, b || {}), this.setup(b), b.onEmpty !== $.noop && this.on("reset", function() {
this.isEmpty() && b.onEmpty(this)
}, this)
},
setup: $.noop,
_prepareModel: function() {
var b = (e || (e = a("lib/backbone"))).Collection.prototype._prepareModel.apply(this, arguments);
return b && b.hold(this._usageCount() - 1), b
},
_removeReference: function(b) {
return b.release(this._usageCount()), (e || (e = a("lib/backbone"))).Collection.prototype._removeReference.apply(this, arguments)
},
fetch: function(b) {
var c = this.url();
return c ? this._requests && this._requests[c] || (e || (e = a("lib/backbone"))).Collection.prototype.fetch.call(this, b).done(function(a) {
this.next_href = a.next_href || !1
}.bind(this)) : $.Deferred().done(b && b.success).resolve({})
},
bulkFetch: function(a) {
var b = arguments[1],
c = arguments[2],
d, e, f;
if (!b) {
this._requests = this._requests || {};
if (this._requests.bulk) return this._requests.bulk;
this._requests.bulk = b = $.Deferred(), b.always(function() {
delete this._requests.bulk
}.bind(this)), c = this.length, d = this.options.limit, this.next_href || (this.options.limit = a - this.length), b.always(function() {
this.options.limit = d, k.call(this, {
limit: d
})
}.bind(this))
}
return this.length < a && this.url() ? (this.lastFetchTime ? f = {
add: !0
} : f = {}, f.silent = !0, k.call(this, {
limit: a - this.length
}), this.fetch(f).done(function() {
this.bulkFetch(a, b, c)
}.bind(this)).fail(b.reject)) : (c ? this.rest(c).forEach(function(a) {
this.trigger("add", a, this)
}, this) : this.trigger("reset", this, {}), b.resolve()), b
},
url: function() {
if (this.next_href !== null) return this.next_href;
var b = (h || (h = a("lib/url"))).parse((i || (i = a("_"))).result(this, "baseUrl"));
return (i || (i = a("_"))).extend(b.query, {
limit: this.options.limit,
offset: this.options.offset,
linked_partitioning: 1,
secret_token: this.getSecretToken()
}), (h || (h = a("lib/url"))).stringify(b)
},
getSecretToken: function() {
return this.options.secret_token || (f || (f = a("config"))).get("widgetParams").secret_token
},
useAsPlayQueue: function() {
(f || (f = a("config"))).get("playQueue").set(this)
},
parse: function(a) {
return a.collection
},
hasDataForView: function(a) {
return !!this.lastFetchTime
}
}), c.exports = (g || (g = a("lib/single"))).applyTo(d, {
hashFn: function(a, b) {
return b && b.resource_id || null
},
onHold: function(a, b, c) {
a.length && a.at(0).hold && a.invoke("hold", c)
},
onRelease: function(a) {
a.length && a.at(0).release && a.invoke("release")
}
}), l = function(b, c) {
return (i || (i = a("_"))).defaults(c, b.prototype.defaults), b === d ? c : l(b.__super__.constructor, c)
}, k = function(b) {
if (this.next_href) {
var c = (h || (h = a("lib/url"))).parse(this.next_href);
(i || (i = a("_"))).extend(c.query, b), this.next_href = (h || (h = a("lib/url"))).stringify(c)
}
}
};
//@ sourceURL=lib/collection |
#52 JavaScript::Eval (size: 663, repeated: 2) r = function(a, b, c) {
var d, e, f, g, h, i;
d = c.exports = (f || (f = a("lib/model"))).extend({
resource_type: "user",
baseUrl: function() {
var b = this.id;
if (b) return (g || (g = a("lib/url"))).stringify({
path: ["users", b]
});
if (this.get("permalink") === "you") return (g || (g = a("lib/url"))).stringify({
path: "me"
})
},
likesChanged: function(a) {
h.call(this, "likes_count", a)
}
}, {
resolve: function(b) {
if (b === "you") {
var c = $.Deferred(),
d = (e || (e = a("config"))).get("me");
return c.resolve(d), c
}
return (f || (f = a("lib/model")))._resolve(this, b, function(a) {
return a.get("permalink") === b
})
}
}), i = function(a, b) {
return a.get ? a.get(b) : a[b]
}, h = function(a, b) {
this.set(a, this.get(a) + (b ? 1 : -1))
}
};
//@ sourceURL=models/user |
#53 JavaScript::Eval (size: 3451, repeated: 2) r = function(a, b, c) {
var d, e, f, g, h, i = (g || (g = a("backbone"))).Model.prototype,
j = (g || (g = a("backbone"))).Collection.prototype,
k = "url";
c.exports = g || (g = a("backbone")), (g || (g = a("backbone"))).History.prototype.getFragment = function(a) {
var b = /\/*(?:[#?].*)?$/;
return function() {
var c = a.apply(this, arguments);
return c.replace(b, "")
}
}((g || (g = a("backbone"))).History.prototype.getFragment), (d || (d = a("_"))).extend((g || (g = a("backbone"))).History.prototype, {
getFragment: function(a) {
var b = this.getOptions(a);
return b[k] && (b[k] = b[k].replace(/\/+$/, "")), b[k] || ""
},
_getParams: function(b) {
return (e || (e = a("lib/url"))).parse((f || (f = a("lib/utils"))).unescapeHTML(b)).query
},
getOptions: function(b) {
var c, f;
return c = this._getParams(b || location.search), c[k] = decodeURIComponent(c[k]), f = this._getParams(c[k]), c[k] = (e || (e = a("lib/url"))).parse(c[k]).path, c = (d || (d = a("_"))).extend(c, f), (d || (d = a("_"))).each(c, function(a, b) {
a === "false" ? c[b] = !1 : a === "true" ? c[b] = !0 : b === "start_track" && (c[b] = parseInt(a, 10))
}), c
}
});
if (window.history && window.history.pushState) {
var l = function() {
window.history.replaceState({
scrollTop: document.body.scrollTop || document.documentElement.scrollTop
}, "", window.location.href)
};
(g || (g = a("backbone"))).History.prototype.navigate = function(a) {
return function() {
return l(), a.apply(this, arguments)
}
}((g || (g = a("backbone"))).History.prototype.navigate), $(window).on("unload", l)
}(function() {
function b(b, c) {
return function() {
delete b._requests[c || (c = a("lib/url"))]
}
}
function c(c) {
return function(e) {
var f;
return e = (d || (d = a("_"))).extend({
url: (d || (d = a("_"))).result(this, "url"),
jqAjax: !1,
saveRequest: !1,
dataType: $.support.cors ? "json" : "jsonp"
}, e), this._requests || (this._requests = {}), f = this._requests[e.url], f ? (e.success && f.done(function(a) {
e.success(this, a)
}.bind(this)), e.error && f.fail(e.error)) : (f = this._requests[e.url] = e.jqAjax ? $.ajax(e) : c.call(this, e), f[e.saveRequest ? "fail" : "always"](b(this, e.url))), f
}
}
i.fetch = c(i.fetch), j.fetch = c(j.fetch)
})(), i.change = function() {
var b = 0;
return function(c) {
var e;
c && c.force && c.force.forEach(function(a) {
this._changed[a] = this.get(a)
}.bind(this)), ++b;
for (e in this._changed) this._changed.hasOwnProperty(e) && this.trigger("change:" + e, this, this._changed[e], c, b);
this.trigger("change", this, c, b), this._previousAttributes = (d || (d = a("_"))).clone(this.attributes), this._changed = {}
}
}(), (g || (g = a("backbone"))).Model.extend = (g || (g = a("backbone"))).Collection.extend = (g || (g = a("backbone"))).View.extend = function(b) {
return function() {
var c = (d || (d = a("_"))).toArray(arguments),
e = 0,
f, g;
return f = c.filter(function(b, c) {
if (b instanceof(h || (h = a("lib/mixin")))) return e = c + 1, !0
}), g = b.apply(this, c.slice(e)), f.forEach(function(a) {
a.applyTo(g.prototype)
}), g
}
}((g || (g = a("backbone"))).View.extend), j.add = function(b, c) {
var e, f, g, h, i, j, k = {},
l = {},
m, n;
c || (c = {}), b = (d || (d = a("_"))).isArray(b) ? b.slice() : [b];
for (e = b.length; e--;) {
m = !1;
if (!(h = b[e] = this._prepareModel(b[e], c))) m = !0;
else if (k[i = h.cid] || this._byCid[i] || (j = h.id) !== null && j !== n && (l[j] || this._byId[j])) h.release(), m = !0;
m ? b.splice(e, 1) : k[i] = l[j] = h
}
for (e = 0, g = b.length; e < g; e++)(h = b[e]).on("all", this._onModelEvent, this), this._byCid[h.cid] = h, h.id !== null && h.id !== n && (this._byId[h.id] = h);
this.length += g, f = c.at !== null && c.at !== n ? c.at : this.models.length, Array.prototype.splice.apply(this.models, [f, 0].concat(b)), this.comparator && this.sort({
silent: !0
});
if (c.silent) return this;
for (e = 0, g = this.models.length; e < g; e++) k[(h = this.models[e]).cid] && (c.index = e, h.trigger("add", h, this, c));
return this
}
};
//@ sourceURL=lib/backbone |
#54 JavaScript::Eval (size: 936, repeated: 2) r = function(a, b, c) {
var d, e, f, g, h, i = /^https?:\/\/.+?\//,
j = /^https?|^_/,
k = {
likes: "favorites",
groups: "groups",
people: "users",
sound: "track",
sounds: "tracks"
};
d = c.exports = {
EDGE: "e1/",
initialize: function() {
var b = (f || (f = a("config"))).get("client_id"),
c = (f || (f = a("config"))).get("api_host");
$.ajaxSetup({
statusCode: {
0: (h || (h = a("models/exception"))).ajaxFatal("Couldnt connect to the server. Please try again later.")
},
beforeSend: function(d, f) {
f.crossDomain = !0;
var h;
j.test(f.url) || (f.url = c + f.url.replace(i, ""), h = !0), h = h || f.url.substr(0, c.length) === c, h && ((e || (e = a("lib/connect"))).isLoggedIn() && d.setRequestHeader("Authorization", "OAuth " + (e || (e = a("lib/connect"))).getAuthToken()), f.url = (g || (g = a("lib/url"))).modify(f.url, {
scheme: (e || (e = a("lib/connect"))).isLoggedIn() ? "https" : (g || (g = a("lib/url"))).parse(location.href).scheme,
query: {
client_id: b,
format: "json"
}
}))
}
})
},
toAPIResource: function(a) {
return k[a] || a
}
}
};
//@ sourceURL=lib/api-wrapper |
#55 JavaScript::Eval (size: 1840, repeated: 2) r = function(a, b, c) {
var d, e, f, g, h, i = a("lib/view"),
j, k = a("tracking-events").Track;
d = c.exports = i.extend({
template: a("views/sound/waveform.tmpl"),
css: a("views/sound/waveform.css"),
ModelClass: f || (f = a("models/audible")),
className: "waveform g-opacity-transition sc-selection-disabled",
defaults: {
upperPartHeight: .7
},
events: {
"click .waveform:not(.playing) .waveform__scrubber": "toggleSound"
},
requiredAttributes: {
playlist: ["tracks"],
sound: ["id", "waveform_url", "state"]
},
setup: function() {
this.model.on("play pause", this.onSoundToggle, this)
},
dispose: function() {
this.model.off("play pause", this.onSoundToggle, this)
},
onSoundToggle: function() {
this.toggleState("playing", this.model.isPlaying()), this.toggleState("started", !0)
},
toggleSound: function(b) {
this.model.toggle(), (j || (j = a("lib/event-bus"))).trigger(k.SCRUBBER, this.model.toJSON())
},
renderDecorate: function() {
var b = this.subviews.scrubber,
c = this.subviews.waveformMask,
d = this.subviews.scrubberPosition,
e = this.model.isProcessing(),
f = e;
this.toggleState("empty", f), f || (b.on((g || (g = a("views/sound/scrubber"))).Events.MOUSE_LEAVE, d.hide, d).on((g || (g = a("views/sound/scrubber"))).Events.MOUSE_MOVE, d.show, d), this.toggleState("playing", this.model.isPlaying())), c.on((h || (h = a("views/sound/waveform-mask"))).Events.CACHED, function() {
this.$el.removeClass("g-opacity-transition")
}, this).on((h || (h = a("views/sound/waveform-mask"))).Events.RENDERED, function() {
this.toggleState("visible", !0)
}, this)
},
teardown: function() {
this.toggleState("visible", !1)
},
getTemplateData: function(b) {
var c = (e || (e = a("config"))).get("widgetParams"),
d = this.model.resource_type === "sound";
return {
model: b,
isProcessing: this.model.isProcessing(),
isCommentable: c && c.show_comments && b.commentable && d,
upperPartHeight: this.options.upperPartHeight,
upperPartHeightPercent: this.options.upperPartHeight * 100 + "%"
}
}
})
};
//@ sourceURL=views/sound/waveform |
#56 JavaScript::Eval (size: 655, repeated: 2) r = function(a, b, c) {
var d, e, f, g, h, i = c.exports = new(f || (f = a("lib/store")));
(d || (d = a("lib/mixins/observing"))).applyTo(i), h = "0f8fdbbaa21a9bd18210986a7dc2d72c", (e || (e = a("_"))).each({
app_root: (g || (g = a("lib/url"))).parse("http://w.soundcloud.com/player/").directory || "/",
api_host: window.location.protocol + "//api.soundcloud.com/",
widget_id: "widget_" + Date.now(),
client_id: h,
fb_app_id: "19507961798",
mixi_api_key: "1403ed11563185e9cff6cfeedf4f2ecf77fa459e",
me: null,
nowPlaying: null,
playQueue: null,
oauth_token: null,
pageVisible: !0,
preferFlashAudio: !0,
router: null,
appView: null,
widgetParams: {}
}, function(a, b) {
i.set(b, a, {
silent: !0
})
}), i.finalize()
};
//@ sourceURL=config |
#57 JavaScript::Eval (size: 451, repeated: 2) r = function(a, b, c) {
var d, e, f, g, h;
(h || (h = a("_"))).each(g || (g = a("lib/template-helpers")), function(b, c) {
(e || (e = a("vendor/handlebars-runtime"))).registerHelper(c, b)
}), d = c.exports = {
render: function(b, c, d) {
var e = b(c || {}),
f, g, i;
return d ? ((h || (h = a("_"))).isArray(d) ? (f = d[0], g = d[1], i = document.createElement(f), g && $(i).attr(g)) : i = d, i.innerHTML = e, i) : e
},
subviews: function(b) {
(f || (f = a("lib/subview-plugin"))).replacePlaceholders(b)
}
}
};
//@ sourceURL=lib/template |
#58 JavaScript::Eval (size: 613, repeated: 2) r = function(a, b, c) {
var d, e, f, g, h;
d = c.exports = (g || (g = a("lib/collection"))).extend({
model: e || (e = a("models/comment")),
defaults: {
sound_id: null,
secret_token: null
},
soundDuration: null,
setup: function() {
var b = new(h || (h = a("models/sound")))({
id: this.options.sound_id
});
b.get("comment_count") === 0 && (this.lastFetchTime = Date.now()), this.options.secret_token = b.get("secret_token"), this.soundDuration = b.duration(), b.release()
},
baseUrl: function() {
return (f || (f = a("lib/url"))).stringify({
path: ["tracks", this.options.sound_id, "comments"]
})
}
}, {
hashFn: function(a, b) {
return b && b.sound_id || null
}
})
};
//@ sourceURL=collections/comments |
#59 JavaScript::Eval (size: 997, repeated: 2) r = function(a, b, c) {
var d, e, f, g, h;
d = c.exports = (h || (h = a("views/widget/widget"))).extend({
ModelClass: e || (e = a("models/sound")),
className: "singleSound",
template: function() {
return ""
},
defaults: {
resource_id: null,
resource_type: null
},
requiredAttributes: ["id"],
getPlayQueueSource: function() {
return this.model
},
startWidget: function() {
if (!this.model.isEmbeddable()) {
var b = "This sound cant be played outside of SoundCloud";
this.model.isShareable() && (b += '<br/><a href="' + this.model.get("permalink_url") + '">Click here to listen</a>'), (g || (g = a("models/exception"))).raise({
fatal: !0,
source: this.model,
message: b
})
} else(h || (h = a("views/widget/widget"))).prototype.startWidget.apply(this, arguments)
},
createSoundView: function() {
var b = this.subviews.sound;
b || (b = this.addSubview(new(f || (f = a("views/sound/sound")))(this.options), "sound")), this.$el.empty().append(b.render().el)
},
onFetchFail: function(b) {
(g || (g = a("models/exception"))).raise({
fatal: !0,
source: this.model,
xhr: b
})
}
})
};
//@ sourceURL=views/widget/single-sound |
#60 JavaScript::Eval (size: 558, repeated: 2) r = function(a, b, c) {
var d, e, f, g, h;
d = c.exports = {
$debug: function() {
return window.console.log.apply(window.console, [].slice.call(arguments, 0, arguments.length - 1)), ""
},
$image: function(b, c) {
return new((e || (e = a("vendor/handlebars-runtime"))).SafeString)((g || (g = a("lib/helpers/image-helper"))).markup(b, c.hash))
},
$timecode: (f || (f = a("lib/helpers/datetime-helper"))).timecode,
$view: function() {
return new((e || (e = a("vendor/handlebars-runtime"))).SafeString)((h || (h = a("lib/subview-plugin"))).handlebarHelper.apply(this, arguments))
}
}
};
//@ sourceURL=lib/template-helpers |
#61 JavaScript::Eval (size: 648, repeated: 2) r = function(a, b, c) {
var d, e, f, g, h = Infinity;
d = c.exports = (e || (e = a("lib/model"))).extend({
resource_type: "comment",
parse: function(a) {
return a.timestamp === null && (a.timestamp = h), a
},
submodelMap: {
track: g || (g = a("models/sound")),
user: f || (f = a("models/user"))
},
baseUrl: function() {
return ["comments", this.id].join("/")
},
saveUrl: function() {
return ["tracks", this.get("track_id"), "comments"].join("/")
},
destroyUrl: function() {
return ["tracks", this.get("track_id"), "comments", this.id].join("/")
},
getAttributesToBeSaved: function() {
return {
"comment[body]": this.get("body"),
"comment[timestamp]": this.get("timestamp")
}
}
}, {
EMPTY_TIMESTAMP: h
})
};
//@ sourceURL=models/comment |
#62 JavaScript::Eval (size: 1063, repeated: 2) r = function(a, b, c) {
var d, e, f, g, h = a("lib/view"),
i, j, k, l = a("tracking-events").Track,
d = c.exports = h.extend({
template: a("views/sound/actions.tmpl"),
css: a("views/sound/actions.css"),
ModelClass: f || (f = a("models/audible")),
className: "sound__actions",
events: {
"click .sound__purchase": "notifyTracking",
"click .sound__download": "notifyTracking"
},
notifyTracking: function(b) {
(j || (j = a("lib/event-bus"))).trigger(l[/download/.test(b.target.className) ? "DOWNLOAD" : "BUY"], this.model.toJSON())
},
getTemplateData: function(b) {
var c = this.model,
d = b._resource_type === "sound",
f = c.getNumSounds() > 0,
h = (g || (g = a("config"))).get("widgetParams");
return (e || (e = a("_"))).extend(b, {
show_buy_button: f && !! b.purchase_url,
purchase_title: (i || (i = a("vendor/js-online-stores/online-stores"))).getPurchaseTitle(b, d ? "Buy" : "Buy all"),
is_shareable: !c.hasAd() && h.sharing && c.isShareable(),
show_like_button: $.support.cors && c.isShareable() && h.liking,
public_download_url: (k || (k = a("lib/url"))).modify(b.download_url, {
query: {
client_id: (g || (g = a("config"))).get("client_id")
}
})
})
}
})
};
//@ sourceURL=views/sound/actions |
#63 JavaScript::Eval (size: 981, repeated: 2) r = function(a, b, c) {
var d, e, f, g, h = a("lib/view"),
i, j, k = a("tracking-events").Title;
d = c.exports = h.extend({
template: a("views/sound/title.tmpl"),
css: a("views/sound/title.css"),
className: "soundTitle",
defaults: {
show_time: !1
},
events: {
"click a.soundTitle__title": "onSoundTitleClick",
"click a.soundTitle__username": "onSoundUploaderClick"
},
ModelClass: g || (g = a("models/sound")),
requiredAttributes: ["permalink_url", "title"],
onSoundTitleClick: function() {
(i || (i = a("lib/event-bus"))).trigger(k.TITLE, this.model.toJSON())
},
onSoundUploaderClick: function() {
(i || (i = a("lib/event-bus"))).trigger(k.UPLOADER, this.model.toJSON())
},
getTemplateData: function(b) {
var c = (f || (f = a("config"))).get("widgetParams");
return (e || (e = a("_"))).extend(b, {
total: (j || (j = a("lib/helpers/datetime-helper"))).timecode(b.duration),
shareable: this.model.isShareable() && c.sharing,
show_time: this.options.show_time,
show_user: this.options.show_user !== undefined ? this.options.show_user : c.show_user
})
}
})
};
//@ sourceURL=views/sound/title |
#64 JavaScript::Eval (size: 1479, repeated: 2) r = function(a, b, c) {
var d, e, f, g, h = a("lib/view"),
i = a("tracking-events").Track;
d = c.exports = h.extend({
css: a("views/sound/like.css"),
colorCustomizable: !0,
template: function() {
return "Like"
},
tagName: "button",
className: "soundLike g-button g-button-like g-button-responsive",
states: {
selected: "g-button-selected"
},
events: {
click: "onClick"
},
setup: function() {
this.model = new(g || (g = a("models/sound-likes"))), this.observedAttributes = [this.options.resource_id], (f || (f = a("lib/event-bus"))).on("connect:login", this.onLogin, this)
},
dispose: function() {
(f || (f = a("lib/event-bus"))).off("connect:login", this.onLogin, this)
},
onModelChange: function(a, b, c, d) {
this._lastEventId !== d && (this._lastEventId = d, this.rerender())
},
getTemplate: function() {
return this.template
},
renderDecorate: function() {
this.toggleState("selected", !! this.model.get(this.options.resource_id))
},
onLogin: function() {
this.toggleState("selected", !0), this.model.fetch().done(function() {
this.toggleLike(!0)
}.bind(this))
},
onClick: function(b) {
b.preventDefault(), (e || (e = a("lib/connect"))).isLoggedIn() ? this.toggleLike() : (e || (e = a("lib/connect"))).login(), (f || (f = a("lib/event-bus"))).trigger(i.LIKE_BUTTON, this.model.toJSON())
},
toggleLike: function(a) {
this.model.toggle(this.options.resource_id, a), this.notifyTracking()
},
notifyTracking: function() {
var b = this.model.get(this.options.resource_id) ? "like:click" : "unlike:click";
(f || (f = a("lib/event-bus"))).trigger(b, this.options.resource_id, this.options.resource_type)
}
})
};
//@ sourceURL=views/sound/like |
#65 JavaScript::Eval (size: 2049, repeated: 2) r = function(a, b, c) {
var d, e, f, g, h = {},
i, j, k, l;
["forEach", "each", "map", "reduce", "find", "size", "first", "last", "indexOf"].forEach(function(b) {
h[b] = function() {
return (e || (e = a("_")))[b].apply(e || (e = a("_")), [this.getSounds()].concat((e || (e = a("_"))).toArray(arguments)))
}
}), d = c.exports = Class.extend([h, (e || (e = a("_"))).extend({}, (f || (f = a("backbone"))).Events, {
cursor: 0,
source: null,
sourceIsCollection: !1,
set: function(b, c) {
this.sourceIsCollection = b instanceof(g || (g = a("lib/collection"))), this.cursor = 0, this.source !== b && (this.source && l.call(this), this.source = b, k.call(this)), c && this.setCursor(c)
},
get: function(a) {
var b = this.source;
return this.sourceIsCollection ? (b.soundAt || b.at).call(b, a) : b
},
getSounds: function() {
var a = this.source;
return this.sourceIsCollection ? a.models : a.getSounds()
},
current: function() {
var a = this.get(this.cursor),
b;
return !a && this.source && this.source.getNextSoundIndex && (b = this.source.getNextSoundIndex(this.cursor + 1), b && (this.cursor = b, a = this.get(this.cursor))), a || null
},
setCursor: function(a) {
if (!this.sourceIsCollection) return;
typeof a == "number" ? this.cursor = Math.max(0, Math.min(this.source.length - 1, a)) : (this.cursor = 0, this.source.any(function(b, c) {
return this.get(c) === a ? (this.cursor = c, !0) : !1
}.bind(this))), this.cursor === this.length() - 1 && this.source.fetch({
add: !0
})
},
reset: function() {
this.cursor = 0, this.source.release(), this.source = null, this.get = $.noop
},
length: function() {
return this.source ? this.sourceIsCollection ? this.source.length : 1 : 0
},
next: function() {
return this.cursor < this.length() - 1 ? (this.setCursor(this.cursor + 1), this.current()) : null
},
prev: function() {
return this.cursor > 0 ? (this.setCursor(this.cursor - 1), this.current()) : null
}
})]), k = function() {
var b = this.source;
b instanceof(g || (g = a("lib/collection"))) && b.on("add", j, this).on("remove", i, this), b.hold()
}, l = function() {
var b = this.source;
b instanceof(g || (g = a("lib/collection"))) && b.off("add", j, this).off("remove", i, this), b.release()
}, j = function(a, b, c) {
c.index <= this.cursor && ++this.cursor
}, i = function(a, b, c) {
this.cursor && c.index <= this.cursor && --this.cursor
}
};
//@ sourceURL=lib/play-queue |
#66 JavaScript::Eval (size: 1238, repeated: 2) r = function(a, b, c) {
var d, e, f, g;
d = c.exports = (f || (f = a("lib/views/progress-bar"))).extend({
template: a("views/sound/progress-bar.tmpl"),
css: a("views/sound/progress-bar.css"),
colorCustomizable: !0,
className: "progressBar",
defaults: {
upperPartHeight: .5,
dark: !1
},
states: {
hasLoading: $.noop
},
setup: function() {
(f || (f = a("lib/views/progress-bar"))).prototype.setup.apply(this, arguments), this.options.dark ? (this.$el.addClass("dark"), this.isFullyLoaded = !0) : this.model.resource_type === "playlist" && this.model.on("internal:play", g, this), this.toggleState("hasLoading", !this.options.dark)
},
dispose: function() {
this.model.resource_type === "playlist" && !this.options.dark && this.model.off("internal:play", g, this)
},
updatePlayed: function() {
var a = this.$$("progressPlay");
a[0].style.width = a[1].style.width = this.playedProgress * 100 + "%"
},
updateLoaded: function() {
this.getState("hasLoading") && (this.$$("progressLoad")[0].style.maxWidth = this.isFullyLoaded ? "0" : (1 - this.loadedProgress) * 100 + "%")
},
getTemplateData: function(b) {
return {
_options: b._options,
upperPartHeight: this.options.upperPartHeight * 100 + "%",
lowerPartHeight: (e || (e = a("lib/math"))).precise((1 - this.options.upperPartHeight) * 100, 4) + "%"
}
}
}), g = function() {
this.isFullyLoaded = !1
}
};
//@ sourceURL=views/sound/progress-bar |
#67 JavaScript::Eval (size: 2910, repeated: 2) r = function(a, b, c) {
var d, e, f, g;
d = c.exports = (g || (g = a("collections/comments"))).extend({
defaults: {
limit: 5e3
},
initialize: function(b, c) {
(g || (g = a("collections/comments"))).prototype.initialize.apply(this, arguments), this.threads = [], this.sortedIds = [], this.fakeComments = {}, this.on("change:id", this._onCommentIdChange, this), this.on("remove", this._removeComment, this)
},
threads: [],
sortedIds: [],
fakeComments: {},
_onCommentIdChange: function(a) {
var b = a.fakeCommentId;
a.id && b && (delete this.fakeComments[b], delete a.fakeCommentId, this._addComment(a, b))
},
_addComment: function(b, c) {
var d = b.toJSON(),
f = d.timestamp,
g, h, i, j, k, l = 0;
d.id || (i = d.fakeCommentId = b.fakeCommentId = (e || (e = a("_"))).uniqueId(), this.fakeComments[i] = b), h = this.getTimestampIndex(f);
if (d.id) for (j = 0; j < h; ++j) l += this.threads[j][1].length;
c ? b.id && this.threads[h][1].every(function(a, d) {
if (a.fakeCommentId === c) return l += d, a.id = b.id, delete a.fakeCommentId, !1
}) : (d.created_timestamp = +(new Date(d.created_at)), this.threads[h] && this.threads[h][0] === f ? (k = (e || (e = a("_"))).sortedIndex(this.threads[h][1], d, function(a) {
return a.created_timestamp
}), this.threads[h][1].splice(k, 0, d), l += k) : (g = [f, [d]], this.threads.splice(h, 0, g))), b.id && this.sortedIds.splice(l, 0, b.id)
},
_removeComment: function(b) {
var c, d;
b.id && (c = b.get("timestamp"), d = 0, (e || (e = a("_"))).any(this.threads, function(a, e) {
var f;
if (a[0] === c) return f = a[1].indexOf(b.id), d += f, a[1].splice(f, 1), this.sortedIds.splice(d, 1), !0;
d += a[1].length
}.bind(this)))
},
_prepareModel: function() {
var b = (g || (g = a("collections/comments"))).prototype._prepareModel.apply(this, arguments);
return b.created_timestamp = +(new Date(b.created_at)), b.get("timestamp") > this.soundDuration && b.set({
timestamp: (f || (f = a("models/comment"))).EMPTY_TIMESTAMP
}, {
silent: !0
}), this._addComment(b), b
},
comparator: function(b, c) {
var d = b.attributes.timestamp === (f || (f = a("models/comment"))).EMPTY_TIMESTAMP ? Infinity : b.attributes.timestamp,
e = c.attributes.timestamp === (f || (f = a("models/comment"))).EMPTY_TIMESTAMP ? Infinity : c.attributes.timestamp;
return d - e || b.created_timestamp - c.created_timestamp
},
getThreadComments: function(b) {
var c = arguments[1],
d = (e || (e = a("_"))).isNumber(c) ? c : 0,
g = (e || (e = a("_"))).isBoolean(c) ? c : !1,
h, i, j;
return d === 0 ? (i = (e || (e = a("_"))).sortedIndex(this.threads, [b], function(b) {
return b[0] === (f || (f = a("models/comment"))).EMPTY_TIMESTAMP ? Infinity : b[0]
}), this.threads[i] && this.threads[i][0] === b && (h = this.threads[i])) : h = (e || (e = a("_"))).find(this.threads, function(c) {
return Math.abs(b - c[0]) <= d && c[0] !== (f || (f = a("models/comment"))).EMPTY_TIMESTAMP
}), j = h ? h[1] : [], j.filter(g ?
function(a) {
return a.id
} : Boolean)
},
getThreads: function() {
return (e || (e = a("_"))).pluck(this.threads, 1)
},
getTimestamps: function() {
return (e || (e = a("_"))).pluck(this.threads, 0)
},
getTimestampIndex: function(b) {
return (e || (e = a("_"))).sortedIndex(this.getTimestamps(), b, function(b) {
return b === (f || (f = a("models/comment"))).EMPTY_TIMESTAMP ? Infinity : b
})
}
})
};
//@ sourceURL=collections/timed-comments |
#68 JavaScript::Eval (size: 2017, repeated: 2) r = function(a, b, c) {
var d, e, f, g;
d = c.exports = (g || (g = a("lib/views/progress-bar"))).extend({
template: a("views/sound/time-indicator.tmpl"),
css: a("views/sound/time-indicator.css"),
className: "timeIndicator",
colorCustomizable: !0,
_timeDisplayTimeout: null,
setup: function() {
(g || (g = a("lib/views/progress-bar"))).prototype.setup.apply(this, arguments), (e || (e = a("_"))).bindAll(this, "updateTimeDisplay", "startUpdatingTimeDisplay", "stopUpdatingTimeDisplay"), this.model.on("seeked", this.updateTimeDisplay).on("play", this.startUpdatingTimeDisplay).on("pause", this.stopUpdatingTimeDisplay)
},
dispose: function() {
(g || (g = a("lib/views/progress-bar"))).prototype.dispose.apply(this, arguments), this.model.off("seeked", this.updateTimeDisplay).off("play", this.startUpdatingTimeDisplay).off("pause", this.stopUpdatingTimeDisplay)
},
renderDecorate: function() {
(g || (g = a("lib/views/progress-bar"))).prototype.renderDecorate.apply(this, arguments), !this._timeDisplayTimeout && this.model.isPlaying() && this.startUpdatingTimeDisplay()
},
teardown: function() {
(g || (g = a("lib/views/progress-bar"))).prototype.teardown.apply(this, arguments), this.stopUpdatingTimeDisplay()
},
updatePlayed: function() {
var a = this.$el.width(),
b = this.playedProgress * a,
c = this.$$("total").outerWidth(),
d = this.$$("current"),
e = d.outerWidth(),
f = b + e > a - c;
this.toggleState("playing", !0).toggleState("endOfSound", f), d[0].style.left = f ? a - c - e + "px" : this.playedProgress * 100 + "%"
},
updateTimeDisplay: function() {
var b = this.model.currentTime();
b = Math.floor(b / 1e3 + .1) * 1e3, this.disposed || (this.$$("current")[0].innerHTML = (f || (f = a("lib/helpers/datetime-helper"))).timecode(b))
},
startUpdatingTimeDisplay: function() {
this.updateTimeDisplay();
var a = 1e3 - this.model.currentTime() % 1e3;
a < 500 && (a += 1e3), clearTimeout(this._timeDisplayTimeout), this._timeDisplayTimeout = setTimeout(this.startUpdatingTimeDisplay, a)
},
stopUpdatingTimeDisplay: function() {
clearTimeout(this._timeDisplayTimeout), this._timeDisplayTimeout = null
},
onAudioFinish: function() {
this.toggleState("playing", !1)
}
})
};
//@ sourceURL=views/sound/time-indicator |
#69 JavaScript::Eval (size: 310, repeated: 2) r = function(a, b, c) {
var d, e, f, g;
d = c.exports = (g || (g = a("models/id-list"))).extend({
baseUrl: function() {
return "me/favorites/"
},
onToggle: function(b, c) {
var d = (f || (f = a("models/sound"))).instances.get(b),
g = (e || (e = a("config"))).get("me");
d && d.likesChanged(c), g && g.likesChanged(c)
}
})
};
//@ sourceURL=models/sound-likes |
#70 JavaScript::Eval (size: 582, repeated: 2) r = function(a, b, c) {
var d, e, f, g;
d = c.exports = new(g || (g = a("lib/mixin")))((e || (e = a("_"))).extend({
around: {
set: function(a, b, c, d) {
var e = d && d.silent,
f, g;
return e || (g = this.get(b)), f = a(b, c, d), !e && g !== c && this.trigger(b, {
prev: g,
current: c
}), f
},
unset: function(a, b, c) {
var d = c && c.silent,
e, f;
return d || (f = this.get(b)), e = a(b, c), !d && f !== undefined && this.trigger(b, {
prev: f,
current: undefined
}), e
}
},
before: {
reset: function(a) {
(!a || !a.silent) && this.each(function(a, b) {
this.trigger(b, {
prev: this.get(b),
current: undefined
})
}, this)
}
}
}, (f || (f = a("lib/backbone"))).Events))
};
//@ sourceURL=lib/mixins/observing |
#71 JavaScript::Eval (size: 228, repeated: 2) r = function(a, b, c) {
var d, e, f, g;
g = c.exports = (d || (d = a("lib/store"))).extend(), (e || (e = a("lib/mixins/persistent"))).applyTo(g.prototype), (f || (f = a("lib/mixins/observing"))).applyTo(g.prototype)
};
//@ sourceURL=lib/persistent-store |
#72 JavaScript::Eval (size: 928, repeated: 2) r = function(a, b, c) {
var d, e, f, g = "views/error/error",
h = "views/widget/single-sound",
i = "views/widget/multi-sounds",
j, d;
j = [{
name: "error",
route: "*error",
view: g,
resourceType: "exception"
}], d = [{
name: "sound",
route: "/tracks/:track",
view: h,
resourceType: (e || (e = a("config/resources"))).SOUND
}, {
name: "playlist",
route: "/playlists/:playslist",
view: i,
resourceType: (e || (e = a("config/resources"))).PLAYLIST
}, {
name: "user-sounds",
route: "/users/:user",
view: i,
resourceType: (e || (e = a("config/resources"))).USER_SOUNDS
}, {
name: "user-favorites",
route: "/users/:user/favorites",
view: i,
resourceType: (e || (e = a("config/resources"))).USER_FAVORITES
}, {
name: "group-sounds",
route: /^\/groups\/(\d+)\/?$/,
view: i,
resourceType: (e || (e = a("config/resources"))).GROUP_SOUNDS
}, {
name: "app-sounds",
route: /^\/apps\/(\d+)\/?$/,
view: i,
resourceType: (e || (e = a("config/resources"))).APP_SOUNDS
}], c.exports = j.concat(f || (f = a("config/permalink-routes")), d)
};
//@ sourceURL=config/routes |
#73 JavaScript::Eval (size: 2004, repeated: 2) r = function(a, b, c) {
var d, e, f, g = $.noop,
h = 0,
i = 6e4,
j;
c.exports = {
applyTo: function k(b, c) {
c = (d || (d = a("_"))).extend({
neverRelease: !1,
cleanupInstantly: !1,
hashFn: function(a) {
return null
},
prepareArgs: function(a) {
return arguments
},
prepareInstance: function(a) {
return this
},
getIncrementValue: function(a) {
return 1
},
onHold: g,
onRelease: g,
onCleanup: null,
GC_INTERVAL: i
}, c, b), delete c.prototype;
var l, m = b.extend || (e || (e = a("backbone"))).Model.extend,
n = c.neverRelease,
o, p, q, r, s, t;
return l = new(f || (f = a("lib/gc-store")))({
autoCleanup: c.cleanupInstantly,
onCleanup: c.onCleanup,
onIncrement: c.onHold,
onDecrement: c.onRelease
}), n ? q = r = s = g : (s = function() {
l.cleanup(), p = l.length ? setTimeout(s, c.GC_INTERVAL) : null
}, q = function(a) {
l.increment(this.resource_id, a)
}, r = function(a) {
l.decrement(this.resource_id, a)
}), t = {
hold: q,
release: r,
_usageCount: function() {
return l.countFor(this.resource_id)
},
constructor: function() {
var a = o.prepareArgs.apply(this, arguments),
d = o.hashFn.apply(this, a) || "f-" + ++h,
e = o.neverRelease ? 1 : o.getIncrementValue.apply(null, a),
f = l.get(d);
if (f) return this.constructor.neverRelease || f.hold(e), o.prepareInstance.apply(f, a), f;
f = this, !p && !o.cleanupInstantly && (p = setTimeout(s, c.GC_INTERVAL)), l.set(d, f), f.constructor.neverRelease || f.hold(e - 1), f.resource_id = d, j(b).apply(f, a), o.prepareInstance.apply(f, a)
}
}, o = m.call(b, t, c), (d || (d = a("_"))).extend(o, {
__constructor__: j(b),
reset: function() {
l.reset(), p && (clearTimeout(p), p = null)
},
extend: function(c, e) {
var f, g;
return c = c || {}, (d || (d = a("_"))).isArray(c) && (c = (d || (d = a("_"))).extend.apply(null, [{}].concat(c))), c.hasOwnProperty("constructor") || (c.constructor = j(b)), f = m.apply(o, arguments), f.extend = m, g = k(f, o), g.__super__ && (g.__super__ = g.__super__.constructor.__super__), g
},
instances: function() {
return l.add = function(a) {
var b = o.hashFn(a.attributes);
a.resource_id = b, b && this.set(b, a)
}, l
}(),
getNewInstance: function() {
function d() {
return j(b).apply(this, a)
}
var a = arguments,
c;
return d.prototype = o.prototype, c = new d, c
}
})
}
}, j = function(a) {
return a.__constructor__ || a
}
};
//@ sourceURL=lib/single |
#74 JavaScript::Eval (size: 2339, repeated: 2) r = function(a, b, c) {
var d, e, f, g = a("lib/view"),
h = 40;
d = c.exports = g.extend({
ModelClass: f || (f = a("models/audible")),
_lastContainerSize: -1,
_throttleTime: 0,
_throttleTimeout: 0,
setup: function() {
this.loadedProgress = this._getLoadedProgress(), this.playedProgress = this._getPlayedProgress(), this.isFullyLoaded = !1, (e || (e = a("_"))).bindAll(this, "onAudioFinish", "updateProgressBar", "rethrottle", "onAudioPlay", "onAudioPause", "timedUpdate"), this.rethrottleDebounced = (e || (e = a("_"))).debounce(this.rethrottle, 300), $(window).on("resize", this.rethrottleDebounced), this.model.on("finish", this.onAudioFinish).on("seeked", this.updateProgressBar)
},
dispose: function() {
this.model.off("finish", this.onAudioFinish).off("seeked", this.updateProgressBar), $(window).off("resize", this.rethrottleDebounced)
},
renderDecorate: function() {
this.updateProgressBar(), this.model.on("play", this.onAudioPlay).on("pause", this.onAudioPause), this.model.isPlaying() && (this._throttleTime || this.rethrottle(), this._throttleTimeout || this.timedUpdate())
},
teardown: function() {
this.stopTimedUpdates(), this.model.off("play", this.onAudioPlay).off("pause", this.onAudioPause)
},
onAudioPause: function() {
this.stopTimedUpdates()
},
onAudioPlay: function() {
this._throttleTime || this.rethrottle(), this._throttleTimeout || this.timedUpdate()
},
rethrottle: function() {
if (this.disposed) return;
var a = this.el.clientWidth,
b, c, d;
a !== this._lastContainerSize && (this._lastContainerSize = a, b = this.model.duration(), a === 0 ? (this._throttleTime = 0, d = this.whenInserted(), d.state() === "pending" && d.done(this.rethrottle)) : this._throttleTime = Math.max(h, Math.floor(b / a)))
},
updateLoaded: $.noop,
updatePlayed: $.noop,
onAudioFinish: function() {
this.updateProgressBar()
},
updateProgressBar: function() {
this.disposed || (this.playedProgress = this._getPlayedProgress(), this.isFullyLoaded || (this.loadedProgress = this._getLoadedProgress(), this.isFullyLoaded = this.loadedProgress === 1, this.updateLoaded()), this.updatePlayed())
},
_getLoadedProgress: function() {
return this.model.loadProgress()
},
_getPlayedProgress: function() {
return this.model.progress()
},
timedUpdate: function() {
var a = this._throttleTime,
b;
this.updateProgressBar(), b = Math.max(h, a && a - this.model.currentTime() % a), this._throttleTimeout = setTimeout(this.timedUpdate, b)
},
stopTimedUpdates: function() {
clearTimeout(this._throttleTimeout), this._throttleTimeout = null
}
})
};
//@ sourceURL=lib/views/progress-bar |
#75 JavaScript::Eval (size: 1830, repeated: 2) r = function(a, b, c) {
var d, e, f, g = a("lib/view");
d = c.exports = g.extend({
css: a("lib/views/image.css"),
className: "image",
baseUrl: null,
defaults: {
modelData: null,
alt: "",
size: 50,
stretch: !1
},
_fadeIn: !1,
_whenLoadedDefer: null,
_displaySize: null,
setup: function() {
var b = this.options.modelData;
this.baseUrl = (f || (f = a("lib/helpers/image-helper"))).urlFrom(b, this.options.size), this.imageUrl = (f || (f = a("lib/helpers/image-helper"))).setFormat(this.baseUrl, this.options.size), this.options.alt = this.options.alt || (f || (f = a("lib/helpers/image-helper"))).getAltText(b), this._displaySize = this.options.stretch ? "100%" : this.options.size, this._whenLoadedDefer = this.addDeferred($.Deferred()), this.el.style.width = this._displaySize + "px", this.el.style.height = this._displaySize + "px", this.modelKind = b.kind, delete this.options.modelData
},
template: function() {
var b = (f || (f = a("lib/helpers/image-helper"))).getPlaceholderUrl(this.baseUrl, this.options.size),
c = [],
d = {
src: this.imageUrl,
width: this._displaySize,
height: this._displaySize,
alt: this.options.alt,
"class": "image__full"
};
return b ? (c.push((f || (f = a("lib/helpers/image-helper"))).getMarkup((e || (e = a("_"))).extend({}, d, {
src: b,
"class": "image__placeholder"
}))), this._fadeIn = !0) : b === !1 ? this._fadeIn = !1 : this._fadeIn = !0, c.push((f || (f = a("lib/helpers/image-helper"))).getMarkup(d)), c.join("")
},
renderDecorate: function() {
var a = this._whenLoadedDefer,
b = this.$(".image__full"),
c, d;
b.one("load", a.resolve), this._fadeIn && (c = String(this._displaySize), this.$el.addClass("image__hasPlaceholder image__hasPlaceholder-" + this.modelKind + (/%/.test(c) ? "" : " image__hasPlaceholder-" + c)), d = this.$(".image__placeholder"), b[0].style.opacity = 0, b.addClass("g-opacity-transition").on("load", function() {
this.style.opacity = 1, setTimeout(function() {
d.remove()
}, 500)
}))
},
whenLoaded: function() {
return this._whenLoadedDefer
}
})
};
//@ sourceURL=lib/views/image |
#76 JavaScript::Eval (size: 450, repeated: 2) r = function(a, b, c) {
var d, e, f, g = a("lib/view");
d = c.exports = g.extend({
template: a("views/sound/stats.tmpl"),
css: a("views/sound/stats.css"),
className: "soundStats",
tagName: "ul",
ModelClass: f || (f = a("models/sound")),
requiredAttributes: ["favoritings_count", "playback_count", "comment_count"],
getTemplateData: function(b) {
return b.show_playcount = !! b.playback_count && (e || (e = a("config"))).get("widgetParams").show_playcount, b
}
})
};
//@ sourceURL=views/sound/stats |
#77 JavaScript::Eval (size: 1680, repeated: 2) r = function(a, b, c) {
var d, e, f, g = a("models/sound").Events,
h, i = a("lib/view"),
j, k;
d = c.exports = i.extend({
template: function() {
return ""
},
css: a("views/widget-container.css"),
setup: function(b) {
this.$el.addClass("widgetContainer g-box-full sc-border-box"), (j || (j = a("_"))).bindAll(this, "onPlay", "onFinish"), (f || (f = a("lib/event-bus"))).on(g.PLAY, this.onPlay).on(g.PLAY_START, this.onPlay).on(g.FINISH, this.onFinish).on("exception", this.onException).on("broadcast:audio:play", this.onBroadcastPlay), $(window).on("error", this.onError), k()
},
onPlay: function(b) {
var c = b.playlist || b.sound,
d = (e || (e = a("config"))).get("nowPlaying");
d && d !== c && d.pause(), (f || (f = a("lib/event-bus"))).broadcast({
excludeThis: !0
}, "audio:play"), (e || (e = a("config"))).set("nowPlaying", c), (e || (e = a("config"))).get("playQueue").setCursor(c)
},
onBroadcastPlay: function() {
var b = (e || (e = a("config"))).get("nowPlaying"),
c = (e || (e = a("config"))).get("widgetParams");
b && c.single_active && b.pause()
},
onFinish: function(b) {
var c = (e || (e = a("config"))).get("playQueue"),
d;
while (d = c.next()) if (d.getNumSounds()) {
d.play(), d.seek(0);
break
}
},
onException: function(b) {
b.fatal ? (e || (e = a("config"))).get("router").apply(b.id, "error") : (window.console.warn("Exception: %s", b.get("message")), window.console.warn(b))
},
onError: function(b) {
var c = b.originalEvent;
return (h || (h = a("models/exception"))).raise({
message: c.message,
error: c,
fatal: !1
}), !0
}
}), k = function() {
var b, c, d, f;
f = ["", "webkit", "moz", "ms"].some(function(a) {
var d = (a ? a + "H" : "h") + "idden";
if (document.hasOwnProperty(d)) return b = d, c = a + "visibilitychange", !0
}), f && (d = function() {
(e || (e = a("config"))).set("pageVisible", !document[b])
}, document.addEventListener(c, d, !1))
}
};
//@ sourceURL=views/widget-container |
#78 JavaScript::Eval (size: 433, repeated: 2) r = function(a, b, c) {
var d, e, f, g = document.getElementsByTagName("head")[0],
h = (f || (f = a("lib/browser"))).isIE9,
i, j;
h && (i = document.createElement("style"), j = []), d = c.exports = {
insert: function(b, c) {
(e || (e = a("_"))).isArray(b) || (b = [b]), b.forEach(function(a) {
if (h) {
if (j.indexOf(a) > -1) return;
j.push(a), i.innerText += c ? c(a.innerHTML) : a.innerHTML, a = i
}
a.parentNode || (!h && c && (a.innerHTML = c(a.innerHTML)), g.appendChild(a))
})
}
}
};
//@ sourceURL=lib/css |
#79 JavaScript::Eval (size: 166, repeated: 2) r = function(a, b, c) {
var d, e, f;
d = c.exports = (e || (e = a("lib/store"))).extend(), (f || (f = a("lib/mixins/usage-counting"))).applyTo(d.prototype)
};
//@ sourceURL=lib/gc-store |
#80 JavaScript::Eval (size: 636, repeated: 2) r = function(a, b, c) {
var d, e, f;
d = c.exports = (f || (f = a("lib/model"))).extend({
url: null,
lastFetchTime: 1,
initialize: function(b) {
b = b || {}, this.id || (b.id = this.id = this.cid, d.instances.set(this.id, this)), this.fatal = !! b.fatal, (f || (f = a("lib/model"))).prototype.initialize.apply(this, arguments)
}
}, {
raise: function(b, c) {
var f = new d(b);
f.release(), c = c || {}, (e || (e = a("lib/event-bus"))).trigger("exception", f);
if (c.hard) throw f
},
ajaxFatal: function(a) {
return function(b, c) {
c !== "abort" && d.raise({
message: a,
xhr: b,
fatal: !0
})
}
},
ajaxNonFatal: function(a) {
return function(b, c) {
c !== "abort" && d.raise({
message: a,
xhr: b,
fatal: !1
})
}
}
})
};
//@ sourceURL=models/exception |
#81 JavaScript::Eval (size: 940, repeated: 2) r = function(a, b, c) {
var d, e, f;
d = c.exports = function(a) {
this.tasks = [], this.url = a.url, this.fn = a.fn, this.worker = this.createWorker()
}, d.prototype = {
constructor: d,
tasks: [],
url: "",
fn: $.noop,
worker: null,
addTask: function(b) {
var c = new(e || (e = a("lib/web-worker-task")))(b),
d = !this.isBusy();
return this.tasks.push(c), d && this.processNextTask(), c
},
createWorker: function() {
var b;
return (f || (f = a("lib/support"))).WebWorker ? (b = new Worker(this.url), b.onmessage = function(a) {
this.onTaskComplete(a.data)
}.bind(this)) : (b = $.Deferred(), b.done(function(a) {
this.worker = this.createWorker(), this.onTaskComplete(a)
}.bind(this))), b
},
isBusy: function() {
return !!this.tasks.length
},
processNextTask: function() {
var b, c = this.worker;
this.tasks.length && (b = this.tasks[0], (f || (f = a("lib/support"))).WebWorker ? c.postMessage(b.data) : c.resolve(this.fn(b.data)))
},
onTaskComplete: function(a) {
var b = this.tasks.shift();
b && b.resolve(a), this.processNextTask()
}
}
};
//@ sourceURL=lib/web-worker |
#82 JavaScript::Eval (size: 467, repeated: 2) r = function(a, b, c) {
var d, e, f;
d = c.exports = function(a, b) {
this.workers = [], this.workerObj = a, this.length = b
}, d.prototype = {
constructor: d,
addTask: function(b) {
var c = (e || (e = a("_"))).find(this.workers, function(a) {
return !a.isBusy()
});
return !c && this.workers.length < this.length ? (c = new(f || (f = a("lib/web-worker")))(this.workerObj), this.workers.push(c)) : c || (c = this.workers.sort(function(a, b) {
return a.tasks.length - b.tasks.length
})[0]), c.addTask(b)
}
}
};
//@ sourceURL=lib/worker-pool |
#83 JavaScript::Eval (size: 358, repeated: 2) r = function(a, b, c) {
var d, e, f;
d = c.exports = function(b, c) {
var d = b.resource_type,
g;
return delete b.resource_type, d === "playlist" ? g = new(e || (e = a("models/playlist")))(b, c) : g = new(f || (f = a("models/sound")))(b, c), g
}, d.getClass = function(b) {
var c = b.resource_type;
return c === "playlist" ? e || (e = a("models/playlist")) : f || (f = a("models/sound"))
}
};
//@ sourceURL=models/audible |
#84 JavaScript::Eval (size: 662, repeated: 2) r = function(a, b, c) {
var d, e, f;
d = c.exports = new(f || (f = a("lib/mixin")))({
states: null,
_states: null,
toggleState: function(b, c) {
var d, f;
return this.states || (this.states = {}), this.states[b] || (this.states[b] = b), this._states = this._states || {}, this._states[b] = this._states[b] || !1, c = typeof c != "undefined" ? !! c : !this._states[b], this._states[b] === c ? this : (this._states[b] = c, d = this.states[b], typeof d == "string" ? (f = d, this.$el[c ? "addClass" : "removeClass"](f)) : (e || (e = a("_"))).isFunction(d) ? d.call(this, c) : d && d[c ? "setup" : "teardown"].call(this), this.trigger("state:" + b, c), this)
},
getState: function(a) {
return !!this._states && !! this._states[a]
}
})
};
//@ sourceURL=lib/views/mixins/stateful |
#85 JavaScript::Eval (size: 277, repeated: 2) r = function(a, b, c) {
var d, e, f;
d = c.exports = {
fetch: function(b, c) {
var d = (e || (e = a("vendor/handlebars-runtime"))).Utils.escapeExpression(b.username || b.title || b.name);
return c === !0 && (d = (f || (f = a("lib/helpers/lang-helper"))).possessive(d)), d
}
}
};
//@ sourceURL=lib/helpers/name-helper |
#86 JavaScript::Eval (size: 210, repeated: 2) r = function(a, b, c) {
var d, e, f;
f = $.noop, e = c.exports = new(d || (d = a("lib/mixin")))({
isReadOnly: !1,
makeReadOnly: function() {
this.isReadOnly = !0, this.set = this.reset = this.unset = f
}
})
};
//@ sourceURL=lib/mixins/read-only |
#87 JavaScript::Eval (size: 1191, repeated: 2) r = function(a, b, c) {
var d, e, f = ["before", "after", "around", "requires", "override", "defaults", "applyTo"];
d = c.exports = Class.extend({
initialize: function(a) {
this.properties = a
},
applyTo: function(a) {
var b = this.properties;
this.requires(a, b.requires), this.extend(a, b), this.defaults(a, b.defaults), this.override(a, b.override), this.before(a, b.before), this.after(a, b.after), this.around(a, b.around), b.applyTo && b.applyTo.apply(this, arguments)
},
before: function(b, c) {
(e || (e = a("_"))).each(c, function(c, d) {
var f = b[d];
b[d] = function() {
return c.apply(this, arguments), f.apply(this, arguments)
}
})
},
after: function(b, c) {
(e || (e = a("_"))).each(c, function(c, d) {
var f = b[d];
b[d] = function() {
var a = f.apply(this, arguments);
return c.apply(this, arguments), a
}
})
},
around: function(b, c) {
(e || (e = a("_"))).each(c, function(c, d) {
var f = b[d],
g = Array.prototype.slice;
b[d] = function() {
var a = g.apply(arguments);
return a.unshift(f.bind(this)), c.apply(this, a)
}
})
},
override: function(b, c) {
(e || (e = a("_"))).extend(b, c)
},
defaults: function(b, c) {
(e || (e = a("_"))).each(c, function(a, c) {
b.hasOwnProperty(c) || (b[c] = a)
})
},
extend: function(b, c) {
(e || (e = a("_"))).each(c, function(c, d) {
f.indexOf(d) < 0 && (b[d] = c)
})
},
requires: function(b, c) {}
})
};
//@ sourceURL=lib/mixin |
#88 JavaScript::Eval (size: 1210, repeated: 2) r = function(a, b, c) {
var d, e, f = a("lib/view"),
g, h;
d = c.exports = f.extend({
tagName: "canvas",
className: "g-box-full",
context: null,
template: function() {
return ""
},
_setup: function() {
this.context = this.el.getContext("2d"), this._onWindowResize = (e || (e = a("_"))).debounce(g.bind(this), d.CANVAS_RESIZE_INTERVAL), $(window).on("resize", this._onWindowResize), f.prototype._setup.apply(this, arguments)
},
_dispose: function() {
$(window).off("resize", this._onWindowResize), delete this.context, delete this.elWidth, delete this.elHeight, f.prototype._dispose.apply(this, arguments)
},
renderDecorate: function() {
this.whenInserted().done(function() {
h.call(this), this.onCanvasInserted()
}.bind(this))
},
onCanvasInserted: $.noop,
onCanvasResize: $.noop,
clearCanvas: function() {
this.context && this.context.clearRect(0, 0, this.elWidth, this.elHeight)
}
}, {
CANVAS_RESIZE_INTERVAL: 100
}), g = function() {
try {
var a = this.$el.width(),
b = this.$el.height();
if (this.elWidth !== a || this.elHeight !== b) h.call(this, a, b), this.onCanvasResize()
} catch (c) {} finally {}
}, h = function(a, b) {
this.elWidth = a || this.el.offsetWidth, this.elHeight = b || this.el.offsetHeight, this.el.setAttribute("width", this.elWidth), this.el.setAttribute("height", this.elHeight)
}
};
//@ sourceURL=lib/views/canvas-view |
#89 JavaScript::Eval (size: 2939, repeated: 2) r = function(a, b, c) {
var d, e, f = a("lib/view"),
g;
d = c.exports = f.extend({
template: a("lib/views/list.tmpl"),
emptyTemplate: null,
defaults: {
bulkFetch: 0,
maxDisplay: 3
},
Subview: null,
tagName: "ul",
itemTagName: "li",
itemClassName: null,
fetchData: function(a) {
return this.options.bulkFetch ? a.bulkFetch(this.options.bulkFetch) : a.fetch()
},
getTemplate: function(a) {
return !this.emptyTemplate || !a || this.collection.length ? f.prototype.getTemplate.apply(this, arguments) : this.emptyTemplate
},
getListContainer: function() {
return this.$el
},
getListItemView: function(b) {
return (e || (e = a("_"))).find(this.subviews, function(a) {
return a.model === b
})
},
getSubviewArgs: function(a) {
return {
resource_id: a.resource_id || a._resource_id,
resource_type: a.resource_type || a._resource_type
}
},
getListItemAttributesData: function(a) {
return a.model ? a.model.toJSON() : {}
},
getListItemAttributes: function(a) {
return {}
},
getListItemAttributesString: function(b) {
var c = this.getListItemAttributes(b);
return new((g || (g = a("vendor/handlebars-runtime"))).SafeString)((e || (e = a("_"))).toAttributesString(c))
},
onAdd: function(b, c, d) {
var f;
d = d || {}, f = this.addListItemSubview(b), f.render(), this.addSubviewToDOM(f, (e || (e = a("_"))).isNumber(d.index) ? d.index : -1)
},
onRemove: function(a, b, c) {
var d = this.getListItemView(a),
e;
this.getSubviewWrapper(d).remove(), this.removeSubview(d), d._dispose(), this.options.maxDisplay && this.options.maxDisplay < this.collection.length && (e = this.addListItemSubview(this.collection.at(this.options.maxDisplay - 1)), e.render(), this.addSubviewToDOM(e))
},
addListItemSubview: function(a) {
var b = this.getSubviewArgs(a);
return this.addSubview(new this.Subview(b))
},
getListItemViewByEvent: function(b) {
var c = $(b.target).closest("." + this.itemClassName),
d;
return c.length && (d = (e || (e = a("_"))).find(this.subviews, function(a) {
return a.el === c.children()[0]
})), d
},
createSubviewWrapper: function(a) {
var b = this.getListItemAttributesString(this.getListItemAttributesData(a)),
c;
return b = b.toString().length ? " " + b : "", c = $("<" + this.itemTagName + ' class="' + this.itemClassName + '"' + b + ">"), c
},
detachSubviewFromDOM: function(a) {
this.getSubviewWrapper(a).detach()
},
getSubviewWrapper: function(a) {
return a.$el.parent()
},
addSubviewToDOM: function(a, b) {
var c = this.getListContainer(),
d = this.getSubviewWrapper(a),
e;
d.length || (d = this.createSubviewWrapper(a), d.append(a.el)), b === -1 || b >= this.collection.length - 1 || b === undefined ? c.append(d) : b === 0 ? c.prepend(d) : (e = this.getSubviewWrapper(this.getListItemView(this.collection.at(b - 1))), d.insertAfter(e))
},
getTemplateData: function(b) {
b = b || this.getCollectionData(), this.options.maxDisplay && b.length > this.options.maxDisplay && (b = (e || (e = a("_"))).first(b, this.options.maxDisplay));
var c = b._options || (e || (e = a("_"))).clone(this.options);
return delete b._options, {
Subview: this.Subview,
subviewArgsFn: this.getSubviewArgs.bind(this),
itemAttrsFn: this.getListItemAttributesString.bind(this),
itemTagName: this.itemTagName,
itemClassName: this.itemClassName,
collection: b,
_options: c
}
}
})
};
//@ sourceURL=lib/views/list |
#90 JavaScript::Eval (size: 1388, repeated: 2) r = function(a, b, c) {
var d, e, f = a("lib/view");
d = c.exports = f.extend({
template: a("views/sound/play-button.tmpl"),
css: a("views/sound/play-button.css"),
colorCustomizable: !0,
className: "playButton",
ModelClass: e || (e = a("models/audible")),
requiredAttributes: {
sound: ["id"],
playlist: ["tracks"]
},
events: {
mouseenter: "create",
click: "toggle"
},
states: {
playing: function(a) {
this.$$("button").toggleClass("g-button-pause", a)
},
disabled: function(a) {
this.$$("button").attr({
title: a ? "Non-playable" : "Play",
disabled: a
})
}
},
element2selector: {
button: "button"
},
loadingTemplate: null,
setup: function() {
this.model.on("play pause", this.onToggle, this).on("isEditing", this.onEditing, this)
},
dispose: function() {
this.model.off("play pause", this.onToggle, this).off("isEditing", this.onEditing, this)
},
renderDecorate: function() {
this.synchronizeStates()
},
create: function() {
this.model.initAudio()
},
toggle: function(a) {
this.model.toggle(), this.rerender()
},
onToggle: function() {
this.synchronizeStates()
},
onEditing: function(a) {
this.toggleState("disabled", a)
},
synchronizeStates: function() {
var a = this.model.isPlaying();
this.$$("button").attr("title", a ? "Pause" : "Play"), this.toggleState("playing", a).toggleState("disabled", !this.model.isStreamable() || !this.model.getNumSounds() || this.model.isProcessing() || this.model.isEditing())
},
getTemplateData: function(a) {
return {
isPlaying: this.model.isPlaying()
}
}
})
};
//@ sourceURL=views/sound/play-button |
#91 JavaScript::Eval (size: 1141, repeated: 2) r = function(a, b, c) {
var d, e, f = {};
["each", "forEach", "map", "find", "detect", "filter", "select", "reject", "every", "all", "any", "some", "include", "contains"].forEach(function(b) {
f[b] = function() {
var c = [this._store];
return c.push.apply(c, arguments), (e || (e = a("_")))[b].apply(e || (e = a("_")), c)
}
}), d = c.exports = Class.extend([f,
{
initialize: function(a) {
this._store = {}, this.length = 0, this._final = !1, this.maxLength = a && a.maxLength || !1, this.maxLength && (this._keys = [])
},
maxLength: 0,
get: function(a) {
return this._store[a]
},
set: function(a, b) {
return this.has(a) ? this.maxLength && this._keys.splice(this._keys.indexOf(a), 1) : (++this.length, this.maxLength && this.length > this.maxLength && this.unset(this._keys[0])), this.maxLength && this._keys.push(a), this._store[a] = b, this
},
unset: function(a) {
var b;
return this.has(a) && (--this.length, this._final ? this._store[a] = b : (delete this._store[a], this.maxLength && this._keys.splice(this._keys.indexOf(a), 1))), this
},
reset: function() {
return this._store = {}, this.maxLength && (this._keys = []), this._final = !1, this.length = 0, this
},
has: function(a) {
return this._store.hasOwnProperty(a)
},
finalize: function() {
this._final = !0
}
}])
};
//@ sourceURL=lib/store |
#92 JavaScript::Eval (size: 511, repeated: 2) r = function(a, b, c) {
var d, e;
c.exports = {
url: "/player/assets/swf-8bc33658/",
flashVersion: 9,
debugMode: !1,
debugFlash: !1,
useConsole: !0,
consoleOnly: !0,
waitForWindowLoad: !1,
useHighPerformance: !0,
flashPollingInterval: 40,
html5PollingInterval: 40,
flashLoadTimeout: 1e3,
wmode: "transparent",
allowScriptAccess: "always",
useFlashBlock: !0,
useHTML5Audio: (d || (d = a("lib/support"))).HTML5Audio,
preferFlash: (e || (e = a("config"))).get("preferFlashAudio"),
noSWFCache: !1,
defaultOptions: {
multiShot: !1
}
}
};
//@ sourceURL=config/soundmanager |
#93 JavaScript::Eval (size: 1460, repeated: 2) r = function(a, b, c) {
var d, e;
d = c.exports = new(e || (e = a("lib/mixin")))({
onCleanup: null,
onIncrement: null,
onDecrement: null,
after: {
initialize: function(a) {
this._counts = {}, this._needsGC = !1, a = a || {}, this._autoCleanup = !! a.autoCleanup, this.onCleanup = a.onCleanup, this.onIncrement = a.onIncrement, this.onDecrement = a.onDecrement
},
reset: function() {
this._counts = {}, this._needsGC = !1
},
set: function(a, b) {
this._counts[a] || (this._counts[a] = 1, this.onIncrement && this.onIncrement(b, a, 1))
},
unset: function(a) {
delete this._counts[a]
}
},
before: {
reset: function() {
this.onCleanup && this.forEach(this.onCleanup)
}
},
countFor: function(a) {
return this._counts[a] || 0
},
increment: function(a, b) {
return this.has(a) && (b = typeof b == "number" ? b : 1, b > 0 ? (this._counts[a] = (this._counts[a] || 0) + b, this.onIncrement && this.onIncrement(this.get(a), a, b)) : b < 0 && this.decrement(a, -b)), this
},
decrement: function(a, b) {
return this.has(a) && (b = typeof b == "number" ? b : 1, b > 0 ? (this._counts[a] = (this._counts[a] || 1) - b, this.onDecrement && this.onDecrement(this.get(a), a, b), this._counts[a] <= 0 && (this._needsGC = !0, this._autoCleanup && this.cleanup())) : b < 0 && this.increment(a, -b)), this
},
cleanup: function() {
var a, b = this.onCleanup;
if (this._needsGC) {
for (a in this._counts) this._counts.hasOwnProperty(a) && this._counts[a] === 0 && (b && b(this.get(a), a), this.unset(a));
this._needsGC = !1
}
},
changeKey: function(a, b) {
if (a === b) return;
var c = this.get(a),
d = this.countFor(a);
this.unset(a), this.set(b, c), this.increment(b, d - 1)
}
})
};
//@ sourceURL=lib/mixins/usage-counting |
#94 JavaScript::Eval (size: 166, repeated: 2) r = function(a, b, c) {
var d, e;
d = c.exports = {
load: function(b) {
var c = $.Deferred();
return (e || (e = a("_"))).isArray(b) || (b = [b]), a(b, c.resolve), c
}
}
};
//@ sourceURL=lib/loader |
#95 JavaScript::Eval (size: 645, repeated: 2) r = function(a, b, c) {
var d, e;
d = c.exports = {
start: function() {
var b = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%" id="flashwidget"><param name="movie" value="{flashPlayerSrc}"> </param><param name="allowscriptaccess" value="always"> </param><embed src="{flashPlayerSrc}" type="application/x-shockwave-flash" allowscriptaccess="always" width="100%" height="100%"> </embed></object>',
c = "//player.soundcloud.com/player.swf" + location.search,
d = document.getElementById("widget");
b = (e || (e = a("lib/utils"))).supplant(b, {
flashPlayerSrc: c
}), d.className += " noBorders", d.innerHTML = b
}
}
};
//@ sourceURL=lib/flash-widget |
#96 JavaScript::Eval (size: 1742, repeated: 2) r = function(a, b, c) {
var d, e = 260,
f = 100;
d = c.exports = {
getBrightnessDiff: function(a, b) {
var c = (a[0] * 299 + a[1] * 587 + a[2] * 114) / 1e3,
d = (b[0] * 299 + b[1] * 587 + b[2] * 114) / 1e3;
return Math.abs(Math.round(c - d))
},
getColorDiff: function(a, b) {
var c = Math.max(a[0], b[0]) - Math.min(a[0], b[0]) + (Math.max(a[1], b[1]) - Math.min(a[1], b[1])) + (Math.max(a[2], b[2]) - Math.min(a[2], b[2]));
return Math.abs(Math.round(c))
},
hex2rgbString: function(a) {
var b = d.hex2rgb(a);
return b.join(",")
},
hex2rgb: function(a) {
a = a.replace("#", "");
var b = [parseInt(a[0] + a[1], 16), parseInt(a[2] + a[3], 16), parseInt(a[4] + a[5], 16)];
return b
},
rgb2hex: function(a) {
var b = "#",
c, d;
for (d = 0; d < 3; d++) c = a[d].toString(16), b += c.length < 2 ? "0" + c : c;
return b
},
rgb2hsl: function(a) {
var b = a[0] / 255,
c = a[1] / 255,
d = a[2] / 255,
e = Math.min(b, c, d),
f = Math.max(b, c, d),
g = f - e,
h, i, j;
return f === e ? h = 0 : b === f ? h = (c - d) / g : c === f ? h = 2 + (d - b) / g : d === f && (h = 4 + (b - c) / g), h = Math.min(h * 60, 360), h < 0 && (h += 360), j = (e + f) / 2, f === e ? i = 0 : j <= .5 ? i = g / (f + e) : i = g / (2 - f - e), [h, i * 100, j * 100]
},
hsl2rgb: function(a) {
var b = a[0] / 360,
c = a[1] / 100,
d = a[2] / 100,
e, f, g, h, i, j;
if (c === 0) return i = Math.floor(d * 255), [i, i, i];
d < .5 ? f = d * (1 + c) : f = d + c - d * c, e = 2 * d - f, h = [0, 0, 0];
for (j = 0; j < 3; j++) g = b + 1 / 3 * -(j - 1), g < 0 && g++, g > 1 && g--, 6 * g < 1 ? i = e + (f - e) * 6 * g : 2 * g < 1 ? i = f : 3 * g < 2 ? i = e + (f - e) * (2 / 3 - g) * 6 : i = e, h[j] = Math.floor(i * 255);
return h
},
match: function(a, b) {
var c = this.hex2rgb(a),
d = this.hex2rgb(b),
g = this.getBrightnessDiff(c, d),
h = this.getColorDiff(c, d);
return g >= f && h >= e ? !0 : !1
},
darken: function(a, b) {
var c = d.rgb2hsl(a);
return c[2] -= b * 100, c[2] = Math.max(0, c[2]), d.hsl2rgb(c)
},
lighten: function(a, b) {
var c = d.rgb2hsl(a);
return c[2] += b * 100, c[2] = Math.min(100, c[2]), d.hsl2rgb(c)
},
burn: function(a, b) {
var c = d.hex2rgb(a),
e = [],
f;
b = b || 1;
for (f = 0; f < 3; f++) e[f] = c[f] === 255 ? 255 : Math.round(c[f] * (1 - b));
return d.rgb2hex(e)
}
}
};
//@ sourceURL=lib/color |
#97 JavaScript::Eval (size: 578, repeated: 2) r = function(a, b, c) {
var d, e = a("lib/api/events").api,
f = a("lib/audio").Events,
g;
d = c.exports = {}, d.audio = {}, d.audio[e.PLAY_PROGRESS] = f.TIME, d.audio[e.PLAY] = f.PLAY, d.audio[e.PAUSE] = f.PAUSE, d.audio[e.FINISH] = f.FINISH, d.audio[e.LOAD_PROGRESS] = f.LOADING, d.audio[e.SEEK] = f.SEEK, d.ui = {}, d.ui[e.SHARE] = (g || (g = a("tracking-events"))).SharePanel.SHARE_ICON, d.ui[e.OPEN_SHARE_PANEL] = (g || (g = a("tracking-events"))).SharePanel.OPENED, d.ui[e.CLICK_BUY] = (g || (g = a("tracking-events"))).Track.BUY, d.ui[e.CLICK_DOWNLOAD] = (g || (g = a("tracking-events"))).Track.DOWNLOAD
};
//@ sourceURL=lib/api/events-map |
#98 JavaScript::Eval (size: 1297, repeated: 2) r = function(a, b, c) {
var d, e = a("lib/view"),
f, g, h, i, j, k, l, m, n = 480;
d = c.exports = e.extend({
getPlayQueueSource: $.noop,
createSoundView: $.noop,
renderDecorate: function() {
this.getPlayQueueSource().fetch().done(this.startWidget.bind(this))
},
startWidget: function() {
var b = (f || (f = a("config"))).get("playQueue"),
c = (f || (f = a("config"))).get("widgetParams"),
d;
if (this.model && this.model.get("permalink_url") && (h || (h = a("lib/browser"))).isUIWebView && !document.referrer && window.innerHeight > n) {
document.location = this.model.get("permalink_url").replace("http://", "http://m.");
return
}
this.getPlayQueueSource().useAsPlayQueue(), c.start_track && b.setCursor(c.start_track), d = b.current(), c.auto_play && (!(h || (h = a("lib/browser"))).isSafari || !(h || (h = a("lib/browser"))).isMobile) && d.play(), this.createSoundView(d.id), (g || (g = a("lib/event-bus"))).trigger("widget:ready")
}
}, {
modelForResourceType: function(b) {
var c;
switch (b) {
case (i || (i = a("config/resources"))).PLAYLIST:
c = m || (m = a("models/playlist"));
break;
case (i || (i = a("config/resources"))).USER_SOUNDS:
case (i || (i = a("config/resources"))).USER_FAVORITES:
c = k || (k = a("models/user"));
break;
case (i || (i = a("config/resources"))).GROUP_SOUNDS:
c = l || (l = a("models/group"));
break;
case (i || (i = a("config/resources"))).APP_SOUNDS:
c = j || (j = a("models/app"))
}
return c
}
})
};
//@ sourceURL=views/widget/widget |
#99 JavaScript::Eval (size: 1935, repeated: 2) r = function(a, b, c) {
var d, e = a("lib/view"),
f, g, h;
d = c.exports = e.extend({
css: a("views/sound/waveform-thread.css"),
template: a("views/sound/waveform-thread.tmpl"),
className: "waveformThread left g-all-transitions-200",
avatarClassName: "waveformThread__avatar",
commentIdDataAttribute: "comment-id",
defaults: {
size: "large",
sound_id: null,
visible: !0,
timestamp: h,
bulkFetch: 5e3,
parentElement: null,
defaultHeight: .5
},
_whenAvatarsLoadedDefer: null,
setup: function() {
this.$el.addClass(this.options.size), this.toggleState("visible", this.options.visible)
},
renderDecorate: function() {
this.$el.css({
height: this.options.defaultHeight * 100 + "%"
})
},
teardown: function() {
this._whenAvatarsLoadedDefer && (this._whenAvatarsLoadedDefer.reject(), this._whenAvatarsLoadedDefer = null)
},
removeCommentAvatar: function(a) {
var b = this.$el.find("." + this.avatarClassName + "[data-" + this.commentIdDataAttribute + "=" + a + "]");
b.remove(), this.getComments().length || this.toggle(!1)
},
whenAvatarsLoaded: function() {
var b = this._whenAvatarsLoadedDefer,
c = 0,
d, e;
return b || (b = this._whenAvatarsLoadedDefer = this.addDeferred($.Deferred()), d = this.subviews.filter(function(b) {
return b instanceof(f || (f = a("lib/views/image")))
}), e = d.length, d.length ? d.forEach(function(a) {
var e = a.whenLoaded();
e.done(function() {
++c === d.length && b.resolve()
})
}) : b.resolve()), b
},
toggle: function(a) {
this.toggleState("highlighted", a)
},
getComments: function() {
var a = this.collection.getThreadComments(this.options.timestamp);
return a.slice(0, 1)
},
getTimestamp: function() {
return this.options.timestamp
},
dispose: function() {
this.collection = null
},
getCollectionData: function() {
return []
},
getTemplateData: function() {
return {
options: this.options,
comments: this.getComments(),
current_user: !1,
comment_id_attr: this.commentIdDataAttribute,
upperPartHeightPercent: this.options.upperPartHeight * 100 + "%"
}
}
}), (g || (g = a("lib/views/mixins/timed-comments"))).applyTo(d.prototype, {
noStateMachine: !0,
noCollection: !0
})
};
//@ sourceURL=views/sound/waveform-thread |
#100 JavaScript::Eval (size: 394, repeated: 2) r = function(a, b, c) {
var d, e = a("lib/view");
d = c.exports = e.extend({
template: a("views/sound/scrubber-position.tmpl"),
css: a("views/sound/scrubber-position.css"),
className: "scrubberPosition",
colorCustomizable: !0,
show: function(a) {
this.$$("indicator")[0].style.left = a + "px", this.toggleState("visible", !0)
},
hide: function() {
this.toggleState("visible", !1)
}
})
};
//@ sourceURL=views/sound/scrubber-position |
#101 JavaScript::Eval (size: 845, repeated: 2) r = function(a, b, c) {
var d, e = navigator.userAgent.toLowerCase(),
f = function(a) {
return a.test(e)
};
d = c.exports = {}, d.isOpera = typeof window.opera != "undefined" && window.opera.toString() === "[object Opera]", d.isChrome = f(/chrome/), d.isWebKit = f(/webkit/), d.isSafari = !d.isChrome && f(/safari/), d.isUIWebView = f(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i), d.isIE = !d.isOpera && f(/msie/), d.isIE6 = d.isIE && f(/msie 6/), d.isIE7 = d.isIE && f(/msie 7/), d.isIE8 = d.isIE && f(/msie 8/), d.isIE9 = d.isIE && f(/msie 9/), d.isGecko = !d.isWebKit && f(/gecko/), d.isWindows = f(/windows|win32/), d.isMac = f(/macintosh|mac os x/), d.isLinux = f(/linux/), d.isMobile = f(/mobile|Android|iPhone|iPod|iPad|PlayBook|Skyfire/), d.isAndroid = f(/android/), d.isIEMobile = d.isMobile && d.isIE, d.isSecure = /^https/i.test(window.location.protocol), d.isChrome15 = d.isChrome && f(/chrome\/15/)
};
//@ sourceURL=lib/browser |
#102 JavaScript::Eval (size: 579, repeated: 2) r = function(a, b, c) {
var d;
c.exports = d || (d = a("vendor/underscore")), (d || (d = a("vendor/underscore"))).mixin({
proxy: function(a, b) {
[].slice.call(arguments, 2).forEach(function(c) {
if (typeof a[c] != "function") throw new Error("Proxy source has no method named " + c);
b[c] = a[c].bind(a)
})
},
toAttributesString: function(b) {
var c = [],
e, f;
return (d || (d = a("vendor/underscore"))).each(b, function(b, g) {
e = g + '="', f = [], (d || (d = a("vendor/underscore"))).isObject(b) ? (d || (d = a("vendor/underscore"))).each(b, function(a, b) {
f.push(b + ":" + a)
}) : f.push(b), c.push(e + f.join(";") + '"')
}), c.join(" ")
}
})
};
//@ sourceURL=_ |
#103 JavaScript::Eval (size: 1277, repeated: 2) r = function(a, b, c) {
var d;
d = c.exports = {
initialize: function() {
window.xtnv = document, window.xtsd = "https://logs1252", window.xtsite = "509436", window.xtn2 = "", window.xtpage = "APPLOAD", window.xtdi = "", window.xt_multc = "", window.xt_an = "", window.xt_ac = "", window.xt_xtcpath = "/player/assets/xtcore-21b39252.js", window.xtnopage = "1", window._gaq = [
["_setAccount", "UA-2519404-20"],
["_trackPageview"],
["_gat._anonymizeIp"]
];
var a, b, c;
c = document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0] || document.getElementsByTagName("script")[0].parentNode, window.xt_xtcpath && (window.xtparam = window.xtparam || "", window.xtparam += "&ac=" + xt_ac + "&an=" + xt_an + xt_multc, a = document.createElement("script"), a.async = !0, a.src = xt_xtcpath, c.insertBefore(a, null)), b = document.createElement("script"), b.async = !0, b.src = ("https:" === document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js", c.insertBefore(b, null)
},
trackAudioEvent: function(a, b, c, d, e) {
typeof xt_rm == "function" && xt_rm("audio", a, b, c, "", d, e, "", "", "", "int", "clip", "")
},
trackPageView: function(a, b) {
typeof xt_med == "function" && xt_med("F", a, b)
},
trackClick: function(a, b) {
typeof xt_med == "function" && xt_med("A", a, b)
},
trackTiming: function(a, b, c, d, e) {
_gaq.push(["_trackTiming", a, b, c, d, e])
}
}
};
//@ sourceURL=lib/analytics |
#104 JavaScript::Eval (size: 189, repeated: 2) r = function(a, b, c) {
var d;
d = c.exports = {
plural: function(a, b, c) {
return c = typeof c == "string" ? c : b + "s", a === 1 ? b : c
},
possessive: function(a) {
return a + "s"
}
}
};
//@ sourceURL=lib/helpers/lang-helper |
#105 JavaScript::Eval (size: 552, repeated: 2) r = function(a, b, c) {
var d = /[&<>\"\']/g,
e = function(a) {
return "&#" + a.charCodeAt(0) + ";"
},
f = /(&(lt|gt|quot|apos|amp|#\d+);|.)/gi,
g = {
lt: "<",
gt: ">",
quot: '"',
apos: "'",
amp: "&"
},
h = function(a, b, c) {
return g[c] || (c ? String.fromCharCode(c.substring(1)) : b)
};
c.exports = {
unescapeHTML: function(a) {
return (a || "").replace(f, h)
},
escapeHTML: function(a) {
return (a || "").replace(d, e)
},
supplant: function(a, b, c) {
var d = c ? /<([^<>]*)>/g : /\{([^\{\}]*)\}/g;
return (a || "").replace(d, function(a, c) {
var d = b[c];
return typeof d == "string" || typeof d == "number" ? d : a
})
}
}
};
//@ sourceURL=lib/utils |
#106 JavaScript::Eval (size: 2219, repeated: 2) r = function(a, b, c) {
var d = /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,
e = ["---", "scheme", "authority", "userInfo", "user", "password", "host", "port", "relative", "path", "directory", "file", "query", "fragment"],
f, g, h;
h = c.exports = {
parse: function(a, b) {
var c = d.exec(a),
f, g, i = {};
b || (b = e);
for (f = 1; f < e.length; ++f) {
g = e[f];
if (b.indexOf(g) !== -1) if (c[f] || g === "query") switch (g) {
case "port":
i[g] = parseInt(c[f], 10);
break;
case "path":
i[g] = c[f].split("/").map(decodeURIComponent).join("/");
break;
case "query":
i[g] = h.parseQueryString(c[f]);
break;
default:
i[g] = c[f]
}
}
return i
},
joinPath: function(a) {
return a.filter(Boolean).map(encodeURIComponent).join("/")
},
parseQueryString: function(a) {
var b = {};
return a && a.replace(/([^?=&]+)(?:=([^&]*))?/g, function(a, c, d) {
c = decodeURIComponent(c), d = decodeURIComponent(d || "");
switch (typeof b[c]) {
case "object":
b[c].push(d);
break;
case "undefined":
b[c] = d;
break;
default:
b[c] = [b[c], d]
}
}), b
},
stringify: function(b, c) {
var d = [],
e, i;
return c && (i = h.parse(c), b.query && i.query && ((f || (f = a("_"))).extend(i.query, b.query), delete b.query), b = (f || (f = a("_"))).extend({}, i, b)), b.scheme && d.push(b.scheme + "://"), b.user && (d.push(b.user), b.password && d.push(":" + b.password), d.push("@")), b.host && d.push(b.host), b.port && d.push(":" + b.port), b.path && (typeof b.path == "string" ? d.push(b.path.split("/").map(encodeURIComponent).join("/")) : d.push(h.joinPath(b.path))), e = g(b.query), e && d.push("?" + e), b.fragment && d.push("#" + b.fragment), d.join("")
},
modify: function(b, c) {
var d = h.parse(b);
return (f || (f = a("_"))).isFunction(c) ? d = c.call(null, d) : typeof c == "object" && (c.query && ((f || (f = a("_"))).extend(d.query, c.query), delete c.query), (f || (f = a("_"))).extend(d, c)), h.stringify(d)
},
getQueryParam: function(a) {
return h.parseQueryString(window.location.search)[a]
}
}, g = function(a) {
var b, c, d, e, f, g = [];
if (a) for (b in a) if (a.hasOwnProperty(b)) {
e = a[b];
if (e !== null && e !== f) if (typeof e == "object") {
d = e.length;
for (c = 0; c < d; ++c) g.push(encodeURIComponent(b) + "=" + encodeURIComponent(e[c]).replace(/%2F/g, "/"))
} else g.push(encodeURIComponent(b) + "=" + encodeURIComponent(e).replace(/%2F/g, "/"))
}
return g.join("&")
}
};
//@ sourceURL=lib/url |
#107 JavaScript::Eval (size: 306, repeated: 2) r = function(a, b, c) {
var d = 1e3,
e = 60 * d,
f = 60 * e,
g = c.exports = {
timecode: function(a) {
var b, c;
return isNaN(a) ? a : (b = [], c = {
h: Math.floor(a / f),
m: Math.floor(a / e % 60),
s: Math.floor(a / d % 60)
}, c.h > 0 && b.push(c.h), b.push(c.m < 10 && c.h > 0 ? "0" + c.m : c.m, c.s < 10 ? "0" + c.s : c.s), b.join("."))
}
}
};
//@ sourceURL=lib/helpers/datetime-helper |
#108 JavaScript::Eval (size: 220, repeated: 2) r = function(a, b, c) {
var d = c.exports = [{
route: "/:user"
}, {
route: "/:user/:track"
}, {
route: "/:user/favorites"
}, {
route: "/:user/sets/:set"
}, {
route: "/groups/:group"
}, {
route: "/apps/:app"
}]
};
//@ sourceURL=config/permalink-routes |
#109 JavaScript::Eval (size: 1807, repeated: 2) r = function(a, b, c) {
var d = c.exports = document.createElement("style"),
e = ".artwork{display:block;position:relative;cursor:pointer}.artwork__flipContainer{width:100%;height:100%;position:absolute;left:0}.artwork.flipped .artwork__flipContainer{left:-160px}.artwork .artwork__flipFace{width:100%;height:100%;position:absolute}.artwork__img{display:block;height:100%;width:100%}.artwork__flipIndicator{-webkit-transform:translateZ(1px);position:absolute;bottom:5px;left:5px;display:block;width:14px;height:9px;background:url(/player/assets/images/flip-indicator-e6c9bb3c.png) 0 0 no-repeat;text-indent:-9999px}.artwork .artwork__flipBack{left:160px}.artwork__userAvatar{width:100%}.artwork.transform3d{-webkit-perspective:600;-moz-perspective:600;-o-perspective:600;-ms-perspective:600;perspective:600}.artwork.transform3d .artwork__flipFace{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-o-backface-visibility:hidden;-ms-backface-visibility:hidden;backface-visibility:hidden}.artwork.transform3d.flipped .artwork__flipContainer{left:0;-webkit-transform:translateX(-100%) rotateY(-180deg);-moz-transform:translateX(-100%) rotateY(-180deg);-o-transform:translateX(-100%) rotateY(-180deg);-ms-transform:translateX(-100%) rotateY(-180deg);transform:translateX(-100%) rotateY(-180deg)}.artwork.transform3d .artwork__flipBack{left:0;-webkit-transform:rotateY(180deg) translateZ(1px);-moz-transform:rotateY(180deg) translateZ(1px);-o-transform:rotateY(180deg) translateZ(1px);-ms-transform:rotateY(180deg) translateZ(1px);transform:rotateY(180deg) translateZ(1px)}@media (max-width:100px) and (max-height:100px){.artwork__flipIndicator,.artwork__userStats{display:none}}";
d.styleSheet ? d.styleSheet.cssText = e : d.appendChild(document.createTextNode(e)), e = null
};
//@ sourceURL=views/sound/artwork.css |
#110 JavaScript::Eval (size: 2352, repeated: 2) r = function(a, b, c) {
var d = c.exports = document.createElement("style"),
e = ".image__full,.image{position:relative}.image__placeholder{position:absolute}.image__hasPlaceholder{background-color:#f2f2f2;background-image:url(/player/assets/images/default/cloudx200-72176be9.png);background-position:center center;background-repeat:no-repeat;background-size:100% 100%}.image__hasPlaceholder-20,.image__hasPlaceholder-40{background-image:url(/player/assets/images/default/cloudx40-72176be9.png)}.image__hasPlaceholder-50{background-image:url(/player/assets/images/default/cloudx50-72176be9.png)}.image__hasPlaceholder-80{background-image:url(/player/assets/images/default/cloudx80-72176be9.png)}.image__hasPlaceholder-120{background-image:url(/player/assets/images/default/cloudx120-72176be9.png)}.image__hasPlaceholder-user.image__hasPlaceholder-20,.image__hasPlaceholder-user.image__hasPlaceholder-40{background-image:url(/player/assets/images/default/userx40-72176be9.png)}.image__hasPlaceholder-user.image__hasPlaceholder-50{background-image:url(/player/assets/images/default/userx50-72176be9.png)}.image__hasPlaceholder-user.image__hasPlaceholder-80{background-image:url(/player/assets/images/default/userx80-72176be9.png)}.image__hasPlaceholder-user.image__hasPlaceholder-120{background-image:url(/player/assets/images/default/userx120-72176be9.png)}.image__hasPlaceholder-user,.image__hasPlaceholder-user.image__hasPlaceholder-200{background-image:url(/player/assets/images/default/userx200-72176be9.png)}.image__hasPlaceholder-group.image__hasPlaceholder-20,.image__hasPlaceholder-group.image__hasPlaceholder-40{background-image:url(/player/assets/images/default/groupx40-72176be9.png)}.image__hasPlaceholder-group.image__hasPlaceholder-50{background-image:url(/player/assets/images/default/groupx50-72176be9.png)}.image__hasPlaceholder-group.image__hasPlaceholder-80{background-image:url(/player/assets/images/default/groupx80-72176be9.png)}.image__hasPlaceholder-group.image__hasPlaceholder-120{background-image:url(/player/assets/images/default/groupx120-72176be9.png)}.image__hasPlaceholder-group,.image__hasPlaceholder-group.image__hasPlaceholder-200{background-image:url(/player/assets/images/default/groupx200-72176be9.png)}";
d.styleSheet ? d.styleSheet.cssText = e : d.appendChild(document.createTextNode(e)), e = null
};
//@ sourceURL=lib/views/image.css |
#111 JavaScript::Eval (size: 1729, repeated: 2) r = function(a, b, c) {
var d = c.exports = document.createElement("style"),
e = ".progressBar{position:relative;width:100%;height:100%;overflow:hidden}.playing .progressBar__progressPlay{min-width:1px}.progressBar__upperPart{width:100%;position:absolute;top:0;left:0;background:#575757 url('/player/assets/images/waveform/waveform-upper-72176be9.png') repeat-x;background-size:101% 100%}.progressBar__upperPartBottomLine{background:#111;height:1px;position:absolute;width:100%;bottom:0;left:0}.progressBar__lowerPart{width:100%;position:absolute;left:0;overflow:hidden;background:#969696 url('/player/assets/images/waveform/waveform-lower-72176be9.png') 0 0 repeat-x}.progressBar__progressLoad,.progressBar__progressPlay{height:100%;width:0;position:absolute;top:0}.progressBar__progressPlay{left:0}.progressBar__progressLoad{width:100%;max-width:100%;background-color:#fff;right:0;opacity:0}.playing .progressBar__progressLoad{opacity:.07}.progressBar__upperPart .progressBar__progressPlay{background-color:<MAIN_COLOR>;background-repeat:repeat-x;background-size:101% 100%;border-bottom:1px solid <MAIN_COLOR_DARKER>}.progressBar__lowerPart .progressBar__progressPlay{background-color: <MAIN_COLOR_LIGHTER>}.progressBar.dark .progressBar__upperPart{background:#1b1b1b}.progressBar.dark .progressBar__upperPartBottomLine{background:#131313}.progressBar.dark .progressBar__lowerPart{background:#222}.progressBar.dark .progressBar__upperPart .progressBar__progressPlay{background:#ff4100;border-bottom:1px solid #ed2800}.progressBar.dark .progressBar__lowerPart .progressBar__progressPlay{background:#a82400}";
d.styleSheet ? d.styleSheet.cssText = e : d.appendChild(document.createTextNode(e)), e = null
};
//@ sourceURL=views/sound/progress-bar.css |
#112 JavaScript::Eval (size: 490, repeated: 2) r = function(a, b, c) {
var d = c.exports = document.createElement("style"),
e = ".scrubberPosition{position:relative;width:100%;height:100%;overflow:hidden}.scrubberPosition__indicator{background-color:<MAIN_COLOR_LIGHTER>;width:1px;height:100%;position:absolute;top:0;left:-10px;display:none}.scrubberPosition.visible .scrubberPosition__indicator{display:block}";
d.styleSheet ? d.styleSheet.cssText = e : d.appendChild(document.createTextNode(e)), e = null
};
//@ sourceURL=views/sound/scrubber-position.css |
#113 JavaScript::Eval (size: 292, repeated: 2) r = function(a, b, c) {
var d = c.exports = document.createElement("style"),
e = ".scrubber{position:relative;width:100%;height:100%;overflow:hidden;background:rgba(0,0,0,0)}";
d.styleSheet ? d.styleSheet.cssText = e : d.appendChild(document.createTextNode(e)), e = null
};
//@ sourceURL=views/sound/scrubber.css |
#114 JavaScript::Eval (size: 328, repeated: 2) r = function(a, b, c) {
var d = c.exports = document.createElement("style"),
e = ".soundLike.sc-button-selected,.soundLike.sc-button-selected:hover,.soundLike.sc-button-selected:focus{background-color:<MAIN_COLOR>}";
d.styleSheet ? d.styleSheet.cssText = e : d.appendChild(document.createTextNode(e)), e = null
};
//@ sourceURL=views/sound/like.css |
#115 JavaScript::Eval (size: 1361, repeated: 2) r = function(a, b, c) {
var d = c.exports = document.createElement("style"),
e = ".soundStats{color:#828282;list-style:none;margin:0}.soundStats__item{float:left;margin:0 5px 0 0;padding:0 5px 0 0;font-size:10px;line-height:12px;border-right:1px solid #dcdcdc;cursor:default}.soundStats__item:last-child{border-right:none;margin:0}.soundStats__icon{background-image:url(/player/assets/images/stats-icons-0bde1516.png);background-repeat:no-repeat;text-indent:-9999px;text-decoration:none;float:left;margin:2px 3px 0 0;width:10px;height:10px}.soundStats__favIcon{background-position:-10px -10px}.g-highlighted .soundStats__favIcon,.g-alt-highlighted .soundStats__favIcon{background-position:0 -10px}.soundStats__commentIcon{background-position:-10px 0}.g-highlighted .soundStats__commentIcon,.g-alt-highlighted .soundStats__commentIcon{background-position:0 0}.soundStats__playbackIcon{background-position:-10px -20px}.g-highlighted .soundStats__playbackIcon,.g-alt-highlighted .soundStats__playbackIcon{background-position:0 -20px}.soundStats__svgIcon{position:relative;height:12px;width:12px}.soundStats__svgFavIcon{top:2px;margin-right:2px}.soundStats__svgCommentIcon{top:3px;margin-right:3px}.soundStats__svgPlaybackIcon{top:2px;margin-right:0}";
d.styleSheet ? d.styleSheet.cssText = e : d.appendChild(document.createTextNode(e)), e = null
};
//@ sourceURL=views/sound/stats.css |
#116 JavaScript::Eval (size: 379, repeated: 2) r = function(a, b, c) {
var d = c.exports = document.createElement("style"),
e = ".soundTitle{line-height:12px}.soundTitle__title,.soundTitle__username{font-size:11px;line-height:12px;display:inline-block;width:100%}.soundTitle__title{margin:2px 0;font-weight:700}";
d.styleSheet ? d.styleSheet.cssText = e : d.appendChild(document.createTextNode(e)), e = null
};
//@ sourceURL=views/sound/title.css |
#117 JavaScript::Eval (size: 482, repeated: 2) r = function(a, b, c) {
var d = c.exports = document.createElement("style"),
e = ".sound__actions .sound__purchase,.sound__actions .sound__download{position:absolute;padding:5px 0;font-size:11px;right:0;color:#333;text-decoration:none;outline:none;white-space:nowrap;bottom:0}.sound__actions .sound__purchase:hover,.sound__actions .sound__download:hover{color:#000}";
d.styleSheet ? d.styleSheet.cssText = e : d.appendChild(document.createTextNode(e)), e = null
};
//@ sourceURL=views/sound/actions.css |
#118 JavaScript::Eval (size: 3890, repeated: 2) r = function(a, b, c) {
var d = c.exports = document.createElement("style"),
e = ".sound{position:relative;height:166px;overflow:hidden}.sound__art{position:absolute;top:0;overflow:hidden;display:none;width:165px;height:165px;padding:7px 8px 8px 7px;border-right:1px solid #dcdcdc;-webkit-box-shadow:inset -5px 0 5px -5px rgba(0,0,0,.15);-moz-box-shadow:inset -5px 0 5px -5px rgba(0,0,0,.15);box-shadow:inset -5px 0 5px -5px rgba(0,0,0,.15)}.sound__art.sound__artLeft{left:0}.sound__art.sound__artRight{right:0;width:195px;display:block;-webkit-box-shadow:inset 5px 0 10px -5px rgba(0,0,0,.15);-moz-box-shadow:inset 5px 0 10px -5px rgba(0,0,0,.15);box-shadow:inset 5px 0 10px -5px rgba(0,0,0,.15)}.sound__content{position:absolute;margin:7px;top:0;right:0;bottom:0;left:0}.sound__controls{position:relative;height:48px}.sound__main{position:absolute;top:50px;left:0;right:0;bottom:0}.sound__waveform{height:64px;margin:4px 0 6px;position:relative}.sound__title{padding:9px 0 0}.sound__title .soundTitle{position:absolute;right:130px;left:47px;overflow:hidden}@media (max-width:450px){.sound__title .soundTitle{right:10px}}.sound__sharePanel{position:absolute;right:0;bottom:0;left:0;top:100%;z-index:10;background:#f6f6f6}.sound.shareVisible .sound__sharePanel{top:0}.sound.waveformHighlighted .sound__main{cursor:pointer}.sound.waveformHighlighted .sound__waveform{cursor:pointer;opacity:.7}.sound.adVisible .sound__ad{right:0}.sound.adVisible .sound__content,.sound__content.sound__contentLeft{right:195px}.sound.artVisible .sound__art{display:block}.sound.artVisible .sound__content:not(.sound__contentLeft){left:165px}.sound__lowerPart{position:relative}.sound__comments{position:absolute;top:0;left:0;right:0;background:#f5f5f5;width:100%;height:100%;padding-top:4px;display:none}.sound__meta{position:relative;padding-top:9px;height:12px;overflow:hidden}.sound__permalink{position:absolute;right:0}.sound__actions{position:absolute;top:0;right:3px;bottom:0}@media (max-width:50px) and (max-height:50px){.sound.artVisible .sound__art{display:none}}@media (max-width:100px) and (max-height:100px){.sound.artVisible .sound__art{width:100%;height:100%;border:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.sound__content,.sound.artVisible .sound__content{top:0;left:0;right:0;bottom:0;padding:0}.sound__upperPart{width:100%;height:100%;position:absolute;top:0;left:0}.sound__buttonContainerWrapper{width:34px;height:34px;float:none;margin:-17px 0 0 -17px;left:50%;top:50%}.sound__buttonContainer{margin:0}.sound.artVisible .sound__buttonContainerWrapper{opacity:.95}.sound__upperMainContent,.sound__sharePanel{display:none}.sound__mainContent{visibility:hidden}}@media (min-width:61px) and (max-height:60px){.sound.artVisible .sound__buttons,.sound.artVisible .sound__art,.sound__shareLink,.sound__mainContent,.sound__sharePanel{display:none}.sound.artVisible .sound__content{left:7px}.sound__title{padding-right:7px}}@media (min-width:351px) and (max-width:435px){.sound.artVisible .sound__buttons a{display:none}.sound.artVisible .sound__buttons a:last-child{display:block}}@media (min-width:351px) and (max-width:400px){.sound.artVisible .sound__buttons,.sound.artVisible .commentDetails.buttonsVisible .placeholder__label{display:none}.sound.artVisible .sound__permalink{width:20px;background-position:right 0}}@media (max-width:350px) and (min-height:166px){.sound.artVisible .sound__art{display:none}.sound.artVisible .sound__content:not(.sound__contentLeft){left:7px}.sound.artVisible .sound__sharePanel{left:0}}@media (max-width:250px) and (min-height:166px){.sound__buttons,.sound__shareLink,.commentDetails.buttonsVisible .placeholder__label{display:none}.sound__title{padding-right:0}.sound__permalink{width:20px;background-position:right 0}}";
d.styleSheet ? d.styleSheet.cssText = e : d.appendChild(document.createTextNode(e)), e = null
};
//@ sourceURL=views/sound/sound.css |
#119 JavaScript::Eval (size: 678, repeated: 2) r = function(a, b, c) {
var d = c.exports = document.createElement("style"),
e = ".timeIndicator{position:relative;width:100%;height:100%}.timeIndicator__total,.timeIndicator__current{position:absolute;bottom:0;background:rgba(0,0,0,.9);padding:1px;font-size:10px}.timeIndicator__total{color:#999;border-radius:0 3px 0 0}.timeIndicator__current{color: <MAIN_COLOR_LIGHTER>;display:none;border-radius:3px 3px 3px 3px}.timeIndicator.playing .timeIndicator__total{right:0;border-radius:3px 0 0 0}.timeIndicator.playing .timeIndicator__current{display:block}";
d.styleSheet ? d.styleSheet.cssText = e : d.appendChild(document.createTextNode(e)), e = null
};
//@ sourceURL=views/sound/time-indicator.css |
#120 JavaScript::Eval (size: 1210, repeated: 2) r = function(a, b, c) {
var d = c.exports = document.createElement("style"),
e = ".waveformThread{position:relative;height:100%;width:1px;background:rgba(255,255,255,.1)}.waveformThread__list{bottom:-10px;height:10px;width:10px;position:absolute;display:inline-block;overflow:hidden}.waveformThread.left .waveformThread__list{left:-4px}.waveformThread.right .waveformThread__list{right:-4px}.waveformThread__avatar{height:10px;width:10px;cursor:pointer}.waveformThread.left .waveformThread__avatar{float:left}.waveformThread.right .waveformThread__avatar{float:right}.waveformThread__avatar:not(:first-child){visibility:hidden;opacity:0}.waveformThread.threadVisible .waveformThread__avatar{visibility:visible;opacity:1}.waveformThread.highlighted{background:rgba(255,255,255,.5);z-index:350}.waveformThread.highlighted .waveformThread__list{height:20px;width:20px;bottom:-20px}.waveformThread.left.highlighted .waveformThread__list{left:-9px}.waveformThread.right.highlighted .waveformThread__list{right:-9px}.waveformThread.highlighted .waveformThread__avatar{width:20px;height:20px}";
d.styleSheet ? d.styleSheet.cssText = e : d.appendChild(document.createTextNode(e)), e = null
};
//@ sourceURL=views/sound/waveform-thread.css |
#121 JavaScript::Eval (size: 1398, repeated: 2) r = function(a, b, c) {
var d = c.exports = document.createElement("style"),
e = ".waveform{position:relative;width:100%;height:100%;opacity:0;-webkit-transform:translate3d(0,0,0);z-index:1}.waveform.visible,.waveform.playing:hover{opacity:1}.waveform__layer{position:absolute;top:0;left:0;width:100%;height:100%}.waveform__commentsScrubber{padding-bottom:25px}.waveform__highlight,.waveform.playing:hover .waveform__highlight{background:transparent}.waveform:hover .waveform__highlight{background:rgba(0,0,0,.2)}.waveform__scrubber{cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0)}.waveform.playing .waveform__scrubber{cursor:default}.waveform__emptyWaveform{position:relative}.waveform__emptyMessage{position:absolute;text-align:center;width:100%;bottom:5px;color:#000;font-size:11px;text-shadow:1px 1px 1px #fff}.single .waveform__emptyMessage{font-size:16px}.waveform.empty .waveform__progressBar{opacity:.3}.waveform__playHint{position:absolute;text-align:center;width:100%;bottom:5px;font-size:11px;text-shadow:none;opacity:0}.single .waveform__playHint{font-size:16px;opacity:1;-webkit-animation:g-fadein 500ms linear;-moz-animation:g-fadein 500ms linear;-o-animation:g-fadein 500ms linear;animation:g-fadein 500ms linear}.sound:hover .waveform__playHint{opacity:1}";
d.styleSheet ? d.styleSheet.cssText = e : d.appendChild(document.createTextNode(e)), e = null
};
//@ sourceURL=views/sound/waveform.css |
#122 JavaScript::Eval (size: 408, repeated: 2) r = function(a, b, c) {
var d = c.exports = document.createElement("style"),
e = ".widgetContainer{position:absolute;width:100%;height:100%;overflow:hidden;background:#f5f5f5;border:1px solid #e5e5e5;-webkit-border-radius:2px;-moz-border-radius:2px;-o-border-radius:2px;border-radius:2px}";
d.styleSheet ? d.styleSheet.cssText = e : d.appendChild(document.createTextNode(e)), e = null
};
//@ sourceURL=views/widget-container.css |
#123 JavaScript::Eval (size: 1780, repeated: 2) r = function(a, b, c) {
var d = c.exports = document.createElement("style"),
e = '.playButton{width:44px;line-height:48px;vertical-align:middle;text-align:center;height:100%;float:left;position:relative}.g-button-play,.g-button-pause,.g-button-play:disabled,.g-button-play.g-button-disabled{border-style:solid;display:inline-block;position:relative;width:28px;height:28px;line-height:1;margin:1px 0 1px -4px;padding:0;border-width:0 1px 1px;border-color: <MAIN_COLOR_LIGHTER><MAIN_COLOR><MAIN_COLOR_DARKER>;background-color: <MAIN_COLOR>;border-radius:50%;background-image:-webkit-linear-gradient(top,<MAIN_COLOR_LIGHTER>0%,<MAIN_COLOR>40%,<MAIN_COLOR_DARKER>100%);background-image:-moz-linear-gradient(top,<MAIN_COLOR_LIGHTER>0%,<MAIN_COLOR>40%,<MAIN_COLOR_DARKER>100%);background-image:-o-linear-gradient(top,<MAIN_COLOR_LIGHTER>0%,<MAIN_COLOR>40%,<MAIN_COLOR_DARKER>100%);background-image:linear-gradient(top,<MAIN_COLOR_LIGHTER>0%,<MAIN_COLOR>40%,<MAIN_COLOR_DARKER>100%);box-shadow:0 0 2px <MAIN_COLOR_LIGHTER>,inset 0 -1px 3px <MAIN_COLOR>,0 0 3px rgba(0,0,0,.15),inset 0 1px 0 rgba(102,51,0,.2),inset 0 2px 2px rgba(255,255,255,.25),inset 0 -2px 2px rgba(255,255,255,.2);text-shadow:none;text-indent:30px;overflow:hidden}.g-button-play:disabled,.g-button-play.g-button-disabled:disabled{opacity:.4}.g-button-play:before,.g-button-pause:before{display:block;position:absolute;width:20px;height:20px;top:4px;left:3px;content:"";background-repeat:no-repeat}.g-button-play:before{background-image:url(/player/assets/images/buttons/play-20x20-02267557.png)}.g-button-pause:before{background-image:url(/player/assets/images/buttons/pause-20x20-02267557.png)}';
d.styleSheet ? d.styleSheet.cssText = e : d.appendChild(document.createTextNode(e)), e = null
};
//@ sourceURL=views/sound/play-button.css |
#124 JavaScript::Eval (size: 1010, repeated: 2) r = function(a, b, c) {
var d = c.exports = document.createElement("style"),
e = '.waveformComments{position:relative;height:100%;width:100%;cursor:pointer;opacity:0}.waveformComments.visible{opacity:1}.waveformComments__pointer{position:absolute;left:50%;top:70%;width:1px;bottom:-8px;display:none;background:#dedede}.waveformComments__pointer:after{content:"";display:block;position:absolute;bottom:-5px;left:-7px;width:14px;height:14px;background:url(/player/assets/images/plus-small-72176be9.png) no-repeat 0 0}.waveformComments__pointer.large:after{bottom:-8px;left:-7px;width:15px;height:15px;background:url(/player/assets/images/plus-72176be9.png) no-repeat 0 0}.waveformComments.visiblePointer .waveformComments__pointer{display:block}.waveformComments__threads{width:100%;height:100%;position:relative}.waveformComments__thread{position:absolute;height:100%;top:0;width:1px}';
d.styleSheet ? d.styleSheet.cssText = e : d.appendChild(document.createTextNode(e)), e = null
};
//@ sourceURL=views/sound/waveform-comments.css |
#125 JavaScript::Eval (size: 241, repeated: 2) r = function(a, b, c) {
var d = c.exports = function(a) {
this.data = a, this.defer = $.Deferred()
};
d.prototype = {
constructor: d,
defer: null,
done: function(a) {
this.defer.done(a)
},
resolve: function(a) {
this.defer.resolve(a)
}
}
};
//@ sourceURL=lib/web-worker-task |
#126 JavaScript::Eval (size: 1272, repeated: 2) r = function(a, b, c) {
var d = c.exports = {
Artwork: {
CLICKED: "clicked.artwork"
},
Audible: {
PLAY: "onPlay",
PAUSE: "onPause",
FINISH: "onFinish",
TIME: "onTime",
PROGRESS_10: "audioProgress10",
PROGRESS_95: "audioProgress95",
BLOCKED: "onBlocked"
},
Commenting: {
POSTED: "commentPosted.comment-details",
FOCUSED: "inputFocused.comment-details",
SUBMIT: "formSubmit.comment-details"
},
Details: {
UPLOADER: "uploaderClicked.setDetails",
ARTWORK: "artworkClicked.setDetails"
},
Scrubber: {
SEEKED: "scrubber.seeked"
},
SetHeader: {
CLICKED: "headerClicked.multi-tracks"
},
SharePanel: {
OPENED: "opened.sharePanel",
LINK_BUTTON: "linkButtonClicked.sharePanel",
LINK_INPUT: "linkInputClicked.sharePanel",
EMBED_CODE_BUTTON: "embedCodeButtonClicked.sharePanel",
EMBED_CODE_INPUT: "embedCodeInputClicked.sharePanel",
SHARE_BUTTON: "shareButtonClicked.sharePanel",
SHARE_ICON: "shareIconClicked.sharePanel",
EMAIL_BUTTON: "emailButtonClicked.sharePanel"
},
SoundsList: {
SCROLL_STARTED: "scrollStarted.tracklist",
EXTRA_FETCH: "extraFetch.tracklist"
},
Title: {
TITLE: "titleClicked.trackTitle",
UPLOADER: "uploaderClicked.trackTitle"
},
Track: {
LIKE_BUTTON: "likeButtonClicked.player",
SHARE_PANEL: "sharePanelOpened.player",
DOWNLOAD: "downloadButtonClicked.player",
BUY: "buyButtonClicked.player",
SCRUBBER: "scrubberClicked.player"
}
}
};
//@ sourceURL=tracking-events |
#127 JavaScript::Eval (size: 271, repeated: 2) r = function(a, b, c) {
var d = c.exports = {
auto_advance: !0,
auto_play: !1,
buying: !0,
liking: !0,
download: !0,
sharing: !0,
show_artwork: !0,
show_comments: !0,
show_playcount: !0,
show_user: !0,
start_track: 0,
secret_token: "",
single_active: !0,
tracking: ""
}
};
//@ sourceURL=config/widget-params |
#128 JavaScript::Eval (size: 132, repeated: 2) r = function(a, b, c) {
var d = c.exports = {
precise: function(a, b) {
return b = Math.pow(10, b || 0), Math.round(a * b) / b
}
}
};
//@ sourceURL=lib/math |
#129 JavaScript::Eval (size: 169, repeated: 2) r = function(a, b, c) {
var d = c.exports = {
use_rtmp_stream: {
rolloutId: "use_rtmp_stream",
groups: [{
value: !1,
ratio: 50
}, {
value: !0,
ratio: 50
}]
}
}
};
//@ sourceURL=config/experiments |
#130 JavaScript::Eval (size: 2992, repeated: 2) r = function(a, b, c) {
var d = {};
c.exports = d, d.VERSION = "1.0.beta.5", d.helpers = {}, d.partials = {}, d.registerHelper = function(a, b, c) {
c && (b.not = c), this.helpers[a] = b
}, d.registerPartial = function(a, b) {
this.partials[a] = b
}, d.registerHelper("helperMissing", function(a) {
if (arguments.length === 2) return undefined;
throw new Error("Could not find property '" + a + "'")
});
var e = Object.prototype.toString,
f = "[object Function]";
d.registerHelper("blockHelperMissing", function(a, b) {
var c = b.inverse ||
function() {}, d = b.fn, g = "", h = e.call(a);
h === f && (a = a.call(this));
if (a === !0) return d(this);
if (a === !1 || a == null) return c(this);
if (h === "[object Array]") {
if (a.length > 0) for (var i = 0, j = a.length; i < j; i++) g += d(a[i]);
else g = c(this);
return g
}
return d(a)
}), d.registerHelper("each", function(a, b) {
var c = b.fn,
d = b.inverse,
e = "";
if (a && a.length > 0) for (var f = 0, g = a.length; f < g; f++) e += c(a[f]);
else e = d(this);
return e
}), d.registerHelper("if", function(a, b) {
var c = e.call(a);
return c === f && (a = a.call(this)), !a || d.Utils.isEmpty(a) ? b.inverse(this) : b.fn(this)
}), d.registerHelper("unless", function(a, b) {
var c = b.fn,
e = b.inverse;
return b.fn = e, b.inverse = c, d.helpers["if"].call(this, a, b)
}), d.registerHelper("with", function(a, b) {
return b.fn(a)
}), d.registerHelper("log", function(a) {
d.log(a)
}), d.Exception = function(a) {
var b = Error.prototype.constructor.apply(this, arguments);
for (var c in b) b.hasOwnProperty(c) && (this[c] = b[c]);
this.message = b.message
}, d.Exception.prototype = new Error, d.SafeString = function(a) {
this.string = a
}, d.SafeString.prototype.toString = function() {
return this.string.toString()
}, function() {
var a = {
"<": "<",
">": ">",
'"': """,
"'": "'",
"`": "`"
},
b = /&(?!\w+;)|[<>"'`]/g,
c = /[&<>"'`]/,
e = function(b) {
return a[b] || "&"
};
d.Utils = {
escapeExpression: function(a) {
return a instanceof d.SafeString ? a.toString() : a == null || a === !1 ? "" : c.test(a) ? a.replace(b, e) : a
},
isEmpty: function(a) {
return typeof a == "undefined" ? !0 : a === null ? !0 : a === !1 ? !0 : Object.prototype.toString.call(a) === "[object Array]" && a.length === 0 ? !0 : !1
}
}
}(), d.VM = {
template: function(a) {
var b = {
escapeExpression: d.Utils.escapeExpression,
invokePartial: d.VM.invokePartial,
programs: [],
program: function(a, b, c) {
var e = this.programs[a];
return c ? d.VM.program(b, c) : e ? e : (e = this.programs[a] = d.VM.program(b), e)
},
programWithDepth: d.VM.programWithDepth,
noop: d.VM.noop
};
return function(c, e) {
return e = e || {}, a.call(b, d, c, e.helpers, e.partials, e.data)
}
},
programWithDepth: function(a, b, c) {
var d = Array.prototype.slice.call(arguments, 2);
return function(c, e) {
return e = e || {}, a.apply(this, [c, e.data || b].concat(d))
}
},
program: function(a, b) {
return function(c, d) {
return d = d || {}, a(c, d.data || b)
}
},
noop: function() {
return ""
},
invokePartial: function(a, b, c, e, f, g) {
var h = {
helpers: e,
partials: f,
data: g
};
if (a === undefined) throw new d.Exception("The partial " + b + " could not be found");
if (a instanceof Function) return a(c, h);
if (!d.compile) throw new d.Exception("The partial " + b + " could not be compiled when running in runtime-only mode");
return f[b] = d.compile(a), f[b](c, h)
}
}, d.template = d.VM.template
};
//@ sourceURL=vendor/handlebars-runtime |
#131 JavaScript::Eval (size: 59826, repeated: 1) var mejs = mejs || {};
mejs.version = "2.9.1";
mejs.meIndex = 0;
mejs.plugins = {
silverlight: [{
version: [3, 0],
types: "video/mp4 video/m4v video/mov video/wmv audio/wma audio/m4a audio/mp3 audio/wav audio/mpeg".split(" ")
}],
flash: [{
version: [9, 0, 124],
types: "video/mp4 video/m4v video/mov video/flv video/x-flv audio/flv audio/x-flv audio/mp3 audio/m4a audio/mpeg video/youtube video/x-youtube".split(" ")
}],
youtube: [{
version: null,
types: ["video/youtube", "video/x-youtube"]
}],
vimeo: [{
version: null,
types: ["video/vimeo"]
}]
};
mejs.Utility = {
encodeUrl: function(b) {
return encodeURIComponent(b)
},
escapeHTML: function(b) {
return b.toString().split("&").join("&").split("<").join("<").split('"').join(""")
},
absolutizeUrl: function(b) {
var a = document.createElement("div");
a.innerHTML = '<a href="' + this.escapeHTML(b) + '">x</a>';
return a.firstChild.href
},
getScriptPath: function(b) {
for (var a = 0, c, d = "", e = "", f, g = document.getElementsByTagName("script"), j = g.length, h = b.length; a < j; a++) {
f = g[a].src;
for (c = 0; c < h; c++) if (e = b[c], -1 < f.indexOf(e)) {
d = f.substring(0, f.indexOf(e));
break
}
if ("" !== d) break
}
return d
},
secondsToTimeCode: function(b, a, c, d) {
"undefined" == typeof c ? c = !1 : "undefined" == typeof d && (d = 25);
var e = Math.floor(b / 3600) % 24,
f = Math.floor(b / 60) % 60,
g = Math.floor(b % 60),
b = Math.floor((b % 1 * d).toFixed(3));
return (a || 0 < e ? (10 > e ? "0" + e : e) + ":" : "") + (10 > f ? "0" + f : f) + ":" + (10 > g ? "0" + g : g) + (c ? ":" + (10 > b ? "0" + b : b) : "")
},
timeCodeToSeconds: function(b, a, c, d) {
"undefined" == typeof c ? c = !1 : "undefined" == typeof d && (d = 25);
var b = b.split(":"),
a = parseInt(b[0], 10),
e = parseInt(b[1], 10),
f = parseInt(b[2], 10),
g = 0;
c && (g = parseInt(b[3]) / d);
return 3600 * a + 60 * e + f + g
},
removeSwf: function(b) {
var a = document.getElementById(b);
a && "OBJECT" == a.nodeName && (mejs.MediaFeatures.isIE ? (a.style.display = "none", function() {
4 == a.readyState ? mejs.Utility.removeObjectInIE(b) : setTimeout(arguments.callee, 10)
}()) : a.parentNode.removeChild(a))
},
removeObjectInIE: function(b) {
if (b = document.getElementById(b)) {
for (var a in b)"function" == typeof b[a] && (b[a] = null);
b.parentNode.removeChild(b)
}
}
};
mejs.PluginDetector = {
hasPluginVersion: function(b, a) {
var c = this.plugins[b];
a[1] = a[1] || 0;
a[2] = a[2] || 0;
return c[0] > a[0] || c[0] == a[0] && c[1] > a[1] || c[0] == a[0] && c[1] == a[1] && c[2] >= a[2] ? !0 : !1
},
nav: window.navigator,
ua: window.navigator.userAgent.toLowerCase(),
plugins: [],
addPlugin: function(b, a, c, d, e) {
this.plugins[b] = this.detectPlugin(a, c, d, e)
},
detectPlugin: function(b, a, c, d) {
var e = [0, 0, 0],
f;
if ("undefined" != typeof this.nav.plugins && "object" == typeof this.nav.plugins[b]) {
if ((c = this.nav.plugins[b].description) && !("undefined" != typeof this.nav.mimeTypes && this.nav.mimeTypes[a] && !this.nav.mimeTypes[a].enabledPlugin)) {
e = c.replace(b, "").replace(/^\s+/, "").replace(/\sr/gi, ".").split(".");
for (b = 0; b < e.length; b++) e[b] = parseInt(e[b].match(/\d+/), 10)
}
} else if ("undefined" != typeof window.ActiveXObject) try {
(f = new ActiveXObject(c)) && (e = d(f))
} catch (g) {}
return e
}
};
mejs.PluginDetector.addPlugin("flash", "Shockwave Flash", "application/x-shockwave-flash", "ShockwaveFlash.ShockwaveFlash", function(b) {
var a = [];
if (b = b.GetVariable("$version")) b = b.split(" ")[1].split(","), a = [parseInt(b[0], 10), parseInt(b[1], 10), parseInt(b[2], 10)];
return a
});
mejs.PluginDetector.addPlugin("silverlight", "Silverlight Plug-In", "application/x-silverlight-2", "AgControl.AgControl", function(b) {
var a = [0, 0, 0, 0],
c = function(a, b, c, g) {
for (; a.isVersionSupported(b[0] + "." + b[1] + "." + b[2] + "." + b[3]);) b[c] += g;
b[c] -= g
};
c(b, a, 0, 1);
c(b, a, 1, 1);
c(b, a, 2, 1E4);
c(b, a, 2, 1E3);
c(b, a, 2, 100);
c(b, a, 2, 10);
c(b, a, 2, 1);
c(b, a, 3, 1);
return a
});
mejs.MediaFeatures = {
init: function() {
var b = this,
a = document,
c = mejs.PluginDetector.nav,
d = mejs.PluginDetector.ua.toLowerCase(),
e, f = ["source", "track", "audio", "video"];
b.isiPad = null !== d.match(/ipad/i);
b.isiPhone = null !== d.match(/iphone/i);
b.isiOS = b.isiPhone || b.isiPad;
b.isAndroid = null !== d.match(/android/i);
b.isBustedAndroid = null !== d.match(/android 2\.[12]/);
b.isIE = -1 != c.appName.toLowerCase().indexOf("microsoft");
b.isChrome = null !== d.match(/chrome/gi);
b.isFirefox = null !== d.match(/firefox/gi);
b.isWebkit = null !== d.match(/webkit/gi);
b.isGecko = null !== d.match(/gecko/gi) && !b.isWebkit;
b.isOpera = null !== d.match(/opera/gi);
b.hasTouch = "ontouchstart" in window;
for (c = 0; c < f.length; c++) e = document.createElement(f[c]);
b.supportsMediaTag = "undefined" !== typeof e.canPlayType || b.isBustedAndroid;
b.hasSemiNativeFullScreen = "undefined" !== typeof e.webkitEnterFullscreen;
b.hasWebkitNativeFullScreen = "undefined" !== typeof e.webkitRequestFullScreen;
b.hasMozNativeFullScreen = "undefined" !== typeof e.mozRequestFullScreen;
b.hasTrueNativeFullScreen = b.hasWebkitNativeFullScreen || b.hasMozNativeFullScreen;
b.nativeFullScreenEnabled = b.hasTrueNativeFullScreen;
b.hasMozNativeFullScreen && (b.nativeFullScreenEnabled = e.mozFullScreenEnabled);
this.isChrome && (b.hasSemiNativeFullScreen = !1);
b.hasTrueNativeFullScreen && (b.fullScreenEventName = b.hasWebkitNativeFullScreen ? "webkitfullscreenchange" : "mozfullscreenchange", b.isFullScreen = function() {
if (e.mozRequestFullScreen) return a.mozFullScreen;
if (e.webkitRequestFullScreen) return a.webkitIsFullScreen
}, b.requestFullScreen = function(a) {
b.hasWebkitNativeFullScreen ? a.webkitRequestFullScreen() : b.hasMozNativeFullScreen && a.mozRequestFullScreen()
}, b.cancelFullScreen = function() {
b.hasWebkitNativeFullScreen ? document.webkitCancelFullScreen() : b.hasMozNativeFullScreen && document.mozCancelFullScreen()
});
b.hasSemiNativeFullScreen && d.match(/mac os x 10_5/i) && (b.hasNativeFullScreen = !1, b.hasSemiNativeFullScreen = !1)
}
};
mejs.MediaFeatures.init();
mejs.HtmlMediaElement = {
pluginType: "native",
isFullScreen: !1,
setCurrentTime: function(b) {
this.currentTime = b
},
setMuted: function(b) {
this.muted = b
},
setVolume: function(b) {
this.volume = b
},
stop: function() {
this.pause()
},
setSrc: function(b) {
for (var a = this.getElementsByTagName("source"); 0 < a.length;) this.removeChild(a[0]);
if ("string" == typeof b) this.src = b;
else for (var c, a = 0; a < b.length; a++) c = b[a], this.canPlayType(c.type) && (this.src = c.src)
},
setVideoSize: function(b, a) {
this.width = b;
this.height = a
}
};
mejs.PluginMediaElement = function(b, a, c) {
this.id = b;
this.pluginType = a;
this.src = c;
this.events = {}
};
mejs.PluginMediaElement.prototype = {
pluginElement: null,
pluginType: "",
isFullScreen: !1,
playbackRate: -1,
defaultPlaybackRate: -1,
seekable: [],
played: [],
paused: !0,
ended: !1,
seeking: !1,
duration: 0,
error: null,
tagName: "",
muted: !1,
volume: 1,
currentTime: 0,
play: function() {
null != this.pluginApi && ("youtube" == this.pluginType ? this.pluginApi.playVideo() : this.pluginApi.playMedia(), this.paused = !1)
},
load: function() {
null != this.pluginApi && ("youtube" != this.pluginType && this.pluginApi.loadMedia(), this.paused = !1)
},
pause: function() {
null != this.pluginApi && ("youtube" == this.pluginType ? this.pluginApi.pauseVideo() : this.pluginApi.pauseMedia(), this.paused = !0)
},
stop: function() {
null != this.pluginApi && ("youtube" == this.pluginType ? this.pluginApi.stopVideo() : this.pluginApi.stopMedia(), this.paused = !0)
},
canPlayType: function(b) {
var a, c, d, e = mejs.plugins[this.pluginType];
for (a = 0; a < e.length; a++) if (d = e[a], mejs.PluginDetector.hasPluginVersion(this.pluginType, d.version)) for (c = 0; c < d.types.length; c++) if (b == d.types[c]) return !0;
return !1
},
positionFullscreenButton: function(b, a, c) {
null != this.pluginApi && this.pluginApi.positionFullscreenButton && this.pluginApi.positionFullscreenButton(b, a, c)
},
hideFullscreenButton: function() {
null != this.pluginApi && this.pluginApi.hideFullscreenButton && this.pluginApi.hideFullscreenButton()
},
setSrc: function(b) {
if ("string" == typeof b) this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(b)), this.src = mejs.Utility.absolutizeUrl(b);
else {
var a, c;
for (a = 0; a < b.length; a++) c = b[a], this.canPlayType(c.type) && (this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(c.src)), this.src = mejs.Utility.absolutizeUrl(b))
}
},
setCurrentTime: function(b) {
null != this.pluginApi && ("youtube" == this.pluginType ? this.pluginApi.seekTo(b) : this.pluginApi.setCurrentTime(b), this.currentTime = b)
},
setVolume: function(b) {
null != this.pluginApi && ("youtube" == this.pluginType ? this.pluginApi.setVolume(100 * b) : this.pluginApi.setVolume(b), this.volume = b)
},
setMuted: function(b) {
null != this.pluginApi && ("youtube" == this.pluginType ? (b ? this.pluginApi.mute() : this.pluginApi.unMute(), this.muted = b, this.dispatchEvent("volumechange")) : this.pluginApi.setMuted(b), this.muted = b)
},
setVideoSize: function(b, a) {
this.pluginElement.style && (this.pluginElement.style.width = b + "px", this.pluginElement.style.height = a + "px");
null != this.pluginApi && this.pluginApi.setVideoSize && this.pluginApi.setVideoSize(b, a)
},
setFullscreen: function(b) {
null != this.pluginApi && this.pluginApi.setFullscreen && this.pluginApi.setFullscreen(b)
},
enterFullScreen: function() {
null != this.pluginApi && this.pluginApi.setFullscreen && this.setFullscreen(!0)
},
exitFullScreen: function() {
null != this.pluginApi && this.pluginApi.setFullscreen && this.setFullscreen(!1)
},
addEventListener: function(b, a) {
this.events[b] = this.events[b] || [];
this.events[b].push(a)
},
removeEventListener: function(b, a) {
if (!b) return this.events = {}, !0;
var c = this.events[b];
if (!c) return !0;
if (!a) return this.events[b] = [], !0;
for (i = 0; i < c.length; i++) if (c[i] === a) return this.events[b].splice(i, 1), !0;
return !1
},
dispatchEvent: function(b) {
var a, c, d = this.events[b];
if (d) {
c = Array.prototype.slice.call(arguments, 1);
for (a = 0; a < d.length; a++) d[a].apply(null, c)
}
},
attributes: {},
hasAttribute: function(b) {
return b in this.attributes
},
removeAttribute: function(b) {
delete this.attributes[b]
},
getAttribute: function(b) {
return this.hasAttribute(b) ? this.attributes[b] : ""
},
setAttribute: function(b, a) {
this.attributes[b] = a
},
remove: function() {
mejs.Utility.removeSwf(this.pluginElement.id)
}
};
mejs.MediaPluginBridge = {
pluginMediaElements: {},
htmlMediaElements: {},
registerPluginElement: function(b, a, c) {
this.pluginMediaElements[b] = a;
this.htmlMediaElements[b] = c
},
initPlugin: function(b) {
var a = this.pluginMediaElements[b],
c = this.htmlMediaElements[b];
if (a) {
switch (a.pluginType) {
case "flash":
a.pluginElement = a.pluginApi = document.getElementById(b);
break;
case "silverlight":
a.pluginElement = document.getElementById(a.id), a.pluginApi = a.pluginElement.Content.MediaElementJS
}
null != a.pluginApi && a.success && a.success(a, c)
}
},
fireEvent: function(b, a, c) {
var d, e, b = this.pluginMediaElements[b];
b.ended = !1;
b.paused = !0;
a = {
type: a,
target: b
};
for (d in c) b[d] = c[d], a[d] = c[d];
e = c.bufferedTime || 0;
a.target.buffered = a.buffered = {
start: function() {
return 0
},
end: function() {
return e
},
length: 1
};
b.dispatchEvent(a.type, a)
}
};
mejs.MediaElementDefaults = {
mode: "auto",
plugins: ["flash", "silverlight", "youtube", "vimeo"],
enablePluginDebug: !1,
type: "",
pluginPath: mejs.Utility.getScriptPath(["mediaelement.js", "mediaelement.min.js", "mediaelement-and-player.js", "mediaelement-and-player.min.js"]),
flashName: "flashmediaelement.swf",
enablePluginSmoothing: !1,
silverlightName: "silverlightmediaelement.xap",
defaultVideoWidth: 480,
defaultVideoHeight: 270,
pluginWidth: -1,
pluginHeight: -1,
pluginVars: [],
timerRate: 250,
startVolume: 0.8,
success: function() {},
error: function() {}
};
mejs.MediaElement = function(b, a) {
return mejs.HtmlMediaElementShim.create(b, a)
};
mejs.HtmlMediaElementShim = {
create: function(b, a) {
var c = mejs.MediaElementDefaults,
d = "string" == typeof b ? document.getElementById(b) : b,
e = d.tagName.toLowerCase(),
f = "audio" === e || "video" === e,
g = f ? d.getAttribute("src") : d.getAttribute("href"),
e = d.getAttribute("poster"),
j = d.getAttribute("autoplay"),
h = d.getAttribute("preload"),
l = d.getAttribute("controls"),
k;
for (k in a) c[k] = a[k];
e = "undefined" == typeof e || null === e ? "" : e;
h = "undefined" == typeof h || null === h || "false" === h ? "none" : h;
j = !("undefined" == typeof j || null === j || "false" === j);
l = !("undefined" == typeof l || null === l || "false" === l);
k = this.determinePlayback(d, c, mejs.MediaFeatures.supportsMediaTag, f, "undefined" == typeof g || null === g || "" == g ? null : g);
k.url = null !== k.url ? mejs.Utility.absolutizeUrl(k.url) : "";
if ("native" == k.method) return mejs.MediaFeatures.isBustedAndroid && (d.src = k.url, d.addEventListener("click", function() {
d.play()
}, !1)), this.updateNative(k, c, j, h);
if ("" !== k.method) return this.createPlugin(k, c, e, j, h, l);
this.createErrorMessage(k, c, e);
return this
},
determinePlayback: function(b, a, c, d, e) {
var f = [],
g, j, h = {
method: "",
url: "",
htmlMediaElement: b,
isVideo: "audio" != b.tagName.toLowerCase()
},
l, k;
if ("undefined" != typeof a.type && "" !== a.type) if ("string" == typeof a.type) f.push({
type: a.type,
url: e
});
else for (g = 0; g < a.type.length; g++) f.push({
type: a.type[g],
url: e
});
else if (null !== e) j = this.formatType(e, b.getAttribute("type")), f.push({
type: j,
url: e
});
else for (g = 0; g < b.childNodes.length; g++) j = b.childNodes[g], 1 == j.nodeType && "source" == j.tagName.toLowerCase() && (e = j.getAttribute("src"), j = this.formatType(e, j.getAttribute("type")), f.push({
type: j,
url: e
}));
!d && (0 < f.length && null !== f[0].url && -1 < this.getTypeFromFile(f[0].url).indexOf("audio")) && (h.isVideo = !1);
mejs.MediaFeatures.isBustedAndroid && (b.canPlayType = function(a) {
return a.match(/video\/(mp4|m4v)/gi) !== null ? "maybe" : ""
});
if (c && ("auto" === a.mode || "auto_plugin" === a.mode || "native" === a.mode)) {
d || (g = document.createElement(h.isVideo ? "video" : "audio"), b.parentNode.insertBefore(g, b), b.style.display = "none", h.htmlMediaElement = b = g);
for (g = 0; g < f.length; g++) if ("" !== b.canPlayType(f[g].type).replace(/no/, "") || "" !== b.canPlayType(f[g].type.replace(/mp3/, "mpeg")).replace(/no/, "")) {
h.method = "native";
h.url = f[g].url;
break
}
if ("native" === h.method && (null !== h.url && (b.src = h.url), "auto_plugin" !== a.mode)) return h
}
if ("auto" === a.mode || "auto_plugin" === a.mode || "shim" === a.mode) for (g = 0; g < f.length; g++) {
j = f[g].type;
for (b = 0; b < a.plugins.length; b++) {
e = a.plugins[b];
l = mejs.plugins[e];
for (c = 0; c < l.length; c++) if (k = l[c], null == k.version || mejs.PluginDetector.hasPluginVersion(e, k.version)) for (d = 0; d < k.types.length; d++) if (j == k.types[d]) return h.method = e, h.url = f[g].url, h
}
}
if ("auto_plugin" === a.mode && "native" === h.method) return h;
"" === h.method && 0 < f.length && (h.url = f[0].url);
return h
},
formatType: function(b, a) {
return b && !a ? this.getTypeFromFile(b) : a && ~a.indexOf(";") ? a.substr(0, a.indexOf(";")) : a
},
getTypeFromFile: function(b) {
b = b.substring(b.lastIndexOf(".") + 1);
return (/(mp4|m4v|ogg|ogv|webm|webmv|flv|wmv|mpeg|mov)/gi.test(b) ? "video" : "audio") + "/" + this.getTypeFromExtension(b)
},
getTypeFromExtension: function(b) {
var a = b;
jQuery.each({
mp4: ["mp4", "m4v"],
ogg: ["ogg", "ogv", "oga"],
webm: ["webm", "webmv", "webma"]
}, function(c, d) {
-1 < d.indexOf(b) && (a = c)
});
return a
},
createErrorMessage: function(b, a, c) {
var d = b.htmlMediaElement,
e = document.createElement("div");
e.className = "me-cannotplay";
try {
e.style.width = d.width + "px", e.style.height = d.height + "px"
} catch (f) {}
e.innerHTML = "" !== c ? '<a href="' + b.url + '"><img src="' + c + '" width="100%" height="100%" /></a>' : '<a href="' + b.url + '"><span>Download File</span></a>';
d.parentNode.insertBefore(e, d);
d.style.display = "none";
a.error(d)
},
createPlugin: function(b, a, c, d, e, f) {
var c = b.htmlMediaElement,
g = 1,
j = 1,
h = "me_" + b.method + "_" + mejs.meIndex++,
l = new mejs.PluginMediaElement(h, b.method, b.url),
k = document.createElement("div"),
m;
l.tagName = c.tagName;
for (m = 0; m < c.attributes.length; m++) {
var n = c.attributes[m];
!0 == n.specified && l.setAttribute(n.name, n.value)
}
for (m = c.parentNode; null !== m && "body" != m.tagName.toLowerCase();) {
if ("p" == m.parentNode.tagName.toLowerCase()) {
m.parentNode.parentNode.insertBefore(m, m.parentNode);
break
}
m = m.parentNode
}
b.isVideo ? (g = 0 < a.videoWidth ? a.videoWidth : null !== c.getAttribute("width") ? c.getAttribute("width") : a.defaultVideoWidth, j = 0 < a.videoHeight ? a.videoHeight : null !== c.getAttribute("height") ? c.getAttribute("height") : a.defaultVideoHeight, g = mejs.Utility.encodeUrl(g), j = mejs.Utility.encodeUrl(j)) : a.enablePluginDebug && (g = 320, j = 240);
l.success = a.success;
mejs.MediaPluginBridge.registerPluginElement(h, l, c);
k.className = "me-plugin";
k.id = h + "_container";
b.isVideo ? c.parentNode.insertBefore(k, c) : document.body.insertBefore(k, document.body.childNodes[0]);
d = ["id=" + h, "isvideo=" + (b.isVideo ? "true" : "false"), "autoplay=" + (d ? "true" : "false"), "preload=" + e, "width=" + g, "startvolume=" + a.startVolume, "timerrate=" + a.timerRate, "height=" + j];
null !== b.url && ("flash" == b.method ? d.push("file=" + mejs.Utility.encodeUrl(b.url)) : d.push("file=" + b.url));
a.enablePluginDebug && d.push("debug=true");
a.enablePluginSmoothing && d.push("smoothing=true");
f && d.push("controls=true");
a.pluginVars && (d = d.concat(a.pluginVars));
switch (b.method) {
case "silverlight":
k.innerHTML = '<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" id="' + h + '" name="' + h + '" width="' + g + '" height="' + j + '"><param name="initParams" value="' + d.join(",") + '" /><param name="windowless" value="true" /><param name="background" value="black" /><param name="minRuntimeVersion" value="3.0.0.0" /><param name="autoUpgrade" value="true" /><param name="source" value="' + a.pluginPath + a.silverlightName + '" /></object>';
break;
case "flash":
mejs.MediaFeatures.isIE ? (b = document.createElement("div"), k.appendChild(b), b.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="' + h + '" width="' + g + '" height="' + j + '"><param name="movie" value="' + a.pluginPath + a.flashName + "?x=" + new Date + '" /><param name="flashvars" value="' + d.join("&") + '" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /></object>') : k.innerHTML = '<embed id="' + h + '" name="' + h + '" play="true" loop="false" quality="high" bgcolor="#000000" wmode="transparent" allowScriptAccess="always" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="//www.macromedia.com/go/getflashplayer" src="' + a.pluginPath + a.flashName + '" flashvars="' + d.join("&") + '" width="' + g + '" height="' + j + '"></embed>';
break;
case "youtube":
a = b.url.substr(b.url.lastIndexOf("=") + 1);
youtubeSettings = {
container: k,
containerId: k.id,
pluginMediaElement: l,
pluginId: h,
videoId: a,
height: j,
width: g
};
mejs.PluginDetector.hasPluginVersion("flash", [10, 0, 0]) ? mejs.YouTubeApi.createFlash(youtubeSettings) : mejs.YouTubeApi.enqueueIframe(youtubeSettings);
break;
case "vimeo":
l.vimeoid = b.url.substr(b.url.lastIndexOf("/") + 1), k.innerHTML = '<object width="' + g + '" height="' + j + '"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="flashvars" value="api=1" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=' + l.vimeoid + '&server=vimeo.com&show_title=0&show_byline=0&show_portrait=0&color=00adef&fullscreen=1&autoplay=0&loop=0" /><embed src="//vimeo.com/moogaloop.swf?api=1&clip_id=' + l.vimeoid + '&server=vimeo.com&show_title=0&show_byline=0&show_portrait=0&color=00adef&fullscreen=1&autoplay=0&loop=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="' + g + '" height="' + j + '"></embed></object>'
}
c.style.display = "none";
return l
},
updateNative: function(b, a) {
var c = b.htmlMediaElement,
d;
for (d in mejs.HtmlMediaElement) c[d] = mejs.HtmlMediaElement[d];
a.success(c, c);
return c
}
};
mejs.YouTubeApi = {
isIframeStarted: !1,
isIframeLoaded: !1,
loadIframeApi: function() {
if (!this.isIframeStarted) {
var b = document.createElement("script");
b.src = "http://www.youtube.com/player_api";
var a = document.getElementsByTagName("script")[0];
a.parentNode.insertBefore(b, a);
this.isIframeStarted = !0
}
},
iframeQueue: [],
enqueueIframe: function(b) {
this.isLoaded ? this.createIframe(b) : (this.loadIframeApi(), this.iframeQueue.push(b))
},
createIframe: function(b) {
var a = b.pluginMediaElement,
c = new YT.Player(b.containerId, {
height: b.height,
width: b.width,
videoId: b.videoId,
playerVars: {
controls: 0
},
events: {
onReady: function() {
b.pluginMediaElement.pluginApi = c;
mejs.MediaPluginBridge.initPlugin(b.pluginId);
setInterval(function() {
mejs.YouTubeApi.createEvent(c, a, "timeupdate")
}, 250)
},
onStateChange: function(b) {
mejs.YouTubeApi.handleStateChange(b.data, c, a)
}
}
})
},
createEvent: function(b, a, c) {
c = {
type: c,
target: a
};
if (b && b.getDuration) {
a.currentTime = c.currentTime = b.getCurrentTime();
a.duration = c.duration = b.getDuration();
c.paused = a.paused;
c.ended = a.ended;
c.muted = b.isMuted();
c.volume = b.getVolume() / 100;
c.bytesTotal = b.getVideoBytesTotal();
c.bufferedBytes = b.getVideoBytesLoaded();
var d = c.bufferedBytes / c.bytesTotal * c.duration;
c.target.buffered = c.buffered = {
start: function() {
return 0
},
end: function() {
return d
},
length: 1
}
}
a.dispatchEvent(c.type, c)
},
iFrameReady: function() {
for (this.isIframeLoaded = this.isLoaded = !0; 0 < this.iframeQueue.length;) this.createIframe(this.iframeQueue.pop())
},
flashPlayers: {},
createFlash: function(b) {
this.flashPlayers[b.pluginId] = b;
var a, c = "http://www.youtube.com/apiplayer?enablejsapi=1&playerapiid=" + b.pluginId + "&version=3&autoplay=0&controls=0&modestbranding=1&loop=0";
mejs.MediaFeatures.isIE ? (a = document.createElement("div"), b.container.appendChild(a), a.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="' + b.pluginId + '" width="' + b.width + '" height="' + b.height + '"><param name="movie" value="' + c + '" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /></object>') : b.container.innerHTML = '<object type="application/x-shockwave-flash" id="' + b.pluginId + '" data="' + c + '" width="' + b.width + '" height="' + b.height + '" style="visibility: visible; "><param name="allowScriptAccess" value="always"><param name="wmode" value="transparent"></object>'
},
flashReady: function(b) {
var a = this.flashPlayers[b],
c = document.getElementById(b),
d = a.pluginMediaElement;
d.pluginApi = d.pluginElement = c;
mejs.MediaPluginBridge.initPlugin(b);
c.cueVideoById(a.videoId);
b = a.containerId + "_callback";
window[b] = function(a) {
mejs.YouTubeApi.handleStateChange(a, c, d)
};
c.addEventListener("onStateChange", b);
setInterval(function() {
mejs.YouTubeApi.createEvent(c, d, "timeupdate")
}, 250)
},
handleStateChange: function(b, a, c) {
switch (b) {
case -1:
c.paused = !0;
c.ended = !0;
mejs.YouTubeApi.createEvent(a, c, "loadedmetadata");
break;
case 0:
c.paused = !1;
c.ended = !0;
mejs.YouTubeApi.createEvent(a, c, "ended");
break;
case 1:
c.paused = !1;
c.ended = !1;
mejs.YouTubeApi.createEvent(a, c, "play");
mejs.YouTubeApi.createEvent(a, c, "playing");
break;
case 2:
c.paused = !0;
c.ended = !1;
mejs.YouTubeApi.createEvent(a, c, "pause");
break;
case 3:
mejs.YouTubeApi.createEvent(a, c, "progress")
}
}
};
function onYouTubePlayerAPIReady() {
mejs.YouTubeApi.iFrameReady()
}
function onYouTubePlayerReady(b) {
mejs.YouTubeApi.flashReady(b)
}
window.mejs = mejs;
window.MediaElement = mejs.MediaElement;
"undefined" != typeof jQuery ? mejs.$ = jQuery : "undefined" != typeof ender && (mejs.$ = ender);
(function(b) {
mejs.MepDefaults = {
poster: "",
defaultVideoWidth: 480,
defaultVideoHeight: 270,
videoWidth: -1,
videoHeight: -1,
defaultAudioWidth: 400,
defaultAudioHeight: 30,
defaultSeekBackwardInterval: function(a) {
return a.duration * 0.05
},
defaultSeekForwardInterval: function(a) {
return a.duration * 0.05
},
audioWidth: -1,
audioHeight: -1,
startVolume: 0.8,
loop: false,
enableAutosize: true,
alwaysShowHours: false,
showTimecodeFrameCount: false,
framesPerSecond: 25,
autosizeProgress: true,
alwaysShowControls: false,
iPadUseNativeControls: false,
iPhoneUseNativeControls: false,
AndroidUseNativeControls: false,
features: ["playpause", "current", "progress", "duration", "tracks", "volume", "fullscreen"],
isVideo: true,
enableKeyboard: true,
pauseOtherPlayers: true,
keyActions: [{
keys: [32, 179],
action: function(a, b) {
b.paused || b.ended ? b.play() : b.pause()
}
}, {
keys: [38],
action: function(a, b) {
var d = Math.min(b.volume + 0.1, 1);
b.setVolume(d)
}
}, {
keys: [40],
action: function(a, b) {
var d = Math.max(b.volume - 0.1, 0);
b.setVolume(d)
}
}, {
keys: [37, 227],
action: function(a, b) {
if (!isNaN(b.duration) && b.duration > 0) {
if (a.isVideo) {
a.showControls();
a.startControlsTimer()
}
var d = Math.max(b.currentTime - a.options.defaultSeekBackwardInterval(b), 0);
b.setCurrentTime(d)
}
}
}, {
keys: [39, 228],
action: function(a, b) {
if (!isNaN(b.duration) && b.duration > 0) {
if (a.isVideo) {
a.showControls();
a.startControlsTimer()
}
var d = Math.min(b.currentTime + a.options.defaultSeekForwardInterval(b), b.duration);
b.setCurrentTime(d)
}
}
}, {
keys: [70],
action: function(a) {
typeof a.enterFullScreen != "undefined" && (a.isFullScreen ? a.exitFullScreen() : a.enterFullScreen())
}
}]
};
mejs.mepIndex = 0;
mejs.players = [];
mejs.MediaElementPlayer = function(a, c) {
if (!(this instanceof mejs.MediaElementPlayer)) return new mejs.MediaElementPlayer(a, c);
this.$media = this.$node = b(a);
this.node = this.media = this.$media[0];
if (typeof this.node.player != "undefined") return this.node.player;
this.node.player = this;
typeof c == "undefined" && (c = this.$node.data("mejsoptions"));
this.options = b.extend({}, mejs.MepDefaults, c);
mejs.players.push(this);
this.init();
return this
};
mejs.MediaElementPlayer.prototype = {
hasFocus: false,
controlsAreVisible: true,
init: function() {
var a = this,
c = mejs.MediaFeatures,
d = b.extend(true, {}, a.options, {
success: function(b, c) {
a.meReady(b, c)
},
error: function(b) {
a.handleError(b)
}
}),
e = a.media.tagName.toLowerCase();
a.isDynamic = e !== "audio" && e !== "video";
a.isVideo = a.isDynamic ? a.options.isVideo : e !== "audio" && a.options.isVideo;
if (c.isiPad && a.options.iPadUseNativeControls || c.isiPhone && a.options.iPhoneUseNativeControls) {
a.$media.attr("controls", "controls");
if (c.isiPad && a.media.getAttribute("autoplay") !== null) {
a.media.load();
a.media.play()
}
} else if (!c.isAndroid || !a.AndroidUseNativeControls) {
a.$media.removeAttr("controls");
a.id = "mep_" + mejs.mepIndex++;
a.container = b('<div id="' + a.id + '" class="mejs-container"><div class="mejs-inner"><div class="mejs-mediaelement"></div><div class="mejs-layers"></div><div class="mejs-controls"></div><div class="mejs-clear"></div></div></div>').addClass(a.$media[0].className).insertBefore(a.$media);
a.container.addClass((c.isAndroid ? "mejs-android " : "") + (c.isiOS ? "mejs-ios " : "") + (c.isiPad ? "mejs-ipad " : "") + (c.isiPhone ? "mejs-iphone " : "") + (a.isVideo ? "mejs-video " : "mejs-audio "));
if (c.isiOS) {
c = a.$media.clone();
a.container.find(".mejs-mediaelement").append(c);
a.$media.remove();
a.$node = a.$media = c;
a.node = a.media = c[0]
} else a.container.find(".mejs-mediaelement").append(a.$media);
a.controls = a.container.find(".mejs-controls");
a.layers = a.container.find(".mejs-layers");
c = a.isVideo ? "video" : "audio";
e = c.substring(0, 1).toUpperCase() + c.substring(1);
a.width = a.options[c + "Width"] > 0 || a.options[c + "Width"].toString().indexOf("%") > -1 ? a.options[c + "Width"] : a.media.style.width !== "" && a.media.style.width !== null ? a.media.style.width : a.media.getAttribute("width") !== null ? a.$media.attr("width") : a.options["default" + e + "Width"];
a.height = a.options[c + "Height"] > 0 || a.options[c + "Height"].toString().indexOf("%") > -1 ? a.options[c + "Height"] : a.media.style.height !== "" && a.media.style.height !== null ? a.media.style.height : a.$media[0].getAttribute("height") !== null ? a.$media.attr("height") : a.options["default" + e + "Height"];
a.setPlayerSize(a.width, a.height);
d.pluginWidth = a.height;
d.pluginHeight = a.width
}
mejs.MediaElement(a.$media[0], d)
},
showControls: function(a) {
var b = this;
if (!b.controlsAreVisible) {
if (typeof a == "undefined" || a) {
b.controls.css("visibility", "visible").stop(true, true).fadeIn(200, function() {
b.controlsAreVisible = true
});
b.container.find(".mejs-control").css("visibility", "visible").stop(true, true).fadeIn(200, function() {
b.controlsAreVisible = true
})
} else {
b.controls.css("visibility", "visible").css("display", "block");
b.container.find(".mejs-control").css("visibility", "visible").css("display", "block");
b.controlsAreVisible = true
}
b.setControlsSize()
}
},
hideControls: function(a) {
var c = this;
if (c.controlsAreVisible) if (typeof a == "undefined" || a) {
c.controls.stop(true, true).fadeOut(200, function() {
b(this).css("visibility", "hidden").css("display", "block");
c.controlsAreVisible = false
});
c.container.find(".mejs-control").stop(true, true).fadeOut(200, function() {
b(this).css("visibility", "hidden").css("display", "block")
})
} else {
c.controls.css("visibility", "hidden").css("display", "block");
c.container.find(".mejs-control").css("visibility", "hidden").css("display", "block");
c.controlsAreVisible = false
}
},
controlsTimer: null,
startControlsTimer: function(a) {
var b = this,
a = typeof a != "undefined" ? a : 1500;
b.killControlsTimer("start");
b.controlsTimer = setTimeout(function() {
b.hideControls();
b.killControlsTimer("hide")
}, a)
},
killControlsTimer: function() {
if (this.controlsTimer !== null) {
clearTimeout(this.controlsTimer);
delete this.controlsTimer;
this.controlsTimer = null
}
},
controlsEnabled: true,
disableControls: function() {
this.killControlsTimer();
this.hideControls(false);
this.controlsEnabled = false
},
enableControls: function() {
this.showControls(false);
this.controlsEnabled = true
},
meReady: function(a, c) {
var d = this,
e = mejs.MediaFeatures,
f = c.getAttribute("autoplay"),
f = !(typeof f == "undefined" || f === null || f === "false"),
g;
if (!d.created) {
d.created = true;
d.media = a;
d.domNode = c;
if ((!e.isAndroid || !d.options.AndroidUseNativeControls) && (!e.isiPad || !d.options.iPadUseNativeControls) && (!e.isiPhone || !d.options.iPhoneUseNativeControls)) {
d.buildposter(d, d.controls, d.layers, d.media);
d.buildkeyboard(d, d.controls, d.layers, d.media);
d.buildoverlays(d, d.controls, d.layers, d.media);
d.findTracks();
for (g in d.options.features) {
e = d.options.features[g];
if (d["build" + e]) try {
d["build" + e](d, d.controls, d.layers, d.media)
} catch (j) {}
}
d.container.trigger("controlsready");
d.setPlayerSize(d.width, d.height);
d.setControlsSize();
if (d.isVideo) {
if (mejs.MediaFeatures.hasTouch) d.$media.bind("touchstart", function() {
d.controlsAreVisible ? d.hideControls(false) : d.controlsEnabled && d.showControls(false)
});
else {
(d.media.pluginType == "native" ? d.$media : b(d.media.pluginElement)).click(function() {
a.paused ? a.play() : a.pause()
});
d.container.bind("mouseenter mouseover", function() {
if (d.controlsEnabled && !d.options.alwaysShowControls) {
d.killControlsTimer("enter");
d.showControls();
d.startControlsTimer(2500)
}
}).bind("mousemove", function() {
if (d.controlsEnabled) {
d.controlsAreVisible || d.showControls();
d.options.alwaysShowControls || d.startControlsTimer(2500)
}
}).bind("mouseleave", function() {
d.controlsEnabled && !d.media.paused && !d.options.alwaysShowControls && d.startControlsTimer(1E3)
})
}
f && !d.options.alwaysShowControls && d.hideControls();
d.options.enableAutosize && d.media.addEventListener("loadedmetadata", function(a) {
if (d.options.videoHeight <= 0 && d.domNode.getAttribute("height") === null && !isNaN(a.target.videoHeight)) {
d.setPlayerSize(a.target.videoWidth, a.target.videoHeight);
d.setControlsSize();
d.media.setVideoSize(a.target.videoWidth, a.target.videoHeight)
}
}, false)
}
a.addEventListener("play", function() {
for (var a = 0, b = mejs.players.length; a < b; a++) {
var c = mejs.players[a];
c.id != d.id && (d.options.pauseOtherPlayers && !c.paused && !c.ended) && c.pause();
c.hasFocus = false
}
d.hasFocus = true
}, false);
d.media.addEventListener("ended", function() {
try {
d.media.setCurrentTime(0)
} catch (a) {}
d.media.pause();
d.setProgressRail && d.setProgressRail();
d.setCurrentRail && d.setCurrentRail();
d.options.loop ? d.media.play() : !d.options.alwaysShowControls && d.controlsEnabled && d.showControls()
}, false);
d.media.addEventListener("loadedmetadata", function() {
d.updateDuration && d.updateDuration();
d.updateCurrent && d.updateCurrent();
if (!d.isFullScreen) {
d.setPlayerSize(d.width, d.height);
d.setControlsSize()
}
}, false);
setTimeout(function() {
d.setPlayerSize(d.width, d.height);
d.setControlsSize()
}, 50);
b(window).resize(function() {
d.isFullScreen || mejs.MediaFeatures.hasTrueNativeFullScreen && document.webkitIsFullScreen || d.setPlayerSize(d.width, d.height);
d.setControlsSize()
});
d.media.pluginType == "youtube" && d.container.find(".mejs-overlay-play").hide()
}
if (f && a.pluginType == "native") {
a.load();
a.play()
}
if (d.options.success) if (typeof d.options.success == "string") window[d.options.success](d.media, d.domNode, d);
else d.options.success(d.media, d.domNode, d)
}
},
handleError: function(a) {
this.controls.hide();
this.options.error && this.options.error(a)
},
setPlayerSize: function(a, c) {
if (typeof a != "undefined") this.width = a;
if (typeof c != "undefined") this.height = c;
if (this.height.toString().indexOf("%") > 0) {
var d = this.media.videoWidth && this.media.videoWidth > 0 ? this.media.videoWidth : this.options.defaultVideoWidth,
e = this.media.videoHeight && this.media.videoHeight > 0 ? this.media.videoHeight : this.options.defaultVideoHeight,
f = this.container.parent().width(),
d = parseInt(f * e / d, 10);
if (this.container.parent()[0].tagName.toLowerCase() === "body") {
f = b(window).width();
d = b(window).height()
}
if (d != 0) {
this.container.width(f).height(d);
this.$media.width("100%").height("100%");
this.container.find("object, embed, iframe").width("100%").height("100%");
this.isVideo && this.media.setVideoSize && this.media.setVideoSize(f, d);
this.layers.children(".mejs-layer").width("100%").height("100%")
}
} else {
this.container.width(this.width).height(this.height);
this.layers.children(".mejs-layer").width(this.width).height(this.height)
}
},
setControlsSize: function() {
var a = 0,
c = 0,
d = this.controls.find(".mejs-time-rail"),
e = this.controls.find(".mejs-time-total");
this.controls.find(".mejs-time-current");
this.controls.find(".mejs-time-loaded");
var f = d.siblings();
this.options && !this.options.autosizeProgress && (c = parseInt(d.css("width")));
if (c === 0 || !c) {
f.each(function() {
b(this).css("position") != "absolute" && (a = a + b(this).outerWidth(true))
});
c = this.controls.width() - a - (d.outerWidth(true) - d.width())
}
d.width(c);
e.width(c - (e.outerWidth(true) - e.width()));
this.setProgressRail && this.setProgressRail();
this.setCurrentRail && this.setCurrentRail()
},
buildposter: function(a, c, d, e) {
var f = b('<div class="mejs-poster mejs-layer"></div>').appendTo(d),
c = a.$media.attr("poster");
if (a.options.poster !== "") c = a.options.poster;
c !== "" && c != null ? this.setPoster(c) : f.hide();
e.addEventListener("play", function() {
f.hide()
}, false)
},
setPoster: function(a) {
var c = this.container.find(".mejs-poster"),
d = c.find("img");
d.length == 0 && (d = b('<img width="100%" height="100%" />').appendTo(c));
d.attr("src", a)
},
buildoverlays: function(a, c, d, e) {
if (a.isVideo) {
var f = b('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-loading"><span></span></div></div>').hide().appendTo(d),
g = b('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-error"></div></div>').hide().appendTo(d),
j = b('<div class="mejs-overlay mejs-layer mejs-overlay-play"><div class="mejs-overlay-button"></div></div>').appendTo(d).click(function() {
e.paused ? e.play() : e.pause()
});
e.addEventListener("play", function() {
j.hide();
f.hide();
c.find(".mejs-time-buffering").hide();
g.hide()
}, false);
e.addEventListener("playing", function() {
j.hide();
f.hide();
c.find(".mejs-time-buffering").hide();
g.hide()
}, false);
e.addEventListener("seeking", function() {
f.show();
c.find(".mejs-time-buffering").show()
}, false);
e.addEventListener("seeked", function() {
f.hide();
c.find(".mejs-time-buffering").hide()
}, false);
e.addEventListener("pause", function() {
mejs.MediaFeatures.isiPhone || j.show()
}, false);
e.addEventListener("waiting", function() {
f.show();
c.find(".mejs-time-buffering").show()
}, false);
e.addEventListener("loadeddata", function() {
f.show();
c.find(".mejs-time-buffering").show()
}, false);
e.addEventListener("canplay", function() {
f.hide();
c.find(".mejs-time-buffering").hide()
}, false);
e.addEventListener("error", function() {
f.hide();
c.find(".mejs-time-buffering").hide();
g.show();
g.find("mejs-overlay-error").html("Error loading this resource")
}, false)
}
},
buildkeyboard: function(a, c, d, e) {
b(document).keydown(function(b) {
if (a.hasFocus && a.options.enableKeyboard) for (var c = 0, d = a.options.keyActions.length; c < d; c++) for (var h = a.options.keyActions[c], l = 0, k = h.keys.length; l < k; l++) if (b.keyCode == h.keys[l]) {
b.preventDefault();
h.action(a, e, b.keyCode);
return false
}
return true
});
b(document).click(function(c) {
if (b(c.target).closest(".mejs-container").length == 0) a.hasFocus = false
})
},
findTracks: function() {
var a = this,
c = a.$media.find("track");
a.tracks = [];
c.each(function(c, e) {
e = b(e);
a.tracks.push({
srclang: e.attr("srclang").toLowerCase(),
src: e.attr("src"),
kind: e.attr("kind"),
label: e.attr("label") || "",
entries: [],
isLoaded: false
})
})
},
changeSkin: function(a) {
this.container[0].className = "mejs-container " + a;
this.setPlayerSize(this.width, this.height);
this.setControlsSize()
},
play: function() {
this.media.play()
},
pause: function() {
this.media.pause()
},
load: function() {
this.media.load()
},
setMuted: function(a) {
this.media.setMuted(a)
},
setCurrentTime: function(a) {
this.media.setCurrentTime(a)
},
getCurrentTime: function() {
return this.media.currentTime
},
setVolume: function(a) {
this.media.setVolume(a)
},
getVolume: function() {
return this.media.volume
},
setSrc: function(a) {
this.media.setSrc(a)
},
remove: function() {
this.media.pluginType === "flash" ? this.media.remove() : this.media.pluginType === "native" && this.$media.prop("controls", true);
this.isDynamic || this.$node.insertBefore(this.container);
this.container.remove()
}
};
if (typeof jQuery != "undefined") jQuery.fn.mediaelementplayer = function(a) {
return this.each(function() {
new mejs.MediaElementPlayer(this, a)
})
};
b(document).ready(function() {
b(".mejs-player").mediaelementplayer()
});
window.MediaElementPlayer = mejs.MediaElementPlayer
})(mejs.$);
(function(b) {
b.extend(mejs.MepDefaults, {
playpauseText: "Play/Pause"
});
b.extend(MediaElementPlayer.prototype, {
buildplaypause: function(a, c, d, e) {
var f = b('<div class="mejs-button mejs-playpause-button mejs-play" ><button type="button" aria-controls="' + this.id + '" title="' + this.options.playpauseText + '"></button></div>').appendTo(c).click(function(a) {
a.preventDefault();
e.paused ? e.play() : e.pause();
return false
});
e.addEventListener("play", function() {
f.removeClass("mejs-play").addClass("mejs-pause")
}, false);
e.addEventListener("playing", function() {
f.removeClass("mejs-play").addClass("mejs-pause")
}, false);
e.addEventListener("pause", function() {
f.removeClass("mejs-pause").addClass("mejs-play")
}, false);
e.addEventListener("paused", function() {
f.removeClass("mejs-pause").addClass("mejs-play")
}, false)
}
})
})(mejs.$);
(function(b) {
b.extend(mejs.MepDefaults, {
stopText: "Stop"
});
b.extend(MediaElementPlayer.prototype, {
buildstop: function(a, c, d, e) {
b('<div class="mejs-button mejs-stop-button mejs-stop"><button type="button" aria-controls="' + this.id + '" title="' + this.options.stopText + '"></button></div>').appendTo(c).click(function() {
e.paused || e.pause();
if (e.currentTime > 0) {
e.setCurrentTime(0);
c.find(".mejs-time-current").width("0px");
c.find(".mejs-time-handle").css("left", "0px");
c.find(".mejs-time-float-current").html(mejs.Utility.secondsToTimeCode(0));
c.find(".mejs-currenttime").html(mejs.Utility.secondsToTimeCode(0));
d.find(".mejs-poster").show()
}
})
}
})
})(mejs.$);
(function(b) {
b.extend(MediaElementPlayer.prototype, {
buildprogress: function(a, c, d, e) {
b('<div class="mejs-time-rail"><span class="mejs-time-total"><span class="mejs-time-buffering"></span><span class="mejs-time-loaded"></span><span class="mejs-time-current"></span><span class="mejs-time-handle"></span><span class="mejs-time-float"><span class="mejs-time-float-current">00:00</span><span class="mejs-time-float-corner"></span></span></span></div>').appendTo(c);
c.find(".mejs-time-buffering").hide();
var f = c.find(".mejs-time-total"),
d = c.find(".mejs-time-loaded"),
g = c.find(".mejs-time-current"),
j = c.find(".mejs-time-handle"),
h = c.find(".mejs-time-float"),
l = c.find(".mejs-time-float-current"),
k = function(a) {
var a = a.pageX,
b = f.offset(),
c = f.outerWidth(),
d = 0,
d = 0,
g = a - b.left;
if (a > b.left && a <= c + b.left && e.duration) {
d = (a - b.left) / c;
d = d <= 0.02 ? 0 : d * e.duration;
m && e.setCurrentTime(d);
if (!mejs.MediaFeatures.hasTouch) {
h.css("left", g);
l.html(mejs.Utility.secondsToTimeCode(d));
h.show()
}
}
},
m = false;
f.bind("mousedown", function(a) {
if (a.which === 1) {
m = true;
k(a);
b(document).bind("mousemove.dur", function(a) {
k(a)
}).bind("mouseup.dur", function() {
m = false;
h.hide();
b(document).unbind(".dur")
});
return false
}
}).bind("mouseenter", function() {
b(document).bind("mousemove.dur", function(a) {
k(a)
});
mejs.MediaFeatures.hasTouch || h.show()
}).bind("mouseleave", function() {
if (!m) {
b(document).unbind(".dur");
h.hide()
}
});
e.addEventListener("progress", function(b) {
a.setProgressRail(b);
a.setCurrentRail(b)
}, false);
e.addEventListener("timeupdate", function(b) {
a.setProgressRail(b);
a.setCurrentRail(b)
}, false);
this.loaded = d;
this.total = f;
this.current = g;
this.handle = j
},
setProgressRail: function(a) {
var b = a != void 0 ? a.target : this.media,
d = null;
b && b.buffered && b.buffered.length > 0 && b.buffered.end && b.duration ? d = b.buffered.end(0) / b.duration : b && b.bytesTotal != void 0 && b.bytesTotal > 0 && b.bufferedBytes != void 0 ? d = b.bufferedBytes / b.bytesTotal : a && (a.lengthComputable && a.total != 0) && (d = a.loaded / a.total);
if (d !== null) {
d = Math.min(1, Math.max(0, d));
this.loaded && this.total && this.loaded.width(this.total.width() * d)
}
},
setCurrentRail: function() {
if (this.media.currentTime != void 0 && this.media.duration && this.total && this.handle) {
var a = this.total.width() * this.media.currentTime / this.media.duration,
b = a - this.handle.outerWidth(true) / 2;
this.current.width(a);
this.handle.css("left", b)
}
}
})
})(mejs.$);
(function(b) {
b.extend(mejs.MepDefaults, {
duration: -1,
timeAndDurationSeparator: " <span> | </span> "
});
b.extend(MediaElementPlayer.prototype, {
buildcurrent: function(a, c, d, e) {
b('<div class="mejs-time"><span class="mejs-currenttime">' + (a.options.alwaysShowHours ? "00:" : "") + (a.options.showTimecodeFrameCount ? "00:00:00" : "00:00") + "</span></div>").appendTo(c);
this.currenttime = this.controls.find(".mejs-currenttime");
e.addEventListener("timeupdate", function() {
a.updateCurrent()
}, false)
},
buildduration: function(a, c, d, e) {
if (c.children().last().find(".mejs-currenttime").length > 0) b(this.options.timeAndDurationSeparator + '<span class="mejs-duration">' + (this.options.duration > 0 ? mejs.Utility.secondsToTimeCode(this.options.duration, this.options.alwaysShowHours || this.media.duration > 3600, this.options.showTimecodeFrameCount, this.options.framesPerSecond || 25) : (a.options.alwaysShowHours ? "00:" : "") + (a.options.showTimecodeFrameCount ? "00:00:00" : "00:00")) + "</span>").appendTo(c.find(".mejs-time"));
else {
c.find(".mejs-currenttime").parent().addClass("mejs-currenttime-container");
b('<div class="mejs-time mejs-duration-container"><span class="mejs-duration">' + (this.options.duration > 0 ? mejs.Utility.secondsToTimeCode(this.options.duration, this.options.alwaysShowHours || this.media.duration > 3600, this.options.showTimecodeFrameCount, this.options.framesPerSecond || 25) : (a.options.alwaysShowHours ? "00:" : "") + (a.options.showTimecodeFrameCount ? "00:00:00" : "00:00")) + "</span></div>").appendTo(c)
}
this.durationD = this.controls.find(".mejs-duration");
e.addEventListener("timeupdate", function() {
a.updateDuration()
}, false)
},
updateCurrent: function() {
this.currenttime && this.currenttime.html(mejs.Utility.secondsToTimeCode(this.media.currentTime, this.options.alwaysShowHours || this.media.duration > 3600, this.options.showTimecodeFrameCount, this.options.framesPerSecond || 25))
},
updateDuration: function() {
this.media.duration && this.durationD && this.durationD.html(mejs.Utility.secondsToTimeCode(this.media.duration, this.options.alwaysShowHours, this.options.showTimecodeFrameCount, this.options.framesPerSecond || 25))
}
})
})(mejs.$);
(function(b) {
b.extend(mejs.MepDefaults, {
muteText: "Mute Toggle",
hideVolumeOnTouchDevices: true,
audioVolume: "horizontal",
videoVolume: "vertical"
});
b.extend(MediaElementPlayer.prototype, {
buildvolume: function(a, c, d, e) {
if (!mejs.MediaFeatures.hasTouch || !this.options.hideVolumeOnTouchDevices) {
var f = this.isVideo ? this.options.videoVolume : this.options.audioVolume,
g = f == "horizontal" ? b('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="' + this.id + '" title="' + this.options.muteText + '"></button></div><div class="mejs-horizontal-volume-slider"><div class="mejs-horizontal-volume-total"></div><div class="mejs-horizontal-volume-current"></div><div class="mejs-horizontal-volume-handle"></div></div>').appendTo(c) : b('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="' + this.id + '" title="' + this.options.muteText + '"></button><div class="mejs-volume-slider"><div class="mejs-volume-total"></div><div class="mejs-volume-current"></div><div class="mejs-volume-handle"></div></div></div>').appendTo(c),
j = this.container.find(".mejs-volume-slider, .mejs-horizontal-volume-slider"),
h = this.container.find(".mejs-volume-total, .mejs-horizontal-volume-total"),
l = this.container.find(".mejs-volume-current, .mejs-horizontal-volume-current"),
k = this.container.find(".mejs-volume-handle, .mejs-horizontal-volume-handle"),
m = function(a, b) {
if (!j.is(":visible") && typeof b != "undefined") {
j.show();
m(a, true);
j.hide()
} else {
a = Math.max(0, a);
a = Math.min(a, 1);
a == 0 ? g.removeClass("mejs-mute").addClass("mejs-unmute") : g.removeClass("mejs-unmute").addClass("mejs-mute");
if (f == "vertical") {
var c = h.height(),
d = h.position(),
e = c - c * a;
k.css("top", d.top + e - k.height() / 2);
l.height(c - e);
l.css("top", d.top + e)
} else {
c = h.width();
d = h.position();
c = c * a;
k.css("left", d.left + c - k.width() / 2);
l.width(c)
}
}
},
n = function(a) {
var b = null,
c = h.offset();
if (f == "vertical") {
b = h.height();
parseInt(h.css("top").replace(/px/, ""), 10);
b = (b - (a.pageY - c.top)) / b;
if (c.top == 0 || c.left == 0) return
} else {
b = h.width();
b = (a.pageX - c.left) / b
}
b = Math.max(0, b);
b = Math.min(b, 1);
m(b);
b == 0 ? e.setMuted(true) : e.setMuted(false);
e.setVolume(b)
},
o = false,
p = false;
g.hover(function() {
j.show();
p = true
}, function() {
p = false;
!o && f == "vertical" && j.hide()
});
j.bind("mouseover", function() {
p = true
}).bind("mousedown", function(a) {
n(a);
b(document).bind("mousemove.vol", function(a) {
n(a)
}).bind("mouseup.vol", function() {
o = false;
b(document).unbind(".vol");
!p && f == "vertical" && j.hide()
});
o = true;
return false
});
g.find("button").click(function() {
e.setMuted(!e.muted)
});
e.addEventListener("volumechange", function() {
if (!o) if (e.muted) {
m(0);
g.removeClass("mejs-mute").addClass("mejs-unmute")
} else {
m(e.volume);
g.removeClass("mejs-unmute").addClass("mejs-mute")
}
}, false);
if (this.container.is(":visible")) {
m(a.options.startVolume);
e.pluginType === "native" && e.setVolume(a.options.startVolume)
}
}
}
})
})(mejs.$);
(function(b) {
b.extend(mejs.MepDefaults, {
usePluginFullScreen: true,
newWindowCallback: function() {
return ""
},
fullscreenText: "Fullscreen"
});
b.extend(MediaElementPlayer.prototype, {
isFullScreen: false,
isNativeFullScreen: false,
docStyleOverflow: null,
isInIframe: false,
buildfullscreen: function(a, c, d, e) {
if (a.isVideo) {
a.isInIframe = window.location != window.parent.location;
if (mejs.MediaFeatures.hasTrueNativeFullScreen) {
d = null;
d = mejs.MediaFeatures.hasMozNativeFullScreen ? b(document) : a.container;
d.bind(mejs.MediaFeatures.fullScreenEventName, function() {
if (mejs.MediaFeatures.isFullScreen()) {
a.isNativeFullScreen = true;
a.setControlsSize()
} else {
a.isNativeFullScreen = false;
a.exitFullScreen()
}
})
}
var f = this,
g = b('<div class="mejs-button mejs-fullscreen-button"><button type="button" aria-controls="' + f.id + '" title="' + f.options.fullscreenText + '"></button></div>').appendTo(c);
if (f.media.pluginType === "native" || !f.options.usePluginFullScreen && !mejs.MediaFeatures.isFirefox) g.click(function() {
mejs.MediaFeatures.hasTrueNativeFullScreen && mejs.MediaFeatures.isFullScreen() || a.isFullScreen ? a.exitFullScreen() : a.enterFullScreen()
});
else {
var j = null;
if (function() {
var a = document.createElement("x"),
b = document.documentElement,
c = window.getComputedStyle;
if (!("pointerEvents" in a.style)) return false;
a.style.pointerEvents = "auto";
a.style.pointerEvents = "x";
b.appendChild(a);
c = c && c(a, "").pointerEvents === "auto";
b.removeChild(a);
return !!c
}() && !mejs.MediaFeatures.isOpera) {
var h = false,
l = function() {
if (h) {
k.hide();
m.hide();
n.hide();
g.css("pointer-events", "");
f.controls.css("pointer-events", "");
h = false
}
},
k = b('<div class="mejs-fullscreen-hover" />').appendTo(f.container).mouseover(l),
m = b('<div class="mejs-fullscreen-hover" />').appendTo(f.container).mouseover(l),
n = b('<div class="mejs-fullscreen-hover" />').appendTo(f.container).mouseover(l),
o = function() {
var a = {
position: "absolute",
top: 0,
left: 0
};
k.css(a);
m.css(a);
n.css(a);
k.width(f.container.width()).height(f.container.height() - f.controls.height());
a = g.offset().left - f.container.offset().left;
fullScreenBtnWidth = g.outerWidth(true);
m.width(a).height(f.controls.height()).css({
top: f.container.height() - f.controls.height()
});
n.width(f.container.width() - a - fullScreenBtnWidth).height(f.controls.height()).css({
top: f.container.height() - f.controls.height(),
left: a + fullScreenBtnWidth
})
};
b(document).resize(function() {
o()
});
g.mouseover(function() {
if (!f.isFullScreen) {
var b = g.offset(),
c = a.container.offset();
e.positionFullscreenButton(b.left - c.left, b.top - c.top, false);
g.css("pointer-events", "none");
f.controls.css("pointer-events", "none");
k.show();
n.show();
m.show();
o();
h = true
}
});
e.addEventListener("fullscreenchange", function() {
l()
})
} else g.mouseover(function() {
if (j !== null) {
clearTimeout(j);
delete j
}
var b = g.offset(),
c = a.container.offset();
e.positionFullscreenButton(b.left - c.left, b.top - c.top, true)
}).mouseout(function() {
if (j !== null) {
clearTimeout(j);
delete j
}
j = setTimeout(function() {
e.hideFullscreenButton()
}, 1500)
})
}
a.fullscreenBtn = g;
b(document).bind("keydown", function(b) {
(mejs.MediaFeatures.hasTrueNativeFullScreen && mejs.MediaFeatures.isFullScreen() || f.isFullScreen) && b.keyCode == 27 && a.exitFullScreen()
})
}
},
enterFullScreen: function() {
var a = this;
if (!(a.media.pluginType !== "native" && (mejs.MediaFeatures.isFirefox || a.options.usePluginFullScreen))) {
docStyleOverflow = document.documentElement.style.overflow;
document.documentElement.style.overflow = "hidden";
normalHeight = a.container.height();
normalWidth = a.container.width();
if (a.media.pluginType === "native") if (mejs.MediaFeatures.hasTrueNativeFullScreen) {
mejs.MediaFeatures.requestFullScreen(a.container[0]);
a.isInIframe && setTimeout(function e() {
a.isNativeFullScreen && (b(window).width() !== screen.width ? a.exitFullScreen() : setTimeout(e, 500))
}, 500)
} else if (mejs.MediaFeatures.hasSemiNativeFullScreen) {
a.media.webkitEnterFullscreen();
return
}
if (a.isInIframe) {
var c = a.options.newWindowCallback(this);
if (c !== "") if (mejs.MediaFeatures.hasTrueNativeFullScreen) setTimeout(function() {
if (!a.isNativeFullScreen) {
a.pause();
window.open(c, a.id, "top=0,left=0,width=" + screen.availWidth + ",height=" + screen.availHeight + ",resizable=yes,scrollbars=no,status=no,toolbar=no")
}
}, 250);
else {
a.pause();
window.open(c, a.id, "top=0,left=0,width=" + screen.availWidth + ",height=" + screen.availHeight + ",resizable=yes,scrollbars=no,status=no,toolbar=no");
return
}
}
a.container.addClass("mejs-container-fullscreen").width("100%").height("100%");
setTimeout(function() {
a.container.css({
width: "100%",
height: "100%"
});
a.setControlsSize()
}, 500);
if (a.pluginType === "native") a.$media.width("100%").height("100%");
else {
a.container.find("object, embed, iframe").width("100%").height("100%");
a.media.setVideoSize(b(window).width(), b(window).height())
}
a.layers.children("div").width("100%").height("100%");
a.fullscreenBtn && a.fullscreenBtn.removeClass("mejs-fullscreen").addClass("mejs-unfullscreen");
a.setControlsSize();
a.isFullScreen = true
}
},
exitFullScreen: function() {
if (this.media.pluginType !== "native" && mejs.MediaFeatures.isFirefox) this.media.setFullscreen(false);
else {
mejs.MediaFeatures.hasTrueNativeFullScreen && (mejs.MediaFeatures.isFullScreen() || this.isFullScreen) && mejs.MediaFeatures.cancelFullScreen();
document.documentElement.style.overflow = docStyleOverflow;
this.container.removeClass("mejs-container-fullscreen").width(normalWidth).height(normalHeight);
if (this.pluginType === "native") this.$media.width(normalWidth).height(normalHeight);
else {
this.container.find("object embed").width(normalWidth).height(normalHeight);
this.media.setVideoSize(normalWidth, normalHeight)
}
this.layers.children("div").width(normalWidth).height(normalHeight);
this.fullscreenBtn.removeClass("mejs-unfullscreen").addClass("mejs-fullscreen");
this.setControlsSize();
this.isFullScreen = false
}
}
})
})(mejs.$);
(function(b) {
b.extend(mejs.MepDefaults, {
startLanguage: "",
tracksText: "Captions/Subtitles"
});
b.extend(MediaElementPlayer.prototype, {
hasChapters: false,
buildtracks: function(a, c, d, e) {
if (a.isVideo && a.tracks.length != 0) {
var f;
a.chapters = b('<div class="mejs-chapters mejs-layer"></div>').prependTo(d).hide();
a.captions = b('<div class="mejs-captions-layer mejs-layer"><div class="mejs-captions-position"><span class="mejs-captions-text"></span></div></div>').prependTo(d).hide();
a.captionsText = a.captions.find(".mejs-captions-text");
a.captionsButton = b('<div class="mejs-button mejs-captions-button"><button type="button" aria-controls="' + this.id + '" title="' + this.options.tracksText + '"></button><div class="mejs-captions-selector"><ul><li><input type="radio" name="' + a.id + '_captions" id="' + a.id + '_captions_none" value="none" checked="checked" /><label for="' + a.id + '_captions_none">None</label></li></ul></div></div>').appendTo(c).hover(function() {
b(this).find(".mejs-captions-selector").css("visibility", "visible")
}, function() {
b(this).find(".mejs-captions-selector").css("visibility", "hidden")
}).delegate("input[type=radio]", "click", function() {
lang = this.value;
if (lang == "none") a.selectedTrack = null;
else for (f = 0; f < a.tracks.length; f++) if (a.tracks[f].srclang == lang) {
a.selectedTrack = a.tracks[f];
a.captions.attr("lang", a.selectedTrack.srclang);
a.displayCaptions();
break
}
});
a.options.alwaysShowControls ? a.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover") : a.container.bind("mouseenter", function() {
a.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover")
}).bind("mouseleave", function() {
e.paused || a.container.find(".mejs-captions-position").removeClass("mejs-captions-position-hover")
});
a.trackToLoad = -1;
a.selectedTrack = null;
a.isLoadingTrack = false;
for (f = 0; f < a.tracks.length; f++) a.tracks[f].kind == "subtitles" && a.addTrackButton(a.tracks[f].srclang, a.tracks[f].label);
a.loadNextTrack();
e.addEventListener("timeupdate", function() {
a.displayCaptions()
}, false);
e.addEventListener("loadedmetadata", function() {
a.displayChapters()
}, false);
a.container.hover(function() {
if (a.hasChapters) {
a.chapters.css("visibility", "visible");
a.chapters.fadeIn(200).height(a.chapters.find(".mejs-chapter").outerHeight())
}
}, function() {
a.hasChapters && !e.paused && a.chapters.fadeOut(200, function() {
b(this).css("visibility", "hidden");
b(this).css("display", "block")
})
});
a.node.getAttribute("autoplay") !== null && a.chapters.css("visibility", "hidden")
}
},
loadNextTrack: function() {
this.trackToLoad++;
if (this.trackToLoad < this.tracks.length) {
this.isLoadingTrack = true;
this.loadTrack(this.trackToLoad)
} else this.isLoadingTrack = false
},
loadTrack: function(a) {
var c = this,
d = c.tracks[a],
e = function() {
d.isLoaded = true;
c.enableTrackButton(d.srclang, d.label);
c.loadNextTrack()
};
d.isTranslation ? mejs.TrackFormatParser.translateTrackText(c.tracks[0].entries, c.tracks[0].srclang, d.srclang, c.options.googleApiKey, function(a) {
d.entries = a;
e()
}) : b.ajax({
url: d.src,
success: function(a) {
d.entries = mejs.TrackFormatParser.parse(a);
e();
d.kind == "chapters" && c.media.duration > 0 && c.drawChapters(d)
},
error: function() {
c.loadNextTrack()
}
})
},
enableTrackButton: function(a, c) {
c === "" && (c = mejs.language.codes[a] || a);
this.captionsButton.find("input[value=" + a + "]").prop("disabled", false).siblings("label").html(c);
this.options.startLanguage == a && b("#" + this.id + "_captions_" + a).click();
this.adjustLanguageBox()
},
addTrackButton: function(a, c) {
c === "" && (c = mejs.language.codes[a] || a);
this.captionsButton.find("ul").append(b('<li><input type="radio" name="' + this.id + '_captions" id="' + this.id + "_captions_" + a + '" value="' + a + '" disabled="disabled" /><label for="' + this.id + "_captions_" + a + '">' + c + " (loading)</label></li>"));
this.adjustLanguageBox();
this.container.find(".mejs-captions-translations option[value=" + a + "]").remove()
},
adjustLanguageBox: function() {
this.captionsButton.find(".mejs-captions-selector").height(this.captionsButton.find(".mejs-captions-selector ul").outerHeight(true) + this.captionsButton.find(".mejs-captions-translations").outerHeight(true))
},
displayCaptions: function() {
if (typeof this.tracks != "undefined") {
var a, b = this.selectedTrack;
if (b != null && b.isLoaded) for (a = 0; a < b.entries.times.length; a++) if (this.media.currentTime >= b.entries.times[a].start && this.media.currentTime <= b.entries.times[a].stop) {
this.captionsText.html(b.entries.text[a]);
this.captions.show().height(0);
return
}
this.captions.hide()
}
},
displayChapters: function() {
var a;
for (a = 0; a < this.tracks.length; a++) if (this.tracks[a].kind == "chapters" && this.tracks[a].isLoaded) {
this.drawChapters(this.tracks[a]);
this.hasChapters = true;
break
}
},
drawChapters: function(a) {
var c = this,
d, e, f = e = 0;
c.chapters.empty();
for (d = 0; d < a.entries.times.length; d++) {
e = a.entries.times[d].stop - a.entries.times[d].start;
e = Math.floor(e / c.media.duration * 100);
if (e + f > 100 || d == a.entries.times.length - 1 && e + f < 100) e = 100 - f;
c.chapters.append(b('<div class="mejs-chapter" rel="' + a.entries.times[d].start + '" style="left: ' + f.toString() + "%;width: " + e.toString() + '%;"><div class="mejs-chapter-block' + (d == a.entries.times.length - 1 ? " mejs-chapter-block-last" : "") + '"><span class="ch-title">' + a.entries.text[d] + '</span><span class="ch-time">' + mejs.Utility.secondsToTimeCode(a.entries.times[d].start) + "–" + mejs.Utility.secondsToTimeCode(a.entries.times[d].stop) + "</span></div></div>"));
f = f + e
}
c.chapters.find("div.mejs-chapter").click(function() {
c.media.setCurrentTime(parseFloat(b(this).attr("rel")));
c.media.paused && c.media.play()
});
c.chapters.show()
}
});
mejs.language = {
codes: {
af: "Afrikaans",
sq: "Albanian",
ar: "Arabic",
be: "Belarusian",
bg: "Bulgarian",
ca: "Catalan",
zh: "Chinese",
"zh-cn": "Chinese Simplified",
"zh-tw": "Chinese Traditional",
hr: "Croatian",
cs: "Czech",
da: "Danish",
nl: "Dutch",
en: "English",
et: "Estonian",
tl: "Filipino",
fi: "Finnish",
fr: "French",
gl: "Galician",
de: "German",
el: "Greek",
ht: "Haitian Creole",
iw: "Hebrew",
hi: "Hindi",
hu: "Hungarian",
is: "Icelandic",
id: "Indonesian",
ga: "Irish",
it: "Italian",
ja: "Japanese",
ko: "Korean",
lv: "Latvian",
lt: "Lithuanian",
mk: "Macedonian",
ms: "Malay",
mt: "Maltese",
no: "Norwegian",
fa: "Persian",
pl: "Polish",
pt: "Portuguese",
ro: "Romanian",
ru: "Russian",
sr: "Serbian",
sk: "Slovak",
sl: "Slovenian",
es: "Spanish",
sw: "Swahili",
sv: "Swedish",
tl: "Tagalog",
th: "Thai",
tr: "Turkish",
uk: "Ukrainian",
vi: "Vietnamese",
cy: "Welsh",
yi: "Yiddish"
}
};
mejs.TrackFormatParser = {
pattern_identifier: /^([a-zA-z]+-)?[0-9]+$/,
pattern_timecode: /^([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,
split2: function(a, b) {
return a.split(b)
},
parse: function(a) {
for (var b = 0, a = this.split2(a, /\r?\n/), d = {
text: [],
times: []
}, e, f; b < a.length; b++) if (this.pattern_identifier.exec(a[b])) {
b++;
if ((e = this.pattern_timecode.exec(a[b])) && b < a.length) {
b++;
f = a[b];
for (b++; a[b] !== "" && b < a.length;) {
f = f + "\n" + a[b];
b++
}
d.text.push(f);
d.times.push({
start: mejs.Utility.timeCodeToSeconds(e[1]),
stop: mejs.Utility.timeCodeToSeconds(e[3]),
settings: e[5]
})
}
}
return d
}
};
if ("x\n\ny".split(/\n/gi).length != 3) mejs.TrackFormatParser.split2 = function(a, b) {
var d = [],
e = "",
f;
for (f = 0; f < a.length; f++) {
e = e + a.substring(f, f + 1);
if (b.test(e)) {
d.push(e.replace(b, ""));
e = ""
}
}
d.push(e);
return d
}
})(mejs.$);
(function(b) {
b.extend(mejs.MepDefaults, {
contextMenuItems: [{
render: function(a) {
return typeof a.enterFullScreen == "undefined" ? null : a.isFullScreen ? "Turn off Fullscreen" : "Go Fullscreen"
},
click: function(a) {
a.isFullScreen ? a.exitFullScreen() : a.enterFullScreen()
}
}, {
render: function(a) {
return a.media.muted ? "Unmute" : "Mute"
},
click: function(a) {
a.media.muted ? a.setMuted(false) : a.setMuted(true)
}
}, {
isSeparator: true
}, {
render: function() {
return "Download Video"
},
click: function(a) {
window.location.href = a.media.currentSrc
}
}]
});
b.extend(MediaElementPlayer.prototype, {
buildcontextmenu: function(a) {
a.contextMenu = b('<div class="mejs-contextmenu"></div>').appendTo(b("body")).hide();
a.container.bind("contextmenu", function(b) {
if (a.isContextMenuEnabled) {
b.preventDefault();
a.renderContextMenu(b.clientX - 1, b.clientY - 1);
return false
}
});
a.container.bind("click", function() {
a.contextMenu.hide()
});
a.contextMenu.bind("mouseleave", function() {
a.startContextMenuTimer()
})
},
isContextMenuEnabled: true,
enableContextMenu: function() {
this.isContextMenuEnabled = true
},
disableContextMenu: function() {
this.isContextMenuEnabled = false
},
contextMenuTimeout: null,
startContextMenuTimer: function() {
var a = this;
a.killContextMenuTimer();
a.contextMenuTimer = setTimeout(function() {
a.hideContextMenu();
a.killContextMenuTimer()
}, 750)
},
killContextMenuTimer: function() {
var a = this.contextMenuTimer;
if (a != null) {
clearTimeout(a);
delete a
}
},
hideContextMenu: function() {
this.contextMenu.hide()
},
renderContextMenu: function(a, c) {
for (var d = this, e = "", f = d.options.contextMenuItems, g = 0, j = f.length; g < j; g++) if (f[g].isSeparator) e = e + '<div class="mejs-contextmenu-separator"></div>';
else {
var h = f[g].render(d);
h != null && (e = e + ('<div class="mejs-contextmenu-item" data-itemindex="' + g + '" id="element-' + Math.random() * 1E6 + '">' + h + "</div>"))
}
d.contextMenu.empty().append(b(e)).css({
top: c,
left: a
}).show();
d.contextMenu.find(".mejs-contextmenu-item").each(function() {
var a = b(this),
c = parseInt(a.data("itemindex"), 10),
e = d.options.contextMenuItems[c];
typeof e.show != "undefined" && e.show(a, d);
a.click(function() {
typeof e.click != "undefined" && e.click(d);
d.contextMenu.hide()
})
});
setTimeout(function() {
d.killControlsTimer("rev3")
}, 100)
}
})
})(mejs.$); |
#132 JavaScript::Eval (size: 377, repeated: 1) var sc_img1 = new Image();
sc_img1.src = "http://c.statcounter.com/t.php?sc_project=6512294&resolution=1176&h=885&camefrom=&u=http%3A//www.3danimationtutorials.net/latest-open-source-animation-programs-news&t=Latest%20Open%20Source%20Animation%20Programs%20News%20%7C%203D%20Animation%20Tutorials&java=1&security=f754afbb&sc_random=0.06606985613127081&sc_snum=1&p=0&invisible=1" |
#133 JavaScript::Eval (size: 459, repeated: 1) var sc_img1 = new Image();
sc_img1.src = "http://c.statcounter.com/t.php?sc_project=7474158&resolution=1176&h=885&camefrom=http%3A//www.3danimationtutorials.net/latest-open-source-animation-programs-news&u=http%3A//www.buffalowins.com/media/index.php&t=http%3A%2F%2Fwww.buffalowins.com%2Findex.php%3Foption%3Dcom_content%26amp%3Bview%3Darticle%26amp%3Bid%3D7%26amp%3BItemid%3D101&java=1&security=79d1b14a&sc_random=0.9300549264170761&sc_snum=1&p=0&invisible=1" |