PageSourceSearch

https://www.csmonitor.com/var/ezflow_site/cache/public/javascript/…a9ebd02d7eb352f1d154e08d34b4a_1770377243.js

js csmonitor.com collected 2026-10-02 07:13:15 UTC 314,645 bytes, 4,788 lines download raw bytes

1
2!function(a,b){var c=b(a,a.document);a.lazySizes=c,"object"==typeof module&&module.exports&&(module.exports=c)}(window,function(a,b){"use strict";if(b.getElementsByClassName){var c,d=b.documentElement,e=a.Date,f=a.HTMLPictureElement,g="addEventListener",h="getAttribute",i=a[g],j=a.setTimeout,k=a.requestAnimationFrame||j,l=a.requestIdleCallback,m=/^picture$/i,n=["load","error","lazyincluded","_lazyloaded"],o={},p=Array.prototype.forEach,q=function(a,b){return o[b]||(o[b]=new RegExp("(\\s|^)"+b+"(\\s|$)")),o[b].test(a[h]("class")||"")&&o[b]},r=function(a,b){q(a,b)||a.setAttribute("class",(a[h]("class")||"").trim()+" "+b)},s=function(a,b){var c;(c=q(a,b))&&a.setAttribute("class",(a[h]("class")||"").replace(c," "))},t=function(a,b,c){var d=c?g:"removeEventListener";c&&t(a,b),n.forEach(function(c){a[d](c,b)})},u=function(a,c,d,e,f){var g=b.createEvent("CustomEvent");return g.initCustomEvent(c,!e,!f,d||{}),a.dispatchEvent(g),g},v=function(b,d){var e;!f&&(e=a.picturefill||c.pf)?e({reevaluate:!0,elements:[b]}):d&&d.src&&(b.src=d.src)},w=function(a,b){return(getComputedStyle(a,null)||{})[b]},x=function(a,b,d){for(d=d||a.offsetWidth;d<c.minSize&&b&&!a._lazysizesWidth;)d=b.offsetWidth,b=b.parentNode;return d},y=function(){var a,c,d=[],e=function(){var b;for(a=!0,c=!1;d.length;)b=d.shift(),b[0].apply(b[1],b[2]);a=!1};return function(f){a?f.apply(this,arguments):(d.push([f,this,arguments]),c||(c=!0,(b.hidden?j:k)(e)))}}(),z=function(a,b){return b?function(){y(a)}:function(){var b=this,c=arguments;y(function(){a.apply(b,c)})}},A=function(a){var b,c=0,d=125,f=999,g=f,h=function(){b=!1,c=e.now(),a()},i=l?function(){l(h,{timeout:g}),g!==f&&(g=f)}:z(function(){j(h)},!0);return function(a){var f;(a=a===!0)&&(g=66),b||(b=!0,f=d-(e.now()-c),0>f&&(f=0),a||9>f&&l?i():j(i,f))}},B=function(a){var b,c,d=99,f=function(){b=null,a()},g=function(){var a=e.now()-c;d>a?j(g,d-a):(l||f)(f)};return function(){c=e.now(),b||(b=j(g,d))}},C=function(){var f,k,l,n,o,x,C,E,F,G,H,I,J,K,L,M=/^img$/i,N=/^iframe$/i,O="onscroll"in a&&!/glebot/.test(navigator.userAgent),P=0,Q=0,R=0,S=0,T=function(a){R--,a&&a.target&&t(a.target,T),(!a||0>R||!a.target)&&(R=0)},U=function(a,c){var e,f=a,g="hidden"==w(b.body,"visibility")||"hidden"!=w(a,"visibility");for(F-=c,I+=c,G-=c,H+=c;g&&(f=f.offsetParent)&&f!=b.body&&f!=d;)g=(w(f,"opacity")||1)>0,g&&"visible"!=w(f,"overflow")&&(e=f.getBoundingClientRect(),g=H>e.left&&G<e.right&&I>e.top-1&&F<e.bottom+1);return g},V=function(){var a,b,e,g,i,j,m,n,p;if((o=c.loadMode)&&8>R&&(a=f.length)){b=0,S++,null==K&&("expand"in c||(c.expand=d.clientHeight>500?500:400),J=c.expand,K=J*c.expFactor),K>Q&&1>R&&S>3&&o>2?(Q=K,S=0):Q=o>1&&S>2&&6>R?J:P;for(;a>b;b++)if(f[b]&&!f[b]._lazyRace)if(O)if((n=f[b][h]("data-expand"))&&(j=1*n)||(j=Q),p!==j&&(C=innerWidth+j*L,E=innerHeight+j,m=-1*j,p=j),e=f[b].getBoundingClientRect(),(I=e.bottom)>=m&&(F=e.top)<=E&&(H=e.right)>=m*L&&(G=e.left)<=C&&(I||H||G||F)&&(l&&3>R&&!n&&(3>o||4>S)||U(f[b],j))){if(ba(f[b]),i=!0,R>9)break}else!i&&l&&!g&&4>R&&4>S&&o>2&&(k[0]||c.preloadAfterLoad)&&(k[0]||!n&&(I||H||G||F||"auto"!=f[b][h](c.sizesAttr)))&&(g=k[0]||f[b]);else ba(f[b]);g&&!i&&ba(g)}},W=A(V),X=function(a){r(a.target,c.loadedClass),s(a.target,c.loadingClass),t(a.target,Z)},Y=z(X),Z=function(a){Y({target:a.target})},$=function(a,b){try{a.contentWindow.location.replace(b)}catch(c){a.src=b}},_=function(a){var b,d,e=a[h](c.srcsetAttr);(b=c.customMedia[a[h]("data-media")||a[h]("media")])&&a.setAttribute("media",b),e&&a.setAttribute("srcset",e),b&&(d=a.parentNode,d.insertBefore(a.cloneNode(),a),d.removeChild(a))},aa=z(function(a,b,d,e,f){var g,i,k,l,o,q;(o=u(a,"lazybeforeunveil",b)).defaultPrevented||(e&&(d?r(a,c.autosizesClass):a.setAttribute("sizes",e)),i=a[h](c.srcsetAttr),g=a[h](c.srcAttr),f&&(k=a.parentNode,l=k&&m.test(k.nodeName||"")),q=b.firesLoad||"src"in a&&(i||g||l),o={target:a},q&&(t(a,T,!0),clearTimeout(n),n=j(T,2500),r(a,c.loadingClass),t(a,Z,!0)),l&&p.call(k.getElementsByTagName("source"),_),i?a.setAttribute("srcset",i):g&&!l&&(N.test(a.nodeName)?$(a,g):a.src=g),(i||l)&&v(a,{src:g})),y(function(){a._lazyRace&&delete a._lazyRace,s(a,c.lazyClass),(!q||a.complete)&&(q?T(o):R--,X(o))})}),ba=function(a){var b,d=M.test(a.nodeName),e=d&&(a[h](c.sizesAttr)||a[h]("sizes")),f="auto"==e;(!f&&l||!d||!a.src&&!a.srcset||a.complete||q(a,c.errorClass))&&(b=u(a,"lazyunveilread").detail,f&&D.updateElem(a,!0,a.offsetWidth),a._lazyRace=!0,R++,aa(a,b,f,e,d))},ca=function(){if(!l){if(e.now()-x<999)return void j(ca,999);var a=B(function(){c.loadMode=3,W()});
2l=!0,c.loadMode=3,W(),i("scroll",function(){3==c.loadMode&&(c.loadMode=2),a()},!0)}};return{_:function(){x=e.now(),f=b.getElementsByClassName(c.lazyClass),k=b.getElementsByClassName(c.lazyClass+" "+c.preloadClass),L=c.hFac,i("scroll",W,!0),i("resize",W,!0),a.MutationObserver?new MutationObserver(W).observe(d,{childList:!0,subtree:!0,attributes:!0}):(d[g]("DOMNodeInserted",W,!0),d[g]("DOMAttrModified",W,!0),setInterval(W,999)),i("hashchange",W,!0),["focus","mouseover","click","load","transitionend","animationend","webkitAnimationEnd"].forEach(function(a){b[g](a,W,!0)}),/d$|^c/.test(b.readyState)?ca():(i("load",ca),b[g]("DOMContentLoaded",W),j(ca,2e4)),W(f.length>0)},checkElems:W,unveil:ba}}(),D=function(){var a,d=z(function(a,b,c,d){var e,f,g;if(a._lazysizesWidth=d,d+="px",a.setAttribute("sizes",d),m.test(b.nodeName||""))for(e=b.getElementsByTagName("source"),f=0,g=e.length;g>f;f++)e[f].setAttribute("sizes",d);c.detail.dataAttr||v(a,c.detail)}),e=function(a,b,c){var e,f=a.parentNode;f&&(c=x(a,f,c),e=u(a,"lazybeforesizes",{width:c,dataAttr:!!b}),e.defaultPrevented||(c=e.detail.width,c&&c!==a._lazysizesWidth&&d(a,f,e,c)))},f=function(){var b,c=a.length;if(c)for(b=0;c>b;b++)e(a[b])},g=B(f);return{_:function(){a=b.getElementsByClassName(c.autosizesClass),i("resize",g)},checkElems:g,updateElem:e}}(),E=function(){E.i||(E.i=!0,D._(),C._())};return function(){var b,d={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2};c=a.lazySizesConfig||a.lazysizesConfig||{};for(b in d)b in c||(c[b]=d[b]);a.lazySizesConfig=c,j(function(){c.init&&E()})}(),{cfg:c,autoSizer:D,loader:C,init:E,uP:v,aC:r,rC:s,hC:q,fire:u,gW:x,rAF:y}}});
3function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}!function(t){"use strict";function e(t){if(void 0===Function.prototype.name){var e=/function\s([^(]{1,})\(/,i=e.exec(t.toString());return i&&i.length>1?i[1].trim():""}return void 0===t.prototype?t.constructor.name:t.prototype.constructor.name}function i(t){return"true"===t||"false"!==t&&(isNaN(1*t)?t:parseFloat(t))}function n(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}var o="6.3.0",a={version:o,_plugins:{},_uuids:[],rtl:function(){return"rtl"===t("html").attr("dir")},plugin:function(t,i){var o=i||e(t),a=n(o);this._plugins[a]=this[o]=t},registerPlugin:function(t,i){var o=i?n(i):e(t.constructor).toLowerCase();t.uuid=this.GetYoDigits(6,o),t.$element.attr("data-"+o)||t.$element.attr("data-"+o,t.uuid),t.$element.data("zfPlugin")||t.$element.data("zfPlugin",t),t.$element.trigger("init.zf."+o),this._uuids.push(t.uuid)},unregisterPlugin:function(t){var i=n(e(t.$element.data("zfPlugin").constructor));this._uuids.splice(this._uuids.indexOf(t.uuid),1),t.$element.removeAttr("data-"+i).removeData("zfPlugin").trigger("destroyed.zf."+i);for(var o in t)t[o]=null},reInit:function(e){var i=e instanceof t;try{if(i)e.each(function(){t(this).data("zfPlugin")._init()});else{var o=typeof e,a=this,s={object:function(e){e.forEach(function(e){e=n(e),t("[data-"+e+"]").foundation("_init")})},string:function(){e=n(e),t("[data-"+e+"]").foundation("_init")},undefined:function(){this.object(Object.keys(a._plugins))}};s[o](e)}}catch(t){console.error(t)}finally{return e}},GetYoDigits:function(t,e){return t=t||6,Math.round(Math.pow(36,t+1)-Math.random()*Math.pow(36,t)).toString(36).slice(1)+(e?"-"+e:"")},reflow:function(e,n){"undefined"==typeof n?n=Object.keys(this._plugins):"string"==typeof n&&(n=[n]);var o=this;t.each(n,function(n,a){var s=o._plugins[a],r=t(e).find("[data-"+a+"]").addBack("[data-"+a+"]");r.each(function(){var e=t(this),n={};if(e.data("zfPlugin"))return void console.warn("Tried to initialize "+a+" on an element that already has a Foundation plugin.");
3if(e.attr("data-options")){e.attr("data-options").split(";").forEach(function(t,e){var o=t.split(":").map(function(t){return t.trim()});o[0]&&(n[o[0]]=i(o[1]))})}try{e.data("zfPlugin",new s(t(this),n))}catch(t){console.error(t)}finally{return}})})},getFnName:e,transitionend:function(t){var e,i={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend"},n=document.createElement("div");for(var o in i)"undefined"!=typeof n.style[o]&&(e=i[o]);return e?e:(e=setTimeout(function(){t.triggerHandler("transitionend",[t])},1),"transitionend")}};a.util={throttle:function(t,e){var i=null;return function(){var n=this,o=arguments;null===i&&(i=setTimeout(function(){t.apply(n,o),i=null},e))}}};var s=function(i){var n=typeof i,o=t("meta.foundation-mq"),s=t(".no-js");if(o.length||t('<meta class="foundation-mq">').appendTo(document.head),s.length&&s.removeClass("no-js"),"undefined"===n)a.MediaQuery._init(),a.reflow(this);else{if("string"!==n)throw new TypeError("We're sorry, "+n+" is not a valid parameter. You must use a string representing the method you wish to invoke.");var r=Array.prototype.slice.call(arguments,1),l=this.data("zfPlugin");if(void 0===l||void 0===l[i])throw new ReferenceError("We're sorry, '"+i+"' is not an available method for "+(l?e(l):"this element")+".");1===this.length?l[i].apply(l,r):this.each(function(e,n){l[i].apply(t(n).data("zfPlugin"),r)})}return this};window.Foundation=a,t.fn.foundation=s,function(){Date.now&&window.Date.now||(window.Date.now=Date.now=function(){return(new Date).getTime()});for(var t=["webkit","moz"],e=0;e<t.length&&!window.requestAnimationFrame;++e){var i=t[e];window.requestAnimationFrame=window[i+"RequestAnimationFrame"],window.cancelAnimationFrame=window[i+"CancelAnimationFrame"]||window[i+"CancelRequestAnimationFrame"]}if(/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent)||!window.requestAnimationFrame||!window.cancelAnimationFrame){var n=0;window.requestAnimationFrame=function(t){var e=Date.now(),i=Math.max(n+16,e);return setTimeout(function(){t(n=i)},i-e)},window.cancelAnimationFrame=clearTimeout}window.performance&&window.performance.now||(window.performance={start:Date.now(),now:function(){return Date.now()-this.start}})}(),Function.prototype.bind||(Function.prototype.bind=function(t){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var e=Array.prototype.slice.call(arguments,1),i=this,n=function(){},o=function(){return i.apply(this instanceof n?this:t,e.concat(Array.prototype.slice.call(arguments)))};return this.prototype&&(n.prototype=this.prototype),o.prototype=new n,o})}(jQuery),!function(t){function e(t){var e={};return"string"!=typeof t?e:(t=t.trim().slice(1,-1))?e=t.split("&").reduce(function(t,e){var i=e.replace(/\+/g," ").split("="),n=i[0],o=i[1];return n=decodeURIComponent(n),o=void 0===o?null:decodeURIComponent(o),t.hasOwnProperty(n)?Array.isArray(t[n])?t[n].push(o):t[n]=[t[n],o]:t[n]=o,t},{}):e}var i={queries:[],current:"",_init:function(){var i,n=this,o=t(".foundation-mq").css("font-family");i=e(o);for(var a in i)i.hasOwnProperty(a)&&n.queries.push({name:a,value:"only screen and (min-width: "+i[a]+")"});this.current=this._getCurrentSize(),this._watcher()},atLeast:function(t){var e=this.get(t);return!!e&&window.matchMedia(e).matches},is:function(t){return t=t.trim().split(" "),t.length>1&&"only"===t[1]?t[0]===this._getCurrentSize():this.atLeast(t[0])},get:function(t){for(var e in this.queries)if(this.queries.hasOwnProperty(e)){var i=this.queries[e];if(t===i.name)return i.value}return null},_getCurrentSize:function(){for(var t,e=0;e<this.queries.length;e++){var i=this.queries[e];window.matchMedia(i.value).matches&&(t=i)}return"object"==typeof t?t.name:t},_watcher:function(){var e=this;t(window).on("resize.zf.mediaquery",function(){var i=e._getCurrentSize(),n=e.current;i!==n&&(e.current=i,t(window).trigger("changed.zf.mediaquery",[i,n]))})}};Foundation.MediaQuery=i,window.matchMedia||(window.matchMedia=function(){"use strict";var t=window.styleMedia||window.media;if(!t){var e=document.createElement("style"),i=document.getElementsByTagName("script")[0],n=null;e.type="text/css",e.id="matchmediajs-test",i&&i.parentNode&&i.parentNode.insertBefore(e,i),n="getComputedStyle"in window&&window.getComputedStyle(e,null)||e.currentStyle,t={matchMedium:function(t){var i="@media "+t+"{ #matchmediajs-test { width: 1px; } }";return e.styleSheet?e.styleSheet.cssText=i:e.textContent=i,"1px"===n.width}}}return function(e){return{matches:t.matchMedium(e||"all"),media:e||"all"}}}()),Foundation.MediaQuery=i}(jQuery),!function(t){function e(t){var e={};for(var i in t)e[t[i]]=t[i];return e}var i={9:"TAB",13:"ENTER",27:"ESCAPE",32:"SPACE",37:"ARROW_LEFT",38:"ARROW_UP",39:"ARROW_RIGHT",40:"ARROW_DOWN"},n={},o={keys:e(i),parseKey:function(t){var e=i[t.which||t.keyCode]||String.fromCharCode(t.which).toUpperCase();return e=e.replace(/\W+/,""),t.shiftKey&&(e="SHIFT_"+e),t.ctrlKey&&(e="CTRL_"+e),t.altKey&&
3(e="ALT_"+e),e=e.replace(/_$/,"")},handleKey:function(e,i,o){var a,s,r,l=n[i],d=this.parseKey(e);if(!l)return console.warn("Component not defined!");if(a="undefined"==typeof l.ltr?l:Foundation.rtl()?t.extend({},l.ltr,l.rtl):t.extend({},l.rtl,l.ltr),s=a[d],r=o[s],r&&"function"==typeof r){var u=r.apply();(o.handled||"function"==typeof o.handled)&&o.handled(u)}else(o.unhandled||"function"==typeof o.unhandled)&&o.unhandled()},findFocusable:function(e){return!!e&&e.find("a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]").filter(function(){return!(!t(this).is(":visible")||t(this).attr("tabindex")<0)})},register:function(t,e){n[t]=e},trapFocus:function(t){var e=Foundation.Keyboard.findFocusable(t),i=e.eq(0),n=e.eq(-1);t.on("keydown.zf.trapfocus",function(t){t.target===n[0]&&"TAB"===Foundation.Keyboard.parseKey(t)?(t.preventDefault(),i.focus()):t.target===i[0]&&"SHIFT_TAB"===Foundation.Keyboard.parseKey(t)&&(t.preventDefault(),n.focus())})},releaseFocus:function(t){t.off("keydown.zf.trapfocus")}};Foundation.Keyboard=o}(jQuery),!function(t){function e(t,e,i){function n(r){s||(s=r),a=r-s,i.apply(e),a<t?o=window.requestAnimationFrame(n,e):(window.cancelAnimationFrame(o),e.trigger("finished.zf.animate",[e]).triggerHandler("finished.zf.animate",[e]))}var o,a,s=null;return 0===t?(i.apply(e),void e.trigger("finished.zf.animate",[e]).triggerHandler("finished.zf.animate",[e])):void(o=window.requestAnimationFrame(n))}function i(e,i,a,s){function r(){e||i.hide(),l(),s&&s.apply(i)}function l(){i[0].style.transitionDuration=0,i.removeClass(d+" "+u+" "+a)}if(i=t(i).eq(0),i.length){var d=e?n[0]:n[1],u=e?o[0]:o[1];l(),i.addClass(a).css("transition","none"),requestAnimationFrame(function(){i.addClass(d),e&&i.show()}),requestAnimationFrame(function(){i[0].offsetWidth,i.css("transition","").addClass(u)}),i.one(Foundation.transitionend(i),r)}}var n=["mui-enter","mui-leave"],o=["mui-enter-active","mui-leave-active"],a={animateIn:function(t,e,n){i(!0,t,e,n)},animateOut:function(t,e,n){i(!1,t,e,n)}};Foundation.Move=e,Foundation.Motion=a}(jQuery),!function(t){function e(t,e,n,o){var a,s,r,l,d=i(t);if(e){var u=i(e);s=d.offset.top+d.height<=u.height+u.offset.top,a=d.offset.top>=u.offset.top,r=d.offset.left>=u.offset.left,l=d.offset.left+d.width<=u.width+u.offset.left}else s=d.offset.top+d.height<=d.windowDims.height+d.windowDims.offset.top,a=d.offset.top>=d.windowDims.offset.top,r=d.offset.left>=d.windowDims.offset.left,l=d.offset.left+d.width<=d.windowDims.width;var f=[s,a,r,l];return n?r===l==!0:o?a===s==!0:f.indexOf(!1)===-1}function i(t,e){if(t=t.length?t[0]:t,t===window||t===document)throw new Error("I'm sorry, Dave. I'm afraid I can't do that.");var i=t.getBoundingClientRect(),n=t.parentNode.getBoundingClientRect(),o=document.body.getBoundingClientRect(),a=window.pageYOffset,s=window.pageXOffset;return{width:i.width,height:i.height,offset:{top:i.top+a,left:i.left+s},parentDims:{width:n.width,height:n.height,offset:{top:n.top+a,left:n.left+s}},windowDims:{width:o.width,height:o.height,offset:{top:a,left:s}}}}function n(t,e,n,o,a,s){var r=i(t),l=e?i(e):null;switch(n){case"top":return{left:Foundation.rtl()?l.offset.left-r.width+l.width:l.offset.left,top:l.offset.top-(r.height+o)};case"left":return{left:l.offset.left-(r.width+a),top:l.offset.top};case"right":return{left:l.offset.left+l.width+a,top:l.offset.top};case"center top":return{left:l.offset.left+l.width/2-r.width/2,top:l.offset.top-(r.height+o)};case"center bottom":return{left:s?a:l.offset.left+l.width/2-r.width/2,top:l.offset.top+l.height+o};case"center left":return{left:l.offset.left-(r.width+a),top:l.offset.top+l.height/2-r.height/2};case"center right":return{left:l.offset.left+l.width+a+1,top:l.offset.top+l.height/2-r.height/2};case"center":return{left:r.windowDims.offset.left+r.windowDims.width/2-r.width/2,top:r.windowDims.offset.top+r.windowDims.height/2-r.height/2};case"reveal":return{left:(r.windowDims.width-r.width)/2,top:r.windowDims.offset.top+o};case"reveal full":return{left:r.windowDims.offset.left,top:r.windowDims.offset.top};case"left bottom":return{left:l.offset.left,top:l.offset.top+l.height+o};case"right bottom":return{left:l.offset.left+l.width+a-r.width,top:l.offset.top+l.height+o};default:return{left:Foundation.rtl()?l.offset.left-r.width+l.width:l.offset.left+a,top:l.offset.top+l.height+o}}}Foundation.Box={ImNotTouchingYou:e,GetDimensions:i,GetOffsets:n}}(jQuery),!function(t){function e(){s(),n(),o(),a(),i()}function i(e){var i=t("[data-yeti-box]"),n=["dropdown","tooltip","reveal"];if(e&&("string"==typeof e?n.push(e):"object"==typeof e&&"string"==typeof e[0]?n.concat(e):console.error("Plugin names must be strings")),i.length){var o=n.map(function(t){return"closeme.zf."+t}).join(" ");t(window).off(o).on(o,function(e,i){var n=e.namespace.split(".")[0],o=t("[data-"+n+"]").not('[data-yeti-box="'+i+'"]');o.each(function(){var e=t(this);e.triggerHandler("close.zf.trigger",[e])})})}}function n(e){var i=void 0,n=t("[data-resize]");n.length&&t(window).off("resize.zf.trigger").on("resize.zf.trigger",function(o){i&&clearTimeout(i),i=setTimeout(function(){r||n.each(function(){t(this).triggerHandler("resizeme.zf.trigger")}),n.attr("data-events","resize")},e||10)})}function o(e){var i=void 0,n=t("[data-scroll]");n.length&&t(window).off("scroll.zf.trigger").on("scroll.zf.trigger",function(o){i&&clearTimeout(i),i=setTimeout(function(){r||n.each(function(){t(this).triggerHandler("scrollme.zf.trigger")}),n.attr("data-events","scroll")},e||10)})}function a(e){var i=t("[data-mutate]");i.length&&r&&i.each(function(){t(this).triggerHandler("mutateme.zf.trigger")})}function s(){if(!r)return!1;var e=document.querySelectorAll("[data-resize], [data-scroll], [data-mutate]"),i=function(e){var i=t(e[0].target);switch(e[0].type){case"attributes":"scroll"===i.attr("data-events")&&"data-events"===e[0].attributeName&&i.triggerHandler("scrollme.zf.trigger",[i,window.pageYOffset]),"resize"===i.attr("data-events")&&"data-events"===e[0].attributeName&&i.triggerHandler("resizeme.zf.trigger",[i]),"style"===e[0].attributeName&&(i.closest("[data-mutate]").attr("data-events","mutate"),i.closest("[data-mutate]").triggerHandler("mutateme.zf.trigger",[i.closest("[data-mutate]")]));break;case"childList":i.closest("[data-mutate]").attr("data-events","mutate"),i.closest("[data-mutate]").triggerHandler("mutateme.zf.trigger",[i.closest("[data-mutate]")]);break;default:return!1}};if(e.length)for(var n=0;n<=e.length-1;n++){var o=new r(i);o.observe(e[n],{attributes:!0,childList:!0,characterData:!1,subtree:!0,attributeFilter:["data-events","style"]})}}
3var r=function(){for(var t=["WebKit","Moz","O","Ms",""],e=0;e<t.length;e++)if(t[e]+"MutationObserver"in window)return window[t[e]+"MutationObserver"];return!1}(),l=function(e,i){e.data(i).split(" ").forEach(function(n){t("#"+n)["close"===i?"trigger":"triggerHandler"](i+".zf.trigger",[e])})};t(document).on("click.zf.trigger","[data-open]",function(){l(t(this),"open")}),t(document).on("click.zf.trigger","[data-close]",function(){var e=t(this).data("close");e?l(t(this),"close"):t(this).trigger("close.zf.trigger")}),t(document).on("click.zf.trigger","[data-toggle]",function(){var e=t(this).data("toggle");e?l(t(this),"toggle"):t(this).trigger("toggle.zf.trigger")}),t(document).on("close.zf.trigger","[data-closable]",function(e){e.stopPropagation();var i=t(this).data("closable");""!==i?Foundation.Motion.animateOut(t(this),i,function(){t(this).trigger("closed.zf")}):t(this).fadeOut().trigger("closed.zf")}),t(document).on("focus.zf.trigger blur.zf.trigger","[data-toggle-focus]",function(){var e=t(this).data("toggle-focus");t("#"+e).triggerHandler("toggle.zf.trigger",[t(this)])}),t(window).on("load",function(){e()}),Foundation.IHearYou=e}(jQuery);var _createClass=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}();!function(t){var e=function(){function e(i,n){_classCallCheck(this,e),this.$element=i,this.options=t.extend({},e.defaults,this.$element.data(),n),this._init(),Foundation.registerPlugin(this,"Accordion"),Foundation.Keyboard.register("Accordion",{ENTER:"toggle",SPACE:"toggle",ARROW_DOWN:"next",ARROW_UP:"previous"})}return _createClass(e,[{key:"_init",value:function(){this.$element.attr("role","tablist"),this.$tabs=this.$element.children("[data-accordion-item]"),this.$tabs.each(function(e,i){var n=t(i),o=n.children("[data-tab-content]"),a=o[0].id||Foundation.GetYoDigits(6,"accordion"),s=i.id||a+"-label";n.find("a:first").attr({"aria-controls":a,role:"tab",id:s,"aria-expanded":!1,"aria-selected":!1}),o.attr({role:"tabpanel","aria-labelledby":s,"aria-hidden":!0,id:a})});var e=this.$element.find(".is-active").children("[data-tab-content]");e.length&&this.down(e,!0),this._events()}},{key:"_events",value:function(){var e=this;this.$tabs.each(function(){var i=t(this),n=i.children("[data-tab-content]");n.length&&i.children("a").off("click.zf.accordion keydown.zf.accordion").on("click.zf.accordion",function(t){t.preventDefault(),e.toggle(n)}).on("keydown.zf.accordion",function(t){Foundation.Keyboard.handleKey(t,"Accordion",{toggle:function(){e.toggle(n)},next:function(){var t=i.next().find("a").focus();e.options.multiExpand||t.trigger("click.zf.accordion")},previous:function(){var t=i.prev().find("a").focus();e.options.multiExpand||t.trigger("click.zf.accordion")},handled:function(){t.preventDefault(),t.stopPropagation()}})})})}},{key:"toggle",value:function(t){t.parent().hasClass("is-active")?this.up(t):this.down(t)}},{key:"down",value:function(e,i){var n=this;if(e.attr("aria-hidden",!1).parent("[data-tab-content]").addBack().parent().addClass("is-active"),!this.options.multiExpand&&!i){var o=this.$element.children(".is-active").children("[data-tab-content]");o.length&&this.up(o.not(e))}e.slideDown(this.options.slideSpeed,function(){n.$element.trigger("down.zf.accordion",[e])}),t("#"+e.attr("aria-labelledby")).attr({"aria-expanded":!0,"aria-selected":!0})}},{key:"up",value:function(e){var i=e.parent().siblings(),n=this;(this.options.allowAllClosed||i.hasClass("is-active"))&&e.parent().hasClass("is-active")&&(e.slideUp(n.options.slideSpeed,function(){n.$element.trigger("up.zf.accordion",[e])}),e.attr("aria-hidden",!0).parent().removeClass("is-active"),t("#"+e.attr("aria-labelledby")).attr({"aria-expanded":!1,"aria-selected":!1}))}},{key:"destroy",value:function(){this.$element.find("[data-tab-content]").stop(!0).slideUp(0).css("display",""),this.$element.find("a").off(".zf.accordion"),Foundation.unregisterPlugin(this)}}]),e}();e.defaults={slideSpeed:250,multiExpand:!1,allowAllClosed:!1}
3,Foundation.plugin(e,"Accordion")}(jQuery);var _createClass=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}();!function(t){function e(){return/iP(ad|hone|od).*OS/.test(window.navigator.userAgent)}function i(){return/Android/.test(window.navigator.userAgent)}function n(){return e()||i()}var o=function(){function e(i,n){_classCallCheck(this,e),this.$element=i,this.options=t.extend({},e.defaults,this.$element.data(),n),this._init(),Foundation.registerPlugin(this,"Reveal"),Foundation.Keyboard.register("Reveal",{ENTER:"open",SPACE:"open",ESCAPE:"close"})}return _createClass(e,[{key:"_init",value:function(){this.id=this.$element.attr("id"),this.isActive=!1,this.cached={mq:Foundation.MediaQuery.current},this.isMobile=n(),this.$anchor=t(t('[data-open="'+this.id+'"]').length?'[data-open="'+this.id+'"]':'[data-toggle="'+this.id+'"]'),this.$anchor.attr({"aria-controls":this.id,"aria-haspopup":!0,tabindex:0}),(this.options.fullScreen||this.$element.hasClass("full"))&&(this.options.fullScreen=!0,this.options.overlay=!1),this.options.overlay&&!this.$overlay&&(this.$overlay=this._makeOverlay(this.id)),this.$element.attr({role:"dialog","aria-hidden":!0,"data-yeti-box":this.id,"data-resize":this.id}),this.$overlay?this.$element.detach().appendTo(this.$overlay):(this.$element.detach().appendTo(t(this.options.appendTo)),this.$element.addClass("without-overlay")),this._events(),this.options.deepLink&&window.location.hash==="#"+this.id&&t(window).one("load.zf.reveal",this.open.bind(this))}},{key:"_makeOverlay",value:function(){return t("<div></div>").addClass("reveal-overlay").appendTo(this.options.appendTo)}},{key:"_updatePosition",value:function(){var e,i,n=this.$element.outerWidth(),o=t(window).width(),a=this.$element.outerHeight(),s=t(window).height();e="auto"===this.options.hOffset?parseInt((o-n)/2,10):parseInt(this.options.hOffset,10),i="auto"===this.options.vOffset?a>s?parseInt(Math.min(100,s/10),10):parseInt((s-a)/4,10):parseInt(this.options.vOffset,10),this.$element.css({top:i+"px"}),this.$overlay&&"auto"===this.options.hOffset||(this.$element.css({left:e+"px"}),this.$element.css({margin:"0px"}))}},{key:"_events",value:function(){var e=this,i=this;this.$element.on({"open.zf.trigger":this.open.bind(this),"close.zf.trigger":function(n,o){if(n.target===i.$element[0]||t(n.target).parents("[data-closable]")[0]===o)return e.close.apply(e)},"toggle.zf.trigger":this.toggle.bind(this),"resizeme.zf.trigger":function(){i._updatePosition()}}),this.$anchor.length&&this.$anchor.on("keydown.zf.reveal",function(t){13!==t.which&&32!==t.which||(t.stopPropagation(),t.preventDefault(),i.open())}),this.options.closeOnClick&&this.options.overlay&&this.$overlay.off(".zf.reveal").on("click.zf.reveal",function(e){e.target!==i.$element[0]&&!t.contains(i.$element[0],e.target)&&t.contains(document,e.target)&&i.close()}),this.options.deepLink&&t(window).on("popstate.zf.reveal:"+this.id,this._handleState.bind(this))}},{key:"_handleState",value:function(t){window.location.hash!=="#"+this.id||this.isActive?this.close():this.open()}},{key:"open",value:function(){function e(){o.isMobile?(o.originalScrollPos||(o.originalScrollPos=window.pageYOffset),t("html, body").addClass("is-reveal-open")):t("body").addClass("is-reveal-open")}var i=this;if(this.options.deepLink){var n="#"+this.id;window.history.pushState?window.history.pushState(null,null,n):window.location.hash=n}this.isActive=!0,this.$element.css({visibility:"hidden"}).show().scrollTop(0),this.options.overlay&&this.$overlay.css({visibility:"hidden"}).show(),this._updatePosition(),this.$element.hide().css({visibility:""}),this.$overlay&&(this.$overlay.css({visibility:""}).hide(),this.$element.hasClass("fast")?this.$overlay.addClass("fast"):this.$element.hasClass("slow")&&this.$overlay.addClass("slow")),this.options.multipleOpened||this.$element.trigger("closeme.zf.reveal",this.id);var o=this;this.options.animationIn?!function(){var t=function(){o.$element.attr({"aria-hidden":!1,tabindex:-1}).focus(),e(),Foundation.Keyboard.trapFocus(o.$element)};i.options.overlay&&Foundation.Motion.animateIn(i.$overlay,"fade-in"),Foundation.Motion.animateIn(i.$element,i.options.animationIn,function(){i.$element&&(i.focusableElements=Foundation.Keyboard.findFocusable(i.$element),t())})}():(this.options.overlay&&this.$overlay.show(0),this.$element.show(this.options.showDelay)),this.$element.attr({"aria-hidden":!1,tabindex:-1}).focus(),Foundation.Keyboard.trapFocus(this.$element),this.$element.trigger("open.zf.reveal"),e(),setTimeout(function(){i._extraHandlers()},0)}},{key:"_extraHandlers",value:function(){var e=this;this.$element&&(this.focusableElements=Foundation.Keyboard.findFocusable(this.$element),this.options.overlay||!this.options.closeOnClick||this.options.fullScreen||t("body").on("click.zf.reveal",function(i){i.target!==e.$element[0]&&!t.contains(e.$element[0],i.target)&&t.contains(document,i.target)&&e.close()}),this.options.closeOnEsc&&t(window).on("keydown.zf.reveal",function(t){Foundation.Keyboard.handleKey(t,"Reveal",{close:function(){e.options.closeOnEsc&&(e.close(),e.$anchor.focus())}})}
3),this.$element.on("keydown.zf.reveal",function(i){var n=t(this);Foundation.Keyboard.handleKey(i,"Reveal",{open:function(){e.$element.find(":focus").is(e.$element.find("[data-close]"))?setTimeout(function(){e.$anchor.focus()},1):n.is(e.focusableElements)&&e.open()},close:function(){e.options.closeOnEsc&&(e.close(),e.$anchor.focus())},handled:function(t){t&&i.preventDefault()}})}))}},{key:"close",value:function(){function e(){i.isMobile?(t("html, body").removeClass("is-reveal-open"),i.originalScrollPos&&(t("body").scrollTop(i.originalScrollPos),i.originalScrollPos=null)):t("body").removeClass("is-reveal-open"),Foundation.Keyboard.releaseFocus(i.$element),i.$element.attr("aria-hidden",!0),i.$element.trigger("closed.zf.reveal")}if(!this.isActive||!this.$element.is(":visible"))return!1;var i=this;this.options.animationOut?(this.options.overlay?Foundation.Motion.animateOut(this.$overlay,"fade-out",e):e(),Foundation.Motion.animateOut(this.$element,this.options.animationOut)):(this.options.overlay?this.$overlay.hide(0,e):e(),this.$element.hide(this.options.hideDelay)),this.options.closeOnEsc&&t(window).off("keydown.zf.reveal"),!this.options.overlay&&this.options.closeOnClick&&t("body").off("click.zf.reveal"),this.$element.off("keydown.zf.reveal"),this.options.resetOnClose&&this.$element.html(this.$element.html()),this.isActive=!1,i.options.deepLink&&(window.history.replaceState?window.history.replaceState("",document.title,window.location.href.replace("#"+this.id,"")):window.location.hash="")}},{key:"toggle",value:function(){this.isActive?this.close():this.open()}},{key:"destroy",value:function(){this.options.overlay&&(this.$element.appendTo(t(this.options.appendTo)),this.$overlay.hide().off().remove()),this.$element.hide().off(),this.$anchor.off(".zf"),t(window).off(".zf.reveal:"+this.id),Foundation.unregisterPlugin(this)}}]),e}();o.defaults={animationIn:"",animationOut:"",showDelay:0,hideDelay:0,closeOnClick:!0,closeOnEsc:!0,multipleOpened:!1,vOffset:"auto",hOffset:"auto",fullScreen:!1,btmOffsetPct:10,overlay:!0,resetOnClose:!1,deepLink:!1,appendTo:"body"},Foundation.plugin(o,"Reveal")}(jQuery);var _createClass=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}();!function(t){var e=function(){function e(i,n){_classCallCheck(this,e),this.$element=i,this.options=t.extend({},e.defaults,this.$element.data(),n),this.isActive=!1,this.isClick=!1,this._init(),Foundation.registerPlugin(this,"Tooltip")}return _createClass(e,[{key:"_init",value:function(){var e=this.$element.attr("aria-describedby")||Foundation.GetYoDigits(6,"tooltip");this.options.positionClass=this.options.positionClass||this._getPositionClass(this.$element),this.options.tipText=this.options.tipText||this.$element.attr("title"),this.template=this.options.template?t(this.options.template):this._buildTemplate(e),this.options.allowHtml?this.template.appendTo(document.body).html(this.options.tipText).hide():this.template.appendTo(document.body).text(this.options.tipText).hide(),this.$element.attr({title:"","aria-describedby":e,"data-yeti-box":e,"data-toggle":e,"data-resize":e}).addClass(this.options.triggerClass),this.usedPositions=[],this.counter=4,this.classChanged=!1,this._events()}},{key:"_getPositionClass",value:function(t){if(!t)return"";var e=t[0].className.match(/\b(top|left|right)\b/g);return e=e?e[0]:""}},{key:"_buildTemplate",value:function(e){var i=(this.options.tooltipClass+" "+this.options.positionClass+" "+this.options.templateClasses).trim(),n=t("<div></div>").addClass(i).attr({role:"tooltip","aria-hidden":!0,"data-is-active":!1,"data-is-focus":!1,id:e});return n}},{key:"_reposition",value:function(t){this.usedPositions.push(t?t:"bottom"),!t&&this.usedPositions.indexOf("top")<0?this.template.addClass("top"):"top"===t&&this.usedPositions.indexOf("bottom")<0?this.template.removeClass(t):"left"===t&&this.usedPositions.indexOf("right")<0?this.template.removeClass(t).addClass("right"):"right"===t&&this.usedPositions.indexOf("left")<0?this.template.removeClass(t).addClass("left"):!t&&this.usedPositions.indexOf("top")>-1&&this.usedPositions.indexOf("left")<0?this.template.addClass("left"):"top"===t&&this.usedPositions.indexOf("bottom")>-1&&this.usedPositions.indexOf("left")<0?this.template.removeClass(t).addClass("left"):"left"===t&&this.usedPositions.indexOf("right")>-1&&this.usedPositions.indexOf("bottom")<0?this.template.removeClass(t):"right"===t&&this.usedPositions.indexOf("left")>-1&&this.usedPositions.indexOf("bottom")<0?this.template.removeClass(t):this.template.removeClass(t),this.classChanged=!0,this.counter--}},{key:"_setPosition",value:function(){var t=this._getPositionClass(this.template),e=Foundation.Box.GetDimensions(this.template),i=Foundation.Box.GetDimensions(this.$element),n="left"===t?"left":"right"===t?"left":"top",o="top"===n?"height":"width";"height"===o?this.options.vOffset:this.options.hOffset;if(e.width>=e.windowDims.width||!this.counter&&!Foundation.Box.ImNotTouchingYou(this.template))return this.template.offset(Foundation.Box.GetOffsets(this.template,this.$element,"center bottom",this.options.vOffset,this.options.hOffset,!0)).css({width:i.windowDims.width-2*this.options.hOffset,height:"auto"}),!1;for(this.template.offset(Foundation.Box.GetOffsets(this.template,this.$element,"center "+(t||"bottom"),this.options.vOffset,this.options.hOffset));!Foundation.Box.ImNotTouchingYou(this.template)&&this.counter;)this._reposition(t),this._setPosition()}},{key:"show",value:function(){if("all"!==this.options.showOn&&!Foundation.MediaQuery.is(this.options.showOn))return!1;var t=this;this.template.css("visibility","hidden").show(),this._setPosition(),this.$element.trigger("closeme.zf.tooltip",this.template.attr("id")),this.template.attr({"data-is-active":!0,"aria-hidden":!1}),t.isActive=!0,this.template.stop().hide().css("visibility","").fadeIn(this.options.fadeInDuration,function(){}),this.$element.trigger("show.zf.tooltip")}},{key:"hide",value:function(){var t=this;this.template.stop().attr({"aria-hidden":!0,"data-is-active":!1}).fadeOut(this.options.fadeOutDuration,function(){t.isActive=!1,t.isClick=!1,t.classChanged&&(t.template.removeClass(t._getPositionClass(t.template)).addClass(t.o
3ptions.positionClass),t.usedPositions=[],t.counter=4,t.classChanged=!1)}),this.$element.trigger("hide.zf.tooltip")}},{key:"_events",value:function(){var t=this,e=(this.template,!1);this.options.disableHover||this.$element.on("mouseenter.zf.tooltip",function(e){t.isActive||(t.timeout=setTimeout(function(){t.show()},t.options.hoverDelay))}).on("mouseleave.zf.tooltip",function(i){clearTimeout(t.timeout),(!e||t.isClick&&!t.options.clickOpen)&&t.hide()}),this.options.clickOpen?this.$element.on("mousedown.zf.tooltip",function(e){e.stopImmediatePropagation(),t.isClick||(t.isClick=!0,!t.options.disableHover&&t.$element.attr("tabindex")||t.isActive||t.show())}):this.$element.on("mousedown.zf.tooltip",function(e){e.stopImmediatePropagation(),t.isClick=!0}),this.options.disableForTouch||this.$element.on("tap.zf.tooltip touchend.zf.tooltip",function(e){t.isActive?t.hide():t.show()}),this.$element.on({"close.zf.trigger":this.hide.bind(this)}),this.$element.on("focus.zf.tooltip",function(i){return e=!0,t.isClick?(t.options.clickOpen||(e=!1),!1):void t.show()}).on("focusout.zf.tooltip",function(i){e=!1,t.isClick=!1,t.hide()}).on("resizeme.zf.trigger",function(){t.isActive&&t._setPosition()})}},{key:"toggle",value:function(){this.isActive?this.hide():this.show()}},{key:"destroy",value:function(){this.$element.attr("title",this.template.text()).off(".zf.trigger .zf.tooltip").removeClass("has-tip top right left").removeAttr("aria-describedby aria-haspopup data-disable-hover data-resize data-toggle data-tooltip data-yeti-box"),this.template.remove(),Foundation.unregisterPlugin(this)}}]),e}();e.defaults={disableForTouch:!1,hoverDelay:200,fadeInDuration:150,fadeOutDuration:150,disableHover:!1,templateClasses:"",tooltipClass:"tooltip",triggerClass:"has-tip",showOn:"small",template:"",tipText:"",touchCloseText:"Tap to close.",clickOpen:!0,positionClass:"",vOffset:10,hOffset:12,allowHtml:!1},Foundation.plugin(e,"Tooltip")}(jQuery);var _createClass=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,
4n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}();!function(t){var e=function(){function e(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};_classCallCheck(this,e),this.$element=i,this.options=t.extend({},e.defaults,this.$element.data(),n),this._init(),Foundation.registerPlugin(this,"Abide")}return _createClass(e,[{key:"_init",value:function(){this.$inputs=this.$element.find("input, textarea, select"),this._events()}},{key:"_events",value:function(){var e=this;this.$element.off(".abide").on("reset.zf.abide",function(){e.resetForm()}).on("submit.zf.abide",function(){return e.validateForm()}),"fieldChange"===this.options.validateOn&&this.$inputs.off("change.zf.abide").on("change.zf.abide",function(i){e.validateInput(t(i.target))}),this.options.liveValidate&&this.$inputs.off("input.zf.abide").on("input.zf.abide",function(i){e.validateInput(t(i.target))}),this.options.validateOnBlur&&this.$inputs.off("blur.zf.abide").on("blur.zf.abide",function(i){e.validateInput(t(i.target))})}},{key:"_reflow",value:function(){this._init()}},{key:"requiredCheck",value:function(t){if(!t.attr("required"))return!0;var e=!0;switch(t[0].type){case"checkbox":e=t[0].checked;break;case"select":case"select-one":case"select-multiple":var i=t.find("option:selected");i.length&&i.val()||(e=!1);break;default:t.val()&&t.val().length||(e=!1)}return e}},{key:"findFormError",value:function(t){var e=t.siblings(this.options.formErrorSelector);return e.length||(e=t.parent().find(this.options.formErrorSelector)),e}},{key:"findLabel",value:function(t){var e=t[0].id,i=this.$element.find('label[for="'+e+'"]');return i.length?i:t.closest("label")}},{key:"findRadioLabels",value:function(e){var i=this,n=e.map(function(e,n){var o=n.id,a=i.$element.find('label[for="'+o+'"]');return a.length||(a=t(n).closest("label")),a[0]});return t(n)}},{key:"addErrorClasses",value:function(t){var e=this.findLabel(t),i=this.findFormError(t);e.length&&e.addClass(this.options.labelErrorClass),i.length&&i.addClass(this.options.formErrorClass),t.addClass(this.options.inputErrorClass).attr("data-invalid","")}},{key:"removeRadioErrorClasses",value:function(t){var e=this.$element.find(':radio[name="'+t+'"]'),i=this.findRadioLabels(e),n=this.findFormError(e);i.length&&i.removeClass(this.options.labelErrorClass),n.length&&n.removeClass(this.options.formErrorClass),e.removeClass(this.options.inputErrorClass).removeAttr("data-invalid")}},{key:"removeErrorClasses",value:function(t){if("radio"==t[0].type)return this.removeRadioErrorClasses(t.attr("name"));var e=this.findLabel(t),i=this.findFormError(t);e.length&&e.removeClass(this.options.labelErrorClass),i.length&&i.removeClass(this.options.formErrorClass),t.removeClass(this.options.inputErrorClass).removeAttr("data-invalid")}},{key:"validateInput",value:function(e){var i=this,n=this.requiredCheck(e),o=!1,a=!0,s=e.attr("data-validator"),r=!0;
4if(e.is("[data-abide-ignore]")||e.is('[type="hidden"]'))return!0;switch(e[0].type){case"radio":o=this.validateRadio(e.attr("name"));break;case"checkbox":o=n;break;case"select":case"select-one":case"select-multiple":o=n;break;default:o=this.validateText(e)}s&&(a=this.matchValidation(e,s,e.attr("required"))),e.attr("data-equalto")&&(r=this.options.validators.equalTo(e));var l=[n,o,a,r].indexOf(!1)===-1,d=(l?"valid":"invalid")+".zf.abide";if(l){var u=this.$element.find('[data-equalto="'+e.attr("id")+'"]');u.length&&!function(){var e=i;u.each(function(){t(this).val()&&e.validateInput(t(this))})}()}return this[l?"removeErrorClasses":"addErrorClasses"](e),e.trigger(d,[e]),l}},{key:"validateForm",value:function(){var e=[],i=this;this.$inputs.each(function(){e.push(i.validateInput(t(this)))});var n=e.indexOf(!1)===-1;return this.$element.find("[data-abide-error]").css("display",n?"none":"block"),this.$element.trigger((n?"formvalid":"forminvalid")+".zf.abide",[this.$element]),n}},{key:"validateText",value:function(t,e){e=e||t.attr("pattern")||t.attr("type");var i=t.val(),n=!1;return i.length?n=this.options.patterns.hasOwnProperty(e)?this.options.patterns[e].test(i):e===t.attr("type")||new RegExp(e).test(i):t.prop("required")||(n=!0),n}},{key:"validateRadio",value:function(e){var i=this.$element.find(':radio[name="'+e+'"]'),n=!1,o=!1;return i.each(function(e,i){t(i).attr("required")&&(o=!0)}),o||(n=!0),n||i.each(function(e,i){t(i).prop("checked")&&(n=!0)}),n}},{key:"matchValidation",value:function(t,e,i){var n=this;i=!!i;var o=e.split(" ").map(function(e){return n.options.validators[e](t,i,t.parent())});return o.indexOf(!1)===-1}},{key:"resetForm",value:function(){var e=this.$element,i=this.options;t("."+i.labelErrorClass,e).not("small").removeClass(i.labelErrorClass),t("."+i.inputErrorClass,e).not("small").removeClass(i.inputErrorClass),t(i.formErrorSelector+"."+i.formErrorClass).removeClass(i.formErrorClass),e.find("[data-abide-error]").css("display","none"),t(":input",e).not(":button, :submit, :reset, :hidden, :radio, :checkbox, [data-abide-ignore]").val("").removeAttr("data-invalid"),t(":input:radio",e).not("[data-abide-ignore]").prop("checked",!1).removeAttr("data-invalid"),t(":input:checkbox",e).not("[data-abide-ignore]").prop("checked",!1).removeAttr("data-invalid"),e.trigger("formreset.zf.abide",[e])}},{key:"destroy",value:function(){var e=this;this.$element.off(".abide").find("[data-abide-error]").css("display","none"),this.$inputs.off(".abide").each(function(){e.removeErrorClasses(t(this))}),Foundation.unregisterPlugin(this)}}]),e}();e.defaults={validateOn:"fieldChange",labelErrorClass:"is-invalid-label",inputErrorClass:"is-invalid-input",formErrorSelector:".form-error",formErrorClass:"is-visible",liveValidate:!1,validateOnBlur:!1,patterns:{alpha:/^[a-zA-Z]+$/,alpha_numeric:/^[a-zA-Z0-9]+$/,integer:/^[-+]?\d+$/,number:/^[-+]?\d*(?:[\.\,]\d+)?$/,card:/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/,cvv:/^([0-9]){3,4}$/,email:/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/,url:/^(https?|ftp|file|ssh):\/\/(((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/,domain:/^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,8}$/,datetime:/^([0-2][0-9]{3})\-([0-1][0-9])\-([0-3][0-9])T([0-5][0-9])\:([0-5][0-9])\:([0-5][0-9])(Z|([\-\+]([0-1][0-9])\:00))$/,date:/(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))$/,time:/^(0[0-9]|1[0-9]|2[0-3])(:[0-5][0-9]){2}$/,dateISO:/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/,month_day_year:/^(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.]\d{4}$/,day_month_year:/^(0[1-9]|[12][0-9]|3[01])[- \/.](0[1-9]|1[012])[- \/.]\d{4}$/,color:/^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/}
4,validators:{equalTo:function(e,i,n){return t("#"+e.attr("data-equalto")).val()===e.val()}}},Foundation.plugin(e,"Abide")}(jQuery);!function(t){function e(t){return parseInt(window.getComputedStyle(document.body,null).fontSize,10)*t}var i=function(){function i(e,n){_classCallCheck(this,i),this.$element=e,this.options=t.extend({},i.defaults,this.$element.data(),n),this._init(),Foundation.registerPlugin(this,"Sticky")}return _createClass(i,[{key:"_init",value:function(){var e=this.$element.parent("[data-sticky-container]"),i=this.$element[0].id||Foundation.GetYoDigits(6,"sticky"),n=this;e.length||(this.wasWrapped=!0),this.$container=e.length?e:t(this.options.container).wrapInner(this.$element),this.$container.addClass(this.options.containerClass),this.$element.addClass(this.options.stickyClass).attr({"data-resize":i}),this.scrollCount=this.options.checkEvery,this.isStuck=!1,t(window).one("load.zf.sticky",function(){n.containerHeight="none"==n.$element.css("display")?0:n.$element[0].getBoundingClientRect().height,n.$container.css("height",n.containerHeight),n.elemHeight=n.containerHeight,""!==n.options.anchor?n.$anchor=t("#"+n.options.anchor):n._parsePoints(),n._setSizes(function(){var t=window.pageYOffset;n._calc(!1,t),n.isStuck||n._removeSticky(!(t>=n.topPoint))}),n._events(i.split("-").reverse().join("-"))})}},{key:"_parsePoints",value:function(){for(var e=""==this.options.topAnchor?1:this.options.topAnchor,i=""==this.options.btmAnchor?document.documentElement.scrollHeight:this.options.btmAnchor,n=[e,i],o={},r=0,a=n.length;r<a&&n[r];r++){var s;if("number"==typeof n[r])s=n[r];else{var c=n[r].split(":"),u=t("#"+c[0]);s=u.offset().top,c[1]&&"bottom"===c[1].toLowerCase()&&(s+=u[0].getBoundingClientRect().height)}o[r]=s}this.points=o}},{key:"_events",value:function(e){var i=this,n=this.scrollListener="scroll.zf."+e;this.isOn||(this.canStick&&(this.isOn=!0,t(window).off(n).on(n,function(t){0===i.scrollCount?(i.scrollCount=i.options.checkEvery,i._setSizes(function(){i._calc(!1,window.pageYOffset)})):(i.scrollCount--,i._calc(!1,window.pageYOffset))})),this.$element.off("resizeme.zf.trigger").on("resizeme.zf.trigger",function(t,o){i._setSizes(function(){i._calc(!1),i.canStick?i.isOn||i._events(e):i.isOn&&i._pauseListeners(n)})}))}},{key:"_pauseListeners",value:function(e){this.isOn=!1,t(window).off(e),this.$element.trigger("pause.zf.sticky")}},{key:"_calc",value:function(t,e){return t&&this._setSizes(),this.canStick?(e||(e=window.pageYOffset),void(e>=this.topPoint?e<=this.bottomPoint?this.isStuck||this._setSticky():this.isStuck&&this._removeSticky(!1):this.isStuck&&this._removeSticky(!0))):(this.isStuck&&this._removeSticky(!0),!1)}},{key:"_setSticky",value:function(){var t=this,e=this.options.stickTo,i="top"===e?"marginTop":"marginBottom",n="top"===e?"bottom":"top",o={};o[i]=this.options[i]+"em",o[e]=0,o[n]="auto",this.isStuck=!0,this.$element.removeClass("is-anchored is-at-"+n).addClass("is-stuck is-at-"+e).css(o).trigger("sticky.zf.stuckto:"+e),this.$element.on("transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd",function(){t._setSizes()})}},{key:"_removeSticky",value:function(t){var e=this.options.stickTo,i="top"===e,n={},o=(this.points?this.points[1]-this.points[0]:this.anchorHeight)-this.elemHeight,r=i?"marginTop":"marginBottom",a=t?"top":"bottom";n[r]=0,n.bottom="auto",t?n.top=0:n.top=o,this.isStuck=!1,this.$element.removeClass("is-stuck is-at-"+e).addClass("is-anchored is-at-"+a).css(n).trigger("sticky.zf.unstuckfrom:"+a)}},{key:"_setSizes",value:function(t){this.canStick=Foundation.MediaQuery.is(this.options.stickyOn),this.canStick||t&&"function"==typeof t&&t();var e=this.$container[0].getBoundingClientRect().width,i=window.getComputedStyle(this.$container[0]),n=parseInt(i["padding-left"],10),o=parseInt(i["padding-right"],10);this.$anchor&&this.$anchor.length?this.anchorHeight=this.$anchor[0].getBoundingClientRect().height:this._parsePoints(),this.$element.css({"max-width":e-n-o+"px"});var r=this.$element[0].getBoundingClientRect().height||this.containerHeight;if("none"==this.$element.css("display")&&(r=0),this.containerHeight=r,this.$container.css({height:r}),this.elemHeight=r,!this.isStuck&&this.$element.hasClass("is-at-bottom")){var a=(this.points?this.points[1]-this.$container.offset().top:this.anchorHeight)-this.elemHeight;this.$element.css("top",a)}this._setBreakPoints(r,function(){t&&"function"==typeof t&&t()})}},{key:"_setBreakPoints",value:function(t,i){if(!this.canStick){if(!i||"function"!=typeof i)return!1;i()}var n=e(this.options.marginTop),o=e(this.options.marginBottom),r=this.points?this.points[0]:this.$anchor.offset().top,a=this.points?this.points[1]:r+this.anchorHeight,s=window.innerHeight;"top"===this.options.stickTo?(r-=n,a-=t+n):"bottom"===this.options.stickTo&&(r-=s-(t+o),a-=s-o),this.topPoint=r,this.bottomPoint=a,i&&"function"==typeof i&&i()}},{key:"destroy",value:function(){this._removeSticky(!0),this.$element.removeClass(this.options.stickyClass+" is-anchored is-at-top").css({height:"",top:"",bottom:"","max-width":""}).off("resizeme.zf.trigger"),this.$anchor&&this.$anchor.length&&this.$anchor.off("change.zf.sticky"),t(window).off(this.scrollListener),this.wasWrapped?this.$element.unwrap():this.$container.removeClass(this.options.containerClass).css({height:""}),Foundation.unregisterPlugin(this)}}]),i}();
vendor: 11,297 bytes, lines 4-5
4i.defaults={container:"<div data-sticky-container></div>",stickTo:"top",anchor:"",topAnchor:"",btmAnchor:"",marginTop:1,marginBottom:1,stickyOn:"medium",stickyClass:"sticky",containerClass:"sticky-container",checkEvery:-1},Foundation.plugin(i,"Sticky")}(jQuery);
5!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):"undefined"!=typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){"use strict";var b=window.Slick||{};b=function(){function c(c,d){var f,e=this;e.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:a(c),appendDots:a(c),arrows:!0,asNavFor:null,prevArrow:'<button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button">Previous</button>',nextArrow:'<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(b,c){return a('<button type="button" data-role="none" role="button" tabindex="0" />').text(c+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},e.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},a.extend(e,e.initials),e.activeBreakpoint=null,e.animType=null,e.animProp=null,e.breakpoints=[],e.breakpointSettings=[],e.cssTransitions=!1,e.focussed=!1,e.interrupted=!1,e.hidden="hidden",e.paused=!0,e.positionProp=null,e.respondTo=null,e.rowCount=1,e.shouldClick=!0,e.$slider=a(c),e.$slidesCache=null,e.transformType=null,e.transitionType=null,e.visibilityChange="visibilitychange",e.windowWidth=0,e.windowTimer=null,f=a(c).data("slick")||{},e.options=a.extend({},e.defaults,d,f),e.currentSlide=e.options.initialSlide,e.originalSettings=e.options,"undefined"!=typeof document.mozHidden?(e.hidden="mozHidden",e.visibilityChange="mozvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(e.hidden="webkitHidden",e.visibilityChange="webkitvisibilitychange"),e.autoPlay=a.proxy(e.autoPlay,e),e.autoPlayClear=a.proxy(e.autoPlayClear,e),e.autoPlayIterator=a.proxy(e.autoPlayIterator,e),e.changeSlide=a.proxy(e.changeSlide,e),e.clickHandler=a.proxy(e.clickHandler,e),e.selectHandler=a.proxy(e.selectHandler,e),e.setPosition=a.proxy(e.setPosition,e),e.swipeHandler=a.proxy(e.swipeHandler,e),e.dragHandler=a.proxy(e.dragHandler,e),e.keyHandler=a.proxy(e.keyHandler,e),e.instanceUid=b++,e.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,e.registerBreakpoints(),e.init(!0)}var b=0;return c}(),b.prototype.activateADA=function(){var a=this;a.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},b.prototype.addSlide=b.prototype.slickAdd=function(b,c,d){var e=this;if("boolean"==typeof c)d=c,c=null;else if(0>c||c>=e.slideCount)return!1;e.unload(),"number"==typeof c?0===c&&0===e.$slides.length?a(b).appendTo(e.$slideTrack):d?a(b).insertBefore(e.$slides.eq(c)):a(b).insertAfter(e.$slides.eq(c)):d===!0?a(b).prependTo(e.$slideTrack):a(b).appendTo(e.$slideTrack),e.$slides=e.$slideTrack.children(this.options.slide),e.$slideTrack.children(this.options.slide).detach(),e.$slideTrack.append(e.$slides),e.$slides.each(function(b,c){a(c).attr("data-slick-index",b)}),e.$slidesCache=e.$slides,e.reinit()},b.prototype.animateHeight=function(){var a=this;if(1===a.options.slidesToShow&&a.options.adaptiveHeight===!0&&a.options.vertical===!1){var b=a.$slides.eq(a.currentSlide).outerHeight(!0);a.$list.animate({height:b},a.options.speed)}},b.prototype.animateSlide=function(b,c){var d={},e=this;e.animateHeight(),e.options.rtl===!0&&e.options.vertical===!1&&(b=-b),e.transformsEnabled===!1?e.options.vertical===!1?e.$slideTrack.animate({left:b},e.options.speed,e.options.easing,c):e.$slideTrack.animate({top:b},e.options.speed,e.options.easing,c):e.cssTransitions===!1?(e.options.rtl===!0&&(e.currentLeft=-e.currentLeft),a({animStart:e.currentLeft}).animate({animStart:b},{duration:e.options.speed,easing:e.options.easing,step:function(a){a=Math.ceil(a),e.options.vertical===!1?(d[e.animType]="translate("+a+"px, 0px)",e.$slideTrack.css(d)):(d[e.animType]="translate(0px,"+a+"px)",e.$slideTrack.css(d))},complete:function(){c&&c.call()}})):(e.applyTransition(),b=Math.ceil(b),e.options.vertical===!1?d[e.animType]="translate3d("+b+"px, 0px, 0px)":d[e.animType]="translate3d(0px,"+b+"px, 0px)",e.$slideTrack.css(d),c&&setTimeout(function(){e.disableTransition(),c.call()},e.options.speed))},b.prototype.getNavTarget=function(){var b=this,c=b.options.asNavFor;return c&&null!==c&&(c=a(c).not(b.$slider)),c},b.prototype.asNavFor=function(b){var c=this,d=c.getNavTarget();null!==d&&"object"==typeof d&&d.each(function(){var c=a(this).slick("getSlick");c.unslicked||c.slideHandler(b,!0)})},b.prototype.applyTransition=function(a){var b=this,c={};b.options.fade===!1?c[b.transitionType]=b.transformType+" "+b.options.speed+"ms "+b.options.cssEase:c[b.transitionType]="opacity "+b.options.speed+"ms "+b.options.cssEase,b.options.fade===!1?b.$slideTrack.css(c):b.$slides.eq(a).css(c)},b.prototype.autoPlay=function(){var a=this;a.autoPlayClear(),a.slideCount>a.options.slidesToShow&&(a.autoPlayTimer=setInterval(a.autoPlayIterator,a.options.autoplaySpeed))},b.prototype.autoPlayClear=function(){var a=this;a.autoPlayTimer&&clearInterval(a.autoPlayTimer)},b.prototype.autoPlayIterator=function(){var a=this,b=a.currentSlide+a.options.slidesToScroll;a.paused||a.interrupted||a.focussed||(a.options.infinite===!1&&(1===a.direction&&a.currentSlide+1===a.slideCount-1?a.direction=0:0===a.direction&&(b=a.currentSlide-a.options.slidesToScroll,a.currentSlide-1===0&&(a.direction=1))),a.slideHandler(b))},b.prototype.buildArrows=function(){var b=this;b.options.arrows===!0&&(b.$prevArrow=a(b.options.prevArrow).addClass("slick-arrow"),b.$nextArrow=a(b.options.nextArrow).addClass("slick-arrow"),b.slideCount>b.options.slidesToShow?(b.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),b.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),b.htmlExpr.test(b.options.prevArrow)&&b.$prevArrow.prependTo(b.options.appendArrows),b.htmlExpr.test(b.options.nextArrow)&&b.$nextArrow.appendTo(b.options.appendArrows),b.options.infinite!==!0&&b.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):b.$prevArrow.add(b.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},b.prototype.buildDots=function(){var c,d,b=this;if(b.options.dots===!0&&b.slideCount>b.options.slidesToShow){for(b.$slider.addClass("slick-dotted"),d=a("<ul />").addClass(b.options.dotsClass),c=0;c<=b.getDotCount();c+=1)d.append(a("<li />").append(b.options.customPaging.call(this,b,c)));b.$dots=d.appendTo(b.options.appendDots),b.$dots.find("li").first().addClass("slick-active").attr("aria-hidden","false")}},b.prototype.buildOut=function(){var b=this;b.$slides=b.$slider.children(b.options.slide+":not(.slick-cloned)").addClass("slick-slide"),b.slideCount=b.$slides.length,b.$slides.each(function(b,c){a(c).attr("data-slick-index",b).data("originalStyling",a(c).attr("style")||"")}),b.$slider.addClass("slick-slider"),b.$slideTrack=0===b.slideCount?a('<div class="slick-track"/>').appendTo(b.$slider):b.$slides.wrapAll('<div class="slick-track"/>').parent(),b.$list=b.$slideTrack.wrap('<div aria-live="polite" class="slick-list"/>').parent(),b.$slideTrack.css("opacity",0),(b.options.centerMode===!0||b.options.swipeToSlide===!0)&&(b.options.slidesToScroll=1),a("img[data-src]",b.$slider).not("[src]").addClass("slick-loading"),b.setupInfinite(),b.buildArrows(),b.buildDots(),b.updateDots(),b.setSlideClasses("number"==typeof b.currentSlide?b.currentSlide:0),b.options.draggable===!0&&b.$list.addClass("draggable")},b.prototype.buildRows=function(){var b,c,d,e,f,g,h,a=this;if(e=document.createDocumentFragment(),g=a.$slider.children(),a.options.rows>1){for(h=a.options.slidesPerRow*a.options.rows,f=Math.ceil(g.length/h),b=0;f>b;b++){var i=document.createElement("div");for(c=0;c<a.options.rows;c++){var j=document.createElement("div");for(d=0;d<a.options.slidesPerRow;d++){var k=b*h+(c*a.options.slidesPerRow+d);g.get(k)&&j.appendChild(g.get(k))}i.appendChild(j)}e.appendChild(i)}a.$slider.empty().append(e),a.$slider.children().children().children().css({width:100/a.options.slidesPerRow+"%",display:"inline-block"})}},b.prototype.checkResponsive=function(b,c){var e,f,g,d=this,h=!1,i=d.$slider.width(),j=window.innerWidth||a(window).width();if("window"===d.respondTo?g=j:"slider"===d.respondTo?g=i:"min"===d.respondTo&&(g=Math.min(j,i)),d.options.responsive&&d.options.responsive.length&&null!==d.options.responsive){f=null;for(e in d.breakpoints)d.breakpoints.hasOwnProperty(e)&&(d.originalSettings.mobileFirst===!1?g<d.breakpoints[e]&&(f=d.breakpoints[e]):g>d.breakpoints[e]&&(f=d.breakpoints[e]));null!==f?null!==d.activeBreakpoint?(f!==d.activeBreakpoint||c)&&(d.activeBreakpoint=f,"unslick"===d.breakpointSettings[f]?d.unslick(f):(d.options=a.extend({},d.originalSettings,d.breakpointSettings[f]),b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b)),h=f):(d.activeBreakpoint=f,"unslick"===d.breakpointSettings[f]?d.unslick(f):(d.options=a.extend({},d.originalSettings,d.breakpointSettings[f]),b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b)),h=f):null!==d.activeBreakpoint&&(d.activeBreakpoint=null,d.options=d.originalSettings,b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b),h=f),b||h===!1||d.$slider.trigger("breakpoint",[d,h])}},b.prototype.changeSlide=function(b,c){var f,g,h,d=this,e=a(b.currentTarget);switch(e.is("a")&&b.preventDefault(),e.is("li")||(e=e.closest("li")),h=d.slideCount%d.options.slidesToScroll!==0,f=h?0:(d.slideCount-d.currentSlide)%d.options.slidesToScroll,b.data.message){case"previous":g=0===f?d.options.slidesToScroll:d.options.slidesToShow-f,d.slideCount>d.options.slidesToShow&&d.slideHandler(d.currentSlide-g,!1,c);break;case"next":g=0===f?d.options.slidesToScroll:f,d.slideCount>d.options.slidesToShow&&d.slideHandler(d.currentSlide+g,!1,c);break;case"index":var i=0===b.data.index?0:b.data.index||e.index()*d.options.slidesToScroll;d.slideHandler(d.checkNavigable(i),!1,c),e.children().trigger("focus");break;default:return}},b.prototype.checkNavigable=function(a){var c,d,b=this;if(c=b.getNavigableIndexes(),d=0,a>c[c.length-1])a=c[c.length-1];else for(var e in c){if(a<c[e]){a=d;break}d=c[e]}return a},b.prototype.cleanUpEvents=function(){var b=this;b.options.dots&&null!==b.$dots&&a("li",b.$dots).off("click.slick",b.changeSlide).off("mouseenter.slick",a.proxy(b.interrupt,b,!0)).off("mouseleave.
5slick",a.proxy(b.interrupt,b,!1)),b.$slider.off("focus.slick blur.slick"),b.options.arrows===!0&&b.slideCount>b.options.slidesToShow&&(b.$prevArrow&&b.$prevArrow.off("click.slick",b.changeSlide),b.$nextArrow&&b.$nextArrow.off("click.slick",b.changeSlide)),b.$list.off("touchstart.slick mousedown.slick",b.swipeHandler),b.$list.off("touchmove.slick mousemove.slick",b.swipeHandler),b.$list.off("touchend.slick mouseup.slick",b.swipeHandler),b.$list.off("touchcancel.slick mouseleave.slick",b.swipeHandler),b.$list.off("click.slick",b.clickHandler),a(document).off(b.visibilityChange,b.visibility),b.cleanUpSlideEvents(),b.options.accessibility===!0&&b.$list.off("keydown.slick",b.keyHandler),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().off("click.slick",b.selectHandler),a(window).off("orientationchange.slick.slick-"+b.instanceUid,b.orientationChange),a(window).off("resize.slick.slick-"+b.instanceUid,b.resize),a("[draggable!=true]",b.$slideTrack).off("dragstart",b.preventDefault),a(window).off("load.slick.slick-"+b.instanceUid,b.setPosition),a(document).off("ready.slick.slick-"+b.instanceUid,b.setPosition)},b.prototype.cleanUpSlideEvents=function(){var b=this;b.$list.off("mouseenter.slick",a.proxy(b.interrupt,b,!0)),b.$list.off("mouseleave.slick",a.proxy(b.interrupt,b,!1))},b.prototype.cleanUpRows=function(){var b,a=this;a.options.rows>1&&(b=a.$slides.children().children(),b.removeAttr("style"),a.$slider.empty().append(b))},b.prototype.clickHandler=function(a){var b=this;b.shouldClick===!1&&(a.stopImmediatePropagation(),a.stopPropagation(),a.preventDefault())},b.prototype.destroy=function(b){var c=this;c.autoPlayClear(),c.touchObject={},c.cleanUpEvents(),a(".slick-cloned",c.$slider).detach(),c.$dots&&c.$dots.remove(),c.$prevArrow&&c.$prevArrow.length&&(c.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),c.htmlExpr.test(c.options.prevArrow)&&c.$prevArrow.remove()),c.$nextArrow&&c.$nextArrow.length&&(c.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),c.htmlExpr.test(c.options.nextArrow)&&c.$nextArrow.remove()),c.$slides&&(c.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){a(this).attr("style",a(this).data("originalStyling"))}),c.$slideTrack.children(this.options.slide).detach(),c.$slideTrack.detach(),c.$list.detach(),c.$slider.append(c.$slides)),c.cleanUpRows(),c.$slider.removeClass("slick-slider"),c.$slider.removeClass("slick-initialized"),c.$slider.removeClass("slick-dotted"),c.unslicked=!0,b||c.$slider.trigger("destroy",[c])},b.prototype.disableTransition=function(a){var b=this,c={};c[b.transitionType]="",b.options.fade===!1?b.$slideTrack.css(c):b.$slides.eq(a).css(c)},b.prototype.fadeSlide=function(a,b){var c=this;c.cssTransitions===!1?(c.$slides.eq(a).css({zIndex:c.options.zIndex}),c.$slides.eq(a).animate({opacity:1},c.options.speed,c.options.easing,b)):(c.applyTransition(a),c.$slides.eq(a).css({opacity:1,zIndex:c.options.zIndex}),b&&setTimeout(function(){c.disableTransition(a),b.call()},c.options.speed))},b.prototype.fadeSlideOut=function(a){var b=this;b.cssTransitions===!1?b.$slides.eq(a).animate({opacity:0,zIndex:b.options.zIndex-2},b.options.speed,b.options.easing):(b.applyTransition(a),b.$slides.eq(a).css({opacity:0,zIndex:b.options.zIndex-2}))},b.prototype.filterSlides=b.prototype.slickFilter=function(a){var b=this;null!==a&&(b.$slidesCache=b.$slides,b.unload(),b.$slideTrack.children(this.options.slide).detach(),b.$slidesCache.filter(a).appendTo(b.$slideTrack),b.reinit())},b.prototype.focusHandler=function(){var b=this;b.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick","*:not(.slick-arrow)",function(c){c.stopImmediatePropagation();var d=a(this);setTimeout(function(){b.options.pauseOnFocus&&(b.focussed=d.is(":focus"),b.autoPlay())},0)})},b.prototype.getCurrent=b.prototype.slickCurrentSlide=function(){var a=this;return a.currentSlide},b.prototype.getDotCount=function(){var a=this,b=0,c=0,d=0;if(a.options.infinite===!0)for(;b<a.slideCount;)++d,b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;else if(a.options.centerMode===!0)d=a.slideCount;else if(a.options.asNavFor)for(;b<a.slideCount;)++d,b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;else d=1+Math.ceil((a.slideCount-a.options.slidesToShow)/a.options.slidesToScroll);return d-1},b.prototype.getLeft=function(a){var c,d,f,b=this,e=0;return b.slideOffset=0,d=b.$slides.first().outerHeight(!0),b.options.infinite===!0?(b.slideCount>b.options.slidesToShow&&(b.slideOffset=b.slideWidth*b.options.slidesToShow*-1,e=d*b.options.slidesToShow*-1),b.slideCount%b.options.slidesToScroll!==0&&a+b.options.slidesToScroll>b.slideCount&&b.slideCount>b.options.slidesToShow&&(a>b.slideCount?(b.slideOffset=(b.options.slidesToShow-(a-b.slideCount))*b.slideWidth*-1,e=(b.options.slidesToShow-(a-b.slideCount))*d*-1):(b.slideOffset=b.slideCount%b.options.slidesToScroll*b.slideWidth*-1,e=b.slideCount%b.options.slidesToScroll*d*-1))):a+b.o
vendor: 4,100 bytes, line 5
5ptions.slidesToShow>b.slideCount&&(b.slideOffset=(a+b.options.slidesToShow-b.slideCount)*b.slideWidth,e=(a+b.options.slidesToShow-b.slideCount)*d),b.slideCount<=b.options.slidesToShow&&(b.slideOffset=0,e=0),b.options.centerMode===!0&&b.options.infinite===!0?b.slideOffset+=b.slideWidth*Math.floor(b.options.slidesToShow/2)-b.slideWidth:b.options.centerMode===!0&&(b.slideOffset=0,b.slideOffset+=b.slideWidth*Math.floor(b.options.slidesToShow/2)),c=b.options.vertical===!1?a*b.slideWidth*-1+b.slideOffset:a*d*-1+e,b.options.variableWidth===!0&&(f=b.slideCount<=b.options.slidesToShow||b.options.infinite===!1?b.$slideTrack.children(".slick-slide").eq(a):b.$slideTrack.children(".slick-slide").eq(a+b.options.slidesToShow),c=b.options.rtl===!0?f[0]?-1*(b.$slideTrack.width()-f[0].offsetLeft-f.width()):0:f[0]?-1*f[0].offsetLeft:0,b.options.centerMode===!0&&(f=b.slideCount<=b.options.slidesToShow||b.options.infinite===!1?b.$slideTrack.children(".slick-slide").eq(a):b.$slideTrack.children(".slick-slide").eq(a+b.options.slidesToShow+1),c=b.options.rtl===!0?f[0]?-1*(b.$slideTrack.width()-f[0].offsetLeft-f.width()):0:f[0]?-1*f[0].offsetLeft:0,c+=(b.$list.width()-f.outerWidth())/2)),c},b.prototype.getOption=b.prototype.slickGetOption=function(a){var b=this;return b.options[a]},b.prototype.getNavigableIndexes=function(){var e,a=this,b=0,c=0,d=[];for(a.options.infinite===!1?e=a.slideCount:(b=-1*a.options.slidesToScroll,c=-1*a.options.slidesToScroll,e=2*a.slideCount);e>b;)d.push(b),b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;return d},b.prototype.getSlick=function(){return this},b.prototype.getSlideCount=function(){var c,d,e,b=this;return e=b.options.centerMode===!0?b.slideWidth*Math.floor(b.options.slidesToShow/2):0,b.options.swipeToSlide===!0?(b.$slideTrack.find(".slick-slide").each(function(c,f){return f.offsetLeft-e+a(f).outerWidth()/2>-1*b.swipeLeft?(d=f,!1):void 0}),c=Math.abs(a(d).attr("data-slick-index")-b.currentSlide)||1):b.options.slidesToScroll},b.prototype.goTo=b.prototype.slickGoTo=function(a,b){var c=this;c.changeSlide({data:{message:"index",index:parseInt(a)}},b)},b.prototype.init=function(b){var c=this;a(c.$slider).hasClass("slick-initialized")||(a(c.$slider).addClass("slick-initialized"),c.buildRows(),c.buildOut(),c.setProps(),c.startLoad(),c.loadSlider(),c.initializeEvents(),c.updateArrows(),c.updateDots(),c.checkResponsive(!0),c.focusHandler()),b&&c.$slider.trigger("init",[c]),c.options.accessibility===!0&&c.initADA(),c.options.autoplay&&(c.paused=!1,c.autoPlay())},b.prototype.initADA=function(){var b=this;b.$slides.add(b.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),b.$slideTrack.attr("role","listbox"),b.$slides.not(b.$slideTrack.find(".slick-cloned")).each(function(c){a(this).attr({role:"option","aria-describedby":"slick-slide"+b.instanceUid+c})}),null!==b.$dots&&b.$dots.attr("role","tablist").find("li").each(function(c){a(this).attr({role:"presentation","aria-selected":"false","aria-controls":"navigation"+b.instanceUid+c,id:"slick-slide"+b.instanceUid+c})}).first().attr("aria-selected","true").end().find("button").attr("role","button").end().closest("div").attr("role","toolbar"),b.activateADA()},b.prototype.initArrowEvents=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},a.changeSlide),a.$nextArrow.off("click.slick").on("click.slick",{message:"next"},a.changeSlide))},b.prototype.initDotEvents=function(){var b=this;b.options.dots===!0&&b.slideCount>b.options.slidesToShow&&a("li",b.$dots).on("click.slick",{message:"index"},b.changeSlide),b.options.dots===!0&&b.options.pauseOnDotsHover===!0&&a("li",b.$dots).on("mouseenter.slick",a.proxy(b.interrupt,b,!0)).on("mouseleave.slick",a.proxy(b.interrupt,b,!1))},b.prototype.initSlideEvents=function(){var b=this;b.options.pauseOnHover&&(b.$list.on("mouseenter.slick",a.proxy(b.interrupt,b,!0)),b.$list.on("mouseleave.
5slick",a.proxy(b.interrupt,b,!1)))},b.prototype.initializeEvents=function(){var b=this;b.initArrowEvents(),b.initDotEvents(),b.initSlideEvents(),b.$list.on("touchstart.slick mousedown.slick",{action:"start"},b.swipeHandler),b.$list.on("touchmove.slick mousemove.slick",{action:"move"},b.swipeHandler),b.$list.on("touchend.slick mouseup.slick",{action:"end"},b.swipeHandler),b.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},b.swipeHandler),b.$list.on("click.slick",b.clickHandler),a(document).on(b.visibilityChange,a.proxy(b.visibility,b)),b.options.accessibility===!0&&b.$list.on("keydown.slick",b.keyHandler),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().on("click.slick",b.selectHandler),a(window).on("orientationchange.slick.slick-"+b.instanceUid,a.proxy(b.orientationChange,b)),a(window).on("resize.slick.slick-"+b.instanceUid,a.proxy(b.resize,b)),a("[draggable!=true]",b.$slideTrack).on("dragstart",b.preventDefault),a(window).on("load.slick.slick-"+b.instanceUid,b.setPosition),a(document).on("ready.slick.slick-"+b.instanceUid,b.setPosition)},b.prototype.initUI=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.show(),a.$nextArrow.show()),a.options.dots===!0&&a.slideCount>a.options.slidesToShow&&a.$dots.show()},b.prototype.keyHandler=function(a){var b=this;a.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===a.keyCode&&b.options.accessibility===!0?b.changeSlide({data:{message:b.options.rtl===!0?"next":"previous"}}):39===a.keyCode&&b.options.accessibility===!0&&b.changeSlide({data:{message:b.options.rtl===!0?"previous":"next"}}))},b.prototype.lazyLoad=function(){function g(c){a("img[data-src]",c).each(function(){var c=a(this),d=a(this).attr("data-src"),e=document.createElement("img");e.onload=function(){c.animate({opacity:0}
5,100,function(){c.attr("src",d).animate({opacity:1},200,function(){c.removeAttr("data-src").removeClass("slick-loading")}),b.$slider.trigger("lazyLoaded",[b,c,d])})},e.onerror=function(){c.removeAttr("data-src").removeClass("slick-loading").addClass("slick-lazyload-error"),b.$slider.trigger("lazyLoadError",[b,c,d])},e.src=d})}var c,d,e,f,b=this;b.options.centerMode===!0?b.options.infinite===!0?(e=b.currentSlide+(b.options.slidesToShow/2+1),f=e+b.options.slidesToShow+2):(e=Math.max(0,b.currentSlide-(b.options.slidesToShow/2+1)),f=2+(b.options.slidesToShow/2+1)+b.currentSlide):(e=b.options.infinite?b.options.slidesToShow+b.currentSlide:b.currentSlide,f=Math.ceil(e+b.options.slidesToShow),b.options.fade===!0&&(e>0&&e--,f<=b.slideCount&&f++)),c=b.$slider.find(".slick-slide").slice(e,f),g(c),b.slideCount<=b.options.slidesToShow?(d=b.$slider.find(".slick-slide"),g(d)):b.currentSlide>=b.slideCount-b.options.slidesToShow?(d=b.$slider.find(".slick-cloned").slice(0,b.options.slidesToShow),g(d)):0===b.currentSlide&&(d=b.$slider.find(".slick-cloned").slice(-1*b.options.slidesToShow),g(d))},b.prototype.loadSlider=function(){var a=this;a.setPosition(),a.$slideTrack.css({opacity:1}),a.$slider.removeClass("slick-loading"),a.initUI(),"progressive"===a.options.lazyLoad&&a.progressiveLazyLoad()},b.prototype.next=b.prototype.slickNext=function(){var a=this;a.changeSlide({data:{message:"next"}})},b.prototype.orientationChange=function(){var a=this;a.checkResponsive(),a.setPosition()},b.prototype.pause=b.prototype.slickPause=function(){var a=this;a.autoPlayClear(),a.paused=!0},b.prototype.play=b.prototype.slickPlay=function(){var a=this;a.autoPlay(),a.options.autoplay=!0,a.paused=!1,a.focussed=!1,a.interrupted=!1},b.prototype.postSlide=function(a){var b=this;b.unslicked||(b.$slider.trigger("afterChange",[b,a]),b.animating=!1,b.setPosition(),b.swipeLeft=null,b.options.autoplay&&b.autoPlay(),b.options.accessibility===!0&&b.initADA())},b.prototype.prev=b.prototype.slickPrev=function(){var a=this;a.changeSlide({data:{message:"previous"}})},b.prototype.preventDefault=function(a){a.preventDefault()},b.prototype.progressiveLazyLoad=function(b){b=b||1;var e,f,g,c=this,d=a("img[data-src]",c.$slider);d.length?(e=d.first(),f=e.attr("data-src"),g=document.createElement("img"),g.onload=function(){e.attr("src",f).removeAttr("data-src").removeClass("slick-loading"),c.options.adaptiveHeight===!0&&c.setPosition(),c.$slider.trigger("lazyLoaded",[c,e,f]),c.progressiveLazyLoad()},g.onerror=function(){3>b?setTimeout(function(){c.progressiveLazyLoad(b+1)},500):(e.removeAttr("data-src").removeClass("slick-loading").addClass("slick-lazyload-error"),c.$slider.trigger("lazyLoadError",[c,e,f]),c.progressiveLazyLoad())},g.src=f):c.$slider.trigger("allImagesLoaded",[c])},b.prototype.refresh=function(b){var d,e,c=this;e=c.slideCount-c.options.slidesToShow,!c.options.infinite&&c.currentSlide>e&&(c.currentSlide=e),c.slideCount<=c.options.slidesToShow&&(c.currentSlide=0),d=c.currentSlide,c.destroy(!0),a.extend(c,c.initials,{currentSlide:d}),c.init(),b||c.changeSlide({data:{message:"index",index:d}},!1)},b.prototype.registerBreakpoints=function(){var c,d,e,b=this,f=b.options.responsive||null;if("array"===a.type(f)&&f.length){b.respondTo=b.options.respondTo||"window";for(c in f)if(e=b.breakpoints.length-1,d=f[c].breakpoint,f.hasOwnProperty(c)){for(;e>=0;)b.breakpoints[e]&&b.breakpoints[e]===d&&b.breakpoints.splice(e,1),e--;b.breakpoints.push(d),b.breakpointSettings[d]=f[c].settings}b.breakpoints.sort(function(a,c){return b.options.mobileFirst?a-c:c-a})}},b.prototype.reinit=function(){var b=this;b.$slides=b.$slideTrack.children(b.options.slide).addClass("slick-slide"),b.slideCount=b.$slides.length,b.currentSlide>=b.slideCount&&0!==b.currentSlide&&(b.currentSlide=b.currentSlide-b.options.slidesToScroll),b.slideCount<=b.options.slidesToShow&&(b.currentSlide=0),b.registerBreakpoints(),b.setProps(),b.setupInfinite(),b.buildArrows(),b.updateArrows(),b.initArrowEvents(),b.buildDots(),b.updateDots(),b.initDotEvents(),b.cleanUpSlideEvents(),b.initSlideEvents(),b.checkResponsive(!1,!0),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().on("click.slick",b.selectHandler),b.setSlideClasses("number"==typeof b.currentSlide?b.currentSlide:0),b.setPosition(),b.focu
vendor: 2,346 bytes, line 5
5sHandler(),b.paused=!b.options.autoplay,b.autoPlay(),b.$slider.trigger("reInit",[b])},b.prototype.resize=function(){var b=this;a(window).width()!==b.windowWidth&&(clearTimeout(b.windowDelay),b.windowDelay=window.setTimeout(function(){b.windowWidth=a(window).width(),b.checkResponsive(),b.unslicked||b.setPosition()},50))},b.prototype.removeSlide=b.prototype.slickRemove=function(a,b,c){var d=this;return"boolean"==typeof a?(b=a,a=b===!0?0:d.slideCount-1):a=b===!0?--a:a,d.slideCount<1||0>a||a>d.slideCount-1?!1:(d.unload(),c===!0?d.$slideTrack.children().remove():d.$slideTrack.children(this.options.slide).eq(a).remove(),d.$slides=d.$slideTrack.children(this.options.slide),d.$slideTrack.children(this.options.slide).detach(),d.$slideTrack.append(d.$slides),d.$slidesCache=d.$slides,void d.reinit())},b.prototype.setCSS=function(a){var d,e,b=this,c={};b.options.rtl===!0&&(a=-a),d="left"==b.positionProp?Math.ceil(a)+"px":"0px",e="top"==b.positionProp?Math.ceil(a)+"px":"0px",c[b.positionProp]=a,b.transformsEnabled===!1?b.$slideTrack.css(c):(c={},b.cssTransitions===!1?(c[b.animType]="translate("+d+", "+e+")",b.$slideTrack.css(c)):(c[b.animType]="translate3d("+d+", "+e+", 0px)",b.$slideTrack.css(c)))},b.prototype.setDimensions=function(){var a=this;a.options.vertical===!1?a.options.centerMode===!0&&a.$list.css({padding:"0px "+a.options.centerPadding}):(a.$list.height(a.$slides.first().outerHeight(!0)*a.options.slidesToShow),a.options.centerMode===!0&&a.$list.css({padding:a.options.centerPadding+" 0px"})),a.listWidth=a.$list.width(),a.listHeight=a.$list.height(),a.options.vertical===!1&&a.options.variableWidth===!1?(a.slideWidth=Math.ceil(a.listWidth/a.options.slidesToShow),a.$slideTrack.width(Math.ceil(a.slideWidth*a.$slideTrack.children(".slick-slide").length))):a.options.variableWidth===!0?a.$slideTrack.width(5e3*a.slideCount):(a.slideWidth=Math.ceil(a.listWidth),a.$slideTrack.height(Math.ceil(a.$slides.first().outerHeight(!0)*a.$slideTrack.children(".slick-slide").length)));var b=a.$slides.first().outerWidth(!0)-a.$slides.first().width();a.options.variableWidth===!1&&a.$slideTrack.children(".slick-slide").width(a.slideWidth-b)},b.prototype.setFade=function(){var c,b=this;b.$slides.each(function(d,e){c=b.slideWidth*d*-1,b.options.rtl===!0?a(e).css({position:"relative",right:c,top:0,zIndex:b.options.zIndex-2,opacity:0}
vendor: 3,177 bytes, line 5
5):a(e).css({position:"relative",left:c,top:0,zIndex:b.options.zIndex-2,opacity:0})}),b.$slides.eq(b.currentSlide).css({zIndex:b.options.zIndex-1,opacity:1})},b.prototype.setHeight=function(){var a=this;if(1===a.options.slidesToShow&&a.options.adaptiveHeight===!0&&a.options.vertical===!1){var b=a.$slides.eq(a.currentSlide).outerHeight(!0);a.$list.css("height",b)}},b.prototype.setOption=b.prototype.slickSetOption=function(){var c,d,e,f,h,b=this,g=!1;if("object"===a.type(arguments[0])?(e=arguments[0],g=arguments[1],h="multiple"):"string"===a.type(arguments[0])&&(e=arguments[0],f=arguments[1],g=arguments[2],"responsive"===arguments[0]&&"array"===a.type(arguments[1])?h="responsive":"undefined"!=typeof arguments[1]&&(h="single")),"single"===h)b.options[e]=f;else if("multiple"===h)a.each(e,function(a,c){b.options[a]=c});else if("responsive"===h)for(d in f)if("array"!==a.type(b.options.responsive))b.options.responsive=[f[d]];else{for(c=b.options.responsive.length-1;c>=0;)b.options.responsive[c].breakpoint===f[d].breakpoint&&b.options.responsive.splice(c,1),c--;b.options.responsive.push(f[d])}g&&(b.unload(),b.reinit())},b.prototype.setPosition=function(){var a=this;a.setDimensions(),a.setHeight(),a.options.fade===!1?a.setCSS(a.getLeft(a.currentSlide)):a.setFade(),a.$slider.trigger("setPosition",[a])},b.prototype.setProps=function(){var a=this,b=document.body.style;a.positionProp=a.options.vertical===!0?"top":"left","top"===a.positionProp?a.$slider.addClass("slick-vertical"):a.$slider.removeClass("slick-vertical"),(void 0!==b.WebkitTransition||void 0!==b.MozTransition||void 0!==b.msTransition)&&a.options.useCSS===!0&&(a.cssTransitions=!0),a.options.fade&&("number"==typeof a.options.zIndex?a.options.zIndex<3&&(a.options.zIndex=3):a.options.zIndex=a.defaults.zIndex),void 0!==b.OTransform&&(a.animType="OTransform",a.transformType="-o-transform",a.transitionType="OTransition",void 0===b.perspectiveProperty&&void 0===b.webkitPerspective&&(a.animType=!1)),void 0!==b.MozTransform&&(a.animType="MozTransform",a.transformType="-moz-transform",a.transitionType="MozTransition",void 0===b.perspectiveProperty&&void 0===b.MozPerspective&&(a.animType=!1)),void 0!==b.webkitTransform&&(a.animType="webkitTransform",a.transformType="-webkit-transform",a.transitionType="webkitTransition",void 0===b.perspectiveProperty&&void 0===b.webkitPerspective&&(a.animType=!1)),void 0!==b.msTransform&&(a.animType="msTransform",a.transformType="-ms-transform",a.transitionType="msTransition",void 0===b.msTransform&&(a.animType=!1)),void 0!==b.transform&&a.animType!==!1&&(a.animType="transform",a.transformType="transform",a.transitionType="transition"),a.transformsEnabled=a.options.useTransform&&null!==a.animType&&a.animType!==!1},b.prototype.setSlideClasses=function(a){var c,d,e,f,b=this;d=b.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),b.$slides.eq(a).addClass("slick-current"),b.options.centerMode===!0?(c=Math.floor(b.options.slidesToShow/2),b.options.infinite===!0&&(a>=c&&a<=b.slideCount-1-c?b.$slides.slice(a-c,a+c+1).addClass("slick-active").attr("aria-hidden","false"):(e=b.options.slidesToShow+a,
vendor: 1,607 bytes, line 6
6d.slice(e-c+1,e+c+2).addClass("slick-active").attr("aria-hidden","false")),0===a?d.eq(d.length-1-b.options.slidesToShow).addClass("slick-center"):a===b.slideCount-1&&d.eq(b.options.slidesToShow).addClass("slick-center")),b.$slides.eq(a).addClass("slick-center")):a>=0&&a<=b.slideCount-b.options.slidesToShow?b.$slides.slice(a,a+b.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):d.length<=b.options.slidesToShow?d.addClass("slick-active").attr("aria-hidden","false"):(f=b.slideCount%b.options.slidesToShow,e=b.options.infinite===!0?b.options.slidesToShow+a:a,b.options.slidesToShow==b.options.slidesToScroll&&b.slideCount-a<b.options.slidesToShow?d.slice(e-(b.options.slidesToShow-f),e+f).addClass("slick-active").attr("aria-hidden","false"):d.slice(e,e+b.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false")),"ondemand"===b.options.lazyLoad&&b.lazyLoad()},b.prototype.setupInfinite=function(){var c,d,e,b=this;if(b.options.fade===!0&&(b.options.centerMode=!1),b.options.infinite===!0&&b.options.fade===!1&&(d=null,b.slideCount>b.options.slidesToShow)){for(e=b.options.centerMode===!0?b.options.slidesToShow+1:b.options.slidesToShow,c=b.slideCount;c>b.slideCount-e;c-=1)d=c-1,a(b.$slides[d]).clone(!0).attr("id","").attr("data-slick-index",d-b.slideCount).prependTo(b.$slideTrack).addClass("slick-cloned");for(c=0;e>c;c+=1)d=c,a(b.$slides[d]).clone(!0).attr("id","").attr("data-slick-index",d+b.slideCount).appendTo(b.$slideTrack).addClass("slick-cloned");b.$slideTrack.find(".slick-cloned").find("[id]").each(function(){a(this).attr("id","")})}},b.prototype.
6interrupt=function(a){var b=this;a||b.autoPlay(),b.interrupted=a},b.prototype.selectHandler=function(b){var c=this,d=a(b.target).is(".slick-slide")?a(b.target):a(b.target).parents(".slick-slide"),e=parseInt(d.attr("data-slick-index"));return e||(e=0),c.slideCount<=c.options.slidesToShow?(c.setSlideClasses(e),void c.asNavFor(e)):void c.slideHandler(e)},b.prototype.slideHandler=function(a,b,c){var d,e,f,g,j,h=null,i=this;return b=b||!1,i.animating===!0&&i.options.waitForAnimate===!0||i.options.fade===!0&&i.currentSlide===a||i.slideCount<=i.options.slidesToShow?void 0:(b===!1&&i.asNavFor(a),d=a,h=i.getLeft(d),g=i.getLeft(i.currentSlide),i.currentLeft=null===i.swipeLeft?g:i.swipeLeft,i.options.infinite===!1&&i.options.centerMode===!1&&(0>a||a>i.getDotCount()*i.options.slidesToScroll)?void(i.options.fade===!1&&(d=i.currentSlide,c!==!0?i.animateSlide(g,function(){i.postSlide(d)}):i.postSlide(d))):i.options.infinite===!1&&i.options.centerMode===!0&&(0>a||a>i.slideCount-i.options.slidesToScroll)?void(i.options.fade===!1&&(d=i.currentSlide,c!==!0?i.animateSlide(g,function(){i.postSlide(d)}):i.postSlide(d))):(i.options.autoplay&&clearInterval(i.autoPlayTimer),e=0>d?i.slideCount%i.options.slidesToScroll!==0?i.slideCount-i.slideCount%i.options.slidesToScroll:i.slideCount+d:d>=i.slideCount?i.slideCount%i.options.slidesToScroll!==0?0:d-i.slideCount:d,i.animating=!0,i.$slider.trigger("beforeChange",[i,i.currentSlide,e]),f=i.currentSlide,i.currentSlide=e,i.setSlideClasses(i.currentSlide),i.options.asNavFor&&(j=i.getNavTarget(),j=j.slick("getSlick"),j.slideCount<=j.options.slidesToShow&&j.setSlideClasses(i.currentSlide)),i.updateDots(),i.updateArrows(),i.options.fade===!0?(c!==!0?(i.fadeSlideOut(f),i.fadeSlide(e,function(){i.postSlide(e)})):i.postSlide(e),void i.animateHeight()):void(c!==!0?i.animateSlide(h,function(){i.postSlide(e)}):i.postSlide(e))))},b.prototype.startLoad=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.hide(),a.$nextArrow.hide()),a.options.dots===!0&&a.slideCount>a.options.slidesToShow&&a.$dots.hide(),a.$slider.addClass("slick-loading")},b.prototype.swipeDirection=function(){var a,b,c,d,e=this;return a=e.touchObject.startX-e.touchObject.curX,b=e.touchObject.startY-e.touchObject.curY,c=Math.atan2(b,a),d=Math.round(180*c/Math.PI),0>d&&(d=360-Math.abs(d)),45>=d&&d>=0?e.options.rtl===!1?"left":"right":360>=d&&d>=315?e.options.rtl===!1?"left":"right":d>=135&&225>=d?e.options.rtl===!1?"right":"left":e.options.verticalSwiping===!0?d>=35&&135>=d?"down":"up":"vertical"},b.prototype.swipeEnd=function(a){var c,d,b=this;if(b.dragging=!1,b.interrupted=!1,b.shouldClick=b.touchObject.swipeLength>10?!1:!0,void 0===b.touchObject.curX)return!1;if(b.touchObject.edgeHit===!0&&b.$slider.trigger("edge",[b,b.swipeDirection()]),b.touchObject.swipeLength>=b.touchObject.minSwipe){switch(d=b.swipeDirection()){case"left":case"down":c=b.options.swipeToSlide?b.checkNavigable(b.currentSlide+b.getSlideCount()):b.currentSlide+b.getSlideCount(),b.currentDirection=0;break;case"right":case"up":c=b.options.swipeToSlide?b.checkNavigable(b.currentSlide-b.getSlideCount()):b.currentSlide-b.getSlideCount(),b.currentDirection=1}"vertical"!=d&&(b.slideHandler(c),b.touchObject={},b.$slider.trigger("swipe",[b,d]))}else b.touchObject.startX!==b.touchObject.curX&&(b.slideHandler(b.currentSlide),b.touchObject={})},b.prototype.swipeHandler=function(a){var b=this;if(!(b.options.swipe===!1||"ontouchend"in document&&b.options.swipe===!1||b.options.draggable===!1&&-1!==a.type.indexOf("mouse")))switch(b.touchObject.fingerCount=a.originalEvent&&void 0!==a.originalEvent.touches?a.originalEvent.touches.length:1,b.touchObject.minSwipe=b.listWidth/b.options.touchThreshold,b.options.verticalSwiping===!0&&(b.touchObject.minSwipe=b.listHeight/b.options.touchThreshold),a.data.action){case"start":b.swipeStart(a);break;case"move":b.swipeMove(a);break;case"end":b.swipeEnd(a)}},b.prototype.swipeMove=function(a){var d,e,f,g,h,b=this;return h=void 0!==a.originalEvent?a.originalEvent.touches:null,!b.dragging||h&&1!==h.length?!1:(d=b.getLeft(b.currentSlide),b.touchObject.curX=void 0!==h?h[0].pageX:a.clientX,b.touchObject.curY=void 0!==h?h[0].pageY:a.clientY,b.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(b.touchObject.curX-b.touchObject.startX,2))),b.options.verticalSwiping===!0&&(b.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(b.touchObject.curY-b.touchObject.startY,2)))),e=b.swipeDirection(),"vertical"!==e?(void 0!==a.originalEvent&&b.touchObject.swipeLength>
64&&a.preventDefault(),g=(b.options.rtl===!1?1:-1)*(b.touchObject.curX>b.touchObject.startX?1:-1),b.options.verticalSwiping===!0&&(g=b.touchObject.curY>b.touchObject.startY?1:-1),f=b.touchObject.swipeLength,b.touchObject.edgeHit=!1,b.options.infinite===!1&&(0===b.currentSlide&&"right"===e||b.currentSlide>=b.getDotCount()&&"left"===e)&&(f=b.touchObject.swipeLength*b.options.edgeFriction,b.touchObject.edgeHit=!0),b.options.vertical===!1?b.swipeLeft=d+f*g:b.swipeLeft=d+f*(b.$list.height()/b.listWidth)*g,b.options.verticalSwiping===!0&&(b.swipeLeft=d+f*g),b.options.fade===!0||b.options.touchMove===!1?!1:b.animating===!0?(b.swipeLeft=null,!1):void b.setCSS(b.swipeLeft)):void 0)},b.prototype.swipeStart=function(a){var c,b=this;return b.interrupted=!0,1!==b.touchObject.fingerCount||b.slideCount<=b.options.slidesToShow?(b.touchObject={},!1):(void 0!==a.originalEvent&&void 0!==a.originalEvent.touches&&(c=a.originalEvent.touches[0]),b.touchObject.startX=b.touchObject.curX=void 0!==c?c.pageX:a.clientX,b.touchObject.startY=b.touchObject.curY=void 0!==c?c.pageY:a.clientY,void(b.dragging=!0))},b.prototype.unfilterSlides=b.prototype.slickUnfilter=function(){var a=this;null!==a.$slidesCache&&(a.unload(),a.$slideTrack.children(this.options.slide).detach(),a.$slidesCache.appendTo(a.$slideTrack),a.reinit())},b.prototype.unload=function(){var b=this;a(".slick-cloned",b.$slider).remove(),b.$dots&&b.$dots.remove(),b.$prevArrow&&b.htmlExpr.test(b.options.prevArrow)&&b.$prevArrow.remove(),b.$nextArrow&&b.htmlExpr.test(b.options.nextArrow)&&b.$nextArrow.remove(),b.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")},b.prototype.unslick=function(a){var b=this;b.$slider.trigger("unslick",[b,a]),b.destroy()},b.prototype.updateArrows=function(){var b,a=this;b=Math.floor(a.options.slidesToShow/2),a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&!a.options.infinite&&(a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),a.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===a.currentSlide?(a.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),a.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):a.currentSlide>=a.slideCount-a.options.slidesToShow&&a.options.centerMode===!1?(a.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):a.currentSlide>=a.slideCount-1&&a.options.centerMode===!0&&(a.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},b.prototype.updateDots=function(){var a=this;null!==a.$dots&&(a.$dots.find("li").removeClass("slick-active").attr("aria-hidden","true"),a.$dots.find("li").eq(Math.floor(a.currentSlide/a.options.slidesToScroll)).addClass("slick-active").attr("aria-hidden","false"))},b.prototype.visibility=function(){var a=this;a.options.autoplay&&(document[a.hidden]?a.interrupted=!0:a.interrupted=!1)},a.fn.slick=function(){var f,g,a=this,c=arguments[0],d=Array.prototype.slice.call(arguments,1),e=a.length;for(f=0;e>f;f++)if("object"==typeof c||"undefined"==typeof c?a[f].slick=new b(a[f],c):g=a[f].slick[c].apply(a[f].slick,d),"undefined"!=typeof g)return g;return a}});
7!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){function i(){var b,c,d={height:f.innerHeight,width:f.innerWidth};return d.height||(b=e.compatMode,(b||!a.support.boxModel)&&(c="CSS1Compat"===b?g:e.body,d={height:c.clientHeight,width:c.clientWidth})),d}function j(){return{top:f.pageYOffset||g.scrollTop||e.body.scrollTop,left:f.pageXOffset||g.scrollLeft||e.body.scrollLeft}}function k(){if(b.length){var e=0,f=a.map(b,function(a){var b=a.data.selector,c=a.$element;return b?c.find(b):c});for(c=c||i(),d=d||j();e<b.length;e++)if(a.contains(g,f[e][0])){var h=a(f[e]),k={height:h[0].offsetHeight,width:h[0].offsetWidth},l=h.offset(),m=h.data("inview");if(!d||!c)return;l.top+k.height>d.top&&l.top<d.top+c.height&&l.left+k.width>d.left&&l.left<d.left+c.width?m||h.data("inview",!0).trigger("inview",[!0]):m&&h.data("inview",!1).trigger("inview",[!1])}}}var c,d,h,b=[],e=document,f=window,g=e.documentElement;a.event.special.inview={add:function(c){b.push({data:c,$element:a(this),element:this}),!h&&b.length&&(h=setInterval(k,250))},remove:function(a){for(var c=0;c<b.length;c++){var d=b[c];if(d.element===this&&d.data.guid===a.guid){b.splice(c,1);break}}b.length||(clearInterval(h),h=null)}},a(f).on("scroll resize scrollstop",function(){c=d=null}),!g.addEventListener&&g.attachEvent&&g.attachEvent("onfocusin",function(){d=null})});
8; (function( $, window, document, undefined )
9{
10var csmJs = window.csmJs || {};
11var csmJsExtensions =
12{
13util : {
14getContentTier : function()
15{
16if( $( 'meta[name="csm.content.tier"]' ).length )
17{
18return $('meta[name="csm.content.tier"]').attr( "content" ).toLowerCase();
19}
20return '';
21},
22rememberLastVisitedPage : function()
23{
24function exclude( url )
25{
26if( window !== window.top )
27{
28return true
29}
30const form_classes = [ "csm_form_staff_contact", "csm_form_readers_picks" ];
31const page_class_identifier = csmJs.pageData.class_identifier;
32if( typeof page_class_identifier === 'undefined' || form_classes.indexOf(page_class_identifier) >= 0 )
33{
34return true
35}
36let excludePages =
37[
38'^\/auth.*',
39'^\/csm\/redirect.*',
40'^\/About\/Contact.*',
41'^\/About\/Offer\/Join',
42'^\/Join',
43'^\/About\/Offer\/Give',
44'^\/Give',
45'^\/About\/Offer\/StudentOffer',
46'^\/StudentOffer',
47'^\/About\/Offer\/StaffGive',
48'^\/StaffGive',
49]
50let test = new RegExp( '(' + excludePages.join('|') + ')' )
51if( test.exec( url ) )
52{
53return true
54}
55return false
56}
57let url = window.location.pathname;
58if( !exclude( url ) )
59{
60csmJs.store.setItem( 'csm_last_visit_page', url )
61}
61
62},
63extendCookie : function( key, value, options )
64{
65jQuery.cookie.json = true;
66var cookieValue = jQuery.cookie( key ) || {};
67$.extend( true, cookieValue, value  );
68jQuery.cookie( key, cookieValue, options );
69},
70getJsonCookieValue : function( key )
71{
72var isJSON = $.cookie.json || false;
73$.cookie.json = true;
74var cookieValue = $.cookie( key );
75$.cookie.json = isJSON;
76return cookieValue;
77},
78setJsonCookieValue : function( cookieName, value, cookieSettings )
79{
80var cookieSettings = cookieSettings || {};
81var isJSON = $.cookie.json || false;
82$.cookie.json = true;
83var result = $.cookie(
84cookieName,
85value,
86csmJs.util.mergeJson(
87{ 'path': '/' },
88cookieSettings
89)
90);
91$.cookie.json = isJSON;
92return result;
93},
94getQueryParam : function( name, url )
95{
96if (!url) url = window.location.href;
97name = name.replace(/[\[\]]/g, "\\$&");
98var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
99results = regex.exec(url);
100if (!results) return null;
101if (!results[2]) return '';
102return decodeURIComponent(results[2].replace(/\+/g, " "));
103},
104mergeJson : function( source1, source2 )
105{
106source1 = source1 || {};
107source2 = source2 || {};
108var mergedJson = Object.create( source2 );// Copying Source2 to a new Object
109for( var attrname in source1 )
110{
111if( mergedJson.hasOwnProperty( attrname ) )
112{
113if( source1[ attrname ] != null && source1[ attrname ].constructor == Object )
114{
115mergedJson[ attrname ] = mergeJson( source1[ attrname ], mergedJson[ attrname ] );
116}
117}
118else
119{
120mergedJson[ attrname ] = source1[ attrname ];
121}
122}
123return mergedJson;
124},
125updateQueryStringParameter : function( uri, key, value )
126{
127if( uri != undefined )
128{
129var re = new RegExp("([?|&])" + key + "=.*?(&|$)", "i");
130separator = uri.indexOf('?') !== -1 ? "&" : "?";
131if (uri.match(re))
132{
133return uri.replace(re, '$1' + key + "=" + value + '$2');
134}
135else
136{
137return uri + separator + key + "=" + value;
138}
139}
140},
141isLoggedIn: function()
142{
143return this.getJsonCookieValue( 'csm_user' ) ? true : false;
144},
145isSubscriber : function()
146{
147var user = _getUser();
148return hasAccess( user );
149function _getUser()
150{
151return csmJs.util.getJsonCookieValue( 'csm_user' );
152}
153function hasAccess( user )
154{
155if( user )
156{
157return typeof user.type === 'string' && user.type.length > 0;
158}
159else
160{
161return false;
162}
163}
164},
165insertScript : function( src, callback, insertionLocation )
166{
167let element = insertionLocation || document.querySelector('head' );
168let script = document.createElement( 'script' );
169script.async = 'async';
170script.src = src;
171element.appendChild( script );
172if (typeof callback === 'function' )
173{
174script.onload = () => callback();
175}
176},
177logEvent : function( caller, message )
178{
179csmJs.eventLog = csmJs.eventLog || [];
180let now = new Date();
181let relativeTimestamp = (now - csmJs.scriptStartTime ) / 1000;
182if ( caller == undefined ) caller = '';
183if ( message == undefined ) message = '';
184csmJs.eventLog.push([ relativeTimestamp, caller, message ]);
185},
186haveConsent : function ( category )
187{
188let consentState = false;
189const activeCategories = $.cookie('OptanonConsent');
190const consentCategories = {
191PERFORMANCE : 'C0002:1',
192FUNCTIONAL : 'C0003:1',
193TRACKING : 'C0004:1',
194SOCIAL_MEDIA : 'C0005:1'
195};
196if(
197typeof category === "string" &&
198typeof activeCategories === 'string'
199)
200{
201category = category.toUpperCase();
202if ( activeCategories.indexOf( consentCategories[category] ) > -1 )
203{
204consentState = true;
205}
206}
207return consentState;
208}
209} // util
210};
211$.extend( true, csmJs, csmJsExtensions )
212}(jQuery, window, document));
213Function.prototype.debounce = function(wait)
214{
215let timeout,
216debouncedFunc = this;
217return function() {
218let context = this;
219function later(args)
220{
221timeout = null;
222debouncedFunc.apply(context, args);
223};
224clearTimeout(timeout);
225timeout = setTimeout(later, wait, arguments);
226};
227};
228;( function ( $, window, document, undefined )
229{
230var blockNamesList = [ "default", "politics", "books", "subscribe", "culture-learning", "commentary", "science", "csperspective", "free-trial", "todays-highlights", "next-up" ], // Must be in sync with ini file ( check above )
231slotMap =
232{
233"promotions-top": { selector: "#csm-promotions-banner", replaceElement: false },
234"promotions-fp-middle": { selector: "#csm-promotions-banner-middle", replaceElement: false},
235"promotions-footer": { selector: "#home-subscribe-ad-a", replaceElement: false},
236"article-body": { selector: "#ezve-inbody-newsletter-widget", replaceElement: false},
237"article-promo-a": { selector: "#body-promo-a", replaceElement: true},
238"article-promo-b": { selector: "#body-promo-b", replaceElement: true},
239},
240injectedCtaCount = 0;
241var cta = // the module to export
242{
243addNextUp : function( nextUpLimit )
244{
245var $nextUpContainer = $('#content-recommendation');
246var $storyBottom     = $('#story-bottom');
247var limit            = nextUpLimit || 6;
248if( limit > 0 && $nextUpContainer.length === 1 && $storyBottom.length === 1 )
249{
250$nextUpContainer.load('/services/next_up?limit=' + limit, function ()
251{
252$nextUpContainer.removeClass('hide');
253}
254);
255}
256},
257fillSlot: function ( slotName, blockName, campaignID )
258{
259var elementSelector = "",
260slotId = "";
261if ( isValidSlotName( slotName ) )
262{
263elementSelector = slotMap[ slotName ][ 'selector' ];
264if ( blockName === 'empty' )
265{
266slotId = replaceContent( slotName, '' );
267}
268else if ( isValidBlockName( blockName ) )
269{
270$.ajax( {
271url: '/services/node_view_gui?key=' + blockName + '&view=ajax',
272accepts: { type: 'text/html' }
273} )
274.fail( function ( jqXHR, textStatus, errorThrown )
275{
276console.log( 'fillCTASlot : ' + textStatus + ' : ' + errorThrown );
277} )
278.done( function ( data )
279{
280if ( campaignID )
281{
282addParameterAttribute( elementSelector, campaignID );
283}
284slotId = replaceContent( slotName, data );
285if ( !data )
286{
287console.warn( "Updating slot " + slotName + " to be empty because block " + blockName + " returned no content." );
288}
289if ( blockName !== 'subscribe' && blockName !== 'free-trial' )
290{
291csmJs.cta.changeBanner( blockName, '.injected-cta[data-cta-id="' + slotId + '"]' );
292}
293} );
294}
295}
296},
297emptySlot: function ( slotName )
298{
299this.fillSlot( slotName, "empty" );
300},
301getSlotNames: function ()
302{
303var ret = [];
304for ( var key in slotMap )
305{
306if ( slotMap.hasOwnProperty( key ) )
307{
308ret.push( key );
309}
310}
311return ret;
312},
313labelSlots: function ( state )
314{
315for ( var key in slotMap )
316{
317if ( slotMap.hasOwnProperty( key ) )
318{
319var selector = slotMap[ key ][ 'selector' ];
320if ( typeof state === "undefined" || !!state )
321{
322$( selector ).addClass( 'cta-slot' ).attr( 'data-cta-slot', key );
323} else
324{
325$( selector ).removeClass( 'cta-slot' );
326}
327}
328}
329},
330replaceStickyNavShareWidget: function ( buttonType, campaignID )
331{
332var supportedButtons = {
333"subscribe": {
334"text": "Subscribe: $11 / Month",
335"url": "https://subscribe.csmonitor.com/servlet/OrdersGateway?cds_mag_code=CSX&cds_page_id=232996&cds_campaign_code=19web",
336},
337"newsletters": {
338"text": "Get Free Newsletters",
339"url": "https://cloud.cssubs.com/monitornewsletters",
340},
341"free-trial": {
342"text": "Signup: Free Trial",
343"url": "https://cloud.cssubs.com/freetrial",
344},
345},
346$stickyNavRightWidget = $( ".visible-scroll-down .float-right" ),
347displayButton = {};
348if ( !csmJs.util.isSubscriber() && isValidButtonSelection() )
349{
350if ( campaignID )
351{
352addCampaignID();
353}
354var button = '<div class="header-tool-button"><a href="' + displayButton.url +
355'" class="button_link"><span>' + displayButton.text + '</span></a></div>';
356$stickyNavRightWidget.html( button );
357}
358function isValidButtonSelection()
359{
360try
361{
362for ( var key in supportedButtons )
363{
364if ( key === buttonType.toLowerCase() )
365{
366displayButton.text = supportedButtons[ key ].text;
367displayButton.url = supportedButtons[ key ].url;
368return true;
369}
370}
371if ( displayButton.text === undefined )
372{
373console.warn( "replaceStickyNavShareWidget: Invalid button type given" );
374return false;
375}
376}
377catch ( e )
378{
379console.warn( "replaceStickyNavShareWidget: Invalid button type given" );
380}
381}
382function addCampaignID()
383{
384var param = "icid=mkt:web:" + campaignID;
385param = ( buttonType.toLowerCase() === "subscribe" ) ? ( "&" + param ) : ( "?" + param );
386displayButton.url = displayButton.url + param;
387}
388},
389changeBanner: function ( section, selector )
390{
391let removeNewsletters = ['books', 'commentary', 'csperspective', 'culture-learning', 'highlights', 'politics', 'science'],
392banners;
393if ( selector )
394{
395banners = document.querySelector( selector );
396banners = banners.querySelectorAll( '.newsletter-banner' )
397}
398else
399{
400banners = document.querySelectorAll( '.newsletter-banner:not( .subscribe ):not( .free-trial )' );
401}
402banners.forEach( banner =>
403{
404banner.classList.remove(...removeNewsletters);
405banner.classList.add( section );
406})
407let bannerVariants= {
408politics: {
409imgUrl: '//images.csmonitor.com/csm/2019/07/1086451_2_chat_bubble_standard.png?alias=original',
410imgAlt: 'overlapping speech bubbles',
411text: 'Get balanced and insightful politics stories delivered twice&nbsp;a&nbsp;week.',
412id: 'poli'
413},
414books: {
415imgUrl: '//images.csmonitor.com/csm/2021/12/1131998_4_1215-december-books_standard.png?alias=square_400x400',
416imgAlt: 'stack of books',
417text: 'There\'s a world of new ideas in every <strong>Books newsletter</strong>.',
418id: 'book'
419},
420cultureLearning: {
421imgUrl: '//images.csmonitor.com/csm/2022/02/1133974_1_0202-notebook-illo_standard.png?alias=square_400x400',
422imgAlt: 'notebooks',
423text: 'There’s more to life, enrich yours with <strong>Culture & Learning</strong> weekly.',
424id: 'equa'
425},
426science: {
427imgUrl: '//images.csmonitor.com/csm/2022/02/1133977_1_0202-lightbulb-illo_standard.png?alias=square_400x400',
428imgAlt: 'lightbulb',
429text: 'Follow humanity’s discoveries with <strong>Science & Nature</strong> stories in your inbox.',
430id: 'scie'
431},
432csperspective: {
433imgUrl: '//images.csmonitor.com/csm/2022/02/1133982_1_0202-lighthouse-illo_standard.png?alias=square_400x400',
434imgAlt: 'lighthouse',
435text: 'Gain a <strong>spiritual perspective</strong> from the stories in your inbox.',
436id: 'cspe'
437},
438commentary: {
439imgUrl: '//images.csmonitor.com/csm/2022/02/1133983_1_0202-stage-light-illo_standard.png?alias=square_400x400',
440imgAlt: 'stage light',
441text: 'Want to understand the deeper impact of critical events? Learn the <strong>Monitor’s insight</strong>.',
442id: 'comm'
443},
444highlights: {
445imgUrl: '//images.csmonitor.com/csm/2019/02/1077507_1_0207-globe_standard.png?alias=square_400x400',
446imgAlt: 'globe',
447text: 'Deepen your worldview <br>with <strong>Monitor Highlights.</strong>',
448id: 'csmmh'
449},
450};
451if ( section === 'politics' )
452{
453updateBanner( bannerVariants.politics );
454}
455else if ( section === 'books' )
456{
457updateBanner( bannerVariants.books );
458}
459else if ( section === 'culture-learning' )
460{
461updateBanner( bannerVariants.cultureLearning );
462}
463else if ( section === 'science' )
464{
465updateBanner( bannerVariants.science );
466}
467else if ( section === 'csperspective' )
468{
469updateBanner( bannerVariants.csperspective );
470}
471else if ( section === 'commentary' )
472{
473updateBanner( bannerVariants.commentary );
474}
475else if ( section === 'highlights' )
476{
477updateBanner( bannerVariants.highlights );
478}
479function updateBanner( variant )
480{
481banners.forEach( widget =>
482{
483widget.querySelector('.left-container img').outerHTML = `<img class="hide-for-small-only" src="${variant.imgUrl}" alt="${variant.imgAlt}">`;
484widget.querySelector('.left-container h3').outerHTML = `<h3>${variant.text}</h3>`;
485widget.querySelector('form').setAttribute('data-selection',`${variant.id} spec`);
486})
487}
488}
489};
490function isValidSlotName( slotName )
491{
492if ( typeof slotName === 'string' && slotMap.hasOwnProperty( slotName.toLowerCase() ) )
493{
494return true;
495}
496else
497{
498console.warn( '"' + slotName + '" is not a valid slot name. Valid slot names:\n' + cta.getSlotNames().join( '\n' ) );
499return false;
500}
501}
502function isValidBlockName( blockName )
503{
504if ( blockNamesList.indexOf( blockName.toLowerCase()) > -1 )
505{
506return true;
507}
508else
509{
510console.warn( '"' + blockName + '" is not a valid block name. Valid block names:\n' + blockNamesList.join( '\n' ) );
511return false;
512}
513}
514function addParameterAttribute( element, parameter )
515{
516$( element ).attr( 'data-param', parameter ).addClass( 'param-added' );
517}
518function replaceContent( slotName, data )
519{
520var elementSelector = slotMap[ slotName ][ 'selector' ],
521$element = slotMap[ slotName ][ 'replaceElement' ] ? $( elementSelector ).parent() : $( elementSelector ),
522slotId = ++injectedCtaCount;
523$element.html( data );
524$element.addClass( "injected-cta" );
525$element.attr( { "data-cta-id": slotId, "data-slot-name": slotName } );
526return slotId;
527}
528var csmJs = window.csmJs || {};
529$.extend( true, csmJs, { cta } );
530}( jQuery, window, document ) );
531; (function( $, window, document, undefined )
532{
533var csmJs = window.csmJs || {};
534var csmJsExtensions =
535{
536omniture :
537{
538submit : function()
539{
540if( typeof s != 'undefined' )
541{
542$( '.omniture.active:eq(0) li' ).each( function()
543{
544s[ $( this ).attr( 'data-key' ) ] = $( this ).attr( 'data-value' );
545});
546if( typeof tt_s !== 'undefined' )
547{
548s = jQuery.extend( s, tt_s );
549}
550s.t();
551}
552},
553dateToString : function ( date, showTime )
554{
555var r;
556if ( typeof date === 'string' && date.length > 0 ) {
557var d = date.substr( 0, 10 );
558var t = date.substr( 11, 5 );
559r = showTime ? d + ' ' + t : d;
560}
561else
562{
563r = '';
564}
565return r;
566},
567labelWidgets : function(newState)
568{
569if (newState === 'on' || typeof newState === 'undefined') {
570$('body')
571.addClass('show-widgets')
572.on('click.widget', '*[data-widget-name] a', label);
573} else if (newState === 'off') {
574$('body')
575.removeClass('show-widgets')
576.off('.widget');
577}
578function label(e)
579{
580e.preventDefault();
581var widgetName = $(e.target)
582.closest('[data-widget-name]')
583.attr('data-widget-name');
584alert("Widget: " + widgetName);
585}
586}
587}
588};
589$.extend( true, csmJs, csmJsExtensions )
590}(jQuery, window, document));
591; (function( $, window, document, undefined )
592{
593var csmJs = window.csmJs || {};
594var csmJsExtensions =
595{
596store :
597{
598setItem : function( key, value )
599{
600return null;
601},
602getItem : function( key )
603{
604return null;
605},
606removeItem : function( key )
607{
608return null;
609}
610},
611sessionStorage :
612{
613setItem : function( key, value )
614{
615return null;
616},
617getItem : function( key )
618{
619return null;
620},
621removeItem : function( key )
622{
623return null;
624}
625}
626};
627$.extend( true, csmJs, csmJsExtensions );
628if( typeof Modernizr !== 'undefined' && Modernizr.localstorage )
629{
630Object.defineProperty( csmJs, "store", new (function()
631{
632var aKeys = [],
633oStorage = {};
634Object.defineProperty( oStorage, "getItem",
635{
636value: function( sKey )
637{
638return localStorage.getItem( sKey );
639},
640writable: false,
641configurable: false,
642enumerable: false
643} );
644Object.defineProperty( oStorage, "setItem",
645{
646value: function( sKey, sValue )
647{
648return localStorage.setItem( sKey, sValue );
649},
650writable: false,
651configurable: false,
652enumerable: false
653} );
654Object.defineProperty( oStorage, "length",
655{
656get: function()
657{
658return localStorage.length;
659},
660configurable: false,
661enumerable: false
662} );
663Object.defineProperty( oStorage, "removeItem",
664{
665value: function( sKey )
666{
667return localStorage.removeItem( sKey );
668},
669writable: false,
670configurable: false,
671enumerable: false
672} );
673this.get = function()
674{
675return oStorage;
676};
677this.configurable = false;
678this.enumerable = true;
679})() );
680}
681if( typeof Modernizr !== 'undefined' && Modernizr.sessionstorage )
682{
683Object.defineProperty( csmJs, "sessionStorage", new (function()
684{
685var aKeys = [],
686oStorage = {};
687Object.defineProperty( oStorage, "getItem",
688{
689value: function( sKey )
690{
691return sessionStorage.getItem( sKey );
692},
693writable: false,
694configurable: false,
695enumerable: false
696} );
697Object.defineProperty( oStorage, "setItem",
698{
699value: function( sKey, sValue )
700{
701return sessionStorage.setItem( sKey, sValue );
702},
703writable: false,
704configurable: false,
705enumerable: false
706} );
707Object.defineProperty( oStorage, "length",
708{
709get: function()
710{
711return sessionStorage.length;
712},
713configurable: false,
714enumerable: false
715} );
716Object.defineProperty( oStorage, "removeItem",
717{
718value: function( sKey )
719{
720return sessionStorage.removeItem( sKey );
721},
722writable: false,
723configurable: false,
724enumerable: false
725} );
726this.get = function()
727{
728return oStorage;
729};
730this.configurable = false;
731this.enumerable = true;
732})() );
733}
734if( typeof Modernizr !== 'undefined' && Modernizr.cookies && !Modernizr.localstorage )
735{
736Object.defineProperty( csmJs, "store", new (function()
737{
738var aKeys = [],
739oStorage = {};
740Object.defineProperty( oStorage, "getItem",
741{
742value: function( sKey )
743{
744return sKey ? this[ sKey ] : null;
745},
746writable: false,
747configurable: false,
748enumerable: false
749} );
750Object.defineProperty( oStorage, "key",
751{
752value: function( nKeyId )
753{
754return aKeys[ nKeyId ];
755},
756writable: false,
757configurable: false,
758enumerable: false
759} );
760Object.defineProperty( oStorage, "setItem",
761{
762value: function( sKey, sValue )
763{
764if( !sKey )
765{
766return;
767}
768document.cookie = escape( sKey ) + "=" + escape( sValue ) + "; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/";
769},
770writable: false,
771configurable: false,
772enumerable: false
773} );
774Object.defineProperty( oStorage, "length",
775{
776get: function()
777{
778return aKeys.length;
779},
780configurable: false,
781enumerable: false
782} );
783Object.defineProperty( oStorage, "removeItem",
784{
785value: function( sKey )
786{
787if( !sKey )
788{
789return;
790}
791document.cookie = escape( sKey ) + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/";
792},
793writable: false,
794configurable: false,
795enumerable: false
796} );
797this.get = function()
798{
799var iThisIndx;
800for( var sKey in oStorage )
801{
802iThisIndx = aKeys.indexOf( sKey );
803if( iThisIndx === -1 )
804{
805oStorage.setItem( sKey, oStorage[ sKey ] );
806}
807else
808{
809aKeys.splice( iThisIndx, 1 );
810}
811delete oStorage[ sKey ];
812}
813for( aKeys; aKeys.length > 0; aKeys.splice( 0, 1 ) )
814{
815oStorage.removeItem( aKeys[ 0 ] );
816}
817for( var aCouple, iKey, nIdx = 0, aCouples = document.cookie.split( /\s*;\s*/ ); nIdx < aCouples.length; nIdx++ )
818{
819aCouple = aCouples[ nIdx ].split( /\s*=\s*/ );
820if( aCouple.length > 1 )
821{
822oStorage[ iKey = unescape( aCouple[ 0 ] ) ] = unescape( aCouple[ 1 ] );
823aKeys.push( iKey );
824}
825}
826return oStorage;
827};
828this.configurable = false;
829this.enumerable = true;
830})() );
831}
832}(jQuery, window, document));
833;(function ( $, window, document, undefined )
834{
835var pluginName = 'storypage',
836pluginElement = null,
837defaults =
838{
839};
840function Plugin( element, options )
841{
842pluginElement = element;
843this.element = element;
844this.options = $.extend( {}, defaults, options) ;
845this._defaults = defaults;
846this._name = pluginName;
847var self = this;
848this.init();
849}
850Plugin.prototype =
851{
852init : function()
853{
854var self = this;
855self.initBody();
856self.checkRightColumn();
857if (window.csmJs)
858{
859window.csmJs.cta.addNextUp();
860window.csmJs.injectStoryBodyContentRecommendationWidget = self.injectStoryBodyContentRecommendationWidget;
861window.csmJs.injectBottomContentRecommendationWidget = self.injectBottomContentRecommendationWidget;
862}
863$( '.share-tools' ).shareTools();
864self.injectMondaySunriseBriefPromo();
865},
866initBody : function()
867{
868$( '.eza-body table' ).addClass( 'stack' );
869$( '.eza-body p a[name]' ).addClass( 'anchor' );
870},
871checkRightColumn : function()
872{
873if( $( '#right-column' ).is( ':visible' ) )
874{
875$height = 640  // max height of right top ad slot (1)
876+ $( '#ezve-right-column-2' ).height() + 20
877+ $( '#ezve-right-column-3' ).height() + 20
878+ $( '#ezve-right-column-4' ).height() + 20;
879if ( $height > 1730 ) {
880$( '#main-column' ).css( 'min-height', $height );
881}
882}
883},
884injectStoryBodyContentRecommendationWidget : function ( storyList, numberToShow )
885{
886var list = storyList || 'most_viewed';  // or best_5
887var limit = numberToShow || 3;
888$.ajax({
889url : '/services/' + list + '?limit=' + limit,
890type : 'GET',
891dataType : 'html'
892})
893.done( function(data)
894{
895var firstPromo = $( '.injection:eq(0 )' );
896firstPromo.addClass( 'content-recommendation' );
897firstPromo.removeClass( 'injection' ).addClass( 'content-recommendation-injected' );
898firstPromo.attr("data-widget-name", "inbody-content-recommendation");
899firstPromo.html( data );
900})
901},
902injectBottomContentRecommendationWidget : function( storyList, numberToShow )
903{
904var list = storyList || 'most_viewed'; // or best_5
905var limit = numberToShow || 5;
906$.ajax({
907url : '/services/' + list + '?limit=' + limit,
908type : 'GET',
909dataType : 'html'
910})
911.done( function(data)
912{
913var storyBottom = $( '#story-bottom > .row' );
914storyBottom.addClass( 'recommendation-added' ).css('max-width','105rem').append('<div class="content-recommendation footer-recommendation small-centered large-uncentered small-11 large-6 columns" data-widget-name="bottom-content-recommendation"></div>');
915storyBottom.children( '.content-bound' ).addClass( 'large-uncentered large-6' ).removeClass( 'large-12' );
916storyBottom.find( '.tag' ).remove();
917storyBottom.children('.content-recommendation').append( data );
918var contentFooter = $( '.content-recommendation.footer-recommendation' );
919contentFooter.find( '.story_thumbnail' ).removeClass( 'medium-3 small-4' ).addClass( 'large-4 medium-4 small-12' );
920contentFooter.find( '.story_detail' ).removeClass( 'medium-9 small-8' ).addClass( 'large-7 medium-7 small-12' );
921contentFooter.find( '.story_list_item' ).each( function( index )
922{
923var count = index + 1;
924$( this ).find( '.story_detail' ).before( '<div class="float-left"><span class="story_count added">' + count + '.</span></div>' )
925$( this ).removeClass( 'row' ).addClass( 'small-12' );
926});
927$( '#related-stories' ).find( '#related-story-block-contents li' ).each( function()
928{
929$( this ).find( '.story_thumbnail' ).addClass( 'columns large-6 medium-4 small-12' ).css( 'padding-left','0' );
930$( this ).find( '.story_detail' ).addClass( 'large-6 medium-8 small-12 float-left' );
931});
932});
933},
934injectMondaySunriseBriefPromo : function ()
935{
936if (window.enableSunrisePromo)
937{
938var localTime = new Date(),
939utcTime =  localTime.getUTCHours(),
940utcDay = localTime.getUTCDay();
941if ( utcTime >= 11 && utcTime <= 23 && utcDay === 1 )
942{
943var sunrise_brief;
944var keyword_url = "/components/keyword/sunrise-brief?limit=1";
945$.ajax({
946url: keyword_url,
947dataType: "json",
948success: function( data )
949{
950sunrise_brief = data[0];
951}
952})
953.done( function()
954{
955var acceptablePublishedDate = localTime;
956acceptablePublishedDate.setDate(localTime.getDate() - 3);
957acceptablePublishedDate = Math.round(acceptablePublishedDate.getTime()/1000);
958if ( sunrise_brief.title != csmJs.pageData.headline && sunrise_brief.publish_date >= acceptablePublishedDate )
959{
960var $promo = $(".ezp-inbody-promo:first");
961var sunrise_url = sunrise_brief.url + "?icid=sunrise_promo_a";
962$promo.html("<div class=\"ezv-listing ezc-csm-story with-thumbnail\">" +
963"<a title=\"" + sunrise_brief.title + "\" class=\"ezc-csm-story-link\" href=\"" + sunrise_url +"\">" +
964"<div class=\"story-thumbnail standard_100x67\">" +
965"<img class=\" lazyloaded\" data-src=\"" + sunrise_brief.images + "\" alt=\"\" src=\""+ sunrise_brief.images +"\">" +
966"</div><div class=\"story-detail\"><h3 class=\"story-headline\">" +
967"<span class=\"story_link\">" + sunrise_brief.title + "</span>" +
968"</h3></div></a></div>"
969);
970}
971});
972}
973}
974}
975};
976$.fn[pluginName] = function ( options ) {
977var args = arguments;
978if (options === undefined || typeof options === 'object') {
979return this.each(function ()
980{
981if (!$.data(this, 'plugin_' + pluginName)) {
982$.data(this, 'plugin_' + pluginName, new Plugin( this, options ));
983}
984});
985} else if (typeof options === 'string' && options[0] !== '_' && options !== 'init') {
986var returns;
987this.each(function () {
988var instance = $.data(this, 'plugin_' + pluginName);
989if (instance instanceof Plugin && typeof instance[options] === 'function') {
990returns = instance[options].apply( instance, Array.prototype.slice.call( args, 1 ) );
991}
992if (options === 'destroy') {
993$.data(this, 'plugin_' + pluginName, null);
994}
995});
996return returns !== undefined ? returns : this;
997}
998};
999}(jQuery, window, document));
1000;(function ( $, window, document, undefined )
1001{
1002var pluginName = 'responsivebody',
1003pluginElement = null,
1004defaults =
1005{
1006};
1007function Plugin( element, options )
1008{
1009pluginElement = element;
1010this.element = element;
1011this.options = $.extend( {}, defaults, options) ;
1012this._defaults = defaults;
1013this._name = pluginName;
1014var self = this;
1015this.init();
1016}
1017Plugin.prototype =
1018{
1019init : function()
1020{
1021var self = this;
1022self.initStoryBackButton();
1023self.initFrontPageMoreArticles();
1024self.showHidePassword();
1025self.enableModalGallery();
1026if( document.location.host.indexOf( "webin" ) === -1 )
1027{
1028self.setPossibleSubscriber();
1029}
1030$( '.default-slick-slider' ).slick(
1031{
1032prevArrow: '<div class="slick-prev layer-absolute"><i class="icon-chevron-left"></i></div>',
1033nextArrow: '<div class="slick-next layer-absolute"><i class="icon-chevron-right"></i></div>',
1034infinite: false,
1035lazyLoad: 'ondemand',
1036dots: false,
1037arrows: true
1038});
1039const printButtons = document.querySelectorAll('*[data-action="print"]')
1040Array.prototype.map.call(printButtons, printButton => {
1041printButton.addEventListener('click', (e) => {
1042showLazyLoadImagesInPrint();
1043window.print();
1044});
1045});
1046if( $( '.ezlayout-print' ).length )
1047{
1048showLazyLoadImagesInPrint();
1049window.print();
1050}
1051$( '#debug > h2' ).click( function()
1052{
1053$( '#debug' ).toggleClass( 'expanded' );
1054});
1055$( '.select_links' ).on( 'change', function(e)
1056{
1057if( $(this).val() )
1058{
1059window.location = $(this).val();
1060}
1061});
1062csmJs.util.rememberLastVisitedPage();
1063function showLazyLoadImagesInPrint()
1064{
1065var $images = $( "img.lazyload" );
1066$images.each(function( index, element )
1067{
1068var imgSrc = element.getAttribute( "src" );
1069var dataSrc = element.getAttribute( "data-src" );
1070if (dataSrc.length > 0 && !imgSrc )
1071{
1072element.src = element.getAttribute( "data-src" );
1073}
1074}
1074);
1075}
1076if ($( ".csm-dropdown" ).length)
1077{
1078$( ".csm-dropdown button" ).on( "click", function()
1079{
1080if ($( this ).attr( "aria-expanded" ) == "true")
1081{
1082$( this ).attr( "aria-expanded", "false" );
1083}
1084else
1085{
1086$( this ).attr( "aria-expanded", "true" );
1087self.dropdownKeyNavigation( $( this ).siblings( "ul" ) );
1088}
1089});
1090}
1091$( 'body' )
1092.mousemove(function() {
1093$( this )
1094.removeClass('using-keyboard')
1095.addClass('using-mouse');
1096})
1097.keydown(function( event ) {
1098if( event.keyCode === 9 )
1099{
1100$( this )
1101.addClass('using-keyboard')
1102.removeClass('using-mouse');
1103}
1104});
1105$( '.media_standby .overlay' ).click( function()
1106{
1107var $mediaStandby = $(this).parent();
1108var $mediaStandbyContent = $mediaStandby.find( '.content' ).detach();
1109$( '#lead-media .content' ).appendTo( $mediaStandby );
1110$mediaStandbyContent.appendTo( $( '#lead-media' ) );
1111$( '.ezv-embed.ezc-csm_gallery' ).fullGallery( 'setPosition' );
1112});
1113$(document).on('click', 'a.animate-scrolling[href^="#"]', function (event)
1114{
1115event.preventDefault();
1116$('html, body').animate(
1117{
1118scrollTop: $($.attr(this, 'href')).offset().top
1119},
1120500
1121);
1122});
1123},
1124initStoryBackButton : function()
1125{
1126var isDaily       = $( 'body.ddp' ).length;
1127var $itemSections = $('section.package-item.ezc-ddp_item.in-package');
1128if( isDaily && $itemSections.length > 1) {
1129var lastScrollPos  = 0;
1130var lastScrollDir  = '';
1131var paragraphIndex = 0;
1132var keyboard       = $( '.using-keyboard' ).length;
1133var bttButtonTimer;
1134var $_window      = $( window );
1135var $stickyBtt    = $('#ddp-sticky-back-to-top');
1136var $introSection = $( '.package-intro' );
1137var $minTopSection;
1138var $minTopParagraphs;
1139if( $introSection.length )
1140{
1141$minTopSection = $itemSections[0];
1142}
1143else
1144{
1145$minTopSection = $itemSections[1];
1146}
1147$minTopParagraphs = $($minTopSection).find( 'div.story-one.mini p' );
1148if( $minTopParagraphs.length > 1 )
1149{
1150paragraphIndex = $minTopParagraphs.length - 2;
1151}
1152else if( $minTopParagraphs.length == 0 )
1153{
1154$minTopParagraphs = $($minTopSection).find( '.share-tools' );
1155}
1156let minTop = 0;
1157if( $minTopParagraphs[paragraphIndex] ) //TODO: too many assumptions about the HTML structure - will break
1158{
1159minTop = $($minTopParagraphs[paragraphIndex]).offset().top;
1160}
1161var toggleDailyStickyBackToTop = function( on )
1162{
1163if( on )
1164{
1165$stickyBtt.css( 'display', 'block' );
1166}
1167else
1168{
1169$stickyBtt.css( 'display', 'none' );
1170}
1171};
1172var getScrollPos = function()
1173{
1174return $_window.scrollTop();
1175};
1176$_window.keydown( function( event ){
1177if( event.keyCode === 9 && lastScrollDir !== 'down' )
1178{
1179lastScrollDir = 'down';
1180toggleDailyStickyBackToTop( false );
1181}
1182lastScrollPos = getScrollPos();
1183keyboard      = $( '.using-keyboard' ).length;
1184});
1185$_window.mousedown( function(){
1186keyboard = $( '.using-keyboard' ).length;
1187});
1188$_window.scroll( function(){
1189var scrollPos = getScrollPos();
1190if( keyboard )
1191{
1192toggleDailyStickyBackToTop( false );
1193}
1194else
1195{
1196if( scrollPos < minTop )
1197{
1198lastScrollDir = 'top';
1199toggleDailyStickyBackToTop( false );
1200}
1201else if( scrollPos < lastScrollPos && lastScrollDir !== 'up' )
1202{
1203lastScrollDir = 'up';
1204toggleDailyStickyBackToTop( true );
1205}
1206else if( scrollPos > lastScrollPos + 100 && lastScrollDir !== 'down' )
1207{
1208lastScrollDir = 'down';
1209toggleDailyStickyBackToTop( false );
1210}
1211}
1212lastScrollPos = scrollPos;
1213});
1214}
1215},
1216initFrontPageMoreArticles : function()
1217{
1218$( '.ezc-frontpage .manual-4-item-block' ).addClass( 'collapsed' );
1219$( '.ezz-collapsible .collapsible-trigger' ).click( function()
1220{
1221var $target = $( '.ezz-collapsible .collapsible' );
1222if( $target.is( ':visible' ) )
1223{
1224$(this).text( 'More Articles' );
1225$(this).removeClass( 'close' );
1226$( '.ezc-frontpage .manual-4-item-block' ).addClass( 'collapsed' );
1227$target.fadeOut();
1228}
1229else
1230{
1231$(this).text( 'Collapse' );
1232$(this).addClass( 'close' );
1233$( '.ezc-frontpage .manual-4-item-block' ).removeClass( 'collapsed' );
1234$target.fadeIn();
1235}
1236});
1237},
1238showHidePassword: function()
1239{
1240$( '.password_container button' ).on( 'click', function()
1241{
1242var $button = $( this ),
1243$input = $button.parent().find( 'input' ),
1244displayOption = 'Hide Password';
1245if( $input.attr( 'type' ) === 'password' )
1246{
1247$button.find( 'i' ).attr( 'class', 'icon-eye-blocked' );
1248$input.attr( 'type', 'text' );
1249}
1250else
1251{
1252$button.find( 'i' ).attr( 'class', 'icon-eye' );
1253$input.attr( 'type', 'password' );
1254displayOption = 'Show Password';
1255}
1256$button.attr( 'aria-label', displayOption );
1257$button.attr( 'title', displayOption );
1258} );
1259setTimeout( function()
1260{
1261if( $( '.password_container input' ).attr( 'style' ) != undefined )
1262{
1263$( '.password_container button' ).css( 'right', '1.65rem' );
1264}
1265}, 800 );
1266},
1267dropdownKeyNavigation: function( elem )
1268{
1269var tabbable = elem.find( "select, input, textarea, button, a" ).filter( ":visible" );
1270var lastTabbable = tabbable.last();
1271lastTabbable.on( "keydown", function ( e )
1272{
1273if (e.which === 9 && !e.shiftKey)
1274{
1275elem.siblings( "button" ).attr( "aria-expanded", "false" ).focus();
1276}
1277});
1278tabbable.on( "keydown", function( e )
1279{
1280if (e.which === 27)
1281{
1282elem.siblings( "button" ).attr( "aria-expanded", "false").focus();
1283}
1284});
1285},
1286setPossibleSubscriber: function()
1287{
1288if( !$( 'body' ).hasClass( 'logged-in' ) )
1289{
1290if (Modernizr.cookies == true)
1291{
1292if ( csmJs.util.haveConsent('FUNCTIONAL') )
1293{
1294if( sessionStorage.getItem( 'csm_possible_sub' ) )
1295{
1296document.body.classList.add( 'possible_sub' );
1297let parsedProduct = JSON.parse( sessionStorage.csm_possible_sub ).product;
1298if( parsedProduct )
1299{
1300parsedProduct = `data-referrer-${parsedProduct}`;
1301document.body.classList.add( parsedProduct );
1302}
1303}
1304else
1305{
1306var src = csmJs.util.getQueryParam('src'),
1307product = csmJs.util.getQueryParam('prod');
1308if( product === 'daily' || product === 'bundle' || product === 'hwym' || product === 'freetrial' )
1309{
1310if( src === 'email' || src === 'newsletter' )
1311{
1312var sfmc_sub = csmJs.util.getQueryParam( 'sfmc_sub' );
1313if( !sfmc_sub )
1314{
1315sfmc_sub = 0;
1316}
1317var possibleSubscriber = {
1318'sfmc_sub'	: sfmc_sub,
1319'product'	: product
1320};
1321sessionStorage.setItem(
1322'csm_possible_sub',
1323JSON.stringify( possibleSubscriber )
1324);
1325document.body.classList.add( 'possible_sub', `data-referrer-${product}` );
1326}
1327}
1328}
1329}
1330}
1331}
1332},
1333enableModalGallery: function()
1334{
1335const modalGalleries = document.querySelectorAll( '.gallery-modal' )
1336if( modalGalleries.length > 0  )
1337{
1338modalGalleries.forEach( gallery => $( gallery ).modalGallery() )
1339}
1340}
1341};
1342$.fn[pluginName] = function ( options ) {
1343var args = arguments;
1344if (options === undefined || typeof options === 'object') {
1345return this.each(function ()
1346{
1347if (!$.data(this, 'plugin_' + pluginName)) {
1348$.data(this, 'plugin_' + pluginName, new Plugin( this, options ));
1349}
1350});
1351} else if (typeof options === 'string' && options[0] !== '_' && options !== 'init') {
1352var returns;
1353this.each(function () {
1354var instance = $.data(this, 'plugin_' + pluginName);
1355if (instance instanceof Plugin && typeof instance[options] === 'function') {
1356returns = instance[options].apply( instance, Array.prototype.slice.call( args, 1 ) );
1357}
1358if (options === 'destroy') {
1359$.data(this, 'plugin_' + pluginName, null);
1360}
1361}
1361);
1362return returns !== undefined ? returns : this;
1363}
1364};
1365}(jQuery, window, document));
1366;(function( $, window, document, undefined )
1367{
1368var pluginName = 'trackUniqueStories',
1369pluginElement = null,
1370defaults =
1371{
1372'storageKey': 'csm_unique_stories',
1373'meteredClasses':
1374[
1375'csm_article',
1376'csm_blog_post',
1377'csm_movie_review',
1378'csm_book_review',
1379'csm_quiz',
1380'csm_list_article',
1381'csm_gallery',
1382'ddp_package',
1383'ddp_item',
1384'ddp_intro',
1385],
1386};
1387function Plugin( element, options )
1388{
1389pluginElement = element;
1390this.element = element;
1391this.options = $.extend( {}, defaults, options );
1392this._defaults = defaults;
1393this._name = pluginName;
1394var self = this;
1395this.init();
1396}
1397Plugin.prototype =
1398{
1399init: function()
1400{
1401var self = this;
1402self.run();
1403},
1404run: function()
1405{
1406var self = this;
1407var uniqueStories = self.getUniqueStories();
1408var objectId = self.getContentObjectId();
1409if( objectId )
1410{
1411self.addThisPage( uniqueStories, objectId );
1412self.setUniqueStories( uniqueStories );
1413}
1414},
1415getUniqueStories: function()
1416{
1417var self = this;
1418var uniqueStoriesObjectDefaults =
1419{
1420modified: 0,
1421ids: [],
1422meteredIds: [],
1423};
1424var storedUniqueStories = JSON.parse(
1425csmJs.store.getItem( self.options.storageKey )
1426);
1427var uniqueStoriesObject = $.extend(
1428{},
1429uniqueStoriesObjectDefaults,
1430storedUniqueStories
1431);
1432if( self.isMonthNew( uniqueStoriesObject.modified ) )
1433{
1434return uniqueStoriesObjectDefaults;
1435}
1436return uniqueStoriesObject;
1437},
1438setUniqueStories: function( uniqueStories )
1439{
1440var self = this;
1441uniqueStories.modified = new Date().getTime();
1442csmJs.store.setItem(
1443self.options.storageKey,
1444JSON.stringify( uniqueStories )
1445);
1446},
1447clearUniqueStories: function()
1448{
1449var self = this;
1450localStorage.removeItem( self.options.storageKey );
1451},
1452addThisPage: function( uniqueStories, objectId )
1453{
1454if(
1455csmJs.util.getContentTier() !== 'free' &&
1456uniqueStories.ids.indexOf( objectId ) === -1 &&
1457uniqueStories.ids.indexOf( objectId + '' ) === -1 &&
1458uniqueStories.ids.length < 21
1459)
1460{
1461uniqueStories.ids.push( objectId );
1462}
1463return true;
1464},
1465isMonthNew: function( time )
1466{
1467return makeComparableDate( new Date().getTime() ) > makeComparableDate( time );
1468},
1469getContentObjectId: function()
1470{
1471var self = this;
1472if( self.options.meteredClasses.indexOf( getPageClassIdentifier() ) > -1 )
1473{
1474if( typeof csmJs === 'object' && typeof csmJs.ddpPackageObjectId === 'string' )
1475{
1476return parseInt( csmJs.ddpPackageObjectId );
1477}
1478var tag = document.getElementById( 'page-meta-data' );
1479if( tag )
1480{
1481var pageMetaData = JSON.parse( tag.innerText );
1482if( pageMetaData )
1483{
1484return parseInt( pageMetaData.contentobject_id );
1485}
1486}
1487if( typeof s !== 'undefined' )
1488{
1489return parseInt( s.prop4 );
1490}
1491}
1492},
1493};
1494function makeComparableDate( time )
1495{
1496time = time ? time : 0;
1497var date = new Date( time );
1498return parseInt( date.getFullYear() + '' + ('0' + (date.getMonth() + 1)).slice( -2 ) );
1499}
1500function getPageClassIdentifier()
1501{
1502var pageData = window.csmJs.getPageData();
1503var classIdentifier = '';
1504if( pageData && pageData.class_identifier && pageData.class_identifier.length > 0 )
1505{
1506classIdentifier = pageData.class_identifier;
1507}
1508return classIdentifier;
1509}
1510$.fn[ pluginName ] = function( options )
1511{
1512var args = arguments;
1513if( options === undefined || typeof options === 'object' )
1514{
1515return this.each( function()
1516{
1517if( !$.data( this, 'plugin_' + pluginName ) )
1518{
1519$.data( this, 'plugin_' + pluginName, new Plugin( this, options ) );
1520}
1521} );
1522}
1523else if( typeof options === 'string' && options[ 0 ] !== '_' && options !== 'init' )
1524{
1525var returns;
1526this.each( function()
1527{
1528var instance = $.data( this, 'plugin_' + pluginName );
1529if( instance instanceof Plugin && typeof instance[ options ] === 'function' )
1530{
1531returns = instance[ options ].apply( instance, Array.prototype.slice.call( args, 1 ) );
1532}
1533if( options === 'destroy' )
1534{
1535$.data( this, 'plugin_' + pluginName, null );
1536}
1537} );
1538return returns !== undefined ? returns : this;
1539}
1540};
1541}( jQuery, window, document ));
1542;(function ( $, window, document, undefined )
1543{
1544var pluginName = 'modalGallery',
1545pluginElement = null,
1546defaults =
1547{
1548};
1549function Plugin( element, options )
1550{
1551pluginElement = element;
1552this.element = element;
1553this.options = $.extend( {}, defaults, options) ;
1554this._defaults = defaults;
1555this._name = pluginName;
1556var self = this;
1557this.init();
1558}
1559Plugin.prototype =
1560{
1561loaded : false,
1562init : function()
1563{
1564var self = this;
1565this.initEvents();
1566},
1567hideGalleryMessage: function()
1568{
1569var self = this;
1570var $target = $( self.element ).find( '.gallery-instruction-dialog' );
1571$target.addClass( 'hidden' );
1572},
1573showGalleryMessage: function()
1574{
1575var self = this;
1576var $target = $( self.element ).find( '.gallery-instruction-dialog' );
1577$target.removeClass( 'hidden' );
1578},
1579initEvents: function()
1580{
1581var self = this;
1582$( self.element ).on( 'open.zf.reveal', function()
1583{
1584var modal = this;
1585if( $(this).attr( 'data-content' ), !self.loaded )
1586{
1587$.ajax(
1588{
1589dataType: 'html',
1590url: $(this).attr( 'data-content' ),
1591})
1592.done( function( resp )
1593{
1594self.loaded = true;
1595self.handleResponse( modal, resp );
1596});
1597}
1598});
1599},
1600sendLinkEvent : function( name, override )
1601{
1602if (typeof s === "object")
1603{
1604s.linkTrackVars = 'pageName,prop3,prop4,prop5,prop10,prop21,prop30,prop36,prop59,prop64,prop65,prop67';
1605s.linkTrackEvents = 'None';
1606s.tl( true, 'o', name, override );
1607}
1608},
1609handleResponse : function( modal, response )
1610{
1611var self = this;
1612self.message = $( self.element ).find( '.gallery-instruction-dialog' );
1613$( modal ).find( '.content' )
1614.html( response )
1615.foundation();
1616var initialSlide = 0;
1617if( $( self.element ).attr( 'id' ) === 'main-art-modal' )
1618{
1619initialSlide = $( '#main-media' ).find( '.default-slick-slider' ).slick( 'slickCurrentSlide' );
1620}
1621$( self.element ).find( '.modal-slick-slider' )
1622.slick(
1623{
1624infinite: false,
1625lazyLoad: 'ondemand',
1626dots: false,
1627arrows: false,
1628initialSlide: initialSlide,
1629})
1630.on( 'setPosition', function( event )
1631{
1632var top = $( event.currentTarget ).width() * 0.333;
1633$( modal ).find( '.slick-arrow' ).css( 'top', top + 'px' );
1634})
1635.on( 'afterChange', function( event, slick, currentSlide )
1636{
1637self.hideGalleryMessage();
1638if( $( self.element ).attr( 'id' ) == 'main-art-modal' )
1639{
1640$( '#main-media' ).find( '.default-slick-slider' )
1641.slick( 'slickGoTo', currentSlide, true);
1642}
1643var $slide = $(slick.$slides[currentSlide]);
1644var jsonString = $.trim( $slide.find( '.modal-gallery-link-event' ).html() );
1645if( jsonString )
1646{
1647var data = JSON.parse( jsonString );
1648var override = {
1649prop3 : data.galleryTitle,
1650prop4 : data.galleryObjectId,
1651prop5 : data.contentClass,
1652prop21 : data.imageObjectId
1653};
1654self.sendLinkEvent( 'Embed_Gallery_Nav', override );
1655}
1656})
1657.on( 'lazyLoaded', function()
1658{
1659window.dispatchEvent( new Event( 'resize' ) );
1660});
1661$( self.element).find( '.slick-slide img' ).click( function(e)
1662{
1663var pWidth        = $( this ).innerWidth();
1664var pOffset       = $( this ).offset();
1665var mouseX        = e.pageX - pOffset.left;
1666var slickSlider   = $( this ).parents( '.slick-slider' );
1667var	messageHidden = $( self.element ).find( '.gallery-instruction-dialog' ).hasClass( 'hidden' );
1668if( messageHidden )
1669{
1670if( pWidth/3 > mouseX )
1671{
1672slickSlider.slick('slickPrev');
1673}
1674else
1675{
1676slickSlider.slick('slickNext');
1677}
1678}
1679else
1680{
1681self.hideGalleryMessage();
1682}
1683});
1684$( self.element ).find( '.gallery-instruction-dialog' ).on( 'click', function()
1685{
1686self.hideGalleryMessage();
1687} );
1688var sliderCount = $( self.element ).find( '.modal-slick-slider' ).slick( 'getSlick' ).slideCount;
1689if( sliderCount < 2 )
1690{
1691self.hideGalleryMessage();
1692}
1693else
1694{
1695self.showGalleryMessage();
1696}
1697var jsonString = $.trim( $( self.element ).find( '.slick-current .modal-gallery-link-event' ).html() );
1698if( jsonString )
1699{
1700var data = JSON.parse( jsonString );
1701var override = {
1702prop3 : data.galleryTitle,
1703prop4 : data.galleryObjectId,
1704prop5 : data.contentClass,
1705prop21 : data.imageObjectId
1706}
1707self.sendLinkEvent('Embed_Gallery_First', override);
1708}
1709$( modal ).find( '.share-tools' ).shareTools();
1710}
1711};
1712$.fn[pluginName] = function ( options ) {
1713var args = arguments;
1714if (options === undefined || typeof options === 'object') {
1715return this.each(function ()
1716{
1717if (!$.data(this, 'plugin_' + pluginName)) {
1718$.data(this, 'plugin_' + pluginName, new Plugin( this, options ));
1719}
1720});
1721} else if (typeof options === 'string' && options[0] !== '_' && options !== 'init') {
1722var returns;
1723this.each(function () {
1724var instance = $.data(this, 'plugin_' + pluginName);
1725if (instance instanceof Plugin && typeof instance[options] === 'function') {
1726returns = instance[options].apply( instance, Array.prototype.slice.call( args, 1 ) );
1727}
1728if (options === 'destroy') {
1729$.data(this, 'plugin_' + pluginName, null);
1730}
1731}
1731);
1732return returns !== undefined ? returns : this;
1733}
1734};
1735}(jQuery, window, document));
1736;(function ( $, window, document, undefined )
1737{
1738var pluginName = 'fullGallery',
1739pluginElement = null,
1740defaults =
1741{
1742adjustBrowserHistory : true
1743};
1744function Plugin( element, options )
1745{
1746pluginElement = element;
1747this.element = element;
1748this.options = $.extend( {}, defaults, options );
1749this._defaults = defaults;
1750this._name = pluginName;
1751var self = this;
1752this.init();
1753}
1754function iOSPlatform()
1755{
1756var iOSPlatforms = [ 'iPad', 'iPhone', 'iPod' ];
1757return iOSPlatforms.indexOf( navigator.platform ) !== -1
1758}
1759function slickCloseFullscreen( closedByButton )
1760{
1761var self = this;
1762if( closedByButton )
1763{
1764toggleFullScreen( $( self.element ) );
1765}
1766else
1767{
1768$( 'html,body' ).removeClass( 'fullscreen' );
1769$( '#header' ).removeClass( 'hidden' );
1770}
1771$( self.element ).removeClass( 'fullscreen' );
1772$( '.slick-slider' ).slick( 'setPosition' );
1773}
1774function detectFullScreen()
1775{
1776var fullscreenElement = document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement;
1777if( !fullscreenElement )
1778{
1779slickCloseFullscreen();
1780}
1781else
1782{
1783}
1784}
1785function toggleFullScreen( fullscreenElement ) {
1786if(
1787document.fullscreenElement ||
1788document.webkitFullscreenElement ||
1789document.mozFullScreenElement ||
1790document.msFullscreenElement
1791)
1792{
1793if( document.exitFullscreen )
1794{
1795document.exitFullscreen();
1796}
1797else if( document.mozCancelFullScreen )
1798{
1799document.mozCancelFullScreen();
1800}
1801else if( document.webkitExitFullscreen )
1802{
1803document.webkitExitFullscreen();
1804}
1805else if( document.msExitFullscreen )
1806{
1807document.msExitFullscreen();
1808}
1809}
1810else
1811{
1812element = fullscreenElement.get( 0 );
1813if( element.requestFullscreen )
1814{
1815element.requestFullscreen();
1816}
1817else if( element.mozRequestFullScreen )
1818{
1819element.mozRequestFullScreen();
1820}
1821else if( element.webkitRequestFullscreen )
1822{
1823element.webkitRequestFullscreen( Element.ALLOW_KEYBOARD_INPUT );
1824}
1825else if( element.msRequestFullscreen )
1826{
1827element.msRequestFullscreen();
1828}
1829}
1830}
1831function trapKeyboardInsideElement(elem){
1832var tabbable = elem.find('select, input, textarea, button, a, img').filter(':visible');
1833var firstTabbable = tabbable.first();
1834var lastTabbable = tabbable.last();
1835firstTabbable.focus();
1836lastTabbable.on('keydown', function (e) {
1837if ((e.which === 9 && !e.shiftKey)) {
1838e.preventDefault();
1839firstTabbable.focus();
1840}
1841});
1842firstTabbable.on('keydown', function (e) {
1843if ((e.which === 9 && e.shiftKey)) {
1844e.preventDefault();
1845lastTabbable.focus();
1846}
1847});
1848}
1849Plugin.prototype =
1850{
1851slider         : null,
1852message        : null,
1853lastSlickSlide : null,
1854init: function()
1855{
1856var self = this;
1857self.initMessage();
1858self.initSlickSlider();
1859self.initGridOverlay();
1860self.startingSlide();
1861self.showGalleryMessage();
1862self.trackEvents();
1863$( '.share-tools' ).shareTools();
1864},
1865setPosition : function()
1866{
1867var self = this;
1868self.slider.slick( 'setPosition' );
1869},
1870showGalleryMessage: function()
1871{
1872var self = this;
1873var $removedMessage = self.message.detach();
1874self.slider.append( $removedMessage[0] );
1875self.message.removeClass( 'hidden' );
1876},
1877startingSlide: function()
1878{
1879var self       = this;
1880var firstSlide = 0;
1881$( ".gallery-slide" ).each( function( index ) {
1882if( window.location.href === $( this ).attr( 'data-target' ) )
1883{
1884firstSlide = index;
1885}
1886} );
1887self.slider.slick( 'slickGoTo', firstSlide, true );
1888},
1889initGridOverlay: function()
1890{
1891var self = this;
1892function closeGrid(){
1893$( "#overlay" ).hide();
1894$( '.slick-active .icon-grid-9' ).focus();
1895}
1896$( '.icon-grid-9' ).on( 'click', function()
1897{
1898$( "#overlay" ).show();
1899trapKeyboardInsideElement( $('#overlay .innercontain') );
1900} );
1901$( '.gallery-thumbnail' ).on( 'click' , function()
1902{
1903closeGrid();
1904self.slider.slick( 'slickGoTo', $( this ).index(), true );
1905$( '.slick-active .icon-grid-9' ).focus();
1906} );
1907$( '.gallery-thumbnail, .close-thumbnails' ).on( 'keydown' , function(event)
1908{
1909if( event.keyCode === 27 )
1910{
1911closeGrid();
1912}
1913} );
1914$( '.close-thumbnails' ).on( 'click', closeGrid );
1915},
1916initMessage: function()
1917{
1918var self = this;
1919self.message = $(self.element).find( '.gallery-instruction-dialog' );
1920self.message.on( 'click', function()
1921{
1922self.message.addClass( 'hidden' );
1923} );
1924},
1925initSlickSlider: function()
1926{
1927var self = this;
1928self.slider         = $( self.element ).find( '.full-gallery-slick-slider' );
1929self.lastSlickSlide = $( self.element ).find( '.lastSlickSlide' );
1930self.slider.slick(
1931{
1932infinite: false,
1933lazyLoad: 'ondemand',
1934dots: false,
1935arrows: false
1936}
1937);
1938$( self.element ).find( '.slick-slide img' ).each( function( index )
1939{
1940$( this ).click( function( e )
1941{
1942var pWidth        = $( this ).innerWidth();
1943var pOffset       = $( this ).offset();
1944var mouseX        = e.pageX - pOffset.left;
1945var messageHidden = self.message.hasClass( 'hidden' );
1946if( messageHidden )
1947{
1948if( pWidth / 3 > mouseX )
1949{
1950self.slider.slick( 'slickPrev' );
1951}
1952else
1953{
1954if( index === self.slider.slick("getSlick").slideCount - 1 )
1955{
1956var target = self.lastSlickSlide.attr( 'data-target' );
1957if( target )
1958{
1959window.location.href = self.lastSlickSlide.attr( 'data-target' );
1960}
1961}
1962else
1963{
1964self.slider.slick( 'slickNext' );
1965}
1966}
1967}
1968else
1969{
1970self.message.addClass( 'hidden' );
1971}
1972} );
1973} );
1974$( '.ezc-csm_gallery .icon-enlarge' ).on( 'click', function()
1975{
1976$( 'html,body' ).addClass( 'fullscreen' );
1977$( '#header' ).addClass( 'hidden' );
1978$( self.element ).addClass( 'fullscreen' );
1979toggleFullScreen( $( self.element ) );
1980$( '.slick-slider' ).slick( 'setPosition' );
1981} );
1982$( self.element ).find( '.icon-close.fullscreen-close' ).on( 'click', function()
1983{
1984slickCloseFullscreen( !iOSPlatform() );
1985} );
1986self.slider.on( 'afterChange', function( event, slick, currentSlide )
1987{
1988if( self.options.adjustBrowserHistory )
1989{
1990if( currentSlide < self.slider.slick("getSlick").slideCount - 1 )
1991{
1992window.history.replaceState( { slide: currentSlide }, document.title, $( this ).find( '.slick-current' ).attr( 'data-target' ) );
1993}
1994}
1995self.message.addClass( 'hidden' );
1996if( $(slick.$slides[currentSlide]).hasClass( 'lastSlickSlide' ) )
1997{
1998$( ".more-galleries .button_link" ).css('visibility','hidden');
1999}
2000else
2001{
2002$( ".more-galleries .button_link" ).css('visibility','visible');
2003}
2004} );
2005$( document ).bind( 'fullscreenchange webkitfullscreenchange mozfullscreenchange msfullscreenchange', function(){ detectFullScreen() } );
2006document.onmsfullscreenchange = function(){ detectFullScreen() };
2007$( ".slick-track" ).attr( "tabindex", "0" ).attr( "aria-labelledby", "headline" );
2008},
2009trackEvents : function()
2010{
2011$( '.slick-slider' ).on( 'beforeChange', function( event, slick, currentSlide, nextSlide )
2012{
2013var $slide = $( slick.$slides[ nextSlide ] );
2014var jsonString = $.trim( $slide.find( '.modal-gallery-link-event' ).html() );
2015if( jsonString )
2016{
2017var data = JSON.parse( jsonString );
2018var override =
2019{
2020prop3 : data.galleryTitle,
2021prop4 : data.galleryObjectId,
2022prop5 : data.contentClass,
2023prop21 : data.imageObjectId
2024};
2025submitCustomLinkEvent("Gallery Nav", override);
2026}
2027});
2028$(".icon-grid-9").click(function()
2029{
2030submitCustomLinkEvent("Gallery Open Thumbnails");
2031});
2032$(".icon-enlarge").click(function()
2033{
2034submitCustomLinkEvent("Open in fullscreen");
2035});
2036function submitCustomLinkEvent( name, override )
2037{
2038if ( typeof s === "object" )
2039{
2040s.linkTrackVars = 'pageName,prop3,prop4,prop5,prop10,prop21,prop30,prop36,prop40,prop59,prop64,prop65,prop67';
2041s.linkTrackEvents = 'None';
2042s.tl( true, 'o', name, override );
2043}
2044}
2045}
2046};
2047$.fn[ pluginName ] = function( options ) {
2048var args = arguments;
2049if( options === undefined || typeof options === 'object' )
2050{
2051return this.each( function() {
2052if( !$.data( this, 'plugin_' + pluginName ) )
2053{
2054$.data( this, 'plugin_' + pluginName, new Plugin( this, options ) );
2055}
2056} );
2057}
2058else if( typeof options === 'string' && options[ 0 ] !== '_' && options !== 'init' )
2059{
2060var returns;
2061this.each( function() {
2062var instance = $.data( this, 'plugin_' + pluginName );
2063if( instance instanceof Plugin && typeof instance[ options ] === 'function' )
2064{
2065returns = instance[ options ].apply( instance, Array.prototype.slice.call( args, 1 ) );
2066}
2067if( options === 'destroy' )
2068{
2069$.data( this, 'plugin_' + pluginName, null );
2070}
2071} );
2072return returns !== undefined ? returns : this;
2073}
2074};
2075}(jQuery, window, document));
2076typeof JSON!="object"&&(JSON={}),function(){"use strict";function f(e){return e<10?"0"+e:e}function quote(e){return escapable.lastIndex=0,escapable.test(e)?'"'+e.replace(escapable,function(e){var t=meta[e];return typeof t=="string"?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var n,r,i,s,o=gap,u,a=t[e];a&&typeof a=="object"&&typeof a.toJSON=="function"&&(a=a.toJSON(e)),typeof rep=="function"&&(a=rep.call(t,e,a));switch(typeof a){case"string":return quote(a);case"number":return isFinite(a)?String(a):"null";case"boolean":case"null":return String(a);case"object":if(!a)return"null";gap+=indent,u=[];if(Object.prototype.toString.apply(a)==="[object Array]"){s=a.length;for(n=0;n<s;n+=1)u[n]=str(n,a)||"null";return i=u.length===0?"[]":gap?"[\n"+gap+u.join(",\n"+gap)+"\n"+o+"]":"["+u.join(",")+"]",gap=o,i}if(rep&&typeof rep=="object"){s=rep.length;for(n=0;n<s;n+=1)typeof rep[n]=="string"&&(r=rep[n],i=str(r,a),i&&u.push(quote(r)+(gap?": ":":")+i))}else for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(i=str(r,a),i&&u.push(quote(r)+(gap?": ":":")+i));return i=u.length===0?"{}":gap?"{\n"+gap+u.join(",\n"+gap)+"\n"+o+"}":"{"+u.join(",")+"}",gap=o,i}}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(e){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(e){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","	":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;typeof JSON.stringify!="function"&&(JSON.stringify=function(e,t,n){var r;gap="",indent="";if(typeof n=="number")for(r=0;r<n;r+=1)indent+=" ";else typeof n=="string"&&(indent=n);rep=t;if(!t||typeof t=="function"||typeof t=="object"&&typeof t.length=="number")return str("",{"":e});throw new Error("JSON.stringify")}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){function walk(e,t){var n,r,i=e[t];if(i&&typeof i=="object")for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(r=walk(i,n),r!==undefined?i[n]=r:delete i[n]);return reviver.call(e,t,i)}var j;text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}(),function(e,t){"use strict";var n=e.History=e.History||{},r=e.jQuery;if(typeof n.Adapter!="undefined")throw new Error("History.js Adapter has already been loaded...");n.Adapter={bind:function(e,t,n){r(e).bind(t,n)},trigger:function(e,t,n){r(e).trigger(t,n)},extractEventData:function(e,n,r){var i=n&&n.originalEvent&&n.originalEvent[e]||r&&r[e]||t;return i},onDomLoad:function(e){r(e)}},typeof n.init!="undefined"&&n.init()}(window),function(e,t){"use strict";var n=e.document,r=e.setTimeout||r,i=e.clearTimeout||i,s=e.setInterval||s,o=e.History=e.History||{};if(typeof o.initHtml4!="undefined")throw new Error("History.js HTML4 Support has already been loaded...");o.initHtml4=function(){if(typeof o.initHtml4.initialized!="undefined")return!1;o.initHtml4.initialized=!0,o.enabled=!0,o.savedHashes=[],o.isLastHash=function(e){var t=o.getHashByIndex(),n;return n=e===t,n},o.isHashEqual=function(e,t){return e=encodeURIComponent(e).replace(/%25/g,"%"),t=encodeURIComponent(t).replace(/%25/g,"%"),e===t},o.saveHash=function(e){return o.isLastHash(e)?!1:(o.savedHashes.push(e),!0)},o.getHashByIndex=function(e){var t=null;return typeof e=="undefined"?t=o.savedHashes[o.savedHashes.length-1]:e<0?t=o.savedHashes[o.savedHashes.length+e]:t=o.savedHashes[e],t},o.discardedHashes={},o.discardedStates={},o.discardState=function(e,t,n){var r=o.getHashByState(e),i;return i={discardedState:e,backState:n,forwardState:t},o.discardedStates[r]=i,!0},o.discardHash=function(e,t,n){var r={discardedHash:e,backState:n,forwardState:t};return o.discardedHashes[e]=r,!0},o.discardedState=function(e){var t=o.getHashByState(e),n;return n=o.discardedStates[t]||!1,n},o.discardedHash=function(e){var t=o.discardedHashes[e]||!1;return t},o.recycleState=function(e){var t=o.getHashByState(e);return o.discardedState(e)&&delete o.discardedStates[t],!0},o.emulated.hashChange&&(o.hashChangeInit=function(){o.checkerFunction=null;
2076var t="",r,i,u,a,f=Boolean(o.getHash());return o.isInternetExplorer()?(r="historyjs-iframe",i=n.createElement("iframe"),i.setAttribute("id",r),i.setAttribute("src","#"),i.style.display="none",n.body.appendChild(i),i.contentWindow.document.open(),i.contentWindow.document.close(),u="",a=!1,o.checkerFunction=function(){if(a)return!1;a=!0;var n=o.getHash(),r=o.getHash(i.contentWindow.document);return n!==t?(t=n,r!==n&&(u=r=n,i.contentWindow.document.open(),i.contentWindow.document.close(),i.contentWindow.document.location.hash=o.escapeHash(n)),o.Adapter.trigger(e,"hashchange")):r!==u&&(u=r,f&&r===""?o.back():o.setHash(r,!1)),a=!1,!0}):o.checkerFunction=function(){var n=o.getHash()||"";return n!==t&&(t=n,o.Adapter.trigger(e,"hashchange")),!0},o.intervalList.push(s(o.checkerFunction,o.options.hashChangeInterval)),!0},o.Adapter.onDomLoad(o.hashChangeInit)),o.emulated.pushState&&(o.onHashChange=function(t){var n=t&&t.newURL||o.getLocationHref(),r=o.getHashByUrl(n),i=null,s=null,u=null,a;return o.isLastHash(r)?(o.busy(!1),!1):(o.doubleCheckComplete(),o.saveHash(r),r&&o.isTraditionalAnchor(r)?(o.Adapter.trigger(e,"anchorchange"),o.busy(!1),!1):(i=o.extractState(o.getFullUrl(r||o.getLocationHref()),!0),o.isLastSavedState(i)?(o.busy(!1),!1):(s=o.getHashByState(i),a=o.discardedState(i),a?(o.getHashByIndex(-2)===o.getHashByState(a.forwardState)?o.back(!1):o.forward(!1),!1):(o.pushState(i.data,i.title,encodeURI(i.url),!1),!0))))},o.Adapter.bind(e,"hashchange",o.onHashChange),o.pushState=function(t,n,r,i){r=encodeURI(r).replace(/%25/g,"%");if(o.getHashByUrl(r))throw new Error("History.js does not support states with fragment-identifiers (hashes/anchors).");if(i!==!1&&o.busy())return o.pushQueue({scope:o,callback:o.pushState,args:arguments,queue:i}),!1;o.busy(!0);var s=o.createStateObject(t,n,r),u=o.getHashByState(s),a=o.getState(!1),f=o.getHashByState(a),l=o.getHash(),c=o.expectedStateId==s.id;return o.storeState(s),o.expectedStateId=s.id,o.recycleState(s),o.setTitle(s),u===f?(o.busy(!1),!1):(o.saveState(s),c||o.Adapter.trigger(e,"statechange"),!o.isHashEqual(u,l)&&!o.isHashEqual(u,o.getShortUrl(o.getLocationHref()))&&o.setHash(u,!1),o.busy(!1),!0)},o.replaceState=function(t,n,r,i){r=encodeURI(r).replace(/%25/g,"%");if(o.getHashByUrl(r))throw new Error("History.js does not support states with fragment-identifiers (hashes/anchors).");if(i!==!1&&o.busy())return o.pushQueue({scope:o,callback:o.replaceState,args:arguments,queue:i}),!1;o.busy(!0);var s=o.createStateObject(t,n,r),u=o.getHashByState(s),a=o.getState(!1),f=o.getHashByState(a),l=o.getStateByIndex(-2);return o.discardState(a,s,l),u===f?(o.storeState(s),o.expectedStateId=s.id,o.recycleState(s),o.setTitle(s),o.saveState(s),o.Adapter.trigger(e,"statechange"),o.busy(!1)):o.pushState(s.data,s.title,s.url,!1),!0}),o.emulated.pushState&&o.getHash()&&!o.emulated.hashChange&&o.Adapter.onDomLoad(function(){o.Adapter.trigger(e,"hashchange")})},typeof o.init!="undefined"&&o.init()}(window),function(e,t){"use strict";var n=e.console||t,r=e.document,i=e.navigator,s=!1,o=e.setTimeout,u=e.clearTimeout,a=e.setInterval,f=e.clearInterval,l=e.JSON,c=e.alert,h=e.History=e.History||{},p=e.history;try{s=e.sessionStorage,s.setItem("TEST","1"),s.removeItem("TEST")}catch(d){s=!1}l.stringify=l.stringify||l.encode,l.parse=l.parse||l.decode;if(typeof h.init!="undefined")throw new Error("History.js Core has already been loaded...");h.init=function(e){return typeof h.Adapter=="undefined"?!1:(typeof h.initCore!="undefined"&&h.initCore(),typeof h.initHtml4!="undefined"&&h.initHtml4(),!0)},h.initCore=function(d){if(typeof h.initCore.initialized!="undefined")return!1;h.initCore.initialized=!0,h.options=h.options||{},h.options.hashChangeInterval=h.options.hashChangeInterval||100,h.options.safariPollInterval=h.options.safariPollInterval||500,h.options.doubleCheckInterval=h.options.doubleCheckInterval||500,h.options.disableSuid=h.options.disableSuid||!1,h.options.storeInterval=h.options.storeInterval||1e3,h.options.busyDelay=h.options.busyDelay||250,h.options.debug=h.options.debug||!1,h.options.initialTitle=h.options.initialTitle||r.title,h.options.html4Mode=h.options.html4Mode||!1,h.options.delayInit=h.options.delayInit||!1,h.intervalList=[],h.
2076clearAllIntervals=function(){var e,t=h.intervalList;if(typeof t!="undefined"&&t!==null){for(e=0;e<t.length;e++)f(t[e]);h.intervalList=null}},h.debug=function(){(h.options.debug||!1)&&h.log.apply(h,arguments)},h.log=function(){var e=typeof n!="undefined"&&typeof n.log!="undefined"&&typeof n.log.apply!="undefined",t=r.getElementById("log"),i,s,o,u,a;e?(u=Array.prototype.slice.call(arguments),i=u.shift(),typeof n.debug!="undefined"?n.debug.apply(n,[i,u]):n.log.apply(n,[i,u])):i="\n"+arguments[0]+"\n";for(s=1,o=arguments.length;s<o;++s){a=arguments[s];if(typeof a=="object"&&typeof l!="undefined")try{a=l.stringify(a)}catch(f){}i+="\n"+a+"\n"}return t?(t.value+=i+"\n-----\n",t.scrollTop=t.scrollHeight-t.clientHeight):e||c(i),!0},h.getInternetExplorerMajorVersion=function(){var e=h.getInternetExplorerMajorVersion.cached=typeof h.getInternetExplorerMajorVersion.cached!="undefined"?h.getInternetExplorerMajorVersion.cached:function(){var e=3,t=r.createElement("div"),n=t.getElementsByTagName("i");while((t.innerHTML="<!--[if gt IE "+ ++e+"]><i></i><![endif]-->")&&n[0]);return e>4?e:!1}();return e},h.isInternetExplorer=function(){var e=h.isInternetExplorer.cached=typeof h.isInternetExplorer.cached!="undefined"?h.isInternetExplorer.cached:Boolean(h.getInternetExplorerMajorVersion());return e},h.options.html4Mode?h.emulated={pushState:!0,hashChange:!0}
2076:h.emulated={pushState:!Boolean(e.history&&e.history.pushState&&e.history.replaceState&&!/ Mobile\/([1-7][a-z]|(8([abcde]|f(1[0-8]))))/i.test(i.userAgent)&&!/AppleWebKit\/5([0-2]|3[0-2])/i.test(i.userAgent)),hashChange:Boolean(!("onhashchange"in e||"onhashchange"in r)||h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<8)},h.enabled=!h.emulated.pushState,h.bugs={setHash:Boolean(!h.emulated.pushState&&i.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(i.userAgent)),safariPoll:Boolean(!h.emulated.pushState&&i.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(i.userAgent)),ieDoubleCheck:Boolean(h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<8),hashEscape:Boolean(h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<7)},h.isEmptyObject=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},h.cloneObject=function(e){var t,n;return e?(t=l.stringify(e),n=l.parse(t)):n={},n},h.getRootUrl=function(){var e=r.location.protocol+"//"+(r.location.hostname||r.location.host);if(r.location.port||!1)e+=":"+r.location.port;return e+="/",e},h.getBaseHref=function(){var e=r.getElementsByTagName("base"),t=null,n="";return e.length===1&&(t=e[0],n=t.href.replace(/[^\/]+$/,"")),n=n.replace(/\/+$/,""),n&&(n+="/"),n},h.getBaseUrl=function(){var e=h.getBaseHref()||h.getBasePageUrl()||h.getRootUrl();return e},h.getPageUrl=function(){var e=h.getState(!1,!1),t=(e||{}).url||h.getLocationHref(),n;return n=t.replace(/\/+$/,"").replace(/[^\/]+$/,function(e,t,n){return/\./.test(e)?e:e+"/"}),n},h.getBasePageUrl=function(){var e=h.getLocationHref().replace(/[#\?].*/,"").replace(/[^\/]+$/,function(e,t,n){return/[^\/]$/.test(e)?"":e}).replace(/\/+$/,"")+"/";return e},h.getFullUrl=function(e,t){var n=e,r=e.substring(0,1);return t=typeof t=="undefined"?!0:t,/[a-z]+\:\/\//.test(e)||(r==="/"?n=h.getRootUrl()+e.replace(/^\/+/,""):r==="#"?n=h.getPageUrl().replace(/#.*/,"")+e:r==="?"?n=h.getPageUrl().replace(/[\?#].*/,"")+e:t?n=h.getBaseUrl()+e.replace(/^(\.\/)+/,""):n=h.getBasePageUrl()+e.replace(/^(\.\/)+/,"")),n.replace(/\#$/,"")},h.getShortUrl=function(e){var t=e,n=h.getBaseUrl(),r=h.getRootUrl();return h.emulated.pushState&&(t=t.replace(n,"")),t=t.replace(r,"/"),h.isTraditionalAnchor(t)&&(t="./"+t),t=t.replace(/^(\.\/)+/g,"./").replace(/\#$/,""),t},h.getLocationHref=function(e){return e=e||r,e.URL===e.location.href?e.location.href:e.location.href===decodeURIComponent(e.URL)?e.URL:e.location.hash&&decodeURIComponent(e.location.href.replace(/^[^#]+/,""))===e.location.hash?e.location.href:e.URL.indexOf("#")==-1&&e.location.href.indexOf("#")!=-1?e.location.href:e.URL||e.location.href},h.store={},h.idToState=h.idToState||{},h.stateToId=h.stateToId||{},h.urlToId=h.urlToId||{},h.storedStates=h.storedStates||[],h.savedStates=h.savedStates||[],h.normalizeStore=function(){h.store.idToState=h.store.idToState||{},h.store.urlToId=h.store.urlToId||{},h.store.stateToId=h.store.stateToId||{}},h.getState=function(e,t){typeof e=="undefined"&&(e=!0),typeof t=="undefined"&&(t=!0);var n=h.getLastSavedState();return!n&&t&&(n=h.createStateObject()),e&&(n=h.cloneObject(n),n.url=n.cleanUrl||n.url),n},h.getIdByState=function(e){var t=h.extractId(e.url),n;if(!t){n=h.getStateString(e);if(typeof h.stateToId[n]!="undefined")t=h.stateToId[n];else if(typeof h.store.stateToId[n]!="undefined")t=h.store.stateToId[n];else{for(;;){t=(new Date).getTime()+String(Math.random()).replace(/\D/g,"");if(typeof h.idToState[t]=="undefined"&&typeof h.store.idToState[t]=="undefined")break}h.stateToId[n]=t,h.idToState[t]=e}}return t},h.normalizeState=function(e){var t,n;if(!e||typeof e!="object")e={};if(typeof e.normalized!="undefined")return e;if(!e.data||typeof e.data!="object")e.data={};return t={},t.normalized=!0,t.title=e.title||"",t.url=h.getFullUrl(e.url?e.url:h.getLocationHref()),t.hash=h.getShortUrl(t.url),t.data=h.cloneObject(e.data),t.id=h.getIdByState(t),t.cleanUrl=t.url.replace(/\??\&_suid.*/,""),t.url=t.cleanUrl,n=!h.isEmptyObject(t.data),(t.title||n)&&h.options.disableSuid!==!0&&(t.hash=h.getShortUrl(t.url).replace(/\??\&_suid.*/,""),/\?/.test(t.hash)||(t.hash+="?"),t.hash+="&_suid="+t.id),t.hashedUrl=h.getFullUrl(t.hash),(h.emulated.pushState||h.bugs.safariPoll)&&h.hasUrlDuplicate(t)&&(t.url=t.hashedUrl),t},h.createStateObject=function(e,t,n){var r={data:e,title:t,url:n};return r=h.normalizeState(r),r},h.getStateById=function(e){e=String(e);var n=h.idToState[e]||h.store.idToState[e]||t;return n},h.getStateString=function(e){var t,n,r;return t=h.normalizeState(e),n={data:t.data,title:e.title,url:e.url},r=l.stringify(n),r},h.getStateId=function(e){var t,n;return t=h.normalizeState(e),n=t.id,n},h.getHashByState=function(e){var t,n;return t=h.normalizeState(e),n=t.hash,n},h.extractId=function(e){var t,n,r,i;return e.indexOf("#")!=-1?i=e.split("#")[0]:i=e,n=/(.*)\&_suid=([0-9]+)$/.exec(i),r=n?n[1]||e:e,t=n?String(n[2]||""):"",t||!1},h.isTraditionalAnchor=function(e){var t=!/[\/\?\.]/.test(e);return t},h.extractState=function(e,t){var n=null,r,i;return t=t||!1,r=h.extractId(e),r&&(n=h.getStateById(r)),n||(i=h.getFullUrl(e),r=h.getIdByUrl(i)||!1,r&&(n=h.getStateById(r)),!n&&t&&!h.isTraditionalAnchor(e)&&(n=h.createStateObject(null,null,i))),n},h.getIdByUrl=function(e){var n=h.urlToId[e]||h.store.urlToId[e]||t;return n},h.getLastSavedState=function(){return h.savedStates[h.savedStates.length-1]||t},h.getLastStoredState=function(){return h.storedStates[h.storedStates.length-1]||t},h.hasUrlDuplicate=function(e){var t=!1,n;return n=h.extractState(e.url),t=n&&n.id!==e.id,t},h.storeState=function(e){return h.urlToId[e.url]=e.id,h.storedStates.push(h.cloneObject(e)),e},h.isLastSavedState=function(e){var t=!1,n,r,i;return h.savedStates.length&&(n=e.id,r=h.getLastSavedState(),i=r.id,t=n===i),t},h.saveState=function(e){return h.isLastSavedState(e)?!1:(h.savedStates.push(h.cloneObject(e)),!0)},h.getStateByIndex=function(e){var t=null;return typeof e=="undefined"?t=h.savedStates[h.savedStates.length-1]:e<0?t=h.savedStates[h.savedStates.length+e]:t=h.savedStates[e],t},h.getCurrentIndex=function(){var e=null;return h.savedStates.length<1?e=0:e=h.savedStates.length-1,e},h.getHash=function(e){var t=h.getLocationHref(e),n;return n=h.getHashByUrl(t),n},h.unescapeHash=function(e){var t=h.normalizeHash(e);return t=decodeURIComponent(t),t},h.normalizeHash=function(e){var t=e.replace(/[^#]*#/,"").replace(/#.*/,"");return t},h.setHash=function(e,t){var n,i;return t!==!1&&h.busy()?(h.pushQueue({scope:h,callback:h.setHash,args:arguments,queue:t}),!1):(h.busy(!0),n=h.extractState(e,!0),n&&!h.emulated.pushState?h.pushState(n.data,n.title,n.url,!1):h.getHash()!==e&&(h.bugs.setHash?(i=h.getPageUrl(),h.pushState(null,null,i+"#"+e,!1)):r.location.hash=e),h)},h.escapeHash=function(t){var n=h.normalizeHash(t);return n=e.encodeURIComponent(n),h.bugs.hashEscape||(n=n.replace(/\%21/g,"!").replace(/\%26/g,"&").replace(/\%3D/g,"=").replace(/\%3F/g,"?")),n},h.getHashByUrl=function(e){var t=String(e).replace(/([^#]*)#?([^#]*)#?(.*)/,"$2");return t=h.unescapeHash(t),t},h.setTitle=function(e){var t=e.title,n;t||(n=h.getStateByIndex(0),n&&n.url===e.url&&(t=n.title||h.options.initialTitle));try{r.getElementsByTagName("title")[0].innerHTML=t.replace("<","&lt;").replace(">","&gt;").replace(" & "," &amp; ")}catch(i){}return r.title=t,h},h.queues=[],h.busy=function(e){typeof e!="undefined"?h.busy.flag=e:typeof h.busy.flag=="undefined"&&(h.busy.flag=!1);if(!h.busy.flag){u(h.busy.timeout);var t=function(){var e,n,r;if(h.busy.flag)return;for(e=h.queues.length-1;e>=0;--e){n=h.queues[e];if(n.length===0)continue;r=n.shift(),h.fireQueueItem(r),h.busy.timeout=o(t,h.options.busyDelay)}};h.busy.timeout=o(t,h.options.busyDelay)}return h.busy.flag},h.busy.flag=!1,h.fireQueueItem=function(e){return e.callback.apply(e.scope||h,e.args||[])},h.pushQueue=function(e){return h.queues[e.queue||0]=h.queues[e.queue||0]||[],h.queues[e.queue||0].push(e),h},h.queue=function(e,t){return typeof e=="function"&&(e={callback:e}),typeof t!="undefined"&&(e.queue=t),h.busy()?h.pushQueue(e):h.fireQueueItem(e),h},h.clearQueue=function(){return h.busy.flag=!1,h.queues=[],h},h.stateChanged=!1,h.doubleChecker=!1,h.doubleCheckComplete=function(){return h.stateChanged=!0,h.doubleCheckClear(),h},h.doubleCheckClear=function(){return h.doubleChecker&&(u(h.doubleChecker),h.doubleChecker=!1),h},h.doubleCheck=function(e){return h.stateChanged=!1,h.doubleCheckClear(),h.bugs.ieDoubleCheck&&(h.doubleChecker=o(function(){return h.doubleCheckClear(),h.stateChanged||e(),!0},h.options.doubleCheckInterval)),h},h.safariStatePoll=function(){var t=h.extractState(h.getLocationHref()),n;if(!h.isLastSavedState(t))return n=t,n||(n=h.createStateObject()),h.Adapter.trigger(e,"popstate"),h;return},h.back=function(e){return e!==!1&&h.busy()?(h.pushQueue({scope:h,callback:h.back,args:arguments,queue:e}),!1):(h.busy(!0),h.doubleCheck(function(){h.back(!1)}),p.go(-1),!0)},h.forward=function(e){return e!==!1&&h.busy()?(h.pushQueue({scope:h,callback:h.forward,args:arguments,queue:e}),!1):(h.busy(!0),h.doubleCheck(function(){h.forward(!1)}),p.go(1),!0)},h.go=function(e,t){var n;if(e>0)for(n=1;n<=e;++n)h.forward(t);else{if(!(e<0))throw new Error("History.go: History.go requires a positive or negative integer passed.");for(n=-1;n>=e;--n)h.back(t)}return h};if(h.emulated.pushState){var v=function(){};h.pushState=h.pushState||v,h.replaceState=h.replaceState||v}else h.onPopState=function(t,n){var r=!1,i=!1,s,o;return h.doubleCheckComplete(),s=h.getHash(),s?(o=h.extractState(s||h.getLocationHref(),!0),o?h.replaceState(o.data,o.title,o.url,!1):(h.Adapter.trigger(e,"anchorchange"),h.busy(!1)),h.expectedStateId=!1,!1):(r=h.Adapter.extractEventData("state",t,n)||!1,r?i=h.getStateById(r):h.expectedStateId?i=h.getStateById(h.expectedStateId):i=h.extractState(h.getLocationHref()),i||(i=h.createStateObject(null,null,h.getL
2076ocationHref())),h.expectedStateId=!1,h.isLastSavedState(i)?(h.busy(!1),!1):(h.storeState(i),h.saveState(i),h.setTitle(i),h.Adapter.trigger(e,"statechange"),h.busy(!1),!0))},h.Adapter.bind(e,"popstate",h.onPopState),h.pushState=function(t,n,r,i){if(h.getHashByUrl(r)&&h.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(i!==!1&&h.busy())return h.pushQueue({scope:h,callback:h.pushState,args:arguments,queue:i}),!1;h.busy(!0);var s=h.createStateObject(t,n,r);return h.isLastSavedState(s)?h.busy(!1):(h.storeState(s),h.expectedStateId=s.id,p.pushState(s.id,s.title,s.url),h.Adapter.trigger(e,"popstate")),!0},h.replaceState=function(t,n,r,i){if(h.getHashByUrl(r)&&h.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(i!==!1&&h.busy())return h.pushQueue({scope:h,callback:h.replaceState,args:arguments,queue:i}),!1;h.busy(!0);var s=h.createStateObject(t,n,r);return h.isLastSavedState(s)?h.busy(!1):(h.storeState(s),h.expectedStateId=s.id,p.replaceState(s.id,s.title,s.url),h.Adapter.trigger(e,"popstate")),!0};if(s){try{h.store=l.parse(s.getItem("History.store"))||{}}catch(m){h.store={}}h.normalizeStore()}else h.store={},h.normalizeStore();h.Adapter.bind(e,"unload",h.clearAllIntervals),h.saveState(h.storeState(h.extractState(h.getLocationHref(),!0))),s&&(h.onUnload=function(){var e,t,n;try{e=l.parse(s.getItem("History.store"))||{}}catch(r){e={}}e.idToState=e.idToState||{},e.urlToId=e.urlToId||{},e.stateToId=e.stateToId||{};for(t in h.idToState){if(!h.idToState.hasOwnProperty(t))continue;e.idToState[t]=h.idToState[t]}for(t in h.urlToId){if(!h.urlToId.hasOwnProperty(t))continue;e.urlToId[t]=h.urlToId[t]}for(t in h.stateToId){if(!h.stateToId.hasOwnProperty(t))continue;e.stateToId[t]=h.stateToId[t]}h.store=e,h.normalizeStore(),n=l.stringify(e);try{s.setItem("History.store",n)}catch(i){if(i.code!==DOMException.QUOTA_EXCEEDED_ERR)throw i;s.length&&(s.removeItem("History.store"),s.setItem("History.store",n))}},h.intervalList.push(a(h.onUnload,h.options.storeInterval)),h.Adapter.bind(e,"beforeunload",h.onUnload),h.Adapter.bind(e,"unload",h.onUnload));if(!h.emulated.pushState){h.bugs.safariPoll&&h.intervalList.push(a(h.safariStatePoll,h.options.safariPollInterval));if(i.vendor==="Apple Computer, Inc."||(i.appCodeName||"")==="Mozilla")h.Adapter.bind(e,"hashchange",function(){h.Adapter.trigger(e,"popstate")}),h.getHash()&&h.Adapter.onDomLoad(function(){h.Adapter.trigger(e,"hashchange")})}},(!h.options||!h.options.delayInit)&&h.init()}(window);
2077(function( $ )
2078{
2079function setQuizCookie( quiz_id, item_id, value, correct, pathValue )
2080{
2081$.cookie.json = true;
2082try
2083{
2084var cookieValues = $.cookie( 'csm_quiz' ) || {};
2085}
2086catch( err )
2087{
2088var cookieValues = {};
2089}
2090if( !( quiz_id in cookieValues ) )
2091{
2092cookieValues[ quiz_id ] = {};
2093}
2094cookieValues[ quiz_id ][ item_id ] = value + '-' + correct;
2095$.cookie( 'csm_quiz', cookieValues, { path: pathValue } );
2096}
2097function getQuizCookie( quiz_id )
2098{
2099var returnObj = new Object();
2100$.cookie.json = true;
2101try
2102{
2103var cookieValues = $.cookie( 'csm_quiz' ) || {};
2104}
2105catch( err )
2106{
2107var cookieValues = {};
2108}
2109if( quiz_id in cookieValues )
2110{
2111$.each( cookieValues[ quiz_id ], function( item_id, valueString )
2112{
2113var valueParts = valueString.split( '-' );
2114returnObj[ item_id ] = { 'value' : valueParts[ 0 ], 'correct' : valueParts[ 1 ] };
2115});
2116}
2117return returnObj;
2118}
2119function getQuizCookiePage( quiz_id, item_id )
2120{
2121var returnVal = null;
2122var quizValues = getQuizCookie( quiz_id );
2123if( item_id in quizValues )
2124{
2125returnVal = quizValues[ item_id ][ 'value' ];
2126}
2127return returnVal;
2128}
2129function getQuizCookiePageCorrect( quiz_id, item_id )
2130{
2131var returnVal = null;
2132var quizValues = getQuizCookie( quiz_id );
2133$.each( quizValues, function( key )
2134{
2135if( key == item_id )
2136{
2137returnVal = this[ 'correct' ];
2138}
2139});
2140return returnVal;
2141}
2142function getQuizCookieTotalCorrect( quiz_id )
2143{
2144var returnVal = 0;
2145var quizValues = getQuizCookie( quiz_id );
2146$.each( quizValues, function( key )
2147{
2148if( this[ 'correct' ] == 1 )
2149{
2150returnVal++;
2151}
2152});
2153return returnVal;
2154}
2155var methods =
2156{
2157currentIndex     : 0,
2158initialLoad      : true,
2159lastNavTimestamp : 0,
2160init : function( options )
2161{
2162var defaults =
2163{
2164base_url                  : '',
2165node_view_gui_service_url : '',
2166animation_gif             : '',
2167contact_staff_service_url : '',
2168quiz_name                 : ''
2169};
2170methods.options = $.extend( defaults, options );
2171methods.item_count = methods.options.items.length - 1;
2172methods.element = $( '#quiz-content' );
2173if( Modernizr.cookies )
2174{
2175methods._init();
2176}
2177else
2178{
2179$( 'footer.nojs' )
2180.html( 'This quiz temporarily stores your answers in the browser. If you would like us to keep track of your answers for the results page, please enable local data/cookies.' )
2181.css( 'display', 'block' );
2182}
2183},
2184_init : function()
2185{
2186methods.currentIndex = methods.options.current_index;
2187History.Adapter.bind( window, 'statechange', function()
2188{
2189var state = History.getState();
2190methods.currentIndex = state.data.index;
2191if( state.data && !methods.initialLoad )
2192{
2193methods.element
2194.html( state.data.content )
2195.foundation();
2196if( methods.currentIndex < methods.item_count )
2197{
2198methods._renderItem();
2199}
2200else
2201{
2202methods._renderResults();
2203}
2204methods.submitToOmniture();
2205}
2206});
2207var result = History.replaceState(
2208{
2209index : methods.currentIndex,
2210content : methods.element.html(),
2211},
2212methods.options.items[ methods.currentIndex ].name,
2213methods.options.base_url +
2214'/' +
2215methods.options.items[ methods.currentIndex ].url_part +
2216window.location.search
2217);
2218methods._renderItem();
2219methods.submitToOmniture();
2220methods.initialLoad = false;
2221},
2222_load : function()
2223{
2224$( '#quiz-answers').append( '<img src="'+ methods.options.animation_gif +'" alt="Loading..." />' );
2225try
2226{
2227var nextItem = methods.options.items[ methods.currentIndex + 1 ];
2228var test = nextItem.node_id; // through exception
2229}
2230catch( err )
2231{
2232console.log( methods );
2233}
2234var params =
2235{
2236node_id : nextItem.node_id,
2237view    : 'ajax'
2238};
2239$.ajax(
2240{
2241url     : methods.options.node_view_gui_service_url,
2242data    : params,
2243success : function( data )
2244{
2245methods.currentIndex++;
2246History.pushState(
2247{
2248index : methods.currentIndex,
2249content : methods._cleanData( data )
2250},
2251nextItem.name,
2252methods.options.base_url + '/' + nextItem.url_part
2253);
2254},
2255datatype : 'html'
2256});
2257},
2258_renderItemResult : function()
2259{
2260$( 'table.ui-answers' ).addClass( 'show-results' );
2261var userSelection = methods.element.find( 'input[name="answer"]:checked' );
2262var user_td = userSelection.parent().siblings( '.ui-result-col' );
2263var userWasRight = userSelection.attr( 'rel' ) == '1';
2264if( userWasRight )
2265{
2266userSelection.closest( 'tr' ).addClass( 'correct' );
2267}
2268else
2269{
2270userSelection.closest( 'tr' ).addClass( 'incorrect' );
2271var correct_answer = methods.element.find( 'input[rel="1"]' );
2272correct_answer.closest( 'tr' ).addClass( 'correct' );
2273}
2274methods.updateProgressBar();
2275var feedbackText = userSelection.closest( 'tr' ).attr( 'data-feedback' );
2276if( feedbackText )
2277{
2278$( '#answer-feedback' ).find( 'p' ).html( feedbackText );
2279}
2280if( userWasRight )
2281{
2282$( '#answer-feedback' ).addClass( 'correct' );
2283$( '#answer-feedback .feedback_heading h3' ).text( 'Correct' );
2284}
2285else
2286{
2287$( '#answer-feedback' ).addClass( 'incorrect' );
2288$( '#answer-feedback .feedback_heading h3' ).text( 'Incorrect' );
2289}
2290$( '#main-media .slick-slider' ).slick( 'slickNext' );
2291$('html, body').animate(
2292{
2293'scrollTop':   $( '#question-feedback-scroll-target' ).offset().top
2294},
2295500
2296);
2297},
2298_renderItem : function()
2299{
2300methods.updateProgressBar();
2301$( '.quiz-slick-slider' ).slick(
2302{
2303infinite: false,
2304lazyLoad: 'ondemand',
2305dots: false,
2306arrows: false,
2307swipe: false,
2308accessibility: false,
2309} );
2310methods.element.find( '.next-question' ).click( function()
2311{
2312methods._load();
2313} );
2314methods.element.find( '.ui-answers tr' ).click( function(e)
2315{
2316if( !methods.element.find( '.ui-answers' ).hasClass( 'show-results' ) )
2317{
2318$( this ).addClass( 'selected' );
2319var input = $( this ).find( 'input[name="answer"]' );
2320input.prop( 'checked', true );
2321setQuizCookie(
2322methods.options.quiz_id,
2323methods.options.items[ methods.currentIndex ].node_id, input.val(),
2324input.attr( 'rel' ),
2325methods.options.base_url
2326);
2327methods.renderQuestionResult();
2328}
2329});
2330$( '#main-media .slick-slider' ).slick( 'slickSetOption', 'swipe', false );
2331},
2332_renderResults : function()
2333{
2334var total_questions = methods.item_count;
2335var user_selections = getQuizCookie( methods.options.quiz_id );
2336var question_node_id = 0;
2337if( user_selections )
2338{
2339var user_answers_td = $( '.user-answers' );
2340if( navigator.appName.indexOf("Internet Explorer") !== -1 && navigator.appVersion.search(/MSIE (7|8)/) !== -1)
2341{
2342$( '.user-feedback' ).css( 'display', 'block' );
2343}
2344else
2345{
2346$( '.user-feedback' ).css( 'display', 'table-cell' );
2347}
2348$.each( user_answers_td, function( question_index )
2349{
2350question_node_id = $( this ).parent().attr( 'data-node-id' );
2351$( this ).find( 'p' ).each( function( answer_index )
2352{
2353if( user_selections[ question_node_id ] && user_selections[ question_node_id ][ 'value' ] == answer_index )
2354{
2355$( this ).removeClass( 'hide' );
2356if( $( this ).hasClass( 'correct' ) )
2357{
2358$( this ).parent().addClass( 'correct' );
2359}
2360else
2361{
2362$( this ).parent().addClass( 'incorrect' );
2363}
2364}
2365});
2366});
2367$.each( $( '.answer-icon i' ), function(e)
2368{
2369question_node_id = $( this ).parent().parent().attr( 'data-node-id' );
2370if( getQuizCookiePageCorrect( methods.options.quiz_id, question_node_id ) == 1 )
2371{
2372$( this ).addClass( 'icon-checkmark' );
2373}
2374else
2375{
2376$( this ).addClass( 'icon-close' );
2377}
2378});
2379var total_correct = getQuizCookieTotalCorrect( methods.options.quiz_id );
2380var total_incorrect = total_questions - total_correct;
2381var score_per_cent  = Math.round( total_correct / total_questions * 100 );
2382$( '.total-correct-value' ).html( total_correct );
2383$( '.total-incorrect-value' ).html( total_incorrect );
2384$( '.total-per-cent' ).html( score_per_cent + '%' );
2385}
2386$( '#share-tools-share-result' ).find( 'ul' ).attr(
2387'data-text',
2388'I scored '+ score_per_cent +' percent on this quiz. Can you beat my score?'
2389);
2390$( '.share-tools' ).shareTools();
2391},
2392_cleanData : function( data )
2393{
2394return data.replace( /\<div id="debug"[\s\S]*div\>/i, '' );
2395},
2396submitToOmniture : function()
2397{
2398if ( window.csmJs.util.haveConsent( 'PERFORMANCE'))
2399{
2400csmJs.omniture.submit();
2401if(
2402typeof s != 'undefined' &&
2403typeof s.getActionDepth !== 'undefined'
2404)
2405{
2406s.getActionDepth('s_depth')
2407}
2408if( typeof _gaq != 'undefined' )
2409{
2410_gaq.push(['_trackPageview', window.location.href ]);
2411}
2412if( typeof ezt != 'undefined' )
2413{
2414ezt.push({
2415qacct: "p-44NYiIzL-i6wg",
2416event: "refresh"
2417});
2418}
2419}
2420},
2421renderQuestionResult : function()
2422{
2423if( !methods.element.find( '.ui-answers' ).hasClass( 'show-results' ) )
2424{
2425methods._renderItemResult();
2426methods.submitToOmniture();
2427}
2428$( 'body' ).trigger( 'csm:reloadAds', [ [ 'dfp-responsive-ad-footer' ] ] );
2429},
2430updateProgressBar : function()
2431{
2432var progress_percent = Math.round( ( ( methods.currentIndex + 1 ) / methods.item_count ) * 100 );
2433$( '.progress-meter' ).css( 'width', progress_percent + '%' );
2434$( '.progress_label' ).text( progress_percent + '% Complete');
2435},
2436destroy : function()
2437{
2438}
2439};
2440$.fn.quiz = function( method )
2441{
2442if ( methods[method] )
2443{
2444return methods[ method ].apply( this, Array.prototype.slice.call( arguments, 1 ));
2445}
2446else if ( typeof method === 'object' || ! method )
2447{
2448return methods.init.apply( this, arguments );
2449}
2450else
2451{
2452$.error( 'Method ' +  method + ' does not exist on quiz' );
2453}
2454};
2455}( jQuery ) );
2456;(function ( $, window, document, undefined )
2457{
2458var pluginName = 'header',
2459pluginElement = null,
2460defaults =
2461{
2462triggerPoint: 600,
2463showScrolledDownBar: null,
2464};
2465function Plugin( element, options )
2466{
2467pluginElement = element;
2468this.element = element;
2469this.options = $.extend( {}, defaults, options) ;
2470this._defaults = defaults;
2471this._name = pluginName;
2472var self = this;
2473this.init();
2474}
2475Plugin.prototype =
2476{
2477ezwtHeight: 0,
2478init : function()
2479{
2480var self = this;
2481if( $('.ezc-frontpage').length )
2482{
2483self.options.triggerPoint = 350;
2484}
2485if(
2486$( 'header' ).is( ':visible' ) &&
2487!$( '.ezlayout-print' ).length
2488)
2489{
2490if( $( '#toolbar' ).length )
2491{
2492self.ezwtHeight = $( '#toolbar' ).outerHeight();
2493}
2494if(
2495$('body').hasClass( 'ezc-csm_article' ) ||
2496$('body').hasClass( 'ezc-csm_blog_post' ) ||
2497$('body').hasClass( 'ezc-csm_movie_review' ) ||
2498$('body').hasClass( 'ezc-csm_book_review' ) ||
2499$('body').hasClass( 'ezc-csm_podcast' ) ||
2500$('body').hasClass( 'ezc-csm_podcast_season' ) ||
2501$('body').hasClass( 'ezc-graphic' ) ||
2502$('body').hasClass( 'ddp' )
2503)
2504{
2505}
2506self.initEvents();
2507self.initMenu();
2508}
2509},
2510initEvents : function()
2511{
2512var self = this;
2513function toggleScrolledDown( e )
2514{
2515var scroll = $( window ).scrollTop();
2516if( scroll >= self.options.triggerPoint + 50 )
2517{
2518if( !$( self.element ).hasClass( 'scrolled-down' ) )
2519{
2520$( 'body' ).trigger( 'csm:scrolledDown', true );
2521$( self.element ).addClass( 'scrolled-down' );
2522}
2523}
2524else if( scroll <= self.options.triggerPoint - 50 )
2525{
2526if( $( self.element ).hasClass( 'scrolled-down' ) )
2527{
2528$( 'body' ).trigger( 'csm:scrolledUp', true );
2529$( self.element ).removeClass( 'scrolled-down' );
2530}
2531}
2532};
2533$(window).scroll( toggleScrolledDown.debounce( 150 ) );
2534$( '.select_links' ).on( 'change', function(e)
2535{
2536if( $(this).val() )
2537{
2538window.location = $(this).val();
2539}
2540});
2541},
2542initMenu : function()
2543{
2544var self = this;
2545function closeMenus()
2546{
2547$( '#nav-overlay' ).addClass( 'stash' );
2548$( '.right-popup, #main-menu-nav' ).addClass( 'stash' );
2549$( window ).off( 'scroll.navigation  resize.navigation' );
2550}
2551function openMenu( menuSelector )
2552{
2553$( '.right-popup, #main-menu-nav' ).addClass( 'stash' );
2554$( menuSelector ).removeClass( 'stash' );
2555$( '#nav-overlay' ).removeClass( 'stash' );
2556self.navOverlayPosition();
2557var scrollTimer = null;
2558$( window ).on( 'scroll.navigation resize.navigation', function()
2559{
2560if( scrollTimer )
2561{
2562clearTimeout( scrollTimer );
2563}
2564scrollTimer = setTimeout(
2565function()
2566{
2567self.navOverlayPosition();
2568},
256910
2570);
2571});
2572}
2573$( '.main-menu-btn' ).click( function()
2574{
2575if( $( '#main-menu-nav' ).hasClass( 'stash' ) )
2576{
2577openMenu( '#main-menu-nav' );
2578$('#main-menu-nav .get-focus a').eq(0).focus();
2579}
2580else
2581{
2582closeMenus();
2583}
2584return false;
2585});
2586$( '#skip-to-main-menu' ).click( function(e)
2587{
2588e.preventDefault;
2589openMenu( '#main-menu-nav' );
2590$('#main-menu-nav .get-focus a').eq(0).focus();
2591});
2592$( '#skip-to-search' ).click( function(e)
2593{
2594e.preventDefault;
2595openMenu( '#main-menu-nav' );
2596$('#main-menu-search').focus();
2597});
2598if( $( 'a.skip-to-main-content' ).length )
2599{
2600$( '#main-content' ).remove();
2601$( 'a.skip-to-main-content' ).eq(0).attr( 'id', 'main-content' );
2602}
2603$( '.right-popup-trigger' ).click( function()
2604{
2605if( $( '.right-popup' ).hasClass( 'stash' ) )
2606{
2607openMenu( '.right-popup' );
2608$('.right-popup a').eq(0).focus();
2609}
2610else
2611{
2612closeMenus();
2613}
2614return false;
2615});
2616$( '#nav-overlay' ).click( function( e )
2617{
2618if( !$(e.target).closest( '#main-menu-nav, .right-popup' ).length )
2619{
2620closeMenus();
2621}
2622});
2623$( document ).on( 'keyup.navigation', function(e)
2624{
2625if( e.keyCode == 27 )
2626{
2627closeMenus();
2628}
2629});
2630$( '#main-menu-nav' ).burgermenu();
2631},
2632navOverlayPosition : function()
2633{
2634var self = this;
2635if( $( 'header' ).isInViewport() )
2636{
2637if( $( 'header' ).css( 'position' ) == 'absolute' )
2638{
2639var topValue = ( self.ezwtHeight + $( 'header' ).outerHeight() - $(window).scrollTop() );
2640}
2641else
2642{
2643var topValue = self.ezwtHeight + $( 'header' ).outerHeight();
2644}
2645$( '#nav-overlay' ).css( 'top', topValue + 'px' );
2646}
2647else
2648{
2649$( '#nav-overlay' ).css( 'top', self.ezwtHeight );
2650}
2651},
2652};
2653$.fn[pluginName] = function ( options ) {
2654var args = arguments;
2655if (options === undefined || typeof options === 'object') {
2656return this.each(function ()
2657{
2658if (!$.data(this, 'plugin_' + pluginName)) {
2659$.data(this, 'plugin_' + pluginName, new Plugin( this, options ));
2660}
2661});
2662} else if (typeof options === 'string' && options[0] !== '_' && options !== 'init') {
2663var returns;
2664this.each(function () {
2665var instance = $.data(this, 'plugin_' + pluginName);
2666if (instance instanceof Plugin && typeof instance[options] === 'function') {
2667returns = instance[options].apply( instance, Array.prototype.slice.call( args, 1 ) );
2668}
2669if (options === 'destroy') {
2670$.data(this, 'plugin_' + pluginName, null);
2671}
2672});
2673return returns !== undefined ? returns : this;
2674}
2675};
2676$.fn.isInViewport = function() {
2677var elementTop = $(this).offset().top;
2678var elementBottom = elementTop + $(this).outerHeight();
2679var viewportTop = $(window).scrollTop();
2680var viewportBottom = viewportTop + $(window).outerHeight();
2681return elementBottom > viewportTop && elementTop < viewportBottom;
2682};
2683}(jQuery, window, document));
2684;(function ( $, window, document, undefined )
2685{
2686var pluginName = 'burgermenu',
2687pluginElement = null,
2688defaults =
2689{
2690};
2691function Plugin( element, options )
2692{
2693pluginElement = element;
2694this.element = element;
2695this.options = $.extend( {}, defaults, options) ;
2696this._defaults = defaults;
2697this._name = pluginName;
2698var self = this;
2699this.init();
2700}
2701Plugin.prototype =
2702{
2703init : function()
2704{
2705var self = this;
2706$( self.element ).find( '.level1' ).click( function()
2707{
2708var isContainer = $(this).parent().find( '.level2' ).length > 0;
2709if( isContainer )
2710{
2711self.openSubMenu( $(this) );
2712}
2713else
2714{
2715location.href = $(this).find( 'a' ).attr( 'href' );
2716}
2717return false;
2718});
2719if ( !$(".ezc-frontpage.ezp-r-standard")[0] )
2720{
2721self.highlight();
2722}
2723},
2724highlight : function()
2725{
2726var self = this;
2727var categoryUrl = false;
2728try
2729{
2730var currentUrl = csmJs.getMicroData().mainEntityOfPage[ '@id' ];
2731}
2732catch( err )
2733{
2734currentUrl = window.location.href;
2735}
2736try
2737{
2738var expression = /csmonitor\.com([^\d]*)\//;
2739categoryUrl = expression.exec( currentUrl )[1];
2740}
2741catch( err )
2742{
2743console.log( 'Error in regex: ' + err.message );
2744}
2745if( categoryUrl )
2746{
2747var parts = categoryUrl.split( '/' );
2748var testCat = '';
2749var match = '';
2750var selected = false;
2751parts.forEach( function( part, index )
2752{
2753if( index > 0 )
2754{
2755testCat = parts.slice(0, index + 1 ).join( '/' );
2756match = $( '#main-menu-nav a[href="'+ testCat +'"]' );
2757if( match.length )
2758{
2759selected = match;
2760}
2761}
2762});
2763if( selected.length )
2764{
2765$.each( selected, function()
2766{
2767if( !$(this).parent().hasClass( 'highlight' ) )
2768{
2769$(this).parent().addClass( 'selected' );
2770self.openSubMenu( $(this).parent().parent().find( '.level1' ) );
2771}
2772});
2773}
2774}
2775},
2776openSubMenu : function( $element )
2777{
2778var isContainer = $element.parent().find( '.level2' ).length > 0;
2779if( isContainer )
2780{
2781$element.parent().toggleClass( 'closed' );
2782$element.find( 'i' ).toggleClass( 'icon-chevron-up' );
2783}
2784},
2785};
2786$.fn[pluginName] = function ( options ) {
2787var args = arguments;
2788if (options === undefined || typeof options === 'object') {
2789return this.each(function ()
2790{
2791if (!$.data(this, 'plugin_' + pluginName)) {
2792$.data(this, 'plugin_' + pluginName, new Plugin( this, options ));
2793}
2794});
2795} else if (typeof options === 'string' && options[0] !== '_' && options !== 'init') {
2796var returns;
2797this.each(function () {
2798var instance = $.data(this, 'plugin_' + pluginName);
2799if (instance instanceof Plugin && typeof instance[options] === 'function') {
2800returns = instance[options].apply( instance, Array.prototype.slice.call( args, 1 ) );
2801}
2802if (options === 'destroy') {
2803$.data(this, 'plugin_' + pluginName, null);
2804}
2805});
2806return returns !== undefined ? returns : this;
2807}
2808};
2809}(jQuery, window, document));
2810;(function ( $, window, document, undefined )
2811{
2812var
2813pluginName = 'shareTools',
2814pluginObject = null,
2815defaults = {};
2816function Plugin( element, options )
2817{
2818this.element = element;
2819this.options = $.extend( {}, defaults, options) ;
2820this._defaults = defaults;
2821this._name = pluginName;
2822this.subNavOpen = false;
2823pluginObject = this;
2824this.init();
2825}
2826Plugin.prototype =
2827{
2828data : false,
2829init : function()
2830{
2831var self = this;
2832this.data = this.readData();
2833$( self.element ).find( '.share-facebook' ).click( function()
2834{
2835var monitorFacebookAppId = '179793002061452';
2836var campaignId = 'shared-facebook';
2837var href = self.addCampaignId( self.data.link, campaignId );
2838if (typeof FB === 'object')
2839{
2840FB.ui(
2841{
2842app_id: monitorFacebookAppId,
2843method: 'share',
2844display: 'popup',
2845href: href
2846},
2847function( response )
2848{
2849if( typeof response != 'undefined' )
2850{
2851self.fireAdobeAnalyticsPixel( 'facebook' );
2852}
2853}
2854);
2855}
2856else // Facebook library not loaded
2857{
2858var url = 'https://www.facebook.com/sharer.php?u=' + encodeURIComponent( href );
2859window.open( url, 'Share via Facebook', self.getPopupConfig() );
2860self.fireAdobeAnalyticsPixel( 'facebook' );
2861}
2862return false;
2863});
2864$( self.element ).find( '.share-twitter, .share-x' ).click( function()
2865{
2866var urlText = '';
2867var campaignId = 'shared-twitter';
2868var link = self.addCampaignId( self.data.link, campaignId );
2869if( self.data.text )
2870{
2871urlText = encodeURIComponent( ' - ' + self.data.text );
2872}
2873var url =
2874'https://twitter.com/intent/tweet?text=' +
2875encodeURIComponent( self.data.headline ) +
2876urlText +
2877' via @csmonitor' +
2878'&url=' +
2879encodeURIComponent( link );
2880window.open( url, 'Share via Twitter', self.getPopupConfig() );
2881self.fireAdobeAnalyticsPixel( 'twitter' );
2882});
2883$( self.element ).find( '.share-email' ).click( function()
2884{
2885var campaignId = "shared-email";
2886self.data = self.getShareMetadata();
2887var timerId = window.setTimeout(
2888function()
2889{
2890if (document.hasFocus() )
2891{
2892self.showFallbackModal(self);
2893}
2894},
28951500
2896);
2897self.shareByEmail(
2898self.data.subject,
2899self.data.leadIn,
2900self.data.headline,
2901self.addCampaignId( self.data.link, campaignId )
2902);
2903self.fireAdobeAnalyticsPixel( 'email' );
2904});
2905$( self.element ).find('.copy-link').click( function(){
2906self.data = self.getShareMetadata();
2907var addQueryParameterOperator = '&';
2908console.log(self.data.link.split("?").length);
2909if (self.data.link.split("?").length == 1){
2910addQueryParameterOperator = '/?';
2911}
2912var copyLinkURL = self.data.link + addQueryParameterOperator + 'src=shared';
2913self.copyToClipboard(copyLinkURL);
2914$(this).removeClass('init');
2915$(this).addClass('copied');
2916$(this).removeClass('ready');
2917setTimeout(() => {
2918$(this).removeClass('copied');
2919$(this).addClass('ready');
2920}, 3000);
2921});
2922},
2923getPopupConfig : function()
2924{
2925var parentWindowWidth = document.documentElement.clientWidth;
2926var parentWindowHeight = document.documentElement.clientHeight;
2927var w = parentWindowWidth;
2928var h = 650;
2929var left = ( parentWindowWidth / 2 ) - 300;
2930var t = ( parentWindowHeight / 2 ) - 200;
2931if( parentWindowWidth > 1024 ) {
2932w = 850;
2933h = 520;
2934} else if ( parentWindowWidth > 640 ) {
2935w = 600;
2936h = 500;
2937};
2938return 'left=' + left +
2939',top=' + t +
2940',height=' + h +
2941',width=' + w +
2942',location=no,menubar=no,scrollbars=no,toolbar=no';
2943},
2944readData : function( forceRefresh )
2945{
2946var metadata;
2947if( !this.data || forceRefresh )
2948{
2949metadata = this.getShareMetadata();
2950}
2951else
2952{
2953metadata = this.data;
2954}
2955return metadata;
2956},
2957getShareMetadata : function()
2958{
2959var self = this;
2960var metaData = {};
2961var pageType = getBodyType();
2962metaData.caption = 'The Christian Science Monitor';
2963metaData.headline = getShareHeadline();
2964metaData.byline = getShareByline();
2965metaData.text = getShareText();
2966metaData.description = metaData.text;
2967metaData.link = getShareUrl();
2968metaData.image = getShareImg();
2969metaData.subject = getSubject();
2970metaData.leadIn = getLeadIn();
2971function getBodyType()
2972{
2973var bodyType;
2974if ( $( 'body' ).is( '.ddp' ) )
2975{
2976bodyType = 'ddp';
2977}
2978else if ( $( 'body' ).is( '.ezc-csm_gallery' ) )
2979{
2980bodyType = 'gallery';
2981}
2982else if ( $( 'body' ).is( '.ezp-quiz, .ezc-csm_quiz_item' ) )
2983{
2984bodyType = 'quiz';
2985}
2986else {
2987bodyType = 'article';
2988}
2989return bodyType;
2990}
2991function getShareHeadline()
2992{
2993var headline;
2994if ($(self.element).attr('data-title'))
2995{
2996headline = $(self.element).attr('data-title');
2997}
2998else
2999{
3000headline = $('meta[property="og:title"]').attr('content');
3001}
3002if (!headline)
3003{
3004headline = $('title').text();
3005}
3006return headline;
3007}
3008function getShareByline()
3009{
3010var byline = '';
3011if ( $( 'body' ).hasClass( 'ddp' ) )
3012{
3013if ( $( self.element ).closest( '.package-item' ).find( '.linked-content-meta-data' ).length >= 1 )
3014{
3015var bylineData = $.parseJSON($( self.element ).closest( '.package-item' ).find( '.linked-content-meta-data' ).html() );
3016byline = replaceCommas( bylineData.authors );
3017}
3018}
3019else if ( $( 'meta[name="csm.author"]' ).attr( 'content' ) )
3020{
3021var separatedByline = $( 'meta[name="csm.author"]' ).attr( 'content' );
3022separatedByline = separatedByline.split( ',' );
3023byline = replaceCommas( separatedByline );
3024}
3025if ( byline != '' )
3026{
3027byline = "By " + byline;
3028}
3029return byline;
3030}
3031function replaceCommas( bylineString )
3032{
3033var finalBylineText = '';
3034var nextElement = bylineString.pop();
3035finalBylineText = bylineString.join( ', ' );
3036if ( finalBylineText != '' )
3037{
3038finalBylineText += ( finalBylineText.indexOf( ',' ) > -1 ? ', and ' : ' and ' ) + nextElement;
3039}
3040else
3041{
3042finalBylineText = nextElement;
3043}
3044return finalBylineText;
3045}
3046function getShareText()
3047{
3048var text = '';
3049if( $( self.element ).attr( 'data-text' ) )
3050{
3051text = $( self.element ).attr( 'data-text' );
3052}
3053return text;
3054}
3055function getShareUrl()
3056{
3057var url ='';
3058if( $( self.element ).attr( 'data-url' ) )
3059{
3060url = $( self.element ).attr( 'data-url' );
3061}
3062else
3063{
3064url = window.location.href;
3065}
3066return url;
3067}
3068function getShareImg()
3069{
3070var imgUrl = '';
3071if( $( self.element ).attr( 'data-url' ) )
3072{
3073imgUrl = false;
3074}
3075else
3076{
3077imgUrl = $( 'meta[property="og:image"]' ).attr( 'content' );
3078}
3079return imgUrl;
3080}
3081function getSubject()
3082{
3083var subject = "";
3084if ( pageType === "ddp" )
3085{
3086subject = metaData.headline + " - Monitor Daily";
3087}
3088else
3089{
3090subject = metaData.headline + " - The Christian Science Monitor";
3091}
3092return subject;
3093}
3094function getLeadIn()
3095{
3096var leadIn = "";
3097if ( pageType === 'quiz' )
3098{
3099if ( $( '#share-tools-share-result ul' ).attr('data-text') != "" )
3100{
3101leadIn = $( '#share-tools-share-result ul' ).attr('data-text');
3102}
3103else
3104{
3105leadIn = "I wanted to share this quiz from CSMonitor.com";
3106}
3107}
3108else if ( pageType === 'gallery' )
3109{
3110leadIn = "I wanted to share this gallery from CSMonitor.com:"
3111}
3112else
3113{
3114leadIn = "I wanted to share this article from CSMonitor.com:";
3115}
3116return leadIn;
3117}
3118return metaData;
3119},
3120addCampaignId : function( url, campaignId )
3121{
3122url += url.indexOf('?') > -1  ? "&" : "?";
3123url += "cmpid=" + campaignId;
3124url += '&src=shared'
3125return url;
3126},
3127shareByEmail : function( subject, leadIn, headline, url)
3128{
3129var signUpLink = getSignUpLink();
3130var shareUrl = 'mailto:' +
3131'?subject=' + encodeURIComponent( subject ) +
3132'&body=' + encodeURIComponent( leadIn + '\n\n' + headline + '\n\n') +
3133encodeURIComponent( url ) +
3134encodeURIComponent( '\n\n' + signUpLink );
3135window.location.href = shareUrl;
3136function getSignUpLink()
3137{
3138var signUpText = "";
3139if ( $( 'body' ).is( '.ddp' ) )
3140{
3141signUpText = 'You can try the Monitor Daily free for a month: https://www.csmonitor.com/dailyfreetrial';
3142}
3143else
3144{
3145signUpText = 'If you want more Monitor content delivered to your inbox, sign up for one of their free newsletters: https://www.csmonitor.com/newsletters';
3146}
3147return signUpText;
3148}
3149},
3150showFallbackModal : function()
3151{
3152var self = this;
3153var campaignId = 'shared-email';
3154var pageType = ( $( 'body' ).is( '.ezc-csm_gallery' ) ? 'gallery' : $( 'body' ).is( '.ezp-quiz, .ezc-csm_quiz_item' ) ? 'quiz' : 'article' );
3155var url = this.addCampaignId( this.data.link, campaignId );
3156$("#share-email-modal button.copyLink").removeClass( 'hide' );
3157$("#share-email-modal .link-copied-text").addClass( 'hide' );
3158$('#share-email-modal .email-headline').text( this.data.headline );
3159$('#share-email-modal .email-byline').text( this.data.byline );
3160$('#share-email-modal h3').text('Share this ' + pageType );
3161$('#share-email-modal').foundation();
3162$('#share-email-modal').foundation('open');
3163$("button.copyLink").click(function(){
3164self.copyToClipboard(url);
3165});
3166},
3167copyToClipboard : function(stringToCopy)
3168{
3169var element = document.createElement('textarea');
3170element.value = stringToCopy;
3171document.body.appendChild(element);
3172element.select();
3173document.execCommand('copy');
3174document.body.removeChild(element);
3175$( "#share-email-modal button.copyLink" ).addClass( 'hide' );
3176$( "#share-email-modal .link-copied-text" ).removeClass( 'hide' );
3177},
3178fireAdobeAnalyticsPixel : function( socialEndpoint )
3179{
3180var eventName = 'Page fireAdobeAnalyticsPixel';
3181if( typeof s != 'undefined' )
3182{
3183s.linkTrackVars='prop4,prop30,prop40,prop65,prop67';
3184s.prop67 = socialEndpoint || "";
3185s.tl( true, 'o', eventName );
3186}
3187}
3188};
3189$.fn[pluginName] = function ( options ) {
3190var args = arguments;
3191if (options === undefined || typeof options === 'object') {
3192return this.each(function ()
3193{
3194if (!$.data(this, 'plugin_' + pluginName)) {
3195$.data(this, 'plugin_' + pluginName, new Plugin( this, options ));
3196}
3197});
3198} else if (typeof options === 'string' && options[0] !== '_' && options !== 'init') {
3199var returns;
3200this.each(function () {
3201var instance = $.data(this, 'plugin_' + pluginName);
3202if (instance instanceof Plugin && typeof instance[options] === 'function') {
3203returns = instance[options].apply( instance, Array.prototype.slice.call( args, 1 ) );
3204}
3205if (options === 'destroy') {
3206$.data(this, 'plugin_' + pluginName, null);
3207}
3208});
3209return returns !== undefined ? returns : this;
3210}
3211};
3212}(jQuery, window, document));
3213;(function ( $, window, document, undefined )
3214{
3215var pluginName = 'loadmoreblock',
3216pluginElement = null,
3217defaults = {
3218baseUrl : '/',
3219limit   : 5,
3220query   : {},
3221config  : {},
3222};
3223function Plugin( element, options )
3224{
3225pluginElement = element;
3226this.element = element;
3227this.options = $.extend( {}, defaults, options) ;
3228this._defaults = defaults;
3229this._name = pluginName;
3230this.init();
3231}
3232function cleanData( data )
3233{
3234return data.replace( /\<div id="debug"[\s\S]*div\>/i, '' );
3235}
3236function convertBoolToNum( obj )
3237{
3238$.each(obj, function(i)
3239{
3240if( typeof obj[i] == 'object' && obj[i] != null )
3241{
3242convertBoolToNum( this );
3243}
3244else if( typeof obj[i] == 'boolean' )
3245{
3246obj[i] = Number(obj[i]);
3247}
3248});
3249return obj;
3250}
3251Plugin.prototype =
3252{
3253init : function()
3254{
3255var self = this;
3256$(self.element).find( 'button.load_more' ).click( function()
3257{
3258self.options.query.offset = parseInt( self.options.query.offset ) + parseInt( self.options.query.limit );
3259self.options.query.limit = self.options.limit;
3260$.ajax(
3261{
3262url: self.options.baseUrl + 'services/loadmoreblock',
3263data:
3264{
3265query: convertBoolToNum( self.options.query ),
3266config: convertBoolToNum( self.options.config ),
3267},
3268success: function( data )
3269{
3270self.handleResult( data );
3271$(self.element).find( '.ezv-listing:last' ).find('a').focus();
3272},
3273});
3274});
3275},
3276handleResult : function( data )
3277{
3278var self = this;
3279var resultObj   = $( cleanData( data ) );
3280var items       = resultObj.find( '.ezv-listing' );
3281var searchCount = resultObj.attr( 'data-search-count' );
3282if( items.length )
3283{
3284$( items )
3285.hide()
3286.appendTo( $( self.element ).find( '.ezp-ezflow_block_content' ) )
3287.fadeTo( 999, 0.99 );
3288}
3289if( searchCount <= ( self.options.query.offset + self.options.query.limit ) )
3290{
3291$(self.element).find( 'button.load_more' ).hide();
3292}
3293},
3294};
3295$.fn[pluginName] = function ( options ) {
3296var args = arguments;
3297if (options === undefined || typeof options === 'object') {
3298return this.each(function ()
3299{
3300if (!$.data(this, 'plugin_' + pluginName)) {
3301$.data(this, 'plugin_' + pluginName, new Plugin( this, options ));
3302}
3303});
3304} else if (typeof options === 'string' && options[0] !== '_' && options !== 'init') {
3305var returns;
3306this.each(function () {
3307var instance = $.data(this, 'plugin_' + pluginName);
3308if (instance instanceof Plugin && typeof instance[options] === 'function') {
3309returns = instance[options].apply( instance, Array.prototype.slice.call( args, 1 ) );
3310}
3311if (options === 'destroy') {
3312$.data(this, 'plugin_' + pluginName, null);
3313}
3314});
3315return returns !== undefined ? returns : this;
3316}
3317};
3318}(jQuery, window, document));
3319;(function ( $, window, document, undefined )
3320{
3321var pluginName = 'csmredirect',
3322pluginElement = null,
3323defaults =
3324{
3325target: '',
3326delay: 0,
3327checkCookies: false,
3328};
3329function Plugin( element, options )
3330{
3331pluginElement = element;
3332this.element = element;
3333this.options = $.extend( {}, defaults, options) ;
3334this._defaults = defaults;
3335this._name = pluginName;
3336this.init();
3337}
3338Plugin.prototype =
3339{
3340init : function()
3341{
3342var self = this;
3343if( self.options.target )
3344{
3345var regex = /^https:\/\/.{1,15}?\.csmonitor\.com/;
3346if( regex.exec( document.referrer ) !== null )
3347{
3348if( self.checkCookies() )
3349{
3350if( self.options.delay > 0 )
3351{
3352setTimeout(
3353function()
3354{
3355self.redirect();
3356},
3357self.options.delay
3358);
3359}
3360else
3361{
3362self.redirect();
3363}
3364}
3365else
3366{
3367$( '.no-cookies' ).removeClass( 'hide' );
3368}
3369}
3370}
3371else
3372{
3373let target = csmJs.store.getItem( 'csm_last_visit_page' ) || '/';
3374window.location.href = target;
3375}
3376},
3377redirect : function()
3378{
3379var self = this;
3380window.location.href = self.options.target;
3381},
3382checkCookies : function()
3383{
3384var self = this;
3385if( self.options.checkCookies )
3386{
3387if( typeof Modernizr !== 'undefined' && !Modernizr.cookies )
3388{
3389return false;
3390}
3391}
3392return true;
3393},
3394};
3395$.fn[pluginName] = function ( options ) {
3396var args = arguments;
3397if (options === undefined || typeof options === 'object') {
3398return this.each(function ()
3399{
3400if (!$.data(this, 'plugin_' + pluginName)) {
3401$.data(this, 'plugin_' + pluginName, new Plugin( this, options ));
3402}
3403});
3404} else if (typeof options === 'string' && options[0] !== '_' && options !== 'init') {
3405var returns;
3406this.each(function () {
3407var instance = $.data(this, 'plugin_' + pluginName);
3408if (instance instanceof Plugin && typeof instance[options] === 'function') {
3409returns = instance[options].apply( instance, Array.prototype.slice.call( args, 1 ) );
3410}
3411if (options === 'destroy') {
3412$.data(this, 'plugin_' + pluginName, null);
3413}
3414});
3415return returns !== undefined ? returns : this;
3416}
3417};
3418}(jQuery, window, document));
3419;(function ( $, window, document, undefined )
3420{
3421var pluginName = 'contactStaffForm',
3422pluginElement = null,
3423defaults = {
3424htmlForm : '',
3425};
3426function Plugin( element, options )
3427{
3428pluginElement = element;
3429this.element = element;
3430this.options = $.extend( {}, defaults, options) ;
3431this._defaults = defaults;
3432this._name = pluginName;
3433this.init();
3434}
3435Plugin.prototype =
3436{
3437init : function()
3438{
3439var self = this;
3440$( this.element ).append( $( self.options.htmlForm ) );
3441$( self.element ).find( 'form' ).on( 'submit', function(e)
3442{
3443var send = true;
3444$( this ).find( '.required' ).each( function(i)
3445{
3446if( $.trim( $( this ).val() ) == '' )
3447{
3448alert( 'Please fill out all required fields' );
3449send = false;
3450return false;
3451}
3452});
3453if( send )
3454{
3455$( this ).find( '.email' ).each( function(e)
3456{
3457var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
3458if( !re.test( $(this).val() ) )
3459{
3460alert( 'Please fill out a valid email address.' );
3461send = false;
3462return false;
3463}
3464});
3465}
3466if( send && typeof s === 'object' )
3467{
3468s.linkTrackVars = "pageName,prop3,prop4,prop15,prop26,prop30,prop40,prop45";
3469s.prop26 = "www";
3470s.tl( true, 'o', 'EmailFeedback' );
3471}
3472return send;
3473});
3474$( self.element ).find( 'textarea' ).on( 'change, keyup', function()
3475{
3476var charCount = $(this).val().length;
3477$(this).parent().find( '.current-length' ).text( '(' + charCount + ' of 10,000)' );
3478});
3479}
3480};
3481$.fn[pluginName] = function ( options ) {
3482var args = arguments;
3483if (options === undefined || typeof options === 'object') {
3484return this.each(function ()
3485{
3486if (!$.data(this, 'plugin_' + pluginName)) {
3487$.data(this, 'plugin_' + pluginName, new Plugin( this, options ));
3488}
3489});
3490} else if (typeof options === 'string' && options[0] !== '_' && options !== 'init') {
3491var returns;
3492this.each(function () {
3493var instance = $.data(this, 'plugin_' + pluginName);
3494if (instance instanceof Plugin && typeof instance[options] === 'function') {
3495returns = instance[options].apply( instance, Array.prototype.slice.call( args, 1 ) );
3496}
3497if (options === 'destroy') {
3498$.data(this, 'plugin_' + pluginName, null);
3499}
3500});
3501return returns !== undefined ? returns : this;
3502}
3503};
3504}(jQuery, window, document));
3505!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!(c.settings.submitHandler&&!c.settings.debug)||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element
vendor: 13,080 bytes, line 3505
3505(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0],k="undefined"!=typeof this.attr("contenteditable")&&"false"!==this.attr("contenteditable");if(null!=j&&(!j.form&&k&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}}),a.extend(a.expr.pseudos||a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){var c=a(b).val();return null!==c&&!!a.trim(""+c)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");if(!this.form&&c&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name")),d===this.form){var e=a.data(this.form,"validator"),f="on"+b.type.replace(/^validate/,""),g=e.settings;g[f]&&!a(this).is(g.ignore)&&g[f].call(e,this,b)}}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.currentForm,e=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){e[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name"),e="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),e&&(this.form=a(this).closest("form")[0],this.name=d),this.form===b.currentForm&&(!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0))})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type,g="undefined"!=typeof e.attr("contenteditable")&&"false"!==e.attr("contenteditable");return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=g?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);"function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f&&(j=f.call(b,j),delete g.normalizer);for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=".  Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(void 0!==arguments[a])return arguments[a]},defaultMessage:function(b,c){"string"==typeof c&&(c={method:c});var d=this.findDefined(this.customMessage(b.name,c.method),this.customDataMessage(b,c.method),!this.settings.ignoreTitle&&b.title||void 0,a.validator.messages[c.method],"<strong>Warning: No message defined for "+b.name+"</strong>"),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.n
3505ame],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return a.replace(/([\\!"#$%&'()*+,.\/:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);
vendor: 4,554 bytes, line 3505
3505return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur").find(".validate-lessThan-blur").off(".validate-lessThan").removeClass("validate-lessThan-blur").find(".validate-lessThanEqual-blur").off(".validate-lessThanEqual").removeClass("validate-lessThanEqual-blur").find(".validate-greaterThanEqual-blur").off(".validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".validate-greaterThan-blur").off(".validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),""===d&&(d=!0),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(d,e){b[d]=a.isFunction(e)&&"normalizer"!==d?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:void 0!==b&&null!==b&&b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)}
3505,url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[\/?#]\S*)?$/i.test(a)},date:function(){var a=!1;return function(b,c){return a||(a=!0,this.settings.debug&&window.console&&console.warn("The `date` method is deprecated and will be removed in version '2.0.0'.\nPlease don't use it, since it relies on the Date constructor, which\nbehaves very differently across browsers and locales. Use `dateISO`\ninstead or one of the locale specific methods in `localizations/`\nand `additional-methods.js`.")),this.optional(c)||!/Invalid|NaN/.test(new Date(b).toString())}}(),dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e<=d},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var b,c={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)}),a});
3506;(function( $, window, document, undefined )
3507{
3508var // plugin name
3509pluginName = "meteredMessenger",
3510defaults = {
3511'numbered': [ '', 'st', 'nd', 'rd', 'th', 'th', 'th' ],
3512'loginUrl': '/auth/sso_login',
3513'prePaywallReachedCount': 3,
3514'freeStoriesCount': 3,
3515'testMeterQueryParam': 'test_meter',
3516'suppressMeterQueryParam': 'suppress_meter',
3517'freeLink': '/r-sub-cv',
3518'freeMessage': '<span class="hide-for-small-only">This coverage is free to all readers.</span><span class="show-for-small-only">Free coverage</span><span class="separator">></span><a' +
3519' class="free-link punch"' +
3520' href="">Subscribe</a><span> to support our journalism.</span>',
3521'possibleSubscriberMessage': 	'<span>Thank you for supporting Monitor Journalism</span><span class="separator">></span>' +
3522'<a class="free-link punch" href="">Please log in</a>',
3523'freeTrialMessage' :	'<a class="free-link punch" href="">Subscribe</a><span> for ongoing access to the Monitor</span><span class="hide-for-small-only"> difference<span class="separator">&ndash;</span>unbiased, uplifting journalism</span>',
3524};
3525var Plugin = function( element, options )
3526{
3527var self = this;
3528var pluginElement = element;
3529this.element = element;
3530this.options = $.extend( {}, defaults, options );
3531this.init( options );
3532};
3533Plugin.prototype =
3534{
3535$element : null,
3536user: null,
3537isSharedContent : false,
3538meteredStoryIds: [],
3539allStoryIds: [],
3540init: function()
3541{
3542var self = this;
3543self.$element = $( this.element );
3544var src = csmJs.util.getQueryParam( 'src' ),
3545product = csmJs.util.getQueryParam( 'prod' );
3546if( src === 'shared' )
3547{
3548self.isSharedContent = true;
3549self.removeSrcQueryParameter();
3550}
3551else if( src === 'newsletter' || src === 'email' )
3552{
3553if( product === 'daily' || product === 'bundle' || product === 'hwym' || product === 'freetrial' )
3554{
3555self.removeSrcQueryParameter();
3556}
3557}
3558var suppressMeter = csmJs.util.getQueryParam( self.options.suppressMeterQueryParam );
3559if( suppressMeter !== null )
3560{
3561csmJs.sessionStorage.setItem( 'csm_suppress_meter', 1 );
3562}
3563var uniqueStories = $( 'body' ).trackUniqueStories( 'getUniqueStories' );
3564self.meteredStoryIds = uniqueStories.meteredIds;
3565self.allStoryIds = uniqueStories.ids;
3566var pageObjectId = $( 'body' ).trackUniqueStories( 'getContentObjectId' );
3567if( pageObjectId )
3568{
3569var meterCount = parseInt( csmJs.util.getQueryParam( self.options.testMeterQueryParam ) );
3570if( meterCount )
3571{
3572var entries = [ 1, 2, 3, 4 ];
3573self.meteredStoryIds = entries.slice( 0, ( meterCount - 1 ) );
3574}
3575self.show( pageObjectId );
3576}
3577},
3578show: function( objectId )
3579{
3580var self = this;
3581if( self.isMeterActive() )
3582{
3583if( !self.isContentFree( objectId ) )
3584{
3585self.trackPageId( objectId );
3586if( !self.possibleSubscriberCookieEnabled() )
3587{
3588if( !self.isMeterDisabledForContent() )
3589{
3590if( self.allStoryIds.length > self.options.freeStoriesCount )
3591{
3592if( !self.isContentInMeteredStories( objectId ) )
3593{
3594$( 'body' ).addClass( 'display-paywall' );
3595}
3596}
3597self.render();
3598}
3599else
3600{
3601self.addToWhiteList( objectId );
3602$( '#sticky-messenger' ).hide();
3603}
3604}
3605else
3606{
3607let renderOption = document.body.classList.contains( 'data-referrer-freetrial' ) ? 'freeTrial' : 'possibleSubscriber';
3608self.renderFree( renderOption );
3609}
3610}
3611else
3612{
3613$( 'body' ).addClass( 'free-content' );
3614if( isCoronavirusContent() )
3615{
3616self.renderFree();
3617}
3618}
3619}
3620function isCoronavirusContent()
3621{
3622if( csmJs.pageData.keyword_tags )
3623{
3624return csmJs.pageData.keyword_tags.indexOf( 'topic-coronavirus' ) >= 0;
3625}
3626return false;
3627}
3628},
3629isMeterActive: function()
3630{
3631var self = this;
3632return !(
3633csmJs.util.isSubscriber() ||
3634isSuppressedForSession() ||
3635isWebin() ||
3636whiteListedReferrer()
3637);
3638function isSuppressedForSession()
3639{
3640return csmJs.sessionStorage.getItem( 'csm_suppress_meter' ) == 1;
3641}
3642function isWebin()
3643{
3644return document.location.host.indexOf( "webin" ) > -1;
3645}
3646function whiteListedReferrer()
3647{
3648let returnVal = false
3649let referrer = document.referrer
3650if( referrer )
3651{
3652let url = new URL( referrer );
3653returnVal = url.hostname.indexOf( 'app.sooth.fyi' ) > -1;
3654}
3655return returnVal
3656}
3657},
3658isContentFree: function( objectId )
3659{
3660return (
3661csmJs.util.getContentTier() === 'free' ||
3662isWhitelistedContent( objectId )
3663);
3664function isWhitelistedContent( objectId )
3665{
3666var isWhiteListedObject = false;
3667var whiteList = JSON.parse( csmJs.sessionStorage.getItem( 'csm_meter_whitelist' ) ) || [];
3668if( $.inArray( objectId, whiteList ) > -1 )
3669{
3670isWhiteListedObject = true;
3671}
3672return isWhiteListedObject;
3673}
3674},
3675isContentInMeteredStories: function( objectId )
3676{
3677var inMeteredStories = false,
3678self = this;
3679if (
3680self.meteredStoryIds.indexOf( objectId ) > -1 ||
3681self.meteredStoryIds.indexOf( objectId + '' ) > -1
3682)
3683{
3684return inMeteredStories = true;
3685}
3686return inMeteredStories;
3687},
3688isMeterDisabledForContent: function()
3689{
3690var self = this;
3691return (
3692self.isSharedContent ||
3693isSocialReferrer()
3694);
3695function isSocialReferrer()
3696{
3697var socialReferrer = false;
3698if(
3699document.referrer.indexOf( 'facebook.com' ) > 0 ||
3700document.referrer.indexOf( 'twitter.com' ) > 0 ||
3701document.referrer.indexOf( 't.co' ) > 0 ||
3702document.referrer.indexOf( 'linkedin.com' ) > 0
3703)
3704{
3705socialReferrer = true;
3706}
3707return socialReferrer;
3708}
3709},
3710possibleSubscriberCookieEnabled: function()
3711{
3712var possibleSubCookieExists = false;
3713if( $( 'body' ).hasClass( 'possible_sub' ) )
3714{
3715possibleSubCookieExists = true;
3716}
3717return possibleSubCookieExists;
3718},
3719renderFree: function( status )
3720{
3721var self = this,
3722$stickyMessage = self.$element.find( '.stickyMessenger-cta' ),
3723$freeMessage = $stickyMessage.find( 'div.show-free' ),
3724$payMessage = $stickyMessage.find( '.hide-free' ),
3725isDaily = $( 'body.ddp' ).length;
3726$payMessage.hide();
3727if( status === 'possibleSubscriber' )
3728{
3729$freeMessage
3730.html( self.options.possibleSubscriberMessage )
3731.find( 'a.free-link' ).attr( "href", self.options.loginUrl );
3732}
3733else if( status === 'freeTrial' )
3734{
3735$freeMessage
3736.html( self.options.freeTrialMessage )
3737.find( 'a.free-link' ).attr( 'href', self.options.freeLink );
3738}
3739else
3740{
3741$freeMessage
3742.html( self.options.freeMessage )
3743.find( 'a.free-link' ).attr( "href", self.options.freeLink );
3744}
3745$( 'body' ).addClass( 'meter' );
3746$freeMessage.removeClass( 'hide' );
3747$( '#sticky-messenger .expand-button, #sticky-messenger #expanded-message' ).hide();
3748self.$element.find( 'div.title.trigger' ).css( "cursor", "default" );
3749self.showStickyPaywall();
3750},
3751render: function()
3752{
3753var self = this,
3754isDaily = $( 'body.ddp' ).length;
3755if( self.meteredStoryIds.length > 0 )
3756{
3757if( self.meteredStoryIds.length < self.options.freeStoriesCount )
3758{
3759$( '#sticky-messenger, #paywall' ).find( '.story-count' ).html( self.meteredStoryIds.length );
3760}
3761else
3762{
3763$( '#sticky-messenger, #paywall' ).find( '.story-count' ).html( self.options.freeStoriesCount );
3764}
3765$( '#sticky-messenger, #paywall' ).find( '.story-max-count' ).html( self.options.freeStoriesCount );
3766self.showStickyPaywall( self.meteredStoryIds );
3767if( $( 'body' ).hasClass( 'display-paywall' ) )
3768{
3769self.renderPaywall();
3770}
3771if( typeof s === 'object' )
3772{
3773s.linkTrackVars = "pageName,prop3,prop4,prop5,prop10,prop21,prop30,prop36,prop40,prop61,prop64";
3774s.tl( true, 'o', 'meter-message' );
3775}
3776}
3777if( !$( 'body' ).hasClass( 'display-paywall' ) )
3778{
3779let meterBody = $('#expanded-message-container');
3780$( 'body' ).addClass( 'meter meter-closed' );
3781self.$element.find('.trigger').click(function ()
3782{
3783if ( $( 'body' ).hasClass( 'meter-closed' ) )
3784{
3785$( 'body' ).removeClass( 'meter-closed' );
3786meterBody.collapse('show');
3787$( '#sticky-messenger .expand-button' ).attr( 'aria-expanded', 'true' );
3788}
3789else
3790{
3791$( 'body' ).addClass( 'meter-closed' );
3792meterBody.collapse('hide');
3793$( '#sticky-messenger .expand-button' ).attr( 'aria-expanded', 'false' );
3794}
3795});
3796}
3797},
3798showStickyPaywall: function()
3799{
3800var self = this,
3801csmUniqueStoryCount = self.meteredStoryIds.length,
3802visitClass = 'visit-' + self.options.freeStoriesCount;
3803if( csmUniqueStoryCount < self.options.freeStoriesCount )
3804{
3805visitClass = 'visit-' + csmUniqueStoryCount;
3806}
3807let bodyTag = document.querySelector( 'body' );
3808bodyTag.classList.add( visitClass, 'metered-visit' );
3809self.$element.find( '#sticky-container' )
3810.addClass( visitClass )
3811.removeClass( 'hide' );
3812return true;
3813},
3814renderPaywall : function()
3815{
3816var self = this;
3817if( $( 'body' ).hasClass( "ezp-r18" ) )
3818{
3819$( '.story-foot, #story-content .eza-body > div' ).remove();
3820}
3821else // default
3822{
3823$( '.story-foot, .eza-body > div' ).remove();
3824$( '#right-column > div:gt(1)' ).hide();
3825}
3826$( '#sticky-messenger' ).hide();
3827$( '#paywall' ).removeClass( 'hide' );
3828},
3829removeSrcQueryParameter: function()
3830{
3831var q = window.location.search;
3832q = q.replace( /(src|expires|prod)[^&]*&?/g, "" );
3833q = q.replace( /&$/, "" );
3834if( q === "?" )
3835{
3836q = ""
3837}
3838;
3839if( history.replaceState )
3840{
3841history.replaceState(
3842{},
3843'clean',
3844window.location.pathname + q + window.location.hash
3845);
3846}
3847},
3848addToWhiteList: function( objId )
3849{
3850var self = this;
3851if( objId )
3852{
3853var whiteList = JSON.parse( csmJs.sessionStorage.getItem( 'csm_meter_whitelist' ) );
3854if( whiteList )
3855{
3856if( !($.inArray( objId, whiteList ) > -1) )
3857{
3858whiteList.push( objId );
3859}
3860}
3861else
3862{
3863whiteList = [ objId ];
3864}
3865csmJs.sessionStorage.setItem( 'csm_meter_whitelist', JSON.stringify( whiteList ) );
3866}
3867},
3868trackPageId : function( pageId )
3869{
3870var self = this;
3871var uniqueStories = $( 'body' ).trackUniqueStories( 'getUniqueStories' );
3872if(
3873self.meteredStoryIds.indexOf( pageId ) === -1 &&
3874self.meteredStoryIds.indexOf( pageId + '' ) === -1 &&
3875self.meteredStoryIds.length < self.options.freeStoriesCount
3876)
3877{
3878self.meteredStoryIds.push( pageId );
3879uniqueStories.meteredIds = self.meteredStoryIds;
3880$( 'body' ).trackUniqueStories( 'setUniqueStories', uniqueStories );
3881}
3882},
3883};
3884$.fn[ pluginName ] = function( options )
3885{
3886var args = arguments;
3887if( options === undefined || typeof options === 'object' )
3888{
3889return this.each( function()
3890{
3891if( !$.data( this, 'plugin_' + pluginName ) )
3892{
3893$.data( this, 'plugin_' + pluginName, new Plugin( this, options ) );
3894}
3895} );
3896}
3897else if( typeof options === 'string' && options[ 0 ] !== '_' && options !== 'init' )
3898{
3899var returns;
3900this.each( function()
3901{
3902var instance = $.data( this, 'plugin_' + pluginName );
3903if( instance instanceof Plugin && typeof instance[ options ] === 'function' )
3904{
3905returns = instance[ options ].apply( instance, Array.prototype.slice.call( args, 1 ) );
3906}
3907if( options === 'destroy' )
3908{
3909$.data( this, 'plugin_' + pluginName, null );
3910}
3911} );
3912return returns !== undefined ? returns : this;
3913}
3914};
3915})( jQuery, window, document );
3916;(function( $, window, document, undefined )
3917{
3918var pluginName = 'userauth',
3919pluginElement = null,
3920defaults =
3921{
3922ignoreAccessControl: false,
3923cookieName : 'csm_user',
3924maxSessionAge: 86400000, // 24 hours in milliseconds
3925};
3926function Plugin( element, options )
3927{
3928pluginElement = element;
3929this.element = element;
3930this.options = $.extend( {}, defaults, options );
3931this._defaults = defaults;
3932this._name = pluginName;
3933this.init();
3934}
3935function hasAccess( user )
3936{
3937return typeof user[ 'type' ] === 'string' && user[ 'type' ].length > 0;
3938}
3939Plugin.prototype =
3940{
3941init: function()
3942{
3943var self = this;
3944self.handleUserLogin();
3945csmJs.pageData.user = self.getUserInfo();
3946self.initEvents();
3947},
3948initEvents: function()
3949{
3950var self = this;
3951},
3952getUser: function()
3953{
3954var self = this;
3955return csmJs.util.getJsonCookieValue( self.options.cookieName );
3956},
3957isSessionStale : function()
3958{
3959var userDetails = this.getUser();
3960if( typeof userDetails !== 'undefined' )
3961{
3962var now = (new Date()).getTime();
3963var lastCheck = userDetails.lastChecked || 0;
3964}
3965if( lastCheck + this.options.maxSessionAge < now )
3966{
3967return true;
3968}
3969else
3970{
3971return false;
3972}
3973},
3974handleUserLogin: function()
3975{
3976var self = this;
3977var user = self.getUser();
3978if( user )
3979{
3980$( 'body' ).addClass( 'logged-in' );
3981$( '.require-login' ).removeClass( 'require-login' );
3982if( hasAccess( user ) )
3983{
3984self.grantAccess();
3985if( self.isSessionStale() )
3986{
3987self.validateSession();
3988}
3989}
3990}
3991else if( document.location.pathname.indexOf('site_access/site') > -1 )
3992{
3993self.grantAccess();
3994}
3995else
3996{
3997$( 'body' ).addClass( 'not-logged-in' );
3998}
3999},
4000getUserInfo: function()
4001{
4002'use strict';
4003var userData = '';
4004try
4005{
4006var userCookieValue = this.getUser();
4007if( userCookieValue )
4008{
4009userData = userCookieValue;
4010if (!userData.type)
4011{
4012userData.type = 'nosub';
4013}
4014}
4015else if ( $( 'body' ).hasClass( 'possible_sub' ) || sessionStorage.getItem( 'csm_possible_sub' ) )
4016{
4017userData = { id: '', type: 'ano_possible_sub' };
4018}
4019else
4020{
4021var src = csmJs.util.getQueryParam( 'src' ),
4022product = csmJs.util.getQueryParam( 'prod' );
4023if( product === 'daily' || product === 'bundle' || product === 'hwym' )
4024{
4025if( src === 'email' || src === 'newsletter' )
4026{
4027userData = { id: '', type: 'ano_possible_sub' };
4028}
4029}
4030else
4031{
4032userData = { id: '', type: 'ano' };
4033}
4034}
4035}
4036catch( e )
4037{
4038console.log( 'Set pageData variable: ' + e.message )
4039userData = { id: '', type: 'ano' };
4040}
4041return userData;
4042},
4043validateSession : function()
4044{
4045var self = this;
4046var userDetails = self.getUser();
4047if( typeof userDetails !== 'undefined' )
4048{
4049$.ajax(
4050{
4051xhrFields:
4052{
4053withCredentials: true
4054},
4055type : 'POST',
4056url  : '/auth/validate_session',
4057})
4058.done( function( result )
4059{
4060if( !result.success )
4061{
4062self.revokeAccess();
4063location.href = '/auth/subscription_expired'
4064}
4065} )
4066}
4067},
4068grantAccess : function()
4069{
4070$( 'body' ).addClass( 'has-access' ).removeClass( 'possible_sub' );
4071sessionStorage.removeItem( 'csm_possible_sub' );
4072},
4073revokeAccess : function()
4074{
4075$( 'body' ).removeClass( 'has-access' );
4076},
4077};
4078$.fn[ pluginName ] = function( options )
4079{
4080var args = arguments;
4081if( options === undefined || typeof options === 'object' )
4082{
4083return this.each( function()
4084{
4085if( !$.data( this, 'plugin_' + pluginName ) )
4086{
4087$.data( this, 'plugin_' + pluginName, new Plugin( this, options ) );
4088}
4089} );
4090}
4091else if( typeof options === 'string' && options[ 0 ] !== '_' && options !== 'init' )
4092{
4093var returns;
4094this.each( function()
4095{
4096var instance = $.data( this, 'plugin_' + pluginName );
4097if( instance instanceof Plugin && typeof instance[ options ] === 'function' )
4098{
4099returns = instance[ options ].apply( instance, Array.prototype.slice.call( args, 1 ) );
4100}
4101if( options === 'destroy' )
4102{
4103$.data( this, 'plugin_' + pluginName, null );
4104}
4105} );
4106return returns !== undefined ? returns : this;
4107}
4108};
4109}( jQuery, window, document ));
4110;(function( $, window, document )
4111{
4112'use strict';
4113var pluginName = 'csmDFP';
4114var defaults =
4115{
4116account: '1010203',
4117notice: {
4118class: 'ad-notice',
4119text: 'About these ads',
4120url: '/About/Contact/Feedback/About-these-Ads'
4121},
4122allowedSizes: [ [ 970, 250 ], [ 970, 90 ], [ 728, 90 ], [ 300, 250 ], [ 320, 50 ] ], // All allowed display ad sizes [width,height]
4123minWidthForOutOfPageAd: 768,
4124minWidthForPageHeaderAd: 480,
4125};
4126function Plugin( element, options )
4127{
4128this.element = element;
4129this.settings = $.extend( {}, defaults, options );
4130this._defaults = defaults;
4131this._name = pluginName;
4132this.init();
4133}
4134Plugin.prototype =
4135{
4136adSlots : {},
4137getAdSlots : function()
4138{
4139return this.adSlots;
4140},
4141reloadAds : function()
4142{
4143$( 'body' ).trigger( 'csm:reloadAds' );
4144},
4145init: function()
4146{
4147if( pageGetsAds() )
4148{
4149var thisPlugin = this;
4150window.csmJs = window.csmJs || {};
4151window.googletag = window.googletag || {};
4152googletag = window.googletag;
4153googletag.cmd = googletag.cmd || [];
4154this.loadDFP();
4155googletag.cmd.push( this.setKeyValues );
4156googletag.cmd.push( function()
4157{
4158googletag.pubads().enableSingleRequest();
4159if ( !csmJs.util.haveConsent('TRACKING') )
4160{
4161googletag.pubads().setRequestNonPersonalizedAds(1);
4162}
4163googletag.enableServices();
4164googletag.pubads().addEventListener( 'slotRenderEnded', function( event )
4165{
4166var sid = event.slot.getSlotElementId();
4167if( event.isEmpty )
4168{
4169$( '#' + sid ).closest( '.ad-positioner' ).removeClass( 'ad-positioner' );
4170$( '#' + sid ).closest( '.ad, .ad-wrapper' ).remove();
4171}
4172else
4173{
4174$( '#' + sid ).closest( '.ad, .ad-wrapper' ).addClass( 'rendered' );
4175}
4176} );
4177$( '.injection:empty' )
4178.filter( function( index )
4179{
4180return index % 2 == 0;
4181} )
4182.one( 'inview', function()
4183{
4184thisPlugin.csmDynamicAdSlot( this, getSizemap( this ) );
4185} );
4186$( '.ad' ).each( function()
4187{
4188var id = this.id;
4189if( id !== 'ad-header' || showPageHeaderAd() )
4190{
4191var sizeMap = getSizemap( this );
4192if( id && id.length > 0 && sizeMap )
4193{
4194thisPlugin.csmAdSlot( id, 'dfp-' + id, sizeMap );
4195}
4196}
4197} );
4198function showPageHeaderAd()
4199{
4200return window.innerWidth > thisPlugin.settings.minWidthForPageHeaderAd &&
4201!document.querySelector( 'body' ).classList.contains( 'visit-1' )
4202;
4203}
4204function getSizemap( element )
4205{
4206var sizeMap;
4207var availableWidth = $( element ).parent().width();
4208if( availableWidth >= 970 )
4209{
4210sizeMap = googletag.sizeMapping().addSize( [ 1024, 768 ], [ [ 970, 250 ], [ 970, 90 ], [ 728, 90 ] ] ).addSize( [ 980, 690 ], [ [ 970, 250 ], [ 970, 90 ], [ 728, 90 ] ] ).addSize( [ 768, 0 ], [ [ 728, 90 ], [ 300, 250 ] ] ).addSize( [ 640, 480 ], [ 300, 250 ] ).addSize( [ 320, 0 ], [ [ 300, 250 ], [ 320, 50 ] ] ).addSize( [ 0, 0 ], [ 320, 50 ] ).build();
4211}
4212else if( availableWidth >= 728 )
4213{
4214sizeMap = googletag.sizeMapping().addSize( [ 980, 690 ], [ [ 728, 90 ] ] ).addSize( [ 768, 0 ], [ 300, 250 ] ).addSize( [ 640, 480 ], [ 300, 250 ] ).addSize( [ 320, 0 ], [ 300, 250 ] ).build();
4215}
4216else if( availableWidth >= 300 && availableWidth < 400 )
4217{
4218sizeMap = googletag.sizeMapping().addSize( [ 1024, 0 ], [ [ 300, 600 ], [ 300, 250 ] ] ).addSize( [ 0, 0 ], [ [ 300, 250 ] ] ).build();
4219}
4220else if( availableWidth >= 300 )
4221{
4222sizeMap = googletag.sizeMapping().addSize( [ 320, 0 ], [ [ 320, 50 ], [ 300, 250 ] ] ).addSize( [ 0, 0 ], [ [ 300, 250 ] ] ).build();
4223}
4224return sizeMap;
4225}
4226$( 'body' ).on( 'csm:reloadAds', function( e, slots )
4227{
4228var toRefresh = [];
4229$.each( $( '.ad.rendered, .ad-wrapper.rendered' ), function()
4230{
4231$(this).removeClass( 'rendered' );
4232toRefresh.push( thisPlugin.adSlots[ 'dfp-' +  this.id ].slot );
4233} );
4234googletag.pubads().refresh( toRefresh );
4235} );
4236} );
4237}
4238},
4239loadDFP: function()
4240{
4241var gads = document.createElement( 'script' );
4242gads.async = true;
4243gads.type = 'text/javascript';
4244var useSSL = 'https:' == document.location.protocol;
4245gads.src = (useSSL ? 'https:' : 'http:') + '//securepubads.g.doubleclick.net/tag/js/gpt.js';
4246var node = document.getElementsByTagName( 'script' )[ 0 ];
4247node.parentNode.insertBefore( gads, node );
4248},
4249setKeyValues: function()
4250{
4251function cleanKeyValues( val )
4252{
4253var KVMAX = 40;
4254var kvReg1 = new RegExp( /[&\/]/, 'g' );
4255var kvReg2 = new RegExp( /[^a-zA-Z0-9_\ ]/, 'g' );
4256var kvReg3 = new RegExp( /\s+/, 'g' );
4257return val.toLowerCase().replace( kvReg1, ' ' ).replace( kvReg2, '' ).replace( kvReg3, ' ' ).trim().substring( 0, KVMAX );
4258}
4259try
4260{
4261googletag.pubads().setTargeting( 'page_url', jQuery( 'head link[rel = "canonical" ]' ).attr( 'href' ) );
4262if( csmJs.pageData.hasOwnProperty( 'sections' ) )
4263{
4264var l = csmJs.pageData.sections.length;
4265if( l > 0 )
4266{
4267var sec = [];
4268sec.push( cleanKeyValues( csmJs.pageData.sections[ 0 ] ) );
4269googletag.pubads().setTargeting( 'section', sec );
4270}
4271if( l > 1 )
4272{
4273var subsLc = [];
4274var subs = csmJs.pageData.sections.slice( 1 );
4275var i;
4276for( i = 0; i < subs.length; i++ )
4277{
4278subsLc.push( cleanKeyValues( subs[ i ] ) );
4279}
4280googletag.pubads().setTargeting( 'subsection', subsLc );
4281}
4282}
4283if( csmJs.pageData.hasOwnProperty( 'contentclass_id' ) )
4284{
4285googletag.pubads().setTargeting( 'ezclass', csmJs.pageData.contentclass_id );
4286}
4287if( csmJs.pageData.hasOwnProperty( 'remote_id' ) )
4288{
4289googletag.pubads().setTargeting( 'contentid', csmJs.pageData.remote_id );
4290}
4291var hasFlash = ((typeof navigator.plugins != 'undefined' && typeof navigator.plugins[ 'Shockwave Flash' ] == 'object')
4292|| (window.ActiveXObject && (new ActiveXObject( 'ShockwaveFlash.ShockwaveFlash' )) != false));
4293hasFlash = hasFlash ? 'yes' : 'no';
4294googletag.pubads().setTargeting( 'hasFlash', hasFlash );
4295var visitNum;
4296var vn = 1;
4297var parts = document.cookie.split( 's_vnum=' );
4298if( parts.length === 2 )
4299{
4300vn = parts.pop().split( ';' ).shift().split( 'vn%3D' ).pop();
4301}
4302vn = parseInt( vn );
4303if( vn === 1 )
4304{
4305visitNum = '1';
4306}
4307else if( vn > 1 && vn < 5 )
4308{
4309visitNum = '2-4';
4310}
4311else if( vn > 4 )
4312{
4313visitNum = '5 or more';
4314}
4315else
4316{
4317visitNum = 'unknown';
4318}
4319googletag.pubads().setTargeting( 'visitNum', visitNum );
4320var visitDepth;
4321var dov;
4322var parts = document.cookie.split( 's_depth=' );
4323if( parts.length === 2 )
4324{
4325dov = parts.pop().split( ';' ).shift();
4326dov = 1 + parseInt( dov );
4327}
4328else
4329{
4330dov = 1;
4331}
4332if( dov < 5 )
4333{
4334visitDepth = dov.toString();
4335}
4336else if( dov < 11 )
4337{
4338visitDepth = '5-10';
4339}
4340else if( dov < 21 )
4341{
4342visitDepth = '11-20';
4343}
4344else
4345{
4346visitDepth = '21 or more';
4347}
4348googletag.pubads().setTargeting( 'visitDepth', visitDepth );
4349var meteredStories = $( '#sticky-messenger' ).meteredMessenger( 'getMeteredStoryIds' );
4350googletag.pubads().setTargeting(
4351'meterCount', meteredStories.length
4352);
4353if( /^stage/.test( document.location.host ) )
4354{
4355googletag.pubads().setTargeting( 'special', 'test' );
4356}
4357;
4358}
4359catch( e )
4360{
4361console.log( e );
4362}
4363},
4364csmAdSlot: function( elementId, slotName, sizeMap )
4365{
4366var thisPlugin = this;
4367var element = document.getElementById( elementId );
4368var slot;
4369if( element )
4370{
4371var _notice = this.settings.notice;
4372var _adUnitName = 'responsive';
4373var _allowedSizes = this.settings.allowedSizes;
4374var wrapper = document.createElement( 'span' );
4375wrapper.style = 'display:inline-block;';
4376var adContainer = document.createElement( 'span' );
4377adContainer.id = slotName;
4378wrapper.appendChild( adContainer );
4379var about = document.createElement( 'a' );
4380about.href = _notice.url;
4381about.className = _notice.class;
4382about.innerText = _notice.text;
4383wrapper.appendChild( about );
4384element.appendChild( wrapper );
4385slot = googletag
4386.defineSlot( '/' + this.settings.account + '/' + _adUnitName, _allowedSizes, slotName );
4387if( slot )
4388{
4389slot
4390.defineSizeMapping( sizeMap )
4391.setTargeting( 'slotname', slotName )
4392.addService( googletag.pubads() );
4393googletag.display( slot );
4394thisPlugin.adSlots[ slotName ] =
4395{
4396wrapper: element,
4397slot: slot,
4398};
4399}
4400}
4401return slot;
4402},
4403csmDynamicAdSlot: function( element, sizeMap )
4404{
4405var thisPlugin = this;
4406$( element ).addClass( 'ad-positioner' );
4407var wrapperName = this.generateNextSlotName();
4408var slotName = 'dfp-' + wrapperName;
4409var $adWrapper = $( '<div id="'+ wrapperName +'" class="ad-wrapper"></div>' );
4410$( element ).append( $adWrapper );
4411var slot = this.csmAdSlot( wrapperName, slotName, sizeMap, true );
4412return slot;
4413},
4414nextSlotId: 1,
4415generateNextSlotName: function()
4416{
4417var id = this.nextSlotId++;
4418return 'dynamicAdSlot' + id;
4419},
4420csmOutOfPageSlot: function( elementId, unitName )
4421{
4422var thisPlugin = this;
4423var $adWrapper = $( '<div id="'+ elementId +'" class="ad"></div>' );
4424$( 'body' ).append( $adWrapper );
4425var slot = googletag.defineSlot(
4426'/' + this.settings.account + '/' + unitName,
4427[ [ 1, 1 ] ],
4428'dfp-' + elementId
4429).addService( googletag.pubads() );
4430googletag.display( elementId );
4431thisPlugin.adSlots[ 'dfp-' + elementId ] =
4432{
4433wrapper: $adWrapper.get(0),
4434slot: slot,
4435};
4436return slot;
4437}
4438};
4439function pageGetsAds()
4440{
4441if(
4442paywallReached() ||
4443isSponsoredContent() ||
4444isDaily() ||
4445isAuth() ||
4446csmJs.util.isSubscriber() ||
4447adsSuppressed() ||
4448adsDisabled() ||
4449isCSArticle()
4450)
4451{
4452return false;
4453}
4454else
4455{
4456return true;
4457}
4458}
4459function paywallReached()
4460{
4461return $( 'body' ).hasClass( 'display-paywall' );
4462}
4463function isSponsoredContent()
4464{
4465return /^sponsor/.test( csmJs.pageData.story_source );
4466}
4467function isDaily()
4468{
4469return /^\/(daily)/i.test( document.location.pathname );
4470}
4471function isAuth()
4472{
4473return /^\/(auth)/i.test( document.location.pathname );
4474}
4475function adsSuppressed()
4476{
4477return $( 'meta[name="csm_suppress_ads"]' ).length && $( 'meta[name="csm_suppress_ads"]' ).attr( 'content' ).toLowerCase() === 'true';
4478}
4479function adsDisabled()
4480{
4481return csmJs.disableAds === true;
4482}
4483function isCSArticle()
4484{
4485var isCSP = false;
4486if ( Array.isArray( csmJs.pageData.sections ) && csmJs.pageData.sections.indexOf( 'A Christian Science Perspective' ) > -1 )
4487{
4488isCSP = true;
4489}
4490return isCSP;
4491}
4492$.fn[ pluginName ] = function( options )
4493{
4494var args = arguments;
4495if( options === undefined || typeof options === 'object' )
4496{
4497return this.each( function()
4498{
4499if( !$.data( this, 'plugin_' + pluginName ) )
4500{
4501$.data( this, 'plugin_' + pluginName, new Plugin( this, options ) );
4502}
4503} );
4504}
4505else if( typeof options === 'string' && options[ 0 ] !== '_' && options !== 'init' )
4506{
4507var returns;
4508this.each( function()
4509{
4510var instance = $.data( this, 'plugin_' + pluginName );
4511if( instance instanceof Plugin && typeof instance[ options ] === 'function' )
4512{
4513returns = instance[ options ].apply( instance, Array.prototype.slice.call( args, 1 ) );
4514}
4515if( options === 'destroy' )
4516{
4517$.data( this, 'plugin_' + pluginName, null );
4518}
4519} );
4520return returns !== undefined ? returns : this;
4521}
4522};
4523})( jQuery, window, document );
4524!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@popperjs/core")):"function"==typeof define&&define.amd?define(["@popperjs/core"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e(t.Popper)}(this,(function(t){"use strict";function e(t){if(t&&t.__esModule)return t;const e=Object.create(null);if(t)for(const i in t)if("default"!==i){const s=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>t[i]})}return e.default=t,Object.freeze(e)}const i=e(t),s="transitionend",n=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),e=i&&"#"!==i?i.trim():null}return e},o=t=>{const e=n(t);return e&&document.querySelector(e)?e:null},r=t=>{const e=n(t);return e?document.querySelector(e):null},a=t=>{t.dispatchEvent(new Event(s))},l=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),c=t=>l(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(t):null,h=(t,e,i)=>
4524{Object.keys(i).forEach((s=>{const n=i[s],o=e[s],r=o&&l(o)?"element":null==(a=o)?`${a}`:{}.toString.call(a).match(/\s([a-z]+)/i)[1].toLowerCase();var a;if(!new RegExp(n).test(r))throw new TypeError(`${t.toUpperCase()}: Option "${s}" provided type "${r}" but expected type "${n}".`)}))},d=t=>!(!l(t)||0===t.getClientRects().length)&&"visible"===getComputedStyle(t).getPropertyValue("visibility"),u=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),g=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?g(t.parentNode):null},_=()=>{},f=t=>{t.offsetHeight},p=()=>{const{jQuery:t}=window;return t&&!document.body.hasAttribute("data-bs-no-jquery")?t:null},m=[],b=()=>"rtl"===document.documentElement.dir,v=t=>{var e;e=()=>{const e=p();if(e){const i=t.NAME,s=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=s,t.jQueryInterface)}},"loading"===document.readyState?(m.length||document.addEventListener("DOMContentLoaded",(()=>{m.forEach((t=>t()))})),m.push(e)):e()},y=t=>{"function"==typeof t&&t()},E=(t,e,i=!0)=>{if(!i)return void y(t);const n=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const s=Number.parseFloat(e),n=Number.parseFloat(i);return s||n?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(e)+5;let o=!1;const r=({target:i})=>{i===e&&(o=!0,e.removeEventListener(s,r),y(t))};e.addEventListener(s,r),setTimeout((()=>{o||a(e)}),n)},w=(t,e,i,s)=>{let n=t.indexOf(e);if(-1===n)return t[!i&&s?t.length-1:0];const o=t.length;return n+=i?1:-1,s&&(n=(n+o)%o),t[Math.max(0,Math.min(n,o-1))]},A=/[^.]*(?=\..*)\.|.*/,T=/\..*/,C=/::\d+$/,k={};let L=1;
4524const S={mouseenter:"mouseover",mouseleave:"mouseout"},O=/^(mouseenter|mouseleave)/i,N=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function D(t,e){return e&&`${e}::${L++}`||t.uidEvent||L++}function I(t){const e=D(t);return t.uidEvent=e,k[e]=k[e]||{},k[e]}function P(t,e,i=null){const s=Object.keys(t);for(let n=0,o=s.length;n<o;n++){const o=t[s[n]];if(o.originalHandler===e&&o.delegationSelector===i)return o}return null}function x(t,e,i){const s="string"==typeof e,n=s?i:e;let o=H(t);return N.has(o)||(o=t),[s,n,o]}function M(t,e,i,s,n){if("string"!=typeof e||!t)return;if(i||(i=s,s=null),O.test(e)){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};s?s=t(s):i=t(i)}const[o,r,a]=x(e,i,s),l=I(t),c=l[a]||(l[a]={}),h=P(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&n);const d=D(r,e.replace(A,"")),u=o?function(t,e,i){return function s(n){const o=t.querySelectorAll(e);for(let{target:r}=n;r&&r!==this;r=r.parentNode)for(let a=o.length;a--;)if(o[a]===r)return n.delegateTarget=r,s.oneOff&&$.off(t,n.type,e,i),i.apply(r,[n]);return null}}(t,i,s):function(t,e){return function i(s){return s.delegateTarget=t,i.oneOff&&$.off(t,s.type,e),e.apply(t,[s])}}(t,i);u.delegationSelector=o?i:null,u.originalHandler=r,u.oneOff=n,u.uidEvent=d,c[d]=u,t.addEventListener(a,u,o)}function j(t,e,i,s,n){const o=P(e[i],s,n);o&&(t.removeEventListener(i,o,Boolean(n)),delete e[i][o.uidEvent])}function H(t){return t=t.replace(T,""),S[t]||t}const $={on(t,e,i,s){M(t,e,i,s,!1)},one(t,e,i,s){M(t,e,i,s,!0)},off(t,e,i,s){if("string"!=typeof e||!t)return;const[n,o,r]=x(e,i,s),a=r!==e,l=I(t),c=e.startsWith(".");if(void 0!==o){if(!l||!l[r])return;return void j(t,l,r,o,n?i:null)}c&&Object.keys(l).forEach((i=>{!function(t,e,i,s){const n=e[i]||{};Object.keys(n).forEach((o=>{if(o.includes(s)){const s=n[o];j(t,e,i,s.originalHandler,s.delegationSelector)}}))}(t,l,i,e.slice(1))}));const h=l[r]||{};Object.keys(h).forEach((i=>{const s=i.replace(C,"");if(!a||e.includes(s)){const e=h[i];j(t,l,r,e.originalHandler,e.delegationSelector)}}))},trigger(t,e,i){if("string"!=typeof e||!t)return null;const s=p(),n=H(e),o=e!==n,r=N.has(n);let a,l=!0,c=!0,h=!1,d=null;return o&&s&&(a=s.Event(e,i),s(t).trigger(a),l=!a.isPropagationStopped(),c=!a.isImmediatePropagationStopped(),h=a.isDefaultPrevented()),r?(d=document.createEvent("HTMLEvents"),d.initEvent(n,l,!0)):d=new CustomEvent(e,{bubbles:l,cancelable:!0}
4524),void 0!==i&&Object.keys(i).forEach((t=>{Object.defineProperty(d,t,{get:()=>i[t]})})),h&&d.preventDefault(),c&&t.dispatchEvent(d),d.defaultPrevented&&void 0!==a&&a.preventDefault(),d}},B=new Map,z={set(t,e,i){B.has(t)||B.set(t,new Map);const s=B.get(t);s.has(e)||0===s.size?s.set(e,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(s.keys())[0]}.`)},get:(t,e)=>B.has(t)&&B.get(t).get(e)||null,remove(t,e){if(!B.has(t))return;const i=B.get(t);i.delete(e),0===i.size&&B.delete(t)}};class R{constructor(t){(t=c(t))&&(this._element=t,z.set(this._element,this.constructor.DATA_KEY,this))}dispose(){z.remove(this._element,this.constructor.DATA_KEY),$.off(this._element,this.constructor.EVENT_KEY),Object.getOwnPropertyNames(this).forEach((t=>{this[t]=null}))}_queueCallback(t,e,i=!0){E(t,e,i)}static getInstance(t){return z.get(c(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.1.3"}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}}const F=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,s=t.NAME;$.on(document,i,`[data-bs-dismiss="${s}"]`,(function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),u(this))return;const n=r(this)||this.closest(`.${s}`);t.getOrCreateInstance(n)[e]()}))};class q extends R{static get NAME(){return"alert"}close(){if($.trigger(this._element,"close.bs.alert").defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),$.trigger(this._element,"closed.bs.alert"),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=q.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}F(q,"close"),v(q);const W='[data-bs-toggle="button"]';class U extends R{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each((function(){const e=U.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}function K(t){return"true"===t||"false"!==t&&(t===Number(t).toString()?Number(t):""===t||"null"===t?null:t)}function V(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}$.on(document,"click.bs.button.data-api",W,(t=>{t.preventDefault();const e=t.target.closest(W);U.getOrCreateInstance(e).toggle()})),v(U);const X={setDataAttribute(t,e,i){t.setAttribute(`data-bs-${V(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${V(e)}`)},getDataAttributes(t){if(!t)return{};const e={};return Object.keys(t.dataset).filter((t=>t.startsWith("bs"))).forEach((i=>{let s=i.replace(/^bs/,"");s=s.charAt(0).toLowerCase()+s.slice(1,s.length),e[s]=K(t.dataset[i])})),e},getDataAttribute:(t,e)=>K(t.getAttribute(`data-bs-${V(e)}`)),offset(t){const e=t.getBoundingClientRect();return{top:e.top+window.pageYOffset,left:e.left+window.pageXOffset}},position:t=>({top:t.offsetTop,left:t.offsetLeft})},Y={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const i=[];let s=t.parentNode;for(;s&&s.nodeType===Node.ELEMENT_NODE&&3!==s.nodeType;)s.matches(e)&&i.push(s),s=s.parentNode;return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(", ");return this.find(e,t).filter((t=>!u(t)&&d(t)))}},Q="carousel",G={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},Z={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},J="next",tt="prev",et="left",it="right",st={ArrowLeft:it,ArrowRight:et},nt="slid.bs.carousel",ot="active",rt=".active.carousel-item";class at extends R{constructor(t,e){super(t),this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._indicatorsElement=Y.findOne(".carousel-indicators",this._element),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent),this._addEventListeners()}static get Default(){return G}static get NAME(){return Q}
4524next(){this._slide(J)}nextWhenVisible(){!document.hidden&&d(this._element)&&this.next()}prev(){this._slide(tt)}pause(t){t||(this._isPaused=!0),Y.findOne(".carousel-item-next, .carousel-item-prev",this._element)&&(a(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null}cycle(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config&&this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))}to(t){this._activeElement=Y.findOne(rt,this._element);const e=this._getItemIndex(this._activeElement);if(t>this._items.length-1||t<0)return;if(this._isSliding)return void $.one(this._element,nt,(()=>this.to(t)));if(e===t)return this.pause(),void this.cycle();const i=t>e?J:tt;this._slide(i,this._items[t])}_getConfig(t){return t={...G,...X.getDataAttributes(this._element),..."object"==typeof t?t:{}},h(Q,t,Z),t}_handleSwipe(){const t=Math.abs(this.touchDeltaX);if(t<=40)return;const e=t/this.touchDeltaX;this.touchDeltaX=0,e&&this._slide(e>0?it:et)}_addEventListeners(){this._config.keyboard&&$.on(this._element,"keydown.bs.carousel",(t=>this._keydown(t))),"hover"===this._config.pause&&($.on(this._element,"mouseenter.bs.carousel",(t=>this.pause(t))),$.on(this._element,"mouseleave.bs.carousel",(t=>this.cycle(t)))),this._config.touch&&this._touchSupported&&this._addTouchEventListeners()}_addTouchEventListeners(){const t=t=>this._pointerEvent&&("pen"===t.pointerType||"touch"===t.pointerType),e=e=>{t(e)?this.touchStartX=e.clientX:this._pointerEvent||(this.touchStartX=e.touches[0].clientX)},i=t=>{this.touchDeltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this.touchStartX},s=e=>{t(e)&&(this.touchDeltaX=e.clientX-this.touchStartX),this._handleSwipe(),"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((t=>this.cycle(t)),500+this._config.interval))};Y.find(".carousel-item img",this._element).forEach((t=>{$.on(t,"dragstart.bs.carousel",(t=>t.preventDefault()))})),this._pointerEvent?($.on(this._element,"pointerdown.bs.carousel",(t=>e(t))),$.on(this._element,"pointerup.bs.carousel",(t=>s(t))),this._element.classList.add("pointer-event")):($.on(this._element,"touchstart.bs.carousel",(t=>e(t))),$.on(this._element,"touchmove.bs.carousel",(t=>i(t))),$.on(this._element,"touchend.bs.carousel",(t=>s(t))))}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=st[t.key];e&&(t.preventDefault(),this._slide(e))}_getItemIndex(t){return this._items=t&&t.parentNode?Y.find(".carousel-item",t.parentNode):[],this._items.indexOf(t)}_getItemByOrder(t,e){const i=t===J;return w(this._items,e,i,this._config.wrap)}_triggerSlideEvent(t,e){const i=this._getItemIndex(t),s=this._getItemIndex(Y.findOne(rt,this._element));return $.trigger(this._element,"slide.bs.carousel",{relatedTarget:t,direction:e,from:s,to:i})}_setActiveIndicatorElement(t){if(this._indicatorsElement){const e=Y.findOne(".active",this._indicatorsElement);e.classList.remove(ot),e.removeAttribute("aria-current");const i=Y.find("[data-bs-target]",this._indicatorsElement);for(let e=0;e<i.length;e++)if(Number.parseInt(i[e].getAttribute("data-bs-slide-to"),10)===this._getItemIndex(t)){i[e].classList.add(ot),i[e].setAttribute("aria-current","true");break}}}_updateInterval(){const t=this._activeElement||Y.findOne(rt,this._element);if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);e?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=e):this._config.interval=this._config.defaultInterval||this._config.interval}_slide(t,e){const i=this._directionToOrder(t),s=Y.findOne(rt,this._element),n=this._getItemIndex(s),o=e||this._getItemByOrder(i,s),r=this._getItemIndex(o),a=Boolean(this._interval),l=i===J,c=l?"carousel-item-start":"carousel-item-end",h=l?"carousel-item-next":"carousel-item-prev",d=this._orderToDirection(i);if(o&&o.classList.contains(ot))return void(this._isSliding=!1);if(this._isSliding)return;if(this._triggerSlideEvent(o,d).defaultPrevented)return;if(!s||!o)return;this._isSliding=!0,a&&this.pause(),this._setActiveIndicatorElement(o),this._activeElement=o;const u=()=>{$.trigger(this._element,nt,{relatedTarget:o,direction:d,from:n,to:r})};if(this._element.classList.contains("slide")){o.classList.add(h),f(o),s.classList.add(c),o.classList.add(c);const t=()=>{o.classList.remove(c,h),o.classList.add(ot),s.classList.remove(ot,h,c),this._isSliding=!1,setTimeout(u,0)};this._queueCallback(t,s,!0)}else s.classList.remove(ot),o.classList.add(ot),this._isSliding=!1,u();a&&this.cycle()}_directionToOrder(t){return[it,et].includes(t)?b()?t===et?tt:J:t===et?J:tt:t}_orderToDirection(t){return[J,tt].includes(t)?b()?t===tt?et:it:t===tt?it:et:t}static carouselInterface(t,e){const i=at.getOrCreateInstance(t,e);let{_config:s}=i;"object"==typeof e&&(s={...s,...e});const n="string"==typeof e?e:s.slide;if("number"==typeof e)i.to(e);else if("string"==typeof n){if(void 0===i[n])throw new TypeError(`No method n
4524amed "${n}"`);i[n]()}else s.interval&&s.ride&&(i.pause(),i.cycle())}static jQueryInterface(t){return this.each((function(){at.carouselInterface(this,t)}))}static dataApiClickHandler(t){const e=r(this);if(!e||!e.classList.contains("carousel"))return;const i={...X.getDataAttributes(e),...X.getDataAttributes(this)},s=this.getAttribute("data-bs-slide-to");s&&(i.interval=!1),at.carouselInterface(e,i),s&&at.getInstance(e).to(s),t.preventDefault()}}$.on(document,"click.bs.carousel.data-api","[data-bs-slide], [data-bs-slide-to]",at.dataApiClickHandler),$.on(window,"load.bs.carousel.data-api",(()=>{const t=Y.find('[data-bs-ride="carousel"]');for(let e=0,i=t.length;e<i;e++)at.carouselInterface(t[e],at.getInstance(t[e]))})),v(at);const lt="collapse",ct={toggle:!0,parent:null},ht={toggle:"boolean",parent:"(null|element)"},dt="show",ut="collapse",gt="collapsing",_t="collapsed",ft=":scope .collapse .collapse",pt='[data-bs-toggle="collapse"]';class mt extends R{constructor(t,e){super(t),this._isTransitioning=!1,this._config=this._getConfig(e),this._triggerArray=[];const i=Y.find(pt);for(let t=0,e=i.length;t<e;t++){const e=i[t],s=o(e),n=Y.find(s).filter((t=>t===this._element));null!==s&&n.length&&(this._selector=s,this._triggerArray.push(e))}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return ct}static get NAME(){return lt}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t,e=[];if(this._config.parent){const t=Y.find(ft,this._config.parent);e=Y.find(".collapse.show, .collapse.collapsing",this._config.parent).filter((e=>!t.includes(e)))}const i=Y.findOne(this._selector);if(e.length){const s=e.find((t=>i!==t));if(t=s?mt.getInstance(s):null,t&&t._isTransitioning)return}if($.trigger(this._element,"show.bs.collapse").defaultPrevented)return;e.forEach((e=>{i!==e&&mt.getOrCreateInstance(e,{toggle:!1}).hide(),t||z.set(e,"bs.collapse",null)}));const s=this._getDimension();this._element.classList.remove(ut),this._element.classList.add(gt),this._element.style[s]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const n=`scroll${s[0].toUpperCase()+s.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(gt),this._element.classList.add(ut,dt),this._element.style[s]="",$.trigger(this._element,"shown.bs.collapse")}),this._element,!0),this._element.style[s]=`${this._element[n]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if($.trigger(this._element,"hide.bs.collapse").defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,f(this._element),this._element.classList.add(gt),this._element.classList.remove(ut,dt);const e=this._triggerArray.length;for(let t=0;t<e;t++){const e=this._triggerArray[t],i=r(e);i&&!this._isShown(i)&&this._addAriaAndCollapsedClass([e],!1)}this._isTransitioning=!0,this._element.style[t]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(gt),this._element.classList.add(ut),$.trigger(this._element,"hidden.bs.collapse")}),this._element,!0)}_isShown(t=this._element){return t.classList.contains(dt)}_getConfig(t){return(t={...ct,...X.getDataAttributes(this._element),...t}).toggle=Boolean(t.toggle),t.parent=c(t.parent),h(lt,t,ht),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=Y.find(ft,this._config.parent);Y.find(pt,this._config.parent).filter((e=>!t.includes(e))).forEach((t=>{const e=r(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))}))}_addAriaAndCollapsedClass(t,e){t.length&&t.forEach((t=>{e?t.classList.remove(_t):t.classList.add(_t),t.setAttribute("aria-expanded",e)}))}static jQueryInterface(t){return this.each((function(){const e={};"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1);const i=mt.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method n
4524amed "${t}"`);i[t]()}}))}}$.on(document,"click.bs.collapse.data-api",pt,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();const e=o(this);Y.find(e).forEach((t=>{mt.getOrCreateInstance(t,{toggle:!1}).toggle()}))})),v(mt);const bt="dropdown",vt="Escape",yt="Space",Et="ArrowUp",wt="ArrowDown",At=new RegExp("ArrowUp|ArrowDown|Escape"),Tt="click.bs.dropdown.data-api",Ct="keydown.bs.dropdown.data-api",kt="show",Lt='[data-bs-toggle="dropdown"]',St=".dropdown-menu",Ot=b()?"top-end":"top-start",Nt=b()?"top-start":"top-end",Dt=b()?"bottom-end":"bottom-start",It=b()?"bottom-start":"bottom-end",Pt=b()?"left-start":"right-start",xt=b()?"right-start":"left-start",Mt={offset:[0,2],boundary:"clippingParents",reference:"toggle",display:"dynamic",popperConfig:null,autoClose:!0},jt={offset:"(array|string|function)",boundary:"(string|element)",reference:"(string|element|object)",display:"string",popperConfig:"(null|object|function)",autoClose:"(boolean|string)"};class Ht extends R{constructor(t,e){super(t),this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar()}static get Default(){return Mt}static get DefaultType(){return jt}static get NAME(){return bt}toggle(){return this._isShown()?this.hide():this.show()}show(){if(u(this._element)||this._isShown(this._menu))return;const t={relatedTarget:this._element};if($.trigger(this._element,"show.bs.dropdown",t).defaultPrevented)return;const e=Ht.getParentFromElement(this._element);this._inNavbar?X.setDataAttribute(this._menu,"popper","none"):this._createPopper(e),"ontouchstart"in document.documentElement&&!e.closest(".navbar-nav")&&[].concat(...document.body.children).forEach((t=>$.on(t,"mouseover",_))),this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(kt),this._element.classList.add(kt),$.trigger(this._element,"shown.bs.dropdown",t)}hide(){if(u(this._element)||!this._isShown(this._menu))return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){$.trigger(this._element,"hide.bs.dropdown",t).defaultPrevented||("ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach((t=>$.off(t,"mouseover",_))),this._popper&&this._popper.destroy(),this._menu.classList.remove(kt),this._element.classList.remove(kt),this._element.setAttribute("aria-expanded","false"),X.removeDataAttribute(this._menu,"popper"),$.trigger(this._element,"hidden.bs.dropdown",t))}_getConfig(t){if(t={...this.constructor.Default,...X.getDataAttributes(this._element),...t},h(bt,t,this.constructor.DefaultType),"object"==typeof t.reference&&!l(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${bt.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(t){if(void 0===i)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;"parent"===this._config.reference?e=t:l(this._config.reference)?e=c(this._config.reference):"object"==typeof this._config.reference&&(e=this._config.reference);const s=this._getPopperConfig(),n=s.modifiers.find((t=>"applyStyles"===t.name&&!1===t.enabled));this._popper=i.createPopper(e,this._menu,s),n&&X.setDataAttribute(this._menu,"popper","static")}_isShown(t=this._element){return t.classList.contains(kt)}_getMenuElement(){return Y.next(this._element,St)[0]}_getPlacement(){const t=this._element.parentNode;if(t.classList.contains("dropend"))return Pt;if(t.classList.contains("dropstart"))return xt;const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?Nt:Ot:e?It:Dt}
4524_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return"static"===this._config.display&&(t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,..."function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_selectMenuItem({key:t,target:e}){const i=Y.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(d);i.length&&w(i,e,t===wt,!i.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=Ht.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(t&&(2===t.button||"keyup"===t.type&&"Tab"!==t.key))return;const e=Y.find(Lt);for(let i=0,s=e.length;i<s;i++){const s=Ht.getInstance(e[i]);if(!s||!1===s._config.autoClose)continue;if(!s._isShown())continue;const n={relatedTarget:s._element};if(t){const e=t.composedPath(),i=e.includes(s._menu);if(e.includes(s._element)||"inside"===s._config.autoClose&&!i||"outside"===s._config.autoClose&&i)continue;if(s._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;"click"===t.type&&(n.clickEvent=t)}s._completeHide(n)}}static getParentFromElement(t){return r(t)||t.parentNode}static dataApiKeydownHandler(t){if(/input|textarea/i.test(t.target.tagName)?t.key===yt||t.key!==vt&&(t.key!==wt&&t.key!==Et||t.target.closest(St)):!At.test(t.key))return;const e=this.classList.contains(kt);if(!e&&t.key===vt)return;if(t.preventDefault(),t.stopPropagation(),u(this))return;const i=this.matches(Lt)?this:Y.prev(this,Lt)[0],s=Ht.getOrCreateInstance(i);if(t.key!==vt)return t.key===Et||t.key===wt?(e||s.show(),void s._selectMenuItem(t)):void(e&&t.key!==yt||Ht.clearMenus());s.hide()}}$.on(document,Ct,Lt,Ht.dataApiKeydownHandler),$.on(document,Ct,St,Ht.dataApiKeydownHandler),$.on(document,Tt,Ht.clearMenus),$.on(document,"keyup.bs.dropdown.data-api",Ht.clearMenus),$.on(document,Tt,Lt,(function(t){t.preventDefault(),Ht.getOrCreateInstance(this).toggle()})),v(Ht);const $t=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Bt=".sticky-top";class zt{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,"paddingRight",(e=>e+t)),this._setElementAttributes($t,"paddingRight",(e=>e+t)),this._setElementAttributes(Bt,"marginRight",(e=>e-t))}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const s=this.getWidth();this._applyManipulationCallback(t,(t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+s)return;this._saveInitialAttribute(t,e);const n=window.getComputedStyle(t)[e];t.style[e]=`${i(Number.parseFloat(n))}px`}))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,"paddingRight"),this._resetElementAttributes($t,"paddingRight"),this._resetElementAttributes(Bt,"marginRight")}_saveInitialAttribute(t,e){const i=t.style[e];i&&X.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,(t=>{const i=X.getDataAttribute(t,e);void 0===i?t.style.removeProperty(e):(X.removeDataAttribute(t,e),t.style[e]=i)}))}_applyManipulationCallback(t,e){l(t)?e(t):Y.find(t,this._element).forEach(e)}isOverflowing(){return this.getWidth()>0}}const Rt={className:"modal-backdrop",isVisible:!0,isAnimated:!1,rootElement:"body",clickCallback:null},Ft={className:"string",isVisible:"boolean",isAnimated:"boolean",rootElement:"(element|string)",clickCallback:"(function|null)"},qt="show",Wt="mousedown.bs.backdrop";class Ut{constructor(t){this._config=this._getConfig(t),this._isAppended=!1,this._element=null}show(t){this._config.isVisible?(this._append(),this._config.isAnimated&&f(this._getElement()),this._getElement().classList.add(qt),this._emulateAnimation((()=>{y(t)}))):y(t)}hide(t){this._config.isVisible?(this._getElement().classList.remove(qt),this._emulateAnimation((()=>{this.dispose(),y(t)}))):y(t)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_getConfig(t){return(t={...Rt,..."object"==typeof t?t:{}}).rootElement=c(t.rootElement),h("backdrop",t,Ft),t}_append(){this._isAppended||(this._config.rootElement.append(this._getElement()),$.on(this._getElement(),Wt,(()=>{y(this._config.clickCallback)})),this._isAppended=!0)}dispose(){this._isAppended&&($.off(this._element,Wt),this._element.remove(),this._isAppended=!1)}_emulateAnimation(t){E(t,this._getElement(),this._config.isAnimated)}}const Kt={trapElement:null,autofocus:!0},Vt={trapElement:"element",autofocus:"boolean"}
4524,Xt=".bs.focustrap",Yt="backward";class Qt{constructor(t){this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}activate(){const{trapElement:t,autofocus:e}=this._config;this._isActive||(e&&t.focus(),$.off(document,Xt),$.on(document,"focusin.bs.focustrap",(t=>this._handleFocusin(t))),$.on(document,"keydown.tab.bs.focustrap",(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,$.off(document,Xt))}_handleFocusin(t){const{target:e}=t,{trapElement:i}=this._config;if(e===document||e===i||i.contains(e))return;const s=Y.focusableChildren(i);0===s.length?i.focus():this._lastTabNavDirection===Yt?s[s.length-1].focus():s[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?Yt:"forward")}_getConfig(t){return t={...Kt,..."object"==typeof t?t:{}},h("focustrap",t,Vt),t}}const Gt="modal",Zt="Escape",Jt={backdrop:!0,keyboard:!0,focus:!0},te={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean"},ee="hidden.bs.modal",ie="show.bs.modal",se="resize.bs.modal",ne="click.dismiss.bs.modal",oe="keydown.dismiss.bs.modal",re="mousedown.dismiss.bs.modal",ae="modal-open",le="show",ce="modal-static";class he extends R{constructor(t,e){super(t),this._config=this._getConfig(e),this._dialog=Y.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollBar=new zt}static get Default(){return Jt}static get NAME(){return Gt}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||$.trigger(this._element,ie,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isAnimated()&&(this._isTransitioning=!0),this._scrollBar.hide(),document.body.classList.add(ae),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),$.on(this._dialog,re,(()=>{$.one(this._element,"mouseup.dismiss.bs.modal",(t=>{t.target===this._element&&(this._ignoreBackdropClick=!0)}))})),this._showBackdrop((()=>this._showElement(t))))}hide(){if(!this._isShown||this._isTransitioning)return;if($.trigger(this._element,"hide.bs.modal").defaultPrevented)return;this._isShown=!1;const t=this._isAnimated();t&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),this._focustrap.deactivate(),this._element.classList.remove(le),$.off(this._element,ne),$.off(this._dialog,re),this._queueCallback((()=>this._hideModal()),this._element,t)}dispose(){[window,this._dialog].forEach((t=>$.off(t,".bs.modal"))),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Ut({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Qt({trapElement:this._element})}_getConfig(t){return t={...Jt,...X.getDataAttributes(this._element),..."object"==typeof t?t:{}},h(Gt,t,te),t}_showElement(t){const e=this._isAnimated(),i=Y.findOne(".modal-body",this._dialog);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0,i&&(i.scrollTop=0),e&&f(this._element),this._element.classList.add(le),this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,$.trigger(this._element,"shown.bs.modal",{relatedTarget:t})}),this._dialog,e)}_setEscapeEvent(){this._isShown?$.on(this._element,oe,(t=>{this._config.keyboard&&t.key===Zt?(t.preventDefault(),this.hide()):this._config.keyboard||t.key!==Zt||this._triggerBackdropTransition()})):$.off(this._element,oe)}_setResizeEvent(){this._isShown?$.on(window,se,(()=>this._adjustDialog())):$.off(window,se)}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(ae),this._resetAdjustments(),this._scrollBar.reset(),$.trigger(this._element,ee)}))}_showBackdrop(t){$.on(this._element,ne,(t=>{this._ignoreBackdropClick?this._ignoreBackdropClick=!1:t.target===t.currentTarget&&(!0===this._config.backdrop?this.hide():"static"===this._config.backdrop&&this._triggerBackdropTransition())})),this._backdrop.show(t)}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if($.trigger(this._element,"hidePrevented.bs.modal").defaultPrevented)return;const{classList:t,scrollHeight:e,style:i}=this._element,s=e>document.documentElement.clientHeight;!s&&"hidden"===i.overflowY||t.contains(ce)||(s||(i.overflowY="hidden"),t.add(ce),this._queueCallback((()=>{t.remove(ce),s||this._queueCallback((()=>{i.overflowY=""}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),i=e>0;(!i&&t&&!b()||i&&!t&&b())&&(this._element.style.paddingLeft=`${e}px`),(i&&!t&&!b()||!i&&t&&b())&&(this._element.style.paddingRight=`${e}px`)}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const i=he.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method n
4524amed "${t}"`);i[t](e)}}))}}$.on(document,"click.bs.modal.data-api",'[data-bs-toggle="modal"]',(function(t){const e=r(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),$.one(e,ie,(t=>{t.defaultPrevented||$.one(e,ee,(()=>{d(this)&&this.focus()}))}));const i=Y.findOne(".modal.show");i&&he.getInstance(i).hide(),he.getOrCreateInstance(e).toggle(this)})),F(he),v(he);const de="offcanvas",ue={backdrop:!0,keyboard:!0,scroll:!1},ge={backdrop:"boolean",keyboard:"boolean",scroll:"boolean"},_e="show",fe=".offcanvas.show",pe="hidden.bs.offcanvas";class me extends R{constructor(t,e){super(t),this._config=this._getConfig(e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get NAME(){return de}static get Default(){return ue}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||$.trigger(this._element,"show.bs.offcanvas",{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._element.style.visibility="visible",this._backdrop.show(),this._config.scroll||(new zt).hide(),this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(_e),this._queueCallback((()=>{this._config.scroll||this._focustrap.activate(),$.trigger(this._element,"shown.bs.offcanvas",{relatedTarget:t})}),this._element,!0))}hide(){this._isShown&&($.trigger(this._element,"hide.bs.offcanvas").defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.remove(_e),this._backdrop.hide(),this._queueCallback((()=>{this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._element.style.visibility="hidden",this._config.scroll||(new zt).reset(),$.trigger(this._element,pe)}),this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_getConfig(t){return t={...ue,...X.getDataAttributes(this._element),..."object"==typeof t?t:{}},h(de,t,ge),t}_initializeBackDrop(){return new Ut({className:"offcanvas-backdrop",isVisible:this._config.backdrop,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:()=>this.hide()})}_initializeFocusTrap(){return new Qt({trapElement:this._element})}_addEventListeners(){$.on(this._element,"keydown.dismiss.bs.offcanvas",(t=>{this._config.keyboard&&"Escape"===t.key&&this.hide()}))}static jQueryInterface(t){return this.each((function(){const e=me.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}$.on(document,"click.bs.offcanvas.data-api",'[data-bs-toggle="offcanvas"]',(function(t){const e=r(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),u(this))return;$.one(e,pe,(()=>{d(this)&&this.focus()}));const i=Y.findOne(fe);i&&i!==e&&me.getInstance(i).hide(),me.getOrCreateInstance(e).toggle(this)})),$.on(window,"load.bs.offcanvas.data-api",(()=>Y.find(fe).forEach((t=>me.getOrCreateInstance(t).show())))),F(me),v(me);const be=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),ve=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,ye=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,Ee=(t,e)=>{const i=t.nodeName.toLowerCase();if(e.includes(i))return!be.has(i)||Boolean(ve.test(t.nodeValue)||ye.test(t.nodeValue));const s=e.filter((t=>t instanceof RegExp));for(let t=0,e=s.length;t<e;t++)if(s[t].test(i))return!0;return!1};function we(t,e,i){if(!t.length)return t;if(i&&"function"==typeof i)return i(t);const s=(new window.DOMParser).parseFromString(t,"text/html"),n=[].concat(...s.body.querySelectorAll("*"));for(let t=0,i=n.length;t<i;t++){const i=n[t],s=i.nodeName.toLowerCase();if(!Object.keys(e).includes(s)){i.remove();continue}const o=[].concat(...i.attributes),r=[].concat(e["*"]||[],e[s]||[]);o.forEach((t=>{Ee(t,r)||i.removeAttribute(t.nodeName)}))}return s.body.innerHTML}const Ae="tooltip",Te=new Set(["sanitize","allowList","sanitizeFn"]),Ce={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(array|string|function)",container:"(string|element|boolean)",fallbackPlacements:"array",boun
4524dary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",allowList:"object",popperConfig:"(null|object|function)"},ke={AUTO:"auto",TOP:"top",RIGHT:b()?"left":"right",BOTTOM:"bottom",LEFT:b()?"right":"left"},Le={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:[0,0],container:!1,fallbackPlacements:["top","right","bottom","left"],boundary:"clippingParents",customClass:"",sanitize:!0,sanitizeFn:null,allowList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},popperConfig:null},Se={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},Oe="fade",Ne="show",De="show",Ie="out",Pe=".tooltip-inner",xe=".modal",Me="hide.bs.modal",je="hover",He="focus";class $e extends R{constructor(t,e){if(void 0===i)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this._config=this._getConfig(e),this.tip=null,this._setListeners()}static get Default(){return Le}static get NAME(){return Ae}static get Event(){return Se}static get DefaultType(){return Ce}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(t){if(this._isEnabled)if(t){const e=this._initializeOnDelegatedTarget(t);e._activeTrigger.click=!e._activeTrigger.click,e._isWithActiveTrigger()?e._enter(null,e):e._leave(null,e)}else{if(this.getTipElement().classList.contains(Ne))return void this._leave(null,this);this._enter(null,this)}}dispose(){clearTimeout(this._timeout),$.off(this._element.closest(xe),Me,this._hideModalHandler),this.tip&&this.tip.remove(),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this.isWithContent()||!this._isEnabled)return;const t=$.trigger(this._element,this.constructor.Event.SHOW),e=g(this._element),s=null===e?this._element.ownerDocument.documentElement.contains(this._element):e.contains(this._element);if(t.defaultPrevented||!s)return;"tooltip"===this.constructor.NAME&&this.tip&&this.getTitle()!==this.tip.querySelector(Pe).innerHTML&&(this._disposePopper(),this.tip.remove(),this.tip=null);const n=this.getTipElement(),o=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME);n.setAttribute("id",o),this._element.setAttribute("aria-describedby",o),this._config.animation&&n.classList.add(Oe);const r="function"==typeof this._config.placement?this._config.placement.call(this,n,this._element):this._config.placement,a=this._getAttachment(r);this._addAttachmentClass(a);const{container:l}=this._config;z.set(n,this.constructor.DATA_KEY,this),this._element.ownerDocument.documentElement.contains(this.tip)||(l.append(n),$.trigger(this._element,this.constructor.Event.INSERTED)),this._popper?this._popper.update():this._popper=i.createPopper(this._element,n,this._getPopperConfig(a)),n.classList.add(Ne);const c=this._resolvePossibleFunction(this._config.customClass);c&&n.classList.add(...c.split(" ")),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach((t=>{$.on(t,"mouseover",_)}));const h=this.tip.classList.contains(Oe);this._queueCallback((()=>{const t=this._hoverState;this._hoverState=null,$.trigger(this._element,this.constructor.Event.SHOWN),t===Ie&&this._leave(null,this)}),this.tip,h)}hide(){if(!this._popper)return;const t=this.getTipElement();if($.trigger(this._element,this.constructor.Event.HIDE).defaultPrevented)return;t.classList.remove(Ne),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEac
4524h((t=>$.off(t,"mouseover",_))),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1;const e=this.tip.classList.contains(Oe);this._queueCallback((()=>{this._isWithActiveTrigger()||(this._hoverState!==De&&t.remove(),this._cleanTipClass(),this._element.removeAttribute("aria-describedby"),$.trigger(this._element,this.constructor.Event.HIDDEN),this._disposePopper())}),this.tip,e),this._hoverState=""}update(){null!==this._popper&&this._popper.update()}isWithContent(){return Boolean(this.getTitle())}getTipElement(){if(this.tip)return this.tip;const t=document.createElement("div");t.innerHTML=this._config.template;const e=t.children[0];return this.setContent(e),e.classList.remove(Oe,Ne),this.tip=e,this.tip}setContent(t){this._sanitizeAndSetContent(t,this.getTitle(),Pe)}_sanitizeAndSetContent(t,e,i){const s=Y.findOne(i,t);e||!s?this.setElementContent(s,e):s.remove()}setElementContent(t,e){if(null!==t)return l(e)?(e=c(e),void(this._config.html?e.parentNode!==t&&(t.innerHTML="",t.append(e)):t.textContent=e.textContent)):void(this._config.html?(this._config.sanitize&&(e=we(e,this._config.allowList,this._config.sanitizeFn)),t.innerHTML=e):t.textContent=e)}getTitle(){const t=this._element.getAttribute("data-bs-original-title")||this._config.title;return this._resolvePossibleFunction(t)}updateAttachment(t){return"right"===t?"end":"left"===t?"start":t}_initializeOnDelegatedTarget(t,e){return e||this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return"function"==typeof t?t.call(this._element):t}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"onChange",enabled:!0,phase:"afterWrite",fn:t=>this._handlePopperPlacementChange(t)}],onFirstUpdate:t=>{t.options.placement!==t.placement&&this._handlePopperPlacementChange(t)}};return{...e,..."function"==typeof this._config.popperConfig?this._config.popperConfig(e):this._config.popperConfig}}_addAttachmentClass(t){this.getTipElement().classList.add(`${this._getBasicClassPrefix()}-${this.updateAttachment(t)}`)}_getAttachment(t){return ke[t.toUpperCase()]}_setListeners(){this._config.trigger.split(" ").forEach((t=>{if("click"===t)$.on(this._element,this.constructor.Event.CLICK,this._config.selector,(t=>this.toggle(t)));else if("manual"!==t){const e=t===je?this.constructor.Event.MOUSEENTER:this.constructor.Event.FOCUSIN,i=t===je?this.constructor.Event.MOUSELEAVE:this.constructor.Event.FOCUSOUT;$.on(this._element,e,this._config.selector,(t=>this._enter(t))),$.on(this._element,i,this._config.selector,(t=>this._leave(t)))}})),this._hideModalHandler=()=>{this._element&&this.hide()},$.on(this._element.closest(xe),Me,this._hideModalHandler),this._config.selector?this._config={...this._config,trigger:"manual",selector:""}:this._fixTitle()}_fixTitle(){const t=this._element.getAttribute("title"),e=typeof this._element.getAttribute("data-bs-original-title");(t||"string"!==e)&&(this._element.setAttribute("data-bs-original-title",t||""),!t||this._element.getAttribute("aria-label")||this._element.textContent||this._element.setAttribute("aria-label",t),this._element.setAttribute("title",""))}_enter(t,e){e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger["focusin"===t.type?He:je]=!0),e.getTipElement().classList.contains(Ne)||e._hoverState===De?e._hoverState=De:(clearTimeout(e._timeout),e._hoverState=De,e._config.delay&&e._config.delay.show?e._timeout=setTimeout((()=>{e._hoverState===De&&e.show()}),e._config.delay.show):e.show())}_leave(t,e){e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger["focusout"===t.type?He:je]=e._element.contains(t.relatedTarget)),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=Ie,e._config.delay&&e._config.delay.hide?e._timeout=setTimeout((()=>{e._hoverState===Ie&&e.hide()}),e._config.delay.hide):e.hide())}_isWithActiveTrigger(){for(const t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1}_getConfig(t){const e=X.getDataAttributes(this._element);return Object.keys(e).forEach((t=>{Te.has(t)&&delete e[t]})),(t={...this.constructor.Default,...e,..."object"==typeof t&&t?t:{}}).container=!1===t.container?document.body:c(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),h(Ae,t,this.constructor.DefaultType),t.sanitize&&(t.template=we(t.template,t.allowList,t.sanitizeFn)),t}_getDelegateConfig(){const t={};for(const e in this._config)this.constructor.Default[e]!==this._config[e]&&(t[e]=this._config[e]);return t}_cleanTipClass(){const t=this.getTipElement(),e=new RegExp(`(^|\\s)${this._getBasicClassPrefix()}\\S+`,"g"),i=t.getAttribute("class").match(e);null!==i&&i.length>0&&i.map((t=>
4524t.trim())).forEach((e=>t.classList.remove(e)))}_getBasicClassPrefix(){return"bs-tooltip"}_handlePopperPlacementChange(t){const{state:e}=t;e&&(this.tip=e.elements.popper,this._cleanTipClass(),this._addAttachmentClass(this._getAttachment(e.placement)))}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null)}static jQueryInterface(t){return this.each((function(){const e=$e.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}v($e);const Be={...$e.Default,placement:"right",offset:[0,8],trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'},ze={...$e.DefaultType,content:"(string|element|function)"},Re={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"};class Fe extends $e{static get Default(){return Be}static get NAME(){return"popover"}static get Event(){return Re}static get DefaultType(){return ze}isWithContent(){return this.getTitle()||this._getContent()}setContent(t){this._sanitizeAndSetContent(t,this.getTitle(),".popover-header"),this._sanitizeAndSetContent(t,this._getContent(),".popover-body")}_getContent(){return this._resolvePossibleFunction(this._config.content)}_getBasicClassPrefix(){return"bs-popover"}static jQueryInterface(t){return this.each((function(){const e=Fe.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}v(Fe);const qe="scrollspy",We={offset:10,method:"auto",target:""},Ue={offset:"number",method:"string",target:"(string|element)"},Ke="active",Ve=".nav-link, .list-group-item, .dropdown-item",Xe="position";class Ye extends R{constructor(t,e){super(t),this._scrollElement="BODY"===this._element.tagName?window:this._element,this._config=this._getConfig(e),this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,$.on(this._scrollElement,"scroll.bs.scrollspy",(()=>this._process())),this.refresh(),this._process()}static get Default(){return We}static get NAME(){return qe}refresh(){const t=this._scrollElement===this._scrollElement.window?"offset":Xe,e="auto"===this._config.method?t:this._config.method,i=e===Xe?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),Y.find(Ve,this._config.target).map((t=>{const s=o(t),n=s?Y.findOne(s):null;if(n){const t=n.getBoundingClientRect();if(t.width||t.height)return[X[e](n).top+i,s]}return null})).filter((t=>t)).sort(((t,e)=>t[0]-e[0])).forEach((t=>{this._offsets.push(t[0]),this._targets.push(t[1])}))}dispose(){$.off(this._scrollElement,".bs.scrollspy"),super.dispose()}_getConfig(t){return(t={...We,...X.getDataAttributes(this._element),..."object"==typeof t&&t?t:{}}).target=c(t.target)||document.documentElement,h(qe,t,Ue),t}_getScrollTop(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop}_getScrollHeight(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}_getOffsetHeight(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height}_process(){const t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),i=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=i){const t=this._targets[this._targets.length-1];this._activeTarget!==t&&this._activate(t)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(let e=this._offsets.length;e--;)this._activeTarget!==this._targets[e]&&t>=this._offsets[e]&&(void 0===this._offsets[e+1]||t<this._offsets[e+1])&&this._activate(this._targets[e])}}_activate(t){this._activeTarget=t,this._clear();const e=Ve.split(",").map((e=>`${e}[data-bs-target="${t}"],${e}[href="${t}"]`)),i=Y.findOne(e.join(","),this._config.target);i.classList.add(Ke),i.classList.contains("dropdown-item")?Y.findOne(".dropdown-toggle",i.closest(".dropdown")).classList.add(Ke):Y.parents(i,".nav, .list-group").forEach((t=>{Y.prev(t,".nav-link, .list-group-item").forEach((t=>t.classList.add(Ke))),Y.prev(t,".nav-item").forEach((t=>{Y.children(t,".nav-link").forEach((t=>t.classList.add(Ke)))}))})),$.trigger(this._scrollElement,"activate.bs.scrollspy",{relatedTarget:t})}_clear(){Y.find(Ve,this._config.target).filter((t=>
4524t.classList.contains(Ke))).forEach((t=>t.classList.remove(Ke)))}static jQueryInterface(t){return this.each((function(){const e=Ye.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}$.on(window,"load.bs.scrollspy.data-api",(()=>{Y.find('[data-bs-spy="scroll"]').forEach((t=>new Ye(t)))})),v(Ye);const Qe="active",Ge="fade",Ze="show",Je=".active",ti=":scope > li > .active";class ei extends R{static get NAME(){return"tab"}show(){if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&this._element.classList.contains(Qe))return;let t;const e=r(this._element),i=this._element.closest(".nav, .list-group");if(i){const e="UL"===i.nodeName||"OL"===i.nodeName?ti:Je;t=Y.find(e,i),t=t[t.length-1]}const s=t?$.trigger(t,"hide.bs.tab",{relatedTarget:this._element}):null;if($.trigger(this._element,"show.bs.tab",{relatedTarget:t}).defaultPrevented||null!==s&&s.defaultPrevented)return;this._activate(this._element,i);const n=()=>{$.trigger(t,"hidden.bs.tab",{relatedTarget:this._element}),$.trigger(this._element,"shown.bs.tab",{relatedTarget:t})};e?this._activate(e,e.parentNode,n):n()}_activate(t,e,i){const s=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?Y.children(e,Je):Y.find(ti,e))[0],n=i&&s&&s.classList.contains(Ge),o=()=>this._transitionComplete(t,s,i);s&&n?(s.classList.remove(Ze),this._queueCallback(o,t,!0)):o()}_transitionComplete(t,e,i){if(e){e.classList.remove(Qe);const t=Y.findOne(":scope > .dropdown-menu .active",e.parentNode);t&&t.classList.remove(Qe),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}t.classList.add(Qe),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),f(t),t.classList.contains(Ge)&&t.classList.add(Ze);let s=t.parentNode;if(s&&"LI"===s.nodeName&&(s=s.parentNode),s&&s.classList.contains("dropdown-menu")){const e=t.closest(".dropdown");e&&Y.find(".dropdown-toggle",e).forEach((t=>t.classList.add(Qe))),t.setAttribute("aria-expanded",!0)}i&&i()}static jQueryInterface(t){return this.each((function(){const e=ei.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}$.on(document,"click.bs.tab.data-api",'[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),u(this)||ei.getOrCreateInstance(this).show()})),v(ei);const ii="toast",si="hide",ni="show",oi="showing",ri={animation:"boolean",autohide:"boolean",delay:"number"},ai={animation:!0,autohide:!0,delay:5e3};class li extends R{constructor(t,e){super(t),this._config=this._getConfig(e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get DefaultType(){return ri}static get Default(){return ai}static get NAME(){return ii}show(){$.trigger(this._element,"show.bs.toast").defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(si),f(this._element),this._element.classList.add(ni),this._element.classList.add(oi),this._queueCallback((()=>{this._element.classList.remove(oi),$.trigger(this._element,"shown.bs.toast"),this._maybeScheduleHide()}),this._element,this._config.animation))}hide(){this._element.classList.contains(ni)&&($.trigger(this._element,"hide.bs.toast").defaultPrevented||(this._element.classList.add(oi),this._queueCallback((()=>{this._element.classList.add(si),this._element.classList.remove(oi),this._element.classList.remove(ni),$.trigger(this._element,"hidden.bs.toast")}),this._element,this._config.animation)))}dispose(){this._clearTimeout(),this._element.classList.contains(ni)&&this._element.classList.remove(ni),super.dispose()}_getConfig(t){return t={...ai,...X.getDataAttributes(this._element),..."object"==typeof t&&t?t:{}},h(ii,t,this.constructor.DefaultType),t}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const i=t.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){$.on(this._element,"mouseover.bs.toast",(t=>this._onInteraction(t,!0))),$.on(this._element,"mouseout.bs.toast",(t=>this._onInteraction(t,!1))),$.on(this._element,"focusin.bs.toast",(t=>this._onInteraction(t,!0))),$.on(this._element,"focusout.bs.toast",(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=li.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method n
4524amed "${t}"`);e[t](this)}}))}}return F(li),v(li),{Alert:q,Button:U,Carousel:at,Collapse:mt,Dropdown:Ht,Modal:he,Offcanvas:me,Popover:Fe,ScrollSpy:Ye,Tab:ei,Toast:li,Tooltip:$e}}));
4525class csmHeader {
4526static setDefaults()
4527{
4528this.divHeader = document.getElementById( 'header' );
4529this.divPromo = this.divHeader.querySelector( '.header-promo' );
4530this.bootstrap = bootstrap;
4531this.minHeightForPageScroll = 120;
4532this.scrollPosition = 0;
4533this.debouncedToggleExpandCollapseHeader = this.debounceStaticMethod( this.toggleExpandCollapseHeader, 100 );
4534}
4535static init()
4536{
4537this.setDefaults();
4538this.manageOffCanvasMethods();
4539this.manageCollapseMethods();
4540this.applyLoginStatus();
4541this.setOffcanvasForSkipLinks();
4542this.pageLoadActions();
4543this.pageScrollActions();
4544this.pageResizeActions();
4545this.skipToSearchClick();
4546}
4547static manageOffCanvasMethods()
4548{
4549const that = this;
4550const allOffcanvasHeader = Array.from( document.querySelectorAll( '#header .offcanvas' ) );
4551if( allOffcanvasHeader.length )
4552{
4553Array.prototype.map.call( allOffcanvasHeader, offcanvasMenuItem =>
4554{
4555let triggerMenuOffcanvasButtons = Array.from( document.querySelectorAll( '[data-bs-target="#' + offcanvasMenuItem.getAttribute( 'id' ) + '"]' ) );
4556offcanvasMenuItem.addEventListener( 'show.bs.offcanvas', function()
4557{
4558that.calculateVisibleHeader();
4559Array.prototype.map.call( triggerMenuOffcanvasButtons, triggerOffcanvasButton =>
4560{
4561triggerOffcanvasButton.classList.add( 'active' );
4562} );
4563document.querySelector( 'body' ).classList.add( 'has-visible-offcanvas' );
4564} );
4565offcanvasMenuItem.addEventListener( 'hide.bs.offcanvas', function()
4566{
4567Array.prototype.map.call( triggerMenuOffcanvasButtons, triggerOffcanvasButton =>
4568{
4569triggerOffcanvasButton.classList.remove( 'active' );
4570} )
4571} );
4572offcanvasMenuItem.addEventListener( 'hidden.bs.offcanvas', function()
4573{
4574if( csmHeader.divHeader.querySelectorAll( '.offcanvas.show' ).length == 0 )
4575{
4576document.querySelector( 'body' ).classList.remove( 'has-visible-offcanvas' );
4577}
4578} );
4579} );
4580}
4581const offcanvasSearch = document.querySelector( '#header .offcanvas.search-menu' );
4582if ( offcanvasSearch )
4583{
4584offcanvasSearch.addEventListener( 'show.bs.offcanvas', function()
4585{
4586that.divHeader.classList.add( 'has-expanded-search' );
4587});
4588offcanvasSearch.addEventListener( 'shown.bs.offcanvas', function()
4589{
4590offcanvasSearch.querySelector('input').focus();
4591});
4592offcanvasSearch.addEventListener( 'hide.bs.offcanvas', function()
4593{
4594that.divHeader.classList.remove( 'has-expanded-search' );
4595});
4596}
4597}
4598static manageCollapseMethods()
4599{
4600const that = this;
4601const collapseHeaderLogo = document.getElementById( 'header-logo' );
4602if( collapseHeaderLogo )
4603{
4604collapseHeaderLogo.addEventListener( 'show.bs.collapse', function()
4605{
4606collapseHeaderLogo.classList.add('expanding');
4607that.divHeader.setAttribute( 'data-state-status', 'progress' );
4608} );
4609collapseHeaderLogo.addEventListener( 'shown.bs.collapse', function()
4610{
4611collapseHeaderLogo.classList.remove('expanding');
4612that.divHeader.setAttribute( 'data-state-status', 'complete' );
4613} )
4614collapseHeaderLogo.addEventListener( 'hide.bs.collapse', function()
4615{
4616collapseHeaderLogo.classList.add('minimizing');
4617that.divHeader.setAttribute( 'data-state-status', 'progress' );
4618} );
4619collapseHeaderLogo.addEventListener( 'hidden.bs.collapse', function()
4620{
4621collapseHeaderLogo.classList.remove('minimizing');
4622that.divHeader.setAttribute( 'data-state-status', 'complete' );
4623} )
4624}
4625}
4626static applyLoginStatus()
4627{
4628var bodyTag = document.getElementsByTagName( 'body' )[ 0 ];
4629if( csmJs.util.isLoggedIn() === true )
4630{
4631bodyTag.classList.add( 'logged-in' );
4632}
4633else
4634{
4635bodyTag.classList.add( 'not-logged-in' );
4636}
4637if( csmJs.util.isSubscriber() === true )
4638{
4639bodyTag.classList.add( 'subscriber' );
4640}
4641else
4642{
4643bodyTag.classList.add( 'not-subscriber' );
4644}
4645}
4646static setOffcanvasForSkipLinks()
4647{
4648const skipToSearchButton = document.getElementById( 'skip-to-search' );
4649if( skipToSearchButton )
4650{
4651let viewportWidth = window.innerWidth;
4652let searchOffcanvas = 'offcanvas-search-menu';
4653if( viewportWidth < '1024' )
4654{
4655searchOffcanvas = 'offcanvas-burger-menu';
4656}
4657skipToSearchButton.setAttribute( 'data-bs-target', '#' + searchOffcanvas );
4658skipToSearchButton.setAttribute( 'aria-controls', searchOffcanvas );
4659}
4660}
4661static pageLoadActions()
4662{
4663const that = this;
4664Promise.all( Array.from( document.querySelectorAll( '#header-logo img' ) ).map( img =>
4665{
4666if( img.complete )
4667{
4668return Promise.resolve( img.naturalHeight !== 0 );
4669}
4670return new Promise( resolve =>
4671{
4672img.addEventListener( 'load', () => resolve( true ) );
4673img.addEventListener( 'error', () => resolve( false ) );
4674} );
4675} ) ).then( results =>
4676{
4677if( results.every( res => res ) )
4678{
4679setTimeout( function()
4680{
4681that.calculateVisibleHeader();
4682}, 200, that );
4683that.calculateVisibleHeader();
4684}
4685else
4686{
4687}
4688} );
4689}
4690static pageScrollActions()
4691{
4692const that = this;
4693document.addEventListener( 'scroll', function( e )
4694{
4695that.calculateVisibleHeader();
4696that.debouncedToggleExpandCollapseHeader();
4697} )
4698}
4699static pageResizeActions()
4700{
4701const that = this;
4702addEventListener( 'resize', ( event ) =>
4703{
4704that.calculateVisibleHeader();
4705that.setOffcanvasForSkipLinks();
4706} )
4707}
4708static skipToSearchClick()
4709{
4710const skipToSearchButton = document.getElementById( 'skip-to-search' );
4711if( skipToSearchButton )
4712{
4713skipToSearchButton.addEventListener( 'click', function( event )
4714{
4715let offcanvas = skipToSearchButton.getAttribute( 'data-bs-target' );
4716setTimeout( function()
4717{
4718document.querySelector( offcanvas + ' input[name="SearchText"]' ).focus();
4719}, 500 );
4720} );
4721}
4722}
4723static debounceStaticMethod( func, delay )
4724{
4725let timeoutId;
4726return ( ...args ) =>
4727{
4728clearTimeout( timeoutId );
4729timeoutId = setTimeout( () =>
4730{
4731func( ...args );
4732}, delay );
4733};
4734}
4735static calculateVisibleHeader()
4736{
4737let headerHeight = this.divHeader.offsetHeight;
4738if( document.querySelector( 'body' ).classList.contains( 'ezwt-active' ) )
4739{
4740headerHeight += 40;
4741}
4742let visibleHeader = headerHeight + 'px';
4743let root = document.querySelector( ':root' );
4744root.style.setProperty( '--csm-visible-header', visibleHeader );
4745if( this.divHeader.getAttribute( 'data-state' ) == 'full' && this.divHeader.getAttribute( 'data-state-status' ) == 'complete' )
4746{
4747root.style.setProperty( '--csm-offset-header', visibleHeader );
4748}
4749}
4750static toggleExpandCollapseHeader()
4751{
4752let scrollY = window.scrollY;
4753if( scrollY < csmHeader.minHeightForPageScroll )
4754{
4755if( typeof csmHeader.collapsePromo == 'object' )
4756{
4757csmHeader.collapsePromo.show();
4758}
4759if( typeof csmHeader.collapseCSMLogo == 'object' )
4760{
4761csmHeader.collapseCSMLogo.show();
4762}
4763csmHeader.divHeader.setAttribute( 'data-state', 'full' );
4764}
4765else
4766{
4767if( document.querySelector( '#header .header-promo' ) )
4768{
4769if( typeof csmHeader.collapsePromo != 'object' )
4770{
4771csmHeader.collapsePromo = bootstrap.Collapse.getOrCreateInstance( '#header .header-promo' );
4772}
4773csmHeader.collapsePromo.hide();
4774}
4775if( document.querySelector( '#header-logo' ) )
4776{
4777if( typeof csmHeader.collapseCSMLogo != 'object' )
4778{
4779csmHeader.collapseCSMLogo = bootstrap.Collapse.getOrCreateInstance( '#header-logo' );
4780}
4781csmHeader.collapseCSMLogo.hide();
4782}
4783csmHeader.scrollPosition = scrollY;
4784csmHeader.divHeader.setAttribute( 'data-state', 'mini' );
4785}
4786}
4787}
4788csmHeader.init();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.