diff options
Diffstat (limited to 'addons/webinterface.default/js/kodi-webinterface.js')
-rw-r--r-- | addons/webinterface.default/js/kodi-webinterface.js | 2126 |
1 files changed, 1764 insertions, 362 deletions
diff --git a/addons/webinterface.default/js/kodi-webinterface.js b/addons/webinterface.default/js/kodi-webinterface.js index cdf530f38e..96b78b2df9 100644 --- a/addons/webinterface.default/js/kodi-webinterface.js +++ b/addons/webinterface.default/js/kodi-webinterface.js @@ -1,21 +1,21 @@ -/*! Chorus 2 - A web interface for Kodi. Created by Jeremy Graham - built on 15-01-2017 */ +/*! Chorus 2 - A web interface for Kodi. Created by Jeremy Graham - built on 28-01-2017 */ !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b=a.length,c=ea.type(a);return"function"===c||ea.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}function d(a,b,c){if(ea.isFunction(b))return ea.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return ea.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(ma.test(b))return ea.filter(b,a,c);b=ea.filter(b,a)}return ea.grep(a,function(a){return ea.inArray(a,b)>=0!==c})}function e(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}function f(a){var b=ua[a]={};return ea.each(a.match(ta)||[],function(a,c){b[c]=!0}),b}function g(){oa.addEventListener?(oa.removeEventListener("DOMContentLoaded",h,!1),a.removeEventListener("load",h,!1)):(oa.detachEvent("onreadystatechange",h),a.detachEvent("onload",h))}function h(){(oa.addEventListener||"load"===event.type||"complete"===oa.readyState)&&(g(),ea.ready())}function i(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(za,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:ya.test(c)?ea.parseJSON(c):c}catch(e){}ea.data(a,b,c)}else c=void 0}return c}function j(a){var b;for(b in a)if(("data"!==b||!ea.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function k(a,b,c,d){if(ea.acceptData(a)){var e,f,g=ea.expando,h=a.nodeType,i=h?ea.cache:a,j=h?a[g]:a[g]&&g;if(j&&i[j]&&(d||i[j].data)||void 0!==c||"string"!=typeof b)return j||(j=h?a[g]=W.pop()||ea.guid++:g),i[j]||(i[j]=h?{}:{toJSON:ea.noop}),("object"==typeof b||"function"==typeof b)&&(d?i[j]=ea.extend(i[j],b):i[j].data=ea.extend(i[j].data,b)),f=i[j],d||(f.data||(f.data={}),f=f.data),void 0!==c&&(f[ea.camelCase(b)]=c),"string"==typeof b?(e=f[b],null==e&&(e=f[ea.camelCase(b)])):e=f,e}}function l(a,b,c){if(ea.acceptData(a)){var d,e,f=a.nodeType,g=f?ea.cache:a,h=f?a[ea.expando]:ea.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){ea.isArray(b)?b=b.concat(ea.map(b,ea.camelCase)):b in d?b=[b]:(b=ea.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;for(;e--;)delete d[b[e]];if(c?!j(d):!ea.isEmptyObject(d))return}(c||(delete g[h].data,j(g[h])))&&(f?ea.cleanData([a],!0):ca.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}function m(){return!0}function n(){return!1}function o(){try{return oa.activeElement}catch(a){}}function p(a){var b=Ka.split("|"),c=a.createDocumentFragment();if(c.createElement)for(;b.length;)c.createElement(b.pop());return c}function q(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==xa?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==xa?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||ea.nodeName(d,b)?f.push(d):ea.merge(f,q(d,b));return void 0===b||b&&ea.nodeName(a,b)?ea.merge([a],f):f}function r(a){Ea.test(a.type)&&(a.defaultChecked=a.checked)}function s(a,b){return ea.nodeName(a,"table")&&ea.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function t(a){return a.type=(null!==ea.find.attr(a,"type"))+"/"+a.type,a}function u(a){var b=Va.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function v(a,b){for(var c,d=0;null!=(c=a[d]);d++)ea._data(c,"globalEval",!b||ea._data(b[d],"globalEval"))}function w(a,b){if(1===b.nodeType&&ea.hasData(a)){var c,d,e,f=ea._data(a),g=ea._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)ea.event.add(b,c,h[c][d])}g.data&&(g.data=ea.extend({},g.data))}}function x(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!ca.noCloneEvent&&b[ea.expando]){e=ea._data(b);for(d in e.events)ea.removeEvent(b,d,e.handle);b.removeAttribute(ea.expando)}"script"===c&&b.text!==a.text?(t(b).text=a.text,u(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),ca.html5Clone&&a.innerHTML&&!ea.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&Ea.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}function y(b,c){var d,e=ea(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:ea.css(e[0],"display");return e.detach(),f}function z(a){var b=oa,c=_a[a];return c||(c=y(a,b),"none"!==c&&c||($a=($a||ea("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=($a[0].contentWindow||$a[0].contentDocument).document,b.write(),b.close(),c=y(a,b),$a.detach()),_a[a]=c),c}function A(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}function B(a,b){if(b in a)return b;for(var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=mb.length;e--;)if(b=mb[e]+c,b in a)return b;return d}function C(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=ea._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&Ca(d)&&(f[g]=ea._data(d,"olddisplay",z(d.nodeName)))):(e=Ca(d),(c&&"none"!==c||!e)&&ea._data(d,"olddisplay",e?c:ea.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function D(a,b,c){var d=ib.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function E(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=ea.css(a,c+Ba[f],!0,e)),d?("content"===c&&(g-=ea.css(a,"padding"+Ba[f],!0,e)),"margin"!==c&&(g-=ea.css(a,"border"+Ba[f]+"Width",!0,e))):(g+=ea.css(a,"padding"+Ba[f],!0,e),"padding"!==c&&(g+=ea.css(a,"border"+Ba[f]+"Width",!0,e)));return g}function F(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=ab(a),g=ca.boxSizing&&"border-box"===ea.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=bb(a,b,f),(0>e||null==e)&&(e=a.style[b]),db.test(e))return e;d=g&&(ca.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+E(a,b,c||(g?"border":"content"),d,f)+"px"}function G(a,b,c,d,e){return new G.prototype.init(a,b,c,d,e)}function H(){return setTimeout(function(){nb=void 0}),nb=ea.now()}function I(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=Ba[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function J(a,b,c){for(var d,e=(tb[b]||[]).concat(tb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function K(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},n=a.style,o=a.nodeType&&Ca(a),p=ea._data(a,"fxshow");c.queue||(h=ea._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,ea.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[n.overflow,n.overflowX,n.overflowY],j=ea.css(a,"display"),k="none"===j?ea._data(a,"olddisplay")||z(a.nodeName):j,"inline"===k&&"none"===ea.css(a,"float")&&(ca.inlineBlockNeedsLayout&&"inline"!==z(a.nodeName)?n.zoom=1:n.display="inline-block")),c.overflow&&(n.overflow="hidden",ca.shrinkWrapBlocks()||l.always(function(){n.overflow=c.overflow[0],n.overflowX=c.overflow[1],n.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],pb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(o?"hide":"show")){if("show"!==e||!p||void 0===p[d])continue;o=!0}m[d]=p&&p[d]||ea.style(a,d)}else j=void 0;if(ea.isEmptyObject(m))"inline"===("none"===j?z(a.nodeName):j)&&(n.display=j);else{p?"hidden"in p&&(o=p.hidden):p=ea._data(a,"fxshow",{}),f&&(p.hidden=!o),o?ea(a).show():l.done(function(){ea(a).hide()}),l.done(function(){var b;ea._removeData(a,"fxshow");for(b in m)ea.style(a,b,m[b])});for(d in m)g=J(o?p[d]:0,d,l),d in p||(p[d]=g.start,o&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function L(a,b){var c,d,e,f,g;for(c in a)if(d=ea.camelCase(c),e=b[d],f=a[c],ea.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=ea.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function M(a,b,c){var d,e,f=0,g=sb.length,h=ea.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=nb||H(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:ea.extend({},b),opts:ea.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:nb||H(),duration:c.duration,tweens:[],createTween:function(b,c){var d=ea.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(L(k,j.opts.specialEasing);g>f;f++)if(d=sb[f].call(j,a,k,j.opts))return d;return ea.map(k,J,j),ea.isFunction(j.opts.start)&&j.opts.start.call(a,j),ea.fx.timer(ea.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}function N(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(ta)||[];if(ea.isFunction(c))for(;d=f[e++];)"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function O(a,b,c,d){function e(h){var i;return f[h]=!0,ea.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||g||f[j]?g?!(i=j):void 0:(b.dataTypes.unshift(j),e(j),!1)}),i}var f={},g=a===Rb;return e(b.dataTypes[0])||!f["*"]&&e("*")}function P(a,b){var c,d,e=ea.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&ea.extend(!0,a,c),a}function Q(a,b,c){for(var d,e,f,g,h=a.contents,i=a.dataTypes;"*"===i[0];)i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function R(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];for(f=k.shift();f;)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}function S(a,b,c,d){var e;if(ea.isArray(b))ea.each(b,function(b,e){c||Vb.test(a)?d(a,e):S(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==ea.type(b))d(a,b);else for(e in b)S(a+"["+e+"]",b[e],c,d)}function T(){try{return new a.XMLHttpRequest}catch(b){}}function U(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function V(a){return ea.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}var W=[],X=W.slice,Y=W.concat,Z=W.push,$=W.indexOf,_={},aa=_.toString,ba=_.hasOwnProperty,ca={},da="1.11.1",ea=function(a,b){return new ea.fn.init(a,b)},fa=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ga=/^-ms-/,ha=/-([\da-z])/gi,ia=function(a,b){return b.toUpperCase()};ea.fn=ea.prototype={jquery:da,constructor:ea,selector:"",length:0,toArray:function(){return X.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:X.call(this)},pushStack:function(a){var b=ea.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return ea.each(this,a,b)},map:function(a){return this.pushStack(ea.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(X.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:Z,sort:W.sort,splice:W.splice},ea.extend=ea.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||ea.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(ea.isPlainObject(c)||(b=ea.isArray(c)))?(b?(b=!1,f=a&&ea.isArray(a)?a:[]):f=a&&ea.isPlainObject(a)?a:{},g[d]=ea.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},ea.extend({expando:"jQuery"+(da+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===ea.type(a)},isArray:Array.isArray||function(a){return"array"===ea.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!ea.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==ea.type(a)||a.nodeType||ea.isWindow(a))return!1;try{if(a.constructor&&!ba.call(a,"constructor")&&!ba.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(ca.ownLast)for(b in a)return ba.call(a,b);for(b in a);return void 0===b||ba.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?_[aa.call(a)]||"object":typeof a},globalEval:function(b){b&&ea.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(ga,"ms-").replace(ha,ia)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,d){var e,f=0,g=a.length,h=c(a);if(d){if(h)for(;g>f&&(e=b.apply(a[f],d),e!==!1);f++);else for(f in a)if(e=b.apply(a[f],d),e===!1)break}else if(h)for(;g>f&&(e=b.call(a[f],f,a[f]),e!==!1);f++);else for(f in a)if(e=b.call(a[f],f,a[f]),e===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(fa,"")},makeArray:function(a,b){var d=b||[];return null!=a&&(c(Object(a))?ea.merge(d,"string"==typeof a?[a]:a):Z.call(d,a)),d},inArray:function(a,b,c){var d;if(b){if($)return $.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;)a[e++]=b[d++];if(c!==c)for(;void 0!==b[d];)a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,d){var e,f=0,g=a.length,h=c(a),i=[];if(h)for(;g>f;f++)e=b(a[f],f,d),null!=e&&i.push(e);else for(f in a)e=b(a[f],f,d),null!=e&&i.push(e);return Y.apply([],i)},guid:1,proxy:function(a,b){var c,d,e;return"string"==typeof b&&(e=a[b],b=a,a=e),ea.isFunction(a)?(c=X.call(arguments,2),d=function(){return a.apply(b||this,c.concat(X.call(arguments)))},d.guid=a.guid=a.guid||ea.guid++,d):void 0},now:function(){return+new Date},support:ca}),ea.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){_["[object "+b+"]"]=b.toLowerCase()});var ja=function(a){function b(a,b,c,d){var e,f,g,h,i,j,l,n,o,p;if((b?b.ownerDocument||b:O)!==G&&F(b),b=b||G,c=c||[],!a||"string"!=typeof a)return c;if(1!==(h=b.nodeType)&&9!==h)return[];if(I&&!d){if(e=sa.exec(a))if(g=e[1]){if(9===h){if(f=b.getElementById(g),!f||!f.parentNode)return c;if(f.id===g)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(g))&&M(b,f)&&f.id===g)return c.push(f),c}else{if(e[2])return _.apply(c,b.getElementsByTagName(a)),c;if((g=e[3])&&v.getElementsByClassName&&b.getElementsByClassName)return _.apply(c,b.getElementsByClassName(g)),c}if(v.qsa&&(!J||!J.test(a))){if(n=l=N,o=b,p=9===h&&a,1===h&&"object"!==b.nodeName.toLowerCase()){for(j=z(a),(l=b.getAttribute("id"))?n=l.replace(ua,"\\$&"):b.setAttribute("id",n),n="[id='"+n+"'] ",i=j.length;i--;)j[i]=n+m(j[i]);o=ta.test(a)&&k(b.parentNode)||b,p=j.join(",")}if(p)try{return _.apply(c,o.querySelectorAll(p)),c}catch(q){}finally{l||b.removeAttribute("id")}}}return B(a.replace(ia,"$1"),b,c,d)}function c(){function a(c,d){return b.push(c+" ")>w.cacheLength&&delete a[b.shift()],a[c+" "]=d}var b=[];return a}function d(a){return a[N]=!0,a}function e(a){var b=G.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function f(a,b){for(var c=a.split("|"),d=a.length;d--;)w.attrHandle[c[d]]=b}function g(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||W)-(~a.sourceIndex||W);if(d)return d;if(c)for(;c=c.nextSibling;)if(c===b)return-1;return a?1:-1}function h(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function i(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function j(a){return d(function(b){return b=+b,d(function(c,d){for(var e,f=a([],c.length,b),g=f.length;g--;)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function k(a){return a&&typeof a.getElementsByTagName!==V&&a}function l(){}function m(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function n(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=Q++;return b.first?function(b,c,f){for(;b=b[d];)if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[P,f];if(g){for(;b=b[d];)if((1===b.nodeType||e)&&a(b,c,g))return!0}else for(;b=b[d];)if(1===b.nodeType||e){if(i=b[N]||(b[N]={}),(h=i[d])&&h[0]===P&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function o(a){return a.length>1?function(b,c,d){for(var e=a.length;e--;)if(!a[e](b,c,d))return!1;return!0}:a[0]}function p(a,c,d){for(var e=0,f=c.length;f>e;e++)b(a,c[e],d);return d}function q(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function r(a,b,c,e,f,g){return e&&!e[N]&&(e=r(e)),f&&!f[N]&&(f=r(f,g)),d(function(d,g,h,i){var j,k,l,m=[],n=[],o=g.length,r=d||p(b||"*",h.nodeType?[h]:h,[]),s=!a||!d&&b?r:q(r,m,a,h,i),t=c?f||(d?a:o||e)?[]:g:s;if(c&&c(s,t,h,i),e)for(j=q(t,n),e(j,[],h,i),k=j.length;k--;)(l=j[k])&&(t[n[k]]=!(s[n[k]]=l));if(d){if(f||a){if(f){for(j=[],k=t.length;k--;)(l=t[k])&&j.push(s[k]=l);f(null,t=[],j,i)}for(k=t.length;k--;)(l=t[k])&&(j=f?ba.call(d,l):m[k])>-1&&(d[j]=!(g[j]=l))}}else t=q(t===g?t.splice(o,t.length):t),f?f(null,g,t,i):_.apply(g,t)})}function s(a){for(var b,c,d,e=a.length,f=w.relative[a[0].type],g=f||w.relative[" "],h=f?1:0,i=n(function(a){return a===b},g,!0),j=n(function(a){return ba.call(b,a)>-1},g,!0),k=[function(a,c,d){return!f&&(d||c!==C)||((b=c).nodeType?i(a,c,d):j(a,c,d))}];e>h;h++)if(c=w.relative[a[h].type])k=[n(o(k),c)];else{if(c=w.filter[a[h].type].apply(null,a[h].matches),c[N]){for(d=++h;e>d&&!w.relative[a[d].type];d++);return r(h>1&&o(k),h>1&&m(a.slice(0,h-1).concat({value:" "===a[h-2].type?"*":""})).replace(ia,"$1"),c,d>h&&s(a.slice(h,d)),e>d&&s(a=a.slice(d)),e>d&&m(a))}k.push(c)}return o(k)}function t(a,c){var e=c.length>0,f=a.length>0,g=function(d,g,h,i,j){var k,l,m,n=0,o="0",p=d&&[],r=[],s=C,t=d||f&&w.find.TAG("*",j),u=P+=null==s?1:Math.random()||.1,v=t.length;for(j&&(C=g!==G&&g);o!==v&&null!=(k=t[o]);o++){if(f&&k){for(l=0;m=a[l++];)if(m(k,g,h)){i.push(k);break}j&&(P=u)}e&&((k=!m&&k)&&n--,d&&p.push(k))}if(n+=o,e&&o!==n){for(l=0;m=c[l++];)m(p,r,g,h);if(d){if(n>0)for(;o--;)p[o]||r[o]||(r[o]=Z.call(i));r=q(r)}_.apply(i,r),j&&!d&&r.length>0&&n+c.length>1&&b.uniqueSort(i)}return j&&(P=u,C=s),p};return e?d(g):g}var u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N="sizzle"+-new Date,O=a.document,P=0,Q=0,R=c(),S=c(),T=c(),U=function(a,b){return a===b&&(E=!0),0},V="undefined",W=1<<31,X={}.hasOwnProperty,Y=[],Z=Y.pop,$=Y.push,_=Y.push,aa=Y.slice,ba=Y.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},ca="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",da="[\\x20\\t\\r\\n\\f]",ea="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",fa=ea.replace("w","w#"),ga="\\["+da+"*("+ea+")(?:"+da+"*([*^$|!~]?=)"+da+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+fa+"))|)"+da+"*\\]",ha=":("+ea+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ga+")*)|.*)\\)|)",ia=new RegExp("^"+da+"+|((?:^|[^\\\\])(?:\\\\.)*)"+da+"+$","g"),ja=new RegExp("^"+da+"*,"+da+"*"),ka=new RegExp("^"+da+"*([>+~]|"+da+")"+da+"*"),la=new RegExp("="+da+"*([^\\]'\"]*?)"+da+"*\\]","g"),ma=new RegExp(ha),na=new RegExp("^"+fa+"$"),oa={ID:new RegExp("^#("+ea+")"),CLASS:new RegExp("^\\.("+ea+")"),TAG:new RegExp("^("+ea.replace("w","w*")+")"),ATTR:new RegExp("^"+ga),PSEUDO:new RegExp("^"+ha),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+da+"*(even|odd|(([+-]|)(\\d*)n|)"+da+"*(?:([+-]|)"+da+"*(\\d+)|))"+da+"*\\)|)","i"),bool:new RegExp("^(?:"+ca+")$","i"),needsContext:new RegExp("^"+da+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+da+"*((?:-\\d)?\\d*)"+da+"*\\)|)(?=[^-]|$)","i")},pa=/^(?:input|select|textarea|button)$/i,qa=/^h\d$/i,ra=/^[^{]+\{\s*\[native \w/,sa=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ta=/[+~]/,ua=/'|\\/g,va=new RegExp("\\\\([\\da-f]{1,6}"+da+"?|("+da+")|.)","ig"),wa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{_.apply(Y=aa.call(O.childNodes),O.childNodes),Y[O.childNodes.length].nodeType}catch(xa){_={apply:Y.length?function(a,b){$.apply(a,aa.call(b))}:function(a,b){for(var c=a.length,d=0;a[c++]=b[d++];);a.length=c-1}}}v=b.support={},y=b.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},F=b.setDocument=function(a){var b,c=a?a.ownerDocument||a:O,d=c.defaultView;return c!==G&&9===c.nodeType&&c.documentElement?(G=c,H=c.documentElement,I=!y(c),d&&d!==d.top&&(d.addEventListener?d.addEventListener("unload",function(){F()},!1):d.attachEvent&&d.attachEvent("onunload",function(){F()})),v.attributes=e(function(a){return a.className="i",!a.getAttribute("className")}),v.getElementsByTagName=e(function(a){return a.appendChild(c.createComment("")),!a.getElementsByTagName("*").length}),v.getElementsByClassName=ra.test(c.getElementsByClassName)&&e(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),v.getById=e(function(a){return H.appendChild(a).id=N,!c.getElementsByName||!c.getElementsByName(N).length}),v.getById?(w.find.ID=function(a,b){if(typeof b.getElementById!==V&&I){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},w.filter.ID=function(a){var b=a.replace(va,wa);return function(a){return a.getAttribute("id")===b}}):(delete w.find.ID,w.filter.ID=function(a){var b=a.replace(va,wa);return function(a){var c=typeof a.getAttributeNode!==V&&a.getAttributeNode("id");return c&&c.value===b}}),w.find.TAG=v.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==V?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){for(;c=f[e++];)1===c.nodeType&&d.push(c);return d}return f},w.find.CLASS=v.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==V&&I?b.getElementsByClassName(a):void 0},K=[],J=[],(v.qsa=ra.test(c.querySelectorAll))&&(e(function(a){a.innerHTML="<select msallowclip=''><option selected=''></option></select>",a.querySelectorAll("[msallowclip^='']").length&&J.push("[*^$]="+da+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||J.push("\\["+da+"*(?:value|"+ca+")"),a.querySelectorAll(":checked").length||J.push(":checked")}),e(function(a){var b=c.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&J.push("name"+da+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||J.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),J.push(",.*:")})),(v.matchesSelector=ra.test(L=H.matches||H.webkitMatchesSelector||H.mozMatchesSelector||H.oMatchesSelector||H.msMatchesSelector))&&e(function(a){v.disconnectedMatch=L.call(a,"div"),L.call(a,"[s!='']:x"),K.push("!=",ha)}),J=J.length&&new RegExp(J.join("|")),K=K.length&&new RegExp(K.join("|")),b=ra.test(H.compareDocumentPosition),M=b||ra.test(H.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1},U=b?function(a,b){if(a===b)return E=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!v.sortDetached&&b.compareDocumentPosition(a)===d?a===c||a.ownerDocument===O&&M(O,a)?-1:b===c||b.ownerDocument===O&&M(O,b)?1:D?ba.call(D,a)-ba.call(D,b):0:4&d?-1:1)}:function(a,b){if(a===b)return E=!0,0;var d,e=0,f=a.parentNode,h=b.parentNode,i=[a],j=[b];if(!f||!h)return a===c?-1:b===c?1:f?-1:h?1:D?ba.call(D,a)-ba.call(D,b):0;if(f===h)return g(a,b);for(d=a;d=d.parentNode;)i.unshift(d);for(d=b;d=d.parentNode;)j.unshift(d);for(;i[e]===j[e];)e++;return e?g(i[e],j[e]):i[e]===O?-1:j[e]===O?1:0},c):G},b.matches=function(a,c){return b(a,null,null,c)},b.matchesSelector=function(a,c){if((a.ownerDocument||a)!==G&&F(a),c=c.replace(la,"='$1']"),v.matchesSelector&&I&&(!K||!K.test(c))&&(!J||!J.test(c)))try{var d=L.call(a,c);if(d||v.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return b(c,G,null,[a]).length>0},b.contains=function(a,b){return(a.ownerDocument||a)!==G&&F(a),M(a,b)},b.attr=function(a,b){(a.ownerDocument||a)!==G&&F(a);var c=w.attrHandle[b.toLowerCase()],d=c&&X.call(w.attrHandle,b.toLowerCase())?c(a,b,!I):void 0;return void 0!==d?d:v.attributes||!I?a.getAttribute(b):(d=a.getAttributeNode(b))&&d.specified?d.value:null},b.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},b.uniqueSort=function(a){var b,c=[],d=0,e=0;if(E=!v.detectDuplicates,D=!v.sortStable&&a.slice(0),a.sort(U),E){for(;b=a[e++];)b===a[e]&&(d=c.push(e));for(;d--;)a.splice(c[d],1)}return D=null,a},x=b.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(1===e||9===e||11===e){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=x(a)}else if(3===e||4===e)return a.nodeValue}else for(;b=a[d++];)c+=x(b);return c},w=b.selectors={cacheLength:50,createPseudo:d,match:oa,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(va,wa),a[3]=(a[3]||a[4]||a[5]||"").replace(va,wa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||b.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&b.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return oa.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&ma.test(c)&&(b=z(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(va,wa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=R[a+" "];return b||(b=new RegExp("(^|"+da+")"+a+"("+da+"|$)"))&&R(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==V&&a.getAttribute("class")||"")})},ATTR:function(a,c,d){return function(e){var f=b.attr(e,a);return null==f?"!="===c:c?(f+="","="===c?f===d:"!="===c?f!==d:"^="===c?d&&0===f.indexOf(d):"*="===c?d&&f.indexOf(d)>-1:"$="===c?d&&f.slice(-d.length)===d:"~="===c?(" "+f+" ").indexOf(d)>-1:"|="===c?f===d||f.slice(0,d.length+1)===d+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){for(;p;){for(l=b;l=l[p];)if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){for(k=q[N]||(q[N]={}),j=k[a]||[],n=j[0]===P&&j[1],m=j[0]===P&&j[2],l=n&&q.childNodes[n];l=++n&&l&&l[p]||(m=n=0)||o.pop();)if(1===l.nodeType&&++m&&l===b){k[a]=[P,n,m];break}}else if(s&&(j=(b[N]||(b[N]={}))[a])&&j[0]===P)m=j[1];else for(;(l=++n&&l&&l[p]||(m=n=0)||o.pop())&&((h?l.nodeName.toLowerCase()!==r:1!==l.nodeType)||!++m||(s&&((l[N]||(l[N]={}))[a]=[P,m]),l!==b)););return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,c){var e,f=w.pseudos[a]||w.setFilters[a.toLowerCase()]||b.error("unsupported pseudo: "+a);return f[N]?f(c):f.length>1?(e=[a,a,"",c],w.setFilters.hasOwnProperty(a.toLowerCase())?d(function(a,b){for(var d,e=f(a,c),g=e.length;g--;)d=ba.call(a,e[g]),a[d]=!(b[d]=e[g])}):function(a){return f(a,0,e)}):f}},pseudos:{not:d(function(a){var b=[],c=[],e=A(a.replace(ia,"$1"));return e[N]?d(function(a,b,c,d){for(var f,g=e(a,null,d,[]),h=a.length;h--;)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,d,f){return b[0]=a,e(b,null,f,c),!c.pop()}}),has:d(function(a){return function(c){return b(a,c).length>0}}),contains:d(function(a){return function(b){return(b.textContent||b.innerText||x(b)).indexOf(a)>-1}}),lang:d(function(a){return na.test(a||"")||b.error("unsupported lang: "+a),a=a.replace(va,wa).toLowerCase(),function(b){var c;do if(c=I?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===H},focus:function(a){return a===G.activeElement&&(!G.hasFocus||G.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!w.pseudos.empty(a)},header:function(a){return qa.test(a.nodeName)},input:function(a){return pa.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:j(function(){return[0]}),last:j(function(a,b){return[b-1]}),eq:j(function(a,b,c){return[0>c?c+b:c]}),even:j(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:j(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:j(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:j(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},w.pseudos.nth=w.pseudos.eq;for(u in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[u]=h(u);for(u in{submit:!0,reset:!0})w.pseudos[u]=i(u);return l.prototype=w.filters=w.pseudos,w.setFilters=new l,z=b.tokenize=function(a,c){var d,e,f,g,h,i,j,k=S[a+" "];if(k)return c?0:k.slice(0);for(h=a,i=[],j=w.preFilter;h;){(!d||(e=ja.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),d=!1,(e=ka.exec(h))&&(d=e.shift(),f.push({value:d,type:e[0].replace(ia," ")}),h=h.slice(d.length));for(g in w.filter)!(e=oa[g].exec(h))||j[g]&&!(e=j[g](e))||(d=e.shift(),f.push({value:d,type:g,matches:e }),h=h.slice(d.length));if(!d)break}return c?h.length:h?b.error(a):S(a,i).slice(0)},A=b.compile=function(a,b){var c,d=[],e=[],f=T[a+" "];if(!f){for(b||(b=z(a)),c=b.length;c--;)f=s(b[c]),f[N]?d.push(f):e.push(f);f=T(a,t(e,d)),f.selector=a}return f},B=b.select=function(a,b,c,d){var e,f,g,h,i,j="function"==typeof a&&a,l=!d&&z(a=j.selector||a);if(c=c||[],1===l.length){if(f=l[0]=l[0].slice(0),f.length>2&&"ID"===(g=f[0]).type&&v.getById&&9===b.nodeType&&I&&w.relative[f[1].type]){if(b=(w.find.ID(g.matches[0].replace(va,wa),b)||[])[0],!b)return c;j&&(b=b.parentNode),a=a.slice(f.shift().value.length)}for(e=oa.needsContext.test(a)?0:f.length;e--&&(g=f[e],!w.relative[h=g.type]);)if((i=w.find[h])&&(d=i(g.matches[0].replace(va,wa),ta.test(f[0].type)&&k(b.parentNode)||b))){if(f.splice(e,1),a=d.length&&m(f),!a)return _.apply(c,d),c;break}}return(j||A(a,l))(d,b,!I,c,ta.test(a)&&k(b.parentNode)||b),c},v.sortStable=N.split("").sort(U).join("")===N,v.detectDuplicates=!!E,F(),v.sortDetached=e(function(a){return 1&a.compareDocumentPosition(G.createElement("div"))}),e(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||f("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),v.attributes&&e(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||f("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),e(function(a){return null==a.getAttribute("disabled")})||f(ca,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),b}(a);ea.find=ja,ea.expr=ja.selectors,ea.expr[":"]=ea.expr.pseudos,ea.unique=ja.uniqueSort,ea.text=ja.getText,ea.isXMLDoc=ja.isXML,ea.contains=ja.contains;var ka=ea.expr.match.needsContext,la=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,ma=/^.[^:#\[\.,]*$/;ea.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?ea.find.matchesSelector(d,a)?[d]:[]:ea.find.matches(a,ea.grep(b,function(a){return 1===a.nodeType}))},ea.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(ea(a).filter(function(){for(b=0;e>b;b++)if(ea.contains(d[b],this))return!0}));for(b=0;e>b;b++)ea.find(a,d[b],c);return c=this.pushStack(e>1?ea.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(d(this,a||[],!1))},not:function(a){return this.pushStack(d(this,a||[],!0))},is:function(a){return!!d(this,"string"==typeof a&&ka.test(a)?ea(a):a||[],!1).length}});var na,oa=a.document,pa=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,qa=ea.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:pa.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||na).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof ea?b[0]:b,ea.merge(this,ea.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:oa,!0)),la.test(c[1])&&ea.isPlainObject(b))for(c in b)ea.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=oa.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return na.find(a);this.length=1,this[0]=d}return this.context=oa,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):ea.isFunction(a)?"undefined"!=typeof na.ready?na.ready(a):a(ea):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),ea.makeArray(a,this))};qa.prototype=ea.fn,na=ea(oa);var ra=/^(?:parents|prev(?:Until|All))/,sa={children:!0,contents:!0,next:!0,prev:!0};ea.extend({dir:function(a,b,c){for(var d=[],e=a[b];e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!ea(e).is(c));)1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),ea.fn.extend({has:function(a){var b,c=ea(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(ea.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=ka.test(a)||"string"!=typeof a?ea(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&ea.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?ea.unique(f):f)},index:function(a){return a?"string"==typeof a?ea.inArray(this[0],ea(a)):ea.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(ea.unique(ea.merge(this.get(),ea(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}}),ea.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return ea.dir(a,"parentNode")},parentsUntil:function(a,b,c){return ea.dir(a,"parentNode",c)},next:function(a){return e(a,"nextSibling")},prev:function(a){return e(a,"previousSibling")},nextAll:function(a){return ea.dir(a,"nextSibling")},prevAll:function(a){return ea.dir(a,"previousSibling")},nextUntil:function(a,b,c){return ea.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return ea.dir(a,"previousSibling",c)},siblings:function(a){return ea.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return ea.sibling(a.firstChild)},contents:function(a){return ea.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:ea.merge([],a.childNodes)}},function(a,b){ea.fn[a]=function(c,d){var e=ea.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=ea.filter(d,e)),this.length>1&&(sa[a]||(e=ea.unique(e)),ra.test(a)&&(e=e.reverse())),this.pushStack(e)}});var ta=/\S+/g,ua={};ea.Callbacks=function(a){a="string"==typeof a?ua[a]||f(a):ea.extend({},a);var b,c,d,e,g,h,i=[],j=!a.once&&[],k=function(f){for(c=a.memory&&f,d=!0,g=h||0,h=0,e=i.length,b=!0;i&&e>g;g++)if(i[g].apply(f[0],f[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,i&&(j?j.length&&k(j.shift()):c?i=[]:l.disable())},l={add:function(){if(i){var d=i.length;!function f(b){ea.each(b,function(b,c){var d=ea.type(c);"function"===d?a.unique&&l.has(c)||i.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=i.length:c&&(h=d,k(c))}return this},remove:function(){return i&&ea.each(arguments,function(a,c){for(var d;(d=ea.inArray(c,i,d))>-1;)i.splice(d,1),b&&(e>=d&&e--,g>=d&&g--)}),this},has:function(a){return a?ea.inArray(a,i)>-1:!(!i||!i.length)},empty:function(){return i=[],e=0,this},disable:function(){return i=j=c=void 0,this},disabled:function(){return!i},lock:function(){return j=void 0,c||l.disable(),this},locked:function(){return!j},fireWith:function(a,c){return!i||d&&!j||(c=c||[],c=[a,c.slice?c.slice():c],b?j.push(c):k(c)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!d}};return l},ea.extend({Deferred:function(a){var b=[["resolve","done",ea.Callbacks("once memory"),"resolved"],["reject","fail",ea.Callbacks("once memory"),"rejected"],["notify","progress",ea.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return ea.Deferred(function(c){ea.each(b,function(b,f){var g=ea.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&ea.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?ea.extend(a,d):d}},e={};return d.pipe=d.then,ea.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b,c,d,e=0,f=X.call(arguments),g=f.length,h=1!==g||a&&ea.isFunction(a.promise)?g:0,i=1===h?a:ea.Deferred(),j=function(a,c,d){return function(e){c[a]=this,d[a]=arguments.length>1?X.call(arguments):e,d===b?i.notifyWith(c,d):--h||i.resolveWith(c,d)}};if(g>1)for(b=new Array(g),c=new Array(g),d=new Array(g);g>e;e++)f[e]&&ea.isFunction(f[e].promise)?f[e].promise().done(j(e,d,f)).fail(i.reject).progress(j(e,c,b)):--h;return h||i.resolveWith(d,f),i.promise()}});var va;ea.fn.ready=function(a){return ea.ready.promise().done(a),this},ea.extend({isReady:!1,readyWait:1,holdReady:function(a){a?ea.readyWait++:ea.ready(!0)},ready:function(a){if(a===!0?!--ea.readyWait:!ea.isReady){if(!oa.body)return setTimeout(ea.ready);ea.isReady=!0,a!==!0&&--ea.readyWait>0||(va.resolveWith(oa,[ea]),ea.fn.triggerHandler&&(ea(oa).triggerHandler("ready"),ea(oa).off("ready")))}}}),ea.ready.promise=function(b){if(!va)if(va=ea.Deferred(),"complete"===oa.readyState)setTimeout(ea.ready);else if(oa.addEventListener)oa.addEventListener("DOMContentLoaded",h,!1),a.addEventListener("load",h,!1);else{oa.attachEvent("onreadystatechange",h),a.attachEvent("onload",h);var c=!1;try{c=null==a.frameElement&&oa.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!ea.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}g(),ea.ready()}}()}return va.promise(b)};var wa,xa="undefined";for(wa in ea(ca))break;ca.ownLast="0"!==wa,ca.inlineBlockNeedsLayout=!1,ea(function(){var a,b,c,d;c=oa.getElementsByTagName("body")[0],c&&c.style&&(b=oa.createElement("div"),d=oa.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==xa&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",ca.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=oa.createElement("div");if(null==ca.deleteExpando){ca.deleteExpando=!0;try{delete a.test}catch(b){ca.deleteExpando=!1}}a=null}(),ea.acceptData=function(a){var b=ea.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var ya=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,za=/([A-Z])/g;ea.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?ea.cache[a[ea.expando]]:a[ea.expando],!!a&&!j(a)},data:function(a,b,c){return k(a,b,c)},removeData:function(a,b){return l(a,b)},_data:function(a,b,c){return k(a,b,c,!0)},_removeData:function(a,b){return l(a,b,!0)}}),ea.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=ea.data(f),1===f.nodeType&&!ea._data(f,"parsedAttrs"))){for(c=g.length;c--;)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=ea.camelCase(d.slice(5)),i(f,d,e[d])));ea._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){ea.data(this,a)}):arguments.length>1?this.each(function(){ea.data(this,a,b)}):f?i(f,a,ea.data(f,a)):void 0},removeData:function(a){return this.each(function(){ea.removeData(this,a)})}}),ea.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=ea._data(a,b),c&&(!d||ea.isArray(c)?d=ea._data(a,b,ea.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=ea.queue(a,b),d=c.length,e=c.shift(),f=ea._queueHooks(a,b),g=function(){ea.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return ea._data(a,c)||ea._data(a,c,{empty:ea.Callbacks("once memory").add(function(){ea._removeData(a,b+"queue"),ea._removeData(a,c)})})}}),ea.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?ea.queue(this[0],a):void 0===b?this:this.each(function(){var c=ea.queue(this,a,b);ea._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&ea.dequeue(this,a)})},dequeue:function(a){return this.each(function(){ea.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=ea.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};for("string"!=typeof a&&(b=a,a=void 0),a=a||"fx";g--;)c=ea._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Aa=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Ba=["Top","Right","Bottom","Left"],Ca=function(a,b){return a=b||a,"none"===ea.css(a,"display")||!ea.contains(a.ownerDocument,a)},Da=ea.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===ea.type(c)){e=!0;for(h in c)ea.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,ea.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(ea(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},Ea=/^(?:checkbox|radio)$/i;!function(){var a=oa.createElement("input"),b=oa.createElement("div"),c=oa.createDocumentFragment();if(b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",ca.leadingWhitespace=3===b.firstChild.nodeType,ca.tbody=!b.getElementsByTagName("tbody").length,ca.htmlSerialize=!!b.getElementsByTagName("link").length,ca.html5Clone="<:nav></:nav>"!==oa.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),ca.appendChecked=a.checked,b.innerHTML="<textarea>x</textarea>",ca.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",ca.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,ca.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){ca.noCloneEvent=!1}),b.cloneNode(!0).click()),null==ca.deleteExpando){ca.deleteExpando=!0;try{delete b.test}catch(d){ca.deleteExpando=!1}}}(),function(){var b,c,d=oa.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(ca[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),ca[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var Fa=/^(?:input|select|textarea)$/i,Ga=/^key/,Ha=/^(?:mouse|pointer|contextmenu)|click/,Ia=/^(?:focusinfocus|focusoutblur)$/,Ja=/^([^.]*)(?:\.(.+)|)$/;ea.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=ea._data(a);if(q){for(c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=ea.guid++),(g=q.events)||(g=q.events={}),(k=q.handle)||(k=q.handle=function(a){return typeof ea===xa||a&&ea.event.triggered===a.type?void 0:ea.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(ta)||[""],h=b.length;h--;)f=Ja.exec(b[h])||[],n=p=f[1],o=(f[2]||"").split(".").sort(),n&&(j=ea.event.special[n]||{},n=(e?j.delegateType:j.bindType)||n,j=ea.event.special[n]||{},l=ea.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&ea.expr.match.needsContext.test(e),namespace:o.join(".")},i),(m=g[n])||(m=g[n]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,o,k)!==!1||(a.addEventListener?a.addEventListener(n,k,!1):a.attachEvent&&a.attachEvent("on"+n,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),ea.event.global[n]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=ea.hasData(a)&&ea._data(a);if(q&&(k=q.events)){for(b=(b||"").match(ta)||[""],j=b.length;j--;)if(h=Ja.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){for(l=ea.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=k[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;f--;)g=m[f],!e&&p!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||ea.removeEvent(a,n,q.handle),delete k[n])}else for(n in k)ea.event.remove(a,n+b[j],c,d,!0);ea.isEmptyObject(k)&&(delete q.handle,ea._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,j,k,l,m=[d||oa],n=ba.call(b,"type")?b.type:b,o=ba.call(b,"namespace")?b.namespace.split("."):[];if(h=k=d=d||oa,3!==d.nodeType&&8!==d.nodeType&&!Ia.test(n+ea.event.triggered)&&(n.indexOf(".")>=0&&(o=n.split("."),n=o.shift(),o.sort()),g=n.indexOf(":")<0&&"on"+n,b=b[ea.expando]?b:new ea.Event(n,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=o.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:ea.makeArray(c,[b]),j=ea.event.special[n]||{},e||!j.trigger||j.trigger.apply(d,c)!==!1)){if(!e&&!j.noBubble&&!ea.isWindow(d)){for(i=j.delegateType||n,Ia.test(i+n)||(h=h.parentNode);h;h=h.parentNode)m.push(h),k=h;k===(d.ownerDocument||oa)&&m.push(k.defaultView||k.parentWindow||a)}for(l=0;(h=m[l++])&&!b.isPropagationStopped();)b.type=l>1?i:j.bindType||n,f=(ea._data(h,"events")||{})[b.type]&&ea._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&ea.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=n,!e&&!b.isDefaultPrevented()&&(!j._default||j._default.apply(m.pop(),c)===!1)&&ea.acceptData(d)&&g&&d[n]&&!ea.isWindow(d)){k=d[g],k&&(d[g]=null),ea.event.triggered=n;try{d[n]()}catch(p){}ea.event.triggered=void 0,k&&(d[g]=k)}return b.result}},dispatch:function(a){a=ea.event.fix(a);var b,c,d,e,f,g=[],h=X.call(arguments),i=(ea._data(this,"events")||{})[a.type]||[],j=ea.event.special[a.type]||{};if(h[0]=a,a.delegateTarget=this,!j.preDispatch||j.preDispatch.call(this,a)!==!1){for(g=ea.event.handlers.call(this,a,i),b=0;(e=g[b++])&&!a.isPropagationStopped();)for(a.currentTarget=e.elem,f=0;(d=e.handlers[f++])&&!a.isImmediatePropagationStopped();)(!a.namespace_re||a.namespace_re.test(d.namespace))&&(a.handleObj=d,a.data=d.data,c=((ea.event.special[d.origType]||{}).handle||d.handler).apply(e.elem,h),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()));return j.postDispatch&&j.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?ea(c,this).index(i)>=0:ea.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[ea.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];for(g||(this.fixHooks[e]=g=Ha.test(e)?this.mouseHooks:Ga.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new ea.Event(f),b=d.length;b--;)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||oa),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||oa,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==o()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===o()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return ea.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return ea.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=ea.extend(new ea.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?ea.event.trigger(e,null,b):ea.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},ea.removeEvent=oa.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===xa&&(a[d]=null),a.detachEvent(d,c))},ea.Event=function(a,b){return this instanceof ea.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?m:n):this.type=a,b&&ea.extend(this,b),this.timeStamp=a&&a.timeStamp||ea.now(),void(this[ea.expando]=!0)):new ea.Event(a,b)},ea.Event.prototype={isDefaultPrevented:n,isPropagationStopped:n,isImmediatePropagationStopped:n,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=m,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=m,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=m,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},ea.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){ea.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!ea.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),ca.submitBubbles||(ea.event.special.submit={setup:function(){return ea.nodeName(this,"form")?!1:void ea.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=ea.nodeName(b,"input")||ea.nodeName(b,"button")?b.form:void 0;c&&!ea._data(c,"submitBubbles")&&(ea.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),ea._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&ea.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return ea.nodeName(this,"form")?!1:void ea.event.remove(this,"._submit")}}),ca.changeBubbles||(ea.event.special.change={setup:function(){return Fa.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(ea.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),ea.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),ea.event.simulate("change",this,a,!0)})),!1):void ea.event.add(this,"beforeactivate._change",function(a){var b=a.target;Fa.test(b.nodeName)&&!ea._data(b,"changeBubbles")&&(ea.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||ea.event.simulate("change",this.parentNode,a,!0)}),ea._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return ea.event.remove(this,"._change"),!Fa.test(this.nodeName)}}),ca.focusinBubbles||ea.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){ea.event.simulate(b,a.target,ea.event.fix(a),!0)};ea.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=ea._data(d,b);e||d.addEventListener(a,c,!0),ea._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=ea._data(d,b)-1;e?ea._data(d,b,e):(d.removeEventListener(a,c,!0),ea._removeData(d,b))}}}),ea.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=n;else if(!d)return this;return 1===e&&(g=d,d=function(a){return ea().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=ea.guid++)),this.each(function(){ea.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,ea(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=n),this.each(function(){ea.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){ea.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?ea.event.trigger(a,b,c,!0):void 0}});var Ka="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",La=/ jQuery\d+="(?:null|\d+)"/g,Ma=new RegExp("<(?:"+Ka+")[\\s/>]","i"),Na=/^\s+/,Oa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Pa=/<([\w:]+)/,Qa=/<tbody/i,Ra=/<|&#?\w+;/,Sa=/<(?:script|style|link)/i,Ta=/checked\s*(?:[^=]|=\s*.checked.)/i,Ua=/^$|\/(?:java|ecma)script/i,Va=/^true\/(.*)/,Wa=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Xa={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:ca.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},Ya=p(oa),Za=Ya.appendChild(oa.createElement("div"));Xa.optgroup=Xa.option,Xa.tbody=Xa.tfoot=Xa.colgroup=Xa.caption=Xa.thead,Xa.th=Xa.td,ea.extend({clone:function(a,b,c){var d,e,f,g,h,i=ea.contains(a.ownerDocument,a);if(ca.html5Clone||ea.isXMLDoc(a)||!Ma.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(Za.innerHTML=a.outerHTML,Za.removeChild(f=Za.firstChild)),!(ca.noCloneEvent&&ca.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||ea.isXMLDoc(a)))for(d=q(f),h=q(a),g=0;null!=(e=h[g]);++g)d[g]&&x(e,d[g]);if(b)if(c)for(h=h||q(a),d=d||q(f),g=0;null!=(e=h[g]);g++)w(e,d[g]);else w(a,f);return d=q(f,"script"),d.length>0&&v(d,!i&&q(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,l=a.length,m=p(b),n=[],o=0;l>o;o++)if(f=a[o],f||0===f)if("object"===ea.type(f))ea.merge(n,f.nodeType?[f]:f);else if(Ra.test(f)){for(h=h||m.appendChild(b.createElement("div")),i=(Pa.exec(f)||["",""])[1].toLowerCase(),k=Xa[i]||Xa._default,h.innerHTML=k[1]+f.replace(Oa,"<$1></$2>")+k[2],e=k[0];e--;)h=h.lastChild;if(!ca.leadingWhitespace&&Na.test(f)&&n.push(b.createTextNode(Na.exec(f)[0])),!ca.tbody)for(f="table"!==i||Qa.test(f)?"<table>"!==k[1]||Qa.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;e--;)ea.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j);for(ea.merge(n,h.childNodes),h.textContent="";h.firstChild;)h.removeChild(h.firstChild);h=m.lastChild}else n.push(b.createTextNode(f));for(h&&m.removeChild(h),ca.appendChecked||ea.grep(q(n,"input"),r),o=0;f=n[o++];)if((!d||-1===ea.inArray(f,d))&&(g=ea.contains(f.ownerDocument,f),h=q(m.appendChild(f),"script"),g&&v(h),c))for(e=0;f=h[e++];)Ua.test(f.type||"")&&c.push(f);return h=null,m},cleanData:function(a,b){for(var c,d,e,f,g=0,h=ea.expando,i=ea.cache,j=ca.deleteExpando,k=ea.event.special;null!=(c=a[g]);g++)if((b||ea.acceptData(c))&&(e=c[h],f=e&&i[e])){if(f.events)for(d in f.events)k[d]?ea.event.remove(c,d):ea.removeEvent(c,d,f.handle);i[e]&&(delete i[e],j?delete c[h]:typeof c.removeAttribute!==xa?c.removeAttribute(h):c[h]=null,W.push(e))}}}),ea.fn.extend({text:function(a){return Da(this,function(a){return void 0===a?ea.text(this):this.empty().append((this[0]&&this[0].ownerDocument||oa).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=s(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=s(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?ea.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||ea.cleanData(q(c)),c.parentNode&&(b&&ea.contains(c.ownerDocument,c)&&v(q(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){for(1===a.nodeType&&ea.cleanData(q(a,!1));a.firstChild;)a.removeChild(a.firstChild);a.options&&ea.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return ea.clone(this,a,b)})},html:function(a){return Da(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(La,""):void 0;if("string"==typeof a&&!Sa.test(a)&&(ca.htmlSerialize||!Ma.test(a))&&(ca.leadingWhitespace||!Na.test(a))&&!Xa[(Pa.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Oa,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(ea.cleanData(q(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,ea.cleanData(q(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=Y.apply([],a);var c,d,e,f,g,h,i=0,j=this.length,k=this,l=j-1,m=a[0],n=ea.isFunction(m);if(n||j>1&&"string"==typeof m&&!ca.checkClone&&Ta.test(m))return this.each(function(c){var d=k.eq(c);n&&(a[0]=m.call(this,c,d.html())),d.domManip(a,b)});if(j&&(h=ea.buildFragment(a,this[0].ownerDocument,!1,this),c=h.firstChild,1===h.childNodes.length&&(h=c),c)){for(f=ea.map(q(h,"script"),t),e=f.length;j>i;i++)d=h,i!==l&&(d=ea.clone(d,!0,!0),e&&ea.merge(f,q(d,"script"))),b.call(this[i],d,i);if(e)for(g=f[f.length-1].ownerDocument,ea.map(f,u),i=0;e>i;i++)d=f[i],Ua.test(d.type||"")&&!ea._data(d,"globalEval")&&ea.contains(g,d)&&(d.src?ea._evalUrl&&ea._evalUrl(d.src):ea.globalEval((d.text||d.textContent||d.innerHTML||"").replace(Wa,"")));h=c=null}return this}}),ea.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){ea.fn[a]=function(a){for(var c,d=0,e=[],f=ea(a),g=f.length-1;g>=d;d++)c=d===g?this:this.clone(!0),ea(f[d])[b](c),Z.apply(e,c.get());return this.pushStack(e)}});var $a,_a={};!function(){var a;ca.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=oa.getElementsByTagName("body")[0],c&&c.style?(b=oa.createElement("div"),d=oa.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==xa&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(oa.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var ab,bb,cb=/^margin/,db=new RegExp("^("+Aa+")(?!px)[a-z%]+$","i"),eb=/^(top|right|bottom|left)$/;a.getComputedStyle?(ab=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},bb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||ab(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||ea.contains(a.ownerDocument,a)||(g=ea.style(a,b)),db.test(g)&&cb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)), void 0===g?g:g+""}):oa.documentElement.currentStyle&&(ab=function(a){return a.currentStyle},bb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||ab(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),db.test(g)&&!eb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"}),function(){function b(){var b,c,d,e;c=oa.getElementsByTagName("body")[0],c&&c.style&&(b=oa.createElement("div"),d=oa.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",f=g=!1,i=!0,a.getComputedStyle&&(f="1%"!==(a.getComputedStyle(b,null)||{}).top,g="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,e=b.appendChild(oa.createElement("div")),e.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",e.style.marginRight=e.style.width="0",b.style.width="1px",i=!parseFloat((a.getComputedStyle(e,null)||{}).marginRight)),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",e=b.getElementsByTagName("td"),e[0].style.cssText="margin:0;border:0;padding:0;display:none",h=0===e[0].offsetHeight,h&&(e[0].style.display="",e[1].style.display="none",h=0===e[0].offsetHeight),c.removeChild(d))}var c,d,e,f,g,h,i;c=oa.createElement("div"),c.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",e=c.getElementsByTagName("a")[0],d=e&&e.style,d&&(d.cssText="float:left;opacity:.5",ca.opacity="0.5"===d.opacity,ca.cssFloat=!!d.cssFloat,c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",ca.clearCloneStyle="content-box"===c.style.backgroundClip,ca.boxSizing=""===d.boxSizing||""===d.MozBoxSizing||""===d.WebkitBoxSizing,ea.extend(ca,{reliableHiddenOffsets:function(){return null==h&&b(),h},boxSizingReliable:function(){return null==g&&b(),g},pixelPosition:function(){return null==f&&b(),f},reliableMarginRight:function(){return null==i&&b(),i}}))}(),ea.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var fb=/alpha\([^)]*\)/i,gb=/opacity\s*=\s*([^)]*)/,hb=/^(none|table(?!-c[ea]).+)/,ib=new RegExp("^("+Aa+")(.*)$","i"),jb=new RegExp("^([+-])=("+Aa+")","i"),kb={position:"absolute",visibility:"hidden",display:"block"},lb={letterSpacing:"0",fontWeight:"400"},mb=["Webkit","O","Moz","ms"];ea.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":ca.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=ea.camelCase(b),i=a.style;if(b=ea.cssProps[h]||(ea.cssProps[h]=B(i,h)),g=ea.cssHooks[b]||ea.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=jb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(ea.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||ea.cssNumber[h]||(c+="px"),ca.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=ea.camelCase(b);return b=ea.cssProps[h]||(ea.cssProps[h]=B(a.style,h)),g=ea.cssHooks[b]||ea.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=bb(a,b,d)),"normal"===f&&b in lb&&(f=lb[b]),""===c||c?(e=parseFloat(f),c===!0||ea.isNumeric(e)?e||0:f):f}}),ea.each(["height","width"],function(a,b){ea.cssHooks[b]={get:function(a,c,d){return c?hb.test(ea.css(a,"display"))&&0===a.offsetWidth?ea.swap(a,kb,function(){return F(a,b,d)}):F(a,b,d):void 0},set:function(a,c,d){var e=d&&ab(a);return D(a,c,d?E(a,b,d,ca.boxSizing&&"border-box"===ea.css(a,"boxSizing",!1,e),e):0)}}}),ca.opacity||(ea.cssHooks.opacity={get:function(a,b){return gb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=ea.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===ea.trim(f.replace(fb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=fb.test(f)?f.replace(fb,e):f+" "+e)}}),ea.cssHooks.marginRight=A(ca.reliableMarginRight,function(a,b){return b?ea.swap(a,{display:"inline-block"},bb,[a,"marginRight"]):void 0}),ea.each({margin:"",padding:"",border:"Width"},function(a,b){ea.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+Ba[d]+b]=f[d]||f[d-2]||f[0];return e}},cb.test(a)||(ea.cssHooks[a+b].set=D)}),ea.fn.extend({css:function(a,b){return Da(this,function(a,b,c){var d,e,f={},g=0;if(ea.isArray(b)){for(d=ab(a),e=b.length;e>g;g++)f[b[g]]=ea.css(a,b[g],!1,d);return f}return void 0!==c?ea.style(a,b,c):ea.css(a,b)},a,b,arguments.length>1)},show:function(){return C(this,!0)},hide:function(){return C(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){Ca(this)?ea(this).show():ea(this).hide()})}}),ea.Tween=G,G.prototype={constructor:G,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(ea.cssNumber[c]?"":"px")},cur:function(){var a=G.propHooks[this.prop];return a&&a.get?a.get(this):G.propHooks._default.get(this)},run:function(a){var b,c=G.propHooks[this.prop];return this.options.duration?this.pos=b=ea.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):G.propHooks._default.set(this),this}},G.prototype.init.prototype=G.prototype,G.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=ea.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){ea.fx.step[a.prop]?ea.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[ea.cssProps[a.prop]]||ea.cssHooks[a.prop])?ea.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},G.propHooks.scrollTop=G.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},ea.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},ea.fx=G.prototype.init,ea.fx.step={};var nb,ob,pb=/^(?:toggle|show|hide)$/,qb=new RegExp("^(?:([+-])=|)("+Aa+")([a-z%]*)$","i"),rb=/queueHooks$/,sb=[K],tb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=qb.exec(b),f=e&&e[3]||(ea.cssNumber[a]?"":"px"),g=(ea.cssNumber[a]||"px"!==f&&+d)&&qb.exec(ea.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,ea.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};ea.Animation=ea.extend(M,{tweener:function(a,b){ea.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],tb[c]=tb[c]||[],tb[c].unshift(b)},prefilter:function(a,b){b?sb.unshift(a):sb.push(a)}}),ea.speed=function(a,b,c){var d=a&&"object"==typeof a?ea.extend({},a):{complete:c||!c&&b||ea.isFunction(a)&&a,duration:a,easing:c&&b||b&&!ea.isFunction(b)&&b};return d.duration=ea.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in ea.fx.speeds?ea.fx.speeds[d.duration]:ea.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){ea.isFunction(d.old)&&d.old.call(this),d.queue&&ea.dequeue(this,d.queue)},d},ea.fn.extend({fadeTo:function(a,b,c,d){return this.filter(Ca).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=ea.isEmptyObject(a),f=ea.speed(b,c,d),g=function(){var b=M(this,ea.extend({},a),f);(e||ea._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=ea.timers,g=ea._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&rb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&ea.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=ea._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=ea.timers,g=d?d.length:0;for(c.finish=!0,ea.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),ea.each(["toggle","show","hide"],function(a,b){var c=ea.fn[b];ea.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(I(b,!0),a,d,e)}}),ea.each({slideDown:I("show"),slideUp:I("hide"),slideToggle:I("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){ea.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),ea.timers=[],ea.fx.tick=function(){var a,b=ea.timers,c=0;for(nb=ea.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||ea.fx.stop(),nb=void 0},ea.fx.timer=function(a){ea.timers.push(a),a()?ea.fx.start():ea.timers.pop()},ea.fx.interval=13,ea.fx.start=function(){ob||(ob=setInterval(ea.fx.tick,ea.fx.interval))},ea.fx.stop=function(){clearInterval(ob),ob=null},ea.fx.speeds={slow:600,fast:200,_default:400},ea.fn.delay=function(a,b){return a=ea.fx?ea.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=oa.createElement("div"),b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=oa.createElement("select"),e=c.appendChild(oa.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",ca.getSetAttribute="t"!==b.className,ca.style=/top/.test(d.getAttribute("style")),ca.hrefNormalized="/a"===d.getAttribute("href"),ca.checkOn=!!a.value,ca.optSelected=e.selected,ca.enctype=!!oa.createElement("form").enctype,c.disabled=!0,ca.optDisabled=!e.disabled,a=oa.createElement("input"),a.setAttribute("value",""),ca.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),ca.radioValue="t"===a.value}();var ub=/\r/g;ea.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=ea.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,ea(this).val()):a,null==e?e="":"number"==typeof e?e+="":ea.isArray(e)&&(e=ea.map(e,function(a){return null==a?"":a+""})),b=ea.valHooks[this.type]||ea.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=ea.valHooks[e.type]||ea.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(ub,""):null==c?"":c)}}}),ea.extend({valHooks:{option:{get:function(a){var b=ea.find.attr(a,"value");return null!=b?b:ea.trim(ea.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],(c.selected||i===e)&&(ca.optDisabled?!c.disabled:null===c.getAttribute("disabled"))&&(!c.parentNode.disabled||!ea.nodeName(c.parentNode,"optgroup"))){if(b=ea(c).val(),f)return b;g.push(b)}return g},set:function(a,b){for(var c,d,e=a.options,f=ea.makeArray(b),g=e.length;g--;)if(d=e[g],ea.inArray(ea.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),ea.each(["radio","checkbox"],function(){ea.valHooks[this]={set:function(a,b){return ea.isArray(b)?a.checked=ea.inArray(ea(a).val(),b)>=0:void 0}},ca.checkOn||(ea.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var vb,wb,xb=ea.expr.attrHandle,yb=/^(?:checked|selected)$/i,zb=ca.getSetAttribute,Ab=ca.input;ea.fn.extend({attr:function(a,b){return Da(this,ea.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){ea.removeAttr(this,a)})}}),ea.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===xa?ea.prop(a,b,c):(1===f&&ea.isXMLDoc(a)||(b=b.toLowerCase(),d=ea.attrHooks[b]||(ea.expr.match.bool.test(b)?wb:vb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=ea.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void ea.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(ta);if(f&&1===a.nodeType)for(;c=f[e++];)d=ea.propFix[c]||c,ea.expr.match.bool.test(c)?Ab&&zb||!yb.test(c)?a[d]=!1:a[ea.camelCase("default-"+c)]=a[d]=!1:ea.attr(a,c,""),a.removeAttribute(zb?c:d)},attrHooks:{type:{set:function(a,b){if(!ca.radioValue&&"radio"===b&&ea.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),wb={set:function(a,b,c){return b===!1?ea.removeAttr(a,c):Ab&&zb||!yb.test(c)?a.setAttribute(!zb&&ea.propFix[c]||c,c):a[ea.camelCase("default-"+c)]=a[c]=!0,c}},ea.each(ea.expr.match.bool.source.match(/\w+/g),function(a,b){var c=xb[b]||ea.find.attr;xb[b]=Ab&&zb||!yb.test(b)?function(a,b,d){var e,f;return d||(f=xb[b],xb[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,xb[b]=f),e}:function(a,b,c){return c?void 0:a[ea.camelCase("default-"+b)]?b.toLowerCase():null}}),Ab&&zb||(ea.attrHooks.value={set:function(a,b,c){return ea.nodeName(a,"input")?void(a.defaultValue=b):vb&&vb.set(a,b,c)}}),zb||(vb={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},xb.id=xb.name=xb.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},ea.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:vb.set},ea.attrHooks.contenteditable={set:function(a,b,c){vb.set(a,""===b?!1:b,c)}},ea.each(["width","height"],function(a,b){ea.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),ca.style||(ea.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var Bb=/^(?:input|select|textarea|button|object)$/i,Cb=/^(?:a|area)$/i;ea.fn.extend({prop:function(a,b){return Da(this,ea.prop,a,b,arguments.length>1)},removeProp:function(a){return a=ea.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),ea.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!ea.isXMLDoc(a),f&&(b=ea.propFix[b]||b,e=ea.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=ea.find.attr(a,"tabindex");return b?parseInt(b,10):Bb.test(a.nodeName)||Cb.test(a.nodeName)&&a.href?0:-1}}}}),ca.hrefNormalized||ea.each(["href","src"],function(a,b){ea.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),ca.optSelected||(ea.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),ea.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ea.propFix[this.toLowerCase()]=this}),ca.enctype||(ea.propFix.enctype="encoding");var Db=/[\t\r\n\f]/g;ea.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(ea.isFunction(a))return this.each(function(b){ea(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(ta)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(Db," "):" ")){for(f=0;e=b[f++];)d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=ea.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(ea.isFunction(a))return this.each(function(b){ea(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(ta)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(Db," "):"")){for(f=0;e=b[f++];)for(;d.indexOf(" "+e+" ")>=0;)d=d.replace(" "+e+" "," ");g=a?ea.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):ea.isFunction(a)?this.each(function(c){ea(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if("string"===c)for(var b,d=0,e=ea(this),f=a.match(ta)||[];b=f[d++];)e.hasClass(b)?e.removeClass(b):e.addClass(b);else(c===xa||"boolean"===c)&&(this.className&&ea._data(this,"__className__",this.className),this.className=this.className||a===!1?"":ea._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(Db," ").indexOf(b)>=0)return!0;return!1}}),ea.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){ea.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),ea.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var Eb=ea.now(),Fb=/\?/,Gb=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;ea.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=ea.trim(b+"");return e&&!ea.trim(e.replace(Gb,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():ea.error("Invalid JSON: "+b)},ea.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||ea.error("Invalid XML: "+b),c};var Hb,Ib,Jb=/#.*$/,Kb=/([?&])_=[^&]*/,Lb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Mb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Nb=/^(?:GET|HEAD)$/,Ob=/^\/\//,Pb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Qb={},Rb={},Sb="*/".concat("*");try{Ib=location.href}catch(Tb){Ib=oa.createElement("a"),Ib.href="",Ib=Ib.href}Hb=Pb.exec(Ib.toLowerCase())||[],ea.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ib,type:"GET",isLocal:Mb.test(Hb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Sb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":ea.parseJSON,"text xml":ea.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?P(P(a,ea.ajaxSettings),b):P(ea.ajaxSettings,a)},ajaxPrefilter:N(Qb),ajaxTransport:N(Rb),ajax:function(a,b){function c(a,b,c,d){var e,k,r,s,u,w=b;2!==t&&(t=2,h&&clearTimeout(h),j=void 0,g=d||"",v.readyState=a>0?4:0,e=a>=200&&300>a||304===a,c&&(s=Q(l,v,c)),s=R(l,s,v,e),e?(l.ifModified&&(u=v.getResponseHeader("Last-Modified"),u&&(ea.lastModified[f]=u),u=v.getResponseHeader("etag"),u&&(ea.etag[f]=u)),204===a||"HEAD"===l.type?w="nocontent":304===a?w="notmodified":(w=s.state,k=s.data,r=s.error,e=!r)):(r=w,(a||!w)&&(w="error",0>a&&(a=0))),v.status=a,v.statusText=(b||w)+"",e?o.resolveWith(m,[k,w,v]):o.rejectWith(m,[v,w,r]),v.statusCode(q),q=void 0,i&&n.trigger(e?"ajaxSuccess":"ajaxError",[v,l,e?k:r]),p.fireWith(m,[v,w]),i&&(n.trigger("ajaxComplete",[v,l]),--ea.active||ea.event.trigger("ajaxStop")))}"object"==typeof a&&(b=a,a=void 0),b=b||{};var d,e,f,g,h,i,j,k,l=ea.ajaxSetup({},b),m=l.context||l,n=l.context&&(m.nodeType||m.jquery)?ea(m):ea.event,o=ea.Deferred(),p=ea.Callbacks("once memory"),q=l.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!k)for(k={};b=Lb.exec(g);)k[b[1].toLowerCase()]=b[2];b=k[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?g:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(l.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return j&&j.abort(b),c(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,l.url=((a||l.url||Ib)+"").replace(Jb,"").replace(Ob,Hb[1]+"//"),l.type=b.method||b.type||l.method||l.type,l.dataTypes=ea.trim(l.dataType||"*").toLowerCase().match(ta)||[""],null==l.crossDomain&&(d=Pb.exec(l.url.toLowerCase()),l.crossDomain=!(!d||d[1]===Hb[1]&&d[2]===Hb[2]&&(d[3]||("http:"===d[1]?"80":"443"))===(Hb[3]||("http:"===Hb[1]?"80":"443")))),l.data&&l.processData&&"string"!=typeof l.data&&(l.data=ea.param(l.data,l.traditional)),O(Qb,l,b,v),2===t)return v;i=l.global,i&&0===ea.active++&&ea.event.trigger("ajaxStart"),l.type=l.type.toUpperCase(),l.hasContent=!Nb.test(l.type),f=l.url,l.hasContent||(l.data&&(f=l.url+=(Fb.test(f)?"&":"?")+l.data,delete l.data),l.cache===!1&&(l.url=Kb.test(f)?f.replace(Kb,"$1_="+Eb++):f+(Fb.test(f)?"&":"?")+"_="+Eb++)),l.ifModified&&(ea.lastModified[f]&&v.setRequestHeader("If-Modified-Since",ea.lastModified[f]),ea.etag[f]&&v.setRequestHeader("If-None-Match",ea.etag[f])),(l.data&&l.hasContent&&l.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",l.contentType),v.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+("*"!==l.dataTypes[0]?", "+Sb+"; q=0.01":""):l.accepts["*"]);for(e in l.headers)v.setRequestHeader(e,l.headers[e]);if(l.beforeSend&&(l.beforeSend.call(m,v,l)===!1||2===t))return v.abort();u="abort";for(e in{success:1,error:1,complete:1})v[e](l[e]);if(j=O(Rb,l,b,v)){v.readyState=1,i&&n.trigger("ajaxSend",[v,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){v.abort("timeout")},l.timeout));try{t=1,j.send(r,c)}catch(w){if(!(2>t))throw w;c(-1,w)}}else c(-1,"No Transport");return v},getJSON:function(a,b,c){return ea.get(a,b,c,"json")},getScript:function(a,b){return ea.get(a,void 0,b,"script")}}),ea.each(["get","post"],function(a,b){ea[b]=function(a,c,d,e){return ea.isFunction(c)&&(e=e||d,d=c,c=void 0),ea.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),ea.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){ea.fn[b]=function(a){return this.on(b,a)}}),ea._evalUrl=function(a){return ea.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},ea.fn.extend({wrapAll:function(a){if(ea.isFunction(a))return this.each(function(b){ea(this).wrapAll(a.call(this,b))});if(this[0]){var b=ea(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){for(var a=this;a.firstChild&&1===a.firstChild.nodeType;)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return ea.isFunction(a)?this.each(function(b){ea(this).wrapInner(a.call(this,b))}):this.each(function(){var b=ea(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=ea.isFunction(a);return this.each(function(c){ea(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){ea.nodeName(this,"body")||ea(this).replaceWith(this.childNodes)}).end()}}),ea.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!ca.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||ea.css(a,"display"))},ea.expr.filters.visible=function(a){return!ea.expr.filters.hidden(a)};var Ub=/%20/g,Vb=/\[\]$/,Wb=/\r?\n/g,Xb=/^(?:submit|button|image|reset|file)$/i,Yb=/^(?:input|select|textarea|keygen)/i;ea.param=function(a,b){var c,d=[],e=function(a,b){b=ea.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=ea.ajaxSettings&&ea.ajaxSettings.traditional),ea.isArray(a)||a.jquery&&!ea.isPlainObject(a))ea.each(a,function(){e(this.name,this.value)});else for(c in a)S(c,a[c],b,e);return d.join("&").replace(Ub,"+")},ea.fn.extend({serialize:function(){return ea.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=ea.prop(this,"elements");return a?ea.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!ea(this).is(":disabled")&&Yb.test(this.nodeName)&&!Xb.test(a)&&(this.checked||!Ea.test(a))}).map(function(a,b){var c=ea(this).val();return null==c?null:ea.isArray(c)?ea.map(c,function(a){return{name:b.name,value:a.replace(Wb,"\r\n")}}):{name:b.name,value:c.replace(Wb,"\r\n")}}).get()}}),ea.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&T()||U()}:T;var Zb=0,$b={},_b=ea.ajaxSettings.xhr();a.ActiveXObject&&ea(a).on("unload",function(){for(var a in $b)$b[a](void 0,!0)}),ca.cors=!!_b&&"withCredentials"in _b,_b=ca.ajax=!!_b,_b&&ea.ajaxTransport(function(a){if(!a.crossDomain||ca.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Zb;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete $b[g],b=void 0,f.onreadystatechange=ea.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=$b[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}}),ea.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return ea.globalEval(a),a}}}),ea.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),ea.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=oa.head||ea("head")[0]||oa.documentElement;return{send:function(d,e){b=oa.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var ac=[],bc=/(=)\?(?=&|$)|\?\?/;ea.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=ac.pop()||ea.expando+"_"+Eb++;return this[a]=!0,a}}),ea.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(bc.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&bc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=ea.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(bc,"$1"+e):b.jsonp!==!1&&(b.url+=(Fb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||ea.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,ac.push(e)),g&&ea.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),ea.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||oa;var d=la.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=ea.buildFragment([a],b,e),e&&e.length&&ea(e).remove(),ea.merge([],d.childNodes))};var cc=ea.fn.load;ea.fn.load=function(a,b,c){if("string"!=typeof a&&cc)return cc.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=ea.trim(a.slice(h,a.length)),a=a.slice(0,h)),ea.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&ea.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?ea("<div>").append(ea.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},ea.expr.filters.animated=function(a){return ea.grep(ea.timers,function(b){return a===b.elem}).length};var dc=a.document.documentElement;ea.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=ea.css(a,"position"),l=ea(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=ea.css(a,"top"),i=ea.css(a,"left"),j=("absolute"===k||"fixed"===k)&&ea.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),ea.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},ea.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){ea.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,ea.contains(b,e)?(typeof e.getBoundingClientRect!==xa&&(d=e.getBoundingClientRect()),c=V(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===ea.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),ea.nodeName(a[0],"html")||(c=a.offset()),c.top+=ea.css(a[0],"borderTopWidth",!0),c.left+=ea.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-ea.css(d,"marginTop",!0),left:b.left-c.left-ea.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||dc;a&&!ea.nodeName(a,"html")&&"static"===ea.css(a,"position");)a=a.offsetParent;return a||dc})}}),ea.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);ea.fn[a]=function(d){return Da(this,function(a,d,e){var f=V(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?ea(f).scrollLeft():e,c?e:ea(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),ea.each(["top","left"],function(a,b){ea.cssHooks[b]=A(ca.pixelPosition,function(a,c){return c?(c=bb(a,b),db.test(c)?ea(a).position()[b]+"px":c):void 0})}),ea.each({Height:"height",Width:"width"},function(a,b){ea.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){ea.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return Da(this,function(b,c,d){var e;return ea.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement, Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?ea.css(b,c,g):ea.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),ea.fn.size=function(){return this.length},ea.fn.andSelf=ea.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return ea});var ec=a.jQuery,fc=a.$;return ea.noConflict=function(b){return a.$===ea&&(a.$=fc),b&&a.jQuery===ea&&(a.jQuery=ec),ea},typeof b===xa&&(a.jQuery=a.$=ea),ea}),function(){function a(a,b){if(a!==b){var c=a===a,d=b===b;if(a>b||!c||"undefined"==typeof a&&d)return 1;if(b>a||!d||"undefined"==typeof b&&c)return-1}return 0}function b(a,b,c){if(b!==b)return m(a,c);for(var d=(c||0)-1,e=a.length;++d<e;)if(a[d]===b)return d;return-1}function c(a,b){var c=a.length;for(a.sort(b);c--;)a[c]=a[c].value;return a}function d(a){return"string"==typeof a?a:null==a?"":a+""}function e(a){return a.charCodeAt(0)}function f(a,b){for(var c=-1,d=a.length;++c<d&&b.indexOf(a.charAt(c))>-1;);return c}function g(a,b){for(var c=a.length;c--&&b.indexOf(a.charAt(c))>-1;);return c}function h(b,c){return a(b.criteria,c.criteria)||b.index-c.index}function i(b,c){for(var d=-1,e=b.criteria,f=c.criteria,g=e.length;++d<g;){var h=a(e[d],f[d]);if(h)return h}return b.index-c.index}function j(a){return Ma[a]}function k(a){return Na[a]}function l(a){return"\\"+Qa[a]}function m(a,b,c){for(var d=a.length,e=c?b||d:(b||0)-1;c?e--:++e<d;){var f=a[e];if(f!==f)return e}return-1}function n(a){return a&&"object"==typeof a||!1}function o(a){return 160>=a&&a>=9&&13>=a||32==a||160==a||5760==a||6158==a||a>=8192&&(8202>=a||8232==a||8233==a||8239==a||8287==a||12288==a||65279==a)}function p(a,b){for(var c=-1,d=a.length,e=-1,f=[];++c<d;)a[c]===b&&(a[c]=O,f[++e]=c);return f}function q(a,b){for(var c,d=-1,e=a.length,f=-1,g=[];++d<e;){var h=a[d],i=b?b(h,d,a):h;d&&c===i||(c=i,g[++f]=h)}return g}function r(a){for(var b=-1,c=a.length;++b<c&&o(a.charCodeAt(b)););return b}function s(a){for(var b=a.length;b--&&o(a.charCodeAt(b)););return b}function t(a){return Oa[a]}function u(o){function V(a){if(n(a)&&!Pg(a)){if(a instanceof Z)return a;if(Tf.call(a,"__wrapped__"))return new Z(a.__wrapped__,a.__chain__,Za(a.__actions__))}return new Z(a)}function Z(a,b,c){this.__actions__=c||[],this.__chain__=!!b,this.__wrapped__=a}function _(a){this.actions=null,this.dir=1,this.dropCount=0,this.filtered=!1,this.iteratees=null,this.takeCount=vg,this.views=null,this.wrapped=a}function Ma(){var a=this.actions,b=this.iteratees,c=this.views,d=new _(this.wrapped);return d.actions=a?Za(a):null,d.dir=this.dir,d.dropCount=this.dropCount,d.filtered=this.filtered,d.iteratees=b?Za(b):null,d.takeCount=this.takeCount,d.views=c?Za(c):null,d}function Na(){var a=this.filtered,b=a?new _(this):this.clone();return b.dir=-1*this.dir,b.filtered=a,b}function Oa(){var a=this.wrapped.value();if(!Pg(a))return Ub(a,this.actions);var b=this.dir,c=0>b,d=a.length,e=pc(0,d,this.views),f=e.start,g=e.end,h=this.dropCount,i=pg(g-f,this.takeCount-h),j=c?g:f-1,k=this.iteratees,l=k?k.length:0,m=0,n=[];a:for(;d--&&i>m;){j+=b;for(var o=-1,p=a[j];++o<l;){var q=k[o],r=q.iteratee,s=r(p,j,a),t=q.type;if(t==L)p=s;else if(!s){if(t==K)continue a;break a}}h?h--:n[m++]=p}return c?n.reverse():n}function Pa(){this.__data__={}}function Qa(a){return this.has(a)&&delete this.__data__[a]}function Sa(a){return"__proto__"==a?v:this.__data__[a]}function Ta(a){return"__proto__"!=a&&Tf.call(this.__data__,a)}function Ua(a,b){return"__proto__"!=a&&(this.__data__[a]=b),this}function Va(a){var b=a?a.length:0;for(this.data={hash:lg(null),set:new eg};b--;)this.push(a[b])}function Xa(a,b){var c=a.data,d="string"==typeof b||te(b)?c.set.has(b):c.hash[b];return d?0:-1}function Ya(a){var b=this.data;"string"==typeof a||te(a)?b.set.add(a):b.hash[a]=!0}function Za(a,b){var c=-1,d=a.length;for(b||(b=Ef(d));++c<d;)b[c]=a[c];return b}function $a(a,b){for(var c=-1,d=a.length;++c<d&&b(a[c],c,a)!==!1;);return a}function _a(a,b){for(var c=a.length;c--&&b(a[c],c,a)!==!1;);return a}function ab(a,b){for(var c=-1,d=a.length;++c<d;)if(!b(a[c],c,a))return!1;return!0}function bb(a,b){for(var c=-1,d=a.length,e=-1,f=[];++c<d;){var g=a[c];b(g,c,a)&&(f[++e]=g)}return f}function cb(a,b){for(var c=-1,d=a.length,e=Ef(d);++c<d;)e[c]=b(a[c],c,a);return e}function db(a){for(var b=-1,c=a.length,d=ug;++b<c;){var e=a[b];e>d&&(d=e)}return d}function eb(a){for(var b=-1,c=a.length,d=vg;++b<c;){var e=a[b];d>e&&(d=e)}return d}function fb(a,b,c,d){var e=-1,f=a.length;for(d&&f&&(c=a[++e]);++e<f;)c=b(c,a[e],e,a);return c}function gb(a,b,c,d){var e=a.length;for(d&&e&&(c=a[--e]);e--;)c=b(c,a[e],e,a);return c}function hb(a,b){for(var c=-1,d=a.length;++c<d;)if(b(a[c],c,a))return!0;return!1}function ib(a,b){return"undefined"==typeof a?b:a}function jb(a,b,c,d){return"undefined"!=typeof a&&Tf.call(d,c)?a:b}function kb(a,b,c){var d=Tg(b);if(!c)return mb(b,a,d);for(var e=-1,f=d.length;++e<f;){var g=d[e],h=a[g],i=c(h,b[g],g,a,b);(i===i?i===h:h!==h)&&("undefined"!=typeof h||g in a)||(a[g]=i)}return a}function lb(a,b){for(var c=-1,d=a.length,e=wc(d),f=b.length,g=Ef(f);++c<f;){var h=b[c];e?(h=parseFloat(h),g[c]=uc(h,d)?a[h]:v):g[c]=a[h]}return g}function mb(a,b,c){c||(c=b,b={});for(var d=-1,e=c.length;++d<e;){var f=c[d];b[f]=a[f]}return b}function nb(a,b){for(var c=-1,d=b.length;++c<d;){var e=b[c];a[e]=ic(a[e],x,a)}return a}function ob(a,b,c){var e=typeof a;return"function"==e?"undefined"!=typeof b&&tc(a)?Xb(a,b,c):a:null==a?uf:"object"==e?Jb(a,!c):Mb(c?d(a):a)}function pb(a,b,c,d,e,f,g){var h;if(c&&(h=e?c(a,d,e):c(a)),"undefined"!=typeof h)return h;if(!te(a))return a;var i=Pg(a);if(i){if(h=qc(a),!b)return Za(a,h)}else{var j=Vf.call(a),k=j==U;if(j!=X&&j!=P&&(!k||e))return Ka[j]?sc(a,j,b):e?a:{};if(h=rc(k?{}:a),!b)return mb(a,h,Tg(a))}f||(f=[]),g||(g=[]);for(var l=f.length;l--;)if(f[l]==a)return g[l];return f.push(a),g.push(h),(i?$a:Bb)(a,function(d,e){h[e]=pb(d,b,c,e,a,f,g)}),h}function qb(a,b,c,d){if(!se(a))throw new Nf(N);return fg(function(){a.apply(v,Qb(c,d))},b)}function rb(a,c){var d=a?a.length:0,e=[];if(!d)return e;var f=-1,g=oc(),h=g==b,i=h&&c.length>=200&&Fg(c),j=c.length;i&&(g=Xa,h=!1,c=i);a:for(;++f<d;){var k=a[f];if(h&&k===k){for(var l=j;l--;)if(c[l]===k)continue a;e.push(k)}else g(c,k)<0&&e.push(k)}return e}function sb(a,b){var c=a?a.length:0;if(!wc(c))return Bb(a,b);for(var d=-1,e=Fc(a);++d<c&&b(e[d],d,e)!==!1;);return a}function tb(a,b){var c=a?a.length:0;if(!wc(c))return Cb(a,b);for(var d=Fc(a);c--&&b(d[c],c,d)!==!1;);return a}function ub(a,b){var c=!0;return sb(a,function(a,d,e){return c=!!b(a,d,e)}),c}function vb(a,b){var c=[];return sb(a,function(a,d,e){b(a,d,e)&&c.push(a)}),c}function wb(a,b,c,d){var e;return c(a,function(a,c,f){return b(a,c,f)?(e=d?c:a,!1):void 0}),e}function xb(a,b,c,d){for(var e=(d||0)-1,f=a.length,g=-1,h=[];++e<f;){var i=a[e];if(n(i)&&wc(i.length)&&(Pg(i)||le(i))){b&&(i=xb(i,b,c));var j=-1,k=i.length;for(h.length+=k;++j<k;)h[++g]=i[j]}else c||(h[++g]=i)}return h}function yb(a,b,c){for(var d=-1,e=Fc(a),f=c(a),g=f.length;++d<g;){var h=f[d];if(b(e[h],h,e)===!1)break}return a}function zb(a,b,c){for(var d=Fc(a),e=c(a),f=e.length;f--;){var g=e[f];if(b(d[g],g,d)===!1)break}return a}function Ab(a,b){return yb(a,b,Qe)}function Bb(a,b){return yb(a,b,Tg)}function Cb(a,b){return zb(a,b,Tg)}function Db(a,b){for(var c=-1,d=b.length,e=-1,f=[];++c<d;){var g=b[c];se(a[g])&&(f[++e]=g)}return f}function Eb(a,b,c){var d=-1,e="function"==typeof b,f=a?a.length:0,g=wc(f)?Ef(f):[];return sb(a,function(a){var f=e?b:null!=a&&a[b];g[++d]=f?f.apply(a,c):v}),g}function Fb(a,b,c,d,e,f){if(a===b)return 0!==a||1/a==1/b;var g=typeof a,h=typeof b;return"function"!=g&&"object"!=g&&"function"!=h&&"object"!=h||null==a||null==b?a!==a&&b!==b:Gb(a,b,Fb,c,d,e,f)}function Gb(a,b,c,d,e,f,g){var h=Pg(a),i=Pg(b),j=Q,k=Q;h||(j=Vf.call(a),j==P?j=X:j!=X&&(h=Be(a))),i||(k=Vf.call(b),k==P?k=X:k!=X&&(i=Be(b)));var l=j==X,m=k==X,n=j==k;if(n&&!h&&!l)return kc(a,b,j);var o=l&&Tf.call(a,"__wrapped__"),p=m&&Tf.call(b,"__wrapped__");if(o||p)return c(o?a.value():a,p?b.value():b,d,e,f,g);if(!n)return!1;f||(f=[]),g||(g=[]);for(var q=f.length;q--;)if(f[q]==a)return g[q]==b;f.push(a),g.push(b);var r=(h?jc:lc)(a,b,c,d,e,f,g);return f.pop(),g.pop(),r}function Hb(a,b,c,d,e){var f=b.length;if(null==a)return!f;for(var g=-1,h=!e;++g<f;)if(h&&d[g]?c[g]!==a[b[g]]:!Tf.call(a,b[g]))return!1;for(g=-1;++g<f;){var i=b[g];if(h&&d[g])var j=Tf.call(a,i);else{var k=a[i],l=c[g];j=e?e(k,l,i):v,"undefined"==typeof j&&(j=Fb(l,k,e,!0))}if(!j)return!1}return!0}function Ib(a,b){var c=[];return sb(a,function(a,d,e){c.push(b(a,d,e))}),c}function Jb(a,b){var c=Tg(a),d=c.length;if(1==d){var e=c[0],f=a[e];if(xc(f))return function(a){return null!=a&&f===a[e]&&Tf.call(a,e)}}b&&(a=pb(a,!0));for(var g=Ef(d),h=Ef(d);d--;)f=a[c[d]],g[d]=f,h[d]=xc(f);return function(a){return Hb(a,c,g,h)}}function Kb(a,b,c,d,e){var f=wc(b.length)&&(Pg(b)||Be(b));return(f?$a:Bb)(b,function(b,g,h){if(n(b))return d||(d=[]),e||(e=[]),Lb(a,h,g,Kb,c,d,e);var i=a[g],j=c?c(i,b,g,a,h):v,k="undefined"==typeof j;k&&(j=b),!f&&"undefined"==typeof j||!k&&(j===j?j===i:i!==i)||(a[g]=j)}),a}function Lb(a,b,c,d,e,f,g){for(var h=f.length,i=b[c];h--;)if(f[h]==i)return void(a[c]=g[h]);var j=a[c],k=e?e(j,i,c,a,b):v,l="undefined"==typeof k;l&&(k=i,wc(i.length)&&(Pg(i)||Be(i))?k=Pg(j)?j:j?Za(j):[]:(Rg(i)||le(i))&&(k=le(j)?Ee(j):Rg(j)?j:{})),f.push(i),g.push(k),l?a[c]=d(k,i,e,f,g):(k===k?k!==j:j===j)&&(a[c]=k)}function Mb(a){return function(b){return null==b?v:b[a]}}function Nb(b,c){var d=c.length,e=lb(b,c);for(c.sort(a);d--;){var f=parseFloat(c[d]);if(f!=g&&uc(f)){var g=f;gg.call(b,f,1)}}return e}function Ob(a,b){return a+ag(tg()*(b-a+1))}function Pb(a,b,c,d,e){return e(a,function(a,e,f){c=d?(d=!1,a):b(c,a,e,f)}),c}function Qb(a,b,c){var d=-1,e=a.length;b=null==b?0:+b||0,0>b&&(b=-b>e?0:e+b),c="undefined"==typeof c||c>e?e:+c||0,0>c&&(c+=e),e=b>c?0:c-b;for(var f=Ef(e);++d<e;)f[d]=a[d+b];return f}function Rb(a,b){var c;return sb(a,function(a,d,e){return c=b(a,d,e),!c}),!!c}function Sb(a,c){var d=-1,e=oc(),f=a.length,g=e==b,h=g&&f>=200,i=h&&Fg(),j=[];i?(e=Xa,g=!1):(h=!1,i=c?[]:j);a:for(;++d<f;){var k=a[d],l=c?c(k,d,a):k;if(g&&k===k){for(var m=i.length;m--;)if(i[m]===l)continue a;c&&i.push(l),j.push(k)}else e(i,l)<0&&((c||h)&&i.push(l),j.push(k))}return j}function Tb(a,b){for(var c=-1,d=b.length,e=Ef(d);++c<d;)e[c]=a[b[c]];return e}function Ub(a,b){var c=a;c instanceof _&&(c=c.value());for(var d=-1,e=b.length;++d<e;){var f=[c],g=b[d];cg.apply(f,g.args),c=g.func.apply(g.thisArg,f)}return c}function Vb(a,b,c){var d=0,e=a?a.length:d;if("number"==typeof b&&b===b&&yg>=e){for(;e>d;){var f=d+e>>>1,g=a[f];(c?b>=g:b>g)?d=f+1:e=f}return e}return Wb(a,b,uf,c)}function Wb(a,b,c,d){b=c(b);for(var e=0,f=a?a.length:0,g=b!==b,h="undefined"==typeof b;f>e;){var i=ag((e+f)/2),j=c(a[i]),k=j===j;if(g)var l=k||d;else l=h?k&&(d||"undefined"!=typeof j):d?b>=j:b>j;l?e=i+1:f=i}return pg(f,xg)}function Xb(a,b,c){if("function"!=typeof a)return uf;if("undefined"==typeof b)return a;switch(c){case 1:return function(c){return a.call(b,c)};case 3:return function(c,d,e){return a.call(b,c,d,e)};case 4:return function(c,d,e,f){return a.call(b,c,d,e,f)};case 5:return function(c,d,e,f,g){return a.call(b,c,d,e,f,g)}}return function(){return a.apply(b,arguments)}}function Yb(a){return Zf.call(a,0)}function Zb(a,b,c){for(var d=c.length,e=-1,f=og(a.length-d,0),g=-1,h=b.length,i=Ef(f+h);++g<h;)i[g]=b[g];for(;++e<d;)i[c[e]]=a[e];for(;f--;)i[g++]=a[e++];return i}function $b(a,b,c){for(var d=-1,e=c.length,f=-1,g=og(a.length-e,0),h=-1,i=b.length,j=Ef(g+i);++f<g;)j[f]=a[f];for(var k=f;++h<i;)j[k+h]=b[h];for(;++d<e;)j[k+c[d]]=a[f++];return j}function _b(a,b){return function(c,d,e){var f=b?b():{};if(d=nc(d,e,3),Pg(c))for(var g=-1,h=c.length;++g<h;){var i=c[g];a(f,i,d(i,g,c),c)}else sb(c,function(b,c,e){a(f,b,d(b,c,e),e)});return f}}function ac(a){return function(){var b=arguments.length,c=arguments[0];if(2>b||null==c)return c;if(b>3&&vc(arguments[1],arguments[2],arguments[3])&&(b=2),b>3&&"function"==typeof arguments[b-2])var d=Xb(arguments[--b-1],arguments[b--],5);else b>2&&"function"==typeof arguments[b-1]&&(d=arguments[--b]);for(var e=0;++e<b;){var f=arguments[e];f&&a(c,f,d)}return c}}function bc(a,b){function c(){return(this instanceof c?d:a).apply(b,arguments)}var d=dc(a);return c}function cc(a){return function(b){for(var c=-1,d=qf(_e(b)),e=d.length,f="";++c<e;)f=a(f,d[c],c);return f}}function dc(a){return function(){var b=Dg(a.prototype),c=a.apply(b,arguments);return te(c)?c:b}}function ec(a,b){return function(c,d,f){f&&vc(c,d,f)&&(d=null);var g=nc(),h=null==d;if(g===ob&&h||(h=!1,d=g(d,f,3)),h){var i=Pg(c);if(i||!Ae(c))return a(i?c:Ec(c));d=e}return mc(c,d,b)}}function fc(a,b,c,d,e,f,g,h,i,j){function k(){for(var u=arguments.length,v=u,w=Ef(u);v--;)w[v]=arguments[v];if(d&&(w=Zb(w,d,e)),f&&(w=$b(w,f,g)),o||r){var z=k.placeholder,A=p(w,z);if(u-=A.length,j>u){var B=h?Za(h):null,E=og(j-u,0),F=o?A:null,G=o?null:A,H=o?w:null,I=o?null:w;b|=o?C:D,b&=~(o?D:C),q||(b&=~(x|y));var J=fc(a,b,c,H,F,I,G,B,i,E);return J.placeholder=z,J}}var K=m?c:this;return n&&(a=K[t]),h&&(w=Bc(w,h)),l&&i<w.length&&(w.length=i),(this instanceof k?s||dc(a):a).apply(K,w)}var l=b&F,m=b&x,n=b&y,o=b&A,q=b&z,r=b&B,s=!n&&dc(a),t=a;return k}function gc(a,b,c){var e=a.length;if(b=+b,e>=b||!mg(b))return"";var f=b-e;return c=null==c?" ":d(c),hf(c,$f(f/c.length)).slice(0,f)}function hc(a,b,c,d){function e(){for(var b=-1,h=arguments.length,i=-1,j=d.length,k=Ef(h+j);++i<j;)k[i]=d[i];for(;h--;)k[i++]=arguments[++b];return(this instanceof e?g:a).apply(f?c:this,k)}var f=b&x,g=dc(a);return e}function ic(a,b,c,d,e,f,g,h){var i=b&y;if(!i&&!se(a))throw new Nf(N);var j=d?d.length:0;if(j||(b&=~(C|D),d=e=null),j-=e?e.length:0,b&D){var k=d,l=e;d=e=null}var m=!i&&Gg(a),n=[a,b,c,d,e,k,l,f,g,h];if(m&&m!==!0&&(yc(n,m),b=n[1],h=n[9]),n[9]=null==h?i?0:a.length:og(h-j,0)||0,b==x)var o=bc(n[0],n[2]);else o=b!=C&&b!=(x|C)||n[4].length?fc.apply(null,n):hc.apply(null,n);var p=m?Eg:Hg;return p(o,n)}function jc(a,b,c,d,e,f,g){var h=-1,i=a.length,j=b.length,k=!0;if(i!=j&&!(e&&j>i))return!1;for(;k&&++h<i;){var l=a[h],m=b[h];if(k=v,d&&(k=e?d(m,l,h):d(l,m,h)),"undefined"==typeof k)if(e)for(var n=j;n--&&(m=b[n],!(k=l&&l===m||c(l,m,d,e,f,g))););else k=l&&l===m||c(l,m,d,e,f,g)}return!!k}function kc(a,b,c){switch(c){case R:case S:return+a==+b;case T:return a.name==b.name&&a.message==b.message;case W:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case Y:case $:return a==d(b)}return!1}function lc(a,b,c,d,e,f,g){var h=Tg(a),i=h.length,j=Tg(b),k=j.length;if(i!=k&&!e)return!1;for(var l,m=-1;++m<i;){var n=h[m],o=Tf.call(b,n);if(o){var p=a[n],q=b[n];o=v,d&&(o=e?d(q,p,n):d(p,q,n)),"undefined"==typeof o&&(o=p&&p===q||c(p,q,d,e,f,g))}if(!o)return!1;l||(l="constructor"==n)}if(!l){var r=a.constructor,s=b.constructor;if(r!=s&&"constructor"in a&&"constructor"in b&&!("function"==typeof r&&r instanceof r&&"function"==typeof s&&s instanceof s))return!1}return!0}function mc(a,b,c){var d=c?vg:ug,e=d,f=e;return sb(a,function(a,g,h){var i=b(a,g,h);((c?e>i:i>e)||i===d&&i===f)&&(e=i,f=a)}),f}function nc(a,b,c){var d=V.callback||sf;return d=d===sf?ob:d,c?d(a,b,c):d}function oc(a,c,d){var e=V.indexOf||Sc;return e=e===Sc?b:e,a?e(a,c,d):e}function pc(a,b,c){for(var d=-1,e=c?c.length:0;++d<e;){var f=c[d],g=f.size;switch(f.type){case"drop":a+=g;break;case"dropRight":b-=g;break;case"take":b=pg(b,a+g);break;case"takeRight":a=og(a,b-g)}}return{start:a,end:b}}function qc(a){var b=a.length,c=new a.constructor(b);return b&&"string"==typeof a[0]&&Tf.call(a,"index")&&(c.index=a.index,c.input=a.input),c}function rc(a){var b=a.constructor;return"function"==typeof b&&b instanceof b||(b=Kf),new b}function sc(a,b,c){var d=a.constructor;switch(b){case aa:return Yb(a);case R:case S:return new d(+a);case ba:case ca:case da:case ea:case fa:case ga:case ha:case ia:case ja:var e=a.buffer;return new d(c?Yb(e):e,a.byteOffset,a.length);case W:case $:return new d(a);case Y:var f=new d(a.source,va.exec(a));f.lastIndex=a.lastIndex}return f}function tc(a){var b=V.support,c=!(b.funcNames?a.name:b.funcDecomp);if(!c){var d=Rf.call(a);b.funcNames||(c=!wa.test(d)),c||(c=Da.test(d)||we(a),Eg(a,c))}return c}function uc(a,b){return a=+a,b=null==b?Ag:b,a>-1&&a%1==0&&b>a}function vc(a,b,c){if(!te(c))return!1;var d=typeof b;if("number"==d)var e=c.length,f=wc(e)&&uc(b,e);else f="string"==d&&b in a;return f&&c[b]===a}function wc(a){return"number"==typeof a&&a>-1&&a%1==0&&Ag>=a}function xc(a){return a===a&&(0===a?1/a>0:!te(a))}function yc(a,b){var c=a[1],d=b[1],e=c|d,f=F|E,g=x|y,h=f|g|z|B,i=c&F&&!(d&F),j=c&E&&!(d&E),k=(j?a:b)[7],l=(i?a:b)[8],m=!(c>=E&&d>g||c>g&&d>=E),n=e>=f&&h>=e&&(E>c||(j||i)&&k.length<=l);if(!m&&!n)return a;d&x&&(a[2]=b[2],e|=c&x?0:z);var o=b[3];if(o){var q=a[3];a[3]=q?Zb(q,o,b[4]):Za(o),a[4]=q?p(a[3],O):Za(b[4])}return o=b[5],o&&(q=a[5],a[5]=q?$b(q,o,b[6]):Za(o),a[6]=q?p(a[5],O):Za(b[6])),o=b[7],o&&(a[7]=Za(o)),d&F&&(a[8]=null==a[8]?b[8]:pg(a[8],b[8])),null==a[9]&&(a[9]=b[9]),a[0]=b[0],a[1]=e,a}function zc(a,b){a=Fc(a);for(var c=-1,d=b.length,e={};++c<d;){var f=b[c];f in a&&(e[f]=a[f])}return e}function Ac(a,b){var c={};return Ab(a,function(a,d,e){b(a,d,e)&&(c[d]=a)}),c}function Bc(a,b){for(var c=a.length,d=pg(b.length,c),e=Za(a);d--;){var f=b[d];a[d]=uc(f,c)?e[f]:v}return a}function Cc(a){var b;V.support;if(!n(a)||Vf.call(a)!=X||!Tf.call(a,"constructor")&&(b=a.constructor,"function"==typeof b&&!(b instanceof b)))return!1;var c;return Ab(a,function(a,b){c=b}),"undefined"==typeof c||Tf.call(a,c)}function Dc(a){for(var b=Qe(a),c=b.length,d=c&&a.length,e=V.support,f=d&&wc(d)&&(Pg(a)||e.nonEnumArgs&&le(a)),g=-1,h=[];++g<c;){var i=b[g];(f&&uc(i,d)||Tf.call(a,i))&&h.push(i)}return h}function Ec(a){return null==a?[]:wc(a.length)?te(a)?a:Kf(a):Xe(a)}function Fc(a){return te(a)?a:Kf(a)}function Gc(a,b,c){b=(c?vc(a,b,c):null==b)?1:og(+b||1,1);for(var d=0,e=a?a.length:0,f=-1,g=Ef($f(e/b));e>d;)g[++f]=Qb(a,d,d+=b);return g}function Hc(a){for(var b=-1,c=a?a.length:0,d=-1,e=[];++b<c;){var f=a[b];f&&(e[++d]=f)}return e}function Ic(){for(var a=-1,b=arguments.length;++a<b;){var c=arguments[a];if(Pg(c)||le(c))break}return rb(c,xb(arguments,!1,!0,++a))}function Jc(a,b,c){var d=a?a.length:0;return d?((c?vc(a,b,c):null==b)&&(b=1),Qb(a,0>b?0:b)):[]}function Kc(a,b,c){var d=a?a.length:0;return d?((c?vc(a,b,c):null==b)&&(b=1),b=d-(+b||0),Qb(a,0,0>b?0:b)):[]}function Lc(a,b,c){var d=a?a.length:0;if(!d)return[];for(b=nc(b,c,3);d--&&b(a[d],d,a););return Qb(a,0,d+1)}function Mc(a,b,c){var d=a?a.length:0;if(!d)return[];var e=-1;for(b=nc(b,c,3);++e<d&&b(a[e],e,a););return Qb(a,e)}function Nc(a,b,c){var d=-1,e=a?a.length:0;for(b=nc(b,c,3);++d<e;)if(b(a[d],d,a))return d;return-1}function Oc(a,b,c){var d=a?a.length:0;for(b=nc(b,c,3);d--;)if(b(a[d],d,a))return d;return-1}function Pc(a){return a?a[0]:v}function Qc(a,b,c){var d=a?a.length:0;return c&&vc(a,b,c)&&(b=!1),d?xb(a,b):[]}function Rc(a){var b=a?a.length:0;return b?xb(a,!0):[]}function Sc(a,c,d){var e=a?a.length:0;if(!e)return-1;if("number"==typeof d)d=0>d?og(e+d,0):d||0;else if(d){var f=Vb(a,c),g=a[f];return(c===c?c===g:g!==g)?f:-1}return b(a,c,d)}function Tc(a){return Kc(a,1)}function Uc(){for(var a=[],c=-1,d=arguments.length,e=[],f=oc(),g=f==b;++c<d;){var h=arguments[c];(Pg(h)||le(h))&&(a.push(h),e.push(g&&h.length>=120&&Fg(c&&h)))}d=a.length;var i=a[0],j=-1,k=i?i.length:0,l=[],m=e[0];a:for(;++j<k;)if(h=i[j],(m?Xa(m,h):f(l,h))<0){for(c=d;--c;){var n=e[c];if((n?Xa(n,h):f(a[c],h))<0)continue a}m&&m.push(h),l.push(h)}return l}function Vc(a){var b=a?a.length:0;return b?a[b-1]:v}function Wc(a,b,c){var d=a?a.length:0;if(!d)return-1;var e=d;if("number"==typeof c)e=(0>c?og(d+c,0):pg(c||0,d-1))+1;else if(c){e=Vb(a,b,!0)-1;var f=a[e];return(b===b?b===f:f!==f)?e:-1}if(b!==b)return m(a,e,!0);for(;e--;)if(a[e]===b)return e;return-1}function Xc(){var a=arguments[0];if(!a||!a.length)return a;for(var b=0,c=oc(),d=arguments.length;++b<d;)for(var e=0,f=arguments[b];(e=c(a,f,e))>-1;)gg.call(a,e,1);return a}function Yc(a){return Nb(a||[],xb(arguments,!1,!1,1))}function Zc(a,b,c){var d=-1,e=a?a.length:0,f=[];for(b=nc(b,c,3);++d<e;){var g=a[d];b(g,d,a)&&(f.push(g),gg.call(a,d--,1),e--)}return f}function $c(a){return Jc(a,1)}function _c(a,b,c){var d=a?a.length:0;return d?(c&&"number"!=typeof c&&vc(a,b,c)&&(b=0,c=d),Qb(a,b,c)):[]}function ad(a,b,c,d){var e=nc(c);return e===ob&&null==c?Vb(a,b):Wb(a,b,e(c,d,1))}function bd(a,b,c,d){var e=nc(c);return e===ob&&null==c?Vb(a,b,!0):Wb(a,b,e(c,d,1),!0)}function cd(a,b,c){var d=a?a.length:0;return d?((c?vc(a,b,c):null==b)&&(b=1),Qb(a,0,0>b?0:b)):[]}function dd(a,b,c){var d=a?a.length:0;return d?((c?vc(a,b,c):null==b)&&(b=1),b=d-(+b||0),Qb(a,0>b?0:b)):[]}function ed(a,b,c){var d=a?a.length:0;if(!d)return[];for(b=nc(b,c,3);d--&&b(a[d],d,a););return Qb(a,d+1)}function fd(a,b,c){var d=a?a.length:0;if(!d)return[];var e=-1;for(b=nc(b,c,3);++e<d&&b(a[e],e,a););return Qb(a,0,e)}function gd(){return Sb(xb(arguments,!1,!0))}function hd(a,c,d,e){var f=a?a.length:0;if(!f)return[];"boolean"!=typeof c&&null!=c&&(e=d,d=vc(a,c,e)?null:c,c=!1);var g=nc();return(g!==ob||null!=d)&&(d=g(d,e,3)),c&&oc()==b?q(a,d):Sb(a,d)}function id(a){for(var b=-1,c=(a&&a.length&&db(cb(a,Sf)))>>>0,d=Ef(c);++b<c;)d[b]=cb(a,Mb(b));return d}function jd(a){return rb(a,Qb(arguments,1))}function kd(){for(var a=-1,b=arguments.length;++a<b;){var c=arguments[a];if(Pg(c)||le(c))var d=d?rb(d,c).concat(rb(c,d)):c}return d?Sb(d):[]}function ld(){for(var a=arguments.length,b=Ef(a);a--;)b[a]=arguments[a];return id(b)}function md(a,b){var c=-1,d=a?a.length:0,e={};for(!d||b||Pg(a[0])||(b=[]);++c<d;){var f=a[c];b?e[f]=b[c]:f&&(e[f[0]]=f[1])}return e}function nd(a){var b=V(a);return b.__chain__=!0,b}function od(a,b,c){return b.call(c,a),a}function pd(a,b,c){return b.call(c,a)}function qd(){return nd(this)}function rd(){var a=this.__wrapped__;return a instanceof _?new Z(a.reverse()):this.thru(function(a){return a.reverse()})}function sd(){return this.value()+""}function td(){return Ub(this.__wrapped__,this.__actions__)}function ud(a){var b=a?a.length:0;return wc(b)&&(a=Ec(a)),lb(a,xb(arguments,!1,!1,1))}function vd(a,b,c){var d=a?a.length:0;return wc(d)||(a=Xe(a),d=a.length),d?(c="number"==typeof c?0>c?og(d+c,0):c||0:0,"string"==typeof a||!Pg(a)&&Ae(a)?d>c&&a.indexOf(b,c)>-1:oc(a,b,c)>-1):!1}function wd(a,b,c){var d=Pg(a)?ab:ub;return("function"!=typeof b||"undefined"!=typeof c)&&(b=nc(b,c,3)),d(a,b)}function xd(a,b,c){var d=Pg(a)?bb:vb;return b=nc(b,c,3),d(a,b)}function yd(a,b,c){if(Pg(a)){var d=Nc(a,b,c);return d>-1?a[d]:v}return b=nc(b,c,3),wb(a,b,sb)}function zd(a,b,c){return b=nc(b,c,3),wb(a,b,tb)}function Ad(a,b){return yd(a,vf(b))}function Bd(a,b,c){return"function"==typeof b&&"undefined"==typeof c&&Pg(a)?$a(a,b):sb(a,Xb(b,c,3))}function Cd(a,b,c){return"function"==typeof b&&"undefined"==typeof c&&Pg(a)?_a(a,b):tb(a,Xb(b,c,3))}function Dd(a,b){return Eb(a,b,Qb(arguments,2))}function Ed(a,b,c){var d=Pg(a)?cb:Ib;return b=nc(b,c,3),d(a,b)}function Fd(a,b){return Ed(a,zf(b))}function Gd(a,b,c,d){var e=Pg(a)?fb:Pb;return e(a,nc(b,d,4),c,arguments.length<3,sb)}function Hd(a,b,c,d){var e=Pg(a)?gb:Pb;return e(a,nc(b,d,4),c,arguments.length<3,tb)}function Id(a,b,c){var d=Pg(a)?bb:vb;return b=nc(b,c,3),d(a,function(a,c,d){return!b(a,c,d)})}function Jd(a,b,c){if(c?vc(a,b,c):null==b){a=Ec(a);var d=a.length;return d>0?a[Ob(0,d-1)]:v}var e=Kd(a);return e.length=pg(0>b?0:+b||0,e.length),e}function Kd(a){a=Ec(a);for(var b=-1,c=a.length,d=Ef(c);++b<c;){var e=Ob(0,b);b!=e&&(d[b]=d[e]),d[e]=a[b]}return d}function Ld(a){var b=a?a.length:0;return wc(b)?b:Tg(a).length}function Md(a,b,c){var d=Pg(a)?hb:Rb;return("function"!=typeof b||"undefined"!=typeof c)&&(b=nc(b,c,3)),d(a,b)}function Nd(a,b,d){var e=-1,f=a?a.length:0,g=wc(f)?Ef(f):[];return d&&vc(a,b,d)&&(b=null),b=nc(b,d,3),sb(a,function(a,c,d){g[++e]={criteria:b(a,c,d),index:e,value:a}}),c(g,h)}function Od(a){var b=arguments;b.length>3&&vc(b[1],b[2],b[3])&&(b=[a,b[1]]);var d=-1,e=a?a.length:0,f=xb(b,!1,!1,1),g=wc(e)?Ef(e):[];return sb(a,function(a,b,c){for(var e=f.length,h=Ef(e);e--;)h[e]=null==a?v:a[f[e]];g[++d]={criteria:h,index:d,value:a}}),c(g,i)}function Pd(a,b){return xd(a,vf(b))}function Qd(a,b){if(!se(b)){if(!se(a))throw new Nf(N);var c=a;a=b,b=c}return a=mg(a=+a)?a:0,function(){return--a<1?b.apply(this,arguments):void 0}}function Rd(a,b,c){return c&&vc(a,b,c)&&(b=null),b=a&&null==b?a.length:og(+b||0,0),ic(a,F,null,null,null,null,b)}function Sd(a,b){var c;if(!se(b)){if(!se(a))throw new Nf(N);var d=a;a=b,b=d}return function(){return--a>0?c=b.apply(this,arguments):b=null,c}}function Td(a,b){var c=x;if(arguments.length>2){var d=Qb(arguments,2),e=p(d,Td.placeholder);c|=C}return ic(a,c,b,d,e)}function Ud(a){return nb(a,arguments.length>1?xb(arguments,!1,!1,1):Ne(a))}function Vd(a,b){var c=x|y;if(arguments.length>2){var d=Qb(arguments,2),e=p(d,Vd.placeholder);c|=C}return ic(b,c,a,d,e)}function Wd(a,b,c){c&&vc(a,b,c)&&(b=null);var d=ic(a,A,null,null,null,null,null,b);return d.placeholder=Wd.placeholder,d}function Xd(a,b,c){c&&vc(a,b,c)&&(b=null);var d=ic(a,B,null,null,null,null,null,b);return d.placeholder=Xd.placeholder,d}function Yd(a,b,c){function d(){m&&_f(m),i&&_f(i),i=m=n=v}function e(){var c=b-(Og()-k);if(0>=c||c>b){i&&_f(i);var d=n;i=m=n=v,d&&(o=Og(),j=a.apply(l,h),m||i||(h=l=null))}else m=fg(e,c)}function f(){m&&_f(m),i=m=n=v,(q||p!==b)&&(o=Og(),j=a.apply(l,h),m||i||(h=l=null))}function g(){if(h=arguments,k=Og(),l=this,n=q&&(m||!r),p===!1)var c=r&&!m;else{i||r||(o=k);var d=p-(k-o),g=0>=d||d>p;g?(i&&(i=_f(i)),o=k,j=a.apply(l,h)):i||(i=fg(f,d))}return g&&m?m=_f(m):m||b===p||(m=fg(e,b)),c&&(g=!0,j=a.apply(l,h)),!g||m||i||(h=l=null),j}var h,i,j,k,l,m,n,o=0,p=!1,q=!0;if(!se(a))throw new Nf(N);if(b=0>b?0:b,c===!0){var r=!0;q=!1}else te(c)&&(r=c.leading,p="maxWait"in c&&og(+c.maxWait||0,b),q="trailing"in c?c.trailing:q);return g.cancel=d,g}function Zd(a){return qb(a,1,arguments,1)}function $d(a,b){return qb(a,b,arguments,2)}function _d(){var a=arguments,b=a.length;if(!b)return function(){};if(!ab(a,se))throw new Nf(N);return function(){for(var c=0,d=a[c].apply(this,arguments);++c<b;)d=a[c].call(this,d);return d}}function ae(){var a=arguments,b=a.length-1;if(0>b)return function(){};if(!ab(a,se))throw new Nf(N);return function(){for(var c=b,d=a[c].apply(this,arguments);c--;)d=a[c].call(this,d);return d}}function be(a,b){if(!se(a)||b&&!se(b))throw new Nf(N);var c=function(){var d=c.cache,e=b?b.apply(this,arguments):arguments[0];if(d.has(e))return d.get(e);var f=a.apply(this,arguments);return d.set(e,f),f};return c.cache=new be.Cache,c}function ce(a){if(!se(a))throw new Nf(N);return function(){return!a.apply(this,arguments)}}function de(a){return Sd(a,2)}function ee(a){var b=Qb(arguments,1),c=p(b,ee.placeholder);return ic(a,C,null,b,c)}function fe(a){var b=Qb(arguments,1),c=p(b,fe.placeholder);return ic(a,D,null,b,c)}function ge(a){var b=xb(arguments,!1,!1,1);return ic(a,E,null,null,null,b)}function he(a,b,c){var d=!0,e=!0;if(!se(a))throw new Nf(N);return c===!1?d=!1:te(c)&&(d="leading"in c?!!c.leading:d,e="trailing"in c?!!c.trailing:e),La.leading=d,La.maxWait=+b,La.trailing=e,Yd(a,b,La)}function ie(a,b){return b=null==b?uf:b,ic(b,C,null,[a],[])}function je(a,b,c,d){return"boolean"!=typeof b&&null!=b&&(d=c,c=vc(a,b,d)?null:b,b=!1),c="function"==typeof c&&Xb(c,d,1),pb(a,b,c)}function ke(a,b,c){return b="function"==typeof b&&Xb(b,c,1),pb(a,!0,b)}function le(a){var b=n(a)?a.length:v;return wc(b)&&Vf.call(a)==P||!1}function me(a){return a===!0||a===!1||n(a)&&Vf.call(a)==R||!1}function ne(a){return n(a)&&Vf.call(a)==S||!1}function oe(a){return a&&1===a.nodeType&&n(a)&&Vf.call(a).indexOf("Element")>-1||!1}function pe(a){if(null==a)return!0;var b=a.length;return wc(b)&&(Pg(a)||Ae(a)||le(a)||n(a)&&se(a.splice))?!b:!Tg(a).length}function qe(a,b,c,d){if(c="function"==typeof c&&Xb(c,d,3),!c&&xc(a)&&xc(b))return a===b;var e=c?c(a,b):v;return"undefined"==typeof e?Fb(a,b,c):!!e}function re(a){return n(a)&&"string"==typeof a.message&&Vf.call(a)==T||!1}function se(a){return"function"==typeof a||!1}function te(a){var b=typeof a;return"function"==b||a&&"object"==b||!1}function ue(a,b,c,d){var e=Tg(b),f=e.length;if(c="function"==typeof c&&Xb(c,d,3),!c&&1==f){var g=e[0],h=b[g];if(xc(h))return null!=a&&h===a[g]&&Tf.call(a,g)}for(var i=Ef(f),j=Ef(f);f--;)h=i[f]=b[e[f]],j[f]=xc(h);return Hb(a,e,i,j,c)}function ve(a){return ye(a)&&a!=+a}function we(a){return null==a?!1:Vf.call(a)==U?Xf.test(Rf.call(a)):n(a)&&ya.test(a)||!1}function xe(a){return null===a}function ye(a){return"number"==typeof a||n(a)&&Vf.call(a)==W||!1}function ze(a){return n(a)&&Vf.call(a)==Y||!1}function Ae(a){return"string"==typeof a||n(a)&&Vf.call(a)==$||!1}function Be(a){return n(a)&&wc(a.length)&&Ja[Vf.call(a)]||!1}function Ce(a){return"undefined"==typeof a}function De(a){var b=a?a.length:0;return wc(b)?b?Za(a):[]:Xe(a)}function Ee(a){return mb(a,Qe(a))}function Fe(a,b,c){var d=Dg(a);return c&&vc(a,b,c)&&(b=null),b?mb(b,d,Tg(b)):d}function Ge(a){if(null==a)return a;var b=Za(arguments);return b.push(ib),Sg.apply(v,b)}function He(a,b,c){return b=nc(b,c,3),wb(a,b,Bb,!0)}function Ie(a,b,c){return b=nc(b,c,3),wb(a,b,Cb,!0)}function Je(a,b,c){return("function"!=typeof b||"undefined"!=typeof c)&&(b=Xb(b,c,3)),yb(a,b,Qe)}function Ke(a,b,c){return b=Xb(b,c,3),zb(a,b,Qe)}function Le(a,b,c){return("function"!=typeof b||"undefined"!=typeof c)&&(b=Xb(b,c,3)),Bb(a,b)}function Me(a,b,c){return b=Xb(b,c,3),zb(a,b,Tg)}function Ne(a){return Db(a,Qe(a))}function Oe(a,b){return a?Tf.call(a,b):!1}function Pe(a,b,c){c&&vc(a,b,c)&&(b=null);for(var d=-1,e=Tg(a),f=e.length,g={};++d<f;){var h=e[d],i=a[h];b?Tf.call(g,i)?g[i].push(h):g[i]=[h]:g[i]=h}return g}function Qe(a){if(null==a)return[];te(a)||(a=Kf(a));var b=a.length;b=b&&wc(b)&&(Pg(a)||Cg.nonEnumArgs&&le(a))&&b||0;for(var c=a.constructor,d=-1,e="function"==typeof c&&c.prototype==a,f=Ef(b),g=b>0;++d<b;)f[d]=d+"";for(var h in a)g&&uc(h,b)||"constructor"==h&&(e||!Tf.call(a,h))||f.push(h);return f}function Re(a,b,c){var d={};return b=nc(b,c,3),Bb(a,function(a,c,e){d[c]=b(a,c,e)}),d}function Se(a,b,c){if(null==a)return{};if("function"!=typeof b){var d=cb(xb(arguments,!1,!1,1),Mf);return zc(a,rb(Qe(a),d))}return b=Xb(b,c,3),Ac(a,function(a,c,d){return!b(a,c,d)})}function Te(a){for(var b=-1,c=Tg(a),d=c.length,e=Ef(d);++b<d;){var f=c[b];e[b]=[f,a[f]]}return e}function Ue(a,b,c){return null==a?{}:"function"==typeof b?Ac(a,Xb(b,c,3)):zc(a,xb(arguments,!1,!1,1))}function Ve(a,b,c){var d=null==a?v:a[b];return"undefined"==typeof d&&(d=c),se(d)?d.call(a):d}function We(a,b,c,d){var e=Pg(a)||Be(a);if(b=nc(b,d,4),null==c)if(e||te(a)){var f=a.constructor;c=e?Pg(a)?new f:[]:Dg("function"==typeof f&&f.prototype)}else c={};return(e?$a:Bb)(a,function(a,d,e){return b(c,a,d,e)}),c}function Xe(a){return Tb(a,Tg(a))}function Ye(a){return Tb(a,Qe(a))}function Ze(a,b,c){c&&vc(a,b,c)&&(b=c=null);var d=null==a,e=null==b;if(null==c&&(e&&"boolean"==typeof a?(c=a,a=1):"boolean"==typeof b&&(c=b,e=!0)),d&&e&&(b=1,e=!1),a=+a||0,e?(b=a,a=0):b=+b||0,c||a%1||b%1){var f=tg();return pg(a+f*(b-a+parseFloat("1e-"+((f+"").length-1))),b)}return Ob(a,b)}function $e(a){return a=d(a),a&&a.charAt(0).toUpperCase()+a.slice(1)}function _e(a){return a=d(a),a&&a.replace(za,j)}function af(a,b,c){a=d(a),b+="";var e=a.length;return c=("undefined"==typeof c?e:pg(0>c?0:+c||0,e))-b.length,c>=0&&a.indexOf(b,c)==c}function bf(a){return a=d(a),a&&qa.test(a)?a.replace(oa,k):a}function cf(a){return a=d(a),a&&Ca.test(a)?a.replace(Ba,"\\$&"):a}function df(a,b,c){a=d(a),b=+b;var e=a.length;if(e>=b||!mg(b))return a;var f=(b-e)/2,g=ag(f),h=$f(f);return c=gc("",h,c),c.slice(0,g)+a+c}function ef(a,b,c){return a=d(a),a&&gc(a,b,c)+a}function ff(a,b,c){return a=d(a),a&&a+gc(a,b,c)}function gf(a,b,c){return c&&vc(a,b,c)&&(b=0),sg(a,b)}function hf(a,b){var c="";if(a=d(a),b=+b,1>b||!a||!mg(b))return c;do b%2&&(c+=a),b=ag(b/2),a+=a;while(b);return c}function jf(a,b,c){return a=d(a),c=null==c?0:pg(0>c?0:+c||0,a.length),a.lastIndexOf(b,c)==c}function kf(a,b,c){var e=V.templateSettings;c&&vc(a,b,c)&&(b=c=null),a=d(a),b=kb(kb({},c||b),e,jb); var f,g,h=kb(kb({},b.imports),e.imports,jb),i=Tg(h),j=Tb(h,i),k=0,m=b.interpolate||Aa,n="__p += '",o=Lf((b.escape||Aa).source+"|"+m.source+"|"+(m===ta?ua:Aa).source+"|"+(b.evaluate||Aa).source+"|$","g"),p="//# sourceURL="+("sourceURL"in b?b.sourceURL:"lodash.templateSources["+ ++Ia+"]")+"\n";a.replace(o,function(b,c,d,e,h,i){return d||(d=e),n+=a.slice(k,i).replace(Ea,l),c&&(f=!0,n+="' +\n__e("+c+") +\n'"),h&&(g=!0,n+="';\n"+h+";\n__p += '"),d&&(n+="' +\n((__t = ("+d+")) == null ? '' : __t) +\n'"),k=i+b.length,b}),n+="';\n";var q=b.variable;q||(n="with (obj) {\n"+n+"\n}\n"),n=(g?n.replace(ka,""):n).replace(la,"$1").replace(ma,"$1;"),n="function("+(q||"obj")+") {\n"+(q?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(f?", __e = _.escape":"")+(g?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+n+"return __p\n}";var r=rf(function(){return Hf(i,p+"return "+n).apply(v,j)});if(r.source=n,re(r))throw r;return r}function lf(a,b,c){var e=a;return(a=d(a))?(c?vc(e,b,c):null==b)?a.slice(r(a),s(a)+1):(b=d(b),a.slice(f(a,b),g(a,b)+1)):a}function mf(a,b,c){var e=a;return a=d(a),a?(c?vc(e,b,c):null==b)?a.slice(r(a)):a.slice(f(a,d(b))):a}function nf(a,b,c){var e=a;return a=d(a),a?(c?vc(e,b,c):null==b)?a.slice(0,s(a)+1):a.slice(0,g(a,d(b))+1):a}function of(a,b,c){c&&vc(a,b,c)&&(b=null);var e=G,f=H;if(null!=b)if(te(b)){var g="separator"in b?b.separator:g;e="length"in b?+b.length||0:e,f="omission"in b?d(b.omission):f}else e=+b||0;if(a=d(a),e>=a.length)return a;var h=e-f.length;if(1>h)return f;var i=a.slice(0,h);if(null==g)return i+f;if(ze(g)){if(a.slice(h).search(g)){var j,k,l=a.slice(0,h);for(g.global||(g=Lf(g.source,(va.exec(g)||"")+"g")),g.lastIndex=0;j=g.exec(l);)k=j.index;i=i.slice(0,null==k?h:k)}}else if(a.indexOf(g,h)!=h){var m=i.lastIndexOf(g);m>-1&&(i=i.slice(0,m))}return i+f}function pf(a){return a=d(a),a&&pa.test(a)?a.replace(na,t):a}function qf(a,b,c){return c&&vc(a,b,c)&&(b=null),a=d(a),a.match(b||Fa)||[]}function rf(a){try{return a()}catch(b){return re(b)?b:Gf(b)}}function sf(a,b,c){return c&&vc(a,b,c)&&(b=null),ob(a,b)}function tf(a){return function(){return a}}function uf(a){return a}function vf(a){return Jb(a,!0)}function wf(a,b,c){if(null==c){var d=te(b),e=d&&Tg(b),f=e&&e.length&&Db(b,e);(f?f.length:d)||(f=!1,c=b,b=a,a=this)}f||(f=Db(b,Tg(b)));var g=!0,h=-1,i=se(a),j=f.length;c===!1?g=!1:te(c)&&"chain"in c&&(g=c.chain);for(;++h<j;){var k=f[h],l=b[k];a[k]=l,i&&(a.prototype[k]=function(b){return function(){var c=this.__chain__;if(g||c){var d=a(this.__wrapped__);return(d.__actions__=Za(this.__actions__)).push({func:b,args:arguments,thisArg:a}),d.__chain__=c,d}var e=[this.value()];return cg.apply(e,arguments),b.apply(a,e)}}(l))}return a}function xf(){return o._=Wf,this}function yf(){}function zf(a){return Mb(a+"")}function Af(a){return function(b){return null==a?v:a[b]}}function Bf(a,b,c){c&&vc(a,b,c)&&(b=c=null),a=+a||0,c=null==c?1:+c||0,null==b?(b=a,a=0):b=+b||0;for(var d=-1,e=og($f((b-a)/(c||1)),0),f=Ef(e);++d<e;)f[d]=a,a+=c;return f}function Cf(a,b,c){if(a=+a,1>a||!mg(a))return[];var d=-1,e=Ef(pg(a,wg));for(b=Xb(b,c,1);++d<a;)wg>d?e[d]=b(d):b(d);return e}function Df(a){var b=++Uf;return d(a)+b}o=o?Wa.defaults(Ra.Object(),o,Wa.pick(Ra,Ha)):Ra;var Ef=o.Array,Ff=o.Date,Gf=o.Error,Hf=o.Function,If=o.Math,Jf=o.Number,Kf=o.Object,Lf=o.RegExp,Mf=o.String,Nf=o.TypeError,Of=Ef.prototype,Pf=Kf.prototype,Qf=(Qf=o.window)&&Qf.document,Rf=Hf.prototype.toString,Sf=Mb("length"),Tf=Pf.hasOwnProperty,Uf=0,Vf=Pf.toString,Wf=o._,Xf=Lf("^"+cf(Vf).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Yf=we(Yf=o.ArrayBuffer)&&Yf,Zf=we(Zf=Yf&&new Yf(0).slice)&&Zf,$f=If.ceil,_f=o.clearTimeout,ag=If.floor,bg=we(bg=Kf.getPrototypeOf)&&bg,cg=Of.push,dg=Pf.propertyIsEnumerable,eg=we(eg=o.Set)&&eg,fg=o.setTimeout,gg=Of.splice,hg=we(hg=o.Uint8Array)&&hg,ig=(Of.unshift,we(ig=o.WeakMap)&&ig),jg=function(){try{var a=we(a=o.Float64Array)&&a,b=new a(new Yf(10),0,1)&&a}catch(c){}return b}(),kg=we(kg=Ef.isArray)&&kg,lg=we(lg=Kf.create)&&lg,mg=o.isFinite,ng=we(ng=Kf.keys)&&ng,og=If.max,pg=If.min,qg=we(qg=Ff.now)&&qg,rg=we(rg=Jf.isFinite)&&rg,sg=o.parseInt,tg=If.random,ug=Jf.NEGATIVE_INFINITY,vg=Jf.POSITIVE_INFINITY,wg=If.pow(2,32)-1,xg=wg-1,yg=wg>>>1,zg=jg?jg.BYTES_PER_ELEMENT:0,Ag=If.pow(2,53)-1,Bg=ig&&new ig,Cg=V.support={};!function(a){Cg.funcDecomp=!we(o.WinRTError)&&Da.test(u),Cg.funcNames="string"==typeof Hf.name;try{Cg.dom=11===Qf.createDocumentFragment().nodeType}catch(b){Cg.dom=!1}try{Cg.nonEnumArgs=!dg.call(arguments,1)}catch(b){Cg.nonEnumArgs=!0}}(0,0),V.templateSettings={escape:ra,evaluate:sa,interpolate:ta,variable:"",imports:{_:V}};var Dg=function(){function a(){}return function(b){if(te(b)){a.prototype=b;var c=new a;a.prototype=null}return c||o.Object()}}(),Eg=Bg?function(a,b){return Bg.set(a,b),a}:uf;Zf||(Yb=Yf&&hg?function(a){var b=a.byteLength,c=jg?ag(b/zg):0,d=c*zg,e=new Yf(b);if(c){var f=new jg(e,0,c);f.set(new jg(a,0,c))}return b!=d&&(f=new hg(e,d),f.set(new hg(a,d))),e}:tf(null));var Fg=lg&&eg?function(a){return new Va(a)}:tf(null),Gg=Bg?function(a){return Bg.get(a)}:yf,Hg=function(){var a=0,b=0;return function(c,d){var e=Og(),f=J-(e-b);if(b=e,f>0){if(++a>=I)return c}else a=0;return Eg(c,d)}}(),Ig=_b(function(a,b,c){Tf.call(a,c)?++a[c]:a[c]=1}),Jg=_b(function(a,b,c){Tf.call(a,c)?a[c].push(b):a[c]=[b]}),Kg=_b(function(a,b,c){a[c]=b}),Lg=ec(db),Mg=ec(eb,!0),Ng=_b(function(a,b,c){a[c?0:1].push(b)},function(){return[[],[]]}),Og=qg||function(){return(new Ff).getTime()},Pg=kg||function(a){return n(a)&&wc(a.length)&&Vf.call(a)==Q||!1};Cg.dom||(oe=function(a){return a&&1===a.nodeType&&n(a)&&!Rg(a)||!1});var Qg=rg||function(a){return"number"==typeof a&&mg(a)};(se(/x/)||hg&&!se(hg))&&(se=function(a){return Vf.call(a)==U});var Rg=bg?function(a){if(!a||Vf.call(a)!=X)return!1;var b=a.valueOf,c=we(b)&&(c=bg(b))&&bg(c);return c?a==c||bg(a)==c:Cc(a)}:Cc,Sg=ac(kb),Tg=ng?function(a){if(a)var b=a.constructor,c=a.length;return"function"==typeof b&&b.prototype===a||"function"!=typeof a&&c&&wc(c)?Dc(a):te(a)?ng(a):[]}:Dc,Ug=ac(Kb),Vg=cc(function(a,b,c){return b=b.toLowerCase(),c?a+b.charAt(0).toUpperCase()+b.slice(1):b}),Wg=cc(function(a,b,c){return a+(c?"-":"")+b.toLowerCase()});8!=sg(Ga+"08")&&(gf=function(a,b,c){return(c?vc(a,b,c):null==b)?b=0:b&&(b=+b),a=lf(a),sg(a,b||(xa.test(a)?16:10))});var Xg=cc(function(a,b,c){return a+(c?"_":"")+b.toLowerCase()});return Z.prototype=V.prototype,Pa.prototype["delete"]=Qa,Pa.prototype.get=Sa,Pa.prototype.has=Ta,Pa.prototype.set=Ua,Va.prototype.push=Ya,be.Cache=Pa,V.after=Qd,V.ary=Rd,V.assign=Sg,V.at=ud,V.before=Sd,V.bind=Td,V.bindAll=Ud,V.bindKey=Vd,V.callback=sf,V.chain=nd,V.chunk=Gc,V.compact=Hc,V.constant=tf,V.countBy=Ig,V.create=Fe,V.curry=Wd,V.curryRight=Xd,V.debounce=Yd,V.defaults=Ge,V.defer=Zd,V.delay=$d,V.difference=Ic,V.drop=Jc,V.dropRight=Kc,V.dropRightWhile=Lc,V.dropWhile=Mc,V.filter=xd,V.flatten=Qc,V.flattenDeep=Rc,V.flow=_d,V.flowRight=ae,V.forEach=Bd,V.forEachRight=Cd,V.forIn=Je,V.forInRight=Ke,V.forOwn=Le,V.forOwnRight=Me,V.functions=Ne,V.groupBy=Jg,V.indexBy=Kg,V.initial=Tc,V.intersection=Uc,V.invert=Pe,V.invoke=Dd,V.keys=Tg,V.keysIn=Qe,V.map=Ed,V.mapValues=Re,V.matches=vf,V.memoize=be,V.merge=Ug,V.mixin=wf,V.negate=ce,V.omit=Se,V.once=de,V.pairs=Te,V.partial=ee,V.partialRight=fe,V.partition=Ng,V.pick=Ue,V.pluck=Fd,V.property=zf,V.propertyOf=Af,V.pull=Xc,V.pullAt=Yc,V.range=Bf,V.rearg=ge,V.reject=Id,V.remove=Zc,V.rest=$c,V.shuffle=Kd,V.slice=_c,V.sortBy=Nd,V.sortByAll=Od,V.take=cd,V.takeRight=dd,V.takeRightWhile=ed,V.takeWhile=fd,V.tap=od,V.throttle=he,V.thru=pd,V.times=Cf,V.toArray=De,V.toPlainObject=Ee,V.transform=We,V.union=gd,V.uniq=hd,V.unzip=id,V.values=Xe,V.valuesIn=Ye,V.where=Pd,V.without=jd,V.wrap=ie,V.xor=kd,V.zip=ld,V.zipObject=md,V.backflow=ae,V.collect=Ed,V.compose=ae,V.each=Bd,V.eachRight=Cd,V.extend=Sg,V.iteratee=sf,V.methods=Ne,V.object=md,V.select=xd,V.tail=$c,V.unique=hd,wf(V,V),V.attempt=rf,V.camelCase=Vg,V.capitalize=$e,V.clone=je,V.cloneDeep=ke,V.deburr=_e,V.endsWith=af,V.escape=bf,V.escapeRegExp=cf,V.every=wd,V.find=yd,V.findIndex=Nc,V.findKey=He,V.findLast=zd,V.findLastIndex=Oc,V.findLastKey=Ie,V.findWhere=Ad,V.first=Pc,V.has=Oe,V.identity=uf,V.includes=vd,V.indexOf=Sc,V.isArguments=le,V.isArray=Pg,V.isBoolean=me,V.isDate=ne,V.isElement=oe,V.isEmpty=pe,V.isEqual=qe,V.isError=re,V.isFinite=Qg,V.isFunction=se,V.isMatch=ue,V.isNaN=ve,V.isNative=we,V.isNull=xe,V.isNumber=ye,V.isObject=te,V.isPlainObject=Rg,V.isRegExp=ze,V.isString=Ae,V.isTypedArray=Be,V.isUndefined=Ce,V.kebabCase=Wg,V.last=Vc,V.lastIndexOf=Wc,V.max=Lg,V.min=Mg,V.noConflict=xf,V.noop=yf,V.now=Og,V.pad=df,V.padLeft=ef,V.padRight=ff,V.parseInt=gf,V.random=Ze,V.reduce=Gd,V.reduceRight=Hd,V.repeat=hf,V.result=Ve,V.runInContext=u,V.size=Ld,V.snakeCase=Xg,V.some=Md,V.sortedIndex=ad,V.sortedLastIndex=bd,V.startsWith=jf,V.template=kf,V.trim=lf,V.trimLeft=mf,V.trimRight=nf,V.trunc=of,V.unescape=pf,V.uniqueId=Df,V.words=qf,V.all=wd,V.any=Md,V.contains=vd,V.detect=yd,V.foldl=Gd,V.foldr=Hd,V.head=Pc,V.include=vd,V.inject=Gd,wf(V,function(){var a={};return Bb(V,function(b,c){V.prototype[c]||(a[c]=b)}),a}(),!1),V.sample=Jd,V.prototype.sample=function(a){return this.__chain__||null!=a?this.thru(function(b){return Jd(b,a)}):Jd(this.value())},V.VERSION=w,$a(["bind","bindKey","curry","curryRight","partial","partialRight"],function(a){V[a].placeholder=V}),$a(["filter","map","takeWhile"],function(a,b){var c=b==K;_.prototype[a]=function(a,d){var e=this.clone(),f=e.filtered,g=e.iteratees||(e.iteratees=[]);return e.filtered=f||c||b==M&&e.dir<0,g.push({iteratee:nc(a,d,3),type:b}),e}}),$a(["drop","take"],function(a,b){var c=a+"Count",d=a+"While";_.prototype[a]=function(d){d=null==d?1:og(+d||0,0);var e=this.clone();if(e.filtered){var f=e[c];e[c]=b?pg(f,d):f+d}else{var g=e.views||(e.views=[]);g.push({size:d,type:a+(e.dir<0?"Right":"")})}return e},_.prototype[a+"Right"]=function(b){return this.reverse()[a](b).reverse()},_.prototype[a+"RightWhile"]=function(a,b){return this.reverse()[d](a,b).reverse()}}),$a(["first","last"],function(a,b){var c="take"+(b?"Right":"");_.prototype[a]=function(){return this[c](1).value()[0]}}),$a(["initial","rest"],function(a,b){var c="drop"+(b?"":"Right");_.prototype[a]=function(){return this[c](1)}}),$a(["pluck","where"],function(a,b){var c=b?"filter":"map",d=b?vf:zf;_.prototype[a]=function(a){return this[c](d(a))}}),_.prototype.dropWhile=function(a,b){var c,d,e=this.dir<0;return a=nc(a,b,3),this.filter(function(b,f,g){return c=c&&(e?d>f:f>d),d=f,c||(c=!a(b,f,g))})},_.prototype.reject=function(a,b){return a=nc(a,b,3),this.filter(function(b,c,d){return!a(b,c,d)})},_.prototype.slice=function(a,b){a=null==a?0:+a||0;var c=0>a?this.takeRight(-a):this.drop(a);return"undefined"!=typeof b&&(b=+b||0,c=0>b?c.dropRight(-b):c.take(b-a)),c},Bb(_.prototype,function(a,b){var c=/^(?:first|last)$/.test(b);V.prototype[b]=function(){var d=this.__wrapped__,e=arguments,f=this.__chain__,g=!!this.__actions__.length,h=d instanceof _,i=h&&!g;if(c&&!f)return i?a.call(d):V[b](this.value());var j=function(a){var c=[a];return cg.apply(c,e),V[b].apply(V,c)};if(h||Pg(d)){var k=i?d:new _(this),l=a.apply(k,e);if(!c&&(g||l.actions)){var m=l.actions||(l.actions=[]);m.push({func:pd,args:[j],thisArg:V})}return new Z(l,f)}return this.thru(j)}}),$a(["concat","join","pop","push","shift","sort","splice","unshift"],function(a){var b=Of[a],c=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",d=/^(?:join|pop|shift)$/.test(a);V.prototype[a]=function(){var a=arguments;return d&&!this.__chain__?b.apply(this.value(),a):this[c](function(c){return b.apply(c,a)})}}),_.prototype.clone=Ma,_.prototype.reverse=Na,_.prototype.value=Oa,V.prototype.chain=qd,V.prototype.reverse=rd,V.prototype.toString=sd,V.prototype.toJSON=V.prototype.valueOf=V.prototype.value=td,V.prototype.collect=V.prototype.map,V.prototype.head=V.prototype.first,V.prototype.select=V.prototype.filter,V.prototype.tail=V.prototype.rest,V}var v,w="3.0.0",x=1,y=2,z=4,A=8,B=16,C=32,D=64,E=128,F=256,G=30,H="...",I=150,J=16,K=0,L=1,M=2,N="Expected a function",O="__lodash_placeholder__",P="[object Arguments]",Q="[object Array]",R="[object Boolean]",S="[object Date]",T="[object Error]",U="[object Function]",V="[object Map]",W="[object Number]",X="[object Object]",Y="[object RegExp]",Z="[object Set]",$="[object String]",_="[object WeakMap]",aa="[object ArrayBuffer]",ba="[object Float32Array]",ca="[object Float64Array]",da="[object Int8Array]",ea="[object Int16Array]",fa="[object Int32Array]",ga="[object Uint8Array]",ha="[object Uint8ClampedArray]",ia="[object Uint16Array]",ja="[object Uint32Array]",ka=/\b__p \+= '';/g,la=/\b(__p \+=) '' \+/g,ma=/(__e\(.*?\)|\b__t\)) \+\n'';/g,na=/&(?:amp|lt|gt|quot|#39|#96);/g,oa=/[&<>"'`]/g,pa=RegExp(na.source),qa=RegExp(oa.source),ra=/<%-([\s\S]+?)%>/g,sa=/<%([\s\S]+?)%>/g,ta=/<%=([\s\S]+?)%>/g,ua=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,va=/\w*$/,wa=/^\s*function[ \n\r\t]+\w/,xa=/^0[xX]/,ya=/^\[object .+?Constructor\]$/,za=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Aa=/($^)/,Ba=/[.*+?^${}()|[\]\/\\]/g,Ca=RegExp(Ba.source),Da=/\bthis\b/,Ea=/['\n\r\u2028\u2029\\]/g,Fa=function(){var a="[A-Z\\xc0-\\xd6\\xd8-\\xde]",b="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(a+"{2,}(?="+a+b+")|"+a+"?"+b+"|"+a+"+|[0-9]+","g")}(),Ga=" \f \ufeff\n\r\u2028\u2029 ",Ha=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","document","isFinite","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","window","WinRTError"],Ia=-1,Ja={};Ja[ba]=Ja[ca]=Ja[da]=Ja[ea]=Ja[fa]=Ja[ga]=Ja[ha]=Ja[ia]=Ja[ja]=!0,Ja[P]=Ja[Q]=Ja[aa]=Ja[R]=Ja[S]=Ja[T]=Ja[U]=Ja[V]=Ja[W]=Ja[X]=Ja[Y]=Ja[Z]=Ja[$]=Ja[_]=!1;var Ka={};Ka[P]=Ka[Q]=Ka[aa]=Ka[R]=Ka[S]=Ka[ba]=Ka[ca]=Ka[da]=Ka[ea]=Ka[fa]=Ka[W]=Ka[X]=Ka[Y]=Ka[$]=Ka[ga]=Ka[ha]=Ka[ia]=Ka[ja]=!0,Ka[T]=Ka[U]=Ka[V]=Ka[Z]=Ka[_]=!1;var La={leading:!1,maxWait:0,trailing:!1},Ma={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Na={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Oa={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Pa={"function":!0,object:!0},Qa={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ra=Pa[typeof window]&&window!==(this&&this.window)?window:this,Sa=Pa[typeof exports]&&exports&&!exports.nodeType&&exports,Ta=Pa[typeof module]&&module&&!module.nodeType&&module,Ua=Sa&&Ta&&"object"==typeof global&&global;!Ua||Ua.global!==Ua&&Ua.window!==Ua&&Ua.self!==Ua||(Ra=Ua);var Va=Ta&&Ta.exports===Sa&&Sa,Wa=u();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Ra._=Wa,define(function(){return Wa})):Sa&&Ta?Va?(Ta.exports=Wa)._=Wa:Sa._=Wa:Ra._=Wa}.call(this),function(a,b){if("function"==typeof define&&define.amd)define(["../../.","jquery","exports"],function(c,d,e){a.Backbone=b(a,e,c,d)});else if("undefined"!=typeof exports){var c=require("underscore");b(a,exports,c)}else a.Backbone=b(a,{},a._,a.jQuery||a.Zepto||a.ender||a.$)}(this,function(a,b,c,d){var e=a.Backbone,f=[],g=(f.push,f.slice);f.splice;b.VERSION="1.1.2",b.$=d,b.noConflict=function(){return a.Backbone=e,this},b.emulateHTTP=!1,b.emulateJSON=!1;var h=b.Events={on:function(a,b,c){if(!j(this,"on",a,[b,c])||!b)return this;this._events||(this._events={});var d=this._events[a]||(this._events[a]=[]);return d.push({callback:b,context:c,ctx:c||this}),this},once:function(a,b,d){if(!j(this,"once",a,[b,d])||!b)return this;var e=this,f=c.once(function(){e.off(a,f),b.apply(this,arguments)});return f._callback=b,this.on(a,f,d)},off:function(a,b,d){var e,f,g,h,i,k,l,m;if(!this._events||!j(this,"off",a,[b,d]))return this;if(!a&&!b&&!d)return this._events=void 0,this;for(h=a?[a]:c.keys(this._events),i=0,k=h.length;k>i;i++)if(a=h[i],g=this._events[a]){if(this._events[a]=e=[],b||d)for(l=0,m=g.length;m>l;l++)f=g[l],(b&&b!==f.callback&&b!==f.callback._callback||d&&d!==f.context)&&e.push(f);e.length||delete this._events[a]}return this},trigger:function(a){if(!this._events)return this;var b=g.call(arguments,1);if(!j(this,"trigger",a,b))return this;var c=this._events[a],d=this._events.all;return c&&k(c,b),d&&k(d,arguments),this},stopListening:function(a,b,d){var e=this._listeningTo;if(!e)return this;var f=!b&&!d;d||"object"!=typeof b||(d=this),a&&((e={})[a._listenId]=a);for(var g in e)a=e[g],a.off(b,d,this),(f||c.isEmpty(a._events))&&delete this._listeningTo[g];return this}},i=/\s+/,j=function(a,b,c,d){if(!c)return!0;if("object"==typeof c){for(var e in c)a[b].apply(a,[e,c[e]].concat(d));return!1}if(i.test(c)){for(var f=c.split(i),g=0,h=f.length;h>g;g++)a[b].apply(a,[f[g]].concat(d));return!1}return!0},k=function(a,b){var c,d=-1,e=a.length,f=b[0],g=b[1],h=b[2];switch(b.length){case 0:for(;++d<e;)(c=a[d]).callback.call(c.ctx);return;case 1:for(;++d<e;)(c=a[d]).callback.call(c.ctx,f);return;case 2:for(;++d<e;)(c=a[d]).callback.call(c.ctx,f,g);return;case 3:for(;++d<e;)(c=a[d]).callback.call(c.ctx,f,g,h);return;default:for(;++d<e;)(c=a[d]).callback.apply(c.ctx,b);return}},l={listenTo:"on",listenToOnce:"once"};c.each(l,function(a,b){h[b]=function(b,d,e){var f=this._listeningTo||(this._listeningTo={}),g=b._listenId||(b._listenId=c.uniqueId("l"));return f[g]=b,e||"object"!=typeof d||(e=this),b[a](d,e,this),this}}),h.bind=h.on,h.unbind=h.off,c.extend(b,h);var m=b.Model=function(a,b){var d=a||{};b||(b={}),this.cid=c.uniqueId("c"),this.attributes={},b.collection&&(this.collection=b.collection),b.parse&&(d=this.parse(d,b)||{}),d=c.defaults({},d,c.result(this,"defaults")),this.set(d,b),this.changed={},this.initialize.apply(this,arguments)};c.extend(m.prototype,h,{changed:null,validationError:null,idAttribute:"id",initialize:function(){},toJSON:function(a){return c.clone(this.attributes)},sync:function(){return b.sync.apply(this,arguments)},get:function(a){return this.attributes[a]},escape:function(a){return c.escape(this.get(a))},has:function(a){return null!=this.get(a)},set:function(a,b,d){var e,f,g,h,i,j,k,l;if(null==a)return this;if("object"==typeof a?(f=a,d=b):(f={})[a]=b,d||(d={}),!this._validate(f,d))return!1;g=d.unset,i=d.silent,h=[],j=this._changing,this._changing=!0,j||(this._previousAttributes=c.clone(this.attributes),this.changed={}),l=this.attributes,k=this._previousAttributes,this.idAttribute in f&&(this.id=f[this.idAttribute]);for(e in f)b=f[e],c.isEqual(l[e],b)||h.push(e),c.isEqual(k[e],b)?delete this.changed[e]:this.changed[e]=b,g?delete l[e]:l[e]=b;if(!i){h.length&&(this._pending=d);for(var m=0,n=h.length;n>m;m++)this.trigger("change:"+h[m],this,l[h[m]],d)}if(j)return this;if(!i)for(;this._pending;)d=this._pending,this._pending=!1,this.trigger("change",this,d);return this._pending=!1,this._changing=!1,this},unset:function(a,b){return this.set(a,void 0,c.extend({},b,{unset:!0}))},clear:function(a){var b={};for(var d in this.attributes)b[d]=void 0;return this.set(b,c.extend({},a,{unset:!0}))},hasChanged:function(a){return null==a?!c.isEmpty(this.changed):c.has(this.changed,a)},changedAttributes:function(a){if(!a)return this.hasChanged()?c.clone(this.changed):!1;var b,d=!1,e=this._changing?this._previousAttributes:this.attributes;for(var f in a)c.isEqual(e[f],b=a[f])||((d||(d={}))[f]=b);return d},previous:function(a){return null!=a&&this._previousAttributes?this._previousAttributes[a]:null},previousAttributes:function(){return c.clone(this._previousAttributes)},fetch:function(a){a=a?c.clone(a):{},void 0===a.parse&&(a.parse=!0);var b=this,d=a.success;return a.success=function(c){return b.set(b.parse(c,a),a)?(d&&d(b,c,a),void b.trigger("sync",b,c,a)):!1},L(this,a),this.sync("read",this,a)},save:function(a,b,d){var e,f,g,h=this.attributes;if(null==a||"object"==typeof a?(e=a,d=b):(e={})[a]=b,d=c.extend({validate:!0},d),e&&!d.wait){if(!this.set(e,d))return!1}else if(!this._validate(e,d))return!1;e&&d.wait&&(this.attributes=c.extend({},h,e)),void 0===d.parse&&(d.parse=!0);var i=this,j=d.success;return d.success=function(a){i.attributes=h;var b=i.parse(a,d);return d.wait&&(b=c.extend(e||{},b)),c.isObject(b)&&!i.set(b,d)?!1:(j&&j(i,a,d),void i.trigger("sync",i,a,d))},L(this,d),f=this.isNew()?"create":d.patch?"patch":"update","patch"===f&&(d.attrs=e),g=this.sync(f,this,d),e&&d.wait&&(this.attributes=h),g},destroy:function(a){a=a?c.clone(a):{};var b=this,d=a.success,e=function(){b.trigger("destroy",b,b.collection,a)};if(a.success=function(c){(a.wait||b.isNew())&&e(),d&&d(b,c,a),b.isNew()||b.trigger("sync",b,c,a)},this.isNew())return a.success(),!1;L(this,a);var f=this.sync("delete",this,a);return a.wait||e(),f},url:function(){var a=c.result(this,"urlRoot")||c.result(this.collection,"url")||K();return this.isNew()?a:a.replace(/([^\/])$/,"$1/")+encodeURIComponent(this.id)},parse:function(a,b){return a},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(a){return this._validate({},c.extend(a||{},{validate:!0}))},_validate:function(a,b){if(!b.validate||!this.validate)return!0;a=c.extend({},this.attributes,a);var d=this.validationError=this.validate(a,b)||null;return d?(this.trigger("invalid",this,d,c.extend(b,{validationError:d})),!1):!0}});var n=["keys","values","pairs","invert","pick","omit"];c.each(n,function(a){m.prototype[a]=function(){var b=g.call(arguments);return b.unshift(this.attributes),c[a].apply(c,b)}});var o=b.Collection=function(a,b){b||(b={}),b.model&&(this.model=b.model),void 0!==b.comparator&&(this.comparator=b.comparator),this._reset(),this.initialize.apply(this,arguments),a&&this.reset(a,c.extend({silent:!0},b))},p={add:!0,remove:!0,merge:!0},q={add:!0,remove:!1};c.extend(o.prototype,h,{model:m,initialize:function(){},toJSON:function(a){return this.map(function(b){return b.toJSON(a)})},sync:function(){return b.sync.apply(this,arguments)},add:function(a,b){return this.set(a,c.extend({merge:!1},b,q))},remove:function(a,b){var d=!c.isArray(a);a=d?[a]:c.clone(a),b||(b={});var e,f,g,h;for(e=0,f=a.length;f>e;e++)h=a[e]=this.get(a[e]),h&&(delete this._byId[h.id],delete this._byId[h.cid],g=this.indexOf(h),this.models.splice(g,1),this.length--,b.silent||(b.index=g,h.trigger("remove",h,this,b)),this._removeReference(h,b));return d?a[0]:a},set:function(a,b){b=c.defaults({},b,p),b.parse&&(a=this.parse(a,b));var d=!c.isArray(a);a=d?a?[a]:[]:c.clone(a);var e,f,g,h,i,j,k,l=b.at,n=this.model,o=this.comparator&&null==l&&b.sort!==!1,q=c.isString(this.comparator)?this.comparator:null,r=[],s=[],t={},u=b.add,v=b.merge,w=b.remove,x=!o&&u&&w?[]:!1;for(e=0,f=a.length;f>e;e++){if(i=a[e]||{},g=i instanceof m?h=i:i[n.prototype.idAttribute||"id"],j=this.get(g))w&&(t[j.cid]=!0),v&&(i=i===h?h.attributes:i,b.parse&&(i=j.parse(i,b)),j.set(i,b),o&&!k&&j.hasChanged(q)&&(k=!0)),a[e]=j;else if(u){if(h=a[e]=this._prepareModel(i,b),!h)continue;r.push(h),this._addReference(h,b)}h=j||h,!x||!h.isNew()&&t[h.id]||x.push(h),t[h.id]=!0}if(w){for(e=0,f=this.length;f>e;++e)t[(h=this.models[e]).cid]||s.push(h);s.length&&this.remove(s,b)}if(r.length||x&&x.length)if(o&&(k=!0),this.length+=r.length,null!=l)for(e=0,f=r.length;f>e;e++)this.models.splice(l+e,0,r[e]);else{x&&(this.models.length=0);var y=x||r;for(e=0,f=y.length;f>e;e++)this.models.push(y[e])}if(k&&this.sort({silent:!0}),!b.silent){for(e=0,f=r.length;f>e;e++)(h=r[e]).trigger("add",h,this,b);(k||x&&x.length)&&this.trigger("sort",this,b)}return d?a[0]:a},reset:function(a,b){b||(b={});for(var d=0,e=this.models.length;e>d;d++)this._removeReference(this.models[d],b);return b.previousModels=this.models,this._reset(),a=this.add(a,c.extend({silent:!0},b)),b.silent||this.trigger("reset",this,b),a},push:function(a,b){return this.add(a,c.extend({at:this.length},b))},pop:function(a){var b=this.at(this.length-1);return this.remove(b,a),b},unshift:function(a,b){return this.add(a,c.extend({at:0},b))},shift:function(a){var b=this.at(0);return this.remove(b,a),b},slice:function(){return g.apply(this.models,arguments)},get:function(a){return null==a?void 0:this._byId[a]||this._byId[a.id]||this._byId[a.cid]},at:function(a){return this.models[a]},where:function(a,b){return c.isEmpty(a)?b?void 0:[]:this[b?"find":"filter"](function(b){for(var c in a)if(a[c]!==b.get(c))return!1;return!0})},findWhere:function(a){return this.where(a,!0)},sort:function(a){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");return a||(a={}),c.isString(this.comparator)||1===this.comparator.length?this.models=this.sortBy(this.comparator,this):this.models.sort(c.bind(this.comparator,this)),a.silent||this.trigger("sort",this,a),this},pluck:function(a){return c.invoke(this.models,"get",a)},fetch:function(a){a=a?c.clone(a):{},void 0===a.parse&&(a.parse=!0);var b=a.success,d=this;return a.success=function(c){var e=a.reset?"reset":"set";d[e](c,a),b&&b(d,c,a),d.trigger("sync",d,c,a)},L(this,a),this.sync("read",this,a)},create:function(a,b){if(b=b?c.clone(b):{},!(a=this._prepareModel(a,b)))return!1;b.wait||this.add(a,b);var d=this,e=b.success;return b.success=function(a,c){b.wait&&d.add(a,b),e&&e(a,c,b)},a.save(null,b),a},parse:function(a,b){return a},clone:function(){return new this.constructor(this.models)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(a,b){if(a instanceof m)return a;b=b?c.clone(b):{},b.collection=this;var d=new this.model(a,b);return d.validationError?(this.trigger("invalid",this,d.validationError,b),!1):d},_addReference:function(a,b){this._byId[a.cid]=a,null!=a.id&&(this._byId[a.id]=a),a.collection||(a.collection=this),a.on("all",this._onModelEvent,this)},_removeReference:function(a,b){this===a.collection&&delete a.collection,a.off("all",this._onModelEvent,this)},_onModelEvent:function(a,b,c,d){("add"!==a&&"remove"!==a||c===this)&&("destroy"===a&&this.remove(b,d),b&&a==="change:"+b.idAttribute&&(delete this._byId[b.previous(b.idAttribute)],null!=b.id&&(this._byId[b.id]=b)),this.trigger.apply(this,arguments))}});var r=["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","toArray","size","first","head","take","initial","rest","tail","drop","last","without","difference","indexOf","shuffle","lastIndexOf","isEmpty","chain","sample"];c.each(r,function(a){o.prototype[a]=function(){var b=g.call(arguments);return b.unshift(this.models),c[a].apply(c,b)}});var s=["groupBy","countBy","sortBy","indexBy"];c.each(s,function(a){o.prototype[a]=function(b,d){var e=c.isFunction(b)?b:function(a){return a.get(b)};return c[a](this.models,e,d)}});var t=b.View=function(a){this.cid=c.uniqueId("view"),a||(a={}),c.extend(this,c.pick(a,v)),this._ensureElement(),this.initialize.apply(this,arguments),this.delegateEvents()},u=/^(\S+)\s*(.*)$/,v=["model","collection","el","id","attributes","className","tagName","events"];c.extend(t.prototype,h,{tagName:"div",$:function(a){return this.$el.find(a)},initialize:function(){},render:function(){return this},remove:function(){return this.$el.remove(),this.stopListening(),this},setElement:function(a,c){return this.$el&&this.undelegateEvents(),this.$el=a instanceof b.$?a:b.$(a),this.el=this.$el[0],c!==!1&&this.delegateEvents(),this},delegateEvents:function(a){if(!a&&!(a=c.result(this,"events")))return this;this.undelegateEvents();for(var b in a){var d=a[b];if(c.isFunction(d)||(d=this[a[b]]),d){var e=b.match(u),f=e[1],g=e[2];d=c.bind(d,this),f+=".delegateEvents"+this.cid,""===g?this.$el.on(f,d):this.$el.on(f,g,d)}}return this},undelegateEvents:function(){return this.$el.off(".delegateEvents"+this.cid),this},_ensureElement:function(){if(this.el)this.setElement(c.result(this,"el"),!1);else{var a=c.extend({},c.result(this,"attributes"));this.id&&(a.id=c.result(this,"id")),this.className&&(a["class"]=c.result(this,"className"));var d=b.$("<"+c.result(this,"tagName")+">").attr(a);this.setElement(d,!1)}}}),b.sync=function(a,d,e){var f=x[a];c.defaults(e||(e={}),{emulateHTTP:b.emulateHTTP,emulateJSON:b.emulateJSON});var g={type:f,dataType:"json"};if(e.url||(g.url=c.result(d,"url")||K()),null!=e.data||!d||"create"!==a&&"update"!==a&&"patch"!==a||(g.contentType="application/json",g.data=JSON.stringify(e.attrs||d.toJSON(e))),e.emulateJSON&&(g.contentType="application/x-www-form-urlencoded",g.data=g.data?{model:g.data}:{}),e.emulateHTTP&&("PUT"===f||"DELETE"===f||"PATCH"===f)){g.type="POST",e.emulateJSON&&(g.data._method=f);var h=e.beforeSend;e.beforeSend=function(a){return a.setRequestHeader("X-HTTP-Method-Override",f),h?h.apply(this,arguments):void 0}}"GET"===g.type||e.emulateJSON||(g.processData=!1),"PATCH"===g.type&&w&&(g.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")});var i=e.xhr=b.ajax(c.extend(g,e));return d.trigger("request",d,i,e),i};var w=!("undefined"==typeof window||!window.ActiveXObject||window.XMLHttpRequest&&(new XMLHttpRequest).dispatchEvent),x={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};b.ajax=function(){return b.$.ajax.apply(b.$,arguments)};var y=b.Router=function(a){a||(a={}),a.routes&&(this.routes=a.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},z=/\((.*?)\)/g,A=/(\(\?)?:\w+/g,B=/\*\w+/g,C=/[\-{}\[\]+?.,\\\^$|#\s]/g;c.extend(y.prototype,h,{initialize:function(){},route:function(a,d,e){c.isRegExp(a)||(a=this._routeToRegExp(a)),c.isFunction(d)&&(e=d,d=""),e||(e=this[d]);var f=this;return b.history.route(a,function(c){var g=f._extractParameters(a,c);f.execute(e,g),f.trigger.apply(f,["route:"+d].concat(g)),f.trigger("route",d,g),b.history.trigger("route",f,d,g)}),this},execute:function(a,b){a&&a.apply(this,b)},navigate:function(a,c){return b.history.navigate(a,c),this},_bindRoutes:function(){if(this.routes){this.routes=c.result(this,"routes");for(var a,b=c.keys(this.routes);null!=(a=b.pop());)this.route(a,this.routes[a])}},_routeToRegExp:function(a){return a=a.replace(C,"\\$&").replace(z,"(?:$1)?").replace(A,function(a,b){return b?a:"([^/?]+)"}).replace(B,"([^?]*?)"),new RegExp("^"+a+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(a,b){var d=a.exec(b).slice(1);return c.map(d,function(a,b){return b===d.length-1?a||null:a?decodeURIComponent(a):null})}});var D=b.History=function(){this.handlers=[],c.bindAll(this,"checkUrl"),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},E=/^[#\/]|\s+$/g,F=/^\/+|\/+$/g,G=/msie [\w.]+/,H=/\/$/,I=/#.*$/;D.started=!1,c.extend(D.prototype,h,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root},getHash:function(a){var b=(a||this).location.href.match(/#(.*)$/);return b?b[1]:""},getFragment:function(a,b){if(null==a)if(this._hasPushState||!this._wantsHashChange||b){a=decodeURI(this.location.pathname+this.location.search);var c=this.root.replace(H,"");a.indexOf(c)||(a=a.slice(c.length))}else a=this.getHash();return a.replace(E,"")},start:function(a){if(D.started)throw new Error("Backbone.history has already been started");D.started=!0,this.options=c.extend({root:"/"},this.options,a),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var d=this.getFragment(),e=document.documentMode,f=G.exec(navigator.userAgent.toLowerCase())&&(!e||7>=e);if(this.root=("/"+this.root+"/").replace(F,"/"),f&&this._wantsHashChange){var g=b.$('<iframe src="javascript:0" tabindex="-1">');this.iframe=g.hide().appendTo("body")[0].contentWindow,this.navigate(d); -}this._hasPushState?b.$(window).on("popstate",this.checkUrl):this._wantsHashChange&&"onhashchange"in window&&!f?b.$(window).on("hashchange",this.checkUrl):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),this.fragment=d;var h=this.location;if(this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot())return this.fragment=this.getFragment(null,!0),this.location.replace(this.root+"#"+this.fragment),!0;this._hasPushState&&this.atRoot()&&h.hash&&(this.fragment=this.getHash().replace(E,""),this.history.replaceState({},document.title,this.root+this.fragment))}return this.options.silent?void 0:this.loadUrl()},stop:function(){b.$(window).off("popstate",this.checkUrl).off("hashchange",this.checkUrl),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),D.started=!1},route:function(a,b){this.handlers.unshift({route:a,callback:b})},checkUrl:function(a){var b=this.getFragment();return b===this.fragment&&this.iframe&&(b=this.getFragment(this.getHash(this.iframe))),b===this.fragment?!1:(this.iframe&&this.navigate(b),void this.loadUrl())},loadUrl:function(a){return a=this.fragment=this.getFragment(a),c.any(this.handlers,function(b){return b.route.test(a)?(b.callback(a),!0):void 0})},navigate:function(a,b){if(!D.started)return!1;b&&b!==!0||(b={trigger:!!b});var c=this.root+(a=this.getFragment(a||""));if(a=a.replace(I,""),this.fragment!==a){if(this.fragment=a,""===a&&"/"!==c&&(c=c.slice(0,-1)),this._hasPushState)this.history[b.replace?"replaceState":"pushState"]({},document.title,c);else{if(!this._wantsHashChange)return this.location.assign(c);this._updateHash(this.location,a,b.replace),this.iframe&&a!==this.getFragment(this.getHash(this.iframe))&&(b.replace||this.iframe.document.open().close(),this._updateHash(this.iframe.location,a,b.replace))}return b.trigger?this.loadUrl(a):void 0}},_updateHash:function(a,b,c){if(c){var d=a.href.replace(/(javascript:|#).*$/,"");a.replace(d+"#"+b)}else a.hash="#"+b}}),b.history=new D;var J=function(a,b){var d,e=this;d=a&&c.has(a,"constructor")?a.constructor:function(){return e.apply(this,arguments)},c.extend(d,e,b);var f=function(){this.constructor=d};return f.prototype=e.prototype,d.prototype=new f,a&&c.extend(d.prototype,a),d.__super__=e.prototype,d};m.extend=o.extend=y.extend=t.extend=D.extend=J;var K=function(){throw new Error('A "url" property or function must be specified')},L=function(a,b){var c=b.error;b.error=function(d){c&&c(a,d,b),a.trigger("error",a,d,b)}};return b}),"object"!=typeof JSON&&(JSON={}),function(){"use strict";function f(a){return 10>a?"0"+a:a}function quote(a){return escapable.lastIndex=0,escapable.test(a)?'"'+a.replace(escapable,function(a){var b=meta[a];return"string"==typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function str(a,b){var c,d,e,f,g,h=gap,i=b[a];switch(i&&"object"==typeof i&&"function"==typeof i.toJSON&&(i=i.toJSON(a)),"function"==typeof rep&&(i=rep.call(b,a,i)),typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i)return"null";if(gap+=indent,g=[],"[object Array]"===Object.prototype.toString.apply(i)){for(f=i.length,c=0;f>c;c+=1)g[c]=str(c,i)||"null";return e=0===g.length?"[]":gap?"[\n"+gap+g.join(",\n"+gap)+"\n"+h+"]":"["+g.join(",")+"]",gap=h,e}if(rep&&"object"==typeof rep)for(f=rep.length,c=0;f>c;c+=1)"string"==typeof rep[c]&&(d=rep[c],e=str(d,i),e&&g.push(quote(d)+(gap?": ":":")+e));else for(d in i)Object.prototype.hasOwnProperty.call(i,d)&&(e=str(d,i),e&&g.push(quote(d)+(gap?": ":":")+e));return e=0===g.length?"{}":gap?"{\n"+gap+g.join(",\n"+gap)+"\n"+h+"}":"{"+g.join(",")+"}",gap=h,e}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var cx,escapable,gap,indent,meta,rep;"function"!=typeof JSON.stringify&&(escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(a,b,c){var d;if(gap="",indent="","number"==typeof c)for(d=0;c>d;d+=1)indent+=" ";else"string"==typeof c&&(indent=c);if(rep=b,b&&"function"!=typeof b&&("object"!=typeof b||"number"!=typeof b.length))throw new Error("JSON.stringify");return str("",{"":a})}),"function"!=typeof JSON.parse&&(cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,JSON.parse=function(text,reviver){function walk(a,b){var c,d,e=a[b];if(e&&"object"==typeof e)for(c in e)Object.prototype.hasOwnProperty.call(e,c)&&(d=walk(e,c),void 0!==d?e[c]=d:delete e[c]);return reviver.call(a,b,e)}var j;if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}(),function(a){"function"==typeof require&&"undefined"!=typeof module&&module.exports?module.exports=a(require("underscore")):"function"==typeof define?define(["underscore"],a):this.Cocktail=a(_)}(function(a){var b={};b.mixins={},b.mixin=function(c){var d=a.chain(arguments).toArray().rest().flatten().value(),e=c.prototype||c,f={};return a.each(d,function(c){a.isString(c)&&(c=b.mixins[c]),a.each(c,function(b,c){if(a.isFunction(b)){if(e[c]===b)return;e[c]&&(f[c]=f.hasOwnProperty(c)?f[c]:[e[c]],f[c].push(b)),e[c]=b}else a.isArray(b)?e[c]=a.union(b,e[c]||[]):a.isObject(b)?e[c]=a.extend({},b,e[c]||{}):c in e||(e[c]=b)})}),a.each(f,function(b,c){e[c]=function(){var c,d=this,e=arguments;return a.each(b,function(b){var f=a.isFunction(b)?b.apply(d,e):b;c="undefined"==typeof f?c:f}),c}}),c};var c;return b.patch=function(d){c=d.Model.extend;var e=function(a,d){var e=c.call(this,a,d),f=e.prototype.mixins;return f&&e.prototype.hasOwnProperty("mixins")&&b.mixin(e,f),e};a.each([d.Model,d.Collection,d.Router,d.View],function(c){c.mixin=function(){b.mixin(this,a.toArray(arguments))},c.extend=e})},b.unpatch=function(b){a.each([b.Model,b.Collection,b.Router,b.View],function(a){a.mixin=void 0,a.extend=c})},b});var saveAs=saveAs||function(a){"use strict";if(!("undefined"==typeof a||"undefined"!=typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent))){var b=a.document,c=function(){return a.URL||a.webkitURL||a},d=b.createElementNS("http://www.w3.org/1999/xhtml","a"),e="download"in d,f=function(a){var b=new MouseEvent("click");a.dispatchEvent(b)},g=/constructor/i.test(a.HTMLElement)||a.safari,h=/CriOS\/[\d]+/.test(navigator.userAgent),i=function(b){(a.setImmediate||a.setTimeout)(function(){throw b},0)},j="application/octet-stream",k=4e4,l=function(a){var b=function(){"string"==typeof a?c().revokeObjectURL(a):a.remove()};setTimeout(b,k)},m=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"==typeof e)try{e.call(a,c||a)}catch(f){i(f)}}},n=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob([String.fromCharCode(65279),a],{type:a.type}):a},o=function(b,i,k){k||(b=n(b));var o,p=this,q=b.type,r=q===j,s=function(){m(p,"writestart progress write writeend".split(" "))},t=function(){if((h||r&&g)&&a.FileReader){var d=new FileReader;return d.onloadend=function(){var b=h?d.result:d.result.replace(/^data:[^;]*;/,"data:attachment/file;"),c=a.open(b,"_blank");c||(a.location.href=b),b=void 0,p.readyState=p.DONE,s()},d.readAsDataURL(b),void(p.readyState=p.INIT)}if(o||(o=c().createObjectURL(b)),r)a.location.href=o;else{var e=a.open(o,"_blank");e||(a.location.href=o)}p.readyState=p.DONE,s(),l(o)};return p.readyState=p.INIT,e?(o=c().createObjectURL(b),void setTimeout(function(){d.href=o,d.download=i,f(d),s(),l(o),p.readyState=p.DONE})):void t()},p=o.prototype,q=function(a,b,c){return new o(a,b||a.name||"download",c)};return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(a,b,c){return b=b||a.name||"download",c||(a=n(a)),navigator.msSaveOrOpenBlob(a,b)}:(p.abort=function(){},p.readyState=p.INIT=0,p.WRITING=1,p.DONE=2,p.error=p.onwritestart=p.onprogress=p.onwrite=p.onabort=p.onerror=p.onwriteend=null,q)}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);"undefined"!=typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!=typeof define&&null!==define&&null!==define.amd&&define("FileSaver.js",function(){return saveAs}),function(a,b){if("object"==typeof exports)module.exports=b(require("underscore"),require("backbone"));else if("function"==typeof define&&define.amd)define(["underscore","backbone"],b);else{for(var c="FilteredCollection",d=c.split("."),e=a,f=0;f<d.length-1;f++)void 0===e[d[f]]&&(e[d[f]]={}),e=e[d[f]];e[d[d.length-1]]=b(a._,a.Backbone)}}(this,function(a,b){function c(c){return{underscore:a,backbone:b}[c]}var d=function(a){function b(a){var c=b.cache[a];if(!c){var d={};c=b.cache[a]={id:a,exports:d},b.modules[a].call(d,c,d)}return c.exports}return b.cache=[],b.modules=[function(a,d){function e(){this._filterResultCache={}}function f(a){for(var b in this._filterResultCache)this._filterResultCache.hasOwnProperty(b)&&delete this._filterResultCache[b][a]}function g(a,b){this._filters[a]&&f.call(this,a),this._filters[a]=b,this.trigger("filtered:add",a)}function h(a){delete this._filters[a],f.call(this,a),this.trigger("filtered:remove",a)}function i(a){this._filterResultCache[a.cid]||(this._filterResultCache[a.cid]={});var b=this._filterResultCache[a.cid];for(var c in this._filters)if(this._filters.hasOwnProperty(c)&&(b.hasOwnProperty(c)||(b[c]=this._filters[c].fn(a)),!b[c]))return!1;return!0}function j(){var a=[];this._superset&&(a=this._superset.filter(p.bind(i,this))),this._collection.reset(a),this.length=this._collection.length}function k(a){if(this._filterResultCache[a.cid]={},i.call(this,a)){if(!this._collection.get(a.cid)){for(var b=this.superset().indexOf(a),c=null,d=b-1;d>=0;d-=1)if(this.contains(this.superset().at(d))){c=this.indexOf(this.superset().at(d))+1;break}c=c||0,this._collection.add(a,{at:c})}}else this._collection.get(a.cid)&&this._collection.remove(a);this.length=this._collection.length}function l(a){this._filterResultCache[a.cid]={},i.call(this,a)||this._collection.get(a.cid)&&this._collection.remove(a)}function m(a,b,c){"change:"===a.slice(0,7)&&l.call(this,arguments[1])}function n(a){this.contains(a)&&this._collection.remove(a),this.length=this._collection.length}function o(a){this._superset=a,this._collection=new q.Collection(a.toArray()),r(this._collection,this),this.resetFilters(),this.listenTo(this._superset,"reset sort",j),this.listenTo(this._superset,"add change",k),this.listenTo(this._superset,"remove",n),this.listenTo(this._superset,"all",m)}var p=c("underscore"),q=c("backbone"),r=b(1),s=b(2),t={defaultFilterName:"__default",filterBy:function(a,b){return b||(b=a,a=this.defaultFilterName),g.call(this,a,s(b)),j.call(this),this},removeFilter:function(a){return a||(a=this.defaultFilterName),h.call(this,a),j.call(this),this},resetFilters:function(){return this._filters={},e.call(this),this.trigger("filtered:reset"),j.call(this),this},superset:function(){return this._superset},refilter:function(a){return"object"==typeof a&&a.cid?k.call(this,a):(e.call(this),j.call(this)),this},getFilters:function(){return p.keys(this._filters)},hasFilter:function(a){return p.contains(this.getFilters(),a)},destroy:function(){this.stopListening(),this._collection.reset([]),this._superset=this._collection,this.length=0,this.trigger("filtered:destroy")}};p.extend(o.prototype,t,q.Events),a.exports=o},function(a,b){function d(a,b){function c(){b.length=a.length}function d(c){var d=e.toArray(arguments),f="change"===c||"change:"===c.slice(0,7);"reset"===c&&(b.models=a.models),e.contains(h,c)?(e.contains(["add","remove","destroy"],c)?d[2]=b:e.contains(["reset","sort"],c)&&(d[1]=b),b.trigger.apply(this,d)):f&&b.contains(d[1])&&b.trigger.apply(this,d)}var i={};return e.each(e.functions(f.Collection.prototype),function(b){e.contains(g,b)||(i[b]=function(){return a[b].apply(a,arguments)})}),e.extend(b,f.Events,i),b.listenTo(a,"all",c),b.listenTo(a,"all",d),b.models=a.models,c(),b}var e=c("underscore"),f=c("backbone"),g=["_onModelEvent","_prepareModel","_removeReference","_reset","add","initialize","sync","remove","reset","set","push","pop","unshift","shift","sort","parse","fetch","create","model","off","on","listenTo","listenToOnce","bind","trigger","once","stopListening"],h=["add","remove","reset","sort","destroy","sync","request","error"];a.exports=d},function(a,b){function d(a,b){return function(c){return c.get(a)===b}}function e(a,b){return function(c){return b(c.get(a))}}function f(a,b){return i.isArray(b)||(b=null),{fn:a,keys:b}}function g(a){var b=i.keys(a),c=i.map(b,function(b){var c=a[b];return i.isFunction(c)?e(b,c):d(b,c)}),g=function(a){for(var b=0;b<c.length;b++)if(!c[b](a))return!1;return!0};return f(g,b)}function h(a,b){return i.isFunction(a)?f(a,b):i.isObject(a)?g(a):void 0}var i=c("underscore");a.exports=h}],b(0)}();return d}),function(a,b){if("function"==typeof define&&define.amd)define(["backbone","underscore"],function(a,c){return b(a,c)});else if("undefined"!=typeof exports){var c=require("backbone"),d=require("underscore");module.exports=b(c,d)}else b(a.Backbone,a._)}(this,function(a,b){"use strict";var c=a.ChildViewContainer;return a.ChildViewContainer=function(a,b){var c=function(a){this._views={},this._indexByModel={},this._indexByCustom={},this._updateLength(),b.each(a,this.add,this)};b.extend(c.prototype,{add:function(a,b){var c=a.cid;return this._views[c]=a,a.model&&(this._indexByModel[a.model.cid]=c),b&&(this._indexByCustom[b]=c),this._updateLength(),this},findByModel:function(a){return this.findByModelCid(a.cid)},findByModelCid:function(a){var b=this._indexByModel[a];return this.findByCid(b)},findByCustom:function(a){var b=this._indexByCustom[a];return this.findByCid(b)},findByIndex:function(a){return b.values(this._views)[a]},findByCid:function(a){return this._views[a]},remove:function(a){var c=a.cid;return a.model&&delete this._indexByModel[a.model.cid],b.any(this._indexByCustom,function(a,b){return a===c?(delete this._indexByCustom[b],!0):void 0},this),delete this._views[c],this._updateLength(),this},call:function(a){this.apply(a,b.tail(arguments))},apply:function(a,c){b.each(this._views,function(d){b.isFunction(d[a])&&d[a].apply(d,c||[])})},_updateLength:function(){this.length=b.size(this._views)}});var d=["forEach","each","map","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","toArray","first","initial","rest","last","without","isEmpty","pluck","reduce"];return b.each(d,function(a){c.prototype[a]=function(){var c=b.values(this._views),d=[c].concat(b.toArray(arguments));return b[a].apply(b,d)}}),c}(a,b),a.ChildViewContainer.VERSION="0.1.6",a.ChildViewContainer.noConflict=function(){return a.ChildViewContainer=c,this},a.ChildViewContainer}),function(a,b){"function"==typeof define&&define.amd?define(["underscore","backbone","jquery"],function(c,d,e){return a.Backbone=b(c,d,e)}):"undefined"!=typeof exports&&"undefined"!=typeof require?module.exports=b(require("underscore"),require("backbone"),require("jquery")):a.Backbone=b(a._,a.Backbone,a.jQuery)}(this,function(a,b,c){function d(b,d){if(b&&a.isObject(b)){if(a.isFunction(b.getCacheKey))return b.getCacheKey(d);b=d&&d.url?d.url:a.isFunction(b.url)?b.url():b.url}else if(a.isFunction(b))return b(d);return d&&d.data?"string"==typeof d.data?b+"?"+d.data:b+"?"+c.param(d.data):b}function e(a,c,d){c=c||{};var e=b.fetchCache.getCacheKey(a,c),f=!1,g=c.lastSync||(new Date).getTime(),h=!1;e&&c.cache!==!1&&(c.cache||c.prefill)&&(c.expires!==!1&&(f=(new Date).getTime()+1e3*(c.expires||300)),c.prefillExpires!==!1&&(h=(new Date).getTime()+1e3*(c.prefillExpires||300)),b.fetchCache._cache[e]={expires:f,lastSync:g,prefillExpires:h,value:d},b.fetchCache.setLocalStorage())}function f(c,e){return a.isFunction(c)?c=c():c&&a.isObject(c)&&(c=d(c,e)),b.fetchCache._cache[c]}function g(a,b){return f(a).lastSync}function h(c,e){a.isFunction(c)?c=c():c&&a.isObject(c)&&(c=d(c,e)),delete b.fetchCache._cache[c],b.fetchCache.setLocalStorage()}function i(){b.fetchCache._cache={}}function j(){if(n&&b.fetchCache.localStorage)try{localStorage.setItem(b.fetchCache.getLocalStorageKey(),JSON.stringify(b.fetchCache._cache))}catch(a){var c=a.code||a.number||a.message;if(22!==c&&1014!==c)throw a;this._deleteCacheWithPriority()}}function k(){if(n&&b.fetchCache.localStorage){var a=localStorage.getItem(b.fetchCache.getLocalStorageKey())||"{}";b.fetchCache._cache=JSON.parse(a)}}function l(a){return window.setTimeout(a,0)}var m={modelFetch:b.Model.prototype.fetch,modelSync:b.Model.prototype.sync,collectionFetch:b.Collection.prototype.fetch},n=function(){var a="undefined"!=typeof window.localStorage;if(a)try{localStorage.setItem("test_support","test_support"),localStorage.removeItem("test_support")}catch(b){a=!1}return a}();return b.fetchCache=b.fetchCache||{},b.fetchCache._cache=b.fetchCache._cache||{},b.fetchCache.enabled=!0,b.fetchCache.priorityFn=function(a,b){return a&&a.expires&&b&&b.expires?a.expires-b.expires:a},b.fetchCache._prioritize=function(){var b=a.values(this._cache).sort(this.priorityFn),c=a.indexOf(a.values(this._cache),b[0]);return a.keys(this._cache)[c]},b.fetchCache._deleteCacheWithPriority=function(){b.fetchCache._cache[this._prioritize()]=null,delete b.fetchCache._cache[this._prioritize()],b.fetchCache.setLocalStorage()},b.fetchCache.getLocalStorageKey=function(){return"backboneCache"},"undefined"==typeof b.fetchCache.localStorage&&(b.fetchCache.localStorage=!0),b.Model.prototype.fetch=function(d){function e(){return d.prefill&&(!d.prefillExpires||k)}function g(){d.parse&&(n=q.parse(n,d)),q.set(n,d),a.isFunction(d.prefillSuccess)&&d.prefillSuccess.call(p,q,n,d),q.trigger("cachesync",q,n,d),q.trigger("sync",q,n,d),e()?o.notifyWith(p,[q]):(a.isFunction(d.success)&&d.success.call(p,q,n,d),o.resolveWith(p,[q]))}if(!b.fetchCache.enabled)return m.modelFetch.apply(this,arguments);d=a.defaults(d||{},{parse:!0});var h=b.fetchCache.getCacheKey(this,d),i=f(h),j=!1,k=!1,n=!1,o=new c.Deferred,p=d.context||this,q=this;if(i&&(j=i.expires,j=j&&i.expires<(new Date).getTime(),k=i.prefillExpires,k=k&&i.prefillExpires<(new Date).getTime(),n=i.value),!j&&(d.cache||d.prefill)&&n&&(null==d.async&&(d.async=!0),d.async?l(g):g(),!e()))return o.promise();var r=m.modelFetch.apply(this,arguments);return"undefined"!=typeof r&&(r.done(a.bind(o.resolve,p,this)).done(a.bind(b.fetchCache.setCache,null,this,d)).fail(a.bind(o.reject,p,this)),o.abort=r.abort),o.promise()},b.Model.prototype.sync=function(a,c,d){if("read"===a||!b.fetchCache.enabled)return m.modelSync.apply(this,arguments);var e,f,g=c.collection,i=[];for(i.push(b.fetchCache.getCacheKey(c,d)),g&&i.push(b.fetchCache.getCacheKey(g)),e=0,f=i.length;f>e;e++)h(i[e]);return m.modelSync.apply(this,arguments)},b.Collection.prototype.fetch=function(d){function e(){return d.prefill&&(!d.prefillExpires||k)}function g(){q[d.reset?"reset":"set"](n,d),a.isFunction(d.prefillSuccess)&&d.prefillSuccess.call(p,q),q.trigger("cachesync",q,n,d),q.trigger("sync",q,n,d),e()?o.notifyWith(p,[q]):(a.isFunction(d.success)&&d.success.call(p,q,n,d),o.resolveWith(p,[q]))}if(!b.fetchCache.enabled)return m.collectionFetch.apply(this,arguments);d=a.defaults(d||{},{parse:!0});var h=b.fetchCache.getCacheKey(this,d),i=f(h),j=!1,k=!1,n=!1,o=new c.Deferred,p=d.context||this,q=this;if(i&&(j=i.expires,j=j&&i.expires<(new Date).getTime(),k=i.prefillExpires,k=k&&i.prefillExpires<(new Date).getTime(),n=i.value),!j&&(d.cache||d.prefill)&&n&&(null==d.async&&(d.async=!0),d.async?l(g):g(),!e()))return o.promise();var r=m.collectionFetch.apply(this,arguments);return"undefined"!=typeof r&&(r.done(a.bind(o.resolve,p,this)).done(a.bind(b.fetchCache.setCache,null,this,d)).fail(a.bind(o.reject,p,this)),o.abort=r.abort),o.promise()},k(),b.fetchCache._superMethods=m,b.fetchCache.setCache=e,b.fetchCache.getCache=f,b.fetchCache.getCacheKey=d,b.fetchCache.getLastSync=g,b.fetchCache.clearItem=h,b.fetchCache.reset=i,b.fetchCache.setLocalStorage=j,b.fetchCache.getLocalStorage=k,b}),function(a,b){"object"==typeof exports&&"function"==typeof require?module.exports=b(require("backbone")):"function"==typeof define&&define.amd?define(["backbone"],function(c){return b(c||a.Backbone)}):b(Backbone)}(this,function(a){function b(){return(65536*(1+Math.random())|0).toString(16).substring(1)}function c(){return b()+b()+"-"+b()+"-"+b()+"-"+b()+"-"+b()+b()+b()}function d(a){return a===Object(a)}function e(a,b){for(var c=a.length;c--;)if(a[c]===b)return!0;return!1}function f(a,b){for(var c in b)a[c]=b[c];return a}function g(a,b){if(null==a)return void 0;var c=a[b];return"function"==typeof c?a[b]():c}return a.LocalStorage=window.Store=function(a,b){if(!this.localStorage)throw"Backbone.localStorage: Environment does not support localStorage.";this.name=a,this.serializer=b||{serialize:function(a){return d(a)?JSON.stringify(a):a},deserialize:function(a){return a&&JSON.parse(a)}};var c=this.localStorage().getItem(this.name);this.records=c&&c.split(",")||[]},f(a.LocalStorage.prototype,{save:function(){this.localStorage().setItem(this.name,this.records.join(","))},create:function(a){return a.id||0===a.id||(a.id=c(),a.set(a.idAttribute,a.id)),this.localStorage().setItem(this._itemName(a.id),this.serializer.serialize(a)),this.records.push(a.id.toString()),this.save(),this.find(a)},update:function(a){this.localStorage().setItem(this._itemName(a.id),this.serializer.serialize(a));var b=a.id.toString();return e(this.records,b)||(this.records.push(b),this.save()),this.find(a)},find:function(a){return this.serializer.deserialize(this.localStorage().getItem(this._itemName(a.id)))},findAll:function(){for(var a,b,c=[],d=0;d<this.records.length;d++)a=this.records[d],b=this.serializer.deserialize(this.localStorage().getItem(this._itemName(a))),null!=b&&c.push(b);return c},destroy:function(a){this.localStorage().removeItem(this._itemName(a.id));for(var b=a.id.toString(),c=0;c<this.records.length;c++)this.records[c]===b&&this.records.splice(c,1);return this.save(),a},localStorage:function(){return localStorage},_clear:function(){var a=this.localStorage(),b=new RegExp("^"+this.name+"-");a.removeItem(this.name);for(var c in a)b.test(c)&&a.removeItem(c);this.records.length=0},_storageSize:function(){return this.localStorage().length},_itemName:function(a){return this.name+"-"+a}}),a.LocalStorage.sync=window.Store.sync=a.localSync=function(b,c,d){var e,f,h=g(c,"localStorage")||g(c.collection,"localStorage"),i=a.$?a.$.Deferred&&a.$.Deferred():a.Deferred&&a.Deferred();try{switch(b){case"read":e=void 0!=c.id?h.find(c):h.findAll();break;case"create":e=h.create(c);break;case"update":e=h.update(c);break;case"delete":e=h.destroy(c)}}catch(j){f=22===j.code&&0===h._storageSize()?"Private browsing is unsupported":j.message}return e?(d&&d.success&&("0.9.10"===a.VERSION?d.success(c,e,d):d.success(e)),i&&i.resolve(e)):(f=f?f:"Record Not Found",d&&d.error&&("0.9.10"===a.VERSION?d.error(c,f,d):d.error(f)),i&&i.reject(f)),d&&d.complete&&d.complete(e),i&&i.promise()},a.ajaxSync=a.sync,a.getSyncMethod=function(b,c){var d=c&&c.ajaxSync;return d||!g(b,"localStorage")&&!g(b.collection,"localStorage")?a.ajaxSync:a.localSync},a.sync=function(b,c,d){return a.getSyncMethod(c,d).apply(this,[b,c,d])},a.LocalStorage}),function(a,b){if("function"==typeof define&&define.amd)define(["backbone","underscore"],function(c,d){return a.Marionette=a.Mn=b(a,c,d)});else if("undefined"!=typeof exports){var c=require("backbone"),d=require("underscore");module.exports=b(a,c,d)}else a.Marionette=a.Mn=b(a,a.Backbone,a._)}(this,function(a,b,c){"use strict";!function(a,b){var c=a.ChildViewContainer;return a.ChildViewContainer=function(a,b){var c=function(a){this._views={},this._indexByModel={},this._indexByCustom={},this._updateLength(),b.each(a,this.add,this)};b.extend(c.prototype,{add:function(a,b){var c=a.cid;return this._views[c]=a,a.model&&(this._indexByModel[a.model.cid]=c),b&&(this._indexByCustom[b]=c),this._updateLength(),this},findByModel:function(a){return this.findByModelCid(a.cid)},findByModelCid:function(a){var b=this._indexByModel[a];return this.findByCid(b)},findByCustom:function(a){var b=this._indexByCustom[a];return this.findByCid(b)},findByIndex:function(a){return b.values(this._views)[a]},findByCid:function(a){return this._views[a]},remove:function(a){var c=a.cid;return a.model&&delete this._indexByModel[a.model.cid],b.any(this._indexByCustom,function(a,b){return a===c?(delete this._indexByCustom[b],!0):void 0},this),delete this._views[c],this._updateLength(),this},call:function(a){this.apply(a,b.tail(arguments))},apply:function(a,c){b.each(this._views,function(d){b.isFunction(d[a])&&d[a].apply(d,c||[])})},_updateLength:function(){this.length=b.size(this._views)}});var d=["forEach","each","map","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","toArray","first","initial","rest","last","without","isEmpty","pluck"];return b.each(d,function(a){c.prototype[a]=function(){var c=b.values(this._views),d=[c].concat(b.toArray(arguments));return b[a].apply(b,d)}}),c}(a,b),a.ChildViewContainer.VERSION="0.1.5",a.ChildViewContainer.noConflict=function(){return a.ChildViewContainer=c,this},a.ChildViewContainer}(b,c),function(a,b){var c=a.Wreqr,d=a.Wreqr={};return a.Wreqr.VERSION="1.3.1",a.Wreqr.noConflict=function(){return a.Wreqr=c,this},d.Handlers=function(a,b){var c=function(a){this.options=a,this._wreqrHandlers={},b.isFunction(this.initialize)&&this.initialize(a)};return c.extend=a.Model.extend,b.extend(c.prototype,a.Events,{setHandlers:function(a){b.each(a,function(a,c){var d=null;b.isObject(a)&&!b.isFunction(a)&&(d=a.context,a=a.callback),this.setHandler(c,a,d)},this)},setHandler:function(a,b,c){var d={callback:b,context:c};this._wreqrHandlers[a]=d,this.trigger("handler:add",a,b,c)},hasHandler:function(a){return!!this._wreqrHandlers[a]},getHandler:function(a){var b=this._wreqrHandlers[a];if(b)return function(){var a=Array.prototype.slice.apply(arguments);return b.callback.apply(b.context,a)}},removeHandler:function(a){delete this._wreqrHandlers[a]},removeAllHandlers:function(){this._wreqrHandlers={}}}),c}(a,b),d.CommandStorage=function(){var c=function(a){this.options=a,this._commands={},b.isFunction(this.initialize)&&this.initialize(a)};return b.extend(c.prototype,a.Events,{getCommands:function(a){var b=this._commands[a];return b||(b={command:a,instances:[]},this._commands[a]=b),b},addCommand:function(a,b){var c=this.getCommands(a);c.instances.push(b)},clearCommands:function(a){var b=this.getCommands(a);b.instances=[]}}),c}(),d.Commands=function(a){return a.Handlers.extend({storageType:a.CommandStorage,constructor:function(b){this.options=b||{},this._initializeStorage(this.options),this.on("handler:add",this._executeCommands,this);var c=Array.prototype.slice.call(arguments);a.Handlers.prototype.constructor.apply(this,c)},execute:function(a,b){a=arguments[0],b=Array.prototype.slice.call(arguments,1),this.hasHandler(a)?this.getHandler(a).apply(this,b):this.storage.addCommand(a,b)},_executeCommands:function(a,c,d){var e=this.storage.getCommands(a);b.each(e.instances,function(a){c.apply(d,a)}),this.storage.clearCommands(a)},_initializeStorage:function(a){var c,d=a.storageType||this.storageType;c=b.isFunction(d)?new d:d,this.storage=c}})}(d),d.RequestResponse=function(a){return a.Handlers.extend({request:function(){var a=arguments[0],b=Array.prototype.slice.call(arguments,1);return this.hasHandler(a)?this.getHandler(a).apply(this,b):void 0}})}(d),d.EventAggregator=function(a,b){var c=function(){};return c.extend=a.Model.extend,b.extend(c.prototype,a.Events),c}(a,b),d.Channel=function(c){var d=function(b){this.vent=new a.Wreqr.EventAggregator,this.reqres=new a.Wreqr.RequestResponse,this.commands=new a.Wreqr.Commands,this.channelName=b};return b.extend(d.prototype,{reset:function(){return this.vent.off(),this.vent.stopListening(),this.reqres.removeAllHandlers(),this.commands.removeAllHandlers(),this},connectEvents:function(a,b){return this._connect("vent",a,b),this},connectCommands:function(a,b){return this._connect("commands",a,b),this},connectRequests:function(a,b){return this._connect("reqres",a,b),this},_connect:function(a,c,d){if(c){d=d||this;var e="vent"===a?"on":"setHandler";b.each(c,function(c,f){this[a][e](f,b.bind(c,d))},this)}}}),d}(d),d.radio=function(a){var c=function(){this._channels={},this.vent={},this.commands={},this.reqres={},this._proxyMethods()};b.extend(c.prototype,{channel:function(a){if(!a)throw new Error("Channel must receive a name");return this._getChannel(a)},_getChannel:function(b){var c=this._channels[b];return c||(c=new a.Channel(b),this._channels[b]=c),c},_proxyMethods:function(){b.each(["vent","commands","reqres"],function(a){b.each(d[a],function(b){this[a][b]=e(this,a,b)},this)},this)}});var d={vent:["on","off","trigger","once","stopListening","listenTo","listenToOnce"],commands:["execute","setHandler","setHandlers","removeHandler","removeAllHandlers"],reqres:["request","setHandler","setHandlers","removeHandler","removeAllHandlers"]},e=function(a,b,c){return function(d){var e=a._getChannel(d)[b],f=Array.prototype.slice.call(arguments,1);return e[c].apply(e,f)}};return new c}(d),a.Wreqr}(b,c);var d=a.Marionette,e=b.Marionette={};e.VERSION="2.3.1",e.noConflict=function(){return a.Marionette=d,this},b.Marionette=e,e.Deferred=b.$.Deferred,e.extend=b.Model.extend,e.isNodeAttached=function(a){return b.$.contains(document.documentElement,a)},e.getOption=function(a,b){return a&&b?a.options&&void 0!==a.options[b]?a.options[b]:a[b]:void 0},e.proxyGetOption=function(a){return e.getOption(this,a)},e._getValue=function(a,b,d){return c.isFunction(a)&&(a=a.apply(b,d)),a},e.normalizeMethods=function(a){return c.reduce(a,function(a,b,d){return c.isFunction(b)||(b=this[b]),b&&(a[d]=b),a},{},this)},e.normalizeUIString=function(a,b){return a.replace(/@ui\.[a-zA-Z_$0-9]*/g,function(a){return b[a.slice(4)]})},e.normalizeUIKeys=function(a,b){return c.reduce(a,function(a,c,d){var f=e.normalizeUIString(d,b);return a[f]=c,a},{})},e.normalizeUIValues=function(a,b){return c.each(a,function(d,f){c.isString(d)&&(a[f]=e.normalizeUIString(d,b))}),a},e.actAsCollection=function(a,b){var d=["forEach","each","map","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","toArray","first","initial","rest","last","without","isEmpty","pluck"];c.each(d,function(d){a[d]=function(){var a=c.values(c.result(this,b)),e=[a].concat(c.toArray(arguments));return c[d].apply(c,e)}})};var f=e.deprecate=function(a,b){c.isObject(a)&&(a=a.prev+" is going to be removed in the future. Please use "+a.next+" instead."+(a.url?" See: "+a.url:"")),void 0!==b&&b||f._cache[a]||(f._warn("Deprecation warning: "+a),f._cache[a]=!0)};f._warn="undefined"!=typeof console&&(console.warn||console.log)||function(){},f._cache={},e._triggerMethod=function(){function a(a,b,c){return c.toUpperCase()}var b=/(^|:)(\w)/gi;return function(d,e,f){var g=arguments.length<3;g&&(f=e,e=f[0]);var h,i="on"+e.replace(b,a),j=d[i];return c.isFunction(j)&&(h=j.apply(d,g?c.rest(f):f)),c.isFunction(d.trigger)&&(g+f.length>1?d.trigger.apply(d,g?f:[e].concat(c.rest(f,0))):d.trigger(e)),h}}(),e.triggerMethod=function(a){return e._triggerMethod(this,arguments)}, -e.triggerMethodOn=function(a){var b=c.isFunction(a.triggerMethod)?a.triggerMethod:e.triggerMethod;return b.apply(a,c.rest(arguments))},e.MonitorDOMRefresh=function(a){function b(){a._isShown=!0,f()}function d(){a._isRendered=!0,f()}function f(){a._isShown&&a._isRendered&&e.isNodeAttached(a.el)&&c.isFunction(a.triggerMethod)&&a.triggerMethod("dom:refresh")}a.on({show:b,render:d})},function(a){function b(b,d,e,f){var g=f.split(/\s+/);c.each(g,function(c){var f=b[c];if(!f)throw new a.Error('Method "'+c+'" was configured as an event handler, but does not exist.');b.listenTo(d,e,f)})}function d(a,b,c,d){a.listenTo(b,c,d)}function e(a,b,d,e){var f=e.split(/\s+/);c.each(f,function(c){var e=a[c];a.stopListening(b,d,e)})}function f(a,b,c,d){a.stopListening(b,c,d)}function g(b,d,e,f,g){if(d&&e){if(!c.isObject(e))throw new a.Error({message:"Bindings must be an object or function.",url:"marionette.functions.html#marionettebindentityevents"});e=a._getValue(e,b),c.each(e,function(a,e){c.isFunction(a)?f(b,d,e,a):g(b,d,e,a)})}}a.bindEntityEvents=function(a,c,e){g(a,c,e,d,b)},a.unbindEntityEvents=function(a,b,c){g(a,b,c,f,e)},a.proxyBindEntityEvents=function(b,c){return a.bindEntityEvents(this,b,c)},a.proxyUnbindEntityEvents=function(b,c){return a.unbindEntityEvents(this,b,c)}}(e);var g=["description","fileName","lineNumber","name","message","number"];return e.Error=e.extend.call(Error,{urlRoot:"http://marionettejs.com/docs/v"+e.VERSION+"/",constructor:function(a,b){c.isObject(a)?(b=a,a=b.message):b||(b={});var d=Error.call(this,a);c.extend(this,c.pick(d,g),c.pick(b,g)),this.captureStackTrace(),b.url&&(this.url=this.urlRoot+b.url)},captureStackTrace:function(){Error.captureStackTrace&&Error.captureStackTrace(this,e.Error)},toString:function(){return this.name+": "+this.message+(this.url?" See: "+this.url:"")}}),e.Error.extend=e.extend,e.Callbacks=function(){this._deferred=e.Deferred(),this._callbacks=[]},c.extend(e.Callbacks.prototype,{add:function(a,b){var d=c.result(this._deferred,"promise");this._callbacks.push({cb:a,ctx:b}),d.then(function(c){b&&(c.context=b),a.call(c.context,c.options)})},run:function(a,b){this._deferred.resolve({options:a,context:b})},reset:function(){var a=this._callbacks;this._deferred=e.Deferred(),this._callbacks=[],c.each(a,function(a){this.add(a.cb,a.ctx)},this)}}),e.Controller=function(a){this.options=a||{},c.isFunction(this.initialize)&&this.initialize(this.options)},e.Controller.extend=e.extend,c.extend(e.Controller.prototype,b.Events,{destroy:function(){return e._triggerMethod(this,"before:destroy",arguments),e._triggerMethod(this,"destroy",arguments),this.stopListening(),this.off(),this},triggerMethod:e.triggerMethod,getOption:e.proxyGetOption}),e.Object=function(a){this.options=c.extend({},c.result(this,"options"),a),this.initialize.apply(this,arguments)},e.Object.extend=e.extend,c.extend(e.Object.prototype,b.Events,{initialize:function(){},destroy:function(){this.triggerMethod("before:destroy"),this.triggerMethod("destroy"),this.stopListening()},triggerMethod:e.triggerMethod,getOption:e.proxyGetOption,bindEntityEvents:e.proxyBindEntityEvents,unbindEntityEvents:e.proxyUnbindEntityEvents}),e.Region=e.Object.extend({constructor:function(a){if(this.options=a||{},this.el=this.getOption("el"),this.el=this.el instanceof b.$?this.el[0]:this.el,!this.el)throw new e.Error({name:"NoElError",message:'An "el" must be specified for a region.'});this.$el=this.getEl(this.el),e.Object.call(this,a)},show:function(a,b){if(this._ensureElement()){this._ensureViewIsIntact(a);var c=b||{},d=a!==this.currentView,f=!!c.preventDestroy,g=!!c.forceShow,h=!!this.currentView,i=d&&!f,j=d||g;if(h&&this.triggerMethod("before:swapOut",this.currentView,this,b),this.currentView&&delete this.currentView._parent,i?this.empty():h&&j&&this.currentView.off("destroy",this.empty,this),j){a.once("destroy",this.empty,this),a.render(),a._parent=this,h&&this.triggerMethod("before:swap",a,this,b),this.triggerMethod("before:show",a,this,b),e.triggerMethodOn(a,"before:show",a,this,b),h&&this.triggerMethod("swapOut",this.currentView,this,b);var k=e.isNodeAttached(this.el),l=[],m=c.triggerBeforeAttach||this.triggerBeforeAttach,n=c.triggerAttach||this.triggerAttach;return k&&m&&(l=this._displayedViews(a),this._triggerAttach(l,"before:")),this.attachHtml(a),this.currentView=a,k&&n&&(l=this._displayedViews(a),this._triggerAttach(l)),h&&this.triggerMethod("swap",a,this,b),this.triggerMethod("show",a,this,b),e.triggerMethodOn(a,"show",a,this,b),this}return this}},triggerBeforeAttach:!0,triggerAttach:!0,_triggerAttach:function(a,b){var d=(b||"")+"attach";c.each(a,function(a){e.triggerMethodOn(a,d,a,this)},this)},_displayedViews:function(a){return c.union([a],c.result(a,"_getNestedViews")||[])},_ensureElement:function(){if(c.isObject(this.el)||(this.$el=this.getEl(this.el),this.el=this.$el[0]),!this.$el||0===this.$el.length){if(this.getOption("allowMissingEl"))return!1;throw new e.Error('An "el" '+this.$el.selector+" must exist in DOM")}return!0},_ensureViewIsIntact:function(a){if(!a)throw new e.Error({name:"ViewNotValid",message:"The view passed is undefined and therefore invalid. You must pass a view instance to show."});if(a.isDestroyed)throw new e.Error({name:"ViewDestroyedError",message:'View (cid: "'+a.cid+'") has already been destroyed and cannot be used.'})},getEl:function(a){return b.$(a,e._getValue(this.options.parentEl,this))},attachHtml:function(a){this.$el.contents().detach(),this.el.appendChild(a.el)},empty:function(){var a=this.currentView;if(a)return a.off("destroy",this.empty,this),this.triggerMethod("before:empty",a),this._destroyView(),this.triggerMethod("empty",a),delete this.currentView,this},_destroyView:function(){var a=this.currentView;a.destroy&&!a.isDestroyed?a.destroy():a.remove&&(a.remove(),a.isDestroyed=!0)},attachView:function(a){return this.currentView=a,this},hasView:function(){return!!this.currentView},reset:function(){return this.empty(),this.$el&&(this.el=this.$el.selector),delete this.$el,this}},{buildRegion:function(a,b){if(c.isString(a))return this._buildRegionFromSelector(a,b);if(a.selector||a.el||a.regionClass)return this._buildRegionFromObject(a,b);if(c.isFunction(a))return this._buildRegionFromRegionClass(a);throw new e.Error({message:"Improper region configuration type.",url:"marionette.region.html#region-configuration-types"})},_buildRegionFromSelector:function(a,b){return new b({el:a})},_buildRegionFromObject:function(a,b){var d=a.regionClass||b,e=c.omit(a,"selector","regionClass");return a.selector&&!e.el&&(e.el=a.selector),new d(e)},_buildRegionFromRegionClass:function(a){return new a}}),e.RegionManager=e.Controller.extend({constructor:function(a){this._regions={},e.Controller.call(this,a),this.addRegions(this.getOption("regions"))},addRegions:function(a,b){return a=e._getValue(a,this,arguments),c.reduce(a,function(a,d,e){return c.isString(d)&&(d={selector:d}),d.selector&&(d=c.defaults({},d,b)),a[e]=this.addRegion(e,d),a},{},this)},addRegion:function(a,b){var c;return c=b instanceof e.Region?b:e.Region.buildRegion(b,e.Region),this.triggerMethod("before:add:region",a,c),c._parent=this,this._store(a,c),this.triggerMethod("add:region",a,c),c},get:function(a){return this._regions[a]},getRegions:function(){return c.clone(this._regions)},removeRegion:function(a){var b=this._regions[a];return this._remove(a,b),b},removeRegions:function(){var a=this.getRegions();return c.each(this._regions,function(a,b){this._remove(b,a)},this),a},emptyRegions:function(){var a=this.getRegions();return c.invoke(a,"empty"),a},destroy:function(){return this.removeRegions(),e.Controller.prototype.destroy.apply(this,arguments)},_store:function(a,b){this._regions[a]=b,this._setLength()},_remove:function(a,b){this.triggerMethod("before:remove:region",a,b),b.empty(),b.stopListening(),delete b._parent,delete this._regions[a],this._setLength(),this.triggerMethod("remove:region",a,b)},_setLength:function(){this.length=c.size(this._regions)}}),e.actAsCollection(e.RegionManager.prototype,"_regions"),e.TemplateCache=function(a){this.templateId=a},c.extend(e.TemplateCache,{templateCaches:{},get:function(a){var b=this.templateCaches[a];return b||(b=new e.TemplateCache(a),this.templateCaches[a]=b),b.load()},clear:function(){var a,b=c.toArray(arguments),d=b.length;if(d>0)for(a=0;d>a;a++)delete this.templateCaches[b[a]];else this.templateCaches={}}}),c.extend(e.TemplateCache.prototype,{load:function(){if(this.compiledTemplate)return this.compiledTemplate;var a=this.loadTemplate(this.templateId);return this.compiledTemplate=this.compileTemplate(a),this.compiledTemplate},loadTemplate:function(a){var c=b.$(a).html();if(!c||0===c.length)throw new e.Error({name:"NoTemplateError",message:'Could not find template: "'+a+'"'});return c},compileTemplate:function(a){return c.template(a)}}),e.Renderer={render:function(a,b){if(!a)throw new e.Error({name:"TemplateNotFoundError",message:"Cannot render the template since its false, null or undefined."});var d=c.isFunction(a)?a:e.TemplateCache.get(a);return d(b)}},e.View=b.View.extend({isDestroyed:!1,constructor:function(a){c.bindAll(this,"render"),a=e._getValue(a,this),this.options=c.extend({},c.result(this,"options"),a),this._behaviors=e.Behaviors(this),b.View.apply(this,arguments),e.MonitorDOMRefresh(this),this.on("show",this.onShowCalled)},getTemplate:function(){return this.getOption("template")},serializeModel:function(a){return a.toJSON.apply(a,c.rest(arguments))},mixinTemplateHelpers:function(a){a=a||{};var b=this.getOption("templateHelpers");return b=e._getValue(b,this),c.extend(a,b)},normalizeUIKeys:function(a){var b=c.result(this,"_uiBindings");return e.normalizeUIKeys(a,b||c.result(this,"ui"))},normalizeUIValues:function(a){var b=c.result(this,"ui"),d=c.result(this,"_uiBindings");return e.normalizeUIValues(a,d||b)},configureTriggers:function(){if(this.triggers){var a=this.normalizeUIKeys(c.result(this,"triggers"));return c.reduce(a,function(a,b,c){return a[c]=this._buildViewTrigger(b),a},{},this)}},delegateEvents:function(a){return this._delegateDOMEvents(a),this.bindEntityEvents(this.model,this.getOption("modelEvents")),this.bindEntityEvents(this.collection,this.getOption("collectionEvents")),c.each(this._behaviors,function(a){a.bindEntityEvents(this.model,a.getOption("modelEvents")),a.bindEntityEvents(this.collection,a.getOption("collectionEvents"))},this),this},_delegateDOMEvents:function(a){var d=e._getValue(a||this.events,this);d=this.normalizeUIKeys(d),c.isUndefined(a)&&(this.events=d);var f={},g=c.result(this,"behaviorEvents")||{},h=this.configureTriggers(),i=c.result(this,"behaviorTriggers")||{};c.extend(f,g,d,h,i),b.View.prototype.delegateEvents.call(this,f)},undelegateEvents:function(){return b.View.prototype.undelegateEvents.apply(this,arguments),this.unbindEntityEvents(this.model,this.getOption("modelEvents")),this.unbindEntityEvents(this.collection,this.getOption("collectionEvents")),c.each(this._behaviors,function(a){a.unbindEntityEvents(this.model,a.getOption("modelEvents")),a.unbindEntityEvents(this.collection,a.getOption("collectionEvents"))},this),this},onShowCalled:function(){},_ensureViewIsIntact:function(){if(this.isDestroyed)throw new e.Error({name:"ViewDestroyedError",message:'View (cid: "'+this.cid+'") has already been destroyed and cannot be used.'})},destroy:function(){if(!this.isDestroyed){var a=c.toArray(arguments);return this.triggerMethod.apply(this,["before:destroy"].concat(a)),this.isDestroyed=!0,this.triggerMethod.apply(this,["destroy"].concat(a)),this.unbindUIElements(),this.remove(),c.invoke(this._behaviors,"destroy",a),this}},bindUIElements:function(){this._bindUIElements(),c.invoke(this._behaviors,this._bindUIElements)},_bindUIElements:function(){if(this.ui){this._uiBindings||(this._uiBindings=this.ui);var a=c.result(this,"_uiBindings");this.ui={},c.each(a,function(a,b){this.ui[b]=this.$(a)},this)}},unbindUIElements:function(){this._unbindUIElements(),c.invoke(this._behaviors,this._unbindUIElements)},_unbindUIElements:function(){this.ui&&this._uiBindings&&(c.each(this.ui,function(a,b){delete this.ui[b]},this),this.ui=this._uiBindings,delete this._uiBindings)},_buildViewTrigger:function(a){var b=c.isObject(a),d=c.defaults({},b?a:{},{preventDefault:!0,stopPropagation:!0}),e=b?d.event:a;return function(a){a&&(a.preventDefault&&d.preventDefault&&a.preventDefault(),a.stopPropagation&&d.stopPropagation&&a.stopPropagation());var b={view:this,model:this.model,collection:this.collection};this.triggerMethod(e,b)}},setElement:function(){var a=b.View.prototype.setElement.apply(this,arguments);return c.invoke(this._behaviors,"proxyViewProperties",this),a},triggerMethod:function(){for(var a=e._triggerMethod,b=a(this,arguments),c=this._behaviors,d=0,f=c&&c.length;f>d;d++)a(c[d],arguments);return b},_getImmediateChildren:function(){return[]},_getNestedViews:function(){var a=this._getImmediateChildren();return a.length?c.reduce(a,function(a,b){return b._getNestedViews?a.concat(b._getNestedViews()):a},a):a},normalizeMethods:e.normalizeMethods,getOption:e.proxyGetOption,bindEntityEvents:e.proxyBindEntityEvents,unbindEntityEvents:e.proxyUnbindEntityEvents}),e.ItemView=e.View.extend({constructor:function(){e.View.apply(this,arguments)},serializeData:function(){if(!this.model&&!this.collection)return{};var a=[this.model||this.collection];return arguments.length&&a.push.apply(a,arguments),this.model?this.serializeModel.apply(this,a):{items:this.serializeCollection.apply(this,a)}},serializeCollection:function(a){return a.toJSON.apply(a,c.rest(arguments))},render:function(){return this._ensureViewIsIntact(),this.triggerMethod("before:render",this),this._renderTemplate(),this.bindUIElements(),this.triggerMethod("render",this),this},_renderTemplate:function(){var a=this.getTemplate();if(a!==!1){if(!a)throw new e.Error({name:"UndefinedTemplateError",message:"Cannot render the template since it is null or undefined."});var b=this.serializeData();b=this.mixinTemplateHelpers(b);var c=e.Renderer.render(a,b,this);return this.attachElContent(c),this}},attachElContent:function(a){return this.$el.html(a),this}}),e.CollectionView=e.View.extend({childViewEventPrefix:"childview",constructor:function(a){var b=a||{};c.isUndefined(this.sort)&&(this.sort=c.isUndefined(b.sort)?!0:b.sort),this.once("render",this._initialEvents),this._initChildViewStorage(),e.View.apply(this,arguments),this.initRenderBuffer()},initRenderBuffer:function(){this.elBuffer=document.createDocumentFragment(),this._bufferedChildren=[]},startBuffering:function(){this.initRenderBuffer(),this.isBuffering=!0},endBuffering:function(){this.isBuffering=!1,this._triggerBeforeShowBufferedChildren(),this.attachBuffer(this,this.elBuffer),this._triggerShowBufferedChildren(),this.initRenderBuffer()},_triggerBeforeShowBufferedChildren:function(){this._isShown&&c.each(this._bufferedChildren,c.partial(this._triggerMethodOnChild,"before:show"))},_triggerShowBufferedChildren:function(){this._isShown&&(c.each(this._bufferedChildren,c.partial(this._triggerMethodOnChild,"show")),this._bufferedChildren=[])},_triggerMethodOnChild:function(a,b){e.triggerMethodOn(b,a)},_initialEvents:function(){this.collection&&(this.listenTo(this.collection,"add",this._onCollectionAdd),this.listenTo(this.collection,"remove",this._onCollectionRemove),this.listenTo(this.collection,"reset",this.render),this.sort&&this.listenTo(this.collection,"sort",this._sortViews))},_onCollectionAdd:function(a){this.destroyEmptyView();var b=this.getChildView(a),c=this.collection.indexOf(a);this.addChild(a,b,c)},_onCollectionRemove:function(a){var b=this.children.findByModel(a);this.removeChildView(b),this.checkEmpty()},onShowCalled:function(){this.children.each(c.partial(this._triggerMethodOnChild,"show"))},render:function(){return this._ensureViewIsIntact(),this.triggerMethod("before:render",this),this._renderChildren(),this.triggerMethod("render",this),this},resortView:function(){this.render()},_sortViews:function(){var a=this.collection.find(function(a,b){var c=this.children.findByModel(a);return!c||c._index!==b},this);a&&this.resortView()},_emptyViewIndex:-1,_renderChildren:function(){this.destroyEmptyView(),this.destroyChildren(),this.isEmpty(this.collection)?this.showEmptyView():(this.triggerMethod("before:render:collection",this),this.startBuffering(),this.showCollection(),this.endBuffering(),this.triggerMethod("render:collection",this))},showCollection:function(){var a;this.collection.each(function(b,c){a=this.getChildView(b),this.addChild(b,a,c)},this)},showEmptyView:function(){var a=this.getEmptyView();if(a&&!this._showingEmptyView){this.triggerMethod("before:render:empty"),this._showingEmptyView=!0;var c=new b.Model;this.addEmptyView(c,a),this.triggerMethod("render:empty")}},destroyEmptyView:function(){this._showingEmptyView&&(this.triggerMethod("before:remove:empty"),this.destroyChildren(),delete this._showingEmptyView,this.triggerMethod("remove:empty"))},getEmptyView:function(){return this.getOption("emptyView")},addEmptyView:function(a,b){var d=this.getOption("emptyViewOptions")||this.getOption("childViewOptions");c.isFunction(d)&&(d=d.call(this,a,this._emptyViewIndex));var f=this.buildChildView(a,b,d);f._parent=this,this.proxyChildEvents(f),this._isShown&&e.triggerMethodOn(f,"before:show"),this.children.add(f),this.renderChildView(f,this._emptyViewIndex),this._isShown&&e.triggerMethodOn(f,"show")},getChildView:function(a){var b=this.getOption("childView");if(!b)throw new e.Error({name:"NoChildViewError",message:'A "childView" must be specified'});return b},addChild:function(a,b,c){var d=this.getOption("childViewOptions");d=e._getValue(d,this,[a,c]);var f=this.buildChildView(a,b,d);return this._updateIndices(f,!0,c),this._addChildView(f,c),f._parent=this,f},_updateIndices:function(a,b,c){this.sort&&(b&&(a._index=c),this.children.each(function(c){c._index>=a._index&&(c._index+=b?1:-1)}))},_addChildView:function(a,b){this.proxyChildEvents(a),this.triggerMethod("before:add:child",a),this.children.add(a),this.renderChildView(a,b),this._isShown&&!this.isBuffering&&e.triggerMethodOn(a,"show"),this.triggerMethod("add:child",a)},renderChildView:function(a,b){return a.render(),this.attachHtml(this,a,b),a},buildChildView:function(a,b,d){var e=c.extend({model:a},d);return new b(e)},removeChildView:function(a){return a&&(this.triggerMethod("before:remove:child",a),a.destroy?a.destroy():a.remove&&a.remove(),delete a._parent,this.stopListening(a),this.children.remove(a),this.triggerMethod("remove:child",a),this._updateIndices(a,!1)),a},isEmpty:function(){return!this.collection||0===this.collection.length},checkEmpty:function(){this.isEmpty(this.collection)&&this.showEmptyView()},attachBuffer:function(a,b){a.$el.append(b)},attachHtml:function(a,b,c){a.isBuffering?(a.elBuffer.appendChild(b.el),a._bufferedChildren.push(b)):a._insertBefore(b,c)||a._insertAfter(b)},_insertBefore:function(a,b){var c,d=this.sort&&b<this.children.length-1;return d&&(c=this.children.find(function(a){return a._index===b+1})),c?(c.$el.before(a.el),!0):!1},_insertAfter:function(a){this.$el.append(a.el)},_initChildViewStorage:function(){this.children=new b.ChildViewContainer},destroy:function(){return this.isDestroyed?void 0:(this.triggerMethod("before:destroy:collection"),this.destroyChildren(),this.triggerMethod("destroy:collection"),e.View.prototype.destroy.apply(this,arguments))},destroyChildren:function(){var a=this.children.map(c.identity);return this.children.each(this.removeChildView,this),this.checkEmpty(),a},proxyChildEvents:function(a){var b=this.getOption("childViewEventPrefix");this.listenTo(a,"all",function(){var d=c.toArray(arguments),e=d[0],f=this.normalizeMethods(c.result(this,"childEvents"));d[0]=b+":"+e,d.splice(1,0,a),"undefined"!=typeof f&&c.isFunction(f[e])&&f[e].apply(this,d.slice(1)),this.triggerMethod.apply(this,d)},this)},_getImmediateChildren:function(){return c.values(this.children._views)}}),e.CompositeView=e.CollectionView.extend({constructor:function(){e.CollectionView.apply(this,arguments)},_initialEvents:function(){this.collection&&(this.listenTo(this.collection,"add",this._onCollectionAdd),this.listenTo(this.collection,"remove",this._onCollectionRemove),this.listenTo(this.collection,"reset",this._renderChildren),this.sort&&this.listenTo(this.collection,"sort",this._sortViews))},getChildView:function(a){var b=this.getOption("childView")||this.constructor;return b},serializeData:function(){var a={};return this.model&&(a=c.partial(this.serializeModel,this.model).apply(this,arguments)),a},render:function(){return this._ensureViewIsIntact(),this.isRendered=!0,this.resetChildViewContainer(),this.triggerMethod("before:render",this),this._renderTemplate(),this._renderChildren(),this.triggerMethod("render",this),this},_renderChildren:function(){this.isRendered&&e.CollectionView.prototype._renderChildren.call(this)},_renderTemplate:function(){var a={};a=this.serializeData(),a=this.mixinTemplateHelpers(a),this.triggerMethod("before:render:template");var b=this.getTemplate(),c=e.Renderer.render(b,a,this);this.attachElContent(c),this.bindUIElements(),this.triggerMethod("render:template")},attachElContent:function(a){return this.$el.html(a),this},attachBuffer:function(a,b){var c=this.getChildViewContainer(a);c.append(b)},_insertAfter:function(a){var b=this.getChildViewContainer(this,a);b.append(a.el)},getChildViewContainer:function(a,b){if("$childViewContainer"in a)return a.$childViewContainer;var c,d=e.getOption(a,"childViewContainer");if(d){var f=e._getValue(d,a);if(c="@"===f.charAt(0)&&a.ui?a.ui[f.substr(4)]:a.$(f),c.length<=0)throw new e.Error({name:"ChildViewContainerMissingError",message:'The specified "childViewContainer" was not found: '+a.childViewContainer})}else c=a.$el;return a.$childViewContainer=c,c},resetChildViewContainer:function(){this.$childViewContainer&&delete this.$childViewContainer}}),e.LayoutView=e.ItemView.extend({regionClass:e.Region,constructor:function(a){a=a||{},this._firstRender=!0,this._initializeRegions(a),e.ItemView.call(this,a)},render:function(){return this._ensureViewIsIntact(),this._firstRender?this._firstRender=!1:this._reInitializeRegions(),e.ItemView.prototype.render.apply(this,arguments)},destroy:function(){return this.isDestroyed?this:(this.regionManager.destroy(),e.ItemView.prototype.destroy.apply(this,arguments))},addRegion:function(a,b){var c={};return c[a]=b,this._buildRegions(c)[a]},addRegions:function(a){return this.regions=c.extend({},this.regions,a),this._buildRegions(a)},removeRegion:function(a){return delete this.regions[a],this.regionManager.removeRegion(a)},getRegion:function(a){return this.regionManager.get(a)},getRegions:function(){return this.regionManager.getRegions()},_buildRegions:function(a){var b={regionClass:this.getOption("regionClass"),parentEl:c.partial(c.result,this,"el")};return this.regionManager.addRegions(a,b)},_initializeRegions:function(a){var b;this._initRegionManager(),b=e._getValue(this.regions,this,[a])||{};var d=this.getOption.call(a,"regions");d=e._getValue(d,this,[a]),c.extend(b,d),b=this.normalizeUIValues(b),this.addRegions(b)},_reInitializeRegions:function(){this.regionManager.invoke("reset")},getRegionManager:function(){return new e.RegionManager},_initRegionManager:function(){this.regionManager=this.getRegionManager(),this.regionManager._parent=this,this.listenTo(this.regionManager,"before:add:region",function(a){this.triggerMethod("before:add:region",a)}),this.listenTo(this.regionManager,"add:region",function(a,b){this[a]=b,this.triggerMethod("add:region",a,b)}),this.listenTo(this.regionManager,"before:remove:region",function(a){this.triggerMethod("before:remove:region",a)}),this.listenTo(this.regionManager,"remove:region",function(a,b){delete this[a],this.triggerMethod("remove:region",a,b)})},_getImmediateChildren:function(){return c.chain(this.regionManager.getRegions()).pluck("currentView").compact().value()}}),e.Behavior=e.Object.extend({constructor:function(a,b){this.view=b,this.defaults=c.result(this,"defaults")||{},this.options=c.extend({},this.defaults,a),e.Object.apply(this,arguments)},$:function(){return this.view.$.apply(this.view,arguments)},destroy:function(){this.stopListening()},proxyViewProperties:function(a){this.$el=a.$el,this.el=a.el}}),e.Behaviors=function(a,b){function c(a,d){return b.isObject(a.behaviors)?(d=c.parseBehaviors(a,d||b.result(a,"behaviors")),c.wrap(a,d,b.keys(f)),d):{}}function d(a,c){this._view=a,this._viewUI=b.result(a,"ui"),this._behaviors=c,this._triggers={}}var e=/^(\S+)\s*(.*)$/,f={behaviorTriggers:function(a,b){var c=new d(this,b);return c.buildBehaviorTriggers()},behaviorEvents:function(c,d){var f={},g=this._uiBindings||b.result(this,"ui");return b.each(d,function(c,d){var h={},i=b.clone(b.result(c,"events"))||{},j=c._uiBindings||b.result(c,"ui"),k=b.extend({},g,j);i=a.normalizeUIKeys(i,k);var l=0;b.each(i,function(a,f){var g=f.match(e),i=g[1]+"."+[this.cid,d,l++," "].join(""),j=g[2],k=i+j,m=b.isFunction(a)?a:c[a];h[k]=b.bind(m,c)},this),f=b.extend(f,h)},this),f}};return b.extend(c,{behaviorsLookup:function(){throw new a.Error({message:"You must define where your behaviors are stored.",url:"marionette.behaviors.html#behaviorslookup"})},getBehaviorClass:function(b,d){return b.behaviorClass?b.behaviorClass:a._getValue(c.behaviorsLookup,this,[b,d])[d]},parseBehaviors:function(a,d){return b.chain(d).map(function(d,e){var f=c.getBehaviorClass(d,e),g=new f(d,a),h=c.parseBehaviors(a,b.result(g,"behaviors"));return[g].concat(h)}).flatten().value()},wrap:function(a,c,d){b.each(d,function(d){a[d]=b.partial(f[d],a[d],c)})}}),b.extend(d.prototype,{buildBehaviorTriggers:function(){return b.each(this._behaviors,this._buildTriggerHandlersForBehavior,this),this._triggers},_buildTriggerHandlersForBehavior:function(c,d){var e=b.extend({},this._viewUI,b.result(c,"ui")),f=b.clone(b.result(c,"triggers"))||{};f=a.normalizeUIKeys(f,e),b.each(f,b.bind(this._setHandlerForBehavior,this,c,d))},_setHandlerForBehavior:function(a,b,c,d){var e=d.replace(/^\S+/,function(a){return a+".behaviortriggers"+b});this._triggers[e]=this._view._buildViewTrigger(c)}}),c}(e,c),e.AppRouter=b.Router.extend({constructor:function(a){this.options=a||{},b.Router.apply(this,arguments);var c=this.getOption("appRoutes"),d=this._getController();this.processAppRoutes(d,c),this.on("route",this._processOnRoute,this)},appRoute:function(a,b){var c=this._getController();this._addAppRoute(c,a,b)},_processOnRoute:function(a,b){if(c.isFunction(this.onRoute)){var d=c.invert(this.getOption("appRoutes"))[a];this.onRoute(a,d,b)}},processAppRoutes:function(a,b){if(b){var d=c.keys(b).reverse();c.each(d,function(c){this._addAppRoute(a,c,b[c])},this)}},_getController:function(){return this.getOption("controller")},_addAppRoute:function(a,b,d){var f=a[d];if(!f)throw new e.Error('Method "'+d+'" was not found on the controller');this.route(b,d,c.bind(f,a))},getOption:e.proxyGetOption,triggerMethod:e.triggerMethod,bindEntityEvents:e.proxyBindEntityEvents,unbindEntityEvents:e.proxyUnbindEntityEvents}),e.Application=e.Object.extend({constructor:function(a){this._initializeRegions(a),this._initCallbacks=new e.Callbacks,this.submodules={},c.extend(this,a),this._initChannel(),e.Object.call(this,a)},execute:function(){this.commands.execute.apply(this.commands,arguments)},request:function(){return this.reqres.request.apply(this.reqres,arguments)},addInitializer:function(a){this._initCallbacks.add(a)},start:function(a){this.triggerMethod("before:start",a),this._initCallbacks.run(a,this),this.triggerMethod("start",a)},addRegions:function(a){return this._regionManager.addRegions(a)},emptyRegions:function(){return this._regionManager.emptyRegions()},removeRegion:function(a){return this._regionManager.removeRegion(a)},getRegion:function(a){return this._regionManager.get(a)},getRegions:function(){return this._regionManager.getRegions()},module:function(a,b){var d=e.Module.getClass(b),f=c.toArray(arguments);return f.unshift(this),d.create.apply(d,f)},getRegionManager:function(){return new e.RegionManager},_initializeRegions:function(a){var b=c.isFunction(this.regions)?this.regions(a):this.regions||{};this._initRegionManager();var d=e.getOption(a,"regions");return c.isFunction(d)&&(d=d.call(this,a)),c.extend(b,d),this.addRegions(b),this},_initRegionManager:function(){this._regionManager=this.getRegionManager(),this._regionManager._parent=this,this.listenTo(this._regionManager,"before:add:region",function(){e._triggerMethod(this,"before:add:region",arguments)}),this.listenTo(this._regionManager,"add:region",function(a,b){this[a]=b,e._triggerMethod(this,"add:region",arguments)}),this.listenTo(this._regionManager,"before:remove:region",function(){e._triggerMethod(this,"before:remove:region",arguments)}),this.listenTo(this._regionManager,"remove:region",function(a){delete this[a],e._triggerMethod(this,"remove:region",arguments)})},_initChannel:function(){this.channelName=c.result(this,"channelName")||"global",this.channel=c.result(this,"channel")||b.Wreqr.radio.channel(this.channelName),this.vent=c.result(this,"vent")||this.channel.vent,this.commands=c.result(this,"commands")||this.channel.commands,this.reqres=c.result(this,"reqres")||this.channel.reqres}}),e.Module=function(a,b,d){this.moduleName=a,this.options=c.extend({},this.options,d),this.initialize=d.initialize||this.initialize,this.submodules={},this._setupInitializersAndFinalizers(),this.app=b,c.isFunction(this.initialize)&&this.initialize(a,b,this.options)},e.Module.extend=e.extend,c.extend(e.Module.prototype,b.Events,{startWithParent:!0,initialize:function(){},addInitializer:function(a){this._initializerCallbacks.add(a)},addFinalizer:function(a){this._finalizerCallbacks.add(a)},start:function(a){this._isInitialized||(c.each(this.submodules,function(b){b.startWithParent&&b.start(a)}),this.triggerMethod("before:start",a),this._initializerCallbacks.run(a,this),this._isInitialized=!0,this.triggerMethod("start",a))},stop:function(){this._isInitialized&&(this._isInitialized=!1,this.triggerMethod("before:stop"),c.invoke(this.submodules,"stop"),this._finalizerCallbacks.run(void 0,this),this._initializerCallbacks.reset(),this._finalizerCallbacks.reset(),this.triggerMethod("stop"))},addDefinition:function(a,b){this._runModuleDefinition(a,b)},_runModuleDefinition:function(a,d){if(a){var f=c.flatten([this,this.app,b,e,b.$,c,d]);a.apply(this,f)}},_setupInitializersAndFinalizers:function(){this._initializerCallbacks=new e.Callbacks,this._finalizerCallbacks=new e.Callbacks},triggerMethod:e.triggerMethod}),c.extend(e.Module,{create:function(a,b,d){var e=a,f=c.rest(arguments,3);b=b.split(".");var g=b.length,h=[];return h[g-1]=d,c.each(b,function(b,c){var g=e;e=this._getModule(g,b,a,d),this._addModuleDefinition(g,e,h[c],f)},this),e},_getModule:function(a,b,d,e,f){var g=c.extend({},e),h=this.getClass(e),i=a[b];return i||(i=new h(b,d,g),a[b]=i,a.submodules[b]=i),i},getClass:function(a){var b=e.Module;return a?a.prototype instanceof b?a:a.moduleClass||b:b},_addModuleDefinition:function(a,b,c,d){var e=this._getDefine(c),f=this._getStartWithParent(c,b);e&&b.addDefinition(e,d),this._addStartWithParent(a,b,f)},_getStartWithParent:function(a,b){var d;return c.isFunction(a)&&a.prototype instanceof e.Module?(d=b.constructor.prototype.startWithParent,c.isUndefined(d)?!0:d):c.isObject(a)?(d=a.startWithParent,c.isUndefined(d)?!0:d):!0},_getDefine:function(a){return!c.isFunction(a)||a.prototype instanceof e.Module?c.isObject(a)?a.define:null:a},_addStartWithParent:function(a,b,c){b.startWithParent=b.startWithParent&&c,b.startWithParent&&!b.startWithParentIsConfigured&&(b.startWithParentIsConfigured=!0,a.addInitializer(function(a){b.startWithParent&&b.start(a)}))}}),e}),function(a){"function"==typeof define&&define.amd?define(["backbone","underscore"],a):"object"==typeof exports?module.exports=a(require("backbone"),require("underscore")):a(window.Backbone,window._)}(function(a,b){var c=a.Router.prototype.route,d=function(){};b.extend(a.Router.prototype,{before:d,after:d,route:function(a,e,f){f||(f=this[e]);var g=b.bind(function(){ -var c,e=[a,b.toArray(arguments)];if(c=b.isFunction(this.before)?this.before:"undefined"!=typeof this.before[a]?this.before[a]:d,c.apply(this,e)!==!1){f&&f.apply(this,arguments);var g;g=b.isFunction(this.after)?this.after:"undefined"!=typeof this.after[a]?this.after[a]:d,g.apply(this,e)}},this);return c.call(this,a,e,g)}})}),function(a,b,c,d,e,f,g){"use strict";"object"==typeof d?e.exports=f(c("underscore"),c("backbone"),c("jquery")):"function"==typeof b&&b.amd?b(["underscore","backbone","jquery"],function(b,c,d){return b=b===g?a._:b,c=c===g?a.Backbone:c,d=d===g?a.$:d,a.Backbone=f(b,c,d)}):a.returnExportsGlobal=f(a._,a.Backbone,a.$)}(this,this.define,this.require,this.exports,this.module,function(a,b,c,d){"use strict";var e=function(b){this.options=b!==d?b:{},this.namespaceDelimiter=b!==d&&b.namespaceDelimiter!==d?b.namespaceDelimiter:this.namespaceDelimiter,this.contentType=b!==d&&b.contentType!==d?b.contentType:this.contentType,a.bindAll(this)},f=b.Model.prototype.constructor,g=b.sync,h={};return e.prototype={options:{},charset:"iso-8859-1",namespace:"",namespaceDelimiter:"/",contentType:"application/json",url:null,responseID:null,exceptions:{404:{code:-1,message:"404"},500:{code:-2,message:"500"},typeMissmatch:{code:-3,message:"Type missmatch"},badResponseId:{code:-4,message:"Bad response ID"},noResponse:{code:-5,message:"No response"},noDefError:{code:-6,message:"No error defined"},renderError:function(a,b){return{code:b!==d?-7:b,message:a?"No error defined":a}}},onSuccess:function(b,c,e){if(a.isFunction(b)===!0){if(null===e||e===d)return this.handleExceptions(this.exceptions.noResponse),this;null!==e&&c!==String(e.id)&&this.handleExceptions(this.exceptions.badResponseId),b.apply(this,[e.result,e.error])}else this.onError(e)},onError:function(a,b){return null===b||b===d?(this.handleExceptions(this.exceptions.noResponse),this):void(null!==b.error&&d!==b.error?this.handleExceptions(b.error):this.handleExceptions(this.exceptions.noDefError))},query:function(b,e,f){var g=String((new Date).getTime()),h=null;return this.responseID=g,h=(a.isArray(e)||a.isObject(e))&&a.isString(b)?c.ajax({contentType:this.contentType+"; charset="+this.charset,type:"POST",dataType:"json",url:this.url,data:JSON.stringify({jsonrpc:"2.0",method:this.namespace+this.namespaceDelimiter+b,id:g,params:e}),statusCode:{404:a.bind(function(){this.handleExceptions(this.exceptions[404])},this),500:a.bind(function(){this.handleExceptions(this.exceptions[500])},this)},success:a.bind(function(a,b,c){null!==a&&a.error!==d?this.onError(f,a,b,c):this.onSuccess(f,g,a,b,c)},this),error:a.bind(function(a,b,c){404!==a.status&&500!==a.status&&this.onError(f,a,b,c)},this)}):this.handleExceptions(this.exceptions.typeMissmatch)},checkMethods:function(c,e,f,g,i,j,k){var l=this,m=this.options&&this.options.useNamedParameters===!0,n=null,o=!1,p=null,q=[],r={},s=null,t=f;return m=f.options&&f.options.useNamedParameters?f.options.useNamedParameters:m,m&&(q={},a.isFunction(f.args)&&(t=f.args())),g="delete"===g?"remove":g,a.isArray(f.methods[g])||a.isFunction(f.methods[g])?(a.isFunction(f.methods[g])?(a.isString(h[f.get("_rpcId")])||a.each(h[f.get("_rpcId")],function(a,b){f.get(b)!==a&&(r[b]=!0)}),h[f.get("_rpcId")]=f.toJSON(),n=a.bind(f.methods[g],f)(r,i)):n=f.methods[g],a.isArray(n[0])&&(o=!0),o!==!0?(s=a.clone(n),p=s.shift(),s.length>0?a.each(s,function(c){""===c?a.isArray(q)&&q.push(""):f instanceof b.Collection?t!==d&&t[c]!==d?q=l.addParam(q,t,c,a.isFunction(t[c]),!1):i[c]!==d&&(q=l.addParam(q,i,c,!1,!1)):f.get(c)!==d?q=l.addParam(q,f,c,!1,!0):i[c]!==d&&(q=l.addParam(q,i,c,!1,!1))}):q=a.isArray(q)?[]:{},c(p,q,j,k)):(a.each(n,function(b){var d=a.clone(b);return p=null,q=[],p=d.shift(),a.each(d,function(a){q.push(f.get(a))}),c(p,q,j,k)}),null)):this.handleExceptions(this.exceptions.typeMissmatch)},addParam:function(b,c,e,f,g){var h;return h=g?c.get(e):f?c[e]():c[e],a.isArray(b)?b.push(h):h!==d&&(b[e]=h),b},invoke:function(c,e,f){var g={success:function(b){e.trigger("called:"+c,e,b),f!==d&&a.isFunction(f.success)&&f.success(e,b)},error:function(b,e){b.trigger("error",b,e),b.trigger("error:"+c,b,e),f!==d&&a.isFunction(f.error)&&f.error(b,e)}};return b.sync(c,e,g),this},defaultExceptionHandler:function(a){throw"Error code: "+a.code+" - message: "+a.message},handleExceptions:function(b){var c=a.isFunction(this.options.exceptionHandler)?this.options.exceptionHandler:this.defaultExceptionHandler;return c.call(this,b),this}},b.Rpc=e,b.Model=b.Model.extend({constructor:function(b){this.rpc!==d&&a.isFunction(this.rpc.invoke)===!0&&this.methods!==d&&a.each(this.methods,a.bind(function(b,c){1!=={read:1,create:1,remove:1,update:1}[c]&&(this[c]=a.bind(function(a){return this.rpc.invoke(c,this,a),this},this))},this)),f.apply(this,arguments)}}),b.sync=function(c){var e=null,f=function(g,i,j){var k=function(c,e){return null!==e&&e!==d?(j.error(i,e),this):(i instanceof b.Collection&&c!==d&&null!==c&&("object"==typeof c[0]?a.each(c,function(b,d){b._rpcId=a.uniqueId("rpc_"),c[d]=b,h[b._rpcId]=b}):a.each(c,function(a,b){h[b]=a})),i instanceof b.Model&&c!==d&&null!==c&&(c._rpcId=a.uniqueId("rpc_"),h[c._rpcId]=c),(c===d||null===c)&&(c=[]),i.parsers!==d&&i.parsers[g]!==d&&a.isFunction(i.parsers[g])&&i.parsers[g].apply(i,[c]),void j.success(c))},l=function(a){j.error(i,a)};if(i.rpc instanceof c){if(e=i.rpc,e.url=a.isFunction(i.url)?i.url():i.url,a.isString(i.namespace)===!0&&(e.namespace=i.namespace),i.methods===d)throw"Backbone.Rpc Error: No Method(s) given!";return"object"!=typeof i.params&&(i.params={}),e.checkMethods(e.query,i.params,i,g,j,k,l)}return f.previous.apply(i,arguments)};return f.previous=g,f}(e),b}),function(a,b){if("function"==typeof define&&define.amd)define(["underscore","backbone","jquery"],function(a,c,d){return b(a,c,d)});else if("undefined"!=typeof exports){var c=require("underscore"),d=require("backbone"),e=require("jquery");module.exports=b(c,d,e)}else b(a._,a.Backbone,a.jQuery)}(this,function(a,b,c){"use strict";var d=b.Syphon,e=b.Syphon={};e.VERSION="0.5.0",e.noConflict=function(){return b.Syphon=d,this},e.ignoredTypes=["button","submit","reset","fieldset"],e.serialize=function(b,d){var e={},h=i(d),k=f(b,h);return a.each(k,function(a){var b=c(a),d=g(b),f=h.keyExtractors.get(d),i=f(b),k=h.inputReaders.get(d),l=k(b),m=h.keyAssignmentValidators.get(d);if(m(b,i,l)){var n=h.keySplitter(i);e=j(e,n,l)}}),e},e.deserialize=function(b,d,e){var h=i(e),j=f(b,h),l=k(h,d);a.each(j,function(a){var b=c(a),d=g(b),e=h.keyExtractors.get(d),f=e(b),i=h.inputWriters.get(d),j=l[f];i(b,j)})};var f=function(b,d){var e=h(b),f=e.elements;return f=a.reject(f,function(b){var e,f=g(b),h=d.keyExtractors.get(f),i=h(c(b)),j=a.include(d.ignoredTypes,f),k=a.include(d.include,i),l=a.include(d.exclude,i);return e=k?!1:d.include?!0:l||j})},g=function(a){var b,d=c(a),e=d[0].tagName,f=e;return"input"===e.toLowerCase()&&(b=d.attr("type"),f=b?b:"text"),f.toLowerCase()},h=function(b){return a.isUndefined(b.$el)&&"form"===b.tagName.toLowerCase()?b:b.$el.is("form")?b.el:b.$("form")[0]},i=function(b){var c=a.clone(b)||{};return c.ignoredTypes=a.clone(e.ignoredTypes),c.inputReaders=c.inputReaders||e.InputReaders,c.inputWriters=c.inputWriters||e.InputWriters,c.keyExtractors=c.keyExtractors||e.KeyExtractors,c.keySplitter=c.keySplitter||e.KeySplitter,c.keyJoiner=c.keyJoiner||e.KeyJoiner,c.keyAssignmentValidators=c.keyAssignmentValidators||e.KeyAssignmentValidators,c},j=function(b,c,d){if(!c)return b;var e=c.shift();return b[e]||(b[e]=a.isArray(e)?[]:{}),0===c.length&&(a.isArray(b[e])?b[e].push(d):b[e]=d),c.length>0&&j(b[e],c,d),b},k=function(b,c,d){var e={};return a.each(c,function(c,f){var g={};d&&(f=b.keyJoiner(d,f)),a.isArray(c)?(f+="[]",g[f]=c):a.isObject(c)?g=k(b,c,f):g[f]=c,a.extend(e,g)}),e},l=e.TypeRegistry=function(){this.registeredTypes={}};l.extend=b.Model.extend,a.extend(l.prototype,{get:function(a){return this.registeredTypes[a]||this.registeredTypes["default"]},register:function(a,b){this.registeredTypes[a]=b},registerDefault:function(a){this.registeredTypes["default"]=a},unregister:function(a){this.registeredTypes[a]&&delete this.registeredTypes[a]}});var m=e.KeyExtractorSet=l.extend(),n=e.KeyExtractors=new m;n.registerDefault(function(a){return a.prop("name")||""});var o=e.InputReaderSet=l.extend(),p=e.InputReaders=new o;p.registerDefault(function(a){return a.val()}),p.register("checkbox",function(a){return a.prop("checked")});var q=e.InputWriterSet=l.extend(),r=e.InputWriters=new q;r.registerDefault(function(a,b){a.val(b)}),r.register("checkbox",function(a,b){a.prop("checked",b)}),r.register("radio",function(a,b){a.prop("checked",a.val()===b.toString())});var s=e.KeyAssignmentValidatorSet=l.extend(),t=e.KeyAssignmentValidators=new s;return t.registerDefault(function(){return!0}),t.register("radio",function(a,b,c){return a.prop("checked")}),e.KeySplitter=function(a){var b,c=a.match(/[^\[\]]+/g);return a.indexOf("[]")===a.length-2&&(b=c.pop(),c.push([b])),c},e.KeyJoiner=function(a,b){return a+"["+b+"]"},b.Syphon}),function(a,b){if("function"==typeof define&&define.amd)define(["backbone","underscore"],function(a,c){return b(a,c)});else if("undefined"!=typeof exports){var c=require("backbone"),d=require("underscore");module.exports=b(c,d)}else b(a.Backbone,a._)}(this,function(a,b){"use strict";var c=a.Wreqr,d=a.Wreqr={};return a.Wreqr.VERSION="1.3.2",a.Wreqr.noConflict=function(){return a.Wreqr=c,this},d.Handlers=function(a,b){var c=function(a){this.options=a,this._wreqrHandlers={},b.isFunction(this.initialize)&&this.initialize(a)};return c.extend=a.Model.extend,b.extend(c.prototype,a.Events,{setHandlers:function(a){b.each(a,function(a,c){var d=null;b.isObject(a)&&!b.isFunction(a)&&(d=a.context,a=a.callback),this.setHandler(c,a,d)},this)},setHandler:function(a,b,c){var d={callback:b,context:c};this._wreqrHandlers[a]=d,this.trigger("handler:add",a,b,c)},hasHandler:function(a){return!!this._wreqrHandlers[a]},getHandler:function(a){var b=this._wreqrHandlers[a];if(b)return function(){return b.callback.apply(b.context,arguments)}},removeHandler:function(a){delete this._wreqrHandlers[a]},removeAllHandlers:function(){this._wreqrHandlers={}}}),c}(a,b),d.CommandStorage=function(){var c=function(a){this.options=a,this._commands={},b.isFunction(this.initialize)&&this.initialize(a)};return b.extend(c.prototype,a.Events,{getCommands:function(a){var b=this._commands[a];return b||(b={command:a,instances:[]},this._commands[a]=b),b},addCommand:function(a,b){var c=this.getCommands(a);c.instances.push(b)},clearCommands:function(a){var b=this.getCommands(a);b.instances=[]}}),c}(),d.Commands=function(a,b){return a.Handlers.extend({storageType:a.CommandStorage,constructor:function(b){this.options=b||{},this._initializeStorage(this.options),this.on("handler:add",this._executeCommands,this),a.Handlers.prototype.constructor.apply(this,arguments)},execute:function(a){a=arguments[0];var c=b.rest(arguments);this.hasHandler(a)?this.getHandler(a).apply(this,c):this.storage.addCommand(a,c)},_executeCommands:function(a,c,d){var e=this.storage.getCommands(a);b.each(e.instances,function(a){c.apply(d,a)}),this.storage.clearCommands(a)},_initializeStorage:function(a){var c,d=a.storageType||this.storageType;c=b.isFunction(d)?new d:d,this.storage=c}})}(d,b),d.RequestResponse=function(a,b){return a.Handlers.extend({request:function(a){return this.hasHandler(a)?this.getHandler(a).apply(this,b.rest(arguments)):void 0}})}(d,b),d.EventAggregator=function(a,b){var c=function(){};return c.extend=a.Model.extend,b.extend(c.prototype,a.Events),c}(a,b),d.Channel=function(c){var d=function(b){this.vent=new a.Wreqr.EventAggregator,this.reqres=new a.Wreqr.RequestResponse,this.commands=new a.Wreqr.Commands,this.channelName=b};return b.extend(d.prototype,{reset:function(){return this.vent.off(),this.vent.stopListening(),this.reqres.removeAllHandlers(),this.commands.removeAllHandlers(),this},connectEvents:function(a,b){return this._connect("vent",a,b),this},connectCommands:function(a,b){return this._connect("commands",a,b),this},connectRequests:function(a,b){return this._connect("reqres",a,b),this},_connect:function(a,c,d){if(c){d=d||this;var e="vent"===a?"on":"setHandler";b.each(c,function(c,f){this[a][e](f,b.bind(c,d))},this)}}}),d}(d),d.radio=function(a,b){var c=function(){this._channels={},this.vent={},this.commands={},this.reqres={},this._proxyMethods()};b.extend(c.prototype,{channel:function(a){if(!a)throw new Error("Channel must receive a name");return this._getChannel(a)},_getChannel:function(b){var c=this._channels[b];return c||(c=new a.Channel(b),this._channels[b]=c),c},_proxyMethods:function(){b.each(["vent","commands","reqres"],function(a){b.each(d[a],function(b){this[a][b]=e(this,a,b)},this)},this)}});var d={vent:["on","off","trigger","once","stopListening","listenTo","listenToOnce"],commands:["execute","setHandler","setHandlers","removeHandler","removeAllHandlers"],reqres:["request","setHandler","setHandlers","removeHandler","removeAllHandlers"]},e=function(a,c,d){return function(e){var f=a._getChannel(e)[c];return f[d].apply(f,b.rest(arguments))}};return new c}(d,b),a.Wreqr});var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a){var b,c,d,e,f,g,h,i="",j=0;for(a=Base64._utf8_encode(a);j<a.length;)b=a.charCodeAt(j++),c=a.charCodeAt(j++),d=a.charCodeAt(j++),e=b>>2,f=(3&b)<<4|c>>4,g=(15&c)<<2|d>>6,h=63&d,isNaN(c)?g=h=64:isNaN(d)&&(h=64),i=i+this._keyStr.charAt(e)+this._keyStr.charAt(f)+this._keyStr.charAt(g)+this._keyStr.charAt(h);return i},decode:function(a){var b,c,d,e,f,g,h,i="",j=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");j<a.length;)e=this._keyStr.indexOf(a.charAt(j++)),f=this._keyStr.indexOf(a.charAt(j++)),g=this._keyStr.indexOf(a.charAt(j++)),h=this._keyStr.indexOf(a.charAt(j++)),b=e<<2|f>>4,c=(15&f)<<4|g>>2,d=(3&g)<<6|h,i+=String.fromCharCode(b),64!=g&&(i+=String.fromCharCode(c)),64!=h&&(i+=String.fromCharCode(d));return i=Base64._utf8_decode(i)},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);128>d?b+=String.fromCharCode(d):d>127&&2048>d?(b+=String.fromCharCode(d>>6|192),b+=String.fromCharCode(63&d|128)):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128),b+=String.fromCharCode(63&d|128))}return b},_utf8_decode:function(a){for(var b="",c=0,d=c1=c2=0;c<a.length;)d=a.charCodeAt(c),128>d?(b+=String.fromCharCode(d),c++):d>191&&224>d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((31&d)<<6|63&c2),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((15&d)<<12|(63&c2)<<6|63&c3),c+=3);return b}};!function(a){var b={onBeforeRender:function(){this._isRendering=!0},onRender:function(){this.footer?this.footerElement=this.$el.find(this.footer)[0]:this.footerElement=null,delete this._isRendering},appendHtml:function(a,b,c){function d(b){for(var c=1,d=e(b+1);!d&&b+c+1<a.collection.length-1;)c+=1,d=e(b+c);return d}function e(b){if(!(b>=a.collection.length)){var c=a.children.findByModel(a.collection.at(b));return c}}var f=this.footerElement,g=a.itemViewContainer||a.el,h=a.itemViewContainer?$(a.itemViewContainer):a.$el;if(this._isRendering)return void(f?b.$el.insertBefore(f):h.append(b.el));var i;return 0===c?(i=d(0),void(i?b.$el.insertBefore(i.el):f?b.$el.insertBefore(f):b.$el.appendTo(g))):c==a.collection.length-1?void(f?b.$el.insertBefore(f):b.$el.appendTo(g)):(i=e(c-1),void(i?b.$el.insertAfter(i.$el):(i=d(c),i?b.$el.insertBefore(i.el):f?b.$el.insertBefore(f):b.$el.appendTo(g))))}};return a.SortedMixin=b,"function"==typeof define&&define.amd&&define([],function(){return b}),b}(window),Date.CultureInfo={name:"en-US",englishName:"English (United States)",nativeName:"English (United States)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"mdy",formatPatterns:{shortDate:"M/d/yyyy",longDate:"dddd, MMMM dd, yyyy",shortTime:"h:mm tt",longTime:"h:mm:ss tt",fullDateTime:"dddd, MMMM dd, yyyy h:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^jan(uary)?/i,feb:/^feb(ruary)?/i,mar:/^mar(ch)?/i,apr:/^apr(il)?/i,may:/^may/i,jun:/^jun(e)?/i,jul:/^jul(y)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^oct(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^su(n(day)?)?/i,mon:/^mo(n(day)?)?/i,tue:/^tu(e(s(day)?)?)?/i,wed:/^we(d(nesday)?)?/i,thu:/^th(u(r(s(day)?)?)?)?/i,fri:/^fr(i(day)?)?/i,sat:/^sa(t(urday)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|aft(er)?|from|hence)/i,subtract:/^(\-|bef(ore)?|ago)/i,yesterday:/^yes(terday)?/i,today:/^t(od(ay)?)?/i,tomorrow:/^tom(orrow)?/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^mn|min(ute)?s?/i,hour:/^h(our)?s?/i,week:/^w(eek)?s?/i,month:/^m(onth)?s?/i,day:/^d(ay)?s?/i,year:/^y(ear)?s?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt|utc)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a(?!u|p)|p)/i},timezones:[{name:"UTC",offset:"-000"},{name:"GMT",offset:"-000"},{name:"EST",offset:"-0500"},{name:"EDT",offset:"-0400"},{name:"CST",offset:"-0600"},{name:"CDT",offset:"-0500"},{name:"MST",offset:"-0700"},{name:"MDT",offset:"-0600"},{name:"PST",offset:"-0800"},{name:"PDT",offset:"-0700"}]},function(){var a=Date,b=a.prototype,c=a.CultureInfo,d=function(a,b){return b||(b=2),("000"+a).slice(-1*b)};b.clearTime=function(){return this.setHours(0),this.setMinutes(0),this.setSeconds(0),this.setMilliseconds(0),this},b.setTimeToNow=function(){var a=new Date;return this.setHours(a.getHours()),this.setMinutes(a.getMinutes()),this.setSeconds(a.getSeconds()),this.setMilliseconds(a.getMilliseconds()),this},a.today=function(){return(new Date).clearTime()},a.compare=function(a,b){if(isNaN(a)||isNaN(b))throw new Error(a+" - "+b);if(a instanceof Date&&b instanceof Date)return b>a?-1:a>b?1:0;throw new TypeError(a+" - "+b)},a.equals=function(a,b){return 0===a.compareTo(b)},a.getDayNumberFromName=function(a){for(var b=c.dayNames,d=c.abbreviatedDayNames,e=c.shortestDayNames,f=a.toLowerCase(),g=0;g<b.length;g++)if(b[g].toLowerCase()==f||d[g].toLowerCase()==f||e[g].toLowerCase()==f)return g;return-1},a.getMonthNumberFromName=function(a){for(var b=c.monthNames,d=c.abbreviatedMonthNames,e=a.toLowerCase(),f=0;f<b.length;f++)if(b[f].toLowerCase()==e||d[f].toLowerCase()==e)return f;return-1},a.isLeapYear=function(a){return a%4===0&&a%100!==0||a%400===0},a.getDaysInMonth=function(b,c){return[31,a.isLeapYear(b)?29:28,31,30,31,30,31,31,30,31,30,31][c]},a.getTimezoneAbbreviation=function(a){for(var b=c.timezones,d=0;d<b.length;d++)if(b[d].offset===a)return b[d].name;return null},a.getTimezoneOffset=function(a){for(var b=c.timezones,d=0;d<b.length;d++)if(b[d].name===a.toUpperCase())return b[d].offset;return null},b.clone=function(){return new Date(this.getTime())},b.compareTo=function(a){return Date.compare(this,a)},b.equals=function(a){return Date.equals(this,a||new Date)},b.between=function(a,b){return this.getTime()>=a.getTime()&&this.getTime()<=b.getTime()},b.isAfter=function(a){return 1===this.compareTo(a||new Date)},b.isBefore=function(a){return-1===this.compareTo(a||new Date)},b.isToday=function(){return this.isSameDay(new Date)},b.isSameDay=function(a){return this.clone().clearTime().equals(a.clone().clearTime())},b.addMilliseconds=function(a){return this.setMilliseconds(this.getMilliseconds()+a),this},b.addSeconds=function(a){return this.addMilliseconds(1e3*a)},b.addMinutes=function(a){return this.addMilliseconds(6e4*a)},b.addHours=function(a){return this.addMilliseconds(36e5*a)},b.addDays=function(a){return this.setDate(this.getDate()+a),this},b.addWeeks=function(a){return this.addDays(7*a)},b.addMonths=function(b){var c=this.getDate();return this.setDate(1),this.setMonth(this.getMonth()+b),this.setDate(Math.min(c,a.getDaysInMonth(this.getFullYear(),this.getMonth()))),this},b.addYears=function(a){return this.addMonths(12*a)},b.add=function(a){if("number"==typeof a)return this._orient=a,this;var b=a;return b.milliseconds&&this.addMilliseconds(b.milliseconds),b.seconds&&this.addSeconds(b.seconds),b.minutes&&this.addMinutes(b.minutes),b.hours&&this.addHours(b.hours),b.weeks&&this.addWeeks(b.weeks),b.months&&this.addMonths(b.months),b.years&&this.addYears(b.years),b.days&&this.addDays(b.days),this};var e,f,g;b.getWeek=function(){var a,b,c,d,h,i,j,k,l,m;return e=e?e:this.getFullYear(),f=f?f:this.getMonth()+1,g=g?g:this.getDate(),2>=f?(a=e-1,b=(a/4|0)-(a/100|0)+(a/400|0),c=((a-1)/4|0)-((a-1)/100|0)+((a-1)/400|0),l=b-c,h=0,i=g-1+31*(f-1)):(a=e,b=(a/4|0)-(a/100|0)+(a/400|0),c=((a-1)/4|0)-((a-1)/100|0)+((a-1)/400|0),l=b-c,h=l+1,i=g+(153*(f-3)+2)/5+58+l),j=(a+b)%7,d=(i+j-h)%7,k=i+3-d|0,m=0>k?53-((j-l)/5|0):k>364+l?1:(k/7|0)+1,e=f=g=null,m},b.getISOWeek=function(){return e=this.getUTCFullYear(),f=this.getUTCMonth()+1,g=this.getUTCDate(),d(this.getWeek())},b.setWeek=function(a){return this.moveToDayOfWeek(1).addWeeks(a-this.getWeek())},a._validate=function(a,b,c,d){if("undefined"==typeof a)return!1;if("number"!=typeof a)throw new TypeError(a+" is not a Number.");if(b>a||a>c)throw new RangeError(a+" is not a valid value for "+d+".");return!0},a.validateMillisecond=function(b){return a._validate(b,0,999,"millisecond")},a.validateSecond=function(b){return a._validate(b,0,59,"second")},a.validateMinute=function(b){return a._validate(b,0,59,"minute")},a.validateHour=function(b){return a._validate(b,0,23,"hour")},a.validateDay=function(b,c,d){return a._validate(b,1,a.getDaysInMonth(c,d),"day")},a.validateMonth=function(b){return a._validate(b,0,11,"month")},a.validateYear=function(b){return a._validate(b,0,9999,"year")},b.set=function(b){return a.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds()),a.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds()),a.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes()),a.validateHour(b.hour)&&this.addHours(b.hour-this.getHours()),a.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth()),a.validateYear(b.year)&&this.addYears(b.year-this.getFullYear()),a.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate()),b.timezone&&this.setTimezone(b.timezone),b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset),b.week&&a._validate(b.week,0,53,"week")&&this.setWeek(b.week),this},b.moveToFirstDayOfMonth=function(){return this.set({day:1})},b.moveToLastDayOfMonth=function(){return this.set({day:a.getDaysInMonth(this.getFullYear(),this.getMonth())})},b.moveToNthOccurrence=function(a,b){var c=0;if(b>0)c=b-1;else if(-1===b)return this.moveToLastDayOfMonth(),this.getDay()!==a&&this.moveToDayOfWeek(a,-1),this;return this.moveToFirstDayOfMonth().addDays(-1).moveToDayOfWeek(a,1).addWeeks(c)},b.moveToDayOfWeek=function(a,b){var c=(a-this.getDay()+7*(b||1))%7;return this.addDays(0===c?c+=7*(b||1):c)},b.moveToMonth=function(a,b){var c=(a-this.getMonth()+12*(b||1))%12;return this.addMonths(0===c?c+=12*(b||1):c)},b.getOrdinalNumber=function(){return Math.ceil((this.clone().clearTime()-new Date(this.getFullYear(),0,1))/864e5)+1},b.getTimezone=function(){return a.getTimezoneAbbreviation(this.getUTCOffset())},b.setTimezoneOffset=function(a){var b=this.getTimezoneOffset(),c=-6*Number(a)/10;return this.addMinutes(c-b)},b.setTimezone=function(b){return this.setTimezoneOffset(a.getTimezoneOffset(b))},b.hasDaylightSavingTime=function(){return Date.today().set({month:0,day:1}).getTimezoneOffset()!==Date.today().set({month:6,day:1}).getTimezoneOffset()},b.isDaylightSavingTime=function(){return this.hasDaylightSavingTime()&&(new Date).getTimezoneOffset()===Date.today().set({month:6,day:1}).getTimezoneOffset()},b.getUTCOffset=function(){var a,b=-10*this.getTimezoneOffset()/6;return 0>b?(a=(b-1e4).toString(),a.charAt(0)+a.substr(2)):(a=(b+1e4).toString(),"+"+a.substr(1))},b.getElapsed=function(a){return(a||new Date)-this},b.toISOString||(b.toISOString=function(){function a(a){return 10>a?"0"+a:a}return'"'+this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+'Z"'}),b._toString=b.toString,b.toString=function(a){var b=this;if(a&&1==a.length){var e=c.formatPatterns;switch(b.t=b.toString,a){case"d":return b.t(e.shortDate);case"D":return b.t(e.longDate);case"F":return b.t(e.fullDateTime);case"m":return b.t(e.monthDay);case"r":return b.t(e.rfc1123);case"s":return b.t(e.sortableDateTime);case"t":return b.t(e.shortTime);case"T":return b.t(e.longTime);case"u":return b.t(e.universalSortableDateTime);case"y":return b.t(e.yearMonth)}}var f=function(a){switch(1*a){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};return a?a.replace(/(\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S)/g,function(a){if("\\"===a.charAt(0))return a.replace("\\","");switch(b.h=b.getHours,a){case"hh":return d(b.h()<13?0===b.h()?12:b.h():b.h()-12);case"h":return b.h()<13?0===b.h()?12:b.h():b.h()-12;case"HH":return d(b.h());case"H":return b.h();case"mm":return d(b.getMinutes());case"m":return b.getMinutes();case"ss":return d(b.getSeconds());case"s":return b.getSeconds();case"yyyy":return d(b.getFullYear(),4);case"yy":return d(b.getFullYear());case"dddd":return c.dayNames[b.getDay()];case"ddd":return c.abbreviatedDayNames[b.getDay()];case"dd":return d(b.getDate());case"d":return b.getDate();case"MMMM":return c.monthNames[b.getMonth()];case"MMM":return c.abbreviatedMonthNames[b.getMonth()];case"MM":return d(b.getMonth()+1);case"M":return b.getMonth()+1;case"t":return b.h()<12?c.amDesignator.substring(0,1):c.pmDesignator.substring(0,1);case"tt":return b.h()<12?c.amDesignator:c.pmDesignator;case"S":return f(b.getDate());default:return a}}):this._toString()}}(),function(){var a=Date,b=a.prototype,c=a.CultureInfo,d=Number.prototype;b._orient=1,b._nth=null,b._is=!1,b._same=!1,b._isSecond=!1,d._dateElement="day",b.next=function(){return this._orient=1,this},a.next=function(){return a.today().next()},b.last=b.prev=b.previous=function(){return this._orient=-1,this},a.last=a.prev=a.previous=function(){return a.today().last()},b.is=function(){return this._is=!0,this},b.same=function(){return this._same=!0,this._isSecond=!1,this},b.today=function(){return this.same().day()},b.weekday=function(){return this._is?(this._is=!1,!this.is().sat()&&!this.is().sun()):!1},b.at=function(b){return"string"==typeof b?a.parse(this.toString("d")+" "+b):this.set(b)},d.fromNow=d.after=function(a){var b={};return b[this._dateElement]=this,(a?a.clone():new Date).add(b)},d.ago=d.before=function(a){var b={};return b[this._dateElement]=-1*this,(a?a.clone():new Date).add(b)};var e,f="sunday monday tuesday wednesday thursday friday saturday".split(/\s/),g="january february march april may june july august september october november december".split(/\s/),h="Millisecond Second Minute Hour Day Week Month Year".split(/\s/),i="Milliseconds Seconds Minutes Hours Date Week Month FullYear".split(/\s/),j="final first second third fourth fifth".split(/\s/);b.toObject=function(){for(var a={},b=0;b<h.length;b++)a[h[b].toLowerCase()]=this["get"+i[b]]();return a},a.fromObject=function(a){return a.week=null,Date.today().set(a)};for(var k=function(b){return function(){if(this._is)return this._is=!1,this.getDay()==b;if(null!==this._nth){this._isSecond&&this.addSeconds(-1*this._orient),this._isSecond=!1;var c=this._nth;this._nth=null;var d=this.clone().moveToLastDayOfMonth();if(this.moveToNthOccurrence(b,c),this>d)throw new RangeError(a.getDayName(b)+" does not occur "+c+" times in the month of "+a.getMonthName(d.getMonth())+" "+d.getFullYear()+".");return this}return this.moveToDayOfWeek(b,this._orient)}},l=function(b){return function(){var d=a.today(),e=b-d.getDay();return 0===b&&1===c.firstDayOfWeek&&0!==d.getDay()&&(e+=7),d.addDays(e)}},m=0;m<f.length;m++)a[f[m].toUpperCase()]=a[f[m].toUpperCase().substring(0,3)]=m,a[f[m]]=a[f[m].substring(0,3)]=l(m),b[f[m]]=b[f[m].substring(0,3)]=k(m);for(var n=function(a){return function(){return this._is?(this._is=!1,this.getMonth()===a):this.moveToMonth(a,this._orient)}},o=function(b){return function(){return a.today().set({month:b,day:1})}},p=0;p<g.length;p++)a[g[p].toUpperCase()]=a[g[p].toUpperCase().substring(0,3)]=p,a[g[p]]=a[g[p].substring(0,3)]=o(p),b[g[p]]=b[g[p].substring(0,3)]=n(p);for(var q=function(a){return function(){if(this._isSecond)return this._isSecond=!1,this;if(this._same){this._same=this._is=!1;for(var b=this.toObject(),c=(arguments[0]||new Date).toObject(),d="",e=a.toLowerCase(),f=h.length-1;f>-1;f--){if(d=h[f].toLowerCase(),b[d]!=c[d])return!1;if(e==d)break}return!0}return"s"!=a.substring(a.length-1)&&(a+="s"),this["add"+a](this._orient)}},r=function(a){return function(){return this._dateElement=a,this}},s=0;s<h.length;s++)e=h[s].toLowerCase(),b[e]=b[e+"s"]=q(h[s]),d[e]=d[e+"s"]=r(e);b._ss=q("Second");for(var t=function(a){return function(b){return this._same?this._ss(arguments[0]):b||0===b?this.moveToNthOccurrence(b,a):(this._nth=a,2!==a||void 0!==b&&null!==b?this:(this._isSecond=!0,this.addSeconds(this._orient)))}},u=0;u<j.length;u++)b[j[u]]=t(0===u?-1:u)}(),function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};for(var a=Date.Parsing,b=a.Operators={rtoken:function(b){return function(c){var d=c.match(b);if(d)return[d[0],c.substring(d[0].length)];throw new a.Exception(c)}},token:function(a){return function(a){return b.rtoken(new RegExp("^s*"+a+"s*"))(a)}},stoken:function(a){return b.rtoken(new RegExp("^"+a))},until:function(a){return function(b){for(var c=[],d=null;b.length;){try{d=a.call(this,b)}catch(e){c.push(d[0]),b=d[1];continue}break}return[c,b]}},many:function(a){return function(b){for(var c=[],d=null;b.length;){try{d=a.call(this,b)}catch(e){return[c,b]}c.push(d[0]),b=d[1]}return[c,b]}},optional:function(a){return function(b){var c=null;try{c=a.call(this,b)}catch(d){return[null,b]}return[c[0],c[1]]}},not:function(b){return function(c){try{b.call(this,c)}catch(d){return[null,c]}throw new a.Exception(c)}},ignore:function(a){return a?function(b){var c=null;return c=a.call(this,b),[null,c[1]]}:null},product:function(){for(var a=arguments[0],c=Array.prototype.slice.call(arguments,1),d=[],e=0;e<a.length;e++)d.push(b.each(a[e],c));return d},cache:function(b){var c={},d=null;return function(e){try{d=c[e]=c[e]||b.call(this,e)}catch(f){d=c[e]=f}if(d instanceof a.Exception)throw d;return d}},any:function(){var b=arguments;return function(c){for(var d=null,e=0;e<b.length;e++)if(null!=b[e]){try{d=b[e].call(this,c)}catch(f){d=null}if(d)return d}throw new a.Exception(c)}},each:function(){var b=arguments;return function(c){for(var d=[],e=null,f=0;f<b.length;f++)if(null!=b[f]){try{e=b[f].call(this,c)}catch(g){throw new a.Exception(c)}d.push(e[0]),c=e[1]}return[d,c]}},all:function(){var a=arguments,b=b;return b.each(b.optional(a))},sequence:function(c,d,e){return d=d||b.rtoken(/^\s*/),e=e||null,1==c.length?c[0]:function(b){for(var f=null,g=null,h=[],i=0;i<c.length;i++){try{f=c[i].call(this,b)}catch(j){break}h.push(f[0]);try{g=d.call(this,f[1])}catch(k){g=null;break}b=g[1]}if(!f)throw new a.Exception(b);if(g)throw new a.Exception(g[1]);if(e)try{f=e.call(this,f[1])}catch(l){throw new a.Exception(f[1])}return[h,f?f[1]:b]}},between:function(a,c,d){d=d||a;var e=b.each(b.ignore(a),c,b.ignore(d)); -return function(a){var b=e.call(this,a);return[[b[0][0],r[0][2]],b[1]]}},list:function(a,c,d){return c=c||b.rtoken(/^\s*/),d=d||null,a instanceof Array?b.each(b.product(a.slice(0,-1),b.ignore(c)),a.slice(-1),b.ignore(d)):b.each(b.many(b.each(a,b.ignore(c))),px,b.ignore(d))},set:function(c,d,e){return d=d||b.rtoken(/^\s*/),e=e||null,function(f){for(var g=null,h=null,i=null,j=null,k=[[],f],l=!1,m=0;m<c.length;m++){i=null,h=null,g=null,l=1==c.length;try{g=c[m].call(this,f)}catch(n){continue}if(j=[[g[0]],g[1]],g[1].length>0&&!l)try{i=d.call(this,g[1])}catch(o){l=!0}else l=!0;if(l||0!==i[1].length||(l=!0),!l){for(var p=[],q=0;q<c.length;q++)m!=q&&p.push(c[q]);h=b.set(p,d).call(this,i[1]),h[0].length>0&&(j[0]=j[0].concat(h[0]),j[1]=h[1])}if(j[1].length<k[1].length&&(k=j),0===k[1].length)break}if(0===k[0].length)return k;if(e){try{i=e.call(this,k[1])}catch(r){throw new a.Exception(k[1])}k[1]=i[1]}return k}},forward:function(a,b){return function(c){return a[b].call(this,c)}},replace:function(a,b){return function(c){var d=a.call(this,c);return[b,d[1]]}},process:function(a,b){return function(c){var d=a.call(this,c);return[b.call(this,d[0]),d[1]]}},min:function(b,c){return function(d){var e=c.call(this,d);if(e[0].length<b)throw new a.Exception(d);return e}}},c=function(a){return function(){var b=null,c=[];if(arguments.length>1?b=Array.prototype.slice.call(arguments):arguments[0]instanceof Array&&(b=arguments[0]),!b)return a.apply(null,arguments);for(var d=0,e=b.shift();d<e.length;d++)return b.unshift(e[d]),c.push(a.apply(null,b)),b.shift(),c}},d="optional not ignore cache".split(/\s/),e=0;e<d.length;e++)b[d[e]]=c(b[d[e]]);for(var f=function(a){return function(){return arguments[0]instanceof Array?a.apply(null,arguments[0]):a.apply(null,arguments)}},g="each any all".split(/\s/),h=0;h<g.length;h++)b[g[h]]=f(b[g[h]])}(),function(){var a=Date,b=(a.prototype,a.CultureInfo),c=function(a){for(var b=[],d=0;d<a.length;d++)a[d]instanceof Array?b=b.concat(c(a[d])):a[d]&&b.push(a[d]);return b};a.Grammar={},a.Translator={hour:function(a){return function(){this.hour=Number(a)}},minute:function(a){return function(){this.minute=Number(a)}},second:function(a){return function(){this.second=Number(a)}},meridian:function(a){return function(){this.meridian=a.slice(0,1).toLowerCase()}},timezone:function(a){return function(){var b=a.replace(/[^\d\+\-]/g,"");b.length?this.timezoneOffset=Number(b):this.timezone=a.toLowerCase()}},day:function(a){var b=a[0];return function(){this.day=Number(b.match(/\d+/)[0])}},month:function(a){return function(){this.month=3==a.length?"jan feb mar apr may jun jul aug sep oct nov dec".indexOf(a)/4:Number(a)-1}},year:function(a){return function(){var c=Number(a);this.year=a.length>2?c:c+(c+2e3<b.twoDigitYearMax?2e3:1900)}},rday:function(a){return function(){switch(a){case"yesterday":this.days=-1;break;case"tomorrow":this.days=1;break;case"today":this.days=0;break;case"now":this.days=0,this.now=!0}}},finishExact:function(b){b=b instanceof Array?b:[b];for(var c=0;c<b.length;c++)b[c]&&b[c].call(this);var d=new Date;if(!this.hour&&!this.minute||this.month||this.year||this.day||(this.day=d.getDate()),this.year||(this.year=d.getFullYear()),this.month||0===this.month||(this.month=d.getMonth()),this.day||(this.day=1),this.hour||(this.hour=0),this.minute||(this.minute=0),this.second||(this.second=0),this.meridian&&this.hour&&("p"==this.meridian&&this.hour<12?this.hour=this.hour+12:"a"==this.meridian&&12==this.hour&&(this.hour=0)),this.day>a.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");var e=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);return this.timezone?e.set({timezone:this.timezone}):this.timezoneOffset&&e.set({timezoneOffset:this.timezoneOffset}),e},finish:function(b){if(b=b instanceof Array?c(b):[b],0===b.length)return null;for(var d=0;d<b.length;d++)"function"==typeof b[d]&&b[d].call(this);var e=a.today();if(this.now&&!this.unit&&!this.operator)return new Date;this.now&&(e=new Date);var f,g,h,i=!!(this.days&&null!==this.days||this.orient||this.operator);if(h="past"==this.orient||"subtract"==this.operator?-1:1,this.now||-1=="hour minute second".indexOf(this.unit)||e.setTimeToNow(),(this.month||0===this.month)&&-1!="year day hour minute second".indexOf(this.unit)&&(this.value=this.month+1,this.month=null,i=!0),!i&&this.weekday&&!this.day&&!this.days){var j=Date[this.weekday]();this.day=j.getDate(),this.month||(this.month=j.getMonth()),this.year=j.getFullYear()}if(i&&this.weekday&&"month"!=this.unit&&(this.unit="day",f=a.getDayNumberFromName(this.weekday)-e.getDay(),g=7,this.days=f?(f+h*g)%g:h*g),this.month&&"day"==this.unit&&this.operator&&(this.value=this.month+1,this.month=null),null!=this.value&&null!=this.month&&null!=this.year&&(this.day=1*this.value),this.month&&!this.day&&this.value&&(e.set({day:1*this.value}),i||(this.day=1*this.value)),this.month||!this.value||"month"!=this.unit||this.now||(this.month=this.value,i=!0),i&&(this.month||0===this.month)&&"year"!=this.unit&&(this.unit="month",f=this.month-e.getMonth(),g=12,this.months=f?(f+h*g)%g:h*g,this.month=null),this.unit||(this.unit="day"),!this.value&&this.operator&&null!==this.operator&&this[this.unit+"s"]&&null!==this[this.unit+"s"]?this[this.unit+"s"]=this[this.unit+"s"]+("add"==this.operator?1:-1)+(this.value||0)*h:(null==this[this.unit+"s"]||null!=this.operator)&&(this.value||(this.value=1),this[this.unit+"s"]=this.value*h),this.meridian&&this.hour&&("p"==this.meridian&&this.hour<12?this.hour=this.hour+12:"a"==this.meridian&&12==this.hour&&(this.hour=0)),this.weekday&&!this.day&&!this.days){var j=Date[this.weekday]();this.day=j.getDate(),j.getMonth()!==e.getMonth()&&(this.month=j.getMonth())}return!this.month&&0!==this.month||this.day||(this.day=1),this.orient||this.operator||"week"!=this.unit||!this.value||this.day||this.month?(i&&this.timezone&&this.day&&this.days&&(this.day=this.days),i?e.add(this):e.set(this)):Date.today().setWeek(this.value)}};var d,e=a.Parsing.Operators,f=a.Grammar,g=a.Translator;f.datePartDelimiter=e.rtoken(/^([\s\-\.\,\/\x27]+)/),f.timePartDelimiter=e.stoken(":"),f.whiteSpace=e.rtoken(/^\s*/),f.generalDelimiter=e.rtoken(/^(([\s\,]|at|@|on)+)/);var h={};f.ctoken=function(a){var c=h[a];if(!c){for(var d=b.regexPatterns,f=a.split(/\s+/),g=[],i=0;i<f.length;i++)g.push(e.replace(e.rtoken(d[f[i]]),f[i]));c=h[a]=e.any.apply(null,g)}return c},f.ctoken2=function(a){return e.rtoken(b.regexPatterns[a])},f.h=e.cache(e.process(e.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),g.hour)),f.hh=e.cache(e.process(e.rtoken(/^(0[0-9]|1[0-2])/),g.hour)),f.H=e.cache(e.process(e.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),g.hour)),f.HH=e.cache(e.process(e.rtoken(/^([0-1][0-9]|2[0-3])/),g.hour)),f.m=e.cache(e.process(e.rtoken(/^([0-5][0-9]|[0-9])/),g.minute)),f.mm=e.cache(e.process(e.rtoken(/^[0-5][0-9]/),g.minute)),f.s=e.cache(e.process(e.rtoken(/^([0-5][0-9]|[0-9])/),g.second)),f.ss=e.cache(e.process(e.rtoken(/^[0-5][0-9]/),g.second)),f.hms=e.cache(e.sequence([f.H,f.m,f.s],f.timePartDelimiter)),f.t=e.cache(e.process(f.ctoken2("shortMeridian"),g.meridian)),f.tt=e.cache(e.process(f.ctoken2("longMeridian"),g.meridian)),f.z=e.cache(e.process(e.rtoken(/^((\+|\-)\s*\d\d\d\d)|((\+|\-)\d\d\:?\d\d)/),g.timezone)),f.zz=e.cache(e.process(e.rtoken(/^((\+|\-)\s*\d\d\d\d)|((\+|\-)\d\d\:?\d\d)/),g.timezone)),f.zzz=e.cache(e.process(f.ctoken2("timezone"),g.timezone)),f.timeSuffix=e.each(e.ignore(f.whiteSpace),e.set([f.tt,f.zzz])),f.time=e.each(e.optional(e.ignore(e.stoken("T"))),f.hms,f.timeSuffix),f.d=e.cache(e.process(e.each(e.rtoken(/^([0-2]\d|3[0-1]|\d)/),e.optional(f.ctoken2("ordinalSuffix"))),g.day)),f.dd=e.cache(e.process(e.each(e.rtoken(/^([0-2]\d|3[0-1])/),e.optional(f.ctoken2("ordinalSuffix"))),g.day)),f.ddd=f.dddd=e.cache(e.process(f.ctoken("sun mon tue wed thu fri sat"),function(a){return function(){this.weekday=a}})),f.M=e.cache(e.process(e.rtoken(/^(1[0-2]|0\d|\d)/),g.month)),f.MM=e.cache(e.process(e.rtoken(/^(1[0-2]|0\d)/),g.month)),f.MMM=f.MMMM=e.cache(e.process(f.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),g.month)),f.y=e.cache(e.process(e.rtoken(/^(\d\d?)/),g.year)),f.yy=e.cache(e.process(e.rtoken(/^(\d\d)/),g.year)),f.yyy=e.cache(e.process(e.rtoken(/^(\d\d?\d?\d?)/),g.year)),f.yyyy=e.cache(e.process(e.rtoken(/^(\d\d\d\d)/),g.year)),d=function(){return e.each(e.any.apply(null,arguments),e.not(f.ctoken2("timeContext")))},f.day=d(f.d,f.dd),f.month=d(f.M,f.MMM),f.year=d(f.yyyy,f.yy),f.orientation=e.process(f.ctoken("past future"),function(a){return function(){this.orient=a}}),f.operator=e.process(f.ctoken("add subtract"),function(a){return function(){this.operator=a}}),f.rday=e.process(f.ctoken("yesterday tomorrow today now"),g.rday),f.unit=e.process(f.ctoken("second minute hour day week month year"),function(a){return function(){this.unit=a}}),f.value=e.process(e.rtoken(/^\d\d?(st|nd|rd|th)?/),function(a){return function(){this.value=a.replace(/\D/g,"")}}),f.expression=e.set([f.rday,f.operator,f.value,f.unit,f.orientation,f.ddd,f.MMM]),d=function(){return e.set(arguments,f.datePartDelimiter)},f.mdy=d(f.ddd,f.month,f.day,f.year),f.ymd=d(f.ddd,f.year,f.month,f.day),f.dmy=d(f.ddd,f.day,f.month,f.year),f.date=function(a){return(f[b.dateElementOrder]||f.mdy).call(this,a)},f.format=e.process(e.many(e.any(e.process(e.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),function(b){if(f[b])return f[b];throw a.Parsing.Exception(b)}),e.process(e.rtoken(/^[^dMyhHmstz]+/),function(a){return e.ignore(e.stoken(a))}))),function(a){return e.process(e.each.apply(null,a),g.finishExact)});var i={},j=function(a){return i[a]=i[a]||f.format(a)[0]};f.formats=function(a){if(a instanceof Array){for(var b=[],c=0;c<a.length;c++)b.push(j(a[c]));return e.any.apply(null,b)}return j(a)},f._formats=f.formats(['"yyyy-MM-ddTHH:mm:ssZ"',"yyyy-MM-ddTHH:mm:ssZ","yyyy-MM-ddTHH:mm:ssz","yyyy-MM-ddTHH:mm:ss","yyyy-MM-ddTHH:mmZ","yyyy-MM-ddTHH:mmz","yyyy-MM-ddTHH:mm","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz","MMddyyyy","ddMMyyyy","Mddyyyy","ddMyyyy","Mdyyyy","dMyyyy","yyyy","Mdyy","dMyy","d"]),f._start=e.process(e.set([f.date,f.time,f.expression],f.generalDelimiter,f.whiteSpace),g.finish),f.start=function(a){try{var b=f._formats.call({},a);if(0===b[1].length)return b}catch(c){}return f._start.call({},a)},a._parse=a.parse,a.parse=function(b){var c=null;if(!b)return null;if(b instanceof Date)return b;try{c=a.Grammar.start.call({},b.replace(/^\s*(\S*(\s+\S+)*)\s*$/,"$1"))}catch(d){return null}return 0===c[1].length?c[0]:null},a.getParseFunction=function(b){var c=a.Grammar.formats(b);return function(a){var b=null;try{b=c.call({},a)}catch(d){return null}return 0===b[1].length?b[0]:null}},a.parseExact=function(b,c){return a.getParseFunction(c)(b)}}(),function(a,b){function c(a){return l.PF.compile(a||"nplurals=2; plural=(n != 1);")}function d(a,b){this._key=a,this._i18n=b}var e=Array.prototype,f=Object.prototype,g=e.slice,h=f.hasOwnProperty,i=e.forEach,j={},k={forEach:function(a,b,c){var d,e,f;if(null!==a)if(i&&a.forEach===i)a.forEach(b,c);else if(a.length===+a.length){for(d=0,e=a.length;e>d;d++)if(d in a&&b.call(c,a[d],d,a)===j)return}else for(f in a)if(h.call(a,f)&&b.call(c,a[f],f,a)===j)return},extend:function(a){return this.forEach(g.call(arguments,1),function(b){for(var c in b)a[c]=b[c]}),a}},l=function(a){if(this.defaults={locale_data:{messages:{"":{domain:"messages",lang:"en",plural_forms:"nplurals=2; plural=(n != 1);"}}},domain:"messages",debug:!1},this.options=k.extend({},this.defaults,a),this.textdomain(this.options.domain),a.domain&&!this.options.locale_data[this.options.domain])throw new Error("Text domain set to non-existent domain: `"+a.domain+"`")};l.context_delimiter=String.fromCharCode(4),k.extend(d.prototype,{onDomain:function(a){return this._domain=a,this},withContext:function(a){return this._context=a,this},ifPlural:function(a,b){return this._val=a,this._pkey=b,this},fetch:function(a){return"[object Array]"!={}.toString.call(a)&&(a=[].slice.call(arguments,0)),(a&&a.length?l.sprintf:function(a){return a})(this._i18n.dcnpgettext(this._domain,this._context,this._key,this._pkey,this._val),a)}}),k.extend(l.prototype,{translate:function(a){return new d(a,this)},textdomain:function(a){return a?void(this._textdomain=a):this._textdomain},gettext:function(a){return this.dcnpgettext.call(this,b,b,a)},dgettext:function(a,c){return this.dcnpgettext.call(this,a,b,c)},dcgettext:function(a,c){return this.dcnpgettext.call(this,a,b,c)},ngettext:function(a,c,d){return this.dcnpgettext.call(this,b,b,a,c,d)},dngettext:function(a,c,d,e){return this.dcnpgettext.call(this,a,b,c,d,e)},dcngettext:function(a,c,d,e){return this.dcnpgettext.call(this,a,b,c,d,e)},pgettext:function(a,c){return this.dcnpgettext.call(this,b,a,c)},dpgettext:function(a,b,c){return this.dcnpgettext.call(this,a,b,c)},dcpgettext:function(a,b,c){return this.dcnpgettext.call(this,a,b,c)},npgettext:function(a,c,d,e){return this.dcnpgettext.call(this,b,a,c,d,e)},dnpgettext:function(a,b,c,d,e){return this.dcnpgettext.call(this,a,b,c,d,e)},dcnpgettext:function(a,b,d,e,f){e=e||d,a=a||this._textdomain;var g;if(!this.options)return g=new l,g.dcnpgettext.call(g,void 0,void 0,d,e,f);if(!this.options.locale_data)throw new Error("No locale data provided.");if(!this.options.locale_data[a])throw new Error("Domain `"+a+"` was not found.");if(!this.options.locale_data[a][""])throw new Error("No locale meta information provided.");if(!d)throw new Error("No translation key found.");var h,i,j,k=b?b+l.context_delimiter+d:d,m=this.options.locale_data,n=m[a],o=(m.messages||this.defaults.locale_data.messages)[""],p=n[""].plural_forms||n[""]["Plural-Forms"]||n[""]["plural-forms"]||o.plural_forms||o["Plural-Forms"]||o["plural-forms"];if(void 0===f)j=0;else{if("number"!=typeof f&&(f=parseInt(f,10),isNaN(f)))throw new Error("The number that was passed in is not a number.");j=c(p)(f)}if(!n)throw new Error("No domain named `"+a+"` could be found.");return h=n[k],!h||j>h.length?(this.options.missing_key_callback&&this.options.missing_key_callback(k,a),i=[d,e],this.options.debug===!0&&console.log(i[c(p)(f)]),i[c()(f)]):(i=h[j],i?i:(i=[d,e],i[c()(f)]))}});var m=function(){function a(a){return Object.prototype.toString.call(a).slice(8,-1).toLowerCase()}function b(a,b){for(var c=[];b>0;c[--b]=a);return c.join("")}var c=function(){return c.cache.hasOwnProperty(arguments[0])||(c.cache[arguments[0]]=c.parse(arguments[0])),c.format.call(null,c.cache[arguments[0]],arguments)};return c.format=function(c,d){var e,f,g,h,i,j,k,l=1,n=c.length,o="",p=[];for(f=0;n>f;f++)if(o=a(c[f]),"string"===o)p.push(c[f]);else if("array"===o){if(h=c[f],h[2])for(e=d[l],g=0;g<h[2].length;g++){if(!e.hasOwnProperty(h[2][g]))throw m('[sprintf] property "%s" does not exist',h[2][g]);e=e[h[2][g]]}else e=h[1]?d[h[1]]:d[l++];if(/[^s]/.test(h[8])&&"number"!=a(e))throw m("[sprintf] expecting number but found %s",a(e));switch(("undefined"==typeof e||null===e)&&(e=""),h[8]){case"b":e=e.toString(2);break;case"c":e=String.fromCharCode(e);break;case"d":e=parseInt(e,10);break;case"e":e=h[7]?e.toExponential(h[7]):e.toExponential();break;case"f":e=h[7]?parseFloat(e).toFixed(h[7]):parseFloat(e);break;case"o":e=e.toString(8);break;case"s":e=(e=String(e))&&h[7]?e.substring(0,h[7]):e;break;case"u":e=Math.abs(e);break;case"x":e=e.toString(16);break;case"X":e=e.toString(16).toUpperCase()}e=/[def]/.test(h[8])&&h[3]&&e>=0?"+"+e:e,j=h[4]?"0"==h[4]?"0":h[4].charAt(1):" ",k=h[6]-String(e).length,i=h[6]?b(j,k):"",p.push(h[5]?e+i:i+e)}return p.join("")},c.cache={},c.parse=function(a){for(var b=a,c=[],d=[],e=0;b;){if(null!==(c=/^[^\x25]+/.exec(b)))d.push(c[0]);else if(null!==(c=/^\x25{2}/.exec(b)))d.push("%");else{if(null===(c=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(b)))throw"[sprintf] huh?";if(c[2]){e|=1;var f=[],g=c[2],h=[];if(null===(h=/^([a-z_][a-z_\d]*)/i.exec(g)))throw"[sprintf] huh?";for(f.push(h[1]);""!==(g=g.substring(h[0].length));)if(null!==(h=/^\.([a-z_][a-z_\d]*)/i.exec(g)))f.push(h[1]);else{if(null===(h=/^\[(\d+)\]/.exec(g)))throw"[sprintf] huh?";f.push(h[1])}c[2]=f}else e|=2;if(3===e)throw"[sprintf] mixing positional and named placeholders is not (yet) supported";d.push(c)}b=b.substring(c[0].length)}return d},c}(),n=function(a,b){return b.unshift(a),m.apply(null,b)};l.parse_plural=function(a,b){return a=a.replace(/n/g,b),l.parse_expression(a)},l.sprintf=function(a,b){return"[object Array]"=={}.toString.call(b)?n(a,[].slice.call(b)):m.apply(this,[].slice.call(arguments))},l.prototype.sprintf=function(){return l.sprintf.apply(this,arguments)},l.PF={},l.PF.parse=function(a){var b=l.PF.extractPluralExpr(a);return l.PF.parser.parse.call(l.PF.parser,b)},l.PF.compile=function(a){function b(a){return a===!0?1:a?a:0}var c=l.PF.parse(a);return function(a){return b(l.PF.interpreter(c)(a))}},l.PF.interpreter=function(a){return function(b){switch(a.type){case"GROUP":return l.PF.interpreter(a.expr)(b);case"TERNARY":return l.PF.interpreter(a.expr)(b)?l.PF.interpreter(a.truthy)(b):l.PF.interpreter(a.falsey)(b);case"OR":return l.PF.interpreter(a.left)(b)||l.PF.interpreter(a.right)(b);case"AND":return l.PF.interpreter(a.left)(b)&&l.PF.interpreter(a.right)(b);case"LT":return l.PF.interpreter(a.left)(b)<l.PF.interpreter(a.right)(b);case"GT":return l.PF.interpreter(a.left)(b)>l.PF.interpreter(a.right)(b);case"LTE":return l.PF.interpreter(a.left)(b)<=l.PF.interpreter(a.right)(b);case"GTE":return l.PF.interpreter(a.left)(b)>=l.PF.interpreter(a.right)(b);case"EQ":return l.PF.interpreter(a.left)(b)==l.PF.interpreter(a.right)(b);case"NEQ":return l.PF.interpreter(a.left)(b)!=l.PF.interpreter(a.right)(b);case"MOD":return l.PF.interpreter(a.left)(b)%l.PF.interpreter(a.right)(b);case"VAR":return b;case"NUM":return a.val;default:throw new Error("Invalid Token found.")}}},l.PF.extractPluralExpr=function(a){a=a.replace(/^\s\s*/,"").replace(/\s\s*$/,""),/;\s*$/.test(a)||(a=a.concat(";"));var b,c=/nplurals\=(\d+);/,d=/plural\=(.*);/,e=a.match(c),f={};if(!(e.length>1))throw new Error("nplurals not found in plural_forms string: "+a);if(f.nplurals=e[1],a=a.replace(c,""),b=a.match(d),!(b&&b.length>1))throw new Error("`plural` expression not found: "+a);return b[1]},l.PF.parser=function(){var a={trace:function(){},yy:{},symbols_:{error:2,expressions:3,e:4,EOF:5,"?":6,":":7,"||":8,"&&":9,"<":10,"<=":11,">":12,">=":13,"!=":14,"==":15,"%":16,"(":17,")":18,n:19,NUMBER:20,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",6:"?",7:":",8:"||",9:"&&",10:"<",11:"<=",12:">",13:">=",14:"!=",15:"==",16:"%",17:"(",18:")",19:"n",20:"NUMBER"},productions_:[0,[3,2],[4,5],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,1],[4,1]],performAction:function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 1:return{type:"GROUP",expr:f[h-1]};case 2:this.$={type:"TERNARY",expr:f[h-4],truthy:f[h-2],falsey:f[h]};break;case 3:this.$={type:"OR",left:f[h-2],right:f[h]};break;case 4:this.$={type:"AND",left:f[h-2],right:f[h]};break;case 5:this.$={type:"LT",left:f[h-2],right:f[h]};break;case 6:this.$={type:"LTE",left:f[h-2],right:f[h]};break;case 7:this.$={type:"GT",left:f[h-2],right:f[h]};break;case 8:this.$={type:"GTE",left:f[h-2],right:f[h]};break;case 9:this.$={type:"NEQ",left:f[h-2],right:f[h]};break;case 10:this.$={type:"EQ",left:f[h-2],right:f[h]};break;case 11:this.$={type:"MOD",left:f[h-2],right:f[h]};break;case 12:this.$={type:"GROUP",expr:f[h-1]};break;case 13:this.$={type:"VAR"};break;case 14:this.$={type:"NUM",val:Number(a)}}},table:[{3:1,4:2,17:[1,3],19:[1,4],20:[1,5]},{1:[3]},{5:[1,6],6:[1,7],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16]},{4:17,17:[1,3],19:[1,4],20:[1,5]},{5:[2,13],6:[2,13],7:[2,13],8:[2,13],9:[2,13],10:[2,13],11:[2,13],12:[2,13],13:[2,13],14:[2,13],15:[2,13],16:[2,13],18:[2,13]},{5:[2,14],6:[2,14],7:[2,14],8:[2,14],9:[2,14],10:[2,14],11:[2,14],12:[2,14],13:[2,14],14:[2,14],15:[2,14],16:[2,14],18:[2,14]},{1:[2,1]},{4:18,17:[1,3],19:[1,4],20:[1,5]},{4:19,17:[1,3],19:[1,4],20:[1,5]},{4:20,17:[1,3],19:[1,4],20:[1,5]},{4:21,17:[1,3],19:[1,4],20:[1,5]},{4:22,17:[1,3],19:[1,4],20:[1,5]},{4:23,17:[1,3],19:[1,4],20:[1,5]},{4:24,17:[1,3],19:[1,4],20:[1,5]},{4:25,17:[1,3],19:[1,4],20:[1,5]},{4:26,17:[1,3],19:[1,4],20:[1,5]},{4:27,17:[1,3],19:[1,4],20:[1,5]},{6:[1,7],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[1,28]},{6:[1,7],7:[1,29],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16]},{5:[2,3],6:[2,3],7:[2,3],8:[2,3],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,3]},{5:[2,4],6:[2,4],7:[2,4],8:[2,4],9:[2,4],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,4]},{5:[2,5],6:[2,5],7:[2,5],8:[2,5],9:[2,5],10:[2,5],11:[2,5],12:[2,5],13:[2,5],14:[2,5],15:[2,5],16:[1,16],18:[2,5]},{5:[2,6],6:[2,6],7:[2,6],8:[2,6],9:[2,6],10:[2,6],11:[2,6],12:[2,6],13:[2,6],14:[2,6],15:[2,6],16:[1,16],18:[2,6]},{5:[2,7],6:[2,7],7:[2,7],8:[2,7],9:[2,7],10:[2,7],11:[2,7],12:[2,7],13:[2,7],14:[2,7],15:[2,7],16:[1,16],18:[2,7]},{5:[2,8],6:[2,8],7:[2,8],8:[2,8],9:[2,8],10:[2,8],11:[2,8],12:[2,8],13:[2,8],14:[2,8],15:[2,8],16:[1,16],18:[2,8]},{5:[2,9],6:[2,9],7:[2,9],8:[2,9],9:[2,9],10:[2,9],11:[2,9],12:[2,9],13:[2,9],14:[2,9],15:[2,9],16:[1,16],18:[2,9]},{5:[2,10],6:[2,10],7:[2,10],8:[2,10],9:[2,10],10:[2,10],11:[2,10],12:[2,10],13:[2,10],14:[2,10],15:[2,10],16:[1,16],18:[2,10]},{5:[2,11],6:[2,11],7:[2,11],8:[2,11],9:[2,11],10:[2,11],11:[2,11],12:[2,11],13:[2,11],14:[2,11],15:[2,11],16:[2,11],18:[2,11]},{5:[2,12],6:[2,12],7:[2,12],8:[2,12],9:[2,12],10:[2,12],11:[2,12],12:[2,12],13:[2,12],14:[2,12],15:[2,12],16:[2,12],18:[2,12]},{4:30,17:[1,3],19:[1,4],20:[1,5]},{5:[2,2],6:[1,7],7:[2,2],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,2]}],defaultActions:{6:[2,1]},parseError:function(a,b){throw new Error(a)},parse:function(a){function b(a){e.length=e.length-2*a,f.length=f.length-a,g.length=g.length-a}function c(){var a;return a=d.lexer.lex()||1,"number"!=typeof a&&(a=d.symbols_[a]||a),a}var d=this,e=[0],f=[null],g=[],h=this.table,i="",j=0,k=0,l=0,m=2,n=1;this.lexer.setInput(a),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var o=this.lexer.yylloc;g.push(o),"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var p,q,r,s,t,u,v,w,x,y={};;){if(r=e[e.length-1],this.defaultActions[r]?s=this.defaultActions[r]:(null==p&&(p=c()),s=h[r]&&h[r][p]),"undefined"==typeof s||!s.length||!s[0]){if(!l){x=[];for(u in h[r])this.terminals_[u]&&u>2&&x.push("'"+this.terminals_[u]+"'");var z="";z=this.lexer.showPosition?"Parse error on line "+(j+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+x.join(", ")+", got '"+this.terminals_[p]+"'":"Parse error on line "+(j+1)+": Unexpected "+(1==p?"end of input":"'"+(this.terminals_[p]||p)+"'"),this.parseError(z,{text:this.lexer.match,token:this.terminals_[p]||p,line:this.lexer.yylineno,loc:o,expected:x})}if(3==l){if(p==n)throw new Error(z||"Parsing halted.");k=this.lexer.yyleng,i=this.lexer.yytext,j=this.lexer.yylineno,o=this.lexer.yylloc,p=c()}for(;;){if(m.toString()in h[r])break;if(0==r)throw new Error(z||"Parsing halted.");b(1),r=e[e.length-1]}q=p,p=m,r=e[e.length-1],s=h[r]&&h[r][m],l=3}if(s[0]instanceof Array&&s.length>1)throw new Error("Parse Error: multiple actions possible at state: "+r+", token: "+p);switch(s[0]){case 1:e.push(p),f.push(this.lexer.yytext),g.push(this.lexer.yylloc),e.push(s[1]),p=null,q?(p=q,q=null):(k=this.lexer.yyleng,i=this.lexer.yytext,j=this.lexer.yylineno,o=this.lexer.yylloc,l>0&&l--);break;case 2:if(v=this.productions_[s[1]][1],y.$=f[f.length-v],y._$={first_line:g[g.length-(v||1)].first_line,last_line:g[g.length-1].last_line,first_column:g[g.length-(v||1)].first_column,last_column:g[g.length-1].last_column},t=this.performAction.call(y,i,k,j,this.yy,s[1],f,g),"undefined"!=typeof t)return t;v&&(e=e.slice(0,-1*v*2),f=f.slice(0,-1*v),g=g.slice(0,-1*v)),e.push(this.productions_[s[1]][0]),f.push(y.$),g.push(y._$),w=h[e[e.length-2]][e[e.length-1]],e.push(w);break;case 3:return!0}}return!0}},b=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parseError)throw new Error(a);this.yy.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.match+=a,this.matched+=a;var b=a.match(/\n/);return b&&this.yylineno++,this._input=this._input.slice(1),a},unput:function(a){return this._input=a+this._input,this},more:function(){return this._more=!0,this},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c;this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),e=0;e<d.length;e++)if(b=this._input.match(this.rules[d[e]]))return c=b[0].match(/\n.*/g),c&&(this.yylineno+=c.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:c?c[c.length-1].length-1:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,d[e],this.conditionStack[this.conditionStack.length-1]),a?a:void 0;return""===this._input?this.EOF:void this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return a.performAction=function(a,b,c,d){switch(c){case 0:break;case 1:return 20;case 2:return 19;case 3:return 8;case 4:return 9;case 5:return 6;case 6:return 7;case 7:return 11;case 8:return 13;case 9:return 10;case 10:return 12;case 11:return 14;case 12:return 15;case 13:return 16;case 14:return 17;case 15:return 18;case 16:return 5;case 17:return"INVALID"}},a.rules=[/^\s+/,/^[0-9]+(\.[0-9]+)?\b/,/^n\b/,/^\|\|/,/^&&/,/^\?/,/^:/,/^<=/,/^>=/,/^</,/^>/,/^!=/,/^==/,/^%/,/^\(/,/^\)/,/^$/,/^./],a.conditions={INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17],inclusive:!0}},a}();return a.lexer=b,a}(),"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=l),exports.Jed=l):("function"==typeof define&&define.amd&&define(function(){return l}),a.Jed=l)}(this),function(a){function b(a){return{jsonrpc:"2.0",method:a.method||"",params:a.params||{},id:g++}}function c(c){var d=a.isArray(c)?c.map(b):b(c);return JSON.stringify(d)}function d(a){return a.sort(e)}function e(a,b){return a.id<b.id?-1:1}function f(b,e){var f=new a.Deferred;e=e||{};var g=e.success||h,i=e.error||h;delete e.success,delete e.error;var j=a.isArray(b),k=a.extend({url:(j?b[0].url:b.url)||a.jsonrpc.defaultUrl,contentType:"application/json",dataType:"text",dataFilter:function(a,b){return JSON.parse(a)},type:"POST",processData:!1,data:c(b),success:function(a){if(j){var b=d(a);return g(b),void f.resolve(b)}if(a.hasOwnProperty("error"))return i(a.error),void f.reject(a.error);if(a.hasOwnProperty("result"))return g(a.result),void f.resolve(a.result);throw"Invalid response returned"},error:function(a,b,c){var d=null;if("timeout"===c)d={status:b,code:-32e3,message:"Request Timeout",data:null};else try{var e=JSON.parse(a.responseText);d=e.error}catch(g){d={status:b,code:-32603,message:c,data:a.responseText}}i(d),f.reject(d)}},e);return a.ajax(k),f.promise()}var g=1,h=function(){};a.extend({jsonrpc:f}),a.jsonrpc.defaultUrl="/jsonrpc"}(jQuery),!function(a,b,c,d){var e=a(b);a.fn.lazyload=function(f){function g(){var b=0;i.each(function(){var c=a(this);if(!j.skip_invisible||c.is(":visible"))if(a.abovethetop(this,j)||a.leftofbegin(this,j));else if(a.belowthefold(this,j)||a.rightoffold(this,j)){if(++b>j.failure_limit)return!1}else c.trigger("appear"),b=0})}var h,i=this,j={threshold:0,failure_limit:0,event:"scroll",effect:"show",container:b,data_attribute:"original",skip_invisible:!0,appear:null,load:null,placeholder:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC"};return f&&(d!==f.failurelimit&&(f.failure_limit=f.failurelimit,delete f.failurelimit),d!==f.effectspeed&&(f.effect_speed=f.effectspeed,delete f.effectspeed),a.extend(j,f)),h=j.container===d||j.container===b?e:a(j.container),0===j.event.indexOf("scroll")&&h.bind(j.event,function(){return g()}),this.each(function(){var b=this,c=a(b);b.loaded=!1,(c.attr("src")===d||c.attr("src")===!1)&&c.is("img")&&c.attr("src",j.placeholder),c.one("appear",function(){if(!this.loaded){if(j.appear){var d=i.length;j.appear.call(b,d,j)}a("<img />").bind("load",function(){var d=c.attr("data-"+j.data_attribute);c.hide(),c.is("img")?c.attr("src",d):c.css("background-image","url('"+d+"')"),c[j.effect](j.effect_speed),b.loaded=!0;var e=a.grep(i,function(a){return!a.loaded});if(i=a(e),j.load){var f=i.length;j.load.call(b,f,j)}}).attr("src",c.attr("data-"+j.data_attribute))}}),0!==j.event.indexOf("scroll")&&c.bind(j.event,function(){b.loaded||c.trigger("appear")})}),e.bind("resize",function(){g()}),/(?:iphone|ipod|ipad).*os 5/gi.test(navigator.appVersion)&&e.bind("pageshow",function(b){b.originalEvent&&b.originalEvent.persisted&&i.each(function(){a(this).trigger("appear")})}),a(c).ready(function(){g()}),this},a.belowthefold=function(c,f){var g;return g=f.container===d||f.container===b?(b.innerHeight?b.innerHeight:e.height())+e.scrollTop():a(f.container).offset().top+a(f.container).height(),g<=a(c).offset().top-f.threshold},a.rightoffold=function(c,f){var g;return g=f.container===d||f.container===b?e.width()+e.scrollLeft():a(f.container).offset().left+a(f.container).width(),g<=a(c).offset().left-f.threshold},a.abovethetop=function(c,f){var g;return g=f.container===d||f.container===b?e.scrollTop():a(f.container).offset().top,g>=a(c).offset().top+f.threshold+a(c).height()},a.leftofbegin=function(c,f){var g;return g=f.container===d||f.container===b?e.scrollLeft():a(f.container).offset().left,g>=a(c).offset().left+f.threshold+a(c).width()},a.inviewport=function(b,c){return!(a.rightoffold(b,c)||a.leftofbegin(b,c)||a.belowthefold(b,c)||a.abovethetop(b,c))},a.extend(a.expr[":"],{"below-the-fold":function(b){return a.belowthefold(b,{threshold:0})},"above-the-top":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-screen":function(b){return a.rightoffold(b,{threshold:0})},"left-of-screen":function(b){return!a.rightoffold(b,{threshold:0})},"in-viewport":function(b){return a.inviewport(b,{threshold:0})},"above-the-fold":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-fold":function(b){return a.rightoffold(b,{threshold:0})},"left-of-fold":function(b){return!a.rightoffold(b,{threshold:0})}})}(jQuery,window,document),function(a){"use strict";function b(a,b){return Math.round(a/b)*b}function c(a){return"number"==typeof a&&!isNaN(a)&&isFinite(a)}function d(a){ -var b=Math.pow(10,7);return Number((Math.round(a*b)/b).toFixed(7))}function e(a,b,c){a.addClass(b),setTimeout(function(){a.removeClass(b)},c)}function f(a){return Math.max(Math.min(a,100),0)}function g(b){return a.isArray(b)?b:[b]}function h(a){var b=a.split(".");return b.length>1?b[1].length:0}function i(a,b){return 100/(b-a)}function j(a,b){return 100*b/(a[1]-a[0])}function k(a,b){return j(a,a[0]<0?b+Math.abs(a[0]):b-a[0])}function l(a,b){return b*(a[1]-a[0])/100+a[0]}function m(a,b){for(var c=1;a>=b[c];)c+=1;return c}function n(a,b,c){if(c>=a.slice(-1)[0])return 100;var d,e,f,g,h=m(c,a);return d=a[h-1],e=a[h],f=b[h-1],g=b[h],f+k([d,e],c)/i(f,g)}function o(a,b,c){if(c>=100)return a.slice(-1)[0];var d,e,f,g,h=m(c,b);return d=a[h-1],e=a[h],f=b[h-1],g=b[h],l([d,e],(c-f)*i(f,g))}function p(a,c,d,e){if(100===e)return e;var f,g,h=m(e,a);return d?(f=a[h-1],g=a[h],e-f>(g-f)/2?g:f):c[h-1]?a[h-1]+b(e-a[h-1],c[h-1]):e}function q(a,b,d){var e;if("number"==typeof b&&(b=[b]),"[object Array]"!==Object.prototype.toString.call(b))throw new Error("noUiSlider: 'range' contains invalid value.");if(e="min"===a?0:"max"===a?100:parseFloat(a),!c(e)||!c(b[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");d.xPct.push(e),d.xVal.push(b[0]),e?d.xSteps.push(isNaN(b[1])?!1:b[1]):isNaN(b[1])||(d.xSteps[0]=b[1])}function r(a,b,c){return b?void(c.xSteps[a]=j([c.xVal[a],c.xVal[a+1]],b)/i(c.xPct[a],c.xPct[a+1])):!0}function s(a,b,c,d){this.xPct=[],this.xVal=[],this.xSteps=[d||!1],this.xNumSteps=[!1],this.snap=b,this.direction=c;var e,f=[];for(e in a)a.hasOwnProperty(e)&&f.push([a[e],e]);for(f.sort(function(a,b){return a[0]-b[0]}),e=0;e<f.length;e++)q(f[e][1],f[e][0],this);for(this.xNumSteps=this.xSteps.slice(0),e=0;e<this.xNumSteps.length;e++)r(e,this.xNumSteps[e],this)}function t(a,b){if(!c(b))throw new Error("noUiSlider: 'step' is not numeric.");a.singleStep=b}function u(b,c){if("object"!=typeof c||a.isArray(c))throw new Error("noUiSlider: 'range' is not an object.");if(void 0===c.min||void 0===c.max)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");b.spectrum=new s(c,b.snap,b.dir,b.singleStep)}function v(b,c){if(c=g(c),!a.isArray(c)||!c.length||c.length>2)throw new Error("noUiSlider: 'start' option is incorrect.");b.handles=c.length,b.start=c}function w(a,b){if(a.snap=b,"boolean"!=typeof b)throw new Error("noUiSlider: 'snap' option must be a boolean.")}function x(a,b){if(a.animate=b,"boolean"!=typeof b)throw new Error("noUiSlider: 'animate' option must be a boolean.")}function y(a,b){if("lower"===b&&1===a.handles)a.connect=1;else if("upper"===b&&1===a.handles)a.connect=2;else if(b===!0&&2===a.handles)a.connect=3;else{if(b!==!1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");a.connect=0}}function z(a,b){switch(b){case"horizontal":a.ort=0;break;case"vertical":a.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function A(a,b){if(!c(b))throw new Error("noUiSlider: 'margin' option must be numeric.");if(a.margin=a.spectrum.getMargin(b),!a.margin)throw new Error("noUiSlider: 'margin' option is only supported on linear sliders.")}function B(a,b){if(!c(b))throw new Error("noUiSlider: 'limit' option must be numeric.");if(a.limit=a.spectrum.getMargin(b),!a.limit)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders.")}function C(a,b){switch(b){case"ltr":a.dir=0;break;case"rtl":a.dir=1,a.connect=[0,2,1,3][a.connect];break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function D(a,b){if("string"!=typeof b)throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var c=b.indexOf("tap")>=0,d=b.indexOf("drag")>=0,e=b.indexOf("fixed")>=0,f=b.indexOf("snap")>=0;a.events={tap:c||f,drag:d,fixed:e,snap:f}}function E(a,b){if(a.format=b,"function"==typeof b.to&&"function"==typeof b.from)return!0;throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.")}function F(b){var c,d={margin:0,limit:0,animate:!0,format:V};return c={step:{r:!1,t:t},start:{r:!0,t:v},connect:{r:!0,t:y},direction:{r:!0,t:C},snap:{r:!1,t:w},animate:{r:!1,t:x},range:{r:!0,t:u},orientation:{r:!1,t:z},margin:{r:!1,t:A},limit:{r:!1,t:B},behaviour:{r:!0,t:D},format:{r:!1,t:E}},b=a.extend({connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal"},b),a.each(c,function(a,c){if(void 0===b[a]){if(c.r)throw new Error("noUiSlider: '"+a+"' is required.");return!0}c.t(d,b[a])}),d.style=d.ort?"top":"left",d}function G(a,b,c){var d=a+b[0],e=a+b[1];return c?(0>d&&(e+=Math.abs(d)),e>100&&(d-=e-100),[f(d),f(e)]):[d,e]}function H(a){a.preventDefault();var b,c,d=0===a.type.indexOf("touch"),e=0===a.type.indexOf("mouse"),f=0===a.type.indexOf("pointer"),g=a;return 0===a.type.indexOf("MSPointer")&&(f=!0),a.originalEvent&&(a=a.originalEvent),d&&(b=a.changedTouches[0].pageX,c=a.changedTouches[0].pageY),(e||f)&&(f||void 0!==window.pageXOffset||(window.pageXOffset=document.documentElement.scrollLeft,window.pageYOffset=document.documentElement.scrollTop),b=a.clientX+window.pageXOffset,c=a.clientY+window.pageYOffset),g.points=[b,c],g.cursor=e,g}function I(b,c){var d=a("<div><div/></div>").addClass(U[2]),e=["-lower","-upper"];return b&&e.reverse(),d.children().addClass(U[3]+" "+U[3]+e[c]),d}function J(a,b,c){switch(a){case 1:b.addClass(U[7]),c[0].addClass(U[6]);break;case 3:c[1].addClass(U[6]);case 2:c[0].addClass(U[7]);case 0:b.addClass(U[6])}}function K(a,b,c){var d,e=[];for(d=0;a>d;d+=1)e.push(I(b,d).appendTo(c));return e}function L(b,c,d){return d.addClass([U[0],U[8+b],U[4+c]].join(" ")),a("<div/>").appendTo(d).addClass(U[1])}function M(b,c,d){function i(){return C[["width","height"][c.ort]]()}function j(a){var b,c=[E.val()];for(b=0;b<a.length;b+=1)E.trigger(a[b],c)}function k(a){return 1===a.length?a[0]:c.dir?a.reverse():a}function l(a){return function(b,c){E.val([a?null:c,a?c:null],!0)}}function m(b){var c=a.inArray(b,N);E[0].linkAPI&&E[0].linkAPI[b]&&E[0].linkAPI[b].change(M[c],D[c].children(),E)}function n(b,d){var e=a.inArray(b,N);return d&&d.appendTo(D[e].children()),c.dir&&c.handles>1&&(e=1===e?0:1),l(e)}function o(){var a,b;for(a=0;a<N.length;a+=1)this.linkAPI&&this.linkAPI[b=N[a]]&&this.linkAPI[b].reconfirm(b)}function p(a,b,d,e){return a=a.replace(/\s/g,S+" ")+S,b.on(a,function(a){return E.attr("disabled")?!1:E.hasClass(U[14])?!1:(a=H(a),a.calcPoint=a.points[c.ort],void d(a,e))})}function q(a,b){var c,d=b.handles||D,e=!1,f=100*(a.calcPoint-b.start)/i(),g=d[0][0]!==D[0][0]?1:0;c=G(f,b.positions,d.length>1),e=v(d[0],c[g],1===d.length),d.length>1&&(e=v(d[1],c[g?0:1],!1)||e),e&&j(["slide"])}function r(b){a("."+U[15]).removeClass(U[15]),b.cursor&&a("body").css("cursor","").off(S),Q.off(S),E.removeClass(U[12]),j(["set","change"])}function s(b,c){1===c.handles.length&&c.handles[0].children().addClass(U[15]),b.stopPropagation(),p(T.move,Q,q,{start:b.calcPoint,handles:c.handles,positions:[F[0],F[D.length-1]]}),p(T.end,Q,r,null),b.cursor&&(a("body").css("cursor",a(b.target).css("cursor")),D.length>1&&E.addClass(U[12]),a("body").on("selectstart"+S,!1))}function t(b){var d,f=b.calcPoint,g=0;b.stopPropagation(),a.each(D,function(){g+=this.offset()[c.style]}),g=g/2>f||1===D.length?0:1,f-=C.offset()[c.style],d=100*f/i(),c.events.snap||e(E,U[14],300),v(D[g],d),j(["slide","set","change"]),c.events.snap&&s(b,{handles:[D[g]]})}function u(a){var b,c;if(!a.fixed)for(b=0;b<D.length;b+=1)p(T.start,D[b].children(),s,{handles:[D[b]]});a.tap&&p(T.start,C,t,{handles:D}),a.drag&&(c=C.find("."+U[7]).addClass(U[10]),a.fixed&&(c=c.add(C.children().not(c).children())),p(T.start,c,s,{handles:D}))}function v(a,b,d){var e=a[0]!==D[0][0]?1:0,g=F[0]+c.margin,h=F[1]-c.margin,i=F[0]+c.limit,j=F[1]-c.limit;return D.length>1&&(b=e?Math.max(b,g):Math.min(b,h)),d!==!1&&c.limit&&D.length>1&&(b=e?Math.min(b,i):Math.max(b,j)),b=I.getStep(b),b=f(parseFloat(b.toFixed(7))),b===F[e]?!1:(a.css(c.style,b+"%"),a.is(":first-child")&&a.toggleClass(U[17],b>50),F[e]=b,M[e]=I.fromStepping(b),m(N[e]),!0)}function w(a,b){var d,e,f;for(c.limit&&(a+=1),d=0;a>d;d+=1)e=d%2,f=b[e],null!==f&&f!==!1&&("number"==typeof f&&(f=String(f)),f=c.format.from(f),(f===!1||isNaN(f)||v(D[e],I.toStepping(f),d===3-c.dir)===!1)&&m(N[e]))}function x(a){if(E[0].LinkIsEmitting)return this;var b,d=g(a);return c.dir&&c.handles>1&&d.reverse(),c.animate&&-1!==F[0]&&e(E,U[14],300),b=D.length>1?3:1,1===d.length&&(b=1),w(b,d),j(["set"]),this}function y(){var a,b=[];for(a=0;a<c.handles;a+=1)b[a]=c.format.to(M[a]);return k(b)}function z(){return a(this).off(S).removeClass(U.join(" ")).empty(),delete this.LinkUpdate,delete this.LinkConfirm,delete this.LinkDefaultFormatter,delete this.LinkDefaultFlag,delete this.reappend,delete this.vGet,delete this.vSet,delete this.getCurrentStep,delete this.getInfo,delete this.destroy,d}function A(){var b=a.map(F,function(a,b){var c=I.getApplicableStep(a),d=h(String(c[2])),e=M[b],f=100===a?null:c[2],g=Number((e-c[2]).toFixed(d)),i=0===a?null:g>=c[1]?c[2]:c[0]||!1;return[[i,f]]});return k(b)}function B(){return d}var C,D,E=a(b),F=[-1,-1],I=c.spectrum,M=[],N=["lower","upper"].slice(0,c.handles);if(c.dir&&N.reverse(),b.LinkUpdate=m,b.LinkConfirm=n,b.LinkDefaultFormatter=c.format,b.LinkDefaultFlag="lower",b.reappend=o,E.hasClass(U[0]))throw new Error("Slider was already initialized.");C=L(c.dir,c.ort,E),D=K(c.handles,c.dir,C),J(c.connect,E,D),u(c.events),b.vSet=x,b.vGet=y,b.destroy=z,b.getCurrentStep=A,b.getOriginalOptions=B,b.getInfo=function(){return[I,c.style,c.ort]},E.val(c.start)}function N(a){var b=F(a,this);return this.each(function(){M(this,b,a)})}function O(b){return this.each(function(){if(!this.destroy)return void a(this).noUiSlider(b);var c=a(this).val(),d=this.destroy(),e=a.extend({},d,b);a(this).noUiSlider(e),this.reappend(),d.start===e.start&&a(this).val(c)})}function P(){return this[0][arguments.length?"vSet":"vGet"].apply(this[0],arguments)}var Q=a(document),R=a.fn.val,S=".nui",T=window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"},U=["noUi-target","noUi-base","noUi-origin","noUi-handle","noUi-horizontal","noUi-vertical","noUi-background","noUi-connect","noUi-ltr","noUi-rtl","noUi-dragable","","noUi-state-drag","","noUi-state-tap","noUi-active","","noUi-stacking"];s.prototype.getMargin=function(a){return 2===this.xPct.length?j(this.xVal,a):!1},s.prototype.toStepping=function(a){return a=n(this.xVal,this.xPct,a),this.direction&&(a=100-a),a},s.prototype.fromStepping=function(a){return this.direction&&(a=100-a),d(o(this.xVal,this.xPct,a))},s.prototype.getStep=function(a){return this.direction&&(a=100-a),a=p(this.xPct,this.xSteps,this.snap,a),this.direction&&(a=100-a),a},s.prototype.getApplicableStep=function(a){var b=m(a,this.xPct),c=100===a?2:1;return[this.xNumSteps[b-2],this.xVal[b-c],this.xNumSteps[b-c]]},s.prototype.convert=function(a){return this.getStep(this.toStepping(a))};var V={to:function(a){return a.toFixed(2)},from:Number};a.fn.val=function(b){function c(a){return a.hasClass(U[0])?P:R}if(!arguments.length){var d=a(this[0]);return c(d).call(d)}var e=a.isFunction(b);return this.each(function(d){var f=b,g=a(this);e&&(f=b.call(this,d,g.val())),c(g).call(g,f)})},a.fn.noUiSlider=function(a,b){switch(a){case"step":return this[0].getCurrentStep();case"options":return this[0].getOriginalOptions()}return(b?O:N).call(this,a)}}(window.jQuery||window.Zepto),function(a){"use strict";"object"==typeof exports?a(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){"use strict";var b=function(a){if(a=a||"once","string"!=typeof a)throw new Error("The jQuery Once id parameter must be a string");return a};a.fn.once=function(c){var d="jquery-once-"+b(c);return this.filter(function(){return a(this).data(d)!==!0}).data(d,!0)},a.fn.removeOnce=function(a){return this.findOnce(a).removeData("jquery-once-"+b(a))},a.fn.findOnce=function(c){var d="jquery-once-"+b(c);return this.filter(function(){return a(this).data(d)===!0})}}),function(a){var b=a(window);a.fn.visible=function(a,c,d){if(!(this.length<1)){var e=this.length>1?this.eq(0):this,f=e.get(0),g=b.width(),h=b.height(),d=d?d:"both",i=c===!0?f.offsetWidth*f.offsetHeight:!0;if("function"==typeof f.getBoundingClientRect){var j=f.getBoundingClientRect(),k=j.top>=0&&j.top<h,l=j.bottom>0&&j.bottom<=h,m=j.left>=0&&j.left<g,n=j.right>0&&j.right<=g,o=a?k||l:k&&l,p=a?m||n:m&&n;if("both"===d)return i&&o&&p;if("vertical"===d)return i&&o;if("horizontal"===d)return i&&p}else{var q=b.scrollTop(),r=q+h,s=b.scrollLeft(),t=s+g,u=e.offset(),v=u.top,w=v+e.height(),x=u.left,y=x+e.width(),z=a===!0?w:v,A=a===!0?v:w,B=a===!0?y:x,C=a===!0?x:y;if("both"===d)return!!i&&r>=A&&z>=q&&t>=C&&B>=s;if("vertical"===d)return!!i&&r>=A&&z>=q;if("horizontal"===d)return!!i&&t>=C&&B>=s}}}}(jQuery),window.JST||(window.JST={});var prettyPrint=function(){var a={el:function(b,c){var d,e=document.createElement(b);if(c=a.merge({},c),c&&c.style){c.style;a.applyCSS(e,c.style),delete c.style}for(d in c)c.hasOwnProperty(d)&&(e[d]=c[d]);return e},applyCSS:function(a,b){for(var c in b)if(b.hasOwnProperty(c))try{a.style[c]=b[c]}catch(d){}},txt:function(a){return document.createTextNode(a)},row:function(b,c,d){d=d||"td";var e,f=a.count(b,null)+1,g=a.el("tr"),h={style:a.getStyles(d,c),colSpan:f,onmouseover:function(){var b=this.parentNode.childNodes;a.forEach(b,function(b){"td"===b.nodeName.toLowerCase()&&a.applyCSS(b,a.getStyles("td_hover",c))})},onmouseout:function(){var b=this.parentNode.childNodes;a.forEach(b,function(b){"td"===b.nodeName.toLowerCase()&&a.applyCSS(b,a.getStyles("td",c))})}};return a.forEach(b,function(b){null!==b&&(e=a.el(d,h),b.nodeType?e.appendChild(b):e.innerHTML=a.shorten(b.toString()),g.appendChild(e))}),g},hRow:function(b,c){return a.row(b,c,"th")},table:function(b,c){b=b||[];var d={thead:{style:a.getStyles("thead",c)},tbody:{style:a.getStyles("tbody",c)},table:{style:a.getStyles("table",c)}},e=a.el("table",d.table),f=a.el("thead",d.thead),g=a.el("tbody",d.tbody);return b.length&&(e.appendChild(f),f.appendChild(a.hRow(b,c))),e.appendChild(g),{node:e,tbody:g,thead:f,appendChild:function(a){this.tbody.appendChild(a)},addRow:function(b,d,e){return this.appendChild(a.row.call(a,b,d||c,e)),this}}},shorten:function(a){return a},htmlentities:function(a){return a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")},merge:function(b,c){"object"!=typeof b&&(b={});for(var d in c)if(c.hasOwnProperty(d)){var e=c[d];if("object"==typeof e){b[d]=a.merge(b[d],e);continue}b[d]=e}for(var f=2,g=arguments.length;g>f;f++)a.merge(b,arguments[f]);return b},count:function(a,b){for(var c=0,d=0,e=a.length;e>d;d++)a[d]===b&&c++;return c},thead:function(a){return a.getElementsByTagName("thead")[0]},forEach:function(a,b,c){c||(c=b);for(var d=a.length,e=-1;++e<d&&c(a[e],e,a)!==!1;);return!0},type:function(a){try{if(null===a)return"null";if(void 0===a)return"undefined";var b=Object.prototype.toString.call(a).match(/\s(.+?)\]/)[1].toLowerCase();return a.nodeType?1===a.nodeType?"domelement":"domnode":/^(string|number|array|regexp|function|date|boolean)$/.test(b)?b:"object"==typeof a?a.jquery&&"string"==typeof a.jquery?"jquery":"object":a===window||a===document?"object":"default"}catch(c){return"default"}},within:function(a){return{is:function(b){for(var c in a)if(a[c]===b)return c;return""}}},common:{circRef:function(c,d,e){return a.expander("[POINTS BACK TO <strong>"+d+"</strong>]","Click to show this item anyway",function(){this.parentNode.appendChild(b(c,{maxDepth:1}))})},depthReached:function(c,d){return a.expander("[DEPTH REACHED]","Click to show this item anyway",function(){try{this.parentNode.appendChild(b(c,{maxDepth:1}))}catch(d){this.parentNode.appendChild(a.table(["ERROR OCCURED DURING OBJECT RETRIEVAL"],"error").addRow([d.message]).node)}})}},getStyles:function(c,d){return d=b.settings.styles[d]||{},a.merge({},b.settings.styles["default"][c],d[c])},expander:function(b,c,d){return a.el("a",{innerHTML:a.shorten(b)+' <b style="visibility:hidden;">[+]</b>',title:c,onmouseover:function(){this.getElementsByTagName("b")[0].style.visibility="visible"},onmouseout:function(){this.getElementsByTagName("b")[0].style.visibility="hidden"},onclick:function(){return this.style.display="none",d.call(this),!1},style:{cursor:"pointer"}})},stringify:function(b){var c,d=a.type(b),e=!0;if("array"===d)return c="[",a.forEach(b,function(b,d){c+=(0===d?"":", ")+a.stringify(b)}),c+"]";if("object"==typeof b){c="{";for(var f in b)b.hasOwnProperty(f)&&(c+=(e?"":", ")+f+":"+a.stringify(b[f]),e=!1);return c+"}"}return"regexp"===d?"/"+b.source+"/":"string"===d?'"'+b.replace(/"/g,'\\"')+'"':b.toString()},headerGradient:function(){var a=document.createElement("canvas");if(!a.getContext)return"";var b=a.getContext("2d");a.height=30,a.width=1;var c=b.createLinearGradient(0,0,0,30);c.addColorStop(0,"rgba(0,0,0,0)"),c.addColorStop(1,"rgba(0,0,0,0.25)"),b.fillStyle=c,b.fillRect(0,0,1,30);var d=a.toDataURL&&a.toDataURL();return"url("+(d||"")+")"}()},b=function(c,d){d=d||{};var e=a.merge({},b.config,d),f=a.el("div"),g=(b.config,0),h={},i=!1;b.settings=e;var j={string:function(b){return a.txt('"'+a.shorten(b.replace(/"/g,'\\"'))+'"')},number:function(b){return a.txt(b)},regexp:function(b){var c=a.table(["RegExp",null],"regexp"),d=a.table(),f=a.expander("/"+b.source+"/","Click to show more",function(){this.parentNode.appendChild(c.node)});return d.addRow(["g",b.global]).addRow(["i",b.ignoreCase]).addRow(["m",b.multiline]),c.addRow(["source","/"+b.source+"/"]).addRow(["flags",d.node]).addRow(["lastIndex",b.lastIndex]),e.expanded?c.node:f},domelement:function(b,c){var d=a.table(["DOMElement",null],"domelement"),f=["id","className","innerHTML","src","href"],g=b.nodeName||"";return d.addRow(["tag","<"+g.toLowerCase()+">"]),a.forEach(f,function(c){b[c]&&d.addRow([c,a.htmlentities(b[c])])}),e.expanded?d.node:a.expander("DOMElement ("+g.toLowerCase()+")","Click to show more",function(){this.parentNode.appendChild(d.node)})},domnode:function(b){var c=a.table(["DOMNode",null],"domelement"),d=a.htmlentities((b.data||"UNDEFINED").replace(/\n/g,"\\n"));return c.addRow(["nodeType",b.nodeType+" ("+b.nodeName+")"]).addRow(["data",d]),e.expanded?c.node:a.expander("DOMNode","Click to show more",function(){this.parentNode.appendChild(c.node)})},jquery:function(a,b,c){return j.array(a,b,c,!0)},object:function(b,c,d){var f=a.within(h).is(b);if(f)return a.common.circRef(b,f,e);if(h[d||"TOP"]=b,c===e.maxDepth)return a.common.depthReached(b,e);var g=a.table(["Object",null],"object"),k=!0;for(var l in b)if(!b.hasOwnProperty||b.hasOwnProperty(l)){var m=b[l],n=a.type(m);k=!1;try{g.addRow([l,j[n](m,c+1,l)],n)}catch(o){window.console&&window.console.log&&console.log(o.message)}}k?g.addRow(["<small>[empty]</small>"]):g.thead.appendChild(a.hRow(["key","value"],"colHeader"));var p=e.expanded||i?g.node:a.expander(a.stringify(b),"Click to show more",function(){this.parentNode.appendChild(g.node)});return i=!0,p},array:function(b,c,d,f){var g=a.within(h).is(b);if(g)return a.common.circRef(b,g);if(h[d||"TOP"]=b,c===e.maxDepth)return a.common.depthReached(b);var i=f?"jQuery":"Array",k=a.table([i+"("+b.length+")",null],f?"jquery":i.toLowerCase()),l=!0,m=0;return f&&k.addRow(["selector",b.selector]),a.forEach(b,function(d,f){return e.maxArray>=0&&++m>e.maxArray?(k.addRow([f+".."+(b.length-1),j[a.type(d)]("...",c+1,f)]),!1):(l=!1,void k.addRow([f,j[a.type(d)](d,c+1,f)]))}),f||(l?k.addRow(["<small>[empty]</small>"]):k.thead.appendChild(a.hRow(["index","value"],"colHeader"))),e.expanded?k.node:a.expander(a.stringify(b),"Click to show more",function(){this.parentNode.appendChild(k.node)})},"function":function(b,c,d){var f=a.within(h).is(b);if(f)return a.common.circRef(b,f);h[d||"TOP"]=b;var g=a.table(["Function",null],"function"),i=(a.table(["Arguments"]),b.toString().match(/\((.+?)\)/)),j=b.toString().match(/\(.*?\)\s+?\{?([\S\s]+)/)[1].replace(/\}?$/,"");return g.addRow(["arguments",i?i[1].replace(/[^\w_,\s]/g,""):"<small>[none/native]</small>"]).addRow(["body",j]),e.expanded?g.node:a.expander("function(){...}","Click to see more about this function.",function(){this.parentNode.appendChild(g.node)})},date:function(b){var c=a.table(["Date",null],"date"),d=b.toString().split(/\s/);return c.addRow(["Time",d[4]]).addRow(["Date",d.slice(0,4).join("-")]),e.expanded?c.node:a.expander("Date (timestamp): "+ +b,"Click to see a little more info about this date",function(){this.parentNode.appendChild(c.node)})},"boolean":function(b){return a.txt(b.toString().toUpperCase())},undefined:function(){return a.txt("UNDEFINED")},"null":function(){return a.txt("NULL")},"default":function(){return a.txt("prettyPrint: TypeNotFound Error")}};return f.appendChild(j[e.forceObject?"object":a.type(c)](c,g)),f};return b.config={expanded:!0,forceObject:!1,maxDepth:3,maxArray:-1,styles:{array:{th:{backgroundColor:"#A4C18B",color:"white"}},"function":{th:{backgroundColor:"#D82525"}},regexp:{th:{backgroundColor:"#E2F3FB",color:"#000"}},object:{th:{backgroundColor:"#8DA3AD"}},jquery:{th:{backgroundColor:"#FBF315"}},error:{th:{backgroundColor:"red",color:"yellow"}},domelement:{th:{backgroundColor:"#F3801E"}},date:{th:{backgroundColor:"#A725D8"}},colHeader:{th:{backgroundColor:"#EEE",color:"#aaa",textTransform:"uppercase",fontSize:"80%",padding:"2px 5px"}},"default":{table:{borderCollapse:"collapse",width:"100%"},td:{padding:"5px",fontSize:"12px",backgroundColor:"rgba(255,255,255,0.5)",color:"#222",border:"1px solid #ddd",verticalAlign:"top",fontFamily:'"Consolas","Lucida Console",Courier,mono',whiteSpace:"nowrap"},td_hover:{},th:{padding:"5px",fontSize:"12px",backgroundColor:"#222",color:"#EEE",textAlign:"left",border:"1px solid #ddd",verticalAlign:"top",fontFamily:'"Consolas","Lucida Console",Courier,mono',backgroundRepeat:"repeat-x"}}}},b}();!function(a){"use strict";"function"==typeof define&&define.amd?define(a):"undefined"!=typeof module&&"undefined"!=typeof module.exports?module.exports=a():"undefined"!=typeof Package?Sortable=a():window.Sortable=a()}(function(){"use strict";function a(a,b){this.el=a,this.options=b=b||{};var d={group:Math.random(),sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,draggable:/[uo]l/i.test(a.nodeName)?"li":">*",ghostClass:"sortable-ghost",ignore:"a, img",filter:null,animation:0,setData:function(a,b){a.setData("Text",b.textContent)},dropBubble:!1,dragoverBubble:!1};for(var e in d)!(e in b)&&(b[e]=d[e]);var g=b.group;g&&"object"==typeof g||(g=b.group={name:g}),["pull","put"].forEach(function(a){a in g||(g[a]=!0)}),M.forEach(function(d){b[d]=c(this,b[d]||N),f(a,d.substr(2).toLowerCase(),b[d])},this),b.groups=" "+g.name+(g.put.join?" "+g.put.join(" "):"")+" ",a[F]=b;for(var h in this)"_"===h.charAt(0)&&(this[h]=c(this,this[h]));f(a,"mousedown",this._onTapStart),f(a,"touchstart",this._onTapStart),f(a,"dragover",this),f(a,"dragenter",this),Q.push(this._onDragOver),b.store&&this.sort(b.store.get(this))}function b(a){s&&s.state!==a&&(i(s,"display",a?"none":""),!a&&s.state&&t.insertBefore(s,q),s.state=a)}function c(a,b){var c=P.call(arguments,2);return b.bind?b.bind.apply(b,[a].concat(c)):function(){return b.apply(a,c.concat(P.call(arguments)))}}function d(a,b,c){if(a){c=c||H,b=b.split(".");var d=b.shift().toUpperCase(),e=new RegExp("\\s("+b.join("|")+")\\s","g");do if(">*"===d&&a.parentNode===c||(""===d||a.nodeName.toUpperCase()==d)&&(!b.length||((" "+a.className+" ").match(e)||[]).length==b.length))return a;while(a!==c&&(a=a.parentNode))}return null}function e(a){a.dataTransfer.dropEffect="move",a.preventDefault()}function f(a,b,c){a.addEventListener(b,c,!1)}function g(a,b,c){a.removeEventListener(b,c,!1)}function h(a,b,c){if(a)if(a.classList)a.classList[c?"add":"remove"](b);else{var d=(" "+a.className+" ").replace(/\s+/g," ").replace(" "+b+" ","");a.className=d+(c?" "+b:"")}}function i(a,b,c){var d=a&&a.style;if(d){if(void 0===c)return H.defaultView&&H.defaultView.getComputedStyle?c=H.defaultView.getComputedStyle(a,""):a.currentStyle&&(c=a.currentStyle),void 0===b?c:c[b];b in d||(b="-webkit-"+b),d[b]=c+("string"==typeof c?"":"px")}}function j(a,b,c){if(a){var d=a.getElementsByTagName(b),e=0,f=d.length;if(c)for(;f>e;e++)c(d[e],e);return d}return[]}function k(a){a.draggable=!1}function l(){K=!1}function m(a,b){var c=a.lastElementChild,d=c.getBoundingClientRect();return b.clientY-(d.top+d.height)>5&&c}function n(a){for(var b=a.tagName+a.className+a.src+a.href+a.textContent,c=b.length,d=0;c--;)d+=b.charCodeAt(c);return d.toString(36)}function o(a){for(var b=0;a&&(a=a.previousElementSibling);)"TEMPLATE"!==a.nodeName.toUpperCase()&&b++;return b}function p(a,b){var c,d;return function(){void 0===c&&(c=arguments,d=this,setTimeout(function(){1===c.length?a.call(d,c[0]):a.apply(d,c),c=void 0},b))}}var q,r,s,t,u,v,w,x,y,z,A,B,C,D,E={},F="Sortable"+(new Date).getTime(),G=window,H=G.document,I=G.parseInt,J=!!("draggable"in H.createElement("div")),K=!1,L=function(a,b,c,d,e,f){var g=H.createEvent("Event");g.initEvent(b,!0,!0),g.item=c||a,g.from=d||a,g.clone=s,g.oldIndex=e,g.newIndex=f,a.dispatchEvent(g)},M="onAdd onUpdate onRemove onStart onEnd onFilter onSort".split(" "),N=function(){},O=Math.abs,P=[].slice,Q=[],R=p(function(a,b,c){if(c&&b.scroll){var d,e,f,g,h=b.scrollSensitivity,i=b.scrollSpeed,j=a.clientX,k=a.clientY,l=window.innerWidth,m=window.innerHeight;if(w!==c&&(v=b.scroll,w=c,v===!0)){v=c;do if(v.offsetWidth<v.scrollWidth||v.offsetHeight<v.scrollHeight)break;while(v=v.parentNode)}v&&(d=v,e=v.getBoundingClientRect(),f=(O(e.right-j)<=h)-(O(e.left-j)<=h),g=(O(e.bottom-k)<=h)-(O(e.top-k)<=h)),f||g||(f=(h>=l-j)-(h>=j),g=(h>=m-k)-(h>=k),(f||g)&&(d=G)),(E.vx!==f||E.vy!==g||E.el!==d)&&(E.el=d,E.vx=f,E.vy=g,clearInterval(E.pid),d&&(E.pid=setInterval(function(){d===G?G.scrollTo(G.scrollX+f*i,G.scrollY+g*i):(g&&(d.scrollTop+=g*i),f&&(d.scrollLeft+=f*i))},24)))}},30);return a.prototype={constructor:a,_dragStarted:function(){t&&q&&(h(q,this.options.ghostClass,!0),a.active=this,L(t,"start",q,t,z))},_onTapStart:function(a){var b=a.type,c=a.touches&&a.touches[0],e=(c||a).target,g=e,h=this.options,i=this.el,l=h.filter;if(!("mousedown"===b&&0!==a.button||h.disabled)&&(e=d(e,h.draggable,i))){if(z=o(e),"function"==typeof l){if(l.call(this,a,e,this))return L(g,"filter",e,i,z),void a.preventDefault()}else if(l&&(l=l.split(",").some(function(a){return a=d(g,a.trim(),i),a?(L(a,"filter",e,i,z),!0):void 0})))return void a.preventDefault();if((!h.handle||d(g,h.handle,i))&&e&&!q&&e.parentNode===i){C=a,t=this.el,q=e,u=q.nextSibling,B=this.options.group,q.draggable=!0,h.ignore.split(",").forEach(function(a){j(e,a.trim(),k)}),c&&(C={target:e,clientX:c.clientX,clientY:c.clientY},this._onDragStart(C,"touch"),a.preventDefault()),f(H,"mouseup",this._onDrop),f(H,"touchend",this._onDrop),f(H,"touchcancel",this._onDrop),f(q,"dragend",this),f(t,"dragstart",this._onDragStart),J||this._onDragStart(C,!0);try{H.selection?H.selection.empty():window.getSelection().removeAllRanges()}catch(m){}}}},_emulateDragOver:function(){if(D){i(r,"display","none");var a=H.elementFromPoint(D.clientX,D.clientY),b=a,c=" "+this.options.group.name,d=Q.length;if(b)do{if(b[F]&&b[F].groups.indexOf(c)>-1){for(;d--;)Q[d]({clientX:D.clientX,clientY:D.clientY,target:a,rootEl:b});break}a=b}while(b=b.parentNode);i(r,"display","")}},_onTouchMove:function(a){if(C){var b=a.touches?a.touches[0]:a,c=b.clientX-C.clientX,d=b.clientY-C.clientY,e=a.touches?"translate3d("+c+"px,"+d+"px,0)":"translate("+c+"px,"+d+"px)";D=b,i(r,"webkitTransform",e),i(r,"mozTransform",e),i(r,"msTransform",e),i(r,"transform",e),a.preventDefault()}},_onDragStart:function(a,b){var c=a.dataTransfer,d=this.options;if(this._offUpEvents(),"clone"==B.pull&&(s=q.cloneNode(!0),i(s,"display","none"),t.insertBefore(s,q)),b){var e,g=q.getBoundingClientRect(),h=i(q);r=q.cloneNode(!0),i(r,"top",g.top-I(h.marginTop,10)),i(r,"left",g.left-I(h.marginLeft,10)),i(r,"width",g.width),i(r,"height",g.height),i(r,"opacity","0.8"),i(r,"position","fixed"),i(r,"zIndex","100000"),t.appendChild(r),e=r.getBoundingClientRect(),i(r,"width",2*g.width-e.width),i(r,"height",2*g.height-e.height),"touch"===b?(f(H,"touchmove",this._onTouchMove),f(H,"touchend",this._onDrop),f(H,"touchcancel",this._onDrop)):(f(H,"mousemove",this._onTouchMove),f(H,"mouseup",this._onDrop)),this._loopId=setInterval(this._emulateDragOver,150)}else c&&(c.effectAllowed="move",d.setData&&d.setData.call(this,c,q)),f(H,"drop",this);setTimeout(this._dragStarted,0)},_onDragOver:function(a){var c,e,f,g=this.el,h=this.options,j=h.group,k=j.put,n=B===j,o=h.sort;if(q&&(void 0!==a.preventDefault&&(a.preventDefault(),!h.dragoverBubble&&a.stopPropagation()),B&&!h.disabled&&(n?o||(f=!t.contains(q)):B.pull&&k&&(B.name===j.name||k.indexOf&&~k.indexOf(B.name)))&&(void 0===a.rootEl||a.rootEl===this.el))){if(R(a,h,this.el),K)return;if(c=d(a.target,h.draggable,g),e=q.getBoundingClientRect(),f)return b(!0),void(s||u?t.insertBefore(q,s||u):o||t.appendChild(q));if(0===g.children.length||g.children[0]===r||g===a.target&&(c=m(g,a))){if(c){if(c.animated)return;v=c.getBoundingClientRect()}b(n),g.appendChild(q),this._animate(e,q),c&&this._animate(v,c)}else if(c&&!c.animated&&c!==q&&void 0!==c.parentNode[F]){x!==c&&(x=c,y=i(c));var p,v=c.getBoundingClientRect(),w=v.right-v.left,z=v.bottom-v.top,A=/left|right|inline/.test(y.cssFloat+y.display),C=c.offsetWidth>q.offsetWidth,D=c.offsetHeight>q.offsetHeight,E=(A?(a.clientX-v.left)/w:(a.clientY-v.top)/z)>.5,G=c.nextElementSibling;K=!0,setTimeout(l,30),b(n),p=A?c.previousElementSibling===q&&!C||E&&C:G!==q&&!D||E&&D,p&&!G?g.appendChild(q):c.parentNode.insertBefore(q,p?G:c),this._animate(e,q),this._animate(v,c)}}},_animate:function(a,b){var c=this.options.animation;if(c){var d=b.getBoundingClientRect();i(b,"transition","none"),i(b,"transform","translate3d("+(a.left-d.left)+"px,"+(a.top-d.top)+"px,0)"),b.offsetWidth,i(b,"transition","all "+c+"ms"),i(b,"transform","translate3d(0,0,0)"),clearTimeout(b.animated),b.animated=setTimeout(function(){i(b,"transition",""),i(b,"transform",""),b.animated=!1},c)}},_offUpEvents:function(){g(H,"mouseup",this._onDrop),g(H,"touchmove",this._onTouchMove),g(H,"touchend",this._onDrop),g(H,"touchcancel",this._onDrop)},_onDrop:function(b){var c=this.el,d=this.options;clearInterval(this._loopId),clearInterval(E.pid),g(H,"drop",this),g(H,"mousemove",this._onTouchMove),g(c,"dragstart",this._onDragStart),this._offUpEvents(),b&&(b.preventDefault(),!d.dropBubble&&b.stopPropagation(),r&&r.parentNode.removeChild(r),q&&(g(q,"dragend",this),k(q),h(q,this.options.ghostClass,!1),t!==q.parentNode?(A=o(q),L(q.parentNode,"sort",q,t,z,A),L(t,"sort",q,t,z,A),L(q,"add",q,t,z,A),L(t,"remove",q,t,z,A)):(s&&s.parentNode.removeChild(s),q.nextSibling!==u&&(A=o(q),L(t,"update",q,t,z,A),L(t,"sort",q,t,z,A))),a.active&&L(t,"end",q,t,z,A)),t=q=r=u=s=v=w=C=D=x=y=B=a.active=null,this.save())},handleEvent:function(a){var b=a.type;"dragover"===b||"dragenter"===b?(this._onDragOver(a),e(a)):("drop"===b||"dragend"===b)&&this._onDrop(a)},toArray:function(){for(var a,b=[],c=this.el.children,e=0,f=c.length;f>e;e++)a=c[e],d(a,this.options.draggable,this.el)&&b.push(a.getAttribute("data-id")||n(a));return b},sort:function(a){var b={},c=this.el;this.toArray().forEach(function(a,e){var f=c.children[e];d(f,this.options.draggable,c)&&(b[a]=f)},this),a.forEach(function(a){b[a]&&(c.removeChild(b[a]),c.appendChild(b[a]))})},save:function(){var a=this.options.store;a&&a.set(this)},closest:function(a,b){return d(a,b||this.options.draggable,this.el)},option:function(a,b){var c=this.options;return void 0===b?c[a]:void(c[a]=b)},destroy:function(){var a=this.el,b=this.options;M.forEach(function(c){g(a,c.substr(2).toLowerCase(),b[c])}),g(a,"mousedown",this._onTapStart),g(a,"touchstart",this._onTapStart),g(a,"dragover",this),g(a,"dragenter",this),Array.prototype.forEach.call(a.querySelectorAll("[draggable]"),function(a){ -a.removeAttribute("draggable")}),Q.splice(Q.indexOf(this._onDragOver),1),this._onDrop(),this.el=null}},a.utils={on:f,off:g,css:i,find:j,bind:c,is:function(a,b){return!!d(a,b,a)},throttle:p,closest:d,toggleClass:h,dispatchEvent:L,index:o},a.version="1.1.1",a.create=function(b,c){return new a(b,c)},a}),function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){"use strict";a.fn.sortable=function(b){var c;return this.each(function(){var d=a(this),e=d.data("sortable");if(e||!(b instanceof Object)&&b||(e=new Sortable(this,b),d.data("sortable",e)),e){if("widget"===b)return e;"destroy"===b?(e.destroy(),d.removeData("sortable")):b in e&&(c=e[e].apply(e,[].slice.call(arguments,1)))}}),void 0===c?this:c}});var XBBCODE=function(){function a(){i=[];var a,b,c;for(a in h)if(h.hasOwnProperty(a)){for("*"===a?i.push("\\"+a):(i.push(a),h[a].noParse&&u.push(a)),h[a].validChildLookup={},h[a].validParentLookup={},h[a].restrictParentsTo=h[a].restrictParentsTo||[],h[a].restrictChildrenTo=h[a].restrictChildrenTo||[],c=h[a].restrictChildrenTo.length,b=0;c>b;b++)h[a].validChildLookup[h[a].restrictChildrenTo[b]]=!0;for(c=h[a].restrictParentsTo.length,b=0;c>b;b++)h[a].validParentLookup[h[a].restrictParentsTo[b]]=!0}j=new RegExp("<bbcl=([0-9]+) ("+i.join("|")+")([ =][^>]*?)?>((?:.|[\\r\\n])*?)<bbcl=\\1 /\\2>","gi"),k=new RegExp("\\[("+i.join("|")+")([ =][^\\]]*?)?\\]([^\\[]*?)\\[/\\1\\]","gi"),l=new RegExp("\\[("+u.join("|")+")([ =][^\\]]*?)?\\]([\\s\\S]*?)\\[/\\1\\]","gi"),function(){for(var a=[],b=0;b<i.length;b++)"\\*"!==i[b]&&a.push("/"+i[b]);m=new RegExp("(\\[)((?:"+i.join("|")+")(?:[ =][^\\]]*?)?)(\\])","gi"),n=new RegExp("(\\[)("+a.join("|")+")(\\])","gi")}()}function b(a,c,d,e,f,g,k){k=k||[],d++;var l,m,n,o,p=new RegExp("(<bbcl="+d+" )("+i.join("|")+")([ =>])","gi"),q=new RegExp("(<bbcl="+d+" )("+i.join("|")+")([ =>])","i"),r=g.match(p)||[],s=h[a]||{};for(p.lastIndex=0,r||(g=""),n=0;n<r.length;n++)q.lastIndex=0,o=r[n].match(q)[2].toLowerCase(),s&&s.restrictChildrenTo&&s.restrictChildrenTo.length>0&&(s.validChildLookup[o]||(m='The tag "'+o+'" is not allowed as a child of the tag "'+a+'".',k.push(m))),l=h[o]||{},l.restrictParentsTo.length>0&&(l.validParentLookup[a]||(m='The tag "'+a+'" is not allowed as a parent of the tag "'+o+'".',k.push(m)));return g=g.replace(j,function(a,c,d,e,f){return k=b(d.toLowerCase(),a,c,d,e,f,k),a}),k}function c(a){return a=a.replace(/\<([^\>][^\>]*?)\>/gi,function(a,b){var c=b.match(/^bbcl=([0-9]+) /);return null===c?"<bbcl=0 "+b+">":"<"+b.replace(/^(bbcl=)([0-9]+)/,function(a,b,c){return b+(parseInt(c,10)+1)})+">"})}function d(a){return a.replace(/<bbcl=[0-9]+ \/\*>/gi,"").replace(/<bbcl=[0-9]+ /gi,"[").replace(/>/gi,"]")}function e(a){var b=a.text;return b=b.replace(j,v)}function f(a){for(a=a.replace(/\[(?!\*[ =\]]|list([ =][^\]]*)?\]|\/list[\]])/gi,"<"),a=a.replace(/\[(?=list([ =][^\]]*)?\]|\/list[\]])/gi,">");a!==(a=a.replace(/>list([ =][^\]]*)?\]([^>]*?)(>\/list])/gi,function(a,b,c){for(var d=a;d!==(d=d.replace(/\[\*\]([^\[]*?)(\[\*\]|>\/list])/i,function(a,b,c){return c=">/list]"===c.toLowerCase()?"</*]</list]":"</*][*]","<*]"+b+c})););return d=d.replace(/>/g,"<")})););return a=a.replace(/</g,"[")}function g(a){for(;a!==(a=a.replace(k,function(a,b,d,e){return a=a.replace(/\[/g,"<"),a=a.replace(/\]/g,">"),c(a)})););return a}var h,i,j,k,l,m,n,o={},p=/^(?:https?|file|c):(?:\/{1,3}|\\{1})[-a-zA-Z0-9:;@#%&()~_?\+=\/\\\.]*$/,q=/^(?:aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen)$/,r=/^#?[a-fA-F0-9]{6}$/,s=/[^\s@]+@[^\s@]+\.[^\s@]+/,t=/^([a-z][a-z0-9_]+|"[a-z][a-z0-9_\s]+")$/i,u=[];h={b:{openTag:function(a,b){return'<span class="xbbcode-b">'},closeTag:function(a,b){return"</span>"}},bbcode:{openTag:function(a,b){return""},closeTag:function(a,b){return""}},center:{openTag:function(a,b){return'<span class="xbbcode-center">'},closeTag:function(a,b){return"</span>"}},code:{openTag:function(a,b){return'<span class="xbbcode-code">'},closeTag:function(a,b){return"</span>"},noParse:!0},color:{openTag:function(a,b){var c=a.substr(1).toLowerCase()||"black";return q.lastIndex=0,r.lastIndex=0,q.test(c)||(r.test(c)?"#"!==c.substr(0,1)&&(c="#"+c):c="black"),'<span style="color:'+c+'">'},closeTag:function(a,b){return"</span>"}},email:{openTag:function(a,b){var c;return c=a?a.substr(1):b.replace(/<.*?>/g,""),s.lastIndex=0,s.test(c)?'<a href="mailto:'+c+'">':"<a>"},closeTag:function(a,b){return"</a>"}},face:{openTag:function(a,b){var c=a.substr(1)||"inherit";return t.lastIndex=0,t.test(c)||(c="inherit"),'<span style="font-family:'+c+'">'},closeTag:function(a,b){return"</span>"}},font:{openTag:function(a,b){var c=a.substr(1)||"inherit";return t.lastIndex=0,t.test(c)||(c="inherit"),'<span style="font-family:'+c+'">'},closeTag:function(a,b){return"</span>"}},i:{openTag:function(a,b){return'<span class="xbbcode-i">'},closeTag:function(a,b){return"</span>"}},img:{openTag:function(a,b){var c=b;return p.lastIndex=0,p.test(c)||(c=""),'<img src="'+c+'" />'},closeTag:function(a,b){return""},displayContent:!1},justify:{openTag:function(a,b){return'<span class="xbbcode-justify">'},closeTag:function(a,b){return"</span>"}},large:{openTag:function(a,b){var a=a||"",c=a.substr(1)||"inherit";return q.lastIndex=0,r.lastIndex=0,q.test(c)||(r.test(c)?"#"!==c.substr(0,1)&&(c="#"+c):c="inherit"),'<span class="xbbcode-size-36" style="color:'+c+'">'},closeTag:function(a,b){return"</span>"}},left:{openTag:function(a,b){return'<span class="xbbcode-left">'},closeTag:function(a,b){return"</span>"}},li:{openTag:function(a,b){return"<li>"},closeTag:function(a,b){return"</li>"},restrictParentsTo:["list","ul","ol"]},list:{openTag:function(a,b){return"<ul>"},closeTag:function(a,b){return"</ul>"},restrictChildrenTo:["*","li"]},noparse:{openTag:function(a,b){return""},closeTag:function(a,b){return""},noParse:!0},ol:{openTag:function(a,b){return"<ol>"},closeTag:function(a,b){return"</ol>"},restrictChildrenTo:["*","li"]},php:{openTag:function(a,b){return'<span class="xbbcode-code">'},closeTag:function(a,b){return"</span>"},noParse:!0},quote:{openTag:function(a,b){return'<blockquote class="xbbcode-blockquote">'},closeTag:function(a,b){return"</blockquote>"}},right:{openTag:function(a,b){return'<span class="xbbcode-right">'},closeTag:function(a,b){return"</span>"}},s:{openTag:function(a,b){return'<span class="xbbcode-s">'},closeTag:function(a,b){return"</span>"}},size:{openTag:function(a,b){var c=parseInt(a.substr(1),10)||0;return(4>c||c>40)&&(c=14),'<span class="xbbcode-size-'+c+'">'},closeTag:function(a,b){return"</span>"}},small:{openTag:function(a,b){var a=a||"",c=a.substr(1)||"inherit";return q.lastIndex=0,r.lastIndex=0,q.test(c)||(r.test(c)?"#"!==c.substr(0,1)&&(c="#"+c):c="inherit"),'<span class="xbbcode-size-10" style="color:'+c+'">'},closeTag:function(a,b){return"</span>"}},sub:{openTag:function(a,b){return"<sub>"},closeTag:function(a,b){return"</sub>"}},sup:{openTag:function(a,b){return"<sup>"},closeTag:function(a,b){return"</sup>"}},table:{openTag:function(a,b){return'<table class="xbbcode-table">'},closeTag:function(a,b){return"</table>"},restrictChildrenTo:["tbody","thead","tfoot","tr"]},tbody:{openTag:function(a,b){return"<tbody>"},closeTag:function(a,b){return"</tbody>"},restrictChildrenTo:["tr"],restrictParentsTo:["table"]},tfoot:{openTag:function(a,b){return"<tfoot>"},closeTag:function(a,b){return"</tfoot>"},restrictChildrenTo:["tr"],restrictParentsTo:["table"]},thead:{openTag:function(a,b){return'<thead class="xbbcode-thead">'},closeTag:function(a,b){return"</thead>"},restrictChildrenTo:["tr"],restrictParentsTo:["table"]},td:{openTag:function(a,b){return'<td class="xbbcode-td">'},closeTag:function(a,b){return"</td>"},restrictParentsTo:["tr"]},th:{openTag:function(a,b){return'<th class="xbbcode-th">'},closeTag:function(a,b){return"</th>"},restrictParentsTo:["tr"]},tr:{openTag:function(a,b){return'<tr class="xbbcode-tr">'},closeTag:function(a,b){return"</tr>"},restrictChildrenTo:["td","th"],restrictParentsTo:["table","tbody","tfoot","thead"]},u:{openTag:function(a,b){return'<span class="xbbcode-u">'},closeTag:function(a,b){return"</span>"}},ul:{openTag:function(a,b){return"<ul>"},closeTag:function(a,b){return"</ul>"},restrictChildrenTo:["*","li"]},url:{openTag:function(a,b){var c;return c=a?a.substr(1):b.replace(/<.*?>/g,""),p.lastIndex=0,p.test(c)||(c="#"),'<a href="'+c+'">'},closeTag:function(a,b){return"</a>"}},"*":{openTag:function(a,b){return"<li>"},closeTag:function(a,b){return"</li>"},restrictParentsTo:["list","ul","ol"]}},a();var v=function(a,b,c,e,f){c=c.toLowerCase();var g=h[c].noParse?d(f):f.replace(j,v),i=h[c].openTag(e,g),k=h[c].closeTag(e,g);return h[c].displayContent===!1&&(g=""),i+g+k};return o.tags=function(){return h},o.addTags=function(b){var c;for(c in b)h[c]=b[c];a()},o.process=function(a){var c={html:"",error:!1},d=[];for(a.text=a.text.replace(/</g,"<"),a.text=a.text.replace(/>/g,">"),a.text=a.text.replace(m,function(a,b,c,d){return"<"+c+">"}),a.text=a.text.replace(n,function(a,b,c,d){return"<"+c+">"}),a.text=a.text.replace(/\[/g,"["),a.text=a.text.replace(/\]/g,"]"),a.text=a.text.replace(/</g,"["),a.text=a.text.replace(/>/g,"]");a.text!==(a.text=a.text.replace(l,function(a,b,c,d){return d=d.replace(/\[/g,"["),d=d.replace(/\]/g,"]"),c=c||"",d=d||"","["+b+c+"]"+d+"[/"+b+"]"})););return a.text=f(a.text),a.text=g(a.text),d=b("bbcode",a.text,-1,"","",a.text),c.html=e(a),(-1!==c.html.indexOf("[")||-1!==c.html.indexOf("]"))&&d.push("Some tags appear to be misaligned."),a.removeMisalignedTags&&(c.html=c.html.replace(/\[.*?\]/g,"")),a.addInLineBreaks&&(c.html='<div style="white-space:pre;">'+c.html+"</div>"),c.html=c.html.replace("[","["),c.html=c.html.replace("]","]"),c.error=0!==d.length,c.errorQueue=d,c},o}();+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.1",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=i?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=a("body").height();"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.1",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.1",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active"));a&&this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.1",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c="prev"==a?-1:1,d=this.getItemIndex(b),e=(d+c)%this.$items.length;return this.$items.eq(e)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i="next"==b?"first":"last",j=this;if(!f.length){if(!this.options.wrap)return;f=this.$element.find(".item")[i]()}if(f.hasClass("active"))return this.sliding=!1;var k=f[0],l=a.Event("slide.bs.carousel",{relatedTarget:k,direction:h});if(this.$element.trigger(l),!l.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var m=a(this.$indicators.children()[this.getItemIndex(f)]);m&&m.addClass("active")}var n=a.Event("slid.bs.carousel",{relatedTarget:k,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),j.sliding=!1,setTimeout(function(){j.$element.trigger(n)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(n)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&"show"==b&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a(this.options.trigger).filter('[href="#'+b.id+'"], [data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.1",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0,trigger:'[data-toggle="collapse"]'},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.find("> .panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":a.extend({},e.data(),{trigger:this});c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=c(d),f={relatedTarget:this};e.hasClass("open")&&(e.trigger(b=a.Event("hide.bs.dropdown",f)),b.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f)))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.1",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(b){if(/(38|40|27|32)/.test(b.which)&&!/input|textarea/i.test(b.target.tagName)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var e=c(d),g=e.hasClass("open");if(!g&&27!=b.which||g&&27==b.which)return 27==b.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.divider):visible a",i=e.find('[role="menu"]'+h+', [role="listbox"]'+h);if(i.length){var j=i.index(b.target);38==b.which&&j>0&&j--,40==b.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",b).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="menu"]',g.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="listbox"]',g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.1",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(c,d){var e=a.proxy(this.process,this);this.$body=a("body"),this.$scrollElement=a(a(c).is("body")?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",e),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.1",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b="offset",c=0;a.isWindow(this.$scrollElement[0])||(b="position",c=this.$scrollElement.scrollTop()),this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight();var d=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+c,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){d.offsets.push(this[0]),d.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$backdrop=this.isShown=null,this.scrollbarWidth=0,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.1",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body), -d.$element.show().scrollTop(0),d.options.backdrop&&d.adjustBackdrop(),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in").attr("aria-hidden",!1),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$element.find(".modal-dialog").one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a('<div class="modal-backdrop '+e+'" />').prependTo(this.$element).on("click.dismiss.bs.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.options.backdrop&&this.adjustBackdrop(),this.adjustDialog()},c.prototype.adjustBackdrop=function(){this.$backdrop.css("height",0).css("height",this.$element[0].scrollHeight)},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){this.bodyIsOverflowing=document.body.scrollHeight>document.documentElement.clientHeight,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right","")},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b,g=f&&f.selector;(e||"destroy"!=b)&&(g?(e||d.data("bs.tooltip",e={}),e[g]||(e[g]=new c(this,f))):e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};c.VERSION="3.3.1",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(this.options.viewport.selector||this.options.viewport);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c&&c.$tip&&c.$tip.is(":visible")?void(c.hoverState="in"):(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.options.container?a(this.options.container):this.$element.parent(),p=this.getPosition(o);h="bottom"==h&&k.bottom+m>p.bottom?"top":"top"==h&&k.top-m<p.top?"bottom":"right"==h&&k.right+l>p.width?"left":"left"==h&&k.left-l<p.left?"right":h,f.removeClass(n).addClass(h)}var q=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(q,h);var r=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",r).emulateTransitionEnd(c.TRANSITION_DURATION):r()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top=b.top+g,b.left=b.left+h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=this.tip(),g=a.Event("hide.bs."+this.type);return this.$element.trigger(g),g.isDefaultPrevented()?void 0:(f.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.width&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type)})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b,g=f&&f.selector;(e||"destroy"!=b)&&(g?(e||d.data("bs.popover",e={}),e[g]||(e[g]=new c(this,f))):e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.1",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},c.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),function(a){function b(a){return"undefined"==typeof a.which?!0:"number"==typeof a.which&&a.which>0?!a.ctrlKey&&!a.metaKey&&!a.altKey&&8!=a.which:!1}a.expr[":"].notmdproc=function(b){return a(b).data("mdproc")?!1:!0},a.material={options:{input:!0,ripples:!0,checkbox:!0,togglebutton:!0,radio:!0,arrive:!0,autofill:!0,withRipples:[".btn:not(.btn-link)",".card-image",".navbar a:not(.withoutripple)",".dropdown-menu a",".nav-tabs a:not(.withoutripple)",".withripple"].join(","),inputElements:"input.form-control, textarea.form-control, select.form-control",checkboxElements:".checkbox > label > input[type=checkbox]",togglebuttonElements:".togglebutton > label > input[type=checkbox]",radioElements:".radio > label > input[type=radio]"},checkbox:function(b){a(b?b:this.options.checkboxElements).filter(":notmdproc").data("mdproc",!0).after("<span class=ripple></span><span class=check></span>")},togglebutton:function(b){a(b?b:this.options.togglebuttonElements).filter(":notmdproc").data("mdproc",!0).after("<span class=toggle></span>")},radio:function(b){a(b?b:this.options.radioElements).filter(":notmdproc").data("mdproc",!0).after("<span class=circle></span><span class=check></span>")},input:function(c){a(c?c:this.options.inputElements).filter(":notmdproc").data("mdproc",!0).each(function(){var b=a(this);if(b.wrap("<div class=form-control-wrapper></div>"),b.after("<span class=material-input></span>"),b.hasClass("floating-label")){var c=b.attr("placeholder");b.attr("placeholder",null).removeClass("floating-label"),b.after("<div class=floating-label>"+c+"</div>")}if(b.attr("data-hint")&&b.after("<div class=hint>"+b.attr("data-hint")+"</div>"),(null===b.val()||"undefined"==b.val()||""===b.val())&&b.addClass("empty"),b.parent().next().is("[type=file]")){b.parent().addClass("fileinput");var d=b.parent().next().detach();b.after(d)}}),a(document).on("change",".checkbox input[type=checkbox]",function(){a(this).blur()}).on("keydown paste",".form-control",function(c){b(c)&&a(this).removeClass("empty")}).on("keyup change",".form-control",function(){var b=a(this);""===b.val()&&b[0].checkValidity()?b.addClass("empty"):b.removeClass("empty")}).on("focus",".form-control-wrapper.fileinput",function(){a(this).find("input").addClass("focus")}).on("blur",".form-control-wrapper.fileinput",function(){a(this).find("input").removeClass("focus")}).on("change",".form-control-wrapper.fileinput [type=file]",function(){var b="";a.each(a(this)[0].files,function(a,c){console.log(c),b+=c.name+", "}),b=b.substring(0,b.length-2),b?a(this).prev().removeClass("empty"):a(this).prev().addClass("empty"),a(this).prev().val(b)})},ripples:function(b){a(b?b:this.options.withRipples).ripples()},autofill:function(){var b=setInterval(function(){a("input[type!=checkbox]").each(function(){a(this).val()&&a(this).val()!==a(this).attr("value")&&a(this).trigger("change")})},100);setTimeout(function(){clearInterval(b)},1e4);var c;a(document).on("focus","input",function(){var b=a(this).parents("form").find("input").not("[type=file]");c=setInterval(function(){b.each(function(){a(this).val()!==a(this).attr("value")&&a(this).trigger("change")})},100)}).on("blur","input",function(){clearInterval(c)})},init:function(){a.ripples&&this.options.ripples&&this.ripples(),this.options.input&&this.input(),this.options.checkbox&&this.checkbox(),this.options.togglebutton&&this.togglebutton(),this.options.radio&&this.radio(),this.options.autofill&&this.autofill(),document.arrive&&this.options.arrive&&(a(document).arrive(this.options.inputElements,function(){a.material.input(a(this))}),a(document).arrive(this.options.checkboxElements,function(){a.material.checkbox(a(this))}),a(document).arrive(this.options.radioElements,function(){a.material.radio(a(this))}),a(document).arrive(this.options.togglebuttonElements,function(){a.material.togglebutton(a(this))}))}}}(jQuery),function(a,b,c,d){"use strict";function e(b,c){g=this,this.element=a(b),this.options=a.extend({},h,c),this._defaults=h,this._name=f,this.init()}var f="ripples",g=null,h={};e.prototype.init=function(){var c=this.element;c.on("mousedown touchstart",function(d){if(g.isTouch()&&"mousedown"===d.type)return!1;c.find(".ripple-wrapper").length||c.append('<div class="ripple-wrapper"></div>');var e=c.children(".ripple-wrapper"),f=g.getRelY(e,d),h=g.getRelX(e,d);if(f||h){var i=g.getRipplesColor(),j=a("<div></div>");j.addClass("ripple").css({left:h,top:f,"background-color":i}),e.append(j),function(){return b.getComputedStyle(j[0]).opacity}(),g.rippleOn(j),setTimeout(function(){g.rippleEnd(j)},500),c.on("mouseup mouseleave touchend",function(){j.data("mousedown","off"),"off"===j.data("animating")&&g.rippleOut(j)})}})},e.prototype.getNewSize=function(a){var b=this.element;return Math.max(b.outerWidth(),b.outerHeight())/a.outerWidth()*2.5},e.prototype.getRelX=function(a,b){var c=a.offset();return g.isTouch()?(b=b.originalEvent,1!==b.touches.length?b.touches[0].pageX-c.left:!1):b.pageX-c.left},e.prototype.getRelY=function(a,b){var c=a.offset();return g.isTouch()?(b=b.originalEvent,1!==b.touches.length?b.touches[0].pageY-c.top:!1):b.pageY-c.top},e.prototype.getRipplesColor=function(){var a,c=this.element;return a=this.options&&this.options.color?this.options.color:c.data("ripple-color")?c.data("ripple-color"):b.getComputedStyle(c[0]).color},e.prototype.hasTransitionSupport=function(){var a=c.body||c.documentElement,b=a.style,e=b.transition!==d||b.WebkitTransition!==d||b.MozTransition!==d||b.MsTransition!==d||b.OTransition!==d;return e},e.prototype.isTouch=function(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},e.prototype.rippleEnd=function(a){a.data("animating","off"),"off"===a.data("mousedown")&&g.rippleOut(a)},e.prototype.rippleOut=function(a){a.off(),g.hasTransitionSupport()?a.addClass("ripple-out"):a.animate({opacity:0},100,function(){a.trigger("transitionend")}),a.on("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(){a.remove()})},e.prototype.rippleOn=function(a){var b=g.getNewSize(a),c=this.element;g.hasTransitionSupport()?a.css({"-ms-transform":"scale("+b+")","-moz-transform":"scale("+b+")","-webkit-transform":"scale("+b+")",transform:"scale("+b+")"}).addClass("ripple-on").data("animating","on").data("mousedown","on"):a.animate({width:2*Math.max(c.outerWidth(),c.outerHeight()),height:2*Math.max(c.outerWidth(),c.outerHeight()),"margin-left":-1*Math.max(c.outerWidth(),c.outerHeight()),"margin-top":-1*Math.max(c.outerWidth(),c.outerHeight()),opacity:.2},500,function(){a.trigger("transitionend")})},a.fn.ripples=function(b){return this.each(function(){a.data(this,"plugin_"+f)||a.data(this,"plugin_"+f,new e(this,b))})}}(jQuery,window,document),function(a){function b(a){return"undefined"!=typeof a&&null!==a?!0:!1}a(document).ready(function(){a("body").append("<div id=snackbar-container/>")}),a(document).on("click","[data-toggle=snackbar]",function(){a(this).snackbar("toggle")}).on("click","#snackbar-container .snackbar",function(){a(this).snackbar("hide")}),a.snackbar=function(c){if(b(c)&&c===Object(c)){var d;d=b(c.id)?a("#"+c.id):a("<div/>").attr("id","snackbar"+Date.now()).attr("class","snackbar");var e=d.hasClass("snackbar-opened");b(c.style)?d.attr("class","snackbar "+c.style):d.attr("class","snackbar"),c.timeout=b(c.timeout)?c.timeout:3e3,b(c.content)&&(d.find(".snackbar-content").length?d.find(".snackbar-content").text(c.content):d.prepend("<span class=snackbar-content>"+c.content+"</span>")),b(c.id)?d.insertAfter("#snackbar-container .snackbar:last-child"):d.appendTo("#snackbar-container"),b(c.action)&&"toggle"==c.action&&(e?c.action="hide":c.action="show");var f=Date.now();d.data("animationId1",f),setTimeout(function(){d.data("animationId1")===f&&(b(c.action)&&"show"!=c.action?b(c.action)&&"hide"==c.action&&d.removeClass("snackbar-opened"):d.addClass("snackbar-opened"))},50);var g=Date.now();return d.data("animationId2",g),0!==c.timeout&&setTimeout(function(){d.data("animationId2")===g&&d.removeClass("snackbar-opened")},c.timeout),d}return!1},a.fn.snackbar=function(c){var d={};if(this.hasClass("snackbar"))return d.id=this.attr("id"),("show"===c||"hide"===c||"toggle"==c)&&(d.action=c),a.snackbar(d);b(c)&&"show"!==c&&"hide"!==c&&"toggle"!=c||(d={content:a(this).attr("data-content"),style:a(this).attr("data-style"),timeout:a(this).attr("data-timeout")}),b(c)&&(d.id=this.attr("data-snackbar-id"),("show"===c||"hide"===c||"toggle"==c)&&(d.action=c));var e=a.snackbar(d);return this.attr("data-snackbar-id",e.attr("id")),e}}(jQuery),function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){if(!d)var d={map:function(a,b){var c={};return b?a.map(function(a,d){return c.index=d,b.call(c,a)}):a.slice()},naturalOrder:function(a,b){return b>a?-1:a>b?1:0},sum:function(a,b){var c={};return a.reduce(b?function(a,d,e){return c.index=e,a+b.call(c,d)}:function(a,b){return a+b},0)},max:function(a,b){return Math.max.apply(null,b?d.map(a,b):a)}};var e=function(){function a(a,b,c){return(a<<2*j)+(b<<j)+c}function b(a){function b(){c.sort(a),d=!0}var c=[],d=!1;return{push:function(a){c.push(a),d=!1},peek:function(a){return d||b(),void 0===a&&(a=c.length-1),c[a]},pop:function(){return d||b(),c.pop()},size:function(){return c.length},map:function(a){return c.map(a)},debug:function(){return d||b(),c}}}function c(a,b,c,d,e,f,g){var h=this;h.r1=a,h.r2=b,h.g1=c,h.g2=d,h.b1=e,h.b2=f,h.histo=g}function e(){this.vboxes=new b(function(a,b){return d.naturalOrder(a.vbox.count()*a.vbox.volume(),b.vbox.count()*b.vbox.volume())})}function f(b){var c,d,e,f,g=1<<3*j,h=new Array(g);return b.forEach(function(b){d=b[0]>>k,e=b[1]>>k,f=b[2]>>k,c=a(d,e,f),h[c]=(h[c]||0)+1}),h}function g(a,b){var d,e,f,g=1e6,h=0,i=1e6,j=0,l=1e6,m=0;return a.forEach(function(a){d=a[0]>>k,e=a[1]>>k,f=a[2]>>k,g>d?g=d:d>h&&(h=d),i>e?i=e:e>j&&(j=e),l>f?l=f:f>m&&(m=f)}),new c(g,h,i,j,l,m,b)}function h(b,c){function e(a){var b,d,e,f,g,h=a+"1",i=a+"2",k=0;for(j=c[h];j<=c[i];j++)if(p[j]>o/2){for(e=c.copy(),f=c.copy(),b=j-c[h],d=c[i]-j,g=d>=b?Math.min(c[i]-1,~~(j+d/2)):Math.max(c[h],~~(j-1-b/2));!p[g];)g++;for(k=q[g];!k&&p[g-1];)k=q[--g];return e[i]=g,f[h]=e[i]+1,[e,f]}}if(c.count()){var f=c.r2-c.r1+1,g=c.g2-c.g1+1,h=c.b2-c.b1+1,i=d.max([f,g,h]);if(1==c.count())return[c.copy()];var j,k,l,m,n,o=0,p=[],q=[];if(i==f)for(j=c.r1;j<=c.r2;j++){for(m=0,k=c.g1;k<=c.g2;k++)for(l=c.b1;l<=c.b2;l++)n=a(j,k,l),m+=b[n]||0;o+=m,p[j]=o}else if(i==g)for(j=c.g1;j<=c.g2;j++){for(m=0,k=c.r1;k<=c.r2;k++)for(l=c.b1;l<=c.b2;l++)n=a(k,j,l),m+=b[n]||0;o+=m,p[j]=o}else for(j=c.b1;j<=c.b2;j++){for(m=0,k=c.r1;k<=c.r2;k++)for(l=c.g1;l<=c.g2;l++)n=a(k,l,j),m+=b[n]||0;o+=m,p[j]=o}return p.forEach(function(a,b){q[b]=o-a}),e(i==f?"r":i==g?"g":"b")}}function i(a,c){function i(a,b){for(var c,d=1,e=0;l>e;)if(c=a.pop(),c.count()){var f=h(j,c),g=f[0],i=f[1];if(!g)return;if(a.push(g),i&&(a.push(i),d++),d>=b)return;if(e++>l)return}else a.push(c),e++}if(!a.length||2>c||c>256)return!1;var j=f(a),k=0;j.forEach(function(){k++});var n=g(a,j),o=new b(function(a,b){return d.naturalOrder(a.count(),b.count())});o.push(n),i(o,m*c);for(var p=new b(function(a,b){return d.naturalOrder(a.count()*a.volume(),b.count()*b.volume())});o.size();)p.push(o.pop());i(p,c-p.size());for(var q=new e;p.size();)q.push(p.pop());return q}var j=5,k=8-j,l=1e3,m=.75;return c.prototype={volume:function(a){var b=this;return(!b._volume||a)&&(b._volume=(b.r2-b.r1+1)*(b.g2-b.g1+1)*(b.b2-b.b1+1)),b._volume},count:function(b){var c=this,d=c.histo;if(!c._count_set||b){var e,f,g,h=0;for(e=c.r1;e<=c.r2;e++)for(f=c.g1;f<=c.g2;f++)for(g=c.b1;g<=c.b2;g++)index=a(e,f,g),h+=d[index]||0;c._count=h,c._count_set=!0}return c._count},copy:function(){var a=this;return new c(a.r1,a.r2,a.g1,a.g2,a.b1,a.b2,a.histo)},avg:function(b){var c=this,d=c.histo;if(!c._avg||b){var e,f,g,h,i,k=0,l=1<<8-j,m=0,n=0,o=0;for(f=c.r1;f<=c.r2;f++)for(g=c.g1;g<=c.g2;g++)for(h=c.b1;h<=c.b2;h++)i=a(f,g,h),e=d[i]||0,k+=e,m+=e*(f+.5)*l,n+=e*(g+.5)*l,o+=e*(h+.5)*l;k?c._avg=[~~(m/k),~~(n/k),~~(o/k)]:c._avg=[~~(l*(c.r1+c.r2+1)/2),~~(l*(c.g1+c.g2+1)/2),~~(l*(c.b1+c.b2+1)/2)]}return c._avg},contains:function(a){var b=this,c=a[0]>>k;return gval=a[1]>>k,bval=a[2]>>k,c>=b.r1&&c<=b.r2&&gval>=b.g1&&gval<=b.g2&&bval>=b.b1&&bval<=b.b2}},e.prototype={push:function(a){this.vboxes.push({vbox:a,color:a.avg()})},palette:function(){return this.vboxes.map(function(a){return a.color})},size:function(){return this.vboxes.size()},map:function(a){for(var b=this.vboxes,c=0;c<b.size();c++)if(b.peek(c).vbox.contains(a))return b.peek(c).color;return this.nearest(a)},nearest:function(a){for(var b,c,d,e=this.vboxes,f=0;f<e.size();f++)c=Math.sqrt(Math.pow(a[0]-e.peek(f).color[0],2)+Math.pow(a[1]-e.peek(f).color[1],2)+Math.pow(a[2]-e.peek(f).color[2],2)),(b>c||void 0===b)&&(b=c,d=e.peek(f).color);return d},forcebw:function(){var a=this.vboxes;a.sort(function(a,b){return d.naturalOrder(d.sum(a.color),d.sum(b.color))});var b=a[0].color;b[0]<5&&b[1]<5&&b[2]<5&&(a[0].color=[0,0,0]);var c=a.length-1,e=a[c].color;e[0]>251&&e[1]>251&&e[2]>251&&(a[c].color=[255,255,255])}},{quantize:i}}();b.exports=e.quantize},{}],2:[function(a,b,c){(function(){var b,c,d,e=function(a,b){return function(){return a.apply(b,arguments)}},f=[].slice;window.Swatch=c=function(){function a(a,b){this.rgb=a,this.population=b}return a.prototype.hsl=void 0,a.prototype.rgb=void 0,a.prototype.population=1,a.yiq=0,a.prototype.getHsl=function(){return this.hsl?this.hsl:this.hsl=d.rgbToHsl(this.rgb[0],this.rgb[1],this.rgb[2])},a.prototype.getPopulation=function(){return this.population},a.prototype.getRgb=function(){return this.rgb},a.prototype.getHex=function(){return"#"+((1<<24)+(this.rgb[0]<<16)+(this.rgb[1]<<8)+this.rgb[2]).toString(16).slice(1,7)},a.prototype.getTitleTextColor=function(){return this._ensureTextColors(),this.yiq<200?"#fff":"#000"},a.prototype.getBodyTextColor=function(){return this._ensureTextColors(),this.yiq<150?"#fff":"#000"},a.prototype._ensureTextColors=function(){return this.yiq?void 0:this.yiq=(299*this.rgb[0]+587*this.rgb[1]+114*this.rgb[2])/1e3},a}(),window.Vibrant=d=function(){function d(a,d,f){this.swatches=e(this.swatches,this);var g,h,i,j,k,l,m,n,o,p,q,r;for("undefined"==typeof d&&(d=64),"undefined"==typeof f&&(f=5),m=new b(a),n=m.getImageData(),q=n.data,p=m.getPixelCount(),h=[],l=0;p>l;)o=4*l,r=q[o+0],k=q[o+1],i=q[o+2],g=q[o+3],g>=125&&(r>250&&k>250&&i>250||h.push([r,k,i])),l+=f;j=this.quantize(h,d),this._swatches=j.vboxes.map(function(a){return function(a){return new c(a.color,a.vbox.count())}}(this)),this.maxPopulation=this.findMaxPopulation,this.generateVarationColors(),this.generateEmptySwatches(),m.removeCanvas()}return d.prototype.quantize=a("quantize"),d.prototype._swatches=[],d.prototype.TARGET_DARK_LUMA=.26,d.prototype.MAX_DARK_LUMA=.45,d.prototype.MIN_LIGHT_LUMA=.55,d.prototype.TARGET_LIGHT_LUMA=.74,d.prototype.MIN_NORMAL_LUMA=.3,d.prototype.TARGET_NORMAL_LUMA=.5,d.prototype.MAX_NORMAL_LUMA=.7,d.prototype.TARGET_MUTED_SATURATION=.3,d.prototype.MAX_MUTED_SATURATION=.4,d.prototype.TARGET_VIBRANT_SATURATION=1,d.prototype.MIN_VIBRANT_SATURATION=.35,d.prototype.WEIGHT_SATURATION=3,d.prototype.WEIGHT_LUMA=6,d.prototype.WEIGHT_POPULATION=1,d.prototype.VibrantSwatch=void 0,d.prototype.MutedSwatch=void 0,d.prototype.DarkVibrantSwatch=void 0,d.prototype.DarkMutedSwatch=void 0,d.prototype.LightVibrantSwatch=void 0,d.prototype.LightMutedSwatch=void 0,d.prototype.HighestPopulation=0,d.prototype.generateVarationColors=function(){return this.VibrantSwatch=this.findColorVariation(this.TARGET_NORMAL_LUMA,this.MIN_NORMAL_LUMA,this.MAX_NORMAL_LUMA,this.TARGET_VIBRANT_SATURATION,this.MIN_VIBRANT_SATURATION,1),this.LightVibrantSwatch=this.findColorVariation(this.TARGET_LIGHT_LUMA,this.MIN_LIGHT_LUMA,1,this.TARGET_VIBRANT_SATURATION,this.MIN_VIBRANT_SATURATION,1),this.DarkVibrantSwatch=this.findColorVariation(this.TARGET_DARK_LUMA,0,this.MAX_DARK_LUMA,this.TARGET_VIBRANT_SATURATION,this.MIN_VIBRANT_SATURATION,1),this.MutedSwatch=this.findColorVariation(this.TARGET_NORMAL_LUMA,this.MIN_NORMAL_LUMA,this.MAX_NORMAL_LUMA,this.TARGET_MUTED_SATURATION,0,this.MAX_MUTED_SATURATION),this.LightMutedSwatch=this.findColorVariation(this.TARGET_LIGHT_LUMA,this.MIN_LIGHT_LUMA,1,this.TARGET_MUTED_SATURATION,0,this.MAX_MUTED_SATURATION),this.DarkMutedSwatch=this.findColorVariation(this.TARGET_DARK_LUMA,0,this.MAX_DARK_LUMA,this.TARGET_MUTED_SATURATION,0,this.MAX_MUTED_SATURATION)},d.prototype.generateEmptySwatches=function(){var a;return void 0===this.VibrantSwatch&&void 0!==this.DarkVibrantSwatch&&(a=this.DarkVibrantSwatch.getHsl(),a[2]=this.TARGET_NORMAL_LUMA,this.VibrantSwatch=new c(d.hslToRgb(a[0],a[1],a[2]),0)),void 0===this.DarkVibrantSwatch&&void 0!==this.VibrantSwatch?(a=this.VibrantSwatch.getHsl(),a[2]=this.TARGET_DARK_LUMA,this.DarkVibrantSwatch=new c(d.hslToRgb(a[0],a[1],a[2]),0)):void 0},d.prototype.findMaxPopulation=function(){var a,b,c,d,e;for(c=0,d=this._swatches,a=0,b=d.length;b>a;a++)e=d[a],c=Math.max(c,e.getPopulation());return c},d.prototype.findColorVariation=function(a,b,c,d,e,f){var g,h,i,j,k,l,m,n,o;for(j=void 0,k=0,l=this._swatches,g=0,h=l.length;h>g;g++)n=l[g],m=n.getHsl()[1],i=n.getHsl()[2],m>=e&&f>=m&&i>=b&&c>=i&&!this.isAlreadySelected(n)&&(o=this.createComparisonValue(m,d,i,a,n.getPopulation(),this.HighestPopulation),(void 0===j||o>k)&&(j=n,k=o));return j},d.prototype.createComparisonValue=function(a,b,c,d,e,f){return this.weightedMean(this.invertDiff(a,b),this.WEIGHT_SATURATION,this.invertDiff(c,d),this.WEIGHT_LUMA,e/f,this.WEIGHT_POPULATION); -},d.prototype.invertDiff=function(a,b){return 1-Math.abs(a-b)},d.prototype.weightedMean=function(){var a,b,c,d,e,g;for(e=1<=arguments.length?f.call(arguments,0):[],b=0,c=0,a=0;a<e.length;)d=e[a],g=e[a+1],b+=d*g,c+=g,a+=2;return b/c},d.prototype.swatches=function(){return{Vibrant:this.VibrantSwatch,Muted:this.MutedSwatch,DarkVibrant:this.DarkVibrantSwatch,DarkMuted:this.DarkMutedSwatch,LightVibrant:this.LightVibrantSwatch,LightMuted:this.LightMuted}},d.prototype.isAlreadySelected=function(a){return this.VibrantSwatch===a||this.DarkVibrantSwatch===a||this.LightVibrantSwatch===a||this.MutedSwatch===a||this.DarkMutedSwatch===a||this.LightMutedSwatch===a},d.rgbToHsl=function(a,b,c){var d,e,f,g,h,i;if(a/=255,b/=255,c/=255,g=Math.max(a,b,c),h=Math.min(a,b,c),e=void 0,i=void 0,f=(g+h)/2,g===h)e=i=0;else{switch(d=g-h,i=f>.5?d/(2-g-h):d/(g+h),g){case a:e=(b-c)/d+(c>b?6:0);break;case b:e=(c-a)/d+2;break;case c:e=(a-b)/d+4}e/=6}return[e,i,f]},d.hslToRgb=function(a,b,c){var d,e,f,g,h,i;return i=void 0,e=void 0,d=void 0,f=function(a,b,c){return 0>c&&(c+=1),c>1&&(c-=1),1/6>c?a+6*(b-a)*c:.5>c?b:2/3>c?a+(b-a)*(2/3-c)*6:a},0===b?i=e=d=c:(h=.5>c?c*(1+b):c+b-c*b,g=2*c-h,i=f(g,h,a+1/3),e=f(g,h,a),d=f(g,h,a-1/3)),[255*i,255*e,255*d]},d}(),window.CanvasImage=b=function(){function a(a){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),document.body.appendChild(this.canvas),this.width=this.canvas.width=a.width,this.height=this.canvas.height=a.height,this.context.drawImage(a,0,0,this.width,this.height)}return a.prototype.clear=function(){return this.context.clearRect(0,0,this.width,this.height)},a.prototype.update=function(a){return this.context.putImageData(a,0,0)},a.prototype.getPixelCount=function(){return this.width*this.height},a.prototype.getImageData=function(){return this.context.getImageData(0,0,this.width,this.height)},a.prototype.removeCanvas=function(){return this.canvas.parentNode.removeChild(this.canvas)},a}()}).call(this)},{quantize:1}]},{},[2]),function(a,b){"use strict";function c(c,d){function e(a){return qa.preferFlash&&ja&&!qa.ignoreFlash&&qa.flash[a]!==b&&qa.flash[a]}function f(a){return function(b){var c,d=this._s;return d&&d._a?c=a.call(this,b):(d&&d.id?qa._wD(d.id+": Ignoring "+b.type):qa._wD(va+"Ignoring "+b.type),c=null),c}}this.setupOptions={url:c||null,flashVersion:8,debugMode:!0,debugFlash:!1,useConsole:!0,consoleOnly:!0,waitForWindowLoad:!1,bgColor:"#ffffff",useHighPerformance:!1,flashPollingInterval:null,html5PollingInterval:null,flashLoadTimeout:1e3,wmode:null,allowScriptAccess:"always",useFlashBlock:!1,useHTML5Audio:!0,html5Test:/^(probably|maybe)$/i,preferFlash:!1,noSWFCache:!1,idPrefix:"sound"},this.defaultOptions={autoLoad:!1,autoPlay:!1,from:null,loops:1,onid3:null,onload:null,whileloading:null,onplay:null,onpause:null,onresume:null,whileplaying:null,onposition:null,onstop:null,onfailure:null,onfinish:null,multiShot:!0,multiShotEvents:!1,position:null,pan:0,stream:!0,to:null,type:null,usePolicyFile:!1,volume:100},this.flash9Options={isMovieStar:null,usePeakData:!1,useWaveformData:!1,useEQData:!1,onbufferchange:null,ondataerror:null},this.movieStarOptions={bufferTime:3,serverURL:null,onconnect:null,duration:null},this.audioFormats={mp3:{type:['audio/mpeg; codecs="mp3"',"audio/mpeg","audio/mp3","audio/MPA","audio/mpa-robust"],required:!0},mp4:{related:["aac","m4a","m4b"],type:['audio/mp4; codecs="mp4a.40.2"',"audio/aac","audio/x-m4a","audio/MP4A-LATM","audio/mpeg4-generic"],required:!1},ogg:{type:["audio/ogg; codecs=vorbis"],required:!1},opus:{type:["audio/ogg; codecs=opus","audio/opus"],required:!1},wav:{type:['audio/wav; codecs="1"',"audio/wav","audio/wave","audio/x-wav"],required:!1}},this.movieID="sm2-container",this.id=d||"sm2movie",this.debugID="soundmanager-debug",this.debugURLParam=/([#?&])debug=1/i,this.versionNumber="V2.97a.20140901",this.version=null,this.movieURL=null,this.altURL=null,this.swfLoaded=!1,this.enabled=!1,this.oMC=null,this.sounds={},this.soundIDs=[],this.muted=!1,this.didFlashBlock=!1,this.filePattern=null,this.filePatterns={flash8:/\.mp3(\?.*)?$/i,flash9:/\.mp3(\?.*)?$/i},this.features={buffering:!1,peakData:!1,waveformData:!1,eqData:!1,movieStar:!1},this.sandbox={type:null,types:{remote:"remote (domain-based) rules",localWithFile:"local with file access (no internet access)",localWithNetwork:"local with network (internet access only, no local access)",localTrusted:"local, trusted (local+internet access)"},description:null,noRemote:null,noLocal:null},this.html5={usingFlash:null},this.flash={},this.html5Only=!1,this.ignoreFlash=!1;var g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,aa,ba,ca,da,ea,fa,ga,ha,ia,ja,ka,la,ma,na,oa,pa,qa=this,ra=null,sa=null,ta="soundManager",ua=ta+": ",va="HTML5::",wa=navigator.userAgent,xa=a.location.href.toString(),ya=document,za=[],Aa=!0,Ba=!1,Ca=!1,Da=!1,Ea=!1,Fa=!1,Ga=0,Ha=["log","info","warn","error"],Ia=8,Ja=null,Ka=null,La=!1,Ma=!1,Na=0,Oa=null,Pa=[],Qa=null,Ra=Array.prototype.slice,Sa=!1,Ta=0,Ua=wa.match(/(ipad|iphone|ipod)/i),Va=wa.match(/android/i),Wa=wa.match(/msie/i),Xa=wa.match(/webkit/i),Ya=wa.match(/safari/i)&&!wa.match(/chrome/i),Za=wa.match(/opera/i),$a=wa.match(/(mobile|pre\/|xoom)/i)||Ua||Va,_a=!xa.match(/usehtml5audio/i)&&!xa.match(/sm2\-ignorebadua/i)&&Ya&&!wa.match(/silk/i)&&wa.match(/OS X 10_6_([3-7])/i),ab=a.console!==b&&console.log!==b,bb=ya.hasFocus!==b?ya.hasFocus():null,cb=Ya&&(ya.hasFocus===b||!ya.hasFocus()),db=!cb,eb=/(mp3|mp4|mpa|m4a|m4b)/i,fb=1e3,gb="about:blank",hb="data:audio/wave;base64,/UklGRiYAAABXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAAZGF0YQIAAAD//w==",ib=ya.location?ya.location.protocol.match(/http/i):null,jb=ib?"":"http://",kb=/^\s*audio\/(?:x-)?(?:mpeg4|aac|flv|mov|mp4||m4v|m4a|m4b|mp4v|3gp|3g2)\s*(?:$|;)/i,lb=["mpeg4","aac","flv","mov","mp4","m4v","f4v","m4a","m4b","mp4v","3gp","3g2"],mb=new RegExp("\\.("+lb.join("|")+")(\\?.*)?$","i");this.mimePattern=/^\s*audio\/(?:x-)?(?:mp(?:eg|3))\s*(?:$|;)/i,this.useAltURL=!ib,R={swfBox:"sm2-object-box",swfDefault:"movieContainer",swfError:"swf_error",swfTimedout:"swf_timedout",swfLoaded:"swf_loaded",swfUnblocked:"swf_unblocked",sm2Debug:"sm2_debug",highPerf:"high_performance",flashDebug:"flash_debug"},this.hasHTML5=function(){try{return Audio!==b&&(Za&&opera!==b&&opera.version()<10?new Audio(null):new Audio).canPlayType!==b}catch(a){return!1}}(),this.setup=function(a){var c=!qa.url;return a!==b&&Da&&Qa&&qa.ok()&&(a.flashVersion!==b||a.url!==b||a.html5Test!==b)&&V(O("setupLate")),q(a),a&&(c&&F&&a.url!==b&&qa.beginDelayedInit(),F||a.url===b||"complete"!==ya.readyState||setTimeout(D,1)),qa},this.ok=function(){return Qa?Da&&!Ea:qa.useHTML5Audio&&qa.hasHTML5},this.supported=this.ok,this.getMovie=function(b){return h(b)||ya[b]||a[b]},this.createSound=function(a,c){function d(){return h=T(h),qa.sounds[h.id]=new g(h),qa.soundIDs.push(h.id),qa.sounds[h.id]}var e,f,h,i=null;if(e=ta+".createSound(): ",f=e+O(Da?"notOK":"notReady"),!Da||!qa.ok())return V(f),!1;if(c!==b&&(a={id:a,url:c}),h=p(a),h.url=$(h.url),void 0===h.id&&(h.id=qa.setupOptions.idPrefix+Ta++),h.id.toString().charAt(0).match(/^[0-9]$/)&&qa._wD(e+O("badID",h.id),2),qa._wD(e+h.id+(h.url?" ("+h.url+")":""),1),W(h.id,!0))return qa._wD(e+h.id+" exists",1),qa.sounds[h.id];if(ba(h))i=d(),qa._wD(h.id+": Using HTML5"),i._setup_html5(h);else{if(qa.html5Only)return qa._wD(h.id+": No HTML5 support for this sound, and no Flash. Exiting."),d();if(qa.html5.usingFlash&&h.url&&h.url.match(/data\:/i))return qa._wD(h.id+": data: URIs not supported via Flash. Exiting."),d();l>8&&(null===h.isMovieStar&&(h.isMovieStar=!!(h.serverURL||(h.type?h.type.match(kb):!1)||h.url&&h.url.match(mb))),h.isMovieStar&&(qa._wD(e+"using MovieStar handling"),h.loops>1&&n("noNSLoop"))),h=U(h,e),i=d(),8===l?sa._createSound(h.id,h.loops||1,h.usePolicyFile):(sa._createSound(h.id,h.url,h.usePeakData,h.useWaveformData,h.useEQData,h.isMovieStar,h.isMovieStar?h.bufferTime:!1,h.loops||1,h.serverURL,h.duration||null,h.autoPlay,!0,h.autoLoad,h.usePolicyFile),h.serverURL||(i.connected=!0,h.onconnect&&h.onconnect.apply(i))),h.serverURL||!h.autoLoad&&!h.autoPlay||i.load(h)}return!h.serverURL&&h.autoPlay&&i.play(),i},this.destroySound=function(a,b){if(!W(a))return!1;var c,d=qa.sounds[a];for(d._iO={},d.stop(),d.unload(),c=0;c<qa.soundIDs.length;c++)if(qa.soundIDs[c]===a){qa.soundIDs.splice(c,1);break}return b||d.destruct(!0),d=null,delete qa.sounds[a],!0},this.load=function(a,b){return W(a)?qa.sounds[a].load(b):!1},this.unload=function(a){return W(a)?qa.sounds[a].unload():!1},this.onPosition=function(a,b,c,d){return W(a)?qa.sounds[a].onposition(b,c,d):!1},this.onposition=this.onPosition,this.clearOnPosition=function(a,b,c){return W(a)?qa.sounds[a].clearOnPosition(b,c):!1},this.play=function(a,b){var c=null,d=b&&!(b instanceof Object);if(!Da||!qa.ok())return V(ta+".play(): "+O(Da?"notOK":"notReady")),!1;if(W(a,d))d&&(b={url:b});else{if(!d)return!1;d&&(b={url:b}),b&&b.url&&(qa._wD(ta+'.play(): Attempting to create "'+a+'"',1),b.id=a,c=qa.createSound(b).play())}return null===c&&(c=qa.sounds[a].play(b)),c},this.start=this.play,this.setPosition=function(a,b){return W(a)?qa.sounds[a].setPosition(b):!1},this.stop=function(a){return W(a)?(qa._wD(ta+".stop("+a+")",1),qa.sounds[a].stop()):!1},this.stopAll=function(){var a;qa._wD(ta+".stopAll()",1);for(a in qa.sounds)qa.sounds.hasOwnProperty(a)&&qa.sounds[a].stop()},this.pause=function(a){return W(a)?qa.sounds[a].pause():!1},this.pauseAll=function(){var a;for(a=qa.soundIDs.length-1;a>=0;a--)qa.sounds[qa.soundIDs[a]].pause()},this.resume=function(a){return W(a)?qa.sounds[a].resume():!1},this.resumeAll=function(){var a;for(a=qa.soundIDs.length-1;a>=0;a--)qa.sounds[qa.soundIDs[a]].resume()},this.togglePause=function(a){return W(a)?qa.sounds[a].togglePause():!1},this.setPan=function(a,b){return W(a)?qa.sounds[a].setPan(b):!1},this.setVolume=function(a,b){return W(a)?qa.sounds[a].setVolume(b):!1},this.mute=function(a){var b=0;if(a instanceof String&&(a=null),a)return W(a)?(qa._wD(ta+'.mute(): Muting "'+a+'"'),qa.sounds[a].mute()):!1;for(qa._wD(ta+".mute(): Muting all sounds"),b=qa.soundIDs.length-1;b>=0;b--)qa.sounds[qa.soundIDs[b]].mute();return qa.muted=!0,!0},this.muteAll=function(){qa.mute()},this.unmute=function(a){var b;if(a instanceof String&&(a=null),a)return W(a)?(qa._wD(ta+'.unmute(): Unmuting "'+a+'"'),qa.sounds[a].unmute()):!1;for(qa._wD(ta+".unmute(): Unmuting all sounds"),b=qa.soundIDs.length-1;b>=0;b--)qa.sounds[qa.soundIDs[b]].unmute();return qa.muted=!1,!0},this.unmuteAll=function(){qa.unmute()},this.toggleMute=function(a){return W(a)?qa.sounds[a].toggleMute():!1},this.getMemoryUse=function(){var a=0;return sa&&8!==l&&(a=parseInt(sa._getMemoryUse(),10)),a},this.disable=function(c){var d;if(c===b&&(c=!1),Ea)return!1;for(Ea=!0,n("shutdown",1),d=qa.soundIDs.length-1;d>=0;d--)L(qa.sounds[qa.soundIDs[d]]);return o(c),ha.remove(a,"load",u),!0},this.canPlayMIME=function(a){var b;return qa.hasHTML5&&(b=ca({type:a})),!b&&Qa&&(b=a&&qa.ok()?!!((l>8?a.match(kb):null)||a.match(qa.mimePattern)):null),b},this.canPlayURL=function(a){var b;return qa.hasHTML5&&(b=ca({url:a})),!b&&Qa&&(b=a&&qa.ok()?!!a.match(qa.filePattern):null),b},this.canPlayLink=function(a){return a.type!==b&&a.type&&qa.canPlayMIME(a.type)?!0:qa.canPlayURL(a.href)},this.getSoundById=function(a,b){if(!a)return null;var c=qa.sounds[a];return c||b||qa._wD(ta+'.getSoundById(): Sound "'+a+'" not found.',2),c},this.onready=function(b,c){var d="onready",e=!1;if("function"!=typeof b)throw O("needFunction",d);return Da&&qa._wD(O("queue",d)),c||(c=a),s(d,b,c),t(),e=!0,e},this.ontimeout=function(b,c){var d="ontimeout",e=!1;if("function"!=typeof b)throw O("needFunction",d);return Da&&qa._wD(O("queue",d)),c||(c=a),s(d,b,c),t({type:d}),e=!0,e},this._writeDebug=function(a,c){var d,e,f="soundmanager-debug";return qa.debugMode?ab&&qa.useConsole&&(c&&"object"==typeof c?console.log(a,c):Ha[c]!==b?console[Ha[c]](a):console.log(a),qa.consoleOnly)?!0:(d=h(f))?(e=ya.createElement("div"),++Ga%2===0&&(e.className="sm2-alt"),c=c===b?0:parseInt(c,10),e.appendChild(ya.createTextNode(a)),c&&(c>=2&&(e.style.fontWeight="bold"),3===c&&(e.style.color="#ff3333")),d.insertBefore(e,d.firstChild),d=null,!0):!1:!1},-1!==xa.indexOf("sm2-debug=alert")&&(this._writeDebug=function(b){a.alert(b)}),this._wD=this._writeDebug,this._debug=function(){var a,b;for(n("currentObj",1),a=0,b=qa.soundIDs.length;b>a;a++)qa.sounds[qa.soundIDs[a]]._debug()},this.reboot=function(b,c){qa.soundIDs.length&&qa._wD("Destroying "+qa.soundIDs.length+" SMSound object"+(1!==qa.soundIDs.length?"s":"")+"...");var d,e,f;for(d=qa.soundIDs.length-1;d>=0;d--)qa.sounds[qa.soundIDs[d]].destruct();if(sa)try{Wa&&(Ka=sa.innerHTML),Ja=sa.parentNode.removeChild(sa)}catch(g){n("badRemove",2)}if(Ka=Ja=Qa=sa=null,qa.enabled=F=Da=La=Ma=Ba=Ca=Ea=Sa=qa.swfLoaded=!1,qa.soundIDs=[],qa.sounds={},Ta=0,b)za=[];else for(d in za)if(za.hasOwnProperty(d))for(e=0,f=za[d].length;f>e;e++)za[d][e].fired=!1;return c||qa._wD(ta+": Rebooting..."),qa.html5={usingFlash:null},qa.flash={},qa.html5Only=!1,qa.ignoreFlash=!1,a.setTimeout(function(){C(),c||qa.beginDelayedInit()},20),qa},this.reset=function(){return n("reset"),qa.reboot(!0,!0)},this.getMoviePercent=function(){return sa&&"PercentLoaded"in sa?sa.PercentLoaded():null},this.beginDelayedInit=function(){Fa=!0,D(),setTimeout(function(){return Ma?!1:(H(),B(),Ma=!0,!0)},20),v()},this.destruct=function(){qa._wD(ta+".destruct()"),qa.disable(!0)},g=function(a){var c,d,e,f,g,h,i,j,k,o,q=this,r=!1,s=[],t=0,u=null;k={duration:null,time:null},this.id=a.id,this.sID=this.id,this.url=a.url,this.options=p(a),this.instanceOptions=this.options,this._iO=this.instanceOptions,this.pan=this.options.pan,this.volume=this.options.volume,this.isHTML5=!1,this._a=null,o=this.url?!1:!0,this.id3={},this._debug=function(){qa._wD(q.id+": Merged options:",q.options)},this.load=function(a){var c,d=null;if(a!==b?q._iO=p(a,q.options):(a=q.options,q._iO=a,u&&u!==q.url&&(n("manURL"),q._iO.url=q.url,q.url=null)),q._iO.url||(q._iO.url=q.url),q._iO.url=$(q._iO.url),q.instanceOptions=q._iO,c=q._iO,qa._wD(q.id+": load ("+c.url+")"),!c.url&&!q.url)return qa._wD(q.id+": load(): url is unassigned. Exiting.",2),q;if(q.isHTML5||8!==l||q.url||c.autoPlay||qa._wD(q.id+": Flash 8 load() limitation: Wait for onload() before calling play().",1),c.url===q.url&&0!==q.readyState&&2!==q.readyState)return n("onURL",1),3===q.readyState&&c.onload&&pa(q,function(){c.onload.apply(q,[!!q.duration])}),q;if(q.loaded=!1,q.readyState=1,q.playState=0,q.id3={},ba(c))d=q._setup_html5(c),d._called_load?qa._wD(q.id+": Ignoring request to load again"):(q._html5_canplay=!1,q.url!==c.url&&(qa._wD(n("manURL")+": "+c.url),q._a.src=c.url,q.setPosition(0)),q._a.autobuffer="auto",q._a.preload="auto",q._a._called_load=!0);else{if(qa.html5Only)return qa._wD(q.id+": No flash support. Exiting."),q;if(q._iO.url&&q._iO.url.match(/data\:/i))return qa._wD(q.id+": data: URIs not supported via Flash. Exiting."),q;try{q.isHTML5=!1,q._iO=U(T(c)),q._iO.autoPlay&&(q._iO.position||q._iO.from)&&(qa._wD(q.id+": Disabling autoPlay because of non-zero offset case"),q._iO.autoPlay=!1),c=q._iO,8===l?sa._load(q.id,c.url,c.stream,c.autoPlay,c.usePolicyFile):sa._load(q.id,c.url,!!c.stream,!!c.autoPlay,c.loops||1,!!c.autoLoad,c.usePolicyFile)}catch(e){n("smError",2),m("onload",!1),I({type:"SMSOUND_LOAD_JS_EXCEPTION",fatal:!0})}}return q.url=c.url,q},this.unload=function(){return 0!==q.readyState&&(qa._wD(q.id+": unload()"),q.isHTML5?(f(),q._a&&(q._a.pause(),u=ea(q._a))):8===l?sa._unload(q.id,gb):sa._unload(q.id),c()),q},this.destruct=function(a){qa._wD(q.id+": Destruct"),q.isHTML5?(f(),q._a&&(q._a.pause(),ea(q._a),Sa||e(),q._a._s=null,q._a=null)):(q._iO.onfailure=null,sa._destroySound(q.id)),a||qa.destroySound(q.id,!0)},this.play=function(a,c){var d,e,f,i,k,m,n,s=!0,t=null;if(d=q.id+": play(): ",c=c===b?!0:c,a||(a={}),q.url&&(q._iO.url=q.url),q._iO=p(q._iO,q.options),q._iO=p(a,q._iO),q._iO.url=$(q._iO.url),q.instanceOptions=q._iO,!q.isHTML5&&q._iO.serverURL&&!q.connected)return q.getAutoPlay()||(qa._wD(d+" Netstream not connected yet - setting autoPlay"),q.setAutoPlay(!0)),q;if(ba(q._iO)&&(q._setup_html5(q._iO),g()),1!==q.playState||q.paused||(e=q._iO.multiShot,e?qa._wD(d+"Already playing (multi-shot)",1):(qa._wD(d+"Already playing (one-shot)",1),q.isHTML5&&q.setPosition(q._iO.position),t=q)),null!==t)return t;if(a.url&&a.url!==q.url&&(q.readyState||q.isHTML5||8!==l||!o?q.load(q._iO):o=!1),q.loaded?qa._wD(d.substr(0,d.lastIndexOf(":"))):0===q.readyState?(qa._wD(d+"Attempting to load"),q.isHTML5||qa.html5Only?q.isHTML5?q.load(q._iO):(qa._wD(d+"Unsupported type. Exiting."),t=q):(q._iO.autoPlay=!0,q.load(q._iO)),q.instanceOptions=q._iO):2===q.readyState?(qa._wD(d+"Could not load - exiting",2),t=q):qa._wD(d+"Loading - attempting to play..."),null!==t)return t;if(!q.isHTML5&&9===l&&q.position>0&&q.position===q.duration&&(qa._wD(d+"Sound at end, resetting to position:0"),a.position=0),q.paused&&q.position>=0&&(!q._iO.serverURL||q.position>0))qa._wD(d+"Resuming from paused state",1),q.resume();else{if(q._iO=p(a,q._iO),(!q.isHTML5&&null!==q._iO.position&&q._iO.position>0||null!==q._iO.from&&q._iO.from>0||null!==q._iO.to)&&0===q.instanceCount&&0===q.playState&&!q._iO.serverURL){if(i=function(){q._iO=p(a,q._iO),q.play(q._iO)},q.isHTML5&&!q._html5_canplay?(qa._wD(d+"Beginning load for non-zero offset case"),q.load({_oncanplay:i}),t=!1):q.isHTML5||q.loaded||q.readyState&&2===q.readyState||(qa._wD(d+"Preloading for non-zero offset case"),q.load({onload:i}),t=!1),null!==t)return t;q._iO=j()}(!q.instanceCount||q._iO.multiShotEvents||q.isHTML5&&q._iO.multiShot&&!Sa||!q.isHTML5&&l>8&&!q.getAutoPlay())&&q.instanceCount++,q._iO.onposition&&0===q.playState&&h(q),q.playState=1,q.paused=!1,q.position=q._iO.position===b||isNaN(q._iO.position)?0:q._iO.position,q.isHTML5||(q._iO=U(T(q._iO))),q._iO.onplay&&c&&(q._iO.onplay.apply(q),r=!0),q.setVolume(q._iO.volume,!0),q.setPan(q._iO.pan,!0),q.isHTML5?q.instanceCount<2?(g(),f=q._setup_html5(),q.setPosition(q._iO.position),f.play()):(qa._wD(q.id+": Cloning Audio() for instance #"+q.instanceCount+"..."),k=new Audio(q._iO.url),m=function(){ha.remove(k,"ended",m),q._onfinish(q),ea(k),k=null},n=function(){ha.remove(k,"canplay",n);try{k.currentTime=q._iO.position/fb}catch(a){V(q.id+": multiShot play() failed to apply position of "+q._iO.position/fb)}k.play()},ha.add(k,"ended",m),void 0!==q._iO.volume&&(k.volume=Math.max(0,Math.min(1,q._iO.volume/100))),q.muted&&(k.muted=!0),q._iO.position?ha.add(k,"canplay",n):k.play()):(s=sa._start(q.id,q._iO.loops||1,9===l?q.position:q.position/fb,q._iO.multiShot||!1),9!==l||s||(qa._wD(d+"No sound hardware, or 32-sound ceiling hit",2),q._iO.onplayerror&&q._iO.onplayerror.apply(q)))}return q},this.start=this.play,this.stop=function(a){var b,c=q._iO;return 1===q.playState&&(qa._wD(q.id+": stop()"),q._onbufferchange(0),q._resetOnPosition(0),q.paused=!1,q.isHTML5||(q.playState=0),i(),c.to&&q.clearOnPosition(c.to),q.isHTML5?q._a&&(b=q.position,q.setPosition(0),q.position=b,q._a.pause(),q.playState=0,q._onTimer(),f()):(sa._stop(q.id,a),c.serverURL&&q.unload()),q.instanceCount=0,q._iO={},c.onstop&&c.onstop.apply(q)),q},this.setAutoPlay=function(a){qa._wD(q.id+": Autoplay turned "+(a?"on":"off")),q._iO.autoPlay=a,q.isHTML5||(sa._setAutoPlay(q.id,a),a&&(q.instanceCount||1!==q.readyState||(q.instanceCount++,qa._wD(q.id+": Incremented instance count to "+q.instanceCount))))},this.getAutoPlay=function(){return q._iO.autoPlay},this.setPosition=function(a){a===b&&(a=0);var c,d,e=q.isHTML5?Math.max(a,0):Math.min(q.duration||q._iO.duration,Math.max(a,0));if(q.position=e,d=q.position/fb,q._resetOnPosition(q.position),q._iO.position=e,q.isHTML5){if(q._a){if(q._html5_canplay){if(q._a.currentTime!==d){qa._wD(q.id+": setPosition("+d+")");try{q._a.currentTime=d,(0===q.playState||q.paused)&&q._a.pause()}catch(f){qa._wD(q.id+": setPosition("+d+") failed: "+f.message,2)}}}else if(d)return qa._wD(q.id+": setPosition("+d+"): Cannot seek yet, sound not ready",2),q;q.paused&&q._onTimer(!0)}}else c=9===l?q.position:d,q.readyState&&2!==q.readyState&&sa._setPosition(q.id,c,q.paused||!q.playState,q._iO.multiShot);return q},this.pause=function(a){return q.paused||0===q.playState&&1!==q.readyState?q:(qa._wD(q.id+": pause()"),q.paused=!0,q.isHTML5?(q._setup_html5().pause(),f()):(a||a===b)&&sa._pause(q.id,q._iO.multiShot),q._iO.onpause&&q._iO.onpause.apply(q),q)},this.resume=function(){var a=q._iO;return q.paused?(qa._wD(q.id+": resume()"),q.paused=!1,q.playState=1,q.isHTML5?(q._setup_html5().play(),g()):(a.isMovieStar&&!a.serverURL&&q.setPosition(q.position),sa._pause(q.id,a.multiShot)),!r&&a.onplay?(a.onplay.apply(q),r=!0):a.onresume&&a.onresume.apply(q),q):q},this.togglePause=function(){return qa._wD(q.id+": togglePause()"),0===q.playState?(q.play({position:9!==l||q.isHTML5?q.position/fb:q.position}),q):(q.paused?q.resume():q.pause(),q)},this.setPan=function(a,c){return a===b&&(a=0),c===b&&(c=!1),q.isHTML5||sa._setPan(q.id,a),q._iO.pan=a,c||(q.pan=a,q.options.pan=a),q},this.setVolume=function(a,c){return a===b&&(a=100),c===b&&(c=!1),q.isHTML5?q._a&&(qa.muted&&!q.muted&&(q.muted=!0,q._a.muted=!0),q._a.volume=Math.max(0,Math.min(1,a/100))):sa._setVolume(q.id,qa.muted&&!q.muted||q.muted?0:a),q._iO.volume=a,c||(q.volume=a,q.options.volume=a),q},this.mute=function(){return q.muted=!0,q.isHTML5?q._a&&(q._a.muted=!0):sa._setVolume(q.id,0),q},this.unmute=function(){q.muted=!1;var a=q._iO.volume!==b;return q.isHTML5?q._a&&(q._a.muted=!1):sa._setVolume(q.id,a?q._iO.volume:q.options.volume),q},this.toggleMute=function(){return q.muted?q.unmute():q.mute()},this.onPosition=function(a,c,d){return s.push({position:parseInt(a,10),method:c,scope:d!==b?d:q,fired:!1}),q},this.onposition=this.onPosition,this.clearOnPosition=function(a,b){var c;if(a=parseInt(a,10),isNaN(a))return!1;for(c=0;c<s.length;c++)a===s[c].position&&(b&&b!==s[c].method||(s[c].fired&&t--,s.splice(c,1)))},this._processOnPosition=function(){var a,b,c=s.length;if(!c||!q.playState||t>=c)return!1;for(a=c-1;a>=0;a--)b=s[a],!b.fired&&q.position>=b.position&&(b.fired=!0,t++,b.method.apply(b.scope,[b.position]),c=s.length);return!0},this._resetOnPosition=function(a){var b,c,d=s.length;if(!d)return!1;for(b=d-1;b>=0;b--)c=s[b],c.fired&&a<=c.position&&(c.fired=!1,t--);return!0},j=function(){var a,b,c=q._iO,d=c.from,e=c.to;return b=function(){qa._wD(q.id+': "To" time of '+e+" reached."),q.clearOnPosition(e,b),q.stop()},a=function(){qa._wD(q.id+': Playing "from" '+d),null===e||isNaN(e)||q.onPosition(e,b)},null===d||isNaN(d)||(c.position=d,c.multiShot=!1,a()),c},h=function(){var a,b=q._iO.onposition;if(b)for(a in b)b.hasOwnProperty(a)&&q.onPosition(parseInt(a,10),b[a])},i=function(){var a,b=q._iO.onposition;if(b)for(a in b)b.hasOwnProperty(a)&&q.clearOnPosition(parseInt(a,10))},g=function(){q.isHTML5&&X(q)},f=function(){q.isHTML5&&Y(q)},c=function(a){a||(s=[],t=0),r=!1,q._hasTimer=null,q._a=null,q._html5_canplay=!1,q.bytesLoaded=null,q.bytesTotal=null,q.duration=q._iO&&q._iO.duration?q._iO.duration:null,q.durationEstimate=null,q.buffered=[],q.eqData=[],q.eqData.left=[],q.eqData.right=[],q.failures=0,q.isBuffering=!1,q.instanceOptions={},q.instanceCount=0,q.loaded=!1,q.metadata={},q.readyState=0,q.muted=!1,q.paused=!1,q.peakData={left:0,right:0},q.waveformData={left:[],right:[]},q.playState=0,q.position=null,q.id3={}},c(),this._onTimer=function(a){var b,c,d=!1,e={};return q._hasTimer||a?(q._a&&(a||(q.playState>0||1===q.readyState)&&!q.paused)&&(b=q._get_html5_duration(),b!==k.duration&&(k.duration=b,q.duration=b,d=!0),q.durationEstimate=q.duration,c=q._a.currentTime*fb||0,c!==k.time&&(k.time=c,d=!0),(d||a)&&q._whileplaying(c,e,e,e,e)),d):void 0},this._get_html5_duration=function(){var a=q._iO,b=q._a&&q._a.duration?q._a.duration*fb:a&&a.duration?a.duration:null,c=b&&!isNaN(b)&&b!==1/0?b:null;return c},this._apply_loop=function(a,b){!a.loop&&b>1&&qa._wD("Note: Native HTML5 looping is infinite.",1),a.loop=b>1?"loop":""},this._setup_html5=function(a){var b,e=p(q._iO,a),f=Sa?ra:q._a,g=decodeURI(e.url);if(Sa?g===decodeURI(ia)&&(b=!0):g===decodeURI(u)&&(b=!0),f){if(f._s)if(Sa)f._s&&f._s.playState&&!b&&f._s.stop();else if(!Sa&&g===decodeURI(u))return q._apply_loop(f,e.loops),f;b||(u&&c(!1),f.src=e.url,q.url=e.url,u=e.url,ia=e.url,f._called_load=!1)}else e.autoLoad||e.autoPlay?(q._a=new Audio(e.url),q._a.load()):q._a=Za&&opera.version()<10?new Audio(null):new Audio,f=q._a,f._called_load=!1,Sa&&(ra=f);return q.isHTML5=!0,q._a=f,f._s=q,d(),q._apply_loop(f,e.loops),e.autoLoad||e.autoPlay?q.load():(f.autobuffer=!1,f.preload="auto"),f},d=function(){function a(a,b,c){return q._a?q._a.addEventListener(a,b,c||!1):null}if(q._a._added_events)return!1;var b;q._a._added_events=!0;for(b in ma)ma.hasOwnProperty(b)&&a(b,ma[b]);return!0},e=function(){function a(a,b,c){return q._a?q._a.removeEventListener(a,b,c||!1):null}var b;qa._wD(q.id+": Removing event listeners"),q._a._added_events=!1;for(b in ma)ma.hasOwnProperty(b)&&a(b,ma[b])},this._onload=function(a){var b,c=!!a||!q.isHTML5&&8===l&&q.duration;return b=q.id+": ",qa._wD(b+(c?"onload()":"Failed to load / invalid sound?"+(q.duration?" -":" Zero-length duration reported.")+" ("+q.url+")"),c?1:2),c||q.isHTML5||(qa.sandbox.noRemote===!0&&qa._wD(b+O("noNet"),1),qa.sandbox.noLocal===!0&&qa._wD(b+O("noLocal"),1)),q.loaded=c,q.readyState=c?3:2,q._onbufferchange(0),q._iO.onload&&pa(q,function(){q._iO.onload.apply(q,[c])}),!0},this._onbufferchange=function(a){return 0===q.playState?!1:a&&q.isBuffering||!a&&!q.isBuffering?!1:(q.isBuffering=1===a,q._iO.onbufferchange&&(qa._wD(q.id+": Buffer state change: "+a),q._iO.onbufferchange.apply(q,[a])),!0)},this._onsuspend=function(){return q._iO.onsuspend&&(qa._wD(q.id+": Playback suspended"),q._iO.onsuspend.apply(q)),!0},this._onfailure=function(a,b,c){q.failures++,qa._wD(q.id+": Failure ("+q.failures+"): "+a),q._iO.onfailure&&1===q.failures?q._iO.onfailure(a,b,c):qa._wD(q.id+": Ignoring failure")},this._onwarning=function(a,b,c){q._iO.onwarning&&q._iO.onwarning(a,b,c)},this._onfinish=function(){var a=q._iO.onfinish;q._onbufferchange(0),q._resetOnPosition(0),q.instanceCount&&(q.instanceCount--,q.instanceCount||(i(),q.playState=0,q.paused=!1,q.instanceCount=0,q.instanceOptions={},q._iO={},f(),q.isHTML5&&(q.position=0)),(!q.instanceCount||q._iO.multiShotEvents)&&a&&(qa._wD(q.id+": onfinish()"),pa(q,function(){a.apply(q)})))},this._whileloading=function(a,b,c,d){var e=q._iO;q.bytesLoaded=a,q.bytesTotal=b,q.duration=Math.floor(c),q.bufferLength=d,q.isHTML5||e.isMovieStar?q.durationEstimate=q.duration:e.duration?q.durationEstimate=q.duration>e.duration?q.duration:e.duration:q.durationEstimate=parseInt(q.bytesTotal/q.bytesLoaded*q.duration,10),q.isHTML5||(q.buffered=[{start:0,end:q.duration}]),(3!==q.readyState||q.isHTML5)&&e.whileloading&&e.whileloading.apply(q)},this._whileplaying=function(a,c,d,e,f){var g,h=q._iO;return isNaN(a)||null===a?!1:(q.position=Math.max(0,a),q._processOnPosition(),!q.isHTML5&&l>8&&(h.usePeakData&&c!==b&&c&&(q.peakData={left:c.leftPeak,right:c.rightPeak}),h.useWaveformData&&d!==b&&d&&(q.waveformData={left:d.split(","),right:e.split(",")}),h.useEQData&&f!==b&&f&&f.leftEQ&&(g=f.leftEQ.split(","),q.eqData=g,q.eqData.left=g,f.rightEQ!==b&&f.rightEQ&&(q.eqData.right=f.rightEQ.split(",")))),1===q.playState&&(q.isHTML5||8!==l||q.position||!q.isBuffering||q._onbufferchange(0),h.whileplaying&&h.whileplaying.apply(q)),!0)},this._oncaptiondata=function(a){qa._wD(q.id+": Caption data received."),q.captiondata=a,q._iO.oncaptiondata&&q._iO.oncaptiondata.apply(q,[a])},this._onmetadata=function(a,b){qa._wD(q.id+": Metadata received.");var c,d,e={};for(c=0,d=a.length;d>c;c++)e[a[c]]=b[c];q.metadata=e,console.log("updated metadata",q.metadata),q._iO.onmetadata&&q._iO.onmetadata.call(q,q.metadata)},this._onid3=function(a,b){qa._wD(q.id+": ID3 data received.");var c,d,e=[];for(c=0,d=a.length;d>c;c++)e[a[c]]=b[c];q.id3=p(q.id3,e),q._iO.onid3&&q._iO.onid3.apply(q)},this._onconnect=function(a){a=1===a,qa._wD(q.id+": "+(a?"Connected.":"Failed to connect? - "+q.url),a?1:2),q.connected=a,a&&(q.failures=0,W(q.id)&&(q.getAutoPlay()?q.play(b,q.getAutoPlay()):q._iO.autoLoad&&q.load()),q._iO.onconnect&&q._iO.onconnect.apply(q,[a]))},this._ondataerror=function(a){q.playState>0&&(qa._wD(q.id+": Data error: "+a),q._iO.ondataerror&&q._iO.ondataerror.apply(q))},this._debug()},G=function(){return ya.body||ya.getElementsByTagName("div")[0]},h=function(a){return ya.getElementById(a)},p=function(a,c){var d,e,f=a||{};d=c===b?qa.defaultOptions:c;for(e in d)d.hasOwnProperty(e)&&f[e]===b&&("object"!=typeof d[e]||null===d[e]?f[e]=d[e]:f[e]=p(f[e],d[e]));return f},pa=function(b,c){b.isHTML5||8!==l?c():a.setTimeout(c,0)},r={onready:1,ontimeout:1,defaultOptions:1,flash9Options:1,movieStarOptions:1},q=function(a,c){var d,e=!0,f=c!==b,g=qa.setupOptions,h=r;if(a===b){e=[];for(d in g)g.hasOwnProperty(d)&&e.push(d);for(d in h)h.hasOwnProperty(d)&&("object"==typeof qa[d]?e.push(d+": {...}"):qa[d]instanceof Function?e.push(d+": function() {...}"):e.push(d));return qa._wD(O("setup",e.join(", "))),!1}for(d in a)if(a.hasOwnProperty(d))if("object"!=typeof a[d]||null===a[d]||a[d]instanceof Array||a[d]instanceof RegExp)f&&h[c]!==b?qa[c][d]=a[d]:g[d]!==b?(qa.setupOptions[d]=a[d],qa[d]=a[d]):h[d]===b?(V(O(qa[d]===b?"setupUndef":"setupError",d),2),e=!1):qa[d]instanceof Function?qa[d].apply(qa,a[d]instanceof Array?a[d]:[a[d]]):qa[d]=a[d];else{if(h[d]!==b)return q(a[d],d);V(O(qa[d]===b?"setupUndef":"setupError",d),2),e=!1}return e},ha=function(){function b(a){var b=Ra.call(a),c=b.length;return f?(b[1]="on"+b[1],c>3&&b.pop()):3===c&&b.push(!1),b}function c(a,b){var c=a.shift(),d=[g[b]];f?c[d](a[0],a[1]):c[d].apply(c,a)}function d(){c(b(arguments),"add")}function e(){c(b(arguments),"remove")}var f=a.attachEvent,g={add:f?"attachEvent":"addEventListener",remove:f?"detachEvent":"removeEventListener"};return{add:d,remove:e}}(),ma={abort:f(function(){qa._wD(this._s.id+": abort")}),canplay:f(function(){var a,c=this._s;if(c._html5_canplay)return!0;if(c._html5_canplay=!0,qa._wD(c.id+": canplay"),c._onbufferchange(0),a=c._iO.position===b||isNaN(c._iO.position)?null:c._iO.position/fb,this.currentTime!==a){qa._wD(c.id+": canplay: Setting position to "+a);try{this.currentTime=a}catch(d){qa._wD(c.id+": canplay: Setting position of "+a+" failed: "+d.message,2)}}c._iO._oncanplay&&c._iO._oncanplay()}),canplaythrough:f(function(){var a=this._s;a.loaded||(a._onbufferchange(0),a._whileloading(a.bytesLoaded,a.bytesTotal,a._get_html5_duration()),a._onload(!0))}),durationchange:f(function(){var a,b=this._s;a=b._get_html5_duration(),isNaN(a)||a===b.duration||(qa._wD(this._s.id+": durationchange ("+a+")"+(b.duration?", previously "+b.duration:"")),b.durationEstimate=b.duration=a)}),ended:f(function(){var a=this._s;qa._wD(a.id+": ended"),a._onfinish()}),error:f(function(){qa._wD(this._s.id+": HTML5 error, code "+this.error.code),this._s._onload(!1)}),loadeddata:f(function(){var a=this._s;qa._wD(a.id+": loadeddata"),a._loaded||Ya||(a.duration=a._get_html5_duration())}),loadedmetadata:f(function(){qa._wD(this._s.id+": loadedmetadata")}),loadstart:f(function(){qa._wD(this._s.id+": loadstart"),this._s._onbufferchange(1)}),play:f(function(){this._s._onbufferchange(0)}),playing:f(function(){qa._wD(this._s.id+": playing "+String.fromCharCode(9835)),this._s._onbufferchange(0)}),progress:f(function(a){var b,c,d,e=this._s,f=0,g="progress"===a.type,h=a.target.buffered,i=a.loaded||0,j=a.total||1;if(e.buffered=[],h&&h.length){for(b=0,c=h.length;c>b;b++)e.buffered.push({start:h.start(b)*fb,end:h.end(b)*fb});if(f=(h.end(0)-h.start(0))*fb,i=Math.min(1,f/(a.target.duration*fb)),g&&h.length>1){for(d=[],c=h.length,b=0;c>b;b++)d.push(a.target.buffered.start(b)*fb+"-"+a.target.buffered.end(b)*fb);qa._wD(this._s.id+": progress, timeRanges: "+d.join(", "))}g&&!isNaN(i)&&qa._wD(this._s.id+": progress, "+Math.floor(100*i)+"% loaded")}isNaN(i)||(e._whileloading(i,j,e._get_html5_duration()), -i&&j&&i===j&&ma.canplaythrough.call(this,a))}),ratechange:f(function(){qa._wD(this._s.id+": ratechange")}),suspend:f(function(a){var b=this._s;qa._wD(this._s.id+": suspend"),ma.progress.call(this,a),b._onsuspend()}),stalled:f(function(){qa._wD(this._s.id+": stalled")}),timeupdate:f(function(){this._s._onTimer()}),waiting:f(function(){var a=this._s;qa._wD(this._s.id+": waiting"),a._onbufferchange(1)})},ba=function(a){var b;return b=a&&(a.type||a.url||a.serverURL)?a.serverURL||a.type&&e(a.type)?!1:a.type?ca({type:a.type}):ca({url:a.url})||qa.html5Only||a.url.match(/data\:/i):!1},ea=function(a){var b;return a&&(b=Ya?gb:qa.html5.canPlayType("audio/wav")?hb:gb,a.src=b,void 0!==a._called_unload&&(a._called_load=!1)),Sa&&(ia=null),b},ca=function(a){if(!qa.useHTML5Audio||!qa.hasHTML5)return!1;var c,d,f,g,h=a.url||null,i=a.type||null,j=qa.audioFormats;if(i&&qa.html5[i]!==b)return qa.html5[i]&&!e(i);if(!da){da=[];for(g in j)j.hasOwnProperty(g)&&(da.push(g),j[g].related&&(da=da.concat(j[g].related)));da=new RegExp("\\.("+da.join("|")+")(\\?.*)?$","i")}return f=h?h.toLowerCase().match(da):null,f&&f.length?f=f[1]:i?(d=i.indexOf(";"),f=(-1!==d?i.substr(0,d):i).substr(6)):c=!1,f&&qa.html5[f]!==b?c=qa.html5[f]&&!e(f):(i="audio/"+f,c=qa.html5.canPlayType({type:i}),qa.html5[f]=c,c=c&&qa.html5[i]&&!e(i)),c},ga=function(){function a(a){var b,c,d=!1,e=!1;if(!g||"function"!=typeof g.canPlayType)return d;if(a instanceof Array){for(f=0,c=a.length;c>f;f++)(qa.html5[a[f]]||g.canPlayType(a[f]).match(qa.html5Test))&&(e=!0,qa.html5[a[f]]=!0,qa.flash[a[f]]=!!a[f].match(eb));d=e}else b=g&&"function"==typeof g.canPlayType?g.canPlayType(a):!1,d=!(!b||!b.match(qa.html5Test));return d}if(!qa.useHTML5Audio||!qa.hasHTML5)return qa.html5.usingFlash=!0,Qa=!0,!1;var c,d,e,f,g=Audio!==b?Za&&opera.version()<10?new Audio(null):new Audio:null,h={};e=qa.audioFormats;for(c in e)if(e.hasOwnProperty(c)&&(d="audio/"+c,h[c]=a(e[c].type),h[d]=h[c],c.match(eb)?(qa.flash[c]=!0,qa.flash[d]=!0):(qa.flash[c]=!1,qa.flash[d]=!1),e[c]&&e[c].related))for(f=e[c].related.length-1;f>=0;f--)h["audio/"+e[c].related[f]]=h[c],qa.html5[e[c].related[f]]=h[c],qa.flash[e[c].related[f]]=h[c];return h.canPlayType=g?a:null,qa.html5=p(qa.html5,h),qa.html5.usingFlash=aa(),Qa=qa.html5.usingFlash,!0},A={notReady:"Unavailable - wait until onready() has fired.",notOK:"Audio support is not available.",domError:ta+"exception caught while appending SWF to DOM.",spcWmode:"Removing wmode, preventing known SWF loading issue(s)",swf404:ua+"Verify that %s is a valid path.",tryDebug:"Try "+ta+".debugFlash = true for more security details (output goes to SWF.)",checkSWF:"See SWF output for more debug info.",localFail:ua+"Non-HTTP page ("+ya.location.protocol+" URL?) Review Flash player security settings for this special case:\nhttp://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html\nMay need to add/allow path, e.g. c:/sm2/ or /users/me/sm2/",waitFocus:ua+"Special case: Waiting for SWF to load with window focus...",waitForever:ua+"Waiting indefinitely for Flash (will recover if unblocked)...",waitSWF:ua+"Waiting for 100% SWF load...",needFunction:ua+"Function object expected for %s",badID:'Sound ID "%s" should be a string, starting with a non-numeric character',currentObj:ua+"_debug(): Current sound objects",waitOnload:ua+"Waiting for window.onload()",docLoaded:ua+"Document already loaded",onload:ua+"initComplete(): calling soundManager.onload()",onloadOK:ta+".onload() complete",didInit:ua+"init(): Already called?",secNote:"Flash security note: Network/internet URLs will not load due to security restrictions. Access can be configured via Flash Player Global Security Settings Page: http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html",badRemove:ua+"Failed to remove Flash node.",shutdown:ta+".disable(): Shutting down",queue:ua+"Queueing %s handler",smError:"SMSound.load(): Exception: JS-Flash communication failed, or JS error.",fbTimeout:"No flash response, applying ."+R.swfTimedout+" CSS...",fbLoaded:"Flash loaded",fbHandler:ua+"flashBlockHandler()",manURL:"SMSound.load(): Using manually-assigned URL",onURL:ta+".load(): current URL already assigned.",badFV:ta+'.flashVersion must be 8 or 9. "%s" is invalid. Reverting to %s.',as2loop:"Note: Setting stream:false so looping can work (flash 8 limitation)",noNSLoop:"Note: Looping not implemented for MovieStar formats",needfl9:"Note: Switching to flash 9, required for MP4 formats.",mfTimeout:"Setting flashLoadTimeout = 0 (infinite) for off-screen, mobile flash case",needFlash:ua+"Fatal error: Flash is needed to play some required formats, but is not available.",gotFocus:ua+"Got window focus.",policy:"Enabling usePolicyFile for data access",setup:ta+".setup(): allowed parameters: %s",setupError:ta+'.setup(): "%s" cannot be assigned with this method.',setupUndef:ta+'.setup(): Could not find option "%s"',setupLate:ta+".setup(): url, flashVersion and html5Test property changes will not take effect until reboot().",noURL:ua+"Flash URL required. Call soundManager.setup({url:...}) to get started.",sm2Loaded:"SoundManager 2: Ready. "+String.fromCharCode(10003),reset:ta+".reset(): Removing event callbacks",mobileUA:"Mobile UA detected, preferring HTML5 by default.",globalHTML5:"Using singleton HTML5 Audio() pattern for this device."},O=function(){var a,b,c,d,e;if(a=Ra.call(arguments),d=a.shift(),e=A&&A[d]?A[d]:"",e&&a&&a.length)for(b=0,c=a.length;c>b;b++)e=e.replace("%s",a[b]);return e},T=function(a){return 8===l&&a.loops>1&&a.stream&&(n("as2loop"),a.stream=!1),a},U=function(a,b){return a&&!a.usePolicyFile&&(a.onid3||a.usePeakData||a.useWaveformData||a.useEQData)&&(qa._wD((b||"")+O("policy")),a.usePolicyFile=!0),a},V=function(a){ab&&console.warn!==b?console.warn(a):qa._wD(a)},i=function(){return!1},L=function(a){var b;for(b in a)a.hasOwnProperty(b)&&"function"==typeof a[b]&&(a[b]=i);b=null},M=function(a){a===b&&(a=!1),(Ea||a)&&qa.disable(a)},N=function(a){var b,c=null;if(a)if(a.match(/\.swf(\?.*)?$/i)){if(c=a.substr(a.toLowerCase().lastIndexOf(".swf?")+4))return a}else a.lastIndexOf("/")!==a.length-1&&(a+="/");return b=(a&&-1!==a.lastIndexOf("/")?a.substr(0,a.lastIndexOf("/")+1):"./")+qa.movieURL,qa.noSWFCache&&(b+="?ts="+(new Date).getTime()),b},y=function(){l=parseInt(qa.flashVersion,10),8!==l&&9!==l&&(qa._wD(O("badFV",l,Ia)),qa.flashVersion=l=Ia);var a=qa.debugMode||qa.debugFlash?"_debug.swf":".swf";qa.useHTML5Audio&&!qa.html5Only&&qa.audioFormats.mp4.required&&9>l&&(qa._wD(O("needfl9")),qa.flashVersion=l=9),qa.version=qa.versionNumber+(qa.html5Only?" (HTML5-only mode)":9===l?" (AS3/Flash 9)":" (AS2/Flash 8)"),l>8?(qa.defaultOptions=p(qa.defaultOptions,qa.flash9Options),qa.features.buffering=!0,qa.defaultOptions=p(qa.defaultOptions,qa.movieStarOptions),qa.filePatterns.flash9=new RegExp("\\.(mp3|"+lb.join("|")+")(\\?.*)?$","i"),qa.features.movieStar=!0):qa.features.movieStar=!1,qa.filePattern=qa.filePatterns[8!==l?"flash9":"flash8"],qa.movieURL=(8===l?"soundmanager2.swf":"soundmanager2_flash9.swf").replace(".swf",a),qa.features.peakData=qa.features.waveformData=qa.features.eqData=l>8},J=function(a,b){return sa?void sa._setPolling(a,b):!1},K=function(){if(qa.debugURLParam.test(xa)&&(qa.debugMode=!0),h(qa.debugID))return!1;var a,b,c,d,e;if(qa.debugMode&&!h(qa.debugID)&&(!ab||!qa.useConsole||!qa.consoleOnly)){a=ya.createElement("div"),a.id=qa.debugID+"-toggle",d={position:"fixed",bottom:"0px",right:"0px",width:"1.2em",height:"1.2em",lineHeight:"1.2em",margin:"2px",textAlign:"center",border:"1px solid #999",cursor:"pointer",background:"#fff",color:"#333",zIndex:10001},a.appendChild(ya.createTextNode("-")),a.onclick=S,a.title="Toggle SM2 debug console",wa.match(/msie 6/i)&&(a.style.position="absolute",a.style.cursor="hand");for(e in d)d.hasOwnProperty(e)&&(a.style[e]=d[e]);if(b=ya.createElement("div"),b.id=qa.debugID,b.style.display=qa.debugMode?"block":"none",qa.debugMode&&!h(a.id)){try{c=G(),c.appendChild(a)}catch(f){throw new Error(O("domError")+" \n"+f.toString())}c.appendChild(b)}}c=null},W=this.getSoundById,n=function(a,b){return a?qa._wD(O(a),b):""},S=function(){var a=h(qa.debugID),b=h(qa.debugID+"-toggle");return a?(Aa?(b.innerHTML="+",a.style.display="none"):(b.innerHTML="-",a.style.display="block"),void(Aa=!Aa)):!1},m=function(c,d,e){if(a.sm2Debugger!==b)try{sm2Debugger.handleEvent(c,d,e)}catch(f){return!1}return!0},Q=function(){var a=[];return qa.debugMode&&a.push(R.sm2Debug),qa.debugFlash&&a.push(R.flashDebug),qa.useHighPerformance&&a.push(R.highPerf),a.join(" ")},P=function(){var a=O("fbHandler"),b=qa.getMoviePercent(),c=R,d={type:"FLASHBLOCK"};return qa.html5Only?!1:void(qa.ok()?(qa.didFlashBlock&&qa._wD(a+": Unblocked"),qa.oMC&&(qa.oMC.className=[Q(),c.swfDefault,c.swfLoaded+(qa.didFlashBlock?" "+c.swfUnblocked:"")].join(" "))):(Qa&&(qa.oMC.className=Q()+" "+c.swfDefault+" "+(null===b?c.swfTimedout:c.swfError),qa._wD(a+": "+O("fbTimeout")+(b?" ("+O("fbLoaded")+")":""))),qa.didFlashBlock=!0,t({type:"ontimeout",ignoreInit:!0,error:d}),I(d)))},s=function(a,c,d){za[a]===b&&(za[a]=[]),za[a].push({method:c,scope:d||null,fired:!1})},t=function(a){if(a||(a={type:qa.ok()?"onready":"ontimeout"}),!Da&&a&&!a.ignoreInit)return!1;if("ontimeout"===a.type&&(qa.ok()||Ea&&!a.ignoreInit))return!1;var b,c,d={success:a&&a.ignoreInit?qa.ok():!Ea},e=a&&a.type?za[a.type]||[]:[],f=[],g=[d],h=Qa&&!qa.ok();for(a.error&&(g[0].error=a.error),b=0,c=e.length;c>b;b++)e[b].fired!==!0&&f.push(e[b]);if(f.length)for(b=0,c=f.length;c>b;b++)f[b].scope?f[b].method.apply(f[b].scope,g):f[b].method.apply(this,g),h||(f[b].fired=!0);return!0},u=function(){a.setTimeout(function(){qa.useFlashBlock&&P(),t(),"function"==typeof qa.onload&&(n("onload",1),qa.onload.apply(a),n("onloadOK",1)),qa.waitForWindowLoad&&ha.add(a,"load",u)},1)},ka=function(){if(ja!==b)return ja;var c,d,e,f=!1,g=navigator,h=g.plugins,i=a.ActiveXObject;if(h&&h.length)d="application/x-shockwave-flash",e=g.mimeTypes,e&&e[d]&&e[d].enabledPlugin&&e[d].enabledPlugin.description&&(f=!0);else if(i!==b&&!wa.match(/MSAppHost/i)){try{c=new i("ShockwaveFlash.ShockwaveFlash")}catch(j){c=null}f=!!c,c=null}return ja=f,f},aa=function(){var a,b,c=qa.audioFormats,d=Ua&&!!wa.match(/os (1|2|3_0|3_1)\s/i);if(d?(qa.hasHTML5=!1,qa.html5Only=!0,qa.oMC&&(qa.oMC.style.display="none")):qa.useHTML5Audio&&(qa.html5&&qa.html5.canPlayType||(qa._wD("SoundManager: No HTML5 Audio() support detected."),qa.hasHTML5=!1),_a&&qa._wD(ua+"Note: Buggy HTML5 Audio in Safari on this OS X release, see https://bugs.webkit.org/show_bug.cgi?id=32159 - "+(ja?"will use flash fallback for MP3/MP4, if available":" would use flash fallback for MP3/MP4, but none detected."),1)),qa.useHTML5Audio&&qa.hasHTML5){_=!0;for(b in c)c.hasOwnProperty(b)&&c[b].required&&(qa.html5.canPlayType(c[b].type)?qa.preferFlash&&(qa.flash[b]||qa.flash[c[b].type])&&(a=!0):(_=!1,a=!0))}return qa.ignoreFlash&&(a=!1,_=!0),qa.html5Only=qa.hasHTML5&&qa.useHTML5Audio&&!a,!qa.html5Only},$=function(a){var b,c,d,e=0;if(a instanceof Array){for(b=0,c=a.length;c>b;b++)if(a[b]instanceof Object){if(qa.canPlayMIME(a[b].type)){e=b;break}}else if(qa.canPlayURL(a[b])){e=b;break}a[e].url&&(a[e]=a[e].url),d=a[e]}else d=a;return d},X=function(a){a._hasTimer||(a._hasTimer=!0,!$a&&qa.html5PollingInterval&&(null===Oa&&0===Na&&(Oa=setInterval(Z,qa.html5PollingInterval)),Na++))},Y=function(a){a._hasTimer&&(a._hasTimer=!1,!$a&&qa.html5PollingInterval&&Na--)},Z=function(){var a;if(null!==Oa&&!Na)return clearInterval(Oa),Oa=null,!1;for(a=qa.soundIDs.length-1;a>=0;a--)qa.sounds[qa.soundIDs[a]].isHTML5&&qa.sounds[qa.soundIDs[a]]._hasTimer&&qa.sounds[qa.soundIDs[a]]._onTimer()},I=function(c){c=c!==b?c:{},"function"==typeof qa.onerror&&qa.onerror.apply(a,[{type:c.type!==b?c.type:null}]),c.fatal!==b&&c.fatal&&qa.disable()},la=function(){if(!_a||!ka())return!1;var a,b,c=qa.audioFormats;for(b in c)if(c.hasOwnProperty(b)&&("mp3"===b||"mp4"===b)&&(qa._wD(ta+": Using flash fallback for "+b+" format"),qa.html5[b]=!1,c[b]&&c[b].related))for(a=c[b].related.length-1;a>=0;a--)qa.html5[c[b].related[a]]=!1},this._setSandboxType=function(a){var c=qa.sandbox;c.type=a,c.description=c.types[c.types[a]!==b?a:"unknown"],"localWithFile"===c.type?(c.noRemote=!0,c.noLocal=!1,n("secNote",2)):"localWithNetwork"===c.type?(c.noRemote=!1,c.noLocal=!0):"localTrusted"===c.type&&(c.noRemote=!1,c.noLocal=!1)},this._externalInterfaceOK=function(a){if(qa.swfLoaded)return!1;var b;return m("swf",!0),m("flashtojs",!0),qa.swfLoaded=!0,cb=!1,_a&&la(),a&&a.replace(/\+dev/i,"")===qa.versionNumber.replace(/\+dev/i,"")?void setTimeout(k,Wa?100:1):(b=ta+': Fatal: JavaScript file build "'+qa.versionNumber+'" does not match Flash SWF build "'+a+'" at '+qa.url+". Ensure both are up-to-date.",setTimeout(function(){throw new Error(b)},0),!1)},H=function(a,c){function d(){var a,b=[],c=[],d=" + ";a="SoundManager "+qa.version+(!qa.html5Only&&qa.useHTML5Audio?qa.hasHTML5?" + HTML5 audio":", no HTML5 audio support":""),qa.html5Only?qa.html5PollingInterval&&b.push("html5PollingInterval ("+qa.html5PollingInterval+"ms)"):(qa.preferFlash&&b.push("preferFlash"),qa.useHighPerformance&&b.push("useHighPerformance"),qa.flashPollingInterval&&b.push("flashPollingInterval ("+qa.flashPollingInterval+"ms)"),qa.html5PollingInterval&&b.push("html5PollingInterval ("+qa.html5PollingInterval+"ms)"),qa.wmode&&b.push("wmode ("+qa.wmode+")"),qa.debugFlash&&b.push("debugFlash"),qa.useFlashBlock&&b.push("flashBlock")),b.length&&(c=c.concat([b.join(d)])),qa._wD(a+(c.length?d+c.join(", "):""),1),na()}function e(a,b){return'<param name="'+a+'" value="'+b+'" />'}if(Ba&&Ca)return!1;if(qa.html5Only)return y(),d(),qa.oMC=h(qa.movieID),k(),Ba=!0,Ca=!0,!1;var f,g,i,j,l,m,n,o,p=c||qa.url,q=qa.altURL||p,r="JS/Flash audio component (SoundManager 2)",s=G(),t=Q(),u=null,v=ya.getElementsByTagName("html")[0];if(u=v&&v.dir&&v.dir.match(/rtl/i),a=a===b?qa.id:a,y(),qa.url=N(ib?p:q),c=qa.url,qa.wmode=!qa.wmode&&qa.useHighPerformance?"transparent":qa.wmode,null!==qa.wmode&&(wa.match(/msie 8/i)||!Wa&&!qa.useHighPerformance)&&navigator.platform.match(/win32|win64/i)&&(Pa.push(A.spcWmode),qa.wmode=null),f={name:a,id:a,src:c,quality:"high",allowScriptAccess:qa.allowScriptAccess,bgcolor:qa.bgColor,pluginspage:jb+"www.macromedia.com/go/getflashplayer",title:r,type:"application/x-shockwave-flash",wmode:qa.wmode,hasPriority:"true"},qa.debugFlash&&(f.FlashVars="debug=1"),qa.wmode||delete f.wmode,Wa)g=ya.createElement("div"),j=['<object id="'+a+'" data="'+c+'" type="'+f.type+'" title="'+f.title+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+jb+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0">',e("movie",c),e("AllowScriptAccess",qa.allowScriptAccess),e("quality",f.quality),qa.wmode?e("wmode",qa.wmode):"",e("bgcolor",qa.bgColor),e("hasPriority","true"),qa.debugFlash?e("FlashVars",f.FlashVars):"","</object>"].join("");else{g=ya.createElement("embed");for(i in f)f.hasOwnProperty(i)&&g.setAttribute(i,f[i])}if(K(),t=Q(),s=G())if(qa.oMC=h(qa.movieID)||ya.createElement("div"),qa.oMC.id)o=qa.oMC.className,qa.oMC.className=(o?o+" ":R.swfDefault)+(t?" "+t:""),qa.oMC.appendChild(g),Wa&&(l=qa.oMC.appendChild(ya.createElement("div")),l.className=R.swfBox,l.innerHTML=j),Ca=!0;else{if(qa.oMC.id=qa.movieID,qa.oMC.className=R.swfDefault+" "+t,m=null,l=null,qa.useFlashBlock||(qa.useHighPerformance?m={position:"fixed",width:"8px",height:"8px",bottom:"0px",left:"0px",overflow:"hidden"}:(m={position:"absolute",width:"6px",height:"6px",top:"-9999px",left:"-9999px"},u&&(m.left=Math.abs(parseInt(m.left,10))+"px"))),Xa&&(qa.oMC.style.zIndex=1e4),!qa.debugFlash)for(n in m)m.hasOwnProperty(n)&&(qa.oMC.style[n]=m[n]);try{Wa||qa.oMC.appendChild(g),s.appendChild(qa.oMC),Wa&&(l=qa.oMC.appendChild(ya.createElement("div")),l.className=R.swfBox,l.innerHTML=j),Ca=!0}catch(w){throw new Error(O("domError")+" \n"+w.toString())}}return Ba=!0,d(),!0},B=function(){return qa.html5Only?(H(),!1):sa?!1:qa.url?(sa=qa.getMovie(qa.id),sa||(Ja?(Wa?qa.oMC.innerHTML=Ka:qa.oMC.appendChild(Ja),Ja=null,Ba=!0):H(qa.id,qa.url),sa=qa.getMovie(qa.id)),"function"==typeof qa.oninitmovie&&setTimeout(qa.oninitmovie,1),oa(),!0):(n("noURL"),!1)},v=function(){setTimeout(w,1e3)},x=function(){a.setTimeout(function(){V(ua+"useFlashBlock is false, 100% HTML5 mode is possible. Rebooting with preferFlash: false..."),qa.setup({preferFlash:!1}).reboot(),qa.didFlashBlock=!0,qa.beginDelayedInit()},1)},w=function(){var b,c=!1;return qa.url?La?!1:(La=!0,ha.remove(a,"load",v),ja&&cb&&!bb?(n("waitFocus"),!1):(Da||(b=qa.getMoviePercent(),b>0&&100>b&&(c=!0)),void setTimeout(function(){return b=qa.getMoviePercent(),c?(La=!1,qa._wD(O("waitSWF")),a.setTimeout(v,1),!1):(Da||(qa._wD(ta+": No Flash response within expected time. Likely causes: "+(0===b?"SWF load failed, ":"")+"Flash blocked or JS-Flash security error."+(qa.debugFlash?" "+O("checkSWF"):""),2),!ib&&b&&(n("localFail",2),qa.debugFlash||n("tryDebug",2)),0===b&&qa._wD(O("swf404",qa.url),1),m("flashtojs",!1," (Check flash security or flash blockers)")),void(!Da&&db&&(null===b?qa.useFlashBlock||0===qa.flashLoadTimeout?(qa.useFlashBlock&&P(),n("waitForever")):!qa.useFlashBlock&&_?x():(n("waitForever"),t({type:"ontimeout",ignoreInit:!0,error:{type:"INIT_FLASHBLOCK"}})):0===qa.flashLoadTimeout?n("waitForever"):!qa.useFlashBlock&&_?x():M(!0))))},qa.flashLoadTimeout))):!1},z=function(){function b(){ha.remove(a,"focus",z)}return bb||!cb?(b(),!0):(db=!0,bb=!0,n("gotFocus"),La=!1,v(),b(),!0)},oa=function(){Pa.length&&(qa._wD("SoundManager 2: "+Pa.join(" "),1),Pa=[])},na=function(){oa();var a,b=[];if(qa.useHTML5Audio&&qa.hasHTML5){for(a in qa.audioFormats)qa.audioFormats.hasOwnProperty(a)&&b.push(a+" = "+qa.html5[a]+(!qa.html5[a]&&Qa&&qa.flash[a]?" (using flash)":qa.preferFlash&&qa.flash[a]&&Qa?" (preferring flash)":qa.html5[a]?"":" ("+(qa.audioFormats[a].required?"required, ":"")+"and no flash support)"));qa._wD("SoundManager 2 HTML5 support: "+b.join(", "),1)}},o=function(b){if(Da)return!1;if(qa.html5Only)return n("sm2Loaded",1),Da=!0,u(),m("onload",!0),!0;var c,d=qa.useFlashBlock&&qa.flashLoadTimeout&&!qa.getMoviePercent(),e=!0;return d||(Da=!0),c={type:!ja&&Qa?"NO_FLASH":"INIT_TIMEOUT"},qa._wD("SoundManager 2 "+(Ea?"failed to load":"loaded")+" ("+(Ea?"Flash security/load error":"OK")+") "+String.fromCharCode(Ea?10006:10003),Ea?2:1),Ea||b?(qa.useFlashBlock&&qa.oMC&&(qa.oMC.className=Q()+" "+(null===qa.getMoviePercent()?R.swfTimedout:R.swfError)),t({type:"ontimeout",error:c,ignoreInit:!0}),m("onload",!1),I(c),e=!1):m("onload",!0),Ea||(qa.waitForWindowLoad&&!Fa?(n("waitOnload"),ha.add(a,"load",u)):(qa.waitForWindowLoad&&Fa&&n("docLoaded"),u())),e},j=function(){var a,c=qa.setupOptions;for(a in c)c.hasOwnProperty(a)&&(qa[a]===b?qa[a]=c[a]:qa[a]!==c[a]&&(qa.setupOptions[a]=qa[a]))},k=function(){function b(){ha.remove(a,"load",qa.beginDelayedInit)}if(Da)return n("didInit"),!1;if(qa.html5Only)return Da||(b(),qa.enabled=!0,o()),!0;B();try{sa._externalInterfaceTest(!1),J(!0,qa.flashPollingInterval||(qa.useHighPerformance?10:50)),qa.debugMode||sa._disableDebug(),qa.enabled=!0,m("jstoflash",!0),qa.html5Only||ha.add(a,"unload",i)}catch(c){return qa._wD("js/flash exception: "+c.toString()),m("jstoflash",!1),I({type:"JS_TO_FLASH_EXCEPTION",fatal:!0}),M(!0),o(),!1}return o(),b(),!0},D=function(){return F?!1:(F=!0,j(),K(),function(){var a="sm2-usehtml5audio=",b="sm2-preferflash=",c=null,d=null,e=xa.toLowerCase();-1!==e.indexOf(a)&&(c="1"===e.charAt(e.indexOf(a)+a.length),ab&&console.log((c?"Enabling ":"Disabling ")+"useHTML5Audio via URL parameter"),qa.setup({useHTML5Audio:c})),-1!==e.indexOf(b)&&(d="1"===e.charAt(e.indexOf(b)+b.length),ab&&console.log((d?"Enabling ":"Disabling ")+"preferFlash via URL parameter"),qa.setup({preferFlash:d}))}(),!ja&&qa.hasHTML5&&(qa._wD("SoundManager 2: No Flash detected"+(qa.useHTML5Audio?". Trying HTML5-only mode.":", enabling HTML5."),1),qa.setup({useHTML5Audio:!0,preferFlash:!1})),ga(),!ja&&Qa&&(Pa.push(A.needFlash),qa.setup({flashLoadTimeout:1})),ya.removeEventListener&&ya.removeEventListener("DOMContentLoaded",D,!1),B(),!0)},fa=function(){return"complete"===ya.readyState&&(D(),ya.detachEvent("onreadystatechange",fa)),!0},E=function(){Fa=!0,D(),ha.remove(a,"load",E)},C=function(){$a&&((!qa.setupOptions.useHTML5Audio||qa.setupOptions.preferFlash)&&Pa.push(A.mobileUA),qa.setupOptions.useHTML5Audio=!0,qa.setupOptions.preferFlash=!1,(Ua||Va&&!wa.match(/android\s2\.3/i))&&(Pa.push(A.globalHTML5),Ua&&(qa.ignoreFlash=!0),Sa=!0))},C(),ka(),ha.add(a,"focus",z),ha.add(a,"load",v),ha.add(a,"load",E),ya.addEventListener?ya.addEventListener("DOMContentLoaded",D,!1):ya.attachEvent?ya.attachEvent("onreadystatechange",fa):(m("onload",!1),I({type:"NO_DOM2_EVENTS",fatal:!0}))}if(!a||!a.document)throw new Error("SoundManager requires a browser with window and document objects.");var d=null;void 0!==a.SM2_DEFER&&SM2_DEFER||(d=new c),"object"==typeof module&&module&&"object"==typeof module.exports?(a.soundManager=d,module.exports.SoundManager=c,module.exports.soundManager=d):"function"==typeof define&&define.amd?define("SoundManager",[],function(){return{SoundManager:c,soundManager:d}}):(a.SoundManager=c,a.soundManager=d)}(window),window.JST["apps/album/show/tpl/album_with_songs.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="album album--with-songs">\n <div class="region-album-side">\n <div class="region-album-meta"></div>\n </div>\n <div class="region-album-content">\n <div class="region-album-songs"></div>\n </div>\n</div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/album/show/tpl/details_meta.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="region-details-top">\n <div class="region-details-title">\n <h2><span class="title">')),d(this.label),d(b('</span> <span class="sub"><a href="#music/albums?year=')),d(this.year),d(b('">')),d(this.year),d(b("</a></span></h2>\n </div>\n ")),this.rating&&(d(b('\n <div class="region-details-rating">\n ')),d(this.rating),d(b(" <i></i>\n </div>\n "))),d(b('\n</div>\n\n<div class="region-details-meta-below">\n\n <ul class="meta">\n ')),this.artist&&(d(b("\n <li><label>")),d(tr("artist")),d(b(':</label> <span><a href="#music/artist/')),d(this.artistid),d(b('">')),d(this.artist),d(b("</a></span></li>\n "))),d(b("\n ")),this.genre.length>0&&(d(b("\n <li><label>")),d(t.ngettext("genre","genres",this.genre.length)),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("music/albums","genre",this.genre))),d(b("</span></li>\n "))),d(b("\n ")),this.style.length&&(d(b("\n <li><label>")),d(t.ngettext("style","styles",this.style.length)),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("music/albums","style",this.style))),d(b("</span></li>\n "))),d(b("\n ")),this.albumlabel&&(d(b("\n <li><label>")),d(tr("label")),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("music/albums","albumlabel",[this.albumlabel]))),d(b("</span></li>\n "))),d(b('\n </ul>\n\n <div class="description">')),d(this.description),d(b('</div>\n\n <ul class="inline-links">\n <li class="btn-flat-play play">')),d(tr("Play")),d(b('</li>\n <li class="btn-flat-add add">')),d(tr("Queue")),d(b('</li>\n <li class="btn-flat-stream localplay">')),d(tr("Stream")),d(b('</li>\n <li class="more-actions dropdown">\n <span class="btn-flat-more" data-toggle="dropdown" aria-expanded="true">')),d(tr("more")),d(b('</span>\n <ul class="dropdown-menu pull-right">\n <li class="localadd">')),d(tr("Add to playlist")),d(b('</li>\n <li class="divider"></li>\n <li class="dropdown-submenu internal-search">')),d(tr("Chorus Search")),d(b('\n <ul class="dropdown-menu">\n ')),d(b(helpers.entities.getAddonSearchMenuItems(this.label))),d(b('\n </ul>\n </li>\n <li class="dropdown-submenu external-search">')),d(tr("External Search")),d(b('\n <ul class="dropdown-menu">\n <li data-type="google" data-query="')),d(this.artist),d(b(" ")),d(this.label),d(b('">Google</li>\n <li data-type="soundcloud" data-query="')),d(this.artist),d(b('">SoundCloud</li>\n </ul>\n </li>\n <li class="youtube-search" data-query="')),d(this.artist),d(b(" ")),d(this.label),d(b('">')),d(tr("YouTube Search")),d(b('</li>\n <li class="divider"></li>\n <li class="edit">')),d(tr("Edit")),d(b("</li>\n </ul>\n </li>\n </ul>\n\n</div>\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/artist/show/tpl/details_meta.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="region-details-top">\n <div class="region-details-title">\n <h2>')),d(this.label),d(b('</h2>\n </div>\n</div>\n\n<div class="region-details-meta-below">\n\n <ul class="meta">\n ')),this.genre.length>0&&(d(b("\n <li><label>")),d(t.ngettext("genre","genres",this.genre.length)),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("music/artists","genre",this.genre))),d(b("</span></li>\n "))),d(b("\n ")),this.style.length&&(d(b("\n <li><label>")),d(t.ngettext("style","styles",this.style.length)),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("music/artists","style",this.style))),d(b("</span></li>\n "))),d(b("\n ")),this.formed&&(d(b("\n <li><label>")),d(tr("formed")),d(b(":</label> <span>")),d(this.formed),d(b("</span></li>\n "))),d(b("\n ")),this.yearsactive&&this.yearsactive.length>0&&(d(b("\n <li><label>")),d(tr("years active")),d(b(":</label> <span>")),d(this.yearsactive),d(b("</span></li>\n "))),d(b("\n ")),this.born&&(d(b("\n <li><label>")),d(tr("born")),d(b(":</label> <span>")),d(this.born),d(b("</span></li>\n "))),d(b("\n ")),this.died&&(d(b("\n <li><label>")),d(tr("died")),d(b(":</label> <span>")),d(this.died),d(b("</span></li>\n "))),d(b("\n ")),this.disbanded&&(d(b("\n <li><label>")),d(tr("disbanded")),d(b(":</label> <span>")),d(this.disbanded),d(b("</span></li>\n "))),d(b('\n </ul>\n\n <div class="description">')),d(this.description),d(b('</div>\n\n <ul class="inline-links">\n <li class="btn-flat-play play">')),d(tr("Play")),d(b('</li>\n <li class="btn-flat-add add">')),d(tr("Queue")),d(b('</li>\n <li class="btn-flat-stream localplay">')),d(tr("Stream")),d(b('</li>\n <li class="more-actions dropdown">\n <span class="btn-flat-more" data-toggle="dropdown" aria-expanded="true">')),d(tr("more")),d(b('</span>\n <ul class="dropdown-menu pull-right">\n <li class="localadd">')),d(tr("Add to playlist")),d(b('</li>\n <li class="divider"></li>\n <li class="dropdown-submenu internal-search">')),d(tr("Chorus Search")),d(b('\n <ul class="dropdown-menu">\n ')),d(b(helpers.entities.getAddonSearchMenuItems(this.label))),d(b('\n </ul>\n </li>\n <li class="dropdown-submenu external-search">')),d(tr("External Search")),d(b('\n <ul class="dropdown-menu">\n <li data-type="google" data-query="')),d(this.label),d(b('">Google</li>\n <li data-type="soundcloud" data-query="')),d(this.label),d(b('">SoundCloud</li>\n </ul>\n </li>\n <li class="youtube-search" data-query="')),d(this.label),d(b('">')),d(tr("YouTube Search")),d(b('</li>\n <li class="divider"></li>\n <li class="edit">')),d(tr("Edit")),d(b("</li>\n </ul>\n </li>\n </ul>\n\n</div>\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/browser/list/tpl/back_button.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<i class="mdi thumb"></i><div class="title">')),d(t.gettext("Back")),d(b("</div>"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/browser/list/tpl/file.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="thumb" style="background-image: url(\'')),d(this.thumbnail),d(b('\')"><div class="mdi play"></div></div>\n<div class="title" title="')),d(helpers.global.stripTags(this.label)),d(b('">')),d(b(this.label)),d(b('</div>\n<ul class="actions">\n <li class="menu dropdown">\n <i data-toggle="dropdown" class="mdi"></i>\n <ul class="dropdown-menu pull-right"></ul>\n </li>\n</ul>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/browser/list/tpl/folder_layout.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="folder-layout">\n <div class="loading-bar"><div class="inner"><div class="loader-small-inline"></div> <span>')),d(tr("Loading folder...")),d(b('</span></div></div>\n <div class="path"></div>\n <ul class="actions">\n <li class="dropdown sort-wrapper">\n <i class="sort-toggle" data-toggle="dropdown" title="')),d(tr("Sort")),d(b('"></i>\n <ul class="sorts dropdown-menu pull-right">\n <li data-sort="none">')),d(tr("default")),d(b('<i></i></li>\n <li data-sort="label">')),d(tr("title")),d(b('<i></i></li>\n <li data-sort="dateadded">')),d(tr("date added")),d(b('<i></i></li>\n <li data-sort="random">')),d(tr("random")),d(b('<i></i></li>\n </ul>\n </li>\n <li class="dropdown context-wrapper">\n <i class="context-toggle" data-toggle="dropdown" title="')),d(tr("Actions")),d(b('"></i>\n <ul class="dropdown-menu pull-right">\n <li class="play">')), -d(tr("play files")),d(b('<i></i></li>\n <li class="queue">')),d(tr("queue files")),d(b('<i></i></li>\n </ul>\n </li>\n </ul>\n\n\n <div class="folder-container">\n <div class="files">\n </div>\n <div class="folders-pane">\n <div class="back"></div>\n <div class="folders">\n <div class="intro">\n <h3><span class="mdi-navigation-arrow-back text-dim"></span> ')),d(tr("Browse files and add-ons")),d(b("</h3>\n <p>")),d(tr("This is where you can browse all Kodi content, not just what is in the library. Browse by source or add-on.")),d(b("</p>\n </div>\n </div>\n </div>\n </div>\n</div>"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/browser/list/tpl/path.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="title">')),d(this.label),d(b("</div>"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/browser/list/tpl/source.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="source source-')),d(this.media),d(b('">\n ')),d(this.label),d(b("\n</div>"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/browser/list/tpl/source_set.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("<h3>")),d(this.label),d(b('</h3>\n<ul class="sources"></ul>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/cast/list/tpl/cast.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<a href="#')),d(this.origin),d(b("?cast=")),d(this.name),d(b('" title="')),d(this.name),d(b(" (")),d(this.role),d(b(')">\n <div class="thumb">\n <img src="')),d(this.thumbnail),d(b('" />\n </div>\n <div class="meta">\n <strong>')),d(this.name),d(b('</strong>\n <span title="')),d(this.role),d(b('">')),d(this.role),d(b('</span>\n </div>\n</a>\n<ul class="actions">\n <li class="imdb" title="IMDb search ')),d(this.name),d(b('"></li>\n <li class="google" title="Google search ')),d(this.name),d(b('"></li>\n</ul>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/category/list/tpl/item.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<a href="#')),d(this.url),d(b('">\n <span>')),d(this.title),d(b("</span>\n</a>"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/epg/list/tpl/channel.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("<h3>")),d(this.channel),d(b('</h3>\n<ul class="items">\n <li class="play">')),d(tr("Play")),d(b('</li>\n <li class="record">')),d(tr("Record")),d(b("</li>\n</ul>"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/epg/list/tpl/programme.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="title">\n <strong>')),d(this.label),d(b('</strong>\n</div>\n<div class="date">\n ')),d(this.start.toString("h:mmtt").toLowerCase()),d(b(" - ")),d(this.end.toString("h:mmtt").toLowerCase()),d(b(" (")),d(this.runtime),d(b("min)<br />\n ")),d(this.start.toString("dddd, dS MMM")),d(b('\n</div>\n<div class="plot">')),d(this.plot),d(b('</div>\n<div class="entity-progress">\n <div class="current-progress" style="width: ')),d(this.progresspercentage),d(b('%" title="')),d(Math.round(this.progresspercentage)),d(b("% ")),d(tr("complete")),d(b('"></div>\n</div>\n<ul class="actions">\n ')),this.isactive?(d(b('\n <li class="play" title="')),d(tr("Play")),d(b('"></li>\n <li class="record" title="')),d(tr("Record")),d(b('"></li>\n '))):(d(b("\n ")),this.wasactive||(d(b('\n <li class="toggle-timer" title="')),d(tr("Toggle timer")),d(b('"></li>\n '))),d(b("\n "))),d(b("\n</ul>"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/external/youtube/tpl/youtube.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<img src="')),d(this.thumbnail),d(b('" class="thumb" />\n<h3>')),d(this.title),d(b('</h3>\n<span class="play-kodi flat-btn action">Play in Kodi</span>\n<span class="play-local flat-btn action">Play in browser</span>\n'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/filter/show/tpl/filter_options.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="options-search-wrapper">\n <input class="options-search" value="" />\n</div>\n<div class="deselect-all">')),d(t.gettext("Deselect all")),d(b('</div>\n<ul class="selection-list"></ul>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/filter/show/tpl/filters_bar.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<span class="filters-active-all">')),d(this.filters),d(b('</span><i class="remove"></i>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/filter/show/tpl/filters_ui.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="filters-container">\n\n <div class="filters-current filter-pane">\n <div class="nav-section"></div>\n\n <h3 class="open-filters">')),d(t.gettext("Filters")),d(b('<i></i></h3>\n <div class="filters-active"></div>\n\n <h3>')),d(t.gettext("Sort")),d(b('</h3>\n <div class="list sort-options"></div>\n </div>\n\n <div class="filters-page filter-pane">\n <h3 class="close-filters">')),d(t.gettext("Select a filter")),d(b('</h3>\n <div class="list filters-list"></div>\n </div>\n\n <div class="filters-options filter-pane">\n <h3 class="close-options">')),d(t.gettext("Select an option")),d(b('</h3>\n <div class="list filter-options-list"></div>\n </div>\n\n</div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/filter/show/tpl/list_item.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b(this.title))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/help/overview/tpl/overview.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("<h1>")),d(tr("About Chorus")),d(b("</h1>\n<h2>")),d(tr("Status report")),d(b('</h2>\n<div class="help--overview--report">\n <ul>\n <li class="report-chorus-version"><strong>Chorus ')),d(tr("version")),d(b('</strong><span></span></li>\n <li class="report-kodi-version"><strong>Kodi ')),d(tr("version")),d(b('</strong><span></span></li>\n <li class="report-websockets"><strong>')),d(tr("Remote control")),d(b('</strong><span></span></li>\n <li class="report-local-audio"><strong>')),d(tr("Local audio")),d(b('</strong><span></span></li>\n </ul>\n</div>\n<div class="help--overview--header"></div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/input/remote/tpl/remote_control.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div id="remote-background" class="close-remote"></div>\n<div class="remote kodi-remote">\n <div class="toggle-visibility"></div>\n <div class="playing-area">\n\n </div>\n <div class="main-controls">\n <div class="direction">\n <div class="pad">\n <div class="ibut mdi-hardware-keyboard-arrow-left left input-button" data-type="Left"></div>\n <div class="ibut mdi-hardware-keyboard-arrow-up up input-button" data-type="Up"></div>\n <div class="ibut mdi-hardware-keyboard-arrow-down down input-button" data-type="Down"></div>\n <div class="ibut mdi-hardware-keyboard-arrow-right right input-button" data-type="Right"></div>\n <div class="ibut mdi-image-brightness-1 ok input-button" data-type="Select"></div>\n </div>\n </div>\n <div class="buttons">\n <div class="ibut mdi-action-settings-power power-button"></div>\n <div class="ibut mdi-navigation-more-vert input-button" data-type="ContextMenu"></div>\n <div class="ibut mdi-action-info info-button" data-type="Info"></div>\n </div>\n </div>\n <div class="secondary-controls">\n <div class="ibut mdi-hardware-keyboard-return input-button" data-type="Back"></div>\n <div class="ibut mdi-av-stop player-button" data-type="Stop"></div>\n <div class="ibut mdi-maps-store-mall-directory input-button" data-type="Home"></div>\n </div>\n\n</div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/lab/apiBrowser/tpl/api_browser_landing.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="api-browser--landing page">\n <h2>')),d(t.gettext("Kodi API browser")),d(b('</h2>\n <h4><a href="#lab">')),d(t.gettext("Chorus lab")),d(b('</a></h4>\n <div class="api-browser--content">\n <p>')),d(t.gettext("This is a tool to test out the api. Select a method then execute it with parameters.")),d(b('</p>\n <br />\n <div class="alert alert-dismissable alert-warning">\n <button type="button" class="close" data-dismiss="alert">×</button>\n <h4>')),d(t.gettext("Warning")),d(b("</h4>\n <p>")),d(t.gettext("You could potentially damage your system with this and there are no sanity checks. Use at own risk.")),d(b("<br /></p>\n </div>\n </div>\n</div>"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/lab/apiBrowser/tpl/api_method_item.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="api-method--item">\n <h4 class="method">')),d(this.method),d(b('</h4>\n <p class="description">')),d(this.description),d(b("</p>\n</div>\n\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/lab/apiBrowser/tpl/api_method_list.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="api-methods--list">\n <p class="search-box"><input type="text" id="api-search" class="api-methods--search" /></p>\n <ul class="items"></ul>\n</div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/lab/apiBrowser/tpl/api_method_page.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('\n<div class="api-method--info page">\n <h2 class="method"><a href="http://kodi.wiki/view/JSON-RPC_API/v6#')),d(this.method),d(b('" target="_blank">')),d(this.method),d(b('</a></h2>\n <p class="description">')),d(this.description),d(b("</p>\n\n</div>\n\n")),"method"===this.type&&(d(b('\n <div class="api-method--execute">\n <h3>Execute <strong>')),d(this.method),d(b('</strong> with these params:</h3>\n <textarea class="api-method--params" placeholder=\'Eg. ["arg", "foo", true]\'></textarea>\n <p class="description">Parameters get parsed by\n <a href="https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse" target="_blank">JSON.parse</a>.\n Check the console for response objects, you will get an \'unexpected token\' error if parsing failed.\n Params should be an array \'[]\' matching below \'Method params\'. Only use double quotes for strings/keys.\n </p>\n <p class="description">\n Pass params as array Eg. [true] or [255, ["born", "formed", "thumbnail"]] or [] or [255]. Brackets required.<br />\n Pass params as object Eg. {songid: 255} or {songid: 255, fields: ["born", "formed", "thumbnail"]}. Braces required.<br />\n </p>\n <p><button class="btn btn-primary" id="send-command">Send Command</button></p>\n\n </div>\n'))),d(b('\n\n<div class="api-method--result" id="api-result"></div>\n\n<h3>')),"method"===this.type&&d(b("Method ")),d(b('Params</h3>\n<div class="api-method--params"></div>\n\n')),"method"===this.type&&d(b('\n <hr />\n <h3>Method Returns</h3>\n <div class="api-method--return"></div>\n'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/lab/iconBrowser/tpl/icon_browser_page.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<h3>Material Icons</h3>\n<ul id="icons-material"></ul>\n\n<h3>Custom Icons</h3>\n<ul id="icons-custom"></ul>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/lab/lab/tpl/lab_item.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<a class="lab-item" href="#')),d(this.path),d(b('">\n <h4>')),d(this.title),d(b("</h4>\n <p>")),d(this.description),d(b("</p>\n</a>"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/landing/show/tpl/landing_page.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<a id="landing-hero"></a>\n<div class="landing-sections">\n <div id="landing-section-1"></div>\n <div id="landing-section-2"></div>\n <div id="landing-section-3"></div>\n <div id="landing-section-4"></div>\n <div id="landing-section-5"></div>\n <div id="landing-section-6"></div>\n</div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/landing/show/tpl/landing_set.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<h3 class="set-header"></h3>\n<div class="set-results landing-section"></div>\n<div class="more"></div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/loading/show/tpl/loading_page.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div id="loading-page">\n <div class="spinner-double-section-far"></div>\n <h2>')),d(t.gettext("Just a sec...")),d(b("</h2>\n</div>\n\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/localPlaylist/list/tpl/playlist.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<span class="item">')),d(b(this.title)),d(b("</span>"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/localPlaylist/list/tpl/playlist_layout.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="local-playlist-header">\n <h2></h2>\n <div class="dropdown">\n <i data-toggle="dropdown"></i>\n <ul class="dropdown-menu">\n <li class="play">')),d(tr("Play in Kodi")),d(b('</li>\n <li class="localplay">')),d(tr("Play in browser")),d(b('</li>\n <li class="export">')),d(tr("Export list")),d(b('</li>\n <div class="divider"></div>\n <li class="rename">')),d(tr("Rename playlist")),d(b('</li>\n <li class="clear">')),d(tr("Clear playlist")),d(b('</li>\n <li class="delete">')),d(tr("Delete playlist")),d(b('</li>\n </ul>\n </div>\n</div>\n<div class="item-container">\n <div class="empty-content">')),d(t.gettext("Empty playlist, you should probably add something to it?")),d(b("</div>\n</div>"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/localPlaylist/list/tpl/playlist_list.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<h3></h3>\n<ul class="lists"></ul>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/localPlaylist/list/tpl/playlist_sidebar_layout.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="current-lists"></div>\n<div class="new-list">')),d(tr("New playlist")),d(b("</div>"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/movie/show/tpl/content.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="section-content">\n <h2>')),d(t.gettext("Synopsis")),d(b("</h2>\n ")),this.mediaTrailer&&"youtube"===this.mediaTrailer.source&&(d(b('\n <div class="trailer ')),d(this.mediaTrailer.source),d(b('">\n <img src="')),d(b(this.mediaTrailer.img)),d(b('" />\n </div>\n '))),d(b("\n <p>")),d(this.plot),d(b('</p>\n <ul class="inline-links">\n <li>')),d(b(helpers.url.imdbUrl(this.imdbnumber,"View on IMDb"))),d(b("</li>\n </ul>\n</div>\n\n")),this.cast.length>0&&(d(b('\n <div class="section-content">\n <h2>')),d(t.gettext("Full cast")),d(b('</h2>\n <div class="region-cast"></div>\n </div>\n'))),d(b('\n\n<div class="region-more-1"></div>\n<div class="region-more-2"></div>\n<div class="region-more-3"></div>\n<div class="region-more-4"></div>\n<div class="region-more-5"></div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/movie/show/tpl/details_meta.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){var a,c,e,f;if(d(b('<div class="region-details-top">\n <div class="region-details-title">\n <h2><span class="title">')),d(this.label),d(b('</span> <span class="sub"><a href="#movies?year=')),d(this.year),d(b('">')),d(this.year),d(b('</a></span></h2>\n </div>\n <div class="region-details-rating">\n ')),d(this.rating),d(b(' <i></i>\n </div>\n</div>\n\n<div class="region-details-meta-below">\n\n <div class="region-details-subtext">\n <div class="runtime">\n ')),d(helpers.global.formatTime(helpers.global.secToTime(this.runtime))),d(b('\n </div>\n </div>\n\n <div class="tagline">')),d(this.plotoutline),d(b('</div>\n\n <ul class="meta">\n ')),this.genre.length>0&&(d(b("\n <li><label>")),d(t.gettext("genre")),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("tvshows","genre",this.genre))),d(b("</span></li>\n "))),d(b("\n ")),this.director.length>0&&(d(b("\n <li><label>")),d(t.ngettext("Director","Directors",this.director.length)),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("movies","director",this.director))),d(b("</span></li>\n "))),d(b("\n ")),this.writer.length>0&&(d(b("\n <li><label>")),d(t.ngettext("Writer","Writers",this.writer.length)),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("movies","writer",this.writer))),d(b("</span></li>\n "))),d(b("\n ")),this.cast.length>0&&(d(b("\n <li><label>")),d(t.gettext("Cast")),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("movies","cast",_.pluck(this.cast,"name")))),d(b("</span></li>\n "))),d(b("\n ")),this.mpaa&&(d(b("\n <li><label>")),d(t.gettext("rated")),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("movies","mpaa",[this.mpaa]))),d(b("</span></li>\n "))),d(b('\n </ul>\n\n <ul class="streams">\n ')),this.streamdetails.video.length>0&&(d(b("\n <li><label>")),d(t.gettext("Video")),d(b(":</label> <span>")),d(_.pluck(this.streamdetails.video,"label").join(", ")),d(b("</span></li>\n "))),d(b("\n ")),this.streamdetails.audio.length>0&&(d(b("\n <li><label>")),d(t.gettext("Audio")),d(b(":</label> <span>")),d(_.pluck(this.streamdetails.audio,"label").join(", ")),d(b("</span></li>\n "))),d(b("\n ")),this.streamdetails.subtitle.length>0&&""!==this.streamdetails.subtitle[0].label){for(d(b("\n <li><label>")),d(t.ngettext("Subtitle","Subtitles",this.streamdetails.subtitle.length)),d(b(':</label>\n <span class="dropdown"><span data-toggle="dropdown">')),d(_.pluck(this.streamdetails.subtitle,"label").join(", ")),d(b('</span>\n <ul class="dropdown-menu">\n ')),e=this.streamdetails.subtitle,a=0,c=e.length;c>a;a++)f=e[a],d(b("\n <li>")),d(f.label),d(b("</li>\n "));d(b("\n </ul>\n </span>\n </li>\n "))}d(b('\n </ul>\n\n <ul class="inline-links">\n <li class="btn-flat-play play">')),d(t.gettext("Play")),d(b('</li>\n <li class="btn-flat-add add">')),d(tr("Queue")),d(b('</li>\n <li class="btn-flat-stream stream">')),d(t.gettext("Stream")),d(b('</li>\n <li class="btn-flat-watched watched">\n ')),d(t.gettext("set")),d(b(' <span class="action-watched">')),d(t.gettext("watched")),d(b('</span><span class="action-unwatched">')),d(t.gettext("unwatched")),d(b('</span>\n </li>\n <li class="more-actions dropdown">\n <span class="btn-flat-more" data-toggle="dropdown" aria-expanded="true">')),d(tr("more")),d(b('</span>\n <ul class="dropdown-menu pull-right">\n <li class="download">')),d(tr("Download")),d(b('</li>\n <li class="divider"></li>\n <li class="dropdown-submenu internal-search">')),d(tr("Chorus Search")),d(b('\n <ul class="dropdown-menu">\n ')),d(b(helpers.entities.getAddonSearchMenuItems(this.label))),d(b('\n </ul>\n </li>\n <li class="dropdown-submenu external-search">')),d(tr("External Search")),d(b('\n <ul class="dropdown-menu">\n <li data-type="google" data-query="')),d(this.label),d(b('">Google</li>\n <li data-type="imdb" data-query="')),d(this.label),d(b('">IMDb</li>\n <li data-type="tmdb" data-query="')),d(this.label),d(b('">TVDb</li>\n </ul>\n </li>\n <li class="youtube-search" data-query="')),d(this.label),d(b('">')),d(tr("YouTube Search")),d(b('</li>\n <li class="divider"></li>\n <li class="refresh">')),d(tr("Refresh")),d(b('</li>\n <li class="edit">')),d(tr("Edit")),d(b("</li>\n </ul>\n </li>\n </ul>\n</div>\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/movie/show/tpl/set.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="section-content">\n <div class="set-collection">\n <h2 class="set-name"></h2>\n <div class="collection-items"></div>\n </div>\n</div>')); -}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/navMain/show/tpl/navMain.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){var a,c,e,f,g,h,i,j;for(d(b('<div id="nav-header"></div>\n<nav>\n <ul>\n ')),i=this.items,c=0,g=i.length;g>c;c++)if(e=i[c],"undefined"!==e.path&&0===e.parent){if(d(b('\n <li class="')),d(e["class"]),d(b('">\n <a href="#')),d(e.path),d(b('">\n <i class="')),d(e.icon),d(b('"></i>\n <span>')),d(e.title),d(b("</span>\n </a>\n\n ")),0!==e.children.length){for(d(b("\n <ul>\n ")),j=e.children,f=0,h=j.length;h>f;f++)a=j[f],"undefined"!==a.path&&(d(b('\n <li><a href="#')),d(a.path),d(b('">')),d(a.title),d(b("</a></li>\n ")));d(b("\n </ul>\n "))}d(b("\n </li>\n "))}d(b("\n </ul>\n</nav>"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/navMain/show/tpl/nav_item.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b(this.link))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/navMain/show/tpl/nav_sub.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("<h3>")),d(this.title),d(b('</h3>\n<ul class="items"></ul>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/player/show/tpl/player.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="player">\n\n <div class="controls-primary">\n <div class="controls-primary-buttons">\n <div class="control control-prev"></div>\n <div class="control control-play"></div>\n <div class="control control-next"></div>\n </div>\n </div>\n\n <div class="controls-secondary">\n <div class="volume slider-bar"></div>\n <div class="controls-secondary-buttons">\n <div class="control control-mute"></div>\n <div class="control control-repeat"></div>\n <div class="control control-shuffle"></div>\n <div class="control control-menu"></div>\n </div>\n </div>\n\n <div class="now-playing">\n <div class="playing-thumb thumb">\n <div class="mdi remote-toggle"></div>\n </div>\n <div class="playing-info">\n <div class="playing-progress slider-bar"></div>\n <div class="playing-time">\n <div class="playing-time-current">0</div>\n <div class="playing-time-duration">0:00</div>\n </div>\n <div class="playing-meta">\n <div class="playing-title">')),d(t.gettext("Nothing playing")),d(b('</div>\n <div class="playing-subtitle"></div>\n </div>\n </div>\n </div>\n\n</div>\n'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/playlist/list/tpl/playlist_bar.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="playlist-header">\n <ul class="player-toggle">\n <li class="kodi">')),d(t.gettext("Kodi")),d(b('</li>\n <li class="local">')),d(t.gettext("Local")),d(b('</li>\n </ul>\n <div class="playlist-menu dropdown">\n <i data-toggle="dropdown" class="menu-toggle"></i>\n <ul class="dropdown-menu pull-right">\n <li class="dropdown-header">')),d(t.gettext("Current playlist")),d(b('</li>\n <li><a href="#" class="clear-playlist">')),d(t.gettext("Clear playlist")),d(b('</a></li>\n <li><a href="#" class="refresh-playlist">')),d(t.gettext("Refresh playlist")),d(b('</a></li>\n <li class="dropdown-header">')),d(t.gettext("Kodi")),d(b('</li>\n <li><a href="#" class="party-mode">')),d(t.gettext("Party mode")),d(b(' <i class="mdi-navigation-check"></i></a></li>\n <li><a href="#" class="save-playlist">')),d(t.gettext("Save Kodi playlist")),d(b('</a></li>\n </li>\n </ul>\n </div>\n</div>\n<div class="playlists-wrapper">\n <div class="kodi-playlists">\n <ul class="media-toggle">\n <li class="audio">')),d(t.gettext("Audio")),d(b('</li>\n <li class="video">')),d(t.gettext("Video")),d(b('</li>\n </ul>\n <div class="kodi-playlist"></div>\n </div>\n <div class="local-playlists">\n <div class="local-playlist"></div>\n </div>\n</div>\n'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/playlist/list/tpl/playlist_item.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="item-inner item-')),d(this.type),d(b('">\n <div class="artwork">\n <div class="thumb" title="')),d(this.label),d(b('" style="background-image: url(\'')),d(this.thumbnail),d(b('\')">\n <div class="mdi play"></div>\n ')),this.canThumbsUp&&d(b('\n <div class="mdi thumbs"></div>\n ')),d(b('\n </div>\n </div>\n <div class="meta">\n <div class="title"><a href="#')),d(this.url),d(b('" title="')),d(this.label),d(b('">')),d(this.label),d(b("</a></div>\n ")),null!=this.subtitle&&(d(b('\n <div class="subtitle">')),d(b(this.subtitle)),d(b("</div>\n "))),d(b('\n </div>\n <div class="remove"></div>\n</div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/playlist/m3u/tpl/list.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){var a,c,e,f;for(d(b("#EXTCPlayListM3U::M3U\n")),f=this.items,a=0,e=f.length;e>a;a++)c=f[a],d(b("#EXTINF:")),d(c.duration),d(b(",")),d(c.artist.join("/")),d(b(" - ")),d(c.label),d(b("\n")),d(c.file),d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/playlist/show/tpl/landing.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="playlist-page playlist-page__empty set-page">\n <h3>')),d(t.gettext("Now playing - Playlists")),d(b("</h3>\n <p>")),d(t.gettext("Switch between Kodi and local playback via the tabs. You can toggle visibility with the arrow in the top right")),d(b("</p>\n</div>\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/pvr/recordingList/tpl/recording.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="title">\n <strong>')),d(this.label),d(b("</strong> <span>- ")),d(this.channel),d(b('</span>\n</div>\n<div class="date">\n ')),d(this.start.toString("h:mmtt").toLowerCase()),d(b(" -\n ")),"1970"!==this.end.toString("yyyy")?(d(b("\n ")),d(this.end.toString("h:mmtt").toLowerCase()),d(b("\n (")),d(helpers.global.formatTime(helpers.global.secToTime(this.runtime))),d(b(")\n "))):(d(b("\n ")),d(tr("Now")),d(b("\n "))),d(b("\n\n <br />")),d(this.start.toString("dddd, dS MMM")),d(b('\n</div>\n<div class="plot">')),d(this.plot),d(b('</div>\n<div class="entity-progress">\n <div class="current-progress" style="width: ')),d(this.progress),d(b('%" title="')),d(this.progress),d(b("% ")),d(t.gettext("complete")),d(b('"></div>\n</div>\n<ul class="actions">\n <li class="play"></li>\n</ul>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/search/list/tpl/search_layout.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="search-inner">\n <div class="entity-set entity-set-movie"></div>\n <div class="entity-set entity-set-tvshow"></div>\n <div class="entity-set entity-set-artist"></div>\n <div class="entity-set entity-set-album"></div>\n <div class="entity-set entity-set-song"></div>\n <div class="entity-set entity-set-loading"></div>\n <div class="entity-set entity-set-addons"></div>\n</div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/search/list/tpl/search_set.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<h2 class="set-header"></h2>\n<div class="set-results"></div>\n<div class="more"></div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/search/list/tpl/search_sidebar.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="sidebar-section sidebar-section-media">\n <h3>Local media</h3>\n <ul class="search-media-links"></ul>\n</div>\n\n<div class="sidebar-section sidebar-section-addon">\n <h3>Addons</h3>\n <ul class="search-addon-links"></ul>\n</div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/search/show/tpl/landing.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="search-page search-page__empty set-page">\n <h3>')),d(t.gettext("Enter your search above")),d(b("</h3>\n</div>\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/settings/show/tpl/settings_sidebar.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="settings-sidebar">\n <div class="settings-sidebar--section local-nav nav-sub"></div>\n <div class="settings-sidebar--section kodi-nav"></div>\n</div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/shell/show/tpl/homepage.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div id="homepage"></div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/shell/show/tpl/shell.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div id="shell">\n\n <a id="logo" href="#"></a>\n\n <div id="nav-bar"></div>\n\n <div id="header">\n\n <h1 id="page-title">\n <span class="context"></span>\n <span class="title"></span>\n </h1>\n\n <ul class="mobile-menu">\n <li><a href="#remote" class="mobile-menu--link__remote remote-toggle"><i></i></a></li>\n <li><a href="#search" class="mobile-menu--link__search"><i></i></a></li>\n <li><a href="#playlist" class="mobile-menu--link__playlist"><i></i></a></li>\n </ul>\n\n <div id="selected-region">\n <div class="selected-text">\n <span id="selected-count"></span>\n </div>\n <i data-toggle="dropdown" class="menu-toggle"></i>\n <ul class="dropdown-menu pull-right">\n <li class="selected-play">')),d(tr("Play in Kodi")),d(b('</li>\n <li class="selected-add">')),d(tr("Queue in Kodi")),d(b('</li>\n <li class="selected-localadd">')),d(tr("Add to playlist")),d(b('</li>\n </ul>\n </div>\n\n <div id="search-region">\n <input id="search" title="Search">\n <span id="do-search"></span>\n </div>\n\n </div>\n\n <div id="main">\n\n <div id="sidebar-one"></div>\n\n <div id="content">')),d(tr("Loading things...")),d(b('</div>\n\n </div>\n\n <div id="sidebar-two">\n <div class="playlist-toggle-open"></div>\n <div id="playlist-summary"></div>\n <div id="playlist-bar"></div>\n </div>\n\n <div id="remote"></div>\n\n <div id="player-wrapper">\n <footer id="player-kodi"></footer>\n <footer id="player-local"></footer>\n </div>\n\n <div class="player-menu-wrapper">\n <ul class="player-menu">\n <li class="video-scan">')),d(t.gettext("Scan video library")),d(b('</li>\n <li class="audio-scan">')),d(t.gettext("Scan audio library")),d(b('</li>\n <li class="send-input">')),d(t.gettext("Send text to Kodi")),d(b('</li>\n <li class="goto-lab">')),d(t.gettext("The lab")),d(b('</li>\n <li class="about">')),d(t.gettext("About Chorus")),d(b('</li>\n </ul>\n </div>\n\n</div>\n\n<div id="fanart"></div>\n<div id="fanart-overlay"></div>\n\n<div id="snackbar-container"></div>\n\n<div class="modal fade" id="modal-window">\n <div class="modal-dialog">\n <div class="modal-content">\n <div class="modal-header">\n <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>\n <h4 class="modal-title"></h4>\n </div>\n <div class="modal-body"></div>\n <div class="modal-footer"></div>\n </div>\n </div>\n</div>\n\n<div id="offscreen"></div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/song/list/tpl/song.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<td class="cell-first">\n <div class="thumb" style="background-image: url(\'')),d(this.thumbnail),d(b('\')">\n </div>\n <div class="track">')),d(this.track),d(b('</div>\n <div class="mdi play"></div>\n</td>\n<td class="cell-label song-title"><span class="crop">')),d(this.label),d(b('</span></td>\n<td class="cell-label song-album"><a class="crop" href="#music/album/')),d(this.albumid),d(b('">')),d(this.album),d(b('</a></td>\n<td class="cell-label song-artist"><a class="crop" href="#music/artist/')),d(this.artistid),d(b('">')),d(this.artist),d(b('</a></td>\n<td class="cell-last">\n <li class="thumbed-up"></li>\n <div class="duration">')),d(this.displayDuration),d(b('</div>\n <ul class="actions">\n <li class="mdi thumbs"></li>\n <li class="mdi add"></li>\n <li class="menu dropdown">\n <i data-toggle="dropdown" class="mdi"></i>\n <ul class="dropdown-menu pull-right"></ul>\n </li>\n </ul>\n</td>\n<td class="cell-remove song-remove">\n <i class="mdi mdi-navigation-close"></i>\n</td>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/thumbs/list/tpl/thumbs_layout.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="thumbs-inner">\n <div class="entity-set entity-set-movie"></div>\n <div class="entity-set entity-set-tvshow"></div>\n <div class="entity-set entity-set-episode"></div>\n <div class="entity-set entity-set-artist"></div>\n <div class="entity-set entity-set-album"></div>\n <div class="entity-set entity-set-song"></div>\n</div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/thumbs/list/tpl/thumbs_set.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<h2 class="set-header"></h2>\n<div class="set-results"></div>\n<div class="more"></div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/tvshow/episode/tpl/content.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('\n<div class="section-content">\n <h2>')),d(t.gettext("Synopsis")),d(b("</h2>\n <p>")),d(this.plot),d(b("</p>\n</div>\n\n")),this.cast.length>0&&(d(b('\n <div class="section-content">\n <h2>')),d(tr("Full cast")),d(b('</h2>\n <div class="region-cast"></div>\n </div>\n'))),d(b('\n\n<div class="section-content section-full-width">\n <h2>')),d(tr("Season")),d(b(" ")),d(this.season),d(b('</h2>\n <div class="region-season"></div>\n</div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/tvshow/episode/tpl/details_meta.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){var a,c,e,f;if(d(b('<div class="region-details-top">\n ')),null!=this.showtitle&&d(b("\n\n ")),d(b('\n <div class="region-details-title">\n <h2>\n <span class="title">')),d(this.label),d(b('</span>\n <span class="sub show-title"><a href="#')),d(this.url.split("/",2).join("/")),d(b('">')),d(this.showtitle),d(b('</a></span>\n <span class="sub">S')),d(this.season),d(b(" E")),d(this.episode),d(b('</span>\n </h2>\n </div>\n <div class="region-details-rating">\n ')),d(this.rating),d(b(' <i></i>\n </div>\n</div>\n<div class="region-details-meta-below">\n\n <div class="region-details-subtext">\n\n ')),this.runtime>0&&(d(b('\n <div class="runtime">\n ')),d(helpers.global.formatTime(helpers.global.secToTime(this.runtime))),d(b("\n </div>\n "))),d(b('\n\n </div>\n\n <ul class="meta">\n <li><label>')),d(t.gettext("Season")),d(b(':</label> <span><a href="#tvshow/')),d(this.tvshowid),d(b("/")),d(this.season),d(b('">')),d(t.gettext("Season")),d(b(" ")),d(this.season),d(b("</a></span></li>\n ")),this.firstaired&&(d(b("\n <li><label>")),d(t.gettext("First aired")),d(b(":</label> <span>")),d(this.firstaired),d(b(" </span></li>\n "))),d(b("\n ")),this.director.length>0&&(d(b("\n <li><label>")),d(t.ngettext("Director","Directors",this.director.length)),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("tvshows","director",this.director))),d(b("</span></li>\n "))),d(b("\n ")),this.writer.length>0&&(d(b("\n <li><label>")),d(t.ngettext("Writer","Writers",this.writer.length)),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("tvshows","writer",this.writer))),d(b("</span></li>\n "))),d(b("\n ")),this.cast.length>0&&(d(b("\n <li><label>")),d(t.gettext("Cast")),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("tvshows","cast",_.pluck(this.cast,"name")))),d(b("</span></li>\n "))),d(b('\n </ul>\n\n <ul class="streams">\n ')),this.streamdetails.video.length>0&&(d(b("\n <li><label>")),d(t.gettext("Video")),d(b(":</label> <span>")),d(_.pluck(this.streamdetails.video,"label").join(", ")),d(b("</span></li>\n "))),d(b("\n ")),this.streamdetails.audio.length>0&&(d(b("\n <li><label>")),d(t.gettext("Audio")),d(b(":</label> <span>")),d(_.pluck(this.streamdetails.audio,"label").join(", ")),d(b("</span></li>\n "))),d(b("\n ")),this.streamdetails.subtitle.length>0&&""!==this.streamdetails.subtitle[0].label){for(d(b("\n <li><label>")),d(t.ngettext("Subtitle","Subtitles",this.streamdetails.subtitle.length)),d(b(':</label>\n <span class="dropdown"><span data-toggle="dropdown">')),d(_.first(_.pluck(this.streamdetails.subtitle,"label"))),d(b('</span>\n <ul class="dropdown-menu">\n ')),e=this.streamdetails.subtitle,a=0,c=e.length;c>a;a++)f=e[a],d(b("\n <li>")),d(f.label),d(b("</li>\n "));d(b("\n </ul>\n </span>\n </li>\n "))}d(b('\n </ul>\n\n <ul class="inline-links">\n <li class="btn-flat-play play">')),d(tr("Play")),d(b('</li>\n <li class="btn-flat-add add">')),d(tr("Queue")),d(b('</li>\n <li class="btn-flat-stream stream">')),d(tr("Stream")),d(b('</li>\n <li class="btn-flat-watched watched">\n ')),d(t.gettext("set")),d(b(' <span class="action-watched">')),d(tr("watched")),d(b('</span><span class="action-unwatched">')),d(tr("unwatched")),d(b('</span>\n </li>\n <li class="more-actions dropdown">\n <span class="btn-flat-more" data-toggle="dropdown" aria-expanded="true">')),d(tr("more")),d(b('</span>\n <ul class="dropdown-menu pull-right">\n <li class="download">')),d(tr("Download")),d(b('</li>\n <li class="divider"></li>\n <li class="dropdown-submenu internal-search">')),d(tr("Chorus Search")),d(b('\n <ul class="dropdown-menu">\n ')),d(b(helpers.entities.getAddonSearchMenuItems(this.showtitle))),d(b('\n </ul>\n </li>\n <li class="dropdown-submenu external-search">')),d(tr("External Search")),d(b('\n <ul class="dropdown-menu">\n <li data-type="google" data-query="')),d(this.showtitle),d(b(" ")),d(this.label),d(b('">Google</li>\n <li data-type="imdb" data-query="')),d(this.showtitle),d(b('">IMDb</li>\n <li data-type="tvdb" data-query="')),d(this.showtitle),d(b('">TVDb</li>\n <li data-type="tmdb" data-query="')),d(this.showtitle),d(b('">TMDb</li>\n </ul>\n </li>\n <li class="youtube-search" data-query="')),d(this.showtitle),d(b('">')),d(tr("YouTube Search")),d(b('</li>\n <li class="divider"></li>\n <li class="refresh">')),d(tr("Refresh")),d(b('</li>\n <li class="edit">')),d(tr("Edit")),d(b("</li>\n </ul>\n </li>\n </ul>\n</div>\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/tvshow/season/tpl/details_meta.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="region-details-top">\n <div class="region-details-title">\n <h2>\n <span class="title">')),d(tr("Season")),d(b(" ")),d(this.season),d(b('</span>\n <span class="sub"><a href="#tvshow/')),d(this.tvshowid),d(b('">')),d(this.label),d(b('</a></span>\n </h2>\n </div>\n <div class="region-details-rating">\n ')),d(this.rating),d(b(' <i></i>\n </div>\n</div>\n<div class="region-details-meta-below">\n\n <ul class="meta">\n ')),this.genre.length>0&&(d(b("\n <li><label>")),d(tr("genre")),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("tvshows","genre",this.genre))),d(b("</span></li>\n "))),d(b("\n ")),this.cast.length>0&&(d(b("\n <li><label>")),d(tr("cast")),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("tvshows","cast",_.pluck(this.cast,"name")))),d(b("</span></li>\n "))),d(b("\n ")),this.studio.length>0&&(d(b("\n <li><label>")),d(tr("studio")),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("tvshows","studio",this.studio))),d(b("</span></li>\n "))),d(b("\n ")),this.mpaa&&(d(b("\n <li><label>")),d(tr("rated")),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("tvshows","mpaa",[this.mpaa]))),d(b("</span></li>\n "))),d(b("\n <li><label>")),d(tr("episodes")),d(b(':</label> <span><span class="episode-total">')),d(this.episode),d(b("</span> ")),d(tr("total")),d(b(' (<span class="episode-unwatched">')),d(this.unwatched),d(b("</span> ")),d(tr("unwatched")),d(b(')</span></li>\n </ul>\n\n <div class="description">')),d(this.plot),d(b('</div>\n\n <ul class="inline-links">\n <li class="btn-flat-play play">')),d(tr("Play")),d(b('</li>\n <li class="btn-flat-add add">')),d(tr("Queue")),d(b('</li>\n <li class="btn-flat-watched watched">\n ')),d(tr("set")),d(b(' <span class="action-watched">')),d(tr("watched")),d(b('</span><span class="action-unwatched">')),d(tr("unwatched")),d(b("</span>\n </li>\n </ul>\n\n</div>\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/tvshow/show/tpl/details_meta.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="region-details-top">\n <div class="region-details-title">\n <h2><span class="title">')),d(this.label),d(b('</span> <span class="sub">')),d(this.year),d(b('</span></h2>\n </div>\n <div class="region-details-rating">\n ')),d(this.rating),d(b(' <i></i>\n </div>\n</div>\n<div class="region-details-meta-below">\n\n <ul class="meta">\n ')),this.genre.length>0&&(d(b("\n <li><label>")),d(tr("genre")),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("tvshows","genre",this.genre))),d(b("</span></li>\n "))),d(b("\n ")),this.cast.length>0&&(d(b("\n <li><label>")),d(tr("cast")),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("tvshows","cast",_.pluck(this.cast,"name")))),d(b("</span></li>\n "))),d(b("\n ")),this.studio.length>0&&(d(b("\n <li><label>")),d(tr("studio")),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("tvshows","studio",this.studio))),d(b("</span></li>\n "))),d(b("\n ")),this.mpaa&&(d(b("\n <li><label>")),d(tr("rated")),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("tvshows","mpaa",[this.mpaa]))),d(b("</span></li>\n "))),d(b("\n <li><label>")),d(tr("episodes")),d(b(':</label> <span><span class="episode-total">')), -d(this.episode),d(b("</span> ")),d(tr("total")),d(b(' (<span class="episode-unwatched">')),d(this.unwatched),d(b("</span> ")),d(tr("unwatched")),d(b(')</span></li>\n </ul>\n\n <div class="description">')),d(this.plot),d(b('</div>\n\n <ul class="inline-links">\n <li class="btn-flat-play play">')),d(tr("Play")),d(b('</li>\n <li class="btn-flat-add add">')),d(tr("Queue")),d(b('</li>\n <li class="btn-flat-watched watched">\n ')),d(tr("set")),d(b(' <span class="action-watched">')),d(tr("watched")),d(b('</span><span class="action-unwatched">')),d(tr("unwatched")),d(b('</span>\n </li>\n <li class="more-actions dropdown">\n <span class="btn-flat-more" data-toggle="dropdown" aria-expanded="true">')),d(tr("more")),d(b('</span>\n <ul class="dropdown-menu pull-right">\n <li class="dropdown-submenu internal-search">')),d(tr("Chorus Search")),d(b('\n <ul class="dropdown-menu">\n ')),d(b(helpers.entities.getAddonSearchMenuItems(this.label))),d(b('\n </ul>\n </li>\n <li class="dropdown-submenu external-search">')),d(tr("External Search")),d(b('\n <ul class="dropdown-menu">\n <li data-type="google" data-query="')),d(this.label),d(b('">Google</li>\n <li data-type="imdb" data-query="')),d(this.label),d(b('">IMDb</li>\n <li data-type="tvdb" data-query="')),d(this.label),d(b('">TVDb</li>\n <li data-type="tmdb" data-query="')),d(this.label),d(b('">TMDb</li>\n </ul>\n </li>\n <li class="youtube-search" data-query="')),d(this.label),d(b('">')),d(tr("YouTube Search")),d(b('</li>\n <li class="divider"></li>\n <li class="dropdown-submenu">')),d(tr("Refresh")),d(b('\n <ul class="dropdown-menu">\n <li class="refresh">')),d(tr("Show only")),d(b('</li>\n <li class="refresh-episodes">')),d(tr("Show and episodes")),d(b('</li>\n </ul>\n </li>\n <li class="edit">')),d(tr("Edit")),d(b("</li>\n </ul>\n </li>\n </ul>\n\n</div>\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["components/form/tpl/form.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="form-inner">\n <div class="form-content-region"></div>\n <footer>\n <ul class="inline-list">\n <li>\n <button type="submit" data-form-button="submit" class="btn btn-primary form-save">Save</button>\n </li>\n <li class="response">\n\n </li>\n </ul>\n </footer>\n</div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["components/form/tpl/form_item.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){this.title&&(d(b('\n <label class="control-label">')),d(b(this.title)),d(b("</label>\n"))),d(b("\n\n")),"markup"===this.type?(d(b("\n ")),d(b(this.element)),d(b("\n"))):(d(b('\n <div class="element">\n ')),"checkbox"!==this.type?(d(b("\n ")),d(b(this.element)),d(b("\n "))):(d(b('\n <div class="togglebutton">\n <label>')),d(b(this.element)),d(b("</label>\n </div>\n "))),d(b("\n ")),this.description&&(d(b('\n <div class="help-block description">')),d(b(this.description)),d(b("</div>\n "))),d(b("\n </div>\n"))),d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["components/form/tpl/form_item_group.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){this.title&&(d(b('\n <h3 class="group-title">')),this.icon&&(d(b('<i class="')),d(b(this.icon)),d(b('"></i> '))),d(b(this.title)),d(b("</h3>\n"))),d(b('\n<div class="form-items"></div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["components/form/tpl/form_item_imageselect.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="form-imageselect">\n <ul class="form-imageselect__tabs">\n <li data-pane="select" class="active">')),d(tr("Image Selector")),d(b('</li>\n <li data-pane="url">')),d(tr("Image URL")),d(b('</li>\n </ul>\n <div class="form-imageselect__panes">\n <div class="pane active" rel="select">\n <ul class="form-imageselect__thumbs">\n ')),this.image&&(d(b('\n <li data-original="')),d(this.image.original),d(b('" class="selected"><img src="')),d(this.image.thumb),d(b('" /></li>\n '))),d(b('\n </ul>\n <div class="form-imageselect__loader"><div class="loader-small-inline"></div> <span>')),d(tr("Searching for more images")),d(b('</span></div>\n </div>\n <div class="pane" rel="url">\n ')),this.title&&(d(b('\n <label class="control-label">')),d(b(this.title)),d(b("</label>\n "))),d(b('\n <div class="form-imageselect__url">\n ')),d(b(this.element)),d(b("\n </div>\n ")),this.description&&(d(b('\n <div class="help-block description">')),d(b(this.description)),d(b("</div>\n "))),d(b("\n </div>\n </div>\n</div>"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["views/card/tpl/card.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){var a,c,e;if(d(b('<div class="card-')),d(this.type),d(b('">\n <div class="artwork">\n <a href="#')),d(this.url),d(b('" class="thumb" title="')),d(helpers.global.stripTags(this.label)),d(b('" style="background-image: url(\'')),d(this.thumbnail),d(b('\')"></a>\n <div class="mdi play" title="')),d(tr("Play")),d(b('"></div>\n ')),("channeltv"===this.type||"channelradio"===this.type)&&d(b('\n <div class="mdi record"></div>\n ')),d(b('\n </div>\n <div class="meta">\n <div class="title"><a href="#')),d(this.url),d(b('" title="')),d(helpers.global.stripTags(this.label)),d(b('">')),d(b(this.label)),d(b("</a></div>\n ")),null!=this.subtitle&&(d(b('\n <div class="subtitle">')),d(b(this.subtitle)),d(b("</div>\n "))),d(b("\n </div>\n ")),this.actions){d(b('\n <ul class="actions">\n ')),c=this.actions;for(a in c)e=c[a],d(b('<li class="mdi ')),d(a),d(b('" title="')),d(e),d(b('"></li>'));d(b("\n </ul>\n "))}d(b("\n ")),this.menu&&d(b('\n <div class="dropdown">\n <i data-toggle="dropdown" class="mdi"></i>\n <ul class="dropdown-menu"></ul>\n </div>\n ')),d(b("\n ")),this.progress=null!=this.progress?this.progress:0,d(b('\n <div class="entity-progress"><div class="current-progress" style="width: ')),d(this.progress),d(b('%" title="')),d(this.progress),d(b("% ")),d(t.gettext("complete")),d(b('"></div></div>\n</div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["views/card/tpl/card_placeholder.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("<i></i>"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["views/empty/tpl/empty_page.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="empty--page">\n ')),this.title&&(d(b('\n <h2 class="empty--page-title">')),d(title),d(b("</h2>\n "))),d(b("\n\n ")),this.content&&(d(b('\n <div class="empty--page-content">')),d(this.content),d(b("</div>\n "))),d(b("\n</div>"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["views/empty/tpl/empty_results.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="empty-result">\n <h2>')),d(b(t.sprintf(tr("No %1$s found"),'<span class="empty-key">'+tr("results")+"</span>"))),d(b('</h2>\n <div class="empty-actions">\n <div class="back-link"></div>\n </div>\n</div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["views/layouts/tpl/layout_details_header.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="layout-container details-header">\n\n <div class="region-details-side"></div>\n\n <div class="region-details-meta-wrapper"><div class="region-details-meta">\n\n <div class="region-details-title"><span class="title"></span> <span class="sub"></span></div>\n\n <div class="region-details-meta-below">\n <div class="region-details-subtext"></div>\n <div class="description"></div>\n </div>\n\n </div></div>\n\n ')),this.fanart&&(d(b('\n <div class="region-details-fanart" style="background-image: url(\'')),d(this.fanart),d(b('\')"><div class="gradient"></div></div>\n '))),d(b("\n</div>\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["views/layouts/tpl/layout_with_header.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="layout-container with-header">\n\n <header class="region-header"></header>\n\n <div class="region-content-wrapper">\n <div class="entity-progress"><div class="current-progress" style="width: ')),d(this.progress),d(b('%" title="')),d(this.progress),d(b("% ")),d(t.gettext("complete")),d(b('"></div></div>\n <section class="region-content"></section>\n </div>\n\n</div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["views/layouts/tpl/layout_with_sidebar_first.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="layout-container with-sidebar-first">\n\n <div class="region-first-toggle"></div>\n <section class="region-first">\n <div class="region-first-primary"></div>\n <div class="region-first-secondary"></div>\n </section>\n\n <section class="region-content-wrapper">\n <div class="region-content-top"></div>\n <div class="region-content"></div>\n </section>\n\n</div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["views/song/tpl/song_placeholder.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<td colspan="6"><i></i></td>\n'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())};;var tr, +}this._hasPushState?b.$(window).on("popstate",this.checkUrl):this._wantsHashChange&&"onhashchange"in window&&!f?b.$(window).on("hashchange",this.checkUrl):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),this.fragment=d;var h=this.location;if(this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot())return this.fragment=this.getFragment(null,!0),this.location.replace(this.root+"#"+this.fragment),!0;this._hasPushState&&this.atRoot()&&h.hash&&(this.fragment=this.getHash().replace(E,""),this.history.replaceState({},document.title,this.root+this.fragment))}return this.options.silent?void 0:this.loadUrl()},stop:function(){b.$(window).off("popstate",this.checkUrl).off("hashchange",this.checkUrl),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),D.started=!1},route:function(a,b){this.handlers.unshift({route:a,callback:b})},checkUrl:function(a){var b=this.getFragment();return b===this.fragment&&this.iframe&&(b=this.getFragment(this.getHash(this.iframe))),b===this.fragment?!1:(this.iframe&&this.navigate(b),void this.loadUrl())},loadUrl:function(a){return a=this.fragment=this.getFragment(a),c.any(this.handlers,function(b){return b.route.test(a)?(b.callback(a),!0):void 0})},navigate:function(a,b){if(!D.started)return!1;b&&b!==!0||(b={trigger:!!b});var c=this.root+(a=this.getFragment(a||""));if(a=a.replace(I,""),this.fragment!==a){if(this.fragment=a,""===a&&"/"!==c&&(c=c.slice(0,-1)),this._hasPushState)this.history[b.replace?"replaceState":"pushState"]({},document.title,c);else{if(!this._wantsHashChange)return this.location.assign(c);this._updateHash(this.location,a,b.replace),this.iframe&&a!==this.getFragment(this.getHash(this.iframe))&&(b.replace||this.iframe.document.open().close(),this._updateHash(this.iframe.location,a,b.replace))}return b.trigger?this.loadUrl(a):void 0}},_updateHash:function(a,b,c){if(c){var d=a.href.replace(/(javascript:|#).*$/,"");a.replace(d+"#"+b)}else a.hash="#"+b}}),b.history=new D;var J=function(a,b){var d,e=this;d=a&&c.has(a,"constructor")?a.constructor:function(){return e.apply(this,arguments)},c.extend(d,e,b);var f=function(){this.constructor=d};return f.prototype=e.prototype,d.prototype=new f,a&&c.extend(d.prototype,a),d.__super__=e.prototype,d};m.extend=o.extend=y.extend=t.extend=D.extend=J;var K=function(){throw new Error('A "url" property or function must be specified')},L=function(a,b){var c=b.error;b.error=function(d){c&&c(a,d,b),a.trigger("error",a,d,b)}};return b}),"object"!=typeof JSON&&(JSON={}),function(){"use strict";function f(a){return 10>a?"0"+a:a}function quote(a){return escapable.lastIndex=0,escapable.test(a)?'"'+a.replace(escapable,function(a){var b=meta[a];return"string"==typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function str(a,b){var c,d,e,f,g,h=gap,i=b[a];switch(i&&"object"==typeof i&&"function"==typeof i.toJSON&&(i=i.toJSON(a)),"function"==typeof rep&&(i=rep.call(b,a,i)),typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i)return"null";if(gap+=indent,g=[],"[object Array]"===Object.prototype.toString.apply(i)){for(f=i.length,c=0;f>c;c+=1)g[c]=str(c,i)||"null";return e=0===g.length?"[]":gap?"[\n"+gap+g.join(",\n"+gap)+"\n"+h+"]":"["+g.join(",")+"]",gap=h,e}if(rep&&"object"==typeof rep)for(f=rep.length,c=0;f>c;c+=1)"string"==typeof rep[c]&&(d=rep[c],e=str(d,i),e&&g.push(quote(d)+(gap?": ":":")+e));else for(d in i)Object.prototype.hasOwnProperty.call(i,d)&&(e=str(d,i),e&&g.push(quote(d)+(gap?": ":":")+e));return e=0===g.length?"{}":gap?"{\n"+gap+g.join(",\n"+gap)+"\n"+h+"}":"{"+g.join(",")+"}",gap=h,e}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var cx,escapable,gap,indent,meta,rep;"function"!=typeof JSON.stringify&&(escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(a,b,c){var d;if(gap="",indent="","number"==typeof c)for(d=0;c>d;d+=1)indent+=" ";else"string"==typeof c&&(indent=c);if(rep=b,b&&"function"!=typeof b&&("object"!=typeof b||"number"!=typeof b.length))throw new Error("JSON.stringify");return str("",{"":a})}),"function"!=typeof JSON.parse&&(cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,JSON.parse=function(text,reviver){function walk(a,b){var c,d,e=a[b];if(e&&"object"==typeof e)for(c in e)Object.prototype.hasOwnProperty.call(e,c)&&(d=walk(e,c),void 0!==d?e[c]=d:delete e[c]);return reviver.call(a,b,e)}var j;if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}();var saveAs=saveAs||function(a){"use strict";if(!("undefined"==typeof a||"undefined"!=typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent))){var b=a.document,c=function(){return a.URL||a.webkitURL||a},d=b.createElementNS("http://www.w3.org/1999/xhtml","a"),e="download"in d,f=function(a){var b=new MouseEvent("click");a.dispatchEvent(b)},g=/constructor/i.test(a.HTMLElement)||a.safari,h=/CriOS\/[\d]+/.test(navigator.userAgent),i=function(b){(a.setImmediate||a.setTimeout)(function(){throw b},0)},j="application/octet-stream",k=4e4,l=function(a){var b=function(){"string"==typeof a?c().revokeObjectURL(a):a.remove()};setTimeout(b,k)},m=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"==typeof e)try{e.call(a,c||a)}catch(f){i(f)}}},n=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob([String.fromCharCode(65279),a],{type:a.type}):a},o=function(b,i,k){k||(b=n(b));var o,p=this,q=b.type,r=q===j,s=function(){m(p,"writestart progress write writeend".split(" "))},t=function(){if((h||r&&g)&&a.FileReader){var d=new FileReader;return d.onloadend=function(){var b=h?d.result:d.result.replace(/^data:[^;]*;/,"data:attachment/file;"),c=a.open(b,"_blank");c||(a.location.href=b),b=void 0,p.readyState=p.DONE,s()},d.readAsDataURL(b),void(p.readyState=p.INIT)}if(o||(o=c().createObjectURL(b)),r)a.location.href=o;else{var e=a.open(o,"_blank");e||(a.location.href=o)}p.readyState=p.DONE,s(),l(o)};return p.readyState=p.INIT,e?(o=c().createObjectURL(b),void setTimeout(function(){d.href=o,d.download=i,f(d),s(),l(o),p.readyState=p.DONE})):void t()},p=o.prototype,q=function(a,b,c){return new o(a,b||a.name||"download",c)};return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(a,b,c){return b=b||a.name||"download",c||(a=n(a)),navigator.msSaveOrOpenBlob(a,b)}:(p.abort=function(){},p.readyState=p.INIT=0,p.WRITING=1,p.DONE=2,p.error=p.onwritestart=p.onprogress=p.onwrite=p.onabort=p.onerror=p.onwriteend=null,q)}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);"undefined"!=typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!=typeof define&&null!==define&&null!==define.amd&&define("FileSaver.js",function(){return saveAs}),function(a,b){if("object"==typeof exports)module.exports=b(require("underscore"),require("backbone"));else if("function"==typeof define&&define.amd)define(["underscore","backbone"],b);else{for(var c="FilteredCollection",d=c.split("."),e=a,f=0;f<d.length-1;f++)void 0===e[d[f]]&&(e[d[f]]={}),e=e[d[f]];e[d[d.length-1]]=b(a._,a.Backbone)}}(this,function(a,b){function c(c){return{underscore:a,backbone:b}[c]}var d=function(a){function b(a){var c=b.cache[a];if(!c){var d={};c=b.cache[a]={id:a,exports:d},b.modules[a].call(d,c,d)}return c.exports}return b.cache=[],b.modules=[function(a,d){function e(){this._filterResultCache={}}function f(a){for(var b in this._filterResultCache)this._filterResultCache.hasOwnProperty(b)&&delete this._filterResultCache[b][a]}function g(a,b){this._filters[a]&&f.call(this,a),this._filters[a]=b,this.trigger("filtered:add",a)}function h(a){delete this._filters[a],f.call(this,a),this.trigger("filtered:remove",a)}function i(a){this._filterResultCache[a.cid]||(this._filterResultCache[a.cid]={});var b=this._filterResultCache[a.cid];for(var c in this._filters)if(this._filters.hasOwnProperty(c)&&(b.hasOwnProperty(c)||(b[c]=this._filters[c].fn(a)),!b[c]))return!1;return!0}function j(){var a=[];this._superset&&(a=this._superset.filter(p.bind(i,this))),this._collection.reset(a),this.length=this._collection.length}function k(a){if(this._filterResultCache[a.cid]={},i.call(this,a)){if(!this._collection.get(a.cid)){for(var b=this.superset().indexOf(a),c=null,d=b-1;d>=0;d-=1)if(this.contains(this.superset().at(d))){c=this.indexOf(this.superset().at(d))+1;break}c=c||0,this._collection.add(a,{at:c})}}else this._collection.get(a.cid)&&this._collection.remove(a);this.length=this._collection.length}function l(a){this._filterResultCache[a.cid]={},i.call(this,a)||this._collection.get(a.cid)&&this._collection.remove(a)}function m(a,b,c){"change:"===a.slice(0,7)&&l.call(this,arguments[1])}function n(a){this.contains(a)&&this._collection.remove(a),this.length=this._collection.length}function o(a){this._superset=a,this._collection=new q.Collection(a.toArray()),r(this._collection,this),this.resetFilters(),this.listenTo(this._superset,"reset sort",j),this.listenTo(this._superset,"add change",k),this.listenTo(this._superset,"remove",n),this.listenTo(this._superset,"all",m)}var p=c("underscore"),q=c("backbone"),r=b(1),s=b(2),t={defaultFilterName:"__default",filterBy:function(a,b){return b||(b=a,a=this.defaultFilterName),g.call(this,a,s(b)),j.call(this),this},removeFilter:function(a){return a||(a=this.defaultFilterName),h.call(this,a),j.call(this),this},resetFilters:function(){return this._filters={},e.call(this),this.trigger("filtered:reset"),j.call(this),this},superset:function(){return this._superset},refilter:function(a){return"object"==typeof a&&a.cid?k.call(this,a):(e.call(this),j.call(this)),this},getFilters:function(){return p.keys(this._filters)},hasFilter:function(a){return p.contains(this.getFilters(),a)},destroy:function(){this.stopListening(),this._collection.reset([]),this._superset=this._collection,this.length=0,this.trigger("filtered:destroy")}};p.extend(o.prototype,t,q.Events),a.exports=o},function(a,b){function d(a,b){function c(){b.length=a.length}function d(c){var d=e.toArray(arguments),f="change"===c||"change:"===c.slice(0,7);"reset"===c&&(b.models=a.models),e.contains(h,c)?(e.contains(["add","remove","destroy"],c)?d[2]=b:e.contains(["reset","sort"],c)&&(d[1]=b),b.trigger.apply(this,d)):f&&b.contains(d[1])&&b.trigger.apply(this,d)}var i={};return e.each(e.functions(f.Collection.prototype),function(b){e.contains(g,b)||(i[b]=function(){return a[b].apply(a,arguments)})}),e.extend(b,f.Events,i),b.listenTo(a,"all",c),b.listenTo(a,"all",d),b.models=a.models,c(),b}var e=c("underscore"),f=c("backbone"),g=["_onModelEvent","_prepareModel","_removeReference","_reset","add","initialize","sync","remove","reset","set","push","pop","unshift","shift","sort","parse","fetch","create","model","off","on","listenTo","listenToOnce","bind","trigger","once","stopListening"],h=["add","remove","reset","sort","destroy","sync","request","error"];a.exports=d},function(a,b){function d(a,b){return function(c){return c.get(a)===b}}function e(a,b){return function(c){return b(c.get(a))}}function f(a,b){return i.isArray(b)||(b=null),{fn:a,keys:b}}function g(a){var b=i.keys(a),c=i.map(b,function(b){var c=a[b];return i.isFunction(c)?e(b,c):d(b,c)}),g=function(a){for(var b=0;b<c.length;b++)if(!c[b](a))return!1;return!0};return f(g,b)}function h(a,b){return i.isFunction(a)?f(a,b):i.isObject(a)?g(a):void 0}var i=c("underscore");a.exports=h}],b(0)}();return d}),function(a,b){if("function"==typeof define&&define.amd)define(["backbone","underscore"],function(a,c){return b(a,c)});else if("undefined"!=typeof exports){var c=require("backbone"),d=require("underscore");module.exports=b(c,d)}else b(a.Backbone,a._)}(this,function(a,b){"use strict";var c=a.ChildViewContainer;return a.ChildViewContainer=function(a,b){var c=function(a){this._views={},this._indexByModel={},this._indexByCustom={},this._updateLength(),b.each(a,this.add,this)};b.extend(c.prototype,{add:function(a,b){var c=a.cid;return this._views[c]=a,a.model&&(this._indexByModel[a.model.cid]=c),b&&(this._indexByCustom[b]=c),this._updateLength(),this},findByModel:function(a){return this.findByModelCid(a.cid)},findByModelCid:function(a){var b=this._indexByModel[a];return this.findByCid(b)},findByCustom:function(a){var b=this._indexByCustom[a];return this.findByCid(b)},findByIndex:function(a){return b.values(this._views)[a]},findByCid:function(a){return this._views[a]},remove:function(a){var c=a.cid;return a.model&&delete this._indexByModel[a.model.cid],b.any(this._indexByCustom,function(a,b){return a===c?(delete this._indexByCustom[b],!0):void 0},this),delete this._views[c],this._updateLength(),this},call:function(a){this.apply(a,b.tail(arguments))},apply:function(a,c){b.each(this._views,function(d){b.isFunction(d[a])&&d[a].apply(d,c||[])})},_updateLength:function(){this.length=b.size(this._views)}});var d=["forEach","each","map","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","toArray","first","initial","rest","last","without","isEmpty","pluck","reduce"];return b.each(d,function(a){c.prototype[a]=function(){var c=b.values(this._views),d=[c].concat(b.toArray(arguments));return b[a].apply(b,d)}}),c}(a,b),a.ChildViewContainer.VERSION="0.1.6",a.ChildViewContainer.noConflict=function(){return a.ChildViewContainer=c,this},a.ChildViewContainer}),function(a,b){"function"==typeof define&&define.amd?define(["underscore","backbone","jquery"],function(c,d,e){return a.Backbone=b(c,d,e)}):"undefined"!=typeof exports&&"undefined"!=typeof require?module.exports=b(require("underscore"),require("backbone"),require("jquery")):a.Backbone=b(a._,a.Backbone,a.jQuery)}(this,function(a,b,c){function d(b,d){if(b&&a.isObject(b)){if(a.isFunction(b.getCacheKey))return b.getCacheKey(d);b=d&&d.url?d.url:a.isFunction(b.url)?b.url():b.url}else if(a.isFunction(b))return b(d);return d&&d.data?"string"==typeof d.data?b+"?"+d.data:b+"?"+c.param(d.data):b}function e(a,c,d){c=c||{};var e=b.fetchCache.getCacheKey(a,c),f=!1,g=c.lastSync||(new Date).getTime(),h=!1;e&&c.cache!==!1&&(c.cache||c.prefill)&&(c.expires!==!1&&(f=(new Date).getTime()+1e3*(c.expires||300)),c.prefillExpires!==!1&&(h=(new Date).getTime()+1e3*(c.prefillExpires||300)),b.fetchCache._cache[e]={expires:f,lastSync:g,prefillExpires:h,value:d},b.fetchCache.setLocalStorage())}function f(c,e){return a.isFunction(c)?c=c():c&&a.isObject(c)&&(c=d(c,e)),b.fetchCache._cache[c]}function g(a,b){return f(a).lastSync}function h(c,e){a.isFunction(c)?c=c():c&&a.isObject(c)&&(c=d(c,e)),delete b.fetchCache._cache[c],b.fetchCache.setLocalStorage()}function i(){b.fetchCache._cache={}}function j(){if(n&&b.fetchCache.localStorage)try{localStorage.setItem(b.fetchCache.getLocalStorageKey(),JSON.stringify(b.fetchCache._cache))}catch(a){var c=a.code||a.number||a.message;if(22!==c&&1014!==c)throw a;this._deleteCacheWithPriority()}}function k(){if(n&&b.fetchCache.localStorage){var a=localStorage.getItem(b.fetchCache.getLocalStorageKey())||"{}";b.fetchCache._cache=JSON.parse(a)}}function l(a){return window.setTimeout(a,0)}var m={modelFetch:b.Model.prototype.fetch,modelSync:b.Model.prototype.sync,collectionFetch:b.Collection.prototype.fetch},n=function(){var a="undefined"!=typeof window.localStorage;if(a)try{localStorage.setItem("test_support","test_support"),localStorage.removeItem("test_support")}catch(b){a=!1}return a}();return b.fetchCache=b.fetchCache||{},b.fetchCache._cache=b.fetchCache._cache||{},b.fetchCache.enabled=!0,b.fetchCache.priorityFn=function(a,b){return a&&a.expires&&b&&b.expires?a.expires-b.expires:a},b.fetchCache._prioritize=function(){var b=a.values(this._cache).sort(this.priorityFn),c=a.indexOf(a.values(this._cache),b[0]);return a.keys(this._cache)[c]},b.fetchCache._deleteCacheWithPriority=function(){b.fetchCache._cache[this._prioritize()]=null,delete b.fetchCache._cache[this._prioritize()],b.fetchCache.setLocalStorage()},b.fetchCache.getLocalStorageKey=function(){return"backboneCache"},"undefined"==typeof b.fetchCache.localStorage&&(b.fetchCache.localStorage=!0),b.Model.prototype.fetch=function(d){function e(){return d.prefill&&(!d.prefillExpires||k)}function g(){d.parse&&(n=q.parse(n,d)),q.set(n,d),a.isFunction(d.prefillSuccess)&&d.prefillSuccess.call(p,q,n,d),q.trigger("cachesync",q,n,d),q.trigger("sync",q,n,d),e()?o.notifyWith(p,[q]):(a.isFunction(d.success)&&d.success.call(p,q,n,d),o.resolveWith(p,[q]))}if(!b.fetchCache.enabled)return m.modelFetch.apply(this,arguments);d=a.defaults(d||{},{parse:!0});var h=b.fetchCache.getCacheKey(this,d),i=f(h),j=!1,k=!1,n=!1,o=new c.Deferred,p=d.context||this,q=this;if(i&&(j=i.expires,j=j&&i.expires<(new Date).getTime(),k=i.prefillExpires,k=k&&i.prefillExpires<(new Date).getTime(),n=i.value),!j&&(d.cache||d.prefill)&&n&&(null==d.async&&(d.async=!0),d.async?l(g):g(),!e()))return o.promise();var r=m.modelFetch.apply(this,arguments);return"undefined"!=typeof r&&(r.done(a.bind(o.resolve,p,this)).done(a.bind(b.fetchCache.setCache,null,this,d)).fail(a.bind(o.reject,p,this)),o.abort=r.abort),o.promise()},b.Model.prototype.sync=function(a,c,d){if("read"===a||!b.fetchCache.enabled)return m.modelSync.apply(this,arguments);var e,f,g=c.collection,i=[];for(i.push(b.fetchCache.getCacheKey(c,d)),g&&i.push(b.fetchCache.getCacheKey(g)),e=0,f=i.length;f>e;e++)h(i[e]);return m.modelSync.apply(this,arguments)},b.Collection.prototype.fetch=function(d){function e(){return d.prefill&&(!d.prefillExpires||k)}function g(){q[d.reset?"reset":"set"](n,d),a.isFunction(d.prefillSuccess)&&d.prefillSuccess.call(p,q),q.trigger("cachesync",q,n,d),q.trigger("sync",q,n,d),e()?o.notifyWith(p,[q]):(a.isFunction(d.success)&&d.success.call(p,q,n,d),o.resolveWith(p,[q]))}if(!b.fetchCache.enabled)return m.collectionFetch.apply(this,arguments);d=a.defaults(d||{},{parse:!0});var h=b.fetchCache.getCacheKey(this,d),i=f(h),j=!1,k=!1,n=!1,o=new c.Deferred,p=d.context||this,q=this;if(i&&(j=i.expires,j=j&&i.expires<(new Date).getTime(),k=i.prefillExpires,k=k&&i.prefillExpires<(new Date).getTime(),n=i.value),!j&&(d.cache||d.prefill)&&n&&(null==d.async&&(d.async=!0),d.async?l(g):g(),!e()))return o.promise();var r=m.collectionFetch.apply(this,arguments);return"undefined"!=typeof r&&(r.done(a.bind(o.resolve,p,this)).done(a.bind(b.fetchCache.setCache,null,this,d)).fail(a.bind(o.reject,p,this)),o.abort=r.abort),o.promise()},k(),b.fetchCache._superMethods=m,b.fetchCache.setCache=e,b.fetchCache.getCache=f,b.fetchCache.getCacheKey=d,b.fetchCache.getLastSync=g,b.fetchCache.clearItem=h,b.fetchCache.reset=i,b.fetchCache.setLocalStorage=j,b.fetchCache.getLocalStorage=k,b}),function(a,b){"object"==typeof exports&&"function"==typeof require?module.exports=b(require("backbone")):"function"==typeof define&&define.amd?define(["backbone"],function(c){return b(c||a.Backbone)}):b(Backbone)}(this,function(a){function b(){return(65536*(1+Math.random())|0).toString(16).substring(1)}function c(){return b()+b()+"-"+b()+"-"+b()+"-"+b()+"-"+b()+b()+b()}function d(a){return a===Object(a)}function e(a,b){for(var c=a.length;c--;)if(a[c]===b)return!0;return!1}function f(a,b){for(var c in b)a[c]=b[c];return a}function g(a,b){if(null==a)return void 0;var c=a[b];return"function"==typeof c?a[b]():c}return a.LocalStorage=window.Store=function(a,b){if(!this.localStorage)throw"Backbone.localStorage: Environment does not support localStorage.";this.name=a,this.serializer=b||{serialize:function(a){return d(a)?JSON.stringify(a):a},deserialize:function(a){return a&&JSON.parse(a)}};var c=this.localStorage().getItem(this.name);this.records=c&&c.split(",")||[]},f(a.LocalStorage.prototype,{save:function(){this.localStorage().setItem(this.name,this.records.join(","))},create:function(a){return a.id||0===a.id||(a.id=c(),a.set(a.idAttribute,a.id)),this.localStorage().setItem(this._itemName(a.id),this.serializer.serialize(a)),this.records.push(a.id.toString()),this.save(),this.find(a)},update:function(a){this.localStorage().setItem(this._itemName(a.id),this.serializer.serialize(a));var b=a.id.toString();return e(this.records,b)||(this.records.push(b),this.save()),this.find(a)},find:function(a){return this.serializer.deserialize(this.localStorage().getItem(this._itemName(a.id)))},findAll:function(){for(var a,b,c=[],d=0;d<this.records.length;d++)a=this.records[d],b=this.serializer.deserialize(this.localStorage().getItem(this._itemName(a))),null!=b&&c.push(b);return c},destroy:function(a){this.localStorage().removeItem(this._itemName(a.id));for(var b=a.id.toString(),c=0;c<this.records.length;c++)this.records[c]===b&&this.records.splice(c,1);return this.save(),a},localStorage:function(){return localStorage},_clear:function(){var a=this.localStorage(),b=new RegExp("^"+this.name+"-");a.removeItem(this.name);for(var c in a)b.test(c)&&a.removeItem(c);this.records.length=0},_storageSize:function(){return this.localStorage().length},_itemName:function(a){return this.name+"-"+a}}),a.LocalStorage.sync=window.Store.sync=a.localSync=function(b,c,d){var e,f,h=g(c,"localStorage")||g(c.collection,"localStorage"),i=a.$?a.$.Deferred&&a.$.Deferred():a.Deferred&&a.Deferred();try{switch(b){case"read":e=void 0!=c.id?h.find(c):h.findAll();break;case"create":e=h.create(c);break;case"update":e=h.update(c);break;case"delete":e=h.destroy(c)}}catch(j){f=22===j.code&&0===h._storageSize()?"Private browsing is unsupported":j.message}return e?(d&&d.success&&("0.9.10"===a.VERSION?d.success(c,e,d):d.success(e)),i&&i.resolve(e)):(f=f?f:"Record Not Found",d&&d.error&&("0.9.10"===a.VERSION?d.error(c,f,d):d.error(f)),i&&i.reject(f)),d&&d.complete&&d.complete(e),i&&i.promise()},a.ajaxSync=a.sync,a.getSyncMethod=function(b,c){var d=c&&c.ajaxSync;return d||!g(b,"localStorage")&&!g(b.collection,"localStorage")?a.ajaxSync:a.localSync},a.sync=function(b,c,d){return a.getSyncMethod(c,d).apply(this,[b,c,d])},a.LocalStorage}),function(a,b){if("function"==typeof define&&define.amd)define(["backbone","underscore"],function(c,d){return a.Marionette=a.Mn=b(a,c,d)});else if("undefined"!=typeof exports){var c=require("backbone"),d=require("underscore");module.exports=b(a,c,d)}else a.Marionette=a.Mn=b(a,a.Backbone,a._)}(this,function(a,b,c){"use strict";!function(a,b){var c=a.ChildViewContainer;return a.ChildViewContainer=function(a,b){var c=function(a){this._views={},this._indexByModel={},this._indexByCustom={},this._updateLength(),b.each(a,this.add,this)};b.extend(c.prototype,{add:function(a,b){var c=a.cid;return this._views[c]=a,a.model&&(this._indexByModel[a.model.cid]=c),b&&(this._indexByCustom[b]=c),this._updateLength(),this},findByModel:function(a){return this.findByModelCid(a.cid)},findByModelCid:function(a){var b=this._indexByModel[a];return this.findByCid(b)},findByCustom:function(a){var b=this._indexByCustom[a];return this.findByCid(b)},findByIndex:function(a){return b.values(this._views)[a]},findByCid:function(a){return this._views[a]},remove:function(a){var c=a.cid;return a.model&&delete this._indexByModel[a.model.cid],b.any(this._indexByCustom,function(a,b){return a===c?(delete this._indexByCustom[b],!0):void 0},this),delete this._views[c],this._updateLength(),this},call:function(a){this.apply(a,b.tail(arguments))},apply:function(a,c){b.each(this._views,function(d){b.isFunction(d[a])&&d[a].apply(d,c||[])})},_updateLength:function(){this.length=b.size(this._views)}});var d=["forEach","each","map","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","toArray","first","initial","rest","last","without","isEmpty","pluck"];return b.each(d,function(a){c.prototype[a]=function(){var c=b.values(this._views),d=[c].concat(b.toArray(arguments));return b[a].apply(b,d)}}),c}(a,b),a.ChildViewContainer.VERSION="0.1.5",a.ChildViewContainer.noConflict=function(){return a.ChildViewContainer=c,this},a.ChildViewContainer}(b,c),function(a,b){var c=a.Wreqr,d=a.Wreqr={};return a.Wreqr.VERSION="1.3.1",a.Wreqr.noConflict=function(){return a.Wreqr=c,this},d.Handlers=function(a,b){var c=function(a){this.options=a,this._wreqrHandlers={},b.isFunction(this.initialize)&&this.initialize(a)};return c.extend=a.Model.extend,b.extend(c.prototype,a.Events,{setHandlers:function(a){b.each(a,function(a,c){var d=null;b.isObject(a)&&!b.isFunction(a)&&(d=a.context,a=a.callback),this.setHandler(c,a,d)},this)},setHandler:function(a,b,c){var d={callback:b,context:c};this._wreqrHandlers[a]=d,this.trigger("handler:add",a,b,c)},hasHandler:function(a){return!!this._wreqrHandlers[a]},getHandler:function(a){var b=this._wreqrHandlers[a];if(b)return function(){var a=Array.prototype.slice.apply(arguments);return b.callback.apply(b.context,a)}},removeHandler:function(a){delete this._wreqrHandlers[a]},removeAllHandlers:function(){this._wreqrHandlers={}}}),c}(a,b),d.CommandStorage=function(){var c=function(a){this.options=a,this._commands={},b.isFunction(this.initialize)&&this.initialize(a)};return b.extend(c.prototype,a.Events,{getCommands:function(a){var b=this._commands[a];return b||(b={command:a,instances:[]},this._commands[a]=b),b},addCommand:function(a,b){var c=this.getCommands(a);c.instances.push(b)},clearCommands:function(a){var b=this.getCommands(a);b.instances=[]}}),c}(),d.Commands=function(a){return a.Handlers.extend({storageType:a.CommandStorage,constructor:function(b){this.options=b||{},this._initializeStorage(this.options),this.on("handler:add",this._executeCommands,this);var c=Array.prototype.slice.call(arguments);a.Handlers.prototype.constructor.apply(this,c)},execute:function(a,b){a=arguments[0],b=Array.prototype.slice.call(arguments,1),this.hasHandler(a)?this.getHandler(a).apply(this,b):this.storage.addCommand(a,b)},_executeCommands:function(a,c,d){var e=this.storage.getCommands(a);b.each(e.instances,function(a){c.apply(d,a)}),this.storage.clearCommands(a)},_initializeStorage:function(a){var c,d=a.storageType||this.storageType;c=b.isFunction(d)?new d:d,this.storage=c}})}(d),d.RequestResponse=function(a){return a.Handlers.extend({request:function(){var a=arguments[0],b=Array.prototype.slice.call(arguments,1);return this.hasHandler(a)?this.getHandler(a).apply(this,b):void 0}})}(d),d.EventAggregator=function(a,b){var c=function(){};return c.extend=a.Model.extend,b.extend(c.prototype,a.Events),c}(a,b),d.Channel=function(c){var d=function(b){this.vent=new a.Wreqr.EventAggregator,this.reqres=new a.Wreqr.RequestResponse,this.commands=new a.Wreqr.Commands,this.channelName=b};return b.extend(d.prototype,{reset:function(){return this.vent.off(),this.vent.stopListening(),this.reqres.removeAllHandlers(),this.commands.removeAllHandlers(),this},connectEvents:function(a,b){return this._connect("vent",a,b),this},connectCommands:function(a,b){return this._connect("commands",a,b),this},connectRequests:function(a,b){return this._connect("reqres",a,b),this},_connect:function(a,c,d){if(c){d=d||this;var e="vent"===a?"on":"setHandler";b.each(c,function(c,f){this[a][e](f,b.bind(c,d))},this)}}}),d}(d),d.radio=function(a){var c=function(){this._channels={},this.vent={},this.commands={},this.reqres={},this._proxyMethods()};b.extend(c.prototype,{channel:function(a){if(!a)throw new Error("Channel must receive a name");return this._getChannel(a)},_getChannel:function(b){var c=this._channels[b];return c||(c=new a.Channel(b),this._channels[b]=c),c},_proxyMethods:function(){b.each(["vent","commands","reqres"],function(a){b.each(d[a],function(b){this[a][b]=e(this,a,b)},this)},this)}});var d={vent:["on","off","trigger","once","stopListening","listenTo","listenToOnce"],commands:["execute","setHandler","setHandlers","removeHandler","removeAllHandlers"],reqres:["request","setHandler","setHandlers","removeHandler","removeAllHandlers"]},e=function(a,b,c){return function(d){var e=a._getChannel(d)[b],f=Array.prototype.slice.call(arguments,1);return e[c].apply(e,f)}};return new c}(d),a.Wreqr}(b,c);var d=a.Marionette,e=b.Marionette={};e.VERSION="2.3.1",e.noConflict=function(){return a.Marionette=d,this},b.Marionette=e,e.Deferred=b.$.Deferred,e.extend=b.Model.extend,e.isNodeAttached=function(a){return b.$.contains(document.documentElement,a)},e.getOption=function(a,b){return a&&b?a.options&&void 0!==a.options[b]?a.options[b]:a[b]:void 0},e.proxyGetOption=function(a){return e.getOption(this,a)},e._getValue=function(a,b,d){return c.isFunction(a)&&(a=a.apply(b,d)),a},e.normalizeMethods=function(a){return c.reduce(a,function(a,b,d){return c.isFunction(b)||(b=this[b]),b&&(a[d]=b),a},{},this)},e.normalizeUIString=function(a,b){return a.replace(/@ui\.[a-zA-Z_$0-9]*/g,function(a){return b[a.slice(4)]})},e.normalizeUIKeys=function(a,b){return c.reduce(a,function(a,c,d){var f=e.normalizeUIString(d,b);return a[f]=c,a},{})},e.normalizeUIValues=function(a,b){return c.each(a,function(d,f){c.isString(d)&&(a[f]=e.normalizeUIString(d,b))}),a},e.actAsCollection=function(a,b){var d=["forEach","each","map","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","toArray","first","initial","rest","last","without","isEmpty","pluck"];c.each(d,function(d){a[d]=function(){var a=c.values(c.result(this,b)),e=[a].concat(c.toArray(arguments));return c[d].apply(c,e)}})};var f=e.deprecate=function(a,b){c.isObject(a)&&(a=a.prev+" is going to be removed in the future. Please use "+a.next+" instead."+(a.url?" See: "+a.url:"")),void 0!==b&&b||f._cache[a]||(f._warn("Deprecation warning: "+a),f._cache[a]=!0)};f._warn="undefined"!=typeof console&&(console.warn||console.log)||function(){},f._cache={},e._triggerMethod=function(){function a(a,b,c){return c.toUpperCase()}var b=/(^|:)(\w)/gi;return function(d,e,f){var g=arguments.length<3;g&&(f=e,e=f[0]);var h,i="on"+e.replace(b,a),j=d[i];return c.isFunction(j)&&(h=j.apply(d,g?c.rest(f):f)),c.isFunction(d.trigger)&&(g+f.length>1?d.trigger.apply(d,g?f:[e].concat(c.rest(f,0))):d.trigger(e)),h}}(),e.triggerMethod=function(a){return e._triggerMethod(this,arguments)},e.triggerMethodOn=function(a){var b=c.isFunction(a.triggerMethod)?a.triggerMethod:e.triggerMethod;return b.apply(a,c.rest(arguments))},e.MonitorDOMRefresh=function(a){function b(){a._isShown=!0,f()}function d(){a._isRendered=!0,f()}function f(){a._isShown&&a._isRendered&&e.isNodeAttached(a.el)&&c.isFunction(a.triggerMethod)&&a.triggerMethod("dom:refresh")}a.on({show:b,render:d})},function(a){function b(b,d,e,f){var g=f.split(/\s+/);c.each(g,function(c){var f=b[c];if(!f)throw new a.Error('Method "'+c+'" was configured as an event handler, but does not exist.');b.listenTo(d,e,f)})}function d(a,b,c,d){a.listenTo(b,c,d)}function e(a,b,d,e){var f=e.split(/\s+/);c.each(f,function(c){var e=a[c];a.stopListening(b,d,e)})}function f(a,b,c,d){a.stopListening(b,c,d)}function g(b,d,e,f,g){if(d&&e){if(!c.isObject(e))throw new a.Error({message:"Bindings must be an object or function.",url:"marionette.functions.html#marionettebindentityevents"});e=a._getValue(e,b),c.each(e,function(a,e){c.isFunction(a)?f(b,d,e,a):g(b,d,e,a)})}}a.bindEntityEvents=function(a,c,e){g(a,c,e,d,b)},a.unbindEntityEvents=function(a,b,c){g(a,b,c,f,e)},a.proxyBindEntityEvents=function(b,c){return a.bindEntityEvents(this,b,c)},a.proxyUnbindEntityEvents=function(b,c){ +return a.unbindEntityEvents(this,b,c)}}(e);var g=["description","fileName","lineNumber","name","message","number"];return e.Error=e.extend.call(Error,{urlRoot:"http://marionettejs.com/docs/v"+e.VERSION+"/",constructor:function(a,b){c.isObject(a)?(b=a,a=b.message):b||(b={});var d=Error.call(this,a);c.extend(this,c.pick(d,g),c.pick(b,g)),this.captureStackTrace(),b.url&&(this.url=this.urlRoot+b.url)},captureStackTrace:function(){Error.captureStackTrace&&Error.captureStackTrace(this,e.Error)},toString:function(){return this.name+": "+this.message+(this.url?" See: "+this.url:"")}}),e.Error.extend=e.extend,e.Callbacks=function(){this._deferred=e.Deferred(),this._callbacks=[]},c.extend(e.Callbacks.prototype,{add:function(a,b){var d=c.result(this._deferred,"promise");this._callbacks.push({cb:a,ctx:b}),d.then(function(c){b&&(c.context=b),a.call(c.context,c.options)})},run:function(a,b){this._deferred.resolve({options:a,context:b})},reset:function(){var a=this._callbacks;this._deferred=e.Deferred(),this._callbacks=[],c.each(a,function(a){this.add(a.cb,a.ctx)},this)}}),e.Controller=function(a){this.options=a||{},c.isFunction(this.initialize)&&this.initialize(this.options)},e.Controller.extend=e.extend,c.extend(e.Controller.prototype,b.Events,{destroy:function(){return e._triggerMethod(this,"before:destroy",arguments),e._triggerMethod(this,"destroy",arguments),this.stopListening(),this.off(),this},triggerMethod:e.triggerMethod,getOption:e.proxyGetOption}),e.Object=function(a){this.options=c.extend({},c.result(this,"options"),a),this.initialize.apply(this,arguments)},e.Object.extend=e.extend,c.extend(e.Object.prototype,b.Events,{initialize:function(){},destroy:function(){this.triggerMethod("before:destroy"),this.triggerMethod("destroy"),this.stopListening()},triggerMethod:e.triggerMethod,getOption:e.proxyGetOption,bindEntityEvents:e.proxyBindEntityEvents,unbindEntityEvents:e.proxyUnbindEntityEvents}),e.Region=e.Object.extend({constructor:function(a){if(this.options=a||{},this.el=this.getOption("el"),this.el=this.el instanceof b.$?this.el[0]:this.el,!this.el)throw new e.Error({name:"NoElError",message:'An "el" must be specified for a region.'});this.$el=this.getEl(this.el),e.Object.call(this,a)},show:function(a,b){if(this._ensureElement()){this._ensureViewIsIntact(a);var c=b||{},d=a!==this.currentView,f=!!c.preventDestroy,g=!!c.forceShow,h=!!this.currentView,i=d&&!f,j=d||g;if(h&&this.triggerMethod("before:swapOut",this.currentView,this,b),this.currentView&&delete this.currentView._parent,i?this.empty():h&&j&&this.currentView.off("destroy",this.empty,this),j){a.once("destroy",this.empty,this),a.render(),a._parent=this,h&&this.triggerMethod("before:swap",a,this,b),this.triggerMethod("before:show",a,this,b),e.triggerMethodOn(a,"before:show",a,this,b),h&&this.triggerMethod("swapOut",this.currentView,this,b);var k=e.isNodeAttached(this.el),l=[],m=c.triggerBeforeAttach||this.triggerBeforeAttach,n=c.triggerAttach||this.triggerAttach;return k&&m&&(l=this._displayedViews(a),this._triggerAttach(l,"before:")),this.attachHtml(a),this.currentView=a,k&&n&&(l=this._displayedViews(a),this._triggerAttach(l)),h&&this.triggerMethod("swap",a,this,b),this.triggerMethod("show",a,this,b),e.triggerMethodOn(a,"show",a,this,b),this}return this}},triggerBeforeAttach:!0,triggerAttach:!0,_triggerAttach:function(a,b){var d=(b||"")+"attach";c.each(a,function(a){e.triggerMethodOn(a,d,a,this)},this)},_displayedViews:function(a){return c.union([a],c.result(a,"_getNestedViews")||[])},_ensureElement:function(){if(c.isObject(this.el)||(this.$el=this.getEl(this.el),this.el=this.$el[0]),!this.$el||0===this.$el.length){if(this.getOption("allowMissingEl"))return!1;throw new e.Error('An "el" '+this.$el.selector+" must exist in DOM")}return!0},_ensureViewIsIntact:function(a){if(!a)throw new e.Error({name:"ViewNotValid",message:"The view passed is undefined and therefore invalid. You must pass a view instance to show."});if(a.isDestroyed)throw new e.Error({name:"ViewDestroyedError",message:'View (cid: "'+a.cid+'") has already been destroyed and cannot be used.'})},getEl:function(a){return b.$(a,e._getValue(this.options.parentEl,this))},attachHtml:function(a){this.$el.contents().detach(),this.el.appendChild(a.el)},empty:function(){var a=this.currentView;if(a)return a.off("destroy",this.empty,this),this.triggerMethod("before:empty",a),this._destroyView(),this.triggerMethod("empty",a),delete this.currentView,this},_destroyView:function(){var a=this.currentView;a.destroy&&!a.isDestroyed?a.destroy():a.remove&&(a.remove(),a.isDestroyed=!0)},attachView:function(a){return this.currentView=a,this},hasView:function(){return!!this.currentView},reset:function(){return this.empty(),this.$el&&(this.el=this.$el.selector),delete this.$el,this}},{buildRegion:function(a,b){if(c.isString(a))return this._buildRegionFromSelector(a,b);if(a.selector||a.el||a.regionClass)return this._buildRegionFromObject(a,b);if(c.isFunction(a))return this._buildRegionFromRegionClass(a);throw new e.Error({message:"Improper region configuration type.",url:"marionette.region.html#region-configuration-types"})},_buildRegionFromSelector:function(a,b){return new b({el:a})},_buildRegionFromObject:function(a,b){var d=a.regionClass||b,e=c.omit(a,"selector","regionClass");return a.selector&&!e.el&&(e.el=a.selector),new d(e)},_buildRegionFromRegionClass:function(a){return new a}}),e.RegionManager=e.Controller.extend({constructor:function(a){this._regions={},e.Controller.call(this,a),this.addRegions(this.getOption("regions"))},addRegions:function(a,b){return a=e._getValue(a,this,arguments),c.reduce(a,function(a,d,e){return c.isString(d)&&(d={selector:d}),d.selector&&(d=c.defaults({},d,b)),a[e]=this.addRegion(e,d),a},{},this)},addRegion:function(a,b){var c;return c=b instanceof e.Region?b:e.Region.buildRegion(b,e.Region),this.triggerMethod("before:add:region",a,c),c._parent=this,this._store(a,c),this.triggerMethod("add:region",a,c),c},get:function(a){return this._regions[a]},getRegions:function(){return c.clone(this._regions)},removeRegion:function(a){var b=this._regions[a];return this._remove(a,b),b},removeRegions:function(){var a=this.getRegions();return c.each(this._regions,function(a,b){this._remove(b,a)},this),a},emptyRegions:function(){var a=this.getRegions();return c.invoke(a,"empty"),a},destroy:function(){return this.removeRegions(),e.Controller.prototype.destroy.apply(this,arguments)},_store:function(a,b){this._regions[a]=b,this._setLength()},_remove:function(a,b){this.triggerMethod("before:remove:region",a,b),b.empty(),b.stopListening(),delete b._parent,delete this._regions[a],this._setLength(),this.triggerMethod("remove:region",a,b)},_setLength:function(){this.length=c.size(this._regions)}}),e.actAsCollection(e.RegionManager.prototype,"_regions"),e.TemplateCache=function(a){this.templateId=a},c.extend(e.TemplateCache,{templateCaches:{},get:function(a){var b=this.templateCaches[a];return b||(b=new e.TemplateCache(a),this.templateCaches[a]=b),b.load()},clear:function(){var a,b=c.toArray(arguments),d=b.length;if(d>0)for(a=0;d>a;a++)delete this.templateCaches[b[a]];else this.templateCaches={}}}),c.extend(e.TemplateCache.prototype,{load:function(){if(this.compiledTemplate)return this.compiledTemplate;var a=this.loadTemplate(this.templateId);return this.compiledTemplate=this.compileTemplate(a),this.compiledTemplate},loadTemplate:function(a){var c=b.$(a).html();if(!c||0===c.length)throw new e.Error({name:"NoTemplateError",message:'Could not find template: "'+a+'"'});return c},compileTemplate:function(a){return c.template(a)}}),e.Renderer={render:function(a,b){if(!a)throw new e.Error({name:"TemplateNotFoundError",message:"Cannot render the template since its false, null or undefined."});var d=c.isFunction(a)?a:e.TemplateCache.get(a);return d(b)}},e.View=b.View.extend({isDestroyed:!1,constructor:function(a){c.bindAll(this,"render"),a=e._getValue(a,this),this.options=c.extend({},c.result(this,"options"),a),this._behaviors=e.Behaviors(this),b.View.apply(this,arguments),e.MonitorDOMRefresh(this),this.on("show",this.onShowCalled)},getTemplate:function(){return this.getOption("template")},serializeModel:function(a){return a.toJSON.apply(a,c.rest(arguments))},mixinTemplateHelpers:function(a){a=a||{};var b=this.getOption("templateHelpers");return b=e._getValue(b,this),c.extend(a,b)},normalizeUIKeys:function(a){var b=c.result(this,"_uiBindings");return e.normalizeUIKeys(a,b||c.result(this,"ui"))},normalizeUIValues:function(a){var b=c.result(this,"ui"),d=c.result(this,"_uiBindings");return e.normalizeUIValues(a,d||b)},configureTriggers:function(){if(this.triggers){var a=this.normalizeUIKeys(c.result(this,"triggers"));return c.reduce(a,function(a,b,c){return a[c]=this._buildViewTrigger(b),a},{},this)}},delegateEvents:function(a){return this._delegateDOMEvents(a),this.bindEntityEvents(this.model,this.getOption("modelEvents")),this.bindEntityEvents(this.collection,this.getOption("collectionEvents")),c.each(this._behaviors,function(a){a.bindEntityEvents(this.model,a.getOption("modelEvents")),a.bindEntityEvents(this.collection,a.getOption("collectionEvents"))},this),this},_delegateDOMEvents:function(a){var d=e._getValue(a||this.events,this);d=this.normalizeUIKeys(d),c.isUndefined(a)&&(this.events=d);var f={},g=c.result(this,"behaviorEvents")||{},h=this.configureTriggers(),i=c.result(this,"behaviorTriggers")||{};c.extend(f,g,d,h,i),b.View.prototype.delegateEvents.call(this,f)},undelegateEvents:function(){return b.View.prototype.undelegateEvents.apply(this,arguments),this.unbindEntityEvents(this.model,this.getOption("modelEvents")),this.unbindEntityEvents(this.collection,this.getOption("collectionEvents")),c.each(this._behaviors,function(a){a.unbindEntityEvents(this.model,a.getOption("modelEvents")),a.unbindEntityEvents(this.collection,a.getOption("collectionEvents"))},this),this},onShowCalled:function(){},_ensureViewIsIntact:function(){if(this.isDestroyed)throw new e.Error({name:"ViewDestroyedError",message:'View (cid: "'+this.cid+'") has already been destroyed and cannot be used.'})},destroy:function(){if(!this.isDestroyed){var a=c.toArray(arguments);return this.triggerMethod.apply(this,["before:destroy"].concat(a)),this.isDestroyed=!0,this.triggerMethod.apply(this,["destroy"].concat(a)),this.unbindUIElements(),this.remove(),c.invoke(this._behaviors,"destroy",a),this}},bindUIElements:function(){this._bindUIElements(),c.invoke(this._behaviors,this._bindUIElements)},_bindUIElements:function(){if(this.ui){this._uiBindings||(this._uiBindings=this.ui);var a=c.result(this,"_uiBindings");this.ui={},c.each(a,function(a,b){this.ui[b]=this.$(a)},this)}},unbindUIElements:function(){this._unbindUIElements(),c.invoke(this._behaviors,this._unbindUIElements)},_unbindUIElements:function(){this.ui&&this._uiBindings&&(c.each(this.ui,function(a,b){delete this.ui[b]},this),this.ui=this._uiBindings,delete this._uiBindings)},_buildViewTrigger:function(a){var b=c.isObject(a),d=c.defaults({},b?a:{},{preventDefault:!0,stopPropagation:!0}),e=b?d.event:a;return function(a){a&&(a.preventDefault&&d.preventDefault&&a.preventDefault(),a.stopPropagation&&d.stopPropagation&&a.stopPropagation());var b={view:this,model:this.model,collection:this.collection};this.triggerMethod(e,b)}},setElement:function(){var a=b.View.prototype.setElement.apply(this,arguments);return c.invoke(this._behaviors,"proxyViewProperties",this),a},triggerMethod:function(){for(var a=e._triggerMethod,b=a(this,arguments),c=this._behaviors,d=0,f=c&&c.length;f>d;d++)a(c[d],arguments);return b},_getImmediateChildren:function(){return[]},_getNestedViews:function(){var a=this._getImmediateChildren();return a.length?c.reduce(a,function(a,b){return b._getNestedViews?a.concat(b._getNestedViews()):a},a):a},normalizeMethods:e.normalizeMethods,getOption:e.proxyGetOption,bindEntityEvents:e.proxyBindEntityEvents,unbindEntityEvents:e.proxyUnbindEntityEvents}),e.ItemView=e.View.extend({constructor:function(){e.View.apply(this,arguments)},serializeData:function(){if(!this.model&&!this.collection)return{};var a=[this.model||this.collection];return arguments.length&&a.push.apply(a,arguments),this.model?this.serializeModel.apply(this,a):{items:this.serializeCollection.apply(this,a)}},serializeCollection:function(a){return a.toJSON.apply(a,c.rest(arguments))},render:function(){return this._ensureViewIsIntact(),this.triggerMethod("before:render",this),this._renderTemplate(),this.bindUIElements(),this.triggerMethod("render",this),this},_renderTemplate:function(){var a=this.getTemplate();if(a!==!1){if(!a)throw new e.Error({name:"UndefinedTemplateError",message:"Cannot render the template since it is null or undefined."});var b=this.serializeData();b=this.mixinTemplateHelpers(b);var c=e.Renderer.render(a,b,this);return this.attachElContent(c),this}},attachElContent:function(a){return this.$el.html(a),this}}),e.CollectionView=e.View.extend({childViewEventPrefix:"childview",constructor:function(a){var b=a||{};c.isUndefined(this.sort)&&(this.sort=c.isUndefined(b.sort)?!0:b.sort),this.once("render",this._initialEvents),this._initChildViewStorage(),e.View.apply(this,arguments),this.initRenderBuffer()},initRenderBuffer:function(){this.elBuffer=document.createDocumentFragment(),this._bufferedChildren=[]},startBuffering:function(){this.initRenderBuffer(),this.isBuffering=!0},endBuffering:function(){this.isBuffering=!1,this._triggerBeforeShowBufferedChildren(),this.attachBuffer(this,this.elBuffer),this._triggerShowBufferedChildren(),this.initRenderBuffer()},_triggerBeforeShowBufferedChildren:function(){this._isShown&&c.each(this._bufferedChildren,c.partial(this._triggerMethodOnChild,"before:show"))},_triggerShowBufferedChildren:function(){this._isShown&&(c.each(this._bufferedChildren,c.partial(this._triggerMethodOnChild,"show")),this._bufferedChildren=[])},_triggerMethodOnChild:function(a,b){e.triggerMethodOn(b,a)},_initialEvents:function(){this.collection&&(this.listenTo(this.collection,"add",this._onCollectionAdd),this.listenTo(this.collection,"remove",this._onCollectionRemove),this.listenTo(this.collection,"reset",this.render),this.sort&&this.listenTo(this.collection,"sort",this._sortViews))},_onCollectionAdd:function(a){this.destroyEmptyView();var b=this.getChildView(a),c=this.collection.indexOf(a);this.addChild(a,b,c)},_onCollectionRemove:function(a){var b=this.children.findByModel(a);this.removeChildView(b),this.checkEmpty()},onShowCalled:function(){this.children.each(c.partial(this._triggerMethodOnChild,"show"))},render:function(){return this._ensureViewIsIntact(),this.triggerMethod("before:render",this),this._renderChildren(),this.triggerMethod("render",this),this},resortView:function(){this.render()},_sortViews:function(){var a=this.collection.find(function(a,b){var c=this.children.findByModel(a);return!c||c._index!==b},this);a&&this.resortView()},_emptyViewIndex:-1,_renderChildren:function(){this.destroyEmptyView(),this.destroyChildren(),this.isEmpty(this.collection)?this.showEmptyView():(this.triggerMethod("before:render:collection",this),this.startBuffering(),this.showCollection(),this.endBuffering(),this.triggerMethod("render:collection",this))},showCollection:function(){var a;this.collection.each(function(b,c){a=this.getChildView(b),this.addChild(b,a,c)},this)},showEmptyView:function(){var a=this.getEmptyView();if(a&&!this._showingEmptyView){this.triggerMethod("before:render:empty"),this._showingEmptyView=!0;var c=new b.Model;this.addEmptyView(c,a),this.triggerMethod("render:empty")}},destroyEmptyView:function(){this._showingEmptyView&&(this.triggerMethod("before:remove:empty"),this.destroyChildren(),delete this._showingEmptyView,this.triggerMethod("remove:empty"))},getEmptyView:function(){return this.getOption("emptyView")},addEmptyView:function(a,b){var d=this.getOption("emptyViewOptions")||this.getOption("childViewOptions");c.isFunction(d)&&(d=d.call(this,a,this._emptyViewIndex));var f=this.buildChildView(a,b,d);f._parent=this,this.proxyChildEvents(f),this._isShown&&e.triggerMethodOn(f,"before:show"),this.children.add(f),this.renderChildView(f,this._emptyViewIndex),this._isShown&&e.triggerMethodOn(f,"show")},getChildView:function(a){var b=this.getOption("childView");if(!b)throw new e.Error({name:"NoChildViewError",message:'A "childView" must be specified'});return b},addChild:function(a,b,c){var d=this.getOption("childViewOptions");d=e._getValue(d,this,[a,c]);var f=this.buildChildView(a,b,d);return this._updateIndices(f,!0,c),this._addChildView(f,c),f._parent=this,f},_updateIndices:function(a,b,c){this.sort&&(b&&(a._index=c),this.children.each(function(c){c._index>=a._index&&(c._index+=b?1:-1)}))},_addChildView:function(a,b){this.proxyChildEvents(a),this.triggerMethod("before:add:child",a),this.children.add(a),this.renderChildView(a,b),this._isShown&&!this.isBuffering&&e.triggerMethodOn(a,"show"),this.triggerMethod("add:child",a)},renderChildView:function(a,b){return a.render(),this.attachHtml(this,a,b),a},buildChildView:function(a,b,d){var e=c.extend({model:a},d);return new b(e)},removeChildView:function(a){return a&&(this.triggerMethod("before:remove:child",a),a.destroy?a.destroy():a.remove&&a.remove(),delete a._parent,this.stopListening(a),this.children.remove(a),this.triggerMethod("remove:child",a),this._updateIndices(a,!1)),a},isEmpty:function(){return!this.collection||0===this.collection.length},checkEmpty:function(){this.isEmpty(this.collection)&&this.showEmptyView()},attachBuffer:function(a,b){a.$el.append(b)},attachHtml:function(a,b,c){a.isBuffering?(a.elBuffer.appendChild(b.el),a._bufferedChildren.push(b)):a._insertBefore(b,c)||a._insertAfter(b)},_insertBefore:function(a,b){var c,d=this.sort&&b<this.children.length-1;return d&&(c=this.children.find(function(a){return a._index===b+1})),c?(c.$el.before(a.el),!0):!1},_insertAfter:function(a){this.$el.append(a.el)},_initChildViewStorage:function(){this.children=new b.ChildViewContainer},destroy:function(){return this.isDestroyed?void 0:(this.triggerMethod("before:destroy:collection"),this.destroyChildren(),this.triggerMethod("destroy:collection"),e.View.prototype.destroy.apply(this,arguments))},destroyChildren:function(){var a=this.children.map(c.identity);return this.children.each(this.removeChildView,this),this.checkEmpty(),a},proxyChildEvents:function(a){var b=this.getOption("childViewEventPrefix");this.listenTo(a,"all",function(){var d=c.toArray(arguments),e=d[0],f=this.normalizeMethods(c.result(this,"childEvents"));d[0]=b+":"+e,d.splice(1,0,a),"undefined"!=typeof f&&c.isFunction(f[e])&&f[e].apply(this,d.slice(1)),this.triggerMethod.apply(this,d)},this)},_getImmediateChildren:function(){return c.values(this.children._views)}}),e.CompositeView=e.CollectionView.extend({constructor:function(){e.CollectionView.apply(this,arguments)},_initialEvents:function(){this.collection&&(this.listenTo(this.collection,"add",this._onCollectionAdd),this.listenTo(this.collection,"remove",this._onCollectionRemove),this.listenTo(this.collection,"reset",this._renderChildren),this.sort&&this.listenTo(this.collection,"sort",this._sortViews))},getChildView:function(a){var b=this.getOption("childView")||this.constructor;return b},serializeData:function(){var a={};return this.model&&(a=c.partial(this.serializeModel,this.model).apply(this,arguments)),a},render:function(){return this._ensureViewIsIntact(),this.isRendered=!0,this.resetChildViewContainer(),this.triggerMethod("before:render",this),this._renderTemplate(),this._renderChildren(),this.triggerMethod("render",this),this},_renderChildren:function(){this.isRendered&&e.CollectionView.prototype._renderChildren.call(this)},_renderTemplate:function(){var a={};a=this.serializeData(),a=this.mixinTemplateHelpers(a),this.triggerMethod("before:render:template");var b=this.getTemplate(),c=e.Renderer.render(b,a,this);this.attachElContent(c),this.bindUIElements(),this.triggerMethod("render:template")},attachElContent:function(a){return this.$el.html(a),this},attachBuffer:function(a,b){var c=this.getChildViewContainer(a);c.append(b)},_insertAfter:function(a){var b=this.getChildViewContainer(this,a);b.append(a.el)},getChildViewContainer:function(a,b){if("$childViewContainer"in a)return a.$childViewContainer;var c,d=e.getOption(a,"childViewContainer");if(d){var f=e._getValue(d,a);if(c="@"===f.charAt(0)&&a.ui?a.ui[f.substr(4)]:a.$(f),c.length<=0)throw new e.Error({name:"ChildViewContainerMissingError",message:'The specified "childViewContainer" was not found: '+a.childViewContainer})}else c=a.$el;return a.$childViewContainer=c,c},resetChildViewContainer:function(){this.$childViewContainer&&delete this.$childViewContainer}}),e.LayoutView=e.ItemView.extend({regionClass:e.Region,constructor:function(a){a=a||{},this._firstRender=!0,this._initializeRegions(a),e.ItemView.call(this,a)},render:function(){return this._ensureViewIsIntact(),this._firstRender?this._firstRender=!1:this._reInitializeRegions(),e.ItemView.prototype.render.apply(this,arguments)},destroy:function(){return this.isDestroyed?this:(this.regionManager.destroy(),e.ItemView.prototype.destroy.apply(this,arguments))},addRegion:function(a,b){var c={};return c[a]=b,this._buildRegions(c)[a]},addRegions:function(a){return this.regions=c.extend({},this.regions,a),this._buildRegions(a)},removeRegion:function(a){return delete this.regions[a],this.regionManager.removeRegion(a)},getRegion:function(a){return this.regionManager.get(a)},getRegions:function(){return this.regionManager.getRegions()},_buildRegions:function(a){var b={regionClass:this.getOption("regionClass"),parentEl:c.partial(c.result,this,"el")};return this.regionManager.addRegions(a,b)},_initializeRegions:function(a){var b;this._initRegionManager(),b=e._getValue(this.regions,this,[a])||{};var d=this.getOption.call(a,"regions");d=e._getValue(d,this,[a]),c.extend(b,d),b=this.normalizeUIValues(b),this.addRegions(b)},_reInitializeRegions:function(){this.regionManager.invoke("reset")},getRegionManager:function(){return new e.RegionManager},_initRegionManager:function(){this.regionManager=this.getRegionManager(),this.regionManager._parent=this,this.listenTo(this.regionManager,"before:add:region",function(a){this.triggerMethod("before:add:region",a)}),this.listenTo(this.regionManager,"add:region",function(a,b){this[a]=b,this.triggerMethod("add:region",a,b)}),this.listenTo(this.regionManager,"before:remove:region",function(a){this.triggerMethod("before:remove:region",a)}),this.listenTo(this.regionManager,"remove:region",function(a,b){delete this[a],this.triggerMethod("remove:region",a,b)})},_getImmediateChildren:function(){return c.chain(this.regionManager.getRegions()).pluck("currentView").compact().value()}}),e.Behavior=e.Object.extend({constructor:function(a,b){this.view=b,this.defaults=c.result(this,"defaults")||{},this.options=c.extend({},this.defaults,a),e.Object.apply(this,arguments)},$:function(){return this.view.$.apply(this.view,arguments)},destroy:function(){this.stopListening()},proxyViewProperties:function(a){this.$el=a.$el,this.el=a.el}}),e.Behaviors=function(a,b){function c(a,d){return b.isObject(a.behaviors)?(d=c.parseBehaviors(a,d||b.result(a,"behaviors")),c.wrap(a,d,b.keys(f)),d):{}}function d(a,c){this._view=a,this._viewUI=b.result(a,"ui"),this._behaviors=c,this._triggers={}}var e=/^(\S+)\s*(.*)$/,f={behaviorTriggers:function(a,b){var c=new d(this,b);return c.buildBehaviorTriggers()},behaviorEvents:function(c,d){var f={},g=this._uiBindings||b.result(this,"ui");return b.each(d,function(c,d){var h={},i=b.clone(b.result(c,"events"))||{},j=c._uiBindings||b.result(c,"ui"),k=b.extend({},g,j);i=a.normalizeUIKeys(i,k);var l=0;b.each(i,function(a,f){var g=f.match(e),i=g[1]+"."+[this.cid,d,l++," "].join(""),j=g[2],k=i+j,m=b.isFunction(a)?a:c[a];h[k]=b.bind(m,c)},this),f=b.extend(f,h)},this),f}};return b.extend(c,{behaviorsLookup:function(){throw new a.Error({message:"You must define where your behaviors are stored.",url:"marionette.behaviors.html#behaviorslookup"})},getBehaviorClass:function(b,d){return b.behaviorClass?b.behaviorClass:a._getValue(c.behaviorsLookup,this,[b,d])[d]},parseBehaviors:function(a,d){return b.chain(d).map(function(d,e){var f=c.getBehaviorClass(d,e),g=new f(d,a),h=c.parseBehaviors(a,b.result(g,"behaviors"));return[g].concat(h)}).flatten().value()},wrap:function(a,c,d){b.each(d,function(d){a[d]=b.partial(f[d],a[d],c)})}}),b.extend(d.prototype,{buildBehaviorTriggers:function(){return b.each(this._behaviors,this._buildTriggerHandlersForBehavior,this),this._triggers},_buildTriggerHandlersForBehavior:function(c,d){var e=b.extend({},this._viewUI,b.result(c,"ui")),f=b.clone(b.result(c,"triggers"))||{};f=a.normalizeUIKeys(f,e),b.each(f,b.bind(this._setHandlerForBehavior,this,c,d))},_setHandlerForBehavior:function(a,b,c,d){var e=d.replace(/^\S+/,function(a){return a+".behaviortriggers"+b});this._triggers[e]=this._view._buildViewTrigger(c)}}),c}(e,c),e.AppRouter=b.Router.extend({constructor:function(a){this.options=a||{},b.Router.apply(this,arguments);var c=this.getOption("appRoutes"),d=this._getController();this.processAppRoutes(d,c),this.on("route",this._processOnRoute,this)},appRoute:function(a,b){var c=this._getController();this._addAppRoute(c,a,b)},_processOnRoute:function(a,b){if(c.isFunction(this.onRoute)){var d=c.invert(this.getOption("appRoutes"))[a];this.onRoute(a,d,b)}},processAppRoutes:function(a,b){if(b){var d=c.keys(b).reverse();c.each(d,function(c){this._addAppRoute(a,c,b[c])},this)}},_getController:function(){return this.getOption("controller")},_addAppRoute:function(a,b,d){var f=a[d];if(!f)throw new e.Error('Method "'+d+'" was not found on the controller');this.route(b,d,c.bind(f,a))},getOption:e.proxyGetOption,triggerMethod:e.triggerMethod,bindEntityEvents:e.proxyBindEntityEvents,unbindEntityEvents:e.proxyUnbindEntityEvents}),e.Application=e.Object.extend({constructor:function(a){this._initializeRegions(a),this._initCallbacks=new e.Callbacks,this.submodules={},c.extend(this,a),this._initChannel(),e.Object.call(this,a)},execute:function(){this.commands.execute.apply(this.commands,arguments)},request:function(){return this.reqres.request.apply(this.reqres,arguments)},addInitializer:function(a){this._initCallbacks.add(a)},start:function(a){this.triggerMethod("before:start",a),this._initCallbacks.run(a,this),this.triggerMethod("start",a)},addRegions:function(a){return this._regionManager.addRegions(a)},emptyRegions:function(){return this._regionManager.emptyRegions()},removeRegion:function(a){return this._regionManager.removeRegion(a)},getRegion:function(a){return this._regionManager.get(a)},getRegions:function(){return this._regionManager.getRegions()},module:function(a,b){var d=e.Module.getClass(b),f=c.toArray(arguments);return f.unshift(this),d.create.apply(d,f)},getRegionManager:function(){return new e.RegionManager},_initializeRegions:function(a){var b=c.isFunction(this.regions)?this.regions(a):this.regions||{};this._initRegionManager();var d=e.getOption(a,"regions");return c.isFunction(d)&&(d=d.call(this,a)),c.extend(b,d),this.addRegions(b),this},_initRegionManager:function(){this._regionManager=this.getRegionManager(),this._regionManager._parent=this,this.listenTo(this._regionManager,"before:add:region",function(){e._triggerMethod(this,"before:add:region",arguments)}),this.listenTo(this._regionManager,"add:region",function(a,b){this[a]=b,e._triggerMethod(this,"add:region",arguments)}),this.listenTo(this._regionManager,"before:remove:region",function(){e._triggerMethod(this,"before:remove:region",arguments)}),this.listenTo(this._regionManager,"remove:region",function(a){delete this[a],e._triggerMethod(this,"remove:region",arguments)})},_initChannel:function(){this.channelName=c.result(this,"channelName")||"global",this.channel=c.result(this,"channel")||b.Wreqr.radio.channel(this.channelName),this.vent=c.result(this,"vent")||this.channel.vent,this.commands=c.result(this,"commands")||this.channel.commands,this.reqres=c.result(this,"reqres")||this.channel.reqres}}),e.Module=function(a,b,d){this.moduleName=a,this.options=c.extend({},this.options,d),this.initialize=d.initialize||this.initialize,this.submodules={},this._setupInitializersAndFinalizers(),this.app=b,c.isFunction(this.initialize)&&this.initialize(a,b,this.options)},e.Module.extend=e.extend,c.extend(e.Module.prototype,b.Events,{startWithParent:!0,initialize:function(){},addInitializer:function(a){this._initializerCallbacks.add(a)},addFinalizer:function(a){this._finalizerCallbacks.add(a)},start:function(a){this._isInitialized||(c.each(this.submodules,function(b){b.startWithParent&&b.start(a)}),this.triggerMethod("before:start",a),this._initializerCallbacks.run(a,this),this._isInitialized=!0,this.triggerMethod("start",a))},stop:function(){this._isInitialized&&(this._isInitialized=!1,this.triggerMethod("before:stop"),c.invoke(this.submodules,"stop"),this._finalizerCallbacks.run(void 0,this),this._initializerCallbacks.reset(),this._finalizerCallbacks.reset(),this.triggerMethod("stop"))},addDefinition:function(a,b){this._runModuleDefinition(a,b)},_runModuleDefinition:function(a,d){if(a){var f=c.flatten([this,this.app,b,e,b.$,c,d]);a.apply(this,f)}},_setupInitializersAndFinalizers:function(){this._initializerCallbacks=new e.Callbacks,this._finalizerCallbacks=new e.Callbacks},triggerMethod:e.triggerMethod}),c.extend(e.Module,{create:function(a,b,d){var e=a,f=c.rest(arguments,3);b=b.split(".");var g=b.length,h=[];return h[g-1]=d,c.each(b,function(b,c){var g=e;e=this._getModule(g,b,a,d),this._addModuleDefinition(g,e,h[c],f)},this),e},_getModule:function(a,b,d,e,f){var g=c.extend({},e),h=this.getClass(e),i=a[b];return i||(i=new h(b,d,g),a[b]=i,a.submodules[b]=i),i},getClass:function(a){var b=e.Module;return a?a.prototype instanceof b?a:a.moduleClass||b:b},_addModuleDefinition:function(a,b,c,d){var e=this._getDefine(c),f=this._getStartWithParent(c,b);e&&b.addDefinition(e,d),this._addStartWithParent(a,b,f)},_getStartWithParent:function(a,b){var d;return c.isFunction(a)&&a.prototype instanceof e.Module?(d=b.constructor.prototype.startWithParent,c.isUndefined(d)?!0:d):c.isObject(a)?(d=a.startWithParent,c.isUndefined(d)?!0:d):!0},_getDefine:function(a){return!c.isFunction(a)||a.prototype instanceof e.Module?c.isObject(a)?a.define:null:a},_addStartWithParent:function(a,b,c){b.startWithParent=b.startWithParent&&c,b.startWithParent&&!b.startWithParentIsConfigured&&(b.startWithParentIsConfigured=!0,a.addInitializer(function(a){b.startWithParent&&b.start(a)}))}}),e}),function(a){"function"==typeof define&&define.amd?define(["backbone","underscore"],a):"object"==typeof exports?module.exports=a(require("backbone"),require("underscore")):a(window.Backbone,window._)}(function(a,b){var c=a.Router.prototype.route,d=function(){};b.extend(a.Router.prototype,{before:d,after:d,route:function(a,e,f){f||(f=this[e]);var g=b.bind(function(){var c,e=[a,b.toArray(arguments)];if(c=b.isFunction(this.before)?this.before:"undefined"!=typeof this.before[a]?this.before[a]:d,c.apply(this,e)!==!1){f&&f.apply(this,arguments);var g;g=b.isFunction(this.after)?this.after:"undefined"!=typeof this.after[a]?this.after[a]:d,g.apply(this,e)}},this);return c.call(this,a,e,g)}})}),function(a,b,c,d,e,f,g){"use strict";"object"==typeof d?e.exports=f(c("underscore"),c("backbone"),c("jquery")):"function"==typeof b&&b.amd?b(["underscore","backbone","jquery"],function(b,c,d){return b=b===g?a._:b,c=c===g?a.Backbone:c,d=d===g?a.$:d,a.Backbone=f(b,c,d)}):a.returnExportsGlobal=f(a._,a.Backbone,a.$)}(this,this.define,this.require,this.exports,this.module,function(a,b,c,d){"use strict";var e=function(b){this.options=b!==d?b:{},this.namespaceDelimiter=b!==d&&b.namespaceDelimiter!==d?b.namespaceDelimiter:this.namespaceDelimiter,this.contentType=b!==d&&b.contentType!==d?b.contentType:this.contentType,a.bindAll(this)},f=b.Model.prototype.constructor,g=b.sync,h={};return e.prototype={options:{},charset:"iso-8859-1",namespace:"",namespaceDelimiter:"/",contentType:"application/json",url:null,responseID:null,exceptions:{404:{code:-1,message:"404"},500:{code:-2,message:"500"},typeMissmatch:{ +code:-3,message:"Type missmatch"},badResponseId:{code:-4,message:"Bad response ID"},noResponse:{code:-5,message:"No response"},noDefError:{code:-6,message:"No error defined"},renderError:function(a,b){return{code:b!==d?-7:b,message:a?"No error defined":a}}},onSuccess:function(b,c,e){if(a.isFunction(b)===!0){if(null===e||e===d)return this.handleExceptions(this.exceptions.noResponse),this;null!==e&&c!==String(e.id)&&this.handleExceptions(this.exceptions.badResponseId),b.apply(this,[e.result,e.error])}else this.onError(e)},onError:function(a,b){return null===b||b===d?(this.handleExceptions(this.exceptions.noResponse),this):void(null!==b.error&&d!==b.error?this.handleExceptions(b.error):this.handleExceptions(this.exceptions.noDefError))},query:function(b,e,f){var g=String((new Date).getTime()),h=null;return this.responseID=g,h=(a.isArray(e)||a.isObject(e))&&a.isString(b)?c.ajax({contentType:this.contentType+"; charset="+this.charset,type:"POST",dataType:"json",url:this.url,data:JSON.stringify({jsonrpc:"2.0",method:this.namespace+this.namespaceDelimiter+b,id:g,params:e}),statusCode:{404:a.bind(function(){this.handleExceptions(this.exceptions[404])},this),500:a.bind(function(){this.handleExceptions(this.exceptions[500])},this)},success:a.bind(function(a,b,c){null!==a&&a.error!==d?this.onError(f,a,b,c):this.onSuccess(f,g,a,b,c)},this),error:a.bind(function(a,b,c){404!==a.status&&500!==a.status&&this.onError(f,a,b,c)},this)}):this.handleExceptions(this.exceptions.typeMissmatch)},checkMethods:function(c,e,f,g,i,j,k){var l=this,m=this.options&&this.options.useNamedParameters===!0,n=null,o=!1,p=null,q=[],r={},s=null,t=f;return m=f.options&&f.options.useNamedParameters?f.options.useNamedParameters:m,m&&(q={},a.isFunction(f.args)&&(t=f.args())),g="delete"===g?"remove":g,a.isArray(f.methods[g])||a.isFunction(f.methods[g])?(a.isFunction(f.methods[g])?(a.isString(h[f.get("_rpcId")])||a.each(h[f.get("_rpcId")],function(a,b){f.get(b)!==a&&(r[b]=!0)}),h[f.get("_rpcId")]=f.toJSON(),n=a.bind(f.methods[g],f)(r,i)):n=f.methods[g],a.isArray(n[0])&&(o=!0),o!==!0?(s=a.clone(n),p=s.shift(),s.length>0?a.each(s,function(c){""===c?a.isArray(q)&&q.push(""):f instanceof b.Collection?t!==d&&t[c]!==d?q=l.addParam(q,t,c,a.isFunction(t[c]),!1):i[c]!==d&&(q=l.addParam(q,i,c,!1,!1)):f.get(c)!==d?q=l.addParam(q,f,c,!1,!0):i[c]!==d&&(q=l.addParam(q,i,c,!1,!1))}):q=a.isArray(q)?[]:{},c(p,q,j,k)):(a.each(n,function(b){var d=a.clone(b);return p=null,q=[],p=d.shift(),a.each(d,function(a){q.push(f.get(a))}),c(p,q,j,k)}),null)):this.handleExceptions(this.exceptions.typeMissmatch)},addParam:function(b,c,e,f,g){var h;return h=g?c.get(e):f?c[e]():c[e],a.isArray(b)?b.push(h):h!==d&&(b[e]=h),b},invoke:function(c,e,f){var g={success:function(b){e.trigger("called:"+c,e,b),f!==d&&a.isFunction(f.success)&&f.success(e,b)},error:function(b,e){b.trigger("error",b,e),b.trigger("error:"+c,b,e),f!==d&&a.isFunction(f.error)&&f.error(b,e)}};return b.sync(c,e,g),this},defaultExceptionHandler:function(a){throw"Error code: "+a.code+" - message: "+a.message},handleExceptions:function(b){var c=a.isFunction(this.options.exceptionHandler)?this.options.exceptionHandler:this.defaultExceptionHandler;return c.call(this,b),this}},b.Rpc=e,b.Model=b.Model.extend({constructor:function(b){this.rpc!==d&&a.isFunction(this.rpc.invoke)===!0&&this.methods!==d&&a.each(this.methods,a.bind(function(b,c){1!=={read:1,create:1,remove:1,update:1}[c]&&(this[c]=a.bind(function(a){return this.rpc.invoke(c,this,a),this},this))},this)),f.apply(this,arguments)}}),b.sync=function(c){var e=null,f=function(g,i,j){var k=function(c,e){return null!==e&&e!==d?(j.error(i,e),this):(i instanceof b.Collection&&c!==d&&null!==c&&("object"==typeof c[0]?a.each(c,function(b,d){b._rpcId=a.uniqueId("rpc_"),c[d]=b,h[b._rpcId]=b}):a.each(c,function(a,b){h[b]=a})),i instanceof b.Model&&c!==d&&null!==c&&(c._rpcId=a.uniqueId("rpc_"),h[c._rpcId]=c),(c===d||null===c)&&(c=[]),i.parsers!==d&&i.parsers[g]!==d&&a.isFunction(i.parsers[g])&&i.parsers[g].apply(i,[c]),void j.success(c))},l=function(a){j.error(i,a)};if(i.rpc instanceof c){if(e=i.rpc,e.url=a.isFunction(i.url)?i.url():i.url,a.isString(i.namespace)===!0&&(e.namespace=i.namespace),i.methods===d)throw"Backbone.Rpc Error: No Method(s) given!";return"object"!=typeof i.params&&(i.params={}),e.checkMethods(e.query,i.params,i,g,j,k,l)}return f.previous.apply(i,arguments)};return f.previous=g,f}(e),b}),function(a,b){if("function"==typeof define&&define.amd)define(["underscore","backbone","jquery"],function(a,c,d){return b(a,c,d)});else if("undefined"!=typeof exports){var c=require("underscore"),d=require("backbone"),e=require("jquery");module.exports=b(c,d,e)}else b(a._,a.Backbone,a.jQuery)}(this,function(a,b,c){"use strict";var d=b.Syphon,e=b.Syphon={};e.VERSION="0.5.0",e.noConflict=function(){return b.Syphon=d,this},e.ignoredTypes=["button","submit","reset","fieldset"],e.serialize=function(b,d){var e={},h=i(d),k=f(b,h);return a.each(k,function(a){var b=c(a),d=g(b),f=h.keyExtractors.get(d),i=f(b),k=h.inputReaders.get(d),l=k(b),m=h.keyAssignmentValidators.get(d);if(m(b,i,l)){var n=h.keySplitter(i);e=j(e,n,l)}}),e},e.deserialize=function(b,d,e){var h=i(e),j=f(b,h),l=k(h,d);a.each(j,function(a){var b=c(a),d=g(b),e=h.keyExtractors.get(d),f=e(b),i=h.inputWriters.get(d),j=l[f];i(b,j)})};var f=function(b,d){var e=h(b),f=e.elements;return f=a.reject(f,function(b){var e,f=g(b),h=d.keyExtractors.get(f),i=h(c(b)),j=a.include(d.ignoredTypes,f),k=a.include(d.include,i),l=a.include(d.exclude,i);return e=k?!1:d.include?!0:l||j})},g=function(a){var b,d=c(a),e=d[0].tagName,f=e;return"input"===e.toLowerCase()&&(b=d.attr("type"),f=b?b:"text"),f.toLowerCase()},h=function(b){return a.isUndefined(b.$el)&&"form"===b.tagName.toLowerCase()?b:b.$el.is("form")?b.el:b.$("form")[0]},i=function(b){var c=a.clone(b)||{};return c.ignoredTypes=a.clone(e.ignoredTypes),c.inputReaders=c.inputReaders||e.InputReaders,c.inputWriters=c.inputWriters||e.InputWriters,c.keyExtractors=c.keyExtractors||e.KeyExtractors,c.keySplitter=c.keySplitter||e.KeySplitter,c.keyJoiner=c.keyJoiner||e.KeyJoiner,c.keyAssignmentValidators=c.keyAssignmentValidators||e.KeyAssignmentValidators,c},j=function(b,c,d){if(!c)return b;var e=c.shift();return b[e]||(b[e]=a.isArray(e)?[]:{}),0===c.length&&(a.isArray(b[e])?b[e].push(d):b[e]=d),c.length>0&&j(b[e],c,d),b},k=function(b,c,d){var e={};return a.each(c,function(c,f){var g={};d&&(f=b.keyJoiner(d,f)),a.isArray(c)?(f+="[]",g[f]=c):a.isObject(c)?g=k(b,c,f):g[f]=c,a.extend(e,g)}),e},l=e.TypeRegistry=function(){this.registeredTypes={}};l.extend=b.Model.extend,a.extend(l.prototype,{get:function(a){return this.registeredTypes[a]||this.registeredTypes["default"]},register:function(a,b){this.registeredTypes[a]=b},registerDefault:function(a){this.registeredTypes["default"]=a},unregister:function(a){this.registeredTypes[a]&&delete this.registeredTypes[a]}});var m=e.KeyExtractorSet=l.extend(),n=e.KeyExtractors=new m;n.registerDefault(function(a){return a.prop("name")||""});var o=e.InputReaderSet=l.extend(),p=e.InputReaders=new o;p.registerDefault(function(a){return a.val()}),p.register("checkbox",function(a){return a.prop("checked")});var q=e.InputWriterSet=l.extend(),r=e.InputWriters=new q;r.registerDefault(function(a,b){a.val(b)}),r.register("checkbox",function(a,b){a.prop("checked",b)}),r.register("radio",function(a,b){a.prop("checked",a.val()===b.toString())});var s=e.KeyAssignmentValidatorSet=l.extend(),t=e.KeyAssignmentValidators=new s;return t.registerDefault(function(){return!0}),t.register("radio",function(a,b,c){return a.prop("checked")}),e.KeySplitter=function(a){var b,c=a.match(/[^\[\]]+/g);return a.indexOf("[]")===a.length-2&&(b=c.pop(),c.push([b])),c},e.KeyJoiner=function(a,b){return a+"["+b+"]"},b.Syphon}),function(a,b){if("function"==typeof define&&define.amd)define(["backbone","underscore"],function(a,c){return b(a,c)});else if("undefined"!=typeof exports){var c=require("backbone"),d=require("underscore");module.exports=b(c,d)}else b(a.Backbone,a._)}(this,function(a,b){"use strict";var c=a.Wreqr,d=a.Wreqr={};return a.Wreqr.VERSION="1.3.2",a.Wreqr.noConflict=function(){return a.Wreqr=c,this},d.Handlers=function(a,b){var c=function(a){this.options=a,this._wreqrHandlers={},b.isFunction(this.initialize)&&this.initialize(a)};return c.extend=a.Model.extend,b.extend(c.prototype,a.Events,{setHandlers:function(a){b.each(a,function(a,c){var d=null;b.isObject(a)&&!b.isFunction(a)&&(d=a.context,a=a.callback),this.setHandler(c,a,d)},this)},setHandler:function(a,b,c){var d={callback:b,context:c};this._wreqrHandlers[a]=d,this.trigger("handler:add",a,b,c)},hasHandler:function(a){return!!this._wreqrHandlers[a]},getHandler:function(a){var b=this._wreqrHandlers[a];if(b)return function(){return b.callback.apply(b.context,arguments)}},removeHandler:function(a){delete this._wreqrHandlers[a]},removeAllHandlers:function(){this._wreqrHandlers={}}}),c}(a,b),d.CommandStorage=function(){var c=function(a){this.options=a,this._commands={},b.isFunction(this.initialize)&&this.initialize(a)};return b.extend(c.prototype,a.Events,{getCommands:function(a){var b=this._commands[a];return b||(b={command:a,instances:[]},this._commands[a]=b),b},addCommand:function(a,b){var c=this.getCommands(a);c.instances.push(b)},clearCommands:function(a){var b=this.getCommands(a);b.instances=[]}}),c}(),d.Commands=function(a,b){return a.Handlers.extend({storageType:a.CommandStorage,constructor:function(b){this.options=b||{},this._initializeStorage(this.options),this.on("handler:add",this._executeCommands,this),a.Handlers.prototype.constructor.apply(this,arguments)},execute:function(a){a=arguments[0];var c=b.rest(arguments);this.hasHandler(a)?this.getHandler(a).apply(this,c):this.storage.addCommand(a,c)},_executeCommands:function(a,c,d){var e=this.storage.getCommands(a);b.each(e.instances,function(a){c.apply(d,a)}),this.storage.clearCommands(a)},_initializeStorage:function(a){var c,d=a.storageType||this.storageType;c=b.isFunction(d)?new d:d,this.storage=c}})}(d,b),d.RequestResponse=function(a,b){return a.Handlers.extend({request:function(a){return this.hasHandler(a)?this.getHandler(a).apply(this,b.rest(arguments)):void 0}})}(d,b),d.EventAggregator=function(a,b){var c=function(){};return c.extend=a.Model.extend,b.extend(c.prototype,a.Events),c}(a,b),d.Channel=function(c){var d=function(b){this.vent=new a.Wreqr.EventAggregator,this.reqres=new a.Wreqr.RequestResponse,this.commands=new a.Wreqr.Commands,this.channelName=b};return b.extend(d.prototype,{reset:function(){return this.vent.off(),this.vent.stopListening(),this.reqres.removeAllHandlers(),this.commands.removeAllHandlers(),this},connectEvents:function(a,b){return this._connect("vent",a,b),this},connectCommands:function(a,b){return this._connect("commands",a,b),this},connectRequests:function(a,b){return this._connect("reqres",a,b),this},_connect:function(a,c,d){if(c){d=d||this;var e="vent"===a?"on":"setHandler";b.each(c,function(c,f){this[a][e](f,b.bind(c,d))},this)}}}),d}(d),d.radio=function(a,b){var c=function(){this._channels={},this.vent={},this.commands={},this.reqres={},this._proxyMethods()};b.extend(c.prototype,{channel:function(a){if(!a)throw new Error("Channel must receive a name");return this._getChannel(a)},_getChannel:function(b){var c=this._channels[b];return c||(c=new a.Channel(b),this._channels[b]=c),c},_proxyMethods:function(){b.each(["vent","commands","reqres"],function(a){b.each(d[a],function(b){this[a][b]=e(this,a,b)},this)},this)}});var d={vent:["on","off","trigger","once","stopListening","listenTo","listenToOnce"],commands:["execute","setHandler","setHandlers","removeHandler","removeAllHandlers"],reqres:["request","setHandler","setHandlers","removeHandler","removeAllHandlers"]},e=function(a,c,d){return function(e){var f=a._getChannel(e)[c];return f[d].apply(f,b.rest(arguments))}};return new c}(d,b),a.Wreqr});var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a){var b,c,d,e,f,g,h,i="",j=0;for(a=Base64._utf8_encode(a);j<a.length;)b=a.charCodeAt(j++),c=a.charCodeAt(j++),d=a.charCodeAt(j++),e=b>>2,f=(3&b)<<4|c>>4,g=(15&c)<<2|d>>6,h=63&d,isNaN(c)?g=h=64:isNaN(d)&&(h=64),i=i+this._keyStr.charAt(e)+this._keyStr.charAt(f)+this._keyStr.charAt(g)+this._keyStr.charAt(h);return i},decode:function(a){var b,c,d,e,f,g,h,i="",j=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");j<a.length;)e=this._keyStr.indexOf(a.charAt(j++)),f=this._keyStr.indexOf(a.charAt(j++)),g=this._keyStr.indexOf(a.charAt(j++)),h=this._keyStr.indexOf(a.charAt(j++)),b=e<<2|f>>4,c=(15&f)<<4|g>>2,d=(3&g)<<6|h,i+=String.fromCharCode(b),64!=g&&(i+=String.fromCharCode(c)),64!=h&&(i+=String.fromCharCode(d));return i=Base64._utf8_decode(i)},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);128>d?b+=String.fromCharCode(d):d>127&&2048>d?(b+=String.fromCharCode(d>>6|192),b+=String.fromCharCode(63&d|128)):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128),b+=String.fromCharCode(63&d|128))}return b},_utf8_decode:function(a){for(var b="",c=0,d=c1=c2=0;c<a.length;)d=a.charCodeAt(c),128>d?(b+=String.fromCharCode(d),c++):d>191&&224>d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((31&d)<<6|63&c2),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((15&d)<<12|(63&c2)<<6|63&c3),c+=3);return b}};Date.CultureInfo={name:"en-US",englishName:"English (United States)",nativeName:"English (United States)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"mdy",formatPatterns:{shortDate:"M/d/yyyy",longDate:"dddd, MMMM dd, yyyy",shortTime:"h:mm tt",longTime:"h:mm:ss tt",fullDateTime:"dddd, MMMM dd, yyyy h:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^jan(uary)?/i,feb:/^feb(ruary)?/i,mar:/^mar(ch)?/i,apr:/^apr(il)?/i,may:/^may/i,jun:/^jun(e)?/i,jul:/^jul(y)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^oct(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^su(n(day)?)?/i,mon:/^mo(n(day)?)?/i,tue:/^tu(e(s(day)?)?)?/i,wed:/^we(d(nesday)?)?/i,thu:/^th(u(r(s(day)?)?)?)?/i,fri:/^fr(i(day)?)?/i,sat:/^sa(t(urday)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|aft(er)?|from|hence)/i,subtract:/^(\-|bef(ore)?|ago)/i,yesterday:/^yes(terday)?/i,today:/^t(od(ay)?)?/i,tomorrow:/^tom(orrow)?/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^mn|min(ute)?s?/i,hour:/^h(our)?s?/i,week:/^w(eek)?s?/i,month:/^m(onth)?s?/i,day:/^d(ay)?s?/i,year:/^y(ear)?s?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt|utc)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a(?!u|p)|p)/i},timezones:[{name:"UTC",offset:"-000"},{name:"GMT",offset:"-000"},{name:"EST",offset:"-0500"},{name:"EDT",offset:"-0400"},{name:"CST",offset:"-0600"},{name:"CDT",offset:"-0500"},{name:"MST",offset:"-0700"},{name:"MDT",offset:"-0600"},{name:"PST",offset:"-0800"},{name:"PDT",offset:"-0700"}]},function(){var a=Date,b=a.prototype,c=a.CultureInfo,d=function(a,b){return b||(b=2),("000"+a).slice(-1*b)};b.clearTime=function(){return this.setHours(0),this.setMinutes(0),this.setSeconds(0),this.setMilliseconds(0),this},b.setTimeToNow=function(){var a=new Date;return this.setHours(a.getHours()),this.setMinutes(a.getMinutes()),this.setSeconds(a.getSeconds()),this.setMilliseconds(a.getMilliseconds()),this},a.today=function(){return(new Date).clearTime()},a.compare=function(a,b){if(isNaN(a)||isNaN(b))throw new Error(a+" - "+b);if(a instanceof Date&&b instanceof Date)return b>a?-1:a>b?1:0;throw new TypeError(a+" - "+b)},a.equals=function(a,b){return 0===a.compareTo(b)},a.getDayNumberFromName=function(a){for(var b=c.dayNames,d=c.abbreviatedDayNames,e=c.shortestDayNames,f=a.toLowerCase(),g=0;g<b.length;g++)if(b[g].toLowerCase()==f||d[g].toLowerCase()==f||e[g].toLowerCase()==f)return g;return-1},a.getMonthNumberFromName=function(a){for(var b=c.monthNames,d=c.abbreviatedMonthNames,e=a.toLowerCase(),f=0;f<b.length;f++)if(b[f].toLowerCase()==e||d[f].toLowerCase()==e)return f;return-1},a.isLeapYear=function(a){return a%4===0&&a%100!==0||a%400===0},a.getDaysInMonth=function(b,c){return[31,a.isLeapYear(b)?29:28,31,30,31,30,31,31,30,31,30,31][c]},a.getTimezoneAbbreviation=function(a){for(var b=c.timezones,d=0;d<b.length;d++)if(b[d].offset===a)return b[d].name;return null},a.getTimezoneOffset=function(a){for(var b=c.timezones,d=0;d<b.length;d++)if(b[d].name===a.toUpperCase())return b[d].offset;return null},b.clone=function(){return new Date(this.getTime())},b.compareTo=function(a){return Date.compare(this,a)},b.equals=function(a){return Date.equals(this,a||new Date)},b.between=function(a,b){return this.getTime()>=a.getTime()&&this.getTime()<=b.getTime()},b.isAfter=function(a){return 1===this.compareTo(a||new Date)},b.isBefore=function(a){return-1===this.compareTo(a||new Date)},b.isToday=function(){return this.isSameDay(new Date)},b.isSameDay=function(a){return this.clone().clearTime().equals(a.clone().clearTime())},b.addMilliseconds=function(a){return this.setMilliseconds(this.getMilliseconds()+a),this},b.addSeconds=function(a){return this.addMilliseconds(1e3*a)},b.addMinutes=function(a){return this.addMilliseconds(6e4*a)},b.addHours=function(a){return this.addMilliseconds(36e5*a)},b.addDays=function(a){return this.setDate(this.getDate()+a),this},b.addWeeks=function(a){return this.addDays(7*a)},b.addMonths=function(b){var c=this.getDate();return this.setDate(1),this.setMonth(this.getMonth()+b),this.setDate(Math.min(c,a.getDaysInMonth(this.getFullYear(),this.getMonth()))),this},b.addYears=function(a){return this.addMonths(12*a)},b.add=function(a){if("number"==typeof a)return this._orient=a,this;var b=a;return b.milliseconds&&this.addMilliseconds(b.milliseconds),b.seconds&&this.addSeconds(b.seconds),b.minutes&&this.addMinutes(b.minutes),b.hours&&this.addHours(b.hours),b.weeks&&this.addWeeks(b.weeks),b.months&&this.addMonths(b.months),b.years&&this.addYears(b.years),b.days&&this.addDays(b.days),this};var e,f,g;b.getWeek=function(){var a,b,c,d,h,i,j,k,l,m;return e=e?e:this.getFullYear(),f=f?f:this.getMonth()+1,g=g?g:this.getDate(),2>=f?(a=e-1,b=(a/4|0)-(a/100|0)+(a/400|0),c=((a-1)/4|0)-((a-1)/100|0)+((a-1)/400|0),l=b-c,h=0,i=g-1+31*(f-1)):(a=e,b=(a/4|0)-(a/100|0)+(a/400|0),c=((a-1)/4|0)-((a-1)/100|0)+((a-1)/400|0),l=b-c,h=l+1,i=g+(153*(f-3)+2)/5+58+l),j=(a+b)%7,d=(i+j-h)%7,k=i+3-d|0,m=0>k?53-((j-l)/5|0):k>364+l?1:(k/7|0)+1,e=f=g=null,m},b.getISOWeek=function(){return e=this.getUTCFullYear(),f=this.getUTCMonth()+1,g=this.getUTCDate(),d(this.getWeek())},b.setWeek=function(a){return this.moveToDayOfWeek(1).addWeeks(a-this.getWeek())},a._validate=function(a,b,c,d){if("undefined"==typeof a)return!1;if("number"!=typeof a)throw new TypeError(a+" is not a Number.");if(b>a||a>c)throw new RangeError(a+" is not a valid value for "+d+".");return!0},a.validateMillisecond=function(b){return a._validate(b,0,999,"millisecond")},a.validateSecond=function(b){return a._validate(b,0,59,"second")},a.validateMinute=function(b){return a._validate(b,0,59,"minute")},a.validateHour=function(b){return a._validate(b,0,23,"hour")},a.validateDay=function(b,c,d){return a._validate(b,1,a.getDaysInMonth(c,d),"day")},a.validateMonth=function(b){return a._validate(b,0,11,"month")},a.validateYear=function(b){return a._validate(b,0,9999,"year")},b.set=function(b){return a.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds()),a.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds()),a.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes()),a.validateHour(b.hour)&&this.addHours(b.hour-this.getHours()),a.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth()),a.validateYear(b.year)&&this.addYears(b.year-this.getFullYear()),a.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate()),b.timezone&&this.setTimezone(b.timezone),b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset),b.week&&a._validate(b.week,0,53,"week")&&this.setWeek(b.week),this},b.moveToFirstDayOfMonth=function(){return this.set({day:1})},b.moveToLastDayOfMonth=function(){return this.set({day:a.getDaysInMonth(this.getFullYear(),this.getMonth())})},b.moveToNthOccurrence=function(a,b){var c=0;if(b>0)c=b-1;else if(-1===b)return this.moveToLastDayOfMonth(),this.getDay()!==a&&this.moveToDayOfWeek(a,-1),this;return this.moveToFirstDayOfMonth().addDays(-1).moveToDayOfWeek(a,1).addWeeks(c)},b.moveToDayOfWeek=function(a,b){var c=(a-this.getDay()+7*(b||1))%7;return this.addDays(0===c?c+=7*(b||1):c)},b.moveToMonth=function(a,b){var c=(a-this.getMonth()+12*(b||1))%12;return this.addMonths(0===c?c+=12*(b||1):c)},b.getOrdinalNumber=function(){return Math.ceil((this.clone().clearTime()-new Date(this.getFullYear(),0,1))/864e5)+1},b.getTimezone=function(){return a.getTimezoneAbbreviation(this.getUTCOffset())},b.setTimezoneOffset=function(a){var b=this.getTimezoneOffset(),c=-6*Number(a)/10;return this.addMinutes(c-b)},b.setTimezone=function(b){return this.setTimezoneOffset(a.getTimezoneOffset(b))},b.hasDaylightSavingTime=function(){return Date.today().set({month:0,day:1}).getTimezoneOffset()!==Date.today().set({month:6,day:1}).getTimezoneOffset()},b.isDaylightSavingTime=function(){return this.hasDaylightSavingTime()&&(new Date).getTimezoneOffset()===Date.today().set({month:6,day:1}).getTimezoneOffset()},b.getUTCOffset=function(){var a,b=-10*this.getTimezoneOffset()/6;return 0>b?(a=(b-1e4).toString(),a.charAt(0)+a.substr(2)):(a=(b+1e4).toString(),"+"+a.substr(1))},b.getElapsed=function(a){return(a||new Date)-this},b.toISOString||(b.toISOString=function(){function a(a){return 10>a?"0"+a:a}return'"'+this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+'Z"'}),b._toString=b.toString,b.toString=function(a){var b=this;if(a&&1==a.length){var e=c.formatPatterns;switch(b.t=b.toString,a){case"d":return b.t(e.shortDate);case"D":return b.t(e.longDate);case"F":return b.t(e.fullDateTime);case"m":return b.t(e.monthDay);case"r":return b.t(e.rfc1123);case"s":return b.t(e.sortableDateTime);case"t":return b.t(e.shortTime);case"T":return b.t(e.longTime);case"u":return b.t(e.universalSortableDateTime);case"y":return b.t(e.yearMonth)}}var f=function(a){switch(1*a){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};return a?a.replace(/(\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S)/g,function(a){if("\\"===a.charAt(0))return a.replace("\\","");switch(b.h=b.getHours,a){case"hh":return d(b.h()<13?0===b.h()?12:b.h():b.h()-12);case"h":return b.h()<13?0===b.h()?12:b.h():b.h()-12;case"HH":return d(b.h());case"H":return b.h();case"mm":return d(b.getMinutes());case"m":return b.getMinutes();case"ss":return d(b.getSeconds());case"s":return b.getSeconds();case"yyyy":return d(b.getFullYear(),4);case"yy":return d(b.getFullYear());case"dddd":return c.dayNames[b.getDay()];case"ddd":return c.abbreviatedDayNames[b.getDay()];case"dd":return d(b.getDate());case"d":return b.getDate();case"MMMM":return c.monthNames[b.getMonth()];case"MMM":return c.abbreviatedMonthNames[b.getMonth()];case"MM":return d(b.getMonth()+1);case"M":return b.getMonth()+1;case"t":return b.h()<12?c.amDesignator.substring(0,1):c.pmDesignator.substring(0,1);case"tt":return b.h()<12?c.amDesignator:c.pmDesignator;case"S":return f(b.getDate());default:return a}}):this._toString()}}(),function(){var a=Date,b=a.prototype,c=a.CultureInfo,d=Number.prototype;b._orient=1,b._nth=null,b._is=!1,b._same=!1,b._isSecond=!1,d._dateElement="day",b.next=function(){return this._orient=1,this},a.next=function(){return a.today().next()},b.last=b.prev=b.previous=function(){return this._orient=-1,this},a.last=a.prev=a.previous=function(){return a.today().last()},b.is=function(){return this._is=!0,this},b.same=function(){return this._same=!0,this._isSecond=!1,this},b.today=function(){return this.same().day()},b.weekday=function(){return this._is?(this._is=!1,!this.is().sat()&&!this.is().sun()):!1},b.at=function(b){return"string"==typeof b?a.parse(this.toString("d")+" "+b):this.set(b)},d.fromNow=d.after=function(a){var b={};return b[this._dateElement]=this,(a?a.clone():new Date).add(b)},d.ago=d.before=function(a){var b={};return b[this._dateElement]=-1*this,(a?a.clone():new Date).add(b)};var e,f="sunday monday tuesday wednesday thursday friday saturday".split(/\s/),g="january february march april may june july august september october november december".split(/\s/),h="Millisecond Second Minute Hour Day Week Month Year".split(/\s/),i="Milliseconds Seconds Minutes Hours Date Week Month FullYear".split(/\s/),j="final first second third fourth fifth".split(/\s/);b.toObject=function(){for(var a={},b=0;b<h.length;b++)a[h[b].toLowerCase()]=this["get"+i[b]]();return a},a.fromObject=function(a){return a.week=null,Date.today().set(a)};for(var k=function(b){return function(){if(this._is)return this._is=!1,this.getDay()==b;if(null!==this._nth){this._isSecond&&this.addSeconds(-1*this._orient),this._isSecond=!1;var c=this._nth;this._nth=null;var d=this.clone().moveToLastDayOfMonth();if(this.moveToNthOccurrence(b,c),this>d)throw new RangeError(a.getDayName(b)+" does not occur "+c+" times in the month of "+a.getMonthName(d.getMonth())+" "+d.getFullYear()+".");return this}return this.moveToDayOfWeek(b,this._orient)}},l=function(b){return function(){var d=a.today(),e=b-d.getDay();return 0===b&&1===c.firstDayOfWeek&&0!==d.getDay()&&(e+=7),d.addDays(e)}},m=0;m<f.length;m++)a[f[m].toUpperCase()]=a[f[m].toUpperCase().substring(0,3)]=m,a[f[m]]=a[f[m].substring(0,3)]=l(m),b[f[m]]=b[f[m].substring(0,3)]=k(m);for(var n=function(a){return function(){return this._is?(this._is=!1,this.getMonth()===a):this.moveToMonth(a,this._orient)}},o=function(b){return function(){return a.today().set({month:b,day:1})}},p=0;p<g.length;p++)a[g[p].toUpperCase()]=a[g[p].toUpperCase().substring(0,3)]=p,a[g[p]]=a[g[p].substring(0,3)]=o(p),b[g[p]]=b[g[p].substring(0,3)]=n(p);for(var q=function(a){return function(){if(this._isSecond)return this._isSecond=!1,this;if(this._same){this._same=this._is=!1;for(var b=this.toObject(),c=(arguments[0]||new Date).toObject(),d="",e=a.toLowerCase(),f=h.length-1;f>-1;f--){if(d=h[f].toLowerCase(),b[d]!=c[d])return!1;if(e==d)break}return!0}return"s"!=a.substring(a.length-1)&&(a+="s"),this["add"+a](this._orient)}},r=function(a){return function(){return this._dateElement=a,this}},s=0;s<h.length;s++)e=h[s].toLowerCase(),b[e]=b[e+"s"]=q(h[s]),d[e]=d[e+"s"]=r(e);b._ss=q("Second");for(var t=function(a){return function(b){return this._same?this._ss(arguments[0]):b||0===b?this.moveToNthOccurrence(b,a):(this._nth=a,2!==a||void 0!==b&&null!==b?this:(this._isSecond=!0,this.addSeconds(this._orient)))}},u=0;u<j.length;u++)b[j[u]]=t(0===u?-1:u)}(),function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};for(var a=Date.Parsing,b=a.Operators={rtoken:function(b){return function(c){var d=c.match(b);if(d)return[d[0],c.substring(d[0].length)];throw new a.Exception(c)}},token:function(a){return function(a){return b.rtoken(new RegExp("^s*"+a+"s*"))(a)}},stoken:function(a){return b.rtoken(new RegExp("^"+a))},until:function(a){return function(b){for(var c=[],d=null;b.length;){try{d=a.call(this,b)}catch(e){c.push(d[0]),b=d[1];continue}break}return[c,b]}},many:function(a){return function(b){for(var c=[],d=null;b.length;){try{d=a.call(this,b)}catch(e){return[c,b]}c.push(d[0]),b=d[1]}return[c,b]}},optional:function(a){return function(b){var c=null;try{c=a.call(this,b)}catch(d){return[null,b]}return[c[0],c[1]]}},not:function(b){return function(c){try{b.call(this,c)}catch(d){return[null,c]}throw new a.Exception(c)}},ignore:function(a){return a?function(b){var c=null;return c=a.call(this,b),[null,c[1]]}:null},product:function(){for(var a=arguments[0],c=Array.prototype.slice.call(arguments,1),d=[],e=0;e<a.length;e++)d.push(b.each(a[e],c));return d},cache:function(b){var c={},d=null;return function(e){try{d=c[e]=c[e]||b.call(this,e)}catch(f){d=c[e]=f}if(d instanceof a.Exception)throw d;return d}},any:function(){var b=arguments;return function(c){for(var d=null,e=0;e<b.length;e++)if(null!=b[e]){try{d=b[e].call(this,c)}catch(f){d=null}if(d)return d}throw new a.Exception(c)}},each:function(){var b=arguments;return function(c){for(var d=[],e=null,f=0;f<b.length;f++)if(null!=b[f]){try{e=b[f].call(this,c)}catch(g){throw new a.Exception(c)}d.push(e[0]),c=e[1]}return[d,c]}},all:function(){var a=arguments,b=b;return b.each(b.optional(a))},sequence:function(c,d,e){return d=d||b.rtoken(/^\s*/),e=e||null,1==c.length?c[0]:function(b){for(var f=null,g=null,h=[],i=0;i<c.length;i++){try{f=c[i].call(this,b)}catch(j){break}h.push(f[0]);try{g=d.call(this,f[1])}catch(k){g=null;break}b=g[1]}if(!f)throw new a.Exception(b);if(g)throw new a.Exception(g[1]);if(e)try{f=e.call(this,f[1])}catch(l){throw new a.Exception(f[1])}return[h,f?f[1]:b]}},between:function(a,c,d){d=d||a;var e=b.each(b.ignore(a),c,b.ignore(d));return function(a){var b=e.call(this,a);return[[b[0][0],r[0][2]],b[1]]}},list:function(a,c,d){return c=c||b.rtoken(/^\s*/),d=d||null,a instanceof Array?b.each(b.product(a.slice(0,-1),b.ignore(c)),a.slice(-1),b.ignore(d)):b.each(b.many(b.each(a,b.ignore(c))),px,b.ignore(d))},set:function(c,d,e){return d=d||b.rtoken(/^\s*/),e=e||null,function(f){for(var g=null,h=null,i=null,j=null,k=[[],f],l=!1,m=0;m<c.length;m++){i=null,h=null,g=null,l=1==c.length;try{g=c[m].call(this,f)}catch(n){continue}if(j=[[g[0]],g[1]],g[1].length>0&&!l)try{i=d.call(this,g[1])}catch(o){l=!0}else l=!0;if(l||0!==i[1].length||(l=!0),!l){for(var p=[],q=0;q<c.length;q++)m!=q&&p.push(c[q]);h=b.set(p,d).call(this,i[1]),h[0].length>0&&(j[0]=j[0].concat(h[0]),j[1]=h[1])}if(j[1].length<k[1].length&&(k=j),0===k[1].length)break}if(0===k[0].length)return k;if(e){try{i=e.call(this,k[1])}catch(r){throw new a.Exception(k[1])}k[1]=i[1]}return k}},forward:function(a,b){return function(c){return a[b].call(this,c)}},replace:function(a,b){return function(c){var d=a.call(this,c);return[b,d[1]]}},process:function(a,b){return function(c){var d=a.call(this,c);return[b.call(this,d[0]),d[1]]}},min:function(b,c){return function(d){var e=c.call(this,d);if(e[0].length<b)throw new a.Exception(d);return e}}},c=function(a){return function(){var b=null,c=[];if(arguments.length>1?b=Array.prototype.slice.call(arguments):arguments[0]instanceof Array&&(b=arguments[0]),!b)return a.apply(null,arguments);for(var d=0,e=b.shift();d<e.length;d++)return b.unshift(e[d]),c.push(a.apply(null,b)),b.shift(),c}},d="optional not ignore cache".split(/\s/),e=0;e<d.length;e++)b[d[e]]=c(b[d[e]]);for(var f=function(a){return function(){return arguments[0]instanceof Array?a.apply(null,arguments[0]):a.apply(null,arguments)}},g="each any all".split(/\s/),h=0;h<g.length;h++)b[g[h]]=f(b[g[h]])}(),function(){var a=Date,b=(a.prototype,a.CultureInfo),c=function(a){for(var b=[],d=0;d<a.length;d++)a[d]instanceof Array?b=b.concat(c(a[d])):a[d]&&b.push(a[d]);return b};a.Grammar={},a.Translator={hour:function(a){return function(){this.hour=Number(a)}},minute:function(a){return function(){this.minute=Number(a)}},second:function(a){return function(){this.second=Number(a)}},meridian:function(a){ +return function(){this.meridian=a.slice(0,1).toLowerCase()}},timezone:function(a){return function(){var b=a.replace(/[^\d\+\-]/g,"");b.length?this.timezoneOffset=Number(b):this.timezone=a.toLowerCase()}},day:function(a){var b=a[0];return function(){this.day=Number(b.match(/\d+/)[0])}},month:function(a){return function(){this.month=3==a.length?"jan feb mar apr may jun jul aug sep oct nov dec".indexOf(a)/4:Number(a)-1}},year:function(a){return function(){var c=Number(a);this.year=a.length>2?c:c+(c+2e3<b.twoDigitYearMax?2e3:1900)}},rday:function(a){return function(){switch(a){case"yesterday":this.days=-1;break;case"tomorrow":this.days=1;break;case"today":this.days=0;break;case"now":this.days=0,this.now=!0}}},finishExact:function(b){b=b instanceof Array?b:[b];for(var c=0;c<b.length;c++)b[c]&&b[c].call(this);var d=new Date;if(!this.hour&&!this.minute||this.month||this.year||this.day||(this.day=d.getDate()),this.year||(this.year=d.getFullYear()),this.month||0===this.month||(this.month=d.getMonth()),this.day||(this.day=1),this.hour||(this.hour=0),this.minute||(this.minute=0),this.second||(this.second=0),this.meridian&&this.hour&&("p"==this.meridian&&this.hour<12?this.hour=this.hour+12:"a"==this.meridian&&12==this.hour&&(this.hour=0)),this.day>a.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");var e=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);return this.timezone?e.set({timezone:this.timezone}):this.timezoneOffset&&e.set({timezoneOffset:this.timezoneOffset}),e},finish:function(b){if(b=b instanceof Array?c(b):[b],0===b.length)return null;for(var d=0;d<b.length;d++)"function"==typeof b[d]&&b[d].call(this);var e=a.today();if(this.now&&!this.unit&&!this.operator)return new Date;this.now&&(e=new Date);var f,g,h,i=!!(this.days&&null!==this.days||this.orient||this.operator);if(h="past"==this.orient||"subtract"==this.operator?-1:1,this.now||-1=="hour minute second".indexOf(this.unit)||e.setTimeToNow(),(this.month||0===this.month)&&-1!="year day hour minute second".indexOf(this.unit)&&(this.value=this.month+1,this.month=null,i=!0),!i&&this.weekday&&!this.day&&!this.days){var j=Date[this.weekday]();this.day=j.getDate(),this.month||(this.month=j.getMonth()),this.year=j.getFullYear()}if(i&&this.weekday&&"month"!=this.unit&&(this.unit="day",f=a.getDayNumberFromName(this.weekday)-e.getDay(),g=7,this.days=f?(f+h*g)%g:h*g),this.month&&"day"==this.unit&&this.operator&&(this.value=this.month+1,this.month=null),null!=this.value&&null!=this.month&&null!=this.year&&(this.day=1*this.value),this.month&&!this.day&&this.value&&(e.set({day:1*this.value}),i||(this.day=1*this.value)),this.month||!this.value||"month"!=this.unit||this.now||(this.month=this.value,i=!0),i&&(this.month||0===this.month)&&"year"!=this.unit&&(this.unit="month",f=this.month-e.getMonth(),g=12,this.months=f?(f+h*g)%g:h*g,this.month=null),this.unit||(this.unit="day"),!this.value&&this.operator&&null!==this.operator&&this[this.unit+"s"]&&null!==this[this.unit+"s"]?this[this.unit+"s"]=this[this.unit+"s"]+("add"==this.operator?1:-1)+(this.value||0)*h:(null==this[this.unit+"s"]||null!=this.operator)&&(this.value||(this.value=1),this[this.unit+"s"]=this.value*h),this.meridian&&this.hour&&("p"==this.meridian&&this.hour<12?this.hour=this.hour+12:"a"==this.meridian&&12==this.hour&&(this.hour=0)),this.weekday&&!this.day&&!this.days){var j=Date[this.weekday]();this.day=j.getDate(),j.getMonth()!==e.getMonth()&&(this.month=j.getMonth())}return!this.month&&0!==this.month||this.day||(this.day=1),this.orient||this.operator||"week"!=this.unit||!this.value||this.day||this.month?(i&&this.timezone&&this.day&&this.days&&(this.day=this.days),i?e.add(this):e.set(this)):Date.today().setWeek(this.value)}};var d,e=a.Parsing.Operators,f=a.Grammar,g=a.Translator;f.datePartDelimiter=e.rtoken(/^([\s\-\.\,\/\x27]+)/),f.timePartDelimiter=e.stoken(":"),f.whiteSpace=e.rtoken(/^\s*/),f.generalDelimiter=e.rtoken(/^(([\s\,]|at|@|on)+)/);var h={};f.ctoken=function(a){var c=h[a];if(!c){for(var d=b.regexPatterns,f=a.split(/\s+/),g=[],i=0;i<f.length;i++)g.push(e.replace(e.rtoken(d[f[i]]),f[i]));c=h[a]=e.any.apply(null,g)}return c},f.ctoken2=function(a){return e.rtoken(b.regexPatterns[a])},f.h=e.cache(e.process(e.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),g.hour)),f.hh=e.cache(e.process(e.rtoken(/^(0[0-9]|1[0-2])/),g.hour)),f.H=e.cache(e.process(e.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),g.hour)),f.HH=e.cache(e.process(e.rtoken(/^([0-1][0-9]|2[0-3])/),g.hour)),f.m=e.cache(e.process(e.rtoken(/^([0-5][0-9]|[0-9])/),g.minute)),f.mm=e.cache(e.process(e.rtoken(/^[0-5][0-9]/),g.minute)),f.s=e.cache(e.process(e.rtoken(/^([0-5][0-9]|[0-9])/),g.second)),f.ss=e.cache(e.process(e.rtoken(/^[0-5][0-9]/),g.second)),f.hms=e.cache(e.sequence([f.H,f.m,f.s],f.timePartDelimiter)),f.t=e.cache(e.process(f.ctoken2("shortMeridian"),g.meridian)),f.tt=e.cache(e.process(f.ctoken2("longMeridian"),g.meridian)),f.z=e.cache(e.process(e.rtoken(/^((\+|\-)\s*\d\d\d\d)|((\+|\-)\d\d\:?\d\d)/),g.timezone)),f.zz=e.cache(e.process(e.rtoken(/^((\+|\-)\s*\d\d\d\d)|((\+|\-)\d\d\:?\d\d)/),g.timezone)),f.zzz=e.cache(e.process(f.ctoken2("timezone"),g.timezone)),f.timeSuffix=e.each(e.ignore(f.whiteSpace),e.set([f.tt,f.zzz])),f.time=e.each(e.optional(e.ignore(e.stoken("T"))),f.hms,f.timeSuffix),f.d=e.cache(e.process(e.each(e.rtoken(/^([0-2]\d|3[0-1]|\d)/),e.optional(f.ctoken2("ordinalSuffix"))),g.day)),f.dd=e.cache(e.process(e.each(e.rtoken(/^([0-2]\d|3[0-1])/),e.optional(f.ctoken2("ordinalSuffix"))),g.day)),f.ddd=f.dddd=e.cache(e.process(f.ctoken("sun mon tue wed thu fri sat"),function(a){return function(){this.weekday=a}})),f.M=e.cache(e.process(e.rtoken(/^(1[0-2]|0\d|\d)/),g.month)),f.MM=e.cache(e.process(e.rtoken(/^(1[0-2]|0\d)/),g.month)),f.MMM=f.MMMM=e.cache(e.process(f.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),g.month)),f.y=e.cache(e.process(e.rtoken(/^(\d\d?)/),g.year)),f.yy=e.cache(e.process(e.rtoken(/^(\d\d)/),g.year)),f.yyy=e.cache(e.process(e.rtoken(/^(\d\d?\d?\d?)/),g.year)),f.yyyy=e.cache(e.process(e.rtoken(/^(\d\d\d\d)/),g.year)),d=function(){return e.each(e.any.apply(null,arguments),e.not(f.ctoken2("timeContext")))},f.day=d(f.d,f.dd),f.month=d(f.M,f.MMM),f.year=d(f.yyyy,f.yy),f.orientation=e.process(f.ctoken("past future"),function(a){return function(){this.orient=a}}),f.operator=e.process(f.ctoken("add subtract"),function(a){return function(){this.operator=a}}),f.rday=e.process(f.ctoken("yesterday tomorrow today now"),g.rday),f.unit=e.process(f.ctoken("second minute hour day week month year"),function(a){return function(){this.unit=a}}),f.value=e.process(e.rtoken(/^\d\d?(st|nd|rd|th)?/),function(a){return function(){this.value=a.replace(/\D/g,"")}}),f.expression=e.set([f.rday,f.operator,f.value,f.unit,f.orientation,f.ddd,f.MMM]),d=function(){return e.set(arguments,f.datePartDelimiter)},f.mdy=d(f.ddd,f.month,f.day,f.year),f.ymd=d(f.ddd,f.year,f.month,f.day),f.dmy=d(f.ddd,f.day,f.month,f.year),f.date=function(a){return(f[b.dateElementOrder]||f.mdy).call(this,a)},f.format=e.process(e.many(e.any(e.process(e.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),function(b){if(f[b])return f[b];throw a.Parsing.Exception(b)}),e.process(e.rtoken(/^[^dMyhHmstz]+/),function(a){return e.ignore(e.stoken(a))}))),function(a){return e.process(e.each.apply(null,a),g.finishExact)});var i={},j=function(a){return i[a]=i[a]||f.format(a)[0]};f.formats=function(a){if(a instanceof Array){for(var b=[],c=0;c<a.length;c++)b.push(j(a[c]));return e.any.apply(null,b)}return j(a)},f._formats=f.formats(['"yyyy-MM-ddTHH:mm:ssZ"',"yyyy-MM-ddTHH:mm:ssZ","yyyy-MM-ddTHH:mm:ssz","yyyy-MM-ddTHH:mm:ss","yyyy-MM-ddTHH:mmZ","yyyy-MM-ddTHH:mmz","yyyy-MM-ddTHH:mm","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz","MMddyyyy","ddMMyyyy","Mddyyyy","ddMyyyy","Mdyyyy","dMyyyy","yyyy","Mdyy","dMyy","d"]),f._start=e.process(e.set([f.date,f.time,f.expression],f.generalDelimiter,f.whiteSpace),g.finish),f.start=function(a){try{var b=f._formats.call({},a);if(0===b[1].length)return b}catch(c){}return f._start.call({},a)},a._parse=a.parse,a.parse=function(b){var c=null;if(!b)return null;if(b instanceof Date)return b;try{c=a.Grammar.start.call({},b.replace(/^\s*(\S*(\s+\S+)*)\s*$/,"$1"))}catch(d){return null}return 0===c[1].length?c[0]:null},a.getParseFunction=function(b){var c=a.Grammar.formats(b);return function(a){var b=null;try{b=c.call({},a)}catch(d){return null}return 0===b[1].length?b[0]:null}},a.parseExact=function(b,c){return a.getParseFunction(c)(b)}}(),function(a,b){function c(a){return l.PF.compile(a||"nplurals=2; plural=(n != 1);")}function d(a,b){this._key=a,this._i18n=b}var e=Array.prototype,f=Object.prototype,g=e.slice,h=f.hasOwnProperty,i=e.forEach,j={},k={forEach:function(a,b,c){var d,e,f;if(null!==a)if(i&&a.forEach===i)a.forEach(b,c);else if(a.length===+a.length){for(d=0,e=a.length;e>d;d++)if(d in a&&b.call(c,a[d],d,a)===j)return}else for(f in a)if(h.call(a,f)&&b.call(c,a[f],f,a)===j)return},extend:function(a){return this.forEach(g.call(arguments,1),function(b){for(var c in b)a[c]=b[c]}),a}},l=function(a){if(this.defaults={locale_data:{messages:{"":{domain:"messages",lang:"en",plural_forms:"nplurals=2; plural=(n != 1);"}}},domain:"messages",debug:!1},this.options=k.extend({},this.defaults,a),this.textdomain(this.options.domain),a.domain&&!this.options.locale_data[this.options.domain])throw new Error("Text domain set to non-existent domain: `"+a.domain+"`")};l.context_delimiter=String.fromCharCode(4),k.extend(d.prototype,{onDomain:function(a){return this._domain=a,this},withContext:function(a){return this._context=a,this},ifPlural:function(a,b){return this._val=a,this._pkey=b,this},fetch:function(a){return"[object Array]"!={}.toString.call(a)&&(a=[].slice.call(arguments,0)),(a&&a.length?l.sprintf:function(a){return a})(this._i18n.dcnpgettext(this._domain,this._context,this._key,this._pkey,this._val),a)}}),k.extend(l.prototype,{translate:function(a){return new d(a,this)},textdomain:function(a){return a?void(this._textdomain=a):this._textdomain},gettext:function(a){return this.dcnpgettext.call(this,b,b,a)},dgettext:function(a,c){return this.dcnpgettext.call(this,a,b,c)},dcgettext:function(a,c){return this.dcnpgettext.call(this,a,b,c)},ngettext:function(a,c,d){return this.dcnpgettext.call(this,b,b,a,c,d)},dngettext:function(a,c,d,e){return this.dcnpgettext.call(this,a,b,c,d,e)},dcngettext:function(a,c,d,e){return this.dcnpgettext.call(this,a,b,c,d,e)},pgettext:function(a,c){return this.dcnpgettext.call(this,b,a,c)},dpgettext:function(a,b,c){return this.dcnpgettext.call(this,a,b,c)},dcpgettext:function(a,b,c){return this.dcnpgettext.call(this,a,b,c)},npgettext:function(a,c,d,e){return this.dcnpgettext.call(this,b,a,c,d,e)},dnpgettext:function(a,b,c,d,e){return this.dcnpgettext.call(this,a,b,c,d,e)},dcnpgettext:function(a,b,d,e,f){e=e||d,a=a||this._textdomain;var g;if(!this.options)return g=new l,g.dcnpgettext.call(g,void 0,void 0,d,e,f);if(!this.options.locale_data)throw new Error("No locale data provided.");if(!this.options.locale_data[a])throw new Error("Domain `"+a+"` was not found.");if(!this.options.locale_data[a][""])throw new Error("No locale meta information provided.");if(!d)throw new Error("No translation key found.");var h,i,j,k=b?b+l.context_delimiter+d:d,m=this.options.locale_data,n=m[a],o=(m.messages||this.defaults.locale_data.messages)[""],p=n[""].plural_forms||n[""]["Plural-Forms"]||n[""]["plural-forms"]||o.plural_forms||o["Plural-Forms"]||o["plural-forms"];if(void 0===f)j=0;else{if("number"!=typeof f&&(f=parseInt(f,10),isNaN(f)))throw new Error("The number that was passed in is not a number.");j=c(p)(f)}if(!n)throw new Error("No domain named `"+a+"` could be found.");return h=n[k],!h||j>h.length?(this.options.missing_key_callback&&this.options.missing_key_callback(k,a),i=[d,e],this.options.debug===!0&&console.log(i[c(p)(f)]),i[c()(f)]):(i=h[j],i?i:(i=[d,e],i[c()(f)]))}});var m=function(){function a(a){return Object.prototype.toString.call(a).slice(8,-1).toLowerCase()}function b(a,b){for(var c=[];b>0;c[--b]=a);return c.join("")}var c=function(){return c.cache.hasOwnProperty(arguments[0])||(c.cache[arguments[0]]=c.parse(arguments[0])),c.format.call(null,c.cache[arguments[0]],arguments)};return c.format=function(c,d){var e,f,g,h,i,j,k,l=1,n=c.length,o="",p=[];for(f=0;n>f;f++)if(o=a(c[f]),"string"===o)p.push(c[f]);else if("array"===o){if(h=c[f],h[2])for(e=d[l],g=0;g<h[2].length;g++){if(!e.hasOwnProperty(h[2][g]))throw m('[sprintf] property "%s" does not exist',h[2][g]);e=e[h[2][g]]}else e=h[1]?d[h[1]]:d[l++];if(/[^s]/.test(h[8])&&"number"!=a(e))throw m("[sprintf] expecting number but found %s",a(e));switch(("undefined"==typeof e||null===e)&&(e=""),h[8]){case"b":e=e.toString(2);break;case"c":e=String.fromCharCode(e);break;case"d":e=parseInt(e,10);break;case"e":e=h[7]?e.toExponential(h[7]):e.toExponential();break;case"f":e=h[7]?parseFloat(e).toFixed(h[7]):parseFloat(e);break;case"o":e=e.toString(8);break;case"s":e=(e=String(e))&&h[7]?e.substring(0,h[7]):e;break;case"u":e=Math.abs(e);break;case"x":e=e.toString(16);break;case"X":e=e.toString(16).toUpperCase()}e=/[def]/.test(h[8])&&h[3]&&e>=0?"+"+e:e,j=h[4]?"0"==h[4]?"0":h[4].charAt(1):" ",k=h[6]-String(e).length,i=h[6]?b(j,k):"",p.push(h[5]?e+i:i+e)}return p.join("")},c.cache={},c.parse=function(a){for(var b=a,c=[],d=[],e=0;b;){if(null!==(c=/^[^\x25]+/.exec(b)))d.push(c[0]);else if(null!==(c=/^\x25{2}/.exec(b)))d.push("%");else{if(null===(c=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(b)))throw"[sprintf] huh?";if(c[2]){e|=1;var f=[],g=c[2],h=[];if(null===(h=/^([a-z_][a-z_\d]*)/i.exec(g)))throw"[sprintf] huh?";for(f.push(h[1]);""!==(g=g.substring(h[0].length));)if(null!==(h=/^\.([a-z_][a-z_\d]*)/i.exec(g)))f.push(h[1]);else{if(null===(h=/^\[(\d+)\]/.exec(g)))throw"[sprintf] huh?";f.push(h[1])}c[2]=f}else e|=2;if(3===e)throw"[sprintf] mixing positional and named placeholders is not (yet) supported";d.push(c)}b=b.substring(c[0].length)}return d},c}(),n=function(a,b){return b.unshift(a),m.apply(null,b)};l.parse_plural=function(a,b){return a=a.replace(/n/g,b),l.parse_expression(a)},l.sprintf=function(a,b){return"[object Array]"=={}.toString.call(b)?n(a,[].slice.call(b)):m.apply(this,[].slice.call(arguments))},l.prototype.sprintf=function(){return l.sprintf.apply(this,arguments)},l.PF={},l.PF.parse=function(a){var b=l.PF.extractPluralExpr(a);return l.PF.parser.parse.call(l.PF.parser,b)},l.PF.compile=function(a){function b(a){return a===!0?1:a?a:0}var c=l.PF.parse(a);return function(a){return b(l.PF.interpreter(c)(a))}},l.PF.interpreter=function(a){return function(b){switch(a.type){case"GROUP":return l.PF.interpreter(a.expr)(b);case"TERNARY":return l.PF.interpreter(a.expr)(b)?l.PF.interpreter(a.truthy)(b):l.PF.interpreter(a.falsey)(b);case"OR":return l.PF.interpreter(a.left)(b)||l.PF.interpreter(a.right)(b);case"AND":return l.PF.interpreter(a.left)(b)&&l.PF.interpreter(a.right)(b);case"LT":return l.PF.interpreter(a.left)(b)<l.PF.interpreter(a.right)(b);case"GT":return l.PF.interpreter(a.left)(b)>l.PF.interpreter(a.right)(b);case"LTE":return l.PF.interpreter(a.left)(b)<=l.PF.interpreter(a.right)(b);case"GTE":return l.PF.interpreter(a.left)(b)>=l.PF.interpreter(a.right)(b);case"EQ":return l.PF.interpreter(a.left)(b)==l.PF.interpreter(a.right)(b);case"NEQ":return l.PF.interpreter(a.left)(b)!=l.PF.interpreter(a.right)(b);case"MOD":return l.PF.interpreter(a.left)(b)%l.PF.interpreter(a.right)(b);case"VAR":return b;case"NUM":return a.val;default:throw new Error("Invalid Token found.")}}},l.PF.extractPluralExpr=function(a){a=a.replace(/^\s\s*/,"").replace(/\s\s*$/,""),/;\s*$/.test(a)||(a=a.concat(";"));var b,c=/nplurals\=(\d+);/,d=/plural\=(.*);/,e=a.match(c),f={};if(!(e.length>1))throw new Error("nplurals not found in plural_forms string: "+a);if(f.nplurals=e[1],a=a.replace(c,""),b=a.match(d),!(b&&b.length>1))throw new Error("`plural` expression not found: "+a);return b[1]},l.PF.parser=function(){var a={trace:function(){},yy:{},symbols_:{error:2,expressions:3,e:4,EOF:5,"?":6,":":7,"||":8,"&&":9,"<":10,"<=":11,">":12,">=":13,"!=":14,"==":15,"%":16,"(":17,")":18,n:19,NUMBER:20,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",6:"?",7:":",8:"||",9:"&&",10:"<",11:"<=",12:">",13:">=",14:"!=",15:"==",16:"%",17:"(",18:")",19:"n",20:"NUMBER"},productions_:[0,[3,2],[4,5],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,1],[4,1]],performAction:function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 1:return{type:"GROUP",expr:f[h-1]};case 2:this.$={type:"TERNARY",expr:f[h-4],truthy:f[h-2],falsey:f[h]};break;case 3:this.$={type:"OR",left:f[h-2],right:f[h]};break;case 4:this.$={type:"AND",left:f[h-2],right:f[h]};break;case 5:this.$={type:"LT",left:f[h-2],right:f[h]};break;case 6:this.$={type:"LTE",left:f[h-2],right:f[h]};break;case 7:this.$={type:"GT",left:f[h-2],right:f[h]};break;case 8:this.$={type:"GTE",left:f[h-2],right:f[h]};break;case 9:this.$={type:"NEQ",left:f[h-2],right:f[h]};break;case 10:this.$={type:"EQ",left:f[h-2],right:f[h]};break;case 11:this.$={type:"MOD",left:f[h-2],right:f[h]};break;case 12:this.$={type:"GROUP",expr:f[h-1]};break;case 13:this.$={type:"VAR"};break;case 14:this.$={type:"NUM",val:Number(a)}}},table:[{3:1,4:2,17:[1,3],19:[1,4],20:[1,5]},{1:[3]},{5:[1,6],6:[1,7],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16]},{4:17,17:[1,3],19:[1,4],20:[1,5]},{5:[2,13],6:[2,13],7:[2,13],8:[2,13],9:[2,13],10:[2,13],11:[2,13],12:[2,13],13:[2,13],14:[2,13],15:[2,13],16:[2,13],18:[2,13]},{5:[2,14],6:[2,14],7:[2,14],8:[2,14],9:[2,14],10:[2,14],11:[2,14],12:[2,14],13:[2,14],14:[2,14],15:[2,14],16:[2,14],18:[2,14]},{1:[2,1]},{4:18,17:[1,3],19:[1,4],20:[1,5]},{4:19,17:[1,3],19:[1,4],20:[1,5]},{4:20,17:[1,3],19:[1,4],20:[1,5]},{4:21,17:[1,3],19:[1,4],20:[1,5]},{4:22,17:[1,3],19:[1,4],20:[1,5]},{4:23,17:[1,3],19:[1,4],20:[1,5]},{4:24,17:[1,3],19:[1,4],20:[1,5]},{4:25,17:[1,3],19:[1,4],20:[1,5]},{4:26,17:[1,3],19:[1,4],20:[1,5]},{4:27,17:[1,3],19:[1,4],20:[1,5]},{6:[1,7],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[1,28]},{6:[1,7],7:[1,29],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16]},{5:[2,3],6:[2,3],7:[2,3],8:[2,3],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,3]},{5:[2,4],6:[2,4],7:[2,4],8:[2,4],9:[2,4],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,4]},{5:[2,5],6:[2,5],7:[2,5],8:[2,5],9:[2,5],10:[2,5],11:[2,5],12:[2,5],13:[2,5],14:[2,5],15:[2,5],16:[1,16],18:[2,5]},{5:[2,6],6:[2,6],7:[2,6],8:[2,6],9:[2,6],10:[2,6],11:[2,6],12:[2,6],13:[2,6],14:[2,6],15:[2,6],16:[1,16],18:[2,6]},{5:[2,7],6:[2,7],7:[2,7],8:[2,7],9:[2,7],10:[2,7],11:[2,7],12:[2,7],13:[2,7],14:[2,7],15:[2,7],16:[1,16],18:[2,7]},{5:[2,8],6:[2,8],7:[2,8],8:[2,8],9:[2,8],10:[2,8],11:[2,8],12:[2,8],13:[2,8],14:[2,8],15:[2,8],16:[1,16],18:[2,8]},{5:[2,9],6:[2,9],7:[2,9],8:[2,9],9:[2,9],10:[2,9],11:[2,9],12:[2,9],13:[2,9],14:[2,9],15:[2,9],16:[1,16],18:[2,9]},{5:[2,10],6:[2,10],7:[2,10],8:[2,10],9:[2,10],10:[2,10],11:[2,10],12:[2,10],13:[2,10],14:[2,10],15:[2,10],16:[1,16],18:[2,10]},{5:[2,11],6:[2,11],7:[2,11],8:[2,11],9:[2,11],10:[2,11],11:[2,11],12:[2,11],13:[2,11],14:[2,11],15:[2,11],16:[2,11],18:[2,11]},{5:[2,12],6:[2,12],7:[2,12],8:[2,12],9:[2,12],10:[2,12],11:[2,12],12:[2,12],13:[2,12],14:[2,12],15:[2,12],16:[2,12],18:[2,12]},{4:30,17:[1,3],19:[1,4],20:[1,5]},{5:[2,2],6:[1,7],7:[2,2],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,2]}],defaultActions:{6:[2,1]},parseError:function(a,b){throw new Error(a)},parse:function(a){function b(a){e.length=e.length-2*a,f.length=f.length-a,g.length=g.length-a}function c(){var a;return a=d.lexer.lex()||1,"number"!=typeof a&&(a=d.symbols_[a]||a),a}var d=this,e=[0],f=[null],g=[],h=this.table,i="",j=0,k=0,l=0,m=2,n=1;this.lexer.setInput(a),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var o=this.lexer.yylloc;g.push(o),"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var p,q,r,s,t,u,v,w,x,y={};;){if(r=e[e.length-1],this.defaultActions[r]?s=this.defaultActions[r]:(null==p&&(p=c()),s=h[r]&&h[r][p]),"undefined"==typeof s||!s.length||!s[0]){if(!l){x=[];for(u in h[r])this.terminals_[u]&&u>2&&x.push("'"+this.terminals_[u]+"'");var z="";z=this.lexer.showPosition?"Parse error on line "+(j+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+x.join(", ")+", got '"+this.terminals_[p]+"'":"Parse error on line "+(j+1)+": Unexpected "+(1==p?"end of input":"'"+(this.terminals_[p]||p)+"'"),this.parseError(z,{text:this.lexer.match,token:this.terminals_[p]||p,line:this.lexer.yylineno,loc:o,expected:x})}if(3==l){if(p==n)throw new Error(z||"Parsing halted.");k=this.lexer.yyleng,i=this.lexer.yytext,j=this.lexer.yylineno,o=this.lexer.yylloc,p=c()}for(;;){if(m.toString()in h[r])break;if(0==r)throw new Error(z||"Parsing halted.");b(1),r=e[e.length-1]}q=p,p=m,r=e[e.length-1],s=h[r]&&h[r][m],l=3}if(s[0]instanceof Array&&s.length>1)throw new Error("Parse Error: multiple actions possible at state: "+r+", token: "+p);switch(s[0]){case 1:e.push(p),f.push(this.lexer.yytext),g.push(this.lexer.yylloc),e.push(s[1]),p=null,q?(p=q,q=null):(k=this.lexer.yyleng,i=this.lexer.yytext,j=this.lexer.yylineno,o=this.lexer.yylloc,l>0&&l--);break;case 2:if(v=this.productions_[s[1]][1],y.$=f[f.length-v],y._$={first_line:g[g.length-(v||1)].first_line,last_line:g[g.length-1].last_line,first_column:g[g.length-(v||1)].first_column,last_column:g[g.length-1].last_column},t=this.performAction.call(y,i,k,j,this.yy,s[1],f,g),"undefined"!=typeof t)return t;v&&(e=e.slice(0,-1*v*2),f=f.slice(0,-1*v),g=g.slice(0,-1*v)),e.push(this.productions_[s[1]][0]),f.push(y.$),g.push(y._$),w=h[e[e.length-2]][e[e.length-1]],e.push(w);break;case 3:return!0}}return!0}},b=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parseError)throw new Error(a);this.yy.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.match+=a,this.matched+=a;var b=a.match(/\n/);return b&&this.yylineno++,this._input=this._input.slice(1),a},unput:function(a){return this._input=a+this._input,this},more:function(){return this._more=!0,this},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c;this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),e=0;e<d.length;e++)if(b=this._input.match(this.rules[d[e]]))return c=b[0].match(/\n.*/g),c&&(this.yylineno+=c.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:c?c[c.length-1].length-1:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,d[e],this.conditionStack[this.conditionStack.length-1]),a?a:void 0;return""===this._input?this.EOF:void this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return a.performAction=function(a,b,c,d){switch(c){case 0:break;case 1:return 20;case 2:return 19;case 3:return 8;case 4:return 9;case 5:return 6;case 6:return 7;case 7:return 11;case 8:return 13;case 9:return 10;case 10:return 12;case 11:return 14;case 12:return 15;case 13:return 16;case 14:return 17;case 15:return 18;case 16:return 5;case 17:return"INVALID"}},a.rules=[/^\s+/,/^[0-9]+(\.[0-9]+)?\b/,/^n\b/,/^\|\|/,/^&&/,/^\?/,/^:/,/^<=/,/^>=/,/^</,/^>/,/^!=/,/^==/,/^%/,/^\(/,/^\)/,/^$/,/^./],a.conditions={INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17],inclusive:!0}},a}();return a.lexer=b,a}(),"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=l),exports.Jed=l):("function"==typeof define&&define.amd&&define(function(){return l}),a.Jed=l)}(this),function(a){function b(a){return{jsonrpc:"2.0",method:a.method||"",params:a.params||{},id:g++}}function c(c){var d=a.isArray(c)?c.map(b):b(c);return JSON.stringify(d)}function d(a){return a.sort(e)}function e(a,b){return a.id<b.id?-1:1}function f(b,e){var f=new a.Deferred;e=e||{};var g=e.success||h,i=e.error||h;delete e.success,delete e.error;var j=a.isArray(b),k=a.extend({url:(j?b[0].url:b.url)||a.jsonrpc.defaultUrl,contentType:"application/json",dataType:"text",dataFilter:function(a,b){return JSON.parse(a)},type:"POST",processData:!1,data:c(b),success:function(a){if(j){var b=d(a);return g(b),void f.resolve(b)}if(a.hasOwnProperty("error"))return i(a.error),void f.reject(a.error);if(a.hasOwnProperty("result"))return g(a.result),void f.resolve(a.result);throw"Invalid response returned"},error:function(a,b,c){var d=null;if("timeout"===c)d={status:b,code:-32e3,message:"Request Timeout",data:null};else try{var e=JSON.parse(a.responseText);d=e.error}catch(g){d={status:b,code:-32603,message:c,data:a.responseText}}i(d),f.reject(d)}},e);return a.ajax(k),f.promise()}var g=1,h=function(){};a.extend({jsonrpc:f}),a.jsonrpc.defaultUrl="/jsonrpc"}(jQuery),!function(a,b,c,d){var e=a(b);a.fn.lazyload=function(f){function g(){var b=0;i.each(function(){var c=a(this);if(!j.skip_invisible||c.is(":visible"))if(a.abovethetop(this,j)||a.leftofbegin(this,j));else if(a.belowthefold(this,j)||a.rightoffold(this,j)){if(++b>j.failure_limit)return!1}else c.trigger("appear"),b=0})}var h,i=this,j={threshold:0,failure_limit:0,event:"scroll",effect:"show",container:b,data_attribute:"original",skip_invisible:!0,appear:null,load:null,placeholder:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC"};return f&&(d!==f.failurelimit&&(f.failure_limit=f.failurelimit,delete f.failurelimit),d!==f.effectspeed&&(f.effect_speed=f.effectspeed,delete f.effectspeed),a.extend(j,f)),h=j.container===d||j.container===b?e:a(j.container),0===j.event.indexOf("scroll")&&h.bind(j.event,function(){return g()}),this.each(function(){var b=this,c=a(b);b.loaded=!1,(c.attr("src")===d||c.attr("src")===!1)&&c.is("img")&&c.attr("src",j.placeholder),c.one("appear",function(){if(!this.loaded){if(j.appear){var d=i.length;j.appear.call(b,d,j)}a("<img />").bind("load",function(){var d=c.attr("data-"+j.data_attribute);c.hide(),c.is("img")?c.attr("src",d):c.css("background-image","url('"+d+"')"),c[j.effect](j.effect_speed),b.loaded=!0;var e=a.grep(i,function(a){return!a.loaded});if(i=a(e),j.load){var f=i.length;j.load.call(b,f,j)}}).attr("src",c.attr("data-"+j.data_attribute))}}),0!==j.event.indexOf("scroll")&&c.bind(j.event,function(){b.loaded||c.trigger("appear")})}),e.bind("resize",function(){g()}),/(?:iphone|ipod|ipad).*os 5/gi.test(navigator.appVersion)&&e.bind("pageshow",function(b){b.originalEvent&&b.originalEvent.persisted&&i.each(function(){a(this).trigger("appear")})}),a(c).ready(function(){g()}),this},a.belowthefold=function(c,f){var g;return g=f.container===d||f.container===b?(b.innerHeight?b.innerHeight:e.height())+e.scrollTop():a(f.container).offset().top+a(f.container).height(),g<=a(c).offset().top-f.threshold},a.rightoffold=function(c,f){var g;return g=f.container===d||f.container===b?e.width()+e.scrollLeft():a(f.container).offset().left+a(f.container).width(),g<=a(c).offset().left-f.threshold},a.abovethetop=function(c,f){var g;return g=f.container===d||f.container===b?e.scrollTop():a(f.container).offset().top,g>=a(c).offset().top+f.threshold+a(c).height()},a.leftofbegin=function(c,f){var g;return g=f.container===d||f.container===b?e.scrollLeft():a(f.container).offset().left,g>=a(c).offset().left+f.threshold+a(c).width()},a.inviewport=function(b,c){return!(a.rightoffold(b,c)||a.leftofbegin(b,c)||a.belowthefold(b,c)||a.abovethetop(b,c))},a.extend(a.expr[":"],{"below-the-fold":function(b){return a.belowthefold(b,{threshold:0})},"above-the-top":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-screen":function(b){return a.rightoffold(b,{threshold:0})},"left-of-screen":function(b){return!a.rightoffold(b,{threshold:0})},"in-viewport":function(b){return a.inviewport(b,{threshold:0})},"above-the-fold":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-fold":function(b){return a.rightoffold(b,{threshold:0})},"left-of-fold":function(b){return!a.rightoffold(b,{threshold:0})}})}(jQuery,window,document),function(a){"use strict";function b(a,b){return Math.round(a/b)*b}function c(a){return"number"==typeof a&&!isNaN(a)&&isFinite(a)}function d(a){var b=Math.pow(10,7);return Number((Math.round(a*b)/b).toFixed(7))}function e(a,b,c){a.addClass(b),setTimeout(function(){a.removeClass(b)},c)}function f(a){return Math.max(Math.min(a,100),0)}function g(b){return a.isArray(b)?b:[b]}function h(a){var b=a.split(".");return b.length>1?b[1].length:0}function i(a,b){return 100/(b-a)}function j(a,b){return 100*b/(a[1]-a[0])}function k(a,b){return j(a,a[0]<0?b+Math.abs(a[0]):b-a[0])}function l(a,b){return b*(a[1]-a[0])/100+a[0]}function m(a,b){for(var c=1;a>=b[c];)c+=1;return c}function n(a,b,c){if(c>=a.slice(-1)[0])return 100;var d,e,f,g,h=m(c,a);return d=a[h-1],e=a[h],f=b[h-1],g=b[h],f+k([d,e],c)/i(f,g)}function o(a,b,c){if(c>=100)return a.slice(-1)[0];var d,e,f,g,h=m(c,b);return d=a[h-1],e=a[h],f=b[h-1],g=b[h],l([d,e],(c-f)*i(f,g))}function p(a,c,d,e){if(100===e)return e;var f,g,h=m(e,a);return d?(f=a[h-1],g=a[h],e-f>(g-f)/2?g:f):c[h-1]?a[h-1]+b(e-a[h-1],c[h-1]):e}function q(a,b,d){var e;if("number"==typeof b&&(b=[b]),"[object Array]"!==Object.prototype.toString.call(b))throw new Error("noUiSlider: 'range' contains invalid value.");if(e="min"===a?0:"max"===a?100:parseFloat(a),!c(e)||!c(b[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");d.xPct.push(e),d.xVal.push(b[0]),e?d.xSteps.push(isNaN(b[1])?!1:b[1]):isNaN(b[1])||(d.xSteps[0]=b[1])}function r(a,b,c){return b?void(c.xSteps[a]=j([c.xVal[a],c.xVal[a+1]],b)/i(c.xPct[a],c.xPct[a+1])):!0}function s(a,b,c,d){this.xPct=[],this.xVal=[],this.xSteps=[d||!1],this.xNumSteps=[!1],this.snap=b,this.direction=c;var e,f=[];for(e in a)a.hasOwnProperty(e)&&f.push([a[e],e]);for(f.sort(function(a,b){return a[0]-b[0]}),e=0;e<f.length;e++)q(f[e][1],f[e][0],this);for(this.xNumSteps=this.xSteps.slice(0),e=0;e<this.xNumSteps.length;e++)r(e,this.xNumSteps[e],this)}function t(a,b){if(!c(b))throw new Error("noUiSlider: 'step' is not numeric.");a.singleStep=b}function u(b,c){if("object"!=typeof c||a.isArray(c))throw new Error("noUiSlider: 'range' is not an object.");if(void 0===c.min||void 0===c.max)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");b.spectrum=new s(c,b.snap,b.dir,b.singleStep)}function v(b,c){if(c=g(c),!a.isArray(c)||!c.length||c.length>2)throw new Error("noUiSlider: 'start' option is incorrect."); +b.handles=c.length,b.start=c}function w(a,b){if(a.snap=b,"boolean"!=typeof b)throw new Error("noUiSlider: 'snap' option must be a boolean.")}function x(a,b){if(a.animate=b,"boolean"!=typeof b)throw new Error("noUiSlider: 'animate' option must be a boolean.")}function y(a,b){if("lower"===b&&1===a.handles)a.connect=1;else if("upper"===b&&1===a.handles)a.connect=2;else if(b===!0&&2===a.handles)a.connect=3;else{if(b!==!1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");a.connect=0}}function z(a,b){switch(b){case"horizontal":a.ort=0;break;case"vertical":a.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function A(a,b){if(!c(b))throw new Error("noUiSlider: 'margin' option must be numeric.");if(a.margin=a.spectrum.getMargin(b),!a.margin)throw new Error("noUiSlider: 'margin' option is only supported on linear sliders.")}function B(a,b){if(!c(b))throw new Error("noUiSlider: 'limit' option must be numeric.");if(a.limit=a.spectrum.getMargin(b),!a.limit)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders.")}function C(a,b){switch(b){case"ltr":a.dir=0;break;case"rtl":a.dir=1,a.connect=[0,2,1,3][a.connect];break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function D(a,b){if("string"!=typeof b)throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var c=b.indexOf("tap")>=0,d=b.indexOf("drag")>=0,e=b.indexOf("fixed")>=0,f=b.indexOf("snap")>=0;a.events={tap:c||f,drag:d,fixed:e,snap:f}}function E(a,b){if(a.format=b,"function"==typeof b.to&&"function"==typeof b.from)return!0;throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.")}function F(b){var c,d={margin:0,limit:0,animate:!0,format:V};return c={step:{r:!1,t:t},start:{r:!0,t:v},connect:{r:!0,t:y},direction:{r:!0,t:C},snap:{r:!1,t:w},animate:{r:!1,t:x},range:{r:!0,t:u},orientation:{r:!1,t:z},margin:{r:!1,t:A},limit:{r:!1,t:B},behaviour:{r:!0,t:D},format:{r:!1,t:E}},b=a.extend({connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal"},b),a.each(c,function(a,c){if(void 0===b[a]){if(c.r)throw new Error("noUiSlider: '"+a+"' is required.");return!0}c.t(d,b[a])}),d.style=d.ort?"top":"left",d}function G(a,b,c){var d=a+b[0],e=a+b[1];return c?(0>d&&(e+=Math.abs(d)),e>100&&(d-=e-100),[f(d),f(e)]):[d,e]}function H(a){a.preventDefault();var b,c,d=0===a.type.indexOf("touch"),e=0===a.type.indexOf("mouse"),f=0===a.type.indexOf("pointer"),g=a;return 0===a.type.indexOf("MSPointer")&&(f=!0),a.originalEvent&&(a=a.originalEvent),d&&(b=a.changedTouches[0].pageX,c=a.changedTouches[0].pageY),(e||f)&&(f||void 0!==window.pageXOffset||(window.pageXOffset=document.documentElement.scrollLeft,window.pageYOffset=document.documentElement.scrollTop),b=a.clientX+window.pageXOffset,c=a.clientY+window.pageYOffset),g.points=[b,c],g.cursor=e,g}function I(b,c){var d=a("<div><div/></div>").addClass(U[2]),e=["-lower","-upper"];return b&&e.reverse(),d.children().addClass(U[3]+" "+U[3]+e[c]),d}function J(a,b,c){switch(a){case 1:b.addClass(U[7]),c[0].addClass(U[6]);break;case 3:c[1].addClass(U[6]);case 2:c[0].addClass(U[7]);case 0:b.addClass(U[6])}}function K(a,b,c){var d,e=[];for(d=0;a>d;d+=1)e.push(I(b,d).appendTo(c));return e}function L(b,c,d){return d.addClass([U[0],U[8+b],U[4+c]].join(" ")),a("<div/>").appendTo(d).addClass(U[1])}function M(b,c,d){function i(){return C[["width","height"][c.ort]]()}function j(a){var b,c=[E.val()];for(b=0;b<a.length;b+=1)E.trigger(a[b],c)}function k(a){return 1===a.length?a[0]:c.dir?a.reverse():a}function l(a){return function(b,c){E.val([a?null:c,a?c:null],!0)}}function m(b){var c=a.inArray(b,N);E[0].linkAPI&&E[0].linkAPI[b]&&E[0].linkAPI[b].change(M[c],D[c].children(),E)}function n(b,d){var e=a.inArray(b,N);return d&&d.appendTo(D[e].children()),c.dir&&c.handles>1&&(e=1===e?0:1),l(e)}function o(){var a,b;for(a=0;a<N.length;a+=1)this.linkAPI&&this.linkAPI[b=N[a]]&&this.linkAPI[b].reconfirm(b)}function p(a,b,d,e){return a=a.replace(/\s/g,S+" ")+S,b.on(a,function(a){return E.attr("disabled")?!1:E.hasClass(U[14])?!1:(a=H(a),a.calcPoint=a.points[c.ort],void d(a,e))})}function q(a,b){var c,d=b.handles||D,e=!1,f=100*(a.calcPoint-b.start)/i(),g=d[0][0]!==D[0][0]?1:0;c=G(f,b.positions,d.length>1),e=v(d[0],c[g],1===d.length),d.length>1&&(e=v(d[1],c[g?0:1],!1)||e),e&&j(["slide"])}function r(b){a("."+U[15]).removeClass(U[15]),b.cursor&&a("body").css("cursor","").off(S),Q.off(S),E.removeClass(U[12]),j(["set","change"])}function s(b,c){1===c.handles.length&&c.handles[0].children().addClass(U[15]),b.stopPropagation(),p(T.move,Q,q,{start:b.calcPoint,handles:c.handles,positions:[F[0],F[D.length-1]]}),p(T.end,Q,r,null),b.cursor&&(a("body").css("cursor",a(b.target).css("cursor")),D.length>1&&E.addClass(U[12]),a("body").on("selectstart"+S,!1))}function t(b){var d,f=b.calcPoint,g=0;b.stopPropagation(),a.each(D,function(){g+=this.offset()[c.style]}),g=g/2>f||1===D.length?0:1,f-=C.offset()[c.style],d=100*f/i(),c.events.snap||e(E,U[14],300),v(D[g],d),j(["slide","set","change"]),c.events.snap&&s(b,{handles:[D[g]]})}function u(a){var b,c;if(!a.fixed)for(b=0;b<D.length;b+=1)p(T.start,D[b].children(),s,{handles:[D[b]]});a.tap&&p(T.start,C,t,{handles:D}),a.drag&&(c=C.find("."+U[7]).addClass(U[10]),a.fixed&&(c=c.add(C.children().not(c).children())),p(T.start,c,s,{handles:D}))}function v(a,b,d){var e=a[0]!==D[0][0]?1:0,g=F[0]+c.margin,h=F[1]-c.margin,i=F[0]+c.limit,j=F[1]-c.limit;return D.length>1&&(b=e?Math.max(b,g):Math.min(b,h)),d!==!1&&c.limit&&D.length>1&&(b=e?Math.min(b,i):Math.max(b,j)),b=I.getStep(b),b=f(parseFloat(b.toFixed(7))),b===F[e]?!1:(a.css(c.style,b+"%"),a.is(":first-child")&&a.toggleClass(U[17],b>50),F[e]=b,M[e]=I.fromStepping(b),m(N[e]),!0)}function w(a,b){var d,e,f;for(c.limit&&(a+=1),d=0;a>d;d+=1)e=d%2,f=b[e],null!==f&&f!==!1&&("number"==typeof f&&(f=String(f)),f=c.format.from(f),(f===!1||isNaN(f)||v(D[e],I.toStepping(f),d===3-c.dir)===!1)&&m(N[e]))}function x(a){if(E[0].LinkIsEmitting)return this;var b,d=g(a);return c.dir&&c.handles>1&&d.reverse(),c.animate&&-1!==F[0]&&e(E,U[14],300),b=D.length>1?3:1,1===d.length&&(b=1),w(b,d),j(["set"]),this}function y(){var a,b=[];for(a=0;a<c.handles;a+=1)b[a]=c.format.to(M[a]);return k(b)}function z(){return a(this).off(S).removeClass(U.join(" ")).empty(),delete this.LinkUpdate,delete this.LinkConfirm,delete this.LinkDefaultFormatter,delete this.LinkDefaultFlag,delete this.reappend,delete this.vGet,delete this.vSet,delete this.getCurrentStep,delete this.getInfo,delete this.destroy,d}function A(){var b=a.map(F,function(a,b){var c=I.getApplicableStep(a),d=h(String(c[2])),e=M[b],f=100===a?null:c[2],g=Number((e-c[2]).toFixed(d)),i=0===a?null:g>=c[1]?c[2]:c[0]||!1;return[[i,f]]});return k(b)}function B(){return d}var C,D,E=a(b),F=[-1,-1],I=c.spectrum,M=[],N=["lower","upper"].slice(0,c.handles);if(c.dir&&N.reverse(),b.LinkUpdate=m,b.LinkConfirm=n,b.LinkDefaultFormatter=c.format,b.LinkDefaultFlag="lower",b.reappend=o,E.hasClass(U[0]))throw new Error("Slider was already initialized.");C=L(c.dir,c.ort,E),D=K(c.handles,c.dir,C),J(c.connect,E,D),u(c.events),b.vSet=x,b.vGet=y,b.destroy=z,b.getCurrentStep=A,b.getOriginalOptions=B,b.getInfo=function(){return[I,c.style,c.ort]},E.val(c.start)}function N(a){var b=F(a,this);return this.each(function(){M(this,b,a)})}function O(b){return this.each(function(){if(!this.destroy)return void a(this).noUiSlider(b);var c=a(this).val(),d=this.destroy(),e=a.extend({},d,b);a(this).noUiSlider(e),this.reappend(),d.start===e.start&&a(this).val(c)})}function P(){return this[0][arguments.length?"vSet":"vGet"].apply(this[0],arguments)}var Q=a(document),R=a.fn.val,S=".nui",T=window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"},U=["noUi-target","noUi-base","noUi-origin","noUi-handle","noUi-horizontal","noUi-vertical","noUi-background","noUi-connect","noUi-ltr","noUi-rtl","noUi-dragable","","noUi-state-drag","","noUi-state-tap","noUi-active","","noUi-stacking"];s.prototype.getMargin=function(a){return 2===this.xPct.length?j(this.xVal,a):!1},s.prototype.toStepping=function(a){return a=n(this.xVal,this.xPct,a),this.direction&&(a=100-a),a},s.prototype.fromStepping=function(a){return this.direction&&(a=100-a),d(o(this.xVal,this.xPct,a))},s.prototype.getStep=function(a){return this.direction&&(a=100-a),a=p(this.xPct,this.xSteps,this.snap,a),this.direction&&(a=100-a),a},s.prototype.getApplicableStep=function(a){var b=m(a,this.xPct),c=100===a?2:1;return[this.xNumSteps[b-2],this.xVal[b-c],this.xNumSteps[b-c]]},s.prototype.convert=function(a){return this.getStep(this.toStepping(a))};var V={to:function(a){return a.toFixed(2)},from:Number};a.fn.val=function(b){function c(a){return a.hasClass(U[0])?P:R}if(!arguments.length){var d=a(this[0]);return c(d).call(d)}var e=a.isFunction(b);return this.each(function(d){var f=b,g=a(this);e&&(f=b.call(this,d,g.val())),c(g).call(g,f)})},a.fn.noUiSlider=function(a,b){switch(a){case"step":return this[0].getCurrentStep();case"options":return this[0].getOriginalOptions()}return(b?O:N).call(this,a)}}(window.jQuery||window.Zepto),function(a){"use strict";"object"==typeof exports?a(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){"use strict";var b=function(a){if(a=a||"once","string"!=typeof a)throw new Error("The jQuery Once id parameter must be a string");return a};a.fn.once=function(c){var d="jquery-once-"+b(c);return this.filter(function(){return a(this).data(d)!==!0}).data(d,!0)},a.fn.removeOnce=function(a){return this.findOnce(a).removeData("jquery-once-"+b(a))},a.fn.findOnce=function(c){var d="jquery-once-"+b(c);return this.filter(function(){return a(this).data(d)===!0})}}),function(a){var b=a(window);a.fn.visible=function(a,c,d){if(!(this.length<1)){var e=this.length>1?this.eq(0):this,f=e.get(0),g=b.width(),h=b.height(),d=d?d:"both",i=c===!0?f.offsetWidth*f.offsetHeight:!0;if("function"==typeof f.getBoundingClientRect){var j=f.getBoundingClientRect(),k=j.top>=0&&j.top<h,l=j.bottom>0&&j.bottom<=h,m=j.left>=0&&j.left<g,n=j.right>0&&j.right<=g,o=a?k||l:k&&l,p=a?m||n:m&&n;if("both"===d)return i&&o&&p;if("vertical"===d)return i&&o;if("horizontal"===d)return i&&p}else{var q=b.scrollTop(),r=q+h,s=b.scrollLeft(),t=s+g,u=e.offset(),v=u.top,w=v+e.height(),x=u.left,y=x+e.width(),z=a===!0?w:v,A=a===!0?v:w,B=a===!0?y:x,C=a===!0?x:y;if("both"===d)return!!i&&r>=A&&z>=q&&t>=C&&B>=s;if("vertical"===d)return!!i&&r>=A&&z>=q;if("horizontal"===d)return!!i&&t>=C&&B>=s}}}}(jQuery),window.JST||(window.JST={});var prettyPrint=function(){var a={el:function(b,c){var d,e=document.createElement(b);if(c=a.merge({},c),c&&c.style){c.style;a.applyCSS(e,c.style),delete c.style}for(d in c)c.hasOwnProperty(d)&&(e[d]=c[d]);return e},applyCSS:function(a,b){for(var c in b)if(b.hasOwnProperty(c))try{a.style[c]=b[c]}catch(d){}},txt:function(a){return document.createTextNode(a)},row:function(b,c,d){d=d||"td";var e,f=a.count(b,null)+1,g=a.el("tr"),h={style:a.getStyles(d,c),colSpan:f,onmouseover:function(){var b=this.parentNode.childNodes;a.forEach(b,function(b){"td"===b.nodeName.toLowerCase()&&a.applyCSS(b,a.getStyles("td_hover",c))})},onmouseout:function(){var b=this.parentNode.childNodes;a.forEach(b,function(b){"td"===b.nodeName.toLowerCase()&&a.applyCSS(b,a.getStyles("td",c))})}};return a.forEach(b,function(b){null!==b&&(e=a.el(d,h),b.nodeType?e.appendChild(b):e.innerHTML=a.shorten(b.toString()),g.appendChild(e))}),g},hRow:function(b,c){return a.row(b,c,"th")},table:function(b,c){b=b||[];var d={thead:{style:a.getStyles("thead",c)},tbody:{style:a.getStyles("tbody",c)},table:{style:a.getStyles("table",c)}},e=a.el("table",d.table),f=a.el("thead",d.thead),g=a.el("tbody",d.tbody);return b.length&&(e.appendChild(f),f.appendChild(a.hRow(b,c))),e.appendChild(g),{node:e,tbody:g,thead:f,appendChild:function(a){this.tbody.appendChild(a)},addRow:function(b,d,e){return this.appendChild(a.row.call(a,b,d||c,e)),this}}},shorten:function(a){return a},htmlentities:function(a){return a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")},merge:function(b,c){"object"!=typeof b&&(b={});for(var d in c)if(c.hasOwnProperty(d)){var e=c[d];if("object"==typeof e){b[d]=a.merge(b[d],e);continue}b[d]=e}for(var f=2,g=arguments.length;g>f;f++)a.merge(b,arguments[f]);return b},count:function(a,b){for(var c=0,d=0,e=a.length;e>d;d++)a[d]===b&&c++;return c},thead:function(a){return a.getElementsByTagName("thead")[0]},forEach:function(a,b,c){c||(c=b);for(var d=a.length,e=-1;++e<d&&c(a[e],e,a)!==!1;);return!0},type:function(a){try{if(null===a)return"null";if(void 0===a)return"undefined";var b=Object.prototype.toString.call(a).match(/\s(.+?)\]/)[1].toLowerCase();return a.nodeType?1===a.nodeType?"domelement":"domnode":/^(string|number|array|regexp|function|date|boolean)$/.test(b)?b:"object"==typeof a?a.jquery&&"string"==typeof a.jquery?"jquery":"object":a===window||a===document?"object":"default"}catch(c){return"default"}},within:function(a){return{is:function(b){for(var c in a)if(a[c]===b)return c;return""}}},common:{circRef:function(c,d,e){return a.expander("[POINTS BACK TO <strong>"+d+"</strong>]","Click to show this item anyway",function(){this.parentNode.appendChild(b(c,{maxDepth:1}))})},depthReached:function(c,d){return a.expander("[DEPTH REACHED]","Click to show this item anyway",function(){try{this.parentNode.appendChild(b(c,{maxDepth:1}))}catch(d){this.parentNode.appendChild(a.table(["ERROR OCCURED DURING OBJECT RETRIEVAL"],"error").addRow([d.message]).node)}})}},getStyles:function(c,d){return d=b.settings.styles[d]||{},a.merge({},b.settings.styles["default"][c],d[c])},expander:function(b,c,d){return a.el("a",{innerHTML:a.shorten(b)+' <b style="visibility:hidden;">[+]</b>',title:c,onmouseover:function(){this.getElementsByTagName("b")[0].style.visibility="visible"},onmouseout:function(){this.getElementsByTagName("b")[0].style.visibility="hidden"},onclick:function(){return this.style.display="none",d.call(this),!1},style:{cursor:"pointer"}})},stringify:function(b){var c,d=a.type(b),e=!0;if("array"===d)return c="[",a.forEach(b,function(b,d){c+=(0===d?"":", ")+a.stringify(b)}),c+"]";if("object"==typeof b){c="{";for(var f in b)b.hasOwnProperty(f)&&(c+=(e?"":", ")+f+":"+a.stringify(b[f]),e=!1);return c+"}"}return"regexp"===d?"/"+b.source+"/":"string"===d?'"'+b.replace(/"/g,'\\"')+'"':b.toString()},headerGradient:function(){var a=document.createElement("canvas");if(!a.getContext)return"";var b=a.getContext("2d");a.height=30,a.width=1;var c=b.createLinearGradient(0,0,0,30);c.addColorStop(0,"rgba(0,0,0,0)"),c.addColorStop(1,"rgba(0,0,0,0.25)"),b.fillStyle=c,b.fillRect(0,0,1,30);var d=a.toDataURL&&a.toDataURL();return"url("+(d||"")+")"}()},b=function(c,d){d=d||{};var e=a.merge({},b.config,d),f=a.el("div"),g=(b.config,0),h={},i=!1;b.settings=e;var j={string:function(b){return a.txt('"'+a.shorten(b.replace(/"/g,'\\"'))+'"')},number:function(b){return a.txt(b)},regexp:function(b){var c=a.table(["RegExp",null],"regexp"),d=a.table(),f=a.expander("/"+b.source+"/","Click to show more",function(){this.parentNode.appendChild(c.node)});return d.addRow(["g",b.global]).addRow(["i",b.ignoreCase]).addRow(["m",b.multiline]),c.addRow(["source","/"+b.source+"/"]).addRow(["flags",d.node]).addRow(["lastIndex",b.lastIndex]),e.expanded?c.node:f},domelement:function(b,c){var d=a.table(["DOMElement",null],"domelement"),f=["id","className","innerHTML","src","href"],g=b.nodeName||"";return d.addRow(["tag","<"+g.toLowerCase()+">"]),a.forEach(f,function(c){b[c]&&d.addRow([c,a.htmlentities(b[c])])}),e.expanded?d.node:a.expander("DOMElement ("+g.toLowerCase()+")","Click to show more",function(){this.parentNode.appendChild(d.node)})},domnode:function(b){var c=a.table(["DOMNode",null],"domelement"),d=a.htmlentities((b.data||"UNDEFINED").replace(/\n/g,"\\n"));return c.addRow(["nodeType",b.nodeType+" ("+b.nodeName+")"]).addRow(["data",d]),e.expanded?c.node:a.expander("DOMNode","Click to show more",function(){this.parentNode.appendChild(c.node)})},jquery:function(a,b,c){return j.array(a,b,c,!0)},object:function(b,c,d){var f=a.within(h).is(b);if(f)return a.common.circRef(b,f,e);if(h[d||"TOP"]=b,c===e.maxDepth)return a.common.depthReached(b,e);var g=a.table(["Object",null],"object"),k=!0;for(var l in b)if(!b.hasOwnProperty||b.hasOwnProperty(l)){var m=b[l],n=a.type(m);k=!1;try{g.addRow([l,j[n](m,c+1,l)],n)}catch(o){window.console&&window.console.log&&console.log(o.message)}}k?g.addRow(["<small>[empty]</small>"]):g.thead.appendChild(a.hRow(["key","value"],"colHeader"));var p=e.expanded||i?g.node:a.expander(a.stringify(b),"Click to show more",function(){this.parentNode.appendChild(g.node)});return i=!0,p},array:function(b,c,d,f){var g=a.within(h).is(b);if(g)return a.common.circRef(b,g);if(h[d||"TOP"]=b,c===e.maxDepth)return a.common.depthReached(b);var i=f?"jQuery":"Array",k=a.table([i+"("+b.length+")",null],f?"jquery":i.toLowerCase()),l=!0,m=0;return f&&k.addRow(["selector",b.selector]),a.forEach(b,function(d,f){return e.maxArray>=0&&++m>e.maxArray?(k.addRow([f+".."+(b.length-1),j[a.type(d)]("...",c+1,f)]),!1):(l=!1,void k.addRow([f,j[a.type(d)](d,c+1,f)]))}),f||(l?k.addRow(["<small>[empty]</small>"]):k.thead.appendChild(a.hRow(["index","value"],"colHeader"))),e.expanded?k.node:a.expander(a.stringify(b),"Click to show more",function(){this.parentNode.appendChild(k.node)})},"function":function(b,c,d){var f=a.within(h).is(b);if(f)return a.common.circRef(b,f);h[d||"TOP"]=b;var g=a.table(["Function",null],"function"),i=(a.table(["Arguments"]),b.toString().match(/\((.+?)\)/)),j=b.toString().match(/\(.*?\)\s+?\{?([\S\s]+)/)[1].replace(/\}?$/,"");return g.addRow(["arguments",i?i[1].replace(/[^\w_,\s]/g,""):"<small>[none/native]</small>"]).addRow(["body",j]),e.expanded?g.node:a.expander("function(){...}","Click to see more about this function.",function(){this.parentNode.appendChild(g.node)})},date:function(b){var c=a.table(["Date",null],"date"),d=b.toString().split(/\s/);return c.addRow(["Time",d[4]]).addRow(["Date",d.slice(0,4).join("-")]),e.expanded?c.node:a.expander("Date (timestamp): "+ +b,"Click to see a little more info about this date",function(){this.parentNode.appendChild(c.node)})},"boolean":function(b){return a.txt(b.toString().toUpperCase())},undefined:function(){return a.txt("UNDEFINED")},"null":function(){return a.txt("NULL")},"default":function(){return a.txt("prettyPrint: TypeNotFound Error")}};return f.appendChild(j[e.forceObject?"object":a.type(c)](c,g)),f};return b.config={expanded:!0,forceObject:!1,maxDepth:3,maxArray:-1,styles:{array:{th:{backgroundColor:"#A4C18B",color:"white"}},"function":{th:{backgroundColor:"#D82525"}},regexp:{th:{backgroundColor:"#E2F3FB",color:"#000"}},object:{th:{backgroundColor:"#8DA3AD"}},jquery:{th:{backgroundColor:"#FBF315"}},error:{th:{backgroundColor:"red",color:"yellow"}},domelement:{th:{backgroundColor:"#F3801E"}},date:{th:{backgroundColor:"#A725D8"}},colHeader:{th:{backgroundColor:"#EEE",color:"#aaa",textTransform:"uppercase",fontSize:"80%",padding:"2px 5px"}},"default":{table:{borderCollapse:"collapse",width:"100%"},td:{padding:"5px",fontSize:"12px",backgroundColor:"rgba(255,255,255,0.5)",color:"#222",border:"1px solid #ddd",verticalAlign:"top",fontFamily:'"Consolas","Lucida Console",Courier,mono',whiteSpace:"nowrap"},td_hover:{},th:{padding:"5px",fontSize:"12px",backgroundColor:"#222",color:"#EEE",textAlign:"left",border:"1px solid #ddd",verticalAlign:"top",fontFamily:'"Consolas","Lucida Console",Courier,mono',backgroundRepeat:"repeat-x"}}}},b}();!function(a){"use strict";"function"==typeof define&&define.amd?define(a):"undefined"!=typeof module&&"undefined"!=typeof module.exports?module.exports=a():"undefined"!=typeof Package?Sortable=a():window.Sortable=a()}(function(){"use strict";function a(a,b){this.el=a,this.options=b=b||{};var d={group:Math.random(),sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,draggable:/[uo]l/i.test(a.nodeName)?"li":">*",ghostClass:"sortable-ghost",ignore:"a, img",filter:null,animation:0,setData:function(a,b){a.setData("Text",b.textContent)},dropBubble:!1,dragoverBubble:!1};for(var e in d)!(e in b)&&(b[e]=d[e]);var g=b.group;g&&"object"==typeof g||(g=b.group={name:g}),["pull","put"].forEach(function(a){a in g||(g[a]=!0)}),M.forEach(function(d){b[d]=c(this,b[d]||N),f(a,d.substr(2).toLowerCase(),b[d])},this),b.groups=" "+g.name+(g.put.join?" "+g.put.join(" "):"")+" ",a[F]=b;for(var h in this)"_"===h.charAt(0)&&(this[h]=c(this,this[h]));f(a,"mousedown",this._onTapStart),f(a,"touchstart",this._onTapStart),f(a,"dragover",this),f(a,"dragenter",this),Q.push(this._onDragOver),b.store&&this.sort(b.store.get(this))}function b(a){s&&s.state!==a&&(i(s,"display",a?"none":""),!a&&s.state&&t.insertBefore(s,q),s.state=a)}function c(a,b){var c=P.call(arguments,2);return b.bind?b.bind.apply(b,[a].concat(c)):function(){return b.apply(a,c.concat(P.call(arguments)))}}function d(a,b,c){if(a){c=c||H,b=b.split(".");var d=b.shift().toUpperCase(),e=new RegExp("\\s("+b.join("|")+")\\s","g");do if(">*"===d&&a.parentNode===c||(""===d||a.nodeName.toUpperCase()==d)&&(!b.length||((" "+a.className+" ").match(e)||[]).length==b.length))return a;while(a!==c&&(a=a.parentNode))}return null}function e(a){a.dataTransfer.dropEffect="move",a.preventDefault()}function f(a,b,c){a.addEventListener(b,c,!1)}function g(a,b,c){a.removeEventListener(b,c,!1)}function h(a,b,c){if(a)if(a.classList)a.classList[c?"add":"remove"](b);else{var d=(" "+a.className+" ").replace(/\s+/g," ").replace(" "+b+" ","");a.className=d+(c?" "+b:"")}}function i(a,b,c){var d=a&&a.style;if(d){if(void 0===c)return H.defaultView&&H.defaultView.getComputedStyle?c=H.defaultView.getComputedStyle(a,""):a.currentStyle&&(c=a.currentStyle),void 0===b?c:c[b];b in d||(b="-webkit-"+b),d[b]=c+("string"==typeof c?"":"px")}}function j(a,b,c){if(a){var d=a.getElementsByTagName(b),e=0,f=d.length;if(c)for(;f>e;e++)c(d[e],e);return d}return[]}function k(a){a.draggable=!1}function l(){K=!1}function m(a,b){var c=a.lastElementChild,d=c.getBoundingClientRect();return b.clientY-(d.top+d.height)>5&&c}function n(a){for(var b=a.tagName+a.className+a.src+a.href+a.textContent,c=b.length,d=0;c--;)d+=b.charCodeAt(c);return d.toString(36)}function o(a){for(var b=0;a&&(a=a.previousElementSibling);)"TEMPLATE"!==a.nodeName.toUpperCase()&&b++;return b}function p(a,b){var c,d;return function(){void 0===c&&(c=arguments,d=this,setTimeout(function(){1===c.length?a.call(d,c[0]):a.apply(d,c),c=void 0},b))}}var q,r,s,t,u,v,w,x,y,z,A,B,C,D,E={},F="Sortable"+(new Date).getTime(),G=window,H=G.document,I=G.parseInt,J=!!("draggable"in H.createElement("div")),K=!1,L=function(a,b,c,d,e,f){var g=H.createEvent("Event");g.initEvent(b,!0,!0),g.item=c||a,g.from=d||a,g.clone=s,g.oldIndex=e,g.newIndex=f,a.dispatchEvent(g)},M="onAdd onUpdate onRemove onStart onEnd onFilter onSort".split(" "),N=function(){},O=Math.abs,P=[].slice,Q=[],R=p(function(a,b,c){if(c&&b.scroll){var d,e,f,g,h=b.scrollSensitivity,i=b.scrollSpeed,j=a.clientX,k=a.clientY,l=window.innerWidth,m=window.innerHeight;if(w!==c&&(v=b.scroll,w=c,v===!0)){v=c;do if(v.offsetWidth<v.scrollWidth||v.offsetHeight<v.scrollHeight)break;while(v=v.parentNode)}v&&(d=v,e=v.getBoundingClientRect(),f=(O(e.right-j)<=h)-(O(e.left-j)<=h),g=(O(e.bottom-k)<=h)-(O(e.top-k)<=h)),f||g||(f=(h>=l-j)-(h>=j),g=(h>=m-k)-(h>=k),(f||g)&&(d=G)),(E.vx!==f||E.vy!==g||E.el!==d)&&(E.el=d,E.vx=f,E.vy=g,clearInterval(E.pid),d&&(E.pid=setInterval(function(){d===G?G.scrollTo(G.scrollX+f*i,G.scrollY+g*i):(g&&(d.scrollTop+=g*i),f&&(d.scrollLeft+=f*i))},24)))}},30);return a.prototype={constructor:a,_dragStarted:function(){t&&q&&(h(q,this.options.ghostClass,!0),a.active=this,L(t,"start",q,t,z))},_onTapStart:function(a){var b=a.type,c=a.touches&&a.touches[0],e=(c||a).target,g=e,h=this.options,i=this.el,l=h.filter;if(!("mousedown"===b&&0!==a.button||h.disabled)&&(e=d(e,h.draggable,i))){if(z=o(e),"function"==typeof l){if(l.call(this,a,e,this))return L(g,"filter",e,i,z),void a.preventDefault()}else if(l&&(l=l.split(",").some(function(a){return a=d(g,a.trim(),i),a?(L(a,"filter",e,i,z),!0):void 0})))return void a.preventDefault();if((!h.handle||d(g,h.handle,i))&&e&&!q&&e.parentNode===i){C=a,t=this.el,q=e,u=q.nextSibling,B=this.options.group,q.draggable=!0,h.ignore.split(",").forEach(function(a){j(e,a.trim(),k)}),c&&(C={target:e,clientX:c.clientX,clientY:c.clientY},this._onDragStart(C,"touch"),a.preventDefault()),f(H,"mouseup",this._onDrop),f(H,"touchend",this._onDrop),f(H,"touchcancel",this._onDrop),f(q,"dragend",this),f(t,"dragstart",this._onDragStart),J||this._onDragStart(C,!0);try{H.selection?H.selection.empty():window.getSelection().removeAllRanges()}catch(m){}}}},_emulateDragOver:function(){if(D){i(r,"display","none");var a=H.elementFromPoint(D.clientX,D.clientY),b=a,c=" "+this.options.group.name,d=Q.length;if(b)do{if(b[F]&&b[F].groups.indexOf(c)>-1){for(;d--;)Q[d]({clientX:D.clientX,clientY:D.clientY,target:a,rootEl:b});break}a=b}while(b=b.parentNode);i(r,"display","")}},_onTouchMove:function(a){if(C){var b=a.touches?a.touches[0]:a,c=b.clientX-C.clientX,d=b.clientY-C.clientY,e=a.touches?"translate3d("+c+"px,"+d+"px,0)":"translate("+c+"px,"+d+"px)";D=b,i(r,"webkitTransform",e),i(r,"mozTransform",e),i(r,"msTransform",e),i(r,"transform",e),a.preventDefault()}},_onDragStart:function(a,b){var c=a.dataTransfer,d=this.options;if(this._offUpEvents(),"clone"==B.pull&&(s=q.cloneNode(!0),i(s,"display","none"),t.insertBefore(s,q)),b){var e,g=q.getBoundingClientRect(),h=i(q);r=q.cloneNode(!0),i(r,"top",g.top-I(h.marginTop,10)),i(r,"left",g.left-I(h.marginLeft,10)),i(r,"width",g.width),i(r,"height",g.height),i(r,"opacity","0.8"),i(r,"position","fixed"),i(r,"zIndex","100000"),t.appendChild(r),e=r.getBoundingClientRect(),i(r,"width",2*g.width-e.width),i(r,"height",2*g.height-e.height),"touch"===b?(f(H,"touchmove",this._onTouchMove),f(H,"touchend",this._onDrop),f(H,"touchcancel",this._onDrop)):(f(H,"mousemove",this._onTouchMove),f(H,"mouseup",this._onDrop)),this._loopId=setInterval(this._emulateDragOver,150)}else c&&(c.effectAllowed="move",d.setData&&d.setData.call(this,c,q)),f(H,"drop",this);setTimeout(this._dragStarted,0)},_onDragOver:function(a){var c,e,f,g=this.el,h=this.options,j=h.group,k=j.put,n=B===j,o=h.sort;if(q&&(void 0!==a.preventDefault&&(a.preventDefault(),!h.dragoverBubble&&a.stopPropagation()),B&&!h.disabled&&(n?o||(f=!t.contains(q)):B.pull&&k&&(B.name===j.name||k.indexOf&&~k.indexOf(B.name)))&&(void 0===a.rootEl||a.rootEl===this.el))){if(R(a,h,this.el),K)return;if(c=d(a.target,h.draggable,g),e=q.getBoundingClientRect(),f)return b(!0),void(s||u?t.insertBefore(q,s||u):o||t.appendChild(q));if(0===g.children.length||g.children[0]===r||g===a.target&&(c=m(g,a))){if(c){if(c.animated)return;v=c.getBoundingClientRect()}b(n),g.appendChild(q),this._animate(e,q),c&&this._animate(v,c)}else if(c&&!c.animated&&c!==q&&void 0!==c.parentNode[F]){x!==c&&(x=c,y=i(c));var p,v=c.getBoundingClientRect(),w=v.right-v.left,z=v.bottom-v.top,A=/left|right|inline/.test(y.cssFloat+y.display),C=c.offsetWidth>q.offsetWidth,D=c.offsetHeight>q.offsetHeight,E=(A?(a.clientX-v.left)/w:(a.clientY-v.top)/z)>.5,G=c.nextElementSibling;K=!0,setTimeout(l,30),b(n),p=A?c.previousElementSibling===q&&!C||E&&C:G!==q&&!D||E&&D,p&&!G?g.appendChild(q):c.parentNode.insertBefore(q,p?G:c),this._animate(e,q),this._animate(v,c)}}},_animate:function(a,b){var c=this.options.animation;if(c){var d=b.getBoundingClientRect();i(b,"transition","none"),i(b,"transform","translate3d("+(a.left-d.left)+"px,"+(a.top-d.top)+"px,0)"),b.offsetWidth,i(b,"transition","all "+c+"ms"),i(b,"transform","translate3d(0,0,0)"),clearTimeout(b.animated),b.animated=setTimeout(function(){i(b,"transition",""),i(b,"transform",""),b.animated=!1},c)}},_offUpEvents:function(){g(H,"mouseup",this._onDrop),g(H,"touchmove",this._onTouchMove),g(H,"touchend",this._onDrop),g(H,"touchcancel",this._onDrop)},_onDrop:function(b){var c=this.el,d=this.options;clearInterval(this._loopId),clearInterval(E.pid),g(H,"drop",this),g(H,"mousemove",this._onTouchMove),g(c,"dragstart",this._onDragStart),this._offUpEvents(),b&&(b.preventDefault(),!d.dropBubble&&b.stopPropagation(),r&&r.parentNode.removeChild(r),q&&(g(q,"dragend",this),k(q),h(q,this.options.ghostClass,!1),t!==q.parentNode?(A=o(q),L(q.parentNode,"sort",q,t,z,A),L(t,"sort",q,t,z,A),L(q,"add",q,t,z,A),L(t,"remove",q,t,z,A)):(s&&s.parentNode.removeChild(s),q.nextSibling!==u&&(A=o(q),L(t,"update",q,t,z,A),L(t,"sort",q,t,z,A))),a.active&&L(t,"end",q,t,z,A)),t=q=r=u=s=v=w=C=D=x=y=B=a.active=null,this.save())},handleEvent:function(a){var b=a.type;"dragover"===b||"dragenter"===b?(this._onDragOver(a),e(a)):("drop"===b||"dragend"===b)&&this._onDrop(a)},toArray:function(){for(var a,b=[],c=this.el.children,e=0,f=c.length;f>e;e++)a=c[e],d(a,this.options.draggable,this.el)&&b.push(a.getAttribute("data-id")||n(a));return b},sort:function(a){var b={},c=this.el;this.toArray().forEach(function(a,e){var f=c.children[e];d(f,this.options.draggable,c)&&(b[a]=f)},this),a.forEach(function(a){b[a]&&(c.removeChild(b[a]),c.appendChild(b[a]))})},save:function(){var a=this.options.store;a&&a.set(this)},closest:function(a,b){return d(a,b||this.options.draggable,this.el)},option:function(a,b){var c=this.options;return void 0===b?c[a]:void(c[a]=b)},destroy:function(){var a=this.el,b=this.options;M.forEach(function(c){g(a,c.substr(2).toLowerCase(),b[c])}),g(a,"mousedown",this._onTapStart),g(a,"touchstart",this._onTapStart),g(a,"dragover",this),g(a,"dragenter",this),Array.prototype.forEach.call(a.querySelectorAll("[draggable]"),function(a){a.removeAttribute("draggable")}),Q.splice(Q.indexOf(this._onDragOver),1),this._onDrop(),this.el=null}},a.utils={on:f,off:g,css:i,find:j,bind:c,is:function(a,b){return!!d(a,b,a)},throttle:p,closest:d,toggleClass:h,dispatchEvent:L,index:o},a.version="1.1.1",a.create=function(b,c){return new a(b,c)},a}),function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){"use strict";a.fn.sortable=function(b){var c;return this.each(function(){var d=a(this),e=d.data("sortable");if(e||!(b instanceof Object)&&b||(e=new Sortable(this,b),d.data("sortable",e)),e){if("widget"===b)return e;"destroy"===b?(e.destroy(),d.removeData("sortable")):b in e&&(c=e[e].apply(e,[].slice.call(arguments,1)))}}),void 0===c?this:c}});var XBBCODE=function(){function a(){i=[];var a,b,c;for(a in h)if(h.hasOwnProperty(a)){for("*"===a?i.push("\\"+a):(i.push(a),h[a].noParse&&u.push(a)),h[a].validChildLookup={},h[a].validParentLookup={},h[a].restrictParentsTo=h[a].restrictParentsTo||[],h[a].restrictChildrenTo=h[a].restrictChildrenTo||[],c=h[a].restrictChildrenTo.length,b=0;c>b;b++)h[a].validChildLookup[h[a].restrictChildrenTo[b]]=!0;for(c=h[a].restrictParentsTo.length,b=0;c>b;b++)h[a].validParentLookup[h[a].restrictParentsTo[b]]=!0}j=new RegExp("<bbcl=([0-9]+) ("+i.join("|")+")([ =][^>]*?)?>((?:.|[\\r\\n])*?)<bbcl=\\1 /\\2>","gi"),k=new RegExp("\\[("+i.join("|")+")([ =][^\\]]*?)?\\]([^\\[]*?)\\[/\\1\\]","gi"),l=new RegExp("\\[("+u.join("|")+")([ =][^\\]]*?)?\\]([\\s\\S]*?)\\[/\\1\\]","gi"),function(){for(var a=[],b=0;b<i.length;b++)"\\*"!==i[b]&&a.push("/"+i[b]);m=new RegExp("(\\[)((?:"+i.join("|")+")(?:[ =][^\\]]*?)?)(\\])","gi"),n=new RegExp("(\\[)("+a.join("|")+")(\\])","gi")}()}function b(a,c,d,e,f,g,k){k=k||[],d++;var l,m,n,o,p=new RegExp("(<bbcl="+d+" )("+i.join("|")+")([ =>])","gi"),q=new RegExp("(<bbcl="+d+" )("+i.join("|")+")([ =>])","i"),r=g.match(p)||[],s=h[a]||{};for(p.lastIndex=0,r||(g=""),n=0;n<r.length;n++)q.lastIndex=0,o=r[n].match(q)[2].toLowerCase(),s&&s.restrictChildrenTo&&s.restrictChildrenTo.length>0&&(s.validChildLookup[o]||(m='The tag "'+o+'" is not allowed as a child of the tag "'+a+'".',k.push(m))),l=h[o]||{},l.restrictParentsTo.length>0&&(l.validParentLookup[a]||(m='The tag "'+a+'" is not allowed as a parent of the tag "'+o+'".', +k.push(m)));return g=g.replace(j,function(a,c,d,e,f){return k=b(d.toLowerCase(),a,c,d,e,f,k),a}),k}function c(a){return a=a.replace(/\<([^\>][^\>]*?)\>/gi,function(a,b){var c=b.match(/^bbcl=([0-9]+) /);return null===c?"<bbcl=0 "+b+">":"<"+b.replace(/^(bbcl=)([0-9]+)/,function(a,b,c){return b+(parseInt(c,10)+1)})+">"})}function d(a){return a.replace(/<bbcl=[0-9]+ \/\*>/gi,"").replace(/<bbcl=[0-9]+ /gi,"[").replace(/>/gi,"]")}function e(a){var b=a.text;return b=b.replace(j,v)}function f(a){for(a=a.replace(/\[(?!\*[ =\]]|list([ =][^\]]*)?\]|\/list[\]])/gi,"<"),a=a.replace(/\[(?=list([ =][^\]]*)?\]|\/list[\]])/gi,">");a!==(a=a.replace(/>list([ =][^\]]*)?\]([^>]*?)(>\/list])/gi,function(a,b,c){for(var d=a;d!==(d=d.replace(/\[\*\]([^\[]*?)(\[\*\]|>\/list])/i,function(a,b,c){return c=">/list]"===c.toLowerCase()?"</*]</list]":"</*][*]","<*]"+b+c})););return d=d.replace(/>/g,"<")})););return a=a.replace(/</g,"[")}function g(a){for(;a!==(a=a.replace(k,function(a,b,d,e){return a=a.replace(/\[/g,"<"),a=a.replace(/\]/g,">"),c(a)})););return a}var h,i,j,k,l,m,n,o={},p=/^(?:https?|file|c):(?:\/{1,3}|\\{1})[-a-zA-Z0-9:;@#%&()~_?\+=\/\\\.]*$/,q=/^(?:aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen)$/,r=/^#?[a-fA-F0-9]{6}$/,s=/[^\s@]+@[^\s@]+\.[^\s@]+/,t=/^([a-z][a-z0-9_]+|"[a-z][a-z0-9_\s]+")$/i,u=[];h={b:{openTag:function(a,b){return'<span class="xbbcode-b">'},closeTag:function(a,b){return"</span>"}},bbcode:{openTag:function(a,b){return""},closeTag:function(a,b){return""}},center:{openTag:function(a,b){return'<span class="xbbcode-center">'},closeTag:function(a,b){return"</span>"}},code:{openTag:function(a,b){return'<span class="xbbcode-code">'},closeTag:function(a,b){return"</span>"},noParse:!0},color:{openTag:function(a,b){var c=a.substr(1).toLowerCase()||"black";return q.lastIndex=0,r.lastIndex=0,q.test(c)||(r.test(c)?"#"!==c.substr(0,1)&&(c="#"+c):c="black"),'<span style="color:'+c+'">'},closeTag:function(a,b){return"</span>"}},email:{openTag:function(a,b){var c;return c=a?a.substr(1):b.replace(/<.*?>/g,""),s.lastIndex=0,s.test(c)?'<a href="mailto:'+c+'">':"<a>"},closeTag:function(a,b){return"</a>"}},face:{openTag:function(a,b){var c=a.substr(1)||"inherit";return t.lastIndex=0,t.test(c)||(c="inherit"),'<span style="font-family:'+c+'">'},closeTag:function(a,b){return"</span>"}},font:{openTag:function(a,b){var c=a.substr(1)||"inherit";return t.lastIndex=0,t.test(c)||(c="inherit"),'<span style="font-family:'+c+'">'},closeTag:function(a,b){return"</span>"}},i:{openTag:function(a,b){return'<span class="xbbcode-i">'},closeTag:function(a,b){return"</span>"}},img:{openTag:function(a,b){var c=b;return p.lastIndex=0,p.test(c)||(c=""),'<img src="'+c+'" />'},closeTag:function(a,b){return""},displayContent:!1},justify:{openTag:function(a,b){return'<span class="xbbcode-justify">'},closeTag:function(a,b){return"</span>"}},large:{openTag:function(a,b){var a=a||"",c=a.substr(1)||"inherit";return q.lastIndex=0,r.lastIndex=0,q.test(c)||(r.test(c)?"#"!==c.substr(0,1)&&(c="#"+c):c="inherit"),'<span class="xbbcode-size-36" style="color:'+c+'">'},closeTag:function(a,b){return"</span>"}},left:{openTag:function(a,b){return'<span class="xbbcode-left">'},closeTag:function(a,b){return"</span>"}},li:{openTag:function(a,b){return"<li>"},closeTag:function(a,b){return"</li>"},restrictParentsTo:["list","ul","ol"]},list:{openTag:function(a,b){return"<ul>"},closeTag:function(a,b){return"</ul>"},restrictChildrenTo:["*","li"]},noparse:{openTag:function(a,b){return""},closeTag:function(a,b){return""},noParse:!0},ol:{openTag:function(a,b){return"<ol>"},closeTag:function(a,b){return"</ol>"},restrictChildrenTo:["*","li"]},php:{openTag:function(a,b){return'<span class="xbbcode-code">'},closeTag:function(a,b){return"</span>"},noParse:!0},quote:{openTag:function(a,b){return'<blockquote class="xbbcode-blockquote">'},closeTag:function(a,b){return"</blockquote>"}},right:{openTag:function(a,b){return'<span class="xbbcode-right">'},closeTag:function(a,b){return"</span>"}},s:{openTag:function(a,b){return'<span class="xbbcode-s">'},closeTag:function(a,b){return"</span>"}},size:{openTag:function(a,b){var c=parseInt(a.substr(1),10)||0;return(4>c||c>40)&&(c=14),'<span class="xbbcode-size-'+c+'">'},closeTag:function(a,b){return"</span>"}},small:{openTag:function(a,b){var a=a||"",c=a.substr(1)||"inherit";return q.lastIndex=0,r.lastIndex=0,q.test(c)||(r.test(c)?"#"!==c.substr(0,1)&&(c="#"+c):c="inherit"),'<span class="xbbcode-size-10" style="color:'+c+'">'},closeTag:function(a,b){return"</span>"}},sub:{openTag:function(a,b){return"<sub>"},closeTag:function(a,b){return"</sub>"}},sup:{openTag:function(a,b){return"<sup>"},closeTag:function(a,b){return"</sup>"}},table:{openTag:function(a,b){return'<table class="xbbcode-table">'},closeTag:function(a,b){return"</table>"},restrictChildrenTo:["tbody","thead","tfoot","tr"]},tbody:{openTag:function(a,b){return"<tbody>"},closeTag:function(a,b){return"</tbody>"},restrictChildrenTo:["tr"],restrictParentsTo:["table"]},tfoot:{openTag:function(a,b){return"<tfoot>"},closeTag:function(a,b){return"</tfoot>"},restrictChildrenTo:["tr"],restrictParentsTo:["table"]},thead:{openTag:function(a,b){return'<thead class="xbbcode-thead">'},closeTag:function(a,b){return"</thead>"},restrictChildrenTo:["tr"],restrictParentsTo:["table"]},td:{openTag:function(a,b){return'<td class="xbbcode-td">'},closeTag:function(a,b){return"</td>"},restrictParentsTo:["tr"]},th:{openTag:function(a,b){return'<th class="xbbcode-th">'},closeTag:function(a,b){return"</th>"},restrictParentsTo:["tr"]},tr:{openTag:function(a,b){return'<tr class="xbbcode-tr">'},closeTag:function(a,b){return"</tr>"},restrictChildrenTo:["td","th"],restrictParentsTo:["table","tbody","tfoot","thead"]},u:{openTag:function(a,b){return'<span class="xbbcode-u">'},closeTag:function(a,b){return"</span>"}},ul:{openTag:function(a,b){return"<ul>"},closeTag:function(a,b){return"</ul>"},restrictChildrenTo:["*","li"]},url:{openTag:function(a,b){var c;return c=a?a.substr(1):b.replace(/<.*?>/g,""),p.lastIndex=0,p.test(c)||(c="#"),'<a href="'+c+'">'},closeTag:function(a,b){return"</a>"}},"*":{openTag:function(a,b){return"<li>"},closeTag:function(a,b){return"</li>"},restrictParentsTo:["list","ul","ol"]}},a();var v=function(a,b,c,e,f){c=c.toLowerCase();var g=h[c].noParse?d(f):f.replace(j,v),i=h[c].openTag(e,g),k=h[c].closeTag(e,g);return h[c].displayContent===!1&&(g=""),i+g+k};return o.tags=function(){return h},o.addTags=function(b){var c;for(c in b)h[c]=b[c];a()},o.process=function(a){var c={html:"",error:!1},d=[];for(a.text=a.text.replace(/</g,"<"),a.text=a.text.replace(/>/g,">"),a.text=a.text.replace(m,function(a,b,c,d){return"<"+c+">"}),a.text=a.text.replace(n,function(a,b,c,d){return"<"+c+">"}),a.text=a.text.replace(/\[/g,"["),a.text=a.text.replace(/\]/g,"]"),a.text=a.text.replace(/</g,"["),a.text=a.text.replace(/>/g,"]");a.text!==(a.text=a.text.replace(l,function(a,b,c,d){return d=d.replace(/\[/g,"["),d=d.replace(/\]/g,"]"),c=c||"",d=d||"","["+b+c+"]"+d+"[/"+b+"]"})););return a.text=f(a.text),a.text=g(a.text),d=b("bbcode",a.text,-1,"","",a.text),c.html=e(a),(-1!==c.html.indexOf("[")||-1!==c.html.indexOf("]"))&&d.push("Some tags appear to be misaligned."),a.removeMisalignedTags&&(c.html=c.html.replace(/\[.*?\]/g,"")),a.addInLineBreaks&&(c.html='<div style="white-space:pre;">'+c.html+"</div>"),c.html=c.html.replace("[","["),c.html=c.html.replace("]","]"),c.error=0!==d.length,c.errorQueue=d,c},o}();+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.1",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=i?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=a("body").height();"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.1",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.1",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active"));a&&this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.1",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c="prev"==a?-1:1,d=this.getItemIndex(b),e=(d+c)%this.$items.length;return this.$items.eq(e)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i="next"==b?"first":"last",j=this;if(!f.length){if(!this.options.wrap)return;f=this.$element.find(".item")[i]()}if(f.hasClass("active"))return this.sliding=!1;var k=f[0],l=a.Event("slide.bs.carousel",{relatedTarget:k,direction:h});if(this.$element.trigger(l),!l.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var m=a(this.$indicators.children()[this.getItemIndex(f)]);m&&m.addClass("active")}var n=a.Event("slid.bs.carousel",{relatedTarget:k,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),j.sliding=!1,setTimeout(function(){j.$element.trigger(n)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(n)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&"show"==b&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a(this.options.trigger).filter('[href="#'+b.id+'"], [data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.1",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0,trigger:'[data-toggle="collapse"]'},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.find("> .panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":a.extend({},e.data(),{trigger:this});c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=c(d),f={relatedTarget:this};e.hasClass("open")&&(e.trigger(b=a.Event("hide.bs.dropdown",f)),b.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f)))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.1",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(b){if(/(38|40|27|32)/.test(b.which)&&!/input|textarea/i.test(b.target.tagName)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var e=c(d),g=e.hasClass("open");if(!g&&27!=b.which||g&&27==b.which)return 27==b.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.divider):visible a",i=e.find('[role="menu"]'+h+', [role="listbox"]'+h);if(i.length){var j=i.index(b.target);38==b.which&&j>0&&j--,40==b.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",b).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="menu"]',g.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="listbox"]',g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.1",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(c,d){var e=a.proxy(this.process,this);this.$body=a("body"),this.$scrollElement=a(a(c).is("body")?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",e),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.1",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b="offset",c=0;a.isWindow(this.$scrollElement[0])||(b="position",c=this.$scrollElement.scrollTop()),this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight();var d=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+c,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){d.offsets.push(this[0]),d.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$backdrop=this.isShown=null,this.scrollbarWidth=0,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.1",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.options.backdrop&&d.adjustBackdrop(),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in").attr("aria-hidden",!1),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$element.find(".modal-dialog").one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a('<div class="modal-backdrop '+e+'" />').prependTo(this.$element).on("click.dismiss.bs.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"), +!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.options.backdrop&&this.adjustBackdrop(),this.adjustDialog()},c.prototype.adjustBackdrop=function(){this.$backdrop.css("height",0).css("height",this.$element[0].scrollHeight)},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){this.bodyIsOverflowing=document.body.scrollHeight>document.documentElement.clientHeight,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right","")},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b,g=f&&f.selector;(e||"destroy"!=b)&&(g?(e||d.data("bs.tooltip",e={}),e[g]||(e[g]=new c(this,f))):e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};c.VERSION="3.3.1",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(this.options.viewport.selector||this.options.viewport);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c&&c.$tip&&c.$tip.is(":visible")?void(c.hoverState="in"):(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.options.container?a(this.options.container):this.$element.parent(),p=this.getPosition(o);h="bottom"==h&&k.bottom+m>p.bottom?"top":"top"==h&&k.top-m<p.top?"bottom":"right"==h&&k.right+l>p.width?"left":"left"==h&&k.left-l<p.left?"right":h,f.removeClass(n).addClass(h)}var q=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(q,h);var r=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",r).emulateTransitionEnd(c.TRANSITION_DURATION):r()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top=b.top+g,b.left=b.left+h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=this.tip(),g=a.Event("hide.bs."+this.type);return this.$element.trigger(g),g.isDefaultPrevented()?void 0:(f.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.width&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type)})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b,g=f&&f.selector;(e||"destroy"!=b)&&(g?(e||d.data("bs.popover",e={}),e[g]||(e[g]=new c(this,f))):e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.1",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},c.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),function(a){function b(a){return"undefined"==typeof a.which?!0:"number"==typeof a.which&&a.which>0?!a.ctrlKey&&!a.metaKey&&!a.altKey&&8!=a.which:!1}a.expr[":"].notmdproc=function(b){return a(b).data("mdproc")?!1:!0},a.material={options:{input:!0,ripples:!0,checkbox:!0,togglebutton:!0,radio:!0,arrive:!0,autofill:!0,withRipples:[".btn:not(.btn-link)",".card-image",".navbar a:not(.withoutripple)",".dropdown-menu a",".nav-tabs a:not(.withoutripple)",".withripple"].join(","),inputElements:"input.form-control, textarea.form-control, select.form-control",checkboxElements:".checkbox > label > input[type=checkbox]",togglebuttonElements:".togglebutton > label > input[type=checkbox]",radioElements:".radio > label > input[type=radio]"},checkbox:function(b){a(b?b:this.options.checkboxElements).filter(":notmdproc").data("mdproc",!0).after("<span class=ripple></span><span class=check></span>")},togglebutton:function(b){a(b?b:this.options.togglebuttonElements).filter(":notmdproc").data("mdproc",!0).after("<span class=toggle></span>")},radio:function(b){a(b?b:this.options.radioElements).filter(":notmdproc").data("mdproc",!0).after("<span class=circle></span><span class=check></span>")},input:function(c){a(c?c:this.options.inputElements).filter(":notmdproc").data("mdproc",!0).each(function(){var b=a(this);if(b.wrap("<div class=form-control-wrapper></div>"),b.after("<span class=material-input></span>"),b.hasClass("floating-label")){var c=b.attr("placeholder");b.attr("placeholder",null).removeClass("floating-label"),b.after("<div class=floating-label>"+c+"</div>")}if(b.attr("data-hint")&&b.after("<div class=hint>"+b.attr("data-hint")+"</div>"),(null===b.val()||"undefined"==b.val()||""===b.val())&&b.addClass("empty"),b.parent().next().is("[type=file]")){b.parent().addClass("fileinput");var d=b.parent().next().detach();b.after(d)}}),a(document).on("change",".checkbox input[type=checkbox]",function(){a(this).blur()}).on("keydown paste",".form-control",function(c){b(c)&&a(this).removeClass("empty")}).on("keyup change",".form-control",function(){var b=a(this);""===b.val()&&b[0].checkValidity()?b.addClass("empty"):b.removeClass("empty")}).on("focus",".form-control-wrapper.fileinput",function(){a(this).find("input").addClass("focus")}).on("blur",".form-control-wrapper.fileinput",function(){a(this).find("input").removeClass("focus")}).on("change",".form-control-wrapper.fileinput [type=file]",function(){var b="";a.each(a(this)[0].files,function(a,c){console.log(c),b+=c.name+", "}),b=b.substring(0,b.length-2),b?a(this).prev().removeClass("empty"):a(this).prev().addClass("empty"),a(this).prev().val(b)})},ripples:function(b){a(b?b:this.options.withRipples).ripples()},autofill:function(){var b=setInterval(function(){a("input[type!=checkbox]").each(function(){a(this).val()&&a(this).val()!==a(this).attr("value")&&a(this).trigger("change")})},100);setTimeout(function(){clearInterval(b)},1e4);var c;a(document).on("focus","input",function(){var b=a(this).parents("form").find("input").not("[type=file]");c=setInterval(function(){b.each(function(){a(this).val()!==a(this).attr("value")&&a(this).trigger("change")})},100)}).on("blur","input",function(){clearInterval(c)})},init:function(){a.ripples&&this.options.ripples&&this.ripples(),this.options.input&&this.input(),this.options.checkbox&&this.checkbox(),this.options.togglebutton&&this.togglebutton(),this.options.radio&&this.radio(),this.options.autofill&&this.autofill(),document.arrive&&this.options.arrive&&(a(document).arrive(this.options.inputElements,function(){a.material.input(a(this))}),a(document).arrive(this.options.checkboxElements,function(){a.material.checkbox(a(this))}),a(document).arrive(this.options.radioElements,function(){a.material.radio(a(this))}),a(document).arrive(this.options.togglebuttonElements,function(){a.material.togglebutton(a(this))}))}}}(jQuery),function(a,b,c,d){"use strict";function e(b,c){g=this,this.element=a(b),this.options=a.extend({},h,c),this._defaults=h,this._name=f,this.init()}var f="ripples",g=null,h={};e.prototype.init=function(){var c=this.element;c.on("mousedown touchstart",function(d){if(g.isTouch()&&"mousedown"===d.type)return!1;c.find(".ripple-wrapper").length||c.append('<div class="ripple-wrapper"></div>');var e=c.children(".ripple-wrapper"),f=g.getRelY(e,d),h=g.getRelX(e,d);if(f||h){var i=g.getRipplesColor(),j=a("<div></div>");j.addClass("ripple").css({left:h,top:f,"background-color":i}),e.append(j),function(){return b.getComputedStyle(j[0]).opacity}(),g.rippleOn(j),setTimeout(function(){g.rippleEnd(j)},500),c.on("mouseup mouseleave touchend",function(){j.data("mousedown","off"),"off"===j.data("animating")&&g.rippleOut(j)})}})},e.prototype.getNewSize=function(a){var b=this.element;return Math.max(b.outerWidth(),b.outerHeight())/a.outerWidth()*2.5},e.prototype.getRelX=function(a,b){var c=a.offset();return g.isTouch()?(b=b.originalEvent,1!==b.touches.length?b.touches[0].pageX-c.left:!1):b.pageX-c.left},e.prototype.getRelY=function(a,b){var c=a.offset();return g.isTouch()?(b=b.originalEvent,1!==b.touches.length?b.touches[0].pageY-c.top:!1):b.pageY-c.top},e.prototype.getRipplesColor=function(){var a,c=this.element;return a=this.options&&this.options.color?this.options.color:c.data("ripple-color")?c.data("ripple-color"):b.getComputedStyle(c[0]).color},e.prototype.hasTransitionSupport=function(){var a=c.body||c.documentElement,b=a.style,e=b.transition!==d||b.WebkitTransition!==d||b.MozTransition!==d||b.MsTransition!==d||b.OTransition!==d;return e},e.prototype.isTouch=function(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},e.prototype.rippleEnd=function(a){a.data("animating","off"),"off"===a.data("mousedown")&&g.rippleOut(a)},e.prototype.rippleOut=function(a){a.off(),g.hasTransitionSupport()?a.addClass("ripple-out"):a.animate({opacity:0},100,function(){a.trigger("transitionend")}),a.on("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(){a.remove()})},e.prototype.rippleOn=function(a){var b=g.getNewSize(a),c=this.element;g.hasTransitionSupport()?a.css({"-ms-transform":"scale("+b+")","-moz-transform":"scale("+b+")","-webkit-transform":"scale("+b+")",transform:"scale("+b+")"}).addClass("ripple-on").data("animating","on").data("mousedown","on"):a.animate({width:2*Math.max(c.outerWidth(),c.outerHeight()),height:2*Math.max(c.outerWidth(),c.outerHeight()),"margin-left":-1*Math.max(c.outerWidth(),c.outerHeight()),"margin-top":-1*Math.max(c.outerWidth(),c.outerHeight()),opacity:.2},500,function(){a.trigger("transitionend")})},a.fn.ripples=function(b){return this.each(function(){a.data(this,"plugin_"+f)||a.data(this,"plugin_"+f,new e(this,b))})}}(jQuery,window,document),function(a){function b(a){return"undefined"!=typeof a&&null!==a?!0:!1}a(document).ready(function(){a("body").append("<div id=snackbar-container/>")}),a(document).on("click","[data-toggle=snackbar]",function(){a(this).snackbar("toggle")}).on("click","#snackbar-container .snackbar",function(){a(this).snackbar("hide")}),a.snackbar=function(c){if(b(c)&&c===Object(c)){var d;d=b(c.id)?a("#"+c.id):a("<div/>").attr("id","snackbar"+Date.now()).attr("class","snackbar");var e=d.hasClass("snackbar-opened");b(c.style)?d.attr("class","snackbar "+c.style):d.attr("class","snackbar"),c.timeout=b(c.timeout)?c.timeout:3e3,b(c.content)&&(d.find(".snackbar-content").length?d.find(".snackbar-content").text(c.content):d.prepend("<span class=snackbar-content>"+c.content+"</span>")),b(c.id)?d.insertAfter("#snackbar-container .snackbar:last-child"):d.appendTo("#snackbar-container"),b(c.action)&&"toggle"==c.action&&(e?c.action="hide":c.action="show");var f=Date.now();d.data("animationId1",f),setTimeout(function(){d.data("animationId1")===f&&(b(c.action)&&"show"!=c.action?b(c.action)&&"hide"==c.action&&d.removeClass("snackbar-opened"):d.addClass("snackbar-opened"))},50);var g=Date.now();return d.data("animationId2",g),0!==c.timeout&&setTimeout(function(){d.data("animationId2")===g&&d.removeClass("snackbar-opened")},c.timeout),d}return!1},a.fn.snackbar=function(c){var d={};if(this.hasClass("snackbar"))return d.id=this.attr("id"),("show"===c||"hide"===c||"toggle"==c)&&(d.action=c),a.snackbar(d);b(c)&&"show"!==c&&"hide"!==c&&"toggle"!=c||(d={content:a(this).attr("data-content"),style:a(this).attr("data-style"),timeout:a(this).attr("data-timeout")}),b(c)&&(d.id=this.attr("data-snackbar-id"),("show"===c||"hide"===c||"toggle"==c)&&(d.action=c));var e=a.snackbar(d);return this.attr("data-snackbar-id",e.attr("id")),e}}(jQuery),function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){if(!d)var d={map:function(a,b){var c={};return b?a.map(function(a,d){return c.index=d,b.call(c,a)}):a.slice()},naturalOrder:function(a,b){return b>a?-1:a>b?1:0},sum:function(a,b){var c={};return a.reduce(b?function(a,d,e){return c.index=e,a+b.call(c,d)}:function(a,b){return a+b},0)},max:function(a,b){return Math.max.apply(null,b?d.map(a,b):a)}};var e=function(){function a(a,b,c){return(a<<2*j)+(b<<j)+c}function b(a){function b(){c.sort(a),d=!0}var c=[],d=!1;return{push:function(a){c.push(a),d=!1},peek:function(a){return d||b(),void 0===a&&(a=c.length-1),c[a]},pop:function(){return d||b(),c.pop()},size:function(){return c.length},map:function(a){return c.map(a)},debug:function(){return d||b(),c}}}function c(a,b,c,d,e,f,g){var h=this;h.r1=a,h.r2=b,h.g1=c,h.g2=d,h.b1=e,h.b2=f,h.histo=g}function e(){this.vboxes=new b(function(a,b){return d.naturalOrder(a.vbox.count()*a.vbox.volume(),b.vbox.count()*b.vbox.volume())})}function f(b){var c,d,e,f,g=1<<3*j,h=new Array(g);return b.forEach(function(b){d=b[0]>>k,e=b[1]>>k,f=b[2]>>k,c=a(d,e,f),h[c]=(h[c]||0)+1}),h}function g(a,b){var d,e,f,g=1e6,h=0,i=1e6,j=0,l=1e6,m=0;return a.forEach(function(a){d=a[0]>>k,e=a[1]>>k,f=a[2]>>k,g>d?g=d:d>h&&(h=d),i>e?i=e:e>j&&(j=e),l>f?l=f:f>m&&(m=f)}),new c(g,h,i,j,l,m,b)}function h(b,c){function e(a){var b,d,e,f,g,h=a+"1",i=a+"2",k=0;for(j=c[h];j<=c[i];j++)if(p[j]>o/2){for(e=c.copy(),f=c.copy(),b=j-c[h],d=c[i]-j,g=d>=b?Math.min(c[i]-1,~~(j+d/2)):Math.max(c[h],~~(j-1-b/2));!p[g];)g++;for(k=q[g];!k&&p[g-1];)k=q[--g];return e[i]=g,f[h]=e[i]+1,[e,f]}}if(c.count()){var f=c.r2-c.r1+1,g=c.g2-c.g1+1,h=c.b2-c.b1+1,i=d.max([f,g,h]);if(1==c.count())return[c.copy()];var j,k,l,m,n,o=0,p=[],q=[];if(i==f)for(j=c.r1;j<=c.r2;j++){for(m=0,k=c.g1;k<=c.g2;k++)for(l=c.b1;l<=c.b2;l++)n=a(j,k,l),m+=b[n]||0;o+=m,p[j]=o}else if(i==g)for(j=c.g1;j<=c.g2;j++){for(m=0,k=c.r1;k<=c.r2;k++)for(l=c.b1;l<=c.b2;l++)n=a(k,j,l),m+=b[n]||0;o+=m,p[j]=o}else for(j=c.b1;j<=c.b2;j++){for(m=0,k=c.r1;k<=c.r2;k++)for(l=c.g1;l<=c.g2;l++)n=a(k,l,j),m+=b[n]||0;o+=m,p[j]=o}return p.forEach(function(a,b){q[b]=o-a}),e(i==f?"r":i==g?"g":"b")}}function i(a,c){function i(a,b){for(var c,d=1,e=0;l>e;)if(c=a.pop(),c.count()){var f=h(j,c),g=f[0],i=f[1];if(!g)return;if(a.push(g),i&&(a.push(i),d++),d>=b)return;if(e++>l)return}else a.push(c),e++}if(!a.length||2>c||c>256)return!1;var j=f(a),k=0;j.forEach(function(){k++});var n=g(a,j),o=new b(function(a,b){return d.naturalOrder(a.count(),b.count())});o.push(n),i(o,m*c);for(var p=new b(function(a,b){return d.naturalOrder(a.count()*a.volume(),b.count()*b.volume())});o.size();)p.push(o.pop());i(p,c-p.size());for(var q=new e;p.size();)q.push(p.pop());return q}var j=5,k=8-j,l=1e3,m=.75;return c.prototype={volume:function(a){var b=this;return(!b._volume||a)&&(b._volume=(b.r2-b.r1+1)*(b.g2-b.g1+1)*(b.b2-b.b1+1)),b._volume},count:function(b){var c=this,d=c.histo;if(!c._count_set||b){var e,f,g,h=0;for(e=c.r1;e<=c.r2;e++)for(f=c.g1;f<=c.g2;f++)for(g=c.b1;g<=c.b2;g++)index=a(e,f,g),h+=d[index]||0;c._count=h,c._count_set=!0}return c._count},copy:function(){var a=this;return new c(a.r1,a.r2,a.g1,a.g2,a.b1,a.b2,a.histo)},avg:function(b){var c=this,d=c.histo;if(!c._avg||b){var e,f,g,h,i,k=0,l=1<<8-j,m=0,n=0,o=0;for(f=c.r1;f<=c.r2;f++)for(g=c.g1;g<=c.g2;g++)for(h=c.b1;h<=c.b2;h++)i=a(f,g,h),e=d[i]||0,k+=e,m+=e*(f+.5)*l,n+=e*(g+.5)*l,o+=e*(h+.5)*l;k?c._avg=[~~(m/k),~~(n/k),~~(o/k)]:c._avg=[~~(l*(c.r1+c.r2+1)/2),~~(l*(c.g1+c.g2+1)/2),~~(l*(c.b1+c.b2+1)/2)]}return c._avg},contains:function(a){var b=this,c=a[0]>>k;return gval=a[1]>>k,bval=a[2]>>k,c>=b.r1&&c<=b.r2&&gval>=b.g1&&gval<=b.g2&&bval>=b.b1&&bval<=b.b2}},e.prototype={push:function(a){this.vboxes.push({vbox:a,color:a.avg()})},palette:function(){return this.vboxes.map(function(a){return a.color})},size:function(){return this.vboxes.size()},map:function(a){for(var b=this.vboxes,c=0;c<b.size();c++)if(b.peek(c).vbox.contains(a))return b.peek(c).color;return this.nearest(a)},nearest:function(a){for(var b,c,d,e=this.vboxes,f=0;f<e.size();f++)c=Math.sqrt(Math.pow(a[0]-e.peek(f).color[0],2)+Math.pow(a[1]-e.peek(f).color[1],2)+Math.pow(a[2]-e.peek(f).color[2],2)),(b>c||void 0===b)&&(b=c,d=e.peek(f).color);return d},forcebw:function(){var a=this.vboxes;a.sort(function(a,b){return d.naturalOrder(d.sum(a.color),d.sum(b.color))});var b=a[0].color;b[0]<5&&b[1]<5&&b[2]<5&&(a[0].color=[0,0,0]);var c=a.length-1,e=a[c].color;e[0]>251&&e[1]>251&&e[2]>251&&(a[c].color=[255,255,255])}},{quantize:i}}();b.exports=e.quantize},{}],2:[function(a,b,c){(function(){var b,c,d,e=function(a,b){return function(){return a.apply(b,arguments)}},f=[].slice;window.Swatch=c=function(){function a(a,b){this.rgb=a,this.population=b}return a.prototype.hsl=void 0,a.prototype.rgb=void 0,a.prototype.population=1,a.yiq=0,a.prototype.getHsl=function(){return this.hsl?this.hsl:this.hsl=d.rgbToHsl(this.rgb[0],this.rgb[1],this.rgb[2])},a.prototype.getPopulation=function(){return this.population},a.prototype.getRgb=function(){return this.rgb},a.prototype.getHex=function(){return"#"+((1<<24)+(this.rgb[0]<<16)+(this.rgb[1]<<8)+this.rgb[2]).toString(16).slice(1,7)},a.prototype.getTitleTextColor=function(){return this._ensureTextColors(),this.yiq<200?"#fff":"#000"},a.prototype.getBodyTextColor=function(){return this._ensureTextColors(),this.yiq<150?"#fff":"#000"},a.prototype._ensureTextColors=function(){return this.yiq?void 0:this.yiq=(299*this.rgb[0]+587*this.rgb[1]+114*this.rgb[2])/1e3},a}(),window.Vibrant=d=function(){function d(a,d,f){this.swatches=e(this.swatches,this);var g,h,i,j,k,l,m,n,o,p,q,r;for("undefined"==typeof d&&(d=64),"undefined"==typeof f&&(f=5),m=new b(a),n=m.getImageData(),q=n.data,p=m.getPixelCount(),h=[],l=0;p>l;)o=4*l,r=q[o+0],k=q[o+1],i=q[o+2],g=q[o+3],g>=125&&(r>250&&k>250&&i>250||h.push([r,k,i])),l+=f;j=this.quantize(h,d),this._swatches=j.vboxes.map(function(a){return function(a){return new c(a.color,a.vbox.count())}}(this)),this.maxPopulation=this.findMaxPopulation,this.generateVarationColors(),this.generateEmptySwatches(),m.removeCanvas()}return d.prototype.quantize=a("quantize"),d.prototype._swatches=[],d.prototype.TARGET_DARK_LUMA=.26,d.prototype.MAX_DARK_LUMA=.45,d.prototype.MIN_LIGHT_LUMA=.55,d.prototype.TARGET_LIGHT_LUMA=.74,d.prototype.MIN_NORMAL_LUMA=.3,d.prototype.TARGET_NORMAL_LUMA=.5,d.prototype.MAX_NORMAL_LUMA=.7,d.prototype.TARGET_MUTED_SATURATION=.3,d.prototype.MAX_MUTED_SATURATION=.4,d.prototype.TARGET_VIBRANT_SATURATION=1,d.prototype.MIN_VIBRANT_SATURATION=.35,d.prototype.WEIGHT_SATURATION=3,d.prototype.WEIGHT_LUMA=6,d.prototype.WEIGHT_POPULATION=1,d.prototype.VibrantSwatch=void 0,d.prototype.MutedSwatch=void 0,d.prototype.DarkVibrantSwatch=void 0,d.prototype.DarkMutedSwatch=void 0,d.prototype.LightVibrantSwatch=void 0,d.prototype.LightMutedSwatch=void 0,d.prototype.HighestPopulation=0,d.prototype.generateVarationColors=function(){return this.VibrantSwatch=this.findColorVariation(this.TARGET_NORMAL_LUMA,this.MIN_NORMAL_LUMA,this.MAX_NORMAL_LUMA,this.TARGET_VIBRANT_SATURATION,this.MIN_VIBRANT_SATURATION,1),this.LightVibrantSwatch=this.findColorVariation(this.TARGET_LIGHT_LUMA,this.MIN_LIGHT_LUMA,1,this.TARGET_VIBRANT_SATURATION,this.MIN_VIBRANT_SATURATION,1),this.DarkVibrantSwatch=this.findColorVariation(this.TARGET_DARK_LUMA,0,this.MAX_DARK_LUMA,this.TARGET_VIBRANT_SATURATION,this.MIN_VIBRANT_SATURATION,1),this.MutedSwatch=this.findColorVariation(this.TARGET_NORMAL_LUMA,this.MIN_NORMAL_LUMA,this.MAX_NORMAL_LUMA,this.TARGET_MUTED_SATURATION,0,this.MAX_MUTED_SATURATION),this.LightMutedSwatch=this.findColorVariation(this.TARGET_LIGHT_LUMA,this.MIN_LIGHT_LUMA,1,this.TARGET_MUTED_SATURATION,0,this.MAX_MUTED_SATURATION),this.DarkMutedSwatch=this.findColorVariation(this.TARGET_DARK_LUMA,0,this.MAX_DARK_LUMA,this.TARGET_MUTED_SATURATION,0,this.MAX_MUTED_SATURATION)},d.prototype.generateEmptySwatches=function(){var a;return void 0===this.VibrantSwatch&&void 0!==this.DarkVibrantSwatch&&(a=this.DarkVibrantSwatch.getHsl(),a[2]=this.TARGET_NORMAL_LUMA,this.VibrantSwatch=new c(d.hslToRgb(a[0],a[1],a[2]),0)),void 0===this.DarkVibrantSwatch&&void 0!==this.VibrantSwatch?(a=this.VibrantSwatch.getHsl(),a[2]=this.TARGET_DARK_LUMA,this.DarkVibrantSwatch=new c(d.hslToRgb(a[0],a[1],a[2]),0)):void 0},d.prototype.findMaxPopulation=function(){var a,b,c,d,e;for(c=0,d=this._swatches,a=0,b=d.length;b>a;a++)e=d[a],c=Math.max(c,e.getPopulation());return c},d.prototype.findColorVariation=function(a,b,c,d,e,f){var g,h,i,j,k,l,m,n,o;for(j=void 0,k=0,l=this._swatches,g=0,h=l.length;h>g;g++)n=l[g],m=n.getHsl()[1],i=n.getHsl()[2],m>=e&&f>=m&&i>=b&&c>=i&&!this.isAlreadySelected(n)&&(o=this.createComparisonValue(m,d,i,a,n.getPopulation(),this.HighestPopulation),(void 0===j||o>k)&&(j=n,k=o));return j},d.prototype.createComparisonValue=function(a,b,c,d,e,f){return this.weightedMean(this.invertDiff(a,b),this.WEIGHT_SATURATION,this.invertDiff(c,d),this.WEIGHT_LUMA,e/f,this.WEIGHT_POPULATION)},d.prototype.invertDiff=function(a,b){return 1-Math.abs(a-b)},d.prototype.weightedMean=function(){var a,b,c,d,e,g;for(e=1<=arguments.length?f.call(arguments,0):[],b=0,c=0,a=0;a<e.length;)d=e[a],g=e[a+1],b+=d*g,c+=g,a+=2;return b/c},d.prototype.swatches=function(){return{Vibrant:this.VibrantSwatch,Muted:this.MutedSwatch,DarkVibrant:this.DarkVibrantSwatch,DarkMuted:this.DarkMutedSwatch,LightVibrant:this.LightVibrantSwatch,LightMuted:this.LightMuted}},d.prototype.isAlreadySelected=function(a){return this.VibrantSwatch===a||this.DarkVibrantSwatch===a||this.LightVibrantSwatch===a||this.MutedSwatch===a||this.DarkMutedSwatch===a||this.LightMutedSwatch===a},d.rgbToHsl=function(a,b,c){var d,e,f,g,h,i;if(a/=255,b/=255,c/=255,g=Math.max(a,b,c),h=Math.min(a,b,c),e=void 0,i=void 0,f=(g+h)/2,g===h)e=i=0;else{switch(d=g-h,i=f>.5?d/(2-g-h):d/(g+h),g){case a:e=(b-c)/d+(c>b?6:0);break;case b:e=(c-a)/d+2;break;case c:e=(a-b)/d+4}e/=6}return[e,i,f]},d.hslToRgb=function(a,b,c){var d,e,f,g,h,i;return i=void 0,e=void 0,d=void 0,f=function(a,b,c){return 0>c&&(c+=1),c>1&&(c-=1),1/6>c?a+6*(b-a)*c:.5>c?b:2/3>c?a+(b-a)*(2/3-c)*6:a},0===b?i=e=d=c:(h=.5>c?c*(1+b):c+b-c*b,g=2*c-h,i=f(g,h,a+1/3),e=f(g,h,a),d=f(g,h,a-1/3)),[255*i,255*e,255*d]},d}(),window.CanvasImage=b=function(){function a(a){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),document.body.appendChild(this.canvas),this.width=this.canvas.width=a.width,this.height=this.canvas.height=a.height,this.context.drawImage(a,0,0,this.width,this.height)}return a.prototype.clear=function(){return this.context.clearRect(0,0,this.width,this.height)},a.prototype.update=function(a){return this.context.putImageData(a,0,0)},a.prototype.getPixelCount=function(){return this.width*this.height},a.prototype.getImageData=function(){return this.context.getImageData(0,0,this.width,this.height)},a.prototype.removeCanvas=function(){return this.canvas.parentNode.removeChild(this.canvas)},a}()}).call(this)},{quantize:1}]},{},[2]),function(a,b){"use strict";function c(c,d){function e(a){return qa.preferFlash&&ja&&!qa.ignoreFlash&&qa.flash[a]!==b&&qa.flash[a]}function f(a){return function(b){var c,d=this._s; +return d&&d._a?c=a.call(this,b):(d&&d.id?qa._wD(d.id+": Ignoring "+b.type):qa._wD(va+"Ignoring "+b.type),c=null),c}}this.setupOptions={url:c||null,flashVersion:8,debugMode:!0,debugFlash:!1,useConsole:!0,consoleOnly:!0,waitForWindowLoad:!1,bgColor:"#ffffff",useHighPerformance:!1,flashPollingInterval:null,html5PollingInterval:null,flashLoadTimeout:1e3,wmode:null,allowScriptAccess:"always",useFlashBlock:!1,useHTML5Audio:!0,html5Test:/^(probably|maybe)$/i,preferFlash:!1,noSWFCache:!1,idPrefix:"sound"},this.defaultOptions={autoLoad:!1,autoPlay:!1,from:null,loops:1,onid3:null,onload:null,whileloading:null,onplay:null,onpause:null,onresume:null,whileplaying:null,onposition:null,onstop:null,onfailure:null,onfinish:null,multiShot:!0,multiShotEvents:!1,position:null,pan:0,stream:!0,to:null,type:null,usePolicyFile:!1,volume:100},this.flash9Options={isMovieStar:null,usePeakData:!1,useWaveformData:!1,useEQData:!1,onbufferchange:null,ondataerror:null},this.movieStarOptions={bufferTime:3,serverURL:null,onconnect:null,duration:null},this.audioFormats={mp3:{type:['audio/mpeg; codecs="mp3"',"audio/mpeg","audio/mp3","audio/MPA","audio/mpa-robust"],required:!0},mp4:{related:["aac","m4a","m4b"],type:['audio/mp4; codecs="mp4a.40.2"',"audio/aac","audio/x-m4a","audio/MP4A-LATM","audio/mpeg4-generic"],required:!1},ogg:{type:["audio/ogg; codecs=vorbis"],required:!1},opus:{type:["audio/ogg; codecs=opus","audio/opus"],required:!1},wav:{type:['audio/wav; codecs="1"',"audio/wav","audio/wave","audio/x-wav"],required:!1}},this.movieID="sm2-container",this.id=d||"sm2movie",this.debugID="soundmanager-debug",this.debugURLParam=/([#?&])debug=1/i,this.versionNumber="V2.97a.20140901",this.version=null,this.movieURL=null,this.altURL=null,this.swfLoaded=!1,this.enabled=!1,this.oMC=null,this.sounds={},this.soundIDs=[],this.muted=!1,this.didFlashBlock=!1,this.filePattern=null,this.filePatterns={flash8:/\.mp3(\?.*)?$/i,flash9:/\.mp3(\?.*)?$/i},this.features={buffering:!1,peakData:!1,waveformData:!1,eqData:!1,movieStar:!1},this.sandbox={type:null,types:{remote:"remote (domain-based) rules",localWithFile:"local with file access (no internet access)",localWithNetwork:"local with network (internet access only, no local access)",localTrusted:"local, trusted (local+internet access)"},description:null,noRemote:null,noLocal:null},this.html5={usingFlash:null},this.flash={},this.html5Only=!1,this.ignoreFlash=!1;var g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,aa,ba,ca,da,ea,fa,ga,ha,ia,ja,ka,la,ma,na,oa,pa,qa=this,ra=null,sa=null,ta="soundManager",ua=ta+": ",va="HTML5::",wa=navigator.userAgent,xa=a.location.href.toString(),ya=document,za=[],Aa=!0,Ba=!1,Ca=!1,Da=!1,Ea=!1,Fa=!1,Ga=0,Ha=["log","info","warn","error"],Ia=8,Ja=null,Ka=null,La=!1,Ma=!1,Na=0,Oa=null,Pa=[],Qa=null,Ra=Array.prototype.slice,Sa=!1,Ta=0,Ua=wa.match(/(ipad|iphone|ipod)/i),Va=wa.match(/android/i),Wa=wa.match(/msie/i),Xa=wa.match(/webkit/i),Ya=wa.match(/safari/i)&&!wa.match(/chrome/i),Za=wa.match(/opera/i),$a=wa.match(/(mobile|pre\/|xoom)/i)||Ua||Va,_a=!xa.match(/usehtml5audio/i)&&!xa.match(/sm2\-ignorebadua/i)&&Ya&&!wa.match(/silk/i)&&wa.match(/OS X 10_6_([3-7])/i),ab=a.console!==b&&console.log!==b,bb=ya.hasFocus!==b?ya.hasFocus():null,cb=Ya&&(ya.hasFocus===b||!ya.hasFocus()),db=!cb,eb=/(mp3|mp4|mpa|m4a|m4b)/i,fb=1e3,gb="about:blank",hb="data:audio/wave;base64,/UklGRiYAAABXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAAZGF0YQIAAAD//w==",ib=ya.location?ya.location.protocol.match(/http/i):null,jb=ib?"":"http://",kb=/^\s*audio\/(?:x-)?(?:mpeg4|aac|flv|mov|mp4||m4v|m4a|m4b|mp4v|3gp|3g2)\s*(?:$|;)/i,lb=["mpeg4","aac","flv","mov","mp4","m4v","f4v","m4a","m4b","mp4v","3gp","3g2"],mb=new RegExp("\\.("+lb.join("|")+")(\\?.*)?$","i");this.mimePattern=/^\s*audio\/(?:x-)?(?:mp(?:eg|3))\s*(?:$|;)/i,this.useAltURL=!ib,R={swfBox:"sm2-object-box",swfDefault:"movieContainer",swfError:"swf_error",swfTimedout:"swf_timedout",swfLoaded:"swf_loaded",swfUnblocked:"swf_unblocked",sm2Debug:"sm2_debug",highPerf:"high_performance",flashDebug:"flash_debug"},this.hasHTML5=function(){try{return Audio!==b&&(Za&&opera!==b&&opera.version()<10?new Audio(null):new Audio).canPlayType!==b}catch(a){return!1}}(),this.setup=function(a){var c=!qa.url;return a!==b&&Da&&Qa&&qa.ok()&&(a.flashVersion!==b||a.url!==b||a.html5Test!==b)&&V(O("setupLate")),q(a),a&&(c&&F&&a.url!==b&&qa.beginDelayedInit(),F||a.url===b||"complete"!==ya.readyState||setTimeout(D,1)),qa},this.ok=function(){return Qa?Da&&!Ea:qa.useHTML5Audio&&qa.hasHTML5},this.supported=this.ok,this.getMovie=function(b){return h(b)||ya[b]||a[b]},this.createSound=function(a,c){function d(){return h=T(h),qa.sounds[h.id]=new g(h),qa.soundIDs.push(h.id),qa.sounds[h.id]}var e,f,h,i=null;if(e=ta+".createSound(): ",f=e+O(Da?"notOK":"notReady"),!Da||!qa.ok())return V(f),!1;if(c!==b&&(a={id:a,url:c}),h=p(a),h.url=$(h.url),void 0===h.id&&(h.id=qa.setupOptions.idPrefix+Ta++),h.id.toString().charAt(0).match(/^[0-9]$/)&&qa._wD(e+O("badID",h.id),2),qa._wD(e+h.id+(h.url?" ("+h.url+")":""),1),W(h.id,!0))return qa._wD(e+h.id+" exists",1),qa.sounds[h.id];if(ba(h))i=d(),qa._wD(h.id+": Using HTML5"),i._setup_html5(h);else{if(qa.html5Only)return qa._wD(h.id+": No HTML5 support for this sound, and no Flash. Exiting."),d();if(qa.html5.usingFlash&&h.url&&h.url.match(/data\:/i))return qa._wD(h.id+": data: URIs not supported via Flash. Exiting."),d();l>8&&(null===h.isMovieStar&&(h.isMovieStar=!!(h.serverURL||(h.type?h.type.match(kb):!1)||h.url&&h.url.match(mb))),h.isMovieStar&&(qa._wD(e+"using MovieStar handling"),h.loops>1&&n("noNSLoop"))),h=U(h,e),i=d(),8===l?sa._createSound(h.id,h.loops||1,h.usePolicyFile):(sa._createSound(h.id,h.url,h.usePeakData,h.useWaveformData,h.useEQData,h.isMovieStar,h.isMovieStar?h.bufferTime:!1,h.loops||1,h.serverURL,h.duration||null,h.autoPlay,!0,h.autoLoad,h.usePolicyFile),h.serverURL||(i.connected=!0,h.onconnect&&h.onconnect.apply(i))),h.serverURL||!h.autoLoad&&!h.autoPlay||i.load(h)}return!h.serverURL&&h.autoPlay&&i.play(),i},this.destroySound=function(a,b){if(!W(a))return!1;var c,d=qa.sounds[a];for(d._iO={},d.stop(),d.unload(),c=0;c<qa.soundIDs.length;c++)if(qa.soundIDs[c]===a){qa.soundIDs.splice(c,1);break}return b||d.destruct(!0),d=null,delete qa.sounds[a],!0},this.load=function(a,b){return W(a)?qa.sounds[a].load(b):!1},this.unload=function(a){return W(a)?qa.sounds[a].unload():!1},this.onPosition=function(a,b,c,d){return W(a)?qa.sounds[a].onposition(b,c,d):!1},this.onposition=this.onPosition,this.clearOnPosition=function(a,b,c){return W(a)?qa.sounds[a].clearOnPosition(b,c):!1},this.play=function(a,b){var c=null,d=b&&!(b instanceof Object);if(!Da||!qa.ok())return V(ta+".play(): "+O(Da?"notOK":"notReady")),!1;if(W(a,d))d&&(b={url:b});else{if(!d)return!1;d&&(b={url:b}),b&&b.url&&(qa._wD(ta+'.play(): Attempting to create "'+a+'"',1),b.id=a,c=qa.createSound(b).play())}return null===c&&(c=qa.sounds[a].play(b)),c},this.start=this.play,this.setPosition=function(a,b){return W(a)?qa.sounds[a].setPosition(b):!1},this.stop=function(a){return W(a)?(qa._wD(ta+".stop("+a+")",1),qa.sounds[a].stop()):!1},this.stopAll=function(){var a;qa._wD(ta+".stopAll()",1);for(a in qa.sounds)qa.sounds.hasOwnProperty(a)&&qa.sounds[a].stop()},this.pause=function(a){return W(a)?qa.sounds[a].pause():!1},this.pauseAll=function(){var a;for(a=qa.soundIDs.length-1;a>=0;a--)qa.sounds[qa.soundIDs[a]].pause()},this.resume=function(a){return W(a)?qa.sounds[a].resume():!1},this.resumeAll=function(){var a;for(a=qa.soundIDs.length-1;a>=0;a--)qa.sounds[qa.soundIDs[a]].resume()},this.togglePause=function(a){return W(a)?qa.sounds[a].togglePause():!1},this.setPan=function(a,b){return W(a)?qa.sounds[a].setPan(b):!1},this.setVolume=function(a,b){return W(a)?qa.sounds[a].setVolume(b):!1},this.mute=function(a){var b=0;if(a instanceof String&&(a=null),a)return W(a)?(qa._wD(ta+'.mute(): Muting "'+a+'"'),qa.sounds[a].mute()):!1;for(qa._wD(ta+".mute(): Muting all sounds"),b=qa.soundIDs.length-1;b>=0;b--)qa.sounds[qa.soundIDs[b]].mute();return qa.muted=!0,!0},this.muteAll=function(){qa.mute()},this.unmute=function(a){var b;if(a instanceof String&&(a=null),a)return W(a)?(qa._wD(ta+'.unmute(): Unmuting "'+a+'"'),qa.sounds[a].unmute()):!1;for(qa._wD(ta+".unmute(): Unmuting all sounds"),b=qa.soundIDs.length-1;b>=0;b--)qa.sounds[qa.soundIDs[b]].unmute();return qa.muted=!1,!0},this.unmuteAll=function(){qa.unmute()},this.toggleMute=function(a){return W(a)?qa.sounds[a].toggleMute():!1},this.getMemoryUse=function(){var a=0;return sa&&8!==l&&(a=parseInt(sa._getMemoryUse(),10)),a},this.disable=function(c){var d;if(c===b&&(c=!1),Ea)return!1;for(Ea=!0,n("shutdown",1),d=qa.soundIDs.length-1;d>=0;d--)L(qa.sounds[qa.soundIDs[d]]);return o(c),ha.remove(a,"load",u),!0},this.canPlayMIME=function(a){var b;return qa.hasHTML5&&(b=ca({type:a})),!b&&Qa&&(b=a&&qa.ok()?!!((l>8?a.match(kb):null)||a.match(qa.mimePattern)):null),b},this.canPlayURL=function(a){var b;return qa.hasHTML5&&(b=ca({url:a})),!b&&Qa&&(b=a&&qa.ok()?!!a.match(qa.filePattern):null),b},this.canPlayLink=function(a){return a.type!==b&&a.type&&qa.canPlayMIME(a.type)?!0:qa.canPlayURL(a.href)},this.getSoundById=function(a,b){if(!a)return null;var c=qa.sounds[a];return c||b||qa._wD(ta+'.getSoundById(): Sound "'+a+'" not found.',2),c},this.onready=function(b,c){var d="onready",e=!1;if("function"!=typeof b)throw O("needFunction",d);return Da&&qa._wD(O("queue",d)),c||(c=a),s(d,b,c),t(),e=!0,e},this.ontimeout=function(b,c){var d="ontimeout",e=!1;if("function"!=typeof b)throw O("needFunction",d);return Da&&qa._wD(O("queue",d)),c||(c=a),s(d,b,c),t({type:d}),e=!0,e},this._writeDebug=function(a,c){var d,e,f="soundmanager-debug";return qa.debugMode?ab&&qa.useConsole&&(c&&"object"==typeof c?console.log(a,c):Ha[c]!==b?console[Ha[c]](a):console.log(a),qa.consoleOnly)?!0:(d=h(f))?(e=ya.createElement("div"),++Ga%2===0&&(e.className="sm2-alt"),c=c===b?0:parseInt(c,10),e.appendChild(ya.createTextNode(a)),c&&(c>=2&&(e.style.fontWeight="bold"),3===c&&(e.style.color="#ff3333")),d.insertBefore(e,d.firstChild),d=null,!0):!1:!1},-1!==xa.indexOf("sm2-debug=alert")&&(this._writeDebug=function(b){a.alert(b)}),this._wD=this._writeDebug,this._debug=function(){var a,b;for(n("currentObj",1),a=0,b=qa.soundIDs.length;b>a;a++)qa.sounds[qa.soundIDs[a]]._debug()},this.reboot=function(b,c){qa.soundIDs.length&&qa._wD("Destroying "+qa.soundIDs.length+" SMSound object"+(1!==qa.soundIDs.length?"s":"")+"...");var d,e,f;for(d=qa.soundIDs.length-1;d>=0;d--)qa.sounds[qa.soundIDs[d]].destruct();if(sa)try{Wa&&(Ka=sa.innerHTML),Ja=sa.parentNode.removeChild(sa)}catch(g){n("badRemove",2)}if(Ka=Ja=Qa=sa=null,qa.enabled=F=Da=La=Ma=Ba=Ca=Ea=Sa=qa.swfLoaded=!1,qa.soundIDs=[],qa.sounds={},Ta=0,b)za=[];else for(d in za)if(za.hasOwnProperty(d))for(e=0,f=za[d].length;f>e;e++)za[d][e].fired=!1;return c||qa._wD(ta+": Rebooting..."),qa.html5={usingFlash:null},qa.flash={},qa.html5Only=!1,qa.ignoreFlash=!1,a.setTimeout(function(){C(),c||qa.beginDelayedInit()},20),qa},this.reset=function(){return n("reset"),qa.reboot(!0,!0)},this.getMoviePercent=function(){return sa&&"PercentLoaded"in sa?sa.PercentLoaded():null},this.beginDelayedInit=function(){Fa=!0,D(),setTimeout(function(){return Ma?!1:(H(),B(),Ma=!0,!0)},20),v()},this.destruct=function(){qa._wD(ta+".destruct()"),qa.disable(!0)},g=function(a){var c,d,e,f,g,h,i,j,k,o,q=this,r=!1,s=[],t=0,u=null;k={duration:null,time:null},this.id=a.id,this.sID=this.id,this.url=a.url,this.options=p(a),this.instanceOptions=this.options,this._iO=this.instanceOptions,this.pan=this.options.pan,this.volume=this.options.volume,this.isHTML5=!1,this._a=null,o=this.url?!1:!0,this.id3={},this._debug=function(){qa._wD(q.id+": Merged options:",q.options)},this.load=function(a){var c,d=null;if(a!==b?q._iO=p(a,q.options):(a=q.options,q._iO=a,u&&u!==q.url&&(n("manURL"),q._iO.url=q.url,q.url=null)),q._iO.url||(q._iO.url=q.url),q._iO.url=$(q._iO.url),q.instanceOptions=q._iO,c=q._iO,qa._wD(q.id+": load ("+c.url+")"),!c.url&&!q.url)return qa._wD(q.id+": load(): url is unassigned. Exiting.",2),q;if(q.isHTML5||8!==l||q.url||c.autoPlay||qa._wD(q.id+": Flash 8 load() limitation: Wait for onload() before calling play().",1),c.url===q.url&&0!==q.readyState&&2!==q.readyState)return n("onURL",1),3===q.readyState&&c.onload&&pa(q,function(){c.onload.apply(q,[!!q.duration])}),q;if(q.loaded=!1,q.readyState=1,q.playState=0,q.id3={},ba(c))d=q._setup_html5(c),d._called_load?qa._wD(q.id+": Ignoring request to load again"):(q._html5_canplay=!1,q.url!==c.url&&(qa._wD(n("manURL")+": "+c.url),q._a.src=c.url,q.setPosition(0)),q._a.autobuffer="auto",q._a.preload="auto",q._a._called_load=!0);else{if(qa.html5Only)return qa._wD(q.id+": No flash support. Exiting."),q;if(q._iO.url&&q._iO.url.match(/data\:/i))return qa._wD(q.id+": data: URIs not supported via Flash. Exiting."),q;try{q.isHTML5=!1,q._iO=U(T(c)),q._iO.autoPlay&&(q._iO.position||q._iO.from)&&(qa._wD(q.id+": Disabling autoPlay because of non-zero offset case"),q._iO.autoPlay=!1),c=q._iO,8===l?sa._load(q.id,c.url,c.stream,c.autoPlay,c.usePolicyFile):sa._load(q.id,c.url,!!c.stream,!!c.autoPlay,c.loops||1,!!c.autoLoad,c.usePolicyFile)}catch(e){n("smError",2),m("onload",!1),I({type:"SMSOUND_LOAD_JS_EXCEPTION",fatal:!0})}}return q.url=c.url,q},this.unload=function(){return 0!==q.readyState&&(qa._wD(q.id+": unload()"),q.isHTML5?(f(),q._a&&(q._a.pause(),u=ea(q._a))):8===l?sa._unload(q.id,gb):sa._unload(q.id),c()),q},this.destruct=function(a){qa._wD(q.id+": Destruct"),q.isHTML5?(f(),q._a&&(q._a.pause(),ea(q._a),Sa||e(),q._a._s=null,q._a=null)):(q._iO.onfailure=null,sa._destroySound(q.id)),a||qa.destroySound(q.id,!0)},this.play=function(a,c){var d,e,f,i,k,m,n,s=!0,t=null;if(d=q.id+": play(): ",c=c===b?!0:c,a||(a={}),q.url&&(q._iO.url=q.url),q._iO=p(q._iO,q.options),q._iO=p(a,q._iO),q._iO.url=$(q._iO.url),q.instanceOptions=q._iO,!q.isHTML5&&q._iO.serverURL&&!q.connected)return q.getAutoPlay()||(qa._wD(d+" Netstream not connected yet - setting autoPlay"),q.setAutoPlay(!0)),q;if(ba(q._iO)&&(q._setup_html5(q._iO),g()),1!==q.playState||q.paused||(e=q._iO.multiShot,e?qa._wD(d+"Already playing (multi-shot)",1):(qa._wD(d+"Already playing (one-shot)",1),q.isHTML5&&q.setPosition(q._iO.position),t=q)),null!==t)return t;if(a.url&&a.url!==q.url&&(q.readyState||q.isHTML5||8!==l||!o?q.load(q._iO):o=!1),q.loaded?qa._wD(d.substr(0,d.lastIndexOf(":"))):0===q.readyState?(qa._wD(d+"Attempting to load"),q.isHTML5||qa.html5Only?q.isHTML5?q.load(q._iO):(qa._wD(d+"Unsupported type. Exiting."),t=q):(q._iO.autoPlay=!0,q.load(q._iO)),q.instanceOptions=q._iO):2===q.readyState?(qa._wD(d+"Could not load - exiting",2),t=q):qa._wD(d+"Loading - attempting to play..."),null!==t)return t;if(!q.isHTML5&&9===l&&q.position>0&&q.position===q.duration&&(qa._wD(d+"Sound at end, resetting to position:0"),a.position=0),q.paused&&q.position>=0&&(!q._iO.serverURL||q.position>0))qa._wD(d+"Resuming from paused state",1),q.resume();else{if(q._iO=p(a,q._iO),(!q.isHTML5&&null!==q._iO.position&&q._iO.position>0||null!==q._iO.from&&q._iO.from>0||null!==q._iO.to)&&0===q.instanceCount&&0===q.playState&&!q._iO.serverURL){if(i=function(){q._iO=p(a,q._iO),q.play(q._iO)},q.isHTML5&&!q._html5_canplay?(qa._wD(d+"Beginning load for non-zero offset case"),q.load({_oncanplay:i}),t=!1):q.isHTML5||q.loaded||q.readyState&&2===q.readyState||(qa._wD(d+"Preloading for non-zero offset case"),q.load({onload:i}),t=!1),null!==t)return t;q._iO=j()}(!q.instanceCount||q._iO.multiShotEvents||q.isHTML5&&q._iO.multiShot&&!Sa||!q.isHTML5&&l>8&&!q.getAutoPlay())&&q.instanceCount++,q._iO.onposition&&0===q.playState&&h(q),q.playState=1,q.paused=!1,q.position=q._iO.position===b||isNaN(q._iO.position)?0:q._iO.position,q.isHTML5||(q._iO=U(T(q._iO))),q._iO.onplay&&c&&(q._iO.onplay.apply(q),r=!0),q.setVolume(q._iO.volume,!0),q.setPan(q._iO.pan,!0),q.isHTML5?q.instanceCount<2?(g(),f=q._setup_html5(),q.setPosition(q._iO.position),f.play()):(qa._wD(q.id+": Cloning Audio() for instance #"+q.instanceCount+"..."),k=new Audio(q._iO.url),m=function(){ha.remove(k,"ended",m),q._onfinish(q),ea(k),k=null},n=function(){ha.remove(k,"canplay",n);try{k.currentTime=q._iO.position/fb}catch(a){V(q.id+": multiShot play() failed to apply position of "+q._iO.position/fb)}k.play()},ha.add(k,"ended",m),void 0!==q._iO.volume&&(k.volume=Math.max(0,Math.min(1,q._iO.volume/100))),q.muted&&(k.muted=!0),q._iO.position?ha.add(k,"canplay",n):k.play()):(s=sa._start(q.id,q._iO.loops||1,9===l?q.position:q.position/fb,q._iO.multiShot||!1),9!==l||s||(qa._wD(d+"No sound hardware, or 32-sound ceiling hit",2),q._iO.onplayerror&&q._iO.onplayerror.apply(q)))}return q},this.start=this.play,this.stop=function(a){var b,c=q._iO;return 1===q.playState&&(qa._wD(q.id+": stop()"),q._onbufferchange(0),q._resetOnPosition(0),q.paused=!1,q.isHTML5||(q.playState=0),i(),c.to&&q.clearOnPosition(c.to),q.isHTML5?q._a&&(b=q.position,q.setPosition(0),q.position=b,q._a.pause(),q.playState=0,q._onTimer(),f()):(sa._stop(q.id,a),c.serverURL&&q.unload()),q.instanceCount=0,q._iO={},c.onstop&&c.onstop.apply(q)),q},this.setAutoPlay=function(a){qa._wD(q.id+": Autoplay turned "+(a?"on":"off")),q._iO.autoPlay=a,q.isHTML5||(sa._setAutoPlay(q.id,a),a&&(q.instanceCount||1!==q.readyState||(q.instanceCount++,qa._wD(q.id+": Incremented instance count to "+q.instanceCount))))},this.getAutoPlay=function(){return q._iO.autoPlay},this.setPosition=function(a){a===b&&(a=0);var c,d,e=q.isHTML5?Math.max(a,0):Math.min(q.duration||q._iO.duration,Math.max(a,0));if(q.position=e,d=q.position/fb,q._resetOnPosition(q.position),q._iO.position=e,q.isHTML5){if(q._a){if(q._html5_canplay){if(q._a.currentTime!==d){qa._wD(q.id+": setPosition("+d+")");try{q._a.currentTime=d,(0===q.playState||q.paused)&&q._a.pause()}catch(f){qa._wD(q.id+": setPosition("+d+") failed: "+f.message,2)}}}else if(d)return qa._wD(q.id+": setPosition("+d+"): Cannot seek yet, sound not ready",2),q;q.paused&&q._onTimer(!0)}}else c=9===l?q.position:d,q.readyState&&2!==q.readyState&&sa._setPosition(q.id,c,q.paused||!q.playState,q._iO.multiShot);return q},this.pause=function(a){return q.paused||0===q.playState&&1!==q.readyState?q:(qa._wD(q.id+": pause()"),q.paused=!0,q.isHTML5?(q._setup_html5().pause(),f()):(a||a===b)&&sa._pause(q.id,q._iO.multiShot),q._iO.onpause&&q._iO.onpause.apply(q),q)},this.resume=function(){var a=q._iO;return q.paused?(qa._wD(q.id+": resume()"),q.paused=!1,q.playState=1,q.isHTML5?(q._setup_html5().play(),g()):(a.isMovieStar&&!a.serverURL&&q.setPosition(q.position),sa._pause(q.id,a.multiShot)),!r&&a.onplay?(a.onplay.apply(q),r=!0):a.onresume&&a.onresume.apply(q),q):q},this.togglePause=function(){return qa._wD(q.id+": togglePause()"),0===q.playState?(q.play({position:9!==l||q.isHTML5?q.position/fb:q.position}),q):(q.paused?q.resume():q.pause(),q)},this.setPan=function(a,c){return a===b&&(a=0),c===b&&(c=!1),q.isHTML5||sa._setPan(q.id,a),q._iO.pan=a,c||(q.pan=a,q.options.pan=a),q},this.setVolume=function(a,c){return a===b&&(a=100),c===b&&(c=!1),q.isHTML5?q._a&&(qa.muted&&!q.muted&&(q.muted=!0,q._a.muted=!0),q._a.volume=Math.max(0,Math.min(1,a/100))):sa._setVolume(q.id,qa.muted&&!q.muted||q.muted?0:a),q._iO.volume=a,c||(q.volume=a,q.options.volume=a),q},this.mute=function(){return q.muted=!0,q.isHTML5?q._a&&(q._a.muted=!0):sa._setVolume(q.id,0),q},this.unmute=function(){q.muted=!1;var a=q._iO.volume!==b;return q.isHTML5?q._a&&(q._a.muted=!1):sa._setVolume(q.id,a?q._iO.volume:q.options.volume),q},this.toggleMute=function(){return q.muted?q.unmute():q.mute()},this.onPosition=function(a,c,d){return s.push({position:parseInt(a,10),method:c,scope:d!==b?d:q,fired:!1}),q},this.onposition=this.onPosition,this.clearOnPosition=function(a,b){var c;if(a=parseInt(a,10),isNaN(a))return!1;for(c=0;c<s.length;c++)a===s[c].position&&(b&&b!==s[c].method||(s[c].fired&&t--,s.splice(c,1)))},this._processOnPosition=function(){var a,b,c=s.length;if(!c||!q.playState||t>=c)return!1;for(a=c-1;a>=0;a--)b=s[a],!b.fired&&q.position>=b.position&&(b.fired=!0,t++,b.method.apply(b.scope,[b.position]),c=s.length);return!0},this._resetOnPosition=function(a){var b,c,d=s.length;if(!d)return!1;for(b=d-1;b>=0;b--)c=s[b],c.fired&&a<=c.position&&(c.fired=!1,t--);return!0},j=function(){var a,b,c=q._iO,d=c.from,e=c.to;return b=function(){qa._wD(q.id+': "To" time of '+e+" reached."),q.clearOnPosition(e,b),q.stop()},a=function(){qa._wD(q.id+': Playing "from" '+d),null===e||isNaN(e)||q.onPosition(e,b)},null===d||isNaN(d)||(c.position=d,c.multiShot=!1,a()),c},h=function(){var a,b=q._iO.onposition;if(b)for(a in b)b.hasOwnProperty(a)&&q.onPosition(parseInt(a,10),b[a])},i=function(){var a,b=q._iO.onposition;if(b)for(a in b)b.hasOwnProperty(a)&&q.clearOnPosition(parseInt(a,10))},g=function(){q.isHTML5&&X(q)},f=function(){q.isHTML5&&Y(q)},c=function(a){a||(s=[],t=0),r=!1,q._hasTimer=null,q._a=null,q._html5_canplay=!1,q.bytesLoaded=null,q.bytesTotal=null,q.duration=q._iO&&q._iO.duration?q._iO.duration:null,q.durationEstimate=null,q.buffered=[],q.eqData=[],q.eqData.left=[],q.eqData.right=[],q.failures=0,q.isBuffering=!1,q.instanceOptions={},q.instanceCount=0,q.loaded=!1,q.metadata={},q.readyState=0,q.muted=!1,q.paused=!1,q.peakData={left:0,right:0},q.waveformData={left:[],right:[]},q.playState=0,q.position=null,q.id3={}},c(),this._onTimer=function(a){var b,c,d=!1,e={};return q._hasTimer||a?(q._a&&(a||(q.playState>0||1===q.readyState)&&!q.paused)&&(b=q._get_html5_duration(),b!==k.duration&&(k.duration=b,q.duration=b,d=!0),q.durationEstimate=q.duration,c=q._a.currentTime*fb||0,c!==k.time&&(k.time=c,d=!0),(d||a)&&q._whileplaying(c,e,e,e,e)),d):void 0},this._get_html5_duration=function(){var a=q._iO,b=q._a&&q._a.duration?q._a.duration*fb:a&&a.duration?a.duration:null,c=b&&!isNaN(b)&&b!==1/0?b:null;return c},this._apply_loop=function(a,b){!a.loop&&b>1&&qa._wD("Note: Native HTML5 looping is infinite.",1),a.loop=b>1?"loop":""},this._setup_html5=function(a){var b,e=p(q._iO,a),f=Sa?ra:q._a,g=decodeURI(e.url);if(Sa?g===decodeURI(ia)&&(b=!0):g===decodeURI(u)&&(b=!0),f){if(f._s)if(Sa)f._s&&f._s.playState&&!b&&f._s.stop();else if(!Sa&&g===decodeURI(u))return q._apply_loop(f,e.loops),f;b||(u&&c(!1),f.src=e.url,q.url=e.url,u=e.url,ia=e.url,f._called_load=!1)}else e.autoLoad||e.autoPlay?(q._a=new Audio(e.url),q._a.load()):q._a=Za&&opera.version()<10?new Audio(null):new Audio,f=q._a,f._called_load=!1,Sa&&(ra=f);return q.isHTML5=!0,q._a=f,f._s=q,d(),q._apply_loop(f,e.loops),e.autoLoad||e.autoPlay?q.load():(f.autobuffer=!1,f.preload="auto"),f},d=function(){function a(a,b,c){return q._a?q._a.addEventListener(a,b,c||!1):null}if(q._a._added_events)return!1;var b;q._a._added_events=!0;for(b in ma)ma.hasOwnProperty(b)&&a(b,ma[b]);return!0},e=function(){function a(a,b,c){return q._a?q._a.removeEventListener(a,b,c||!1):null}var b;qa._wD(q.id+": Removing event listeners"),q._a._added_events=!1;for(b in ma)ma.hasOwnProperty(b)&&a(b,ma[b])},this._onload=function(a){var b,c=!!a||!q.isHTML5&&8===l&&q.duration;return b=q.id+": ",qa._wD(b+(c?"onload()":"Failed to load / invalid sound?"+(q.duration?" -":" Zero-length duration reported.")+" ("+q.url+")"),c?1:2),c||q.isHTML5||(qa.sandbox.noRemote===!0&&qa._wD(b+O("noNet"),1),qa.sandbox.noLocal===!0&&qa._wD(b+O("noLocal"),1)),q.loaded=c,q.readyState=c?3:2,q._onbufferchange(0),q._iO.onload&&pa(q,function(){q._iO.onload.apply(q,[c])}),!0},this._onbufferchange=function(a){return 0===q.playState?!1:a&&q.isBuffering||!a&&!q.isBuffering?!1:(q.isBuffering=1===a,q._iO.onbufferchange&&(qa._wD(q.id+": Buffer state change: "+a),q._iO.onbufferchange.apply(q,[a])),!0)},this._onsuspend=function(){return q._iO.onsuspend&&(qa._wD(q.id+": Playback suspended"),q._iO.onsuspend.apply(q)),!0},this._onfailure=function(a,b,c){q.failures++,qa._wD(q.id+": Failure ("+q.failures+"): "+a),q._iO.onfailure&&1===q.failures?q._iO.onfailure(a,b,c):qa._wD(q.id+": Ignoring failure")},this._onwarning=function(a,b,c){q._iO.onwarning&&q._iO.onwarning(a,b,c)},this._onfinish=function(){var a=q._iO.onfinish;q._onbufferchange(0),q._resetOnPosition(0),q.instanceCount&&(q.instanceCount--,q.instanceCount||(i(),q.playState=0,q.paused=!1,q.instanceCount=0,q.instanceOptions={},q._iO={},f(),q.isHTML5&&(q.position=0)),(!q.instanceCount||q._iO.multiShotEvents)&&a&&(qa._wD(q.id+": onfinish()"),pa(q,function(){a.apply(q)})))},this._whileloading=function(a,b,c,d){var e=q._iO;q.bytesLoaded=a,q.bytesTotal=b,q.duration=Math.floor(c),q.bufferLength=d,q.isHTML5||e.isMovieStar?q.durationEstimate=q.duration:e.duration?q.durationEstimate=q.duration>e.duration?q.duration:e.duration:q.durationEstimate=parseInt(q.bytesTotal/q.bytesLoaded*q.duration,10),q.isHTML5||(q.buffered=[{start:0,end:q.duration}]),(3!==q.readyState||q.isHTML5)&&e.whileloading&&e.whileloading.apply(q)},this._whileplaying=function(a,c,d,e,f){var g,h=q._iO;return isNaN(a)||null===a?!1:(q.position=Math.max(0,a),q._processOnPosition(),!q.isHTML5&&l>8&&(h.usePeakData&&c!==b&&c&&(q.peakData={left:c.leftPeak,right:c.rightPeak}),h.useWaveformData&&d!==b&&d&&(q.waveformData={left:d.split(","),right:e.split(",")}),h.useEQData&&f!==b&&f&&f.leftEQ&&(g=f.leftEQ.split(","),q.eqData=g,q.eqData.left=g,f.rightEQ!==b&&f.rightEQ&&(q.eqData.right=f.rightEQ.split(",")))),1===q.playState&&(q.isHTML5||8!==l||q.position||!q.isBuffering||q._onbufferchange(0),h.whileplaying&&h.whileplaying.apply(q)),!0)},this._oncaptiondata=function(a){qa._wD(q.id+": Caption data received."),q.captiondata=a,q._iO.oncaptiondata&&q._iO.oncaptiondata.apply(q,[a])},this._onmetadata=function(a,b){qa._wD(q.id+": Metadata received.");var c,d,e={};for(c=0,d=a.length;d>c;c++)e[a[c]]=b[c];q.metadata=e,console.log("updated metadata",q.metadata),q._iO.onmetadata&&q._iO.onmetadata.call(q,q.metadata)},this._onid3=function(a,b){qa._wD(q.id+": ID3 data received.");var c,d,e=[];for(c=0,d=a.length;d>c;c++)e[a[c]]=b[c];q.id3=p(q.id3,e),q._iO.onid3&&q._iO.onid3.apply(q)},this._onconnect=function(a){a=1===a,qa._wD(q.id+": "+(a?"Connected.":"Failed to connect? - "+q.url),a?1:2),q.connected=a,a&&(q.failures=0,W(q.id)&&(q.getAutoPlay()?q.play(b,q.getAutoPlay()):q._iO.autoLoad&&q.load()),q._iO.onconnect&&q._iO.onconnect.apply(q,[a]))},this._ondataerror=function(a){q.playState>0&&(qa._wD(q.id+": Data error: "+a),q._iO.ondataerror&&q._iO.ondataerror.apply(q))},this._debug()},G=function(){return ya.body||ya.getElementsByTagName("div")[0]},h=function(a){return ya.getElementById(a)},p=function(a,c){var d,e,f=a||{};d=c===b?qa.defaultOptions:c;for(e in d)d.hasOwnProperty(e)&&f[e]===b&&("object"!=typeof d[e]||null===d[e]?f[e]=d[e]:f[e]=p(f[e],d[e]));return f},pa=function(b,c){b.isHTML5||8!==l?c():a.setTimeout(c,0)},r={onready:1,ontimeout:1,defaultOptions:1,flash9Options:1,movieStarOptions:1},q=function(a,c){var d,e=!0,f=c!==b,g=qa.setupOptions,h=r;if(a===b){e=[];for(d in g)g.hasOwnProperty(d)&&e.push(d);for(d in h)h.hasOwnProperty(d)&&("object"==typeof qa[d]?e.push(d+": {...}"):qa[d]instanceof Function?e.push(d+": function() {...}"):e.push(d));return qa._wD(O("setup",e.join(", "))),!1}for(d in a)if(a.hasOwnProperty(d))if("object"!=typeof a[d]||null===a[d]||a[d]instanceof Array||a[d]instanceof RegExp)f&&h[c]!==b?qa[c][d]=a[d]:g[d]!==b?(qa.setupOptions[d]=a[d],qa[d]=a[d]):h[d]===b?(V(O(qa[d]===b?"setupUndef":"setupError",d),2),e=!1):qa[d]instanceof Function?qa[d].apply(qa,a[d]instanceof Array?a[d]:[a[d]]):qa[d]=a[d];else{if(h[d]!==b)return q(a[d],d);V(O(qa[d]===b?"setupUndef":"setupError",d),2),e=!1}return e},ha=function(){function b(a){var b=Ra.call(a),c=b.length;return f?(b[1]="on"+b[1],c>3&&b.pop()):3===c&&b.push(!1),b}function c(a,b){var c=a.shift(),d=[g[b]];f?c[d](a[0],a[1]):c[d].apply(c,a)}function d(){c(b(arguments),"add")}function e(){c(b(arguments),"remove")}var f=a.attachEvent,g={add:f?"attachEvent":"addEventListener",remove:f?"detachEvent":"removeEventListener"};return{add:d,remove:e}}(),ma={abort:f(function(){qa._wD(this._s.id+": abort")}),canplay:f(function(){var a,c=this._s;if(c._html5_canplay)return!0;if(c._html5_canplay=!0,qa._wD(c.id+": canplay"),c._onbufferchange(0),a=c._iO.position===b||isNaN(c._iO.position)?null:c._iO.position/fb,this.currentTime!==a){qa._wD(c.id+": canplay: Setting position to "+a);try{this.currentTime=a}catch(d){qa._wD(c.id+": canplay: Setting position of "+a+" failed: "+d.message,2)}}c._iO._oncanplay&&c._iO._oncanplay()}),canplaythrough:f(function(){var a=this._s;a.loaded||(a._onbufferchange(0),a._whileloading(a.bytesLoaded,a.bytesTotal,a._get_html5_duration()),a._onload(!0))}),durationchange:f(function(){var a,b=this._s;a=b._get_html5_duration(),isNaN(a)||a===b.duration||(qa._wD(this._s.id+": durationchange ("+a+")"+(b.duration?", previously "+b.duration:"")),b.durationEstimate=b.duration=a)}),ended:f(function(){var a=this._s;qa._wD(a.id+": ended"),a._onfinish()}),error:f(function(){qa._wD(this._s.id+": HTML5 error, code "+this.error.code),this._s._onload(!1)}),loadeddata:f(function(){var a=this._s;qa._wD(a.id+": loadeddata"),a._loaded||Ya||(a.duration=a._get_html5_duration())}),loadedmetadata:f(function(){qa._wD(this._s.id+": loadedmetadata")}),loadstart:f(function(){qa._wD(this._s.id+": loadstart"),this._s._onbufferchange(1)}),play:f(function(){this._s._onbufferchange(0)}),playing:f(function(){qa._wD(this._s.id+": playing "+String.fromCharCode(9835)),this._s._onbufferchange(0)}),progress:f(function(a){var b,c,d,e=this._s,f=0,g="progress"===a.type,h=a.target.buffered,i=a.loaded||0,j=a.total||1;if(e.buffered=[],h&&h.length){for(b=0,c=h.length;c>b;b++)e.buffered.push({start:h.start(b)*fb,end:h.end(b)*fb});if(f=(h.end(0)-h.start(0))*fb,i=Math.min(1,f/(a.target.duration*fb)),g&&h.length>1){for(d=[],c=h.length,b=0;c>b;b++)d.push(a.target.buffered.start(b)*fb+"-"+a.target.buffered.end(b)*fb);qa._wD(this._s.id+": progress, timeRanges: "+d.join(", "))}g&&!isNaN(i)&&qa._wD(this._s.id+": progress, "+Math.floor(100*i)+"% loaded")}isNaN(i)||(e._whileloading(i,j,e._get_html5_duration()),i&&j&&i===j&&ma.canplaythrough.call(this,a))}),ratechange:f(function(){qa._wD(this._s.id+": ratechange")}),suspend:f(function(a){var b=this._s;qa._wD(this._s.id+": suspend"),ma.progress.call(this,a),b._onsuspend()}),stalled:f(function(){qa._wD(this._s.id+": stalled")}),timeupdate:f(function(){this._s._onTimer()}),waiting:f(function(){var a=this._s;qa._wD(this._s.id+": waiting"),a._onbufferchange(1)})},ba=function(a){var b;return b=a&&(a.type||a.url||a.serverURL)?a.serverURL||a.type&&e(a.type)?!1:a.type?ca({type:a.type}):ca({url:a.url})||qa.html5Only||a.url.match(/data\:/i):!1},ea=function(a){var b;return a&&(b=Ya?gb:qa.html5.canPlayType("audio/wav")?hb:gb,a.src=b,void 0!==a._called_unload&&(a._called_load=!1)),Sa&&(ia=null),b},ca=function(a){if(!qa.useHTML5Audio||!qa.hasHTML5)return!1;var c,d,f,g,h=a.url||null,i=a.type||null,j=qa.audioFormats;if(i&&qa.html5[i]!==b)return qa.html5[i]&&!e(i);if(!da){da=[];for(g in j)j.hasOwnProperty(g)&&(da.push(g),j[g].related&&(da=da.concat(j[g].related)));da=new RegExp("\\.("+da.join("|")+")(\\?.*)?$","i")}return f=h?h.toLowerCase().match(da):null,f&&f.length?f=f[1]:i?(d=i.indexOf(";"),f=(-1!==d?i.substr(0,d):i).substr(6)):c=!1,f&&qa.html5[f]!==b?c=qa.html5[f]&&!e(f):(i="audio/"+f,c=qa.html5.canPlayType({type:i}),qa.html5[f]=c,c=c&&qa.html5[i]&&!e(i)),c},ga=function(){function a(a){var b,c,d=!1,e=!1;if(!g||"function"!=typeof g.canPlayType)return d;if(a instanceof Array){for(f=0,c=a.length;c>f;f++)(qa.html5[a[f]]||g.canPlayType(a[f]).match(qa.html5Test))&&(e=!0,qa.html5[a[f]]=!0,qa.flash[a[f]]=!!a[f].match(eb));d=e}else b=g&&"function"==typeof g.canPlayType?g.canPlayType(a):!1,d=!(!b||!b.match(qa.html5Test));return d}if(!qa.useHTML5Audio||!qa.hasHTML5)return qa.html5.usingFlash=!0,Qa=!0,!1;var c,d,e,f,g=Audio!==b?Za&&opera.version()<10?new Audio(null):new Audio:null,h={};e=qa.audioFormats;for(c in e)if(e.hasOwnProperty(c)&&(d="audio/"+c,h[c]=a(e[c].type),h[d]=h[c],c.match(eb)?(qa.flash[c]=!0,qa.flash[d]=!0):(qa.flash[c]=!1,qa.flash[d]=!1),e[c]&&e[c].related))for(f=e[c].related.length-1;f>=0;f--)h["audio/"+e[c].related[f]]=h[c],qa.html5[e[c].related[f]]=h[c],qa.flash[e[c].related[f]]=h[c];return h.canPlayType=g?a:null, +qa.html5=p(qa.html5,h),qa.html5.usingFlash=aa(),Qa=qa.html5.usingFlash,!0},A={notReady:"Unavailable - wait until onready() has fired.",notOK:"Audio support is not available.",domError:ta+"exception caught while appending SWF to DOM.",spcWmode:"Removing wmode, preventing known SWF loading issue(s)",swf404:ua+"Verify that %s is a valid path.",tryDebug:"Try "+ta+".debugFlash = true for more security details (output goes to SWF.)",checkSWF:"See SWF output for more debug info.",localFail:ua+"Non-HTTP page ("+ya.location.protocol+" URL?) Review Flash player security settings for this special case:\nhttp://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html\nMay need to add/allow path, e.g. c:/sm2/ or /users/me/sm2/",waitFocus:ua+"Special case: Waiting for SWF to load with window focus...",waitForever:ua+"Waiting indefinitely for Flash (will recover if unblocked)...",waitSWF:ua+"Waiting for 100% SWF load...",needFunction:ua+"Function object expected for %s",badID:'Sound ID "%s" should be a string, starting with a non-numeric character',currentObj:ua+"_debug(): Current sound objects",waitOnload:ua+"Waiting for window.onload()",docLoaded:ua+"Document already loaded",onload:ua+"initComplete(): calling soundManager.onload()",onloadOK:ta+".onload() complete",didInit:ua+"init(): Already called?",secNote:"Flash security note: Network/internet URLs will not load due to security restrictions. Access can be configured via Flash Player Global Security Settings Page: http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html",badRemove:ua+"Failed to remove Flash node.",shutdown:ta+".disable(): Shutting down",queue:ua+"Queueing %s handler",smError:"SMSound.load(): Exception: JS-Flash communication failed, or JS error.",fbTimeout:"No flash response, applying ."+R.swfTimedout+" CSS...",fbLoaded:"Flash loaded",fbHandler:ua+"flashBlockHandler()",manURL:"SMSound.load(): Using manually-assigned URL",onURL:ta+".load(): current URL already assigned.",badFV:ta+'.flashVersion must be 8 or 9. "%s" is invalid. Reverting to %s.',as2loop:"Note: Setting stream:false so looping can work (flash 8 limitation)",noNSLoop:"Note: Looping not implemented for MovieStar formats",needfl9:"Note: Switching to flash 9, required for MP4 formats.",mfTimeout:"Setting flashLoadTimeout = 0 (infinite) for off-screen, mobile flash case",needFlash:ua+"Fatal error: Flash is needed to play some required formats, but is not available.",gotFocus:ua+"Got window focus.",policy:"Enabling usePolicyFile for data access",setup:ta+".setup(): allowed parameters: %s",setupError:ta+'.setup(): "%s" cannot be assigned with this method.',setupUndef:ta+'.setup(): Could not find option "%s"',setupLate:ta+".setup(): url, flashVersion and html5Test property changes will not take effect until reboot().",noURL:ua+"Flash URL required. Call soundManager.setup({url:...}) to get started.",sm2Loaded:"SoundManager 2: Ready. "+String.fromCharCode(10003),reset:ta+".reset(): Removing event callbacks",mobileUA:"Mobile UA detected, preferring HTML5 by default.",globalHTML5:"Using singleton HTML5 Audio() pattern for this device."},O=function(){var a,b,c,d,e;if(a=Ra.call(arguments),d=a.shift(),e=A&&A[d]?A[d]:"",e&&a&&a.length)for(b=0,c=a.length;c>b;b++)e=e.replace("%s",a[b]);return e},T=function(a){return 8===l&&a.loops>1&&a.stream&&(n("as2loop"),a.stream=!1),a},U=function(a,b){return a&&!a.usePolicyFile&&(a.onid3||a.usePeakData||a.useWaveformData||a.useEQData)&&(qa._wD((b||"")+O("policy")),a.usePolicyFile=!0),a},V=function(a){ab&&console.warn!==b?console.warn(a):qa._wD(a)},i=function(){return!1},L=function(a){var b;for(b in a)a.hasOwnProperty(b)&&"function"==typeof a[b]&&(a[b]=i);b=null},M=function(a){a===b&&(a=!1),(Ea||a)&&qa.disable(a)},N=function(a){var b,c=null;if(a)if(a.match(/\.swf(\?.*)?$/i)){if(c=a.substr(a.toLowerCase().lastIndexOf(".swf?")+4))return a}else a.lastIndexOf("/")!==a.length-1&&(a+="/");return b=(a&&-1!==a.lastIndexOf("/")?a.substr(0,a.lastIndexOf("/")+1):"./")+qa.movieURL,qa.noSWFCache&&(b+="?ts="+(new Date).getTime()),b},y=function(){l=parseInt(qa.flashVersion,10),8!==l&&9!==l&&(qa._wD(O("badFV",l,Ia)),qa.flashVersion=l=Ia);var a=qa.debugMode||qa.debugFlash?"_debug.swf":".swf";qa.useHTML5Audio&&!qa.html5Only&&qa.audioFormats.mp4.required&&9>l&&(qa._wD(O("needfl9")),qa.flashVersion=l=9),qa.version=qa.versionNumber+(qa.html5Only?" (HTML5-only mode)":9===l?" (AS3/Flash 9)":" (AS2/Flash 8)"),l>8?(qa.defaultOptions=p(qa.defaultOptions,qa.flash9Options),qa.features.buffering=!0,qa.defaultOptions=p(qa.defaultOptions,qa.movieStarOptions),qa.filePatterns.flash9=new RegExp("\\.(mp3|"+lb.join("|")+")(\\?.*)?$","i"),qa.features.movieStar=!0):qa.features.movieStar=!1,qa.filePattern=qa.filePatterns[8!==l?"flash9":"flash8"],qa.movieURL=(8===l?"soundmanager2.swf":"soundmanager2_flash9.swf").replace(".swf",a),qa.features.peakData=qa.features.waveformData=qa.features.eqData=l>8},J=function(a,b){return sa?void sa._setPolling(a,b):!1},K=function(){if(qa.debugURLParam.test(xa)&&(qa.debugMode=!0),h(qa.debugID))return!1;var a,b,c,d,e;if(qa.debugMode&&!h(qa.debugID)&&(!ab||!qa.useConsole||!qa.consoleOnly)){a=ya.createElement("div"),a.id=qa.debugID+"-toggle",d={position:"fixed",bottom:"0px",right:"0px",width:"1.2em",height:"1.2em",lineHeight:"1.2em",margin:"2px",textAlign:"center",border:"1px solid #999",cursor:"pointer",background:"#fff",color:"#333",zIndex:10001},a.appendChild(ya.createTextNode("-")),a.onclick=S,a.title="Toggle SM2 debug console",wa.match(/msie 6/i)&&(a.style.position="absolute",a.style.cursor="hand");for(e in d)d.hasOwnProperty(e)&&(a.style[e]=d[e]);if(b=ya.createElement("div"),b.id=qa.debugID,b.style.display=qa.debugMode?"block":"none",qa.debugMode&&!h(a.id)){try{c=G(),c.appendChild(a)}catch(f){throw new Error(O("domError")+" \n"+f.toString())}c.appendChild(b)}}c=null},W=this.getSoundById,n=function(a,b){return a?qa._wD(O(a),b):""},S=function(){var a=h(qa.debugID),b=h(qa.debugID+"-toggle");return a?(Aa?(b.innerHTML="+",a.style.display="none"):(b.innerHTML="-",a.style.display="block"),void(Aa=!Aa)):!1},m=function(c,d,e){if(a.sm2Debugger!==b)try{sm2Debugger.handleEvent(c,d,e)}catch(f){return!1}return!0},Q=function(){var a=[];return qa.debugMode&&a.push(R.sm2Debug),qa.debugFlash&&a.push(R.flashDebug),qa.useHighPerformance&&a.push(R.highPerf),a.join(" ")},P=function(){var a=O("fbHandler"),b=qa.getMoviePercent(),c=R,d={type:"FLASHBLOCK"};return qa.html5Only?!1:void(qa.ok()?(qa.didFlashBlock&&qa._wD(a+": Unblocked"),qa.oMC&&(qa.oMC.className=[Q(),c.swfDefault,c.swfLoaded+(qa.didFlashBlock?" "+c.swfUnblocked:"")].join(" "))):(Qa&&(qa.oMC.className=Q()+" "+c.swfDefault+" "+(null===b?c.swfTimedout:c.swfError),qa._wD(a+": "+O("fbTimeout")+(b?" ("+O("fbLoaded")+")":""))),qa.didFlashBlock=!0,t({type:"ontimeout",ignoreInit:!0,error:d}),I(d)))},s=function(a,c,d){za[a]===b&&(za[a]=[]),za[a].push({method:c,scope:d||null,fired:!1})},t=function(a){if(a||(a={type:qa.ok()?"onready":"ontimeout"}),!Da&&a&&!a.ignoreInit)return!1;if("ontimeout"===a.type&&(qa.ok()||Ea&&!a.ignoreInit))return!1;var b,c,d={success:a&&a.ignoreInit?qa.ok():!Ea},e=a&&a.type?za[a.type]||[]:[],f=[],g=[d],h=Qa&&!qa.ok();for(a.error&&(g[0].error=a.error),b=0,c=e.length;c>b;b++)e[b].fired!==!0&&f.push(e[b]);if(f.length)for(b=0,c=f.length;c>b;b++)f[b].scope?f[b].method.apply(f[b].scope,g):f[b].method.apply(this,g),h||(f[b].fired=!0);return!0},u=function(){a.setTimeout(function(){qa.useFlashBlock&&P(),t(),"function"==typeof qa.onload&&(n("onload",1),qa.onload.apply(a),n("onloadOK",1)),qa.waitForWindowLoad&&ha.add(a,"load",u)},1)},ka=function(){if(ja!==b)return ja;var c,d,e,f=!1,g=navigator,h=g.plugins,i=a.ActiveXObject;if(h&&h.length)d="application/x-shockwave-flash",e=g.mimeTypes,e&&e[d]&&e[d].enabledPlugin&&e[d].enabledPlugin.description&&(f=!0);else if(i!==b&&!wa.match(/MSAppHost/i)){try{c=new i("ShockwaveFlash.ShockwaveFlash")}catch(j){c=null}f=!!c,c=null}return ja=f,f},aa=function(){var a,b,c=qa.audioFormats,d=Ua&&!!wa.match(/os (1|2|3_0|3_1)\s/i);if(d?(qa.hasHTML5=!1,qa.html5Only=!0,qa.oMC&&(qa.oMC.style.display="none")):qa.useHTML5Audio&&(qa.html5&&qa.html5.canPlayType||(qa._wD("SoundManager: No HTML5 Audio() support detected."),qa.hasHTML5=!1),_a&&qa._wD(ua+"Note: Buggy HTML5 Audio in Safari on this OS X release, see https://bugs.webkit.org/show_bug.cgi?id=32159 - "+(ja?"will use flash fallback for MP3/MP4, if available":" would use flash fallback for MP3/MP4, but none detected."),1)),qa.useHTML5Audio&&qa.hasHTML5){_=!0;for(b in c)c.hasOwnProperty(b)&&c[b].required&&(qa.html5.canPlayType(c[b].type)?qa.preferFlash&&(qa.flash[b]||qa.flash[c[b].type])&&(a=!0):(_=!1,a=!0))}return qa.ignoreFlash&&(a=!1,_=!0),qa.html5Only=qa.hasHTML5&&qa.useHTML5Audio&&!a,!qa.html5Only},$=function(a){var b,c,d,e=0;if(a instanceof Array){for(b=0,c=a.length;c>b;b++)if(a[b]instanceof Object){if(qa.canPlayMIME(a[b].type)){e=b;break}}else if(qa.canPlayURL(a[b])){e=b;break}a[e].url&&(a[e]=a[e].url),d=a[e]}else d=a;return d},X=function(a){a._hasTimer||(a._hasTimer=!0,!$a&&qa.html5PollingInterval&&(null===Oa&&0===Na&&(Oa=setInterval(Z,qa.html5PollingInterval)),Na++))},Y=function(a){a._hasTimer&&(a._hasTimer=!1,!$a&&qa.html5PollingInterval&&Na--)},Z=function(){var a;if(null!==Oa&&!Na)return clearInterval(Oa),Oa=null,!1;for(a=qa.soundIDs.length-1;a>=0;a--)qa.sounds[qa.soundIDs[a]].isHTML5&&qa.sounds[qa.soundIDs[a]]._hasTimer&&qa.sounds[qa.soundIDs[a]]._onTimer()},I=function(c){c=c!==b?c:{},"function"==typeof qa.onerror&&qa.onerror.apply(a,[{type:c.type!==b?c.type:null}]),c.fatal!==b&&c.fatal&&qa.disable()},la=function(){if(!_a||!ka())return!1;var a,b,c=qa.audioFormats;for(b in c)if(c.hasOwnProperty(b)&&("mp3"===b||"mp4"===b)&&(qa._wD(ta+": Using flash fallback for "+b+" format"),qa.html5[b]=!1,c[b]&&c[b].related))for(a=c[b].related.length-1;a>=0;a--)qa.html5[c[b].related[a]]=!1},this._setSandboxType=function(a){var c=qa.sandbox;c.type=a,c.description=c.types[c.types[a]!==b?a:"unknown"],"localWithFile"===c.type?(c.noRemote=!0,c.noLocal=!1,n("secNote",2)):"localWithNetwork"===c.type?(c.noRemote=!1,c.noLocal=!0):"localTrusted"===c.type&&(c.noRemote=!1,c.noLocal=!1)},this._externalInterfaceOK=function(a){if(qa.swfLoaded)return!1;var b;return m("swf",!0),m("flashtojs",!0),qa.swfLoaded=!0,cb=!1,_a&&la(),a&&a.replace(/\+dev/i,"")===qa.versionNumber.replace(/\+dev/i,"")?void setTimeout(k,Wa?100:1):(b=ta+': Fatal: JavaScript file build "'+qa.versionNumber+'" does not match Flash SWF build "'+a+'" at '+qa.url+". Ensure both are up-to-date.",setTimeout(function(){throw new Error(b)},0),!1)},H=function(a,c){function d(){var a,b=[],c=[],d=" + ";a="SoundManager "+qa.version+(!qa.html5Only&&qa.useHTML5Audio?qa.hasHTML5?" + HTML5 audio":", no HTML5 audio support":""),qa.html5Only?qa.html5PollingInterval&&b.push("html5PollingInterval ("+qa.html5PollingInterval+"ms)"):(qa.preferFlash&&b.push("preferFlash"),qa.useHighPerformance&&b.push("useHighPerformance"),qa.flashPollingInterval&&b.push("flashPollingInterval ("+qa.flashPollingInterval+"ms)"),qa.html5PollingInterval&&b.push("html5PollingInterval ("+qa.html5PollingInterval+"ms)"),qa.wmode&&b.push("wmode ("+qa.wmode+")"),qa.debugFlash&&b.push("debugFlash"),qa.useFlashBlock&&b.push("flashBlock")),b.length&&(c=c.concat([b.join(d)])),qa._wD(a+(c.length?d+c.join(", "):""),1),na()}function e(a,b){return'<param name="'+a+'" value="'+b+'" />'}if(Ba&&Ca)return!1;if(qa.html5Only)return y(),d(),qa.oMC=h(qa.movieID),k(),Ba=!0,Ca=!0,!1;var f,g,i,j,l,m,n,o,p=c||qa.url,q=qa.altURL||p,r="JS/Flash audio component (SoundManager 2)",s=G(),t=Q(),u=null,v=ya.getElementsByTagName("html")[0];if(u=v&&v.dir&&v.dir.match(/rtl/i),a=a===b?qa.id:a,y(),qa.url=N(ib?p:q),c=qa.url,qa.wmode=!qa.wmode&&qa.useHighPerformance?"transparent":qa.wmode,null!==qa.wmode&&(wa.match(/msie 8/i)||!Wa&&!qa.useHighPerformance)&&navigator.platform.match(/win32|win64/i)&&(Pa.push(A.spcWmode),qa.wmode=null),f={name:a,id:a,src:c,quality:"high",allowScriptAccess:qa.allowScriptAccess,bgcolor:qa.bgColor,pluginspage:jb+"www.macromedia.com/go/getflashplayer",title:r,type:"application/x-shockwave-flash",wmode:qa.wmode,hasPriority:"true"},qa.debugFlash&&(f.FlashVars="debug=1"),qa.wmode||delete f.wmode,Wa)g=ya.createElement("div"),j=['<object id="'+a+'" data="'+c+'" type="'+f.type+'" title="'+f.title+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+jb+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0">',e("movie",c),e("AllowScriptAccess",qa.allowScriptAccess),e("quality",f.quality),qa.wmode?e("wmode",qa.wmode):"",e("bgcolor",qa.bgColor),e("hasPriority","true"),qa.debugFlash?e("FlashVars",f.FlashVars):"","</object>"].join("");else{g=ya.createElement("embed");for(i in f)f.hasOwnProperty(i)&&g.setAttribute(i,f[i])}if(K(),t=Q(),s=G())if(qa.oMC=h(qa.movieID)||ya.createElement("div"),qa.oMC.id)o=qa.oMC.className,qa.oMC.className=(o?o+" ":R.swfDefault)+(t?" "+t:""),qa.oMC.appendChild(g),Wa&&(l=qa.oMC.appendChild(ya.createElement("div")),l.className=R.swfBox,l.innerHTML=j),Ca=!0;else{if(qa.oMC.id=qa.movieID,qa.oMC.className=R.swfDefault+" "+t,m=null,l=null,qa.useFlashBlock||(qa.useHighPerformance?m={position:"fixed",width:"8px",height:"8px",bottom:"0px",left:"0px",overflow:"hidden"}:(m={position:"absolute",width:"6px",height:"6px",top:"-9999px",left:"-9999px"},u&&(m.left=Math.abs(parseInt(m.left,10))+"px"))),Xa&&(qa.oMC.style.zIndex=1e4),!qa.debugFlash)for(n in m)m.hasOwnProperty(n)&&(qa.oMC.style[n]=m[n]);try{Wa||qa.oMC.appendChild(g),s.appendChild(qa.oMC),Wa&&(l=qa.oMC.appendChild(ya.createElement("div")),l.className=R.swfBox,l.innerHTML=j),Ca=!0}catch(w){throw new Error(O("domError")+" \n"+w.toString())}}return Ba=!0,d(),!0},B=function(){return qa.html5Only?(H(),!1):sa?!1:qa.url?(sa=qa.getMovie(qa.id),sa||(Ja?(Wa?qa.oMC.innerHTML=Ka:qa.oMC.appendChild(Ja),Ja=null,Ba=!0):H(qa.id,qa.url),sa=qa.getMovie(qa.id)),"function"==typeof qa.oninitmovie&&setTimeout(qa.oninitmovie,1),oa(),!0):(n("noURL"),!1)},v=function(){setTimeout(w,1e3)},x=function(){a.setTimeout(function(){V(ua+"useFlashBlock is false, 100% HTML5 mode is possible. Rebooting with preferFlash: false..."),qa.setup({preferFlash:!1}).reboot(),qa.didFlashBlock=!0,qa.beginDelayedInit()},1)},w=function(){var b,c=!1;return qa.url?La?!1:(La=!0,ha.remove(a,"load",v),ja&&cb&&!bb?(n("waitFocus"),!1):(Da||(b=qa.getMoviePercent(),b>0&&100>b&&(c=!0)),void setTimeout(function(){return b=qa.getMoviePercent(),c?(La=!1,qa._wD(O("waitSWF")),a.setTimeout(v,1),!1):(Da||(qa._wD(ta+": No Flash response within expected time. Likely causes: "+(0===b?"SWF load failed, ":"")+"Flash blocked or JS-Flash security error."+(qa.debugFlash?" "+O("checkSWF"):""),2),!ib&&b&&(n("localFail",2),qa.debugFlash||n("tryDebug",2)),0===b&&qa._wD(O("swf404",qa.url),1),m("flashtojs",!1," (Check flash security or flash blockers)")),void(!Da&&db&&(null===b?qa.useFlashBlock||0===qa.flashLoadTimeout?(qa.useFlashBlock&&P(),n("waitForever")):!qa.useFlashBlock&&_?x():(n("waitForever"),t({type:"ontimeout",ignoreInit:!0,error:{type:"INIT_FLASHBLOCK"}})):0===qa.flashLoadTimeout?n("waitForever"):!qa.useFlashBlock&&_?x():M(!0))))},qa.flashLoadTimeout))):!1},z=function(){function b(){ha.remove(a,"focus",z)}return bb||!cb?(b(),!0):(db=!0,bb=!0,n("gotFocus"),La=!1,v(),b(),!0)},oa=function(){Pa.length&&(qa._wD("SoundManager 2: "+Pa.join(" "),1),Pa=[])},na=function(){oa();var a,b=[];if(qa.useHTML5Audio&&qa.hasHTML5){for(a in qa.audioFormats)qa.audioFormats.hasOwnProperty(a)&&b.push(a+" = "+qa.html5[a]+(!qa.html5[a]&&Qa&&qa.flash[a]?" (using flash)":qa.preferFlash&&qa.flash[a]&&Qa?" (preferring flash)":qa.html5[a]?"":" ("+(qa.audioFormats[a].required?"required, ":"")+"and no flash support)"));qa._wD("SoundManager 2 HTML5 support: "+b.join(", "),1)}},o=function(b){if(Da)return!1;if(qa.html5Only)return n("sm2Loaded",1),Da=!0,u(),m("onload",!0),!0;var c,d=qa.useFlashBlock&&qa.flashLoadTimeout&&!qa.getMoviePercent(),e=!0;return d||(Da=!0),c={type:!ja&&Qa?"NO_FLASH":"INIT_TIMEOUT"},qa._wD("SoundManager 2 "+(Ea?"failed to load":"loaded")+" ("+(Ea?"Flash security/load error":"OK")+") "+String.fromCharCode(Ea?10006:10003),Ea?2:1),Ea||b?(qa.useFlashBlock&&qa.oMC&&(qa.oMC.className=Q()+" "+(null===qa.getMoviePercent()?R.swfTimedout:R.swfError)),t({type:"ontimeout",error:c,ignoreInit:!0}),m("onload",!1),I(c),e=!1):m("onload",!0),Ea||(qa.waitForWindowLoad&&!Fa?(n("waitOnload"),ha.add(a,"load",u)):(qa.waitForWindowLoad&&Fa&&n("docLoaded"),u())),e},j=function(){var a,c=qa.setupOptions;for(a in c)c.hasOwnProperty(a)&&(qa[a]===b?qa[a]=c[a]:qa[a]!==c[a]&&(qa.setupOptions[a]=qa[a]))},k=function(){function b(){ha.remove(a,"load",qa.beginDelayedInit)}if(Da)return n("didInit"),!1;if(qa.html5Only)return Da||(b(),qa.enabled=!0,o()),!0;B();try{sa._externalInterfaceTest(!1),J(!0,qa.flashPollingInterval||(qa.useHighPerformance?10:50)),qa.debugMode||sa._disableDebug(),qa.enabled=!0,m("jstoflash",!0),qa.html5Only||ha.add(a,"unload",i)}catch(c){return qa._wD("js/flash exception: "+c.toString()),m("jstoflash",!1),I({type:"JS_TO_FLASH_EXCEPTION",fatal:!0}),M(!0),o(),!1}return o(),b(),!0},D=function(){return F?!1:(F=!0,j(),K(),function(){var a="sm2-usehtml5audio=",b="sm2-preferflash=",c=null,d=null,e=xa.toLowerCase();-1!==e.indexOf(a)&&(c="1"===e.charAt(e.indexOf(a)+a.length),ab&&console.log((c?"Enabling ":"Disabling ")+"useHTML5Audio via URL parameter"),qa.setup({useHTML5Audio:c})),-1!==e.indexOf(b)&&(d="1"===e.charAt(e.indexOf(b)+b.length),ab&&console.log((d?"Enabling ":"Disabling ")+"preferFlash via URL parameter"),qa.setup({preferFlash:d}))}(),!ja&&qa.hasHTML5&&(qa._wD("SoundManager 2: No Flash detected"+(qa.useHTML5Audio?". Trying HTML5-only mode.":", enabling HTML5."),1),qa.setup({useHTML5Audio:!0,preferFlash:!1})),ga(),!ja&&Qa&&(Pa.push(A.needFlash),qa.setup({flashLoadTimeout:1})),ya.removeEventListener&&ya.removeEventListener("DOMContentLoaded",D,!1),B(),!0)},fa=function(){return"complete"===ya.readyState&&(D(),ya.detachEvent("onreadystatechange",fa)),!0},E=function(){Fa=!0,D(),ha.remove(a,"load",E)},C=function(){$a&&((!qa.setupOptions.useHTML5Audio||qa.setupOptions.preferFlash)&&Pa.push(A.mobileUA),qa.setupOptions.useHTML5Audio=!0,qa.setupOptions.preferFlash=!1,(Ua||Va&&!wa.match(/android\s2\.3/i))&&(Pa.push(A.globalHTML5),Ua&&(qa.ignoreFlash=!0),Sa=!0))},C(),ka(),ha.add(a,"focus",z),ha.add(a,"load",v),ha.add(a,"load",E),ya.addEventListener?ya.addEventListener("DOMContentLoaded",D,!1):ya.attachEvent?ya.attachEvent("onreadystatechange",fa):(m("onload",!1),I({type:"NO_DOM2_EVENTS",fatal:!0}))}if(!a||!a.document)throw new Error("SoundManager requires a browser with window and document objects.");var d=null;void 0!==a.SM2_DEFER&&SM2_DEFER||(d=new c),"object"==typeof module&&module&&"object"==typeof module.exports?(a.soundManager=d,module.exports.SoundManager=c,module.exports.soundManager=d):"function"==typeof define&&define.amd?define("SoundManager",[],function(){return{SoundManager:c,soundManager:d}}):(a.SoundManager=c,a.soundManager=d)}(window),window.JST["apps/album/show/tpl/album_with_songs.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="album album--with-songs">\n <div class="region-album-side">\n <div class="region-album-meta"></div>\n </div>\n <div class="region-album-content">\n <div class="region-album-songs"></div>\n </div>\n</div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/album/show/tpl/details_meta.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="region-details-top">\n <div class="region-details-title">\n <h2><span class="title">')),d(this.label),d(b('</span> <span class="sub"><a href="#music/albums?year=')),d(this.year),d(b('">')),d(this.year),d(b("</a></span></h2>\n </div>\n ")),this.rating&&(d(b('\n <div class="region-details-rating">\n ')),d(this.rating),d(b(" <i></i>\n </div>\n "))),d(b('\n</div>\n\n<div class="region-details-meta-below">\n\n <ul class="meta">\n ')),this.artist&&(d(b("\n <li><label>")),d(tr("artist")),d(b(':</label> <span><a href="#music/artist/')),d(this.artistid),d(b('">')),d(this.artist),d(b("</a></span></li>\n "))),d(b("\n ")),this.genre.length>0&&(d(b("\n <li><label>")),d(t.ngettext("genre","genres",this.genre.length)),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("music/albums","genre",this.genre))),d(b("</span></li>\n "))),d(b("\n ")),this.style.length&&(d(b("\n <li><label>")),d(t.ngettext("style","styles",this.style.length)),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("music/albums","style",this.style))),d(b("</span></li>\n "))),d(b("\n ")),this.albumlabel&&(d(b("\n <li><label>")),d(tr("label")),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("music/albums","albumlabel",[this.albumlabel]))),d(b("</span></li>\n "))),d(b('\n </ul>\n\n <div class="description">')),d(this.description),d(b('</div>\n\n <ul class="inline-links">\n <li class="btn-flat-play play">')),d(tr("Play")),d(b('</li>\n <li class="btn-flat-add add">')),d(tr("Queue")),d(b('</li>\n <li class="btn-flat-stream localplay">')),d(tr("Stream")),d(b('</li>\n <li class="more-actions dropdown">\n <span class="btn-flat-more" data-toggle="dropdown" aria-expanded="true">')),d(tr("more")),d(b('</span>\n <ul class="dropdown-menu pull-right">\n <li class="localadd">')),d(tr("Add to playlist")),d(b('</li>\n <li class="divider"></li>\n <li class="dropdown-submenu internal-search">')),d(tr("Chorus Search")),d(b('\n <ul class="dropdown-menu">\n ')),d(b(helpers.entities.getAddonSearchMenuItems(this.label))),d(b('\n </ul>\n </li>\n <li class="dropdown-submenu external-search">')),d(tr("External Search")),d(b('\n <ul class="dropdown-menu">\n <li data-type="google" data-query="')),d(this.artist),d(b(" ")),d(this.label),d(b('">Google</li>\n <li data-type="soundcloud" data-query="')),d(this.artist),d(b('">SoundCloud</li>\n </ul>\n </li>\n <li class="youtube-search" data-query="')),d(this.artist),d(b(" ")),d(this.label),d(b('">')),d(tr("YouTube Search")),d(b('</li>\n <li class="divider"></li>\n <li class="edit">')),d(tr("Edit")),d(b("</li>\n </ul>\n </li>\n </ul>\n\n</div>\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/artist/show/tpl/details_meta.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="region-details-top">\n <div class="region-details-title">\n <h2>')),d(this.label),d(b('</h2>\n </div>\n</div>\n\n<div class="region-details-meta-below">\n\n <ul class="meta">\n ')),this.genre.length>0&&(d(b("\n <li><label>")),d(t.ngettext("genre","genres",this.genre.length)),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("music/artists","genre",this.genre))),d(b("</span></li>\n "))),d(b("\n ")),this.style.length&&(d(b("\n <li><label>")),d(t.ngettext("style","styles",this.style.length)),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("music/artists","style",this.style))),d(b("</span></li>\n "))),d(b("\n ")),this.formed&&(d(b("\n <li><label>")),d(tr("formed")),d(b(":</label> <span>")),d(this.formed),d(b("</span></li>\n "))),d(b("\n ")),this.yearsactive&&this.yearsactive.length>0&&(d(b("\n <li><label>")),d(tr("years active")),d(b(":</label> <span>")),d(this.yearsactive),d(b("</span></li>\n "))),d(b("\n ")),this.born&&(d(b("\n <li><label>")),d(tr("born")),d(b(":</label> <span>")),d(this.born),d(b("</span></li>\n "))),d(b("\n ")),this.died&&(d(b("\n <li><label>")),d(tr("died")),d(b(":</label> <span>")),d(this.died),d(b("</span></li>\n "))),d(b("\n ")),this.disbanded&&(d(b("\n <li><label>")),d(tr("disbanded")),d(b(":</label> <span>")),d(this.disbanded),d(b("</span></li>\n "))),d(b('\n </ul>\n\n <div class="description">')),d(this.description),d(b('</div>\n\n <ul class="inline-links">\n <li class="btn-flat-play play">')),d(tr("Play")),d(b('</li>\n <li class="btn-flat-add add">')),d(tr("Queue")),d(b('</li>\n <li class="btn-flat-stream localplay">')),d(tr("Stream")),d(b('</li>\n <li class="more-actions dropdown">\n <span class="btn-flat-more" data-toggle="dropdown" aria-expanded="true">')),d(tr("more")),d(b('</span>\n <ul class="dropdown-menu pull-right">\n <li class="localadd">')),d(tr("Add to playlist")),d(b('</li>\n <li class="divider"></li>\n <li class="dropdown-submenu internal-search">')),d(tr("Chorus Search")),d(b('\n <ul class="dropdown-menu">\n ')),d(b(helpers.entities.getAddonSearchMenuItems(this.label))),d(b('\n </ul>\n </li>\n <li class="dropdown-submenu external-search">')),d(tr("External Search")),d(b('\n <ul class="dropdown-menu">\n <li data-type="google" data-query="')),d(this.label),d(b('">Google</li>\n <li data-type="soundcloud" data-query="')),d(this.label),d(b('">SoundCloud</li>\n </ul>\n </li>\n <li class="youtube-search" data-query="')),d(this.label),d(b('">')),d(tr("YouTube Search")),d(b('</li>\n <li class="divider"></li>\n <li class="edit">')),d(tr("Edit")),d(b("</li>\n </ul>\n </li>\n </ul>\n\n</div>\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/browser/list/tpl/back_button.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<i class="mdi thumb"></i><div class="title">')),d(t.gettext("Back")),d(b("</div>"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/browser/list/tpl/file.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="thumb" style="background-image: url(\'')),d(this.thumbnail),d(b('\')"><div class="mdi play"></div></div>\n<div class="title" title="')),d(helpers.global.stripTags(this.label)),d(b('">')),d(b(this.label)),d(b('</div>\n<ul class="actions">\n <li class="menu dropdown">\n <i data-toggle="dropdown" class="mdi"></i>\n <ul class="dropdown-menu pull-right"></ul>\n </li>\n</ul>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/browser/list/tpl/folder_layout.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="folder-layout">\n <div class="loading-bar"><div class="inner"><div class="loader-small-inline"></div> <span>')),d(tr("Loading folder...")),d(b('</span></div></div>\n <div class="path"></div>\n <ul class="actions">\n <li class="dropdown sort-wrapper">\n <i class="sort-toggle" data-toggle="dropdown" title="')),d(tr("Sort")),d(b('"></i>\n <ul class="sorts dropdown-menu pull-right">\n <li data-sort="none">')),d(tr("default")),d(b('<i></i></li>\n <li data-sort="label">')),d(tr("title")),d(b('<i></i></li>\n <li data-sort="dateadded">')),d(tr("date added")),d(b('<i></i></li>\n <li data-sort="random">')),d(tr("random")),d(b('<i></i></li>\n </ul>\n </li>\n <li class="dropdown context-wrapper">\n <i class="context-toggle" data-toggle="dropdown" title="')),d(tr("Actions")),d(b('"></i>\n <ul class="dropdown-menu pull-right">\n <li class="play">')),d(tr("play files")),d(b('<i></i></li>\n <li class="queue">')),d(tr("queue files")),d(b('<i></i></li>\n </ul>\n </li>\n </ul>\n\n\n <div class="folder-container">\n <div class="files">\n </div>\n <div class="folders-pane">\n <div class="back"></div>\n <div class="folders">\n <div class="intro">\n <h3><span class="mdi-navigation-arrow-back text-dim"></span> ')),d(tr("Browse files and add-ons")),d(b("</h3>\n <p>")),d(tr("This is where you can browse all Kodi content, not just what is in the library. Browse by source or add-on.")),d(b("</p>\n </div>\n </div>\n </div>\n </div>\n</div>"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/browser/list/tpl/path.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="title">')),d(this.label),d(b("</div>"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/browser/list/tpl/source.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="source source-')),d(this.media),d(b('">\n ')),d(this.label),d(b("\n</div>"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/browser/list/tpl/source_set.jst"]=function(a){ +var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("<h3>")),d(this.label),d(b('</h3>\n<ul class="sources"></ul>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/cast/list/tpl/cast.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<a href="#')),d(this.origin),d(b("?cast=")),d(this.name),d(b('" title="')),d(this.name),d(b(" (")),d(this.role),d(b(')">\n <div class="thumb">\n <img src="')),d(this.thumbnail),d(b('" />\n </div>\n <div class="meta">\n <strong>')),d(this.name),d(b('</strong>\n <span title="')),d(this.role),d(b('">')),d(this.role),d(b('</span>\n </div>\n</a>\n<ul class="actions">\n <li class="imdb" title="IMDb search ')),d(this.name),d(b('"></li>\n <li class="google" title="Google search ')),d(this.name),d(b('"></li>\n</ul>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/category/list/tpl/item.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<a href="#')),d(this.url),d(b('">\n <span>')),d(this.title),d(b("</span>\n</a>"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/epg/list/tpl/channel.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("<h3>")),d(this.channel),d(b('</h3>\n<ul class="items">\n <li class="play">')),d(tr("Play")),d(b('</li>\n <li class="record">')),d(tr("Record")),d(b("</li>\n</ul>"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/epg/list/tpl/programme.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="title">\n <strong>')),d(this.label),d(b('</strong>\n</div>\n<div class="date">\n ')),d(this.start.toString("h:mmtt").toLowerCase()),d(b(" - ")),d(this.end.toString("h:mmtt").toLowerCase()),d(b(" (")),d(this.runtime),d(b("min)<br />\n ")),d(this.start.toString("dddd, dS MMM")),d(b('\n</div>\n<div class="plot">')),d(this.plot),d(b('</div>\n<div class="entity-progress">\n <div class="current-progress" style="width: ')),d(this.progresspercentage),d(b('%" title="')),d(Math.round(this.progresspercentage)),d(b("% ")),d(tr("complete")),d(b('"></div>\n</div>\n<ul class="actions">\n ')),this.isactive?(d(b('\n <li class="play" title="')),d(tr("Play")),d(b('"></li>\n <li class="record" title="')),d(tr("Record")),d(b('"></li>\n '))):(d(b("\n ")),this.wasactive||(d(b('\n <li class="toggle-timer" title="')),d(tr("Toggle timer")),d(b('"></li>\n '))),d(b("\n "))),d(b("\n</ul>"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/external/youtube/tpl/youtube.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<img src="')),d(this.thumbnail),d(b('" class="thumb" />\n<h3>')),d(this.title),d(b("</h3>\n")),d(this.addonEnabled?b('\n <span class="play flat-btn action">Play in Kodi</span>\n <span class="localplay flat-btn action">Play in browser</span>\n'):b('\n <span class="play flat-btn action">Play in browser</span>\n')),d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/filter/show/tpl/filter_options.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="options-search-wrapper">\n <input class="options-search" value="" />\n</div>\n<div class="deselect-all">')),d(t.gettext("Deselect all")),d(b('</div>\n<ul class="selection-list"></ul>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/filter/show/tpl/filters_bar.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<span class="filters-active-all">')),d(this.filters),d(b('</span><i class="remove"></i>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/filter/show/tpl/filters_ui.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="filters-container">\n\n <div class="filters-current filter-pane">\n <div class="nav-section"></div>\n\n <h3 class="open-filters">')),d(t.gettext("Filters")),d(b('<i></i></h3>\n <div class="filters-active"></div>\n\n <h3>')),d(t.gettext("Sort")),d(b('</h3>\n <div class="list sort-options"></div>\n </div>\n\n <div class="filters-page filter-pane">\n <h3 class="close-filters">')),d(t.gettext("Select a filter")),d(b('</h3>\n <div class="list filters-list"></div>\n </div>\n\n <div class="filters-options filter-pane">\n <h3 class="close-options">')),d(t.gettext("Select an option")),d(b('</h3>\n <div class="list filter-options-list"></div>\n </div>\n\n</div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/filter/show/tpl/list_item.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b(this.title))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/help/overview/tpl/overview.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("<h1>")),d(tr("About Chorus")),d(b("</h1>\n<h2>")),d(tr("Status report")),d(b('</h2>\n<div class="help--overview--report">\n <ul>\n <li class="report-chorus-version"><strong>Chorus ')),d(tr("version")),d(b('</strong><span></span></li>\n <li class="report-kodi-version"><strong>Kodi ')),d(tr("version")),d(b('</strong><span></span></li>\n <li class="report-websockets"><strong>')),d(tr("Remote control")),d(b('</strong><span></span></li>\n <li class="report-local-audio"><strong>')),d(tr("Local audio")),d(b('</strong><span></span></li>\n </ul>\n</div>\n<div class="help--overview--header"></div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/input/remote/tpl/remote_control.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div id="remote-background" class="close-remote"></div>\n<div class="remote kodi-remote">\n <div class="toggle-visibility"></div>\n <div class="playing-area">\n\n </div>\n <div class="main-controls">\n <div class="direction">\n <div class="pad">\n <div class="ibut mdi-hardware-keyboard-arrow-left left input-button" data-type="Left"></div>\n <div class="ibut mdi-hardware-keyboard-arrow-up up input-button" data-type="Up"></div>\n <div class="ibut mdi-hardware-keyboard-arrow-down down input-button" data-type="Down"></div>\n <div class="ibut mdi-hardware-keyboard-arrow-right right input-button" data-type="Right"></div>\n <div class="ibut mdi-image-brightness-1 ok input-button" data-type="Select"></div>\n </div>\n </div>\n <div class="buttons">\n <div class="ibut mdi-action-settings-power power-button"></div>\n <div class="ibut mdi-navigation-more-vert input-button" data-type="ContextMenu"></div>\n <div class="ibut mdi-action-info info-button" data-type="Info"></div>\n </div>\n </div>\n <div class="secondary-controls">\n <div class="ibut mdi-hardware-keyboard-return input-button" data-type="Back"></div>\n <div class="ibut mdi-av-stop player-button" data-type="Stop"></div>\n <div class="ibut mdi-maps-store-mall-directory input-button" data-type="Home"></div>\n </div>\n\n</div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/input/remote/tpl/system.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){var a,c,e,f;for(d(b('<ul class="system-menu__options options">\n ')),f=this.actions,c=0,e=f.length;e>c;c++)a=f[c],d(b('\n <li data-action="')),d(a.id),d(b('">')),d(a.title),d(b("</li>\n "));d(b("\n</ul>"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/lab/apiBrowser/tpl/api_browser_landing.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="api-browser--landing page">\n <h2>')),d(t.gettext("Kodi API browser")),d(b('</h2>\n <h4><a href="#lab">')),d(t.gettext("Chorus lab")),d(b('</a></h4>\n <div class="api-browser--content">\n <p>')),d(t.gettext("This is a tool to test out the api. Select a method then execute it with parameters.")),d(b('</p>\n <br />\n <div class="alert alert-dismissable alert-warning">\n <button type="button" class="close" data-dismiss="alert">×</button>\n <h4>')),d(t.gettext("Warning")),d(b("</h4>\n <p>")),d(t.gettext("You could potentially damage your system with this and there are no sanity checks. Use at own risk.")),d(b("<br /></p>\n </div>\n </div>\n</div>"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/lab/apiBrowser/tpl/api_method_item.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="api-method--item">\n <h4 class="method">')),d(this.method),d(b('</h4>\n <p class="description">')),d(this.description),d(b("</p>\n</div>\n\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/lab/apiBrowser/tpl/api_method_list.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="api-methods--list">\n <p class="search-box"><input type="text" id="api-search" class="api-methods--search" /></p>\n <ul class="items"></ul>\n</div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/lab/apiBrowser/tpl/api_method_page.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('\n<div class="api-method--info page">\n <h2 class="method"><a href="http://kodi.wiki/view/JSON-RPC_API/v6#')),d(this.method),d(b('" target="_blank">')),d(this.method),d(b('</a></h2>\n <p class="description">')),d(this.description),d(b("</p>\n\n</div>\n\n")),"method"===this.type&&(d(b('\n <div class="api-method--execute">\n <h3>Execute <strong>')),d(this.method),d(b('</strong> with these params:</h3>\n <textarea class="api-method--params" placeholder=\'Eg. ["arg", "foo", true]\'></textarea>\n <p class="description">Parameters get parsed by\n <a href="https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse" target="_blank">JSON.parse</a>.\n Check the console for response objects, you will get an \'unexpected token\' error if parsing failed.\n Params should be an array \'[]\' matching below \'Method params\'. Only use double quotes for strings/keys.\n </p>\n <p class="description">\n Pass params as array Eg. [true] or [255, ["born", "formed", "thumbnail"]] or [] or [255]. Brackets required.<br />\n Pass params as object Eg. {songid: 255} or {songid: 255, fields: ["born", "formed", "thumbnail"]}. Braces required.<br />\n </p>\n <p><button class="btn btn-primary" id="send-command">Send Command</button></p>\n\n </div>\n'))),d(b('\n\n<div class="api-method--result" id="api-result"></div>\n\n<h3>')),"method"===this.type&&d(b("Method ")),d(b('Params</h3>\n<div class="api-method--params"></div>\n\n')),"method"===this.type&&d(b('\n <hr />\n <h3>Method Returns</h3>\n <div class="api-method--return"></div>\n'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/lab/iconBrowser/tpl/icon_browser_page.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<h3>Material Icons</h3>\n<ul id="icons-material"></ul>\n\n<h3>Custom Icons</h3>\n<ul id="icons-custom"></ul>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/lab/lab/tpl/lab_item.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<a class="lab-item" href="#')),d(this.path),d(b('">\n <h4>')),d(this.title),d(b("</h4>\n <p>")),d(this.description),d(b("</p>\n</a>"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/landing/show/tpl/landing_page.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<a id="landing-hero"></a>\n<div class="landing-sections">\n <div id="landing-section-1"></div>\n <div id="landing-section-2"></div>\n <div id="landing-section-3"></div>\n <div id="landing-section-4"></div>\n <div id="landing-section-5"></div>\n <div id="landing-section-6"></div>\n</div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/loading/show/tpl/loading_page.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div id="loading-page">\n <div class="spinner-double-section-far"></div>\n <h2>')),d(t.gettext("Just a sec...")),d(b("</h2>\n</div>\n\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/localPlaylist/list/tpl/playlist.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<span class="item">')),d(b(this.title)),d(b("</span>"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/localPlaylist/list/tpl/playlist_layout.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="local-playlist-header">\n <h2></h2>\n <div class="dropdown">\n <i data-toggle="dropdown"></i>\n <ul class="dropdown-menu">\n <li class="play">')),d(tr("Play in Kodi")),d(b('</li>\n <li class="localplay">')),d(tr("Play in browser")),d(b('</li>\n <li class="export">')),d(tr("Export list")),d(b('</li>\n <div class="divider"></div>\n <li class="rename">')),d(tr("Rename playlist")),d(b('</li>\n <li class="clear">')),d(tr("Clear playlist")),d(b('</li>\n <li class="delete">')),d(tr("Delete playlist")),d(b('</li>\n </ul>\n </div>\n</div>\n<div class="item-container">\n <div class="empty-content">')),d(t.gettext("Empty playlist, you should probably add something to it?")),d(b("</div>\n</div>"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/localPlaylist/list/tpl/playlist_list.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<h3></h3>\n<ul class="lists options"></ul>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/localPlaylist/list/tpl/playlist_sidebar_layout.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="current-lists"></div>\n<div class="new-list">')),d(tr("New playlist")),d(b("</div>"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/movie/show/tpl/content.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="section-content">\n <h2>')),d(t.gettext("Synopsis")),d(b("</h2>\n ")),this.mediaTrailer&&"youtube"===this.mediaTrailer.source&&(d(b('\n <div class="trailer ')),d(this.mediaTrailer.source),d(b('">\n <img src="')),d(b(this.mediaTrailer.img)),d(b('" />\n </div>\n '))),d(b("\n <p>")),d(this.plot),d(b('</p>\n <ul class="inline-links">\n <li>')),d(b(helpers.url.imdbUrl(this.imdbnumber,"View on IMDb"))),d(b("</li>\n </ul>\n</div>\n\n")),this.cast.length>0&&(d(b('\n <div class="section-content">\n <h2>')),d(t.gettext("Full cast")),d(b('</h2>\n <div class="region-cast"></div>\n </div>\n'))),d(b('\n\n<div class="region-more-1"></div>\n<div class="region-more-2"></div>\n<div class="region-more-3"></div>\n<div class="region-more-4"></div>\n<div class="region-more-5"></div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/movie/show/tpl/details_meta.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){var a,c,e,f;if(d(b('<div class="region-details-top">\n <div class="region-details-title">\n <h2><span class="title">')),d(this.label),d(b('</span> <span class="sub"><a href="#movies?year=')),d(this.year),d(b('">')),d(this.year),d(b('</a></span></h2>\n </div>\n <div class="region-details-rating">\n ')),d(this.rating),d(b(' <i></i>\n </div>\n</div>\n\n<div class="region-details-meta-below">\n\n <div class="region-details-subtext">\n <div class="runtime">\n ')),d(helpers.global.formatTime(helpers.global.secToTime(this.runtime))),d(b('\n </div>\n </div>\n\n <div class="tagline">')),d(this.plotoutline),d(b('</div>\n\n <ul class="meta">\n ')),this.genre.length>0&&(d(b("\n <li><label>")),d(t.gettext("genre")),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("tvshows","genre",this.genre))),d(b("</span></li>\n "))),d(b("\n ")),this.director.length>0&&(d(b("\n <li><label>")),d(t.ngettext("Director","Directors",this.director.length)),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("movies","director",this.director))),d(b("</span></li>\n "))),d(b("\n ")),this.writer.length>0&&(d(b("\n <li><label>")),d(t.ngettext("Writer","Writers",this.writer.length)),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("movies","writer",this.writer))),d(b("</span></li>\n "))),d(b("\n ")),this.cast.length>0&&(d(b("\n <li><label>")),d(t.gettext("Cast")),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("movies","cast",_.pluck(this.cast,"name")))),d(b("</span></li>\n "))),d(b("\n ")),this.mpaa&&(d(b("\n <li><label>")),d(t.gettext("rated")),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("movies","mpaa",[this.mpaa]))),d(b("</span></li>\n "))),d(b('\n </ul>\n\n <ul class="streams">\n ')),this.streamdetails.video.length>0&&(d(b("\n <li><label>")),d(t.gettext("Video")),d(b(":</label> <span>")),d(_.pluck(this.streamdetails.video,"label").join(", ")),d(b("</span></li>\n "))),d(b("\n ")),this.streamdetails.audio.length>0&&(d(b("\n <li><label>")),d(t.gettext("Audio")),d(b(":</label> <span>")),d(_.pluck(this.streamdetails.audio,"label").join(", ")),d(b("</span></li>\n "))),d(b("\n ")),this.streamdetails.subtitle.length>0&&""!==this.streamdetails.subtitle[0].label){for(d(b("\n <li><label>")),d(t.ngettext("Subtitle","Subtitles",this.streamdetails.subtitle.length)),d(b(':</label>\n <span class="dropdown"><span data-toggle="dropdown">')),d(_.pluck(this.streamdetails.subtitle,"label").join(", ")),d(b('</span>\n <ul class="dropdown-menu">\n ')),e=this.streamdetails.subtitle,a=0,c=e.length;c>a;a++)f=e[a],d(b("\n <li>")),d(f.label),d(b("</li>\n "));d(b("\n </ul>\n </span>\n </li>\n "))}d(b('\n </ul>\n\n <ul class="inline-links">\n <li class="btn-flat-play play">')),d(t.gettext("Play")),d(b('</li>\n <li class="btn-flat-add add">')),d(tr("Queue")),d(b('</li>\n <li class="btn-flat-stream stream">')),d(t.gettext("Stream")),d(b('</li>\n <li class="btn-flat-watched watched">\n ')),d(t.gettext("set")),d(b(' <span class="action-watched">')),d(t.gettext("watched")),d(b('</span><span class="action-unwatched">')),d(t.gettext("unwatched")),d(b('</span>\n </li>\n <li class="more-actions dropdown">\n <span class="btn-flat-more" data-toggle="dropdown" aria-expanded="true">')),d(tr("more")),d(b('</span>\n <ul class="dropdown-menu pull-right">\n <li class="download">')),d(tr("Download")),d(b('</li>\n <li class="divider"></li>\n <li class="dropdown-submenu internal-search">')),d(tr("Chorus Search")),d(b('\n <ul class="dropdown-menu">\n ')),d(b(helpers.entities.getAddonSearchMenuItems(this.label))),d(b('\n </ul>\n </li>\n <li class="dropdown-submenu external-search">')),d(tr("External Search")),d(b('\n <ul class="dropdown-menu">\n <li data-type="google" data-query="')),d(this.label),d(b('">Google</li>\n <li data-type="imdb" data-query="')),d(this.label),d(b('">IMDb</li>\n <li data-type="tmdb" data-query="')),d(this.label),d(b('">TVDb</li>\n </ul>\n </li>\n <li class="youtube-search" data-query="')),d(this.label),d(b('">')),d(tr("YouTube Search")),d(b('</li>\n <li class="divider"></li>\n <li class="refresh">')),d(tr("Refresh")),d(b('</li>\n <li class="edit">')),d(tr("Edit")),d(b("</li>\n </ul>\n </li>\n </ul>\n</div>\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/movie/show/tpl/set.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="section-content">\n <div class="set-collection">\n <h2 class="set-name"></h2>\n <div class="collection-items"></div>\n </div>\n</div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/musicvideo/show/tpl/details_meta.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="region-details-top">\n <div class="region-details-title">\n <h2><span class="title">')),d(this.label),d(b("</span></h2>\n </div>\n ")),this.rating&&(d(b('\n <div class="region-details-rating">\n ')),d(this.rating),d(b(" <i></i>\n </div>\n "))),d(b('\n</div>\n\n<div class="region-details-meta-below">\n\n <ul class="meta">\n ')),this.artist&&(d(b("\n <li><label>")),d(tr("artist")),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("music/videos","artist",[this.artist]))),d(b("</span></li>\n "))),d(b("\n ")),this.album&&(d(b("\n <li><label>")),d(tr("album")),d(b(':</label> <span><a href="#music/videos?album=')),d(this.album),d(b('">')),d(this.album),d(b("</a></span></li>\n "))),d(b("\n ")),this.genre.length>0&&(d(b("\n <li><label>")),d(t.ngettext("genre","genres",this.genre.length)),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("music/videos","genre",this.genre))),d(b("</span></li>\n "))),d(b("\n ")),this.director.length>0&&(d(b("\n <li><label>")),d(t.ngettext("Director","Directors",this.director.length)),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("music/videos","director",this.director))),d(b("</span></li>\n "))),d(b("\n ")),this.studio.length>0&&(d(b("\n <li><label>")), +d(t.ngettext("Studio","Studios",this.studio.length)),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("music/videos","studio",this.studio))),d(b("</span></li>\n "))),d(b('\n </ul>\n\n <div class="description">')),d(this.plot),d(b('</div>\n\n <ul class="inline-links">\n <li class="btn-flat-play play">')),d(tr("Play")),d(b('</li>\n <li class="btn-flat-add add">')),d(tr("Queue")),d(b('</li>\n <li class="btn-flat-stream localplay">')),d(tr("Stream")),d(b('</li>\n <li class="more-actions dropdown">\n <span class="btn-flat-more" data-toggle="dropdown" aria-expanded="true">')),d(tr("more")),d(b('</span>\n <ul class="dropdown-menu pull-right">\n <li class="download">')),d(tr("Download")),d(b('</li>\n <li class="divider"></li>\n <li class="dropdown-submenu internal-search">')),d(tr("Chorus Search")),d(b('\n <ul class="dropdown-menu">\n ')),d(b(helpers.entities.getAddonSearchMenuItems(this.title))),d(b('\n </ul>\n </li>\n <li class="dropdown-submenu external-search">')),d(tr("External Search")),d(b('\n <ul class="dropdown-menu">\n <li data-type="google" data-query="')),d(this.title),d(b(" ")),d(this.artist),d(b('">Google</li>\n </ul>\n </li>\n <li class="youtube-search" data-query="')),d(this.title),d(b(" ")),d(this.artist),d(b('">')),d(tr("YouTube Search")),d(b('</li>\n <li class="divider"></li>\n <li class="edit">')),d(tr("Edit")),d(b("</li>\n </ul>\n </li>\n </ul>\n\n</div>\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/navMain/show/tpl/navMain.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){var a,c,e,f,g,h,i,j;for(d(b('<div id="nav-header"></div>\n<nav>\n <ul>\n ')),i=this.items,c=0,g=i.length;g>c;c++)if(e=i[c],"undefined"!==e.path&&0===e.parent){if(d(b('\n <li class="')),d(e["class"]),d(b('">\n <a href="#')),d(e.path),d(b('">\n <i class="')),d(e.icon),d(b('"></i>\n <span>')),d(e.title),d(b("</span>\n </a>\n\n ")),0!==e.children.length){for(d(b("\n <ul>\n ")),j=e.children,f=0,h=j.length;h>f;f++)a=j[f],"undefined"!==a.path&&(d(b('\n <li><a href="#')),d(a.path),d(b('">')),d(a.title),d(b("</a></li>\n ")));d(b("\n </ul>\n "))}d(b("\n </li>\n "))}d(b("\n </ul>\n</nav>"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/navMain/show/tpl/nav_item.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b(this.link))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/navMain/show/tpl/nav_sub.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("<h3>")),d(this.title),d(b('</h3>\n<ul class="items"></ul>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/player/show/tpl/player.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="player">\n\n <div class="controls-primary">\n <div class="controls-primary-buttons">\n <div class="control control-prev"></div>\n <div class="control control-play"></div>\n <div class="control control-next"></div>\n </div>\n </div>\n\n <div class="controls-secondary">\n <div class="volume slider-bar"></div>\n <div class="controls-secondary-buttons">\n <div class="control control-mute"></div>\n <div class="control control-repeat"></div>\n <div class="control control-shuffle"></div>\n <div class="control control-menu"></div>\n </div>\n </div>\n\n <div class="now-playing">\n <div class="playing-thumb thumb">\n <div class="mdi remote-toggle"></div>\n </div>\n <div class="playing-info">\n <div class="playing-progress slider-bar"></div>\n <div class="playing-time">\n <div class="playing-time-current">0</div>\n <div class="playing-time-duration">0:00</div>\n </div>\n <div class="playing-meta">\n <div class="playing-title">')),d(t.gettext("Nothing playing")),d(b('</div>\n <div class="playing-subtitle"></div>\n </div>\n </div>\n </div>\n\n</div>\n'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/playlist/list/tpl/playlist_bar.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="playlist-header">\n <ul class="player-toggle">\n <li class="kodi">')),d(t.gettext("Kodi")),d(b('</li>\n <li class="local">')),d(t.gettext("Local")),d(b('</li>\n </ul>\n <div class="playlist-menu dropdown">\n <i data-toggle="dropdown" class="menu-toggle"></i>\n <ul class="dropdown-menu pull-right">\n <li class="dropdown-header">')),d(t.gettext("Current playlist")),d(b('</li>\n <li><a href="#" class="clear-playlist">')),d(t.gettext("Clear playlist")),d(b('</a></li>\n <li><a href="#" class="refresh-playlist">')),d(t.gettext("Refresh playlist")),d(b('</a></li>\n <li class="dropdown-header">')),d(t.gettext("Kodi")),d(b('</li>\n <li><a href="#" class="party-mode">')),d(t.gettext("Party mode")),d(b(' <i class="mdi-navigation-check"></i></a></li>\n <li><a href="#" class="save-playlist">')),d(t.gettext("Save Kodi playlist")),d(b('</a></li>\n </li>\n </ul>\n </div>\n</div>\n<div class="playlists-wrapper">\n <div class="kodi-playlists">\n <ul class="media-toggle">\n <li class="audio">')),d(t.gettext("Audio")),d(b('</li>\n <li class="video">')),d(t.gettext("Video")),d(b('</li>\n </ul>\n <div class="kodi-playlist"></div>\n </div>\n <div class="local-playlists">\n <div class="local-playlist"></div>\n </div>\n</div>\n'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/playlist/list/tpl/playlist_item.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="item-inner item-')),d(this.type),d(b('">\n <div class="artwork">\n <div class="thumb" title="')),d(this.label),d(b('" style="background-image: url(\'')),d(this.thumbnail),d(b('\')">\n <div class="mdi play"></div>\n ')),this.canThumbsUp&&d(b('\n <div class="mdi thumbs"></div>\n ')),d(b('\n </div>\n </div>\n <div class="meta">\n <div class="title"><a href="#')),d(this.url),d(b('" title="')),d(this.label),d(b('">')),d(this.label),d(b("</a></div>\n ")),null!=this.subtitle&&(d(b('\n <div class="subtitle">')),d(b(this.subtitle)),d(b("</div>\n "))),d(b('\n </div>\n <div class="remove"></div>\n</div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/playlist/m3u/tpl/list.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){var a,c,e,f;for(d(b("#EXTCPlayListM3U::M3U\n")),f=this.items,a=0,e=f.length;e>a;a++)c=f[a],d(b("#EXTINF:")),d(c.duration),d(b(",")),d(c.artist.join("/")),d(b(" - ")),d(c.label),d(b("\n")),d(c.file),d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/playlist/show/tpl/landing.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="playlist-page playlist-page__empty set-page">\n <h3>')),d(t.gettext("Now playing - Playlists")),d(b("</h3>\n <p>")),d(t.gettext("Switch between Kodi and local playback via the tabs. You can toggle visibility with the arrow in the top right")),d(b("</p>\n</div>\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/pvr/recordingList/tpl/recording.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="title">\n <strong>')),d(this.label),d(b("</strong> <span>- ")),d(this.channel),d(b('</span>\n</div>\n<div class="date">\n ')),d(this.start.toString("h:mmtt").toLowerCase()),d(b(" -\n ")),"1970"!==this.end.toString("yyyy")?(d(b("\n ")),d(this.end.toString("h:mmtt").toLowerCase()),d(b("\n (")),d(helpers.global.formatTime(helpers.global.secToTime(this.runtime))),d(b(")\n "))):(d(b("\n ")),d(tr("Now")),d(b("\n "))),d(b("\n\n <br />")),d(this.start.toString("dddd, dS MMM")),d(b('\n</div>\n<div class="plot">')),d(this.plot),d(b('</div>\n<div class="entity-progress">\n <div class="current-progress" style="width: ')),d(this.progress),d(b('%" title="')),d(this.progress),d(b("% ")),d(t.gettext("complete")),d(b('"></div>\n</div>\n<ul class="actions">\n <li class="play"></li>\n</ul>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/search/list/tpl/search_layout.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="search-inner">\n <div class="entity-set entity-set-movie"></div>\n <div class="entity-set entity-set-tvshow"></div>\n <div class="entity-set entity-set-artist"></div>\n <div class="entity-set entity-set-album"></div>\n <div class="entity-set entity-set-song"></div>\n <div class="entity-set entity-set-musicvideo"></div>\n <div class="entity-set entity-set-loading"></div>\n <div class="entity-set entity-set-addons"></div>\n</div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/search/list/tpl/search_sidebar.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="sidebar-section sidebar-section-media">\n <h3>Local media</h3>\n <ul class="search-media-links"></ul>\n</div>\n\n<div class="sidebar-section sidebar-section-addon">\n <h3>Addons</h3>\n <ul class="search-addon-links"></ul>\n</div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/search/show/tpl/landing.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="search-page search-page__empty set-page">\n <h3>')),d(t.gettext("Enter your search above")),d(b("</h3>\n</div>\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/settings/show/tpl/settings_sidebar.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="settings-sidebar">\n <div class="settings-sidebar--section local-nav nav-sub"></div>\n <div class="settings-sidebar--section kodi-nav"></div>\n</div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/shell/show/tpl/homepage.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div id="homepage"></div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/shell/show/tpl/shell.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div id="shell">\n\n <a id="logo" href="#"></a>\n\n <div id="nav-bar"></div>\n\n <div id="header">\n\n <h1 id="page-title">\n <span class="context"></span>\n <span class="title"></span>\n </h1>\n\n <ul class="mobile-menu">\n <li><a href="#remote" class="mobile-menu--link__remote remote-toggle"><i></i></a></li>\n <li><a href="#search" class="mobile-menu--link__search"><i></i></a></li>\n <li><a href="#playlist" class="mobile-menu--link__playlist"><i></i></a></li>\n </ul>\n\n <div id="selected-region">\n <div class="selected-text">\n <span id="selected-count"></span>\n </div>\n <i data-toggle="dropdown" class="menu-toggle"></i>\n <ul class="dropdown-menu pull-right">\n <li class="selected-play">')),d(tr("Play in Kodi")),d(b('</li>\n <li class="selected-add">')),d(tr("Queue in Kodi")),d(b('</li>\n <li class="selected-localadd">')),d(tr("Add to playlist")),d(b('</li>\n </ul>\n </div>\n\n <div id="search-region">\n <input id="search" title="Search">\n <span id="do-search"></span>\n </div>\n\n </div>\n\n <div id="main">\n\n <div id="sidebar-one"></div>\n\n <div id="content">')),d(tr("Loading things...")),d(b('</div>\n\n </div>\n\n <div id="sidebar-two">\n <div class="playlist-toggle-open"></div>\n <div id="playlist-summary"></div>\n <div id="playlist-bar"></div>\n </div>\n\n <div id="remote"></div>\n\n <div id="player-wrapper">\n <footer id="player-kodi"></footer>\n <footer id="player-local"></footer>\n </div>\n\n <div class="player-menu-wrapper">\n <ul class="player-menu">\n <li class="video-scan">')),d(t.gettext("Scan video library")),d(b('</li>\n <li class="audio-scan">')),d(t.gettext("Scan audio library")),d(b('</li>\n <li class="send-input">')),d(t.gettext("Send text to Kodi")),d(b('</li>\n <li class="goto-lab">')),d(t.gettext("The lab")),d(b('</li>\n <li class="about">')),d(t.gettext("About Chorus")),d(b('</li>\n </ul>\n </div>\n\n</div>\n\n<div id="fanart"></div>\n<div id="fanart-overlay"></div>\n\n<div id="snackbar-container"></div>\n\n<div class="modal fade" id="modal-window">\n <div class="modal-dialog">\n <div class="modal-content">\n <div class="modal-header">\n <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>\n <h4 class="modal-title"></h4>\n </div>\n <div class="modal-body"></div>\n <div class="modal-footer"></div>\n </div>\n </div>\n</div>\n\n<div id="disconnected">\n <div class="message">\n <i class="mdi-file-cloud-off"></i>\n <h2>')),d(tr("Lost connection to Kodi")),d(b('</h2>\n <p class="try-connect"><button class="reconnect btn btn-primary">')),d(tr("Attempt to reconnect")),d(b('</button></p>\n <p class="load-connect"><span class="loader-small-inline"></span><br />')),d(tr("Attempting reconnect")),d(b('</p>\n </div>\n</div>\n\n<div id="offscreen"></div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/song/list/tpl/song.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<td class="cell-first">\n <div class="thumb" style="background-image: url(\'')),d(this.thumbnail),d(b('\')">\n </div>\n <div class="track">')),d(this.track),d(b('</div>\n <div class="mdi play"></div>\n</td>\n<td class="cell-label song-title"><span class="crop">')),d(this.label),d(b('</span></td>\n<td class="cell-label song-album"><a class="crop" href="#music/album/')),d(this.albumid),d(b('">')),d(this.album),d(b('</a></td>\n<td class="cell-label song-artist"><a class="crop" href="#music/artist/')),d(this.artistid),d(b('">')),d(this.artist),d(b('</a></td>\n<td class="cell-last">\n <li class="thumbed-up"></li>\n <div class="duration">')),d(this.displayDuration),d(b('</div>\n <ul class="actions">\n <li class="mdi thumbs"></li>\n <li class="mdi add"></li>\n <li class="menu dropdown">\n <i data-toggle="dropdown" class="mdi"></i>\n <ul class="dropdown-menu pull-right"></ul>\n </li>\n </ul>\n</td>\n<td class="cell-remove song-remove">\n <i class="mdi mdi-navigation-close"></i>\n</td>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/thumbs/list/tpl/thumbs_layout.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="thumbs-inner">\n <div class="entity-set entity-set-movie"></div>\n <div class="entity-set entity-set-tvshow"></div>\n <div class="entity-set entity-set-episode"></div>\n <div class="entity-set entity-set-artist"></div>\n <div class="entity-set entity-set-album"></div>\n <div class="entity-set entity-set-song"></div>\n <div class="entity-set entity-set-musicvideo"></div>\n</div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/thumbs/list/tpl/thumbs_set.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<h2 class="set-header"></h2>\n<div class="set-results"></div>\n<div class="more"></div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/tvshow/episode/tpl/content.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('\n<div class="section-content">\n <h2>')),d(t.gettext("Synopsis")),d(b("</h2>\n <p>")),d(this.plot),d(b("</p>\n</div>\n\n")),this.cast.length>0&&(d(b('\n <div class="section-content">\n <h2>')),d(tr("Full cast")),d(b('</h2>\n <div class="region-cast"></div>\n </div>\n'))),d(b('\n\n<div class="section-content section-full-width">\n <h2>')),d(tr("Season")),d(b(" ")),d(this.season),d(b('</h2>\n <div class="region-season"></div>\n</div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/tvshow/episode/tpl/details_meta.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){var a,c,e,f;if(d(b('<div class="region-details-top">\n ')),null!=this.showtitle&&d(b("\n\n ")),d(b('\n <div class="region-details-title">\n <h2>\n <span class="title">')),d(this.label),d(b('</span>\n <span class="sub show-title"><a href="#')),d(this.url.split("/",2).join("/")),d(b('">')),d(this.showtitle),d(b('</a></span>\n <span class="sub">S')),d(this.season),d(b(" E")),d(this.episode),d(b('</span>\n </h2>\n </div>\n <div class="region-details-rating">\n ')),d(this.rating),d(b(' <i></i>\n </div>\n</div>\n<div class="region-details-meta-below">\n\n <div class="region-details-subtext">\n\n ')),this.runtime>0&&(d(b('\n <div class="runtime">\n ')),d(helpers.global.formatTime(helpers.global.secToTime(this.runtime))),d(b("\n </div>\n "))),d(b('\n\n </div>\n\n <ul class="meta">\n <li><label>')),d(t.gettext("Season")),d(b(':</label> <span><a href="#tvshow/')),d(this.tvshowid),d(b("/")),d(this.season),d(b('">')),d(t.gettext("Season")),d(b(" ")),d(this.season),d(b("</a></span></li>\n ")),this.firstaired&&(d(b("\n <li><label>")),d(t.gettext("First aired")),d(b(":</label> <span>")),d(this.firstaired),d(b(" </span></li>\n "))),d(b("\n ")),this.director.length>0&&(d(b("\n <li><label>")),d(t.ngettext("Director","Directors",this.director.length)),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("tvshows","director",this.director))),d(b("</span></li>\n "))),d(b("\n ")),this.writer.length>0&&(d(b("\n <li><label>")),d(t.ngettext("Writer","Writers",this.writer.length)),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("tvshows","writer",this.writer))),d(b("</span></li>\n "))),d(b("\n ")),this.cast.length>0&&(d(b("\n <li><label>")),d(t.gettext("Cast")),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("tvshows","cast",_.pluck(this.cast,"name")))),d(b("</span></li>\n "))),d(b('\n </ul>\n\n <ul class="streams">\n ')),this.streamdetails.video.length>0&&(d(b("\n <li><label>")),d(t.gettext("Video")),d(b(":</label> <span>")),d(_.pluck(this.streamdetails.video,"label").join(", ")),d(b("</span></li>\n "))),d(b("\n ")),this.streamdetails.audio.length>0&&(d(b("\n <li><label>")),d(t.gettext("Audio")),d(b(":</label> <span>")),d(_.pluck(this.streamdetails.audio,"label").join(", ")),d(b("</span></li>\n "))),d(b("\n ")),this.streamdetails.subtitle.length>0&&""!==this.streamdetails.subtitle[0].label){for(d(b("\n <li><label>")),d(t.ngettext("Subtitle","Subtitles",this.streamdetails.subtitle.length)),d(b(':</label>\n <span class="dropdown"><span data-toggle="dropdown">')),d(_.first(_.pluck(this.streamdetails.subtitle,"label"))),d(b('</span>\n <ul class="dropdown-menu">\n ')),e=this.streamdetails.subtitle,a=0,c=e.length;c>a;a++)f=e[a],d(b("\n <li>")),d(f.label),d(b("</li>\n "));d(b("\n </ul>\n </span>\n </li>\n "))}d(b('\n </ul>\n\n <ul class="inline-links">\n <li class="btn-flat-play play">')),d(tr("Play")),d(b('</li>\n <li class="btn-flat-add add">')),d(tr("Queue")),d(b('</li>\n <li class="btn-flat-stream stream">')),d(tr("Stream")),d(b('</li>\n <li class="btn-flat-watched watched">\n ')),d(t.gettext("set")),d(b(' <span class="action-watched">')),d(tr("watched")),d(b('</span><span class="action-unwatched">')),d(tr("unwatched")),d(b('</span>\n </li>\n <li class="more-actions dropdown">\n <span class="btn-flat-more" data-toggle="dropdown" aria-expanded="true">')),d(tr("more")),d(b('</span>\n <ul class="dropdown-menu pull-right">\n <li class="download">')),d(tr("Download")),d(b('</li>\n <li class="divider"></li>\n <li class="dropdown-submenu internal-search">')),d(tr("Chorus Search")),d(b('\n <ul class="dropdown-menu">\n ')),d(b(helpers.entities.getAddonSearchMenuItems(this.showtitle))),d(b('\n </ul>\n </li>\n <li class="dropdown-submenu external-search">')),d(tr("External Search")),d(b('\n <ul class="dropdown-menu">\n <li data-type="google" data-query="')),d(this.showtitle),d(b(" ")),d(this.label),d(b('">Google</li>\n <li data-type="imdb" data-query="')),d(this.showtitle),d(b('">IMDb</li>\n <li data-type="tvdb" data-query="')),d(this.showtitle),d(b('">TVDb</li>\n <li data-type="tmdb" data-query="')),d(this.showtitle),d(b('">TMDb</li>\n </ul>\n </li>\n <li class="youtube-search" data-query="')),d(this.showtitle),d(b('">')),d(tr("YouTube Search")),d(b('</li>\n <li class="divider"></li>\n <li class="refresh">')),d(tr("Refresh")),d(b('</li>\n <li class="edit">')),d(tr("Edit")),d(b("</li>\n </ul>\n </li>\n </ul>\n</div>\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/tvshow/season/tpl/details_meta.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="region-details-top">\n <div class="region-details-title">\n <h2>\n <span class="title">')),d(tr("Season")),d(b(" ")),d(this.season),d(b('</span>\n <span class="sub"><a href="#tvshow/')),d(this.tvshowid),d(b('">')),d(this.label),d(b('</a></span>\n </h2>\n </div>\n <div class="region-details-rating">\n ')),d(this.rating),d(b(' <i></i>\n </div>\n</div>\n<div class="region-details-meta-below">\n\n <ul class="meta">\n ')),this.genre.length>0&&(d(b("\n <li><label>")),d(tr("genre")),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("tvshows","genre",this.genre))),d(b("</span></li>\n "))),d(b("\n ")),this.cast.length>0&&(d(b("\n <li><label>")),d(tr("cast")),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("tvshows","cast",_.pluck(this.cast,"name")))),d(b("</span></li>\n "))),d(b("\n ")),this.studio.length>0&&(d(b("\n <li><label>")),d(tr("studio")),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("tvshows","studio",this.studio))),d(b("</span></li>\n "))),d(b("\n ")),this.mpaa&&(d(b("\n <li><label>")),d(tr("rated")),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("tvshows","mpaa",[this.mpaa]))),d(b("</span></li>\n "))),d(b("\n <li><label>")),d(tr("episodes")),d(b(':</label> <span><span class="episode-total">')),d(this.episode),d(b("</span> ")),d(tr("total")),d(b(' (<span class="episode-unwatched">')),d(this.unwatched),d(b("</span> ")),d(tr("unwatched")),d(b(')</span></li>\n </ul>\n\n <div class="description">')),d(this.plot),d(b('</div>\n\n <ul class="inline-links">\n <li class="btn-flat-play play">')),d(tr("Play")),d(b('</li>\n <li class="btn-flat-add add">')),d(tr("Queue")),d(b('</li>\n <li class="btn-flat-watched watched">\n ')),d(tr("set")),d(b(' <span class="action-watched">')),d(tr("watched")),d(b('</span><span class="action-unwatched">')),d(tr("unwatched")),d(b("</span>\n </li>\n </ul>\n\n</div>\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""); +},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["apps/tvshow/show/tpl/details_meta.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="region-details-top">\n <div class="region-details-title">\n <h2><span class="title">')),d(this.label),d(b('</span> <span class="sub">')),d(this.year),d(b('</span></h2>\n </div>\n <div class="region-details-rating">\n ')),d(this.rating),d(b(' <i></i>\n </div>\n</div>\n<div class="region-details-meta-below">\n\n <ul class="meta">\n ')),this.genre.length>0&&(d(b("\n <li><label>")),d(tr("genre")),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("tvshows","genre",this.genre))),d(b("</span></li>\n "))),d(b("\n ")),this.cast.length>0&&(d(b("\n <li><label>")),d(tr("cast")),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("tvshows","cast",_.pluck(this.cast,"name")))),d(b("</span></li>\n "))),d(b("\n ")),this.studio.length>0&&(d(b("\n <li><label>")),d(tr("studio")),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("tvshows","studio",this.studio))),d(b("</span></li>\n "))),d(b("\n ")),this.mpaa&&(d(b("\n <li><label>")),d(tr("rated")),d(b(":</label> <span>")),d(b(helpers.url.filterLinks("tvshows","mpaa",[this.mpaa]))),d(b("</span></li>\n "))),d(b("\n <li><label>")),d(tr("episodes")),d(b(':</label> <span><span class="episode-total">')),d(this.episode),d(b("</span> ")),d(tr("total")),d(b(' (<span class="episode-unwatched">')),d(this.unwatched),d(b("</span> ")),d(tr("unwatched")),d(b(')</span></li>\n </ul>\n\n <div class="description">')),d(this.plot),d(b('</div>\n\n <ul class="inline-links">\n <li class="btn-flat-play play">')),d(tr("Play")),d(b('</li>\n <li class="btn-flat-add add">')),d(tr("Queue")),d(b('</li>\n <li class="btn-flat-watched watched">\n ')),d(tr("set")),d(b(' <span class="action-watched">')),d(tr("watched")),d(b('</span><span class="action-unwatched">')),d(tr("unwatched")),d(b('</span>\n </li>\n <li class="more-actions dropdown">\n <span class="btn-flat-more" data-toggle="dropdown" aria-expanded="true">')),d(tr("more")),d(b('</span>\n <ul class="dropdown-menu pull-right">\n <li class="dropdown-submenu internal-search">')),d(tr("Chorus Search")),d(b('\n <ul class="dropdown-menu">\n ')),d(b(helpers.entities.getAddonSearchMenuItems(this.label))),d(b('\n </ul>\n </li>\n <li class="dropdown-submenu external-search">')),d(tr("External Search")),d(b('\n <ul class="dropdown-menu">\n <li data-type="google" data-query="')),d(this.label),d(b('">Google</li>\n <li data-type="imdb" data-query="')),d(this.label),d(b('">IMDb</li>\n <li data-type="tvdb" data-query="')),d(this.label),d(b('">TVDb</li>\n <li data-type="tmdb" data-query="')),d(this.label),d(b('">TMDb</li>\n </ul>\n </li>\n <li class="youtube-search" data-query="')),d(this.label),d(b('">')),d(tr("YouTube Search")),d(b('</li>\n <li class="divider"></li>\n <li class="dropdown-submenu">')),d(tr("Refresh")),d(b('\n <ul class="dropdown-menu">\n <li class="refresh">')),d(tr("Show only")),d(b('</li>\n <li class="refresh-episodes">')),d(tr("Show and episodes")),d(b('</li>\n </ul>\n </li>\n <li class="edit">')),d(tr("Edit")),d(b("</li>\n </ul>\n </li>\n </ul>\n\n</div>\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["components/form/tpl/form.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="form-inner">\n <div class="form-content-region"></div>\n <footer>\n <ul class="inline-list">\n <li>\n <button type="submit" data-form-button="submit" class="btn btn-primary form-save">Save</button>\n </li>\n <li class="response">\n\n </li>\n </ul>\n </footer>\n</div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["components/form/tpl/form_item.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){this.title&&(d(b('\n <label class="control-label">')),d(b(this.title)),d(b("</label>\n"))),d(b("\n\n")),"markup"===this.type?(d(b("\n ")),d(b(this.element)),d(b("\n"))):(d(b('\n <div class="element">\n ')),"checkbox"!==this.type?(d(b("\n ")),d(b(this.element)),d(b("\n "))):(d(b('\n <div class="togglebutton">\n <label>')),d(b(this.element)),d(b("</label>\n </div>\n "))),d(b("\n ")),this.description&&(d(b('\n <div class="help-block description">')),d(b(this.description)),d(b("</div>\n "))),d(b("\n </div>\n"))),d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["components/form/tpl/form_item_group.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){this.title&&(d(b('\n <h3 class="group-title">')),this.icon&&(d(b('<i class="')),d(b(this.icon)),d(b('"></i> '))),d(b(this.title)),d(b("</h3>\n"))),d(b('\n<div class="form-items"></div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["components/form/tpl/form_item_imageselect.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="form-imageselect">\n <ul class="form-imageselect__tabs">\n <li data-pane="select" class="active">')),d(tr("Selector")),d(b('</li>\n <li data-pane="url">')),d(tr("URL")),d(b('</li>\n </ul>\n <div class="form-imageselect__panes">\n <div class="pane active" rel="select">\n <ul class="form-imageselect__thumbs">\n ')),this.image&&(d(b('\n <li data-original="')),d(this.image.original),d(b('" class="selected" style="background-image: url(\'')),d(this.image.thumb),d(b("')\"></li>\n "))),d(b('\n </ul>\n <div class="form-imageselect__loader"><div class="loader-small-inline"></div> <span>')),d(tr("Searching for more images")),d(b('</span></div>\n </div>\n <div class="pane" rel="url">\n ')),this.title&&(d(b('\n <label class="control-label">')),d(b(this.title)),d(b("</label>\n "))),d(b('\n <div class="form-imageselect__url">\n ')),d(b(this.element)),d(b("\n </div>\n ")),this.description&&(d(b('\n <div class="help-block description">')),d(b(this.description)),d(b("</div>\n "))),d(b("\n </div>\n </div>\n</div>"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["views/card/tpl/card.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){var a,c,e;if(d(b('<div class="card-')),d(this.type),d(b('">\n <div class="artwork">\n <a href="#')),d(this.url),d(b('" class="thumb" title="')),d(helpers.global.stripTags(this.label)),d(b('" style="background-image: url(\'')),d(this.thumbnail),d(b('\')"></a>\n <div class="mdi play" title="')),d(tr("Play")),d(b('"></div>\n ')),("channeltv"===this.type||"channelradio"===this.type)&&d(b('\n <div class="mdi record"></div>\n ')),d(b('\n </div>\n <div class="meta">\n <div class="title"><a href="#')),d(this.url),d(b('" title="')),d(helpers.global.stripTags(this.label)),d(b('">')),d(b(this.label)),d(b("</a></div>\n ")),null!=this.subtitle&&(d(b('\n <div class="subtitle">')),d(b(this.subtitle)),d(b("</div>\n "))),d(b("\n </div>\n ")),this.actions){d(b('\n <ul class="actions">\n ')),c=this.actions;for(a in c)e=c[a],d(b('<li class="mdi ')),d(a),d(b('" title="')),d(e),d(b('"></li>'));d(b("\n </ul>\n "))}d(b("\n ")),this.menu&&d(b('\n <div class="dropdown">\n <i data-toggle="dropdown" class="mdi"></i>\n <ul class="dropdown-menu"></ul>\n </div>\n ')),d(b("\n ")),this.progress=null!=this.progress?this.progress:0,d(b('\n <div class="entity-progress"><div class="current-progress" style="width: ')),d(this.progress),d(b('%" title="')),d(this.progress),d(b("% ")),d(t.gettext("complete")),d(b('"></div></div>\n</div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["views/card/tpl/card_placeholder.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("<i></i>"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["views/empty/tpl/empty_page.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="empty--page">\n ')),this.title&&(d(b('\n <h2 class="empty--page-title">')),d(title),d(b("</h2>\n "))),d(b("\n\n ")),this.content&&(d(b('\n <div class="empty--page-content">')),d(this.content),d(b("</div>\n "))),d(b("\n</div>"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["views/empty/tpl/empty_results.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="empty-result">\n <h2>')),d(b(t.sprintf(tr("No %1$s found"),'<span class="empty-key">'+tr("results")+"</span>"))),d(b('</h2>\n <div class="empty-actions">\n <div class="back-link"></div>\n </div>\n</div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["views/layouts/tpl/layout_details_header.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="layout-container details-header">\n\n <div class="region-details-side"></div>\n\n <div class="region-details-meta-wrapper"><div class="region-details-meta">\n\n <div class="region-details-title"><span class="title"></span> <span class="sub"></span></div>\n\n <div class="region-details-meta-below">\n <div class="region-details-subtext"></div>\n <div class="description"></div>\n </div>\n\n </div></div>\n\n ')),this.fanart&&(d(b('\n <div class="region-details-fanart" style="background-image: url(\'')),d(this.fanart),d(b('\')"><div class="gradient"></div></div>\n '))),d(b("\n</div>\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["views/layouts/tpl/layout_with_header.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="layout-container with-header">\n\n <header class="region-header"></header>\n\n <div class="region-content-wrapper">\n <div class="entity-progress"><div class="current-progress" style="width: ')),d(this.progress),d(b('%" title="')),d(this.progress),d(b("% ")),d(t.gettext("complete")),d(b('"></div></div>\n <section class="region-content"></section>\n </div>\n\n</div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["views/layouts/tpl/layout_with_sidebar_first.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="layout-container with-sidebar-first">\n\n <div class="region-first-toggle"></div>\n <section class="region-first">\n <div class="region-first-primary"></div>\n <div class="region-first-secondary"></div>\n </section>\n\n <section class="region-content-wrapper">\n <div class="region-content-top"></div>\n <div class="region-content"></div>\n </section>\n\n</div>'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["views/set/tpl/set.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<div class="set">\n ')),this.title&&(d(b('\n <div class="set__header">\n <h2 class="set__title">')),d(this.title),d(b('</h2>\n <div class="set__actions">\n ')),this.menu&&d(b('\n <div class="dropdown">\n <i data-toggle="dropdown" class="mdi"></i>\n <ul class="dropdown-menu pull-right"></ul>\n </div>\n ')),d(b("\n </div>\n </div>\n "))),d(b('\n <div class="set__items">\n <')),d(this.childViewTag),d(b(' class="set__collection ')),d(this.childViewClass),d(b('"></')),d(this.childViewTag),d(b(">\n </div>\n ")),this.more&&(d(b('\n <div class="set__more">')),d(b(this.more)),d(b("</div>\n "))),d(b("\n</div>\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},window.JST["views/song/tpl/song_placeholder.jst"]=function(a){var b=function(a){"undefined"==typeof a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){"undefined"!=typeof b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('<td colspan="6"><i></i></td>\n'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())};;var tr, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, @@ -30,6 +30,7 @@ this.config = { socketsHost: location.hostname, socketsPort: 9090, ajaxTimeout: 5000, + connected: true, hashKey: 'kodi', defaultPlayer: 'auto', ignoreArticle: true, @@ -46,7 +47,8 @@ this.config = { keyboardControl: 'kodi', disableThumbs: false, showDeviceName: false, - refreshIgnoreNFO: true + refreshIgnoreNFO: true, + largeBreakpoint: 910 } }; @@ -217,6 +219,46 @@ config.preStartGet = function(id, defaultData) { /* + Connection helpers. For live connecting and disconnecting from Kodi. + */ + +helpers.connection = {}; + +helpers.connection.reconnect = function(success) { + return helpers.connection.ping((function() { + config.setLocal('connected', true); + Kodi.execute('state:ws:init'); + return success(); + }), function() { + return Kodi.execute('shell:disconnect'); + }); +}; + +helpers.connection.disconnect = function() { + return config.setLocal('connected', false); +}; + +helpers.connection.ping = function(success, fail) { + var d; + d = new Date(); + return $.ajax({ + url: helpers.url.baseKodiUrl("Ping"), + timeout: 3000, + contentType: 'application/json', + type: 'POST', + data: JSON.stringify({ + jsonrpc: '2.0', + method: 'JSONRPC.Ping', + params: {}, + id: d.getTime() + }), + success: success, + error: fail + }); +}; + + +/* Entities mixins, all the common things we do/need on almost every collection example of usage: @@ -1330,7 +1372,8 @@ helpers.url.map = { channeltv: 'pvr/tv/:id', channelradio: 'pvr/radio/:id', file: 'browser/file/:id', - playlist: 'playlist/:id' + playlist: 'playlist/:id', + musicvideo: 'music/video/:id' }; helpers.url.baseKodiUrl = function(query) { @@ -1499,8 +1542,6 @@ helpers.url.isSecureProtocol = function() { return secure; }; -Cocktail.patch(Backbone); - (function(Backbone) { var methods, _sync; _sync = Backbone.sync; @@ -1977,6 +2018,294 @@ this.Kodi.module("Entities", function(Entities, App, Backbone, Marionette, $, _) }); }); +this.Kodi.module("Entities", function(Entities, App, Backbone, Marionette, $, _) { + Entities.ExternalEntity = (function(_super) { + __extends(ExternalEntity, _super); + + function ExternalEntity() { + return ExternalEntity.__super__.constructor.apply(this, arguments); + } + + ExternalEntity.prototype.defaults = { + id: '', + title: '', + desc: '', + thumbnail: '', + url: '', + type: '', + provider: '' + }; + + return ExternalEntity; + + })(Entities.Model); + return Entities.ExternalCollection = (function(_super) { + __extends(ExternalCollection, _super); + + function ExternalCollection() { + return ExternalCollection.__super__.constructor.apply(this, arguments); + } + + ExternalCollection.prototype.model = Entities.ExternalEntity; + + return ExternalCollection; + + })(Entities.Collection); +}); + +this.Kodi.module("Entities", function(Entities, App, Backbone, Marionette, $, _) { + var API; + API = { + apiKey: 'ed4b784f97227358b31ca4dd966a04f1', + baseURL: 'http://webservice.fanart.tv/v3/', + maxImageCount: 15, + artistFieldTranslate: { + artistbackground: 'fanart', + artistthumb: 'thumbnail' + }, + call: function(path, params, callback) { + var defaultParams, req, url; + defaultParams = { + api_key: this.apiKey + }; + params = _.extend(defaultParams, params); + url = this.baseURL + path + helpers.url.buildParams(params); + req = $.getJSON(url, function(resp) { + return callback(resp); + }); + return req.fail(function(err) { + return callback({ + status: 'error' + }); + }); + }, + parseImageUrls: function(artType, collection) { + var artTypes, field, i, item, items, row, type, _ref; + if (collection.status && collection.status === 'error') { + return []; + } + items = []; + artTypes = this[artType + 'FieldTranslate']; + for (type in artTypes) { + field = artTypes[type]; + if (collection[type] != null) { + collection[type] = collection[type].slice(0, this.maxImageCount); + _ref = collection[type]; + for (i in _ref) { + item = _ref[i]; + row = item; + row.thumbnail = this.getThumbnailUrl(item.url); + row.provider = 'fanarttv'; + row.type = field; + items.push(row); + } + } + } + return items; + }, + getThumbnailUrl: (function(_this) { + return function(url) { + return url.replace('assets.fanart.tv/', 'fanart.tv/detailpreview/'); + }; + })(this), + images: function(type, id, callback) { + return this.call(type + '/' + id, {}, (function(_this) { + return function(resp) { + return callback(_this.parseImageUrls('artist', resp)); + }; + })(this)); + }, + getMusicArtCollection: function(name, callback) { + var cache, cacheKey; + cacheKey = 'fanarttv:' + encodeURIComponent(name); + cache = config.getLocal(cacheKey, []); + if (cache.length > 0) { + return API.createCollection(cache, callback); + } else { + return App.execute("musicbrainz:artist:entity", name, function(model) { + if (model.get('id')) { + return API.images('music', model.get('id'), function(results) { + return API.createCollection(results, callback); + }); + } else { + return API.createCollection([], callback); + } + }); + } + }, + createCollection: function(items, callback) { + return callback(new Entities.ExternalCollection(items)); + } + }; + return App.commands.setHandler("fanarttv:artist:image:entities", function(name, callback) { + return API.getMusicArtCollection(name, callback); + }); +}); + +this.Kodi.module("Entities", function(Entities, App, Backbone, Marionette, $, _) { + var API; + API = { + baseURL: 'http://musicbrainz.org/ws/2/', + maxCount: 1, + call: function(path, params, callback) { + var url; + url = this.baseURL + path + helpers.url.buildParams(params) + '&fmt=json'; + return $.getJSON(url, function(resp) { + return callback(resp); + }); + }, + findArtist: function(key, id, callback) { + return this.call('artist/', { + query: key + ':' + id + }, function(resp) { + var collection; + collection = new Entities.ExternalCollection(API.parseArtist(resp)); + return callback(collection); + }); + }, + parseArtist: function(resp) { + var items; + items = []; + if (resp.artists && resp.artists.length) { + items = resp.artists; + items = _.map(items, function(item) { + item.artistType = item.type; + item.title = item.name; + item.type = 'artist'; + item.provider = 'musicbrainz'; + return item; + }); + } + return items; + } + }; + return App.commands.setHandler("musicbrainz:artist:entity", function(name, callback) { + return API.findArtist('artist', name, function(collection) { + return callback(collection.first()); + }); + }); +}); + +this.Kodi.module("Entities", function(Entities, App, Backbone, Marionette, $, _) { + var API; + API = { + apiKey: 'f7f51775877e0bb6703520952b3c7840', + baseURL: 'https://api.themoviedb.org/3/', + baseImageURL: 'https://image.tmdb.org/t/p/', + defaultLang: 'en', + maxImageCount: 15, + thumbSize: { + backdrops: 'w300', + posters: 'w185' + }, + fieldTranslate: { + backdrops: 'fanart', + posters: 'thumbnail' + }, + call: function(path, params, callback) { + var defaultParams, url; + defaultParams = { + api_key: this.apiKey + }; + params = _.extend(defaultParams, params); + url = this.baseURL + path + helpers.url.buildParams(params) + '&callback=?'; + return $.getJSON(url, function(resp) { + return callback(resp); + }); + }, + getImageURL: function(path, size) { + if (size == null) { + size = 'original'; + } + return this.baseImageURL + size + path; + }, + parseImages: function(collection) { + var field, i, item, items, type, _ref, _ref1; + items = []; + _ref = API.fieldTranslate; + for (type in _ref) { + field = _ref[type]; + collection[type] = collection[type].slice(0, this.maxImageCount); + _ref1 = collection[type]; + for (i in _ref1) { + item = _ref1[i]; + item.id = item.file_path; + item.url = this.getImageURL(item.file_path, 'original'); + item.thumbnail = this.getImageURL(item.file_path, this.thumbSize[type]); + item.type = field; + item.provider = 'moviedb'; + items.push(item); + } + } + return items; + }, + find: function(id, source, callback) { + if (source == null) { + source = 'imdb_id'; + } + return this.call('find/' + id, { + external_source: source + }, callback); + }, + images: function(type, tmdbId, callback) { + return this.call(type + '/' + tmdbId + '/images', { + include_image_language: this.defaultLang + ',null' + }, (function(_this) { + return function(resp) { + return callback(_this.parseImages(resp)); + }; + })(this)); + }, + getCollection: function(options, callback) { + var cache, cacheKey, opts; + opts = _.extend({ + lookupType: 'imdb_id', + lookupId: '', + type: 'movie' + }, options); + cacheKey = 'moviedb:' + JSON.stringify(opts); + cache = config.getLocal(cacheKey, []); + if (cache.length > 0) { + return API.createCollection(cache, callback); + } else { + return API.find(opts.lookupId, opts.lookupType, function(resp) { + var item, resKey; + resKey = opts.type + '_results'; + if (resp[resKey] && resp[resKey].length > 0) { + item = _.first(resp[resKey]); + return API.images(opts.type, item.id, function(resp) { + config.setLocal(cacheKey, resp); + return API.createCollection(resp, callback); + }); + } else { + return API.createCollection([], callback); + } + }); + } + }, + createCollection: function(items, callback) { + return callback(new Entities.ExternalCollection(items)); + } + }; + App.commands.setHandler("themoviedb:movie:image:entities", function(lookupId, callback) { + var options; + options = { + lookupId: lookupId + }; + return API.getCollection(options, callback); + }); + return App.commands.setHandler("themoviedb:tv:image:entities", function(lookupId, callback) { + var lookupType, options; + lookupType = lookupId.lastIndexOf('tt', 0) === 0 ? 'imdb_id' : 'tvdb_id'; + options = { + lookupId: lookupId, + lookupType: lookupType, + type: 'tv' + }; + return API.getCollection(options, callback); + }); +}); + /* Youtube collection @@ -1987,74 +2316,71 @@ this.Kodi.module("Entities", function(Entities, App, Backbone, Marionette, $, _) API = { apiKey: 'AIzaSyBxvaR6mCnUWN8cv2TiPRmuEh0FykBTAH0', searchUrl: 'https://www.googleapis.com/youtube/v3/search?part=snippet&type=video&videoDefinition=any&videoEmbeddable=true&order=relevance&safeSearch=none', + maxResults: 5, + kodiUrl: 'plugin://plugin.video.youtube/?action=play_video&videoid=', + ytURL: 'https://youtu.be/', getSearchUrl: function() { return this.searchUrl + '&key=' + this.apiKey; }, parseItems: function(response) { - var i, item, items, resp, _ref; + var enabled, i, item, items, resp, _ref; items = []; + enabled = App.request("addon:isEnabled", { + addonid: 'plugin.video.youtube' + }) ? true : false; _ref = response.items; for (i in _ref) { item = _ref[i]; resp = { id: item.id.videoId, title: item.snippet.title, + label: item.snippet.title, desc: item.snippet.description, - thumbnail: item.snippet.thumbnails["default"].url + thumbnail: item.snippet.thumbnails.medium.url, + url: API.ytURL + item.id.videoId, + addonEnabled: enabled }; items.push(resp); } return items; } }; - Entities.youtubeItem = (function(_super) { - __extends(youtubeItem, _super); - - function youtubeItem() { - return youtubeItem.__super__.constructor.apply(this, arguments); - } - - youtubeItem.prototype.defaults = { - id: '', - title: '', - desc: '', - thumbnail: '' - }; - - return youtubeItem; - - })(Entities.Model); - Entities.youtubeCollection = (function(_super) { - __extends(youtubeCollection, _super); + Entities.YouTubeCollection = (function(_super) { + __extends(YouTubeCollection, _super); - function youtubeCollection() { - return youtubeCollection.__super__.constructor.apply(this, arguments); + function YouTubeCollection() { + return YouTubeCollection.__super__.constructor.apply(this, arguments); } - youtubeCollection.prototype.model = Entities.youtubeItem; + YouTubeCollection.prototype.model = Entities.ExternalEntity; - youtubeCollection.prototype.url = API.getSearchUrl(); + YouTubeCollection.prototype.url = API.getSearchUrl(); - youtubeCollection.prototype.sync = function(method, collection, options) { + YouTubeCollection.prototype.sync = function(method, collection, options) { options.dataType = "jsonp"; options.timeout = 5000; return Backbone.sync(method, collection, options); }; - youtubeCollection.prototype.parse = function(resp) { + YouTubeCollection.prototype.parse = function(resp) { return API.parseItems(resp); }; - return youtubeCollection; + return YouTubeCollection; - })(Entities.Collection); - return App.commands.setHandler("youtube:search:entities", function(query, callback) { - var yt; - yt = new Entities.youtubeCollection(); + })(Entities.ExternalCollection); + App.commands.setHandler("youtube:search:entities", function(query, options, callback) { + var data, yt; + if (options == null) { + options = {}; + } + yt = new Entities.YouTubeCollection(); + data = _.extend({ + q: query, + maxResults: API.maxResults + }, options); return yt.fetch({ - data: { - q: query - }, + data: data, success: function(collection) { return callback(collection); }, @@ -2063,6 +2389,18 @@ this.Kodi.module("Entities", function(Entities, App, Backbone, Marionette, $, _) } }); }); + return App.commands.setHandler("youtube:trailer:entities", function(title, callback) { + return App.execute("youtube:search:entities", title + ' trailer', {}, function(collection) { + collection.map(function(item) { + item.set({ + type: 'trailer', + url: API.kodiUrl + item.id + }); + return item; + }); + return callback(collection); + }); + }); }); this.Kodi.module("Entities", function(Entities, App, Backbone, Marionette, $, _) { @@ -2855,7 +3193,7 @@ this.Kodi.module("KodiEntities", function(KodiEntities, App, Backbone, Marionett fields: { minimal: [], small: ['thumbnail', 'mood', 'genre', 'style'], - full: ['fanart', 'born', 'formed', 'description', 'died', 'disbanded', 'yearsactive', 'instrument'] + full: ['fanart', 'born', 'formed', 'description', 'died', 'disbanded', 'yearsactive', 'instrument', 'musicbrainzartistid'] }, getArtist: function(id, options) { var artist; @@ -2926,7 +3264,7 @@ this.Kodi.module("KodiEntities", function(KodiEntities, App, Backbone, Marionett ArtistCollection.prototype.args = function() { return this.getArgs({ albumartistsonly: config.getLocal('albumArtistsOnly', true), - properties: this.argFields(helpers.entities.getFields(API.fields, 'full')), + properties: this.argFields(helpers.entities.getFields(API.fields, 'small')), limits: this.argLimit(), sort: this.argSort('title', 'ascending'), filter: this.argFilter() @@ -3157,8 +3495,8 @@ this.Kodi.module("KodiEntities", function(KodiEntities, App, Backbone, Marionett API = { fields: { minimal: ['title'], - small: ['thumbnail', 'playcount', 'lastplayed', 'dateadded', 'episode', 'season', 'rating', 'file', 'cast', 'showtitle', 'tvshowid', 'uniqueid', 'resume'], - full: ['fanart', 'plot', 'firstaired', 'director', 'writer', 'runtime', 'streamdetails'] + small: ['thumbnail', 'playcount', 'lastplayed', 'dateadded', 'episode', 'season', 'rating', 'file', 'cast', 'showtitle', 'tvshowid', 'uniqueid', 'resume', 'firstaired'], + full: ['fanart', 'plot', 'director', 'writer', 'runtime', 'streamdetails'] }, getEntity: function(id, options) { var entity; @@ -3961,6 +4299,135 @@ this.Kodi.module("KodiEntities", function(KodiEntities, App, Backbone, Marionett }); this.Kodi.module("KodiEntities", function(KodiEntities, App, Backbone, Marionette, $, _) { + var API; + API = { + fields: { + minimal: ['title'], + small: ['thumbnail', 'file', 'genre', 'artist', 'year', 'playcount', 'dateadded', 'streamdetails', 'album', 'resume', 'director', 'rating'], + full: ['fanart', 'studio', 'plot', 'track', 'tag'] + }, + getVideo: function(id, options) { + var artist; + artist = new App.KodiEntities.MusicVideo(); + artist.set({ + musicvideoid: parseInt(id), + properties: helpers.entities.getFields(API.fields, 'full') + }); + artist.fetch(options); + return artist; + }, + getVideos: function(options) { + var collection; + collection = new KodiEntities.MusicVideoCollection(); + collection.fetch(helpers.entities.buildOptions(options)); + return collection; + } + }; + + /* + Models and collections. + */ + KodiEntities.MusicVideo = (function(_super) { + __extends(MusicVideo, _super); + + function MusicVideo() { + return MusicVideo.__super__.constructor.apply(this, arguments); + } + + MusicVideo.prototype.defaults = function() { + var fields; + fields = _.extend(this.modelDefaults, { + musicvideoid: 1, + title: '' + }); + return this.parseFieldsToDefaults(helpers.entities.getFields(API.fields, 'full'), fields); + }; + + MusicVideo.prototype.methods = { + read: ['VideoLibrary.GetMusicVideoDetails', 'musicvideoid', 'properties'] + }; + + MusicVideo.prototype.parse = function(resp, xhr) { + var obj; + obj = resp.musicvideodetails != null ? resp.musicvideodetails : resp; + if (resp.musicvideodetails != null) { + obj.fullyloaded = true; + } + return this.parseModel('musicvideo', obj, obj.musicvideoid); + }; + + return MusicVideo; + + })(App.KodiEntities.Model); + KodiEntities.MusicVideoCollection = (function(_super) { + __extends(MusicVideoCollection, _super); + + function MusicVideoCollection() { + return MusicVideoCollection.__super__.constructor.apply(this, arguments); + } + + MusicVideoCollection.prototype.model = KodiEntities.MusicVideo; + + MusicVideoCollection.prototype.methods = { + read: ['VideoLibrary.GetMusicVideos', 'properties', 'limits', 'sort', 'filter'] + }; + + MusicVideoCollection.prototype.args = function() { + return this.getArgs({ + properties: this.argFields(helpers.entities.getFields(API.fields, 'full')), + limits: this.argLimit(), + sort: this.argSort('title', 'ascending'), + filter: this.argFilter() + }); + }; + + MusicVideoCollection.prototype.parse = function(resp, xhr) { + return this.getResult(resp, 'musicvideos'); + }; + + return MusicVideoCollection; + + })(App.KodiEntities.Collection); + KodiEntities.MusicVideoCustomCollection = (function(_super) { + __extends(MusicVideoCustomCollection, _super); + + function MusicVideoCustomCollection() { + return MusicVideoCustomCollection.__super__.constructor.apply(this, arguments); + } + + MusicVideoCustomCollection.prototype.model = KodiEntities.MusicVideo; + + return MusicVideoCustomCollection; + + })(App.KodiEntities.Collection); + + /* + Request Handlers. + */ + App.reqres.setHandler("musicvideo:entity", function(id, options) { + if (options == null) { + options = {}; + } + return API.getVideo(id, options); + }); + App.reqres.setHandler("musicvideo:entities", function(options) { + if (options == null) { + options = {}; + } + return API.getVideos(options); + }); + App.reqres.setHandler("musicvideo:fields", function(type) { + if (type == null) { + type = 'full'; + } + return helpers.entities.getFields(API.fields, type); + }); + return App.reqres.setHandler("musicvideo:build:collection", function(items) { + return new KodiEntities.MusicVideoCustomCollection(items); + }); +}); + +this.Kodi.module("KodiEntities", function(KodiEntities, App, Backbone, Marionette, $, _) { /* API Helpers @@ -5557,6 +6024,14 @@ this.Kodi.module("Entities", function(Entities, App, Backbone, Marionette, $, _) parent: 1 }); nav.push({ + id: 8, + title: tr("Videos"), + path: 'music/videos', + icon: '', + classes: '', + parent: 1 + }); + nav.push({ id: 11, title: tr("Movies"), path: 'movies/recent', @@ -6121,21 +6596,6 @@ this.Kodi.module("Views", function(Views, App, Backbone, Marionette, $, _) { return ItemView.__super__.constructor.apply(this, arguments); } - ItemView.prototype.menuPopulate = function() { - var key, menu, val, _ref; - menu = ''; - if (this.model.get('menu')) { - _ref = this.model.get('menu'); - for (key in _ref) { - val = _ref[key]; - menu += this.themeTag('li', { - "class": key - }, val); - } - return this.$el.find('.dropdown-menu').html(menu); - } - }; - ItemView.prototype.onShow = function() { return this.menuBlur(); }; @@ -6226,9 +6686,13 @@ this.Kodi.module("Views", function(Views, App, Backbone, Marionette, $, _) { external: false, className: '' }); - attrs = !options.external ? { - href: "#" + url - } : void 0; + attrs = {}; + if (options.external) { + attrs.target = '_blank'; + attrs.href = url; + } else { + attrs.href = '#' + url; + } if (options.className !== '') { attrs["class"] = options.className; } @@ -6263,6 +6727,34 @@ this.Kodi.module("Views", function(Views, App, Backbone, Marionette, $, _) { helpers.debug.msg('formatText error: ' + res.errorQueue.join(', '), 'warning', res); } return res.html; + }, + populateMenu: function(type) { + var baseSelector, key, menu, selector, val, _ref; + if (type == null) { + type = ''; + } + menu = ''; + baseSelector = 'dropdown-menu'; + if (this.model.get('menu')) { + _ref = this.model.get('menu'); + for (key in _ref) { + val = _ref[key]; + if (key.lastIndexOf('divider', 0) === 0) { + key = 'divider'; + } + menu += this.themeTag('li', { + "class": key + }, val); + } + selector = type !== '' ? type + ' .' + baseSelector : baseSelector; + return this.$el.find('.' + selector).html(menu); + } + }, + populateModelMenu: function() { + return this.populateMenu(); + }, + populateSetMenu: function() { + return this.populateMenu('set__actions'); } }); }); @@ -6383,7 +6875,7 @@ this.Kodi.module("Views", function(Views, App, Backbone, Marionette, $, _) { CardView.prototype.tagName = "li"; CardView.prototype.events = { - "click .dropdown > i": "populateMenu", + "click .dropdown > i": "populateModelMenu", "click .thumbs": "toggleThumbs", "click": "toggleSelect" }; @@ -6392,24 +6884,6 @@ this.Kodi.module("Views", function(Views, App, Backbone, Marionette, $, _) { 'change': 'modelChange' }; - CardView.prototype.populateMenu = function() { - var key, menu, val, _ref; - menu = ''; - if (this.model.get('menu')) { - _ref = this.model.get('menu'); - for (key in _ref) { - val = _ref[key]; - if (key.lastIndexOf('divider', 0) === 0) { - key = 'divider'; - } - menu += this.themeTag('li', { - "class": key - }, val); - } - return this.$el.find('.dropdown-menu').html(menu); - } - }; - CardView.prototype.toggleThumbs = function() { App.request("thumbsup:toggle:entity", this.model); return this.$el.toggleClass('thumbs-up'); @@ -6436,6 +6910,10 @@ this.Kodi.module("Views", function(Views, App, Backbone, Marionette, $, _) { }); }; + CardView.prototype.makeLinksExternal = function() { + return $('.title, .thumb', this.$el).attr('href', this.model.get('url')).attr('target', '_blank'); + }; + CardView.prototype.modelChange = function() { if (_.isFunction(this.setMeta)) { this.setMeta(); @@ -6658,6 +7136,113 @@ this.Kodi.module("Views", function(Views, App, Backbone, Marionette, $, _) { }); this.Kodi.module("Views", function(Views, App, Backbone, Marionette, $, _) { + var API; + API = { + createModel: function(options) { + var defaultMenu, model; + if (options == null) { + options = {}; + } + defaultMenu = { + selectall: tr('Toggle select all') + }; + model = _.extend({ + childViewTag: 'div', + ChildViewClass: '' + }, options); + if (!options.noMenuDefault) { + model.menu = _.isObject(options.menu) ? _.extend(defaultMenu, options.menu) : defaultMenu; + } + return new Backbone.Model(model); + }, + toggleSelectAll: function($el) { + var $ctx; + $ctx = $('.set__collection', $el); + return $('.card, .song', $ctx).toggleClass('selected').each(function(i, d) { + var $d, op; + $d = $(d); + op = $(d).hasClass('selected') ? 'add' : 'remove'; + return App.execute("selected:update:items", op, $d.data('model').toJSON()); + }); + } + }; + Views.SetCompositeView = (function(_super) { + __extends(SetCompositeView, _super); + + function SetCompositeView() { + return SetCompositeView.__super__.constructor.apply(this, arguments); + } + + SetCompositeView.prototype.template = 'views/set/set'; + + SetCompositeView.prototype.childView = App.Views.CardView; + + SetCompositeView.prototype.tagName = 'div'; + + SetCompositeView.prototype.className = "set__wrapper"; + + SetCompositeView.prototype.childViewContainer = ".set__collection"; + + SetCompositeView.prototype.events = { + "click .dropdown > i": "populateSetMenu", + "click .selectall": "toggleSelectAll" + }; + + SetCompositeView.prototype.initialize = function() { + return this.createModel(); + }; + + SetCompositeView.prototype.createModel = function() { + return this.model = API.createModel(this.options); + }; + + SetCompositeView.prototype.toggleSelectAll = function() { + return API.toggleSelectAll(this.$el); + }; + + return SetCompositeView; + + })(App.Views.CompositeView); + return Views.SetLayoutView = (function(_super) { + __extends(SetLayoutView, _super); + + function SetLayoutView() { + return SetLayoutView.__super__.constructor.apply(this, arguments); + } + + SetLayoutView.prototype.template = 'views/set/set'; + + SetLayoutView.prototype.tagName = 'div'; + + SetLayoutView.prototype.className = "set__wrapper"; + + SetLayoutView.prototype.regions = { + regionCollection: ".set__collection" + }; + + SetLayoutView.prototype.events = { + "click .dropdown > i": "populateSetMenu", + "click .selectall": "toggleSelectAll" + }; + + SetLayoutView.prototype.initialize = function() { + return this.createModel(); + }; + + SetLayoutView.prototype.createModel = function() { + return this.model = API.createModel(this.options); + }; + + SetLayoutView.prototype.toggleSelectAll = function() { + return API.toggleSelectAll(this.$el); + }; + + return SetLayoutView; + + })(App.Views.LayoutView); +}); + +this.Kodi.module("Views", function(Views, App, Backbone, Marionette, $, _) { return Views.SongViewPlaceholder = (function(_super) { __extends(SongViewPlaceholder, _super); @@ -7164,14 +7749,14 @@ this.Kodi.module("Components.Form", function(Form, App, Backbone, Marionette, $, return _.defer(function() { if (metadataHandler && metadataLookup && item[metadataLookup]) { $wrapper.addClass('images-loading'); - return App.execute(metadataHandler, item[metadataLookup], function(resp) { + return App.execute(metadataHandler, item[metadataLookup], function(collection) { var image, _i, _len, _ref; - if (resp) { - _ref = resp[field]; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - image = _ref[_i]; - $thumbs.append($('<li data-original="' + image.original + '"><img src="' + image.thumb + '" /></li>')); - } + _ref = collection.where({ + type: field + }); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + image = _ref[_i]; + $('<li>').data('original', image.get('url')).css('background-image', 'url(' + image.get('thumbnail') + ')').attr('title', image.get('title')).appendTo($thumbs); } return $wrapper.removeClass('images-loading'); }); @@ -8271,16 +8856,18 @@ this.Kodi.module("ArtistApp.Edit", function(Edit, App, Backbone, Marionette, $, }, { id: 'formed', title: tr('Formed'), - type: 'textfield' + type: 'textfield', + attributes: { + "class": 'half-width' + } }, { id: 'disbanded', title: tr('Disbanded'), - type: 'textfield' - }, { - id: 'yearsactive', - title: tr('Years Active'), type: 'textfield', - format: 'array.string' + attributes: { + "class": 'half-width' + }, + suffix: '<div class="clearfix"></div>' }, { id: 'born', title: tr('Born'), @@ -8296,6 +8883,11 @@ this.Kodi.module("ArtistApp.Edit", function(Edit, App, Backbone, Marionette, $, "class": 'half-width' }, suffix: '<div class="clearfix"></div>' + }, { + id: 'yearsactive', + title: tr('Years Active'), + type: 'textfield', + format: 'array.string' } ] }, { @@ -9661,11 +10253,12 @@ this.Kodi.module("CommandApp.Kodi", function(Api, App, Backbone, Marionette, $, return this.ajaxOptions = options; }; - Base.prototype.multipleCommands = function(commands, callback) { + Base.prototype.multipleCommands = function(commands, callback, fail) { var obj; obj = $.jsonrpc(commands, this.ajaxOptions); obj.fail((function(_this) { return function(error) { + _this.doCallback(fail, error); return _this.onError(commands, error); }; })(this)); @@ -9681,7 +10274,7 @@ this.Kodi.module("CommandApp.Kodi", function(Api, App, Backbone, Marionette, $, return obj; }; - Base.prototype.singleCommand = function(command, params, callback) { + Base.prototype.singleCommand = function(command, params, callback, fail) { var obj; command = { method: command, @@ -9690,7 +10283,7 @@ this.Kodi.module("CommandApp.Kodi", function(Api, App, Backbone, Marionette, $, if ((params != null) && (params.length > 0 || _.isObject(params))) { command.params = params; } - obj = this.multipleCommands([command], callback); + obj = this.multipleCommands([command], callback, fail); return obj; }; @@ -9787,11 +10380,15 @@ this.Kodi.module("CommandApp.Kodi", function(Api, App, Backbone, Marionette, $, return namespace + '.' + command; }; - Commander.prototype.sendCommand = function(command, params, callback) { - return this.singleCommand(this.getCommand(command), params, (function(_this) { + Commander.prototype.sendCommand = function(command, params, callback, fail) { + return this.singleCommand(this.getCommand(command), params, ((function(_this) { return function(resp) { return _this.doCallback(callback, resp); }; + })(this)), (function(_this) { + return function(err) { + return _this.doCallback(fail, err); + }; })(this)); }; @@ -9850,14 +10447,16 @@ this.Kodi.module("CommandApp.Kodi", function(Api, App, Backbone, Marionette, $, })(this)); }; - Player.prototype.sendCommand = function(command, params, callback) { + Player.prototype.sendCommand = function(command, params, callback, fail) { if (params == null) { params = []; } return this.getParams(params, (function(_this) { return function(playerParams) { - return _this.singleCommand(_this.getCommand(command), playerParams, function(resp) { + return _this.singleCommand(_this.getCommand(command), playerParams, (function(resp) { return _this.doCallback(callback, resp); + }), function(err) { + return _this.doCallback(fail, err); }); }; })(this)); @@ -10576,6 +11175,63 @@ this.Kodi.module("CommandApp.Kodi", function(Api, App, Backbone, Marionette, $, }); this.Kodi.module("CommandApp.Kodi", function(Api, App, Backbone, Marionette, $, _) { + return Api.System = (function(_super) { + __extends(System, _super); + + function System() { + return System.__super__.constructor.apply(this, arguments); + } + + System.prototype.commandNameSpace = 'System'; + + System.prototype.getProperties = function(callback) { + var properties; + properties = ["canshutdown", "cansuspend", "canhibernate", "canreboot"]; + return this.singleCommand(this.getCommand('GetProperties'), [properties], (function(_this) { + return function(resp) { + return _this.doCallback(callback, resp); + }; + })(this)); + }; + + System.prototype.hibernate = function(callback) { + return this.singleCommand(this.getCommand('Hibernate'), [], (function(_this) { + return function(resp) { + return _this.doCallback(callback, resp); + }; + })(this)); + }; + + System.prototype.reboot = function(callback) { + return this.singleCommand(this.getCommand('Reboot'), [], (function(_this) { + return function(resp) { + return _this.doCallback(callback, resp); + }; + })(this)); + }; + + System.prototype.shutdown = function(callback) { + return this.singleCommand(this.getCommand('Shutdown'), [], (function(_this) { + return function(resp) { + return _this.doCallback(callback, resp); + }; + })(this)); + }; + + System.prototype.suspend = function(callback) { + return this.singleCommand(this.getCommand('Shutdown'), [], (function(_this) { + return function(resp) { + return _this.doCallback(callback, resp); + }; + })(this)); + }; + + return System; + + })(Api.Commander); +}); + +this.Kodi.module("CommandApp.Kodi", function(Api, App, Backbone, Marionette, $, _) { return Api.VideoLibrary = (function(_super) { __extends(VideoLibrary, _super); @@ -10633,6 +11289,22 @@ this.Kodi.module("CommandApp.Kodi", function(Api, App, Backbone, Marionette, $, })(this)); }; + VideoLibrary.prototype.setMusicVideoDetails = function(id, fields, callback) { + var params; + if (fields == null) { + fields = {}; + } + params = { + musicvideoid: id + }; + params = _.extend(params, fields); + return this.singleCommand(this.getCommand('SetMusicVideoDetails'), params, (function(_this) { + return function(resp) { + return _this.doCallback(callback, resp); + }; + })(this)); + }; + VideoLibrary.prototype.scan = function(callback) { return this.singleCommand(this.getCommand('Scan'), (function(_this) { return function(resp) { @@ -11558,159 +12230,51 @@ this.Kodi.module("EPGApp.List", function(List, App, Backbone, Marionette, $, _) this.Kodi.module("ExternalApp", function(ExternalApp, App, Backbone, Marionette, $, _) {}); -this.Kodi.module("ExternalApp.TheMovieDB", function(Provider, App, Backbone, Marionette, $, _) { +this.Kodi.module("ExternalApp.Youtube", function(Youtube, App, Backbone, Marionette, $, _) { var API; API = { - getController: function() { - return new Provider.Controller(); - } - }; - Provider.Controller = (function(_super) { - __extends(Controller, _super); - - function Controller() { - return Controller.__super__.constructor.apply(this, arguments); - } - - Controller.prototype.apiKey = 'f7f51775877e0bb6703520952b3c7840'; - - Controller.prototype.baseURL = 'https://api.themoviedb.org/3/'; - - Controller.prototype.baseImageURL = 'https://image.tmdb.org/t/p/'; - - Controller.prototype.defaultLang = 'en'; - - Controller.prototype.maxImageCount = 15; - - Controller.prototype.thumbSize = { - backdrops: 'w300', - posters: 'w185' - }; - - Controller.prototype.fieldTranslate = { - backdrops: 'fanart', - posters: 'thumbnail' - }; - - Controller.prototype.call = function(path, params, callback) { - var defaultParams, url; - defaultParams = { - api_key: this.apiKey - }; - params = _.extend(defaultParams, params); - url = this.baseURL + path + helpers.url.buildParams(params) + '&callback=?'; - return $.getJSON(url, function(resp) { - return callback(resp); - }); - }; - - Controller.prototype.getImageURL = function(path, size) { - if (size == null) { - size = 'original'; - } - return this.baseImageURL + size + path; - }; - - Controller.prototype.addImageUrls = function(collection) { - var field, i, item, ret, row, type, types, _i, _len, _ref; - ret = {}; - types = ['backdrops', 'posters']; - for (_i = 0, _len = types.length; _i < _len; _i++) { - type = types[_i]; - field = this.fieldTranslate[type]; - ret[field] = []; - collection[type] = collection[type].slice(0, this.maxImageCount); - _ref = collection[type]; - for (i in _ref) { - item = _ref[i]; - row = item; - row.original = this.getImageURL(item.file_path, 'original'); - row.thumb = this.getImageURL(item.file_path, this.thumbSize[type]); - ret[field].push(row); - } - } - return ret; - }; - - Controller.prototype.find = function(id, source, callback) { - if (source == null) { - source = 'imdb_id'; - } - return this.call('find/' + id, { - external_source: source - }, callback); - }; - - Controller.prototype.images = function(type, tmdbId, callback) { - return this.call(type + '/' + tmdbId + '/images', { - include_image_language: this.defaultLang + ',null' - }, (function(_this) { - return function(resp) { - return callback(_this.addImageUrls(resp)); - }; - })(this)); - }; - - return Controller; - - })(App.Controllers.Base); - App.commands.setHandler("themoviedb:movie:images", function(imdbId, callback) { - var controller; - controller = API.getController(); - return controller.find(imdbId, 'imdb_id', function(resp) { - var item; - if (resp.movie_results && resp.movie_results.length > 0) { - item = _.first(resp.movie_results); - return controller.images('movie', item.id, callback); - } else { - return callback(false); + getSearchView: function(query, viewName, title, options, callback) { + if (title == null) { + title = ''; } - }); - }); - return App.commands.setHandler("themoviedb:tv:images", function(id, callback) { - var controller, idType; - controller = API.getController(); - idType = id.lastIndexOf('tt', 0) === 0 ? 'imdb_id' : 'tvdb_id'; - return controller.find(id, idType, function(resp) { - var item; - if (resp.tv_results && resp.tv_results.length > 0) { - item = _.first(resp.tv_results); - return controller.images('tv', item.id, callback); - } else { - return callback(false); + if (options == null) { + options = {}; } - }); - }); -}); - -this.Kodi.module("ExternalApp.Youtube", function(Youtube, App, Backbone, Marionette, $, _) { - var API; - API = { - getSearchView: function(query, callback) { - return App.execute("youtube:search:entities", query, function(collection) { + return App.execute("youtube:search:entities", query, options, function(collection) { var view; - view = new Youtube.List({ - collection: collection + view = new Youtube[viewName]({ + collection: collection, + title: title }); - App.listenTo(view, 'childview:youtube:kodiplay', function(parent, item) { - var playlist; - playlist = App.request("command:kodi:controller", 'video', 'PlayList'); - return playlist.play('file', 'plugin://plugin.video.youtube/play/?video_id=' + item.model.get('id')); + App.listenTo(view, 'childview:youtube:play', function(parent, item) { + if (item.model.get('addonEnabled')) { + return API.playKodi(item.model.get('id')); + } else { + return API.playLocal(item.model.get('id')); + } }); App.listenTo(view, 'childview:youtube:localplay', function(parent, item) { - var localPlayer; - localPlayer = "videoPlayer.html?yt=" + item.model.get('id'); - return helpers.global.localVideoPopup(localPlayer, 530); + return API.playLocal(item.model.get('id')); }); return callback(view); }); + }, + playLocal: function(id) { + var localPlayer; + localPlayer = "videoPlayer.html?yt=" + id; + return helpers.global.localVideoPopup(localPlayer, 530); + }, + playKodi: function(id) { + var playlist; + playlist = App.request("command:kodi:controller", 'video', 'PlayList'); + return playlist.play('file', 'plugin://plugin.video.youtube/play/?video_id=' + id); } }; App.commands.setHandler("youtube:search:view", function(query, callback) { - return API.getSearchView(query, callback); + return API.getSearchView(query, 'List', '', {}, callback); }); - return App.commands.setHandler("youtube:search:popup", function(query) { - return API.getSearchView(query, function(view) { + App.commands.setHandler("youtube:search:popup", function(query) { + return API.getSearchView(query, 'List', '', {}, function(view) { var $footer; $footer = $('<a>', { "class": 'btn btn-primary', @@ -11721,6 +12285,12 @@ this.Kodi.module("ExternalApp.Youtube", function(Youtube, App, Backbone, Marione return App.execute("ui:modal:show", query, view.render().$el, $footer); }); }); + return App.commands.setHandler("youtube:list:view", function(query, title, options, callback) { + if (options == null) { + options = {}; + } + return API.getSearchView(query, 'CardList', title, options, callback); + }); }); this.Kodi.module("ExternalApp.Youtube", function(Youtube, App, Backbone, Marionette, $, _) { @@ -11736,8 +12306,8 @@ this.Kodi.module("ExternalApp.Youtube", function(Youtube, App, Backbone, Marione Item.prototype.tagName = 'li'; Item.prototype.triggers = { - 'click .play-kodi': 'youtube:kodiplay', - 'click .play-local': 'youtube:localplay' + 'click .play': 'youtube:play', + 'click .localplay': 'youtube:localplay' }; Item.prototype.events = { @@ -11751,7 +12321,7 @@ this.Kodi.module("ExternalApp.Youtube", function(Youtube, App, Backbone, Marione return Item; })(App.Views.ItemView); - return Youtube.List = (function(_super) { + Youtube.List = (function(_super) { __extends(List, _super); function List() { @@ -11767,6 +12337,60 @@ this.Kodi.module("ExternalApp.Youtube", function(Youtube, App, Backbone, Marione return List; })(App.Views.CollectionView); + Youtube.Card = (function(_super) { + __extends(Card, _super); + + function Card() { + return Card.__super__.constructor.apply(this, arguments); + } + + Card.prototype.triggers = { + 'click .play': 'youtube:play', + 'click .localplay': 'youtube:localplay' + }; + + Card.prototype.initialize = function() { + return this.getMeta(); + }; + + Card.prototype.getMeta = function() { + if (this.model) { + this.model.set({ + subtitle: this.themeLink('YouTube', this.model.get('url'), { + external: true + }) + }); + if (this.model.get('addonEnabled')) { + return this.model.set({ + menu: { + localplay: 'Local play' + } + }); + } + } + }; + + Card.prototype.onRender = function() { + return this.makeLinksExternal(); + }; + + return Card; + + })(App.Views.CardView); + return Youtube.CardList = (function(_super) { + __extends(CardList, _super); + + function CardList() { + return CardList.__super__.constructor.apply(this, arguments); + } + + CardList.prototype.childView = Youtube.Card; + + CardList.prototype.className = "section-content card-grid--musicvideo"; + + return CardList; + + })(App.Views.SetCompositeView); }); this.Kodi.module("FilterApp", function(FilterApp, App, Backbone, Marionette, $, _) { @@ -11814,6 +12438,11 @@ this.Kodi.module("FilterApp", function(FilterApp, App, Backbone, Marionette, $, type: 'other', key: 'random', defaultOrder: 'asc' + }, { + alias: 'album', + type: 'string', + key: 'album', + defaultOrder: 'asc' } ], filterFields: [ @@ -11906,6 +12535,18 @@ this.Kodi.module("FilterApp", function(FilterApp, App, Backbone, Marionette, $, key: 'thumbsUp', sortOrder: 'asc', filterCallback: 'thumbsup' + }, { + alias: 'album', + type: 'string', + key: 'album', + sortOrder: 'asc', + filterCallback: 'multiple' + }, { + alias: 'artist', + type: 'array', + key: 'artist', + sortOrder: 'asc', + filterCallback: 'multiple' } ], getFilterFields: function(type) { @@ -13103,10 +13744,17 @@ this.Kodi.module("Images", function(Images, App, Backbone, Marionette, $, _) { default: path = API.getDefaultThumbnail(); } + } else if (type === 'trailer') { + path = API.getTrailerUrl(rawPath); } else { path = API.parseRawPath(rawPath); } return path; + }, + getTrailerUrl: function(rawpath) { + var trailer; + trailer = helpers.url.parseTrailerUrl(rawpath); + return trailer.img; } }; App.commands.setHandler("images:fanart:set", function(path, region) { @@ -13250,10 +13898,12 @@ this.Kodi.module("InputApp", function(InputApp, App, Backbone, Marionette, $, _) return this.doInput("Select"); case 67: return this.doInput("ContextMenu"); - case 107 || 187: + case 107: + case 187: vol = stateObj.getState('volume') + 5; return this.appController().setVolume((vol > 100 ? 100 : Math.ceil(vol))); - case 109 || 189: + case 109: + case 189: vol = stateObj.getState('volume') - 5; return this.appController().setVolume((vol < 0 ? 0 : Math.ceil(vol))); case 32: @@ -13342,11 +13992,11 @@ this.Kodi.module("InputApp.Remote", function(Remote, App, Backbone, Marionette, return App.execute("input:send", 'Info'); } }); - this.listenTo(view, "remote:power", function() { - var appController; - appController = App.request("command:kodi:controller", 'auto', 'Application'); - return appController.quit(); - }); + this.listenTo(view, "remote:power", (function(_this) { + return function() { + return _this.getShutdownMenu(); + }; + })(this)); App.regionRemote.show(view); return App.vent.on("state:changed", function(state) { var fanart, playingItem, stateObj; @@ -13359,13 +14009,68 @@ this.Kodi.module("InputApp.Remote", function(Remote, App, Backbone, Marionette, }); }; + Controller.prototype.getShutdownMenu = function() { + var system; + system = App.request("command:kodi:controller", 'auto', 'System'); + return system.getProperties(function(props) { + var $content, action, actions, model, optionalActions, prop, view, _i, _len; + actions = []; + optionalActions = ['shutdown', 'reboot', 'suspend', 'hibernate']; + actions.push({ + id: 'quit', + title: 'Quit Kodi' + }); + for (_i = 0, _len = optionalActions.length; _i < _len; _i++) { + action = optionalActions[_i]; + prop = 'can' + action; + if (props[prop]) { + actions.push({ + id: action, + title: action + }); + } + } + model = new Backbone.Model({ + id: 1, + actions: actions + }); + view = new Remote.System({ + model: model + }); + $content = view.render().$el; + App.execute("ui:modal:show", tr('Shutdown menu'), $content, '', false, 'system'); + return App.listenTo(view, 'system:action', (function(_this) { + return function(action) { + switch (action) { + case 'quit': + App.request("command:kodi:controller", 'auto', 'Application').quit(); + break; + case 'shutdown': + system.shutdown(); + break; + case 'reboot': + system.reboot(); + break; + case 'suspend': + system.suspend(); + break; + case 'hibernate': + system.hibernate(); + break; + } + return App.execute("ui:modal:close"); + }; + })(this)); + }); + }; + return Controller; })(App.Controllers.Base); }); this.Kodi.module("InputApp.Remote", function(Remote, App, Backbone, Marionette, $, _) { - return Remote.Control = (function(_super) { + Remote.Control = (function(_super) { __extends(Control, _super); function Control() { @@ -13415,6 +14120,30 @@ this.Kodi.module("InputApp.Remote", function(Remote, App, Backbone, Marionette, return Control; })(App.Views.ItemView); + return Remote.System = (function(_super) { + __extends(System, _super); + + function System() { + return System.__super__.constructor.apply(this, arguments); + } + + System.prototype.template = 'apps/input/remote/system'; + + System.prototype.className = 'system-menu'; + + System.prototype.events = { + 'click li': 'doAction' + }; + + System.prototype.doAction = function(e) { + var action; + action = $(e.target).data('action'); + return this.trigger('system:action', action); + }; + + return System; + + })(App.Views.ItemView); }); this.Kodi.module("InputApp.Resume", function(Resume, App, Backbone, Marionette, $, _) { @@ -13954,7 +14683,8 @@ this.Kodi.module("LandingApp", function(LandingApp, App, Backbone, Marionette, $ 'field': 'inprogress', 'value': '' }, - moreLink: 'tvshows?sort=dateadded&order=desc&inprogress=in progress' + moreLink: 'tvshows?sort=dateadded&order=desc&inprogress=in progress', + preventSelect: true }, { title: 'Recently added', entity: 'episode', @@ -14131,10 +14861,17 @@ this.Kodi.module("LandingApp.Show", function(Show, App, Backbone, Marionette, $, }); App.listenTo(setView, "show", (function(_this) { return function() { - return setView.regionResult.show(view); + return setView.regionCollection.show(view); }; })(this)); - return this.content["regionSection" + section.idx].show(setView); + App.listenTo(setView, 'landing:set:more', function(viewItem) { + return App.navigate(viewItem.model.get('section').moreLink, { + trigger: true + }); + }); + if (this.content["regionSection" + section.idx]) { + return this.content["regionSection" + section.idx].show(setView); + } }; Controller.prototype.addFilterValue = function(section) { @@ -14183,7 +14920,7 @@ this.Kodi.module("LandingApp.Show", function(Show, App, Backbone, Marionette, $, return Layout; })(App.Views.LayoutWithSidebarFirstView); - Show.Page = (function(_super) { + return Show.Page = (function(_super) { __extends(Page, _super); function Page() { @@ -14204,43 +14941,44 @@ this.Kodi.module("LandingApp.Show", function(Show, App, Backbone, Marionette, $, regionSection6: '#landing-section-6' }; - return Page; + Show.ListSet = (function(_super1) { + __extends(ListSet, _super1); - })(App.Views.LayoutView); - return Show.ListSet = (function(_super) { - __extends(ListSet, _super); + function ListSet() { + return ListSet.__super__.constructor.apply(this, arguments); + } - function ListSet() { - this.onRender = __bind(this.onRender, this); - return ListSet.__super__.constructor.apply(this, arguments); - } + ListSet.prototype.className = 'landing-set'; - ListSet.prototype.template = 'apps/landing/show/landing_set'; + ListSet.prototype.triggers = { + 'click .more': 'landing:set:more' + }; - ListSet.prototype.className = "landing-set"; + ListSet.prototype.initialize = function() { + this.setOptions(); + return this.createModel(); + }; - ListSet.prototype.onRender = function() { - var $header; - if (this.options) { - $header = $('h3.set-header', this.$el); + ListSet.prototype.setOptions = function() { + this.options.menu = {}; if (this.options.filter !== false && this.options.section.title) { - $header.html(t.sprintf(tr(this.options.section.title), this.options.filter)); + this.options.title = t.sprintf(tr(this.options.section.title), this.options.filter); } else if (this.options.section.title) { - $header.html(tr(this.options.section.title)); + this.options.title = tr(this.options.section.title); } - if (this.options.filter !== false && this.options.section.moreLink) { - return $header.append(this.themeLink(tr('more'), this.options.section.moreLink + this.options.filter)); - } else if (this.options.section.moreLink) { - return $header.append(this.themeLink(tr('more'), this.options.section.moreLink)); + if (this.options.section.moreLink) { + this.options.menu.more = tr('More like this'); } - } - }; + if (this.options.section.preventSelect) { + return this.options.noMenuDefault = true; + } + }; - ListSet.prototype.regions = { - regionResult: '.set-results' - }; + return ListSet; - return ListSet; + })(App.Views.SetLayoutView); + + return Page; })(App.Views.LayoutView); }); @@ -14919,13 +15657,19 @@ this.Kodi.module("MovieApp.Edit", function(Edit, App, Backbone, Marionette, $, _ } ] }, { - title: 'Other media', - id: 'media', + title: 'Trailer', + id: 'trailers', children: [ { id: 'trailer', - title: tr('Trailer'), - type: 'textfield' + title: tr('URL'), + type: 'imageselect', + attributes: { + "class": 'fanart-size' + }, + description: t.sprintf(tr('This should be the play path for the trailer. Eg. %1$s'), 'plugin://plugin.video.youtube/?action=play_video&videoid=[YOUTUBE_ID]'), + metadataImageHandler: 'youtube:trailer:entities', + metadataLookupField: 'title' } ] }, { @@ -14938,7 +15682,7 @@ this.Kodi.module("MovieApp.Edit", function(Edit, App, Backbone, Marionette, $, _ type: 'imageselect', valueProperty: 'thumbnailOriginal', description: tr('Add an image via an external URL'), - metadataImageHandler: 'themoviedb:movie:images', + metadataImageHandler: 'themoviedb:movie:image:entities', metadataLookupField: 'imdbnumber' } ] @@ -14952,7 +15696,7 @@ this.Kodi.module("MovieApp.Edit", function(Edit, App, Backbone, Marionette, $, _ type: 'imageselect', valueProperty: 'fanartOriginal', description: tr('Add an image via an external URL'), - metadataImageHandler: 'themoviedb:movie:images', + metadataImageHandler: 'themoviedb:movie:image:entities', metadataLookupField: 'imdbnumber' } ] @@ -15626,6 +16370,594 @@ this.Kodi.module("MovieApp.Show", function(Show, App, Backbone, Marionette, $, _ })(App.Views.LayoutView); }); +this.Kodi.module("MusicVideoApp.Edit", function(Edit, App, Backbone, Marionette, $, _) { + return Edit.Controller = (function(_super) { + __extends(Controller, _super); + + function Controller() { + return Controller.__super__.constructor.apply(this, arguments); + } + + Controller.prototype.initialize = function() { + var form, options; + this.model = this.getOption('model'); + options = { + title: '<span>' + tr('Edit') + '</span>' + this.model.get('title'), + form: this.getStructure(), + formState: this.model.attributes, + config: { + attributes: { + "class": 'edit-form' + }, + editForm: true, + tabs: true, + callback: (function(_this) { + return function(data, formView) { + return _this.saveCallback(data, formView); + }; + })(this) + } + }; + return form = App.request("form:popup:wrapper", options); + }; + + Controller.prototype.getStructure = function() { + return [ + { + title: 'General', + id: 'general', + children: [ + { + id: 'title', + title: tr('Title'), + type: 'textfield' + }, { + id: 'artist', + title: tr('Artist'), + type: 'textfield', + format: 'array.string' + }, { + id: 'album', + title: tr('Album'), + type: 'textfield' + }, { + id: 'plot', + title: tr('Plot'), + type: 'textarea' + }, { + id: 'studio', + title: tr('Studio'), + type: 'textfield', + format: 'array.string' + }, { + id: 'year', + title: tr('Year'), + type: 'number', + format: 'integer', + attributes: { + "class": 'half-width', + step: 1, + min: 0, + max: 9999 + } + }, { + id: 'rating', + title: tr('Rating'), + type: 'number', + format: 'float', + attributes: { + "class": 'half-width', + step: 0.1, + min: 0, + max: 10 + }, + suffix: '<div class="clearfix"></div>' + } + ] + }, { + title: 'Tags', + id: 'tags', + children: [ + { + id: 'director', + title: tr('Directors'), + type: 'textfield', + format: 'array.string' + }, { + id: 'genre', + title: tr('Genres'), + type: 'textfield', + format: 'array.string' + }, { + id: 'tag', + title: tr('Tags'), + type: 'textfield', + format: 'array.string' + } + ] + }, { + title: 'Poster', + id: 'poster', + children: [ + { + id: 'thumbnail', + title: tr('URL'), + type: 'imageselect', + valueProperty: 'thumbnailOriginal', + description: tr('Add an image via an external URL'), + attributes: { + "class": 'fanart-size' + }, + metadataImageHandler: 'fanarttv:artist:image:entities', + metadataLookupField: 'artist' + } + ] + }, { + title: 'Background', + id: 'background', + children: [ + { + id: 'fanart', + title: tr('URL'), + type: 'imageselect', + valueProperty: 'fanartOriginal', + description: tr('Add an image via an external URL'), + metadataImageHandler: 'fanarttv:artist:image:entities', + metadataLookupField: 'artist' + } + ] + }, { + title: 'Information', + id: 'info', + children: [ + { + id: 'file', + title: tr('File path'), + type: 'textarea', + attributes: { + disabled: 'disabled', + cols: 5 + }, + format: 'prevent.submit' + } + ] + } + ]; + }; + + Controller.prototype.saveCallback = function(data, formView) { + var controller; + controller = App.request("command:kodi:controller", 'audio', 'VideoLibrary'); + return controller.setMusicVideoDetails(this.model.get('id'), data, (function(_this) { + return function() { + Kodi.vent.trigger('entity:kodi:update', _this.model.get('uid')); + return Kodi.execute("notification:show", t.sprintf(tr("Updated %1$s details"), 'album')); + }; + })(this)); + }; + + return Controller; + + })(App.Controllers.Base); +}); + +this.Kodi.module("MusicVideoApp.List", function(List, App, Backbone, Marionette, $, _) { + var API; + API = { + bindTriggers: function(view) { + App.listenTo(view, 'childview:musicvideo:play', function(parent, viewItem) { + return App.execute('musicvideo:action', 'play', viewItem); + }); + App.listenTo(view, 'childview:musicvideo:add', function(parent, viewItem) { + return App.execute('musicvideo:action', 'add', viewItem); + }); + App.listenTo(view, 'childview:musicvideo:localplay', function(parent, viewItem) { + return App.execute('musicvideo:action', 'localplay', viewItem); + }); + App.listenTo(view, 'childview:musicvideo:download', function(parent, viewItem) { + return App.execute('musicvideo:action', 'download', viewItem); + }); + App.listenTo(view, 'childview:musicvideo:edit', function(parent, viewItem) { + return App.execute('musicvideo:edit', viewItem.model); + }); + return view; + }, + getVideoList: function(collection) { + var view; + view = new List.Videos({ + collection: collection + }); + API.bindTriggers(view); + return view; + } + }; + List.Controller = (function(_super) { + __extends(Controller, _super); + + function Controller() { + return Controller.__super__.constructor.apply(this, arguments); + } + + Controller.prototype.initialize = function() { + var collection; + collection = App.request("musicvideo:entities"); + return App.execute("when:entity:fetched", collection, (function(_this) { + return function() { + collection.availableFilters = _this.getAvailableFilters(); + collection.sectionId = 'music'; + App.request('filter:init', _this.getAvailableFilters()); + _this.layout = _this.getLayoutView(collection); + _this.listenTo(_this.layout, "show", function() { + _this.renderList(collection); + return _this.getFiltersView(collection); + }); + return App.regionContent.show(_this.layout); + }; + })(this)); + }; + + Controller.prototype.getLayoutView = function(collection) { + return new List.ListLayout({ + collection: collection + }); + }; + + Controller.prototype.getAvailableFilters = function() { + return { + sort: ['label', 'year', 'artist', 'album'], + filter: ['studio', 'director', 'artist', 'album', 'year'] + }; + }; + + Controller.prototype.getFiltersView = function(collection) { + var filters; + filters = App.request('filter:show', collection); + this.layout.regionSidebarFirst.show(filters); + return this.listenTo(filters, "filter:changed", (function(_this) { + return function() { + return _this.renderList(collection); + }; + })(this)); + }; + + Controller.prototype.renderList = function(collection) { + var filteredCollection, view; + App.execute("loading:show:view", this.layout.regionContent); + filteredCollection = App.request('filter:apply:entities', collection); + view = API.getVideoList(filteredCollection); + return this.layout.regionContent.show(view); + }; + + return Controller; + + })(App.Controllers.Base); + return App.reqres.setHandler("musicvideo:list:view", function(collection) { + return API.getVideoList(collection); + }); +}); + +this.Kodi.module("MusicVideoApp.List", function(List, App, Backbone, Marionette, $, _) { + List.ListLayout = (function(_super) { + __extends(ListLayout, _super); + + function ListLayout() { + return ListLayout.__super__.constructor.apply(this, arguments); + } + + ListLayout.prototype.className = "musicvideo-list with-filters"; + + return ListLayout; + + })(App.Views.LayoutWithSidebarFirstView); + List.Teaser = (function(_super) { + __extends(Teaser, _super); + + function Teaser() { + return Teaser.__super__.constructor.apply(this, arguments); + } + + Teaser.prototype.triggers = { + "click .play": "musicvideo:play", + "click .add": "musicvideo:add", + 'click .stream': 'musicvideo:localplay', + 'click .download': 'musicvideo:download', + 'click .edit': 'musicvideo:edit', + 'click .refresh': 'musicvideo:refresh' + }; + + Teaser.prototype.initialize = function() { + Teaser.__super__.initialize.apply(this, arguments); + if (this.model != null) { + this.setMeta(); + return this.model.set(App.request('musicvideo:action:items')); + } + }; + + Teaser.prototype.setMeta = function() { + var artist, artistLink; + if (this.model) { + artist = this.model.get('artist') !== '' ? this.model.get('artist') : ' '; + artistLink = this.themeLink(artist, 'search/artist/' + artist); + return this.model.set({ + subtitle: artistLink + }); + } + }; + + return Teaser; + + })(App.Views.CardView); + List.Empty = (function(_super) { + __extends(Empty, _super); + + function Empty() { + return Empty.__super__.constructor.apply(this, arguments); + } + + Empty.prototype.tagName = "li"; + + Empty.prototype.className = "musicvideo-empty-result"; + + return Empty; + + })(App.Views.EmptyViewResults); + return List.Videos = (function(_super) { + __extends(Videos, _super); + + function Videos() { + return Videos.__super__.constructor.apply(this, arguments); + } + + Videos.prototype.childView = List.Teaser; + + Videos.prototype.emptyView = List.Empty; + + Videos.prototype.tagName = "ul"; + + Videos.prototype.className = "card-grid--musicvideo"; + + return Videos; + + })(App.Views.VirtualListView); +}); + +this.Kodi.module("MusicVideoApp", function(MusicVideoApp, App, Backbone, Marionette, $, _) { + var API; + MusicVideoApp.Router = (function(_super) { + __extends(Router, _super); + + function Router() { + return Router.__super__.constructor.apply(this, arguments); + } + + Router.prototype.appRoutes = { + "music/videos": "list", + "music/video/:id": "view" + }; + + return Router; + + })(App.Router.Base); + API = { + list: function() { + return new MusicVideoApp.List.Controller(); + }, + view: function(id) { + return new MusicVideoApp.Show.Controller({ + id: id + }); + }, + action: function(op, view) { + var files, model, playlist, videoLib; + model = view.model; + playlist = App.request("command:kodi:controller", 'video', 'PlayList'); + files = App.request("command:kodi:controller", 'video', 'Files'); + videoLib = App.request("command:kodi:controller", 'video', 'VideoLibrary'); + switch (op) { + case 'play': + return App.execute("input:resume", model, 'musicvideoid'); + case 'add': + return playlist.add('musicvideoid', model.get('musicvideoid')); + case 'localplay': + return files.videoStream(model.get('file'), model.get('fanart')); + case 'download': + return files.downloadFile(model.get('file')); + case 'refresh': + return helpers.entities.refreshEntity(model, videoLib, 'refreshMusicVideo'); + } + } + }; + App.on("before:start", function() { + return new MusicVideoApp.Router({ + controller: API + }); + }); + App.commands.setHandler('musicvideo:action', function(op, model) { + return API.action(op, model); + }); + App.reqres.setHandler('musicvideo:action:items', function() { + return { + actions: { + thumbs: tr('Thumbs up') + }, + menu: { + 'add': tr('Queue in Kodi'), + 'divider-1': '', + 'download': tr('Download'), + 'stream': tr('Play in browser'), + 'divider-2': '', + 'edit': tr('Edit') + } + }; + }); + return App.commands.setHandler('musicvideo:edit', function(model) { + var loadedModel; + loadedModel = App.request("musicvideo:entity", model.get('id')); + return App.execute("when:entity:fetched", loadedModel, (function(_this) { + return function() { + return new MusicVideoApp.Edit.Controller({ + model: loadedModel + }); + }; + })(this)); + }); +}); + +this.Kodi.module("MusicVideoApp.Show", function(Show, App, Backbone, Marionette, $, _) { + var API; + API = { + bindTriggers: function(view) { + App.listenTo(view, 'musicvideo:play', function(viewItem) { + return App.execute('musicvideo:action', 'play', viewItem); + }); + App.listenTo(view, 'musicvideo:add', function(viewItem) { + return App.execute('musicvideo:action', 'add', viewItem); + }); + App.listenTo(view, 'musicvideo:localplay', function(viewItem) { + return App.execute('musicvideo:action', 'localplay', viewItem); + }); + App.listenTo(view, 'musicvideo:download', function(viewItem) { + return App.execute('musicvideo:action', 'download', viewItem); + }); + App.listenTo(view, 'musicvideo:edit', function(viewItem) { + return App.execute('musicvideo:edit', viewItem.model); + }); + return view; + } + }; + return Show.Controller = (function(_super) { + __extends(Controller, _super); + + function Controller() { + return Controller.__super__.constructor.apply(this, arguments); + } + + Controller.prototype.initialize = function(options) { + var id, musicvideo; + id = parseInt(options.id); + musicvideo = App.request("musicvideo:entity", id); + return App.execute("when:entity:fetched", musicvideo, (function(_this) { + return function() { + _this.layout = _this.getLayoutView(musicvideo); + _this.listenTo(_this.layout, "show", function() { + _this.getDetailsLayoutView(musicvideo); + return _this.getRelatedVideos(musicvideo); + }); + return App.regionContent.show(_this.layout); + }; + })(this)); + }; + + Controller.prototype.getLayoutView = function(musicvideo) { + return new Show.PageLayout({ + model: musicvideo + }); + }; + + Controller.prototype.getDetailsLayoutView = function(musicvideo) { + var headerLayout; + headerLayout = new Show.HeaderLayout({ + model: musicvideo + }); + this.listenTo(headerLayout, "show", (function(_this) { + return function() { + var detail, teaser; + teaser = new Show.DetailTeaser({ + model: musicvideo + }); + API.bindTriggers(teaser); + detail = new Show.Details({ + model: musicvideo + }); + _this.listenTo(detail, "show", function() { + return API.bindTriggers(detail); + }); + headerLayout.regionSide.show(teaser); + return headerLayout.regionMeta.show(detail); + }; + })(this)); + return this.layout.regionHeader.show(headerLayout); + }; + + Controller.prototype.getRelatedVideos = function(musicvideo) { + var opts, title; + title = tr('Related music videos from YouTube'); + opts = { + maxResults: 8 + }; + return App.execute('youtube:list:view', musicvideo.get('title') + ' ' + musicvideo.get('artist'), title, opts, (function(_this) { + return function(view) { + return _this.layout.regionContent.show(view); + }; + })(this)); + }; + + return Controller; + + })(App.Controllers.Base); +}); + +this.Kodi.module("MusicVideoApp.Show", function(Show, App, Backbone, Marionette, $, _) { + Show.PageLayout = (function(_super) { + __extends(PageLayout, _super); + + function PageLayout() { + return PageLayout.__super__.constructor.apply(this, arguments); + } + + PageLayout.prototype.className = 'musicvideo-show detail-container'; + + return PageLayout; + + })(App.Views.LayoutWithHeaderView); + Show.HeaderLayout = (function(_super) { + __extends(HeaderLayout, _super); + + function HeaderLayout() { + return HeaderLayout.__super__.constructor.apply(this, arguments); + } + + HeaderLayout.prototype.className = 'musicvideo-details'; + + return HeaderLayout; + + })(App.Views.LayoutDetailsHeaderView); + Show.Details = (function(_super) { + __extends(Details, _super); + + function Details() { + return Details.__super__.constructor.apply(this, arguments); + } + + Details.prototype.template = 'apps/musicvideo/show/details_meta'; + + Details.prototype.triggers = { + "click .play": "musicvideo:play", + "click .add": "musicvideo:add", + "click .download": "musicvideo:download", + "click .localplay": "musicvideo:localplay", + "click .edit": "musicvideo:edit" + }; + + return Details; + + })(App.Views.DetailsItem); + return Show.DetailTeaser = (function(_super) { + __extends(DetailTeaser, _super); + + function DetailTeaser() { + return DetailTeaser.__super__.constructor.apply(this, arguments); + } + + DetailTeaser.prototype.attributes = function() { + return this.watchedAttributes('card-detail'); + }; + + return DetailTeaser; + + })(App.MusicVideoApp.List.Teaser); +}); + this.Kodi.module("NavMain", function(NavMain, App, Backbone, Marionette, $, _) { var API; API = { @@ -16756,16 +18088,23 @@ this.Kodi.module("SearchApp.List", function(List, App, Backbone, Marionette, $, Controller.prototype.maxItemsCombinedSearch = 21; - Controller.prototype.allEntities = ['movie', 'tvshow', 'artist', 'album', 'song']; + Controller.prototype.allEntities = ['movie', 'tvshow', 'artist', 'album', 'song', 'musicvideo']; Controller.prototype.searchFieldMap = { artist: 'artist', album: 'album', song: 'title', movie: 'title', - tvshow: 'title' + tvshow: 'title', + musicvideo: 'title' }; + Controller.prototype.entityTitles = { + musicvideo: 'music video' + }; + + Controller.prototype.entityPreventSelect = ['tvshow']; + Controller.prototype.initialize = function() { var media; this.pageLayout = this.getPageLayout(); @@ -16773,6 +18112,7 @@ this.Kodi.module("SearchApp.List", function(List, App, Backbone, Marionette, $, this.processed = []; this.processedItems = 0; this.addonSearches = App.request("addon:search:enabled"); + App.execute("selected:clear:items"); media = this.getOption('media'); if (media === 'all') { this.entities = this.allEntities; @@ -16826,7 +18166,7 @@ this.Kodi.module("SearchApp.List", function(List, App, Backbone, Marionette, $, media = _ref[_i]; medias.push({ id: media, - title: media + 's' + title: this.getTitle(media) + 's' }); } opts = { @@ -16886,10 +18226,11 @@ this.Kodi.module("SearchApp.List", function(List, App, Backbone, Marionette, $, entity: entity, more: more, query: query, - title: entity + 's' + title: _this.getTitle(entity) + 's', + noMenuDefault: helpers.global.inArray(entity, _this.entityPreventSelect) }); App.listenTo(setView, "show", function() { - return setView.regionResult.show(view); + return setView.regionCollection.show(view); }); _this.layout["" + entity + "Set"].show(setView); } @@ -16926,7 +18267,8 @@ this.Kodi.module("SearchApp.List", function(List, App, Backbone, Marionette, $, entity: addonSearch.title, title: i === 1 ? addonSearch.title : '', more: false, - query: _this.getOption('query') + query: _this.getOption('query'), + noMenuDefault: true }); App.listenTo(setView, "show", function() { return setView.regionResult.show(filesView); @@ -16941,6 +18283,12 @@ this.Kodi.module("SearchApp.List", function(List, App, Backbone, Marionette, $, return App.request("file:entities", opts); }; + Controller.prototype.getTitle = function(entity) { + var title; + title = this.entityTitles[entity] ? this.entityTitles[entity] : entity; + return title; + }; + Controller.prototype.updateProgress = function(done) { if (done != null) { this.processed.push(done); @@ -16981,7 +18329,7 @@ this.Kodi.module("SearchApp.List", function(List, App, Backbone, Marionette, $, ListLayout.prototype.template = 'apps/search/list/search_layout'; - ListLayout.prototype.className = "search-page set-page"; + ListLayout.prototype.className = "search-page"; ListLayout.prototype.regions = { artistSet: '.entity-set-artist', @@ -16989,6 +18337,7 @@ this.Kodi.module("SearchApp.List", function(List, App, Backbone, Marionette, $, songSet: '.entity-set-song', movieSet: '.entity-set-movie', tvshowSet: '.entity-set-tvshow', + musicvideoSet: '.entity-set-musicvideo', loadingSet: '.entity-set-loading' }; @@ -17000,40 +18349,31 @@ this.Kodi.module("SearchApp.List", function(List, App, Backbone, Marionette, $, return this[addonViewId].show(addonView); }; - return ListLayout; + List.ListSet = (function(_super1) { + __extends(ListSet, _super1); - })(App.Views.LayoutView); - List.ListSet = (function(_super) { - __extends(ListSet, _super); - - function ListSet() { - return ListSet.__super__.constructor.apply(this, arguments); - } + function ListSet() { + return ListSet.__super__.constructor.apply(this, arguments); + } - ListSet.prototype.template = 'apps/search/list/search_set'; + ListSet.prototype.className = "search-set landing-set"; - ListSet.prototype.className = "search-set"; + ListSet.prototype.initialize = function() { + this.setOptions(); + return this.createModel(); + }; - ListSet.prototype.onRender = function() { - var moreLink; - if (this.options && this.options.entity) { - if (this.options.title) { - $('h2.set-header', this.$el).html(t.gettext(this.options.title)); - } else { - $('h2.set-header', this.$el).remove(); - } + ListSet.prototype.setOptions = function() { if (this.options.more && this.options.query) { - moreLink = this.themeLink(t.gettext('Show more'), 'search/' + this.options.entity + '/' + this.options.query); - return $('.more', this.$el).html(moreLink); + return this.options.more = this.themeLink(t.gettext('Show more'), 'search/' + this.options.entity + '/' + this.options.query); } - } - }; + }; - ListSet.prototype.regions = { - regionResult: '.set-results' - }; + return ListSet; - return ListSet; + })(App.Views.SetLayoutView); + + return ListLayout; })(App.Views.LayoutView); return List.Sidebar = (function(_super) { @@ -18136,14 +19476,16 @@ this.Kodi.module("SettingsApp.Show.navMain", function(NavMain, App, Backbone, Ma $(this).closest('.add-another-wrapper').before(formView.render().$el); return self.binds(); }); - $('.form-groups', $ctx).sortable({ - draggable: ".draggable-row", - onEnd: function(e) { - return $('input[id^="form-edit-weight-"]', e.target).each(function(i, d) { - return $(d).attr('value', i); - }); - } - }); + if ($(window).width() > config.getLocal('largeBreakpoint')) { + $('.form-groups', $ctx).sortable({ + draggable: ".draggable-row", + onEnd: function(e) { + return $('input[id^="form-edit-weight-"]', e.target).each(function(i, d) { + return $(d).attr('value', i); + }); + } + }); + } return $('.nav-restore-defaults', $ctx).on("click", (function(_this) { return function(e) { e.preventDefault(); @@ -18298,14 +19640,16 @@ this.Kodi.module("SettingsApp.Show.Search", function(Search, App, Backbone, Mari $ctx = this.layout.regionContent.$el; $('.settings-form').addClass('settings-form-draggable'); this.binds(); - $('.form-groups', $ctx).sortable({ - draggable: ".draggable-row", - onEnd: function(e) { - return $('input[id^="form-edit-weight-"]', e.target).each(function(i, d) { - return $(d).attr('value', i); - }); - } - }); + if ($(window).width() > config.getLocal('largeBreakpoint')) { + $('.form-groups', $ctx).sortable({ + draggable: ".draggable-row", + onEnd: function(e) { + return $('input[id^="form-edit-weight-"]', e.target).each(function(i, d) { + return $(d).attr('value', i); + }); + } + }); + } $('#form-edit-add-another', $ctx).click(function(e) { var blank, formView, row; e.preventDefault(); @@ -18513,6 +19857,11 @@ this.Kodi.module("Shell", function(Shell, App, Backbone, Marionette, $, _) { return _this.alterRegionClasses('toggle', "shell-playlist-closed"); }; })(this)); + App.listenTo(shellLayout, "shell:reconnect", (function(_this) { + return function() { + return App.execute('shell:reconnect'); + }; + })(this)); this.bindListenersContextMenu(shellLayout); return this.bindListenersSelectedMenu(shellLayout); }, @@ -18575,7 +19924,7 @@ this.Kodi.module("Shell", function(Shell, App, Backbone, Marionette, $, _) { }); } }; - return App.addInitializer(function() { + App.addInitializer(function() { return App.commands.setHandler("shell:view:ready", function() { API.renderLayout(); new Shell.Router({ @@ -18587,6 +19936,18 @@ this.Kodi.module("Shell", function(Shell, App, Backbone, Marionette, $, _) { }); }); }); + App.commands.setHandler('shell:reconnect', function() { + API.alterRegionClasses('add', 'reconnecting'); + return helpers.connection.reconnect(function() { + API.alterRegionClasses('remove', 'lost-connection'); + return API.alterRegionClasses('remove', 'reconnecting'); + }); + }); + return App.commands.setHandler('shell:disconnect', function() { + API.alterRegionClasses('add', 'lost-connection'); + API.alterRegionClasses('remove', 'reconnecting'); + return helpers.connection.disconnect(function() {}); + }); }); this.Kodi.module("Shell", function(Shell, App, Backbone, Marionette, $, _) { @@ -18628,7 +19989,8 @@ this.Kodi.module("Shell", function(Shell, App, Backbone, Marionette, $, _) { "click .about": "shell:about", "click .selected-play": "shell:selected:play", "click .selected-add": "shell:selected:add", - "click .selected-localadd": "shell:selected:localadd" + "click .selected-localadd": "shell:selected:localadd", + "click .reconnect": "shell:reconnect" }; Layout.prototype.events = { @@ -18922,7 +20284,7 @@ this.Kodi.module("SongApp.List", function(List, App, Backbone, Marionette, $, _) }; Song.prototype.events = { - "click .dropdown > i": "menuPopulate", + "click .dropdown > i": "populateModelMenu", "click .thumbs": "toggleThumbs", "click": "toggleSelect" }; @@ -19308,7 +20670,12 @@ this.Kodi.module("StateApp.Kodi", function(StateApp, App, Backbone, Marionette, ws.onclose = (function(_this) { return function(resp) { helpers.debug.msg("Websockets Closed", "warning", resp); - return _this.wsActive = false; + _this.wsActive = false; + App.execute("notification:show", tr("Lost websocket connection")); + return setTimeout(function() { + App.execute("notification:show", tr("Attempting websockets reconnect")); + return App.execute('state:ws:init'); + }, 60000); }; })(this); } else { @@ -19462,6 +20829,11 @@ this.Kodi.module("StateApp.Kodi", function(StateApp, App, Backbone, Marionette, break; case 'System.OnQuit': App.execute("notification:show", t.gettext("Kodi has quit")); + App.execute("shell:disconnect"); + break; + case 'System.OnWake': + case 'System.OnRestart': + App.execute("shell:reconnect"); break; } }; @@ -19509,11 +20881,15 @@ this.Kodi.module("StateApp.Kodi", function(StateApp, App, Backbone, Marionette, }; Polling.prototype.update = function() { + if (config.getLocal('connected', true) === false) { + return; + } if (App.kodiPolling.failures < App.kodiPolling.maxFailures) { App.kodiPolling.updateState(); return App.kodiPolling.timeout = setTimeout(App.kodiPolling.ping, App.kodiPolling.currentInterval); } else { - return App.execute("notification:show", t.gettext("Unable to communicate with Kodi in a long time. I think it's dead Jim!")); + App.execute("notification:show", t.gettext("Unable to communicate with Kodi in a long time. I think it's dead Jim!")); + return App.execute("shell:disconnect"); } }; @@ -19728,6 +21104,9 @@ this.Kodi.module("StateApp", function(StateApp, App, Backbone, Marionette, $, _) stateObj = App.kodiState.getPlayer() === 'kodi' ? App.kodiState : App.localState; return stateObj; }); + App.commands.setHandler('state:ws:init', function() { + return App.kodiSockets = new StateApp.Kodi.Notifications(); + }); return App.vent.trigger("state:changed"); } }; @@ -19744,10 +21123,14 @@ this.Kodi.module("ThumbsApp.List", function(List, App, Backbone, Marionette, $, return Controller.__super__.constructor.apply(this, arguments); } + Controller.prototype.entityTitles = { + musicvideo: 'music video' + }; + Controller.prototype.initialize = function() { var entities; this.layout = this.getLayout(); - entities = ['song', 'artist', 'album', 'tvshow', 'movie', 'episode']; + entities = ['song', 'artist', 'album', 'tvshow', 'movie', 'episode', 'musicvideo']; this.listenTo(this.layout, "show", (function(_this) { return function() { var entity, _i, _len, _results; @@ -19774,7 +21157,7 @@ this.Kodi.module("ThumbsApp.List", function(List, App, Backbone, Marionette, $, if (loaded.length > 0) { view = App.request("" + entity + ":list:view", loaded, true); setView = new List.ListSet({ - entity: entity + entity: this.getTitle(entity) }); App.listenTo(setView, "show", (function(_this) { return function() { @@ -19785,6 +21168,12 @@ this.Kodi.module("ThumbsApp.List", function(List, App, Backbone, Marionette, $, } }; + Controller.prototype.getTitle = function(entity) { + var title; + title = this.entityTitles[entity] ? this.entityTitles[entity] : entity; + return title; + }; + return Controller; })(App.Controllers.Base); @@ -19808,7 +21197,8 @@ this.Kodi.module("ThumbsApp.List", function(List, App, Backbone, Marionette, $, songSet: '.entity-set-song', movieSet: '.entity-set-movie', tvshowSet: '.entity-set-tvshow', - episodeSet: '.entity-set-episode' + episodeSet: '.entity-set-episode', + musicvideoSet: '.entity-set-musicvideo' }; return ListLayout; @@ -20111,7 +21501,7 @@ this.Kodi.module("TVShowApp.EditShow", function(Edit, App, Backbone, Marionette, type: 'imageselect', valueProperty: 'thumbnailOriginal', description: tr('Add an image via an external URL'), - metadataImageHandler: 'themoviedb:tv:images', + metadataImageHandler: 'themoviedb:tv:image:entities', metadataLookupField: 'imdbnumber' } ] @@ -20125,7 +21515,7 @@ this.Kodi.module("TVShowApp.EditShow", function(Edit, App, Backbone, Marionette, type: 'imageselect', valueProperty: 'fanartOriginal', description: tr('Add an image via an external URL'), - metadataImageHandler: 'themoviedb:tv:images', + metadataImageHandler: 'themoviedb:tv:image:entities', metadataLookupField: 'imdbnumber' } ] @@ -20328,7 +21718,7 @@ this.Kodi.module("TVShowApp.Episode", function(Episode, App, Backbone, Marionett }; EpisodeTeaser.prototype.setMeta = function() { - var epNum, epNumFull, showLink; + var epNum, epNumFull, showLink, subTitleTip; epNum = this.themeTag('span', { "class": 'ep-num' }, this.model.get('season') + 'x' + this.model.get('episode') + ' '); @@ -20338,9 +21728,12 @@ this.Kodi.module("TVShowApp.Episode", function(Episode, App, Backbone, Marionett showLink = this.themeLink(this.model.get('showtitle') + ' ', 'tvshow/' + this.model.get('tvshowid'), { className: 'show-name' }); + subTitleTip = this.model.get('firstaired') ? { + title: tr('First aired') + ': ' + this.model.get('firstaired') + } : {}; return this.model.set({ label: epNum + this.model.get('title'), - subtitle: showLink + epNumFull + subtitle: this.themeTag('div', subTitleTip, showLink + epNumFull) }); }; @@ -21483,17 +22876,26 @@ this.Kodi.module("UiApp", function(UiApp, App, Backbone, Marionette, $, _) { API.confirmButtons(function() { return callback(true); }); - return API.openModal(title, msg, true); + return API.openModal(title, msg, true, 'confirm'); }); - App.commands.setHandler("ui:modal:show", function(title, msg, footer) { + App.commands.setHandler("ui:modal:show", function(title, msg, footer, closeButton, style) { if (msg == null) { msg = ''; } if (footer == null) { footer = ''; } + if (closeButton == null) { + closeButton = false; + } + if (style == null) { + style = ''; + } API.getModalButtonContainer().html(footer); - return API.openModal(title, msg, open); + if (closeButton) { + API.getModalButtonContainer().prepend(API.closeModalButton()); + } + return API.openModal(title, msg, true, style); }); App.commands.setHandler("ui:modal:form:show", function(title, msg, style) { if (msg == null) { |