/*
 jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
 Math.uuid.js (v1.4)
http://www.broofa.com
mailto:robert@broofa.com

Copyright (c) 2010 Robert Kieffer
Dual licensed under the MIT and GPL licenses.
 Waypoints - 4.0.0
Copyright © 2011-2015 Caleb Troughton
Licensed under the MIT license.
https://github.com/imakewebthings/waypoints/blog/master/licenses.txt
*/
(function(a,f){function k(g){var a=g.length,b=h.type(g);return h.isWindow(g)?!1:1===g.nodeType&&a?!0:"array"===b||"function"!==b&&(0===a||"number"==typeof a&&0<a&&a-1 in g)}function m(g){var a=Pa[g]={};return h.each(g.match(ja)||[],function(g,b){a[b]=!0}),a}function e(g,a,b,c){if(h.acceptData(g)){var r,d,H=h.expando,e=g.nodeType,l=e?h.cache:g,T=e?g[H]:g[H]&&H;if(T&&l[T]&&(c||l[T].data)||b!==f||"string"!=typeof a)return T||(T=e?g[H]=da.pop()||h.guid++:H),l[T]||(l[T]=e?{}:{toJSON:h.noop}),("object"==
typeof a||"function"==typeof a)&&(c?l[T]=h.extend(l[T],a):l[T].data=h.extend(l[T].data,a)),d=l[T],c||(d.data||(d.data={}),d=d.data),b!==f&&(d[h.camelCase(a)]=b),"string"==typeof a?(r=d[a],null==r&&(r=d[h.camelCase(a)])):r=d,r}}function c(g,a,b){if(h.acceptData(g)){var c,r,H=g.nodeType,e=H?h.cache:g,l=H?g[h.expando]:h.expando;if(e[l]){if(a&&(c=b?e[l]:e[l].data)){h.isArray(a)?a=a.concat(h.map(a,h.camelCase)):a in c?a=[a]:(a=h.camelCase(a),a=a in c?[a]:a.split(" "));for(r=a.length;r--;)delete c[a[r]];
if(b?!d(c):!h.isEmptyObject(c))return}(b||(delete e[l].data,d(e[l])))&&(H?h.cleanData([g],!0):h.support.deleteExpando||e!=e.window?delete e[l]:e[l]=null)}}}function b(g,a,b){if(b===f&&1===g.nodeType){var c="data-"+a.replace(Hb,"-$1").toLowerCase();if(b=g.getAttribute(c),"string"==typeof b){try{b="true"===b?!0:"false"===b?!1:"null"===b?null:+b+""===b?+b:Qa.test(b)?h.parseJSON(b):b}catch(Gb){}h.data(g,a,b)}else b=f}return b}function d(g){for(var a in g)if(("data"!==a||!h.isEmptyObject(g[a]))&&"toJSON"!==
a)return!1;return!0}function l(){return!0}function p(){return!1}function t(){try{return u.activeElement}catch(g){}}function C(g,a){do g=g[a];while(g&&1!==g.nodeType);return g}function v(g,a,b){if(h.isFunction(a))return h.grep(g,function(g,c){return!!a.call(g,c,g)!==b});if(a.nodeType)return h.grep(g,function(g){return g===a!==b});if("string"==typeof a){if(Ib.test(a))return h.filter(a,g,b);a=h.filter(a,g)}return h.grep(g,function(g){return 0<=h.inArray(g,a)!==b})}function x(g){var a=kb.split("|");g=
g.createDocumentFragment();if(g.createElement)for(;a.length;)g.createElement(a.pop());return g}function z(g,a){return h.nodeName(g,"table")&&h.nodeName(1===a.nodeType?a:a.firstChild,"tr")?g.getElementsByTagName("tbody")[0]||g.appendChild(g.ownerDocument.createElement("tbody")):g}function w(g){return g.type=(null!==h.find.attr(g,"type"))+"/"+g.type,g}function D(g){var a=Jb.exec(g.type);return a?g.type=a[1]:g.removeAttribute("type"),g}function n(g,a){for(var b,c=0;null!=(b=g[c]);c++)h._data(b,"globalEval",
!a||h._data(a[c],"globalEval"))}function I(g,a){if(1===a.nodeType&&h.hasData(g)){var b,c;var r=h._data(g);g=h._data(a,r);var d=r.events;if(d)for(b in delete g.handle,g.events={},d)for(r=0,c=d[b].length;c>r;r++)h.event.add(a,b,d[b][r]);g.data&&(g.data=h.extend({},g.data))}}function y(g,a){var b,c,r=0,d=typeof g.getElementsByTagName!==E?g.getElementsByTagName(a||"*"):typeof g.querySelectorAll!==E?g.querySelectorAll(a||"*"):f;if(!d)for(d=[],b=g.childNodes||g;null!=(c=b[r]);r++)!a||h.nodeName(c,a)?d.push(c):
h.merge(d,y(c,a));return a===f||a&&h.nodeName(g,a)?h.merge([g],d):d}function J(g){Xa.test(g.type)&&(g.defaultChecked=g.checked)}function F(g,a){if(a in g)return a;for(var b=a.charAt(0).toUpperCase()+a.slice(1),c=a,r=lb.length;r--;)if(a=lb[r]+b,a in g)return a;return c}function R(g,a){return g=a||g,"none"===h.css(g,"display")||!h.contains(g.ownerDocument,g)}function ca(g,a){for(var b,c,r,d=[],e=0,l=g.length;l>e;e++)c=g[e],c.style&&(d[e]=h._data(c,"olddisplay"),b=c.style.display,a?(d[e]||"none"!==b||
(c.style.display=""),""===c.style.display&&R(c)&&(d[e]=h._data(c,"olddisplay",fa(c.nodeName)))):d[e]||(r=R(c),(b&&"none"!==b||!r)&&h._data(c,"olddisplay",r?b:h.css(c,"display"))));for(e=0;l>e;e++)c=g[e],c.style&&(a&&"none"!==c.style.display&&""!==c.style.display||(c.style.display=a?d[e]||"":"none"));return g}function U(g,a,b){return(g=Kb.exec(a))?Math.max(0,g[1]-(b||0))+(g[2]||"px"):a}function L(g,a,b,c,d){a=b===(c?"border":"content")?4:"width"===a?1:0;for(var r=0;4>a;a+=2)"margin"===b&&(r+=h.css(g,
b+Aa[a],!0,d)),c?("content"===b&&(r-=h.css(g,"padding"+Aa[a],!0,d)),"margin"!==b&&(r-=h.css(g,"border"+Aa[a]+"Width",!0,d))):(r+=h.css(g,"padding"+Aa[a],!0,d),"padding"!==b&&(r+=h.css(g,"border"+Aa[a]+"Width",!0,d)));return r}function ha(g,a,b){var c=!0,r="width"===a?g.offsetWidth:g.offsetHeight,d=Ba(g),e=h.support.boxSizing&&"border-box"===h.css(g,"boxSizing",!1,d);if(0>=r||null==r){if(r=Ca(g,a,d),(0>r||null==r)&&(r=g.style[a]),Ra.test(r))return r;c=e&&(h.support.boxSizingReliable||r===g.style[a]);
r=parseFloat(r)||0}return r+L(g,a,b||(e?"border":"content"),c,d)+"px"}function fa(g){var a=u,b=mb[g];return b||(b=oa(g,a),"none"!==b&&b||(La=(La||h("\x3ciframe frameborder\x3d'0' width\x3d'0' height\x3d'0'/\x3e").css("cssText","display:block !important")).appendTo(a.documentElement),a=(La[0].contentWindow||La[0].contentDocument).document,a.write("\x3c!doctype html\x3e\x3chtml\x3e\x3cbody\x3e"),a.close(),b=oa(g,a),La.detach()),mb[g]=b),b}function oa(g,a){g=h(a.createElement(g)).appendTo(a.body);a=
h.css(g[0],"display");return g.remove(),a}function ea(g,a,b,c){var r;if(h.isArray(a))h.each(a,function(a,r){b||Lb.test(g)?c(g,r):ea(g+"["+("object"==typeof r?a:"")+"]",r,b,c)});else if(b||"object"!==h.type(a))c(g,a);else for(r in a)ea(g+"["+r+"]",a[r],b,c)}function ba(g){return function(a,b){"string"!=typeof a&&(b=a,a="*");var c=0,r=a.toLowerCase().match(ja)||[];if(h.isFunction(b))for(;a=r[c++];)"+"===a[0]?(a=a.slice(1)||"*",(g[a]=g[a]||[]).unshift(b)):(g[a]=g[a]||[]).push(b)}}function Y(g,a,b,c){function r(H){var l;
return d[H]=!0,h.each(g[H]||[],function(g,h){g=h(a,b,c);return"string"!=typeof g||e||d[g]?e?!(l=g):f:(a.dataTypes.unshift(g),r(g),!1)}),l}var d={},e=g===Ya;return r(a.dataTypes[0])||!d["*"]&&r("*")}function K(g,a){var b,c,r=h.ajaxSettings.flatOptions||{};for(c in a)a[c]!==f&&((r[c]?g:b||(b={}))[c]=a[c]);return b&&h.extend(!0,g,b),g}function V(){try{return new a.XMLHttpRequest}catch(g){}}function ka(){return setTimeout(function(){Ha=f}),Ha=h.now()}function ra(g,a,b){for(var c,r=(Ma[a]||[]).concat(Ma["*"]),
h=0,d=r.length;d>h;h++)if(c=r[h].call(b,a,g))return c}function Z(g,a,b){var c,r=0,d=Sa.length,e=h.Deferred().always(function(){delete H.elem}),H=function(){if(c)return!1;var a=Ha||ka();a=Math.max(0,l.startTime+l.duration-a);for(var b=1-(a/l.duration||0),r=0,h=l.tweens.length;h>r;r++)l.tweens[r].run(b);return e.notifyWith(g,[l,b,a]),1>b&&h?a:(e.resolveWith(g,[l]),!1)},l=e.promise({elem:g,props:h.extend({},a),opts:h.extend(!0,{specialEasing:{}},b),originalProperties:a,originalOptions:b,startTime:Ha||
ka(),duration:b.duration,tweens:[],createTween:function(a,b){a=h.Tween(g,l.opts,a,b,l.opts.specialEasing[a]||l.opts.easing);return l.tweens.push(a),a},stop:function(a){var b=0,r=a?l.tweens.length:0;if(c)return this;for(c=!0;r>b;b++)l.tweens[b].run(1);return a?e.resolveWith(g,[l,a]):e.rejectWith(g,[l,a]),this}});b=l.props;for(P(b,l.opts.specialEasing);d>r;r++)if(a=Sa[r].call(l,g,b,l.opts))return a;return h.map(b,ra,l),h.isFunction(l.opts.start)&&l.opts.start.call(g,l),h.fx.timer(h.extend(H,{elem:g,
anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function P(g,a){var b,c,r,d,e;for(b in g)if(c=h.camelCase(b),r=a[c],d=g[b],h.isArray(d)&&(r=d[1],d=g[b]=d[0]),b!==c&&(g[c]=d,delete g[b]),e=h.cssHooks[c],e&&"expand"in e)for(b in d=e.expand(d),delete g[c],d)b in g||(g[b]=d[b],a[b]=r);else a[c]=r}function q(g,a,b,c,h){return new q.prototype.init(g,a,b,c,h)}function B(g,a){var b={height:g},c=0;for(a=a?1:0;4>c;c+=2-a){var r=
Aa[c];b["margin"+r]=b["padding"+r]=g}return a&&(b.opacity=b.width=g),b}function A(g){return h.isWindow(g)?g:9===g.nodeType?g.defaultView||g.parentWindow:!1}var S,E=typeof f,W=a.location,u=a.document,M=u.documentElement,G=a.jQuery,sa=a.$,pa={},da=[],ua=da.concat,va=da.push,Q=da.slice,Da=da.indexOf,ma=pa.toString,aa=pa.hasOwnProperty,Ea="1.10.2".trim,h=function(g,a){return new h.fn.init(g,a,Za)},wa=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ja=/\S+/g,Na=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,xa=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
ta=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,ya=/^[\],:{}\s]*$/,$a=/(?:^|:|,)(?:\s*\[)+/g,za=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,la=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,ia=/^-ms-/,O=/-([\da-z])/gi,X=function(g,a){return a.toUpperCase()},qa=function(g){(u.addEventListener||"load"===g.type||"complete"===u.readyState)&&(Oa(),h.ready())},Oa=function(){u.addEventListener?(u.removeEventListener("DOMContentLoaded",qa,!1),a.removeEventListener("load",qa,!1)):(u.detachEvent("onreadystatechange",
qa),a.detachEvent("onload",qa))};h.fn=h.prototype={jquery:"1.10.2",constructor:h,init:function(g,a,b){var c,r;if(!g)return this;if("string"==typeof g){if(c="\x3c"===g.charAt(0)&&"\x3e"===g.charAt(g.length-1)&&3<=g.length?[null,g,null]:xa.exec(g),!c||!c[1]&&a)return!a||a.jquery?(a||b).find(g):this.constructor(a).find(g);if(c[1]){if(a=a instanceof h?a[0]:a,h.merge(this,h.parseHTML(c[1],a&&a.nodeType?a.ownerDocument||a:u,!0)),ta.test(c[1])&&h.isPlainObject(a))for(c in a)h.isFunction(this[c])?this[c](a[c]):
this.attr(c,a[c]);return this}if(r=u.getElementById(c[2]),r&&r.parentNode){if(r.id!==c[2])return b.find(g);this.length=1;this[0]=r}return this.context=u,this.selector=g,this}return g.nodeType?(this.context=this[0]=g,this.length=1,this):h.isFunction(g)?b.ready(g):(g.selector!==f&&(this.selector=g.selector,this.context=g.context),h.makeArray(g,this))},selector:"",length:0,toArray:function(){return Q.call(this)},get:function(a){return null==a?this.toArray():0>a?this[this.length+a]:this[a]},pushStack:function(a){a=
h.merge(this.constructor(),a);return a.prevObject=this,a.context=this.context,a},each:function(a,b){return h.each(this,a,b)},ready:function(a){return h.ready.promise().done(a),this},slice:function(){return this.pushStack(Q.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var g=this.length;a=+a+(0>a?g:0);return this.pushStack(0<=a&&g>a?[this[a]]:[])},map:function(a){return this.pushStack(h.map(this,function(g,b){return a.call(g,b,g)}))},
end:function(){return this.prevObject||this.constructor(null)},push:va,sort:[].sort,splice:[].splice};h.fn.init.prototype=h.fn;h.extend=h.fn.extend=function(){var a,b,c,d,e=arguments[0]||{},l=1,k=arguments.length,p=!1;"boolean"==typeof e&&(p=e,e=arguments[1]||{},l=2);"object"==typeof e||h.isFunction(e)||(e={});for(k===l&&(e=this,--l);k>l;l++)if(null!=(c=arguments[l]))for(b in c){var n=e[b];var m=c[b];e!==m&&(p&&m&&(h.isPlainObject(m)||(a=h.isArray(m)))?(a?(a=!1,d=n&&h.isArray(n)?n:[]):d=n&&h.isPlainObject(n)?
n:{},e[b]=h.extend(p,d,m)):m!==f&&(e[b]=m))}return e};h.extend({expando:"jQuery"+("1.10.2"+Math.random()).replace(/\D/g,""),noConflict:function(g){return a.$===h&&(a.$=sa),g&&a.jQuery===h&&(a.jQuery=G),h},isReady:!1,readyWait:1,holdReady:function(a){a?h.readyWait++:h.ready(!0)},ready:function(a){if(!0===a?!--h.readyWait:!h.isReady){if(!u.body)return setTimeout(h.ready);h.isReady=!0;!0!==a&&0<--h.readyWait||(S.resolveWith(u,[h]),h.fn.trigger&&h(u).trigger("ready").off("ready"))}},isFunction:function(a){return"function"===
h.type(a)},isArray:Array.isArray||function(a){return"array"===h.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?pa[ma.call(a)]||"object":typeof a},isPlainObject:function(a){var g;if(!a||"object"!==h.type(a)||a.nodeType||h.isWindow(a))return!1;try{if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(H){return!1}if(h.support.ownLast)for(g in a)return aa.call(a,
g);for(g in a);return g===f||aa.call(a,g)},isEmptyObject:function(a){for(var g in a)return!1;return!0},error:function(a){throw Error(a);},parseHTML:function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1);b=b||u;var g=ta.exec(a);c=!c&&[];return g?[b.createElement(g[1])]:(g=h.buildFragment([a],b,c),c&&h(c).remove(),h.merge([],g.childNodes))},parseJSON:function(g){return a.JSON&&a.JSON.parse?a.JSON.parse(g):null===g?g:"string"==typeof g&&(g=h.trim(g),g&&ya.test(g.replace(za,
"@").replace(la,"]").replace($a,"")))?Function("return "+g)():(h.error("Invalid JSON: "+g),f)},parseXML:function(g){var b,c;if(!g||"string"!=typeof g)return null;try{a.DOMParser?(c=new DOMParser,b=c.parseFromString(g,"text/xml")):(b=new ActiveXObject("Microsoft.XMLDOM"),b.async="false",b.loadXML(g))}catch(T){b=f}return b&&b.documentElement&&!b.getElementsByTagName("parsererror").length||h.error("Invalid XML: "+g),b},noop:function(){},globalEval:function(g){g&&h.trim(g)&&(a.execScript||function(g){a.eval.call(a,
g)})(g)},camelCase:function(a){return a.replace(ia,"ms-").replace(O,X)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var g,h=0,r=a.length,d=k(a);if(c)if(d)for(;r>h&&(g=b.apply(a[h],c),!1!==g);h++);else for(h in a){if(g=b.apply(a[h],c),!1===g)break}else if(d)for(;r>h&&(g=b.call(a[h],h,a[h]),!1!==g);h++);else for(h in a)if(g=b.call(a[h],h,a[h]),!1===g)break;return a},trim:Ea&&!Ea.call("\ufeff\u00a0")?function(a){return null==a?"":Ea.call(a)}:
function(a){return null==a?"":(a+"").replace(Na,"")},makeArray:function(a,b){b=b||[];return null!=a&&(k(Object(a))?h.merge(b,"string"==typeof a?[a]:a):va.call(b,a)),b},inArray:function(a,b,c){if(b){if(Da)return Da.call(b,a,c);var g=b.length;for(c=c?0>c?Math.max(0,g+c):c:0;g>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var g=b.length,c=a.length,h=0;if("number"==typeof g)for(;g>h;h++)a[c++]=b[h];else for(;b[h]!==f;)a[c++]=b[h++];return a.length=c,a},grep:function(a,b,c){var g=[],
h=0,d=a.length;for(c=!!c;d>h;h++){var r=!!b(a[h],h);c!==r&&g.push(a[h])}return g},map:function(a,b,c){var g=0,h=a.length,d=[];if(k(a))for(;h>g;g++){var r=b(a[g],g,c);null!=r&&(d[d.length]=r)}else for(g in a)r=b(a[g],g,c),null!=r&&(d[d.length]=r);return ua.apply([],d)},guid:1,proxy:function(a,b){var g,c,d;return"string"==typeof b&&(d=a[b],b=a,a=d),h.isFunction(a)?(g=Q.call(arguments,2),c=function(){return a.apply(b||this,g.concat(Q.call(arguments)))},c.guid=a.guid=a.guid||h.guid++,c):f},access:function(a,
b,c,d,e,l,k){var g=0,r=a.length,H=null==c;if("object"===h.type(c))for(g in e=!0,c)h.access(a,b,g,c[g],!0,l,k);else if(d!==f&&(e=!0,h.isFunction(d)||(k=!0),H&&(k?(b.call(a,d),b=null):(H=b,b=function(a,g,b){return H.call(h(a),b)})),b))for(;r>g;g++)b(a[g],c,k?d:d.call(a[g],g,b(a[g],c)));return e?a:H?b.call(a):r?b(a[0],c):l},now:function(){return(new Date).getTime()},swap:function(a,b,c,h){var g,d={};for(g in b)d[g]=a.style[g],a.style[g]=b[g];c=c.apply(a,h||[]);for(g in b)a.style[g]=d[g];return c}});
h.ready.promise=function(g){if(!S)if(S=h.Deferred(),"complete"===u.readyState)setTimeout(h.ready);else if(u.addEventListener)u.addEventListener("DOMContentLoaded",qa,!1),a.addEventListener("load",qa,!1);else{u.attachEvent("onreadystatechange",qa);a.attachEvent("onload",qa);var b=!1;try{b=null==a.frameElement&&u.documentElement}catch(H){}b&&b.doScroll&&function T(){if(!h.isReady){try{b.doScroll("left")}catch(Gb){return setTimeout(T,50)}Oa();h.ready()}}()}return S.promise(g)};h.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),
function(a,b){pa["[object "+b+"]"]=b.toLowerCase()});var Za=h(u);(function(a,b){function g(a,g,b,c){var h,d,r,e,l;if((g?g.ownerDocument||g:Q)!==M&&ea(g),g=g||M,b=b||[],!a||"string"!=typeof a)return b;if(1!==(e=g.nodeType)&&9!==e)return[];if(X&&!c){if(h=Pa.exec(a))if(r=h[1])if(9===e){if(d=g.getElementById(r),!d||!d.parentNode)return b;if(d.id===r)return b.push(d),b}else{if(g.ownerDocument&&(d=g.ownerDocument.getElementById(r))&&S(g,d)&&d.id===r)return b.push(d),b}else{if(h[2])return aa.apply(b,g.getElementsByTagName(a)),
b;if((r=h[3])&&K.getElementsByClassName&&g.getElementsByClassName)return aa.apply(b,g.getElementsByClassName(r)),b}if(K.qsa&&(!G||!G.test(a))){if(d=h=E,r=g,l=9===e&&a,1===e&&"object"!==g.nodeName.toLowerCase()){e=m(a);(h=g.getAttribute("id"))?d=h.replace(fa,"\\$\x26"):g.setAttribute("id",d);d="[id\x3d'"+d+"'] ";for(r=e.length;r--;)e[r]=d+q(e[r]);r=za.test(a)&&g.parentNode||g;l=e.join(",")}if(l)try{return aa.apply(b,r.querySelectorAll(l)),b}catch(wc){}finally{h||g.removeAttribute("id")}}}var f;a:{a=
a.replace(L,"$1");var k,H;d=m(a);if(!c&&1===d.length){if(f=d[0]=d[0].slice(0),2<f.length&&"ID"===(k=f[0]).type&&K.getById&&9===g.nodeType&&X&&N.relative[f[1].type]){if(g=(N.find.ID(k.matches[0].replace(Y,la),g)||[])[0],!g){f=b;break a}a=a.slice(f.shift().value.length)}for(e=ya.needsContext.test(a)?0:f.length;e--&&(k=f[e],!N.relative[h=k.type]);)if((H=N.find[h])&&(c=H(k.matches[0].replace(Y,la),za.test(f[0].type)&&g.parentNode||g))){if(f.splice(e,1),a=c.length&&q(f),!a){f=(aa.apply(b,c),b);break a}break}}f=
(Qa(a,d)(c,g,!X,b,za.test(a)),b)}return f}function c(){function a(b,c){return g.push(b+=" ")>N.cacheLength&&delete a[g.shift()],a[b]=c}var g=[];return a}function d(a){return a[E]=!0,a}function r(a){var g=M.createElement("div");try{return!!a(g)}catch(uc){return!1}finally{g.parentNode&&g.parentNode.removeChild(g)}}function e(a,g){var b=a.split("|");for(a=a.length;a--;)N.attrHandle[b[a]]=g}function l(a,g){var b=g&&a,c=b&&1===a.nodeType&&1===g.nodeType&&(~g.sourceIndex||-2147483648)-(~a.sourceIndex||
-2147483648);if(c)return c;if(b)for(;b=b.nextSibling;)if(b===g)return-1;return a?1:-1}function f(a){return function(g){return"input"===g.nodeName.toLowerCase()&&g.type===a}}function k(a){return function(g){var b=g.nodeName.toLowerCase();return("input"===b||"button"===b)&&g.type===a}}function p(a){return d(function(g){return g=+g,d(function(b,c){for(var h,d=a([],b.length,g),r=d.length;r--;)b[h=d[r]]&&(b[h]=!(c[h]=b[h]))})})}function n(){}function m(a,b){var c,h,d,r,e;if(r=qa[a+" "])return b?0:r.slice(0);
r=a;var l=[];for(e=N.preFilter;r;){f&&!(c=wa.exec(r))||(c&&(r=r.slice(c[0].length)||r),l.push(h=[]));var f=!1;(c=Za.exec(r))&&(f=c.shift(),h.push({value:f,type:c[0].replace(L," ")}),r=r.slice(f.length));for(d in N.filter)!(c=ya[d].exec(r))||e[d]&&!(c=e[d](c))||(f=c.shift(),h.push({value:f,type:d,matches:c}),r=r.slice(f.length));if(!f)break}return b?r.length:r?g.error(a):qa(a,l).slice(0)}function q(a){for(var g=0,b=a.length,c="";b>g;g++)c+=a[g].value;return c}function u(a,g,b){var c=g.dir,h=b&&"parentNode"===
c,d=W++;return g.first?function(g,b,d){for(;g=g[c];)if(1===g.nodeType||h)return a(g,b,d)}:function(g,b,r){var e,l,f,k=F+" "+d;if(r)for(;g=g[c];){if((1===g.nodeType||h)&&a(g,b,r))return!0}else for(;g=g[c];)if(1===g.nodeType||h)if(f=g[E]||(g[E]={}),(l=f[c])&&l[0]===k){if(!0===(e=l[1])||e===A)return!0===e}else if(l=f[c]=[k],l[1]=a(g,b,r)||A,!0===l[1])return!0}}function t(a){return 1<a.length?function(g,b,c){for(var h=a.length;h--;)if(!a[h](g,b,c))return!1;return!0}:a[0]}function ia(a,g,b,c,h){for(var d,
r=[],e=0,l=a.length,f=null!=g;l>e;e++)(d=a[e])&&(!b||b(d,c,h))&&(r.push(d),f&&g.push(e));return r}function C(a,b,c,h,r,e){return h&&!h[E]&&(h=C(h)),r&&!r[E]&&(r=C(r,e)),d(function(d,e,l,f){var k,H=[],p=[],n=e.length,m;if(!(m=d)){m=b||"*";for(var q=l.nodeType?[l]:l,u=[],T=0,t=q.length;t>T;T++)g(m,q[T],u);m=u}m=!a||!d&&b?m:ia(m,H,a,l,f);q=c?r||(d?a:n||h)?[]:e:m;if(c&&c(m,q,l,f),h){var C=ia(q,p);h(C,[],l,f);for(l=C.length;l--;)(k=C[l])&&(q[p[l]]=!(m[p[l]]=k))}if(d){if(r||a){if(r){C=[];for(l=q.length;l--;)(k=
q[l])&&C.push(m[l]=k);r(null,q=[],C,f)}for(l=q.length;l--;)(k=q[l])&&-1<(C=r?ma.call(d,k):H[l])&&(d[C]=!(e[C]=k))}}else q=ia(q===e?q.splice(n,q.length):q),r?r(null,e,q,f):aa.apply(e,q)})}function B(a){var g,b,c=a.length,h=N.relative[a[0].type];var d=h||N.relative[" "];for(var r=h?1:0,e=u(function(a){return a===g},d,!0),l=u(function(a){return-1<ma.call(g,a)},d,!0),f=[function(a,b,c){return!h&&(c||b!==w)||((g=b).nodeType?e(a,b,c):l(a,b,c))}];c>r;r++)if(d=N.relative[a[r].type])f=[u(t(f),d)];else{if(d=
N.filter[a[r].type].apply(null,a[r].matches),d[E]){for(b=++r;c>b&&!N.relative[a[b].type];b++);return C(1<r&&t(f),1<r&&q(a.slice(0,r-1).concat({value:" "===a[r-2].type?"*":""})).replace(L,"$1"),d,b>r&&B(a.slice(r,b)),c>b&&B(a=a.slice(b)),c>b&&q(a))}f.push(d)}return t(f)}function v(a,b){var c=0,h=0<b.length,r=0<a.length,e=function(d,e,l,f,k){var H,p,m=[],n=0,q="0",u=d&&[],T=null!=k,t=w,C=d||r&&N.find.TAG("*",k&&e.parentNode||e),B=F+=null==t?1:Math.random()||.1;for(T&&(w=e!==M&&e,A=c);null!=(k=C[q]);q++){if(r&&
k){for(H=0;p=a[H++];)if(p(k,e,l)){f.push(k);break}T&&(F=B,A=++c)}h&&((k=!p&&k)&&n--,d&&u.push(k))}if(n+=q,h&&q!==n){for(H=0;p=b[H++];)p(u,m,e,l);if(d){if(0<n)for(;q--;)u[q]||m[q]||(m[q]=va.call(f));m=ia(m)}aa.apply(f,m);T&&!d&&0<m.length&&1<n+b.length&&g.uniqueSort(f)}return T&&(F=B,w=t),u};return h?d(e):e}var O,A,w,x,M,y,X,G,z,D,S,E="sizzle"+-new Date,Q=a.document,F=0,W=0,sa=c(),qa=c(),pa=c(),J=!1,ua=function(a,g){return a===g?(J=!0,0):0},I=typeof b,Da={}.hasOwnProperty,da=[],va=da.pop,R=da.push,
aa=da.push,Oa=da.slice,ma=da.indexOf||function(a){for(var g=0,b=this.length;b>g;g++)if(this[g]===a)return g;return-1},U="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+".replace("w","w#"),ca="\\[[\\x20\\t\\r\\n\\f]*((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)[\\x20\\t\\r\\n\\f]*(?:([*^$|!~]?\x3d)[\\x20\\t\\r\\n\\f]*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+U+")|)|)[\\x20\\t\\r\\n\\f]*\\]",ha=":((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+ca.replace(3,8)+")*)|.*)\\)|)",L=/^[\x20\t\r\n\f]+|((?:^|[^\\])(?:\\.)*)[\x20\t\r\n\f]+$/g,
wa=/^[\x20\t\r\n\f]*,[\x20\t\r\n\f]*/,Za=/^[\x20\t\r\n\f]*([>+~]|[\x20\t\r\n\f])[\x20\t\r\n\f]*/,za=/[\x20\t\r\n\f]*[+~]/,ja=/=[\x20\t\r\n\f]*([^\]'"]*)[\x20\t\r\n\f]*\]/g,ba=RegExp(ha),Na=RegExp("^"+U+"$"),ya={ID:/^#((?:\\.|[\w-]|[^\x00-\xa0])+)/,CLASS:/^\.((?:\\.|[\w-]|[^\x00-\xa0])+)/,TAG:RegExp("^("+"(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+".replace("w","w*")+")"),ATTR:RegExp("^"+ca),PSEUDO:RegExp("^"+ha),CHILD:/^:(only|first|last|nth|nth-last)-(child|of-type)(?:\([\x20\t\r\n\f]*(even|odd|(([+-]|)(\d*)n|)[\x20\t\r\n\f]*(?:([+-]|)[\x20\t\r\n\f]*(\d+)|))[\x20\t\r\n\f]*\)|)/i,
bool:/^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$/i,needsContext:/^[\x20\t\r\n\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\([\x20\t\r\n\f]*((?:-\d)?\d*)[\x20\t\r\n\f]*\)|)(?=[^-]|$)/i},xa=/^[^{]+\{\s*\[native \w/,Pa=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Ea=/^(?:input|select|textarea|button)$/i,V=/^h\d$/i,fa=/'|\\/g,Y=/\\([\da-f]{1,6}[\x20\t\r\n\f]?|([\x20\t\r\n\f])|.)/ig,la=function(a,g,b){a="0x"+g-65536;return a!==
a||b?g:0>a?String.fromCharCode(a+65536):String.fromCharCode(55296|a>>10,56320|1023&a)};try{aa.apply(da=Oa.call(Q.childNodes),Q.childNodes),da[Q.childNodes.length].nodeType}catch(tc){aa={apply:da.length?function(a,g){R.apply(a,Oa.call(g))}:function(a,g){for(var b=a.length,c=0;a[b++]=g[c++];);a.length=b-1}}}var P=g.isXML=function(a){return(a=a&&(a.ownerDocument||a).documentElement)?"HTML"!==a.nodeName:!1};var K=g.support={};var ea=g.setDocument=function(a){var g=a?a.ownerDocument||a:Q;a=g.defaultView;
return g!==M&&9===g.nodeType&&g.documentElement?(M=g,y=g.documentElement,X=!P(g),a&&a.attachEvent&&a!==a.top&&a.attachEvent("onbeforeunload",function(){ea()}),K.attributes=r(function(a){return a.className="i",!a.getAttribute("className")}),K.getElementsByTagName=r(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),K.getElementsByClassName=r(function(a){return a.innerHTML="\x3cdiv class\x3d'a'\x3e\x3c/div\x3e\x3cdiv class\x3d'a i'\x3e\x3c/div\x3e",a.firstChild.className=
"i",2===a.getElementsByClassName("i").length}),K.getById=r(function(a){return y.appendChild(a).id=E,!g.getElementsByName||!g.getElementsByName(E).length}),K.getById?(N.find.ID=function(a,g){if(typeof g.getElementById!==I&&X)return(a=g.getElementById(a))&&a.parentNode?[a]:[]},N.filter.ID=function(a){var g=a.replace(Y,la);return function(a){return a.getAttribute("id")===g}}):(delete N.find.ID,N.filter.ID=function(a){var g=a.replace(Y,la);return function(a){return(a=typeof a.getAttributeNode!==I&&a.getAttributeNode("id"))&&
a.value===g}}),N.find.TAG=K.getElementsByTagName?function(a,g){return typeof g.getElementsByTagName!==I?g.getElementsByTagName(a):b}:function(a,g){var b=[],c=0;g=g.getElementsByTagName(a);if("*"===a){for(;a=g[c++];)1===a.nodeType&&b.push(a);return b}return g},N.find.CLASS=K.getElementsByClassName&&function(a,g){return typeof g.getElementsByClassName!==I&&X?g.getElementsByClassName(a):b},z=[],G=[],(K.qsa=xa.test(g.querySelectorAll))&&(r(function(a){a.innerHTML="\x3cselect\x3e\x3coption selected\x3d''\x3e\x3c/option\x3e\x3c/select\x3e";
a.querySelectorAll("[selected]").length||G.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)");a.querySelectorAll(":checked").length||G.push(":checked")}),r(function(a){var b=g.createElement("input");b.setAttribute("type","hidden");a.appendChild(b).setAttribute("t","");a.querySelectorAll("[t^\x3d'']").length&&G.push("[*^$]\x3d[\\x20\\t\\r\\n\\f]*(?:''|\"\")");a.querySelectorAll(":enabled").length||
G.push(":enabled",":disabled");a.querySelectorAll("*,:x");G.push(",.*:")})),(K.matchesSelector=xa.test(D=y.webkitMatchesSelector||y.mozMatchesSelector||y.oMatchesSelector||y.msMatchesSelector))&&r(function(a){K.disconnectedMatch=D.call(a,"div");D.call(a,"[s!\x3d'']:x");z.push("!\x3d",ha)}),G=G.length&&RegExp(G.join("|")),z=z.length&&RegExp(z.join("|")),S=xa.test(y.contains)||y.compareDocumentPosition?function(a,g){var b=9===a.nodeType?a.documentElement:a;g=g&&g.parentNode;return a===g||!(!g||1!==
g.nodeType||!(b.contains?b.contains(g):a.compareDocumentPosition&&16&a.compareDocumentPosition(g)))}:function(a,g){if(g)for(;g=g.parentNode;)if(g===a)return!0;return!1},ua=y.compareDocumentPosition?function(a,b){if(a===b)return J=!0,0;var c=b.compareDocumentPosition&&a.compareDocumentPosition&&a.compareDocumentPosition(b);return c?1&c||!K.sortDetached&&b.compareDocumentPosition(a)===c?a===g||S(Q,a)?-1:b===g||S(Q,b)?1:x?ma.call(x,a)-ma.call(x,b):0:4&c?-1:1:a.compareDocumentPosition?-1:1}:function(a,
b){var c=0,h=a.parentNode,d=b.parentNode,r=[a],e=[b];if(a===b)return J=!0,0;if(!h||!d)return a===g?-1:b===g?1:h?-1:d?1:x?ma.call(x,a)-ma.call(x,b):0;if(h===d)return l(a,b);for(;a=a.parentNode;)r.unshift(a);for(a=b;a=a.parentNode;)e.unshift(a);for(;r[c]===e[c];)c++;return c?l(r[c],e[c]):r[c]===Q?-1:e[c]===Q?1:0},g):M};g.matches=function(a,b){return g(a,null,null,b)};g.matchesSelector=function(a,b){if((a.ownerDocument||a)!==M&&ea(a),b=b.replace(ja,"\x3d'$1']"),!(!K.matchesSelector||!X||z&&z.test(b)||
G&&G.test(b)))try{var c=D.call(a,b);if(c||K.disconnectedMatch||a.document&&11!==a.document.nodeType)return c}catch(vc){}return 0<g(b,M,null,[a]).length};g.contains=function(a,g){return(a.ownerDocument||a)!==M&&ea(a),S(a,g)};g.attr=function(a,g){(a.ownerDocument||a)!==M&&ea(a);var c=N.attrHandle[g.toLowerCase()];c=c&&Da.call(N.attrHandle,g.toLowerCase())?c(a,g,!X):b;return c===b?K.attributes||!X?a.getAttribute(g):(c=a.getAttributeNode(g))&&c.specified?c.value:null:c};g.error=function(a){throw Error("Syntax error, unrecognized expression: "+
a);};g.uniqueSort=function(a){var g,b=[],c=0,h=0;if(J=!K.detectDuplicates,x=!K.sortStable&&a.slice(0),a.sort(ua),J){for(;g=a[h++];)g===a[h]&&(c=b.push(h));for(;c--;)a.splice(b[c],1)}return a};var ta=g.getText=function(a){var g,b="",c=0;if(g=a.nodeType)if(1===g||9===g||11===g){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)b+=ta(a)}else{if(3===g||4===g)return a.nodeValue}else for(;g=a[c];c++)b+=ta(g);return b};var N=g.selectors={cacheLength:50,createPseudo:d,
match:ya,attrHandle:{},find:{},relative:{"\x3e":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(Y,la),a[3]=(a[4]||a[5]||"").replace(Y,la),"~\x3d"===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]||g.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]&&
g.error(a[0]),a},PSEUDO:function(a){var g,c=!a[5]&&a[2];return ya.CHILD.test(a[0])?null:(a[3]&&a[4]!==b?a[2]=a[4]:c&&ba.test(c)&&(g=m(c,!0))&&(g=c.indexOf(")",c.length-g)-c.length)&&(a[0]=a[0].slice(0,g),a[2]=c.slice(0,g)),a.slice(0,3))}},filter:{TAG:function(a){var g=a.replace(Y,la).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===g}},CLASS:function(a){var g=sa[a+" "];return g||(g=RegExp("(^|[\\x20\\t\\r\\n\\f])"+a+"([\\x20\\t\\r\\n\\f]|$)"))&&
sa(a,function(a){return g.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==I&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(h){h=g.attr(h,a);return null==h?"!\x3d"===b:b?(h+="","\x3d"===b?h===c:"!\x3d"===b?h!==c:"^\x3d"===b?c&&0===h.indexOf(c):"*\x3d"===b?c&&-1<h.indexOf(c):"$\x3d"===b?c&&h.slice(-c.length)===c:"~\x3d"===b?-1<(" "+h+" ").indexOf(c):"|\x3d"===b?h===c||h.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,g,b,c,h){var d="nth"!==a.slice(0,
3),r="last"!==a.slice(-4),e="of-type"===g;return 1===c&&0===h?function(a){return!!a.parentNode}:function(g,b,l){var f;b=d!==r?"nextSibling":"previousSibling";var k=g.parentNode,H=e&&g.nodeName.toLowerCase();l=!l&&!e;if(k){if(d){for(;b;){for(f=g;f=f[b];)if(e?f.nodeName.toLowerCase()===H:1===f.nodeType)return!1;var p=b="only"===a&&!p&&"nextSibling"}return!0}if(p=[r?k.firstChild:k.lastChild],r&&l){l=k[E]||(k[E]={});var m=l[a]||[];var n=m[0]===F&&m[1];var q=m[0]===F&&m[2];for(f=n&&k.childNodes[n];f=++n&&
f&&f[b]||(q=n=0)||p.pop();)if(1===f.nodeType&&++q&&f===g){l[a]=[F,n,q];break}}else if(l&&(m=(g[E]||(g[E]={}))[a])&&m[0]===F)q=m[1];else for(;(f=++n&&f&&f[b]||(q=n=0)||p.pop())&&((e?f.nodeName.toLowerCase()!==H:1!==f.nodeType)||!++q||(l&&((f[E]||(f[E]={}))[a]=[F,q]),f!==g)););return q-=h,q===c||0===q%c&&0<=q/c}}},PSEUDO:function(a,b){var c,h=N.pseudos[a]||N.setFilters[a.toLowerCase()]||g.error("unsupported pseudo: "+a);return h[E]?h(b):1<h.length?(c=[a,a,"",b],N.setFilters.hasOwnProperty(a.toLowerCase())?
d(function(a,g){for(var c,d=h(a,b),r=d.length;r--;)c=ma.call(a,d[r]),a[c]=!(g[c]=d[r])}):function(a){return h(a,0,c)}):h}},pseudos:{not:d(function(a){var g=[],b=[],c=Qa(a.replace(L,"$1"));return c[E]?d(function(a,g,b,h){var d;b=c(a,null,h,[]);for(h=a.length;h--;)(d=b[h])&&(a[h]=!(g[h]=d))}):function(a,h,d){return g[0]=a,c(g,null,d,b),!b.pop()}}),has:d(function(a){return function(b){return 0<g(a,b).length}}),contains:d(function(a){return function(g){return-1<(g.textContent||g.innerText||ta(g)).indexOf(a)}}),
lang:d(function(a){return Na.test(a||"")||g.error("unsupported lang: "+a),a=a.replace(Y,la).toLowerCase(),function(g){var b;do if(b=X?g.lang:g.getAttribute("xml:lang")||g.getAttribute("lang"))return b=b.toLowerCase(),b===a||0===b.indexOf(a+"-");while((g=g.parentNode)&&1===g.nodeType);return!1}}),target:function(g){var b=a.location&&a.location.hash;return b&&b.slice(1)===g.id},root:function(a){return a===y},focus:function(a){return a===M.activeElement&&(!M.hasFocus||M.hasFocus())&&!!(a.type||a.href||
~a.tabIndex)},enabled:function(a){return!1===a.disabled},disabled:function(a){return!0===a.disabled},checked:function(a){var g=a.nodeName.toLowerCase();return"input"===g&&!!a.checked||"option"===g&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,!0===a.selected},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if("@"<a.nodeName||3===a.nodeType||4===a.nodeType)return!1;return!0},parent:function(a){return!N.pseudos.empty(a)},header:function(a){return V.test(a.nodeName)},
input:function(a){return Ea.test(a.nodeName)},button:function(a){var g=a.nodeName.toLowerCase();return"input"===g&&"button"===a.type||"button"===g},text:function(a){var g;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(g=a.getAttribute("type"))||g.toLowerCase()===a.type)},first:p(function(){return[0]}),last:p(function(a,g){return[g-1]}),eq:p(function(a,g,b){return[0>b?b+g:b]}),even:p(function(a,g){for(var b=0;g>b;b+=2)a.push(b);return a}),odd:p(function(a,g){for(var b=1;g>b;b+=
2)a.push(b);return a}),lt:p(function(a,g,b){for(g=0>b?b+g:b;0<=--g;)a.push(g);return a}),gt:p(function(a,g,b){for(b=0>b?b+g:b;g>++b;)a.push(b);return a})}};N.pseudos.nth=N.pseudos.eq;for(O in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})N.pseudos[O]=f(O);for(O in{submit:!0,reset:!0})N.pseudos[O]=k(O);n.prototype=N.filters=N.pseudos;N.setFilters=new n;var Qa=g.compile=function(a,g){var b,c=[],h=[],d=pa[a+" "];if(!d){g||(g=m(a));for(b=g.length;b--;)d=B(g[b]),d[E]?c.push(d):h.push(d);d=pa(a,v(h,
c))}return d};K.sortStable=E.split("").sort(ua).join("")===E;K.detectDuplicates=J;ea();K.sortDetached=r(function(a){return 1&a.compareDocumentPosition(M.createElement("div"))});r(function(a){return a.innerHTML="\x3ca href\x3d'#'\x3e\x3c/a\x3e","#"===a.firstChild.getAttribute("href")})||e("type|href|height|width",function(a,g,c){return c?b:a.getAttribute(g,"type"===g.toLowerCase()?1:2)});K.attributes&&r(function(a){return a.innerHTML="\x3cinput/\x3e",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||
e("value",function(a,g,c){return c||"input"!==a.nodeName.toLowerCase()?b:a.defaultValue});r(function(a){return null==a.getAttribute("disabled")})||e("checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",function(a,g,c){var h;return c?b:(h=a.getAttributeNode(g))&&h.specified?h.value:!0===a[g]?g.toLowerCase():null});h.find=g;h.expr=g.selectors;h.expr[":"]=h.expr.pseudos;h.unique=g.uniqueSort;h.text=g.getText;h.isXMLDoc=g.isXML;h.contains=
g.contains})(a);var Pa={};h.Callbacks=function(a){a="string"==typeof a?Pa[a]||m(a):h.extend({},a);var g,b,c,d,e,l,k=[],p=!a.once&&[],q=function(h){b=a.memory&&h;c=!0;e=l||0;l=0;d=k.length;for(g=!0;k&&d>e;e++)if(!1===k[e].apply(h[0],h[1])&&a.stopOnFalse){b=!1;break}g=!1;k&&(p?p.length&&q(p.shift()):b?k=[]:n.disable())},n={add:function(){if(k){var c=k.length;(function Ta(g){h.each(g,function(g,b){g=h.type(b);"function"===g?a.unique&&n.has(b)||k.push(b):b&&b.length&&"string"!==g&&Ta(b)})})(arguments);
g?d=k.length:b&&(l=c,q(b))}return this},remove:function(){return k&&h.each(arguments,function(a,b){for(var c;-1<(c=h.inArray(b,k,c));)k.splice(c,1),g&&(d>=c&&d--,e>=c&&e--)}),this},has:function(a){return a?-1<h.inArray(a,k):!(!k||!k.length)},empty:function(){return k=[],d=0,this},disable:function(){return k=p=b=f,this},disabled:function(){return!k},lock:function(){return p=f,b||n.disable(),this},locked:function(){return!p},fireWith:function(a,b){return!k||c&&!p||(b=b||[],b=[a,b.slice?b.slice():b],
g?p.push(b):q(b)),this},fire:function(){return n.fireWith(this,arguments),this},fired:function(){return!!c}};return n};h.extend({Deferred:function(a){var g=[["resolve","done",h.Callbacks("once memory"),"resolved"],["reject","fail",h.Callbacks("once memory"),"rejected"],["notify","progress",h.Callbacks("memory")]],b="pending",c={state:function(){return b},always:function(){return d.done(arguments).fail(arguments),this},then:function(){var a=arguments;return h.Deferred(function(b){h.each(g,function(g,
r){var e=r[0],l=h.isFunction(a[g])&&a[g];d[r[1]](function(){var a=l&&l.apply(this,arguments);a&&h.isFunction(a.promise)?a.promise().done(b.resolve).fail(b.reject).progress(b.notify):b[e+"With"](this===c?b.promise():this,l?[a]:arguments)})});a=null}).promise()},promise:function(a){return null!=a?h.extend(a,c):c}},d={};return c.pipe=c.then,h.each(g,function(a,h){var r=h[2],e=h[3];c[h[1]]=r.add;e&&r.add(function(){b=e},g[1^a][2].disable,g[2][2].lock);d[h[0]]=function(){return d[h[0]+"With"](this===d?
c:this,arguments),this};d[h[0]+"With"]=r.fireWith}),c.promise(d),a&&a.call(d,d),d},when:function(a){var g=0,b=Q.call(arguments),c=b.length,d=1!==c||a&&h.isFunction(a.promise)?c:0,e=1===d?a:h.Deferred(),l=function(a,g,b){return function(c){g[a]=this;b[a]=1<arguments.length?Q.call(arguments):c;b===k?e.notifyWith(g,b):--d||e.resolveWith(g,b)}},f;if(1<c){var k=Array(c);var p=Array(c);for(f=Array(c);c>g;g++)b[g]&&h.isFunction(b[g].promise)?b[g].promise().done(l(g,f,b)).fail(e.reject).progress(l(g,p,k)):
--d}return d||e.resolveWith(f,b),e.promise()}});h.support=function(g){var b,c,d,e,l=u.createElement("div");if(l.setAttribute("className","t"),l.innerHTML="  \x3clink/\x3e\x3ctable\x3e\x3c/table\x3e\x3ca href\x3d'/a'\x3ea\x3c/a\x3e\x3cinput type\x3d'checkbox'/\x3e",b=l.getElementsByTagName("*")||[],c=l.getElementsByTagName("a")[0],!c||!c.style||!b.length)return g;var f=u.createElement("select");var k=f.appendChild(u.createElement("option"));b=l.getElementsByTagName("input")[0];c.style.cssText="top:1px;float:left;opacity:.5";
g.getSetAttribute="t"!==l.className;g.leadingWhitespace=3===l.firstChild.nodeType;g.tbody=!l.getElementsByTagName("tbody").length;g.htmlSerialize=!!l.getElementsByTagName("link").length;g.style=/top/.test(c.getAttribute("style"));g.hrefNormalized="/a"===c.getAttribute("href");g.opacity=/^0.5/.test(c.style.opacity);g.cssFloat=!!c.style.cssFloat;g.checkOn=!!b.value;g.optSelected=k.selected;g.enctype=!!u.createElement("form").enctype;g.html5Clone="\x3c:nav\x3e\x3c/:nav\x3e"!==u.createElement("nav").cloneNode(!0).outerHTML;
g.inlineBlockNeedsLayout=!1;g.shrinkWrapBlocks=!1;g.pixelPosition=!1;g.deleteExpando=!0;g.noCloneEvent=!0;g.reliableMarginRight=!0;g.boxSizingReliable=!0;b.checked=!0;g.noCloneChecked=b.cloneNode(!0).checked;f.disabled=!0;g.optDisabled=!k.disabled;try{delete l.test}catch(qc){g.deleteExpando=!1}b=u.createElement("input");b.setAttribute("value","");g.input=""===b.getAttribute("value");b.value="t";b.setAttribute("type","radio");g.radioValue="t"===b.value;b.setAttribute("checked","t");b.setAttribute("name",
"t");c=u.createDocumentFragment();c.appendChild(b);g.appendChecked=b.checked;g.checkClone=c.cloneNode(!0).cloneNode(!0).lastChild.checked;l.attachEvent&&(l.attachEvent("onclick",function(){g.noCloneEvent=!1}),l.cloneNode(!0).click());for(e in{submit:!0,change:!0,focusin:!0})l.setAttribute(c="on"+e,"t"),g[e+"Bubbles"]=c in a||!1===l.attributes[c].expando;l.style.backgroundClip="content-box";l.cloneNode(!0).style.backgroundClip="";g.clearCloneStyle="content-box"===l.style.backgroundClip;for(e in h(g))break;
return g.ownLast="0"!==e,h(function(){var b,c,r,e=u.getElementsByTagName("body")[0];e&&(b=u.createElement("div"),b.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",e.appendChild(b).appendChild(l),l.innerHTML="\x3ctable\x3e\x3ctr\x3e\x3ctd\x3e\x3c/td\x3e\x3ctd\x3et\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e",r=l.getElementsByTagName("td"),r[0].style.cssText="padding:0;margin:0;border:0;display:none",d=0===r[0].offsetHeight,r[0].style.display="",r[1].style.display=
"none",g.reliableHiddenOffsets=d&&0===r[0].offsetHeight,l.innerHTML="",l.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",h.swap(e,null!=e.style.zoom?{zoom:1}:{},function(){g.boxSizing=4===l.offsetWidth}),a.getComputedStyle&&(g.pixelPosition="1%"!==(a.getComputedStyle(l,null)||{}).top,g.boxSizingReliable="4px"===(a.getComputedStyle(l,null)||{width:"4px"}).width,c=l.appendChild(u.createElement("div")),
c.style.cssText=l.style.cssText="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",c.style.marginRight=c.style.width="0",l.style.width="1px",g.reliableMarginRight=!parseFloat((a.getComputedStyle(c,null)||{}).marginRight)),typeof l.style.zoom!==E&&(l.innerHTML="",l.style.cssText="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;width:1px;padding:1px;display:inline;zoom:1",
g.inlineBlockNeedsLayout=3===l.offsetWidth,l.style.display="block",l.innerHTML="\x3cdiv\x3e\x3c/div\x3e",l.firstChild.style.width="5px",g.shrinkWrapBlocks=3!==l.offsetWidth,g.inlineBlockNeedsLayout&&(e.style.zoom=1)),e.removeChild(b),b=l=r=c=null)}),b=f=c=k=c=b=null,g}({});var Qa=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,Hb=/([A-Z])/g;h.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?h.cache[a[h.expando]]:a[h.expando],!!a&&
!d(a)},data:function(a,b,c){return e(a,b,c)},removeData:function(a,b){return c(a,b)},_data:function(a,b,c){return e(a,b,c,!0)},_removeData:function(a,b){return c(a,b,!0)},acceptData:function(a){if(a.nodeType&&1!==a.nodeType&&9!==a.nodeType)return!1;var g=a.nodeName&&h.noData[a.nodeName.toLowerCase()];return!g||!0!==g&&a.getAttribute("classid")===g}});h.fn.extend({data:function(a,c){var g,d=null,e=0,r=this[0];if(a===f){if(this.length&&(d=h.data(r),1===r.nodeType&&!h._data(r,"parsedAttrs"))){for(g=
r.attributes;g.length>e;e++){var l=g[e].name;0===l.indexOf("data-")&&(l=h.camelCase(l.slice(5)),b(r,l,d[l]))}h._data(r,"parsedAttrs",!0)}return d}return"object"==typeof a?this.each(function(){h.data(this,a)}):1<arguments.length?this.each(function(){h.data(this,a,c)}):r?b(r,a,h.data(r,a)):null},removeData:function(a){return this.each(function(){h.removeData(this,a)})}});h.extend({queue:function(a,b,c){var g;return a?(b=(b||"fx")+"queue",g=h._data(a,b),c&&(!g||h.isArray(c)?g=h._data(a,b,h.makeArray(c)):
g.push(c)),g||[]):f},dequeue:function(a,b){b=b||"fx";var g=h.queue(a,b),c=g.length,d=g.shift(),e=h._queueHooks(a,b),r=function(){h.dequeue(a,b)};"inprogress"===d&&(d=g.shift(),c--);d&&("fx"===b&&g.unshift("inprogress"),delete e.stop,d.call(a,r,e));!c&&e&&e.empty.fire()},_queueHooks:function(a,b){var g=b+"queueHooks";return h._data(a,g)||h._data(a,g,{empty:h.Callbacks("once memory").add(function(){h._removeData(a,b+"queue");h._removeData(a,g)})})}});h.fn.extend({queue:function(a,b){var g=2;return"string"!=
typeof a&&(b=a,a="fx",g--),g>arguments.length?h.queue(this[0],a):b===f?this:this.each(function(){var g=h.queue(this,a,b);h._queueHooks(this,a);"fx"===a&&"inprogress"!==g[0]&&h.dequeue(this,a)})},dequeue:function(a){return this.each(function(){h.dequeue(this,a)})},delay:function(a,b){return a=h.fx?h.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(g,b){var c=setTimeout(g,a);b.stop=function(){clearTimeout(c)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var g,c=1,
d=h.Deferred(),e=this,r=this.length,l=function(){--c||d.resolveWith(e,[e])};"string"!=typeof a&&(b=a,a=f);for(a=a||"fx";r--;)(g=h._data(e[r],a+"queueHooks"))&&g.empty&&(c++,g.empty.add(l));return l(),d.promise(b)}});var Ia,ab=/[\t\r\n\f]/g,Nb=/\r/g,Ob=/^(?:input|select|textarea|button|object)$/i,Pb=/^(?:a|area)$/i,bb=/^(?:checked|selected)$/i,Fa=h.support.getSetAttribute,Ua=h.support.input;h.fn.extend({attr:function(a,b){return h.access(this,h.attr,a,b,1<arguments.length)},removeAttr:function(a){return this.each(function(){h.removeAttr(this,
a)})},prop:function(a,b){return h.access(this,h.prop,a,b,1<arguments.length)},removeProp:function(a){return a=h.propFix[a]||a,this.each(function(){try{this[a]=f,delete this[a]}catch(r){}})},addClass:function(a){var g,b,c,d,e=0,l=this.length;var f="string"==typeof a&&a;if(h.isFunction(a))return this.each(function(g){h(this).addClass(a.call(this,g,this.className))});if(f)for(f=(a||"").match(ja)||[];l>e;e++)if(g=this[e],b=1===g.nodeType&&(g.className?(" "+g.className+" ").replace(ab," "):" ")){for(d=
0;c=f[d++];)0>b.indexOf(" "+c+" ")&&(b+=c+" ");g.className=h.trim(b)}return this},removeClass:function(a){var g,b,c,d,e=0,l=this.length;var f=0===arguments.length||"string"==typeof a&&a;if(h.isFunction(a))return this.each(function(g){h(this).removeClass(a.call(this,g,this.className))});if(f)for(f=(a||"").match(ja)||[];l>e;e++)if(g=this[e],b=1===g.nodeType&&(g.className?(" "+g.className+" ").replace(ab," "):"")){for(d=0;c=f[d++];)for(;0<=b.indexOf(" "+c+" ");)b=b.replace(" "+c+" "," ");g.className=
a?h.trim(b):""}return this},toggleClass:function(a,b){var g=typeof a;return"boolean"==typeof b&&"string"===g?b?this.addClass(a):this.removeClass(a):h.isFunction(a)?this.each(function(g){h(this).toggleClass(a.call(this,g,this.className,b),b)}):this.each(function(){if("string"===g)for(var b,c=0,d=h(this),e=a.match(ja)||[];b=e[c++];)d.hasClass(b)?d.removeClass(b):d.addClass(b);else(g===E||"boolean"===g)&&(this.className&&h._data(this,"__className__",this.className),this.className=this.className||!1===
a?"":h._data(this,"__className__")||"")})},hasClass:function(a){a=" "+a+" ";for(var g=0,b=this.length;b>g;g++)if(1===this[g].nodeType&&0<=(" "+this[g].className+" ").replace(ab," ").indexOf(a))return!0;return!1},val:function(a){var g,b,c,d=this[0];if(arguments.length)return c=h.isFunction(a),this.each(function(g){var d;1===this.nodeType&&(d=c?a.call(this,g,h(this).val()):a,null==d?d="":"number"==typeof d?d+="":h.isArray(d)&&(d=h.map(d,function(a){return null==a?"":a+""})),b=h.valHooks[this.type]||
h.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&b.set(this,d,"value")!==f||(this.value=d))});if(d)return b=h.valHooks[d.type]||h.valHooks[d.nodeName.toLowerCase()],b&&"get"in b&&(g=b.get(d,"value"))!==f?g:(g=d.value,"string"==typeof g?g.replace(Nb,""):null==g?"":g)}});h.extend({valHooks:{option:{get:function(a){var g=h.find.attr(a,"value");return null!=g?g:a.text}},select:{get:function(a){for(var g,b=a.options,c=a.selectedIndex,d="select-one"===a.type||0>c,e=d?null:[],l=d?c+1:b.length,f=0>c?
l:d?c:0;l>f;f++)if(g=b[f],!(!g.selected&&f!==c||(h.support.optDisabled?g.disabled:null!==g.getAttribute("disabled"))||g.parentNode.disabled&&h.nodeName(g.parentNode,"optgroup"))){if(a=h(g).val(),d)return a;e.push(a)}return e},set:function(a,b){for(var g,c=a.options,d=h.makeArray(b),e=c.length;e--;)b=c[e],(b.selected=0<=h.inArray(h(b).val(),d))&&(g=!0);return g||(a.selectedIndex=-1),d}}},attr:function(a,b,c){var g,d,e=a.nodeType;if(a&&3!==e&&8!==e&&2!==e)return typeof a.getAttribute===E?h.prop(a,b,
c):(1===e&&h.isXMLDoc(a)||(b=b.toLowerCase(),g=h.attrHooks[b]||(h.expr.match.bool.test(b)?Qb:Ia)),c===f?g&&"get"in g&&null!==(d=g.get(a,b))?d:(d=h.find.attr(a,b),null==d?f:d):null!==c?g&&"set"in g&&(d=g.set(a,c,b))!==f?d:(a.setAttribute(b,c+""),c):(h.removeAttr(a,b),f))},removeAttr:function(a,b){var g=0,c=b&&b.match(ja);if(c&&1===a.nodeType)for(;b=c[g++];){var d=h.propFix[b]||b;h.expr.match.bool.test(b)?Ua&&Fa||!bb.test(b)?a[d]=!1:a[h.camelCase("default-"+b)]=a[d]=!1:h.attr(a,b,"");a.removeAttribute(Fa?
b:d)}},attrHooks:{type:{set:function(a,b){if(!h.support.radioValue&&"radio"===b&&h.nodeName(a,"input")){var g=a.value;return a.setAttribute("type",b),g&&(a.value=g),b}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var g,d,e,l=a.nodeType;if(a&&3!==l&&8!==l&&2!==l)return e=1!==l||!h.isXMLDoc(a),e&&(b=h.propFix[b]||b,d=h.propHooks[b]),c!==f?d&&"set"in d&&(g=d.set(a,c,b))!==f?g:a[b]=c:d&&"get"in d&&null!==(g=d.get(a,b))?g:a[b]},propHooks:{tabIndex:{get:function(a){var b=h.find.attr(a,
"tabindex");return b?parseInt(b,10):Ob.test(a.nodeName)||Pb.test(a.nodeName)&&a.href?0:-1}}}});var Qb={set:function(a,b,c){return!1===b?h.removeAttr(a,c):Ua&&Fa||!bb.test(c)?a.setAttribute(!Fa&&h.propFix[c]||c,c):a[h.camelCase("default-"+c)]=a[c]=!0,c}};h.each(h.expr.match.bool.source.match(/\w+/g),function(a,b){var g=h.expr.attrHandle[b]||h.find.attr;h.expr.attrHandle[b]=Ua&&Fa||!bb.test(b)?function(a,b,c){var d=h.expr.attrHandle[b];a=c?f:(h.expr.attrHandle[b]=f)!=g(a,b,c)?b.toLowerCase():null;return h.expr.attrHandle[b]=
d,a}:function(a,b,g){return g?f:a[h.camelCase("default-"+b)]?b.toLowerCase():null}});Ua&&Fa||(h.attrHooks.value={set:function(a,b,c){return h.nodeName(a,"input")?(a.defaultValue=b,f):Ia&&Ia.set(a,b,c)}});Fa||(Ia={set:function(a,b,c){var g=a.getAttributeNode(c);return g||a.setAttributeNode(g=a.ownerDocument.createAttribute(c)),g.value=b+="","value"===c||b===a.getAttribute(c)?b:f}},h.expr.attrHandle.id=h.expr.attrHandle.name=h.expr.attrHandle.coords=function(a,b,c){var g;return c?f:(g=a.getAttributeNode(b))&&
""!==g.value?g.value:null},h.valHooks.button={get:function(a,b){return(a=a.getAttributeNode(b))&&a.specified?a.value:f},set:Ia.set},h.attrHooks.contenteditable={set:function(a,b,c){Ia.set(a,""===b?!1:b,c)}},h.each(["width","height"],function(a,b){h.attrHooks[b]={set:function(a,g){return""===g?(a.setAttribute(b,"auto"),g):f}}}));h.support.hrefNormalized||h.each(["href","src"],function(a,b){h.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}});h.support.style||(h.attrHooks.style={get:function(a){return a.style.cssText||
f},set:function(a,b){return a.style.cssText=b+""}});h.support.optSelected||(h.propHooks.selected={get:function(a){a=a.parentNode;return a&&(a.selectedIndex,a.parentNode&&a.parentNode.selectedIndex),null}});h.each("tabIndex readOnly maxLength cellSpacing cellPadding rowSpan colSpan useMap frameBorder contentEditable".split(" "),function(){h.propFix[this.toLowerCase()]=this});h.support.enctype||(h.propFix.enctype="encoding");h.each(["radio","checkbox"],function(){h.valHooks[this]={set:function(a,b){return h.isArray(b)?
a.checked=0<=h.inArray(h(a).val(),b):f}};h.support.checkOn||(h.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var cb=/^(?:input|select|textarea)$/i,Rb=/^key/,Sb=/^(?:mouse|contextmenu)|click/,ob=/^(?:focusinfocus|focusoutblur)$/,pb=/^([^.]*)(?:\.(.+)|)$/;h.event={global:{},add:function(a,b,c,d,e){var g,l,r,k,p,m,n,q;if(l=h._data(a)){c.handler&&(r=c,c=r.handler,e=r.selector);c.guid||(c.guid=h.guid++);(g=l.events)||(g=l.events={});(p=l.handle)||(p=l.handle=function(a){return typeof h===
E||a&&h.event.triggered===a.type?f:h.event.dispatch.apply(p.elem,arguments)},p.elem=a);b=(b||"").match(ja)||[""];for(l=b.length;l--;){var u=pb.exec(b[l])||[];var t=q=u[1];u=(u[2]||"").split(".").sort();t&&(k=h.event.special[t]||{},t=(e?k.delegateType:k.bindType)||t,k=h.event.special[t]||{},m=h.extend({type:t,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&h.expr.match.needsContext.test(e),namespace:u.join(".")},r),(n=g[t])||(n=g[t]=[],n.delegateCount=0,k.setup&&!1!==k.setup.call(a,
d,u,p)||(a.addEventListener?a.addEventListener(t,p,!1):a.attachEvent&&a.attachEvent("on"+t,p))),k.add&&(k.add.call(a,m),m.handler.guid||(m.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,m):n.push(m),h.event.global[t]=!0)}a=null}},remove:function(a,b,c,d,e){var g,l,r,f,k,p,m,n,q=h.hasData(a)&&h._data(a);if(q&&(k=q.events)){b=(b||"").match(ja)||[""];for(f=b.length;f--;)if(l=pb.exec(b[f])||[],p=n=l[1],m=(l[2]||"").split(".").sort(),p){var u=h.event.special[p]||{};p=(d?u.delegateType:u.bindType)||
p;var t=k[p]||[];l=l[2]&&RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)");for(r=g=t.length;g--;){var H=t[g];!e&&n!==H.origType||c&&c.guid!==H.guid||l&&!l.test(H.namespace)||d&&d!==H.selector&&("**"!==d||!H.selector)||(t.splice(g,1),H.selector&&t.delegateCount--,u.remove&&u.remove.call(a,H))}r&&!t.length&&(u.teardown&&!1!==u.teardown.call(a,m,q.handle)||h.removeEvent(a,p,q.handle),delete k[p])}else for(p in k)h.event.remove(a,p+b[f],c,d,!0);h.isEmptyObject(k)&&(delete q.handle,h._removeData(a,"events"))}},
trigger:function(b,c,d,e){var g,l,r,k,p=[d||u],m=aa.call(b,"type")?b.type:b;var n=aa.call(b,"namespace")?b.namespace.split("."):[];if(r=g=d=d||u,3!==d.nodeType&&8!==d.nodeType&&!ob.test(m+h.event.triggered)&&(0<=m.indexOf(".")&&(n=m.split("."),m=n.shift(),n.sort()),l=0>m.indexOf(":")&&"on"+m,b=b[h.expando]?b:new h.Event(m,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=n.join("."),b.namespace_re=b.namespace?RegExp("(^|\\.)"+n.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=f,b.target||(b.target=
d),c=null==c?[b]:h.makeArray(c,[b]),k=h.event.special[m]||{},e||!k.trigger||!1!==k.trigger.apply(d,c))){if(!e&&!k.noBubble&&!h.isWindow(d)){var q=k.delegateType||m;for(ob.test(q+m)||(r=r.parentNode);r;r=r.parentNode)p.push(r),g=r;g===(d.ownerDocument||u)&&p.push(g.defaultView||g.parentWindow||a)}for(n=0;(r=p[n++])&&!b.isPropagationStopped();)b.type=1<n?q:k.bindType||m,(g=(h._data(r,"events")||{})[b.type]&&h._data(r,"handle"))&&g.apply(r,c),(g=l&&r[l])&&h.acceptData(r)&&g.apply&&!1===g.apply(r,c)&&
b.preventDefault();if(b.type=m,!(e||b.isDefaultPrevented()||k._default&&!1!==k._default.apply(p.pop(),c))&&h.acceptData(d)&&l&&d[m]&&!h.isWindow(d)){(g=d[l])&&(d[l]=null);h.event.triggered=m;try{d[m]()}catch(sc){}h.event.triggered=f;g&&(d[l]=g)}return b.result}},dispatch:function(a){a=h.event.fix(a);var b,g,c,d,e=Q.call(arguments);var l=(h._data(this,"events")||{})[a.type]||[];var k=h.event.special[a.type]||{};if(e[0]=a,a.delegateTarget=this,!k.preDispatch||!1!==k.preDispatch.call(this,a)){var p=
h.event.handlers.call(this,a,l);for(l=0;(c=p[l++])&&!a.isPropagationStopped();)for(a.currentTarget=c.elem,d=0;(g=c.handlers[d++])&&!a.isImmediatePropagationStopped();)a.namespace_re&&!a.namespace_re.test(g.namespace)||(a.handleObj=g,a.data=g.data,b=((h.event.special[g.origType]||{}).handle||g.handler).apply(c.elem,e),b===f||!1!==(a.result=b)||(a.preventDefault(),a.stopPropagation()));return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var g,c=[],d=b.delegateCount,
e=a.target;if(d&&e.nodeType&&(!a.button||"click"!==a.type))for(;e!=this;e=e.parentNode||this)if(1===e.nodeType&&(!0!==e.disabled||"click"!==a.type)){var l=[];for(g=0;d>g;g++){var r=b[g];var k=r.selector+" ";l[k]===f&&(l[k]=r.needsContext?0<=h(k,this).index(e):h.find(k,this,null,[e]).length);l[k]&&l.push(r)}l.length&&c.push({elem:e,handlers:l})}return b.length>d&&c.push({elem:this,handlers:b.slice(d)}),c},fix:function(a){if(a[h.expando])return a;var b=a.type;var g=a,c=this.fixHooks[b];c||(this.fixHooks[b]=
c=Sb.test(b)?this.mouseHooks:Rb.test(b)?this.keyHooks:{});var d=c.props?this.props.concat(c.props):this.props;a=new h.Event(g);for(b=d.length;b--;){var e=d[b];a[e]=g[e]}return a.target||(a.target=g.srcElement||u),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,c.filter?c.filter(a,g):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:["char","charCode","key",
"keyCode"],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 g,c,d,h=b.button,e=b.fromElement;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||u,d=c.documentElement,g=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||g&&g.scrollLeft||0)-(d&&d.clientLeft||g&&g.clientLeft||0),a.pageY=b.clientY+
(d&&d.scrollTop||g&&g.scrollTop||0)-(d&&d.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&e&&(a.relatedTarget=e===a.target?b.toElement:e),a.which||h===f||(a.which=1&h?1:2&h?3:4&h?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==t()&&this.focus)try{return this.focus(),!1}catch(g){}},delegateType:"focusin"},blur:{trigger:function(){return this===t()&&this.blur?(this.blur(),!1):f},delegateType:"focusout"},click:{trigger:function(){return h.nodeName(this,"input")&&"checkbox"===
this.type&&this.click?(this.click(),!1):f},_default:function(a){return h.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){a.result!==f&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){a=h.extend(new h.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?h.event.trigger(a,null,b):h.event.dispatch.call(b,a);a.isDefaultPrevented()&&c.preventDefault()}};h.removeEvent=u.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,
b,c){b="on"+b;a.detachEvent&&(typeof a[b]===E&&(a[b]=null),a.detachEvent(b,c))};h.Event=function(a,b){return this instanceof h.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||!1===a.returnValue||a.getPreventDefault&&a.getPreventDefault()?l:p):this.type=a,b&&h.extend(this,b),this.timeStamp=a&&a.timeStamp||h.now(),this[h.expando]=!0,f):new h.Event(a,b)};h.Event.prototype={isDefaultPrevented:p,isPropagationStopped:p,isImmediatePropagationStopped:p,
preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=l;a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=l;a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=l;this.stopPropagation()}};h.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){h.event.special[a]={delegateType:b,bindType:b,handle:function(a){var g,
c=a.relatedTarget,d=a.handleObj;return(!c||c!==this&&!h.contains(this,c))&&(a.type=d.origType,g=d.handler.apply(this,arguments),a.type=b),g}}});h.support.submitBubbles||(h.event.special.submit={setup:function(){return h.nodeName(this,"form")?!1:(h.event.add(this,"click._submit keypress._submit",function(a){a=a.target;(a=h.nodeName(a,"input")||h.nodeName(a,"button")?a.form:f)&&!h._data(a,"submitBubbles")&&(h.event.add(a,"submit._submit",function(a){a._submit_bubble=!0}),h._data(a,"submitBubbles",!0))}),
f)},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&h.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return h.nodeName(this,"form")?!1:(h.event.remove(this,"._submit"),f)}});h.support.changeBubbles||(h.event.special.change={setup:function(){return cb.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(h.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=
!0)}),h.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1);h.event.simulate("change",this,a,!0)})),!1):(h.event.add(this,"beforeactivate._change",function(a){a=a.target;cb.test(a.nodeName)&&!h._data(a,"changeBubbles")&&(h.event.add(a,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||h.event.simulate("change",this.parentNode,a,!0)}),h._data(a,"changeBubbles",!0))}),f)},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):f},teardown:function(){return h.event.remove(this,"._change"),!cb.test(this.nodeName)}});h.support.focusinBubbles||h.each({focus:"focusin",blur:"focusout"},function(a,b){var c=0,g=function(a){h.event.simulate(b,a.target,h.event.fix(a),!0)};h.event.special[b]={setup:function(){0===c++&&u.addEventListener(a,g,!0)},teardown:function(){0===--c&&u.removeEventListener(a,g,!0)}}});h.fn.extend({on:function(a,b,c,
d,e){var g,l;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=f);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=f):null==d&&("string"==typeof b?(d=c,c=f):(d=c,c=b,b=f)),!1===d)d=p;else if(!d)return this;return 1===e&&(l=d,d=function(a){return h().off(a),l.apply(this,arguments)},d.guid=l.guid||(l.guid=h.guid++)),this.each(function(){h.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 g,d;if(a&&a.preventDefault&&a.handleObj)return g=
a.handleObj,h(a.delegateTarget).off(g.namespace?g.origType+"."+g.namespace:g.origType,g.selector,g.handler),this;if("object"==typeof a){for(d in a)this.off(d,b,a[d]);return this}return(!1===b||"function"==typeof b)&&(c=b,b=f),!1===c&&(c=p),this.each(function(){h.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){h.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?h.event.trigger(a,b,c,!0):f}});var Ib=/^.[^:#\[\.,]*$/,Tb=/^(?:parents|prev(?:Until|All))/,
qb=h.expr.match.needsContext,Ub={children:!0,contents:!0,next:!0,prev:!0};h.fn.extend({find:function(a){var b,c=[],g=this,d=g.length;if("string"!=typeof a)return this.pushStack(h(a).filter(function(){for(b=0;d>b;b++)if(h.contains(g[b],this))return!0}));for(b=0;d>b;b++)h.find(a,g[b],c);return c=this.pushStack(1<d?h.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},has:function(a){var b,c=h(a,this),g=c.length;return this.filter(function(){for(b=0;g>b;b++)if(h.contains(this,c[b]))return!0})},
not:function(a){return this.pushStack(v(this,a||[],!0))},filter:function(a){return this.pushStack(v(this,a||[],!1))},is:function(a){return!!v(this,"string"==typeof a&&qb.test(a)?h(a):a||[],!1).length},closest:function(a,b){for(var c,g=0,d=this.length,e=[],l=qb.test(a)||"string"!=typeof a?h(a,b||this.context):0;d>g;g++)for(c=this[g];c&&c!==b;c=c.parentNode)if(11>c.nodeType&&(l?-1<l.index(c):1===c.nodeType&&h.find.matchesSelector(c,a))){e.push(c);break}return this.pushStack(1<e.length?h.unique(e):e)},
index:function(a){return a?"string"==typeof a?h.inArray(this[0],h(a)):h.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){a="string"==typeof a?h(a,b):h.makeArray(a&&a.nodeType?[a]:a);a=h.merge(this.get(),a);return this.pushStack(h.unique(a))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});h.each({parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},parents:function(a){return h.dir(a,
"parentNode")},parentsUntil:function(a,b,c){return h.dir(a,"parentNode",c)},next:function(a){return C(a,"nextSibling")},prev:function(a){return C(a,"previousSibling")},nextAll:function(a){return h.dir(a,"nextSibling")},prevAll:function(a){return h.dir(a,"previousSibling")},nextUntil:function(a,b,c){return h.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return h.dir(a,"previousSibling",c)},siblings:function(a){return h.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return h.sibling(a.firstChild)},
contents:function(a){return h.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:h.merge([],a.childNodes)}},function(a,b){h.fn[a]=function(c,g){var d=h.map(this,b,c);return"Until"!==a.slice(-5)&&(g=c),g&&"string"==typeof g&&(d=h.filter(g,d)),1<this.length&&(Ub[a]||(d=h.unique(d)),Tb.test(a)&&(d=d.reverse())),this.pushStack(d)}});h.extend({filter:function(a,b,c){var g=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===g.nodeType?h.find.matchesSelector(g,a)?[g]:[]:h.find.matches(a,h.grep(b,
function(a){return 1===a.nodeType}))},dir:function(a,b,c){var g=[];for(a=a[b];a&&9!==a.nodeType&&(c===f||1!==a.nodeType||!h(a).is(c));)1===a.nodeType&&g.push(a),a=a[b];return g},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}});var kb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Vb=/ jQuery\d+="(?:null|\d+)"/g,rb=RegExp("\x3c(?:"+kb+")[\\s/\x3e]",
"i"),db=/^\s+/,sb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,tb=/<([\w:]+)/,ub=/<tbody/i,Wb=/<|&#?\w+;/,Xb=/<(?:script|style|link)/i,Xa=/^(?:checkbox|radio)$/i,Yb=/checked\s*(?:[^=]|=\s*.checked.)/i,vb=/^$|\/(?:java|ecma)script/i,Jb=/^true\/(.*)/,Zb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,na={option:[1,"\x3cselect multiple\x3d'multiple'\x3e","\x3c/select\x3e"],legend:[1,"\x3cfieldset\x3e","\x3c/fieldset\x3e"],area:[1,"\x3cmap\x3e","\x3c/map\x3e"],param:[1,"\x3cobject\x3e",
"\x3c/object\x3e"],thead:[1,"\x3ctable\x3e","\x3c/table\x3e"],tr:[2,"\x3ctable\x3e\x3ctbody\x3e","\x3c/tbody\x3e\x3c/table\x3e"],col:[2,"\x3ctable\x3e\x3ctbody\x3e\x3c/tbody\x3e\x3ccolgroup\x3e","\x3c/colgroup\x3e\x3c/table\x3e"],td:[3,"\x3ctable\x3e\x3ctbody\x3e\x3ctr\x3e","\x3c/tr\x3e\x3c/tbody\x3e\x3c/table\x3e"],_default:h.support.htmlSerialize?[0,"",""]:[1,"X\x3cdiv\x3e","\x3c/div\x3e"]},eb=x(u).appendChild(u.createElement("div"));na.optgroup=na.option;na.tbody=na.tfoot=na.colgroup=na.caption=
na.thead;na.th=na.td;h.fn.extend({text:function(a){return h.access(this,function(a){return a===f?h.text(this):this.empty().append((this[0]&&this[0].ownerDocument||u).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||z(this,a).appendChild(a)})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=z(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=a?h.filter(a,this):this,g=0;null!=(a=c[g]);g++)b||1!==a.nodeType||h.cleanData(y(a)),a.parentNode&&(b&&h.contains(a.ownerDocument,a)&&n(y(a,"script")),a.parentNode.removeChild(a));return this},empty:function(){for(var a,
b=0;null!=(a=this[b]);b++){for(1===a.nodeType&&h.cleanData(y(a,!1));a.firstChild;)a.removeChild(a.firstChild);a.options&&h.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 h.clone(this,a,b)})},html:function(a){return h.access(this,function(a){var b=this[0]||{},c=0,g=this.length;if(a===f)return 1===b.nodeType?b.innerHTML.replace(Vb,""):f;if(!("string"!=typeof a||Xb.test(a)||!h.support.htmlSerialize&&rb.test(a)||
!h.support.leadingWhitespace&&db.test(a)||na[(tb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(sb,"\x3c$1\x3e\x3c/$2\x3e");try{for(;g>c;c++)b=this[c]||{},1===b.nodeType&&(h.cleanData(y(b,!1)),b.innerHTML=a);b=0}catch(oc){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=h.map(this,function(a){return[a.nextSibling,a.parentNode]}),b=0;return this.domManip(arguments,function(c){var g=a[b++],d=a[b++];d&&(g&&g.parentNode!==d&&(g=this.nextSibling),h(this).remove(),
d.insertBefore(c,g))},!0),b?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b,c){a=ua.apply([],a);var g,d,e,l=0,f=this.length,k=this,p=f-1,m=a[0],n=h.isFunction(m);if(n||!(1>=f||"string"!=typeof m||h.support.checkClone)&&Yb.test(m))return this.each(function(g){var d=k.eq(g);n&&(a[0]=m.call(this,g,d.html()));d.domManip(a,b,c)});if(f&&(e=h.buildFragment(a,this[0].ownerDocument,!1,!c&&this),g=e.firstChild,1===e.childNodes.length&&(e=g),g)){var r=h.map(y(e,"script"),
w);for(d=r.length;f>l;l++)g=e,l!==p&&(g=h.clone(g,!0,!0),d&&h.merge(r,y(g,"script"))),b.call(this[l],g,l);if(d)for(e=r[r.length-1].ownerDocument,h.map(r,D),l=0;d>l;l++)g=r[l],vb.test(g.type||"")&&!h._data(g,"globalEval")&&h.contains(e,g)&&(g.src?h._evalUrl(g.src):h.globalEval((g.text||g.textContent||g.innerHTML||"").replace(Zb,"")));e=g=null}return this}});h.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){h.fn[a]=function(a){for(var c=
0,g=[],d=h(a),e=d.length-1;e>=c;c++)a=c===e?this:this.clone(!0),h(d[c])[b](a),va.apply(g,a.get());return this.pushStack(g)}});h.extend({clone:function(a,b,c){var g,d,e,l=h.contains(a.ownerDocument,a);if(h.support.html5Clone||h.isXMLDoc(a)||!rb.test("\x3c"+a.nodeName+"\x3e")?d=a.cloneNode(!0):(eb.innerHTML=a.outerHTML,eb.removeChild(d=eb.firstChild)),!(h.support.noCloneEvent&&h.support.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||h.isXMLDoc(a))){var f=y(d);var k=y(a);for(e=0;null!=(g=k[e]);++e)if(f[e]){var p=
void 0,m,r=g,q=f[e];if(1===q.nodeType){if(m=q.nodeName.toLowerCase(),!h.support.noCloneEvent&&q[h.expando]){g=h._data(q);for(p in g.events)h.removeEvent(q,p,g.handle);q.removeAttribute(h.expando)}"script"===m&&q.text!==r.text?(w(q).text=r.text,D(q)):"object"===m?(q.parentNode&&(q.outerHTML=r.outerHTML),h.support.html5Clone&&r.innerHTML&&!h.trim(q.innerHTML)&&(q.innerHTML=r.innerHTML)):"input"===m&&Xa.test(r.type)?(q.defaultChecked=q.checked=r.checked,q.value!==r.value&&(q.value=r.value)):"option"===
m?q.defaultSelected=q.selected=r.defaultSelected:("input"===m||"textarea"===m)&&(q.defaultValue=r.defaultValue)}}}if(b)if(c)for(k=k||y(a),f=f||y(d),e=0;null!=(g=k[e]);e++)I(g,f[e]);else I(a,d);return f=y(d,"script"),0<f.length&&n(f,!l&&y(a,"script")),d},buildFragment:function(a,b,c,d){for(var g,e,l,f,k,p,m,q=a.length,r=x(b),u=[],t=0;q>t;t++)if(e=a[t],e||0===e)if("object"===h.type(e))h.merge(u,e.nodeType?[e]:e);else if(Wb.test(e)){f=f||r.appendChild(b.createElement("div"));k=(tb.exec(e)||["",""])[1].toLowerCase();
m=na[k]||na._default;f.innerHTML=m[1]+e.replace(sb,"\x3c$1\x3e\x3c/$2\x3e")+m[2];for(g=m[0];g--;)f=f.lastChild;if(!h.support.leadingWhitespace&&db.test(e)&&u.push(b.createTextNode(db.exec(e)[0])),!h.support.tbody)for(g=(e="table"!==k||ub.test(e)?"\x3ctable\x3e"!==m[1]||ub.test(e)?0:f:f.firstChild)&&e.childNodes.length;g--;)h.nodeName(p=e.childNodes[g],"tbody")&&!p.childNodes.length&&e.removeChild(p);h.merge(u,f.childNodes);for(f.textContent="";f.firstChild;)f.removeChild(f.firstChild);f=r.lastChild}else u.push(b.createTextNode(e));
f&&r.removeChild(f);h.support.appendChecked||h.grep(y(u,"input"),J);for(t=0;e=u[t++];)if((!d||-1===h.inArray(e,d))&&(l=h.contains(e.ownerDocument,e),f=y(r.appendChild(e),"script"),l&&n(f),c))for(g=0;e=f[g++];)vb.test(e.type||"")&&c.push(e);return r},cleanData:function(a,b){for(var c,g,d,e,l=0,f=h.expando,k=h.cache,p=h.support.deleteExpando,m=h.event.special;null!=(c=a[l]);l++)if((b||h.acceptData(c))&&(d=c[f],e=d&&k[d])){if(e.events)for(g in e.events)m[g]?h.event.remove(c,g):h.removeEvent(c,g,e.handle);
k[d]&&(delete k[d],p?delete c[f]:typeof c.removeAttribute!==E?c.removeAttribute(f):c[f]=null,da.push(d))}},_evalUrl:function(a){return h.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}});h.fn.extend({wrapAll:function(a){if(h.isFunction(a))return this.each(function(b){h(this).wrapAll(a.call(this,b))});if(this[0]){var b=h(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 h.isFunction(a)?this.each(function(b){h(this).wrapInner(a.call(this,b))}):this.each(function(){var b=h(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=h.isFunction(a);return this.each(function(c){h(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){h.nodeName(this,"body")||h(this).replaceWith(this.childNodes)}).end()}});var La,Ba,Ca,fb=/alpha\([^)]*\)/i,
$b=/opacity\s*=\s*([^)]*)/,ac=/^(top|right|bottom|left)$/,bc=/^(none|table(?!-c[ea]).+)/,wb=/^margin/,Kb=RegExp("^("+wa+")(.*)$","i"),Ra=RegExp("^("+wa+")(?!px)[a-z%]+$","i"),cc=RegExp("^([+-])\x3d("+wa+")","i"),mb={BODY:"block"},dc={position:"absolute",visibility:"hidden",display:"block"},xb={letterSpacing:0,fontWeight:400},Aa=["Top","Right","Bottom","Left"],lb=["Webkit","O","Moz","ms"];h.fn.extend({css:function(a,b){return h.access(this,function(a,b,c){var g={},d=0;if(h.isArray(b)){var e=Ba(a);
for(c=b.length;c>d;d++)g[b[d]]=h.css(a,b[d],!1,e);return g}return c!==f?h.style(a,b,c):h.css(a,b)},a,b,1<arguments.length)},show:function(){return ca(this,!0)},hide:function(){return ca(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){R(this)?h(this).show():h(this).hide()})}});h.extend({cssHooks:{opacity:{get:function(a,b){if(b)return a=Ca(a,"opacity"),""===a?"1":a}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,
order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":h.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var g,e,l,k=h.camelCase(b),p=a.style;if(b=h.cssProps[k]||(h.cssProps[k]=F(p,k)),l=h.cssHooks[b]||h.cssHooks[k],c===f)return l&&"get"in l&&(g=l.get(a,!1,d))!==f?g:p[b];if(e=typeof c,"string"===e&&(g=cc.exec(c))&&(c=(g[1]+1)*g[2]+parseFloat(h.css(a,b)),e="number"),!(null==c||"number"===e&&isNaN(c)||("number"!==e||h.cssNumber[k]||
(c+="px"),h.support.clearCloneStyle||""!==c||0!==b.indexOf("background")||(p[b]="inherit"),l&&"set"in l&&(c=l.set(a,c,d))===f)))try{p[b]=c}catch(rc){}}},css:function(a,b,c,d){var g,e,l,k=h.camelCase(b);return b=h.cssProps[k]||(h.cssProps[k]=F(a.style,k)),l=h.cssHooks[b]||h.cssHooks[k],l&&"get"in l&&(e=l.get(a,!0,c)),e===f&&(e=Ca(a,b,d)),"normal"===e&&b in xb&&(e=xb[b]),""===c||c?(g=parseFloat(e),!0===c||h.isNumeric(g)?g||0:e):e}});a.getComputedStyle?(Ba=function(b){return a.getComputedStyle(b,null)},
Ca=function(a,b,c){var g,d,e,l=(c=c||Ba(a))?c.getPropertyValue(b)||c[b]:f,k=a.style;return c&&(""!==l||h.contains(a.ownerDocument,a)||(l=h.style(a,b)),Ra.test(l)&&wb.test(b)&&(g=k.width,d=k.minWidth,e=k.maxWidth,k.minWidth=k.maxWidth=k.width=l,l=c.width,k.width=g,k.minWidth=d,k.maxWidth=e)),l}):u.documentElement.currentStyle&&(Ba=function(a){return a.currentStyle},Ca=function(a,b,c){var g,d,h;c=(c=c||Ba(a))?c[b]:f;var e=a.style;return null==c&&e&&e[b]&&(c=e[b]),Ra.test(c)&&!ac.test(b)&&(g=e.left,
d=a.runtimeStyle,h=d&&d.left,h&&(d.left=a.currentStyle.left),e.left="fontSize"===b?"1em":c,c=e.pixelLeft+"px",e.left=g,h&&(d.left=h)),""===c?"auto":c});h.each(["height","width"],function(a,b){h.cssHooks[b]={get:function(a,c,g){return c?0===a.offsetWidth&&bc.test(h.css(a,"display"))?h.swap(a,dc,function(){return ha(a,b,g)}):ha(a,b,g):f},set:function(a,c,g){var d=g&&Ba(a);return U(a,c,g?L(a,b,g,h.support.boxSizing&&"border-box"===h.css(a,"boxSizing",!1,d),d):0)}}});h.support.opacity||(h.cssHooks.opacity=
{get:function(a,b){return $b.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style;a=a.currentStyle;var g=h.isNumeric(b)?"alpha(opacity\x3d"+100*b+")":"",d=a&&a.filter||c.filter||"";c.zoom=1;(1<=b||""===b)&&""===h.trim(d.replace(fb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||a&&!a.filter)||(c.filter=fb.test(d)?d.replace(fb,g):d+" "+g)}});h(function(){h.support.reliableMarginRight||(h.cssHooks.marginRight=
{get:function(a,b){return b?h.swap(a,{display:"inline-block"},Ca,[a,"marginRight"]):f}});!h.support.pixelPosition&&h.fn.position&&h.each(["top","left"],function(a,b){h.cssHooks[b]={get:function(a,c){return c?(c=Ca(a,b),Ra.test(c)?h(a).position()[b]+"px":c):f}}})});h.expr&&h.expr.filters&&(h.expr.filters.hidden=function(a){return 0>=a.offsetWidth&&0>=a.offsetHeight||!h.support.reliableHiddenOffsets&&"none"===(a.style&&a.style.display||h.css(a,"display"))},h.expr.filters.visible=function(a){return!h.expr.filters.hidden(a)});
h.each({margin:"",padding:"",border:"Width"},function(a,b){h.cssHooks[a+b]={expand:function(c){var g=0,d={};for(c="string"==typeof c?c.split(" "):[c];4>g;g++)d[a+Aa[g]+b]=c[g]||c[g-2]||c[0];return d}};wb.test(a)||(h.cssHooks[a+b].set=U)});var ec=/%20/g,Lb=/\[\]$/,yb=/\r?\n/g,fc=/^(?:submit|button|image|reset|file)$/i,gc=/^(?:input|select|textarea|keygen)/i;h.fn.extend({serialize:function(){return h.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=h.prop(this,
"elements");return a?h.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!h(this).is(":disabled")&&gc.test(this.nodeName)&&!fc.test(a)&&(this.checked||!Xa.test(a))}).map(function(a,b){a=h(this).val();return null==a?null:h.isArray(a)?h.map(a,function(a){return{name:b.name,value:a.replace(yb,"\r\n")}}):{name:b.name,value:a.replace(yb,"\r\n")}}).get()}});h.param=function(a,b){var c,g=[],d=function(a,b){b=h.isFunction(b)?b():null==b?"":b;g[g.length]=encodeURIComponent(a)+"\x3d"+
encodeURIComponent(b)};if(b===f&&(b=h.ajaxSettings&&h.ajaxSettings.traditional),h.isArray(a)||a.jquery&&!h.isPlainObject(a))h.each(a,function(){d(this.name,this.value)});else for(c in a)ea(c,a[c],b,d);return g.join("\x26").replace(ec,"+")};h.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){h.fn[b]=function(a,c){return 0<
arguments.length?this.on(b,null,a,c):this.trigger(b)}});h.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 gb=h.now(),hb=/\?/,hc=/#.*$/,zb=/([?&])_=[^&]*/,ic=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,jc=/^(?:GET|HEAD)$/,kc=/^\/\//,Ab=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,
Bb=h.fn.load,Cb={},Ya={},Db="*/".concat("*");try{var Ga=W.href}catch(g){Ga=u.createElement("a"),Ga.href="",Ga=Ga.href}var Ja=Ab.exec(Ga.toLowerCase())||[];h.fn.load=function(a,b,c){if("string"!=typeof a&&Bb)return Bb.apply(this,arguments);var g,d,e,l=this,k=a.indexOf(" ");return 0<=k&&(g=a.slice(k,a.length),a=a.slice(0,k)),h.isFunction(b)?(c=b,b=f):b&&"object"==typeof b&&(e="POST"),0<l.length&&h.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){d=arguments;l.html(g?h("\x3cdiv\x3e").append(h.parseHTML(a)).find(g):
a)}).complete(c&&function(a,b){l.each(c,d||[a.responseText,b,a])}),this};h.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){h.fn[b]=function(a){return this.on(b,a)}});h.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ga,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Ja[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset\x3dUTF-8",accepts:{"*":Db,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":h.parseJSON,"text xml":h.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?K(K(a,h.ajaxSettings),b):K(h.ajaxSettings,a)},ajaxPrefilter:ba(Cb),ajaxTransport:ba(Ya),ajax:function(a,b){function c(a,b,c,g){var d,m,
ia,B=b;if(2!==v){v=2;l&&clearTimeout(l);p=f;e=g||"";A.readyState=0<a?4:0;g=200<=a&&300>a||304===a;if(c){var O=q;for(var x=A,M,y,X,G,z=O.contents,D=O.dataTypes;"*"===D[0];)D.shift(),y===f&&(y=O.mimeType||x.getResponseHeader("Content-Type"));if(y)for(G in z)if(z[G]&&z[G].test(y)){D.unshift(G);break}if(D[0]in c)X=D[0];else{for(G in c){if(!D[0]||O.converters[G+" "+D[0]]){X=G;break}M||(M=G)}X=X||M}O=X?(X!==D[0]&&D.unshift(X),c[X]):f}a:{c=q;M=O;y=A;X=g;var E,S,Q;O={};x=c.dataTypes.slice();if(x[1])for(E in c.converters)O[E.toLowerCase()]=
c.converters[E];for(G=x.shift();G;)if(c.responseFields[G]&&(y[c.responseFields[G]]=M),!Q&&X&&c.dataFilter&&(M=c.dataFilter(M,c.dataType)),Q=G,G=x.shift())if("*"===G)G=Q;else if("*"!==Q&&Q!==G){if(E=O[Q+" "+G]||O["* "+G],!E)for(F in O)if(S=F.split(" "),S[1]===G&&(E=O[Q+" "+S[0]]||O["* "+S[0]])){!0===E?E=O[F]:!0!==O[F]&&(G=S[0],x.unshift(S[1]));break}if(!0!==E)if(E&&c["throws"])M=E(M);else try{M=E(M)}catch(Mb){var F={state:"parsererror",error:E?Mb:"No conversion from "+Q+" to "+G};break a}}F={state:"success",
data:M}}O=F;g?(q.ifModified&&(ia=A.getResponseHeader("Last-Modified"),ia&&(h.lastModified[w]=ia),ia=A.getResponseHeader("etag"),ia&&(h.etag[w]=ia)),204===a||"HEAD"===q.type?B="nocontent":304===a?B="notmodified":(B=O.state,d=O.data,m=O.error,g=!m)):(m=B,(a||!B)&&(B="error",0>a&&(a=0)));A.status=a;A.statusText=(b||B)+"";g?t.resolveWith(n,[d,B,A]):t.rejectWith(n,[A,B,m]);A.statusCode(C);C=f;k&&u.trigger(g?"ajaxSuccess":"ajaxError",[A,q,g?d:m]);r.fireWith(n,[A,B]);k&&(u.trigger("ajaxComplete",[A,q]),
--h.active||h.event.trigger("ajaxStop"))}}"object"==typeof a&&(b=a,a=f);b=b||{};var g,d,e,l,k,p,m,q=h.ajaxSetup({},b),n=q.context||q,u=q.context&&(n.nodeType||n.jquery)?h(n):h.event,t=h.Deferred(),r=h.Callbacks("once memory"),C=q.statusCode||{},ia={},B={},v=0,O="canceled",A={readyState:0,getResponseHeader:function(a){var b;if(2===v){if(!m)for(m={};b=ic.exec(e);)m[b[1].toLowerCase()]=b[2];b=m[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===v?e:null},setRequestHeader:function(a,
b){var c=a.toLowerCase();return v||(a=B[c]=B[c]||a,ia[a]=b),this},overrideMimeType:function(a){return v||(q.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>v)for(b in a)C[b]=[C[b],a[b]];else A.always(a[A.status]);return this},abort:function(a){a=a||O;return p&&p.abort(a),c(0,a),this}};if(t.promise(A).complete=r.add,A.success=A.done,A.error=A.fail,q.url=((a||q.url||Ga)+"").replace(hc,"").replace(kc,Ja[1]+"//"),q.type=b.method||b.type||q.method||q.type,q.dataTypes=h.trim(q.dataType||"*").toLowerCase().match(ja)||
[""],null==q.crossDomain&&(g=Ab.exec(q.url.toLowerCase()),q.crossDomain=!(!g||g[1]===Ja[1]&&g[2]===Ja[2]&&(g[3]||("http:"===g[1]?"80":"443"))===(Ja[3]||("http:"===Ja[1]?"80":"443")))),q.data&&q.processData&&"string"!=typeof q.data&&(q.data=h.param(q.data,q.traditional)),Y(Cb,q,b,A),2===v)return A;(k=q.global)&&0===h.active++&&h.event.trigger("ajaxStart");q.type=q.type.toUpperCase();q.hasContent=!jc.test(q.type);var w=q.url;q.hasContent||(q.data&&(w=q.url+=(hb.test(w)?"\x26":"?")+q.data,delete q.data),
!1===q.cache&&(q.url=zb.test(w)?w.replace(zb,"$1_\x3d"+gb++):w+(hb.test(w)?"\x26":"?")+"_\x3d"+gb++));q.ifModified&&(h.lastModified[w]&&A.setRequestHeader("If-Modified-Since",h.lastModified[w]),h.etag[w]&&A.setRequestHeader("If-None-Match",h.etag[w]));(q.data&&q.hasContent&&!1!==q.contentType||b.contentType)&&A.setRequestHeader("Content-Type",q.contentType);A.setRequestHeader("Accept",q.dataTypes[0]&&q.accepts[q.dataTypes[0]]?q.accepts[q.dataTypes[0]]+("*"!==q.dataTypes[0]?", "+Db+"; q\x3d0.01":""):
q.accepts["*"]);for(d in q.headers)A.setRequestHeader(d,q.headers[d]);if(q.beforeSend&&(!1===q.beforeSend.call(n,A,q)||2===v))return A.abort();O="abort";for(d in{success:1,error:1,complete:1})A[d](q[d]);if(p=Y(Ya,q,b,A)){A.readyState=1;k&&u.trigger("ajaxSend",[A,q]);q.async&&0<q.timeout&&(l=setTimeout(function(){A.abort("timeout")},q.timeout));try{v=1,p.send(ia,c)}catch(nb){if(!(2>v))throw nb;c(-1,nb)}}else c(-1,"No Transport");return A},getJSON:function(a,b,c){return h.get(a,b,c,"json")},getScript:function(a,
b){return h.get(a,f,b,"script")}});h.each(["get","post"],function(a,b){h[b]=function(a,c,g,d){return h.isFunction(c)&&(d=d||g,g=c,c=f),h.ajax({url:a,type:b,dataType:d,data:c,success:g})}});h.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return h.globalEval(a),a}}});h.ajaxPrefilter("script",function(a){a.cache===f&&(a.cache=!1);a.crossDomain&&(a.type=
"GET",a.global=!1)});h.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=u.head||h("head")[0]||u.documentElement;return{send:function(g,d){b=u.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||d(200,"success"))};c.insertBefore(b,c.firstChild)},abort:function(){b&&
b.onload(f,!0)}}}});var Eb=[],ib=/(=)\?(?=&|$)|\?\?/;h.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Eb.pop()||h.expando+"_"+gb++;return this[a]=!0,a}});h.ajaxPrefilter("json jsonp",function(b,c,d){var g,e,l,k=!1!==b.jsonp&&(ib.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ib.test(b.data)&&"data");return k||"jsonp"===b.dataTypes[0]?(g=b.jsonpCallback=h.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,k?b[k]=
b[k].replace(ib,"$1"+g):!1!==b.jsonp&&(b.url+=(hb.test(b.url)?"\x26":"?")+b.jsonp+"\x3d"+g),b.converters["script json"]=function(){return l||h.error(g+" was not called"),l[0]},b.dataTypes[0]="json",e=a[g],a[g]=function(){l=arguments},d.always(function(){a[g]=e;b[g]&&(b.jsonpCallback=c.jsonpCallback,Eb.push(g));l&&h.isFunction(e)&&e(l[0]);l=e=f}),"script"):f});var Ka,lc=0,jb=a.ActiveXObject&&function(){for(var a in Ka)Ka[a](f,!0)};h.ajaxSettings.xhr=a.ActiveXObject?function(){var b;if(!(b=!this.isLocal&&
V()))a:{try{b=new a.ActiveXObject("Microsoft.XMLHTTP");break a}catch(r){}b=void 0}return b}:V;var Va=h.ajaxSettings.xhr();h.support.cors=!!Va&&"withCredentials"in Va;(Va=h.support.ajax=!!Va)&&h.ajaxTransport(function(b){if(!b.crossDomain||h.support.cors){var c;return{send:function(g,d){var e,l,k=b.xhr();if(b.username?k.open(b.type,b.url,b.async,b.username,b.password):k.open(b.type,b.url,b.async),b.xhrFields)for(l in b.xhrFields)k[l]=b.xhrFields[l];b.mimeType&&k.overrideMimeType&&k.overrideMimeType(b.mimeType);
b.crossDomain||g["X-Requested-With"]||(g["X-Requested-With"]="XMLHttpRequest");try{for(l in g)k.setRequestHeader(l,g[l])}catch(pc){}k.send(b.hasContent&&b.data||null);c=function(a,g){try{if(c&&(g||4===k.readyState))if(c=f,e&&(k.onreadystatechange=h.noop,jb&&delete Ka[e]),g)4!==k.readyState&&k.abort();else{var l={};var q=k.status;var p=k.getAllResponseHeaders();"string"==typeof k.responseText&&(l.text=k.responseText);try{var m=k.statusText}catch(Ta){m=""}q||!b.isLocal||b.crossDomain?1223===q&&(q=204):
q=l.text?200:404}}catch(Ta){g||d(-1,Ta)}l&&d(q,m,l,p)};b.async?4===k.readyState?setTimeout(c):(e=++lc,jb&&(Ka||(Ka={},h(a).unload(jb)),Ka[e]=c),k.onreadystatechange=c):c()},abort:function(){c&&c(f,!0)}}}});var Ha,Wa,mc=/^(?:toggle|show|hide)$/,Fb=RegExp("^(?:([+-])\x3d|)("+wa+")([a-z%]*)$","i"),nc=/queueHooks$/,Sa=[function(a,b,c){var d,g,e,l,k,f=this,q={},p=a.style,m=a.nodeType&&R(a),n=h._data(a,"fxshow");c.queue||(l=h._queueHooks(a,"fx"),null==l.unqueued&&(l.unqueued=0,k=l.empty.fire,l.empty.fire=
function(){l.unqueued||k()}),l.unqueued++,f.always(function(){f.always(function(){l.unqueued--;h.queue(a,"fx").length||l.empty.fire()})}));1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===h.css(a,"display")&&"none"===h.css(a,"float")&&(h.support.inlineBlockNeedsLayout&&"inline"!==fa(a.nodeName)?p.zoom=1:p.display="inline-block"));c.overflow&&(p.overflow="hidden",h.support.shrinkWrapBlocks||f.always(function(){p.overflow=c.overflow[0];p.overflowX=
c.overflow[1];p.overflowY=c.overflow[2]}));for(d in b)(g=b[d],mc.exec(g))&&(delete b[d],e=e||"toggle"===g,g!==(m?"hide":"show"))&&(q[d]=n&&n[d]||h.style(a,d));if(!h.isEmptyObject(q))for(d in n?"hidden"in n&&(m=n.hidden):n=h._data(a,"fxshow",{}),e&&(n.hidden=!m),m?h(a).show():f.done(function(){h(a).hide()}),f.done(function(){var b;h._removeData(a,"fxshow");for(b in q)h.style(a,b,q[b])}),q)b=ra(m?n[d]:0,d,f),d in n||(n[d]=b.start,m&&(b.end=b.start,b.start="width"===d||"height"===d?1:0))}],Ma={"*":[function(a,
b){var c=this.createTween(a,b),d=c.cur(),g=(b=Fb.exec(b))&&b[3]||(h.cssNumber[a]?"":"px"),e=(h.cssNumber[a]||"px"!==g&&+d)&&Fb.exec(h.css(c.elem,a)),l=1,k=20;if(e&&e[3]!==g){g=g||e[3];b=b||[];e=+d||1;do l=l||".5",e/=l,h.style(c.elem,a,e+g);while(l!==(l=c.cur()/d)&&1!==l&&--k)}return b&&(e=c.start=+e||+d||0,c.unit=g,c.end=b[1]?e+(b[1]+1)*b[2]:+b[2]),c}]};h.Animation=h.extend(Z,{tweener:function(a,b){h.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,g=a.length;g>d;d++)c=a[d],Ma[c]=Ma[c]||[],
Ma[c].unshift(b)},prefilter:function(a,b){b?Sa.unshift(a):Sa.push(a)}});h.Tween=q;q.prototype={constructor:q,init:function(a,b,c,d,e,l){this.elem=a;this.prop=c;this.easing=e||"swing";this.options=b;this.start=this.now=this.cur();this.end=d;this.unit=l||(h.cssNumber[c]?"":"px")},cur:function(){var a=q.propHooks[this.prop];return a&&a.get?a.get(this):q.propHooks._default.get(this)},run:function(a){var b,c=q.propHooks[this.prop];return this.pos=b=this.options.duration?h.easing[this.easing](a,this.options.duration*
a,0,1,this.options.duration):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):q.propHooks._default.set(this),this}};q.prototype.init.prototype=q.prototype;q.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=h.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){h.fx.step[a.prop]?h.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[h.cssProps[a.prop]]||
h.cssHooks[a.prop])?h.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}};q.propHooks.scrollTop=q.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}};h.each(["toggle","show","hide"],function(a,b){var c=h.fn[b];h.fn[b]=function(a,d,g){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(B(b,!0),a,d,g)}});h.fn.extend({fadeTo:function(a,b,c,d){return this.filter(R).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,
b,c,d){var g=h.isEmptyObject(a),e=h.speed(b,c,d);b=function(){var b=Z(this,h.extend({},a),e);(g||h._data(this,"finish"))&&b.stop(!0)};return b.finish=b,g||!1===e.queue?this.each(b):this.queue(e.queue,b)},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=f),b&&!1!==a&&this.queue(a||"fx",[]),this.each(function(){var b=!0,g=null!=a&&a+"queueHooks",e=h.timers,l=h._data(this);if(g)l[g]&&l[g].stop&&d(l[g]);else for(g in l)l[g]&&l[g].stop&&nc.test(g)&&
d(l[g]);for(g=e.length;g--;)e[g].elem!==this||null!=a&&e[g].queue!==a||(e[g].anim.stop(c),b=!1,e.splice(g,1));!b&&c||h.dequeue(this,a)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var b=h._data(this),c=b[a+"queue"];var d=b[a+"queueHooks"];var g=h.timers,e=c?c.length:0;b.finish=!0;h.queue(this,a,[]);d&&d.stop&&d.stop.call(this,!0);for(d=g.length;d--;)g[d].elem===this&&g[d].queue===a&&(g[d].anim.stop(!0),g.splice(d,1));for(d=0;e>d;d++)c[d]&&c[d].finish&&c[d].finish.call(this);
delete b.finish})}});h.each({slideDown:B("show"),slideUp:B("hide"),slideToggle:B("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){h.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}});h.speed=function(a,b,c){var d=a&&"object"==typeof a?h.extend({},a):{complete:c||!c&&b||h.isFunction(a)&&a,duration:a,easing:c&&b||b&&!h.isFunction(b)&&b};return d.duration=h.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in h.fx.speeds?h.fx.speeds[d.duration]:
h.fx.speeds._default,(null==d.queue||!0===d.queue)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){h.isFunction(d.old)&&d.old.call(this);d.queue&&h.dequeue(this,d.queue)},d};h.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}};h.timers=[];h.fx=q.prototype.init;h.fx.tick=function(){var a=h.timers,b=0;for(Ha=h.now();a.length>b;b++){var c=a[b];c()||a[b]!==c||a.splice(b--,1)}a.length||h.fx.stop();Ha=f};h.fx.timer=function(a){a()&&h.timers.push(a)&&h.fx.start()};
h.fx.interval=13;h.fx.start=function(){Wa||(Wa=setInterval(h.fx.tick,h.fx.interval))};h.fx.stop=function(){clearInterval(Wa);Wa=null};h.fx.speeds={slow:600,fast:200,_default:400};h.fx.step={};h.expr&&h.expr.filters&&(h.expr.filters.animated=function(a){return h.grep(h.timers,function(b){return a===b.elem}).length});h.fn.offset=function(a){if(arguments.length)return a===f?this:this.each(function(b){h.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},g=this[0],e=g&&g.ownerDocument;if(e)return b=
e.documentElement,h.contains(b,g)?(typeof g.getBoundingClientRect!==E&&(d=g.getBoundingClientRect()),c=A(e),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d};h.offset={setOffset:function(a,b,c){var d=h.css(a,"position");"static"===d&&(a.style.position="relative");var g=h(a),e=g.offset(),l=h.css(a,"top"),k=h.css(a,"left"),f={},q={},p,m;("absolute"===d||"fixed"===d)&&-1<h.inArray("auto",[l,k])?(q=g.position(),p=q.top,m=q.left):
(p=parseFloat(l)||0,m=parseFloat(k)||0);h.isFunction(b)&&(b=b.call(a,c,e));null!=b.top&&(f.top=b.top-e.top+p);null!=b.left&&(f.left=b.left-e.left+m);"using"in b?b.using.call(a,f):g.css(f)}};h.fn.extend({position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===h.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),h.nodeName(a[0],"html")||(c=a.offset()),c.top+=h.css(a[0],"borderTopWidth",!0),c.left+=h.css(a[0],"borderLeftWidth",!0)),{top:b.top-
c.top-h.css(d,"marginTop",!0),left:b.left-c.left-h.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||M;a&&!h.nodeName(a,"html")&&"static"===h.css(a,"position");)a=a.offsetParent;return a||M})}});h.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);h.fn[a]=function(d){return h.access(this,function(a,d,g){var e=A(a);return g===f?e?b in e?e[b]:e.document.documentElement[d]:a[d]:(e?e.scrollTo(c?h(e).scrollLeft():
g,c?g:h(e).scrollTop()):a[d]=g,f)},a,d,arguments.length,null)}});h.each({Height:"height",Width:"width"},function(a,b){h.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){h.fn[d]=function(d,g){var e=arguments.length&&(c||"boolean"!=typeof d),l=c||(!0===d||!0===g?"margin":"border");return h.access(this,function(b,c,d){var g;return h.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(g=b.documentElement,Math.max(b.body["scroll"+a],g["scroll"+a],b.body["offset"+a],g["offset"+
a],g["client"+a])):d===f?h.css(b,c,l):h.style(b,c,d,l)},b,e?d:f,e,null)}})});h.fn.size=function(){return this.length};h.fn.andSelf=h.fn.addBack;"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=h:(a.jQuery=a.$=h,"function"==typeof define&&define.amd&&define("jquery",[],function(){return h}))})(window);
(function(){var a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");Math.uuid=function(f,k){var m=[],e;k=k||a.length;if(f)for(e=0;e<f;e++)m[e]=a[0|Math.random()*k];else for(m[8]=m[13]=m[18]=m[23]="-",m[14]="4",e=0;36>e;e++)m[e]||(f=0|16*Math.random(),m[e]=a[19==e?f&3|8:f]);return m.join("")};Math.uuidFast=function(){for(var f=Array(36),k=0,m,e=0;36>e;e++)8==e||13==e||18==e||23==e?f[e]="-":14==e?f[e]="4":(2>=k&&(k=33554432+16777216*Math.random()|0),m=k&15,k>>=4,f[e]=a[19==
e?m&3|8:m]);return f.join("")};Math.uuidCompact=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var k=16*Math.random()|0;return("x"==a?k:k&3|8).toString(16)})}})();
+function(a){function f(e){return this.each(function(){var c=a(this),b=c.data("bs.affix"),d="object"==typeof e&&e;b||c.data("bs.affix",b=new k(this,d));"string"==typeof e&&b[e]()})}var k=function(e,c){this.options=a.extend({},k.DEFAULTS,c);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(e);this.affixed=this.unpin=this.pinnedOffset=null;this.checkPosition()};
k.VERSION="3.2.0";k.RESET="affix affix-top affix-bottom";k.DEFAULTS={offset:0,target:window};k.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(k.RESET).addClass("affix");var a=this.$target.scrollTop();return this.pinnedOffset=this.$element.offset().top-a};k.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)};k.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=a(document).height(),
c=this.$target.scrollTop(),b=this.$element.offset(),d=this.options.offset,l=d.top,f=d.bottom;"object"!=typeof d&&(f=l=d);"function"==typeof l&&(l=d.top(this.$element));"function"==typeof f&&(f=d.bottom(this.$element));c=null!=this.unpin&&c+this.unpin<=b.top?!1:null!=f&&b.top+this.$element.height()>=e-f?"bottom":null!=l&&l>=c?"top":!1;this.affixed!==c&&(null!=this.unpin&&this.$element.css("top",""),b="affix"+(c?"-"+c:""),d=a.Event(b+".bs.affix"),this.$element.trigger(d),d.isDefaultPrevented()||(this.affixed=
c,this.unpin="bottom"==c?this.getPinnedOffset():null,this.$element.removeClass(k.RESET).addClass(b).trigger(a.Event(b.replace("affix","affixed"))),"bottom"==c&&this.$element.offset({top:e-this.$element.height()-f})))}};var m=a.fn.affix;a.fn.affix=f;a.fn.affix.Constructor=k;a.fn.affix.noConflict=function(){return a.fn.affix=m,this};a(window).on("load",function(){a('[data-spy\x3d"affix"]').each(function(){var e=a(this),c=e.data();c.offset=c.offset||{};c.offsetBottom&&(c.offset.bottom=c.offsetBottom);
c.offsetTop&&(c.offset.top=c.offsetTop);f.call(e,c)})})}(jQuery);
(function(a,f,k){function m(a,b,c){return setTimeout(p(a,c),b)}function e(a,b,d){return Array.isArray(a)?(c(a,d[b],d),!0):!1}function c(a,b,c){var d;if(a)if(a.forEach)a.forEach(b,c);else if(void 0!==a.length){var e=0;for(d=a.length;e<d;e++)b.call(c,a[e],e,a)}else for(e in a)a.hasOwnProperty(e)&&b.call(c,a[e],e,a)}function b(a,b,c){for(var d=Object.keys(b),e=0,h=d.length;e<h;e++)if(!c||c&&void 0===a[d[e]])a[d[e]]=b[d[e]];return a}function d(a,c){return b(a,c,!0)}function l(a,c,d){c=c.prototype;var e=
a.prototype=Object.create(c);e.constructor=a;e._super=c;d&&b(e,d)}function p(a,b){return function(){return a.apply(b,arguments)}}function t(a,b){return"function"==typeof a?a.apply(b?b[0]||void 0:void 0,b):a}function C(a,b,d){c(x(b),function(b){a.addEventListener(b,d,!1)})}function v(a,b,d){c(x(b),function(b){a.removeEventListener(b,d,!1)})}function x(a){return a.trim().split(/\s+/g)}function z(a,b,c){if(a.indexOf&&!c)return a.indexOf(b);for(var d=0,e=a.length;d<e;d++)if(c&&a[d][c]==b||!c&&a[d]===
b)return d;return-1}function w(a,b,c){for(var d=[],e=[],h=0,l=a.length;h<l;h++){var f=b?a[h][b]:a[h];0>z(e,f)&&d.push(a[h]);e[h]=f}c&&(d=b?d.sort(function(a,c){return a[b]>c[b]}):d.sort());return d}function D(a,b){for(var c,d=b[0].toUpperCase()+b.slice(1),e=0,h=u.length;e<h;e++)if(c=(c=u[e])?c+d:b,c in a)return c}function n(b,c){var d=this;this.manager=b;this.callback=c;this.element=b.element;this.target=b.options.inputTarget;this.domHandler=function(a){t(b.options.enable,[b])&&d.handler(a)};this.evEl&&
C(this.element,this.evEl,this.domHandler);this.evTarget&&C(this.target,this.evTarget,this.domHandler);this.evWin&&C(a,this.evWin,this.domHandler)}function I(a,b,c){var d=c.pointers.length,e=c.changedPointers.length,h=b&1&&0===d-e;c.isFirst=!!h;c.isFinal=!!(b&12&&0===d-e);h&&(a.session={});c.eventType=b;b=a.session;d=c.pointers;e=d.length;b.firstInput||(b.firstInput=y(c));1<e&&!b.firstMultiple?b.firstMultiple=y(c):1===e&&(b.firstMultiple=!1);h=b.firstInput;var l=(e=b.firstMultiple)?e.center:h.center,
f=c.center=J(d);c.timeStamp=pa();c.deltaTime=c.timeStamp-h.timeStamp;c.angle=ca(l,f);c.distance=R(l,f);h=c.center;l=b.offsetDelta||{};f=b.prevDelta||{};var k=b.prevInput||{};if(1===c.eventType||4===k.eventType)f=b.prevDelta={x:k.deltaX||0,y:k.deltaY||0},l=b.offsetDelta={x:h.x,y:h.y};c.deltaX=f.x+(h.x-l.x);c.deltaY=f.y+(h.y-l.y);c.offsetDirection=F(c.deltaX,c.deltaY);e?(h=e.pointers,h=R(d[0],d[1],aa)/R(h[0],h[1],aa)):h=1;c.scale=h;e?(e=e.pointers,d=ca(d[1],d[0],aa)-ca(e[1],e[0],aa)):d=0;c.rotation=
d;l=b.lastInterval||c;d=c.timeStamp-l.timeStamp;8!=c.eventType&&(25<d||void 0===l.velocity)?(h=l.deltaX-c.deltaX,l=l.deltaY-c.deltaY,f=h/d||0,k=l/d||0,d=f,e=k,f=sa(f)>sa(k)?f:k,h=F(h,l),b.lastInterval=c):(f=l.velocity,d=l.velocityX,e=l.velocityY,h=l.direction);c.velocity=f;c.velocityX=d;c.velocityY=e;c.direction=h;b=a.element;a:{for(d=c.srcEvent.target;d;){if(d==b){d=!0;break a}d=d.parentNode}d=!1}d&&(b=c.srcEvent.target);c.target=b;a.emit("hammer.input",c);a.recognize(c);a.session.prevInput=c}function y(a){for(var b=
[],c=0;c<a.pointers.length;c++)b[c]={clientX:G(a.pointers[c].clientX),clientY:G(a.pointers[c].clientY)};return{timeStamp:pa(),pointers:b,center:J(b),deltaX:a.deltaX,deltaY:a.deltaY}}function J(a){var b=a.length;if(1===b)return{x:G(a[0].clientX),y:G(a[0].clientY)};for(var c=0,d=0,e=0;e<b;e++)c+=a[e].clientX,d+=a[e].clientY;return{x:G(c/b),y:G(d/b)}}function F(a,b){return a===b?1:sa(a)>=sa(b)?0<a?2:4:0<b?8:16}function R(a,b,c){c||(c=ma);var d=b[c[0]]-a[c[0]];a=b[c[1]]-a[c[1]];return Math.sqrt(d*d+a*
a)}function ca(a,b,c){c||(c=ma);return 180*Math.atan2(b[c[1]]-a[c[1]],b[c[0]]-a[c[0]])/Math.PI}function U(){this.evEl=h;this.evWin=wa;this.allow=!0;this.pressed=!1;n.apply(this,arguments)}function L(){this.evEl=xa;this.evWin=ta;n.apply(this,arguments);this.store=this.manager.session.pointerEvents=[]}function ha(){this.evTarget=$a;this.targetIds={};n.apply(this,arguments)}function fa(){n.apply(this,arguments);var a=p(this.handler,this);this.touch=new ha(this.manager,a);this.mouse=new U(this.manager,
a)}function oa(a,b){this.manager=a;this.set(b)}function ea(a){if(-1<a.indexOf("none"))return"none";var b=-1<a.indexOf("pan-x"),c=-1<a.indexOf("pan-y");return b&&c?"pan-x pan-y":b||c?b?"pan-x":"pan-y":-1<a.indexOf("manipulation")?"manipulation":"auto"}function ba(a){this.id=da++;this.manager=null;this.options=d(a||{},this.defaults);a=this.options.enable;this.options.enable=void 0===a?!0:a;this.state=1;this.simultaneous={};this.requireFail=[]}function Y(a){return 16==a?"down":8==a?"up":2==a?"left":
4==a?"right":""}function K(a,b){return(b=b.manager)?b.get(a):a}function V(){ba.apply(this,arguments)}function ka(){V.apply(this,arguments);this.pY=this.pX=null}function ra(){V.apply(this,arguments)}function Z(){ba.apply(this,arguments);this._input=this._timer=null}function P(){V.apply(this,arguments)}function q(){V.apply(this,arguments)}function B(){ba.apply(this,arguments);this.pCenter=this.pTime=!1;this._input=this._timer=null;this.count=0}function A(a,b){b=b||{};var c=b.recognizers;b.recognizers=
void 0===c?A.defaults.preset:c;return new S(a,b)}function S(a,b){b=b||{};this.options=d(b,A.defaults);this.options.inputTarget=this.options.inputTarget||a;this.handlers={};this.session={};this.recognizers=[];this.element=a;this.input=new (Q?L:Da?ha:va?fa:U)(this,I);this.touchAction=new oa(this,this.options.touchAction);E(this,!0);c(b.recognizers,function(a){var b=this.add(new a[0](a[1]));a[2]&&b.recognizeWith(a[2]);a[3]&&b.requireFailure(a[2])},this)}function E(a,b){var d=a.element;c(a.options.cssProps,
function(a,c){d.style[D(d.style,c)]=b?a:""})}function W(a,b){var c=f.createEvent("Event");c.initEvent(a,!0,!0);c.gesture=b;b.target.dispatchEvent(c)}var u=" webkit moz MS ms o".split(" "),M=f.createElement("div"),G=Math.round,sa=Math.abs,pa=Date.now,da=1,ua=/mobile|tablet|ip(ad|hone|od)|android/i,va="ontouchstart"in a,Q=void 0!==D(a,"PointerEvent"),Da=va&&ua.test(navigator.userAgent),ma=["x","y"],aa=["clientX","clientY"];n.prototype={handler:function(){},destroy:function(){this.evEl&&v(this.element,
this.evEl,this.domHandler);this.evTarget&&v(this.target,this.evTarget,this.domHandler);this.evWin&&v(a,this.evWin,this.domHandler)}};var Ea={mousedown:1,mousemove:2,mouseup:4},h="mousedown",wa="mousemove mouseup";l(U,n,{handler:function(a){var b=Ea[a.type];b&1&&0===a.button&&(this.pressed=!0);b&2&&1!==a.which&&(b=4);this.pressed&&this.allow&&(b&4&&(this.pressed=!1),this.callback(this.manager,b,{pointers:[a],changedPointers:[a],pointerType:"mouse",srcEvent:a}))}});var ja={pointerdown:1,pointermove:2,
pointerup:4,pointercancel:8,pointerout:8},Na={2:"touch",3:"pen",4:"mouse",5:"kinect"},xa="pointerdown",ta="pointermove pointerup pointercancel";a.MSPointerEvent&&(xa="MSPointerDown",ta="MSPointerMove MSPointerUp MSPointerCancel");l(L,n,{handler:function(a){var b=this.store,c=!1,d=a.type.toLowerCase().replace("ms","");d=ja[d];var e=Na[a.pointerType]||a.pointerType;d&1&&(0===a.button||"touch"==e)?b.push(a):d&12&&(c=!0);var h=z(b,a.pointerId,"pointerId");0>h||(b[h]=a,this.callback(this.manager,d,{pointers:b,
changedPointers:[a],pointerType:e,srcEvent:a}),c&&b.splice(h,1))}});var ya={touchstart:1,touchmove:2,touchend:4,touchcancel:8},$a="touchstart touchmove touchend touchcancel";l(ha,n,{handler:function(a){var b=ya[a.type];var c=Array.prototype.slice.call(a.touches,0);var d=this.targetIds;if(b&3&&1===c.length)d[c[0].identifier]=!0,d=[c,c];else{var e,h=Array.prototype.slice.call(a.targetTouches,0),l=Array.prototype.slice.call(a.changedTouches,0),f=[];if(1===b)for(c=0,e=h.length;c<e;c++)d[h[c].identifier]=
!0;c=0;for(e=l.length;c<e;c++)d[l[c].identifier]&&f.push(l[c]),b&12&&delete d[l[c].identifier];d=f.length?[w(h.concat(f),"identifier",!0),f]:void 0}d&&this.callback(this.manager,b,{pointers:d[0],changedPointers:d[1],pointerType:"touch",srcEvent:a})}});l(fa,n,{handler:function(a,b,c){var d="mouse"==c.pointerType;if("touch"==c.pointerType)this.mouse.allow=!1;else if(d&&!this.mouse.allow)return;b&12&&(this.mouse.allow=!0);this.callback(a,b,c)},destroy:function(){this.touch.destroy();this.mouse.destroy()}});
var za=D(M.style,"touchAction"),la=void 0!==za;oa.prototype={set:function(a){"compute"==a&&(a=this.compute());la&&(this.manager.element.style[za]=a);this.actions=a.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var a=[];c(this.manager.recognizers,function(b){t(b.options.enable,[b])&&(a=a.concat(b.getTouchAction()))});return ea(a.join(" "))},preventDefaults:function(a){if(!la){var b=a.srcEvent;a=a.offsetDirection;if(this.manager.session.prevented)b.preventDefault();
else{var c=this.actions,d=-1<c.indexOf("none"),e=-1<c.indexOf("pan-y");c=-1<c.indexOf("pan-x");if(d||e&&c||e&&a&6||c&&a&24)return this.preventSrc(b)}}},preventSrc:function(a){this.manager.session.prevented=!0;a.preventDefault()}};ba.prototype={defaults:{},set:function(a){b(this.options,a);this.manager&&this.manager.touchAction.update();return this},recognizeWith:function(a){if(e(a,"recognizeWith",this))return this;var b=this.simultaneous;a=K(a,this);b[a.id]||(b[a.id]=a,a.recognizeWith(this));return this},
dropRecognizeWith:function(a){if(e(a,"dropRecognizeWith",this))return this;a=K(a,this);delete this.simultaneous[a.id];return this},requireFailure:function(a){if(e(a,"requireFailure",this))return this;var b=this.requireFail;a=K(a,this);-1===z(b,a)&&(b.push(a),a.requireFailure(this));return this},dropRequireFailure:function(a){if(e(a,"dropRequireFailure",this))return this;a=K(a,this);a=z(this.requireFail,a);-1<a&&this.requireFail.splice(a,1);return this},hasRequireFailures:function(){return 0<this.requireFail.length},
canRecognizeWith:function(a){return!!this.simultaneous[a.id]},emit:function(a){function b(b){c.manager.emit(c.options.event+(b?d&16?"cancel":d&8?"end":d&4?"move":d&2?"start":"":""),a)}var c=this,d=this.state;8>d&&b(!0);b();8<=d&&b(!0)},tryEmit:function(a){if(this.canEmit())return this.emit(a);this.state=32},canEmit:function(){for(var a=0;a<this.requireFail.length;a++)if(!(this.requireFail[a].state&33))return!1;return!0},recognize:function(a){a=b({},a);t(this.options.enable,[this,a])?(this.state&56&&
(this.state=1),this.state=this.process(a),this.state&30&&this.tryEmit(a)):(this.reset(),this.state=32)},process:function(a){},getTouchAction:function(){},reset:function(){}};l(V,ba,{defaults:{pointers:1},attrTest:function(a){var b=this.options.pointers;return 0===b||a.pointers.length===b},process:function(a){var b=this.state,c=a.eventType,d=b&6;a=this.attrTest(a);return d&&(c&8||!a)?b|16:d||a?c&4?b|8:b&2?b|4:2:32}});l(ka,V,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var a=
this.options.direction;if(30===a)return["none"];var b=[];a&6&&b.push("pan-y");a&24&&b.push("pan-x");return b},directionTest:function(a){var b=this.options,c=!0,d=a.distance,e=a.direction,h=a.deltaX,l=a.deltaY;e&b.direction||(b.direction&6?(e=0===h?1:0>h?2:4,c=h!=this.pX,d=Math.abs(a.deltaX)):(e=0===l?1:0>l?8:16,c=l!=this.pY,d=Math.abs(a.deltaY)));a.direction=e;return c&&d>b.threshold&&e&b.direction},attrTest:function(a){return V.prototype.attrTest.call(this,a)&&(this.state&2||!(this.state&2)&&this.directionTest(a))},
emit:function(a){this.pX=a.deltaX;this.pY=a.deltaY;var b=Y(a.direction);b&&this.manager.emit(this.options.event+b,a);this._super.emit.call(this,a)}});l(ra,V,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.scale-1)>this.options.threshold||this.state&2)},emit:function(a){this._super.emit.call(this,a);1!==a.scale&&this.manager.emit(this.options.event+(1>a.scale?"in":"out"),a)}});l(Z,
ba,{defaults:{event:"press",pointers:1,time:500,threshold:5},getTouchAction:function(){return["auto"]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distance<b.threshold,e=a.deltaTime>b.time;this._input=a;if(!d||!c||a.eventType&12&&!e)this.reset();else if(a.eventType&1)this.reset(),this._timer=m(function(){this.state=8;this.tryEmit()},b.time,this);else if(a.eventType&4)return 8;return 32},reset:function(){clearTimeout(this._timer)},emit:function(a){8===this.state&&(a&&
a.eventType&4?this.manager.emit(this.options.event+"up",a):(this._input.timeStamp=pa(),this.manager.emit(this.options.event,this._input)))}});l(P,V,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.rotation)>this.options.threshold||this.state&2)}});l(q,V,{defaults:{event:"swipe",threshold:10,velocity:.65,direction:30,pointers:1},getTouchAction:function(){return ka.prototype.getTouchAction.call(this)},
attrTest:function(a){var b=this.options.direction;if(b&30)var c=a.velocity;else b&6?c=a.velocityX:b&24&&(c=a.velocityY);return this._super.attrTest.call(this,a)&&b&a.direction&&sa(c)>this.options.velocity&&a.eventType&4},emit:function(a){var b=Y(a.direction);b&&this.manager.emit(this.options.event+b,a);this.manager.emit(this.options.event,a)}});l(B,ba,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:2,posThreshold:10},getTouchAction:function(){return["manipulation"]},process:function(a){var b=
this.options,c=a.pointers.length===b.pointers,d=a.distance<b.threshold,e=a.deltaTime<b.time;this.reset();if(a.eventType&1&&0===this.count)return this.failTimeout();if(d&&e&&c){if(4!=a.eventType)return this.failTimeout();c=this.pTime?a.timeStamp-this.pTime<b.interval:!0;d=!this.pCenter||R(this.pCenter,a.center)<b.posThreshold;this.pTime=a.timeStamp;this.pCenter=a.center;this.count=d&&c?this.count+1:1;this._input=a;if(0===this.count%b.taps)return this.hasRequireFailures()?(this._timer=m(function(){this.state=
8;this.tryEmit()},b.interval,this),2):8}return 32},failTimeout:function(){this._timer=m(function(){this.state=32},this.options.interval,this);return 32},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});A.VERSION="2.0.2";A.defaults={domEvents:!1,touchAction:"compute",inputTarget:null,enable:!0,preset:[[P,{enable:!1}],[ra,{enable:!1},["rotate"]],[q,{direction:6}],[ka,{direction:6},["swipe"]],
[B],[B,{event:"doubletap",taps:2},["tap"]],[Z]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};S.prototype={set:function(a){b(this.options,a);return this},stop:function(a){this.session.stopped=a?2:1},recognize:function(a){var b=this.session;if(!b.stopped){this.touchAction.preventDefaults(a);var c=this.recognizers,d=b.curRecognizer;if(!d||d&&d.state&8)d=b.curRecognizer=null;for(var e=0,h=c.length;e<h;e++){var l=
c[e];2===b.stopped||d&&l!=d&&!l.canRecognizeWith(d)?l.reset():l.recognize(a);!d&&l.state&14&&(d=b.curRecognizer=l)}}},get:function(a){if(a instanceof ba)return a;for(var b=this.recognizers,c=0;c<b.length;c++)if(b[c].options.event==a)return b[c];return null},add:function(a){if(e(a,"add",this))return this;var b=this.get(a.options.event);b&&this.remove(b);this.recognizers.push(a);a.manager=this;this.touchAction.update();return a},remove:function(a){if(e(a,"remove",this))return this;var b=this.recognizers;
a=this.get(a);b.splice(z(b,a),1);this.touchAction.update();return this},on:function(a,b){var d=this.handlers;c(x(a),function(a){d[a]=d[a]||[];d[a].push(b)});return this},off:function(a,b){var d=this.handlers;c(x(a),function(a){b?d[a].splice(z(d[a],b),1):delete d[a]});return this},emit:function(a,b){this.options.domEvents&&W(a,b);var c=this.handlers[a]&&this.handlers[a].slice();if(c&&c.length){b.type=a;b.preventDefault=function(){b.srcEvent.preventDefault()};a=0;for(var d=c.length;a<d;a++)c[a](b)}},
destroy:function(){this.element&&E(this,!1);this.handlers={};this.session={};this.input.destroy();this.element=null}};b(A,{INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:32,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:24,DIRECTION_ALL:30,Manager:S,Input:n,TouchAction:oa,Recognizer:ba,AttrRecognizer:V,
Tap:B,Pan:ka,Swipe:q,Pinch:ra,Rotate:P,Press:Z,on:C,off:v,each:c,merge:d,extend:b,inherit:l,bindFn:p,prefixed:D});"function"==typeof define&&define.amd?define(function(){return A}):"undefined"!=typeof module&&module.exports?module.exports=A:a[k]=A})(window,document,"Hammer");
(function(a,f,k){a.fn.hammer=function(m){return this.each(function(){var e=a(this);e.data(k)||e.data(k,new f(e[0],m))})};f.Manager.prototype.emit=function(f){return function(e,c){f.call(this,e,c);a(this.element).trigger({type:e,gesture:c})}}(f.Manager.prototype.emit)})(jQuery,Hammer,"hammer");
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function f(b){var c=b||window.event,l=d.call(arguments,1),f,t=0,w=0,D=0,n=0,I=0;if(b=a.event.fix(c),b.type="mousewheel","detail"in c&&(w=-1*c.detail),"wheelDelta"in c&&(w=c.wheelDelta),"wheelDeltaY"in c&&(w=c.wheelDeltaY),"wheelDeltaX"in c&&(t=-1*c.wheelDeltaX),"axis"in c&&c.axis===c.HORIZONTAL_AXIS&&(t=-1*w,w=0),f=0===w?t:w,"deltaY"in c&&(w=-1*c.deltaY,f=w),"deltaX"in
c&&(t=c.deltaX,0===w&&(f=-1*t)),0!==w||0!==t){if(1===c.deltaMode){var y=a.data(this,"mousewheel-line-height");f*=y;w*=y;t*=y}else 2===c.deltaMode&&(y=a.data(this,"mousewheel-page-height"),f*=y,w*=y,t*=y);if(D=Math.max(Math.abs(w),Math.abs(t)),(!e||e>D)&&(e=D,p.settings.adjustOldDeltas&&"mousewheel"===c.type&&0===D%120&&(e/=40)),p.settings.adjustOldDeltas&&"mousewheel"===c.type&&0===D%120&&(f/=40,t/=40,w/=40),f=Math[1<=f?"floor":"ceil"](f/e),t=Math[1<=t?"floor":"ceil"](t/e),w=Math[1<=w?"floor":"ceil"](w/
e),p.settings.normalizeOffset&&this.getBoundingClientRect)c=this.getBoundingClientRect(),n=b.clientX-c.left,I=b.clientY-c.top;return b.deltaX=t,b.deltaY=w,b.deltaFactor=e,b.offsetX=n,b.offsetY=I,b.deltaMode=0,l.unshift(b,f,t,w),m&&clearTimeout(m),m=setTimeout(k,200),(a.event.dispatch||a.event.handle).apply(this,l)}}function k(){e=null}var m,e,c=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],b="onwheel"in document||9<=document.documentMode?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],
d=Array.prototype.slice;if(a.event.fixHooks)for(var l=c.length;l;)a.event.fixHooks[c[--l]]=a.event.mouseHooks;var p=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=b.length;c;)this.addEventListener(b[--c],f,!1);else this.onmousewheel=f;a.data(this,"mousewheel-line-height",p.getLineHeight(this));a.data(this,"mousewheel-page-height",p.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=b.length;c;)this.removeEventListener(b[--c],
f,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height");a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){b=a(b);var c=b["offsetParent"in a.fn?"offsetParent":"parent"]();return c.length||(c=a("body")),parseInt(c.css("fontSize"),10)||parseInt(b.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},
unmousewheel:function(a){return this.unbind("mousewheel",a)}})});
!function(a,f,k){!function(f){var e="https:"==k.location.protocol?"https:":"http:";"function"==typeof define&&define.amd||a.event.special.mousewheel||a("head").append(decodeURI("%3Cscript src\x3d"+e+"//cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.12/jquery.mousewheel.min.js%3E%3C/script%3E"));f()}(function(){var m={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",
deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable\x3d'true']",updateOnContentResize:!0,updateOnImageLoad:!0},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},e=
0,c={},b=f.attachEvent&&!f.addEventListener?1:0,d=!1,l="mCSB_dragger_onDrag mCSB_scrollTools_onDrag mCS_img_loaded mCS_disabled mCS_destroyed mCS_no_scrollbar mCS-autoHide mCS-dir-rtl mCS_no_scrollbar_y mCS_no_scrollbar_x mCS_y_hidden mCS_x_hidden mCSB_draggerContainer mCSB_buttonUp mCSB_buttonDown mCSB_buttonLeft mCSB_buttonRight".split(" "),p={init:function(b){b=a.extend(!0,{},m,b);var d=t.call(this);if(b.live){var f=b.liveSelector||this.selector||".mCustomScrollbar";var k=a(f);if("off"===b.live)return void v(f);
c[f]=setTimeout(function(){k.mCustomScrollbar(b);"once"===b.live&&k.length&&v(f)},500)}else v(f);return b.setWidth=b.set_width?b.set_width:b.setWidth,b.setHeight=b.set_height?b.set_height:b.setHeight,b.axis=b.horizontalScroll?"x":x(b.axis),b.scrollInertia=0<b.scrollInertia&&17>b.scrollInertia?17:b.scrollInertia,"object"!=typeof b.mouseWheel&&1==b.mouseWheel&&(b.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),b.mouseWheel.scrollAmount=
b.mouseWheelPixels?b.mouseWheelPixels:b.mouseWheel.scrollAmount,b.mouseWheel.normalizeDelta=b.advanced.normalizeMouseWheelDelta?b.advanced.normalizeMouseWheelDelta:b.mouseWheel.normalizeDelta,b.scrollButtons.scrollType=z(b.scrollButtons.scrollType),C(b),a(d).each(function(){var c=a(this);if(!c.data("mCS")){c.data("mCS",{idx:++e,opt:b,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:c.css("direction"),cbOffsets:null,trigger:null});
var d=c.data("mCS"),f=d.opt,k=c.data("mcs-axis"),q=c.data("mcs-scrollbar-position"),m=c.data("mcs-theme");k&&(f.axis=k);q&&(f.scrollbarPosition=q);m&&(f.theme=m,C(f));k=a(this);f=k.data("mCS");q=f.opt;m=q.autoExpandScrollbar?" "+l[1]+"_expand":"";m=["\x3cdiv id\x3d'mCSB_"+f.idx+"_scrollbar_vertical' class\x3d'mCSB_scrollTools mCSB_"+f.idx+"_scrollbar mCS-"+q.theme+" mCSB_scrollTools_vertical"+m+"'\x3e\x3cdiv class\x3d'"+l[12]+"'\x3e\x3cdiv id\x3d'mCSB_"+f.idx+"_dragger_vertical' class\x3d'mCSB_dragger' style\x3d'position:absolute;' oncontextmenu\x3d'return false;'\x3e\x3cdiv class\x3d'mCSB_dragger_bar' /\x3e\x3c/div\x3e\x3cdiv class\x3d'mCSB_draggerRail' /\x3e\x3c/div\x3e\x3c/div\x3e",
"\x3cdiv id\x3d'mCSB_"+f.idx+"_scrollbar_horizontal' class\x3d'mCSB_scrollTools mCSB_"+f.idx+"_scrollbar mCS-"+q.theme+" mCSB_scrollTools_horizontal"+m+"'\x3e\x3cdiv class\x3d'"+l[12]+"'\x3e\x3cdiv id\x3d'mCSB_"+f.idx+"_dragger_horizontal' class\x3d'mCSB_dragger' style\x3d'position:absolute;' oncontextmenu\x3d'return false;'\x3e\x3cdiv class\x3d'mCSB_dragger_bar' /\x3e\x3c/div\x3e\x3cdiv class\x3d'mCSB_draggerRail' /\x3e\x3c/div\x3e\x3c/div\x3e"];var n="yx"===q.axis?"mCSB_vertical_horizontal":"x"===
q.axis?"mCSB_horizontal":"mCSB_vertical";m="yx"===q.axis?m[0]+m[1]:"x"===q.axis?m[1]:m[0];var u="yx"===q.axis?"\x3cdiv id\x3d'mCSB_"+f.idx+"_container_wrapper' class\x3d'mCSB_container_wrapper' /\x3e":"",t=q.autoHideScrollbar?" "+l[6]:"",h="x"!==q.axis&&"rtl"===f.langDir?" "+l[7]:"";q.setWidth&&k.css("width",q.setWidth);q.setHeight&&k.css("height",q.setHeight);q.setLeft="y"!==q.axis&&"rtl"===f.langDir?"989999px":q.setLeft;k.addClass("mCustomScrollbar _mCS_"+f.idx+t+h).wrapInner("\x3cdiv id\x3d'mCSB_"+
f.idx+"' class\x3d'mCustomScrollBox mCS-"+q.theme+" "+n+"'\x3e\x3cdiv id\x3d'mCSB_"+f.idx+"_container' class\x3d'mCSB_container' style\x3d'position:relative; top:"+q.setTop+"; left:"+q.setLeft+";' dir\x3d"+f.langDir+" /\x3e\x3c/div\x3e");n=a("#mCSB_"+f.idx);t=a("#mCSB_"+f.idx+"_container");"y"===q.axis||q.advanced.autoExpandHorizontalScroll||t.css("width",w(t.children()));"outside"===q.scrollbarPosition?("static"===k.css("position")&&k.css("position","relative"),k.css("overflow","visible"),n.addClass("mCSB_outside").after(m)):
(n.addClass("mCSB_inside").append(m),t.wrap(u));q=a(this).data("mCS");k=q.opt;q=a(".mCSB_"+q.idx+"_scrollbar:first");m=E(k.scrollButtons.tabindex)?"tabindex\x3d'"+k.scrollButtons.tabindex+"'":"";m=["\x3ca href\x3d'#' class\x3d'"+l[13]+"' oncontextmenu\x3d'return false;' "+m+" /\x3e","\x3ca href\x3d'#' class\x3d'"+l[14]+"' oncontextmenu\x3d'return false;' "+m+" /\x3e","\x3ca href\x3d'#' class\x3d'"+l[15]+"' oncontextmenu\x3d'return false;' "+m+" /\x3e","\x3ca href\x3d'#' class\x3d'"+l[16]+"' oncontextmenu\x3d'return false;' "+
m+" /\x3e"];m=["x"===k.axis?m[2]:m[0],"x"===k.axis?m[3]:m[1],m[2],m[3]];k.scrollButtons.enable&&q.prepend(m[0]).append(m[1]).next(".mCSB_scrollTools").prepend(m[2]).append(m[3]);f=[a("#mCSB_"+f.idx+"_dragger_vertical"),a("#mCSB_"+f.idx+"_dragger_horizontal")];f[0].css("min-height",f[0].height());f[1].css("min-width",f[1].width());a("#mCSB_"+d.idx+"_container img:not(."+l[2]+")").addClass(l[2]);p.update.call(null,c)}})},update:function(c,d){c=c||t.call(this);return a(c).each(function(){var c=a(this);
if(c.data("mCS")){var e=c.data("mCS"),f=e.opt,k=a("#mCSB_"+e.idx+"_container"),q=[a("#mCSB_"+e.idx+"_dragger_vertical"),a("#mCSB_"+e.idx+"_dragger_horizontal")];if(k.length){e.tweenRunning&&Z(c);c.hasClass(l[3])&&c.removeClass(l[3]);c.hasClass(l[4])&&c.removeClass(l[4]);var m=a(this),p=m.data("mCS");p=a("#mCSB_"+p.idx);var u=m.css("max-height")||"none",t=-1!==u.indexOf("%"),B=m.css("box-sizing");"none"!==u&&(u=t?m.parent().height()*parseInt(u)/100:parseInt(u),"border-box"===B&&(u-=m.innerHeight()-
m.height()+(m.outerHeight()-m.innerHeight())),p.css("max-height",Math.round(u)));p=a(this).data("mCS");m=p.opt;p=a("#mCSB_"+p.idx+"_container");m.advanced.autoExpandHorizontalScroll&&"y"!==m.axis&&p.css({position:"absolute",width:"auto"}).wrap("\x3cdiv class\x3d'mCSB_h_wrapper' style\x3d'position:relative; left:0; width:999999px;' /\x3e").css({width:Math.ceil(p[0].getBoundingClientRect().right+.4)-Math.floor(p[0].getBoundingClientRect().left),position:"relative"}).unwrap();"y"===f.axis||f.advanced.autoExpandHorizontalScroll||
k.css("width",w(k.children()));B=a(this).data("mCS");m=a("#mCSB_"+B.idx);u=a("#mCSB_"+B.idx+"_container");p=null==B.overflowed?u.height():u.outerHeight(!1);B=null==B.overflowed?u.width():u.outerWidth(!1);m=[p>m.height(),B>m.width()];e.overflowed=m;J.call(this);f.autoDraggerLength&&(m=a(this).data("mCS"),p=a("#mCSB_"+m.idx),B=a("#mCSB_"+m.idx+"_container"),m=[a("#mCSB_"+m.idx+"_dragger_vertical"),a("#mCSB_"+m.idx+"_dragger_horizontal")],p=[p.height()/B.outerHeight(!1),p.width()/B.outerWidth(!1)],p=
[parseInt(m[0].css("min-height")),Math.round(p[0]*m[0].parent().height()),parseInt(m[1].css("min-width")),Math.round(p[1]*m[1].parent().width())],B=b&&p[3]<p[2]?p[2]:p[3],m[0].css({height:b&&p[1]<p[0]?p[0]:p[1],"max-height":m[0].parent().height()-10}).find(".mCSB_dragger_bar").css({"line-height":p[0]+"px"}),m[1].css({width:B,"max-width":m[1].parent().width()-10}));m=a(this).data("mCS");B=a("#mCSB_"+m.idx);u=a("#mCSB_"+m.idx+"_container");p=[a("#mCSB_"+m.idx+"_dragger_vertical"),a("#mCSB_"+m.idx+"_dragger_horizontal")];
B=[u.outerHeight(!1)-B.height(),u.outerWidth(!1)-B.width()];p=[B[0]/(p[0].parent().height()-p[0].height()),B[1]/(p[1].parent().width()-p[1].width())];m.scrollRatio={y:p[0],x:p[1]};I.call(this);k=[Math.abs(k[0].offsetTop),Math.abs(k[0].offsetLeft)];"x"!==f.axis&&(e.overflowed[0]?q[0].height()>q[0].parent().height()?n.call(this):(P(c,k[0].toString(),{dir:"y",dur:0,overwrite:"none"}),e.contentReset.y=null):(n.call(this),"y"===f.axis?y.call(this):"yx"===f.axis&&e.overflowed[1]&&P(c,k[1].toString(),{dir:"x",
dur:0,overwrite:"none"})));"y"!==f.axis&&(e.overflowed[1]?q[1].width()>q[1].parent().width()?n.call(this):(P(c,k[1].toString(),{dir:"x",dur:0,overwrite:"none"}),e.contentReset.x=null):(n.call(this),"x"===f.axis?y.call(this):"yx"===f.axis&&e.overflowed[0]&&P(c,k[0].toString(),{dir:"y",dur:0,overwrite:"none"})));d&&e&&(2===d&&f.callbacks.onImageLoad&&"function"==typeof f.callbacks.onImageLoad?f.callbacks.onImageLoad.call(this):3===d&&f.callbacks.onSelectorChange&&"function"==typeof f.callbacks.onSelectorChange?
f.callbacks.onSelectorChange.call(this):f.callbacks.onUpdate&&"function"==typeof f.callbacks.onUpdate&&f.callbacks.onUpdate.call(this));ka.call(this)}}})},scrollTo:function(b,c){if("undefined"!=typeof b&&null!=b){var d=t.call(this);return a(d).each(function(){var d=a(this);if(d.data("mCS")){var e=d.data("mCS"),l=e.opt,f=a.extend(!0,{},{trigger:"external",scrollInertia:l.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},c),k=K.call(this,
b),q=0<f.scrollInertia&&17>f.scrollInertia?17:f.scrollInertia;k[0]=V.call(this,k[0],"y");k[1]=V.call(this,k[1],"x");f.moveDragger&&(k[0]*=e.scrollRatio.y,k[1]*=e.scrollRatio.x);f.dur=q;setTimeout(function(){null!==k[0]&&"undefined"!=typeof k[0]&&"x"!==l.axis&&e.overflowed[0]&&(f.dir="y",f.overwrite="all",P(d,k[0].toString(),f));null!==k[1]&&"undefined"!=typeof k[1]&&"y"!==l.axis&&e.overflowed[1]&&(f.dir="x",f.overwrite="none",P(d,k[1].toString(),f))},f.timeout)}})}},stop:function(){var b=t.call(this);
return a(b).each(function(){var b=a(this);b.data("mCS")&&Z(b)})},disable:function(b){var c=t.call(this);return a(c).each(function(){var c=a(this);c.data("mCS")&&(c.data("mCS"),ka.call(this,"remove"),y.call(this),b&&n.call(this),J.call(this,!0),c.addClass(l[3]))})},destroy:function(){var b=t.call(this);return a(b).each(function(){var c=a(this);if(c.data("mCS")){var d=c.data("mCS"),e=d.opt,f=a("#mCSB_"+d.idx),k=a("#mCSB_"+d.idx+"_container"),q=a(".mCSB_"+d.idx+"_scrollbar");e.live&&v(e.liveSelector||
a(b).selector);ka.call(this,"remove");y.call(this);n.call(this);c.removeData("mCS");A(this,"mcs");q.remove();k.find("img."+l[2]).removeClass(l[2]);f.replaceWith(k.contents());c.removeClass("mCustomScrollbar _mCS_"+d.idx+" "+l[6]+" "+l[7]+" "+l[5]+" "+l[3]).addClass(l[4])}})}},t=function(){return"object"!=typeof a(this)||1>a(this).length?".mCustomScrollbar":this},C=function(b){b.autoDraggerLength=-1<a.inArray(b.theme,["rounded","rounded-dark","rounded-dots","rounded-dots-dark"])?!1:b.autoDraggerLength;
b.autoExpandScrollbar=-1<a.inArray(b.theme,"rounded-dots rounded-dots-dark 3d 3d-dark 3d-thick 3d-thick-dark inset inset-dark inset-2 inset-2-dark inset-3 inset-3-dark".split(" "))?!1:b.autoExpandScrollbar;b.scrollButtons.enable=-1<a.inArray(b.theme,["minimal","minimal-dark"])?!1:b.scrollButtons.enable;b.autoHideScrollbar=-1<a.inArray(b.theme,["minimal","minimal-dark"])?!0:b.autoHideScrollbar;b.scrollbarPosition=-1<a.inArray(b.theme,["minimal","minimal-dark"])?"outside":b.scrollbarPosition},v=function(a){c[a]&&
(clearTimeout(c[a]),A(c,a))},x=function(a){return"yx"===a||"xy"===a||"auto"===a?"yx":"x"===a||"horizontal"===a?"x":"y"},z=function(a){return"stepped"===a||"pixels"===a||"step"===a||"click"===a?"stepped":"stepless"},w=function(b){return Math.max.apply(Math,b.map(function(){return a(this).outerWidth(!0)}).get())},D=function(a,b,c){c=c?l[0]+"_expanded":"";var d=a.closest(".mCSB_scrollTools");"active"===b?(a.toggleClass(l[0]+" "+c),d.toggleClass(l[1]),a[0]._draggable=a[0]._draggable?0:1):a[0]._draggable||
("hide"===b?(a.removeClass(l[0]),d.removeClass(l[1])):(a.addClass(l[0]),d.addClass(l[1])))},n=function(){var b=a(this),c=b.data("mCS"),d=c.opt,e=a("#mCSB_"+c.idx),l=a("#mCSB_"+c.idx+"_container"),f=[a("#mCSB_"+c.idx+"_dragger_vertical"),a("#mCSB_"+c.idx+"_dragger_horizontal")];if(Z(b),("x"!==d.axis&&!c.overflowed[0]||"y"===d.axis&&c.overflowed[0])&&(f[0].add(l).css("top",0),P(b,"_resetY")),"y"!==d.axis&&!c.overflowed[1]||"x"===d.axis&&c.overflowed[1])d=dx=0,"rtl"===c.langDir&&(d=e.width()-l.outerWidth(!1),
dx=Math.abs(d/c.scrollRatio.x)),l.css("left",d),f[1].css("left",dx),P(b,"_resetX")},I=function(){function b(){c=setTimeout(function(){a.event.special.mousewheel?(clearTimeout(c),L.call(d[0])):b()},100)}var c,d=a(this),e=d.data("mCS"),l=e.opt;e.bindEvents||((R.call(this),l.contentTouchScroll&&ca.call(this),U.call(this),l.mouseWheel.enable)&&b(),ha.call(this),oa.call(this),l.advanced.autoScrollOnFocus&&fa.call(this),l.scrollButtons.enable&&ea.call(this),l.keyboard.enable&&ba.call(this),e.bindEvents=
!0)},y=function(){var b=a(this),c=b.data("mCS"),d=c.opt,e="mCS_"+c.idx,f=".mCSB_"+c.idx+"_scrollbar";f=a("#mCSB_"+c.idx+",#mCSB_"+c.idx+"_container,#mCSB_"+c.idx+"_container_wrapper,"+f+" ."+l[12]+",#mCSB_"+c.idx+"_dragger_vertical,#mCSB_"+c.idx+"_dragger_horizontal,"+f+"\x3ea");var q=a("#mCSB_"+c.idx+"_container");d.advanced.releaseDraggableSelectors&&f.add(a(d.advanced.releaseDraggableSelectors));c.bindEvents&&(a(k).unbind("."+e),f.each(function(){a(this).unbind("."+e)}),clearTimeout(b[0]._focusTimeout),
A(b[0],"_focusTimeout"),clearTimeout(c.sequential.step),A(c.sequential,"step"),clearTimeout(q[0].onCompleteTimeout),A(q[0],"onCompleteTimeout"),c.bindEvents=!1)},J=function(b){var c=a(this),d=c.data("mCS"),e=d.opt,f=a("#mCSB_"+d.idx+"_container_wrapper");f=f.length?f:a("#mCSB_"+d.idx+"_container");var k=[a("#mCSB_"+d.idx+"_scrollbar_vertical"),a("#mCSB_"+d.idx+"_scrollbar_horizontal")],q=[k[0].find(".mCSB_dragger"),k[1].find(".mCSB_dragger")];"x"!==e.axis&&(d.overflowed[0]&&!b?(k[0].add(q[0]).add(k[0].children("a")).css("display",
"block"),f.removeClass(l[8]+" "+l[10])):(e.alwaysShowScrollbar?(2!==e.alwaysShowScrollbar&&q[0].add(k[0].children("a")).css("display","none"),f.removeClass(l[10])):(k[0].css("display","none"),f.addClass(l[10])),f.addClass(l[8])));"y"!==e.axis&&(d.overflowed[1]&&!b?(k[1].add(q[1]).add(k[1].children("a")).css("display","block"),f.removeClass(l[9]+" "+l[11])):(e.alwaysShowScrollbar?(2!==e.alwaysShowScrollbar&&q[1].add(k[1].children("a")).css("display","none"),f.removeClass(l[11])):(k[1].css("display",
"none"),f.addClass(l[11])),f.addClass(l[9])));d.overflowed[0]||d.overflowed[1]?c.removeClass(l[5]):c.addClass(l[5])},F=function(a){switch(a.type){case "pointerdown":case "MSPointerDown":case "pointermove":case "MSPointerMove":case "pointerup":case "MSPointerUp":return[a.originalEvent.pageY,a.originalEvent.pageX,!1];case "touchstart":case "touchmove":case "touchend":var b=a.originalEvent.touches[0]||a.originalEvent.changedTouches[0];return[b.pageY,b.pageX,1<(a.originalEvent.touches.length||a.originalEvent.changedTouches.length)];
default:return[a.pageY,a.pageX,!1]}},R=function(){function c(a){var b=v.find("iframe");b.length&&b.css("pointer-events",a?"auto":"none")}function e(a,b,c,d){if(v[0].idleTimer=233>n.scrollInertia?250:0,l.attr("id")===B[1]){var e="x";a=(l[0].offsetLeft-b+d)*p.scrollRatio.x}else e="y",a=(l[0].offsetTop-a+c)*p.scrollRatio.y;P(m,a.toString(),{dir:e,drag:!0})}var l,f,q,m=a(this),p=m.data("mCS"),n=p.opt,t="mCS_"+p.idx,B=["mCSB_"+p.idx+"_dragger_vertical","mCSB_"+p.idx+"_dragger_horizontal"],v=a("#mCSB_"+
p.idx+"_container"),C=a("#"+B[0]+",#"+B[1]),A=n.advanced.releaseDraggableSelectors?C.add(a(n.advanced.releaseDraggableSelectors)):C;C.bind("mousedown."+t+" touchstart."+t+" pointerdown."+t+" MSPointerDown."+t,function(e){if(e.stopImmediatePropagation(),e.preventDefault(),!e.which||1===e.which){d=!0;b&&(k.onselectstart=function(){return!1});c(!1);Z(m);l=a(this);var h=l.offset(),p=F(e)[0]-h.top;e=F(e)[1]-h.left;var t=l.height()+h.top;h=l.width()+h.left;t>p&&0<p&&h>e&&0<e&&(f=p,q=e);D(l,"active",n.autoExpandScrollbar)}}).bind("touchmove."+
t,function(a){a.stopImmediatePropagation();a.preventDefault();var b=l.offset(),c=F(a)[0]-b.top;a=F(a)[1]-b.left;e(f,q,c,a)});a(k).bind("mousemove."+t+" pointermove."+t+" MSPointerMove."+t,function(a){if(l){var b=l.offset(),c=F(a)[0]-b.top;a=F(a)[1]-b.left;f!==c&&e(f,q,c,a)}}).add(A).bind("mouseup."+t+" touchend."+t+" pointerup."+t+" MSPointerUp."+t,function(){l&&(D(l,"active",n.autoExpandScrollbar),l=null);d=!1;b&&(k.onselectstart=null);c(!0)})},ca=function(){function b(a,b){var c=[1.5*b,2*b,b/1.5,
b/2];return 90<a?4<b?c[0]:c[3]:60<a?3<b?c[3]:c[2]:30<a?8<b?c[1]:6<b?c[0]:4<b?b:c[2]:8<b?b:c[3]}function c(a,b,c,d,e,l){a&&P(h,a.toString(),{dur:b,scrollEasing:c,dir:d,overwrite:e,drag:l})}var e,l,f,k,q,p,m,n,t,v,C,h=a(this),A=h.data("mCS"),w=A.opt,x="mCS_"+A.idx,y=a("#mCSB_"+A.idx),D=a("#mCSB_"+A.idx+"_container"),E=[a("#mCSB_"+A.idx+"_dragger_vertical"),a("#mCSB_"+A.idx+"_dragger_horizontal")],z=[],W=[],J="yx"===w.axis?"none":"all",I=[];D.bind("touchstart."+x+" pointerdown."+x+" MSPointerDown."+
x,function(a){if(S(a)&&!d&&!F(a)[2]){var b=D.offset();e=F(a)[0]-b.top;l=F(a)[1]-b.left;I=[F(a)[0],F(a)[1]]}}).bind("touchmove."+x+" pointermove."+x+" MSPointerMove."+x,function(a){if(S(a)&&!d&&!F(a)[2]){a.stopImmediatePropagation();p=B();var b=y.offset(),h=F(a)[0]-b.top;b=F(a)[1]-b.left;if(z.push(h),W.push(b),I[2]=Math.abs(F(a)[0]-I[0]),I[3]=Math.abs(F(a)[1]-I[1]),A.overflowed[0]){var f=E[0].parent().height()-E[0].height();f=0<e-h&&h-e>-(f*A.scrollRatio.y)&&(2*I[3]<I[2]||"yx"===w.axis)}if(A.overflowed[1]){var k=
E[1].parent().width()-E[1].width();k=0<l-b&&b-l>-(k*A.scrollRatio.x)&&(2*I[2]<I[3]||"yx"===w.axis)}(f||k)&&a.preventDefault();v="yx"===w.axis?[e-h,l-b]:"x"===w.axis?[null,l-b]:[e-h,null];D[0].idleTimer=250;A.overflowed[0]&&c(v[0],0,"mcsLinearOut","y","all",!0);A.overflowed[1]&&c(v[1],0,"mcsLinearOut","x",J,!0)}});y.bind("touchstart."+x+" pointerdown."+x+" MSPointerDown."+x,function(a){if(S(a)&&!d&&!F(a)[2]){a.stopImmediatePropagation();Z(h);q=B();var b=y.offset();f=F(a)[0]-b.top;k=F(a)[1]-b.left;
z=[];W=[]}}).bind("touchend."+x+" pointerup."+x+" MSPointerUp."+x,function(a){if(S(a)&&!d&&!F(a)[2]){a.stopImmediatePropagation();m=B();var e=y.offset(),h=F(a)[0]-e.top;e=F(a)[1]-e.left;if(!(30<m-p)){t=1E3/(m-q);var l=(a=2.5>t)?[z[z.length-2],W[W.length-2]]:[0,0];n=a?[h-l[0],e-l[1]]:[h-f,e-k];h=[Math.abs(n[0]),Math.abs(n[1])];t=a?[Math.abs(n[0]/4),Math.abs(n[1]/4)]:[t,t];a=[Math.abs(D[0].offsetTop)-n[0]*b(h[0]/t[0],t[0]),Math.abs(D[0].offsetLeft)-n[1]*b(h[1]/t[1],t[1])];v="yx"===w.axis?[a[0],a[1]]:
"x"===w.axis?[null,a[1]]:[a[0],null];C=[4*h[0]+w.scrollInertia,4*h[1]+w.scrollInertia];a=parseInt(w.contentTouchScroll)||0;v[0]=h[0]>a?v[0]:0;v[1]=h[1]>a?v[1]:0;A.overflowed[0]&&c(v[0],C[0],"mcsEaseOut","y",J,!1);A.overflowed[1]&&c(v[1],C[1],"mcsEaseOut","x",J,!1)}}})},U=function(){function b(a,b,d){p.type=d&&c?"stepped":"stepless";p.scrollAmount=10;Y(e,a,b,"mcsLinearOut",d?60:null)}var c,e=a(this),l=e.data("mCS"),q=l.opt,p=l.sequential,m="mCS_"+l.idx,n=a("#mCSB_"+l.idx+"_container"),t=n.parent();
n.bind("mousedown."+m,function(){c||(c=1,d=!0)}).add(k).bind("mousemove."+m,function(a){if(c&&(f.getSelection?f.getSelection().toString():k.selection&&"Control"!=k.selection.type&&k.selection.createRange().text)){var d=n.offset(),e=F(a)[0]-d.top+n[0].offsetTop;a=F(a)[1]-d.left+n[0].offsetLeft;0<e&&e<t.height()&&0<a&&a<t.width()?p.step&&b("off",null,"stepped"):("x"!==q.axis&&l.overflowed[0]&&(0>e?b("on",38):e>t.height()&&b("on",40)),"y"!==q.axis&&l.overflowed[1]&&(0>a?b("on",37):a>t.width()&&b("on",
39)))}}).bind("mouseup."+m,function(){c&&(c=0,b("off",null));d=!1})},L=function(){var c=a(this),d=c.data("mCS");if(d){var e=d.opt,l="mCS_"+d.idx,f=a("#mCSB_"+d.idx),k=[a("#mCSB_"+d.idx+"_dragger_vertical"),a("#mCSB_"+d.idx+"_dragger_horizontal")],q=a("#mCSB_"+d.idx+"_container").find("iframe"),p=f;q.length&&q.each(function(){var b=null;try{b=(this.contentDocument||this.contentWindow.document).body.innerHTML}catch(Da){}null!==b&&(p=p.add(a(this).contents().find("body")))});p.bind("mousewheel."+l,function(l,
q){Z(c);var p=l.target;var m=p.nodeName.toLowerCase();var n=c.data("mCS").opt.mouseWheel.disableOver;var h=["select","textarea"];if(!(-1<a.inArray(m,n))||-1<a.inArray(m,h)&&!a(p).is(":focus")){m="auto"!==e.mouseWheel.deltaFactor?parseInt(e.mouseWheel.deltaFactor):b&&100>l.deltaFactor?100:l.deltaFactor||100;if("x"===e.axis||"x"===e.mouseWheel.axis){p="x";m=[Math.round(m*d.scrollRatio.x),parseInt(e.mouseWheel.scrollAmount)];var t="auto"!==e.mouseWheel.scrollAmount?m[1]:m[0]>=f.width()?.9*f.width():
m[0];h=Math.abs(a("#mCSB_"+d.idx+"_container")[0].offsetLeft);n=k[1][0].offsetLeft;m=k[1].parent().width()-k[1].width();q=l.deltaX||l.deltaY||q}else p="y",m=[Math.round(m*d.scrollRatio.y),parseInt(e.mouseWheel.scrollAmount)],t="auto"!==e.mouseWheel.scrollAmount?m[1]:m[0]>=f.height()?.9*f.height():m[0],h=Math.abs(a("#mCSB_"+d.idx+"_container")[0].offsetTop),n=k[0][0].offsetTop,m=k[0].parent().height()-k[0].height(),q=l.deltaY||q;"y"===p&&!d.overflowed[0]||"x"===p&&!d.overflowed[1]||(e.mouseWheel.invert&&
(q=-q),e.mouseWheel.normalizeDelta&&(q=0>q?-1:1),(0<q&&0!==n||0>q&&n!==m||e.mouseWheel.preventDefault)&&(l.stopImmediatePropagation(),l.preventDefault()),P(c,(h-q*t).toString(),{dir:p}))}})}},ha=function(){var b=a(this),c=b.data("mCS"),e="mCS_"+c.idx,f=a("#mCSB_"+c.idx+"_container"),k=f.parent();a(".mCSB_"+c.idx+"_scrollbar ."+l[12]).bind("touchstart."+e+" pointerdown."+e+" MSPointerDown."+e,function(){d=!0}).bind("touchend."+e+" pointerup."+e+" MSPointerUp."+e,function(){d=!1}).bind("click."+e,function(d){if(a(d.target).hasClass(l[12])||
a(d.target).hasClass("mCSB_draggerRail")){Z(b);var e=a(this);var q=e.find(".mCSB_dragger");if(0<e.parent(".mCSB_scrollTools_horizontal").length){if(!c.overflowed[1])return;e="x";d=d.pageX>q.offset().left?-1:1;d=Math.abs(f[0].offsetLeft)-.9*d*k.width()}else{if(!c.overflowed[0])return;e="y";d=d.pageY>q.offset().top?-1:1;d=Math.abs(f[0].offsetTop)-.9*d*k.height()}P(b,d.toString(),{dir:e,scrollEasing:"mcsEaseInOut"})}})},fa=function(){var b=a(this),c=b.data("mCS"),d=c.opt,e="mCS_"+c.idx,l=a("#mCSB_"+
c.idx+"_container"),f=l.parent();l.bind("focusin."+e,function(){var c=a(k.activeElement),e=l.find(".mCustomScrollBox").length;c.is(d.advanced.autoScrollOnFocus)&&(Z(b),clearTimeout(b[0]._focusTimeout),b[0]._focusTimer=e?17*e:0,b[0]._focusTimeout=setTimeout(function(){var a=[W(c)[0],W(c)[1]],e=[l[0].offsetTop,l[0].offsetLeft];e=[0<=e[0]+a[0]&&e[0]+a[0]<f.height()-c.outerHeight(!1),0<=e[1]+a[1]&&e[0]+a[1]<f.width()-c.outerWidth(!1)];var k="yx"!==d.axis||e[0]||e[1]?"all":"none";"x"===d.axis||e[0]||P(b,
a[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:k,dur:0});"y"===d.axis||e[1]||P(b,a[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:k,dur:0})},b[0]._focusTimer))})},oa=function(){var b=a(this).data("mCS"),c="mCS_"+b.idx,d=a("#mCSB_"+b.idx+"_container").parent();d.bind("scroll."+c,function(){0===d.scrollTop()&&0===d.scrollLeft()||a(".mCSB_"+b.idx+"_scrollbar").css("visibility","hidden")})},ea=function(){var b=a(this),c=b.data("mCS"),e=c.opt,l=c.sequential,f="mCS_"+c.idx;
a(".mCSB_"+c.idx+"_scrollbar\x3ea").bind("mousedown."+f+" touchstart."+f+" pointerdown."+f+" MSPointerDown."+f+" mouseup."+f+" touchend."+f+" pointerup."+f+" MSPointerUp."+f+" mouseout."+f+" pointerout."+f+" MSPointerOut."+f+" click."+f,function(f){function k(a,c){l.scrollAmount=e.snapAmount||e.scrollButtons.scrollAmount;Y(b,a,c)}if(f.preventDefault(),!f.which||1===f.which){var q=a(this).attr("class");switch(l.type=e.scrollButtons.scrollType,f.type){case "mousedown":case "touchstart":case "pointerdown":case "MSPointerDown":if("stepped"===
l.type)break;d=!0;c.tweenRunning=!1;k("on",q);break;case "mouseup":case "touchend":case "pointerup":case "MSPointerUp":case "mouseout":case "pointerout":case "MSPointerOut":if("stepped"===l.type)break;d=!1;l.dir&&k("off",q);break;case "click":"stepped"!==l.type||c.tweenRunning||k("on",q)}}})},ba=function(){var b=a(this),c=b.data("mCS"),d=c.opt,e=c.sequential,l="mCS_"+c.idx,f=a("#mCSB_"+c.idx),q=a("#mCSB_"+c.idx+"_container"),m=q.parent();f.attr("tabindex","0").bind("blur."+l+" keydown."+l+" keyup."+
l,function(l){function f(a,l){e.type=d.keyboard.scrollType;e.scrollAmount=d.snapAmount||d.keyboard.scrollAmount;"stepped"===e.type&&c.tweenRunning||Y(b,a,l)}switch(l.type){case "blur":c.tweenRunning&&e.dir&&f("off",null);break;case "keydown":case "keyup":var p=l.keyCode?l.keyCode:l.which;var n="on";if("x"!==d.axis&&(38===p||40===p)||"y"!==d.axis&&(37===p||39===p))(38!==p&&40!==p||c.overflowed[0])&&(37!==p&&39!==p||c.overflowed[1])&&("keyup"===l.type&&(n="off"),a(k.activeElement).is("input,textarea,select,datalist,keygen,[contenteditable\x3d'true']")||
(l.preventDefault(),l.stopImmediatePropagation(),f(n,p)));else if(33===p||34===p){if((c.overflowed[0]||c.overflowed[1])&&(l.preventDefault(),l.stopImmediatePropagation()),"keyup"===l.type)Z(b),p=34===p?-1:1,"x"===d.axis||"yx"===d.axis&&c.overflowed[1]&&!c.overflowed[0]?(l="x",p=Math.abs(q[0].offsetLeft)-.9*p*m.width()):(l="y",p=Math.abs(q[0].offsetTop)-.9*p*m.height()),P(b,p.toString(),{dir:l,scrollEasing:"mcsEaseInOut"})}else 35!==p&&36!==p||a(k.activeElement).is("input,textarea,select,datalist,keygen,[contenteditable\x3d'true']")||
((c.overflowed[0]||c.overflowed[1])&&(l.preventDefault(),l.stopImmediatePropagation()),"keyup"!==l.type)||("x"===d.axis||"yx"===d.axis&&c.overflowed[1]&&!c.overflowed[0]?(l="x",p=35===p?Math.abs(m.width()-q.outerWidth(!1)):0):(l="y",p=35===p?Math.abs(m.height()-q.outerHeight(!1)):0),P(b,p.toString(),{dir:l,scrollEasing:"mcsEaseInOut"}))}})},Y=function(b,c,d,e,f){function k(a){var c="stepped"!==m.type,d=f?f:a?c?p.scrollInertia/1.5:p.scrollInertia:1E3/60,l=a?c?7.5:40:2.5,t=[Math.abs(n[0].offsetTop),
Math.abs(n[0].offsetLeft)],B=[10<q.scrollRatio.y?10:q.scrollRatio.y,10<q.scrollRatio.x?10:q.scrollRatio.x];l="x"===m.dir[0]?t[1]+m.dir[1]*B[1]*l:t[0]+m.dir[1]*B[0]*l;B="x"===m.dir[0]?t[1]+m.dir[1]*parseInt(m.scrollAmount):t[0]+m.dir[1]*parseInt(m.scrollAmount);l="auto"!==m.scrollAmount?B:l;c=e?e:a?c?"mcsLinearOut":"mcsEaseInOut":"mcsLinear";return a&&17>d&&(l="x"===m.dir[0]?t[1]:t[0]),P(b,l.toString(),{dir:m.dir[0],scrollEasing:c,dur:d,onComplete:a?!0:!1}),a?void(m.dir=!1):(clearTimeout(m.step),void(m.step=
setTimeout(function(){k()},d)))}var q=b.data("mCS"),p=q.opt,m=q.sequential,n=a("#mCSB_"+q.idx+"_container"),t="stepped"===m.type?!0:!1;switch(c){case "on":if(m.dir=[d===l[16]||d===l[15]||39===d||37===d?"x":"y",d===l[13]||d===l[15]||38===d||37===d?-1:1],Z(b),E(d)&&"stepped"===m.type)break;k(t);break;case "off":clearTimeout(m.step),A(m,"step"),Z(b),(t||q.tweenRunning&&m.dir)&&k(!0)}},K=function(b){var c=a(this).data("mCS").opt,d=[];return"function"==typeof b&&(b=b()),b instanceof Array?d=1<b.length?
[b[0],b[1]]:"x"===c.axis?[null,b[0]]:[b[0],null]:(d[0]=b.y?b.y:b.x||"x"===c.axis?null:b,d[1]=b.x?b.x:b.y||"y"===c.axis?null:b),"function"==typeof d[0]&&(d[0]=d[0]()),"function"==typeof d[1]&&(d[1]=d[1]()),d},V=function(b,c){if(null!=b&&"undefined"!=typeof b){var d=a(this),e=d.data("mCS"),l=e.opt;e=a("#mCSB_"+e.idx+"_container");var f=e.parent(),k=typeof b;c||(c="x"===l.axis?"x":"y");l="x"===c?e.outerWidth(!1):e.outerHeight(!1);var q="x"===c?e[0].offsetLeft:e[0].offsetTop,m="x"===c?"left":"top";switch(k){case "function":return b();
case "object":b=b.jquery?b:a(b);if(!b.length)break;return"x"===c?W(b)[1]:W(b)[0];case "string":case "number":return E(b)?Math.abs(b):-1!==b.indexOf("%")?Math.abs(l*parseInt(b)/100):-1!==b.indexOf("-\x3d")?Math.abs(q-parseInt(b.split("-\x3d")[1])):-1!==b.indexOf("+\x3d")?(c=q+parseInt(b.split("+\x3d")[1]),0<=c?0:Math.abs(c)):-1!==b.indexOf("px")&&E(b.split("px")[0])?Math.abs(b.split("px")[0]):"top"===b||"left"===b?0:"bottom"===b?Math.abs(f.height()-e.outerHeight(!1)):"right"===b?Math.abs(f.width()-
e.outerWidth(!1)):"first"===b||"last"===b?(b=e.find(":"+b),"x"===c?W(b)[1]:W(b)[0]):a(b).length?"x"===c?W(a(b))[1]:W(a(b))[0]:(e.css(m,b),void p.update.call(null,d[0]))}}},ka=function(b){function c(){clearTimeout(t[0].autoUpdate);t[0].autoUpdate=setTimeout(function(){return n.advanced.updateOnSelectorChange&&(B=f(),B!==u)?(k(3),void(u=B)):(n.advanced.updateOnContentResize&&(v=[t.outerHeight(!1),t.outerWidth(!1),h.height(),h.width(),x()[0],x()[1]],(v[0]!==y[0]||v[1]!==y[1]||v[2]!==y[2]||v[3]!==y[3]||
v[4]!==y[4]||v[5]!==y[5])&&(k(v[0]!==y[0]||v[1]!==y[1]),y=v)),n.advanced.updateOnImageLoad&&(C=d(),C!==D&&(t.find("img").each(function(){e(this)}),D=C)),void((n.advanced.updateOnSelectorChange||n.advanced.updateOnContentResize||n.advanced.updateOnImageLoad)&&c()))},60)}function d(){var a=0;return n.advanced.updateOnImageLoad&&(a=t.find("img").length),a}function e(b){if(a(b).hasClass(l[2]))return void k();var c=new Image;c.onload=function(a,b){return function(){return b.apply(a,arguments)}}(c,function(){this.onload=
null;a(b).addClass(l[2]);k(2)});c.src=b.src}function f(){!0===n.advanced.updateOnSelectorChange&&(n.advanced.updateOnSelectorChange="*");var b=0,c=t.find(n.advanced.updateOnSelectorChange);return n.advanced.updateOnSelectorChange&&0<c.length&&c.each(function(){b+=a(this).height()+a(this).width()}),b}function k(a){clearTimeout(t[0].autoUpdate);p.update.call(null,q[0],a)}var q=a(this),m=q.data("mCS"),n=m.opt,t=a("#mCSB_"+m.idx+"_container");if(b)return clearTimeout(t[0].autoUpdate),void A(t[0],"autoUpdate");
var B,v,C,h=t.parent(),w=[a("#mCSB_"+m.idx+"_scrollbar_vertical"),a("#mCSB_"+m.idx+"_scrollbar_horizontal")],x=function(){return[w[0].is(":visible")?w[0].outerHeight(!0):0,w[1].is(":visible")?w[1].outerWidth(!0):0]},u=f(),y=[t.outerHeight(!1),t.outerWidth(!1),h.height(),h.width(),x()[0],x()[1]],D=d();c()},ra=function(a,b,c){return Math.round(a/b)*b-c},Z=function(b){b=b.data("mCS");a("#mCSB_"+b.idx+"_container,#mCSB_"+b.idx+"_container_wrapper,#mCSB_"+b.idx+"_dragger_vertical,#mCSB_"+b.idx+"_dragger_horizontal").each(function(){this._mTween||
(this._mTween={top:{},left:{}});for(var a=["top","left"],b=0;b<a.length;b++){var c=a[b];this._mTween[c].id&&(f.requestAnimationFrame?f.cancelAnimationFrame(this._mTween[c].id):clearTimeout(this._mTween[c].id),this._mTween[c].id=null,this._mTween[c].stop=1)}})},P=function(b,c,d){function e(a){return f&&k.callbacks[a]&&"function"==typeof k.callbacks[a]}function l(){var a=[n[0].offsetTop,n[0].offsetLeft],c=[h[0].offsetTop,h[0].offsetLeft],e=[n.outerHeight(!1),n.outerWidth(!1)],l=[p.height(),p.width()];
b[0].mcs={content:n,top:a[0],left:a[1],draggerTop:c[0],draggerLeft:c[1],topPct:Math.round(100*Math.abs(a[0])/(Math.abs(e[0])-l[0])),leftPct:Math.round(100*Math.abs(a[1])/(Math.abs(e[1])-l[1])),direction:d.dir}}var f=b.data("mCS"),k=f.opt;d=a.extend({trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:k.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},d);var m=[d.dur,d.drag?0:d.dur],p=a("#mCSB_"+f.idx),n=a("#mCSB_"+f.idx+"_container"),t=n.parent(),B=k.callbacks.onTotalScrollOffset?
K.call(b,k.callbacks.onTotalScrollOffset):[0,0],v=k.callbacks.onTotalScrollBackOffset?K.call(b,k.callbacks.onTotalScrollBackOffset):[0,0];if(f.trigger=d.trigger,(0!==t.scrollTop()||0!==t.scrollLeft())&&(a(".mCSB_"+f.idx+"_scrollbar").css("visibility","visible"),t.scrollTop(0).scrollLeft(0)),"_resetY"!==c||f.contentReset.y||(e("onOverflowYNone")&&k.callbacks.onOverflowYNone.call(b[0]),f.contentReset.y=1),"_resetX"!==c||f.contentReset.x||(e("onOverflowXNone")&&k.callbacks.onOverflowXNone.call(b[0]),
f.contentReset.x=1),"_resetY"!==c&&"_resetX"!==c){switch(!f.contentReset.y&&b[0].mcs||!f.overflowed[0]||(e("onOverflowY")&&k.callbacks.onOverflowY.call(b[0]),f.contentReset.x=null),!f.contentReset.x&&b[0].mcs||!f.overflowed[1]||(e("onOverflowX")&&k.callbacks.onOverflowX.call(b[0]),f.contentReset.x=null),k.snapAmount&&(c=ra(c,k.snapAmount,k.snapOffset)),d.dir){case "x":var h=a("#mCSB_"+f.idx+"_dragger_horizontal");var C="left";var A=n[0].offsetLeft;var w=[p.width()-n.outerWidth(!1),h.parent().width()-
h.width()];var x=[c,0===c?0:c/f.scrollRatio.x];var y=B[1];var u=v[1];var E=0<y?y/f.scrollRatio.x:0;var z=0<u?u/f.scrollRatio.x:0;break;case "y":h=a("#mCSB_"+f.idx+"_dragger_vertical"),C="top",A=n[0].offsetTop,w=[p.height()-n.outerHeight(!1),h.parent().height()-h.height()],x=[c,0===c?0:c/f.scrollRatio.y],y=B[0],u=v[0],E=0<y?y/f.scrollRatio.y:0,z=0<u?u/f.scrollRatio.y:0}0>x[1]||0===x[0]&&0===x[1]?x=[0,0]:x[1]>=w[1]?x=[w[0],w[1]]:x[0]=-x[0];b[0].mcs||(l(),e("onInit")&&k.callbacks.onInit.call(b[0]));
clearTimeout(n[0].onCompleteTimeout);!f.tweenRunning&&(0===A&&0<=x[0]||A===w[0]&&x[0]<=w[0])||(q(h[0],C,Math.round(x[1]),m[1],d.scrollEasing),q(n[0],C,Math.round(x[0]),m[0],d.scrollEasing,d.overwrite,{onStart:function(){d.callbacks&&d.onStart&&!f.tweenRunning&&(e("onScrollStart")&&(l(),k.callbacks.onScrollStart.call(b[0])),f.tweenRunning=!0,D(h),f.cbOffsets=[k.callbacks.alwaysTriggerOffsets||A>=w[0]+y,k.callbacks.alwaysTriggerOffsets||-u>=A])},onUpdate:function(){d.callbacks&&d.onUpdate&&e("whileScrolling")&&
(l(),k.callbacks.whileScrolling.call(b[0]))},onComplete:function(){d.callbacks&&d.onComplete&&("yx"===k.axis&&clearTimeout(n[0].onCompleteTimeout),n[0].onCompleteTimeout=setTimeout(function(){e("onScroll")&&(l(),k.callbacks.onScroll.call(b[0]));e("onTotalScroll")&&x[1]>=w[1]-E&&f.cbOffsets[0]&&(l(),k.callbacks.onTotalScroll.call(b[0]));e("onTotalScrollBack")&&x[1]<=z&&f.cbOffsets[1]&&(l(),k.callbacks.onTotalScrollBack.call(b[0]));f.tweenRunning=!1;n[0].idleTimer=0;D(h,"hide")},n[0].idleTimer||0))}}))}},
q=function(a,b,c,d,e,l,k){function q(){u.stop||(w||v.call(),w=B()-A,m(),w>=u.time&&(u.time=w>u.time?w+n-(w-u.time):w+n-1,u.time<w+1&&(u.time=w+1)),u.time<d?u.id=t(q):C.call())}function m(){0<d?(u.currVal=p(u.time,x,D,d,e),y[b]=Math.round(u.currVal)+"px"):y[b]=c+"px";h.call()}function p(a,b,c,d,e){switch(e){case "linear":case "mcsLinear":return c*a/d+b;case "mcsLinearOut":return a/=d,a--,c*Math.sqrt(1-a*a)+b;case "easeInOutSmooth":return a/=d/2,1>a?c/2*a*a+b:(a--,-c/2*(a*(a-2)-1)+b);case "easeInOutStrong":return a/=
d/2,1>a?c/2*Math.pow(2,10*(a-1))+b:(a--,c/2*(-Math.pow(2,-10*a)+2)+b);case "easeInOut":case "mcsEaseInOut":return a/=d/2,1>a?c/2*a*a*a+b:(a-=2,c/2*(a*a*a+2)+b);case "easeOutSmooth":return a/=d,a--,-c*(a*a*a*a-1)+b;case "easeOutStrong":return c*(-Math.pow(2,-10*a/d)+1)+b;default:return d=(a/=d)*a,e=d*a,b+c*(.499999999999997*e*d+-2.5*d*d+5.5*e+-6.5*d+4*a)}}a._mTween||(a._mTween={top:{},left:{}});var n,t;k=k||{};var v=k.onStart||function(){},h=k.onUpdate||function(){},C=k.onComplete||function(){},A=
B(),w=0,x=a.offsetTop,y=a.style,u=a._mTween[b];"left"===b&&(x=a.offsetLeft);var D=c-x;u.stop=0;"none"!==l&&null!=u.id&&(f.requestAnimationFrame?f.cancelAnimationFrame(u.id):clearTimeout(u.id),u.id=null);(function(){n=1E3/60;u.time=w+n;t=f.requestAnimationFrame?f.requestAnimationFrame:function(a){return m(),setTimeout(a,.01)};u.id=t(q)})()},B=function(){return f.performance&&f.performance.now?f.performance.now():f.performance&&f.performance.webkitNow?f.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},
A=function(a,b){try{delete a[b]}catch(G){a[b]=null}},S=function(a){a=a.originalEvent.pointerType;return!(a&&"touch"!==a&&2!==a)},E=function(a){return!isNaN(parseFloat(a))&&isFinite(a)},W=function(a){var b=a.parents(".mCSB_container");return[a.offset().top-b.offset().top,a.offset().left-b.offset().left]};a.fn.mCustomScrollbar=function(b){return p[b]?p[b].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof b&&b?void a.error("Method "+b+" does not exist"):p.init.apply(this,arguments)};
a.mCustomScrollbar=function(b){return p[b]?p[b].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof b&&b?void a.error("Method "+b+" does not exist"):p.init.apply(this,arguments)};a.mCustomScrollbar.defaults=m;f.mCustomScrollbar=!0;a(f).load(function(){a(".mCustomScrollbar").mCustomScrollbar();a.extend(a.expr[":"],{mcsInView:a.expr[":"].mcsInView||function(b){var c,d;b=a(b);var e=b.parents(".mCSB_container");if(e.length)return c=e.parent(),d=[e[0].offsetTop,e[0].offsetLeft],0<=d[0]+
W(b)[0]&&d[0]+W(b)[0]<c.height()-b.outerHeight(!1)&&0<=d[1]+W(b)[1]&&d[1]+W(b)[1]<c.width()-b.outerWidth(!1)},mcsOverflow:a.expr[":"].mcsOverflow||function(b){if(b=a(b).data("mCS"))return b.overflowed[0]||b.overflowed[1]}})})})}(jQuery,window,document);
!function(){function a(m){if(!m)throw Error("No options passed to Waypoint constructor");if(!m.element)throw Error("No element option passed to Waypoint constructor");if(!m.handler)throw Error("No handler option passed to Waypoint constructor");this.key="waypoint-"+f;this.options=a.Adapter.extend({},a.defaults,m);this.element=this.options.element;this.adapter=new a.Adapter(this.element);this.callback=m.handler;this.axis=this.options.horizontal?"horizontal":"vertical";this.enabled=this.options.enabled;
this.triggerPoint=null;this.group=a.Group.findOrCreate({name:this.options.group,axis:this.axis});this.context=a.Context.findOrCreateByElement(this.options.context);a.offsetAliases[this.options.offset]&&(this.options.offset=a.offsetAliases[this.options.offset]);this.group.add(this);this.context.add(this);k[this.key]=this;f+=1}var f=0,k={};a.prototype.queueTrigger=function(a){this.group.queueTrigger(this,a)};a.prototype.trigger=function(a){this.enabled&&this.callback&&this.callback.apply(this,a)};a.prototype.destroy=
function(){this.context.remove(this);this.group.remove(this);delete k[this.key]};a.prototype.disable=function(){return this.enabled=!1,this};a.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this};a.prototype.next=function(){return this.group.next(this)};a.prototype.previous=function(){return this.group.previous(this)};a.invokeAll=function(a){var e=[];for(c in k)e.push(k[c]);var c=0;for(var b=e.length;b>c;c++)e[c][a]()};a.destroyAll=function(){a.invokeAll("destroy")};a.disableAll=
function(){a.invokeAll("disable")};a.enableAll=function(){a.invokeAll("enable")};a.refreshAll=function(){a.Context.refreshAll()};a.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight};a.viewportWidth=function(){return document.documentElement.clientWidth};a.adapters=[];a.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0};a.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},
"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}};window.Waypoint=a}();
(function(){function a(a){window.setTimeout(a,1E3/60)}function f(a){this.element=a;this.Adapter=e.Adapter;this.adapter=new this.Adapter(a);this.key="waypoint-context-"+k;this.didResize=this.didScroll=!1;this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()};this.waypoints={vertical:{},horizontal:{}};a.waypointContextKey=this.key;m[a.waypointContextKey]=this;k+=1;this.createThrottledScrollHandler();this.createThrottledResizeHandler()}var k=0,m={},e=window.Waypoint,c=window.onload;
f.prototype.add=function(a){this.waypoints[a.options.horizontal?"horizontal":"vertical"][a.key]=a;this.refresh()};f.prototype.checkEmpty=function(){var a=this.Adapter.isEmptyObject(this.waypoints.horizontal),c=this.Adapter.isEmptyObject(this.waypoints.vertical);a&&c&&(this.adapter.off(".waypoints"),delete m[this.key])};f.prototype.createThrottledResizeHandler=function(){function a(){c.handleResize();c.didResize=!1}var c=this;this.adapter.on("resize.waypoints",function(){c.didResize||(c.didResize=
!0,e.requestAnimationFrame(a))})};f.prototype.createThrottledScrollHandler=function(){function a(){c.handleScroll();c.didScroll=!1}var c=this;this.adapter.on("scroll.waypoints",function(){c.didScroll&&!e.isTouch||(c.didScroll=!0,e.requestAnimationFrame(a))})};f.prototype.handleResize=function(){e.Context.refreshAll()};f.prototype.handleScroll=function(){var a={},c={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),
oldScroll:this.oldScroll.y,forward:"down",backward:"up"}},e;for(e in c){var f=c[e],k=f.newScroll>f.oldScroll?f.forward:f.backward,m;for(m in this.waypoints[e]){var v=this.waypoints[e][m],x=f.oldScroll<v.triggerPoint,z=f.newScroll>=v.triggerPoint,w=!x&&!z;(x&&z||w)&&(v.queueTrigger(k),a[v.group.id]=v.group)}}for(var D in a)a[D].flushTriggers();this.oldScroll={x:c.horizontal.newScroll,y:c.vertical.newScroll}};f.prototype.innerHeight=function(){return this.element==this.element.window?e.viewportHeight():
this.adapter.innerHeight()};f.prototype.remove=function(a){delete this.waypoints[a.axis][a.key];this.checkEmpty()};f.prototype.innerWidth=function(){return this.element==this.element.window?e.viewportWidth():this.adapter.innerWidth()};f.prototype.destroy=function(){var a=[];for(e in this.waypoints)for(var c in this.waypoints[e])a.push(this.waypoints[e][c]);var e=0;for(c=a.length;c>e;e++)a[e].destroy()};f.prototype.refresh=function(){var a,c=(a=this.element==this.element.window)?void 0:this.adapter.offset(),
l={};this.handleScroll();a={horizontal:{contextOffset:a?0:c.left,contextScroll:a?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:a?0:c.top,contextScroll:a?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};for(var f in a){c=a[f];for(var k in this.waypoints[f]){var m=this.waypoints[f][k];var v=m.options.offset;var x=
m.triggerPoint;var z=0;var w=null==x;m.element!==m.element.window&&(z=m.adapter.offset()[c.offsetProp]);"function"==typeof v?v=v.apply(m):"string"==typeof v&&(v=parseFloat(v),-1<m.options.offset.indexOf("%")&&(v=Math.ceil(c.contextDimension*v/100)));m.triggerPoint=z+(c.contextScroll-c.contextOffset)-v;x=x<c.oldScroll;z=m.triggerPoint>=c.oldScroll;v=x&&z;x=!x&&!z;!w&&v?(m.queueTrigger(c.backward),l[m.group.id]=m.group):!w&&x?(m.queueTrigger(c.forward),l[m.group.id]=m.group):w&&c.oldScroll>=m.triggerPoint&&
(m.queueTrigger(c.forward),l[m.group.id]=m.group)}}return e.requestAnimationFrame(function(){for(var a in l)l[a].flushTriggers()}),this};f.findOrCreateByElement=function(a){return f.findByElement(a)||new f(a)};f.refreshAll=function(){for(var a in m)m[a].refresh()};f.findByElement=function(a){return m[a.waypointContextKey]};window.onload=function(){c&&c();f.refreshAll()};e.requestAnimationFrame=function(b){(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||
a).call(window,b)};e.Context=f})();
(function(){function a(a,b){return a.triggerPoint-b.triggerPoint}function f(a,b){return b.triggerPoint-a.triggerPoint}function k(a){this.name=a.name;this.axis=a.axis;this.id=this.name+"-"+this.axis;this.waypoints=[];this.clearTriggerQueues();m[this.axis][this.name]=this}var m={vertical:{},horizontal:{}},e=window.Waypoint;k.prototype.add=function(a){this.waypoints.push(a)};k.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}};k.prototype.flushTriggers=function(){for(var c in this.triggerQueues){var b=
this.triggerQueues[c];b.sort("up"===c||"left"===c?f:a);for(var d=0,e=b.length;e>d;d+=1){var k=b[d];(k.options.continuous||d===b.length-1)&&k.trigger([c])}}this.clearTriggerQueues()};k.prototype.next=function(c){this.waypoints.sort(a);c=e.Adapter.inArray(c,this.waypoints);return c===this.waypoints.length-1?null:this.waypoints[c+1]};k.prototype.previous=function(c){this.waypoints.sort(a);return(c=e.Adapter.inArray(c,this.waypoints))?this.waypoints[c-1]:null};k.prototype.queueTrigger=function(a,b){this.triggerQueues[b].push(a)};
k.prototype.remove=function(a){a=e.Adapter.inArray(a,this.waypoints);-1<a&&this.waypoints.splice(a,1)};k.prototype.first=function(){return this.waypoints[0]};k.prototype.last=function(){return this.waypoints[this.waypoints.length-1]};k.findOrCreate=function(a){return m[a.axis][a.name]||new k(a)};e.Group=k})();
(function(){function a(a){this.$element=f(a)}var f=window.jQuery,k=window.Waypoint;f.each("innerHeight innerWidth off offset on outerHeight outerWidth scrollLeft scrollTop".split(" "),function(f,e){a.prototype[e]=function(){var a=Array.prototype.slice.call(arguments);return this.$element[e].apply(this.$element,a)}});f.each(["extend","inArray","isEmptyObject"],function(k,e){a[e]=f[e]});k.adapters.push({name:"jquery",Adapter:a});k.Adapter=a})();
(function(){function a(a){return function(k,e){var c=[],b=k;return a.isFunction(k)&&(b=a.extend({},e),b.handler=k),this.each(function(){var d=a.extend({},b,{element:this});"string"==typeof d.context&&(d.context=a(this).closest(d.context)[0]);c.push(new f(d))}),c}}var f=window.Waypoint;window.jQuery&&(window.jQuery.fn.waypoint=a(window.jQuery));window.Zepto&&(window.Zepto.fn.waypoint=a(window.Zepto))})();
(function(){function a(a){return function(b,c,d,e){c=I(c,e,4);var l=!L(b)&&n.keys(b),f=(l||b).length,k=0<a?0:f-1;3>arguments.length&&(d=b[l?l[k]:k],k+=a);for(var m=c,q=d;0<=k&&k<f;k+=a){var p=l?l[k]:k;q=m(q,b[p],p,b)}return q}}function f(a){return function(b,c,d){c=y(c,d);d=U(b);for(var e=0<a?0:d-1;0<=e&&e<d;e+=a)if(c(b[e],e,b))return e;return-1}}function k(a,b,c){return function(d,e,l){var f=0,k=U(d);if("number"==typeof l)0<a?f=0<=l?l:Math.max(l+k,f):k=0<=l?Math.min(l+1,k):l+k+1;else if(c&&l&&k)return l=
c(d,e),d[l]===e?l:-1;if(e!==e)return l=b(p.call(d,f,k),n.isNaN),0<=l?l+f:-1;for(l=0<a?f:k-1;0<=l&&l<k;l+=a)if(d[l]===e)return l;return-1}}function m(a,b){var c=ba.length,e=a.constructor;e=n.isFunction(e)&&e.prototype||d;var l="constructor";for(n.has(a,l)&&!n.contains(b,l)&&b.push(l);c--;)l=ba[c],l in a&&a[l]!==e[l]&&!n.contains(b,l)&&b.push(l)}var e=this,c=e._,b=Array.prototype,d=Object.prototype,l=b.push,p=b.slice,t=d.toString,C=d.hasOwnProperty,v=Array.isArray,x=Object.keys,z=Function.prototype.bind,
w=Object.create,D=function(){},n=function(a){if(a instanceof n)return a;if(!(this instanceof n))return new n(a);this._wrapped=a};"undefined"!==typeof exports?("undefined"!==typeof module&&module.exports&&(exports=module.exports=n),exports._=n):e._=n;n.VERSION="1.8.3";var I=function(a,b,c){if(void 0===b)return a;switch(null==c?3:c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)};case 4:return function(c,
d,e,l){return a.call(b,c,d,e,l)}}return function(){return a.apply(b,arguments)}},y=function(a,b,c){return null==a?n.identity:n.isFunction(a)?I(a,b,c):n.isObject(a)?n.matcher(a):n.property(a)};n.iteratee=function(a,b){return y(a,b,Infinity)};var J=function(a,b){return function(c){var d=arguments.length;if(2>d||null==c)return c;for(var e=1;e<d;e++)for(var l=arguments[e],f=a(l),k=f.length,m=0;m<k;m++){var p=f[m];b&&void 0!==c[p]||(c[p]=l[p])}return c}},F=function(a){if(!n.isObject(a))return{};if(w)return w(a);
D.prototype=a;a=new D;D.prototype=null;return a},R=function(a){return function(b){return null==b?void 0:b[a]}},ca=Math.pow(2,53)-1,U=R("length"),L=function(a){a=U(a);return"number"==typeof a&&0<=a&&a<=ca};n.each=n.forEach=function(a,b,c){b=I(b,c);var d;if(L(a))for(c=0,d=a.length;c<d;c++)b(a[c],c,a);else{var e=n.keys(a);c=0;for(d=e.length;c<d;c++)b(a[e[c]],e[c],a)}return a};n.map=n.collect=function(a,b,c){b=y(b,c);c=!L(a)&&n.keys(a);for(var d=(c||a).length,e=Array(d),l=0;l<d;l++){var f=c?c[l]:l;e[l]=
b(a[f],f,a)}return e};n.reduce=n.foldl=n.inject=a(1);n.reduceRight=n.foldr=a(-1);n.find=n.detect=function(a,b,c){b=L(a)?n.findIndex(a,b,c):n.findKey(a,b,c);if(void 0!==b&&-1!==b)return a[b]};n.filter=n.select=function(a,b,c){var d=[];b=y(b,c);n.each(a,function(a,c,e){b(a,c,e)&&d.push(a)});return d};n.reject=function(a,b,c){return n.filter(a,n.negate(y(b)),c)};n.every=n.all=function(a,b,c){b=y(b,c);c=!L(a)&&n.keys(a);for(var d=(c||a).length,e=0;e<d;e++){var l=c?c[e]:e;if(!b(a[l],l,a))return!1}return!0};
n.some=n.any=function(a,b,c){b=y(b,c);c=!L(a)&&n.keys(a);for(var d=(c||a).length,e=0;e<d;e++){var l=c?c[e]:e;if(b(a[l],l,a))return!0}return!1};n.contains=n.includes=n.include=function(a,b,c,d){L(a)||(a=n.values(a));if("number"!=typeof c||d)c=0;return 0<=n.indexOf(a,b,c)};n.invoke=function(a,b){var c=p.call(arguments,2),d=n.isFunction(b);return n.map(a,function(a){var e=d?b:a[b];return null==e?e:e.apply(a,c)})};n.pluck=function(a,b){return n.map(a,n.property(b))};n.where=function(a,b){return n.filter(a,
n.matcher(b))};n.findWhere=function(a,b){return n.find(a,n.matcher(b))};n.max=function(a,b,c){var d=-Infinity,e=-Infinity,l;if(null==b&&null!=a){a=L(a)?a:n.values(a);for(var f=0,k=a.length;f<k;f++)c=a[f],c>d&&(d=c)}else b=y(b,c),n.each(a,function(a,c,f){l=b(a,c,f);if(l>e||-Infinity===l&&-Infinity===d)d=a,e=l});return d};n.min=function(a,b,c){var d=Infinity,e=Infinity,l;if(null==b&&null!=a){a=L(a)?a:n.values(a);for(var f=0,k=a.length;f<k;f++)c=a[f],c<d&&(d=c)}else b=y(b,c),n.each(a,function(a,c,f){l=
b(a,c,f);if(l<e||Infinity===l&&Infinity===d)d=a,e=l});return d};n.shuffle=function(a){a=L(a)?a:n.values(a);for(var b=a.length,c=Array(b),d=0,e;d<b;d++)e=n.random(0,d),e!==d&&(c[d]=c[e]),c[e]=a[d];return c};n.sample=function(a,b,c){return null==b||c?(L(a)||(a=n.values(a)),a[n.random(a.length-1)]):n.shuffle(a).slice(0,Math.max(0,b))};n.sortBy=function(a,b,c){b=y(b,c);return n.pluck(n.map(a,function(a,c,d){return{value:a,index:c,criteria:b(a,c,d)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;if(c!==
d){if(c>d||void 0===c)return 1;if(c<d||void 0===d)return-1}return a.index-b.index}),"value")};var ha=function(a){return function(b,c,d){var e={};c=y(c,d);n.each(b,function(d,l){l=c(d,l,b);a(e,d,l)});return e}};n.groupBy=ha(function(a,b,c){n.has(a,c)?a[c].push(b):a[c]=[b]});n.indexBy=ha(function(a,b,c){a[c]=b});n.countBy=ha(function(a,b,c){n.has(a,c)?a[c]++:a[c]=1});n.toArray=function(a){return a?n.isArray(a)?p.call(a):L(a)?n.map(a,n.identity):n.values(a):[]};n.size=function(a){return null==a?0:L(a)?
a.length:n.keys(a).length};n.partition=function(a,b,c){b=y(b,c);var d=[],e=[];n.each(a,function(a,c,l){(b(a,c,l)?d:e).push(a)});return[d,e]};n.first=n.head=n.take=function(a,b,c){if(null!=a)return null==b||c?a[0]:n.initial(a,a.length-b)};n.initial=function(a,b,c){return p.call(a,0,Math.max(0,a.length-(null==b||c?1:b)))};n.last=function(a,b,c){if(null!=a)return null==b||c?a[a.length-1]:n.rest(a,Math.max(0,a.length-b))};n.rest=n.tail=n.drop=function(a,b,c){return p.call(a,null==b||c?1:b)};n.compact=
function(a){return n.filter(a,n.identity)};var fa=function(a,b,c,d){var e=[],l=0;d=d||0;for(var f=U(a);d<f;d++){var k=a[d];if(L(k)&&(n.isArray(k)||n.isArguments(k))){b||(k=fa(k,b,c));var m=0,p=k.length;for(e.length+=p;m<p;)e[l++]=k[m++]}else c||(e[l++]=k)}return e};n.flatten=function(a,b){return fa(a,b,!1)};n.without=function(a){return n.difference(a,p.call(arguments,1))};n.uniq=n.unique=function(a,b,c,d){n.isBoolean(b)||(d=c,c=b,b=!1);null!=c&&(c=y(c,d));d=[];for(var e=[],l=0,f=U(a);l<f;l++){var k=
a[l],m=c?c(k,l,a):k;b?(l&&e===m||d.push(k),e=m):c?n.contains(e,m)||(e.push(m),d.push(k)):n.contains(d,k)||d.push(k)}return d};n.union=function(){return n.uniq(fa(arguments,!0,!0))};n.intersection=function(a){for(var b=[],c=arguments.length,d=0,e=U(a);d<e;d++){var l=a[d];if(!n.contains(b,l)){for(var f=1;f<c&&n.contains(arguments[f],l);f++);f===c&&b.push(l)}}return b};n.difference=function(a){var b=fa(arguments,!0,!0,1);return n.filter(a,function(a){return!n.contains(b,a)})};n.zip=function(){return n.unzip(arguments)};
n.unzip=function(a){for(var b=a&&n.max(a,U).length||0,c=Array(b),d=0;d<b;d++)c[d]=n.pluck(a,d);return c};n.object=function(a,b){for(var c={},d=0,e=U(a);d<e;d++)b?c[a[d]]=b[d]:c[a[d][0]]=a[d][1];return c};n.findIndex=f(1);n.findLastIndex=f(-1);n.sortedIndex=function(a,b,c,d){c=y(c,d,1);b=c(b);d=0;for(var e=U(a);d<e;){var l=Math.floor((d+e)/2);c(a[l])<b?d=l+1:e=l}return d};n.indexOf=k(1,n.findIndex,n.sortedIndex);n.lastIndexOf=k(-1,n.findLastIndex);n.range=function(a,b,c){null==b&&(b=a||0,a=0);c=c||
1;b=Math.max(Math.ceil((b-a)/c),0);for(var d=Array(b),e=0;e<b;e++,a+=c)d[e]=a;return d};var oa=function(a,b,c,d,e){if(!(d instanceof b))return a.apply(c,e);b=F(a.prototype);a=a.apply(b,e);return n.isObject(a)?a:b};n.bind=function(a,b){if(z&&a.bind===z)return z.apply(a,p.call(arguments,1));if(!n.isFunction(a))throw new TypeError("Bind must be called on a function");var c=p.call(arguments,2),d=function(){return oa(a,d,b,this,c.concat(p.call(arguments)))};return d};n.partial=function(a){var b=p.call(arguments,
1),c=function(){for(var d=0,e=b.length,l=Array(e),f=0;f<e;f++)l[f]=b[f]===n?arguments[d++]:b[f];for(;d<arguments.length;)l.push(arguments[d++]);return oa(a,c,this,this,l)};return c};n.bindAll=function(a){var b,c=arguments.length;if(1>=c)throw Error("bindAll must be passed function names");for(b=1;b<c;b++){var d=arguments[b];a[d]=n.bind(a[d],a)}return a};n.memoize=function(a,b){var c=function(d){var e=c.cache,l=""+(b?b.apply(this,arguments):d);n.has(e,l)||(e[l]=a.apply(this,arguments));return e[l]};
c.cache={};return c};n.delay=function(a,b){var c=p.call(arguments,2);return setTimeout(function(){return a.apply(null,c)},b)};n.defer=n.partial(n.delay,n,1);n.throttle=function(a,b,c){var d,e,l,f=null,k=0;c||(c={});var m=function(){k=!1===c.leading?0:n.now();f=null;l=a.apply(d,e);f||(d=e=null)};return function(){var p=n.now();k||!1!==c.leading||(k=p);var t=b-(p-k);d=this;e=arguments;0>=t||t>b?(f&&(clearTimeout(f),f=null),k=p,l=a.apply(d,e),f||(d=e=null)):f||!1===c.trailing||(f=setTimeout(m,t));return l}};
n.debounce=function(a,b,c){var d,e,l,f,k,m=function(){var p=n.now()-f;p<b&&0<=p?d=setTimeout(m,b-p):(d=null,c||(k=a.apply(l,e),d||(l=e=null)))};return function(){l=this;e=arguments;f=n.now();var p=c&&!d;d||(d=setTimeout(m,b));p&&(k=a.apply(l,e),l=e=null);return k}};n.wrap=function(a,b){return n.partial(b,a)};n.negate=function(a){return function(){return!a.apply(this,arguments)}};n.compose=function(){var a=arguments,b=a.length-1;return function(){for(var c=b,d=a[b].apply(this,arguments);c--;)d=a[c].call(this,
d);return d}};n.after=function(a,b){return function(){if(1>--a)return b.apply(this,arguments)}};n.before=function(a,b){var c;return function(){0<--a&&(c=b.apply(this,arguments));1>=a&&(b=null);return c}};n.once=n.partial(n.before,2);var ea=!{toString:null}.propertyIsEnumerable("toString"),ba="valueOf isPrototypeOf toString propertyIsEnumerable hasOwnProperty toLocaleString".split(" ");n.keys=function(a){if(!n.isObject(a))return[];if(x)return x(a);var b=[],c;for(c in a)n.has(a,c)&&b.push(c);ea&&m(a,
b);return b};n.allKeys=function(a){if(!n.isObject(a))return[];var b=[],c;for(c in a)b.push(c);ea&&m(a,b);return b};n.values=function(a){for(var b=n.keys(a),c=b.length,d=Array(c),e=0;e<c;e++)d[e]=a[b[e]];return d};n.mapObject=function(a,b,c){b=y(b,c);c=n.keys(a);for(var d=c.length,e={},l,f=0;f<d;f++)l=c[f],e[l]=b(a[l],l,a);return e};n.pairs=function(a){for(var b=n.keys(a),c=b.length,d=Array(c),e=0;e<c;e++)d[e]=[b[e],a[b[e]]];return d};n.invert=function(a){for(var b={},c=n.keys(a),d=0,e=c.length;d<
e;d++)b[a[c[d]]]=c[d];return b};n.functions=n.methods=function(a){var b=[],c;for(c in a)n.isFunction(a[c])&&b.push(c);return b.sort()};n.extend=J(n.allKeys);n.extendOwn=n.assign=J(n.keys);n.findKey=function(a,b,c){b=y(b,c);c=n.keys(a);for(var d,e=0,l=c.length;e<l;e++)if(d=c[e],b(a[d],d,a))return d};n.pick=function(a,b,c){var d={},e=a;if(null==e)return d;if(n.isFunction(b)){var l=n.allKeys(e);var f=I(b,c)}else l=fa(arguments,!1,!1,1),f=function(a,b,c){return b in c},e=Object(e);for(var k=0,m=l.length;k<
m;k++){var p=l[k],t=e[p];f(t,p,e)&&(d[p]=t)}return d};n.omit=function(a,b,c){if(n.isFunction(b))b=n.negate(b);else{var d=n.map(fa(arguments,!1,!1,1),String);b=function(a,b){return!n.contains(d,b)}}return n.pick(a,b,c)};n.defaults=J(n.allKeys,!0);n.create=function(a,b){a=F(a);b&&n.extendOwn(a,b);return a};n.clone=function(a){return n.isObject(a)?n.isArray(a)?a.slice():n.extend({},a):a};n.tap=function(a,b){b(a);return a};n.isMatch=function(a,b){var c=n.keys(b),d=c.length;if(null==a)return!d;a=Object(a);
for(var e=0;e<d;e++){var l=c[e];if(b[l]!==a[l]||!(l in a))return!1}return!0};var Y=function(a,b,c,d){if(a===b)return 0!==a||1/a===1/b;if(null==a||null==b)return a===b;a instanceof n&&(a=a._wrapped);b instanceof n&&(b=b._wrapped);var e=t.call(a);if(e!==t.call(b))return!1;switch(e){case "[object RegExp]":case "[object String]":return""+a===""+b;case "[object Number]":return+a!==+a?+b!==+b:0===+a?1/+a===1/b:+a===+b;case "[object Date]":case "[object Boolean]":return+a===+b}e="[object Array]"===e;if(!e){if("object"!=
typeof a||"object"!=typeof b)return!1;var l=a.constructor,f=b.constructor;if(l!==f&&!(n.isFunction(l)&&l instanceof l&&n.isFunction(f)&&f instanceof f)&&"constructor"in a&&"constructor"in b)return!1}c=c||[];d=d||[];for(l=c.length;l--;)if(c[l]===a)return d[l]===b;c.push(a);d.push(b);if(e){l=a.length;if(l!==b.length)return!1;for(;l--;)if(!Y(a[l],b[l],c,d))return!1}else{e=n.keys(a);l=e.length;if(n.keys(b).length!==l)return!1;for(;l--;)if(f=e[l],!n.has(b,f)||!Y(a[f],b[f],c,d))return!1}c.pop();d.pop();
return!0};n.isEqual=function(a,b){return Y(a,b)};n.isEmpty=function(a){return null==a?!0:L(a)&&(n.isArray(a)||n.isString(a)||n.isArguments(a))?0===a.length:0===n.keys(a).length};n.isElement=function(a){return!(!a||1!==a.nodeType)};n.isArray=v||function(a){return"[object Array]"===t.call(a)};n.isObject=function(a){var b=typeof a;return"function"===b||"object"===b&&!!a};n.each("Arguments Function String Number Date RegExp Error".split(" "),function(a){n["is"+a]=function(b){return t.call(b)==="[object "+
a+"]"}});n.isArguments(arguments)||(n.isArguments=function(a){return n.has(a,"callee")});"function"!=typeof/./&&"object"!=typeof Int8Array&&(n.isFunction=function(a){return"function"==typeof a||!1});n.isFinite=function(a){return isFinite(a)&&!isNaN(parseFloat(a))};n.isNaN=function(a){return n.isNumber(a)&&a!==+a};n.isBoolean=function(a){return!0===a||!1===a||"[object Boolean]"===t.call(a)};n.isNull=function(a){return null===a};n.isUndefined=function(a){return void 0===a};n.has=function(a,b){return null!=
a&&C.call(a,b)};n.noConflict=function(){e._=c;return this};n.identity=function(a){return a};n.constant=function(a){return function(){return a}};n.noop=function(){};n.property=R;n.propertyOf=function(a){return null==a?function(){}:function(b){return a[b]}};n.matcher=n.matches=function(a){a=n.extendOwn({},a);return function(b){return n.isMatch(b,a)}};n.times=function(a,b,c){var d=Array(Math.max(0,a));b=I(b,c,1);for(c=0;c<a;c++)d[c]=b(c);return d};n.random=function(a,b){null==b&&(b=a,a=0);return a+Math.floor(Math.random()*
(b-a+1))};n.now=Date.now||function(){return(new Date).getTime()};v={"\x26":"\x26amp;","\x3c":"\x26lt;","\x3e":"\x26gt;",'"':"\x26quot;","'":"\x26#x27;","`":"\x26#x60;"};J=n.invert(v);R=function(a){var b=function(b){return a[b]},c="(?:"+n.keys(a).join("|")+")",d=RegExp(c),e=RegExp(c,"g");return function(a){a=null==a?"":""+a;return d.test(a)?a.replace(e,b):a}};n.escape=R(v);n.unescape=R(J);n.result=function(a,b,c){b=null==a?void 0:a[b];void 0===b&&(b=c);return n.isFunction(b)?b.call(a):b};var K=0;n.uniqueId=
function(a){var b=++K+"";return a?a+b:b};n.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var V=/(.)^/,ka={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},ra=/\\|'|\r|\n|\u2028|\u2029/g,Z=function(a){return"\\"+ka[a]};n.template=function(a,b,c){!b&&c&&(b=c);b=n.defaults({},b,n.templateSettings);c=RegExp([(b.escape||V).source,(b.interpolate||V).source,(b.evaluate||V).source].join("|")+"|$","g");var d=0,e="__p+\x3d'";a.replace(c,
function(b,c,l,f,k){e+=a.slice(d,k).replace(ra,Z);d=k+b.length;c?e+="'+\n((__t\x3d("+c+"))\x3d\x3dnull?'':_.escape(__t))+\n'":l?e+="'+\n((__t\x3d("+l+"))\x3d\x3dnull?'':__t)+\n'":f&&(e+="';\n"+f+"\n__p+\x3d'");return b});e+="';\n";b.variable||(e="with(obj||{}){\n"+e+"}\n");e="var __t,__p\x3d'',__j\x3dArray.prototype.join,print\x3dfunction(){__p+\x3d__j.call(arguments,'');};\n"+e+"return __p;\n";try{var l=new Function(b.variable||"obj","_",e)}catch(u){throw u.source=e,u;}c=function(a){return l.call(this,
a,n)};c.source="function("+(b.variable||"obj")+"){\n"+e+"}";return c};n.chain=function(a){a=n(a);a._chain=!0;return a};var P=function(a,b){return a._chain?n(b).chain():b};n.mixin=function(a){n.each(n.functions(a),function(b){var c=n[b]=a[b];n.prototype[b]=function(){var a=[this._wrapped];l.apply(a,arguments);return P(this,c.apply(n,a))}})};n.mixin(n);n.each("pop push reverse shift sort splice unshift".split(" "),function(a){var c=b[a];n.prototype[a]=function(){var b=this._wrapped;c.apply(b,arguments);
"shift"!==a&&"splice"!==a||0!==b.length||delete b[0];return P(this,b)}});n.each(["concat","join","slice"],function(a){var c=b[a];n.prototype[a]=function(){return P(this,c.apply(this._wrapped,arguments))}});n.prototype.value=function(){return this._wrapped};n.prototype.valueOf=n.prototype.toJSON=n.prototype.value;n.prototype.toString=function(){return""+this._wrapped};"function"===typeof define&&define.amd&&define("underscore",[],function(){return n})}).call(this);
(function(a){window.tmgJQ=a.noConflict();window.$=jQuery})(jQuery);
(function(a,f,k,m,e,c,b){function d(b,c){this.$globalNavContext=a(b);this.$links=this.$globalNavContext.find(".header-nav-global__link, .header-nav-global__drop-down-menu__link");this.$notLogged=this.$globalNavContext.find(".header-nav-global__not-logged");this.$loggedNotSub=this.$globalNavContext.find(".header-nav-global__logged-not-subscriber");this.$loggedAndSub=this.$globalNavContext.find(".header-nav-global__logged-and-subscriber");this.$dropDownWrapper=this.$globalNavContext.find(".js-has-dropdown \x3e .header-nav-global__link");
this.$embedWrapper=this.$globalNavContext.find(".js-has-embed");this.$embedContent=this.$embedWrapper.find(".header-nav-global__html-embed");this.$status="notLogged"}d.prototype={defaults:{},init:function(){this.buttonsBehaviour();this.getStatusString();return this.showStatusMenu()?this.$links.each(function(a,b){b.href=f.updateRedirectParam(b.href,e.location.href)}):!1},buttonsBehaviour:function(){var b,c;this.$embedWrapper.on("mouseenter",function(){var d=a(this);clearTimeout(c);b=setTimeout(function(){d.addClass("has-embed-visible")},
500)});this.$embedWrapper.on("click",function(){clearTimeout(b)});this.$embedWrapper.on("mouseleave",function(){var d=a(this);clearTimeout(b);c=setTimeout(function(){d.removeClass("has-embed-visible")},300)});this.$dropDownWrapper.on("click",function(b){b.preventDefault();a(this).closest(".header-nav-global__item").toggleClass("has-dropdown-open")})},getStatusString:function(){b.isLoggedIn()&&(b.isSubscriber()?this.$status="loggedAndSub":this.$status="loggedNotSub");return this.$status},showStatusMenu:function(){return"notLogged"==
this.$status?(this.$loggedNotSub.remove(),this.$loggedAndSub.remove(),this.$notLogged.show(),!0):"loggedNotSub"==this.$status?(this.$notLogged.remove(),this.$loggedAndSub.remove(),this.$loggedNotSub.show(),!0):"loggedAndSub"==this.$status?(this.$notLogged.remove(),this.$loggedNotSub.remove(),this.$loggedAndSub.show(),!0):!1}};f.pageReady(function(){a(".header-nav-global").each(function(){a.data(this,"GlobalNav")||a.data(this,"GlobalNav",(new d(this)).init())})})})(tmgJQ,tmg,Cookies,window,document,
tmg.page,tmg.user);
(function(a,f){function k(){this.stickyItem=f.querySelector(".is-sticky");if(null!==this.stickyItem){this.stickyItem.classList.remove("is-sticky");this.stickyItem.classList.add("is-sticky-fallback");this.stickyArticle=f.querySelector(".js-article");this.stickySidebar=f.querySelector(".js-sidebar");this.stickyHolding=f.createElement("div");this.stickyRect=this.stickyItem.getBoundingClientRect();this.stickyTop=this.stickyRect.top;this.stickyWidth=this.stickyRect.width;this.stickyHeight=this.stickyRect.height;
this.sidebarHeight=this.stickySidebar.offsetHeight;this.isActive=!1;if(this.isArticle=null!==this.stickyArticle)this.isSidebar=this.stickyItem.classList.contains("js-sidebar"),this.articleHeight=this.stickyArticle.offsetHeight,this.articleBottom=this.articleHeight-this.stickyHeight,this.contentHeight=f.querySelector(".js-article-inner").offsetHeight;(this.isArticle&&this.contentHeight>this.sidebarHeight||!this.isArticle)&&this.init()}}k.prototype.init=function(){this.placeHolder();this.scrollEvent()};
k.prototype.placeHolder=function(){this.stickyHolding.style.display="none";this.stickyHolding.style.width=this.stickyWidth+"px";this.stickyHolding.style.height=this.stickyHeight+"px";this.stickyItem.parentNode.insertBefore(this.stickyHolding,this.stickyItem)};k.prototype.scrollEvent=function(){var f=this;a.addEventListener("scroll",function(){this.pageYOffset>=f.stickyTop&&!f.isActive?(f.stickyItem.classList.add("is-sticky-fallback--active"),f.stickyHolding.style.display="block",f.isActive=!0):this.pageYOffset<
f.stickyTop&&f.isActive&&(f.stickyItem.classList.remove("is-sticky-fallback--active"),f.stickyHolding.style.display="none",f.isActive=!1);f.isArticle&&f.isSidebar&&f.isActive&&(this.pageYOffset>=f.articleBottom?f.stickyItem.classList.add("is-sticky-fallback--active-end"):this.pageYOffset<f.articleBottom&&f.stickyItem.classList.remove("is-sticky-fallback--active-end"))})};f.querySelector("html").classList.contains("no-csspositionsticky")&&new k})(window,document);
(function(a,f,k){var m=function(){this.init();return this};m.prototype={init:function(){this.$bodyTag=a("body.js-autorefresh");this.$isTabletMetaTag=a("meta[name\x3d'tmg.isTablet']");this.$isMobileMetaTag=a("meta[name\x3d'tmg.isMobile']");this.isTablet=this.$isTabletMetaTag.length?"true"===this.$isTabletMetaTag[0].content:!1;this.isMobile=this.$isMobileMetaTag.length?"true"===this.$isMobileMetaTag[0].content:!1;this.triggerTime=(this.triggerTime=this.$bodyTag.data("autorefresh-interval"))?1E3*this.triggerTime:
3E5;this.isMobile&&!this.isTablet||this.autoRefreshTrigger()},autoRefreshTrigger:function(){setTimeout(function(){var a=f.location.hash.match("#source\x3drefresh")?f.location.href:f.location.href+"#source\x3drefresh";f.cancelWindowAutoRefresh||(f.location.href=a,f.location.reload(!1))},this.triggerTime)}};var e=function(){a("body").hasClass("js-autorefresh")&&!a("body").data("js-autorefresh")&&a("body").data("js-autorefresh",new m)};a(k).ready(e);a(k).on("tmg:page-loaded",e)})(tmgJQ,window,document);
(function(a,f,k){var m=function(e,c){this.elem=e;this.$elem=a(e);this.defaults={overlayClass:"tmg-modal-overlay",overlayContentClass:"tmg-modal-overlay-content",backdropClass:"tmg-modal-backdrop",closeClass:"tmg-modal-close",content:"No Content",fadeSpeed:"slow",templateRegex:/\{\{(.*?)\}\}/g,templateHTML:'\x3cdiv class\x3d"{{backdropClass}}"\x3e\x3c/div\x3e\x3cdiv class\x3d"{{overlayClass}}"\x3e\x3cdiv class\x3d"{{overlayContentClass}}"\x3e{{content}}\x3c/div\x3e\x3cdiv class\x3d"{{closeClass}}"\x3e\x3c/div\x3e\x3c/div\x3e',
templateBeforeCallback:function(){},templateAfterCallback:function(){},closeOnEsc:!0,closeBeforeCallback:function(){},closeAfterCallback:function(){}};this.options=c;this.metadata=JSON.parse((this.$elem.data("modal-options")||"{'':''}").replace(/'/g,'"'));this.config=a.extend({},this.defaults,this.options,this.metadata)};m.prototype={open:function(){var e=this;e.destroy();e.config.templateBeforeCallback.call(e,arguments);var c=e.config.templateHTML.replace(e.config.templateRegex,function(a,c){return"function"===
typeof e.config[c]?e.config[c].call(e):e.config[c]||""});a("body").children(":first").before(c);e.config.templateAfterCallback.call(e,arguments);if(e.config.closeOnEsc)a(k).on("keyup",function(a){27===a.keyCode&&e.close()});a("."+e.config.closeClass).on("click",function(a){e.close()})},close:function(){var e=this;e.config.closeBeforeCallback.call(e,arguments);a("."+e.config.overlayClass+", ."+e.config.backdropClass).fadeOut(e.config.fadeSpeed,function(){0===a("."+e.config.overlayClass+":animated, ."+
e.config.backdropClass+":animated").length&&(e.destroy(),e.config.closeAfterCallback.call(e,arguments))})},destroy:function(){a("."+this.config.overlayClass+", ."+this.config.backdropClass).remove();a(k).off("keyup");a("."+this.config.closeClass+", ."+this.config.backdropClass).off("click")}};a.fn.modal=function(a,c){var b=this;return b.each(function(){(new m(b,c))[a]()})};f.Modal=m})(tmgJQ,window,document);
(function(a,f,k){var m=function(e){e=a(e.target).attr("class");(e=/.*social-share_(\w*)/i.exec(e))&&0<e.length&&"_satellite"in f&&(_satellite.setVar("shareprovider",e[1]),_satellite.track("share"))};a(k).ready(function(){a(k).on("click","[class*\x3d'social-share_']",m)})})(window.tmgJQ,window,document);
(window["tmg.build"]=window["tmg.build"]||[]).push([[5],{9:function(a,f,k){var m,e;k=[f,k(0),k(2)];void 0===(e="function"==typeof(m=function(a,b,d){Object.defineProperty(a,"__esModule",{value:!0});var c=b&&b.__esModule?b:{default:b},e={addAttributeToTurnOn:!1,addClassToTurnOn:!1,attributeName:"hidden",attributeValue:"",className:"",removeAttributeToTurnOn:!0,removeClassToTurnOn:!1,callbackFunction:!1},f={turnOn:function(a){var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:e,c=b.addAttributeToTurnOn,
d=b.addClassToTurnOn,l=b.className,f=b.attributeName,k=b.attributeValue,m=b.removeAttributeToTurnOn,p=b.removeClassToTurnOn;b=b.callbackFunction;Array.from(document.querySelectorAll(a)).forEach(function(a){""!==f&&(c&&a.setAttribute(f,k),m&&a.removeAttribute(f));""!==l&&(d&&a.classList.add(l),p&&a.classList.remove(l))});b&&"function"==typeof b&&b()},turnOff:function(a){var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:e,c=b.addAttributeToTurnOn,d=b.addClassToTurnOn,l=b.className,f=b.attributeName,
k=b.attributeValue,m=b.removeAttributeToTurnOn,p=b.removeClassToTurnOn;b=b.callbackFunction;Array.from(document.querySelectorAll(a)).forEach(function(a){""!==f&&(c&&a.removeAttribute(f),m&&a.setAttribute(f,k));""!==l&&(d&&a.classList.remove(l),p&&a.classList.add(l))});b&&"function"==typeof b&&b()}};(d&&d.__esModule?d:{default:d}).default.subscribe({topic:"tmg.page.ready",func:function(){c.default.create("tmg.feature");tmg.feature=f},runIfAlreadyPublished:!0});a.default=f})?m.apply(f,k):m)||(a.exports=
e)}},[[9,0,1]]]);
(window["tmg.build"]=window["tmg.build"]||[]).push([[6,4,10],{1:function(a,f,k){var m,e;k=[f,k(0),k(2)];void 0===(e="function"==typeof(m=function(a,b,d){Object.defineProperty(a,"__esModule",{value:!0});b=b&&b.__esModule?b:{default:b};var c=function(){return document.location};d=function(){var a={};return function(b){if(a[b])return a[b];var c=new Promise(function(a,c){c=document.getElementsByTagName("head")[0];var d=document.createElement("script");d.type="text/javascript";d.async=!0;d.src=b;d.addEventListener("load",
a,!1);c.appendChild(d)});return a[b]=c,c}}();d={getChannel:function(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"generic",b=document.querySelector('meta[name\x3d"tmgads.channel"]');return b&&b.content&&"/"!==c().pathname&&"portal"!==b.content&&(a=b.content),a},getContentType:function(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"generic",b=document.querySelector('meta[name\x3d"DCSext.Content_Type"]');return b&&b.content&&(a=b.content),a},getLocation:c,injectScript:d,
isArticle:function(){return document.body.classList.contains("articleRenderer2")}};b.default.create("tmg.page");tmg.page=d;a.default=d})?m.apply(f,k):m)||(a.exports=e)},15:function(a,f,k){var m,e;k=[f,k(4),k(0),k(1)];void 0===(e="function"==typeof(m=function(a,b,d,e){function c(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(a,"__esModule",{value:!0});var l=c(b);b=c(d);var f=c(e);b.default.create("tmg.firestore");var k={databaseURL:"https://tmg-platforms-prod.firebaseio.com",projectId:"tmg-platforms-prod-aa404"},
m=void 0,z=function(a){return a.replace(/\//g,"_")},w=function(){return new Promise(function(a,b){a()})};e=function(){return l.default.getEnvironment()!==l.default.getList().prod&&(k.databaseURL="https://tmg-platforms-preprod.firebaseio.com",k.projectId="tmg-platforms-preprod"),tmg.firestore=D,new Promise(function(a,b){(new Promise(function(a,b){b=f.default.injectScript("//www.gstatic.com/firebasejs/5.0.4/firebase-app.js");var c=f.default.injectScript("//www.gstatic.com/firebasejs/5.0.4/firebase-firestore.js");
Promise.all([b,c]).then(function(){a()})})).then(function(){firebase.initializeApp(k);(m=firebase.firestore()).settings({timestampsInSnapshots:!0});D={characterReplace:z,init:w,store:m};tmg.firestore=D;a()})})};var D={init:e};e();a.default=D})?m.apply(f,k):m)||(a.exports=e)},4:function(a,f,k){var m,e;k=[f,k(0),k(1)];void 0===(e="function"==typeof(m=function(a,b,d){function c(){return e.default.create("tmg.environment"),tmg.environment=w,k=m()}Object.defineProperty(a,"__esModule",{value:!0});var e=
b&&b.__esModule?b:{default:b},f=d&&d.__esModule?d:{default:d},k=void 0,m=function(){var a=x().prod,b=f.default.getLocation().hostname.split(".");a=b.some(function(a){return"local"===a||"127"===a||"localhost"===a});var c=b.some(function(a){return/(^|-)qa[0-9]+$/i.test(a)}),d=b.some(function(a){return/(^|-)ci[0-9]+$/i.test(a)}),e=b.some(function(a){return/-perf$/i.test(a)});b=b.some(function(a){return/(^|-)staging(.*)$/i.test(a)});switch(!0){case a:a=x().local;break;case c:a=x().qa;break;case d:a=x().ci;
break;case e:a=x().perf;break;case b:a=x().staging;break;default:a=x().prod}return a},x=function(){return{local:"local",qa:"qa",ci:"ci",perf:"perf",staging:"staging",prod:"prod"}},z=function(){return k===x().local},w={getEnvironment:function(){return k},getList:x,getTld:function(){return"telegraph.co.uk"},init:c,isCommentingTurnedOn:function(){var a=!1;try{void 0!==tmg.COMMENTING_STATUS&&(a=!!tmg.COMMENTING_STATUS)}catch(n){}return a},isAuthor:function(){return!!window.CQ},isHttps:function(){return"https:"===
f.default.getLocation().protocol||z()},isLocal:z};c();a.default=w})?m.apply(f,k):m)||(a.exports=e)}},[[15,0,1]]]);
(window["tmg.build"]=window["tmg.build"]||[]).push([[8,4,5,7,10,11,12,13],[,function(a,f,k){var m,e;k=[f,k(0),k(2)];void 0===(e="function"==typeof(m=function(a,b,d){Object.defineProperty(a,"__esModule",{value:!0});b=b&&b.__esModule?b:{default:b};var c=function(){return document.location};d=function(){var a={};return function(b){if(a[b])return a[b];var c=new Promise(function(a,c){c=document.getElementsByTagName("head")[0];var d=document.createElement("script");d.type="text/javascript";d.async=!0;d.src=
b;d.addEventListener("load",a,!1);c.appendChild(d)});return a[b]=c,c}}();d={getChannel:function(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"generic",b=document.querySelector('meta[name\x3d"tmgads.channel"]');return b&&b.content&&"/"!==c().pathname&&"portal"!==b.content&&(a=b.content),a},getContentType:function(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"generic",b=document.querySelector('meta[name\x3d"DCSext.Content_Type"]');return b&&b.content&&(a=b.content),
a},getLocation:c,injectScript:d,isArticle:function(){return document.body.classList.contains("articleRenderer2")}};b.default.create("tmg.page");tmg.page=d;a.default=d})?m.apply(f,k):m)||(a.exports=e)},,function(a,f,k){var m,e;k=[f,k(0)];void 0===(e="function"==typeof(m=function(a,b){Object.defineProperty(a,"__esModule",{value:!0});b=b&&b.__esModule?b:{default:b};var c={},e=function(a){var b={};return"string"==typeof a&&(b=f(a.replace(/'/g,'"'))),b},f=function(a,b){b=b||{};var c=a,d="",e=[],l=[],f=
/[{?,\s]\s*"([^"]|\\")+"\s*:(\s*"([^"]|\\")+"|(.+))\s*[},]/gi,m=/^\s*{?\s*'|'\s*}?\s*$/i;if(!a)return b;if("[object Object]"===Object.prototype.toString.call(a))return a;if(k(c)||((c.match(f)||[]).forEach(function(a){if(a.includes('"label"')){var b=a.replace(/^\s*[{\s]|[,}]\s*$/gi,"").split(":")[1].replace(/\s*"([^]+|\\")"\s*$/gi,"$1"),d=b.replace(/"/gi,'\\"');b=a.replace(b,d);c=c.replace(a,b)}}),d=c.replace(f,""),e=d.split(/,(?=(?:[^"]*"[^"]*")*[^"]*$)/)),e.forEach(function(a){a=a.replace(/^\s*{|}\s*$/gi,
"");k("{"+a+"}")||l.push(a)}),l.forEach(function(a){var b=!1,d=a;!0===m.test(a)&&(d=a.replace(/^\s*'([^']+|\\')':/,'"$1":').replace(/:\s*('')\s*$/,': ""').replace(/:\s*'([^']+|\\')'\s*$/,': "$1"'),b=k("{"+d+"}"));b||!0!==/[^"']\w+[^"']:/.test(d)||(d=d.replace(/^\s*(.*?):/,'"$1":'),b=k("{"+d+"}"));b&&(c=c.replace(a,d))}),k(c))b=k(c);else try{JSON.parse(c)}catch(y){console.log("tmg.json.tryParse failed:",y)}return b},k=function(a){var b=!1;try{b=JSON.parse(a)}catch(x){}return b};c={parseFromAem:e,tryParse:f,
simpleTryParse:k};b.default.create("tmg.json");tmg.json=c;a.default=c;tmg.parseAemJson=e})?m.apply(f,k):m)||(a.exports=e)},function(a,f,k){var m,e;k=[f,k(0),k(1)];void 0===(e="function"==typeof(m=function(a,b,d){function c(){return e.default.create("tmg.environment"),tmg.environment=w,k=m()}Object.defineProperty(a,"__esModule",{value:!0});var e=b&&b.__esModule?b:{default:b},f=d&&d.__esModule?d:{default:d},k=void 0,m=function(){var a=x().prod,b=f.default.getLocation().hostname.split(".");a=b.some(function(a){return"local"===
a||"127"===a||"localhost"===a});var c=b.some(function(a){return/(^|-)qa[0-9]+$/i.test(a)}),d=b.some(function(a){return/(^|-)ci[0-9]+$/i.test(a)}),e=b.some(function(a){return/-perf$/i.test(a)});b=b.some(function(a){return/(^|-)staging(.*)$/i.test(a)});switch(!0){case a:a=x().local;break;case c:a=x().qa;break;case d:a=x().ci;break;case e:a=x().perf;break;case b:a=x().staging;break;default:a=x().prod}return a},x=function(){return{local:"local",qa:"qa",ci:"ci",perf:"perf",staging:"staging",prod:"prod"}},
z=function(){return k===x().local},w={getEnvironment:function(){return k},getList:x,getTld:function(){return"telegraph.co.uk"},init:c,isCommentingTurnedOn:function(){var a=!1;try{void 0!==tmg.COMMENTING_STATUS&&(a=!!tmg.COMMENTING_STATUS)}catch(n){}return a},isAuthor:function(){return!!window.CQ},isHttps:function(){return"https:"===f.default.getLocation().protocol||z()},isLocal:z};c();a.default=w})?m.apply(f,k):m)||(a.exports=e)},function(a,f,k){var m,e;k=[f,k(7),k(4),k(3),k(0),k(6)];void 0===(e=
"function"==typeof(m=function(a,b,d,e,f,k){function c(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(a,"__esModule",{value:!0});var l=c(b),m=c(d),p=c(e);b=c(f);var t=c(k),D={pId:"",firstName:"",lastName:"",username:"",email:"",readerType:"",subscriber:"",subButton:""},n={livefyreToken:"livefyre-token",meterCount:"tmg_meter_count",personalisation:"tmg_p13n",publicId:"tmg_pid",registrationSuccess:"tmg_registration_success",rememberMe:"tmg_rem",session:"tmg_session",subscriptionConfirmation:"tmg_subscription_confirmation"},
I={},y=document.querySelector("html"),J=(m.default.getTld(),function(a,b){if(b||(m.default.getTld(),function(){var a=document.querySelectorAll('[class*\x3d"logged-in--"], [class*\x3d"is-subscriber--"]');(a=Array.prototype.slice.call(a)).forEach(function(a){J(a,!0)})})(),a)return a.className=a.className.replace(/\b(?:logged-in--|is-subscriber--).+\b/g,""),a.classList&&(a.classList.add("logged-in--"+R()),a.classList.add("is-subscriber--"+ca())),a.classList}),F=function(){var a=l.default.get(n.personalisation);
return p.default.tryParse(a,D)},R=function(){return!!l.default.get(n.session)},ca=function(){return"true"===I.subscriber||""===l.default.get(n.subscriptionConfirmation)},U=function(){return window.sessionStorage.removeItem("id_token"),window.sessionStorage.removeItem("access_token"),l.default.remove(n.session),L(),!0},L=function(){return I=F(),J(y),I};k={applyStatusCssClasses:J,clearAllData:function(){for(var a in U(),n)l.default.remove(n[a]);return t.default.remove("fyre-auth"),t.default.remove("fyre-authentication-creds"),
L(),!0},getLiveFyreToken:function(){return l.default.get(n.livefyreToken)||!1},getLiveFyreDetails:function(){var a=t.default.get("fyre-auth")||"{}";return p.default.tryParse(a)},getMeterCount:function(){return!1},getMyTelegraphToken:function(){var a=t.default.storage.read("tmg.user.mytelegraph.token");return"undefined"!==a&&null!==a||(a=!1),a},getProfile:F,getSessionId:function(){return l.default.get(n.session)||""},isLoggedIn:R,isRegistered:function(){return!!I.pId},isSubscriber:ca,login:function(){return L(),
!1},logout:U,setMyTelegraphToken:function(a){return t.default.storage.write("tmg.user.mytelegraph.token",a.token)},updateState:L};b.default.create("tmg.user");window.tmg.user=k;m.default.isLocal();I=L();a.default=k})?m.apply(f,k):m)||(a.exports=e)},function(a,f,k){var m,e;k=[f,k(10),k(0)];void 0===(e="function"==typeof(m=function(a,b,d){Object.defineProperty(a,"__esModule",{value:!0});b=b&&b.__esModule?b:{default:b};(d&&d.__esModule?d:{default:d}).default.create("tmg.store");tmg.store=b.default;a.default=
b.default})?m.apply(f,k):m)||(a.exports=e)},function(a,f,k){var m,e;k=[f];void 0===(e="function"==typeof(m=function(a){function b(){for(var a=0,b={};a<arguments.length;a++){var c=arguments[a],e;for(e in c)b[e]=c[e]}return b}Object.defineProperty(a,"__esModule",{value:!0});a.default=function l(a){function c(e,l,f){if(1<arguments.length){if("number"==typeof(f=b({path:"/"},c.defaults,f)).expires){var k=new Date;k.setMilliseconds(k.getMilliseconds()+864E5*f.expires);f.expires=k}try{var m=JSON.stringify(l);
/^[\{\[]/.test(m)&&(l=m)}catch(J){}return l=(l=encodeURIComponent(String(l))).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=(e=(e=encodeURIComponent(String(e))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape),document.cookie=[e,"\x3d",l,f.expires&&"; expires\x3d"+f.expires.toUTCString(),f.path&&"; path\x3d"+f.path,f.domain&&"; domain\x3d"+f.domain,f.secure?"; secure":""].join("")}e||(m={});k=document.cookie?document.cookie.split("; "):
[];for(var p=/(%[0-9A-Z]{2})+/g,n=0;n<k.length;n++){var t=k[n].split("\x3d"),v=t[0].replace(p,decodeURIComponent);t=t.slice(1).join("\x3d");'"'===t.charAt(0)&&(t=t.slice(1,-1));try{if(t=a&&a(t,v)||t.replace(p,decodeURIComponent),this.json)try{t=JSON.parse(t)}catch(J){}if(e===v){m=t;break}e||(m[v]=t)}catch(J){}}return m}return c.get=c.set=c,c.getJSON=function(){return c.apply({json:!0},[].slice.call(arguments))},c.defaults={},c.remove=function(a,e){c(a,"",b(e,{expires:-1}))},c.withConverter=l,c}()})?
m.apply(f,k):m)||(a.exports=e)},function(a,f,k){var m,e;k=[f,k(0),k(1)];void 0===(e="function"==typeof(m=function(a,b,d){Object.defineProperty(a,"__esModule",{value:!0});b=b&&b.__esModule?b:{default:b};var c=d&&d.__esModule?d:{default:d},e=new RegExp(/\?[^#]*|(?=#)|$/),f=function(){var a={};return function(b){return a[b]||(a[b]=new RegExp("([?\x26;]"+b+"(?\x3d[\x3d\x26;#]|$))\x3d?([^\x26;#]*)"))}}(),k=function(a,b){return(a=f(b).exec(a))&&decodeURIComponent(a[2])},m=function(a,b,d){var l=void 0,m=
void 0,p=void 0;return void 0===a&&(a=c.default.getLocation().search),null===k(a,b)?(l=b+"\x3d"+encodeURIComponent(d),m=e.exec(a)[0],p=a.replace(e,(m.length?m+"\x26":"?")+l)):p=a.replace(f(b),"$1\x3d"+encodeURIComponent(d)),p};d=function(a,b){if(null!==k(b,a)){var c=b.split("?")[0];b=(-1!==b.indexOf("?")?b.split("?")[1]:"").split("\x26");for(var d=b.length-1;0<=d;--d)b[d].split("\x3d")[0]===a&&b.splice(d,1);return c+(0<b.length?"?":"")+b.join("\x26")}return b};var x=function(a,b){return null!==k(a,
"redirectTo")?m(a,"redirectTo",b):a};b.default.create("tmg.GET_PARAM");tmg.getQuerystringParam=k;tmg.setQuerystringParam=m;tmg.removeQuerystringParam=d;tmg.updateRedirectParam=x;location.search.substr(1).split("\x26").forEach(function(a){a=a.split("\x3d");1<a.length?tmg.GET_PARAM[a[0]]=decodeURIComponent(a[1]):tmg.GET_PARAM[a[0]]=""});a.default={matchParam:f,matchQuerystring:e,getQuerystringParam:k,removeQuerystringParam:d,setQuerystringParam:m,updateRedirectParam:x}})?m.apply(f,k):m)||(a.exports=
e)},function(a,f,k){var m,e;k=[f,k(0),k(2)];void 0===(e="function"==typeof(m=function(a,b,d){Object.defineProperty(a,"__esModule",{value:!0});var c=b&&b.__esModule?b:{default:b},e={addAttributeToTurnOn:!1,addClassToTurnOn:!1,attributeName:"hidden",attributeValue:"",className:"",removeAttributeToTurnOn:!0,removeClassToTurnOn:!1,callbackFunction:!1},f={turnOn:function(a){var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:e,c=b.addAttributeToTurnOn,d=b.addClassToTurnOn,l=b.className,f=b.attributeName,
k=b.attributeValue,m=b.removeAttributeToTurnOn,p=b.removeClassToTurnOn;b=b.callbackFunction;Array.from(document.querySelectorAll(a)).forEach(function(a){""!==f&&(c&&a.setAttribute(f,k),m&&a.removeAttribute(f));""!==l&&(d&&a.classList.add(l),p&&a.classList.remove(l))});b&&"function"==typeof b&&b()},turnOff:function(a){var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:e,c=b.addAttributeToTurnOn,d=b.addClassToTurnOn,l=b.className,f=b.attributeName,k=b.attributeValue,m=b.removeAttributeToTurnOn,
p=b.removeClassToTurnOn;b=b.callbackFunction;Array.from(document.querySelectorAll(a)).forEach(function(a){""!==f&&(c&&a.removeAttribute(f),m&&a.setAttribute(f,k));""!==l&&(d&&a.classList.remove(l),p&&a.classList.add(l))});b&&"function"==typeof b&&b()}};(d&&d.__esModule?d:{default:d}).default.subscribe({topic:"tmg.page.ready",func:function(){c.default.create("tmg.feature");tmg.feature=f},runIfAlreadyPublished:!0});a.default=f})?m.apply(f,k):m)||(a.exports=e)},function(a,f,k){(function(k){var e,c,b;
!function(d,l){c=[a,f];void 0===(b="function"==typeof(e=l)?e.apply(f,c):e)||(a.exports=b)}(0,function(a,l){var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};!function(f){"object"==(void 0===l?"undefined":d(l))&&void 0!==a?a.exports=f():(c=[],void 0===(b="function"==typeof(e=f)?e.apply(l,c):e)||(a.exports=b))}(function(){return function C(a,b,
c){function d(l,f){if(!b[l]){if(!a[l]){if(e)return e(l,!0);f=Error("Cannot find module '"+l+"'");throw f.code="MODULE_NOT_FOUND",f;}f=b[l]={exports:{}};a[l][0].call(f.exports,function(b){return d(a[l][1][b]||b)},f,f.exports,C,a,b,c)}return b[l].exports}for(var e=!1,l=0;l<c.length;l++)d(c[l]);return d}({1:[function(a,b,c){c=a("../src/store-engine");a=[a("../storages/localStorage"),a("../storages/sessionStorage"),a("../storages/cookieStorage"),a("../storages/memoryStorage")];b.exports=c.createStore(a,
[])},{"../src/store-engine":2,"../storages/cookieStorage":4,"../storages/localStorage":5,"../storages/memoryStorage":6,"../storages/sessionStorage":7}],2:[function(a,b,c){function d(a,b,c){c||(c="");a&&!p(a)&&(a=[a]);b&&!p(b)&&(b=[b]);var d=c?"__storejs_"+c+"_":"",n=c?new RegExp("^"+d):null;if(!/^[a-zA-Z0-9_\-]*$/.test(c))throw Error("store.js namespaces can only have alphanumerics + underscores and dashes");var w=m({_namespacePrefix:d,_namespaceRegexp:n,_testStorage:function(a){try{a.write("__storejs__test__",
"__storejs__test__");var b="__storejs__test__"===a.read("__storejs__test__");return a.remove("__storejs__test__"),b}catch(K){return!1}},_assignPluginFnProp:function(a,b){var c=this[b];this[b]=function(){var b=e(arguments,0),d=this,l=[function(){if(c)return f(arguments,function(a,c){b[c]=a}),c.apply(d,b)}].concat(b);return a.apply(d,l)}},_serialize:function(a){return JSON.stringify(a)},_deserialize:function(a,b){if(!a)return b;var c="";try{c=JSON.parse(a)}catch(V){c=a}return void 0!==c?c:b},_addStorage:function(a){this.enabled||
this._testStorage(a)&&(this.storage=a,this.enabled=!0)},_addPlugin:function(a){var b=this;if(p(a))f(a,function(a){b._addPlugin(a)});else if(!l(this.plugins,function(b){return a===b})){if(this.plugins.push(a),!v(a))throw Error("Plugins must be function values that return objects");var c=a.call(this);if(!C(c))throw Error("Plugins must return an object of function properties");f(c,function(c,d){if(!v(c))throw Error("Bad plugin property: "+d+" from plugin "+a.name+". Plugins should only return functions.");
b._assignPluginFnProp(c,d)})}},addStorage:function(a){(function(){var a="undefined"==typeof console?null:console;a&&(a.warn?a.warn:a.log).apply(a,arguments)})("store.addStorage(storage) is deprecated. Use createStore([storages])");this._addStorage(a)}},x,{plugins:[]});return w.raw={},f(w,function(a,b){v(a)&&(w.raw[b]=k(w,a))}),f(a,function(a){w._addStorage(a)}),f(b,function(a){w._addPlugin(a)}),w}a=a("./util");var e=a.slice,l=a.pluck,f=a.each,k=a.bind,m=a.create,p=a.isList,v=a.isFunction,C=a.isObject;
b.exports={createStore:d};var x={version:"2.0.12",enabled:!1,get:function(a,b){a=this.storage.read(this._namespacePrefix+a);return this._deserialize(a,b)},set:function(a,b){return void 0===b?this.remove(a):(this.storage.write(this._namespacePrefix+a,this._serialize(b)),b)},remove:function(a){this.storage.remove(this._namespacePrefix+a)},each:function(a){var b=this;this.storage.each(function(c,d){a.call(b,b._deserialize(c),(d||"").replace(b._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},
hasNamespace:function(a){return this._namespacePrefix=="__storejs_"+a+"_"},createStore:function(){return d.apply(this,arguments)},addPlugin:function(a){this._addPlugin(a)},namespace:function(a){return d(this.storage,this.plugins,a)}}},{"./util":3}],3:[function(a,b,c){(function(a){function c(a,b){return Array.prototype.slice.call(a,b||0)}function d(a,b){e(a,function(a,c){return b(a,c),!1})}function e(a,b){if(l(a))for(var c=0;c<a.length;c++){if(b(a[c],c))return a[c]}else for(c in a)if(a.hasOwnProperty(c)&&
b(a[c],c))return a[c]}function l(a){return null!=a&&"function"!=typeof a&&"number"==typeof a.length}var f=Object.assign?Object.assign:function(a,b,c,e){for(var l=1;l<arguments.length;l++)d(Object(arguments[l]),function(b,c){a[c]=b});return a},k=function(){if(Object.create)return function(a,b,d,e){var l=c(arguments,1);return f.apply(this,[Object.create(a)].concat(l))};var a=function(){};return function(b,d,e,l){var k=c(arguments,1);return a.prototype=b,f.apply(this,[new a].concat(k))}}();b.exports=
{assign:f,create:k,trim:String.prototype.trim?function(a){return String.prototype.trim.call(a)}:function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},bind:function(a,b){return function(){return b.apply(a,Array.prototype.slice.call(arguments,0))}},slice:c,each:d,map:function(a,b){var c=l(a)?[]:{};return e(a,function(a,d){return c[d]=b(a,d),!1}),c},pluck:e,isList:l,isFunction:function(a){return a&&"[object Function]"==={}.toString.call(a)},isObject:function(a){return a&&"[object Object]"===
{}.toString.call(a)},Global:"undefined"!=typeof window?window:a}}).call(this,void 0!==k?k:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],4:[function(a,b,c){function d(a){for(var b=k.cookie.split(/; ?/g),c=b.length-1;0<=c;c--)if(f(b[c])){var d=b[c].split("\x3d"),e=unescape(d[0]);a(unescape(d[1]),e)}}function e(a){a&&l(a)&&(k.cookie=escape(a)+"\x3d; expires\x3dThu, 01 Jan 1970 00:00:00 GMT; path\x3d/")}function l(a){return(new RegExp("(?:^|;\\s*)"+escape(a).replace(/[\-\.\+\*]/g,
"\\$\x26")+"\\s*\\\x3d")).test(k.cookie)}a=a("../src/util");c=a.Global;var f=a.trim;b.exports={name:"cookieStorage",read:function(a){if(!a||!l(a))return null;a="(?:^|.*;\\s*)"+escape(a).replace(/[\-\.\+\*]/g,"\\$\x26")+"\\s*\\\x3d\\s*((?:[^;](?!;))*[^;]?).*";return unescape(k.cookie.replace(new RegExp(a),"$1"))},write:function(a,b){a&&(k.cookie=escape(a)+"\x3d"+escape(b)+"; expires\x3dTue, 19 Jan 2038 03:14:07 GMT; path\x3d/")},each:d,remove:e,clearAll:function(){d(function(a,b){e(b)})}};var k=c.document},
{"../src/util":3}],5:[function(a,b,c){function d(a){return e.localStorage.getItem(a)}var e=a("../src/util").Global;b.exports={name:"localStorage",read:d,write:function(a,b){return e.localStorage.setItem(a,b)},each:function(a){for(var b=e.localStorage.length-1;0<=b;b--){var c=e.localStorage.key(b);a(d(c),c)}},remove:function(a){return e.localStorage.removeItem(a)},clearAll:function(){return e.localStorage.clear()}}},{"../src/util":3}],6:[function(a,b,c){b.exports={name:"memoryStorage",read:function(a){return d[a]},
write:function(a,b){d[a]=b},each:function(a){for(var b in d)d.hasOwnProperty(b)&&a(d[b],b)},remove:function(a){delete d[a]},clearAll:function(a){d={}}};var d={}},{}],7:[function(a,b,c){function d(a){return e.sessionStorage.getItem(a)}var e=a("../src/util").Global;b.exports={name:"sessionStorage",read:d,write:function(a,b){return e.sessionStorage.setItem(a,b)},each:function(a){for(var b=e.sessionStorage.length-1;0<=b;b--){var c=e.sessionStorage.key(b);a(d(c),c)}},remove:function(a){return e.sessionStorage.removeItem(a)},
clearAll:function(){return e.sessionStorage.clear()}}},{"../src/util":3}]},{},[1])(1)})})}).call(this,k(11))},function(a,f,k){var m,e;k=[a];void 0===(e="function"==typeof(m=function(a){var b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};var c=function(){return this}();try{c=c||Function("return this")()||(0,eval)("this")}catch(l){"object"===("undefined"==
typeof window?"undefined":b(window))&&(c=window)}a.exports=c})?m.apply(f,k):m)||(a.exports=e)},function(a,f,k){var m,e;k=[f,k(5),k(3),k(4)];void 0===(e="function"==typeof(m=function(a,b,d,e){function c(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(a,"__esModule",{value:!0});var l=c(b),f=c(d),k=c(e),m=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1;d.configurable=!0;"value"in d&&(d.writable=!0);Object.defineProperty(a,d.key,d)}}return function(b,
c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),z={active:!1,api:{domain:"telegraph.co.uk",subDomain:{prod:"api-prod",preprod:"api-preprod"},ignoreEnvironment:!1,basePath:"/mytelegraph/",paths:{auth:"auth/web",feed:"feed/v0.3.0/user",preferences:{base:"preferences/v0.5.0/user",follow:"/follows",save:"/articles"}}}};b=function(){function a(){var b=0<arguments.length&&void 0!==arguments[0]?arguments[0]:z;if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");!0;this.settings=
b;this.endpoints=this._setEndpoints()}return m(a,[{key:"_setEndpoints",value:function(){var a=this.settings.api.paths,b=a.preferences,c=l.default.getProfile().pId,d=this._getApiBaseUri();return{pid:c,base:d,auth:""+d+a.auth+"?response_type\x3dtoken\x26client_id\x3dHyOLHxhzrHME0oTZIpZ9JlVWCZRrAIzq",follow:""+d+b.base+"/"+c+b.follow,save:""+d+b.base+"/"+c+b.save}}},{key:"_getApiBaseUri",value:function(){var a=this.settings.api;return a.ignoreEnvironment||k.default.getEnvironment()===k.default.getList().prod?
"https://"+a.subDomain.prod+"."+a.domain+a.basePath:"https://"+a.subDomain.preprod+"."+a.domain+a.basePath}},{key:"_authenticate",value:function(){var a=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{forceValidate:!1}).forceValidate,b={method:"POST",headers:{"X-TMG-session":l.default.getSessionId()}},c=l.default.getMyTelegraphToken();return c&&!a?Promise.resolve(c):window.fetch(this.endpoints.auth,b).then(this.xhrStatus).then(this.jsonify).then(function(a){return l.default.setMyTelegraphToken({token:a.access_token}),
a.access_token||{}},function(a){return a})}},{key:"callEndpoint",value:function(a){var b=this,c=a.url,d=a.method,e=a.body;return new Promise(function(a,l){b._authenticate().then(function(f){f={headers:{authorization:"Bearer "+f}};return d&&e&&(f.method=d,f.body=JSON.stringify(e)),window.fetch(c,f).then(b.xhrStatus).then(b.jsonify).then(function(b){a(b)}).catch(function(a){l(a)})})})}},{key:"xhrStatus",value:function(a){return 200<=a.status&&300>a.status?Promise.resolve(a):401!==a.status?Promise.reject(Error(a.statusText)):
void 0}},{key:"jsonify",value:function(a){return a.text().then(function(a){return a?f.default.tryParse(a):{}})}}]),a}();a.default=b})?m.apply(f,k):m)||(a.exports=e)},function(a,f,k){var m,e;k=[f,k(14),k(8),k(1)];void 0===(e="function"==typeof(m=function(a,b,d,e){function c(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(a,"__esModule",{value:!0});var l=c(b),f=c(d),k=c(e),m={save:!1,follow:!1},z=function(a){var b=a.product;b=void 0===b?"mytelegraph":b;var c=a.featureName;c=void 0===c?
"":c;var d=a.url;a="";d=f.default.setQuerystringParam(void 0===d?"/secure/register/":d,"redirectTo",k.default.getLocation().href);var e=window.TMG_COMPONENT_TRACKING;return c&&e&&e.isDtmEnabled()&&(a=e.createIcid({product:b,contentLocation:c}),d=f.default.setQuerystringParam(d,"ICID",a)),""+d};a.default=function(a,b,c){var d={wrapperStyle:!1,content:"This feature is available for registered users. Please register or log in to continue",positionY:"bottom",positionX:"left",buttons:[{label:"Register",
url:z({featureName:c,url:"/secure/register/"})},{label:"Log in",url:z({featureName:c,url:"/secure/login/"}),alternate:!0}]};return(a=document.querySelector(a))?(b=Object.assign({},d,b),new l.default(a,b)):m[c]}})?m.apply(f,k):m)||(a.exports=e)},function(a,f,k){var m,e;k=[f];void 0===(e="function"==typeof(m=function(a){Object.defineProperty(a,"__esModule",{value:!0});var b=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1;d.configurable=!0;"value"in d&&
(d.writable=!0);Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();tmg.createNamespace("tmg.Tooltip");var c=function(){function a(b,c){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");!0;this.tooltipMainClass="js-tooltip-main";this.tooltipCloseClass="js-tooltip-close";this.tooltipArrowClass="js-tooltip-arrow";this.tooltipShowClass="overlay-tooltip--is-visible";this.tooltipOffset=5;this.target=b;this.settings=c;this.buildTooltip()}
return b(a,[{key:"buildTooltip",value:function(){this.createWrapper();this.createMarkup();this.bindEvents()}},{key:"createWrapper",value:function(){var a=document.createElement("div");a.className="overlay-tooltip__wrapper";this.settings.wrapperStyle&&a.setAttribute("style",this.settings.wrapperStyle);a.style.position="relative";a.style.overflow="visible";this.wrapElement(this.target,a);this.tooltipWrapper=this.target.parentNode}},{key:"createMarkup",value:function(){var a=(this.settings||!1).buttons,
b=document.createElement("div");b.className="overlay-tooltip overlay-tooltip--"+this.settings.positionY+"-"+this.settings.positionX+" "+this.tooltipMainClass;var c='\x3cbutton class\x3d"overlay-tooltip__close '+this.tooltipCloseClass+'"\x3e\x3c/button\x3e\n\t\t\t\t\t\t\x3cspan class\x3d"overlay-tooltip__arrow '+this.tooltipArrowClass+'"\x3e\x3c/span\x3e\n\t\t\t\t\t\t\x3cdiv class\x3d"overlay-tooltip__content"\x3e'+this.settings.content+"\x3c/div\x3e";a&&(c+='\x3cdiv class\x3d"overlay-tooltip__btn-wrapper"\x3e',
a.forEach(function(a){c+='\x3ca href\x3d"'+a.url+'" class\x3d"overlay-tooltip__button '+(a.alternate?"overlay-tooltip__button--alternate":"")+'"\x3e'+a.label+"\x3c/a\x3e"}),c+="\x3c/div\x3e");b.innerHTML=c;this.tooltipWrapper.append(b);this.tooltip=this.tooltipWrapper.querySelector("."+this.tooltipMainClass);this.closeTooltip=this.tooltipWrapper.querySelector("."+this.tooltipCloseClass);this.arrowTooltip=this.tooltipWrapper.querySelector("."+this.tooltipArrowClass);this.arrowWidth=parseInt(window.getComputedStyle(this.arrowTooltip).getPropertyValue("border-bottom-width"),
10);this.setTooltipPosition();this.setTooltipArrow()}},{key:"getTooltipPosition",value:function(a){for(var b=0,c=0,d=a;a;)b+=a.offsetLeft-a.scrollLeft+a.clientLeft,a=a.offsetParent;return c=window.innerWidth-(b+d.offsetWidth),{l:b,r:c}}},{key:"setTooltipPosition",value:function(){var a=this.target.offsetHeight+this.arrowWidth+this.tooltipOffset+"px";"top"===this.settings.positionY&&(this.tooltip.style.bottom=a);"bottom"===this.settings.positionY&&(this.tooltip.style.top=a)}},{key:"repositioningTooltip",
value:function(){var a=this.getTooltipPosition(this.tooltip);0>a.l&&"right"===this.settings.positionX&&(this.tooltip.style.right=parseInt(window.getComputedStyle(this.tooltip).getPropertyValue("right"),10)+a.l+"px",this.arrowTooltip.style.right=parseInt(window.getComputedStyle(this.arrowTooltip).getPropertyValue("right"),10)-a.l+"px");0>a.r&&"left"===this.settings.positionX&&(this.tooltip.style.left=parseInt(window.getComputedStyle(this.tooltip).getPropertyValue("left"),10)+a.r+"px",this.arrowTooltip.style.left=
parseInt(window.getComputedStyle(this.arrowTooltip).getPropertyValue("left"),10)-a.r+"px")}},{key:"resetPositioningTooltip",value:function(){this.tooltip.style.right="";this.tooltip.style.left="";this.setTooltipArrow()}},{key:"setTooltipArrow",value:function(){var a=this.target.offsetWidth/2;"left"===this.settings.positionX&&(this.arrowTooltip.style.left=a-this.arrowWidth+"px");"right"===this.settings.positionX&&(this.arrowTooltip.style.right=a-this.arrowWidth/2+"px")}},{key:"wrapElement",value:function(a,
b){a.parentNode.insertBefore(b,a);b.appendChild(a)}},{key:"bindEvents",value:function(){var a=this;this.closeTooltip.addEventListener("click",function(){a.hideTooltip()});["orientationchange","resize"].forEach(function(b){window.addEventListener(b,function(){a.resetPositioningTooltip();a.repositioningTooltip()})})}},{key:"revealTooltip",value:function(){this.tooltip.classList.add(this.tooltipShowClass);this.repositioningTooltip()}},{key:"hideTooltip",value:function(){this.tooltip.classList.remove(this.tooltipShowClass);
this.resetPositioningTooltip()}}]),a}();tmg.tooltip=c;a.default=c})?m.apply(f,k):m)||(a.exports=e)},,function(a,f,k){var m,e;k=[f,k(17),k(18),k(19),k(0),k(21),k(2),k(22),k(23),k(20)];void 0===(e="function"==typeof(m=function(a,b,d,e,f,k,m,v,x,z){function c(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(a,"__esModule",{value:!0});var l=c(b),p=c(d),t=c(e);b=c(f);var C=c(k);k=c(m);var J=c(v),F=c(x),R=c(z);b.default.create("tmg.mytelegraph");var ca={active:!1};v=function L(){(0<arguments.length&&
void 0!==arguments[0]?arguments[0]:ca).active?(tmg.mytelegraph={turnOnFollow:function(){return(new t.default(new p.default,new l.default,new R.default)).turnOn().build()},turnOnSave:function(){return(new J.default(new F.default,new l.default,new R.default)).turnOn().build()}},(new C.default(new p.default)).hasNewContent()):tmg.mytelegraph={init:L}};k.default.subscribe({topic:"tmg.page.ready",func:v,runIfAlreadyPublished:!0});a.default={init:v}})?m.apply(f,k):m)||(a.exports=e)},function(a,f,k){var m,
e;k=[f,k(9)];void 0===(e="function"==typeof(m=function(a,b){Object.defineProperty(a,"__esModule",{value:!0});var c=b&&b.__esModule?b:{default:b},e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1;d.configurable=!0;"value"in d&&(d.writable=!0);Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();b=function(){function a(){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");!0}return e(a,
[{key:"show",value:function(a){c.default.turnOn(a)}},{key:"hide",value:function(a){c.default.turnOff(a)}}]),a}();a.default=b})?m.apply(f,k):m)||(a.exports=e)},function(a,f,k){var m,e;k=[f,k(12)];void 0===(e="function"==typeof(m=function(a,b){function c(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(a,"__esModule",{value:!0});b=b&&b.__esModule?b:{default:b};var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=
b[c];d.enumerable=d.enumerable||!1;d.configurable=!0;"value"in d&&(d.writable=!0);Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();b=function(a){function b(){if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");var a=(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!a||"object"!=typeof a&&"function"!=typeof a?
this:a}return function(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}(b,a),e(b,[{key:"getFollows",value:function(){var a=this;return new Promise(function(b){a.callEndpoint({url:a.endpoints.follow,method:"GET"}).then(function(a){var c=a.authors.map(function(a){return a.id});
a=a.topics.map(function(a){return a.id});b({authors:c,topics:a})})})}},{key:"follow",value:function(a){a=c({},a.type,[{id:a.id,name:a.label}]);return this.callEndpoint({url:this.endpoints.follow,method:"PUT",body:a})}},{key:"unfollow",value:function(a){a=c({},a.type,[a.id]);return this.callEndpoint({url:this.endpoints.follow,method:"DELETE",body:a})}}]),b}(b.default);a.default=b})?m.apply(f,k):m)||(a.exports=e)},function(a,f,k){var m,e;k=[f,k(3),k(5),k(9),k(13)];void 0===(e="function"==typeof(m=function(a,
b,d,e,f){function c(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(a,"__esModule",{value:!0});var l=c(b),k=c(d),m=c(e),p=c(f),w=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1;d.configurable=!0;"value"in d&&(d.writable=!0);Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),D={selectors:{followError:".error--follow",followList:"[data-js\x3d'follow-list']",followTag:"[data-js\x3d'follow-tag']",
followText:"[data-js\x3d'follow-text']",followButton:"[data-js\x3d'follow-button']",followButtonText:"[data-js\x3d'follow-button-text']"},classes:{activeButton:"follow-button--selected",selectedTag:"follow-list__link--selected"},analyticsEvents:{topics:{type:"topic",follow:"followTopic",unfollow:"unfollowTopic"},authors:{type:"author",follow:"followAuthor",unfollow:"unfollowAuthor"}}},n={followTags:"",followButtonText:"",followButtonJSON:""};b=function(){function a(b,c,d){var e=3<arguments.length&&
void 0!==arguments[3]?arguments[3]:n,l=4<arguments.length&&void 0!==arguments[4]?arguments[4]:D;if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");!0;this.elements=e;this.errorView=c;this.followHandler=b;this.settings=l;this.tooltip=(0,p.default)(l.selectors.followButton,{wrapperStyle:"order: -1"},"follow");this.analytics=d}return w(a,[{key:"build",value:function(){var a=this;return this.cacheArticleElements(),this.bindEvents(),this.getFollows().then(function(){a.loadTags()})}},
{key:"cacheArticleElements",value:function(){var a=this.settings.selectors,b=this.elements;b.followTags=Array.from(document.querySelectorAll(a.followTag));b.followButton=document.querySelector(a.followButton);b.followButtonText=document.querySelector(a.followButtonText);b.followButtonText&&(b.followButtonJSON=l.default.tryParse(b.followButtonText.dataset.options))}},{key:"getFollows",value:function(){var a=this;return this.followHandler.getFollows().then(function(b){a.currentFollows=b})}},{key:"loadTags",
value:function(){var a=this.currentFollows,b=this.elements,c=this.settings,d=a.authors.concat(a.topics);b.followTags.forEach(function(a){var b=l.default.tryParse(a.dataset.options).id;d.includes(b)&&a.classList.add(c.classes.selectedTag)})}},{key:"turnOn",value:function(){return m.default.turnOn(this.settings.selectors.followButton,{removeAttributeToTurnOn:!0,attributeName:"hidden"}),this}},{key:"turnOff",value:function(){m.default.turnOff(this.settings.selectors.followButton)}},{key:"toggleList",
value:function(a){var b=this.settings,c=b.selectors;b=b.classes;var d=this.elements.followButtonJSON.text;a.classList.contains(b.activeButton)?(c.followText=d.follow,m.default.turnOff(c.followList)):(c.followText=d.close,m.default.turnOn(c.followList));a.classList.toggle(b.activeButton)}},{key:"isFollowing",value:function(a){return a.classList.contains(this.settings.classes.selectedTag)}},{key:"updateTag",value:function(a){var b=this,c=this.followHandler,d=this.errorView,e=this.analytics,f=this.settings,
k=f.selectors;f=f.analyticsEvents;var m=l.default.tryParse(a.dataset.options),p={event:[]};return p[f[m.type].type]=m.id,this.isFollowing(a)?(p.event.push(f[m.type].unfollow),c.unfollow(m).then(function(){b.toggleTag(a);e.recordEvent(p);d.hide(k.followError)},function(){d.show(k.followError)})):(p.event.push(f[m.type].follow),c.follow(m).then(function(){b.toggleTag(a);e.recordEvent(p);d.hide(k.followError)},function(){d.show(k.followError)}))}},{key:"toggleTag",value:function(a){a.classList.toggle(this.settings.classes.selectedTag)}},
{key:"bindEvents",value:function(){var a=this.elements,b=a.followButton;a=a.followTags;b&&this._bindButtonEvents(b);a&&this._bindTagEvents(a)}},{key:"_bindButtonEvents",value:function(a){var b=this;a&&a.addEventListener("click",function(){k.default.isLoggedIn()?b.toggleList(a):b.tooltip.revealTooltip()})}},{key:"_bindTagEvents",value:function(a){var b=this;a.forEach(function(a){a.addEventListener("click",function(c){c.preventDefault();k.default.isLoggedIn()?b.updateTag(a):b.tooltip.revealTooltip()})})}}]),
a}();a.default=b})?m.apply(f,k):m)||(a.exports=e)},function(a,f,k){var m,e;k=[f];void 0===(e="function"==typeof(m=function(a){Object.defineProperty(a,"__esModule",{value:!0});var b=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1;d.configurable=!0;"value"in d&&(d.writable=!0);Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),c={trackingData:{event:[],author:"",topic:""}},e=function(){function a(){var b=
(0<arguments.length&&void 0!==arguments[0]?arguments[0]:c).trackingData;if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");!0;this.trackingData=b}return b(a,[{key:"_cleanupTrackingEventData",value:function(){Object.keys(this.trackingData).forEach(function(a){delete window.dataLayer[a]})}},{key:"recordEvent",value:function(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.trackingData;1>a.event.length||(this._cleanupTrackingEventData(),Object.assign(window.dataLayer,
a))}}]),a}();a.default=e})?m.apply(f,k):m)||(a.exports=e)},function(a,f,k){var m,e;k=[f,k(12)];void 0===(e="function"==typeof(m=function(a,b){function c(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(a,"__esModule",{value:!0});b=b&&b.__esModule?b:{default:b};var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1;d.configurable=!0;"value"in d&&(d.writable=!0);Object.defineProperty(a,
d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f={selectors:{notification:"[data-js\x3d'notification']"},classes:{notification:"notification--new"}};b=function(a){function b(a){var c=1<arguments.length&&void 0!==arguments[1]?arguments[1]:f;if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");!0;var d=(b.__proto__||Object.getPrototypeOf(b)).call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
d=!d||"object"!=typeof d&&"function"!=typeof d?this:d;return d.followHandler=a,d.settings=c,d}return function(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}(b,a),e(b,[{key:"hasNewContent",value:function(){var a=this;tmg.firestore.init().then(function(){var b=
tmg.firestore,d=b.store,e=b.characterReplace,l=d.collection("lastChecked").doc(a.endpoints.pid).get(),f=d.collection("authors"),k=d.collection("topics");a.followHandler.getFollows().then(function(b){var d=b.topics,m=Promise.all(b.authors.map(function(a){a=e(a);return f.doc(a).get()})),p=Promise.all(d.map(function(a){a=e(a);return k.doc(a).get()}));l.then(function(b){b.exists&&Promise.all([m,p]).then(function(a){var b;a=(b=[]).concat.apply(b,c(a)).filter(function(a){return a.exists}).map(function(a){return a.data().dateTime});
return Math.max.apply(Math,c(a))}).then(function(c){c>=b.data().lastChecked&&(c=document.querySelector(a.settings.selectors.notification))&&c.classList.add(a.settings.classes.notification)})})})})}}]),b}(b.default);a.default=b})?m.apply(f,k):m)||(a.exports=e)},function(a,f,k){var m,e;k=[f,k(3),k(9),k(13),k(5)];void 0===(e="function"==typeof(m=function(a,b,d,e,f){function c(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(a,"__esModule",{value:!0});var l=c(b),k=c(d),m=c(e),p=c(f),w=function(){function a(a,
b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1;d.configurable=!0;"value"in d&&(d.writable=!0);Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),D={selectors:{saveArticle:"[data-save-article]",saveArticleText:"[data-js\x3d'save-article-text']",saveError:".error--save-article"},classes:{savedArticle:"save-article--saved"},analyticsEvents:{save:"articleSave",unsave:"articleRemove"}},n={save:"",saveArticleText:""};b=function(){function a(b,
c,d){var e=3<arguments.length&&void 0!==arguments[3]?arguments[3]:n,l=4<arguments.length&&void 0!==arguments[4]?arguments[4]:D;if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");!0;this.elements=e;this.errorView=c;this.settings=l;this.saveHandler=b;this.tooltip=(0,m.default)(this.settings.selectors.saveArticle,{positionX:"right"},"save");this.analytics=d}return w(a,[{key:"build",value:function(){var a=this,b=this.getArticleSaveInfo().id;return this.saveHandler.checkArticleSavedState({id:b}).then(function(b){a.cacheArticleElements();
b&&a.updateArticleSaveState({saved:!0});a.bindEvents()})}},{key:"cacheArticleElements",value:function(){var a=this.settings.selectors,b=this.elements;b.save=document.querySelector(a.saveArticle);b.saveArticleText=document.querySelector(a.saveArticleText)}},{key:"getArticleSaveInfo",value:function(){var a=this.settings.selectors.saveArticle;return this.articleSaveInfo||(this.articleSaveInfo=this._parseDataAttributeOptions(a)),this.articleSaveInfo}},{key:"updateArticleSaveState",value:function(a){a=
a.saved;a=void 0!==a&&a;var b=this.settings.classes,c=this.getArticleSaveInfo().text,d=this.elements;a?(d.save.classList.add(b.savedArticle),d.saveArticleText.textContent=c.saved):(d.save.classList.remove(b.savedArticle),d.saveArticleText.textContent=c.save)}},{key:"_parseDataAttributeOptions",value:function(a){var b=this.settings,c=a.replace(/[\[\]]/gi,"");a=document.querySelector(a);var d=void 0;a.getAttribute&&(c=a.getAttribute(c),d=l.default.tryParse(c,b.save));return d}},{key:"bindEvents",value:function(){var a=
this,b=this.settings,c=b.selectors,d=b.classes,e=b.analyticsEvents,l=this.saveHandler,f=this.tooltip,k=this.errorView,m=this.analytics,n=this.getArticleSaveInfo().id,t=document.querySelector(c.saveArticle);t&&t.addEventListener("click",function(){if(p.default.isLoggedIn())return t.classList.contains(d.savedArticle)?l.unsaveArticle({id:n}).then(function(b){m.recordEvent({event:[e.unsave]});a.updateArticleSaveState({saved:!1})},function(a){k.show(c.saveError)}):l.saveArticle({id:n}).then(function(){m.recordEvent({event:[e.save]});
a.updateArticleSaveState({saved:!0})},function(a){k.show(c.saveError)});l.storeArticle(n);f.revealTooltip()})}},{key:"turnOn",value:function(){return k.default.turnOn(this.settings.selectors.saveArticle),this}},{key:"turnOff",value:function(){k.default.turnOff(this.settings.selectors.saveArticle)}}]),a}();a.default=b})?m.apply(f,k):m)||(a.exports=e)},function(a,f,k){var m,e;k=[f,k(3),k(12),k(6)];void 0===(e="function"==typeof(m=function(a,b,d,e){function c(a){return a&&a.__esModule?a:{default:a}}
Object.defineProperty(a,"__esModule",{value:!0});var l=c(b);b=c(d);var f=c(e),k=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1;d.configurable=!0;"value"in d&&(d.writable=!0);Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();e=function(a){function b(){if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");var a=(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return!a||"object"!=typeof a&&"function"!=typeof a?this:a}return function(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}(b,a),k(b,[{key:"storeArticle",value:function(a){var b=this._getStoredArticles();b&&!b.includes(a)&&b.push(a);return f.default.storage.write("saveArticle",
JSON.stringify({articles:b}))}},{key:"updateStoredArticle",value:function(a){var b=this._getStoredArticles();b.includes(a)&&this.saveArticle({id:a});b={articles:b.filter(function(b){return b!==a})};return f.default.storage.write("saveArticle",JSON.stringify(b))}},{key:"_getStoredArticles",value:function(){var a=f.default.storage.read("saveArticle");return a?l.default.tryParse(a).articles:[]}},{key:"saveArticle",value:function(a){return this.callEndpoint({url:this.endpoints.save,body:[a.id],method:"PUT"})}},
{key:"unsaveArticle",value:function(a){return this.callEndpoint({url:this.endpoints.save,body:[a.id],method:"DELETE"})}},{key:"checkArticleSavedState",value:function(a){var b=a.id;if(b)return this._getSavedArticles().then(function(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];return!("function"!=typeof a.includes||!a.includes(b))})}},{key:"_getSavedArticles",value:function(){return this.callEndpoint({url:this.endpoints.save,method:"GET"}).then(function(){return 0<arguments.length&&
void 0!==arguments[0]?arguments[0]:[]},function(a){return a})}}]),b}(b.default);a.default=e})?m.apply(f,k):m)||(a.exports=e)}],[[16,0,1]]]);
window.HTMLTemplateElement&&function(a,f,k){function m(a,b){l&&clearTimeout(l);l=setTimeout(a,b)}var e=a(".lazy-html__wrapper").parent(".component"),c=a(k),b=a(f),d=b.height(),l,p=0;a.fn.componentLazyLoad=function(){var l=0,f=c.scrollTop()+b.height()+d,m=c.scrollTop()-d,x=this.length;for(l;l<x;l++){var z=this.eq(l);var w=z.offset().top<f&&z.offset().top>m;var D=!z.data("active");w&&D&&(w=z,D=w.find(".lazy-html__wrapper").html(),w.html(D),p+=1,w.data("active",!0),a(k).trigger("tmg:lazy-loaded-html"),
p>=e.length&&c.off("scroll.html-embed-tracking"))}};c.on("scroll.html-embed-tracking",function(){m(function(){e.componentLazyLoad()},200)});e.componentLazyLoad()}(tmgJQ,window,document);(function(a,f){a(f).on("tmg:video-autoplay-on",function(){a(f).data("video-autoplay-on",!0)});a(f).on("tmg:video-autoplay-off",function(){a(f).data("video-autoplay-on",!1)})})(tmgJQ,document);
(function(a,f,k){var m=a(k),e=a("body"),c=a(".adblocker-message"),b=function(b,c){this.elem=b;this.$elem=a(b)};b.prototype.init=function(){this.checkCookies();this.ignoreAdBlockerMessage()};b.prototype.checkCookies=function(){var a=Cookies.get("tmg_session"),b=Cookies.get("tmg_subs");if(void 0!==a&&void 0!==b)return!0;this.detectAds()};b.prototype.detectAds=function(){var a=this,b=k.createElement("div");b.style.position="absolute";b.style.left="0";b.style.top="0";b.style.height="10px";b.style.zIndex=
"-1";b.innerHTML="\x26nbsp;";b.setAttribute("class","pub_300x250 pub_300x250m pub_728x90 text-ad textAd text_ad text_ads text-ads text-ad-links advert");f.requestAnimationFrame(function(){k.body.appendChild(b);f.requestAnimationFrame(function(){"none"===f.getComputedStyle(b).getPropertyValue("display")&&"closed"!==sessionStorage.getItem("message")&&a.displayMessage()})})};b.prototype.displayMessage=function(){c.addClass("message-active");e.css("overflow","hidden");"undefined"!==typeof _satellite&&
_satellite.track("TMG AdBlock Message")};b.prototype.removeMessage=function(){c.remove();e.css("overflow","visible")};b.prototype.closeMessageForSession=function(){sessionStorage.setItem("message","closed")};b.prototype.ignoreAdBlockerMessage=function(){var b=this;e.on("click",".adblocker-message .close",function(){b.removeMessage();b.closeMessageForSession()});e.on("keyup",function(b){27===b.keyCode&&a(".adblocker-message .close").trigger("click")})};a.fn.detectAdBlocker=function(c){return this.each(function(){if(a.data(this,
"detectAdBlocker"))return a.data(this,"detectAdBlocker");a.data(this,"detectAdBlocker",(new b(this,c)).init())})};var d=function(){var b=tmg.getMediaQuery();("lg"===b||"xl"===b)&&0<a(".advert").length&&0<a(".adblocker-message").length&&m.detectAdBlocker()};m.ready(d);m.on("tmg:page-loaded",d)})(tmgJQ,window,document);
(function(a,f,k){var m=function(e,c){this.elem=e;this.$elem=a(e);this.speed=this.$elem.attr("data-box--cycle-speed")||5E3;this.domElements={$container:this.$elem.find(" \x3e .component-content"),$slides:this.$elem.find(".section"),$controls:this.$elem.find(".box__controls")}};m.prototype={init:function(){var a=this;tmg.timer&&1<this.domElements.$slides.length?(this.buildControls(),this.setHeight(),this.transition(this.domElements.$slides.first()),this.domElements.$container.on("mouseover",function(){a.timeout.stop()}),
this.domElements.$container.on("mouseleave",function(){a.timeout.resume()})):this.setHeight()},buildControls:function(){for(var e=this,c=0;c<this.domElements.$slides.length;c++)0===c?e.domElements.$controls.append('\x3cli class\x3d"active"\x3e'+c+"\x3c/li\x3e"):e.domElements.$controls.append("\x3cli\x3e"+c+"\x3c/li\x3e");e.domElements.$slides.addClass("slide");e.domElements.$controls.find("li").on("click",function(){e.timeout.stop();e.domElements.$controls.find("li").removeClass("active");a(this).addClass("active");
e.transition(e.domElements.$slides.eq(a(this).index()),e.$elem.find(".section:visible"))})},thisHeight:function(){return a(this).outerHeight()},setHeight:function(){var a=this;this.domElements.$container.height(function(){return Math.max.apply(Math,a.domElements.$slides.map(a.thisHeight))})},transition:function(a,c){var b=this;c?c.fadeOut(500,function(){b.next(a,c)}):this.next(a)},next:function(a){var c=this;var b=a.is(":last-of-type")?c.domElements.$slides.first():a.next();a.fadeIn(500,function(){c.timeout=
new tmg.timer(function(){c.domElements.$controls.find("li").eq(b.index()).trigger("click")},c.speed)})}};a.fn.boxCycle=function(e){return this.each(function(){if(a.data(this,"boxCycle"))return a.data(this,"boxCycle");a.data(this,"boxCycle",(new m(this,e)).init())})};f.boxCycle=m;f=function(){a(".js-tmg-box-cycle").boxCycle()};a(k).ready(f);a(k).on("tmg:page-loaded",f)})(tmgJQ,window,document);
(function(){window.googletag=window.googletag||{};window.googletag.cmd=window.googletag.cmd||[];googletag.cmd.push(function(){if(!(googletag.hasOwnProperty("on")||googletag.hasOwnProperty("off")||googletag.hasOwnProperty("trigger")||googletag.hasOwnProperty("events"))){var a=googletag.debug_log.log,f=[],k=function(a,e,c){f.push({name:a,id:e,match:c})};k("gpt-google_js_loaded",8,/Google service JS loaded/ig);k("gpt-gpt_fetch",46,/Fetching GPT implementation/ig);k("gpt-gpt_fetched",48,/GPT implementation fetched\./ig);
k("gpt-page_load_complete",1,/Page load complete/ig);k("gpt-queue_start",31,/^Invoked queued function/ig);k("gpt-service_add_slot",40,/Associated ([\w]*) service with slot ([\/\w]*)/ig);k("gpt-service_add_targeting",88,/Setting targeting attribute ([\w]*) with value ([\w\W]*) for service ([\w]*)/ig);k("gpt-service_collapse_containers_enable",78,/Enabling collapsing of containers when there is no ad content/ig);k("gpt-service_create",35,/Created service: ([\w]*)/ig);k("gpt-service_single_request_mode_enable",
63,/Using single request mode to fetch ads/ig);k("gpt-slot_create",2,/Created slot: ([\/\w]*)/ig);k("gpt-slot_add_targeting",17,/Setting targeting attribute ([\w]*) with value ([\w\W]*) for slot ([\/\w]*)/ig);k("gpt-slot_fill",50,/Calling fillslot/ig);k("gpt-slot_fetch",3,/Fetching ad for slot ([\/\w]*)/ig);k("gpt-slot_receiving",4,/Receiving ad for slot ([\/\w]*)/ig);k("gpt-slot_render_delay",53,/Delaying rendering of ad slot ([\/\w]*) pending loading of the GPT implementation/ig);k("gpt-slot_rendering",
5,/^Rendering ad for slot ([\/\w]*)/ig);k("gpt-slot_rendered",6,/Completed rendering ad for slot ([\/\w]*)/ig);googletag.events=googletag.events||{};googletag.on=function(a,e,c){if(!e)return this;a=a.split(" ");var b=c||e;b.data=c?e:void 0;for(c=a[e=0];e<a.length;c=a[++e])(this.events[c]=this.events[c]||[]).push(b);return this};googletag.off=function(a,e){a=a.split(" ");var c=0,b="",d=0,l=function(){};for(b=a[c];c<a.length;b=a[++c])if(this.events.hasOwnProperty(b))if(e){d=this.events[b].length-1;
for(l=this.events[b][d];0<=d;l=this.events[b][--d])l==e&&this.events[b].splice(d,1);0===this.events[b].length&&delete this.events[b]}else delete this.events[b];return this};googletag.trigger=function(a,e){if(!this.events[a]||0===this.events[a].length)return this;e=e||[];var c=0,b=this.events[a][c];c;for(b;c<this.events[a].length&&!1!==b.apply(this,[{data:b.data}].concat(e));b=this.events[a][++c]);return this};googletag.debug_log.log=function(k,e,c,b,d){if(e&&e.getMessageId&&"number"==typeof e.getMessageId()){var l=
Array.prototype.slice.call(arguments),m=0;for(m;m<f.length;m++)f[m].id===e.getMessageId()&&googletag.trigger(f[m].name,l)}return a.apply(this,arguments)}}})})();
(function(a,f,k){var m=function(c,b){this.options=b;this.elem=c;this.$elem=a(c);this.dataOptions=this.$elem.data("options");this.dataOptions="string"===typeof this.dataOptions?this.dataOptions?a.parseJSON(this.dataOptions.replace(/'/g,'"')):{}:this.dataOptions?this.dataOptions:{};this.options=a.extend({},this.defaults,this.dataOptions,this.options);this.domElements={}};m.prototype={defaults:{videoURL:f.location.protocol+"//"+f.location.host+"/bin/telegraph/video/?area\x3d%AREA%\x26playlist\x3d%PLAYLIST%\x26path\x3d"+
f.location.pathname.replace(".html","").replace("/content/telegraph","")},init:function(){if(!f.tmg||!f.tmg.GET_PARAM||!f.tmg.GET_PARAM.playlist)return this;if(!this.options.contentArea)return console.log("No contentArea set",this.elem),this;this.completeVideoURL();this.loadContent();return this},completeVideoURL:function(){this.options.videoURL=this.options.videoURL.replace("%PLAYLIST%",f.tmg.GET_PARAM.playlist);this.options.videoURL=this.options.videoURL.replace("%AREA%",this.options.contentArea)},
loadContent:function(){var c=this;a.get(c.options.videoURL,function(b){c.$elem.html(c.prepareDataToAppend(b));c.options.components&&a.each(c.options.components,function(a,b){c.console({"func:":a,params:b});if("function"===typeof c[a])c[a](b)})})},prepareDataToAppend:function(a){"list"===this.options.contentArea&&(a=a.replace(/(version-)(\d+)/g,"version-5"));return a},console:function(a){function b(b){return a.apply(this,arguments)}b.toString=function(){return a.toString()};return b}(function(a){"1"===
this.options.debug&&console.log(a)})};a.fn.telegraph_dynamicVideoContentLoader=function(c){return this.each(function(){a(this).data("telegraph_dynamicVideoContentLoader")&&a(this).removeData("telegraph_dynamicVideoContentLoader");a(this).data("telegraph_dynamicVideoContentLoader",(new m(this,c)).init())})};a.fn.telegraph_dynamicVideoContentLoader_init=function(){a(".js-dynamic-video-content-loader").telegraph_dynamicVideoContentLoader()};var e=function(){a(".js-dynamic-video-content-loader").telegraph_dynamicVideoContentLoader_init()};
a(k).ready(e);a(k).on("tmg:page-loaded",e)})(tmgJQ,window,document);
(function(a,f,k){var m=function(e,c){this.elem=e;this.$elem=a(e);this.domElements={$item:this.$elem.find(".dropdown__item"),$default:this.$elem.find(".dropdown__item-default")}};m.prototype={init:function(){var e=this;this.domElements.$default.on("click",function(){e.domElements.$item.toggleClass("active");a(this).toggleClass("active")})}};a.fn.dropDown=function(e){return this.each(function(){if(a.data(this,"dropDown"))return a.data(this,"dropDown");a.data(this,"dropDown",(new m(this,e)).init())})};
f.dropDown=m;f=function(){a(".js-dropdown").dropDown()};a(k).ready(f);a(k).on("tmg:page-loaded",f)})(tmgJQ,window,document);
(function(a,f,k){var m=function(e,c){this.options=c;this.elem=e;this.$elem=a(e);this.dataOptions=this.$elem.data("options")?a.parseJSON(this.$elem.data("options").replace(/'/g,'"')):{}};m.prototype={defaults:{},init:function(){this.options=a.extend({},this.defaults,this.dataOptions,this.options);this.detectYoutube();this.initEvents();return this},initEvents:function(){var e=a.proxy(this.detectYoutube,this);a(k).on("tmg:html-embed-loaded",e)},detectYoutube:function(){var e=this;a(e.$elem).find("iframe").each(function(a,
b){0<b.src.indexOf("youtube.com")&&e.$elem.addClass("has-youtube-iframe")})}};a.fn.telegraph_HTMLEmbed=function(e){return this.each(function(){a.data(this,"telegraph_HTMLEmbed")||a.data(this,"telegraph_HTMLEmbed",(new m(this,e)).init())})};a.fn.telegraph_HTMLEmbed_init=function(){a(".html-embed").telegraph_HTMLEmbed()};f=function(){a(".html-embed").telegraph_HTMLEmbed()};a(k).ready(f);a(k).on("tmg:page-loaded",f)})(tmgJQ,window,document);
(function(a,f,k,m){function e(b,c){this.gallery=b;this.$gallery=a(b);this.options=c;this.config={};this.slides=null;this.thumbs=[];this.index=0;this.view=1;this.init()}function c(){a(".gallery.component").telegraph_image_gallery([])}e.prototype={defaults:{componentContentSelector:".component-content",settingsContainerSelector:".gallery-settings",galleryContentSelector:".gallery__image-view .gallery__content",onwardSlideSelector:".gallery__onward-slide-holder",galleryElements:".gallery__elements",
thumbailsTPL:".template-Thumbail",imageTPL:".template-Image",imageViewSelector:".gallery__image-view",galleryItemSelector:".gallery__item",galleryImageSelector:".gallery__image",arrowRightSelector:".gallery__navigation .gallery__arrow-right",arrowLeftSelector:".gallery__navigation .gallery__arrow-left",paginationSelector:".gallery__pagination",paginationCurrentSelector:".gallery__pagination-current",paginationNumberSelector:".gallery__pagination-number",viewAllButtonSelector:".gallery__view-all",
skipAdSelector:".gallery__skip-ad",thumbnailViewSelector:".gallery__thumbnail-view",thumbnailItemsSelector:".gallery__thumbnail-item",thumbnailListSelector:".gallery__thumbnail-items-list",thumbnailLinksSelector:".gallery__thumbnail-link",backToImageSelector:".gallery__back-to-image",canonicalMetaTagSelector:"link[rel\x3dcanonical]",VIEWS:{THUMBNAIL:0,IMAGE:1},allowArrowKeys:!0,useTitleAttributes:!0},init:function(){this.config=a.extend({},this.defaults,this.options);this.currentItem=this.gallery.querySelector(this.config.galleryItemSelector);
this.onwardSlide=this.gallery.querySelector(this.config.onwardSlideSelector);this.slideTemplate=this.createImageSlide(this.currentItem,{});var b=this.currentItem.querySelector(this.config.galleryImageSelector);this.adjustImageWidth(b);this.setIndex(parseInt(this.currentItem.getAttribute("data-slide-index"),10));this.initData();this.thumbTemplate=this.gallery.querySelector(this.config.thumbailsTPL).innerHTML.trim();this.thumbnailList=this.gallery.querySelector(this.config.thumbnailListSelector);this.$componentContent=
this.$gallery.children(this.config.componentContentSelector);this.$settingsContainer=this.$gallery.find(this.config.settingsContainerSelector);this.$imageView=this.$gallery.find(this.config.imageViewSelector);this.$arrowRight=this.$gallery.find(this.config.arrowRightSelector);this.$arrowLeft=this.$gallery.find(this.config.arrowLeftSelector);this.$pagination=this.$gallery.find(this.config.paginationSelector);this.$paginationCurrent=this.$gallery.find(this.config.paginationCurrentSelector);this.$paginationNumber=
this.$gallery.find(this.config.paginationNumberSelector);this.$viewAllButton=this.$gallery.find(this.config.viewAllButtonSelector);this.$skipAd=this.$gallery.find(this.config.skipAdSelector);this.$thumbnailView=this.$gallery.find(this.config.thumbnailViewSelector);this.$backToImage=this.$gallery.find(this.config.backToImageSelector);this.galleryContent=this.gallery.querySelector(this.config.galleryContentSelector);this.$canonicalMetaTag=a(this.config.canonicalMetaTagSelector);this.initSlides();this.initNavigation();
this.initUrl();this.initPagination();this.initSkippingAd();this.createAdvertMpu()},setIndex:function(a){this.lastIndex=this.index;this.index=a},initData:function(){function b(a,b){return a.replace(/[^$?\s]+(.*)/,b+"$1")}var c=this.currentItem,e=c.querySelector(this.config.galleryImageSelector+" \x3e img"),f=this.gallery.querySelector(this.config.galleryElements).innerText;this.data=JSON.parse(f.replace(/\n/g,"")).map(function(c){var d=c["image-src"],e=b(this.src,d),l=this.srcset.split(",").map(function(a){return b(a,
d)}).join(","),f=b(this.thumbSrc,d),k=this.thumbSrcset.split(",").map(function(a){return b(a,d)}).join(",");return a.extend({},c,{"image-src":e,"image-srcset":l,"thumb-src":f,"thumb-srcset":k})},{src:e.getAttribute("src"),srcset:e.getAttribute("srcset"),thumbSrc:c.getAttribute("data-thumb-src"),thumbSrcset:c.getAttribute("data-thumb-srcset")})},initSlides:function(){this.slides=Array(this.data.length);this.slides[this.index]=this.currentItem;this.preloadSlides(this.index);this.onwardSlide&&(this.slides[this.data.length]=
this.onwardSlide.firstElementChild)},preloadSlides:function(a){0<a&&this.getSlide(a-1);a<this.slides.length-1&&this.getSlide(a+1)},getSlide:function(a){this.slides[a]||(this.slides[a]=this.createImageSlide(this.slideTemplate,this.data[a]));return this.slides[a]},createImageSlide:function(a){var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},c=a.cloneNode(!0);c.setAttribute("data-url",b["slide-url"]||"");c.setAttribute("data-title",b["image-title"]||"");c.setAttribute("data-slide-index",
b["slide-index"]||"");var d=c.querySelector(this.config.galleryImageSelector);d.setAttribute("data-image-ratio",b["image-ratio"]||"");d=d.querySelector("img");d.setAttribute("src",b["image-src"]||"");d.setAttribute("srcset",b["image-srcset"]||"");d.setAttribute("alt",b["image-alt"]||"");c.querySelector(".gallery__subtitle \x3e strong").innerHTML=b["image-subtitle"]||"";c.querySelector(".gallery__caption").innerHTML=b["image-caption"]||"";c.querySelector(".gallery__credits-credit").innerHTML=b["image-credits"]||
"";return c},initThumbs:function(){var a=k.createDocumentFragment();this.thumbs=this.data.map(this.createThumb,this);this.thumbs.forEach(function(b){return a.appendChild(b)});this.thumbnailList.appendChild(a)},createThumb:function(a,b){var c=k.createElement("div");c.innerHTML=this.parseTemplate(a,this.thumbTemplate);c.firstChild.addEventListener("click",this.handleThumbClick(b).bind(this));return c.firstChild},handleThumbClick:function(a){return function(b){b.preventDefault();this.mpu.showNewAdvert({disableMobile:!0});
this.handleSlides({index:a,backFromThumbnailView:!0});this.showImageView()}},initPagination:function(){this.$paginationNumber.html(this.slides.length);this.updatePagination(this.index)},updatePagination:function(a){this.$paginationCurrent.html(a+1)},parseTemplate:function(b,c){var d=c;a.each(b,function(a,b){d=d.replace(RegExp("@{"+a+"}","g"),b)});return d},createAdvertMpu:function(){var c=this.$settingsContainer.data("gallery-ad-viewability"),e=this.$settingsContainer.data("gallery-slides-per-ad"),
f=null;if(0<a("#advert_tmg_mpu").length&&"undefined"!==typeof tmgAdsBuildAd)try{f=tmgAdsBuildAd("advert_tmg_mpu","","")}catch(t){console.log(t)}this.mpu=new b({adViewability:c,slidesPerAd:e,advert:f})},initNavigation:function(){this.initSwitchingViews();this.initNavigationArrows();this.initKeyEvents();this.initSwipingSlides()},initKeyEvents:function(){var b=this;if(b.config.allowArrowKeys)a(k).on("keyup",function(c){c=c.keyCode;39===c?b.view===b.config.VIEWS.IMAGE?a(".gallery__arrow-right").trigger("click").focus():
b.view===b.config.VIEWS.THUMBNAIL&&a(".gallery__thumbnail-link:focus").closest(".gallery__thumbnail-item").next().find("a").focus():37===c&&(b.view===b.config.VIEWS.IMAGE?a(".gallery__arrow-left").trigger("click").focus():b.view===b.config.VIEWS.THUMBNAIL&&a(".gallery__thumbnail-link:focus").closest(".gallery__thumbnail-item").prev().find("a").focus())})},initUrl:function(){var a=this;f.addEventListener("popstate",function(b){b&&b.state&&(0===a.view&&a.showImageView(),a.handleSlides({index:b.state.index,
sameUrl:!0}))});this.updateUrl(this.index)},updateUrl:function(a){if(this.data[a]&&f.history&&f.history.pushState&&!f.jasmine){var b=this.data[a]["slide-url"]||"";k.title=this.data[a]["image-title"]||"";f.history.pushState({index:a},"slide "+(a+1),b);this.$canonicalMetaTag.attr("href",b)}},initSwitchingViews:function(){var a=this;this.$backToImage.on("click",function(b){b.preventDefault();a.mpu.showNewAdvert({disableMobile:!0});a.showImageView()});this.$viewAllButton.on("click",function(b){b.preventDefault();
a.mpu.showNewAdvert({disableMobile:!0});a.showThumbnailView()})},addAttribute:function(a,b){for(var c in b)if("title"!==c||this.config.useTitleAttributes)a.attr(c)||a.attr(c,b[c])},initNavigationArrows:function(){var b=this;0===this.index&&this.$arrowLeft.addClass("disabled").attr("tabindex","-1");this.index>=this.slides.length-1&&this.$arrowRight.addClass("disabled").attr("tabindex","-1");this.addAttribute(this.$arrowLeft,{title:this.$arrowLeft.find(".sr-only").text(),href:"#"});this.addAttribute(this.$arrowRight,
{title:this.$arrowRight.find(".sr-only").text()});this.addAttribute(this.$viewAllButton,{title:this.$viewAllButton.text(),href:"#"});this.addAttribute(this.$backToImage,{title:this.$backToImage.text(),href:"#"});this.addAttribute(this.$skipAd,{title:this.$skipAd.text(),href:"#"});this.$arrowLeft.click(function(c){c.preventDefault();a(this).hasClass("disabled")||b.handleSlides({index:b.index-1})});this.$arrowRight.click(function(c){c.preventDefault();a(this).hasClass("disabled")||b.handleSlides({index:b.index+
1})})},initSwipingSlides:function(){var a=this;m(this.galleryContent).on("swipeleft",function(){a.$arrowRight.hasClass("disabled")||a.handleSlides({index:a.index+1})});m(this.galleryContent).on("swiperight",function(){a.$arrowLeft.hasClass("disabled")||a.handleSlides({index:a.index-1})})},initSkippingAd:function(){var a=this;this.$skipAd.on("click",function(b){b.preventDefault();a.handleSlides({index:a.index+("forward"===a.lastDirection?1:-1)});"forward"===a.lastDirection?a.$arrowRight.focus():a.$arrowLeft.focus()})},
handleSlides:function(b){var c=b.sameUrl||b.backFromThumbnailView;this.direction=0<this.lastIndex-b.index?"previous":"forward";var d=this.compactAdvertVisible&&this.direction!==this.lastDirection;this.$arrowLeft.removeClass("disabled").attr("tabindex","0");this.$arrowRight.removeClass("disabled").attr("tabindex","0");if(c)this.hideImage(this.index),this.showImage(b),this.handleLimits();else switch(this.mpu.showNewAdvert()){case 2:this.hideImage(this.index);this.$viewAllButton.hide();this.$pagination.hide();
this.$skipAd.show();this.compactAdvertVisible=!0;a(k).trigger("slideChanged");break;case 1:this.showImage(b);this.handleLimits();break;default:this.compactAdvertVisible=!1,d?this.showImage({index:this.index}):this.showImage(b),this.$viewAllButton.show(),this.$pagination.show(),this.$skipAd.hide(),this.handleLimits()}this.lastIndex=this.index;this.lastDirection=this.direction;return!0},handleLimits:function(){0===this.index&&this.$arrowLeft.addClass("disabled").attr("tabindex","-1");this.index>=this.slides.length-
1&&this.$arrowRight.addClass("disabled").attr("tabindex","-1")},hideImage:function(a){this.slides[a].classList.remove("active")},showImageView:function(){this.view=this.config.VIEWS.IMAGE;this.$componentContent.removeClass("gallery__thumbnail-view-active");this.$thumbnailView.attr("aria-hidden","true");this.$imageView.attr("aria-hidden","false");this.$viewAllButton.focus()},showThumbnailView:function(){var a=this;this.view=this.config.VIEWS.THUMBNAIL;this.thumbs.length||this.initThumbs();this.$componentContent.addClass("gallery__thumbnail-view-active");
this.$imageView.attr("aria-hidden","true");this.$thumbnailView.attr("aria-hidden","false");this.thumbs.forEach(function(b,c){c===a.index?(b.classList.add("active"),b.querySelector("a").focus()):b.classList.remove("active")})},isOnwardSlide:function(a){return this.onwardSlide&&a===this.slides.length-1},showImage:function(b){var c=b.index;if(!(0>c||c>this.slides.length-1)){for(;this.galleryContent.firstChild;)this.galleryContent.removeChild(this.galleryContent.firstChild);this.galleryContent.appendChild(this.getSlide(c));
this.currentItem=this.getSlide(c);this.currentItem.classList.add("active");this.setIndex(c);this.preloadSlides(c);this.updatePagination(c);if(!this.isOnwardSlide(c)){var d=this.currentItem.querySelector(this.config.galleryImageSelector);this.adjustImageWidth(d);b.sameUrl||(this.updateUrl(c),a(k).trigger("slideChanged"))}}},adjustImageWidth:function(a){function b(b){b.style.width||(750<b.getBoundingClientRect().height?b.style.width=750*parseFloat(a.dataset.imageRatio)+"px":b.style.width="100%")}var c=
a.querySelector("img");c.complete?b(c):c.onload=function(){return b(c)}}};var b=function(a){this.config={};this.advert=a.advert;this.settings={adViewability:a.adViewability||5E3,slidesPerAd:a.slidesPerAd||5};this.init()};b.prototype={defaults:{component:".gallery__advert-mpu .advert",container:".gallery__advert-mpu",advert:".gallery__advert-mpu .ad"},init:function(){this.config=a.extend({},this.defaults);this.$container=a(this.config.container);this.$component=a(this.config.component);this.$advert=
a(this.config.advert);this.lastTime=new Date;this.countClicks=1;this.compactMode=!1;null!=this.advert&&this.advert.display()},isExpanded:function(){return!this.compactMode&&this.$container.is(":visible")},displayAd:function(){null!=this.advert&&this.advert.refresh();this.lastTime=new Date},removeAd:function(){this.$advert.empty()},showNewAdvert:function(a){if(this.isExpanded()){if(new Date-this.lastTime>this.settings.adViewability)return this.compactMode=!1,this.displayAd(),1}else{if(a&&a.disableMobile)return!1;
if(this.countClicks>this.settings.slidesPerAd-1)return this.compactMode=!0,this.displayAd(),this.countClicks=0,this.$container.show(),2;this.compactMode=!1;this.$container.attr("style","");this.removeAd();this.countClicks++}return!1}};a.fn.telegraph_image_gallery=function(b){return this.each(function(){a.data(this,"telegraph_image_gallery")||(b.push(new e(this)),a.data(this,"telegraph_image_gallery",b[b.length-1]))})};a(k).ready(c);a(k).on("tmg:page-loaded",c)})(tmgJQ,window,document,Hammer);
(function(a,f){a.galleries=[];var k=void 0,m=function(a){this.container=a};m.prototype={selectors:{mainImageList:"grid-gallery__main-image-list",thumbnailsContainer:"grid-gallery__thumbnails-container",currentImageLabel:"grid-gallery-current",totalImagesLabel:"grid-gallery-total",galleryFooter:"grid-gallery-footer",thumbnailLink:"grid-gallery__thumbnail",prevLink:"grid-gallery__nav--prev",nextLink:"grid-gallery__nav--next"},galleryTrigger:"gallery-trigger",currentImageIndex:0,prevCurrentIndex:-1,
canSlide:!0,init:function(){this.findDomElements();this.maxImageIndex=this.thumbnails.length-1;this.applyInitialStyles();this.attachEvents();return this},findDomElements:function(){var a=this;Object.keys(this.selectors).map(function(c,b){a[c]=a.container.querySelectorAll("[data-js\x3d"+a.selectors[c]+"]")[0]});this.thumbnails=this.thumbnailsContainer.getElementsByTagName("li");this.mainImages=this.mainImageList.getElementsByTagName("li");this.galleryTrigger=f.querySelectorAll("[data-js\x3d"+this.galleryTrigger+
"]")[0]||!1},applyInitialStyles:function(){this.updateCurrentImage();this.updateCurrentThumbnail();this.updateCurrentImageLabel();this.updateTotalImagesLabel();this.galleryFooter.style.opacity=1},attachEvents:function(){var a=this;this.thumbnailsContainer&&([].forEach.call(this.thumbnails,function(c){c.addEventListener("click",a.onThumbnailClick.bind(a),!1)}),this.prevLink&&this.prevLink.addEventListener("click",this.onNavClick.bind(this),!1),this.nextLink&&this.nextLink.addEventListener("click",
this.onNavClick.bind(this),!1),this.galleryTrigger&&this.galleryTrigger.addEventListener("click",this.onGalleryTriggerClick.bind(this),!1))},setCurrentIndex:function(a){if(!this.canSlide)return!1;this.delayNextSlide();a?a<=this.maxImageIndex&&(this.currentImageIndex=a):this.currentImageIndex=0;this.updateCurrentThumbnail();this.updateCurrentImage();this.updateCurrentImageLabel();this.updateTotalImagesLabel()},updateCurrentThumbnail:function(){var a=this,c=this.thumbnailsContainer.getElementsByClassName("is-active");
0<c.length&&(this.prevCurrentIndex=parseInt(c[0].getAttribute("data-thumbnail-id"),10),c[0].classList.remove("is-active"));[].forEach.call(this.thumbnails,function(b,c){c!==a.currentImageIndex||b.classList.contains("is-active")||b.classList.add("is-active")})},delayNextSlide:function(){var e=this;this.canSlide=!1;a.setTimeout(function(){e.canSlide=!0},500)},updateCurrentImage:function(){var a=this;[].forEach.call(this.mainImages,function(c,b){b===a.currentImageIndex?(c.style.zIndex=10,c.style.opacity=
1):b===a.prevCurrentIndex?(c.style.zIndex=5,c.style.opacity=1):(c.style.zIndex=1,c.style.opacity=0);c.style.marginLeft=b<a.currentImageIndex?"-100%":b>a.currentImageIndex?"100%":0})},updateCurrentImageLabel:function(){this.currentImageLabel.innerHTML=this.currentImageIndex+1},updateTotalImagesLabel:function(){this.totalImagesLabel.innerHTML=this.maxImageIndex+1},getGalleryPosition:function(){for(var a=this.container,c=a.offsetTop;a.offsetParent&&a.offsetParent!=f.body;)a=a.offsetParent,c+=a.offsetTop;
return c},onThumbnailClick:function(a){a=parseInt(a.currentTarget.getAttribute("data-thumbnail-id"),10);this.setCurrentIndex(a)},onGalleryTriggerClick:function(e){e.preventDefault();e=this.getGalleryPosition();a.scroll(0,e)},onNavClick:function(a){a.preventDefault();a=parseInt(a.currentTarget.getAttribute("data-delta"),10)||0;1===a&&this.currentImageIndex>=this.maxImageIndex?this.setCurrentIndex(0):-1===a&&0>=this.currentImageIndex?this.setCurrentIndex(this.maxImageIndex):this.setCurrentIndex(this.currentImageIndex+
a)}};k=function(){var e=f.querySelectorAll('[data-js\x3d"grid-gallery"]');[].forEach.call(e,function(c,b){a.galleries[b]||(a.galleries[b]=(new m(c)).init())})};tmg.pageReady(k);f.addEventListener("tmg:page-loaded",k())})(window,document);
(function(a,f,k){function m(){tmg.components||(tmg.components={});tmg.components.ListOfTags={};tmg.components.ListOfTags.init=function(){a(".list-of-tags").each(function(){a.data(this,"ListOfTags")||a.data(this,"ListOfTags",new e(this))});return this};tmg.components.ListOfTags.init()}var e=function(c,b){this.$context=a(c);this.$context.hasClass("initialized")||this.init(b)};e.prototype={defaults:{selectorShowMore:".list-of-tags__show-more",selectorItem:".list-of-tags__item",selectorSettings:".js-settings"},
init:function(c){this.findDomElements();this.limit=c&&c.limit||this.getLimit()||this.$items.length;this.limit<this.$items.length&&this.$showMore.attr("aria-hidden","false");this.hideItemsAboveLimit();a(this.$showMore).on("click",a.proxy(this.handleShowMore,this));this.$context.addClass("initialized")},findDomElements:function(){this.$settings=this.$context.find(this.defaults.selectorSettings);this.$showMore=this.$context.find(this.defaults.selectorShowMore);this.$items=this.$context.find(this.defaults.selectorItem)},
getLimit:function(){return this.$settings.data("limit")},handleShowMore:function(a){a.preventDefault();this.$items.attr("aria-hidden","false");this.$showMore.attr("aria-hidden","true")},hideItemsAboveLimit:function(){this.$items.slice(this.limit).attr("aria-hidden","true")}};a(k).ready(m);a(k).on("tmg:page-loaded",m)})(tmgJQ,window,document);
(function(a,f,k){var m=null,e=function(c,b){this.options=b;this.elem=c;this.$elem=a(c);this.eventOn=this.$elem.data("on");this.eventOff=this.$elem.data("off");this.dataOptions=(this.dataOptions=this.$elem.data("options"))?a.parseJSON(this.dataOptions.replace(/'/g,'"')):{};this.$botton=this.$elem.find(".tmg-toggler__bar-button");m=this};e.prototype={defaults:{},init:function(){this.options=a.extend({},this.defaults,this.dataOptions,this.options);this.$botton.on("click",this.buttonClick);this.triggerEvent(this.$botton);
return this},triggerEvent:function(c){c.hasClass("js-button-is-on")?a(k).trigger(m.eventOn):a(k).trigger(m.eventOff)},buttonClick:function(c){c.preventDefault();c=a(this);c.toggleClass("js-button-is-on");m.triggerEvent(c)}};a.fn.telegraph_onOffToggler=function(c){return this.each(function(){a(this).data("telegraph_onOffToggler")||a(this).data("telegraph_onOffToggler",(new e(this,c)).init())})};a.fn.telegraph_onOffToggler_init=function(){a(".js-tmg-toggler").telegraph_onOffToggler()};f=function(){a(".js-tmg-toggler").telegraph_onOffToggler_init()};
a(k).ready(f);a(k).on("tmg:page-loaded",f)})(tmgJQ,window,document);
(function(a,f,k){var m=function(){this.init()};m.prototype={init:function(){this.$loadMoreButton=a(".js-load-more__button");0<this.$loadMoreButton.length&&(this.$loadMoreContainer=this.$loadMoreButton.parent(),this.$loadMoreList=this.$loadMoreButton.closest(".list.section").find(".js-list-of-entities__container"),this.loadMoreIndex=this.$loadMoreContainer.data("current-page-number"),this.loadMoreUrl=this.$loadMoreContainer.data("next-url"),this.wcm=a("body").hasClass("cq-wcm-edit"),this.preloaded=
[],this.retryNumber=0,this.maxRetryNumber=2,this.buttonDisabled=!1,this.classes={disabled:"disabled",listItem:"list-of-entities__item"},this.setEvents(),this.btnDisable(),this.preloadMore())},setEvents:function(){this.$loadMoreButton.on("click",a.proxy(this.clickEvent,this))},clickEvent:function(){this.buttonDisabled||(this.btnDisable(),this.loadMore())},btnDisable:function(){this.buttonDisabled=!0;this.$loadMoreButton.addClass(this.classes.disabled)},btnEnable:function(){this.buttonDisabled=!1;this.$loadMoreButton.removeClass(this.classes.disabled)},
btnRemove:function(){this.buttonDisabled=!0;this.$loadMoreContainer.remove()},loadMore:function(){this.preloaded[this.loadMoreIndex+1]&&(this.$loadMoreList.append(this.preloaded[this.loadMoreIndex+1]),this.loadMoreIndex++,this.preloadMore())},preloadMore:function(){var e=this,c=e.loadMoreUrl+(e.loadMoreIndex+1);c=this.wcm?c+".html":c+"/";a.ajax({url:c,method:"GET",timeout:1E4,dataType:"html"}).done(function(b){b=a(b).find("."+e.classes.listItem);0<b.length?(e.preloaded[e.loadMoreIndex+1]=b,e.retryNumber=
0,e.btnEnable()):e.btnRemove();a(".js-list-of-entities .responsive-image").each(function(){lzld(this)})}).fail(function(a){e.retryNumber++;e.retryNumber<=e.maxRetryNumber?e.preloadMore():e.btnRemove()})}};a.fn.telegraph_pagination=function(){return this.each(function(){var e=a(this);e.data("tmg_loadMore")||e.data("tmg_loadMore",new m)})};a(k).ready(function(){a(".js-load-more__button").telegraph_pagination()})})(tmgJQ,window,document);
(function(a,f,k,m,e){function c(b,c){this.$element=a(b);this.$links=this.$element.find("a[href]")}function b(){a(".premium-list-footer").each(function(){var b=a(this).data();b.PremiumListFooter||(b.PremiumListFooter=(new c(this)).init())})}c.prototype={init:function(){void 0===m.CQ&&this.displayFooter(this.isLoggedOut());this.$links.each(function(a,b){b.href=f.updateRedirectParam(b.href,e.location.href)})},isLoggedOut:function(){return void 0===k.get("tmg_pid")},displayFooter:function(a){this.$element.toggleClass("is-visible",
a).attr("aria-hidden",!a)}};a(e).ready(b);a(e).on("tmg:page-loaded",b)})(tmgJQ,tmg,Cookies,window,document);
(function(a,f,k,m){function e(b,c){this.$element=a(b);this.$links=this.$element.find("a[href]")}function c(){a(".premium-paywall").each(function(){var b=a(this).data();b.PremiumPaywall||(b.PremiumPaywall=(new e(this)).init())})}e.prototype={init:function(){this.$links.each(function(a,c){c.href=f.updateRedirectParam(c.href,m.location.href)})}};a(m).ready(c);a(m).on("tmg:page-loaded",c)})(tmgJQ,tmg,window,document);
(function(a,f,k,m){var e=function(b,c,e){this.$map=a(b);this.options=c;this.translations=e;this.markers=[];this.positions=[];this.infowindow;this.styles=[{featureType:"administrative",elementType:"labels.text.fill",stylers:[{saturation:"-100"},{lightness:"-30"},{gamma:"1.00"}]},{featureType:"administrative.land_parcel",elementType:"geometry.stroke",stylers:[{lightness:"0"},{saturation:"-100"},{gamma:"1.00"}]},{featureType:"landscape",elementType:"geometry.fill",stylers:[{color:"#f2f2f2"}]},{featureType:"landscape.man_made",
elementType:"geometry.stroke",stylers:[{lightness:"-4"}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"poi",elementType:"geometry.fill",stylers:[{saturation:"-100"},{lightness:"0"},{gamma:"1.00"}]},{featureType:"poi.park",elementType:"geometry.fill",stylers:[{visibility:"on"},{weight:"1"},{saturation:"-80"},{lightness:"17"},{gamma:"1.2"}]},{featureType:"road",elementType:"all",stylers:[{saturation:-100},{lightness:45}]},{featureType:"road",elementType:"geometry.fill",
stylers:[{lightness:"9"}]},{featureType:"road",elementType:"geometry.stroke",stylers:[{lightness:"0"},{gamma:"1"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{lightness:"-43"}]},{featureType:"road.highway",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"road.arterial",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"all",stylers:[{saturation:"-90"},{lightness:"0"}]},{featureType:"transit.line",elementType:"all",stylers:[{visibility:"off"}]},
{featureType:"transit.line",elementType:"geometry",stylers:[{lightness:"-50"},{gamma:"1.00"},{visibility:"off"}]},{featureType:"transit.station.airport",elementType:"geometry",stylers:[{saturation:"-77"},{gamma:"1.79"},{lightness:"23"}]},{featureType:"transit.station.bus",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"transit.station.rail",elementType:"labels.icon",stylers:[{gamma:"1.00"},{lightness:"40"},{weight:"1"},{saturation:"-100"}]},{featureType:"water",elementType:"all",stylers:[{color:"#ccd7dc"},
{visibility:"on"}]},{featureType:"water",elementType:"geometry.fill",stylers:[{visibility:"on"},{lightness:"-20"},{saturation:"-90"},{gamma:"1.00"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{lightness:"-39"},{saturation:"-100"}]},{featureType:"water",elementType:"labels.text.stroke",stylers:[{lightness:"55"}]}];this.travelGreen="#008385";this.travelPurple="#86146e";this.map;this.infoboxHtmlTemplate=""},c;e.prototype={init:function(){this.mapCanvasSelector=this.options.canvasSelector||
".product-map__canvas";this.mapCanvas=this.$map.find(this.mapCanvasSelector)[0];this.$mapCanvas=a(this.mapCanvas);this.infoboxHtmlTemplate=m.template(a(".product-map-popup").html());this.popupCssClass=this.options.popupCssClass||"product-map__infobox-container";this.initMap();this.populateMap()},mapIsExpanded:!1,setMapExpansion:function(b){this.mapIsExpanded=b;this.fullScreenControl.toggleClass("product-map__fullscreen-button--expanded",b);this.$mapCanvas.toggleClass("product-map__canvas--expanded",
b);if(this.mapIsExpanded)a(k).on("keyup",this.closeOnEscape);else a(k).off("keyup",this.closeOnEscape);this.center=this.map.getCenter();google.maps.event.trigger(this.map,"resize");this.map.setCenter(this.center)},closeOnEscapeUnbound:function(a){27===a.keyCode&&(this.setMapExpansion(!1),a.stopImmediatePropagation())},initMap:function(){var b=this,c={styles:b.styles,streetViewControl:!1,scrollwheel:!1,zoom:parseInt(b.options.zoom||16,10)};b.fullScreenControl=a('\x3cdiv class\x3d"product-map__fullscreen-button"\x3e\x3c/div\x3e').attr({title:this.translations.fullscreenTitle||
"Full screen"}).click(function(){b.setMapExpansion(!b.mapIsExpanded)});this.map=new google.maps.Map(b.mapCanvas,c);this.map.controls[google.maps.ControlPosition.LEFT_BOTTOM].push(b.fullScreenControl[0]);this.closeOnEscape=this.closeOnEscapeUnbound.bind(this);this.setMapExpansion(!1);this.bounds=new google.maps.LatLngBounds;a(this.mapCanvasSelector).on("click",function(){b.map.setOptions({scrollwheel:!0})});a(f).on("hashchange",function(){b.isMapInHiddenTab()})},isMapInHiddenTab:function(){var b=f.location.hash;
(b=b.split("?")[0].substr(1))&&0<a(".tabs__container").find("#"+b).has(this.mapCanvasSelector).length&&(this.correctMapDisplay(),this.isMapInHiddenTab=function(){})},correctMapDisplay:function(a){var b=this;var c=setTimeout(function(){google.maps.event.trigger(b.map,"resize");1<b.markers.length&&b.map.fitBounds(b.bounds);clearTimeout(c)},a||200)},populateMap:function(){var a=this,c=k.querySelector(".js-product-map-marker"),e=c?c.innerHTML:void 0;this.options.label&&this.options.address&&this.options.lat&&
this.options.lon&&this.processItem(this.options);this.options.hotels&&this.options.hotels.forEach(function(b){a.processItem(b)});a.options.callingPoints&&(e&&k.querySelector(".luxuryTourRenderer",".partnerTourRenderer")&&a.options.callingPoints.forEach(function(b){b.icon={anchor:new google.maps.Point(23,37),url:"data:image/svg+xml;charset\x3dutf-8,"+encodeURIComponent(e)};a.processItem(b)}),this.createPath(this.positions));1<this.markers.length&&(this.map.fitBounds(this.bounds),this.correctMapDisplay(1E3))},
processItem:function(b){var c=this,e=this.createPosition(b.lat,b.lon),f=this.createMarker(e,b);if(b.label&&b.address){f.clickable=!0;var k=this.createPopup(b);f.addListener("click",function(){c.infowindow&&c.infowindow.close();c.infowindow=k;a.proxy(c.infowindow.open(c.map,f))})}this.bounds.extend(e);1===this.markers.length&&this.map.setCenter(e);f.setMap(this.map)},createMarker:function(b,c){b={position:b,draggable:!1,raiseOnDrag:!1,clickable:!0,icon:{path:google.maps.SymbolPath.CIRCLE,fillColor:this.travelGreen,
fillOpacity:1,scale:11,strokeColor:"#fff",strokeWeight:2}};var d=a("body");c.icon&&(d.hasClass("luxuryTourRenderer")||d.hasClass("partnerTourRenderer"))&&(b.icon=c.icon);c.title&&(b.title=c.title);c=new google.maps.Marker(b);this.markers.push(c);return c},createPosition:function(a,c){a=parseFloat(a);c=parseFloat(c);a=new google.maps.LatLng(a,c);this.positions.push(a);return a},createPopup:function(a){a=this.processTemplate(a);return new InfoBox({content:a,boxClass:this.popupCssClass,pixelOffset:new google.maps.Size(-157,
-26),closeBoxMargin:"12px 10px 0 0",closeBoxURL:"data:image/gif;charset\x3dutf-8;base64,R0lGODlhDgANAIAAAP///wAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMwMTQgNzkuMTU2Nzk3LCAyMDE0LzA4LzIwLTA5OjUzOjAyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ4bXAuZGlkOjA0YWQ4ZjdiLTBmMjUtNDczNS1hMWUxLTcyOTQ1NGE3MDA3NiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDozOTVDNTRGMDM4RkExMUU1QUQwOThBNzhFMTRFMjAyRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDozOTVDNTRFRjM4RkExMUU1QUQwOThBNzhFMTRFMjAyRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxNCAoTWFjaW50b3NoKSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjA0YWQ4ZjdiLTBmMjUtNDczNS1hMWUxLTcyOTQ1NGE3MDA3NiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNGFkOGY3Yi0wZjI1LTQ3MzUtYTFlMS03Mjk0NTRhNzAwNzYiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4B//79/Pv6+fj39vX08/Lx8O/u7ezr6uno5+bl5OPi4eDf3t3c29rZ2NfW1dTT0tHQz87NzMvKycjHxsXEw8LBwL++vby7urm4t7a1tLOysbCvrq2sq6qpqKempaSjoqGgn56dnJuamZiXlpWUk5KRkI+OjYyLiomIh4aFhIOCgYB/fn18e3p5eHd2dXRzcnFwb25tbGtqaWhnZmVkY2JhYF9eXVxbWllYV1ZVVFNSUVBPTk1MS0pJSEdGRURDQkFAPz49PDs6OTg3NjU0MzIxMC8uLSwrKikoJyYlJCMiISAfHh0cGxoZGBcWFRQTEhEQDw4NDAsKCQgHBgUEAwIBAAAh+QQBAAAAACwAAAAADgANAAACDISPqcvtD6OctNpXAAA7",
alignBottom:!0})},createPath:function(b){var c=a("body");b=new google.maps.Polyline({path:b,strokeColor:c.hasClass("luxuryTourRenderer")||c.hasClass("partnerTourRenderer")?this.travelPurple:this.travelGreen,strokeOpacity:.8,strokeWeight:1,clickable:!1});b.setMap(this.map);return b},processTemplate:function(a){return this.infoboxHtmlTemplate({title:a.label,content:a.address,url:a.url})}};a.fn.telegraph_product_map=function(){c=a(".js-product-map");c.each(function(){var b=a(this),c=a.Deferred(),l=a.Deferred(),
f=a(".travelCallingPoint");if(!b.data("telegraph_product_map")){var k=b.find(".js-component-content");var m=k.data("translations");var v="string"===typeof m?a.parseJSON(m.replace(/'/g,'"')):m||{};m=k.data("options");var x="string"===typeof m?a.parseJSON(m.replace(/'/g,'"')):m||{};var z=new e(b,x,v);m="/etc/designs/telegraph/core/clientlibs/tmgchannels/travel/libs/infobox-v1.1.13.min.js";k=k.data("product-url");b.data("telegraph_product_map",z)}0<f.length&&(x.callingPoints=[],f.each(function(b,c){c=
a(this);var d=c.find("[data-product-long]");b=d.attr("data-product-long");d=d.attr("data-product-lat");c=c.find('[itemprop\x3d"name"]').text();d&&b&&x.callingPoints.push({lat:d,lon:b,htmlContent:"",title:c})}));k?a.getJSON(k,function(a){x.hotels=a;l.resolve()}):l.resolve();yepnope({load:m,complete:function(){c.resolve()}});a.when(l,c).done(function(){z.init()})})}})(tmgJQ,window,document,_);
var _typeof="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"===typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};
(function(a,f,k,m){var e=function(c,b){this.$openButton=a(c);this.options=b};e.prototype={defaults:{imageWidth:170,animDuration:600,startImageIndex:0,infiniteLoop:!0,activeClass:"is-active",selectors:{mainImageClass:".product-gallery__main-image",overlayClass:".tmg-modal-overlay",backdropClass:".tmg-modal-backdrop",overlayWrapper:".product-gallery__wrapper",galleryContainer:".product-gallery__container",gallery:".tmg-modal-overlay .product-gallery",thumbnailBar:".product-gallery__thumbnails-bar",
thumbnailLink:".js-product-gallery__thumbnail",thumbnailContainer:".product-gallery__thumbnails-container",thumbnail:".product-gallery__thumbnail",activeThumbnail:".is-active",navContainer:".product-gallery__nav",prevLink:".js-product-gallery-prev",nextLink:".js-product-gallery-next",totalCount:".js-product-gallery-total",captionText:".js-product-gallery-caption",currentText:".js-product-gallery-current"}},currentImageIndex:null,startingLeftPosCSS:0,totalImagesWidth:0,$galleryElement:null,$thumbBar:null,
init:function(){this.options=a.extend({},this.defaults,this.options);this.selectors=this.options.selectors;this.findDomElements();this.attachEvents();this.$galleryElementContainer.hide();return this},findDomElements:function(){this.$galleryElementContainer=a(this.selectors.galleryContainer)},attachEvents:function(){this.$openButton.on("click",a.proxy(this.openModal,this))},initModal:function(){this.findModalDomElements();this.attachModalEvents();this.$galleryElement.focus();a(this.selectors.overlayClass).attr("aria-hidden",
!1);this.totalImagesWidth=this.getTotalWidth();this.setTotalImages();this.startImageIndex=this.options.startImageIndex;this.displayNav();(this.infiniteLoop=this.getInfiniteLoop())&&this.setupInfiniteLoop();this.currentImageIndex=this.startImageIndex;var c=this.$thumbBar.find(".is-active");this.infiniteLoop?(c.removeClass("is-active"),c.removeAttr("aria-labels"),this.$currentThumbnail=a(c[2])):this.$currentThumbnail=a(c[0]);this.setActive(this.$currentThumbnail);this.setAriaHidden();this.setTotalText();
this.setCountText(this.currentImageIndex)},findModalDomElements:function(){this.$galleryElement=a(this.selectors.gallery);this.$thumbBar=this.$galleryElement.find(this.selectors.thumbnailBar)},attachModalEvents:function(){var c=a(k),b=this.selectors.prevLink,d=this.selectors.nextLink,e=b+", "+d,f=a(this.selectors.mainImageClass);c.on("click",this.selectors.thumbnailLink,a.proxy(this.onClickThumb,this));c.on("click",e,a.proxy(this.onClickNav,this));f.hammer({}).bind("swiperight",function(a){tmgJQ(b).click()});
f.hammer({}).bind("swipeleft",function(a){tmgJQ(d).click()})},getTotalWidth:function(){for(var c=this.$thumbBar.find("li"),b=0,d=0;d<c.length;d++)b+=a(c[d]).outerWidth(!0);return b},setTotalImages:function(){this.totalImages=this.$thumbBar.find("li").length},displayNav:function(){1===this.$thumbBar.find("li").length&&a(this.selectors.navContainer).hide()},getInfiniteLoop:function(){var c=a(this.selectors.thumbnailContainer);this.totalImagesWidth>c.outerWidth(!0)?c=!0:(c.addClass("is-finite"),c=!1);
return c},setupInfiniteLoop:function(){var a=this.$thumbBar.find("li:first"),b=this.$thumbBar.find("li:last"),d=this.$thumbBar.closest(this.selectors.thumbnailContainer).outerWidth(!0)/2;a.before(this.$thumbBar.children().clone(!0));b.after(this.$thumbBar.children().clone(!0));b=2*this.totalImagesWidth;b=b-d+a.width()/2;this.startingLeftPosCSS="-"+b+"px";this.$thumbBar.css("left",this.startingLeftPosCSS)},setAriaHidden:function(){var c;this.$thumbBar.find("li").each(function(b,d){c=4<b?!0:!1;a(d).attr("aria-hidden",
c)})},setAriaLabelledBy:function(a){var b=this.selectors.mainImageClass;this.$galleryElement.find(b).attr("aria-labelledby",a.attr("id"));a.attr("aria-labels",b)},setTotalText:function(){this.$galleryElement.find(this.selectors.totalCount).text(this.totalImages)},onClickThumb:function(c){if(!this.scrolling){c=a(c.currentTarget).find("img");var b=c.closest("li").data("thumbnail-index")-this.currentImageIndex;b===this.totalImages-1&&(b=-1);b===this.totalImages-2&&(b=-2);b===this.totalImages-3&&(b=-3);
b===-Math.abs(this.totalImages-1)&&(b=1);b===-Math.abs(this.totalImages-2)&&(b=2);b===-Math.abs(this.totalImages-3)&&(b=3);this.handleImageSwap(c[0],b)}},onClickNav:function(c){if(!this.scrolling){c=this.getNavDirection(a(c.currentTarget));var b=this.getNewImageIndex(c);b=this.getNewThumbnail(b);this.handleImageSwap(this.infiniteLoop?1==c?b[2]:b[1]:b,c);"object"===("undefined"===typeof _satellite?"undefined":_typeof(_satellite))&&"function"===typeof _satellite.track&&_satellite.track("customPageLoad")}},
getNewImageIndex:function(a){var b=this.currentImageIndex,c=b===this.totalImages&&1===a;a=0===b&&-1===a?this.totalImages-1:c?1:b+a;a===this.totalImages&&(a=0);return a},getNewThumbnail:function(a){return this.getThumbnailAtIndex(this.$thumbBar,a).find("img")},getNavDirection:function(a){return a.data("delta")},handleImageSwap:function(c,b){c=a(c);var d=c.closest("li"),e=d.data("thumbnail-index");this.infiniteLoop&&this.addInfiniteImage(b,d);this.setActive(d);this.setImage(c,d);this.setCountText(e);
this.setCaption(e);this.setAriaHidden();this.setAriaLabelledBy(d);this.setCurrentImageIndex(e)},setImage:function(a,b){b=a.data("frz-src-array");var c=this.$galleryElement.find(".product-gallery__main-image img");c.data("frz-src-array",b);c.attr("src",a.attr("src"));c.data("lazyLoaded",!1)},setCurrentImageIndex:function(a){this.currentImageIndex=a},setActive:function(c){var b=this.getThumbnailAtIndex(this.$thumbBar,this.$currentThumbnail.data("thumbnail-index"));this.$currentThumbnail.removeAttr("aria-labels");
b.each(function(b,c){a(c).removeClass("is-active")});this.$currentThumbnail=c;this.getThumbnailAtIndex(this.$thumbBar,c.data("thumbnail-index")).each(function(b,c){a(c).addClass("is-active")})},setCaption:function(c){c=this.getThumbnailAtIndex(this.$thumbBar,c).find("img").data("caption");"undefined"===typeof c&&(c="");a(this.selectors.captionText).first().text(c)},addInfiniteImage:function(c,b){if(!this.$thumbBar.is(":animated")){var d=this,e=this.$thumbBar;e.closest(this.selectors.thumbnailContainer);
e.find("li");var f=this.totalImages,k=null,m=this.options.imageWidth,v=this.options.animDuration,x,z=!1,w=a(b).outerWidth(!0);b=a(b).prev().outerWidth(!0);w="+\x3d"+-Math.abs(-Math.abs(w/2+b/2)*c)*(0<c?1:-1);this.scrolling=!0;k=this.currentImageIndex===this.totalImages?0:this.currentImageIndex+1;e.animate({left:w},v,function(){k+=c;if(z=!!(0===k||k>f))this.currentImageIndex=0===k?f-1:1,x=1===c?d.startingLeftPosCSS:parseInt(d.startingLeftPosCSS,10)+m,e.css({left:x});d.scrolling=!1})}},getThumbnailAtIndex:function(a,
b){return a.find("li[data-thumbnail-index\x3d'"+b+"']")},setCountText:function(c){a(this.selectors.currentText).text(c+1)},openModal:function(){var c=this;c.$galleryElementContainer.modal("open",{templateBeforeCallback:function(b){b=a(c.selectors.overlayWrapper).html();this.config.content=b;this.config.fadeSpeed="fast";a(".container, .container-fluid").hide().attr("aria-hidden",!0).attr("tabindex","-1");a("#imageGallery").hide()},closeAfterCallback:function(b){a(".container, .container-fluid").show().attr("aria-hidden",
!1).attr("tabindex","0");a("#imageGallery").show();c.$openButton.focus()}});this.initModal();"object"===("undefined"===typeof _satellite?"undefined":_typeof(_satellite))&&"function"===typeof _satellite.track&&_satellite.track("customPageLoad")}};a.fn.telegraph_product_image_gallery=function(c){return this.each(function(){a.data(this,"telegraph_product_image_gallery")||a.data(this,"telegraph_product_image_gallery",(new e(this,c)).init())})};f=function(){a(".js-product-gallery-launch").each(function(){var c=
a(this);c.telegraph_product_image_gallery(c.data("options")?a.parseJSON(c.data("options").replace(/'/g,'"')):{})})};a(k).ready(f);a(k).on("tmg:page-loaded",f)})(tmgJQ,window,document,Hammer);_typeof="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"===typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};
(function(a,f,k){var m=f._,e=function(b,c){this.$el=b;this.defaults={jsonReference:"",selectors:{container:".js-product-search",searchInput:".js-search-input",cancelBtn:".js-cancel-button",tabItems:".js-tabs li",tabContent:".js-tab-content",tabContentItems:".js-tab-content-item",autocompleteItems:".js-autocomplete-items",destinationList:".tab-0 ul",hotelList:".tab-2 ul",articleList:".tab-1 ul",tourList:".tab-3 ul",filterList:".js-filtered-list",resultListItems:".js-tab-content-item li",selectedItem:".js-tab-content-item li.selected",
selectedItemLink:".js-tab-content-item li.selected a",viewAllLabel:".js-product-search-view-all-label",noResultsDestinations:".js-product-search-no-results-tab-0-text",noResultsArticles:".js-product-search-no-results-tab-1-text",noResultsHotels:".js-product-search-no-results-tab-2-text",noResultsTours:".js-product-search-no-results-tab-3-text",errorText:".js-product-search-error-text",imageFig:".js-image-figure",imageHeading:".js-image-heading"},classNames:{fullscreen:"product-search--fullscreen",
selected:"selected",hidden:"js-hidden",noresults:"product-search__item--no-results",fadeOut:"fade--out",noScroll:"noscroll"},searchTypes:{all:0,hotels:2,articles:1,tours:3},templates:{hotel:"telegraph/core/commons/renderers/hotelRenderer",article:"telegraph/core/commons/renderers/articleRenderer2",destination:"telegraph/core/commons/renderers/destinationRenderer",hotelListing:"telegraph/core/commons/renderers/hotelsListingRenderer"},lastSearch:"",minLimit:5,maxLimit:20,keyAccessIndex:-1,active:!1,
inFocus:!1};this.options=a.extend({},this.defaults,c)};e.prototype={defaults:{},init:function(){this.isMobile=this.isMobileCheck();this.searchResultHandler=m.bind(this.handleSearchResultsDesktop,this);this.searchType=this.options.searchTypes.all;this.$els={};m.each(this.options.selectors,function(b,c){this.$els[c]=a(b)},this);this.addEventListeners();this.dynamicPlaceholder();return this},addEventListeners:function(){this.$els.searchInput.on("keydown",this.handleKeyDown);this.$els.searchInput.on("keyup",
m.bind(this.handleSearch,this));this.$els.searchInput.on("focus",m.bind(this.handleInputFocus,this));this.$els.searchInput.on("blur",m.bind(this.handleInputBlur,this));this.$els.cancelBtn.on("click",m.bind(this.exitMobileView,this));a(k).on("mouseup",m.bind(this.handleMouseUp,this));this.$els.tabItems.on("click",m.bind(this.handleTabClick,this));this.$els.tabItems.on("focus",m.bind(this.handleTabClick,this));a(f).resize(m.bind(this.handleResize,this))},handleKeyDown:function(a){if(13===a.keyCode)return a.preventDefault(),
!1},handleMouseUp:function(a){var b=this.$els.container;this.options.active&&(b.is(a.target)||0!==b.has(a.target).length||this.closeSearch())},handleInputFocus:function(b){this.isMobile&&this.enterMobileView();this.options.inFocus=!0;this.handleKeyStroke(b);a("html, body").animate({scrollTop:this.$els.searchInput.offset().top-30},600)},handleInputBlur:function(){this.options.inFocus=!1},isMobileCheck:function(){return 730>(f.innerWidth||k.body.clientWidth)},dynamicPlaceholder:function(){var a=this.$els.searchInput.data("search-placeholder"),
c=this.$els.searchInput.data("search-mobile-placeholder");this.isMobile?this.$els.searchInput.attr("placeholder",c):this.$els.searchInput.attr("placeholder",a)},handleResize:m.debounce(function(){var a=(f.innerHeight||k.body.clientHeight)-this.$els.container.offset().top-60,c=this.isMobile;this.$els.tabContent.css({"max-height":a+"px"});this.isMobile=this.isMobileCheck();this.dynamicPlaceholder();if(this.options.active||this.options.inFocus)this.isMobile&&!c?this.enterMobileView():c&&!this.isMobile&&
(this.exitMobileView(),this.openSearch())},250),handleSearch:function(a){switch(a.keyCode){case 13:this.handleReturnKey(a);break;case 27:this.handleEscapeKey(a);break;case 38:this.handleUpKey(a);break;case 40:this.handleDownKey(a);break;default:this.handleKeyStroke(a)}},handleDownKey:function(){var b=a(this.options.selectors.resultListItems);this.options.keyAccessIndex=this.options.keyAccessIndex>=b.length-1?0:this.options.keyAccessIndex+1;b.removeClass(this.options.classNames.selected);b.eq(this.options.keyAccessIndex).addClass(this.options.classNames.selected)},
handleUpKey:function(){var b=a(this.options.selectors.resultListItems);this.options.keyAccessIndex=0>=this.options.keyAccessIndex?b.length-1:this.options.keyAccessIndex-1;b.removeClass(this.options.classNames.selected);b.eq(this.options.keyAccessIndex).addClass(this.options.classNames.selected)},handleReturnKey:function(){0<a(this.options.selectors.selectedItem).length&&(f.location=a(this.options.selectors.selectedItemLink).attr("href"))},handleEscapeKey:function(){this.options.keyAccessIndex=-1;
this.closeSearch()},handleKeyStroke:function(a){this.options.lastSearch=a.currentTarget.value;this.runSearch(this.options.lastSearch)},runSearch:m.debounce(function(b){var c=this.searchType===this.options.searchTypes.all?this.options.minLimit:this.options.maxLimit;a(this.options.selectors.tabItems+":first-child").data("id");var e=this,f;b||(b=this.options.lastSearch);(null!==this.options.jsonReference,""!==this.options.jsonReference)&&this.options.jsonReference.abort();this.$els.autocompleteItems.find(this.$els.filterList).addClass(this.options.classNames.fadeOut);
this.options.jsonReference=a.getJSON(this.$els.container.data("product-search-url")+"?q\x3d"+b+"\x26type\x3d"+this.searchType+"\x26limit\x3d"+c,function(a){e.searchResultHandler(a)}).done(function(a){e.searchResultHandler(a)}).fail(function(){f={error:e.$els.errorText.data("product-search-error-text")};e.searchResultHandler(f)}).always(function(){})},330),openSearch:function(){if(!this.isMobile||this.$els.container.hasClass(this.options.classNames.fullscreen))this.options.active=!0,this.$els.autocompleteItems.delay(200).slideDown(300,
"swing"),"object"===("undefined"===typeof _satellite?"undefined":_typeof(_satellite))&&"function"===typeof _satellite.track&&_satellite.track("SearchOpen")},closeSearch:function(a){a=a?0:300;this.options.active=!1;this.$els.autocompleteItems.delay(0).slideUp(a,"swing")},handleTabClick:function(a){this.changeTab(a.target.getAttribute("data-id"))},changeTab:function(b){var c=a('.js-tabs li[data-id\x3d"'+b+'"]');a(this.$els.autocompleteItems).find(this.$els.filterList).addClass(this.options.classNames.fadeOut);
this.$els.tabItems.removeClass(this.options.classNames.selected);c.addClass(this.options.classNames.selected);"0"===b?(this.$els.tabContentItems.removeClass(this.options.classNames.hidden),this.searchType=this.options.searchTypes.all):"2"===b?(this.$els.tabContentItems.addClass(this.options.classNames.hidden),a(".tab-"+b).removeClass(this.options.classNames.hidden),this.searchType=this.options.searchTypes.hotels):"1"===b?(this.$els.tabContentItems.addClass(this.options.classNames.hidden),a(".tab-"+
b).removeClass(this.options.classNames.hidden),this.searchType=this.options.searchTypes.articles):"3"===b&&(this.$els.tabContentItems.addClass(this.options.classNames.hidden),a(".tab-"+b).removeClass(this.options.classNames.hidden),this.searchType=this.options.searchTypes.tours);this.runSearch(this.options.lastSearch)},enterMobileView:function(){this.$els.container.addClass(this.options.classNames.fullscreen);a("body").addClass(this.options.classNames.noScroll)},exitMobileView:function(){this.$els.container.removeClass(this.options.classNames.fullscreen);
this.closeSearch(!0);a("body").removeClass(this.options.classNames.noScroll)},emptyResultsContent:function(){a(this.$els.autocompleteItems).find(this.$els.filterList).empty()},handleSearchResultsDesktop:function(b){var c=[],e=[],f=[],t=[],C=[],v=[],x=k.createDocumentFragment(),z=k.createDocumentFragment(),w=k.createDocumentFragment();k.createDocumentFragment();var D=k.createDocumentFragment(),n=new RegExp(this.options.lastSearch,"gi"),I,y,J,F;b.error||(this.options.active?3>this.options.lastSearch.length&&
this.closeSearch():2<this.options.lastSearch.length&&this.openSearch(),this.emptyResultsContent(),a(this.$els.autocompleteItems).find(this.$els.filterList).removeClass(this.options.classNames.fadeOut),m.map(b,function(a,b){y=a.headline;J=a.geoLocalisationHint;y&&0<y.length&&(y=this.replaceWithBold(n,y));J&&0<J.length&&(I=this.replaceWithBold(n,J),y='\x3cspan class\x3d"headline"\x3e'+y+',\x3c/span\x3e \x3cspan class\x3d"geoLoc"\x3e'+I+"\x3c/span\x3e");F={headline:y,link:a.uri,href:a.url};switch(a.template){case this.options.templates.destination:c.push(a);
x.appendChild(this.createListElement(F));break;case this.options.templates.article:e.push(a);z.appendChild(this.createListElement(F));break;case this.options.templates.hotel:f.push(a);t.push(a.geoLocalisationHint);break;case this.options.templates.hotelListing:C.push(a);break;case this.options.templates.tours:v.push(a),D.appendChild(this.createListElement(F))}},this),m.each(C,function(a,b){w.appendChild(this.createListElement({headline:this.$els.viewAllLabel.data("product-search-view-all-label")+
" "+a.geoLocalisationHint,customClass:"product-search__result-view-all",href:a.url}))},this),m.each(f,function(a,b){y=a.headline;(J=a.geoLocalisationHint)&&0<J.length&&(I=this.replaceWithBold(n,J),y=y+', \x3cspan class\x3d"geoLoc"\x3e'+I+"\x3c/span\x3e");w.appendChild(this.createListElement({headline:y,link:a.uri,href:a.url}))},this),1>c.length&&x.appendChild(this.createNoResultsElement(this.$els.noResultsDestinations.data("product-search-no-results-text"))),1>f.length&&w.appendChild(this.createNoResultsElement(this.$els.noResultsHotels.data("product-search-no-results-text"))),
1>e.length&&z.appendChild(this.createNoResultsElement(this.$els.noResultsArticles.data("product-search-no-results-text"))),1>v.length&&D.appendChild(this.createNoResultsElement(this.$els.noResultsTours.data("product-search-no-results-text"))),this.$els.destinationList.append(x),this.$els.hotelList.append(w),this.$els.articleList.append(z),this.$els.tourList.append(D))},createListElement:function(b){var c=k.createElement("li");c.className="product-search__tab-content-list-item";b.customClass&&(c.className=
b.customClass);a(c).append('\x3ca class\x3d"product-search__tab-content-link" href\x3d"'+b.href+'"\x3e'+b.headline+"\x3c/a\x3e");return c},createNoResultsElement:function(b){var c=k.createElement("li");c.className=this.options.classNames.noresults;a(c).append(b);return c},replaceWithBold:function(a,c){return c.replace(a,function(a){return"\x3cstrong\x3e"+a+"\x3c/strong\x3e"})}};a.fn.telegraph_product_search=function(b){return this.each(function(){a.data(this,"telegraph_product_search")||a.data(this,
"telegraph_product_search",(new e(this,b)).init())})};var c=function(){a(".js-product-search").each(function(){var b=a(this);a.data(this,"telegraph_product_search")||a.data(this,"telegraph_product_search",b.telegraph_product_search(b.data("options")?a.parseJSON(b.data("options").replace(/'/g,'"')):{}))})};a(k).ready(c);a(k).on("tmg:page-loaded",c)})(tmgJQ,window,document);
(function(a){a.extend(a.fn,{telegraph_sectionNavigation:function(f,m,e){var c=this,b,d,l,k,t,C={resizeDelay:100,closeOnExernalClick:!0,foldedMenuClass:"has-folded-items",foldedItemClass:"is-folded",activeClass:"is-active",hasFoldedItemLabel:"hasFoldedItem",isActiveLabel:"isActive",clicked:0,keyCode:{ESCAPE:27,ENTER:13},debug:function(){var a=!1;try{a=-1<window.location.search.indexOf("debug")&&window.console?!0:!1}catch(z){}return a}()},v=a.extend(C,e);v.index=f;c.$el=a(m);c.el=m;if(c.$el.data("tmg.sectionNavigation"))return c.$el.data("tmg.sectionNavigation");
c.init=function(){c.$el.data(v.isActiveLabel,!1);c.findDomElements();c.attachEvents();c.updatePopupNavigation();return c};c.findDomElements=function(){b=c.$el.find(".js-section-navigation-main-container");d=b.find(".js-section-navigation-main-item");l=c.$el.find(".js-section-navigation-popup-control");k=c.$el.find(".js-section-navigation-popup-container");t=k.find(".js-section-navigation-popup-item")};c.showPopupControl=function(){c.$el.data(v.hasFoldedItemLabel)?(b.addClass(v.foldedMenuClass),l.addClass(v.foldedMenuClass)):
(b.removeClass(v.foldedMenuClass),l.removeClass(v.foldedMenuClass),c.closePopupMenu())};c.checkFoldedItemStatus=function(b,d){0===a(d).position().top?(a(t.get(b)).removeClass(v.foldedItemClass),c.log("Menu element "+b+" is visible ")):(c.log("Menu element "+b+" is folded "),c.$el.data(v.hasFoldedItemLabel,!0),a(t.get(b)).addClass(v.foldedItemClass))};c.updatePopupNavigation=function(){c.$el.data(v.hasFoldedItemLabel,!1);d.each(function(a,b){c.checkFoldedItemStatus(a,b)});c.showPopupControl()};c.togglePopupMenu=
function(){c.$el.data(v.isActiveLabel)?c.closePopupMenu():(c.openPopupMenu(),v.debug&&(v.clicked++,c.log("Menu "+v.index+"; was opened "+v.clicked+" times")))};c.log=function(a){v.debug&&window.console.log(a)};c.openPopupMenu=function(){l.addClass(v.activeClass);k.addClass(v.activeClass);c.$el.data(v.isActiveLabel,!0);a(document).bind("keyup",c.onEsc)};c.closePopupMenu=function(){l.removeClass(v.activeClass);k.removeClass(v.activeClass);c.$el.data(v.isActiveLabel,!1);a(document).unbind("keyup",c.onEsc)};
c.onEsc=function(a){a.keyCode===v.keyCode.ESCAPE&&c.closePopupMenu()};c.attachEvents=function(){a(window).resize(function(){clearTimeout(a.data(c.$el,"resizeTimer"));a.data(c.$el,"resizeTimer",setTimeout(function(){c.updatePopupNavigation()},v.resizeDelay))});l.on("click",function(a){v.closeOnExernalClick&&a.stopPropagation();c.togglePopupMenu()});l.bind("keypress",function(a){a.keyCode===v.keyCode.ENTER&&c.togglePopupMenu()});v.closeOnExernalClick&&a(document).click(function(){c.closePopupMenu()})};
c.$el.data("tmg.sectionNavigation",c);return c.init()}});var f=function(){a(".section-navigation").each(function(f,m){var e=a(m);if(!a.data(m,"telegraph_sectionNavigation")){var c=e.data("options")?a.parseJSON(e.data("options").replace(/'/g,'"')):{};a.data(m,"telegraph_sectionNavigation",e.telegraph_sectionNavigation(f,m,c))}})};a(document).ready(f);a(document).on("tmg:page-loaded",f)})(window.tmgJQ);
var _createClass=function(){function a(a,k){for(var f=0;f<k.length;f++){var e=k[f];e.enumerable=e.enumerable||!1;e.configurable=!0;"value"in e&&(e.writable=!0);Object.defineProperty(a,e.key,e)}}return function(f,k,m){k&&a(f.prototype,k);m&&a(f,m);return f}}();function _classCallCheck(a,f){if(!(a instanceof f))throw new TypeError("Cannot call a class as a function");}
(function(){var a=function(){function a(f){_classCallCheck(this,a);this.element=f}_createClass(a,[{key:"init",value:function(){this.element.forEach(function(a,f){a.addEventListener("click",function(a){var c=document.querySelector(".seeker-option--active");c&&c.classList.remove("seeker-option--active");a.currentTarget.classList.add("seeker-option--active")})})}}]);return a}();window.tmg.pageReady(function(){var f=Array.from(document.querySelectorAll('[data-js\x3d"seeker-option"]'));0<f.length&&(new a(f)).init()})})();
(function(a,f,k){var m=function(e,c){this.$context=a(e);this.$context.hasClass("initialized")||this.init(c)};m.prototype={defaults:{selectorSwitchButton:".segment-container__switch-button",selectorItemsWitSublist:".segment-container__navigation-list-item--has-sublist",selectorNavigation:".segment-container__navigation",selectorContent:".segment-container__content"},init:function(e){this.findDomElements();this.$switchButton.on("click",a.proxy(this.toggleContentClick,this));this.$itemsWitSublist.on("click",
a.proxy(this.toggleSublistClick,this));this.$context.addClass("initialized");this.isMobile=a("html").hasClass("ua-mobile")},findDomElements:function(){this.$switchButton=this.$context.find(this.defaults.selectorSwitchButton);this.$itemsWitSublist=this.$context.find(this.defaults.selectorItemsWitSublist);this.$navigation=this.$context.find(this.defaults.selectorNavigation);this.$content=this.$context.find(this.defaults.selectorContent)},toggleContentClick:function(e){var c=a(e.currentTarget),b=a.trim(c.text()),
d="true"===this.$content.attr("aria-hidden")?"false":"true";e.preventDefault();c.text("Hide"===b?"Show":"Hide");"Hide"===b&&this.hideSublists();this.$content.attr("aria-hidden",d);this.$content.slideToggle(this.isMobile?0:300)},toggleSublistClick:function(e){var c=a(e.currentTarget),b=c.children("ul");c.children("a");var d="true"===b.attr("aria-hidden")?"false":"true";if(a(e.target.parentElement)[0]!=a(e.currentTarget)[0])return!0;e.preventDefault();if(this.$itemsWitSublist.filter(".revealed")[0]===
c[0])c.toggleClass("revealed"),b.attr("aria-hidden",d),this.toggleSublist(b);else if(this.$itemsWitSublist.filter(".revealed").length){var f=this;this.hideSublists(function(){c.toggleClass("revealed");b.attr("aria-hidden",d);f.toggleSublist(b)})}else c.toggleClass("revealed"),b.attr("aria-hidden",d),this.toggleSublist(b)},toggleSublist:function(a){this.isMobile?(a.slideToggle(0),this.$navigation.css("margin-bottom",a[0].clientHeight+10)):a.slideToggle(300)},hideSublists:function(a){this.isMobile&&
this.$navigation.css("margin-bottom","");this.$itemsWitSublist.filter(".revealed").removeClass("revealed").children("ul").attr("aria-hidden","true").slideUp(this.isMobile?0:300,function(){"function"===typeof a&&a(this)})}};f=function(){tmg.components||(tmg.components={});tmg.components.Segment={};tmg.components.Segment.init=function(){a(".segment-container.component").each(function(){a.data(this,"Segment")||a.data(this,"Segment",new m(this))});return this};tmg.components.Segment.init()};a(k).ready(f);
a(k).on("tmg:page-loaded",f)})(tmgJQ,window,document);
(function(a){var f=function(f,e){this.elem=f;this.$elem=a(f);this.options=e;this.domElements={}};f.prototype={defaults:{shareButtons:[{provider:"facebook",tooltip:"Share on Facebook",iconOnly:!0},{provider:"twitter",tooltip:"Tweet this page",iconOnly:!0},{provider:"linkedin",tooltip:"Share on LinkedIn",iconOnly:!0},{provider:"print",tooltip:"Print this page"},{provider:"email",tooltip:"Share via email"}],layout:"vertical",showCounts:"top",noButtonBorders:!0},init:function(){this.options=a.extend({},
this.defaults,this.options);this.id="js-social-"+Math.uuidFast();this.findDomElements();this.updateDomElements();this.initExternalScripts();return this},findDomElements:function(){this.domElements.$content=this.$elem.find(".js-content")},updateDomElements:function(){this.domElements.$content.attr("id",this.id)},initExternalScripts:function(){var f=new gigya.socialize.UserAction;f=a.extend({},this.options,{containerID:this.id,userAction:f});gigya.socialize.showShareBarUI(f)}};f.defaults=f.prototype.defaults;
a.fn.telegraph_social=function(k){return this.each(function(){if(a.data(this,"telegraph_social"))return a.data(this,"telegraph_social");a.data(this,"telegraph_social",(new f(this,k)).init())})};var k=function(){var f=a(".js-social");f.length&&a.ajax({url:"//cdn.gigya.com/js/socialize.js?apiKey\x3d2_ASmwJuFXoCCY8YP8uB6mzZphj_UToZbQkeeM6bMOA8swtMk2P3Rwu2WSger_DOSt",dataType:"script",cache:!0,context:this,success:function(){f.each(function(){var e=a(this);e.telegraph_social(e.data("options")?a.parseJSON(e.data("options").replace(/'/g,
'"')):{})})}})};a(document).ready(k);a(document).on("tmg:page-loaded",k)})(tmgJQ);_typeof="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"===typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};
(function(a,f,k){function m(b,e){this.element=b;this.$element=a(b);this.$buttons=this.$element.find("[data-social-share-button]");this.$counter=this.$element.find(".social-share__counter");this.$counterValue=this.$element.find(".social-share__counter-value");this.settings=a.extend({},c,e);this.defaults=c;this.name="SocialShareING"}function e(){a("[data-social-share]").each(function(b,c){b=a(c);c=b.data("social-share");try{var d=JSON.parse(c.replace(/'/g,'"'))}catch(t){d={}}b.SocialShareING(d)})}var c=
{minCounterTotal:1},b={facebook:"?WT.mc_id\x3dtmg_share_fb",twitter:"?WT.mc_id\x3dtmg_share_tw",pinterest:"?WT.mc_id\x3dtmg_share_pi",whatsapp:"?WT.mc_id\x3dtmg_share_wa",linkedin:"?WT.mc_id\x3dtmg_share_li",email:"?WT.mc_id\x3dtmg_share_em"};m.prototype.init=function(){this.initButtons();this.$counter.length&&this.initCounter(this.$counter)};m.prototype.initButtons=function(){var b=this;this.$buttons.each(function(c,d){c=a(d);var e=c.data("social-share-button");c.on("click",function(a){a.preventDefault();
b.platforms[e].openPopup(b.getData(e));b.trackClickEvent(e)})})};m.prototype.initCounter=function(b){var c=this,d=[];a.each(this.settings.shareButtons,function(a,b){b.networkEnable&&d.push(c.platforms[a].fetchCount(c.getData(a)))});a.when.apply(a,d).then(function(){for(var a=arguments.length,b=Array(a),d=0;d<a;d++)b[d]=arguments[d];a=b.reduce(function(a,b){return a+b},0);a>=c.settings.minCounterTotal&&(c.$counterValue.text(a),c.$counter.addClass("is-visible"))})};m.prototype.getData=function(c){function d(b,
c){return a("meta["+b+'\x3d"'+c+'"]',"head").attr("content")}var e=this.settings.shareButtons[c],m=(d("property","og:url")||k.URL).split(/[?#]/)[0];c=m+b[c];var C=d("name","twitter:title")||d("property","og:title")||k.title,v=d("property","og:image")||a("body").find("img:first").attr("src"),x=d("property","og:description")||d("name","description");return{url:m,trackedUrl:c,title:C,image:v,description:x,via:e.account,appId:f.tmgFacebookAppId}};m.prototype.trackClickEvent=function(a){"object"===("undefined"===
typeof _satelite?"undefined":_typeof(_satelite))&&(_satellite.setVar("shareprovider",a),_satellite.track("share"))};m.prototype.platforms={email:{openPopup:function(a){var b=a.trackedUrl;location.href="mailto:?subject\x3d"+encodeURIComponent(a.title)+"\x26body\x3d"+encodeURIComponent(b)},fetchCount:function(){return 0}},facebook:{openPopup:function(a){var b=a.appId;a="https://www.facebook.com/dialog/feed?link\x3d"+encodeURIComponent(a.trackedUrl)+"\x26app_id\x3d"+b;f.open(a,"facebook","toolbar\x3d0,status\x3d0,width\x3d900,height\x3d500")},
fetchCount:function(b){b="https://graph.facebook.com/?id\x3d"+encodeURIComponent(b.url);var c=a.Deferred();a.ajax(b).done(function(a){c.resolve(a.share?a.share.share_count:0)}).fail(function(){c.resolve(0)});return c.promise()}},linkedin:{openPopup:function(a){var b=a.title,c=a.description;a="https://www.linkedin.com/shareArticle?mini\x3dtrue\x26url\x3d"+encodeURIComponent(a.trackedUrl)+"\x26title\x3d"+encodeURIComponent(b)+"\x26summary\x3d"+encodeURIComponent(c);f.open(a,"linkedin","toolbar\x3d0,status\x3d0,width\x3d900,height\x3d500")},
fetchCount:function(b){b="https://www.linkedin.com/countserv/count/share?url\x3d"+encodeURIComponent(b.url)+"\x26format\x3djson";var c=a.Deferred();a.ajax(b).done(function(a){c.resolve(a.count||0)}).fail(function(){c.resolve(0)});return c.promise()}},pinterest:{openPopup:function(a){var b=a.image,c=a.description;a="https://pinterest.com/pin/create/button/?url\x3d"+encodeURIComponent(a.trackedUrl)+"\x26media\x3d"+encodeURIComponent(b)+"\x26description\x3d"+encodeURIComponent(c);f.open(a,"pinterest",
"toolbar\x3d0,status\x3d0,width\x3d765,height\x3d657")},fetchCount:function(b){b="https://api.pinterest.com/v1/urls/count.json?url\x3d"+encodeURIComponent(b.url);var c=a.Deferred();a.ajax(b).done(function(a){c.resolve(a.count||0)}).fail(function(){c.resolve(0)});return c.promise()}},twitter:{openPopup:function(a){var b=a.title,c=a.via;c=c?"\x26via\x3d"+c:"";a="https://twitter.com/intent/tweet?url\x3d"+encodeURIComponent(a.trackedUrl)+"\x26text\x3d"+encodeURIComponent(b)+c;f.open(a,"twitter","toolbar\x3d0,status\x3d0,width\x3d765,height\x3d350")},
fetchCount:function(){return 0}},whatsapp:{openPopup:function(a){f.open("whatsapp://send?text\x3d"+encodeURIComponent(a.url))},fetchCount:function(){return 0}}};a.fn.SocialShareING=function(b){return this.each(function(){a.data(this,"SocialShareING")||a.data(this,"SocialShareING",(new m(this,b)).init())})};a(k).ready(e);a(k).on("tmg:page-loaded",e)})(tmgJQ,window,document);
(function(a,f,k){function m(a){this.$el=a;if(this.$el.attr("data-sponsor"))return this.config=this.$el.attr("data-sponsor").replace(/'/g,'"'),this.config=JSON.parse(this.config),this.isTakenOver=this.isStuck=!1,this.init(),this}var e=a("body");m.prototype={init:function(){var c=this,b="sponsor-slot--sticky container";a(k).off("scroll.stickySponsor");this.config.htmlPane&&this.config.takeOver&&this.setScrollDepth(this.config.takeOverThreshold,function(a){a&&!c.isTakenOver?(c.takeOver(),c.isTakenOver=
!0):!a&&c.isTakenOver&&(c.unTakeOver(),c.isTakenOver=!1)});this.config.sticky&&this.setScrollDepth(0,function(a){c.config.stickyMobileOnly&&"xxs"!==f.tmg.getMediaQuery()||(b+=c.config.htmlPane?" sponsor-slot__message--active":"",a&&!c.isStuck?(c.stickElement(b),c.isStuck=!0):!a&&c.isStuck&&(c.unStickElement(b),c.isStuck=!1))});a(k).trigger("scroll")},takeOver:function(){this.$el.addClass("sponsor-slot--takeover")},unTakeOver:function(){this.$el.removeClass("sponsor-slot--takeover")},stickElement:function(a){e.css({"margin-top":this.$el.outerHeight()});
this.$el.addClass(a).wrap('\x3cdiv class\x3d"sponsor-slot--sticky-container"\x3e\x3c/div\x3e')},unStickElement:function(a){e.css({"margin-top":0});this.$el.removeClass(a).unwrap('\x3cdiv class\x3d"sponsor-slot--sticky-container"\x3e\x3c/div\x3e')},onScroll:function(a,b){a=this.isScrollAtThreshold(a);b(a)},setScrollDepth:function(c,b){var d=this;a(k).on("scroll.stickySponsor",function(){var a=d.isScrollAtThreshold(c);b(a)})},isScrollAtThreshold:function(c){this.originalPosition&&this.isStuck||(this.originalPosition=
this.$el.offset().top+this.$el.height());return this.originalPosition+c<a(f).scrollTop()}};a.fn.sparkSlots=function(a){new m(this)};a(k).on("tmg:page-loaded",function(){a(".sponsor-slot__above-headline.sponsor-slot--active,.sponsor-slot__below-headline.sponsor-slot--active").sparkSlots()});a(k).ready(function(){a(".sponsor-slot__above-headline.sponsor-slot--active,.sponsor-slot__below-headline.sponsor-slot--active").sparkSlots()})})(tmgJQ,window,document);
(function(a,f,k){var m=function(c,b){this.elem=c;this.$elem=a(c);this.domElements={$title:this.$elem.find(".product-listing-sort__title"),$title_current:this.$elem.find(".product-listing-sort__title button"),$group:this.$elem.find(".product-listing-sort__items-list"),$item:this.$elem.find(".product-listing-sort__item"),$default:this.$elem.find(".product-listing-sort__item-default")}},e=function(c,b){this.elem=c;this.$elem=a(c);this.domElements={$button:this.$elem.find(".product-listing-sort__filters"),
$title:this.$elem.find(".product-listing-sort__filters .product-listing-sort__title"),$group:this.$elem.find(".product-listing-sort__filters-panel")}};m.prototype={init:function(){var c=this;c.domElements.$group.hide();this.domElements.$title.on("click",function(){c.domElements.$group.stop().slideToggle(250);c.domElements.$group.toggleClass("open")});this.domElements.$item.on("click",function(){c.domElements.$item.attr("aria-checked","false");a(this).attr("aria-checked","true");c.domElements.$group.slideUp(250);
c.domElements.$title.removeClass("open");var b=a(this).html();c.domElements.$title_current.html(b)})}};e.prototype={init:function(){var c=this;c.domElements.$group.hide();this.domElements.$title.on("click",function(){c.domElements.$group.slideToggle();a(this).toggleClass("open");c.domElements.$button.toggleClass("product-listing-sort__button-open")})}};a.fn.dropDownSort=function(c){return this.each(function(){if(a.data(this,"dropDownSort"))return a.data(this,"dropDownSort");a.data(this,"dropDownSort",
(new m(this,c)).init())})};a.fn.dropDownFilter=function(c){return this.each(function(){if(a.data(this,"dropDownFilter"))return a.data(this,"dropDownFilter");a.data(this,"dropDownFilter",(new e(this,c)).init())})};f.dropDownSort=m;f.dropDownFilter=e;f=function(){a(".product-listing-sort__sort").dropDownSort();a(".product-listing-sort").dropDownFilter()};a(k).ready(f);a(k).on("tmg:page-loaded",f)})(tmgJQ,window,document);
(function(a,f,k){function m(b,c){this.options=a.extend({},e,c);this.tabWrap=a(b);this.tabLink=this.tabWrap.find("."+this.options.classes.tabLink);this.tabContainer=this.tabWrap.find("."+this.options.classes.tabContainer);this.init()}var e={classes:{active:"is-active",tabLink:"tabs__tab-link",tabContainer:"tabs__container",tabContent:"tabs__tab-content"}};m.prototype.init=function(){this.hashCheck();this.attachEvents()};m.prototype.hashCheck=function(b){var c=f.location.hash,e=a(".tabs__tab-item");
c=c.split("?")[0].substr(1);var k=e.hasClass(this.options.classes.active);var m=c&&0<e.has('[href\x3d"#'+c+'"]').length;var C=c&&0<this.tabContainer.find("#"+c).length;c&&k&&!m&&!C||!c||(e=e.find("a:first").attr("href"),"undefined"!==typeof e&&(e=e.substr(1)),!m&&C&&(c=this.tabContainer.find("#"+c).parents(this.options.classes.tabContent).attr("id")),c=a("."+c+"-tab").length?c:e,this.showTab(c,b))};m.prototype.attachEvents=function(){var b=this;this.tabLink.on("click",function(a){a.preventDefault();
b.updateHash(this.hash,!0)});a(f).on("hashchange",function(a,c){b.hashCheck(c)})};m.prototype.showTab=function(a,c){this.tabWrap.find("li."+this.options.classes.active).attr("aria-selected","false");this.tabContainer.find(" ."+this.options.classes.tabContent).attr("aria-hidden","true");this.tabWrap.find("."+this.options.classes.active).removeClass(this.options.classes.active);this.tabWrap.find('a[href$\x3d"'+a+'"]').closest("li").addClass(this.options.classes.active).attr("aria-selected","true");
this.tabContainer.find("."+a+"-tab").addClass(this.options.classes.active).attr("aria-hidden","false");"undefined"===typeof c&&k.getElementById(a).scrollIntoView(!0)};m.prototype.updateHash=function(b,c){history.pushState?(history.pushState(null,null,f.location.origin+f.location.pathname+f.location.search+b),a(f).trigger("hashchange",[c])):f.location.hash=b};a.fn.telegraph_tabs=function(b){return this.each(function(){a.data(this,"telegraph_tabs")&&a.data(this,"telegraph_tabs",null);a.data(this,"telegraph_tabs",
new m(this,b))})};var c=function(){a(".js-tabs").each(function(){a(this).telegraph_tabs()})};a(k).ready(c);a(k).on("tmg:page-loaded",c)})(tmgJQ,window,document);
(function(a,f,k){var m=function(c,b){this.elem=c;this.$elem=a(c);this.options=b;this.isMobile=cssua.ua.mobile;this.isSafari=cssua.ua.safari;this.initalizedEventFired=!1;this.domElements={};this.breakpoints=[{width:0,classMin:"tmgv-bp-min-xxs",classMax:"tmgv-bp-max-xxs"},{width:480,classMin:"tmgv-bp-min-xs",classMax:"tmgv-bp-max-xs"},{width:730,classMin:"tmgv-bp-min-sm",classMax:"tmgv-bp-max-sm"},{width:980,classMin:"tmgv-bp-min-md",classMax:"tmgv-bp-max-md"},{width:1370,classMin:"tmgv-bp-min-lg",
classMax:"tmgv-bp-max-lg"}]};m.prototype={defaults:{videoIndex:0,videoId:"",videoSupplier:"",autoplay:!1,autoscale:!1,type:"normal",ooyalaOptions:{pcode:f.tmgOoyala.api.pcode,playerBrandingId:f.tmgOoyala.api.playerBrandingId,platform:"html5",videoId:"",autoplay:!0,debug:!1,preload:!0,encodingPriority:["hls","dash","mp4","hds","webm"],skin:{config:"/etc/designs/telegraph/core/clientlibs/core/vendor/ooyala/skin.json"},overlayOptions:{videoThumbnailUrl:"",videoShareTitle:""}}},init:function(){this.options=
a.extend(!0,{},this.defaults,this.options);this.options.ooyalaOptions.videoId=this.options.videoId;!0===a(k).data("video-autoplay-on")?this.options.autoplay=!0:!1===a(k).data("video-autoplay-on")&&(this.options.autoplay=!1);this.isMobile&&(this.options.ooyalaOptions.autoplay=!1);this.id="js-video-player-"+Math.uuidFast();this.findDomElements();if(0!==this.domElements.$content.length)return this.updateDomElements(),this.options.autoplay||this.isMobile?this.initPlayer():this.attachEvents(),this.setBreakpointClass(),
this.isMobile?this.$elem.addClass("state-mobile-view"):this.$elem.addClass("state-desktop-view"),this.videoSupplier=(this.$elem.data("supplier")||"").toLowerCase().replace(/[^a-z0-9]/g,""),this},findDomElements:function(){this.domElements.$content=this.$elem.find(".js-video-player__component-content");this.domElements.$image=this.$elem.find(".js-video-player__image");this.domElements.$imageContainer=this.$elem.find(".js-video-player__image-container");this.domElements.$imageContainerTitle=this.$elem.find(".js-video-player__image-controls-title");
this.domElements.$imageControlsPlay=this.$elem.find(".js-video-player__image-controls-play");this.domElements.$player=this.$elem.find(".js-video-player__player")},updateDomElements:function(){this.domElements.$player.attr("id",this.id)},attachEvents:function(){a(f).on("resize",a.proxy(this.setBreakpointClass,this));this.domElements.$imageControlsPlay.on("click",a.proxy(function(){this.initPlayer();this.domElements.$imageContainer.hide()},this))},attachRumMarks:function(){var a=this;0===this.options.videoIndex&&
(this.sentPerformanceMarks={},this.player.mb.subscribe("willPlayAds","tmg",function(b){a.sentPerformanceMarks[b]||(RUM.mark("js_ooyala_ads_will_play"),a.sentPerformanceMarks[b]=!0)}),this.player.mb.subscribe("willPlayFromBeginning","tmg",function(b){a.sentPerformanceMarks[b]||(RUM.mark("js_ooyala_video_will_play"),a.sentPerformanceMarks[b]=!0)}),this.player.mb.subscribe("playbackReady","tmg",function(b){a.sentPerformanceMarks[b]||(RUM.mark("js_ooyala_playback_ready"),a.sentPerformanceMarks[b]=!0)}),
this.player.mb.subscribe("playbackStartError","",function(){throw Error("OOYALA_PLAYBACK_START_ERROR");}),this.player.mb.subscribe("playbackMidstreamError","",function(){throw Error("OOYALA_PLAYBACK_MIDSTREAM_ERROR");}),this.player.mb.subscribe("adsError","",function(){throw Error("OOYALA_ADS_ERROR");}))},setBreakpointClass:function(){for(var c="undefined"!=typeof this.domElements.$innerWrapper?this.domElements.$innerWrapper.width():this.domElements.$player.width(),b=0;b<this.breakpoints.length;b++){var d=
this.$elem.hasClass(this.breakpoints[b].classMin);c>this.breakpoints[b].width&&!d?this.$elem.addClass(this.breakpoints[b].classMin):c<=this.breakpoints[b].width&&d&&this.$elem.removeClass(this.breakpoints[b].classMin);d=this.$elem.hasClass(this.breakpoints[b].classMax);c<=this.breakpoints[b].width&&!d?this.$elem.addClass(this.breakpoints[b].classMax):c>this.breakpoints[b].width&&d&&this.$elem.removeClass(this.breakpoints[b].classMax)}setTimeout(function(){a(k).trigger("tmg:ooyala-player-breakpoint-class-set")},
100)},initPlayer:function(){this.domElements.$content.off("click");void 0===f.OO?this.loadExternalScripts():this.initExternalPlayer()},initExternalPlayer:function(){var c="",b=k.querySelector('meta[name\x3d"tmgads.businessSegment"]').getAttribute("content")||"*null",d=k.querySelector('meta[name\x3d"DCSext.Category"]').getAttribute("content")||"*null";void 0!==f.tmgAds&&void 0!==tmgAds.dfp&&(c="","sensitive"===this.options.type&&(c+=";sv\x3d1"),""!==this.videoSupplier&&(c+=";vidsrc\x3d"+this.videoSupplier),
c=tmgAdsBuildAd("tmgads_body_vid"+(this.options.videoIndex?"_"+this.options.videoIndex:""),"vid\x3d"+this.options.videoId+(c?c:""),"").fetchUrl());b={actualDuration:this.$elem.attr("data-video-duration"),videoType:this.$elem.attr("data-video-type"),autoplay:this.isSafari?!1:this.$elem.attr("data-video-autoplay"),"google-ima-ads-manager":{useGoogleAdUI:!0,useGoogleCountdown:!0,iframeZIndex:0,all_ads:[{position_type:"r",tag_url:c}]},ComScoreOoyalaPlugin:{c2:"6035736",labelmapping:'c3\x3d"TheTelegraph", c4\x3d"'+
b+'", c6\x3d"'+d+'", ns_st_st\x3d"Telegraph", ns_st_pu\x3d"*null", ns_st_pr\x3d"*null", ns_st_ep\x3dVideoContentMetadata.title, ns_st_sn\x3d"*null", ns_st_en\x3d"*null", ns_st_ge\x3d"*null", ns_st_ti\x3d"*null", ns_st_ia\x3d"*null", ns_st_ce\x3d"*null", ns_st_ddt\x3d"*null", ns_st_tdt\x3d"*null"'},overlayOptions:{videoThumbnailUrl:this.domElements.$image.first().attr("src"),videoShareTitle:this.domElements.$imageContainerTitle.text()},onCreate:function(a){(f._cbv||(f._cbv=[])).push(a)}};k.documentElement.classList.contains("ua-ie-11")&&
delete b["google-ima-ads-manager"];this.player=f.OO.Player.create(this.id,this.options.videoId,a.extend(!0,{},this.options.ooyalaOptions,b));this.attachRumMarks();b=new CustomEvent("dtm:ooyala-player-initialised",{detail:{oplayer:this.player}});f.dispatchEvent(b);b=b="";var e=this.options.videoId;b=f.location.pathname.endsWith(".html")||f.CQ&&f.CQ.WCM?f.location.pathname.split(".html")[0]:f.location.pathname;b="/bin/telegraph/video/recommendation/?path\x3d"+b+"\x26videoId\x3d"+this.options.videoId+
"\x26searchPath\x3d"+this.options.ooyalaOptions.overlayOptions.searchPath+"\x26videoType\x3d"+this.$elem.attr("data-video-type")+"";"true"!==this.options.ooyalaOptions.overlayOptions.autoForward||this.isMobile||this.getRelatedVideosData(b,function(a){f.recommendedVideos=a.results});this.player.mb.subscribe("playbackReady","",a.proxy(function(b){this.options.autoscale&&this.domElements.$content.css({height:0,"padding-bottom":(100/this.domElements.$player.data("frz-aspect")).toFixed(2)+"%"});this.isMobile&&
this.$elem.find(".innerWrapper .oo-state-screen-poster").click(a.proxy(function(){this.domElements.$imageContainer.is(":visible")&&this.domElements.$imageContainer.hide()},this));this.setBreakpointClass();this.$elem.attr("data-video-player--player-loaded",!0);this.domElements.$innerWrapper=this.$elem.find(".innerWrapper")},this));this.player.mb.subscribe("fullscreenChanged","",a.proxy(function(a,b){b?this.$elem.addClass("video-player-fullscreen"):this.$elem.removeClass("video-player-fullscreen");
this.setBreakpointClass()},this));this.player.mb.subscribe("played","",a.proxy(function(b){a(k).trigger("tmg:video-played");if(f.recommendedVideos.length){for(i=0;i<f.recommendedVideos.length;i++){var c="";if(f.recommendedVideos[i].embed_code!==e){c=f.recommendedVideos[i].embed_code;f.recommendedVideos.splice(i,1);break}}e=c;this.player.setEmbedCode(c,{autoplay:!0})}},this));this.isMobile&&(this.player.subscribe("playing","",a.proxy(function(a){this.fireInitalizedEvent()},this)),this.player.subscribe("error",
"",a.proxy(function(){this.domElements.$imageContainer.hide()},this)));this.isMobile||this.fireInitalizedEvent()},getRelatedVideosData:function(c,b){a.getJSON(c,function(a){b(a)})},fireInitalizedEvent:function(){if(!this.initalizedEventFired){var c=a.Event("tmg.components.videoPlayer.initialized");this.$elem.trigger(c);this.initalizedEventFired=!0}},loadExternalScripts:function(){var a=this;this.domElements.$content.off("click");yepnope({load:f.clientlibs.js.ooyala_core.load,complete:function(){a.initExternalScripts.call(a)}})},
initExternalScripts:function(){if("undefined"==typeof f.OO)setTimeout(a.proxy(this.initExternalScripts,this),50);else{var c=this;f.OO.ready(function(){c.initExternalPlayer.call(c)})}}};m.defaults=m.prototype.defaults;a.fn.telegraph_videoPlayer=function(c){return this.each(function(){if(!a(this).data("telegraph_videoPlayer")){if(!c){var b=a(this);c=b.data("options")?a.parseJSON(b.data("options").replace(/'/g,'"')):{};c.videoIndex=+new Date}a(this).data("telegraph_videoPlayer",(new m(this,c)).init())}})};
var e=function(){("undefined"===typeof f.tmg||"undefined"!==typeof f.tmg&&!0!==f.tmg.PAYWALL_ON)&&a(".js-video-player").each(function(c){var b=a(this);b.telegraph_videoPlayer(b.data("options")?a.extend(!0,a.parseJSON(b.data("options").replace(/'/g,'"')),{videoIndex:c}):{videoIndex:c})})};-1===f.location.href.indexOf("playlist\x3d")&&a(k).ready(e);a(k).on("tmg:page-loaded",e)})(tmgJQ,window,document);
(function(a,f,k,m){var e={buildAnalyticsString:function(a,b,d,e,f){b&&(a+="_"+b);return JSON.stringify({componentName:a,destination:d,linkType:e,pageOfUse:f})},escapeSeparatorsInString:function(a){return a.replace(/[;_]/g,"-")},readPagePath:function(){var a=window.location.pathname;return(a=a.replace(/\//g," ").trim().replace(/\s/g,"_"))||"portal"},getComponentName:function(a){return(a.attr("class")||"").split(/\s+/)[0]||""},readComponentWrapper:function(a){return a.closest(".component")},readComponentHeading:function(a){a=
a.find(".component-heading, .segment-container__title");var b="";0!==a.length&&(b=a.first().text().replace(/ /g,"-"));return this.escapeSeparatorsInString(b.trim())},isImage:function(a){return a.is("img")||!!a.find(".gallery-teaser__image").length},isGalleryIcon:function(a){return a.is(".list-of-entities__icon, .gallery-teaser__button")},isVideoIcon:function(a){return a.is(".video-icon__play, .video-icon__arrow, .video-icon__duration")},isLogoBar:function(a){return a.is(".header-logobar__img")},readLabelFromListItemBody:function(a){var b=
a.parent().find(".list-of-entities__item-body-headline, .hero-block__item-body-headline").first();0!==b.has(".live-indicator").length&&(b=b.find("a").first());a.hasClass("gallery-teaser__content")&&(b=a.find(".gallery-teaser__info").first());return b.text().trim().replace(/[,\s]+/g,"-")},readLabelFromImgAlt:function(a){a=a.find(".header-logobar__img").first().attr("alt");var b="";a&&(b=a.trim().replace(/[,\s]+/g,"-"));return b},readLinkLabel:function(a,b){a=this.isLogoBar(b)?this.readLabelFromImgAlt(a):
this.isImage(b)?this.readLabelFromListItemBody(a):this.isGalleryIcon(b)||this.isVideoIcon(b)?this.readLabelFromListItemBody(a):a.first().text().trim().replace(/[,\s]+/g,"-");-1<a.indexOf("-View-gallery")&&(a=a.replace("-View-gallery",""));return this.escapeSeparatorsInString(a)},readElementClicked:function(a){return this.isImage(a)?"img":this.isGalleryIcon(a)||this.isVideoIcon(a)?"ico":"txt"},createIcid:function(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},b=a.brand;b=void 0===
b?m.getChannel():b;var d=a.product;d=void 0===d?"generic":d;var e=a.mediaType;e=void 0===e?"generic":e;var f=a.contentType;f=void 0===f?m.getContentType():f;a=a.contentLocation;return b+"_"+d+"_"+e+"_"+f+"_"+(void 0===a?"generic":a)},isDtmEnabled:function(){return!!window._satellite},processIcids:function(){Array.from(document.querySelectorAll(0<arguments.length&&void 0!==arguments[0]?arguments[0]:"[data-icid]")).forEach(function(a){var b=f.tryParse(a.dataset.icid);b=e.createIcid(b);var c=a.getAttribute("href");
c&&(b=tmg.setQuerystringParam(c,"ICID",b),a.setAttribute("href",b))})}};window.TMG_COMPONENT_TRACKING=window.TMG_COMPONENT_TRACKING||e;(function(){e.isDtmEnabled()&&(a(".component.list-of-entities a[href^\x3d\"/\"]:not(.midArticleUnit .component.list-of-entities a), .component.hero-block a[href^\x3d'/'], .component.segment-container a[href^\x3d'/'], .component.gallery-teaser a[href^\x3d'/'], .component.article-body-image a[href^\x3d'/'], .component.article-body-text a[href^\x3d'/'], .component.list-of-tags a[href^\x3d'/'], .component.byline a[href^\x3d'/'], .component.inline-content a[href^\x3d'/'], .component.quote a[href^\x3d'/'], .component.header-breadcrumbs a[href^\x3d'/'], .component.header-nav-local a[href^\x3d'/'], .component.header-nav-primary a[href^\x3d'/'], .component.header-nav-global a[href^\x3d'/'], .component.overlay-nav-primary a[href^\x3d'/'], .component.breadcrumbs a[href^\x3d'/'], .component.header-logobar a").on("click",
function(c){var b=a(c.target),d=a(this);c=e.readLinkLabel(d,b);var f=e.readPagePath();b=e.readElementClicked(b);var k=e.readComponentWrapper(d);d=e.getComponentName(k);k=e.readComponentHeading(k);c=e.buildAnalyticsString(d,k,c,b,f);window._satellite.setCookie("tmgComponentTracking",encodeURIComponent(c),1)}),e.processIcids())})()})(tmgJQ,tmg.json,tmg.hasQuerystring,tmg.page);
(function(a,f,k){var m=function(c,b){this.$localNav=a(c);this.listElementsWidth=this.containterWidth=0;this.options=b;this.config={};this.init()};m.prototype={defaults:{localNavExpandedSelector:"header-nav-local--expanded",listSelector:".header-nav-local__list",listItemsSelector:".header-nav-local__item",buttonSelector:".header-nav-local__button",buttonTextSelector:".header-nav-local__button-text",buttonShowSelector:"header-nav-local__button--show",buttonExpandedLabel:"expanded-label",buttonNoExpandedLabel:"no-expanded-label"},
init:function(){this.config=a.extend({},this.defaults,this.options);this.$list=this.$localNav.find(this.config.listSelector);this.$listItems=this.$localNav.find(this.config.listItemsSelector);this.$button=this.$localNav.find(this.config.buttonSelector);this.$buttonText=this.$localNav.find(this.config.buttonTextSelector);this.refresh();this.attachEvents()},refresh:function(){this.setButtonVisibility()},attachEvents:function(){this.buttonClick();this.windowResize()},buttonClick:function(){this.$button.on("click",
function(){this.$localNav.toggleClass(this.config.localNavExpandedSelector);this.changeButtonLabel()}.bind(this))},windowResize:function(){a(f).on("resize",function(){this.refresh()}.bind(this))},setButtonVisibility:function(){this.containterWidth=this.$list.width();this.listElementsWidth=0;this.$listItems.each(function(c,b){this.listElementsWidth+=a(b).width()}.bind(this));this.listElementsWidth>this.containterWidth?this.$button.addClass(this.config.buttonShowSelector):this.$button.removeClass(this.config.buttonShowSelector)},
changeButtonLabel:function(){var a=this.$localNav.hasClass(this.config.localNavExpandedSelector)?this.$buttonText.data(this.config.buttonExpandedLabel):this.$buttonText.data(this.config.buttonNoExpandedLabel);this.$buttonText.text(a)}};var e=function(){var c=[],b;a(".header-nav-local").each(function(){a.data(this,"LocalNav")||(b=new m(this),c.push(b),a.data(this,"LocalNav",b))})};a(k).ready(e);a(k).on("tmg:page-loaded",e)})(tmgJQ,window,document);
(function(a,f,k){var m=function(e,c){this.$primaryNav=a(e);this.options=c;this.config={};this.init()};m.prototype={defaults:{primaryNavExpandedSelector:"header-nav-primary--expanded",buttonSelector:".header-nav-primary__button",buttonTextSelector:".header-nav-primary__button-text",buttonShowSelector:"header-nav-primary__button--show",buttonExpandedLabel:"expanded-label",buttonNoExpandedLabel:"no-expanded-label"},init:function(){this.config=a.extend({},this.defaults,this.options);this.$button=this.$primaryNav.find(this.config.buttonSelector);
this.$buttonText=this.$primaryNav.find(this.config.buttonTextSelector);this.attachEvents()},attachEvents:function(){this.buttonClick()},buttonClick:function(){this.$button.on("click",function(){this.$primaryNav.toggleClass(this.config.primaryNavExpandedSelector);this.changeButtonLabel()}.bind(this))},changeButtonLabel:function(){var a=this.$primaryNav.hasClass(this.config.primaryNavExpandedSelector)?this.$buttonText.data(this.config.buttonExpandedLabel):this.$buttonText.data(this.config.buttonNoExpandedLabel);
this.$buttonText.text(a)}};f=function(){return a(".header-nav-primary--theme").each(function(){a.data(this,"PrimaryNav")||a.data(this,"PrimaryNav",new m(this))})};a(k).ready(f);a(k).on("tmg:page-loaded",f)})(tmgJQ,window,document);
(function(a,f,k){var m=function(e,c){this.$headerOverlayButton=a(e);this.$mainContent=null;this.options=c;this.config={};this.init()};m.prototype={defaults:{overlayNavSelector:".snippet-overlay-nav",overlayNavShowSelector:"snippet-overlay-nav--show",overlayNavCloseButton:".overlay-nav-button__button",mainContentSelector:".main-content",mainContentOverlayOnClass:"sr-only"},init:function(){this.config=a.extend({},this.defaults,this.options);this.$overlayNav=a(this.config.overlayNavSelector);this.$mainContent=
a(this.config.mainContentSelector);this.attachEvent()},attachEvent:function(){this.$headerOverlayButton.on("click",function(){this.showOverlayNav();this.addFocusToCloseButton()}.bind(this))},showOverlayNav:function(){this.$overlayNav.addClass(this.config.overlayNavShowSelector);this.$mainContent&&this.$mainContent.addClass(this.config.mainContentOverlayOnClass)},addFocusToCloseButton:function(){var e=a(this.config.overlayNavCloseButton);e.length&&e[0].focus()}};f=function(){a(".header-nav-overlay-button").each(function(){a.data(this,
"HeaderOverlayButton")||a.data(this,"HeaderOverlayButton",new m(this))})};a(k).ready(f);a(k).on("tmg:page-loaded",f)})(tmgJQ,window,document);
(function(a,f,k,m){function e(b,c){this.$element=a(b);this.$links=this.$element.find("a[href]")}function c(){a(".offer").each(function(){var b=a(this).data();b.Offer||(b.Offer=(new e(this)).init())})}e.prototype={init:function(){this.$links.each(function(a,c){c.href=f.updateRedirectParam(c.href,m.location.href)})}};a(m).ready(c);a(m).on("tmg:page-loaded",c)})(tmgJQ,tmg,window,document);
(function(a,f){function k(){this.overlayClickElem=f.querySelector('[data-js\x3d"overlay-continuation__handler"]');this.overlayContainer=f.querySelector('[data-js\x3d"overlay-continuation"]');this.overlayClose=f.querySelector('[data-js\x3d"overlay-continuation__close"]');this.overlayTimeout=null;this.overlayClickElem&&(this.overlayAnchor=this.overlayClickElem.href,this.events())}k.prototype.events=function(){var a=this;this.overlayClickElem.addEventListener("click",function(e){e.preventDefault();a.showOverlay()},
!1);this.overlayClose.addEventListener("click",function(){clearTimeout(a.overlayTimeout);a.overlayContainer.classList.remove("overlay-continuation__visible")})};k.prototype.showOverlay=function(){var a=this;void 0!==this.overlayContainer&&this.overlayContainer.classList.add("overlay-continuation__visible");this.overlayTimeout=setTimeout(function(){a.closeAndRedirect()},5E3)};k.prototype.closeAndRedirect=function(){a.location.href=this.overlayAnchor};f.addEventListener("DOMContentLoaded",function(){new k});
f.addEventListener("tmg:page-loaded",new k)})(window,document);
(function(a,f,k){var m=function(e,c){this.$overlayNavButton=a(e);this.$mainContent=null;this.options=c;this.config={};this.init()};m.prototype={defaults:{overlayNavButtonSelector:".overlay-nav-button__button",overlayNavSelector:".snippet-overlay-nav",overlayNavShowSelector:"snippet-overlay-nav--show",headerNavOverlayButton:".header-nav-overlay-button__button",mainContentSelector:".main-content",mainContentOverlayOnClass:"sr-only"},init:function(){this.config=a.extend({},this.defaults,this.options);
this.$overlayNavButton=this.$overlayNavButton.find(this.config.overlayNavButtonSelector);this.$overlayNav=a(this.config.overlayNavSelector);this.$mainContent=a(this.config.mainContentSelector);this.attachEvents()},attachEvents:function(){this.handleClick();this.handleEsc()},handleClick:function(){this.$overlayNavButton.on("click",function(){this.closeNavOverlay()}.bind(this))},handleEsc:function(){a(k).keydown(function(a){27==a.keyCode&&this.closeNavOverlay()}.bind(this))},closeNavOverlay:function(){this.hideOverlayNav();
this.addFocusToHeaderNavButton()},hideOverlayNav:function(){this.$mainContent&&this.$mainContent.removeClass(this.config.mainContentOverlayOnClass);this.$overlayNav.removeClass(this.config.overlayNavShowSelector)},addFocusToHeaderNavButton:function(){var e=a(this.config.headerNavOverlayButton);e.length&&e[0].focus()}};f=function(){var e=[];a(".overlay-nav-button").each(function(){a.data(this,"overlayNavButtons")||a.data(this,"overlayNavButtons",e.push(new m(this)))})};a(k).ready(f);a(k).on("tmg:page-loaded",
f)})(tmgJQ,window,document);
(function(a,f,k){var m=function(e,c){this.$overlayNavSecondary=a(e);this.options=c;this.config={};this.init()};m.prototype={defaults:{overlayNavPrimaryItemsSelector:".overlay-nav-primary__item",overlayNavPrimaryItemLinkClass:".overlay-nav-primary__link",overlayNavSecondaryItemsSelector:".overlay-nav-secondary__item"},init:function(){this.config=a.extend({},this.defaults,this.options);this.$overlayNavPrimaryItems=a(this.config.overlayNavPrimaryItemsSelector);this.$overlayNavSecondaryItems=this.$overlayNavSecondary.find(this.config.overlayNavSecondaryItemsSelector);
this.attachEvents()},attachEvents:function(){this.handleBlur()},handleBlur:function(){this.$overlayNavSecondaryItems.last().on("focusout",function(){this.$overlayNavPrimaryItems.first().children(this.config.overlayNavPrimaryItemLinkClass).focus()}.bind(this))}};a(k).on("ready tmg:page-loaded",function(){});f=function(){var e=[];a(".overlay-nav-secondary").each(function(){a.data(this,"OverlayNavSecondary")||a.data(this,"OverlayNavSecondary",e.push(new m(this)))})};a(k).ready(f);a(k).on("tmg:page-loaded",
f)})(tmgJQ,window,document);
(function(a,f,k){var m=(a.fn.telegraph_listOfEntities?"noclash_":"")+"telegraph_listOfEntities",e=function(c,b){this.options=b;this.elem=c;this.$elem=a(c);this.dataOptions=(this.dataOptions=this.$elem.data("options"))?a.parseJSON(this.dataOptions.replace(/'/g,'"')):{};this.domElements={}};e.prototype={defaults:{isMobile:0,moreless:{from:-1,speed:300,breakpoint:"xxs",text:{more:"Show more",less:"Show less"}},selectors:{listItems:".list-of-entities__item",listItemsMoreless:".list-of-entities__item.is-moreless",morelessButton:".component-footer-link",
root:"html"},classNames:{isMoreless:"is-moreless",uaMob:"ua-mobile"},attrs:{ariaHidden:"aria-hidden",moreless:"data-moreless"}},init:function(){this.options=a.extend(!0,{},this.defaults,this.dataOptions,this.options);this.options.isMobile=a(this.options.selectors.root).hasClass(this.options.classNames.uaMob);this.findDomElements();this.attachEvents();this.morelessInit();return this},findDomElements:function(){this.domElements.$listItems=this.$elem.find(this.options.selectors.listItems);this.domElements.$listItemsMoreless=
[];this.domElements.$morelessButton=this.$elem.find(this.options.selectors.morelessButton)},attachEvents:function(){},morelessInit:function(){var a=f.tmg.getMediaQuery(),b=this.options.moreless,d=this.utils.getKeysFromHash(tmg.viewport.mediaQueriesBreakpoints);a=d.indexOf(a);d=d.indexOf(b.breakpoint);var e=this.domElements.$listItems.length;-1<b.from&&d>=a&&e>b.from&&this.morelessApply()},morelessApply:function(){var c=this,b=c.options.moreless.from;c.options.moreless.open=!0;c.domElements.$listItems.each(function(d,
e){d>=b&&a(e).addClass(c.options.classNames.isMoreless)});c.domElements.$listItemsMoreless=c.$elem.find(c.options.selectors.listItemsMoreless);c.options.moreless.speed=c.options.isMobile?0:c.options.moreless.speed;c.moreless(!0);c.$elem.on("click",c.options.selectors.morelessButton,function(a){a.preventDefault();c.moreless()})},moreless:function(a){if(!this.options.moreless.busy){var b=this,c=b.options.moreless;a=a?0:c.speed;var e=!c.open;c=e?c.text.less:c.text.more;b.options.moreless.busy=!0;b.$elem.attr(b.options.attrs.moreless,
e);b.options.moreless.open=e;b.domElements.$morelessButton.text(c);b.domElements.$listItemsMoreless.slideToggle(a,function(){b.domElements.$listItemsMoreless.attr(b.options.attrs.ariaHidden,!e);b.options.moreless.busy=!1})}},utils:{getKeysFromHash:function(a){var b=[],c;for(c in a)b.push(c);return b}}};a.fn[m]=function(c){return this.each(function(){a(this).data(m)||a(this).data(m,(new e(this,c)).init())})};a.fn[m+"_init"]=function(){a(".js-list-of-entities")[m]()};a(k).on("ready tmg:page-loaded",
function(){a(".js-list-of-entities")[m]()})})(tmgJQ,window,document);
(function(a,f,k){var m=a("html").hasClass("touch"),e=function(b,c){this.options=c;this.elem=b;this.$elem=a(b);this.$listContainer=this.$elem.find(".list-of-entities__container");this.$listContainerContainer=this.$listContainer.parents("div:first");this.$listItems=this.$elem.find(".list-of-entities__item");this.$listJSContainer=this.$elem.find(".js-list-of-entities");this.$tags=this.$elem.find(".js-list-of-entities");this.dataOptions=this.$listJSContainer.data("options")?a.parseJSON(this.$listJSContainer.data("options").replace(/'/g,
'"')):{};this.domElements={}};e.prototype={defaults:{dictionary:{previous:"Previous",next:"Next"},animationTime:500,clickDragTime:300,dragMinimumMove:5,currentSelectedIndex:0,paddingLeft:0,noArrows:!1,sliderMobileOnly:!1,active:!0,clickMoveAway:!0,mediaQuery:"",arrowsContainerTpl:'\x3cdiv class\x3d"list-slider__arrows"\x3e',arrowTpl:'\x3ca href\x3d"#" class\x3d"arrow"\x3e\x3cspan class\x3d"arrow__inner"\x3e\x3cspan class\x3d"arrow__text"\x3e{{TEXT}}\x3c/span\x3e\x3c/span\x3e\x3c/a\x3e'},init:function(){if(0===
this.$listItems.length)return!1;this.options=a.extend({},this.defaults,this.dataOptions,this.options);0<=this.$elem.data("selected-item")&&(this.options.currentSelectedIndex=this.$elem.data("selected-item"));this.options.paddingLeft=parseInt(this.$elem.css("padding-left"));this.$listJSContainer.wrap(this.options.arrowsContainerTpl);this.$arrowsContainer=this.$elem.find(".list-slider__arrows");this.$listContainer.data("margin-left",this.$listContainer.css("margin-left"));!0===this.options.noArrows?
this.$elem.addClass("list-slider--no-arrows"):this.$arrowsContainer.append(this.createArrow("arrow__left","slideLeft",this.options.dictionary.previous)).append(this.createArrow("arrow__right","slideRight",this.options.dictionary.next));this.$arrows=this.$elem.find(".arrow");"true"===this.options.sliderMobileOnly&&this.$elem.addClass("list-slider--mobile-only");this.$elem.selectItem=this.selectItem;this.attachEvents();var b=a.proxy(this.selectNextItemEvent,this);this.$elem.on("list-slider:select-next-item",
b);this.selectItem(this.options.currentSelectedIndex);this.enableArrows(parseInt(this.$listContainer.css("margin-left")));return this},attachEvents:function(){var b=this,c=a.proxy(this.mouseDownEvent,this),e=a.proxy(this.mouseMoveEvent,this),m=a.proxy(this.dragStartEvent,this),t=a.proxy(this.clickEvent,this),C=a.proxy(this.mouseUpEvent,this),v=a.proxy(this.resizeEvent,this),x=a.proxy(this.selectNextItem,this),z=a.proxy(this.selectFirstItem,this);b.$listContainer.on("mousedown touchstart",c).on("mousemove",
e).on("selectFirstItem",z).on("selectNextItem",x);b.$listItems.on("click touchend",t).on("dragstart","a, img",m);a(k).on("mouseup touchend",C).on("tmg:video-played",function(){!0===a(k).data("video-autoplay-on")&&b.selectNextItem()});a(f).resize(v).trigger("resize")},selectNextItemEvent:function(a){this.selectNextItem()},eventXValue:function(a){0===a.type.indexOf("touch")&&(a=a.originalEvent.touches[0]||a.originalEvent.changedTouches[0]);return a=a.pageX},resizeEvent:function(a){a=tmg.getMediaQuery();
this.options.mediaQuery!=a&&(this.options.mediaQuery=a,"true"!==this.options.sliderMobileOnly||"xxs"===this.options.mediaQuery?(this.$elem.addClass("list-slider--active"),this.$listContainer.width(5E3),this.$listContainer.width(this.$listItems.eq(0).width()*this.$listItems.length),this.$listContainer.css("margin-left",0),this.options.active=!0):(this.$listContainer.width("auto"),this.$listContainer.css("margin-left",this.$listContainer.data("margin-left")),this.$elem.removeClass("list-slider--active"),
this.options.active=!1))},dragStartEvent:function(a){a.preventDefault()},clickEvent:function(b){var c=b.currentTarget,e=b.target;!0===this.options.active&&(b.preventDefault(),b.stopPropagation(),m?Math.abs(this.eventXValue(b)-this.$listContainer.data("start-move"))<this.options.dragMinimumMove:b.timeStamp-this.$listContainer.data("click-start")<this.options.clickDragTime||Math.abs(this.eventXValue(b)-this.$listContainer.data("start-move"))<this.options.dragMinimumMove)&&(!0===this.options.clickMoveAway?
"A"===e.tagName&&(f.location.href=e.href):("A"===e.tagName&&a(k).trigger("tmg:slider-list-item-anchor-clicked",[e]),this.selectItem(a(c).index())))},mouseUpEvent:function(b){var c=a(".list-slider").find(".list-of-entities__container");a.each(c,function(c,d){d=a(d);d.hasClass("dragging")&&(b.preventDefault(),b.stopPropagation(),setTimeout(function(){d.removeClass("dragging")},10))})},mouseDownEvent:function(a){!0===this.options.active&&(this.$listContainer.addClass("dragging"),this.$listContainer.data("click-start",
a.timeStamp),this.$listContainer.data("start-move",this.eventXValue(a)),this.$listContainer.data("start-margin",parseInt(this.$listContainer.css("margin-left"))))},mouseMoveEvent:function(a){!0===this.options.active&&this.$listContainer.hasClass("dragging")&&(a=this.$listContainer.data("start-margin")+this.eventXValue(a)-this.$listContainer.data("start-move"),this.$listContainer.css("margin-left",this.validateMargin(a)))},createArrow:function(b,c,e){b=a(this.options.arrowTpl.replace("{{TEXT}}",e)).addClass(b);
var d=this;b.on("click",function(a){a.preventDefault();d[c]()});return b},selectItem:function(a){this.slideTo(a)},slideLeft:function(a){this.slide("+")},slideRight:function(a){this.slide("-")},slide:function(a){if(m)return!1;var b=parseInt(this.$listContainer.css("margin-left"));b="+"===a?b+4*this.$listItems.first().width():b-4*this.$listItems.first().width();b=this.validateMargin(b);this.setMargin(b)},slideTo:function(a){if(0<=a&&a<this.$listItems.length){var b=-1*a*this.$listItems.first().width()+
0;b=this.validateMargin(b);this.setMargin(b)}this.highlightItem(a)},selectPreviousItem:function(){0<this.options.currentSelectedIndex&&this.selectItem(this.options.currentSelectedIndex-1)},selectNextItem:function(){this.options.currentSelectedIndex<this.$listItems.length&&this.selectItem(this.options.currentSelectedIndex+1)},selectFirstItem:function(){this.selectItem(0)},selectLastItem:function(){this.selectItem(this.$listItems.length-1)},validateMargin:function(a){var b=-1*this.options.paddingLeft;
a>b&&(a=b);this.$listContainerContainer.width()>=this.$listContainer.width()?a=b:-1*a+this.$arrowsContainer.width()-b>this.$listContainer.width()&&(a=-1*(this.$listContainer.width()-this.$arrowsContainer.width())-b);this.enableArrows(a);return a},setMargin:function(a){var b=this;this.$listContainer.animate({"margin-left":a},this.options.animationTime,function(){b.enableArrows(a)})},highlightItem:function(b){0>b&&(b=0);if(b===this.$listItems.length)return this.selectFirstItem(),a(k).trigger("tmg:list-item-selected",
[this.$listContainer,this.$listItems.eq(this.options.currentSelectedIndex)]),this.options.currentSelectedIndex;if(this.options.currentSelectedIndex==b)return a(k).trigger("tmg:list-item-selected",[this.$listContainer,this.$listItems.eq(this.options.currentSelectedIndex)]),this.options.currentSelectedIndex;this.options.currentSelectedIndex=b;a(k).trigger("tmg:list-item-selected",[this.$listContainer,this.$listItems.eq(this.options.currentSelectedIndex)]);return this.options.currentSelectedIndex},enableArrows:function(a){var b=
-1*this.options.paddingLeft+0;this.$listContainerContainer.width()<this.$listContainer.width()?(this.$arrows.removeClass("disabled"),a===b?this.$arrows.first().addClass("disabled"):a===-1*(this.$listContainer.width()-this.$arrowsContainer.width())-b&&this.$arrows.last().addClass("disabled")):(this.$arrows.first().addClass("disabled"),this.$arrows.last().addClass("disabled"))}};a.fn.telegraph_ListSlider=function(b){return this.each(function(){a.data(this,"telegraph_ListSlider")||a.data(this,"telegraph_ListSlider",
(new e(this,b)).init())})};a.fn.telegraph_ListSlider_init=function(){a(".list-slider").telegraph_ListSlider()};var c=function(){a(".list-slider").telegraph_ListSlider()};a(k).ready(c);a(k).on("tmg:page-loaded tmg:video-sequence-loaded",c)})(tmgJQ,window,document);
(function(a,f,k){var m=function(c){this.$component=a(c);this.defaults={classes:{disabledLiveHeadline:"headline--live-disabled"},selectors:{lifePost:".live-post.component",lifeStreamBar:".live-stream__bar",lifeStreamWrapper:".live-stream__post-wrapper",lifeStreamButton:".live-stream__bar-button",liveIndicator:".headline--live",liveHeadline:"headline--live"}};this.dataOptions=(this.dataOptions=this.$component.data("options")||"{}",a.parseJSON(this.dataOptions.replace(/'/g,'"')));this.options=a.extend({},
this.defaults,this.dataOptions);this.init()};m.prototype={init:function(){this.isActive=!1;this.lifePost=this.options.selectors.lifePost;this.$lifePublishDate=a("time.article-date-published[itemprop\x3ddatePublished]");this.$lifeMetaPublishDate=a("meta[itemprop\x3ddatePublished]");this.$wrapper=this.$component.find(this.options.selectors.lifeStreamWrapper);this.$btn=this.$component.find(this.options.selectors.lifeStreamButton);this.$window=a(f);this.livestream_enabled="true"===this.options.livestream_enabled;
this.livestream_url=this.options.live_stream_url;this.timeout=1E3*+this.options.refresh_interval;this.timestamp=0;this.livePostList=[];this.cookieName="liveStreamAutoRefresh"+f.location.pathname.replace(/\//g,"_");this.timer=null;this.needsRefresh=!1;!f.CQ&&this.livestream_enabled?(this.isActive=!0,this.setEvents(),this.findNewestTimestampFromDOM(),this.populateLivepostList(),this.checkCookieSettings()):this.die(f.CQ)},populateLivepostList:function(){var c=this;c.livePostList=[];a.each(c.$component.find(c.lifePost),
function(b,d){c.livePostList[b]={id:a(d).attr("id"),html:d}})},setEvents:function(){var a=this;if(a.$btn)a.$btn.on("click",function(){a.$btn.hasClass("js-button-is-on")?(a.setCookieSetting(!1),a.stopAutoRefresh(),a.setButtonsState(!1)):(a.setCookieSetting(!0),a.startAutoRefresh(),a.setButtonsState(!0))})},setButtonsState:function(a){a?this.$btn.addClass("js-button-is-on"):this.$btn.removeClass("js-button-is-on")},checkCookieSettings:function(){var a=Cookies.get(this.cookieName);a||this.setCookieSetting(!0);
"false"===a?(this.stopAutoRefresh(),this.setButtonsState(!1)):(this.startAutoRefresh(),this.setButtonsState(!0))},die:function(c){this.stopAutoRefresh();c||(this.$component.find(this.options.selectors.lifeStreamBar).remove(),a(this.options.selectors.liveHeadline).addClass(this.options.classes.disabledLiveHeadline))},setCookieSetting:function(a){this.autorefresh=a;Cookies.set(this.cookieName,a,{expires:365,path:"/"})},startAutoRefresh:function(){this.autoRefresh()},autoRefresh:function(){var a=this;
a.liveReload();this.timer=setTimeout(function(){a.autoRefresh()},a.timeout)},stopAutoRefresh:function(){clearTimeout(this.timer);delete this.timer},findIndexByKeyValue:function(a,b,d){for(var c=0;c<a.length;c++)if(a[c][b]==d)return c;return null},liveReload:function(){var c=this,b=c.livestream_url.replace("TIMESTAMP.json",this.timestamp+".json"),d=0;c.isActive&&(c.isActive=!1,c.populateLivepostList(),a.ajax({url:b,method:"GET",timeout:5E3,cache:!1,dataType:"text",isModified:!0}).done(function(a){d=
c.$window.scrollTop();a=JSON.parse(a);c.isActive=a.refresh;a.posts&&(c.findNewestTimestampFromJson(a.posts),c.cleanPosts(a.posts),c.modifyOrAddPosts(a.posts),c.reorderPosts(a.posts),c.initPosts(),a.iso8601FormattedPublicationDate&&c.updatePostTimeIso(a.iso8601FormattedPublicationDate),a.dateAndTimeFormattedPublicationDate&&c.updatePostTimeString(a.dateAndTimeFormattedPublicationDate),c.$window.scrollTop(d));c.isActive||c.die()}))},updatePostTimeIso:function(a){this.$lifePublishDate.attr("datetime",
a);this.$lifeMetaPublishDate.attr("content",a)},updatePostTimeString:function(a){this.$lifePublishDate.text(a)},findNewestTimestampFromDOM:function(){var c=this.timestamp;this.populateLivepostList();this.needsRefresh?(this.needsRefresh=!1,c=0):a.each(this.livePostList,function(b,d){b=a(d.html).data("timestamp");b>c&&(c=b)});this.timestamp=c},findNewestTimestampFromJson:function(c){var b=this.timestamp;this.needsRefresh?(this.needsRefresh=!1,b=0):a.each(c,function(a,c){c.modificationTimestamp>b&&(b=
c.modificationTimestamp)});this.timestamp=b},cleanPosts:function(c){var b=this;a.each(b.livePostList,function(a,e){a=b.findIndexByKeyValue(c,"postId",e.id);null==a&&(b.livePostList[a]=void 0,b.$wrapper.find("#"+e.id).remove())})},modifyOrAddPosts:function(c){var b=this;a.each(c,function(a,c){var d=b.$wrapper.find("#"+c.postId);c.html?d.length?d.replaceWith(c.html):b.$wrapper.find(b.lifePost).eq(a).length?b.$wrapper.find(b.lifePost).eq(a).after(c.html):b.$wrapper.append(c.html):d.length||(b.needsRefresh=
!0)})},reorderPosts:function(c){var b=this,d=null,e=null;a.each(c,function(c,f){e=k.getElementById(f.postId);d=a(b.lifePost).index(e);c!=d&&b.$wrapper.find(b.lifePost).eq(c).before(a(e))})},initPosts:function(){a(".js-video-player").telegraph_videoPlayer();a(".live-post .responsive-image").each(function(){lzld(this)});"$jqOpta"in f&&$jqOpta.widgetStart()}};a.fn.telegraph_liveStream=function(c){return this.each(function(){var b=a(this);b.data("live_stream")||b.data("live_stream",new m(this))})};var e=
function(){a(".js-live-stream").telegraph_liveStream()};a(k).ready(e);a(k).on("tmg:page-loaded",e)})(tmgJQ,window,document);
(function(a,f){var k=function(e,c){this.$paywall=a(e);this.options=c;this.config={};this.init()};k.prototype={defaults:{screenReaderOnlyLinkSelector:"a.sr-only:first"},init:function(){this.config=a.extend({},this.defaults,this.options);this.screenReaderOnlyLink=this.$paywall.find(this.config.screenReaderOnlyLinkSelector);this.appendReturnURL();this.setInitialFocus();this.attachEvents()},attachEvents:function(){var e=this;a("body").on("focus blur","a",function(){a(this).parents(".paywall").length||
e.setInitialFocus()})},appendReturnURL:function(){var e=this.$paywall.find("a, area");a.each(e,function(c,b){c=a(b);c.attr("href",c.attr("href").replace(/redirectTo=/i,"redirectTo\x3d"+encodeURIComponent(f.location.href)))})},setInitialFocus:function(){this.screenReaderOnlyLink.length&&this.screenReaderOnlyLink.focus()}};var m=function(){var e=[];a(".paywall").each(function(){a.data(this,"paywall")||a.data(this,"paywall",e.push(new k(this)))})};a(f).ready(m);a(f).on("tmg:page-loaded",m)})(tmgJQ,document);
(function(a,f,k){var m=function(c,b){this.options=b;this.elem=c;this.$elem=a(c);this.$outer=a(c).find(".sticky-video__outer");this.$container=a(c).find(".sticky-video__container");this.$video=a(c).find(".video-player");this.$sequenceArea=a(c).closest(".sequence-area");0===this.$sequenceArea.length&&(this.$sequenceArea=this.$container);this.dataOptions=this.$elem.data("options")?a.parseJSON(this.$elem.data("options").replace(/'/g,'"')):{};this.domElements={};this.eventsInitialised=!1};m.prototype=
{defaults:{minVideoHeight:220,maxVideoHeight:0,maxVideoWidth:0,videoRatio:0,mediaQuery:"xs",activeViewport:{md:!0,lg:!0,xl:!0}},init:function(){var c=a("body");c.data("sticky-video-init")||c.data("sticky-video-init",1);10>=c.data("sticky-video-init")&&(this.options=a.extend({},this.defaults,this.dataOptions,this.options),this.options.maxVideoHeight=Math.floor(this.$container.height()),0<this.options.maxVideoHeight?(this.options.maxVideoWidth=Math.floor(this.$sequenceArea.width()),this.options.videoOffsetTop=
Math.floor(this.$container.offset().top),this.options.videoRatio=this.options.maxVideoWidth/this.options.maxVideoHeight,this.options.offSetControl=this.getSequencePositionTop(),this.viewportSticky()&&(this.$elem.css("height",this.options.maxVideoHeight+parseInt(this.$outer.css("padding-top"))+parseInt(this.$outer.css("padding-bottom"))),this.$container.css("height",this.options.maxVideoHeight)),this.initEvents()):setTimeout(function(){a(".sticky-video").telegraph_StickyVideo();c.data("sticky-video-init",
c.data("sticky-video-init")+1)},1E3));return this},initEvents:function(){var c=this;if(!c.eventsInitialised){var b=a.proxy(c.restart,c);c.eventsInitialised=!0;a(k).on("tmg:ooyala-player-breakpoint-class-set",function(){c.options.mediaQuery="";b();c.$elem.find(".tmgv-bp-min-xxs, .tmgv-bp-min-xs, .tmgv-bp-min-sm, .tmgv-bp-min-md").removeClass("tmgv-bp-min-xs tmgv-bp-min-sm tmgv-bp-min-md tmgv-bp-max-xxs tmgv-bp-max-xs tmgv-bp-max-sm tmgv-bp-max-md").addClass("tmgv-bp-min-xs tmgv-bp-max-lg")});a(f).resize(b);
this.observeScroll()}},restart:function(){this.options.mediaQuery!=f.tmg.getMediaQuery()&&(a("body").data("sticky-video-init",0),this.resetStyles(),this.init(),a(f).trigger("scroll"))},viewportSticky:function(){return"boolean"===typeof this.options.activeViewport[f.tmg.getMediaQuery()]&&!0===this.options.activeViewport[f.tmg.getMediaQuery()]},resetStyles:function(){this.$elem.css("height","auto");this.$container.css("height","auto");this.$container.css("width","auto");this.$video.css("height","auto");
this.$video.css("width","auto");this.$outer.removeClass("sticky-video--resized");this.$outer.removeClass("sticky-video--sticky");this.options.mediaQuery=f.tmg.getMediaQuery();this.options.maxVideoWidth=Math.floor(this.$sequenceArea.width());this.options.offSetControl=this.getSequencePositionTop()},getSequencePositionTop:function(){return this.$sequenceArea.get(0).getBoundingClientRect().top-k.body.getBoundingClientRect().top},observeScroll:function(){var c=this;a(f).scroll(function(){var b=a(f).scrollTop(),
d=c.options.maxVideoHeight+c.options.videoOffsetTop-b,e=!1,k=a.proxy(c.restart,c);c.options.offSetControl!=c.getSequencePositionTop()?(c.options.mediaQuery="",k()):c.viewportSticky()&&(b>c.options.videoOffsetTop?(c.$outer.addClass("sticky-video--resized"),b=d,b<=c.options.minVideoHeight?(c.$outer.addClass("sticky-video--sticky"),b=c.options.minVideoHeight,e=!0):c.$outer.removeClass("sticky-video--sticky")):(c.$outer.removeClass("sticky-video--resized"),c.$outer.removeClass("sticky-video--sticky"),
b=c.options.maxVideoHeight),d=Math.floor(c.options.videoRatio*b),e?c.$container.css("padding-top",0).css("height","auto"):c.$container.css("padding-top",c.options.maxVideoHeight-b).css("height",c.options.maxVideoHeight),c.$video.css("height",b).css("width",d))}).trigger("scroll")}};a.fn.telegraph_StickyVideo=function(c){return this.each(function(){a.data(this,"telegraph_StickyVideo")||a.data(this,"telegraph_StickyVideo",(new m(this,c)).init())})};a.fn.telegraph_StickyVideo_init=function(){a(".sticky-video").telegraph_StickyVideo()};
var e=function(){a(".sticky-video").telegraph_StickyVideo()};a(k).ready(e);a(k).on("tmg:page-loaded",e)})(tmgJQ,window,document);
(function(a,f,k){var m=function(e,c){this.options=c;this.elem=e;this.$elem=a(e);this.dataOptions=this.$elem.data("options")?a.parseJSON(this.$elem.data("options").replace(/'/g,'"')):{};this.dateTimeElements={};this.itemsElements={};this.interval=null;this.oneMinute=60;this.oneHour=3600;this.now=this.options&&this.options.now?this.options.now:Date.now();this.date=new Date(this.now);this.nowTimestamp=this.now/1E3|0;e=1*this.date.getMonth()+1;this.dateTodayZeroHours=new Date(this.date.getFullYear()+
"-"+(10>e?"0":"")+e+"-"+(10>this.date.getDate()?"0":"")+this.date.getDate());this.todayZeroHoursTimestamp=this.dateTodayZeroHours.getTime()/1E3};m.prototype={defaults:{autoUpdate:!1},init:function(){this.options=a.extend({},this.defaults,this.dataOptions,this.options);this.findItems();this.findDateTimeElements();this.addDescriptors();this.updateDescriptorsString();this.options.autoUpdate&&setInterval(this.updateDescriptorsString,1E3);return this},findItems:function(){this.itemsElements=this.$elem.find(".list-of-entities__item")},
findDateTimeElements:function(){this.dateTimeElements=this.itemsElements.find(".m_meta-property__date")},addDescriptors:function(){this.dateTimeElements.find(".m_meta-property__date-descriptor").remove();this.dateTimeElements.append(a("\x3cspan\x3e").addClass("m_meta-property__date-descriptor"))},updateDescriptorsString:function(){var e=this;a.each(this.itemsElements,function(c,b){b=a(b);c=1*b.data("timestamp")/1E3;var d=Math.floor(e.nowTimestamp-c);c>=e.todayZeroHoursTimestamp?1>d?c="\x26lt;1m":
60>Math.ceil(d/e.oneMinute)?c=Math.ceil(d/e.oneMinute)+"m":(c=b.find(".m_meta-property__date-time").text().replace(/[^0-9\:]/g,""),"12:00am"==b.find(".m_meta-property__date-time").text()?c="00:00":-1!=b.find(".m_meta-property__date-time").text().toLowerCase().indexOf("pm")&&(c=parseFloat(c.replace(":",".")),12>c&&(c+=12),c=(c.toFixed(2)+"").replace(".",":"))):c=b.find(".m_meta-property__date-date").text();b.find(".m_meta-property__date-date").hide();b.find(".m_meta-property__date-separator").hide();
b.find(".m_meta-property__date-time").hide();b.find(".m_meta-property__date-descriptor").html(c)});this.$elem.addClass("timelabels-done")}};a.fn.timelabels=function(e){return this.each(function(){a.data(this,"timelabels")||a.data(this,"timelabels",(new m(this,e)).init())})};a.fn.timelabels_init=function(e){a(".list-of-entities[data-timelabels\x3d'true']").timelabels(e)};f=function(){a(".list-of-entities[data-timelabels\x3d'true']").timelabels_init()};a(k).ready(f);a(k).on("tmg:page-loaded",f)})(tmgJQ,
window,document);
(function(a,f,k){var m=0,e=0,c="",b=!1,d=function(b,c){this.options=c;this.elem=b;this.$elem=a(b);this.dataOptions={};this.dateTimeElements={};this.itemsElements={};this.interval=null;this.now=this.options&&this.options.now?this.options.now:Date.now();this.date=new Date(this.now);this.nowHours=this.date.getHours();this.nowTimestamp=this.now/1E3|0;b=1*this.date.getMonth()+1;this.date.getDate();this.dateTodayZeroHours=new Date(this.date.getFullYear()+"-"+(10>b?"0":"")+b+"-"+(10>this.date.getDate()?"0":
"")+this.date.getDate());this.todayZeroHoursTimestamp=this.dateTodayZeroHours.getTime()/1E3};d.prototype={defaults:{dictionary:{weekDays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),months:"January February March April May June July August September October November December".split(" "),hours:"One;Two;Three;Four;Five;Six;Seven;Eight;Nine;Ten;Eleven;Twelve;Thirteen;Fourteen;Fifteen;Sixteen;Seventeen;Eighteen;Nineteen;Twenty;Twenty One;Twenty Two;Twenty Three".split(";"),labels:{timeTimebreakIntro:"",
timeTimebreakMain:"timeTimebreakMain",dayTimebreakIntro:"",dayTimebreakMain:"dayTimebreakMain"}},autoUpdate:!1},init:function(){this.options=a.extend({},this.defaults,this.dataOptions,this.options);this.findItems();this.addTimebreaks();if(this.options.autoUpdate){var b=this;setInterval(function(){b.addTimebreaks()},1E3)}return this},findItems:function(){this.itemsElements=this.$elem.find(".list-of-entities__item")},removeTimebreaks:function(){this.$elem.find(".m_timebreak").remove();this.$elem.removeClass(function(a,
b){return(b.match(/(^|s)item-has-timebreak-S+/g)||[]).join(" ")})},dayNth:function(a){if(3<a&&21>a)return a+"th";switch(a%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd";default:return a+"th"}},getLabel:function(a,b){return"function"==typeof this.options.dictionary.labels[a]?this.options.dictionary.labels[a](b):"function"==typeof this[this.options.dictionary.labels[a]]?this[this.options.dictionary.labels[a]](b):this.options.dictionary.labels[a]},firstTimebreakIntro:function(a){var b=
new Date(a);a=this.options.dictionary.weekDays[b.getDay()];var c=this.dayNth(b.getDate());b=this.options.dictionary.months[b.getMonth()];return a+" "+c+" "+b},timeTimebreakMain:function(a){a=(this.nowHours-(new Date(a)).getHours())%24;return"More than "+this.options.dictionary.hours[a-1]+" hour"+(1<a?"s":"")+" ago"},dayTimebreakMain:function(a){var b=new Date(a);a=this.options.dictionary.weekDays[b.getDay()];var c=this.options.dictionary.months[b.getMonth()],d=b.getDate();b=b.getFullYear();return a+
" "+d+" "+c+" "+b},timeToDatetimeAttribute:function(a){a=new Date(a);return a.getFullYear()+"-"+(9>a.getMonth()?"0":"")+(a.getMonth()+1)+"-"+(10>a.getDate()?"0":"")+a.getDate()+"T00:00:00"},addTimebreaks:function(){var d=this;this.removeTimebreaks();a.each(this.itemsElements,function(f,k){m++;if(1==m||"bottom"==b)return e=k,b=!1,!0;k=a(k);if(0==f&&k.closest(".list-of-entities:first").find("\x3e.component-header").length&&"none"!=k.closest(".list-of-entities:first").find("\x3e.component-header").css("display"))return e=
k,b=!1,!0;k.parents(".list-of-entities[data-timebreaks\x3d'true']");var l=1*k.data("timestamp"),p="";var t=new Date(l);if(l/1E3>=d.todayZeroHoursTimestamp){var z=t.getHours();if(c==z||60>(d.date.getTime()-t.getTime())/6E4)return e=k[0],b=!1,!0;t=d.getLabel("timeTimebreakIntro",l);var w=d.getLabel("timeTimebreakMain",l);c=z;z="top";p="day-splitter"}else{w=d.getLabel("dayTimebreakMain",l);if(c==w)return e=k[0],b=!1,!0;t=d.getLabel("dayTimebreakIntro",l);c=w;z="top"}p=a('\x3cdiv class\x3d"component-header m_timebreak"\x3e\x3ch2 class\x3d"component-heading"\x3e\x3ctime class\x3d"m_meta-property__date" datetime\x3d""\x3e\x3cspan class\x3d"m_meta-property__date-date"\x3e\x3c/span\x3e\x3c/time\x3e\x3c/h2\x3e\x3cp class\x3d"component-subheading"\x3e\x3c/p\x3e\x3c/div\x3e').addClass(p);
p.find(".component-subheading").html(t);p.find(".m_meta-property__date-date").html(w);p.find("time").attr("datetime",d.timeToDatetimeAttribute(l));if(0==f){if(a(e).find(".component-header").length)return e=k,b=!1,!0;z="bottom";a(e).addClass("item-has-timebreak-"+z).append(p)}else k.addClass("item-has-timebreak-"+z).prepend(p);e=k[0];b=z});this.$elem.addClass("timebreaks-done")}};a.fn.timebreaks=function(b){return this.each(function(){a.data(this,"timebreaks")||a.data(this,"timebreaks",(new d(this,
b)).init())})};a.fn.timebreaks_init=function(b){a(".list-of-entities[data-timebreaks\x3d'true']").timebreaks(b)};f=function(){a(".list-of-entities[data-timebreaks\x3d'true']").timebreaks_init()};a(k).ready(f);a(k).on("tmg:page-loaded",f)})(tmgJQ,window,document);_typeof="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"===typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};window.tmg=window.tmg||{};
"boolean"!=typeof window.tmg.firstMetadataLoaded&&(window.tmg.firstMetadataLoaded=!1);
(function(a,f,k){var m=f.location.pathname.endsWith(".html")||f.CQ&&f.CQ.WCM,e=function(b,c){this.options=c;this.elem=b;this.$elem=a(b);this.$document=a(k);this.$body=a("body");this.dataOptions=this.$elem.data("options")?a.parseJSON(this.$elem.data("options").replace(/'/g,'"')):{}};e.prototype={defaults:{templateSelector:"#sequenceItemTemplate",templateRegex:/{{(.*?)}}/g,sequenceURL:"/bin/telegraph/video/sequence/?path\x3d%PATH%\x26playlist\x3d%PLAYLIST%",sequenceData:null,dictionary:{headerPrefix:"Next in"},
sponsoredClass:"sponsored-list-item",sponsoredReplaceSelector:".list-of-entities__item-channel-name",sponsoredLabel:'\x3cspan class\x3d"list-of-entities__item-tag sponsored-label"\x3eSponsored\x3c/span\x3e',currentPageURL:"",playlist:"none"},init:function(){var b=this;this.options=a.extend({},this.defaults,this.dataOptions,this.options);this.rawTemplate=a(this.options.templateSelector).html();this.playerContainer=a(".section.videoPlayer");if(0===this.rawTemplate.length||1!==this.playerContainer.length&&
!f.jasmine)return this;if(null===this.options.sequenceData){if(!f.tmg||!f.tmg.GET_PARAM||!f.tmg.GET_PARAM.playlist)return this;this.options.playlist=f.tmg.GET_PARAM.playlist;this.options.sequenceURL=this.factorSequenceUrl(this.options.sequenceURL,k.location.pathname.replace(".html",""),this.options.playlist);this.loadSequence(this.options.sequenceURL)}else this.sequenceData=this.options.sequenceData,this.parseTemplate(this.options.sequenceData),setTimeout(function(){b.$elem.trigger("selectFirstItem")},
0);this.initEvents();return this},initEvents:function(){var b=a.proxy(this.itemSelectedEvent,this),c=a.proxy(this.videoPlayedEvent,this),e=a.proxy(this.anchorClickedEvent,this);this.$document.on("tmg:list-item-selected",b).on("tmg:video-played",c).on("tmg:slider-list-item-anchor-clicked",e)},reInitAds:function(a){return""!==this.options.currentPageURL&&this.options.currentPageURL!==a?(a=new CustomEvent("tmg:init-ads",{bubbles:!1,cancelable:!0,detail:void 0}),k.dispatchEvent(a),!0):!1},factorSequenceUrl:function(a,
c,e){return a.replace("%PATH%",c).replace("%PLAYLIST%",e)},factorVideoHeadMetadataUrl:function(a,c){a.endsWith("/")&&(a=a.slice(0,a.length-1));a.endsWith(".html")&&(a=a.slice(0,a.length-5));a+=".metadata";c&&(a+=".html");return a},factorCurrentPageUrl:function(a,c,e){c&&(a.endsWith("/")&&(a=a.slice(0,a.length-1)),a.endsWith(".html")||(a+=".html"));return a+"?playlist\x3d"+e},factorVideoMetadataUrl:function(a){a.endsWith("/")&&(a=a.slice(0,a.length-1));a.endsWith(".html")||(a+=".html");return a},itemSelectedEvent:function(b,
c,e){if("undefined"==typeof c||"undefined"==typeof e)return!1;b=a(c);e=a(e);if("undefined"==typeof e.data("video-path"))return!1;this.loadVideoMetaData(e);b.find(".list-of-entities__item.video").removeClass("item__now-playing");e.addClass("item__now-playing");return!0},videoPlayedEvent:function(a){!0===this.$document.data("video-autoplay-on")&&this.$body.addClass("no-played-overlay")},anchorClickedEvent:function(b,c){b=a(c);if(!b.hasClass("list-of-entities__item-image-container")&&0===b.parents(".list-of-entities__item-body-headline:first").length&&
!b.parents(".list-of-entities__item.video").hasClass("item__now-playing")&&"A"===c.tagName)f.location.href=c.href;else if(f.jasmine)return!1},loadVideoMetaData:function(b){var c=this,e=this.sequenceData.items[b.index()].pagePath;if("undefined"===typeof e)return!1;e=this.factorVideoHeadMetadataUrl(e,m);a.ajax({type:"GET",mimeType:"text/html",url:e,success:function(a){c.processResponseHeadMetadata(a,b)}})},loadSequence:function(b){var c=this;a.getJSON(b,function(a){c.processSequenceResponse(a)}).fail(function(){f.location.href=
f.location.protocol+"//"+f.location.host+f.location.pathname})},processSequenceResponse:function(a){this.sequenceData=a;this.parseTemplate(a)},processStaticOverwrites:function(){"object"===("undefined"===typeof metaStaticOverwrites?"undefined":_typeof(metaStaticOverwrites))&&a.each(metaStaticOverwrites,function(b,c){a('meta[name\x3d"'+b+'"]').attr("content",c)});"object"===("undefined"===typeof dataLayerStaticOverwrites?"undefined":_typeof(dataLayerStaticOverwrites))&&"object"===("undefined"===typeof dataLayer?
"undefined":_typeof(dataLayer))&&a.each(dataLayerStaticOverwrites,function(a,c){dataLayer[a]=c})},processResponseHeadMetadata:function(b,c){var d=this,e=d.sequenceData.items[c.index()],t=e.pagePath,C=d.factorVideoMetadataUrl(e.videoPath),v=a("head");a("meta").remove();a('script[type\x3d"application/ld+json"]').remove();if(f.history&&f.history.pushState&&!f.jasmine){k.title=e.videoTitle;var x=d.factorCurrentPageUrl(t,m,this.options.playlist);d.options.currentPageURL!==x&&f.history.pushState({index:c.index()},
"video"+c.index()+1,x)}b=a(b.replace(/\r/g,"").replace(/\n/g,"").replace(/\t/g,""));a.each(b,function(a,b){"SCRIPT"===b.nodeName&&null===b.getAttribute("src")?v.append(b):"META"===b.nodeName&&"tmgads.pagetype"!=b.getAttribute("name")&&"DCSext.Content_Type"!=b.getAttribute("name")&&v.append(b)});v.append('\x3cmeta name\x3d"tmgads.pagetype" content\x3d"video-play"\x3e').append('\x3cmeta name\x3d"DCSext.Content_Type" content\x3d"video-play"\x3e');d.processStaticOverwrites();a.get(C,function(a){d.processResponseVideoMetadata(a,
x)});"object"===("undefined"===typeof _satellite?"undefined":_typeof(_satellite))&&!0===f.tmg.firstMetadataLoaded&&_satellite.track("customPageLoadVideo");f.tmg.firstMetadataLoaded=!0},processResponseVideoMetadata:function(b,c){var d=this;d.playerContainer.html(b);setTimeout(function(){a(k).trigger("tmg:page-loaded");d.reInitAds(c);d.options.currentPageURL=c;d.$body.removeClass("no-played-overlay")},500)},parseTemplate:function(b){var c=this,e=0;"string"===typeof b.playlistName&&a("#sequenceHeading").html(c.options.dictionary.headerPrefix+
": "+b.playlistName);a.each(b.items,function(d,f){f.playlistName=b.playlistName;var k=c.rawTemplate.replace(c.options.templateRegex,function(a,b){"imageUrl"!==b||f[b]||(f.imageUrl="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%22-10116.457%20-3690%20842.903%20474.133%22%3E%3Cg%20transform%3D%22translate(-10116.431%20-3690.027)%22%3E%3Crect%20fill%3D%22%23bcbcbc%22%20width%3D%22335.266%22%20height%3D%22335.266%22%20transform%3D%22translate(184.386%20237.093)%20rotate(-45)%22%2F%3E%3Cpath%20fill%3D%22%23f0f0f0%22%20d%3D%22M70.13%2C173.67c0-32.324%2C24.807-54.875%2C46.356-64.648l.752%2C1c-8.018%2C9.271-13.03%2C19.294-13.03%2C40.342%2C0%2C22.8%2C5.763%2C38.588%2C15.034%2C49.363%2C2.756-3.257%2C4.26-9.021%2C4.26-13.782V148.112L164.6%2C118.795l.5.752c-3.759%2C5.011-5.011%2C9.772-5.011%2C18.542V164.4c0%2C13.531-25.057%2C31.071-39.841%2C36.584%2C11.025%2C12.027%2C27.062%2C17.039%2C44.1%2C17.039a111.57%2C111.57%2C0%2C0%2C0%2C13.28-.752V117.792c-15.535-.752-30.069-5.262-43.6-9.021-11.276-3.257-22.05-6.014-31.823-6.014-18.041%2C0-39.841%2C6.014-39.59%2C31.823a61.7%2C61.7%2C0%2C0%2C0%2C.5%2C6.515l-1.253.5a56.6%2C56.6%2C0%2C0%2C1-4.26-22.05C57.351%2C90.48%2C78.9%2C64.421%2C113.73%2C64.421c14.784%2C0%2C27.563%2C3.508%2C39.841%2C6.765%2C13.03%2C3.759%2C25.558%2C7.517%2C40.342%2C7.517%2C7.267%2C0%2C10.775-3.257%2C10.775-10.023S201.43%2C57.906%2C196.92%2C56.4l.251-1c13.781%2C2.255%2C30.319%2C10.775%2C30.319%2C29.317%2C0%2C24.055-16.788%2C33.326-44.1%2C33.326h-4.009v98.725c20.8-3.007%2C34.078-11.526%2C43.85-27.312l.752.5c-12.027%2C33.577-32.574%2C62.894-75.422%2C62.894-42.848.251-78.429-27.312-78.429-79.181m113.509-63.645c-31.322%2C0-58.634-15.285-81.436-15.285-14.533%2C0-31.071%2C5.763-36.834%2C21.3l.251.251C72.385%2C104.262%2C88.171%2C101%2C102.2%2C101c22.8%2C0%2C50.365%2C15.285%2C81.436%2C15.285%2C25.057%2C0%2C39.59-7.768%2C42.1-27.813h-.5c-3.759%2C15.034-16.538%2C21.549-41.595%2C21.549M93.433%2C126.562c-11.025%2C11.526-21.048%2C26.31-21.048%2C47.108%2C0%2C51.868%2C35.581%2C77.176%2C77.176%2C77.176%2C25.809%2C0%2C42.347-12.529%2C52.871-23.3l-.251-.752c-12.028%2C9.522-27.814%2C17.54-52.62%2C17.54-33.827%2C0-70.661-23.053-70.661-70.912a78.989%2C78.989%2C0%2C0%2C1%2C15.034-46.606Zm38.588%2C56.88V144.353l-6.264%2C4.51V186.7a19.967%2C19.967%2C0%2C0%2C1-2%2C9.021l.5.251c3.257-3.007%2C7.768-7.016%2C7.768-12.529%22%20transform%3D%22translate(271.154%2083.377)%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
return f[b]?f[b]:""});k=a(k).appendTo(c.$elem);c.setSponsoredState(k,!!f.isSponsored);!0===f.currentPage&&(e=d)});c.$elem.parents(".list-slider:first").data("selected-item",e);a.each(a(".list-of-entities__item-series-label"),function(b,c){""===a.trim(a(c).text())&&a(c).remove()});a.each(a(".list-of-entities__item-body-series-title"),function(b,c){""===a.trim(a(c).text())&&a(c).remove()});a(k).trigger("tmg:video-sequence-loaded")},setSponsoredState:function(a,c){c&&(a.addClass(this.options.sponsoredClass),
a.find(this.options.sponsoredReplaceSelector).replaceWith(this.options.sponsoredLabel))}};a.fn.telegraph_VideoSequence=function(b){return this.each(function(){a.data(this,"telegraph_VideoSequence")||a.data(this,"telegraph_VideoSequence",(new e(this,b)).init())})};a.fn.telegraph_VideoSequence_init=function(){a(".js-video-sequence").telegraph_VideoSequence()};var c=function(){a(".js-video-sequence").telegraph_VideoSequence()};a(k).ready(c);a(k).on("tmg:page-loaded",c)})(tmgJQ,window,document);
_createClass=function(){function a(a,k){for(var f=0;f<k.length;f++){var e=k[f];e.enumerable=e.enumerable||!1;e.configurable=!0;"value"in e&&(e.writable=!0);Object.defineProperty(a,e.key,e)}}return function(f,k,m){k&&a(f.prototype,k);m&&a(f,m);return f}}();function _classCallCheck(a,f){if(!(a instanceof f))throw new TypeError("Cannot call a class as a function");}
(function(a,f,k,m,e,c){var b={commentCountDelay:18E4,networkConfig:{network:"",strings:{postEditButton:"Update comment",postEditAsButton:"Update comment",postAsButton:"Post comment",showMore:"Show more"}},convConfig:{siteId:"",articleId:"",collectionMeta:"",initialNumVisible:5,disableAvatars:!0,readOnly:!1,datetimeFormat:{minutesUntilAbsoluteTime:-1,absoluteFormat:"d MMM yyyy h:mma"}},livefyreConfiguration:{src:"//cdn.livefyre.com/Livefyre.js",commentCount:"/api/v1.1/public/comments/ncomments/",authToken:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkb21haW4iOiJ0ZWxlZ3JhcGguZnlyZS5jbyIsInVzZXJfaWQiOiJsdWthc3pibGFzeiIsImRpc3BsYXlfbmFtZSI6Imx1a2FzemJsYXN6IiwiZXhwaXJlcyI6MTQ4MDMxMDUzNi43OTksImlhdCI6MTQ3MDMxMDUzNn0.L2nirxqXRR2kh3XW3I5l28s9bl6hawB7CQJDKHEHrpc"}},
d=function(){function d(c){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};_classCallCheck(this,d);this.options=a.extend(!0,{},b,e);this.status="initial";this.element=c;this.$element=a(c);this.links=c.querySelectorAll("a[href]");this.loadButton=c.querySelector(".comments-block__load");this.loginContainer=c.querySelector(".comments-block__login-cta-container");this.livefyreId="livefyre-"+this.options.convConfig.articleId;this.livefyreContent=c.querySelector(".livefyre-content");this.livefyreContent.setAttribute("id",
this.livefyreId);this.jumpLinks=k.querySelectorAll(".comment-cta");this.counts=k.querySelectorAll('[data-js\x3d"comment-count"]');return this}_createClass(d,[{key:"init",value:function(){c.isFeatureEnabled()&&this.options.articleCommentingConfig&&(c.processCounts(),this.bindEvents(),this.initJumpLinks(),this.initCounts(),this.initLoginBox(),this.makeCommentsVisible(),this.checkUrlHash()&&this.loadComments())}},{key:"makeCommentsVisible",value:function(){this.element.classList.add("is-visible");Array.prototype.slice.call(this.jumpLinks).forEach(function(a){return a.classList.add("is-visible")})}},
{key:"bindEvents",value:function(){this.loadButton.addEventListener("click",this.onLoadButtonClick.bind(this));f.addEventListener("hashchange",this.onHashChange.bind(this))}},{key:"onLoadButtonClick",value:function(){this.loadComments();this.loadButton.classList.add("loading")}},{key:"onHashChange",value:function(){this.checkUrlHash()&&this.loadComments()}},{key:"initJumpLinks",value:function(){var a=this;Array.prototype.slice.call(this.jumpLinks).forEach(function(b){b.addEventListener("click",function(){return m.scrollTo(a.element)})})}},
{key:"initCounts",value:function(){var a=this.options.convConfig,b=a.siteId,d=a.articleId;a="https://"+this.options.networkConfig.network+this.options.livefyreConfiguration.commentCount;var e=localStorage.getItem("tmg.commenting.count-"+d);-1===a.indexOf(".bootstrap.fyre.co")&&(a=a.replace(".fyre.co",".bootstrap.fyre.co"));e&&c.renderIndicatorCount(d,e,!0);c.fetchCountsFromLiveFyre(b,[d]).then(function(a){a[d]&&a[d].total&&(a[d]&&a[d].total&&localStorage.setItem("tmg.commenting.count-"+d,a[d].total),
c.renderIndicatorCount(d,a[d].total,!0))})}},{key:"renderCounts",value:function(){c.renderIndicatorCount(this.options.convConfig.articleId,0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,!0)}},{key:"initLoginBox",value:function(){e.isLoggedIn()||(Array.prototype.slice.call(this.links).forEach(function(a){a.setAttribute("href",tmg.updateRedirectParam(a.href,k.location.href))}),this.loginContainer.classList.add("is-visible"))}},{key:"checkUrlHash",value:function(){return location.hash.substr(1)===
this.element.id}},{key:"loadComments",value:function(){var a=this;if("initial"===this.status){var b=this.options.livefyreConfiguration.src;this.status="loading";this.loadButton.innerHTML=this.loadButton.dataset.labelLoading;c.loadLiveFyreLibrary(b).then(this.initLiveFyre.bind(this)).then(this.openComments.bind(this)).then(function(){a.status="loaded"})}}},{key:"initLiveFyre",value:function(){var b=this,c=this.options,d=c.networkConfig,f=c.convConfig,k=a.Deferred();this.options.convConfig.readOnly=
!e.isLoggedIn();this.options.convConfig.el=this.livefyreId;Livefyre.require(["fyre.conv#3","auth"],function(a,c){b.conv=new a(d,[f],function(a){a.on("initialRenderComplete",function(){e.isLoggedIn()&&b.highlightUser();k.resolve()});e.isLoggedIn()&&(a.on("userLoggedIn",b.highlightUser.bind(b)),a.on("userLoggedOut",b.highlightUser.bind(b)));a.on("commentCountUpdated",b.renderCounts.bind(b))});b.authenticateUser(c)});return k.promise()}},{key:"openComments",value:function(){this.element.classList.add("is-open")}},
{key:"highlightUser",value:function(){var a=localStorage.getItem("fyre-auth");this.$element.find(".livefyre-user-styles").remove();if(a){a=JSON.parse(a);a=a.value.profile.id;var b=this.$element.find(".fyre-editor").css("background-color");this.$element.append('\x3cstyle class\x3d"livefyre-user-styles"\x3e[data-author-id\x3d"'+a+'"]{background-color:'+b+"}\x3c/style\x3e")}}},{key:"authenticateUser",value:function(a){a.delegate({login:function(a){},logout:function(a){a(null)},viewProfile:function(){}});
var b=e.getLiveFyreToken();b?a.authenticate({livefyre:b}):a.logout(function(){})}}]);return d}();a.fn.telegraph_commenting=function(b){return this.each(function(){a.data(this,"telegraph_commenting")||a.data(this,"telegraph_commenting",(new d(this,b)).init())})};tmg.pageReady(function(){Array.prototype.slice.call(k.querySelectorAll(".comments-block")).filter(function(b){return 0<a(b).attr("data-options").length}).forEach(function(b){a(b).telegraph_commenting(JSON.parse(b.dataset.options))})})})(tmgJQ,
window,document,tmg.page,tmg.user,tmg.commenting);(function(a,f,k){init=function(){a('[data-js\x3d"mid-article-slot"] a').click(function(f){f=a(f.target);var e=a(this);e=k.readLinkLabel(e,f);var c=k.readPagePath();f=k.readElementClicked(f);f=encodeURIComponent(k.buildAnalyticsString("list-of-entities_mid-article-slot","",e,f,c));k.isDtmEnabled()&&window._satellite.setCookie("tmgComponentTracking",f,1)})};window.tmg.pageReady(init)})(tmgJQ,document,TMG_COMPONENT_TRACKING);
(window["tmg.build"]=window["tmg.build"]||[]).push([[12],{14:function(a,f,k){var m,e;k=[f];void 0===(e="function"==typeof(m=function(a){Object.defineProperty(a,"__esModule",{value:!0});var b=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1;d.configurable=!0;"value"in d&&(d.writable=!0);Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();tmg.createNamespace("tmg.Tooltip");var c=function(){function a(b,c){if(!(this instanceof
a))throw new TypeError("Cannot call a class as a function");!0;this.tooltipMainClass="js-tooltip-main";this.tooltipCloseClass="js-tooltip-close";this.tooltipArrowClass="js-tooltip-arrow";this.tooltipShowClass="overlay-tooltip--is-visible";this.tooltipOffset=5;this.target=b;this.settings=c;this.buildTooltip()}return b(a,[{key:"buildTooltip",value:function(){this.createWrapper();this.createMarkup();this.bindEvents()}},{key:"createWrapper",value:function(){var a=document.createElement("div");a.className=
"overlay-tooltip__wrapper";this.settings.wrapperStyle&&a.setAttribute("style",this.settings.wrapperStyle);a.style.position="relative";a.style.overflow="visible";this.wrapElement(this.target,a);this.tooltipWrapper=this.target.parentNode}},{key:"createMarkup",value:function(){var a=(this.settings||!1).buttons,b=document.createElement("div");b.className="overlay-tooltip overlay-tooltip--"+this.settings.positionY+"-"+this.settings.positionX+" "+this.tooltipMainClass;var c='\x3cbutton class\x3d"overlay-tooltip__close '+
this.tooltipCloseClass+'"\x3e\x3c/button\x3e\n\t\t\t\t\t\t\x3cspan class\x3d"overlay-tooltip__arrow '+this.tooltipArrowClass+'"\x3e\x3c/span\x3e\n\t\t\t\t\t\t\x3cdiv class\x3d"overlay-tooltip__content"\x3e'+this.settings.content+"\x3c/div\x3e";a&&(c+='\x3cdiv class\x3d"overlay-tooltip__btn-wrapper"\x3e',a.forEach(function(a){c+='\x3ca href\x3d"'+a.url+'" class\x3d"overlay-tooltip__button '+(a.alternate?"overlay-tooltip__button--alternate":"")+'"\x3e'+a.label+"\x3c/a\x3e"}),c+="\x3c/div\x3e");b.innerHTML=
c;this.tooltipWrapper.append(b);this.tooltip=this.tooltipWrapper.querySelector("."+this.tooltipMainClass);this.closeTooltip=this.tooltipWrapper.querySelector("."+this.tooltipCloseClass);this.arrowTooltip=this.tooltipWrapper.querySelector("."+this.tooltipArrowClass);this.arrowWidth=parseInt(window.getComputedStyle(this.arrowTooltip).getPropertyValue("border-bottom-width"),10);this.setTooltipPosition();this.setTooltipArrow()}},{key:"getTooltipPosition",value:function(a){for(var b=0,c=0,d=a;a;)b+=a.offsetLeft-
a.scrollLeft+a.clientLeft,a=a.offsetParent;return c=window.innerWidth-(b+d.offsetWidth),{l:b,r:c}}},{key:"setTooltipPosition",value:function(){var a=this.target.offsetHeight+this.arrowWidth+this.tooltipOffset+"px";"top"===this.settings.positionY&&(this.tooltip.style.bottom=a);"bottom"===this.settings.positionY&&(this.tooltip.style.top=a)}},{key:"repositioningTooltip",value:function(){var a=this.getTooltipPosition(this.tooltip);0>a.l&&"right"===this.settings.positionX&&(this.tooltip.style.right=parseInt(window.getComputedStyle(this.tooltip).getPropertyValue("right"),
10)+a.l+"px",this.arrowTooltip.style.right=parseInt(window.getComputedStyle(this.arrowTooltip).getPropertyValue("right"),10)-a.l+"px");0>a.r&&"left"===this.settings.positionX&&(this.tooltip.style.left=parseInt(window.getComputedStyle(this.tooltip).getPropertyValue("left"),10)+a.r+"px",this.arrowTooltip.style.left=parseInt(window.getComputedStyle(this.arrowTooltip).getPropertyValue("left"),10)-a.r+"px")}},{key:"resetPositioningTooltip",value:function(){this.tooltip.style.right="";this.tooltip.style.left=
"";this.setTooltipArrow()}},{key:"setTooltipArrow",value:function(){var a=this.target.offsetWidth/2;"left"===this.settings.positionX&&(this.arrowTooltip.style.left=a-this.arrowWidth+"px");"right"===this.settings.positionX&&(this.arrowTooltip.style.right=a-this.arrowWidth/2+"px")}},{key:"wrapElement",value:function(a,b){a.parentNode.insertBefore(b,a);b.appendChild(a)}},{key:"bindEvents",value:function(){var a=this;this.closeTooltip.addEventListener("click",function(){a.hideTooltip()});["orientationchange",
"resize"].forEach(function(b){window.addEventListener(b,function(){a.resetPositioningTooltip();a.repositioningTooltip()})})}},{key:"revealTooltip",value:function(){this.tooltip.classList.add(this.tooltipShowClass);this.repositioningTooltip()}},{key:"hideTooltip",value:function(){this.tooltip.classList.remove(this.tooltipShowClass);this.resetPositioningTooltip()}}]),a}();tmg.tooltip=c;a.default=c})?m.apply(f,k):m)||(a.exports=e)}},[[14,0]]]);
(function(a,f,k){var m=function(e,c){this.elem=e;this.$elem=a(e);this.options=c;this.domElements={};this.customScrollEnabled=(9<=cssua.ua.ie||!cssua.ua.ie)&&!a("body").hasClass("cq-wcm-edit")&&!cssua.ua.mobile};m.prototype={init:function(){this.findDomElements();a(this.domElements.$listItem).each(function(){a(this).find("a").each(function(){var e=a(this);e.off();e.attr("data-url",e.attr("href"));e.attr("href","javascript:void(0);")})});this.cleanEmptyComponent();this.attachEvents();this.setHeadlineTags();
this.setHeaderCounters();this.setCustomScrollbars();f.addEventListener("orientationchange",a.proxy(function(){this.moveToHeadlineTag(a(".js-snippet-gallery__tags-wrapper .js-snippet-gallery__tags-item.js-item--active"));this.setCustomScrollbars()},this),!1);this.$elem.find(".list-of-entities:first-child .list-of-entities__item:first-child").trigger("click");return this},findDomElements:function(){this.domElements.$listComponent=this.$elem.find(".list-of-entities");this.domElements.$listItem=this.$elem.find(".list-of-entities__item");
this.domElements.$listWrapper=this.$elem.find(".js-snippet-gallery__list-wrapper");this.domElements.$nextVideoControl=this.$elem.find(".js-snippet-gallery__nav-controls-next");this.domElements.$prevVideoControl=this.$elem.find(".js-snippet-gallery__nav-controls-prev");this.domElements.$snippetTagsWrapper=this.$elem.find(".js-snippet-gallery__tags-wrapper");this.domElements.$videoDisplay=this.$elem.find(".js-snippet-gallery__display");this.domElements.$videoDisplayWrapper=this.$elem.find(".js-snippet-gallery__video-wrapper");
this.domElements.$videoScreenInfo=this.$elem.find(".js-snippet-gallery__info-box");this.domElements.$moduleEntityProperty=this.$elem.find('.m_entity-property-item[data-entity-property-item--name\x3d"Rating"]');this.domElements.$parentContainer=this.$elem.parents(".wide-screen-container");this.domElements.$backgroundImage=this.domElements.$parentContainer.find(".js-snippet-gallery__background")},attachEvents:function(){this.domElements.$listItem.on("click",a.proxy(this.getItemMetadata,this));this.domElements.$nextVideoControl.on("click",
a.proxy(this.nextVideo,this));this.domElements.$prevVideoControl.on("click",a.proxy(this.prevVideo,this))},setHeaderCounters:function(){var a=this.$elem.find(".list-of-entities");a.each(function(c){c=a.eq(c);var b=c.find(".list-of-entities__item").length;c.find(".component-heading").first().append("\x3ci\x3e"+b+"\x3c/i\x3e")})},setHeadlineTags:function(){var e=a(".list-of-entities").children(".component-header").children("h2");if(1<=e.length){for(var c=0;c<e.length;c++)e.parents(".list-of-entities").eq(c).find(".list-of-entities__item"),
this.domElements.$snippetTagsWrapper.append('\x3cspan class\x3d"js-snippet-gallery__tags-item snippet-gallery__tags-item"\x3e'+e.eq(c).html()+"\x3c/span\x3e");this.domElements.$snippetTagsWrapper.append('\x3cspan class\x3d"js-tags-item-hover-helper tags-item-hover-helper"\x3e\x3c/span\x3e');e=this.domElements.$snippetTagsWrapper.find(".js-snippet-gallery__tags-item");var b=this;e.click(function(){var c=a(this),e=c.index();b.moveToHeadlineTag(c);b.domElements.$listWrapper.find(".list-of-entities:eq("+
e+")").find(".list-of-entities__item").first().click()});e.first().addClass("js-item--active")}},moveToHeadlineTag:function(e){var c=e.index(),b=this.domElements.$snippetTagsWrapper.find(".js-tags-item-hover-helper");e.addClass("js-item--active");e.siblings("span").removeClass("js-item--active");b.css({left:e.position().left+10+"px",width:e.width()+20+"px"});this.customScrollEnabled?this.domElements.$listWrapper.mCustomScrollbar("scrollTo",this.domElements.$listWrapper.find(".list-of-entities:eq("+
c+")")):cssua.ua.mobile&&(e=a(f).width(),e>=tmg.viewport.mediaQueriesBreakpoints.md&&this.domElements.$listWrapper.animate({scrollTop:this.domElements.$listWrapper.find(".list-of-entities:eq("+c+")").offset().top-this.domElements.$listWrapper.offset().top+this.domElements.$listWrapper.scrollTop()},200),e>=tmg.viewport.mediaQueriesBreakpoints.sm&&e<tmg.viewport.mediaQueriesBreakpoints.md&&this.domElements.$listWrapper.animate({scrollLeft:this.domElements.$listWrapper.find(".list-of-entities:eq("+c+
")").offset().left-this.domElements.$listWrapper.offset().left+this.domElements.$listWrapper.scrollLeft()},200))},getItemMetadata:function(e){e=a(e.target);var c=e.hasClass("list-of-entities__item")?e:e.parents(".list-of-entities__item"),b=c.find(".list-of-entities__item-image").data("video")?a.parseJSON(c.find(".list-of-entities__item-image").data("video").replace(/'/g,'"')):{},d=c.find(".list-of-entities__item-image").data("links")?a.parseJSON(c.find(".list-of-entities__item-image").data("links").replace(/'/g,
'"')):{};var f=c.find(".entity-property-numeric-bar");var k=c.find(".list-of-entities__item-image").data("frz-src-array");var m=c.find(".m_meta-property__quote").text();e="";f=1==f.is(":visible")?f.html():"";m=0<m.length?"'"+m+"'":"";e="";"undefined"!=typeof d.review&&""!=d.review&&(e='\x3ca href\x3d"'+d.review+'" class\x3d"js-snippet-gallery__info-box-item snippet-gallery__info-box-item"\x3e\x3cstrong\x3eRead Review\x3c/strong\x3e \x3cspan class\x3d"entity-property-numeric-bar"\x3e'+f+'\x3c/span\x3e\x3cspan class\x3d"js-item-quote"\x3e'+
m+"\x3c/span\x3e\x3c/a\x3e");f="";"undefined"!=typeof d.latest&&""!=d.latest.length&&(f='\x3ca href\x3d"'+d.latest+'" class\x3d"js-snippet-gallery__info-box-item snippet-gallery__info-box-item snippet-gallery__info-box-item-read-more"\x3e\x3cspan\x3eRead More\x3c/span\x3e\x3c/a\x3e');m=JSON.parse(k.replace(/'/g,'"')).sort(function(a,b){return b.width-a.width})[0].src.replace(/(\.[^.]*)$/g,"_filmblur$1");f=a('\x3cdiv class\x3d"js-snippet-gallery__info-box snippet-gallery__info-box"\x3e'+e+f+"\x3c/div\x3e");
e="undefined"==typeof b.id?a('\x3cdiv class\x3d"js-snippet-gallery__video-wrapper snippet-gallery__video-wrapper"\x3e\x3cdiv class\x3d"js-video-player video-player component"\x3e\x3cdiv class\x3d"js-video-player__component-content component-content"\x3e\x3cspan class\x3d"js-video-player__image-container video-player__image-container" onclick\x3d"window.location\x3d\''+d.latest+'\'"\x3e\x3ca href\x3d"javascript:void(0);"\x3e\x3cimg data-frz-src-array\x3d"'+k+'" class\x3d"js-video-player__image video-player__image" alt\x3d"video-player image"\x3e\x3c/a\x3e\x3c/span\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e'):
a('\x3cdiv class\x3d"js-snippet-gallery__video-wrapper snippet-gallery__video-wrapper"\x3e\x3cdiv class\x3d"js-video-player video-player component" data-options\x3d"{ \'videoId\': \''+b.id+"', 'autoplay': false, 'autoscale': false, 'type': '"+b.type+'\' }"\x3e\x3cdiv class\x3d"js-video-player__component-content component-content"\x3e\x3cspan class\x3d"js-video-player__image-container video-player__image-container"\x3e\x3cimg data-frz-src-array\x3d"'+k+'" class\x3d"js-video-player__image video-player__image" alt\x3d"video-player image"\x3e\x3cspan class\x3d"video-player__image-controls-wrapper"\x3e\x3cspan class\x3d"video-player__image-controls"\x3e\x3cspan class\x3d"js-video-player__image-controls-title video-player__image-controls-title"\x3e'+
c.find(".list-of-entities__item-body-headline").text()+'\x3c/span\x3e\x3cspan class\x3d"js-video-player__image-controls-play video-player__image-controls-play"\x3e\x3c/span\x3e\x3cspan class\x3d"video-player__image-controls-duration"\x3e'+b.duration+'\x3c/span\x3e\x3c/span\x3e\x3c/span\x3e\x3c/span\x3e\x3cdiv class\x3d"js-video-player__player video-player__player"\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e');b=a('\x3cdiv class\x3d"js-snippet-gallery__background snippet-gallery__background"\x3e\x3cspan class\x3d"js-video-player__image-container video-player__image-container"\x3e\x3cimg class\x3d"js-video-player__image video-player__image" alt\x3d"video-player image" src\x3d"'+
m+'" \x3e\x3c/span\x3e\x3c/div\x3e');a(b).find("img.js-video-player__image.video-player__image").error(function(){a(this).hide()});this.$elem.find(".list-of-entities__item.js-item--active").removeClass("js-item--active");c.addClass("js-item--active");k=c.parents(".list-of-entities").index();c=this.domElements.$snippetTagsWrapper.find(".js-tags-item-hover-helper");m=this.domElements.$snippetTagsWrapper.find(".js-snippet-gallery__tags-item");d=a(".list-of-entities").children(".component-header").children("h2");
k=m.eq(k);k.addClass("js-item--active");k.siblings("span").removeClass("js-item--active");1<=d.length&&c.css({left:k.position().left+10+"px",width:k.width()+20+"px"});this.domElements.$videoDisplayWrapper.replaceWith(e);this.domElements.$videoDisplayWrapper=e;this.domElements.$videoScreenInfo.replaceWith(f);this.domElements.$videoScreenInfo=f;this.domElements.$backgroundImage.replaceWith(b);this.domElements.$backgroundImage=b;a(".js-snippet-gallery__video-wrapper .js-video-player__image").each(function(){""===
this.src&&lzld(this)});this.$elem.find(".js-video-player").telegraph_videoPlayer(this.$elem.find(".js-video-player").data("options")?a.parseJSON(this.$elem.find(".js-video-player").data("options").replace(/'/g,'"')):{});e=a(".snippet-gallery__list-wrapper").find(".js-item--active");0<this.domElements.$listItem.index(e)&&(this.domElements.$videoDisplay.addClass("js-switch-left js-hide-video").removeClass("js-switch-right"),setTimeout(a.proxy(function(){this.domElements.$videoDisplay.addClass("js-switch-right").removeClass("js-switch-left js-hide-video")},
this),200),setTimeout(a.proxy(function(){this.domElements.$videoDisplay.removeClass("js-switch-right")},this),600));return!1},navigateVideo:function(e){var c=a(".snippet-gallery__list-wrapper").find(".js-item--active");c=this.domElements.$listItem.index(c);c="ltr"==e?c+1:c-1;c>=this.domElements.$listItem.length&&(c=0);0>c&&(c=this.domElements.$listItem.length-1);c=this.domElements.$listItem.eq(c);c.trigger("click");var b=c.parents(".list-of-entities").index(),d=this.domElements.$snippetTagsWrapper.find(".js-tags-item-hover-helper"),
k=this.domElements.$snippetTagsWrapper.find(".js-snippet-gallery__tags-item"),m=a(".list-of-entities").children(".component-header").children("h2");b=k.eq(b);b.addClass("js-item--active");b.siblings("span").removeClass("js-item--active");1<=m.length&&d.css({left:b.position().left+10+"px",width:b.width()+20+"px"});"ltr"==e?(this.domElements.$videoDisplay.addClass("js-switch-left js-hide-video").removeClass("js-switch-right"),setTimeout(a.proxy(function(){this.domElements.$videoDisplay.addClass("js-switch-right").removeClass("js-switch-left js-hide-video")},
this),200),setTimeout(a.proxy(function(){this.domElements.$videoDisplay.removeClass("js-switch-right")},this),600)):(this.domElements.$videoDisplay.addClass("js-switch-right js-hide-video").removeClass("js-switch-left"),setTimeout(a.proxy(function(){this.domElements.$videoDisplay.addClass("js-switch-left").removeClass("js-switch-right js-hide-video")},this),200),setTimeout(a.proxy(function(){this.domElements.$videoDisplay.removeClass("js-switch-left")},this),600));this.customScrollEnabled?this.domElements.$listWrapper.mCustomScrollbar("scrollTo",
this.domElements.$listWrapper.find(".mCSB_container").find(c)):cssua.ua.mobile&&(e=a(f).width(),e>=tmg.viewport.mediaQueriesBreakpoints.md&&this.domElements.$listWrapper.animate({scrollTop:c.offset().top-this.domElements.$listWrapper.offset().top+this.domElements.$listWrapper.scrollTop()},200),e>=tmg.viewport.mediaQueriesBreakpoints.sm&&e<tmg.viewport.mediaQueriesBreakpoints.md&&this.domElements.$listWrapper.animate({scrollLeft:c.offset().left-this.domElements.$listWrapper.offset().left+this.domElements.$listWrapper.scrollLeft()},
200))},nextVideo:function(){this.navigateVideo("ltr")},prevVideo:function(){this.navigateVideo("rtl")},listWrapperWidth:function(e){var c=0;a(".js-snippet-gallery .list-of-entities").each(function(){var b=a(this).find(".list-of-entities__item").length,d=a(this).find(".list-of-entities__item").width(),e=a(this).find(".component-header").width(),f=a(this);f.css("width",d*b+e+"px");c+=d*b+e;f.parent(".js-snippet-gallery__scroll-helper").css("width",c+"px")});this.domElements.$listWrapper.css("width",
e+"px")},setCustomScrollbars:function(){var e=a(f).width();this.customScrollEnabled?(this.domElements.$listWrapper.mCustomScrollbar("destroy"),this.domElements.$listWrapper.removeClass("js-shadow-bot-active"),this.domElements.$listWrapper.css("width","370px"),e>=tmg.viewport.mediaQueriesBreakpoints.md&&(this.domElements.$listWrapper.addClass("js-shadow-bot-active"),a(".js-snippet-gallery .list-of-entities").css("width","100%"),a(".js-snippet-gallery__scroll-helper").css("width","100%"),this.domElements.$listWrapper.mCustomScrollbar({axis:"y",
keyboard:{scrollType:"stepped"},mouseWheel:{scrollAmount:50},autoExpandScrollbar:!0,callbacks:{whileScrolling:function(){var c=a(this);5<this.mcs.topPct?c.addClass("js-shadow-top-active"):c.removeClass("js-shadow-top-active");99<=this.mcs.topPct?c.removeClass("js-shadow-bot-active"):c.addClass("js-shadow-bot-active")},alwaysTriggerOffsets:!1}})),e>=tmg.viewport.mediaQueriesBreakpoints.sm&&e<tmg.viewport.mediaQueriesBreakpoints.md&&(this.listWrapperWidth(e),this.domElements.$listWrapper.mCustomScrollbar({axis:"x",
keyboard:{scrollType:"stepped"},mouseWheel:{scrollAmount:50},autoExpandScrollbar:!0}))):cssua.ua.mobile?(this.domElements.$listWrapper.css("width","370px"),e>=tmg.viewport.mediaQueriesBreakpoints.md&&(a(".js-snippet-gallery .list-of-entities").css("width","100%"),a(".js-snippet-gallery__scroll-helper").css("width","100%"),this.domElements.$listWrapper.addClass("js-default-scroll vertical"),this.domElements.$listWrapper.removeClass("horizontal")),e>=tmg.viewport.mediaQueriesBreakpoints.sm&&e<tmg.viewport.mediaQueriesBreakpoints.md&&
(this.listWrapperWidth(e),this.domElements.$listWrapper.addClass("js-default-scroll horizontal"),this.domElements.$listWrapper.removeClass("vertical"))):this.domElements.$listWrapper.addClass("js-default-scroll")},cleanEmptyComponent:function(){this.domElements.$listComponent.find(".js-list-of-entities.component-content").each(function(){var e=a(this);e.find(".js-list-of-entities__container").is(":visible")||e.parent(".list-of-entities.component").remove()})}};a.fn.telegraph_snippetGallery=function(e){return this.each(function(){a.data(this,
"telegraph_snippetGallery")||(a(f).width()>=tmg.viewport.mediaQueriesBreakpoints.sm?a.data(this,"telegraph_snippetGallery",(new m(this,e)).init()):a.data(this,"telegraph_snippetGallery",(new m(this,e)).setHeaderCounters()))})};a(k).ready(function(){a(".js-snippet-gallery").each(function(){a(this).telegraph_snippetGallery()});10<=cssua.ua.ie&&a(".js-snippet-gallery__display").mouseenter(function(){a(this).addClass("ua-ie-mouse-on");a(this).mouseleave(function(){a(this).removeClass("ua-ie-mouse-on")})})})})(tmgJQ,
window,document);
(function(a,f,k){function m(c,b){this.options=a.extend({},e,b);this.$wrap=a(c);this.$wrap.addClass(this.options.classes.jsrun);this.options.triggerText.show=this.$wrap.data(this.options.dataAttributes.showSectionText)||this.options.triggerText.show;this.options.triggerText.close=this.$wrap.data(this.options.dataAttributes.closeSectionText)||this.options.triggerText.close;this.$blocks=this.$wrap.find("."+this.options.classes.block);this.init(this.options)}var e={classes:{jsrun:"js-run",hidden:"js-hidden",
closed:"closed",block:"js-accordion-section",trigger:"js-accordion-section-trigger",content:"js-accordion-section-body",header:"js-accordion-section-header"},dataAttributes:{showSectionText:"js-accordion-show-text",closeSectionText:"js-accordion-close-text"},triggerText:{show:"Open",close:"Close"}};m.prototype.init=function(){var c=this;this.$blocks.each(function(){var b=a(this),d=b.find("."+c.options.classes.header);b=b.find("."+c.options.classes.content);var e=d.find("."+c.options.classes.trigger);
c.bindHeadersAsControls(d,e,b);e.text(c.options.triggerText.close);e.removeClass(c.options.classes.hidden)})};m.prototype.bindHeadersAsControls=function(a,b,d){var c=this;a.on("click",function(){c.toggleSection(b,a,d)})};m.prototype.toggleSection=function(a,b,d){var c=d.hasClass(this.options.classes.hidden)?this.options.triggerText.close:this.options.triggerText.show;d.toggleClass(this.options.classes.hidden);b.toggleClass(this.options.classes.closed);a.text(c)};m.prototype.openAll=function(){};m.prototype.closeAll=
function(){};a.fn.telegraph_accordion=function(c){return this.each(function(){var b=a(this);b.data("telegraph_accordion")&&b.data("telegraph_accordion",null);b.data("telegraph_accordion",new m(this,c))})};f=function(){a(".js-accordion").each(function(){a(this).telegraph_accordion()})};a(k).ready(f);a(k).on("tmg:page-loaded",f)})(tmgJQ,window,document);
(function(a){function f(f){this.config={classes:{stuck:"--stuck",activeWp:"section-menu__link--active",menu:"section-menu",menuSection:"section-menu-item",menuClone:"section-menu--clone",menuOpen:"section-menu--open",toggleButtonOpen:"toggle-button--open",infoBar:"info-bar",infoBarClone:"info-bar--clone"},selectors:{menu:".section-menu",menuClone:".section-menu--clone",menuItem:".section-menu__item",menuLink:".section-menu__link",menuBarWaypoint:".page__content",menuSection:".section-menu-item",menuSectionTitle:".section-menu-item__title",
infoBar:".info-bar",infoBarClone:"info-bar--clone",pricePrefix:".travel-price__prefix",toggleButton:".toggle-button",infoBarWaypoint:".keyInformationCard",leadAssetHeading:".lead-asset h1",travelCtaLink:".info-bar .travel-cta__link"}};this.clss=this.config.classes;this.sels=this.config.selectors;this.eventHandlers={menu:function(){var f=this;a(this.sels.toggleButton+", "+this.sels.menuItem).on("click",function(){f.clones.menu.trigger("switchState",{state:!f.clones.menu.data("is-open")})});this.clones.menu.on("switchState",
function(e,c){e=a(this).data("is-open");c=c.state;c!==e&&(a(this).data("is-open",c).toggleClass(f.clss.menuOpen),a(f.sels.toggleButton).toggleClass(f.clss.toggleButtonOpen))});a(this.sels.menu+" a").on("click",function(e){e.preventDefault();history.pushState&&history.pushState(null,null,a(this).attr("href"));f.offsetPageForHash(location.hash)})},infoBar:function(){var f=this;a(this.sels.travelCtaLink).on("click",function(e){e.preventDefault();history.pushState&&history.pushState(null,null,a(this).attr("href"));
f.offsetPageForHash(location.hash)})}};this.defaults={toBeStuck:[this.sels.menu,this.sels.infoBar]};this.toBeStuck=f?f.map(function(a){return this.sels[a]},this):this.defaults.toBeStuck;this.clones={};this.menuWaypoints=[];this.init()}f.prototype.init=function(){this.createClones();this.createWaypoints();this.addEventHandlers();location.hash&&this.offsetPageForHash()};f.prototype.isStickyEl=function(a){return-1!=this.toBeStuck.indexOf(a)};f.prototype.createIdenticalTwin=function(f,m){f=a(f);m=f.clone().addClass(m);
f.parent().append(m);return m};f.prototype.adjustScrollAmount=function(f,m,e){e=e?e:f;return this.isStickyEl(f)?m-a(e).outerHeight():m};f.prototype.addEventHandlers=function(){Object.keys(this.eventHandlers).forEach(function(a){this.isStickyEl(this.sels[a])&&this.eventHandlers[a].call(this)},this)};f.prototype.offsetPageForHash=function(f){f=f||location.hash;try{var k=a(this.sels.infoBarWaypoint).offset().top;var e=a(this.sels.menuBarWaypoint).offset().top}catch(b){throw Error("Waypoint Selectors are not present");
}try{var c=a(f).offset().top}catch(b){throw Error("No hash string provided!");}c>=e&&(c=this.adjustScrollAmount(this.sels.menu,c,this.sels.menuItem));c>=k&&(c=this.adjustScrollAmount(this.sels.infoBar,c));c-=21;this.isStickyEl(this.sels.menu)&&this.menuWaypoints.forEach(function(a,c){a.disable()});scrollTo(0,c);this.activateMenuItem(f.replace("#",""));this.isStickyEl(this.sels.menu)&&this.menuWaypoints.forEach(function(a,c){a.enable()})};f.prototype.activateMenuItem=function(f){f=a(this.sels.menu).find("[href\x3d#"+
f+"]");a(this.sels.menuLink).removeClass(this.clss.activeWp);f.addClass(this.clss.activeWp)};f.prototype.createClones=function(){this.isStickyEl(this.sels.menu)&&(this.clones.menu=this.createIdenticalTwin(this.sels.menu,this.clss.menuClone),this.clones.menu.data("is-open",!1).prepend('\x3cdiv class\x3d"toggle-button"\x3eMore\x3c/div\x3e'));if(this.isStickyEl(this.sels.infoBar)){var f=a(this.sels.leadAssetHeading).text();this.clones.infoBar=this.createIdenticalTwin(this.sels.infoBar,this.clss.infoBarClone);
this.clones.infoBar.find(".container").prepend('\x3ch1 class\x3d"info-bar__heading"\x3e'+f+"\x3c/h1\x3e");this.clones.infoBar.find(this.sels.pricePrefix).text("from")}};f.prototype.createWaypoints=function(){var f=this;this.isStickyEl(this.sels.menu)&&(a(this.sels.menuBarWaypoint).waypoint({handler:function(a){f.clones.menu.toggleClass(f.clss.menu+f.clss.stuck);"up"===a&&f.clones.menu.trigger("switchState",{state:!1})}}),a(this.sels.menuSection).each(function(){var a=new Waypoint({element:this,handler:function(){f.activateMenuItem(this.element.id)}});
f.menuWaypoints.push(a)}));this.isStickyEl(this.sels.infoBar)&&a(this.sels.infoBarWaypoint).waypoint({handler:function(){f.clones.infoBar.toggleClass(f.clss.infoBar+f.clss.stuck)}})};a("document").ready(function(){a.fn.telegraph_sticky_navs=function(k){return this.each(function(){a(this).data("telegraph_sticky_navs",new f(k))})};a(".js-sticky-navs").each(function(){var f=a(this),m=f.data("sticky-navs");f.telegraph_sticky_navs(m)})})})(tmgJQ);
(function(a){function f(a){this.defaults=[{type:"parallax",identifier:"fullWidthImage"},{type:"fixed",identifier:"leadAsset"}];this.config={supportedTypes:["parallax","fixed"],classes:{fixed:"js-img-fixed",parallax:"js-img-parallax"},intervalMs:200,intervalMaxCount:20,dataAttribute:"data-lazy-parallax-id"};this.options=a?a:this.defaults;this.firstDomEl="";this.allSelectorsByType=[];this.intervalCounter=0;this.init()}f.prototype.init=function(){this.convertIdentifiersToSelector();this.sortByType();
if(0<a(this.firstDomEl).length)this.prepareListener();else throw Error("Lazy Parallax was not supplied a valid first element");};f.prototype.convertIdentifiersToSelector=function(){this.options.forEach(function(a,f){this.options[f].identifier="["+this.config.dataAttribute+"\x3d"+a.identifier+"]"},this)};f.prototype.setFirstDomEl=function(f){0===a(this.allSelectors).index(f)&&(this.firstDomEl=f)};f.prototype.sortByType=function(){this.config.supportedTypes.forEach(function(a){this.allSelectorsByType[a]=
[];this.options.filter(function(f){return f.type===a}).forEach(function(f){f=f.identifier;this.allSelectorsByType[a].push(f);this.setAllSelectors();this.setFirstDomEl(f)},this)},this)};f.prototype.setAllSelectors=function(){var a=[];Object.keys(this.allSelectorsByType).forEach(function(f){this[f].forEach(function(e){a.push(e)})},this.allSelectorsByType);this.allSelectors=this.coerceToString(a)};f.prototype.coerceToString=function(a){return a+""};f.prototype.applyClasses=function(){Object.keys(this.allSelectorsByType).forEach(function(f){var k=
this.config.classes[f];f=this.coerceToString(this.allSelectorsByType[f]);a(f).addClass(k)},this)};f.prototype.prepareListener=function(){if(a(this.firstDomEl).find("img").data("lazy-loaded"))this.applyClasses(),clearInterval(this.listenInterval);else if(!this.listenInterval){var f=this;this.listenInterval=setInterval(function(){f.intervalCounter++;f.intervalCounter<f.config.intervalMaxCount?f.prepareListener():(clearInterval(f.listenInterval),console.log("%c Lazy Parallax: Max interval count reached ",
"background: #222; color: #bada55"))},this.config.intervalMs)}};a("document").ready(function(){a.fn.telegraph_lazy_parallax=function(k){return this.each(function(){a(this).data("telegraph_lazy_parallax",new f(k))})};a(".js-lazy-parallax").each(function(){var f=a(this),m=f.data("lazy-parallax");f.telegraph_lazy_parallax(m)})})})(tmgJQ);