PageSourceSearch

https://www.textilzeitung.at/assets/ecc0e3231d4a716b6e2a3e835d505e83.js

js textilzeitung.at collected 2026-10-02 18:04:17 UTC 726,951 bytes, 8,512 lines download raw bytes

vendor: 39,680 bytes, lines 1-6
1/*!
2 * Bootstrap v3.4.1 (https://getbootstrap.com/)
3 * Copyright 2011-2019 Twitter, Inc.
4 * Licensed under the MIT license
5 */
6if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(t){"use strict";var e=jQuery.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||3<e[0])throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(),function(n){"use strict";n.fn.emulateTransitionEnd=function(t){var e=!1,i=this;n(this).one("bsTransitionEnd",function(){e=!0});return setTimeout(function(){e||n(i).trigger(n.support.transition.end)},t),this},n(function(){n.support.transition=function o(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(t.style[i]!==undefined)return{end:e[i]};return!1}(),n.support.transition&&(n.event.special.bsTransitionEnd={bindType:n.support.transition.end,delegateType:n.support.transition.end,handle:function(t){if(n(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})})}(jQuery),function(s){"use strict";var e='[data-dismiss="alert"]',a=function(t){s(t).on("click",e,this.close)};a.VERSION="3.4.1",a.TRANSITION_DURATION=150,a.prototype.close=function(t){var e=s(this),i=e.attr("data-target");i||(i=(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),i="#"===i?[]:i;var o=s(document).find(i);function n(){o.detach().trigger("closed.bs.alert").remove()}t&&t.preventDefault(),o.length||(o=e.closest(".alert")),o.trigger(t=s.Event("close.bs.alert")),t.isDefaultPrevented()||(o.removeClass("in"),s.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",n).emulateTransitionEnd(a.TRANSITION_DURATION):n())};var t=s.fn.alert;s.fn.alert=function o(i){return this.each(function(){var t=s(this),e=t.data("bs.alert");e||t.data("bs.alert",e=new a(this)),"string"==typeof i&&e[i].call(t)})},s.fn.alert.Constructor=a,s.fn.alert.noConflict=function(){return s.fn.alert=t,this},s(document).on("click.bs.alert.data-api",e,a.prototype.close)}(jQuery),function(s){"use strict";var n=function(t,e){this.$element=s(t),this.options=s.extend({},n.DEFAULTS,e),this.isLoading=!1};function i(o){return this.each(function(){var t=s(this),e=t.data("bs.button"),i="object"==typeof o&&o;e||t.data("bs.button",e=new n(this,i)),"toggle"==o?e.toggle():o&&e.setState(o)})}n.VERSION="3.4.1",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(t){var e="disabled",i=this.$element,o=i.is("input")?"val":"html",n=i.data();t+="Text",null==n.resetText&&i.data("resetText",i[o]()),setTimeout(s.proxy(function(){i[o](null==n[t]?this.options[t]:n[t]),"loadingText"==t?(this.isLoading=!0,i.addClass(e).attr(e,e).prop(e,!0)):this.isLoading&&(this.isLoading=!1,i.removeClass(e).removeAttr(e).prop(e,!1))},this),0)},n.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")?(i.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==i.prop("type")&&(i.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),i.prop("checked",this.$element.hasClass("active")),t&&i.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var t=s.fn.button;s.fn.button=i,s.fn.button.Constructor=n,s.fn.button.noConflict=function(){return s.fn.button=t,this},s(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(t){var e=s(t.target).closest(".btn");i.call(e,"toggle"),s(t.target).is('input[type="radio"], input[type="checkbox"]')||(t.preventDefault(),e.is("input,button")?e.trigger("focus"):e.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(t){s(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))})}(jQuery),function(p){"use strict";var c=function(t,e){this.$element=p(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=e,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",p.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",p.proxy(this.pause,this)).on("mouseleave.bs.carousel",p.proxy(this.cycle,this))};function r(n){return this.each(function(){var t=p(this),e=t.data("bs.carousel"),i=p.extend({},c.DEFAULTS,t.data(),"object"==typeof n&&n),o="string"==typeof n?n:i.slide;e||t.data("bs.carousel",e=new c(this,i)),"number"==typeof n?e.to(n):o?e[o]():i.interval&&e.pause().cycle()})}c.VERSION="3.4.1",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},c.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(p.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},c.prototype.getItemForDirection=function(t,e){var i=this.getItemIndex(e);if(("prev"==t&&0===i||"next"==t&&i==this.$items.length-1)&&!this.options.wrap)return e;var o=(i+("prev"==t?-1:1))%this.$items.length;return this.$items.eq(o)},c.prototype.to=function(t){var e=this,i=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):i==t?this.pause().cycle():this.slide(i<t?"next":"prev",this.$items.eq(t))},c.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&p.support.transition&&(this.$element.trigger(p.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){if(!this.sliding)return this.slide("next")},c.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},c.prototype.slide=function(t,e){var i=this.$element.find(".item.active"),o=e||this.getItemForDirection(t,i),n=this.interval,s="next"==t?"left":"right",a=this;if(o.hasClass("active"))return this.sliding=!1;var r=o[0],l=p.Event("slide.bs.carousel",{relatedTarget:r,direction:s});if(this.$element.trigger(l),!l.isDefaultPrevented()){if(this.sliding=!0,n&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var h=p(this.$indicators.children()[this.getItemIndex(o)]);h&&h.addClass("active")}var d=p.Event("slid.bs.carousel",{relatedTarget:r,direction:s});return p.support.transition&&this.$element.hasClass("slide")?(o.addClass(t),"object"==typeof o&&o.length&&o[0].offsetWidth,i.addClass(s),o.addClass(s),i.one("bsTransitionEnd",function(){o.removeClass([t,s].join(" ")).addClass("active"),i.removeClass(["active",s].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger(d)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(i.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(d)),n&&this.cycle(),this}};var t=p.fn.carousel;p.fn.carousel=r,p.fn.carousel.Constructor=c,p.fn.carousel.noConflict=function(){return p.fn.carousel=t,this};var e=function(t){var e=p(this),i=e.attr("href");i&&(i=i.replace(/.*(?=#[^\s]+$)/,""));var o=e.attr("data-target")||i,n=p(document).find(o);if(n.hasClass("carousel")){var s=p.extend({},n.data(),e.data()),a=e.attr("data-slide-to");a&&(s.interval=!1),r.call(n,s),a&&n.data("bs.carousel").to(a),t.preventDefault()}};p(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),p(window).on("load",function(){p('[data-ride="carousel"]').each(function(){var t=p(this);r.call(t,t.data())})})}(jQuery),function(a){"use strict";var r=function(t,e){this.$element=a(t),this.options=a.extend({},r.DEFAULTS,e),this.$trigger=a('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};function n(t){var e,i=t.attr("data-target")||(e=t.attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"");return a(document).find(i)}function l(o){return this.each(function(){var t=a(this),e=t.data("bs.collapse"),i=a.extend({},r.DEFAULTS,t.data(),"object"==typeof o&&o);!e&&i.toggle&&/show|hide/.test(o)&&(i.toggle=!1),e||t.data("bs.collapse",e=new r(this,i)),"string"==typeof o&&e[o]()})}r.VERSION="3.4.1",r.TRANSITION_DURATION=350,r.DEFAULTS={toggle:!0},r.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},r.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var t,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(t=e.data("bs.collapse"))&&t.transitioning)){var i=a.Event("show.bs.collapse");if(this.$element.trigger(i),!i.isDefaultPrevented()){e&&e.length&&(l.call(e,"hide"),t||e.data("bs.collapse",null));var o=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[o](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var n=function(){this.$element.removeClass("collapsing").addClass("collapse in")[o](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return n.call(this);var s=a.camelCase(["scroll",o].join("-"));this.$element.one("bsTransitionEnd",a.proxy(n,this)).emulateTransitionEnd(r.TRANSITION_DURATION)[o](this.$element[0][s])}}}},r.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var t=a.Event("hide.bs.collapse");if(this.$element.trigger(t),!t.isDefaultPrevented()){var e=this.dimension();this.$element[e](this.$element[e]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var i=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!a.support.transition)return i.call(this);this.$element[e](0).one("bsTransitionEnd",a.proxy(i,this)).emulateTransitionEnd(r.TRANSITION_DURATION)}}},r.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},r.prototype.getParent=function(){return a(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(t,e){var i=a(e);this.addAriaAndCollapsedClass(n(i),i)},this)).end()},r.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)};var t=a.fn.collapse;a.fn.collapse=l,a.fn.collapse.Constructor=r,a.fn.collapse.noConflict=function(){return a.fn.collapse=t,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(t){var e=a(this);e.attr("data-target")||t.preventDefault();var i=n(e),o=i.data("bs.collapse")?"toggle":e.data();l.call(i,o)})}(jQuery),function(a){"use strict";var r='[data-toggle="dropdown"]',o=function(t){a(t).on("click.bs.dropdown",this.toggle)};function l(t){var e=t.attr("data-target");e||(e=(e=t.attr("href"))&&/#[A-Za-z]/.test(e)&&e.replace(/.*(?=#[^\s]*$)/,""));var i="#"!==e?a(document).find(e):null;return i&&i.length?i:t.parent()}function s(o){o&&3===o.which||(a(".dropdown-backdrop").remove(),a(r).each(function(){var t=a(this),e=l(t),i={relatedTarget:this};e.hasClass("open")&&(o&&"click"==o.type&&/input|textarea/i.test(o.target.tagName)&&a.contains(e[0],o.target)||(e.trigger(o=a.Event("hide.bs.dropdown",i)),o.isDefaultPrevented()||(t.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",i)))))}))}o.VERSION="3.4.1",o.prototype.toggle=function(t){var e=a(this);if(!e.is(".disabled, :disabled")){var i=l(e),o=i.hasClass("open");if(s(),!o){"ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",s);var n={relatedTarget:this};if(i.trigger(t=a.Event("show.bs.dropdown",n)),t.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),i.toggleClass("open").trigger(a.Event("shown.bs.dropdown",n))}return!1}},o.prototype.keydown=function(t){if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)){var e=a(this);if(t.preventDefault(),t.stopPropagation(),!e.is(".disabled, :disabled")){var i=l(e),o=i.hasClass("open");if(!o&&27!=t.which||o&&27==t.which)return 27==t.which&&i.find(r).trigger("focus"),e.trigger("click");var n=i.find(".dropdown-menu li:not(.disabled):visible a");if(n.length){var s=n.index(t.target);38==t.which&&0<s&&s--,40==t.which&&s<n.length-1&&s++,~s||(s=0),n.eq(s).trigger("focus")}}}};var t=a.fn.dropdown;a.fn.dropdown=function e(i){return this.each(function(){var t=a(this),e=t.data("bs.dropdown");e||t.data("bs.dropdown",e=new o(this)),"string"==typeof i&&e[i].call(t)})},a.fn.dropdown.Constructor=o,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=t,this},a(document).on("click.bs.dropdown.data-api",s).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",r,o.prototype.toggle).on("keydown.bs.dropdown.data-api",r,o.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",o.prototype.keydown)}(jQuery),function(a){"use strict";var s=function(t,e){this.options=e,this.$body=a(document.body),this.$element=a(t),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.fixedContent=".navbar-fixed-top, .navbar-fixed-bottom",this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};function r(o,n){return this.each(function(){var t=a(this),e=t.data("bs.modal"),i=a.extend({},s.DEFAULTS,t.data(),"object"==typeof o&&o);e||t.data("bs.modal",e=new s(this,i)),"string"==typeof o?e[o](n):i.show&&e.show(n)})}s.VERSION="3.4.1",s.TRANSITION_DURATION=300,s.BACKDROP_TRANSITION_DURATION=150,s.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},s.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},s.prototype.show=function(i){var o=this,t=a.Event("show.bs.modal",{relatedTarget:i});this.$element.trigger(t),this.isShown||t.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){o.$element.one("mouseup.dismiss.bs.modal",function(t){a(t.target).is(o.$element)&&(o.ignoreBackdropClick=!0)})}),this.backdrop(function(){var t=a.support.transition&&o.$element.hasClass("fade");o.$element.parent().length||o.$element.appendTo(o.$body),o.$element.show().scrollTop(0),o.adjustDialog(),t&&o.$element[0].offsetWidth,o.$element.addClass("in"),o.enforceFocus();var e=a.Event("shown.bs.modal",{relatedTarget:i});t?o.$dialog.one("bsTransitionEnd",function(){o.$element.trigger("focus").trigger(e)}).emulateTransitionEnd(s.TRANSITION_DURATION):o.$element.trigger("focus").trigger(e)}))},s.prototype.hide=function(t){t&&t.preventDefault(),t=a.Event("hide.bs.modal"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(s.TRANSITION_DURATION):this.hideModal())},s.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(t){document===t.target||this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},s.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},s.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},s.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")})},s.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},s.prototype.backdrop=function(t){var e=this,i=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var o=a.support.transition&&i;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+i).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(t){this.ignoreBackdropClick?this.ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide())},this)),o&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;o?this.$backdrop.one("bsTransitionEnd",t).emulateTransitionEnd(s.BACKDROP_TRANSITION_DURATION):t()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var n=function(){e.removeBackdrop(),t&&t()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",n).emulateTransitionEnd(s.BACKDROP_TRANSITION_DURATION):n()}else t&&t()},s.prototype.handleUpdate=function(){this.adjustDialog()},s.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},s.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},s.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth<t,this.scrollbarWidth=this.measureScrollbar()},s.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"";var n=this.scrollbarWidth;this.bodyIsOverflowing&&(this.$body.css("padding-right",t+n),a(this.fixedContent).each(function(t,e){var i=e.style.paddingRight,o=a(e).css("padding-right");a(e).data("padding-right",i).css("padding-right",parseFloat(o)+n+"px")}))},s.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad),a(this.fixedContent).each(function(t,e){var i=a(e).data("padding-right");a(e).removeData("padding-right"),e.style.paddingRight=i||""})},s.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var t=a.fn.modal;a.fn.modal=r,a.fn.modal.Constructor=s,a.fn.modal.noConflict=function(){return a.fn.modal=t,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var e=a(this),i=e.attr("href"),o=e.attr("data-target")||i&&i.replace(/.*(?=#[^\s]+$)/,""),n=a(document).find(o),s=n.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(i)&&i},n.data(),e.data());e.is("a")&&t.preventDefault(),n.one("show.bs.modal",function(t){t.isDefaultPrevented()||n.one("hidden.bs.modal",function(){e.is(":visible")&&e.trigger("focus")})}),r.call(n,s,this)})}(jQuery),function(g){"use strict";var o=["sanitize","whiteList","sanitizeFn"],a=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],t={"*":["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","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},r=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,l=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function u(t,e){var i=t.nodeName.toLowerCase();if(-1!==g.inArray(i,e))return-1===g.inArray(i,a)||Boolean(t.nodeValue.match(r)||t.nodeValue.match(l));for(var o=g(e).filter(function(t,e){return e instanceof RegExp}),n=0,s=o.length;n<s;n++)if(i.match(o[n]))return!0;return!1}function n(t,e,i){if(0===t.length)return t;if(i&&"function"==typeof i)return i(t);if(!document.implementation||!document.implementation.createHTMLDocument)return t;var o=document.implementation.createHTMLDocument("sanitization");o.body.innerHTML=t;for(var n=g.map(e,function(t,e){return e}),s=g(o.body).find("*"),a=0,r=s.length;a<r;a++){var l=s[a],h=l.nodeName.toLowerCase();if(-1!==g.inArray(h,n))for(var d=g.map(l.attributes,function(t){return t}),p=[].concat(e["*"]||[],e[h]||[]),c=0,f=d.length;c<f;c++)u(d[c],p)||l.removeAttribute(d[c].nodeName);else l.parentNode.removeChild(l)}return o.body.innerHTML}var m=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)};m.VERSION="3.4.1",m.TRANSITION_DURATION=150,m.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:t},m.prototype.init=function(t,e,i){if(this.enabled=!0,this.type=t,this.$element=g(e),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&g(document).find(g.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var o=this.options.trigger.split(" "),n=o.length;n--;){var s=o[n];if("click"==s)this.$element.on("click."+this.type,this.options.selector,g.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",r="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,g.proxy(this.enter,this)),this.$element.on(r+"."+this.type,this.options.selector,g.proxy(this.leave,this))}}this.options.selector?this._options=g.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},m.prototype.getDefaults=function(){return m.DEFAULTS},m.prototype.getOptions=function(t){var e=this.$element.data();for(var i in e)e.hasOwnProperty(i)&&-1!==g.inArray(i,o)&&delete e[i];return(t=g.extend({},this.getDefaults(),e,t)).delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t.sanitize&&(t.template=n(t.template,t.whiteList,t.sanitizeFn)),t},m.prototype.getDelegateOptions=function(){var i={},o=this.getDefaults();return this._options&&g.each(this._options,function(t,e){o[t]!=e&&(i[t]=e)}),i},m.prototype.enter=function(t){var e=t instanceof this.constructor?t:g(t.currentTarget).data("bs."+this.type);if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e)),t instanceof g.Event&&(e.inState["focusin"==t.type?"focus":"hover"]=!0),e.tip().hasClass("in")||"in"==e.hoverState)e.hoverState="in";else{if(clearTimeout(e.timeout),e.hoverState="in",!e.options.delay||!e.options.delay.show)return e.show();e.timeout=setTimeout(function(){"in"==e.hoverState&&e.show()},e.options.delay.show)}},m.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},m.prototype.leave=function(t){var e=t instanceof this.constructor?t:g(t.currentTarget).data("bs."+this.type);if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e)),t instanceof g.Event&&(e.inState["focusout"==t.type?"focus":"hover"]=!1),!e.isInStateTrue()){if(clearTimeout(e.timeout),e.hoverState="out",!e.options.delay||!e.options.delay.hide)return e.hide();e.timeout=setTimeout(function(){"out"==e.hoverState&&e.hide()},e.options.delay.hide)}},m.prototype.show=function(){var t=g.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var e=g.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!e)return;var i=this,o=this.tip(),n=this.getUID(this.type);this.setContent(),o.attr("id",n),this.$element.attr("aria-describedby",n),this.options.animation&&o.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,r=a.test(s);r&&(s=s.replace(a,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?o.appendTo(g(document).find(this.options.container)):o.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var l=this.getPosition(),h=o[0].offsetWidth,d=o[0].offsetHeight;if(r){var p=s,c=this.getPosition(this.$viewport);s="bottom"==s&&l.bottom+d>c.bottom?"top":"top"==s&&l.top-d<c.top?"bottom":"right"==s&&l.right+h>c.width?"left":"left"==s&&l.left-h<c.left?"right":s,o.removeClass(p).addClass(s)}var f=this.getCalculatedOffset(s,l,h,d);this.applyPlacement(f,s);var u=function(){var t=i.hoverState;i.$element.trigger("shown.bs."+i.type),i.hoverState=null,"out"==t&&i.leave(i)};g.support.transition&&this.$tip.hasClass("fade")?o.one("bsTransitionEnd",u).emulateTransitionEnd(m.TRANSITION_DURATION):u()}},m.prototype.applyPlacement=function(t,e){var i=this.tip(),o=i[0].offsetWidth,n=i[0].offsetHeight,s=parseInt(i.css("margin-top"),10),a=parseInt(i.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(a)&&(a=0),t.top+=s,t.left+=a,g.offset.setOffset(i[0],g.extend({using:function(t){i.css({top:Math.round(t.top),left:Math.round(t.left)})}},t),0),i.addClass("in");var r=i[0].offsetWidth,l=i[0].offsetHeight;"top"==e&&l!=n&&(t.top=t.top+n-l);var h=this.getViewportAdjustedDelta(e,t,r,l);h.left?t.left+=h.left:t.top+=h.top;var d=/top|bottom/.test(e),p=d?2*h.left-o+r:2*h.top-n+l,c=d?"offsetWidth":"offsetHeight";i.offset(t),this.replaceArrow(p,i[0][c],d)},m.prototype.replaceArrow=function(t,e,i){this.arrow().css(i?"left":"top",50*(1-t/e)+"%").css(i?"top":"left","")},m.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();this.options.html?(this.options.sanitize&&(e=n(e,this.options.whiteList,this.options.sanitizeFn)),t.find(".tooltip-inner").html(e)):t.find(".tooltip-inner").text(e),t.removeClass("fade in top bottom left right")},m.prototype.hide=function(t){var e=this,i=g(this.$tip),o=g.Event("hide.bs."+this.type);function n(){"in"!=e.hoverState&&i.detach(),e.$element&&e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),t&&t()}if(this.$element.trigger(o),!o.isDefaultPrevented())return i.removeClass("in"),g.support.transition&&i.hasClass("fade")?i.one("bsTransitionEnd",n).emulateTransitionEnd(m.TRANSITION_DURATION):n(),this.hoverState=null,this},m.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},m.prototype.hasContent=function(){return this.getTitle()},m.prototype.getPosition=function(t){var e=(t=t||this.$element)[0],i="BODY"==e.tagName,o=e.getBoundingClientRect();null==o.width&&(o=g.extend({},o,{width:o.right-o.left,height:o.bottom-o.top}));var n=window.SVGElement&&e instanceof window.SVGElement,s=i?{top:0,left:0}:n?null:t.offset(),a={scroll:i?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},r=i?{width:g(window).width(),height:g(window).height()}:null;return g.extend({},o,a,r,s)},m.prototype.getCalculatedOffset=function(t,e,i,o){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-i/2}:"top"==t?{top:e.top-o,left:e.left+e.width/2-i/2}:"left"==t?{top:e.top+e.height/2-o/2,left:e.left-i}:{top:e.top+e.height/2-o/2,left:e.left+e.width}},m.prototype.getViewportAdjustedDelta=function(t,e,i,o){var n={top:0,left:0};if(!this.$viewport)return n;var s=this.options.viewport&&this.options.viewport.padding||0,a=this.getPosition(this.$viewport);if(/right|left/.test(t)){var r=e.top-s-a.scroll,l=e.top+s-a.scroll+o;r<a.top?n.top=a.top-r:l>a.top+a.height&&(n.top=a.top+a.height-l)}else{var h=e.left-s,d=e.left+s+i;h<a.left?n.left=a.left-h:d>a.right&&(n.left=a.left+a.width-d)}return n},m.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},m.prototype.getUID=function(t){for(;t+=~~(1e6*Math.random()),document.getElementById(t););return t},m.prototype.tip=function(){if(!this.$tip&&(this.$tip=g(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},m.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},m.prototype.enable=function(){this.enabled=!0},m.prototype.disable=function(){this.enabled=!1},m.prototype.toggleEnabled=function(){this.enabled=!this.enabled},m.prototype.toggle=function(t){var e=this;t&&((e=g(t.currentTarget).data("bs."+this.type))||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e))),t?(e.inState.click=!e.inState.click,e.isInStateTrue()?e.enter(e):e.leave(e)):e.tip().hasClass("in")?e.leave(e):e.enter(e)},m.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})},m.prototype.sanitizeHtml=function(t){return n(t,this.options.whiteList,this.options.sanitizeFn)};var e=g.fn.tooltip;g.fn.tooltip=function i(o){return this.each(function(){var t=g(this),e=t.data("bs.tooltip"),i="object"==typeof o&&o;!e&&/destroy|hide/.test(o)||(e||t.data("bs.tooltip",e=new m(this,i)),"string"==typeof o&&e[o]())})},g.fn.tooltip.Constructor=m,g.fn.tooltip.noConflict=function(){return g.fn.tooltip=e,this}}(jQuery),function(n){"use strict";var s=function(t,e){this.init("popover",t,e)};if(!n.fn.tooltip)throw new Error("Popover requires tooltip.js");s.VERSION="3.4.1",s.DEFAULTS=n.extend({},n.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),((s.prototype=n.extend({},n.fn.tooltip.Constructor.prototype)).constructor=s).prototype.getDefaults=function(){return s.DEFAULTS},s.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();if(this.options.html){var o=typeof i;this.options.sanitize&&(e=this.sanitizeHtml(e),"string"===o&&(i=this.sanitizeHtml(i))),t.find(".popover-title").html(e),t.find(".popover-content").children().detach().end()["string"===o?"html":"append"](i)}else t.find(".popover-title").text(e),t.find(".popover-content").children().detach().end().text(i);t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},s.prototype.hasContent=function(){return this.getTitle()||this.getContent()},s.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},s.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var t=n.fn.popover;n.fn.popover=function e(o){return this.each(function(){var t=n(this),e=t.data("bs.popover"),i="object"==typeof o&&o;!e&&/destroy|hide/.test(o)||(e||t.data("bs.popover",e=new s(this,i)),"string"==typeof o&&e[o]())})},n.fn.popover.Constructor=s,n.fn.popover.noConflict=function(){return n.fn.popover=t,this}}(jQuery),function(s){"use strict";function n(t,e){this.$body=s(document.body),this.$scrollElement=s(t).is(document.body)?s(window):s(t),this.options=s.extend({},n.DEFAULTS,e),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",s.proxy(this.process,this)),this.refresh(),this.process()}function e(o){return this.each(function(){var t=s(this),e=t.data("bs.scrollspy"),i="object"==typeof o&&o;e||t.data("bs.scrollspy",e=new n(this,i)),"string"==typeof o&&e[o]()})}n.VERSION="3.4.1",n.DEFAULTS={offset:10},n.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},n.prototype.refresh=function(){var t=this,o="offset",n=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),s.isWindow(this.$scrollElement[0])||(o="position",n=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var t=s(this),e=t.data("target")||t.attr("href"),i=/^#./.test(e)&&s(e);return i&&i.length&&i.is(":visible")&&[[i[o]().top+n,e]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},n.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.getScrollHeight(),o=this.options.offset+i-this.$scrollElement.height(),n=this.offsets,s=this.targets,a=this.activeTarget;if(this.scrollHeight!=i&&this.refresh(),o<=e)return a!=(t=s[s.length-1])&&this.activate(t);if(a&&e<n[0])return this.activeTarget=null,this.clear();for(t=n.length;t--;)a!=s[t]&&e>=n[t]&&(n[t+1]===undefined||e<n[t+1])&&this.activate(s[t])},n.prototype.activate=function(t){this.activeTarget=t,this.clear();var e=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',i=s(e).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active")),i.trigger("activate.bs.scrollspy")},n.prototype.clear=function(){s(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var t=s.fn.scrollspy;s.fn.scrollspy=e,s.fn.scrollspy.Constructor=n,s.fn.scrollspy.noConflict=function(){return s.fn.scrollspy=t,this},s(window).on("load.bs.scrollspy.data-api",function(){s('[data-spy="scroll"]').each(function(){var t=s(this);e.call(t,t.data())})})}(jQuery),function(r){"use strict";var a=function(t){this.element=r(t)};function e(i){return this.each(function(){var t=r(this),e=t.data("bs.tab");e||t.data("bs.tab",e=new a(this)),"string"==typeof i&&e[i]()})}a.VERSION="3.4.1",a.TRANSITION_DURATION=150,a.prototype.show=function(){var t=this.element,e=t.closest("ul:not(.dropdown-menu)"),i=t.data("target");if(i||(i=(i=t.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var o=e.find(".active:last a"),n=r.Event("hide.bs.tab",{relatedTarget:t[0]}),s=r.Event("show.bs.tab",{relatedTarget:o[0]});if(o.trigger(n),t.trigger(s),!s.isDefaultPrevented()&&!n.isDefaultPrevented()){var a=r(document).find(i);this.activate(t.closest("li"),e),this.activate(a,a.parent(),function(){o.trigger({type:"hidden.bs.tab",relatedTarget:t[0]}),t.trigger({type:"shown.bs.tab",relatedTarget:o[0]})})}}},a.prototype.activate=function(t,e,i){var o=e.find("> .active"),n=i&&r.support.transition&&(o.length&&o.hasClass("fade")||!!e.find("> .fade").length);function s(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),t.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),n?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu").length&&t.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),i&&i()}o.length&&n?o.one("bsTransitionEnd",s).emulateTransitionEnd(a.TRANSITION_DURATION):s(),o.removeClass("in")};var t=r.fn.tab;r.fn.tab=e,r.fn.tab.Constructor=a,r.fn.tab.noConflict=function(){return r.fn.tab=t,this};var i=function(t){t.preventDefault(),e.call(r(this),"show")};r(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery),function(l){"use strict";var h=function(t,e){this.options=l.extend({},h.DEFAULTS,e);var i=this.options.target===h.DEFAULTS.target?l(this.options.target):l(document).find(this.options.target);this.$target=i.on("scroll.bs.affix.data-api",l.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",l.proxy(this.checkPositionWithEventLoop,this)),this.$element=l(t),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function i(o){return this.each(function(){var t=l(this),e=t.data("bs.affix"),i="object"==typeof o&&o;e||t.data("bs.affix",e=new h(this,i)),"string"==typeof o&&e[o]()})}h.VERSION="3.4.1",h.RESET="affix affix-top affix-bottom",h.DEFAULTS={offset:0,target:window},h.prototype.getState=function(t,e,i,o){var n=this.$target.scrollTop(),s=this.$element.offset(),a=this.$target.height();if(null!=i&&"top"==this.affixed)return n<i&&"top";if("bottom"==this.affixed)return null!=i?!(n+this.unpin<=s.top)&&"bottom":!(n+a<=t-o)&&"bottom";var r=null==this.affixed,l=r?n:s.top;return null!=i&&n<=i?"top":null!=o&&t-o<=l+(r?a:e)&&"bottom"},h.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(h.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},h.prototype.checkPositionWithEventLoop=function(){setTimeout(l.proxy(this.checkPosition,this),1)},h.prototype.checkPosition=function(){if(this.$element.is(":visible")){var t=this.$element.height(),e=this.options.offset,i=e.top,o=e.bottom,n=Math.max(l(document).height(),l(document.body).height());"object"!=typeof e&&(o=i=e),"function"==typeof i&&(i=e.top(this.$element)),"function"==typeof o&&(o=e.bottom(this.$element));var s=this.getState(n,t,i,o);if(this.affixed!=s){null!=this.unpin&&this.$element.css("top","");var a="affix"+(s?"-"+s:""),r=l.Event(a+".bs.affix");if(this.$element.trigger(r),r.isDefaultPrevented())return;this.affixed=s,this.unpin="bottom"==s?this.getPinnedOffset():null,this.$element.removeClass(h.RESET).addClass(a).trigger(a.replace("affix","affixed")+".bs.affix")}"bottom"==s&&this.$element.offset({top:n-t-o})}};var t=l.fn.affix;l.fn.affix=i,l.fn.affix.Constructor=h,l.fn.affix.noConflict=function(){return l.fn.affix=t,this},l(window).on("load",function(){l('[data-spy="affix"]').each(function(){var t=l(this),e=t.data();e.offset=e.offset||{},null!=e.offsetBottom&&(e.offset.bottom=e.offsetBottom),null!=e.offsetTop&&(e.offset.top=e.offsetTop),i.call(t,e)})})}(jQuery);
vendor: 4,481 bytes, lines 6-8
6
7/*! jQuery v1.11.3 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */
8!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.3",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b="length"in a&&a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s
vendor: 18,080 bytes, line 8
8=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=ma(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=na(b);function qa(){}qa.prototype=d.filters=d.pseudos,d.setFilters=new qa,g=ga.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?ga.error(a):z(a,i).slice(0)};function ra(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")}
vendor: 16,844 bytes, lines 8-10
8)||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;
9
10return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=m.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=m._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=["Top","Right","Bottom","Left"],U=function(a,b){return a=b||a,"none"===m.css(a,"display")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function aa(){return!0}function ba(){return!1}function ca(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{}
vendor: 1,726 bytes, line 10
10,e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>
vendor: 54,827 bytes, lines 10-11
10=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==ca()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===ca()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return m.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?aa:ba):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:ba,isPropagationStopped:ba,isImmediatePropagationStopped:ba,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=aa,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=aa,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=aa,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,"form")?!1:void m.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=m.nodeName(b,"input")||m.nodeName(b,"button")?b.form:void 0;c&&!m._data(c,"submitBubbles")&&(m.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),m._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,"form")?!1:void m.event.remove(this,"._submit")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(m.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate("change",this,a,!0)})),!1):void m.event.add(this,"beforeactivate._change",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,"changeBubbles")&&(m.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate("change",this.parentNode,a,!0)}),m._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return m.event.remove(this,"._change"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=ba;else if(!d)return this;return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,m(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=ba),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function da(a){var b=ea.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var ea="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fa=/ jQuery\d+="(?:null|\d+)"/g,ga=new RegExp("<(?:"+ea+")[\\s/>]","i"),ha=/^\s+/,ia=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ja=/<([\w:]+)/,ka=/<tbody/i,la=/<|&#?\w+;/,ma=/<(?:script|style|link)/i,na=/checked\s*(?:[^=]|=\s*.checked.)/i,oa=/^$|\/(?:java|ecma)script/i,pa=/^true\/(.*)/,qa=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ra={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:k.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},sa=da(y),ta=sa.appendChild(y.createElement("div"));ra.optgroup=ra.option,ra.tbody=ra.tfoot=ra.colgroup=ra.caption=ra.thead,ra.th=ra.td;function ua(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ua(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function va(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wa(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xa(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function ya(a){var b=pa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function za(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Aa(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Ba(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xa(b).text=a.text,ya(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!ga.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ta.innerHTML=a.outerHTML,ta.removeChild(f=ta.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ua(f),h=ua(a),g=0;null!=(e=h[g]);++g)d[g]&&Ba(e,d[g]);if(b)if(c)for(h=h||ua(a),d=d||ua(f),g=0;null!=(e=h[g]);g++)Aa(e,d[g]);else Aa(a,f);return d=ua(f,"script"),d.length>0&&za(d,!i&&ua(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=da(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(la.test(f)){h=h||o.appendChild(b.createElement("div")),i=(ja.exec(f)||["",""])[1].toLowerCase(),l=ra[i]||ra._default,h.innerHTML=l[1]+f.replace(ia,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&ha.test(f)&&p.push(b.createTextNode(ha.exec(f)[0])),!k.tbody){f="table"!==i||ka.test(f)?"<table>"!==l[1]||ka.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ua(p,"input"),va),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ua(o.appendChild(f),"script"),g&&za(h),c)){e=0;while(f=h[e++])oa.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ua(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&za(ua(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ua(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fa,""):void 0;if(!("string"!=typeof a||ma.test(a)||!k.htmlSerialize&&ga.test(a)||!k.leadingWhitespace&&ha.test(a)||ra[(ja.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ia,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ua(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ua(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&na.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ua(i,"script"),xa),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ua(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,ya),j=0;f>j;j++)d=g[j],oa.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qa,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Ca,Da={};function Ea(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fa(a){var b=y,c=Da[a];return c||(c=Ea(a,b),"none"!==c&&c||(Ca=(Ca||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Ca[0].contentWindow||Ca[0].contentDocument).document,b.write(),b.close(),c=Ea(a,b),Ca.detach()),Da[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Ga=/^margin/,Ha=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ia,Ja,Ka=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ia=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)},Ja=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ia(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Ha.test(g)&&Ga.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ia=function(a){return a.currentStyle},Ja=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ia(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ha.test(g)&&!Ka.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function La(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight),b.removeChild(i)),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Ma=/alpha\([^)]*\)/i,Na=/opacity\s*=\s*([^)]*)/,Oa=/^(none|table(?!-c[ea]).+)/,Pa=new RegExp("^("+S+")(.*)$","i"),Qa=new RegExp("^([+-])=("+S+")","i"),Ra={position:"absolute",visibility:"hidden",display:"block"},Sa={letterSpacing:"0",fontWeight:"400"},Ta=["Webkit","O","Moz","ms"];function Ua(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ta.length;while(e--)if(b=Ta[e]+c,b in a)return b;return d}function Va(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fa(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Wa(a,b,c){var d=Pa.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xa(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Ya(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ia(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Ja(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ha.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xa(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Ja(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ua(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Qa.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ua(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Ja(a,b,d)),"normal"===f&&b in Sa&&(f=Sa[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Oa.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Ra,function(){return Ya(a,b,d)}):Ya(a,b,d):void 0},set:function(a,c,d){var e=d&&Ia(a);return Wa(a,c,d?Xa(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Na.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Ma,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Ma.test(f)?f.replace(Ma,e):f+" "+e)}}),m.cssHooks.marginRight=La(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Ja,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Ga.test(a)||(m.cssHooks[a+b].set=Wa)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ia(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Va(this,!0)},hide:function(){return Va(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Za(a,b,c,d,e){
11return new Za.prototype.init(a,b,c,d,e)}m.Tween=Za,Za.prototype={constructor:Za,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px")},cur:function(){var a=Za.propHooks[this.prop];return a&&a.get?a.get(this):Za.propHooks._default.get(this)},run:function(a){var b,c=Za.propHooks[this.prop];return this.options.duration?this.pos=b=m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Za.propHooks._default.set(this),this}},Za.prototype.init.prototype=Za.prototype,Za.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Za.propHooks.scrollTop=Za.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Za.prototype.init,m.fx.step={};var $a,_a,ab=/^(?:toggle|show|hide)$/,bb=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cb=/queueHooks$/,db=[ib],eb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bb.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bb.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fb(){return setTimeout(function(){$a=void 0}),$a=m.now()}function gb(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hb(a,b,c){for(var d,e=(eb[b]||[]).concat(eb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ib(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fa(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fa(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ab.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fa(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hb(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jb(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kb(a,b,c){var d,e,f=0,g=db.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$a||fb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$a||fb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jb(k,j.opts.specialEasing);g>f;f++)if(d=db[f].call(j,a,k,j.opts))return d;return m.map(k,hb,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kb,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],eb[c]=eb[c]||[],eb[c].unshift(b)},prefilter:function(a,b){b?db.unshift(a):db.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kb(this,m.extend({},a),f);(e||m._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gb(b,!0),a,d,e)}}),m.each({slideDown:gb("show"),slideUp:gb("hide"),slideToggle:gb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($a=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$a=void 0},m.fx.timer=function(a){m.timers.push(a),a()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){_a||(_a=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_a),_a=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(a,b){return a=m.fx?m.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=y.createElement("div"),b.setAttribute("className","t"),b.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lb=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lb,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mb,nb,ob=m.expr.attrHandle,pb=/^(?:checked|selected)$/i,qb=k.getSetAttribute,rb=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nb:mb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rb&&qb||!pb.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qb?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nb={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rb&&qb||!pb.test(c)?a.setAttribute(!qb&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=ob[b]||m.find.attr;ob[b]=rb&&qb||!pb.test(b)?function(a,b,d){var e,f;return d||(f=ob[b],ob[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,ob[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rb&&qb||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mb&&mb.set(a,b,c)}}),qb||(mb={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},ob.id=ob.name=ob.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mb.set},m.attrHooks.contenteditable={set:function(a,b,c){mb.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sb=/^(?:input|select|textarea|button|object)$/i,tb=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,"tabindex");return b?parseInt(b,10):sb.test(a.nodeName)||tb.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var ub=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ub," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ub," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ub," ").indexOf(b)>=0)return!0;return!1}}),m.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var vb=m.now(),wb=/\?/,xb=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xb,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yb,zb,Ab=/#.*$/,Bb=/([?&])_=[^&]*/,Cb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Db=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Eb=/^(?:GET|HEAD)$/,Fb=/^\/\//,Gb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hb={},Ib={},Jb="*/".concat("*");try{zb=location.href}catch(Kb){zb=y.createElement("a"),zb.href="",zb=zb.href}yb=Gb.exec(zb.toLowerCase())||[];function Lb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mb(a,b,c,d){var e={},f=a===Ib;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Nb(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Ob(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zb,type:"GET",isLocal:Db.test(yb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nb(Nb(a,m.ajaxSettings),b):Nb(m.ajaxSettings,a)},ajaxPrefilter:Lb(Hb),ajaxTransport:Lb(Ib),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cb.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zb)+"").replace(Ab,"").replace(Fb,yb[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gb.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yb[1]&&c[2]===yb[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yb[3]||("http:"===yb[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mb(Hb,k,b,v),2===t)return v;h=m.event&&k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Eb.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wb.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bb.test(e)?e.replace(Bb,"$1_="+vb++):e+(wb.test(e)?"&":"?")+"_="+vb++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jb+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mb(Ib,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Ob(k,v,c)),u=Pb(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qb=/%20/g,Rb=/\[\]$/,Sb=/\r?\n/g,Tb=/^(?:submit|button|image|reset|file)$/i,Ub=/^(?:input|select|textarea|keygen)/i;function Vb(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rb.test(a)?d(a,e):Vb(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vb(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vb(c,a[c],b,e);return d.join("&").replace(Qb,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Ub.test(this.nodeName)&&!Tb.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sb,"\r\n")}}):{name:b.name,value:c.replace(Sb,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zb()||$b()}:Zb;var Wb=0,Xb={},Yb=m.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Xb)Xb[a](void 0,!0)}),k.cors=!!Yb&&"withCredentials"in Yb,Yb=k.ajax=!!Yb,Yb&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wb;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xb[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xb[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zb(){try{return new a.XMLHttpRequest}catch(b){}}function $b(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _b=[],ac=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_b.pop()||m.expando+"_"+vb++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ac.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ac.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ac,"$1"+e):b.jsonp!==!1&&(b.url+=(wb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_b.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bc=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bc)return bc.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("<div>").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cc=a.document.documentElement;function dc(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dc(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cc;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cc})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dc(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=La(k.pixelPosition,function(a,c){return c?(c=Ja(a,b),Ha.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ec=a.jQuery,fc=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fc),b&&a.jQuery===m&&(a.jQuery=ec),m},typeof b===K&&(a.jQuery=a.$=m),m});
vendor: 2,049 bytes, lines 12-19
12//# 
13/*
14 Sticky-kit v1.1.2 | WTFPL | Leaf Corcoran 2015 | http://leafo.net
15*/
16(function(){var b,f;b=this.jQuery||window.jQuery;f=b(window);b.fn.stick_in_parent=function(d){var A,w,J,n,B,K,p,q,k,E,t;null==d&&(d={});t=d.sticky_class;B=d.inner_scrolling;E=d.recalc_every;k=d.parent;q=d.offset_top;p=d.spacer;w=d.bottoming;null==q&&(q=0);null==k&&(k=void 0);null==B&&(B=!0);null==t&&(t="is_stuck");A=b(document);null==w&&(w=!0);J=function(a,d,n,C,F,u,r,G){var v,H,m,D,I,c,g,x,y,z,h,l;if(!a.data("sticky_kit")){a.data("sticky_kit",!0);I=A.height();g=a.parent();null!=k&&(g=g.closest(k));
17if(!g.length)throw"failed to find stick parent";v=m=!1;(h=null!=p?p&&a.closest(p):b("<div />"))&&h.css("position",a.css("position"));x=function(){var c,f,e;if(!G&&(I=A.height(),c=parseInt(g.css("border-top-width"),10),f=parseInt(g.css("padding-top"),10),d=parseInt(g.css("padding-bottom"),10),n=g.offset().top+c+f,C=g.height(),m&&(v=m=!1,null==p&&(a.insertAfter(h),h.detach()),a.css({position:"",top:"",width:"",bottom:""}).removeClass(t),e=!0),F=a.offset().top-(parseInt(a.css("margin-top"),10)||0)-q,
18u=a.outerHeight(!0),r=a.css("float"),h&&h.css({width:a.outerWidth(!0),height:u,display:a.css("display"),"vertical-align":a.css("vertical-align"),"float":r}),e))return l()};x();if(u!==C)return D=void 0,c=q,z=E,l=function(){var b,l,e,k;if(!G&&(e=!1,null!=z&&(--z,0>=z&&(z=E,x(),e=!0)),e||A.height()===I||x(),e=f.scrollTop(),null!=D&&(l=e-D),D=e,m?(w&&(k=e+u+c>C+n,v&&!k&&(v=!1,a.css({position:"fixed",bottom:"",top:c}).trigger("sticky_kit:unbottom"))),e<F&&(m=!1,c=q,null==p&&("left"!==r&&"right"!==r||a.insertAfter(h),
19h.detach()),b={position:"",width:"",top:""},a.css(b).removeClass(t).trigger("sticky_kit:unstick")),B&&(b=f.height(),u+q>b&&!v&&(c-=l,c=Math.max(b-u,c),c=Math.min(q,c),m&&a.css({top:c+"px"})))):e>F&&(m=!0,b={position:"fixed",top:c},b.width="border-box"===a.css("box-sizing")?a.outerWidth()+"px":a.width()+"px",a.css(b).addClass(t),null==p&&(a.after(h),"left"!==r&&"right"!==r||h.append(a)),a.trigger("sticky_kit:stick")),m&&w&&(null==k&&(k=e+u+c>
19C+n),!v&&k)))return v=!0,"static"===g.css("position")&&g.css({position:"relative"}),
20a.css({position:"absolute",bottom:d,top:"auto"}).trigger("sticky_kit:bottom")},y=function(){x();return l()},H=function(){G=!0;f.off("touchmove",l);f.off("scroll",l);f.off("resize",y);b(document.body).off("sticky_kit:recalc",y);a.off("sticky_kit:detach",H);a.removeData("sticky_kit");a.css({position:"",bottom:"",top:"",width:""});g.position("position","");if(m)return null==p&&("left"!==r&&"right"!==r||a.insertAfter(h),h.remove()),a.removeClass(t)},f.on("touchmove",l),f.on("scroll",l),f.on("resize",
21y),b(document.body).on("sticky_kit:recalc",y),a.on("sticky_kit:detach",H),setTimeout(l,0)}};n=0;for(K=this.length;n<K;n++)d=this[n],J(b(d));return this}}).call(this);
22
23/**
24 * Swiper 3.4.2
25 * Most modern mobile touch slider and framework with hardware accelerated transitions
26 * 
27 * http://www.idangero.us/swiper/
28 * 
29 * Copyright 2017, Vladimir Kharlampidi
30 * The iDangero.us
31 * http://www.idangero.us/
32 * 
33 * Licensed under MIT
34 * 
35 * Released on: March 10, 2017
36 */
37!function(){"use strict";var e,a=function(t,s){function r(e){return Math.floor(e)}function i(){var e=x.params.autoplay,a=x.slides.eq(x.activeIndex);a.attr("data-swiper-autoplay")&&(e=a.attr("data-swiper-autoplay")||x.params.autoplay),x.autoplayTimeoutId=setTimeout(function(){x.params.loop?(x.fixLoop(),x._slideNext(),x.emit("onAutoplay",x)):x.isEnd?s.autoplayStopOnLast?x.stopAutoplay():(x._slideTo(0),x.emit("onAutoplay",x)):(x._slideNext(),x.emit("onAutoplay",x))},e)}function n(a,t){var s=e(a.target);if(!s.is(t))if("string"==typeof t)s=s.parents(t);else if(t.nodeType){var r;return s.parents().each(function(e,a){a===t&&(r=t)}),r?t:void 0}if(0!==s.length)return s[0]}function o(e,a){a=a||{};var t=window.MutationObserver||window.WebkitMutationObserver,s=new t(function(e){e.forEach(function(e){x.onResize(!0),x.emit("onObserverUpdate",x,e)})});s.observe(e,{attributes:void 0===a.attributes||a.attributes,childList:void 0===a.childList||a.childList,characterData:void 0===a.characterData||a.characterData}),x.observers.push(s)}function l(e){e.originalEvent&&(e=e.originalEvent);var a=e.keyCode||e.charCode;
37if(!x.params.allowSwipeToNext&&(x.isHorizontal()&&39===a||!x.isHorizontal()&&40===a))return!1;if(!x.params.allowSwipeToPrev&&(x.isHorizontal()&&37===a||!x.isHorizontal()&&38===a))return!1;if(!(e.shiftKey||e.altKey||e.ctrlKey||e.metaKey||document.activeElement&&document.activeElement.nodeName&&("input"===document.activeElement.nodeName.toLowerCase()||"textarea"===document.activeElement.nodeName.toLowerCase()))){if(37===a||39===a||38===a||40===a){var t=!1;if(x.container.parents("."+x.params.slideClass).length>0&&0===x.container.parents("."+x.params.slideActiveClass).length)return;var s={left:window.pageXOffset,top:window.pageYOffset},r=window.innerWidth,i=window.innerHeight,n=x.container.offset();x.rtl&&(n.left=n.left-x.container[0].scrollLeft);for(var o=[[n.left,n.top],[n.left+x.width,n.top],[n.left,n.top+x.height],[n.left+x.width,n.top+x.height]],l=0;l<o.length;l++){var p=o[l];p[0]>=s.left&&p[0]<=s.left+r&&p[1]>=s.top&&p[1]<=s.top+i&&(t=!0)}if(!t)return}x.isHorizontal()?(37!==a&&39!==a||(e.preventDefault?e.preventDefault():e.returnValue=!1),(39===a&&!x.rtl||37===a&&x.rtl)&&x.slideNext(),(37===a&&!x.rtl||39===a&&x.rtl)&&x.slidePrev()):(38!==a&&40!==a||(e.preventDefault?e.preventDefault():e.returnValue=!1),40===a&&x.slideNext(),38===a&&x.slidePrev()),x.emit("onKeyPress",x,a)}}function p(e){var a=0,t=0,s=0,r=0;return"detail"in e&&(t=e.detail),"wheelDelta"in e&&(t=-e.wheelDelta/120),"wheelDeltaY"in e&&(t=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(a=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(a=t,t=0),s=10*a,r=10*t,"deltaY"in e&&(r=e.deltaY),"deltaX"in e&&(s=e.deltaX),(s||r)&&e.deltaMode&&(1===e.deltaMode?(s*=40,r*=40):(s*=800,r*=800)),s&&!a&&(a=s<1?-1:1),r&&!t&&(t=r<1?-1:1),{spinX:a,spinY:t,pixelX:s,pixelY:r}}function d(e){e.originalEvent&&(e=e.originalEvent);var a=0,t=x.rtl?-1:1,s=p(e);if(x.params.mousewheelForceToAxis)if(x.isHorizontal()){if(!(Math.abs(s.pixelX)>Math.abs(s.pixelY)))return;a=s.pixelX*t}else{if(!(Math.abs(s.pixelY)>Math.abs(s.pixelX)))return;a=s.pixelY}else a=Math.abs(s.pixelX)>Math.abs(s.pixelY)?-s.pixelX*t:-s.pixelY;if(0!==a){if(x.params.mousewheelInvert&&(a=-a),x.params.freeMode){var r=x.getWrapperTranslate()+a*x.params.mousewheelSensitivity,i=x.isBeginning,n=x.isEnd;if(r>=x.minTranslate()&&(r=x.minTranslate()),r<=x.maxTranslate()&&(r=x.maxTranslate()),x.setWrapperTransition(0),x.setWrapperTranslate(r),x.updateProgress(),x.updateActiveIndex(),(!i&&x.isBeginning||!n&&x.isEnd)&&x.updateClasses(),x.params.freeModeSticky?(clearTimeout(x.mousewheel.timeout),x.mousewheel.timeout=setTimeout(function(){x.slideReset()},300)):x.params.lazyLoading&&x.lazy&&x.lazy.load(),x.emit("onScroll",x,e),x.params.autoplay&&x.params.autoplayDisableOnInteraction&&x.stopAutoplay(),0===r||r
37===x.maxTranslate())return}else{if((new window.Date).getTime()-x.mousewheel.lastScrollTime>60)if(a<0)if(x.isEnd&&!x.params.loop||x.animating){if(x.params.mousewheelReleaseOnEdges)return!0}else x.slideNext(),x.emit("onScroll",x,e);else if(x.isBeginning&&!x.params.loop||x.animating){if(x.params.mousewheelReleaseOnEdges)return!0}else x.slidePrev(),x.emit("onScroll",x,e);x.mousewheel.lastScrollTime=(new window.Date).getTime()}return e.preventDefault?e.preventDefault():e.returnValue=!1,!1}}function m(a,t){a=e(a);var s,r,i,n=x.rtl?-1:1;s=a.attr("data-swiper-parallax")||"0",r=a.attr("data-swiper-parallax-x"),i=a.attr("data-swiper-parallax-y"),r||i?(r=r||"0",i=i||"0"):x.isHorizontal()?(r=s,i="0"):(i=s,r="0"),r=r.indexOf("%")>=0?parseInt(r,10)*t*n+"%":r*t*n+"px",i=i.indexOf("%")>=0?parseInt(i,10)*t+"%":i*t+"px",a.transform("translate3d("+r+", "+i+",0px)")}function u(e){return 0!==e.indexOf("on")&&(e=e[0]!==e[0].toUpperCase()?"on"+e[0].toUpperCase()+e.substring(1):"on"+e),e}if(!(this instanceof a))return new a(t,s);var c={direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,autoplay:!1,autoplayDisableOnInteraction:!0,autoplayStopOnLast:!1,iOSEdgeSwipeDetection:!1,iOSEdgeSwipeThreshold:20,freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",coverflow:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:!0},flip:{slideShadows:!0,limitRotation:!0},cube:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94},fade:{crossFade:!1},parallax:!1,zoom:!1,zoomMax:3,zoomMin:1,zoomToggle:!0,scrollbar:null,scrollbarHide:!0,scrollbarDraggable:!1,scrollbarSnapOnRelease:!1,keyboardControl:!1,mousewheelControl:!1,mousewheelReleaseOnEdges:!1,mousewheelInvert:!1,mousewheelForceToAxis:!1,mousewheelSensitivity:1,mousewheelEventsTarged:"container",hashnav:!1,hashnavWatchState:!1,history:!1,replaceState:!1,breakpoints:void 0,spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,centeredSlides:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,onlyExternal:!1,threshold:0,touchMoveStopPropagation:!0,touchReleaseOnEdges:!1,uniqueNavElements:!0,pagination:null,paginationElement:"span",paginationClickable:!1,paginationHide:!1,paginationBulletRender:null,paginationProgressRender:null,paginationFractionRender:null,paginationCustomRender:null,paginationType:"bullets",resistance:!0,resistanceRatio:.85,nextButton:null,prevButton:null,watchSlidesProgress:!1,watchSlidesVisibility:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,lazyLoading:!1,lazyLoadingInPrevNext:!1,lazyLoadingInPrevNextAmount:1,lazyLoadingOnTransitionStart:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,control:void 0,controlInverse:!1,controlBy:"slide",normalizeSlideIndex:!0,allowSwipeToPrev:!0,allowSwipeToNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",passiveListeners:!0,containerModifierClass:"swiper-container-",slideClass:"swiper-slide",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",bulletClass:"swiper-pagination-bullet",bulletActiveClass:"swiper-pagination-bullet-active",buttonDisabledClass:"swiper-button-disabled",paginationCurrentClass:"swiper-pagination-current",paginationTotalClass:"swiper-pagination-total",paginationHiddenClass:"swiper-pagination-hidden",paginationProgressbarClass:"swiper-pagination-progressbar",paginationClickableClass:"swiper-pagination-clickable",paginationModifierClass:"swiper-pagination-",lazyLoadingClass:"swiper-lazy",lazyStatusLoadingClass:"swiper-lazy-loading",lazyStatusLoadedClass:"swiper-lazy-loaded",lazyPreloaderClass:"swiper-lazy-preloader",notificationClass:"swiper-notification",preloaderClass:"preloader",zoomContainerClass:"swiper-zoom-container",observer:!1,observeParents:!1,a11y:!1,prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",runCallbacksOnInit:!0},g=s&&s.virtualTranslate;s=s||{};var h={};for(var v in s)if("object"!=typeof s[v]||null===s[v]||(s[v].nodeType||s[v]===window||s[v]===document||"undefined"!=typeof Dom7&&s[v]instanceof Dom7||"undefined"!=typeof jQuery&&s[v]instanceof jQuery))h[v]=s[v];else{h[v]={};for(var f in s[v])h[v][f]=s[v][f]}for(var w in c)if(void 0===s[w])s[w]=c[w];else if("object"==typeof s[w])for(var y in c[w])void 0===s[w][y]&&(s[w][y]=c[w][y]);var x=this;if(x.params=s,x.originalParams=h,x.classNames=[],void 0!==e&&"undefined"!=typeof Dom7&&(e=Dom7),(void 0!==e||(e="undefined"==typeof Dom7?window.Dom7||window.Zepto||window.jQuery:Dom7))&&(x.$=e,x.currentBreakpoint=void 0,x.getActiveBreakpoint=function(){if(!x.params.breakpoints)return!1;var e,a=!1,t=[];for(e in x.params.breakpoints)x.params.breakpoints.hasOwnProperty(e)&&t.push(e);t.sort(function(e,a){return parseInt(e,10)>parseInt(a,10)});for(var s=0;s<t.length;s++)(e=t[s])>=window.innerWidth&&!a&&(a=e);return a||"max"},x.setBreakpoint=function(){var e=x.getActiveBreakpoint();if(e&&x.currentBreakpoint!==e){var a=e in x.params.breakpoints?x.params.breakpoints[e]:x.originalParams,t=x.params.loop&&a.slidesPerView!==x.params.slidesPerView;for(var s in a)x.params[s]=a[s];x.currentBreakpoint=e,t&&x.destroyLoop&&x.reLoop(!0)}},x.params.breakpoints&&x.setBreakpoint(),x.container=e(t),0!==x.container.length)){if(x.container.length>1){var T=[];return x.container.each(function(){T.push(new a(this,s))}),T}
37x.container[0].swiper=x,x.container.data("swiper",x),x.classNames.push(x.params.containerModifierClass+x.params.direction),x.params.freeMode&&x.classNames.push(x.params.containerModifierClass+"free-mode"),x.support.flexbox||(x.classNames.push(x.params.containerModifierClass+"no-flexbox"),x.params.slidesPerColumn=1),x.params.autoHeight&&x.classNames.push(x.params.containerModifierClass+"autoheight"),(x.params.parallax||x.params.watchSlidesVisibility)&&(x.params.watchSlidesProgress=!0),x.params.touchReleaseOnEdges&&(x.params.resistanceRatio=0),["cube","coverflow","flip"].indexOf(x.params.effect)>=0&&(x.support.transforms3d?(x.params.watchSlidesProgress=!0,x.classNames.push(x.params.containerModifierClass+"3d")):x.params.effect="slide"),"slide"!==x.params.effect&&x.classNames.push(x.params.containerModifierClass+x.params.effect),"cube"===x.params.effect&&(x.params.resistanceRatio=0,x.params.slidesPerView=1,x.params.slidesPerColumn=1,x.params.slidesPerGroup=1,x.params.centeredSlides=!1,x.params.spaceBetween=0,x.params.virtualTranslate=!0),"fade"!==x.params.effect&&"flip"!==x.params.effect||(x.params.slidesPerView=1,x.params.slidesPerColumn=1,x.params.slidesPerGroup=1,x.params.watchSlidesProgress=!0,x.params.spaceBetween=0,void 0===g&&(x.params.virtualTranslate=!0)),x.params.grabCursor&&x.support.touch&&(x.params.grabCursor=!1),x.wrapper=x.container.children("."+x.params.wrapperClass),x.params.pagination&&(x.paginationContainer=e(x.params.pagination),x.params.uniqueNavElements&&"string"==typeof x.params.pagination&&x.paginationContainer.length>1&&1===x.container.find(x.params.pagination).length&&(x.paginationContainer=x.container.find(x.params.pagination)),"bullets"===x.params.paginationType&&x.params.paginationClickable?x.paginationContainer.addClass(x.params.paginationModifierClass+"clickable"):x.params.paginationClickable=!1,x.paginationContainer.addClass(x.params.paginationModifierClass+x.params.paginationType)),(x.params.nextButton||x.params.prevButton)&&(x.params.nextButton&&(x.nextButton=e(x.params.nextButton),x.params.uniqueNavElements&&"string"==typeof x.params.nextButton&&x.nextButton.length>1&&1===x.container.find(x.params.nextButton).length&&(x.nextButton=x.container.find(x.params.nextButton))),x.params.prevButton&&(x.prevButton=e(x.params.prevButton),x.params.uniqueNavElements&&"string"==typeof x.params.prevButton&&x.prevButton.length>1&&1===x.container.find(x.params.prevButton).length&&(x.prevButton=x.container.find(x.params.prevButton)))),x.isHorizontal=function(){return"horizontal"===x.params.direction},x.rtl=x.isHorizontal()&&("rtl"===x.container[0].dir.toLowerCase()||"rtl"===x.c
37ontainer.css("direction")),x.rtl&&x.classNames.push(x.params.containerModifierClass+"rtl"),x.rtl&&(x.wrongRTL="-webkit-box"===x.wrapper.css("display")),x.params.slidesPerColumn>1&&x.classNames.push(x.params.containerModifierClass+"multirow"),x.device.android&&x.classNames.push(x.params.containerModifierClass+"android"),x.container.addClass(x.classNames.join(" ")),x.translate=0,x.progress=0,x.velocity=0,x.lockSwipeToNext=function(){x.params.allowSwipeToNext=!1,x.params.allowSwipeToPrev===!1&&x.params.grabCursor&&x.unsetGrabCursor()},x.lockSwipeToPrev=function(){x.params.allowSwipeToPrev=!1,x.params.allowSwipeToNext===!1&&x.params.grabCursor&&x.unsetGrabCursor()},x.lockSwipes=function(){x.params.allowSwipeToNext=x.params.allowSwipeToPrev=!1,x.params.grabCursor&&x.unsetGrabCursor()},x.unlockSwipeToNext=function(){x.params.allowSwipeToNext=!0,x.params.allowSwipeToPrev===!0&&x.params.grabCursor&&x.setGrabCursor()},x.unlockSwipeToPrev=function(){x.params.allowSwipeToPrev=!0,x.params.allowSwipeToNext===!0&&x.params.grabCursor&&x.setGrabCursor()},x.unlockSwipes=function(){x.params.allowSwipeToNext=x.params.allowSwipeToPrev=!0,x.params.grabCursor&&x.setGrabCursor()},x.setGrabCursor=function(e){x.container[0].style.cursor="move",x.container[0].style.cursor=e?"-webkit-grabbing":"-webkit-grab",x.container[0].style.cursor=e?"-moz-grabbin":"-moz-grab",x.container[0].style.cursor=e?"grabbing":"grab"},x.unsetGrabCursor=function(){x.container[0].style.cursor=""},x.params.grabCursor&&x.setGrabCursor(),x.imagesToLoad=[],x.imagesLoaded=0,x.loadImage=function(e,a,t,s,r,i){function n(){i&&i()}var o;e.complete&&r?n():a?(o=new window.Image,o.onload=n,o.onerror=n,s&&(o.sizes=s),t&&(o.srcset=t),a&&(o.src=a)):n()},x.preloadImages=function(){function e(){void 0!==x&&null!==x&&x&&(void 0!==x.imagesLoaded&&x.imagesLoaded++,x.imagesLoaded===x.imagesToLoad.length&&(x.params.updateOnImagesReady&&x.update(),x.emit("onImagesReady",x)))}x.imagesToLoad=x.container.find("img");for(var a=0;a<x.imagesToLoad.length;a++)x.loadImage(x.imagesToLoad[a],x.imagesToLoad[a].currentSrc||x.imagesToLoad[a].getAttribute("src"),x.imagesToLoad[a].srcset||x.imagesToLoad[a].getAttribute("srcset"),x.imagesToLoad[a].sizes||x.imagesToLoad[a].getAttribute("sizes"),!0,e)},x.autoplayTimeoutId=void 0,x.autoplaying=!1,x.autoplayPaused=!1,x.startAutoplay=function(){return void 0===x.autoplayTimeoutId&&(!!x.params.autoplay&&(!x.autoplaying&&(x.autoplaying=!0,x.emit("onAutoplayStart",x),void i())))},x.stopAutoplay=function(e){x.autoplayTimeoutId&&(x.autoplayTimeoutId&&clearTimeout(x.autoplayTimeoutId),x.autoplaying=!1,x.autoplayTimeoutId=void 0,x.emit("onAutoplayStop",x))},x.pauseAutoplay=function(e){x.autoplayPaused||(x.autoplayTimeoutId&&clearTimeout(x.autoplayTimeoutId),x.autoplayPaused=!0,0===e?(x.autoplayPaused=!1,i()):x.wrapper.transitionEnd(function(){x&&(x.autoplayPaused=!1,x.autoplaying?i():x.stopAutoplay())}))},x.minTranslate=function(){return-x.snapGrid[0]},x.maxTranslate=function(){return-x.snapGrid[x.snapGrid.length-1]},x.updateAutoHeight=function(){var e,a=[],t=0;if("auto"!==x.params.slidesPerView&&x.params.slidesPerView>1)for(e=0;e<Math.ceil(x.params.slidesPerView);e++){var s=x.activeIndex+e;if(s>x.slides.length)break;a.push(x.slides.eq(s)[0])}else a.push(x.slides.eq(x.activeIndex)[0]);for(e=0;e<a.length;e++)if(void 0!==a[e]){var r=a[e].offsetHeight;t=r>t?r:t}t&&x.wrapper.css("height",t+"px")},x.updateContainerSize=function(){var e,a;e=void 0!==x.params.width?x.params.width:x.container[0].clientWidth,a=void 0!==x.params.height?x.params.height:x.container[0].clientHeight,0===e&&x.isHorizontal()||0===a&&!x.isHorizontal()||(e=e-parseInt(x.container.css("padding-left"),10)-parseInt(x.container.css("padding-right"),10),a=a-parseInt(x.container.css("padding-top"),10)-parseInt(x.container.css("padding-bottom"),10),x.width=e,x.height=a,x.size=x.isHorizontal()?x.width:x.height)},x.updateSlidesSize=function(){x.slides=x.wrapper.children("."+x.params.slideClass),x.snapGrid=[],x.slidesGrid=[],x.slidesSizesGrid=[];var e,a=x.params.spaceBetween,t=-x.params.slidesOffsetBefore,s=0,i=0;if(void 0!==x.size){"string"==typeof a&&a.indexOf("%")>=0&&(a=parseFloat(a.replace("%",""))/100*x.size),x.virtualSize=-a,x.rtl?x.slides.css({marginLeft:"",marginTop:""}):x.slides.css({marginRight:"",marginBottom:""});var n;x.params.slidesPerColumn>1&&(n=Math.floor(x.slides.length/x.params.slidesPerColumn)===x.slides.length/x.params.slidesPerColumn?x.slides.length:Math.ceil(x.slides.length/x.params.slidesPerColumn)*x.params.slidesPerColumn,"auto"!==x.params.slidesPerView&&"row"===x.params.slidesPerColumnFill&&(n=Math.max(n,x.params.slidesPerView*x.params.slidesPerColumn)));var o,l=x.params.slidesPerColumn,p=n/l,d=p-(x.params.slidesPerColumn*p-x.slides.length);for(e=0;e<x.slides.length;e++){o=0;var m=x.slides.eq(e);
37if(x.params.slidesPerColumn>1){var u,c,g;"column"===x.params.slidesPerColumnFill?(c=Math.floor(e/l),g=e-c*l,(c>d||c===d&&g===l-1)&&++g>=l&&(g=0,c++),u=c+g*n/l,m.css({"-webkit-box-ordinal-group":u,"-moz-box-ordinal-group":u,"-ms-flex-order":u,"-webkit-order":u,order:u})):(g=Math.floor(e/p),c=e-g*p),m.css("margin-"+(x.isHorizontal()?"top":"left"),0!==g&&x.params.spaceBetween&&x.params.spaceBetween+"px").attr("data-swiper-column",c).attr("data-swiper-row",g)}"none"!==m.css("display")&&("auto"===x.params.slidesPerView?(o=x.isHorizontal()?m.outerWidth(!0):m.outerHeight(!0),x.params.roundLengths&&(o=r(o))):(o=(x.size-(x.params.slidesPerView-1)*a)/x.params.slidesPerView,x.params.roundLengths&&(o=r(o)),x.isHorizontal()?x.slides[e].style.width=o+"px":x.slides[e].style.height=o+"px"),x.slides[e].swiperSlideSize=o,x.slidesSizesGrid.push(o),x.params.centeredSlides?(t=t+o/2+s/2+a,0===s&&0!==e&&(t=t-x.size/2-a),0===e&&(t=t-x.size/2-a),Math.abs(t)<.001&&(t=0),i%x.params.slidesPerGroup==0&&x.snapGrid.push(t),x.slidesGrid.push(t)):(i%x.params.slidesPerGroup==0&&x.snapGrid.push(t),x.slidesGrid.push(t),t=t+o+a),x.virtualSize+=o+a,s=o,i++)}x.virtualSize=Math.max(x.virtualSize,x.size)+x.params.slidesOffsetAfter;var h;if(x.rtl&&x.wrongRTL&&("slide"===x.params.effect||"coverflow"===x.params.effect)&&x.wrapper.css({width:x.virtualSize+x.params.spaceBetween+"px"}),x.support.flexbox&&!x.params.setWrapperSize||(x.isHorizontal()?x.wrapper.css({width:x.virtualSize+x.params.spaceBetween+"px"}):x.wrapper.css({height:x.virtualSize+x.params.spaceBetween+"px"})),x.params.slidesPerColumn>1&&(x.virtualSize=(o+x.params.spaceBetween)*n,x.virtualSize=Math.ceil(x.virtualSize/x.params.slidesPerColumn)-x.params.spaceBetween,x.isHorizontal()?x.wrapper.css({width:x.virtualSize+x.params.spaceBetween+"px"}):x.wrapper.css({height:x.virtualSize+x.params.spaceBetween+"px"}),x.params.centeredSlides)){for(h=[],e=0;e<x.snapGrid.length;e++)x.snapGrid[e]<x.virtualSize+x.snapGrid[0]&&h.push(x.snapGrid[e]);x.snapGrid=h}if(!x.params.centeredSlides){for(h=[],e=0;e<x.snapGrid.length;e++)x.snapGrid[e]<=x.virtualSize-x.size&&h.push(x.snapGrid[e]);x.snapGrid=h,Math.floor(x.virtualSize-x.size)-Math.floor(x.snapGrid[x.snapGrid.length-1])>1&&x.snapGrid.push(x.virtualSize-x.size)}0===x.snapGrid.length&&(x.snapGrid=[0]),0!==x.params.spaceBetween&&(x.isHorizontal()?x.rtl?x.slides.css({marginLeft:a+"px"}):x.slides.css({marginRight:a+"px"}):x.slides.css({marginBottom:a+"px"})),x.params.watchSlidesProgress&&x.updateSlidesOffset()}},x.updateSlidesOffset=function(){for(var e=0;e<x.slides.length;e++)x.slides[e].swiperSlideOffset=x.isHorizontal()?x.slides[e].offsetLeft:x.slides[e].offsetTop},x.currentSlidesPerView=function(){var e,a,t=1;if(x.params.centeredSlides){var s,r=x.slides[x.activeIndex].swiperSlideSize;for(e=x.activeIndex+1;e<x.slides.length;e++)x.slides[e]&&!s&&(r+=x.slides[e].swiperSlideSize,t++,r>x.size&&(s=!0));for(a=x.activeIndex-1;a>=0;a--)x.slides[a]&&!s&&(r+=x.slides[a].swiperSlideSize,t++,r>x.size&&(s=!0))}else for(e=x.activeIndex+1;e<x.slides.length;e++)x.slidesGrid[e]-x.slidesGrid[x.activeIndex]<x.size&&t++;return t},x.updateSlidesProgress=function(e){if(void 0===e&&(e=x.translate||0),0!==x.slides.length){void 0===x.slides[0].swiperSlideOffset&&x.updateSlidesOffset();var a=-e;x.rtl&&(a=e),x.slides.removeClass(x.params.slideVisibleClass);for(var t=0;t<x.slides.length;t++){var s=x.slides[t],r=(a+(x.params.centeredSlides?x.minTranslate():0)-s.swiperSlideOffset)/(s.swiperSlideSize+x.params.spaceBetween);if(x.params.watchSlidesVisibility){var i=-(a-s.swiperSlideOffset),n=i+x.slidesSizesGrid[t];(i>=0&&i<x.size||n>0&&n<=x.size||i<=0&&n>=x.size)&&x.slides.eq(t).addClass(x.params.slideVisibleClass)}s.progress=x.rtl?-r:r}}},x.updateProgress=function(e){void 0===e&&(e=x.translate||0);var a=x.maxTranslate()-x.minTranslate(),t=x.isBeginning,s=x.isEnd;0===a?(x.progress=0,x.isBeginning=x.isEnd=!0):(x.progress=(e-x.minTranslate())/a,x.isBeginning=x.progress<=0,x.isEnd=x.progress>=1),x.isBeginning&&!t&&x.emit("onReachBeginning",x),x.isEnd&&!s&&x.emit("onReachEnd",x),x.params.watchSlidesProgress&&x.updateSlidesProgress(e),x.emit("onProgress",x,x.progress)},x.updateActiveIndex=function(){var e,a,t,s=x.rtl?x.translate:-x.translate;
37for(a=0;a<x.slidesGrid.length;a++)void 0!==x.slidesGrid[a+1]?s>=x.slidesGrid[a]&&s<x.slidesGrid[a+1]-(x.slidesGrid[a+1]-x.slidesGrid[a])/2?e=a:s>=x.slidesGrid[a]&&s<x.slidesGrid[a+1]&&(e=a+1):s>=x.slidesGrid[a]&&(e=a);x.params.normalizeSlideIndex&&(e<0||void 0===e)&&(e=0),t=Math.floor(e/x.params.slidesPerGroup),t>=x.snapGrid.length&&(t=x.snapGrid.length-1),e!==x.activeIndex&&(x.snapIndex=t,x.previousIndex=x.activeIndex,x.activeIndex=e,x.updateClasses(),x.updateRealIndex())},x.updateRealIndex=function(){x.realIndex=parseInt(x.slides.eq(x.activeIndex).attr("data-swiper-slide-index")||x.activeIndex,10)},x.updateClasses=function(){x.slides.removeClass(x.params.slideActiveClass+" "+x.params.slideNextClass+" "+x.params.slidePrevClass+" "+x.params.slideDuplicateActiveClass+" "+x.params.slideDuplicateNextClass+" "+x.params.slideDuplicatePrevClass);var a=x.slides.eq(x.activeIndex);a.addClass(x.params.slideActiveClass),s.loop&&(a.hasClass(x.params.slideDuplicateClass)?x.wrapper.children("."+x.params.slideClass+":not(."+x.params.slideDuplicateClass+')[data-swiper-slide-index="'+x.realIndex+'"]').addClass(x.params.slideDuplicateActiveClass):x.wrapper.children("."+x.params.slideClass+"."+x.params.slideDuplicateClass+'[data-swiper-slide-index="'+x.realIndex+'"]').addClass(x.params.slideDuplicateActiveClass));var t=a.next("."+x.params.slideClass).addClass(x.params.slideNextClass);x.params.loop&&0===t.length&&(t=x.slides.eq(0),t.addClass(x.params.slideNextClass));var r=a.prev("."+x.params.slideClass).addClass(x.params.slidePrevClass);if(x.params.loop&&0===r.length&&(r=x.slides.eq(-1),r.addClass(x.params.slidePrevClass)),s.loop&&(t.hasClass(x.params.slideDuplicateClass)?x.wrapper.children("."+x.params.slideClass+":not(."+x.params.slideDuplicateClass+')[data-swiper-slide-index="'+t.attr("data-swiper-slide-index")+'"]').addClass(x.params.slideDuplicateNextClass):x.wrapper.children("."+x.params.slideClass+"."+x.params.slideDuplicateClass+'[data-swiper-slide-index="'+t.attr("data-swiper-slide-index")+'"]').addClass(x.params.slideDuplicateNextClass),r.hasClass(x.params.slideDuplicateClass)?x.wrapper.children("."+x.params.slideClass+":not(."+x.params.slideDuplicateClass+')[data-swiper-slide-index="'+r.attr("data-swiper-slide-index")+'"]').addClass(x.params.slideDuplicatePrevClass):x.wrapper.children("."+x.params.slideClass+"."+x.params.slideDuplicateClass+'[data-swiper-slide-index="'+r.attr("data-swiper-slide-index")+'"]').addClass(x.params.slideDuplicatePrevClass)),x.paginationContainer&&x.paginationContainer.length>0){var i,n=x.params.loop?Math.ceil((x.slides.length-2*x.loopedSlides)/x.params.slidesPerGroup):x.snapGrid.length;if(x.params.loop?(i=Math.ceil((x.activeIndex-x.loopedSlides)/x.params.slidesPerGroup),i>x.slides.length-1-2*x.loopedSlides&&(i-=x.slides.length-2*x.loopedSlides),i>n-1&&(i-=n),i<0&&"bullets"!==x.params.paginationType&&(i=n+i)):i=void 0!==x.snapIndex?x.snapIndex:x.activeIndex||0,"bullets"===x.params.paginationType&&x.bullets&&x.bullets.length>0&&(x.bullets.removeClass(x.params.bulletActiveClass),x.paginationContainer.length>1?x.bullets.each(function(){e(this).index()===i&&e(this).addClass(x.params.bulletActiveClass)}):x.bullets.eq(i).addClass(x.params.bulletActiveClass)),"fraction"===x.params.paginationType&&(x.paginationContainer.find("."+x.params.paginationCurrentClass).text(i+1),x.paginationContainer.find("."+x.params.paginationTotalClass).text(n)),"progress"===x.params.paginationType){var o=(i+1)/n,l=o,p=1;x.isHorizontal()||(p=o,l=1),x.paginationContainer.find("."+x.params.paginationProgressbarClass).transform("translate3d(0,0,0) scaleX("+l+") scaleY("+p+")").transition(x.params.speed)}"custom"===x.params.paginationType&&x.params.paginationCustomRender&&(x.paginationContainer.html(x.params.paginationCustomRender(x,i+1,n)),x.emit("onPaginationRendered",x,x.paginationContainer[0]))}x.params.loop||(x.params.prevButton&&x.prevButton&&x.prevButton.length>0&&(x.isBeginning?(x.prevButton.addClass(x.params.buttonDisabledClass),x.params.a11y&&x.a11y&&x.a11y.disable(x.prevButton)):(x.prevButton.removeClass(x.params.buttonDisabledClass),x.params.a11y&&x.a11y&&x.a11y.enable(x.prevButton))),x.params.nextButton&&x.nextButton&&x.nextButton.length>0&&(x.isEnd?(x.nextButton.addClass(x.params.buttonDisabledClass),x.params.a11y&&x.a11y&&x.a11y.disable(x.nextButton)):(x.nextButton.removeClass(x.params.buttonDisabledClass),x.params.a11y&&x.a11y&&x.a11y.enable(x.nextButton))))},x.updatePagination=function(){if(x.params.pagination&&x.paginationContainer&&x.paginationContainer.length>0){var e="";if("bullets"===x.params.paginationType){for(var a=x.params.loop?Math.
37ceil((x.slides.length-2*x.loopedSlides)/x.params.slidesPerGroup):x.snapGrid.length,t=0;t<a;t++)e+=x.params.paginationBulletRender?x.params.paginationBulletRender(x,t,x.params.bulletClass):"<"+x.params.paginationElement+' class="'+x.params.bulletClass+'"></'+x.params.paginationElement+">";x.paginationContainer.html(e),x.bullets=x.paginationContainer.find("."+x.params.bulletClass),x.params.paginationClickable&&x.params.a11y&&x.a11y&&x.a11y.initPagination()}"fraction"===x.params.paginationType&&(e=x.params.paginationFractionRender?x.params.paginationFractionRender(x,x.params.paginationCurrentClass,x.params.paginationTotalClass):'<span class="'+x.params.paginationCurrentClass+'"></span> / <span class="'+x.params.paginationTotalClass+'"></span>',x.paginationContainer.html(e)),"progress"===x.params.paginationType&&(e=x.params.paginationProgressRender?x.params.paginationProgressRender(x,x.params.paginationProgressbarClass):'<span class="'+x.params.paginationProgressbarClass+'"></span>',x.paginationContainer.html(e)),"custom"!==x.params.paginationType&&x.emit("onPaginationRendered",x,x.paginationContainer[0])}},x.update=function(e){function a(){x.rtl,x.translate;t=Math.min(Math.max(x.translate,x.maxTranslate()),x.minTranslate()),x.setWrapperTranslate(t),x.updateActiveIndex(),x.updateClasses()}if(x){x.updateContainerSize(),x.updateSlidesSize(),x.updateProgress(),x.updatePagination(),x.updateClasses(),x.params.scrollbar&&x.scrollbar&&x.scrollbar.set();var t;if(e){x.controller&&x.controller.spline&&(x.controller.spline=void 0),x.params.freeMode?(a(),x.params.autoHeight&&x.updateAutoHeight()):(("auto"===x.params.slidesPerView||x.params.slidesPerView>1)&&x.isEnd&&!x.params.centeredSlides?x.slideTo(x.slides.length-1,0,!1,!0):x.slideTo(x.activeIndex,0,!1,!0))||a()}else x.params.autoHeight&&x.updateAutoHeight()}},x.onResize=function(e){x.params.onBeforeResize&&x.params.onBeforeResize(x),x.params.breakpoints&&x.setBreakpoint();var a=x.params.allowSwipeToPrev,t=x.params.allowSwipeToNext;x.params.allowSwipeToPrev=x.params.allowSwipeToNext=!0,x.updateContainerSize(),x.updateSlidesSize(),("auto"===x.params.slidesPerView||x.params.freeMode||e)&&x.updatePagination(),x.params.scrollbar&&x.scrollbar&&x.scrollbar.set(),x.controller&&x.controller.spline&&(x.controller.spline=void 0);var s=!1;if(x.params.freeMode){var r=Math.min(Math.max(x.translate,x.maxTranslate()),x.minTranslate());x.setWrapperTranslate(r),x.updateActiveIndex(),x.updateClasses(),x.params.autoHeight&&x.updateAutoHeight()}else x.updateClasses(),s=("auto"===x.params.slidesPerView||x.params.slidesPerView>1)&&x.isEnd&&!x.params.centeredSlides?x.slideTo(x.slides.length-1,0,!1,!0):x.slideTo(x.activeIndex,0,!1,!0);x.params.lazyLoading&&!s&&x.lazy&&x.lazy.load(),x.params.allowSwipeToPrev=a,x.params.allowSwipeToNext=t,x.params.onAfterResize&&x.params.onAfterResize(x)},x.touchEventsDesktop={start:"mousedown",move:"mousemove",end:"mouseup"},window.navigator.pointerEnabled?x.touchEventsDesktop={start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled&&(x.touchEventsDesktop={start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}),x.touchEvents={start:x.support.touch||!x.params.simulateTouch?"touchstart":x.touchEventsDesktop.start,move:x.support.touch||!x.params.simulateTouch?"touchmove":x.touchEventsDesktop.move,end:x.support.touch||!x.params.simulateTouch?"touchend":x.touchEventsDesktop.end},(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&("container"===x.params.touchEventsTarget?x.container:x.wrapper).addClass("swiper-wp8-"+x.params.direction),x.initEvents=function(e){var a=e?"off":"on",t=e?"removeEventListener":"addEventListener",r="container"===x.params.touchEventsTarget?x.container[0]:x.wrapper[0],i=x.support.touch?r:document,n=!!x.params.nested;if(x.browser.ie)r[t](x.touchEvents.start,x.onTouchStart,!1),i[t](x.touchEvents.move,x.onTouchMove,n),i[t](x.touchEvents.end,x.onTouchEnd,!1);else{if(x.support.touch){var o=!("touchstart"!==x.touchEvents.start||!x.support.passiveListener||!x.params.passiveListeners)&&{passive:!0,capture:!1};r[t](x.touchEvents.start,x.onTouchStart,o),r[t](x.touchEvents.move,x.onTouchMove,n),r[t](x.touchEvents.end,x.onTouchEnd,o)}(s.simulateTouch&&!x.device.ios&&!x.device.android||s.simulateTouch&&!x.support.touch&&x.device.ios)&&(r[t]("mousedown",x.onTouchStart,!1),document[t]("mousemove",x.onTouchMove,n),document[t]("mouseup",x.onTouchEnd,!1))}window[t]("resize",x.onResize),x.params.nextButton&&x.nextButton&&x.nextButton.length>0&&(x.nextButton[a]("click",x.onClickNext),x.params.a11y&&x.a11y&&x.nextButton[a]("keydown",x.a11y.onEnterKey)),x.params.prevButton&&x.prevButton&&x.prevButton.length>0&&(x.prevButton[a]("click",x.onClickPrev),x.params.a11y&&x.a11y&&x.prevButton[a]("keydown",x.a11y.onEnterKey)),x.params.pagination&&x.params.paginationClickable&&(x.paginationContainer[a]("click","."+x.params.bulletClass,x.onClickIndex),x.params.a11y&&x.a11y&&x.paginationContainer[a]("keydown","."+x.params.bulletClass,x.a11y.onEnterKey)),(x.params.preventClicks||x.params.preventClicksPropagation)&&r[t]("click",x.preventClicks,!0)},x.attachEvents=function(){x.initEvents()},x.detachEvents=function(){x.initEvents(!0)},x.allowClick=!0,x.preventClicks=function(e){x.allowClick||(x.params.preventClicks&&e.preventDefault(),x.params.preventClicksPropagation&&x.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))},x.onClickNext=function(e){e.preventDefault(),x.isEnd&&!x.params.loop||x.slideNext()},x.onClickPrev=function(e){e.preventDefault(),x.isBeginning&&!x.params.loop||x.slidePrev()},x.onClickIndex=function(a){a.preventDefault();var t=e(this).index()*x.params.slidesPerGroup
38;x.params.loop&&(t+=x.loopedSlides),x.slideTo(t)},x.updateClickedSlide=function(a){var t=n(a,"."+x.params.slideClass),s=!1;if(t)for(var r=0;r<x.slides.length;r++)x.slides[r]===t&&(s=!0);if(!t||!s)return x.clickedSlide=void 0,void(x.clickedIndex=void 0);if(x.clickedSlide=t,x.clickedIndex=e(t).index(),x.params.slideToClickedSlide&&void 0!==x.clickedIndex&&x.clickedIndex!==x.activeIndex){var i,o=x.clickedIndex,l="auto"===x.params.slidesPerView?x.currentSlidesPerView():x.params.slidesPerView;if(x.params.loop){if(x.animating)return;i=parseInt(e(x.clickedSlide).attr("data-swiper-slide-index"),10),x.params.centeredSlides?o<x.loopedSlides-l/2||o>x.slides.length-x.loopedSlides+l/2?(x.fixLoop(),o=x.wrapper.children("."+x.params.slideClass+'[data-swiper-slide-index="'+i+'"]:not(.'+x.params.slideDuplicateClass+")").eq(0).index(),setTimeout(function(){x.slideTo(o)},0)):x.slideTo(o):o>x.slides.length-l?(x.fixLoop(),o=x.wrapper.children("."+x.params.slideClass+'[data-swiper-slide-index="'+i+'"]:not(.'+x.params.slideDuplicateClass+")").eq(0).index(),setTimeout(function(){x.slideTo(o)},0)):x.slideTo(o)}else x.slideTo(o)}};var b,C,S,z,M,P,E,I,k,D,L="input, select, textarea, button, video",B=Date.now(),H=[];x.animating=!1,x.touches={startX:0,startY:0,currentX:0,currentY:0,diff:0};var G,X;
38x.onTouchStart=function(a){if(a.originalEvent&&(a=a.originalEvent),(G="touchstart"===a.type)||!("which"in a)||3!==a.which){if(x.params.noSwiping&&n(a,"."+x.params.noSwipingClass))return void(x.allowClick=!0);if(!x.params.swipeHandler||n(a,x.params.swipeHandler)){var t=x.touches.currentX="touchstart"===a.type?a.targetTouches[0].pageX:a.pageX,s=x.touches.currentY="touchstart"===a.type?a.targetTouches[0].pageY:a.pageY;if(!(x.device.ios&&x.params.iOSEdgeSwipeDetection&&t<=x.params.iOSEdgeSwipeThreshold)){if(b=!0,C=!1,S=!0,M=void 0,X=void 0,x.touches.startX=t,x.touches.startY=s,z=Date.now(),x.allowClick=!0,x.updateContainerSize(),x.swipeDirection=void 0,x.params.threshold>0&&(I=!1),"touchstart"!==a.type){var r=!0;e(a.target).is(L)&&(r=!1),document.activeElement&&e(document.activeElement).is(L)&&document.activeElement.blur(),r&&a.preventDefault()}x.emit("onTouchStart",x,a)}}}},x.onTouchMove=function(a){if(a.originalEvent&&(a=a.originalEvent),!G||"mousemove"!==a.type){if(a.preventedByNestedSwiper)return x.touches.startX="touchmove"===a.type?a.targetTouches[0].pageX:a.pageX,void(x.touches.startY="touchmove"===a.type?a.targetTouches[0].pageY:a.pageY);if(x.params.onlyExternal)return x.allowClick=!1,void(b&&(x.touches.startX=x.touches.currentX="touchmove"===a.type?a.targetTouches[0].pageX:a.pageX,x.touches.startY=x.touches.currentY="touchmove"===a.type?a.targetTouches[0].pageY:a.pageY,z=Date.now()));if(G&&x.params.touchReleaseOnEdges&&!x.params.loop)if(x.isHorizontal()){if(x.touches.currentX<x.touches.startX&&x.translate<=x.maxTranslate()||x.touches.currentX>x.touches.startX&&x.translate>=x.minTranslate())return}else if(x.touches.currentY<x.touches.startY&&x.translate<=x.maxTranslate()||x.touches.currentY>x.touches.startY&&x.translate>=x.minTranslate())return;if(G&&document.activeElement&&a.target===document.activeElement&&e(a.target).is(L))return C=!0,void(x.allowClick=!1);if(S&&x.emit("onTouchMove",x,a),!(a.targetTouches&&a.targetTouches.length>1)){if(x.touches.currentX="touchmove"===a.type?a.targetTouches[0].pageX:a.pageX,x.touches.currentY="touchmove"===a.type?a.targetTouches[0].pageY:a.pageY,void 0===M){var t;x.isHorizontal()&&x.touches.currentY===x.touches.startY||!x.isHorizontal()&&x.touches.currentX===x.touches.startX?M=!1:(t=180*Math.atan2(Math.abs(x.touches.currentY-x.touches.startY),Math.abs(x.touches.currentX-x.touches.startX))/Math.PI,M=x.isHorizontal()?t>x.params.touchAngle:90-t>x.params.touchAngle)}if(M&&x.emit("onTouchMoveOpposite",x,a),void 0===X&&(x.touches.currentX===x.touches.startX&&x.touches.currentY===x.touches.startY||(X=!0)),b){if(M)return void(b=!1);if(X){x.allowClick=!1,x.emit("onSliderMove",x,a),a.preventDefault(),x.params.touchMoveStopPropagation&&!x.params.nested&&a.stopPropagation(),C||(s.loop&&x.fixLoop(),E=x.getWrapperTranslate(),x.setWrapperTransition(0),x.animating&&x.wrapper.trigger("webkitTransitionEnd transitionend oTransitionEnd MSTransitionEnd msTransitionEnd"),x.params.autoplay&&x.autoplaying&&(x.params.autoplayDisableOnInteraction?x.stopAutoplay():x.pauseAutoplay()),D=!1,!x.params.grabCursor||x.params.allowSwipeToNext!==!0&&x.params.allowSwipeToPrev!==!0||x.setGrabCursor(!0)),C=!0;var r=x.touches.diff=x.isHorizontal()?x.touches.currentX-x.touches.startX:x.touches.currentY-x.touches.startY;r*=x.params.touchRatio,x.rtl&&(r=-r),x.swipeDirection=r>0?"prev":"next",P=r+E;var i=!0;if(r>0&&P>x.minTranslate()?(i=!1,x.params.resistance&&(P=x.minTranslate()-1+Math.pow(-x.minTranslate()+E+r,x.params.resistanceRatio))):r<0&&P<x.maxTranslate()&&(i=!1,x.params.resistance&&(P=x.maxTranslate()+1-Math.pow(x.maxTranslate()-E-r,x.params.resistanceRatio))),i&&(a.preventedByNestedSwiper=!0),!x.params.allowSwipeToNext&&"next"===x.swipeDirection&&P<E&&(P=E),!x.params.allowSwipeToPrev&&"prev"===x.swipeDirection&&P>E&&(P=E),x.params.threshold>0){if(!(Math.abs(r)>x.params.threshold||I))return void(P=E);if(!I)return I=!0,x.touches.startX=x.touches.currentX,x.touches.startY=x.touches.currentY,P=E,void(x.touches.diff=x.isHorizontal()?x.touches.currentX-x.touches.startX:x.touches.currentY-x.touches.startY)}x.params.followFinger&&((x.params.freeMode||x.params.watchSlidesProgress)&&x.updateActiveIndex(),x.params.freeMode&&(0===H.length&&H.push({position:x.touches[x.isHorizontal()?"startX":"startY"],time:z}),H.push({position:x.touches[x.isHorizontal()?"currentX":"currentY"],time:(new window.Date).getTime()})),x.updateProgress(P),x.setWrapperTranslate(P))}}}}}
vendor: 10,281 bytes, line 38
38,x.onTouchEnd=function(a){if(a.originalEvent&&(a=a.originalEvent),S&&x.emit("onTouchEnd",x,a),S=!1,b){x.params.grabCursor&&C&&b&&(x.params.allowSwipeToNext===!0||x.params.allowSwipeToPrev===!0)&&x.setGrabCursor(!1);var t=Date.now(),s=t-z;if(x.allowClick&&(x.updateClickedSlide(a),x.emit("onTap",x,a),s<300&&t-B>300&&(k&&clearTimeout(k),k=setTimeout(function(){x&&(x.params.paginationHide&&x.paginationContainer.length>0&&!e(a.target).hasClass(x.params.bulletClass)&&x.paginationContainer.toggleClass(x.params.paginationHiddenClass),x.emit("onClick",x,a))},300)),s<300&&t-B<300&&(k&&clearTimeout(k),x.emit("onDoubleTap",x,a))),B=Date.now(),setTimeout(function(){x&&(x.allowClick=!0)},0),!b||!C||!x.swipeDirection||0===x.touches.diff||P===E)return void(b=C=!1);b=C=!1;var r;if(r=x.params.followFinger?x.rtl?x.translate:-x.translate:-P,x.params.freeMode){if(r<-x.minTranslate())return void x.slideTo(x.activeIndex);if(r>-x.maxTranslate())return void(x.slides.length<x.snapGrid.length?x.slideTo(x.snapGrid.length-1):x.slideTo(x.slides.length-1));if(x.params.freeModeMomentum){if(H.length>1){var i=H.pop(),n=H.pop(),o=i.position-n.position,l=i.time-n.time;x.velocity=o/l,x.velocity=x.velocity/2,Math.abs(x.velocity)<x.params.freeModeMinimumVelocity&&(x.velocity=0),(l>150||(new window.Date).getTime()-i.time>300)&&(x.velocity=0)}else x.velocity=0;x.velocity=x.velocity*x.params.freeModeMomentumVelocityRatio,H.length=0;var p=1e3*x.params.freeModeMomentumRatio,d=x.velocity*p,m=x.translate+d;x.rtl&&(m=-m);var u,c=!1,g=20*Math.abs(x.velocity)*x.params.freeModeMomentumBounceRatio;if(m<x.maxTranslate())x.params.freeModeMomentumBounce?(m+x.maxTranslate()<-g&&(m=x.maxTranslate()-g),u=x.maxTranslate(),c=!0,D=!0):m=x.maxTranslate();else if(m>x.minTranslate())x.params.freeModeMomentumBounce?(m-x.minTranslate()>g&&(m=x.minTranslate()+g),u=x.minTranslate(),c=!0,D=!0):m=x.minTranslate();else if(x.params.freeModeSticky){var h,v=0;for(v=0;v<x.snapGrid.length;v+=1)if(x.snapGrid[v]>-m){h=v;break}m=Math.abs(x.snapGrid[h]-m)<Math.abs(x.snapGrid[h-1]-m)||"next"===x.swipeDirection?x.snapGrid[h]:x.snapGrid[h-1],x.rtl||(m=-m)}if(0!==x.velocity)p=x.rtl?Math.abs((-m-x.translate)/x.velocity):Math.abs((m-x.translate)/x.velocity);else if(x.params.freeModeSticky)return void x.slideReset();x.params.freeModeMomentumBounce&&c?(x.updateProgress(u),x.setWrapperTransition(p),x.setWrapperTranslate(m),x.onTransitionStart(),x.animating=!0,x.wrapper.transitionEnd(function(){x&&D&&(x.emit("onMomentumBounce",x),x.setWrapperTransition(x.params.speed),x.setWrapperTranslate(u),x.wrapper.transitionEnd(function(){x&&x.onTransitionEnd()}))})):x.velocity?(x.updateProgress(m),x.setWrapperTransition(p),x.setWrapperTranslate(m),x.onTransitionStart(),x.animating||(x.animating=!0,x.wrapper.transitionEnd(function(){x&&x.onTransitionEnd()}))):x.updateProgress(m),x.updateActiveIndex()}return void((!x.params.freeModeMomentum||s>=x.params.longSwipesMs)&&(x.updateProgress(),x.updateActiveIndex()))}var f,w=0,y=x.slidesSizesGrid[0];for(f=0;f<x.slidesGrid.length;f+=x.params.slidesPerGroup)void 0!==x.slidesGrid[f+x.params.slidesPerGroup]?r>=x.slidesGrid[f]&&r<x.slidesGrid[f+x.params.slidesPerGroup]&&(w=f,y=x.slidesGrid[f+x.params.slidesPerGroup]-x.slidesGrid[f]):r>=x.slidesGrid[f]&&(w=f,y=x.slidesGrid[x.slidesGrid.length-1]-x.slidesGrid[x.slidesGrid.length-2]);var T=(r-x.slidesGrid[w])/y;if(s>x.params.longSwipesMs){if(!x.params.longSwipes)return void x.slideTo(x.activeIndex);"next"===x.swipeDirection&&(T>=x.params.longSwipesRatio?x.slideTo(w+x.params.slidesPerGroup):x.slideTo(w)),"prev"===x.swipeDirection&&(T>1-x.params.longSwipesRatio?x.slideTo(w+x.params.slidesPerGroup):x.slideTo(w))}else{if(!x.params.shortSwipes)return void x.slideTo(x.activeIndex);"next"===x.swipeDirection&&x.slideTo(w+x.params.slidesPerGroup),"prev"===x.swipeDirection&&x.slideTo(w)}}},x._slideTo=function(e,a){return x.slideTo(e,a,!0,!0)},x.slideTo=function(e,a,t,s){void 0===t&&(t=!0),void 0===e&&(e=0),e<0&&(e=0),x.snapIndex=Math.floor(e/x.params.slidesPerGroup),x.snapIndex>=x.snapGrid.length&&(x.snapIndex=x.snapGrid.length-1);var r=-x.snapGrid[x.snapIndex];if(x.params.autoplay&&x.autoplaying&&(s||!x.params.autoplayDisableOnInteraction?x.pauseAutoplay(a):x.stopAutoplay()),x.updateProgress(r),x.params.normalizeSlideIndex)for(var i=0;i<x.slidesGrid.length;i++)-Math.floor(100*r)>=Math.floor(100*x.slidesGrid[i])&&(e=i);return!(!x.params.allowSwipeToNext&&r<x.translate&&r<x.minTranslate())&&(!(!x.params.allowSwipeToPrev&&r>x.translate&&r>x.maxTranslate()&&(x.activeIndex||0)!==e)&&(void 0===a&&(a=x.params.speed),x.previousIndex=x.activeIndex||0,x.activeIndex=e,x.updateRealIndex(),x.rtl&&-r===x.translate||!x.rtl&&r===x.translate?(x.params.autoHeight&&x.updateAutoHeight(),x.updateClasses(),"slide"!==x.params.effect&&x.setWrapperTranslate(r),!1):(x.updateClasses(),x.onTransitionStart(t),0===a||x.browser.lteIE9?(x.setWrapperTranslate(r),x.setWrapperTransition(0),x.onTransitionEnd(t)):(x.setWrapperTranslate(r),x.setWrapperTransition(a),x.animating||(x.animating=!0,x.wrapper.transitionEnd(function(){x&&x.onTransitionEnd(t)}))),!0)))},x.onTransitionStart=function(e){void 0===e&&(e=!0),x.params.autoHeight&&x.updateAutoHeight(),x.lazy&&x.lazy.onTransitionStart(),e&&(x.emit("onTransitionStart",x),x.activeIndex!==x.previousIndex&&(x.emit("onSlideChangeStart",x),x.activeIndex>x.previousIndex?x.emit("onSlideNextStart",x):x.emit("onSlidePrevStart",x)))},x.onTransitionEnd=function(e){x.animating=!1,x.setWrapperTransition(0),void 0===e&&(e=!0),x.lazy&&x.lazy.onTransitionEnd(),e&&(x.emit("onTransitionEnd",x),x.activeIndex!==x.previousIndex&&(x.emit("onSlideChangeEnd",x),x.activeIndex>x.previousIndex?x.emit("onSlideNextEnd",x):x.emit("onSlidePrevEnd",x))),x.params.history&&x.history&&x.history.setHistory(x.params.history,x.activeIndex),x.params.hashnav&&x.hashnav&&x.hashnav.setHash()},x.slideNext=function(e,a,t){if(x.params.loop){if(x.animating)return!1;x.fixLoop();x.container[0].clientLeft;return x.slideTo(x.activeIndex+x.params.slidesPerGroup,a,e,t)}return x.slideTo(x.activeIndex+x.params.slidesPerGroup,a,e,t)},x._slideNext=function(e){return x.slideNext(!0,e,!0)},x.slidePrev=function(e,a,t){if(x.params.loop){if(x.animating)return!1;x.fixLoop();x.container[0].clientLeft;return x.slideTo(x.activeIndex-1,a,e,t)}return x.slideTo(x.activeIndex-1,a,e,t)},x._slidePrev=function(e){return x.slidePrev(!0,e,!0)},x.slideReset=function(e,a,t){return x.slideTo(x.activeIndex,a,e)},x.disableTouchControl=function(){return x.params.onlyExternal=!0,!0},x.enableTouchControl=function(){return x.params.onlyExternal=!1,!0},x.setWrapperTransition=function(e,a){x.wrapper.transition(e),"slide"!==x.params.effect&&x.effects[x.params.effect]&&x.effects[x.params.effect].setTransition(e),x.params.parallax&&x.parallax&&x.parallax.setTransition(e),x.params.scrollbar&&x.scrollbar&&x.scrollbar.setTransition(e),x.params.control&&x.controller&&x.controller.setTransition(e,a),x.emit("onSetTransition",x,e)},x.setWrapperTranslate=function(e,a,t){var s=0,i=0;x.isHorizontal()?s=x.rtl?-e:e:i=e,x.params.roundLengths&&(s=r(s),i=r(i)),x.params.virtualTranslate||(x.support.transforms3d?x.wrapper.transform("translate3d("+s+"px, "+i+"px, 0px)"):x.wrapper.transform("translate("+s+"px, "+i+"px)")),x.translate=x.isHorizontal()?s:i;var n,o=x.maxTranslate()-x.minTranslate();n=0===o?0:(e-x.minTranslate())/o,n!==x.progress&&x.updateProgress(e),a&&x.updateActiveIndex(),"slide"!==x.params.effect&&x.effects[x.params.effect]&&x.effects[x.params.effect].setTranslate(x.translate),x.params.parallax&&x.parallax&&x.parallax.setTranslate(x.translate),x.params.scrollbar&&x.scrollbar&&x.scrollbar.setTranslate(x.translate),x.params.control&&x.controller&&x.controller.setTranslate(x.translate,t),x.emit("onSetTranslate",x,x.translate)},x.getTranslate=function(e,a){var t,s,r,i;return void 0===a&&(a="x"),x.params.virtualTranslate?x.rtl?-x.translate:x.translate:(r=window.getComputedStyle(e,null),window.WebKitCSSMatrix?(s=r.transform||r.webkitTransform,s.split(",").length>6&&(s=s.split(", ").map(function(e){return e.replace(",",".")}).join(", ")),i=new window.WebKitCSSMatrix("none"===s?"":s)):(i=r.MozTransform||r.OTransform||r.MsTransform||r.msTransform||r.transform||r.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),t=i.toString().split(",")),"x"===a&&(s=window.WebKitCSSMatrix?i.m41:16===t.length?parseFloat(t[12]):parseFloat(t[4])),"y"===a&&(s=window.WebKitCSSMatrix?i.m42:16===t.length?parseFloat(t[13]):parseFloat(t[5])),x.rtl&&s&&(s=-s),s||0)},x.getWrapperTranslate=function(e){return void 0===e&&(e=x.isHorizontal()?"x":"y"),x.getTranslate(x.wrapper[0],e)},x.observers=[],x.initObservers=function(){if(x.params.observeParents)for(var e=x.container.parents(),a=0;a<e.length;a++)o(e[a]);o(x.container[0],{childList:!1}),o(x.wrapper[0],{attributes:!1})},x.disconnectObservers=function(){for(var e=0;e<x.observers.length;e++)x.observers[e].disconnect();x.observers=[]},x.createLoop=function(){x.wrapper.children("."+x.params.slideClass+"."+x.params.slideDuplicateClass).remove();var a=x.wrapper.children("."+x.params.slideClass);"auto"!==x.params.slidesPerView||x.params.loopedSlides||(x.params.loopedSlides=a.length),x.loopedSlides=parseInt(x.params.loopedSlides||x.params.slidesPerView,10),x.loopedSlides=x.loopedSlides+x.params.loopAdditionalSlides,x.loopedSlides>a.length&&(x.loopedSlides=a.length);var t,s=[],r=[];for(a.each(function(t,i){var n=e(this);t<x.loopedSlides&&r.push(i),t<a.length&&t>=a.length-x.loopedSlides&&s.push(i),n.attr("data-swiper-slide-index",t)}),t=0;t<r.length;t++)x.wrapper.append(e(r[t].cloneNode(!0)).addClass(x.params.slideDuplicateClass));for(t=s.length-1;t>=0;t--)x.wrapper.prepend(e(s[t].cloneNode(!0)).addClass(x.params.slideDuplicateClass))},x.destroyLoop=function(){x.wrapper.children("."+x.params.slideClass+"."+x.params.slideDuplicateClass).remove(),x.slides.removeAttr("data-swiper-slide-index")},x.reLoop=function(e){var a=x.activeIndex-x.loopedSlides;x.destroyLoop(),x.createLoop(),x.updateSlidesSize(),e&&x.slideTo(a+x.loopedSlides,0,!1)},x.fixLoop=function(){var e;x.activeIndex<x.loopedSlides?(e=x.slides.length-3*x.loopedSlides+x.activeIndex,e+=x.loopedSlides,x.slideTo(e,0,!1,!0)):("auto"===x.params.slidesPerView&&x.activeIndex>=2*x.loopedSlides||x.activeIndex>
38x.slides.length-2*x.params.slidesPerView)&&(e=-x.slides.length+x.activeIndex+x.loopedSlides,e+=x.loopedSlides,x.slideTo(e,0,!1,!0))},x.appendSlide=function(e){if(x.params.loop&&x.destroyLoop(),"object"==typeof e&&e.length)for(var a=0;a<e.length;a++)e[a]&&x.wrapper.append(e[a]);else x.wrapper.append(e);x.params.loop&&x.createLoop(),x.params.observer&&x.support.observer||x.update(!0)},x.prependSlide=function(e){x.params.loop&&x.destroyLoop();var a=x.activeIndex+1;if("object"==typeof e&&e.length){for(var t=0;t<e.length;t++)e[t]&&x.wrapper.prepend(e[t]);a=x.activeIndex+e.length}else x.wrapper.prepend(e);x.params.loop&&x.createLoop(),x.params.observer&&x.support.observer||x.update(!0),x.slideTo(a,0,!1)},x.removeSlide=function(e){x.params.loop&&(x.destroyLoop(),x.slides=x.wrapper.children("."+x.params.slideClass));var a,t=x.activeIndex;if("object"==typeof e&&e.length){for(var s=0;s<e.length;s++)a=e[s],x.slides[a]&&x.slides.eq(a).remove(),a<t&&t--;t=Math.max(t,0)}else a=e,x.slides[a]&&x.slides.eq(a).remove(),a<t&&t--,t=Math.max(t,0);x.params.loop&&x.createLoop(),x.params.observer&&x.support.observer||x.update(!0),x.params.loop?x.slideTo(t+x.loopedSlides,0,!1):x.slideTo(t,0,!1)},x.removeAllSlides=function(){for(var e=[],a=0;a<x.slides.length;a++)e.push(a);x.removeSlide(e)},x.effects={fade:{setTranslate:function(){for(var e=0;e<x.slides.length;e++){var a=x.slides.eq(e),t=a[0].swiperSlideOffset,s=-t;x.params.virtualTranslate||(s-=x.translate);var r=0;x.isHorizontal()||(r=s,s=0);var i=x.params.fade.crossFade?Math.max(1-Math.abs(a[0].progress),0):1+Math.min(Math.max(a[0].progress,-1),0);a.css({opacity:i}).transform("translate3d("+s+"px, "+r+"px, 0px)")}},setTransition:function(e){if(x.slides.transition(e),x.params.virtualTranslate&&0!==e){var a=!1;x.slides.transitionEnd(function(){if(!a&&x){a=!0,x.animating=!1;for(var e=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"],t=0;t<e.length;t++)x.wrapper.trigger(e[t])}})}}},flip:{setTranslate:function(){for(var a=0;a<x.slides.length;a++){var t=x.slides.eq(a),s=t[0].progress;x.params.flip.limitRotation&&(s=Math.max(Math.min(t[0].progress,1),-1));var r=t[0].swiperSlideOffset,i=-180*s,n=i,o=0,l=-r,p=0;if(x.isHorizontal()?x.rtl&&(n=-n):(p=l,l=0,o=-n,n=0),t[0].style.zIndex=-Math.abs(Math.round(s))+x.slides.length,x.params.flip.slideShadows){var d=x.isHorizontal()?t.find(".swiper-slide-shadow-left"):t.find(".swiper-slide-shadow-top"),m=x.isHorizontal()?t.find(".swiper-slide-shadow-right"):t.find(".swiper-slide-shadow-bottom");0===d.length&&(d=e('<div class="swiper-slide-shadow-'+(x.isHorizontal()?"left":"top")+'"></div>'),t.append(d)),0===m.length&&(m=e('<div class="swiper-slide-shadow-'+(x.isHorizontal()?"right":"bottom")+'"></div>'),t.append(m)),d.length&&(d[0].style.opacity=Math.max(-s,0)),m.length&&(m[0].style.opacity=Math.max(s,0))}t.transform("translate3d("+l+"px, "+p+"px, 0px) rotateX("+o+"deg) rotateY("+n+"deg)")}},setTransition:function(a){if(x.slides.transition(a).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(a),x.params.virtualTranslate&&0!==a){var t=!1;x.slides.eq(x.activeIndex).transitionEnd(function(){if(!t&&x&&e(this).hasClass(x.params.slideActiveClass)){t=!0,x.animating=!1;for(var a=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"],s=0;s<a.length;s++)x.wrapper.trigger(a[s])}})}}},cube:{setTranslate:function(){var a,t=0;x.params.cube.shadow&&(x.isHorizontal()?(a=x.wrapper.find(".swiper-cube-shadow"),0===a.length&&(a=e('<div class="swiper-cube-shadow"></div>'),x.wrapper.append(a)),a.css({height:x.width+"px"})):(a=x.container.find(".swiper-cube-shadow"),0===a.length&&(a=e('<div class="swiper-cube-shadow"></div>'),x.container.append(a))));for(var s=0;s<x.slides.length;s++){var r=x.slides.eq(s),i=90*s,n=Math.floor(i/360);x.rtl&&(i=-i,n=Math.floor(-i/360));var o=Math.max(Math.min(r[0].progress,1),-1),l=0,p=0,d=0;s%4==0?(l=4*-n*x.size,d=0):(s-1)%4==0?(l=0,d=4*-n*x.size):(s-2)%4==0?(l=x.size+4*n*x.size,d=x.size):(s-3)%4==0&&(l=-x.size,d=3*x.size+4*x.size*n),x.rtl&&(l=-l),x.isHorizontal()||(p=l,l=0);var m="rotateX("+(x.isHorizontal()?0:-i)+"deg) rotateY("+(x.isHorizontal()?i:0)+"deg) translate3d("+l+"px, "+p+"px, "+d+"px)";if(o<=1&&o>
38-1&&(t=90*s+90*o,x.rtl&&(t=90*-s-90*o)),r.transform(m),x.params.cube.slideShadows){var u=x.isHorizontal()?r.find(".swiper-slide-shadow-left"):r.find(".swiper-slide-shadow-top"),c=x.isHorizontal()?r.find(".swiper-slide-shadow-right"):r.find(".swiper-slide-shadow-bottom");0===u.length&&(u=e('<div class="swiper-slide-shadow-'+(x.isHorizontal()?"left":"top")+'"></div>'),r.append(u)),0===c.length&&(c=e('<div class="swiper-slide-shadow-'+(x.isHorizontal()?"right":"bottom")+'"></div>'),r.append(c)),u.length&&(u[0].style.opacity=Math.max(-o,0)),c.length&&(c[0].style.opacity=Math.max(o,0))}}if(x.wrapper.css({"-webkit-transform-origin":"50% 50% -"+x.size/2+"px","-moz-transform-origin":"50% 50% -"+x.size/2+"px","-ms-transform-origin":"50% 50% -"+x.size/2+"px","transform-origin":"50% 50% -"+x.size/2+"px"}),x.params.cube.shadow)if(x.isHorizontal())a.transform("translate3d(0px, "+(x.width/2+x.params.cube.shadowOffset)+"px, "+-x.width/2+"px) rotateX(90deg) rotateZ(0deg) scale("+x.params.cube.shadowScale+")");else{var g=Math.abs(t)-90*Math.floor(Math.abs(t)/90),h=1.5-(Math.sin(2*g*Math.PI/360)/2+Math.cos(2*g*Math.PI/360)/2),v=x.params.cube.shadowScale,f=x.params.cube.shadowScale/h,w=x.params.cube.shadowOffset;a.transform("scale3d("+v+", 1, "+f+") translate3d(0px, "+(x.height/2+w)+"px, "+-x.height/2/f+"px) rotateX(-90deg)")}var y=x.isSafari||x.isUiWebView?-x.size/2:0;x.wrapper.transform("translate3d(0px,0,"+y+"px) rotateX("+(x.isHorizontal()?0:t)+"deg) rotateY("+(x.isHorizontal()?-t:0)+"deg)")},setTransition:function(e){x.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),x.params.cube.shadow&&!x.isHorizontal()&&x.container.find(".swiper-cube-shadow").transition(e)}},coverflow:{setTranslate:function(){for(var a=x.translate,t=x.isHorizontal()?-a+x.width/2:-a+x.height/2,s=x.isHorizontal()?x.params.coverflow.rotate:-x.params.coverflow.rotate,r=x.params.coverflow.depth,i=0,n=x.slides.length;i<n;i++){var o=x.slides.eq(i),l=x.slidesSizesGrid[i],p=o[0].swiperSlideOffset,d=(t-p-l/2)/l*x.params.coverflow.modifier,m=x.isHorizontal()?s*d:0,u=x.isHorizontal()?0:s*d,c=-r*Math.abs(d),g=x.isHorizontal()?0:x.params.coverflow.stretch*d,h=x.isHorizontal()?x.params.coverflow.stretch*d:0;Math.abs(h)<.001&&(h=0),Math.abs(g)<.001&&(g=0),Math.abs(c)<.001&&(c=0),Math.abs(m)<.001&&(m=0),Math.abs(u)<.001&&(u=0);var v="translate3d("+h+"px,"+g+"px,"+c+"px)  rotateX("+u+"deg) rotateY("+m+"deg)";if(o.transform(v),o[0].style.zIndex=1-Math.abs(Math.round(d)),x.params.coverflow.slideShadows){var f=x.isHorizontal()?o.find(".swiper-slide-shadow-left"):o.find(".swiper-slide-shadow-top"),w=x.isHorizontal()?o.find(".swiper-slide-shadow-right"):o.find(".swiper-slide-shadow-bottom");0===f.length&&(f=e('<div class="swiper-slide-shadow-'+(x.isHorizontal()?"left":"top")+'"></div>'),o.append(f)),0===w.length&&(w=e('<div class="swiper-slide-shadow-'+(x.isHorizontal()?"right":"bottom")+'"></div>'),o.append(w)),f.length&&(f[0].style.opacity=d>0?d:0),w.length&&(w[0].style.opacity=-d>0?-d:0)}}if(x.browser.ie){x.wrapper[0].style.perspectiveOrigin=t+"px 50%"}},setTransition:function(e){x.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e)}}},x.lazy={initialImageLoaded:!1,loadImageInSlide:function(a,t){if(void 0!==a&&(void 0===t&&(t=!0),0!==x.slides.length)){var s=x.slides.eq(a),r=s.find("."+x.params.lazyLoadingClass+":not(."+x.params.lazyStatusLoadedClass+"):not(."+x.params.lazyStatusLoadingClass+")");!s.hasClass(x.params.lazyLoadingClass)||s.hasClass(x.params.lazyStatusLoadedClass)||s.hasClass(x.params.lazyStatusLoadingClass)||(r=r.add(s[0])),0!==r.length&&r.each(function(){var a=e(this);a.addClass(x.params.lazyStatusLoadingClass);var r=a.attr("data-background"),i=a.attr("data-src"),n=a.attr("data-srcset"),o=a.attr("data-sizes");x.loadImage(a[0],i||r,n,o,!1,function(){if(void 0!==x&&null!==x&&x){if(r?(a.css("background-image",'url("'+r+'")'),a.removeAttr("data-background")):(n&&(a.attr("srcset",n
38),a.removeAttr("data-srcset")),o&&(a.attr("sizes",o),a.removeAttr("data-sizes")),i&&(a.attr("src",i),a.removeAttr("data-src"))),a.addClass(x.params.lazyStatusLoadedClass).removeClass(x.params.lazyStatusLoadingClass),s.find("."+x.params.lazyPreloaderClass+", ."+x.params.preloaderClass).remove(),x.params.loop&&t){var e=s.attr("data-swiper-slide-index");if(s.hasClass(x.params.slideDuplicateClass)){var l=x.wrapper.children('[data-swiper-slide-index="'+e+'"]:not(.'+x.params.slideDuplicateClass+")");x.lazy.loadImageInSlide(l.index(),!1)}else{var p=x.wrapper.children("."+x.params.slideDuplicateClass+'[data-swiper-slide-index="'+e+'"]');x.lazy.loadImageInSlide(p.index(),!1)}}x.emit("onLazyImageReady",x,s[0],a[0])}}),x.emit("onLazyImageLoad",x,s[0],a[0])})}},load:function(){var a,t=x.params.slidesPerView;if("auto"===t&&(t=0),x.lazy.initialImageLoaded||(x.lazy.initialImageLoaded=!0),x.params.watchSlidesVisibility)x.wrapper.children("."+x.params.slideVisibleClass).each(function(){x.lazy.loadImageInSlide(e(this).index())});else if(t>1)for(a=x.activeIndex;a<x.activeIndex+t;a++)x.slides[a]&&x.lazy.loadImageInSlide(a);else x.lazy.loadImageInSlide(x.activeIndex);if(x.params.lazyLoadingInPrevNext)if(t>1||x.params.lazyLoadingInPrevNextAmount&&x.params.lazyLoadingInPrevNextAmount>1){var s=x.params.lazyLoadingInPrevNextAmount,r=t,i=Math.min(x.activeIndex+r+Math.max(s,r),x.slides.length),n=Math.max(x.activeIndex-Math.max(r,s),0);for(a=x.activeIndex+t;a<i;a++)x.slides[a]&&x.lazy.loadImageInSlide(a);for(a=n;a<x.activeIndex;a++)x.slides[a]&&x.lazy.loadImageInSlide(a)}else{var o=x.wrapper.children("."+x.params.slideNextClass);o.length>0&&x.lazy.loadImageInSlide(o.index());var l=x.wrapper.children("."+x.params.slidePrevClass);l.length>0&&x.lazy.loadImageInSlide(l.index())}},onTransitionStart:function(){x.params.lazyLoading&&(x.params.lazyLoadingOnTransitionStart||!x.params.lazyLoadingOnTransitionStart&&!x.lazy.initialImageLoaded)&&x.lazy.load()},onTransitionEnd:function(){x.params.lazyLoading&&!x.params.lazyLoadingOnTransitionStart&&x.lazy.load()}},x.scrollbar={isTouched:!1,setDragPosition:function(e){var a=x.scrollbar,t=x.isHorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageX:e.pageX||e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageY:e.pageY||e.clientY,s=t-a.track.offset()[x.isHorizontal()?"left":"top"]-a.dragSize/2,r=-x.minTranslate()*a.moveDivider,i=-x.maxTranslate()*a.moveDivider;s<r?s=r:s>i&&(s=i),s=-s/a.moveDivider,x.updateProgress(s),x.setWrapperTranslate(s,!0)},dragStart:function(e){var a=x.scrollbar;a.isTouched=!0,e.preventDefault(),e.stopPropagation(),a.setDragPosition(e),clearTimeout(a.dragTimeout),a.track.transition(0),x.params.scrollbarHide&&a.track.css("opacity",1),x.wrapper.transition(100),a.drag.transition(100),x.emit("onScrollbarDragStart",x)},dragMove:function(e){var a=x.scrollbar;a.isTouched&&(e.preventDefault?e.preventDefault():e.returnValue=!1,a.setDragPosition(e),x.wrapper.transition(0),a.track.transition(0),a.drag.transition(0),x.emit("onScrollbarDragMove",x))},dragEnd:function(e){var a=x.scrollbar;a.isTouched&&(a.isTouched=!1,x.params.scrollbarHide&&(clearTimeout(a.dragTimeout),a.dragTimeout=setTimeout(function(){a.track.css("opacity",0),a.track.transition(400)},1e3)),x.emit("onScrollbarDragEnd",x),x.params.scrollbarSnapOnRelease&&x.slideReset())},draggableEvents:function(){return x.params.simulateTouch!==!1||x.support.touch?x.touchEvents:x.touchEventsDesktop}(),enableDraggable:function(){var a=x.scrollbar,t=x.support.touch?a.track:document;e(a.track).on(a.draggableEvents.start,a.dragStart),e(t).on(a.draggableEvents.move,a.dragMove),e(t).on(a.draggableEvents.end,a.dragEnd)},disableDraggable:function(){var a=x.scrollbar,t=x.support.touch?a.track:document;e(a.track).off(a.draggableEvents.start,a.dragStart),e(t).off(a.draggableEvents.move,a.dragMove),e(t).off(a.draggableEvents.end,a.dragEnd)},set:function(){if(x.params.scrollbar){var a=x.scrollbar;a.track=e(x.params.scrollbar),x.params.uniqueNavElements&&"string"==typeof x.params.scrollbar&&a.track.length>1&&1===x.container.find(x.params.scrollbar).length&&(a.track=x.container.find(x.params.scrollbar)),a.drag=a.track.find(".swiper-scrollbar-drag"),0===a.drag.length&&(a.drag=e('<div class="swiper-scrollbar-drag"></div>'),a.track.append(a.drag)),a.drag[0].style.width="",a.drag[0].style.height="",a.trackSize=x.isHorizontal()?a.track[0].offsetWidth:a.track[0].offsetHeight,a.divider=x.size/x.virtualSize,a.moveDivider=a.divider*(a.trackSize/x.size),a.dragSize=a.trackSize*a.divider,x.isHorizontal()?a.drag[0].style.width=a.dragSize+"px":a.drag[0].style.height=a.dragSize+"px",a.divider>=1?a.track[0].style.display="none":a.track[0].style.display="",x.params.scrollbarHide&&(a.track[0].style.opacity=0)}},setTranslate:function(){if(x.params.scrollbar){var e,a=x.scrollbar,t=(x.translate,a.dragSize);e=(a.trackSize-a.dragSize)*x.progress,x.rtl&&x.isHorizontal()?(e=-e,e>0?(t=a.dragSize-e,e=0):-e+a.dragSize>a.trackSize&&(t=a.trackSize+e)):e<0?(t=a.dragSize+e,e=0):e+a.dragSize>a.trackSize&&(t=a.trackSize-e),x.isHorizontal()?(x.support.transforms3d?a.drag.transform("translate3d("+e+"px, 0, 0)"):a.drag.transform("translateX("+e+"px)"),a.drag[0].style.width=t+"px"):(x.support.transforms3d?a.drag.transform("translate3d(0px, "+e+"px, 0)"):a.drag.transform("translateY("+e+"px)"),a.drag[0].style.height=t+"px"),x.params.scrollbarHide&&(clearTimeout(a.timeout),a.track[0].style.opacity=1,a.timeout=setTimeout(function(){a.track[0].style.opacity=0,a.track.transition(400)},1e3))}},setTransition:function(e){x.params.scrollbar&&x.scrollbar.drag.transition(e)}},x.controller={LinearSpline:function(e,a){var t=function(){var e,a,t;return function(s,r){for(a=-1,e=s.length;e-a>1;)s[t=e+a>>1]<=r?a=t:e=t;return e}}();this.x=e,this.y=a,this.lastIndex=e.length-1;var s,r;this.x.length;this.interpolate=function(e){return e?(r=t(this.x,e),s=r-1,(e-this.x[s])*(this.y[r]-this.y[s])/(this.x[r]-this.x[s])+this.y[s]):0}},getInterpolateFunction:function(e){x.controller.spline||(x.controller.spline=x.params.loop?new x.controller.LinearSpline(x.slidesGrid,e.slidesGrid):new x.controller.LinearSpline(x.snapGrid,e.snapGrid))},setTranslate:function(e,t){function s(a){e=a.rtl&&"horizontal"===a.params.direction?-x.translate:x.translate,"slide"===x.params.controlBy&&(x.controller.getInterpolateFunction(a),i=-x.controller.spline.interpolate(-e)),i&&"container"!==x.params.controlBy||(r=(a.maxTranslate()-a.minTranslate())/(x.maxTranslate()-x.minTranslate()),i=(e-x.minTranslate())*r+a.minTranslate()),x.params.controlInverse&&(i=a.maxTranslate()-i),a.updateProgress(i),a.setWrapperTranslate(i,!1,x),a.updateActiveIndex()}var r,i,n=x.params.control;if(Array.isArray(n))for(var o=0;o<n.length;o++)n[o]!==t&&n[o]instanceof a&&s(n[o]);else n instanceof a&&t!==n&&s(n)},setTransition:function(e,t){function s(a){a.setWrapperTransition(e,x),0!==e&&(a.onTransitionStart(),a.wrapper.transitionEnd(function(){i&&(a.params.loop&&"slide"===x.params.controlBy&&a.fixLoop(),a.onTransitionEnd())}))}var r,i=x.params.control;if(Array.isArray(i))for(r=0;r<i.length;r++)i[r]!==t&&i[r]instanceof a&&s(i[r]);else i instanceof a&&t!==i&&s(i)}},x.hashnav={onHashCange:function(e,a){var t=document.location.hash.replace("#","");t!==x.slides.eq(x.activeIndex).attr("data-hash")&&x.slideTo(x.wrapper.children("."+x.params.slideClass+'[data-hash="'+t+'"]').index())},attachEvents:function(a){var t=a?"off":"on";e(window)[t]("hashchange",x.hashnav.onHashCange)},setHash:function(){
39if(x.hashnav.initialized&&x.params.hashnav)if(x.params.replaceState&&window.history&&window.history.replaceState)window.history.replaceState(null,null,"#"+x.slides.eq(x.activeIndex).attr("data-hash")||"");else{var e=x.slides.eq(x.activeIndex),a=e.attr("data-hash")||e.attr("data-history");document.location.hash=a||""}},init:function(){if(x.params.hashnav&&!x.params.history){x.hashnav.initialized=!0;var e=document.location.hash.replace("#","");if(e)for(var a=0,t=x.slides.length;a<t;a++){var s=x.slides.eq(a),r=s.attr("data-hash")||s.attr("data-history");if(r===e&&!s.hasClass(x.params.slideDuplicateClass)){var i=s.index();x.slideTo(i,0,x.params.runCallbacksOnInit,!0)}}x.params.hashnavWatchState&&x.hashnav.attachEvents()}},destroy:function(){x.params.hashnavWatchState&&x.hashnav.attachEvents(!0)}},x.history={init:function(){if(x.params.history){if(!window.history||
39!window.history.pushState)return x.params.history=!1,void(x.params.hashnav=!0);x.history.initialized=!0,this.paths=this.getPathValues(),(this.paths.key||this.paths.value)&&(this.scrollToSlide(0,this.paths.value,x.params.runCallbacksOnInit),x.params.replaceState||window.addEventListener("popstate",this.setHistoryPopState))}},setHistoryPopState:function(){x.history.paths=x.history.getPathValues(),x.history.scrollToSlide(x.params.speed,x.history.paths.value,!1)},getPathValues:function(){var e=window.location.pathname.slice(1).split("/"),a=e.length;return{key:e[a-2],value:e[a-1]}},setHistory:function(e,a){if(x.history.initialized&&x.params.history){var t=x.slides.eq(a),s=this.slugify(t.attr("data-history"));window.location.pathname.includes(e)||(s=e+"/"+s),x.params.replaceState?window.history.replaceState(null,null,s):window.history.pushState(null,null,s)}},slugify:function(e){return e.toString().toLowerCase().replace(/\s+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-").replace(/^-+/,"").replace(/-+$/,"")},scrollToSlide:function(e,a,t){if(a)for(var s=0,r=x.slides.length;s<r;s++){var i=x.slides.eq(s),n=this.slugify(i.attr("data-history"));if(n===a&&!i.hasClass(x.params.slideDuplicateClass)){var o=i.index();x.slideTo(o,e,t)}}else x.slideTo(0,e,t)}},x.disableKeyboardControl=function(){x.params.keyboardControl=!1,e(document).off("keydown",l)},x.enableKeyboardControl=function(){x.params.keyboardControl=!0,e(document).on("keydown",l)},x.mousewheel={event:!1,lastScrollTime:(new window.Date).getTime()},x.params.mousewheelControl&&(x.mousewheel.event=navigator.userAgent.indexOf("firefox")>-1?"DOMMouseScroll":function(){var e="onwheel"in document;if(!e){var a=document.createElement("div");a.setAttribute("onwheel","return;"),e="function"==typeof a.onwheel}return!e&&document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0&&(e=document.implementation.hasFeature("Events.wheel","3.0")),e}()?"wheel":"mousewheel"),x.disableMousewheelControl=function(){if(!x.mousewheel.event)return!1;var a=x.container;return"container"!==x.params.mousewheelEventsTarged&&(a=e(x.params.mousewheelEventsTarged)),a.off(x.mousewheel.event,d),x.params.mousewheelControl=!1,!0},x.enableMousewheelControl=function(){if(!x.mousewheel.event)return!1;var a=x.container;return"container"!==x.params.mousewheelEventsTarged&&(a=e(x.params.mousewheelEventsTarged)),a.on(x.mousewheel.event,d),x.params.mousewheelControl=!0,!0},x.parallax={setTranslate:function(){x.container.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){m(this,x.progress)}),x.slides.each(function(){var a=e(this);a.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){m(this,Math.min(Math.max(a[0].progress,-1),1))})})},setTransition:function(a){void 0===a&&(a=x.params.speed),x.container.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){var t=e(this),s=parseInt(t.attr("data-swiper-parallax-duration"),10)||a;0===a&&(s=0),t.transition(s)})}},x.zoom={scale:1,currentScale:1,isScaling:!1,gesture:{slide:void 0,slideWidth:void 0,slideHeight:void 0,image:void 0,imageWrap:void 0,zoomMax:x.params.zoomMax},image:{isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},velocity:{x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0},getDistanceBetweenTouches:function(e){if(e.targetTouches.length<2)return 1;var a=e.targetTouches[0].pageX,t=e.targetTouches[0].pageY,s=e.targetTouches[1].pageX,r=e.targetTouches[1].pageY;return Math.sqrt(Math.pow(s-a,2)+Math.pow(r-t,2))},onGestureStart:function(a){var t=x.zoom;if(!x.support.gestures){if("touchstart"!==a.type||"touchstart"===a.type&&a.targetTouches.length<2)return;t.gesture.scaleStart=t.getDistanceBetweenTouches(a)}if(!(t.gesture.slide&&t.gesture.slide.length||(t.gesture.slide=e(this),0===t.gesture.slide.length&&(t.gesture.slide=x.slides.eq(x.activeIndex)),t.gesture.image=t.gesture.slide.find("img, svg, canvas"),t.gesture.imageWrap=t.gesture.image.parent("."+x.params.zoomContainerClass),t.gesture.zoomMax=t.gesture.imageWrap.attr("data-swiper-zoom")||x.params.zoomMax,0!==t.gesture.imageWrap.length)))return void(t.gesture.image=void 0);t.gesture.image.transition(0),t.isScaling=!0},onGestureChange:function(e){var a=x.zoom;if(!x.support.gestures){if("touchmove"!==e.type||"touchmove"===e.type&&e.targetTouches.length<2)return;a.gesture.scaleMove=a.getDistanceBetweenTouches(e)}a.gesture.image&&0!==a.gesture.image.length&&(x.support.gestures?a.scale=e.scale*a.currentScale:a.scale=a.gesture.scaleMove/a.gesture.scaleStart*a.currentScale,a.scale>a.gesture.zoomMax&&(a.scale=a.gesture.zoomMax-1+Math.pow(a.scale-a.gesture.zoomMax+1,.5)),a.scale<x.params.zoomMin&&(a.scale=x.params.zoomMin+1-Math.pow(x.params.zoomMin-a.scale+1,.5)),a.gesture.image.transform("translate3d(0,
390,0) scale("+a.scale+")"))},onGestureEnd:function(e){var a=x.zoom;!x.support.gestures&&("touchend"!==e.type||"touchend"===e.type&&e.changedTouches.length<2)||a.gesture.image&&0!==a.gesture.image.length&&(a.scale=Math.max(Math.min(a.scale,a.gesture.zoomMax),x.params.zoomMin),a.gesture.image.transition(x.params.speed).transform("translate3d(0,0,0) scale("+a.scale+")"),a.currentScale=a.scale,a.isScaling=!1,1===a.scale&&(a.gesture.slide=void 0))},onTouchStart:function(e,a){var t=e.zoom;t.gesture.image&&0!==t.gesture.image.length&&(t.image.isTouched||("android"===e.device.os&&a.preventDefault(),t.image.isTouched=!0,t.image.touchesStart.x="touchstart"===a.type?a.targetTouches[0].pageX:a.pageX,t.image.touchesStart.y="touchstart"===a.type?a.targetTouches[0].pageY:a.pageY))},onTouchMove:function(e){var a=x.zoom;if(a.gesture.image&&0!==a.gesture.image.length&&(x.allowClick=!1,a.image.isTouched&&a.gesture.slide)){a.image.isMoved||(a.image.width=a.gesture.image[0].offsetWidth,a.image.height=a.gesture.image[0].offsetHeight,a.image.startX=x.getTranslate(a.gesture.imageWrap[0],"x")||0,a.image.startY=x.getTranslate(a.gesture.imageWrap[0],"
39y")||0,a.gesture.slideWidth=a.gesture.slide[0].offsetWidth,a.gesture.slideHeight=a.gesture.slide[0].offsetHeight,a.gesture.imageWrap.transition(0),x.rtl&&(a.image.startX=-a.image.startX),x.rtl&&(a.image.startY=-a.image.startY));var t=a.image.width*a.scale,s=a.image.height*a.scale;if(!(t<a.gesture.slideWidth&&s<a.gesture.slideHeight)){if(a.image.minX=Math.min(a.gesture.slideWidth/2-t/2,0),a.image.maxX=-a.image.minX,a.image.minY=Math.min(a.gesture.slideHeight/2-s/2,0),a.image.maxY=-a.image.minY,a.image.touchesCurrent.x="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,a.image.touchesCurrent.y="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,!a.image.isMoved&&!a.isScaling){if(x.isHorizontal()&&Math.floor(a.image.minX)===Math.floor(a.image.startX)&&a.image.touchesCurrent.x<a.image.touchesStart.x||Math.floor(a.image.maxX)===Math.floor(a.image.startX)&&a.image.touchesCurrent.x>a.image.touchesStart.x)return void(a.image.isTouched=!1);if(!x.isHorizontal()&&Math.floor(a.image.minY)===Math.floor(a.image.startY)&&a.image.touchesCurrent.y<a.image.touchesStart.y||Math.floor(a.image.maxY)===Math.floor(a.image.startY)&&a.image.touchesCurrent.y>a.image.touchesStart.y)return void(a.image.isTouched=!1)}e.preventDefault(),e.stopPropagation(),a.image.isMoved=!0,a.image.currentX=a.image.touchesCurrent.x-a.image.touchesStart.x+a.image.startX,a.image.currentY=a.image.touchesCurrent.y-a.image.touchesStart.y+a.image.startY,a.image.currentX<a.image.minX&&(a.image.currentX=a.image.minX+1-Math.pow(a.image.minX-a.image.currentX+1,.8)),a.image.currentX>a.image.maxX&&(a.image.currentX=a.image.maxX-1+Math.pow(a.image.currentX-a.image.maxX+1,.8)),a.image.currentY<a.image.minY&&(a.image.currentY=a.image.minY+1-Math.pow(a.image.minY-a.image.currentY+1,.8)),a.image.currentY>a.image.maxY&&(a.image.currentY=a.image.maxY-1+Math.pow(a.image.currentY-a.image.maxY+1,.8)),a.velocity.prevPositionX||(a.velocity.prevPositionX=a.image.touchesCurrent.x),a.velocity.prevPositionY||(a.velocity.prevPositionY=a.image.touchesCurrent.y),a.velocity.prevTime||(a.velocity.prevTime=Date.now()),a.velocity.x=(a.image.touchesCurrent.x-a.velocity.prevPositionX)/(Date.now()-a.velocity.prevTime)/2,a.velocity.y=(a.image.touchesCurrent.y-a.velocity.prevPositionY)/(Date.now()-a.velocity.prevTime)/2,Math.abs(a.image.touchesCurrent.x-a.velocity.prevPositionX)<2&&(a.velocity.x=0),Math.abs(a.image.touchesCurrent.y-a.velocity.prevPositionY)<2&&(a.velocity.y=0),a.velocity.prevPositionX=a.image.touchesCurrent.x,a.velocity.prevPositionY=a.image.touchesCurrent.y,a.velocity.prevTime=Date.now(),a.gesture.imageWrap.transform("translate3d("+a.image.currentX+"px, "+a.image.currentY+"px,0)")}}},onTouchEnd:function(e,a){var t=e.zoom;if(t.gesture.image&&0!==t.gesture.image.length){if(!t.image.isTouched||!t.image.isMoved)return t.image.isTouched=!1,void(t.image.isMoved=!1);t.image.isTouched=!1,t.image.isMoved=!1;var s=300,r=300,i=t.velocity.x*s,n=t.image.currentX+i,o=t.velocity.y*r,l=t.image.currentY+o;0!==t.velocity.x&&(s=Math.abs((n-t.image.currentX)/t.velocity.x)),0!==t.velocity.y&&(r=Math.abs((l-t.image.currentY)/t.velocity.y));var p=Math.max(s,r);t.image.currentX=n,t.image.currentY=l;var d=t.image.width*t.scale,m=t.image.height*t.scale;t.image.minX=Math.min(t.gesture.slideWidth/2-d/2,0),t.image.maxX=-t.image.minX,t.image.minY=Math.min(t.gesture.slideHeight/2-m/2,0),t.image.maxY=-t.image.minY,t.image.currentX=Math.max(Math.min(t.image.currentX,t.image.maxX),t.image.minX),t.image.currentY=Math.max(Math.min(t.image.currentY,t.image.maxY),t.image.minY),t.gesture.imageWrap.transition(p).transform("translate3d("+t.image.currentX+"px, "+t.image.currentY+"px,0)")}},onTransitionEnd:function(e){var a=e.zoom;a.gesture.slide&&e.previousIndex!==e.activeIndex&&(a.gesture.image.transform("translate3d(0,0,0) scale(1)"),a.gesture.imageWrap.transform("translate3d(0,0,0)"),a.gesture.slide=a.gesture.image=a.gesture.imageWrap=void 0,a.scale=a.currentScale=1)},toggleZoom:function(a,t){var s=a.zoom;if(s.gesture.slide||(s.gesture.slide=a.clickedSlide?e(a.clickedSlide):a.slides.eq(a.activeIndex),s.gesture.image=s.gesture.slide.find("img, svg, canvas"),s.gesture.imageWrap=s.gesture.image.parent("."+a.params.zoomContainerClass)),s.gesture.image&&0!==s.gesture.image.length){var r,i,n,o,l,p,d,m,u,c,g,h,v,f,w,y,x,T;void 0===s.image.touchesStart.x&&t?(r="touchend"===t.type?t.changedTouches[0].pageX:t.pageX,i="touchend"===t.type?t.changedTouches[0].pageY:t.pageY):(r=s.image.touchesStart.x,i=s.image.touchesStart.y),s.scale&&1!==s.scale?(s.scale=s.currentScale=1,s.gesture.imageWrap.transition(300).transform("translate3d(0,
390,0)"),s.gesture.image.transition(300).transform("translate3d(0,0,0) scale(1)"),s.gesture.slide=void 0):(s.scale=s.currentScale=s.gesture.imageWrap.attr("data-swiper-zoom")||a.params.zoomMax,t?(x=s.gesture.slide[0].offsetWidth,T=s.gesture.slide[0].offsetHeight,n=s.gesture.slide.offset().left,o=s.gesture.slide.offset().top,l=n+x/2-r,p=o+T/2-i,u=s.gesture.image[0].offsetWidth,c=s.gesture.image[0].offsetHeight,g=u*s.scale,h=c*s.scale,v=Math.min(x/2-g/2,0),f=Math.min(T/2-h/2,0),w=-v,y=-f,d=l*s.scale,m=p*s.scale,d<v&&(d=v),d>w&&(d=w),m<f&&(m=f),m>y&&(m=y)):(d=0,m=0),s.gesture.imageWrap.transition(300).transform("translate3d("+d+"px, "+m+"px,0)"),s.gesture.image.transition(300).transform("translate3d(0,0,0) scale("+s.scale+")"))}},attachEvents:function(a){var t=a?"off":"on";if(x.params.zoom){var s=(x.slides,!("touchstart"!==x.touchEvents.start||!x.support.passiveListener||!x.params.passiveListeners)&&{passive:!0,capture:!1});x.support.gestures?(x.slides[t]("gesturestart",x.zoom.onGestureStart,s),x.slides[t]("gesturechange",x.zoom.onGestureChange,s),x.slides[t]("gestureend",x.zoom.onGestureEnd,s)):"touchstart"===x.touchEvents.start&&(x.slides[t](x.touchEvents.start,x.zoom.onGestureStart,s),x.slides[t](x.touchEvents.move,x.zoom.onGestureChange,s),x.slides[t](x.touchEvents.end,x.zoom.onGestureEnd,s)),x[t]("touchStart",x.zoom.onTouchStart),x.slides.each(function(a,s){e(s).find("."+x.params.zoomContainerClass).length>0&&e(s)[t](x.touchEvents.move,x.zoom.onTouchMove)}),x[t]("touchEnd",x.zoom.onTouchEnd),x[t]("transitionEnd",x.zoom.onTransitionEnd),x.params.zoomToggle&&x.on("doubleTap",x.zoom.toggleZoom)}},init:function(){x.zoom.attachEvents()},destroy:function(){x.zoom.attachEvents(!0)}},x._plugins=[];for(var Y in x.plugins){var A=x.plugins[Y](x,x.params[Y]);A&&x._plugins.push(A)}return x.callPlugins=function(e){for(var a=0;a<x._plugins.length;a++)e in x._plugins[a]&&x._plugins[a][e](arguments[1],arguments[2],arguments[3],arguments[4],arguments[5])},x.emitterEventListeners={},x.emit=function(e){x.params[e]&&x.params[e](arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]);var a;if(x.emitterEventListeners[e])for(a=0;a<x.emitterEventListeners[e].length;a++)x.emitterEventListeners[e][a](arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]);x.callPlugins&&x.callPlugins(e,arguments[1],arguments[2],arguments[3],arguments[4],arguments[5])},x.on=function(e,a){return e=u(e),x.emitterEventListeners[e]||(x.emitterEventListeners[e]=[]),x.emitterEventListeners[e].push(a),x},x.off=function(e,a){var t;if(e=u(e),void 0===a)return x.emitterEventListeners[e]=[],x;if(x.emitterEventListeners[e]&&0!==x.emitterEventListeners[e].length){for(t=0;t<x.emitterEventListeners[e].length;t++)x.emitterEventListeners[e][t]===a&&x.emitterEventListeners[e].splice(t,1);return x}},x.once=function(e,a){e=u(e);var t=function(){a(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4]),x.off(e,t)};return x.on(e,t),x},x.a11y={makeFocusable:function(e){return e.attr("tabIndex","0"),e},addRole:function(e,a){return e.attr("role",a),e},addLabel:function(e,a){return e.attr("aria-label",a),e},disable:function(e){return e.attr("aria-disabled",!0),e},enable:function(e){return e.attr("aria-disabled",!1),e},onEnterKey:function(a){13===a.keyCode&&(e(a.target).is(x.params.nextButton)?(x.onClickNext(a),x.isEnd?x.a11y.notify(x.params.lastSlideMessage):x.a11y.notify(x.params.nextSlideMessage)):e(a.target).is(x.params.prevButton)&&(x.onClickPrev(a),x.isBeginning?x.a11y.notify(x.params.firstSlideMessage):x.a11y.notify(x.params.prevSlideMessage)),e(a.target).is("."+x.params.bulletClass)&&e(a.target)[0].click())},liveRegion:e('<span class="'+x.params.notificationClass+'" aria-live="assertive" aria-atomic="true"></span>'),notify:function(e){var a=x.a11y.liveRegion;0!==a.length&&(a.html(""),a.html(e))},init:function(){x.params.nextButton&&x.nextButton&&x.nextButton.length>0&&(x.a11y.makeFocusable(x.nextButton),x.a11y.addRole(x.nextButton,"button"),x.a11y.addLabel(x.nextButton,x.params.nextSlideMessage)),x.params.prevButton&&x.prevButton&&x.prevButton.length>0&&(x.a11y.makeFocusable(x.prevButton),x.a11y.addRole(x.prevButton,"button"),x.a11y.addLabel(x.prevButton,x.params.prevSlideMessage)),e(x.container).append(x.a11y.liveRegion)},initPagination:function(){x.params.pagination&&x.params.paginationClickable&&x.bullets&&x.bullets.length&&x.bullets.each(function(){var a=e(this);x.a11y.makeFocusable(a),x.a11y.addRole(a,"button"),x.a11y.addLabel(a,x.params.paginationBulletMessage.replace(/{{index}}/,a.index()+1))})},destroy:function(){x.a11y.liveRegion&&x.a11y.liveRegion.length>0&&x.a11y.liveRegion.remove()}},x.init=function(){x.params.loop&&x.createLoop(),x.updateContainerSize(),x.updateSlidesSize(),x.updatePagination(),x.params.scrollbar&&x.scrollbar&&(x.scrollbar.set(),x.params.scrollbarDraggable&&x.scrollbar.enableDraggable()),"slide"!==x.params.effect&&x.effects[x.params.effect]&&(x.params.loop||x.updateProgress(),x.effects[x.params.effect].setTranslate()),x.params.loop?x.slideTo(x.params.initialSlide+x.loopedSlides,0,x.params.runCallbacksOnInit):(x.slideTo(x.params.initialSlide,0,x.params.runCallbacksOnInit),0===x.params.initialSlide&&(x.parallax&&x.params.parallax&&x.parallax.setTranslate(),x.lazy&&x.params.lazyLoading&&(x.lazy.load(),x.lazy.initialImageLoaded=!0))),x.attachEvents(),x.params.observer&&x.support.observer&&x.initObservers(),x.params.preloadImages&&!x.params.lazyLoading&&x.preloadImages(),x.params.zoom&&x.zoom&&x.zoom.init(),x.params.autoplay&&x.startAutoplay(),x.params.keyboardControl&&x.enableKeyboardControl&&x.enableKeyboardControl(),x.params.mousewheelControl&&x.enableMousewheelControl&&x.enableMousewheelControl(),x.params.hashnavReplaceState&&(x.params.replaceState=x.params.hashnavReplaceState),x.params.history&&x.history&&x.history.init(),x.params.hashnav&&x.hashnav&&x.hashnav.init(),x.params.a11y&&x.a11y&&x.a11y.init(),x.emit("onInit",x)},x.cleanupStyles=function(){x.container.removeClass(x.classNames.join(" ")).removeAttr("style"),x.wrapper.removeAttr("style"),x.slides&&x.slides.length&&x.slides.removeClass([x.params.slideVisibleClass,x.params.slideActiveClass,x.params.slideNextClass,x.params.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-column").removeAttr("data-swiper-row"),x.paginationContainer&&x.paginationContainer.length&&x.paginationContainer.removeClass(x.params.paginationHiddenClass),x.bullets&&x.bullets.length&&x.bullets.removeClass(x.params.bulletActiveClass),x.params.prevButton&&e(x.params.prevButton).removeClass(x.params.buttonDisabledClass),x.params.nextButton&&e(x.params.nextButton).removeClass(x.params.buttonDisabledClass),x.params.scrollbar&&x.scrollbar&&(x.scrollbar.track&&x.scrollbar.track.length&&x.scrollbar.track.removeAttr("style"),x.scrollbar.drag&&x.scrollbar.drag.length&&x.scrollbar.drag.removeAttr("style"))},x.destroy=function(e,a){x.detachEvents(),x.stopAutoplay(),x.params.scrollbar&&x.scrollbar&&x.params.scrollbarDraggable&&x.scrollbar.disableDraggable(),x.params.loop&&x.destroyLoop(),a&&x.cleanupStyles(),x.disconnectObservers(),x.params.zoom&&x.zoom&&x.zoom.destroy(),x.params.keyboardControl&&x.disableKeyboardControl&&x.disableKeyboardControl(),x.params.mousewheelControl&&x.disableMousewheelControl&&x.disableMousewheelControl(),x.params.a11y&&x.a11y&&x.a11y.destroy(),x.params.history&&!x.params.replaceState&&window.removeEventListener("popstate",x.history.setHistoryPopState),x.params.hashnav&&x.hashnav&&x.hashnav.destroy(),x.emit("onDestroy"),e!==!1&&(x=null)},x.init(),x}};a.prototype={isSafari:function(){var e=window.navigator.userAgent.toLowerCase();return e.indexOf("safari")>=0&&e.indexOf("chrome")<0&&e.indexOf("android")<0}
39(),isUiWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent),isArray:function(e){return"[object Array]"===Object.prototype.toString.apply(e)},browser:{ie:window.navigator.pointerEnabled||window.navigator.msPointerEnabled,ieTouch:window.navigator.msPointerEnabled&&window.navigator.msMaxTouchPoints>1||window.navigator.pointerEnabled&&window.navigator.maxTouchPoints>1,lteIE9:function(){var e=document.createElement("div");return e.innerHTML="<!--[if lte IE 9]><i></i><![endif]-->",1===e.getElementsByTagName("i").length}()},device:function(){var e=window.navigator.userAgent,a=e.match(/(Android);?[\s\/]+([\d.]+)?/),t=e.match(/(iPad).*OS\s([\d_]+)/),s=e.match(/(iPod)(.*OS\s([\d_]+))?/),r=!t&&e.match(/(iPhone\sOS|iOS)\s([\d_]+)/);return{ios:t||r||s,android:a}}(),support:{touch:window.Modernizr&&Modernizr.touch===!0||function(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)}(),transforms3d:window.Modernizr&&Modernizr.csstransforms3d===!0||function(){var e=document.createElement("div").style;return"webkitPerspective"in e||"MozPerspective"in e||"OPerspective"in e||"MsPerspective"in e||"perspective"in e}(),flexbox:function(){for(var e=document.createElement("div").style,a="alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient".split(" "),t=0;t<a.length;t++)if(a[t]in e)return!0}(),observer:function(){return"MutationObserver"in window||"WebkitMutationObserver"in window}(),passiveListener:function(){var e=!1;try{var a=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassiveListener",null,a)}catch(e){}return e}(),gestures:function(){return"ongesturestart"in window}()},plugins:{}};for(var t=["jQuery","Zepto","Dom7"],s=0;s<t.length;s++)window[t[s]]&&function(e){e.fn.swiper=function(t){var s;return e(this).each(function(){var e=new a(this,t);s||(s=e)}),s}}(window[t[s]]);var r;r="undefined"==typeof Dom7?window.Dom7||window.Zepto||window.jQuery:Dom7,r&&("transitionEnd"in r.fn||(r.fn.transitionEnd=function(e){function a(i){if(i.target===this)for(e.call(this,i),t=0;t<s.length;t++)r.off(s[t],a)}var t,s=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"],r=this;if(e)for(t=0;t<s.length;t++)r.on(s[t],a);return this}),"transform"in r.fn||(r.fn.transform=function(e){for(var a=0;a<this.length;a++){var t=this[a].style;t.webkitTransform=t.MsTransform=t.msTransform=t.MozTransform=t.OTransform=t.transform=e}return this}),"transition"in r.fn||(r.fn.transition=function(e){"string"!=typeof e&&(e+="ms");for(var a=0;a<this.length;a++){var t=this[a].style;t.webkitTransitionDuration=t.MsTransitionDuration=t.msTransitionDuration=t.MozTransitionDuration=t.OTransitionDuration=t.transitionDuration=e}return this}),"outerWidth"in r.fn||(r.fn.outerWidth=function(e){return this.length>0?e?this[0].offsetWidth+parseFloat(this.css("margin-right"))+parseFloat(this.css("margin-left")):this[0].offsetWidth:null})),window.Swiper=a}(),"undefined"!=typeof module?module.exports=window.Swiper:"function"==typeof define&&define.amd&&define([],function(){"use strict";return window.Swiper});
40//# 
41
42/*!@license Copyright 2013, Heinrich Goebl, License: MIT, see https://github.com/hgoebl/mobile-detect.js*/
43!function(a,b){a(function(){"use strict";function a(a,b){return null!=a&&null!=b&&a.toLowerCase()===b.toLowerCase()}function c(a,b){var c,d,e=a.length;if(!e||!b)return!1;for(c=b.toLowerCase(),d=0;d<e;++d)if(c===a[d].toLowerCase())return!0;return!1}function d(a){for(var b in a)i.call(a,b)&&(a[b]=new RegExp(a[b],"i"))}function e(a){return(a||"").substr(0,500)}function f(a,b){this.ua=e(a),this._cache={},this.maxPhoneWidth=b||600}var g={};g.mobileDetectRules={phones:{iPhone:"\\biPhone\\b|\\biPod\\b",BlackBerry:"BlackBerry|\\bBB10\\b|rim[0-9]+",HTC:"HTC|HTC.*(Sensation|Evo|Vision|Explorer|6800|8100|8900|A7272|S510e|C110e|Legend|Desire|T8282)|APX515CKT|Qtek9090|APA9292KT|HD_mini|Sensation.*Z710e|PG86100|Z715e|Desire.*(A8181|HD)|ADR6200|ADR6400L|ADR6425|001HT|Inspire 4G|Android.*\\bEVO\\b|T-Mobile G1|Z520m|Android [0-9.]+; Pixel",Nexus:"Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile|Nexus 4|Nexus 5
vendor: 5,742 bytes, line 43
43|Nexus 6",Dell:"Dell[;]? (Streak|Aero|Venue|Venue Pro|Flash|Smoke|Mini 3iX)|XCD28|XCD35|\\b001DL\\b|\\b101DL\\b|\\bGS01\\b",Motorola:"Motorola|DROIDX|DROID BIONIC|\\bDroid\\b.*Build|Android.*Xoom|HRI39|MOT-|A1260|A1680|A555|A853|A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITANIUM|WX435|WX445|XT300|XT301|XT311|XT316|XT317|XT319|XT320|XT390|XT502|XT530|XT531|XT532|XT535|XT603|XT610|XT611|XT615|XT681|XT701|XT702|XT711|XT720|XT800|XT806|XT860|XT862|XT875|XT882|XT883|XT894|XT901|XT907|XT909|XT910|XT912|XT928|XT926|XT915|XT919|XT925|XT1021|\\bMoto E\\b|XT1068|XT1092|XT1052",Samsung:"\\bSamsung\\b|SM-G950F|SM-G955F|SM-G9250|GT-19300|SGH-I337|BGT-S5230|GT-B2100|GT-B2700|GT-B2710|GT-B3210|GT-B3310|GT-B3410|GT-B3730|GT-B3740|GT-B5510|GT-B5512|GT-B5722|GT-B6520|GT-B7300|GT-B7320|GT-B7330|GT-B7350|GT-B7510|GT-B7722|GT-B7800|GT-C3010|GT-C3011|GT-C3060|GT-C3200|GT-C3212|GT-C3212I|GT-C3262|GT-C3222|GT-C3300|GT-C3300K|GT-C3303|GT-C3303K|GT-C3310|GT-C3322|GT-C3330|GT-C3350|GT-C3500|GT-C3510|GT-C3530|GT-C3630|GT-C3780|GT-C5010|GT-C5212|GT-C6620|GT-C6625|GT-C6712|GT-E1050|GT-E1070|GT-E1075|GT-E1080|GT-E1081|GT-E1085|GT-E1087|GT-E1100|GT-E1107|GT-E1110|GT-E1120|GT-E1125|GT-E1130|GT-E1160|GT-E1170|GT-E1175|GT-E1180|GT-E1182|GT-E1200|GT-E1210|GT-E1225|GT-E1230|GT-E1390|GT-E2100|GT-E2120|GT-E2121|GT-E2152|GT-E2220|GT-E2222|GT-E2230|GT-E2232|GT-E2250|GT-E2370|GT-E2550|GT-E2652|GT-E3210|GT-E3213|GT-I5500|GT-I5503|GT-I5700|GT-I5800|GT-I5801|GT-I6410|GT-I6420|GT-I7110|GT-I7410|GT-I7500|GT-I8000|GT-I8150|GT-I8160|GT-I8190|GT-I8320|GT-I8330|GT-I8350|GT-I8530|GT-I8700|GT-I8703|GT-I8910|GT-I9000|GT-I9001|GT-I9003|GT-I9010|GT-I9020|GT-I9023|GT-I9070|GT-I9082|GT-I9100|GT-I9103|GT-I9220|GT-I9250|GT-I9300|GT-I9305|GT-I9500|GT-I9505|GT-M3510|GT-M5650|GT-M7500|GT-M7600|GT-M7603|GT-M8800|GT-M8910|GT-N7000|GT-S3110|GT-S3310|GT-S3350|GT-S3353|GT-S3370|GT-S3650|GT-S3653|GT-S3770|GT-S3850|GT-S5210|GT-S5220|GT-S5229|GT-S5230|GT-S5233|GT-S5250|GT-S5253|GT-S5260|GT-S5263|GT-S5270|GT-S5300|GT-S5330|GT-S5350|GT-S5360|GT-S5363|GT-S5369|GT-S5380|GT-S5380D|GT-S5560|GT-S5570|GT-S5600|GT-S5603|GT-S5610|GT-S5620|GT-S5660|GT-S5670|GT-S5690|GT-S5750|GT-S5780|GT-S5830|GT-S5839|GT-S6102|GT-S6500|GT-S7070|GT-S7200|GT-S7220|GT-S7230|GT-S7233|GT-S7250|GT-S7500|GT-S7530|GT-S7550|GT-S7562|GT-S7710|GT-S8000|GT-S8003|GT-S8500|GT-S8530|GT-S8600|SCH-A310|SCH-A530|SCH-A570|SCH-A610|SCH-A630|SCH-A650|SCH-A790|SCH-A795|SCH-A850|SCH-A870|SCH-A890|SCH-A930|SCH-A950|SCH-A970|SCH-A990|SCH-I100|SCH-I110|SCH-I400|SCH-I405|SCH-I500|SCH-I510|SCH-I515|SCH-I600|SCH-I730|SCH-I760|SCH-I770|SCH-I830|SCH-I910|SCH-I920|SCH-I959|SCH-LC11|SCH-N150|SCH-N300|SCH-R100|SCH-R300|SCH-R351|SCH-R400|SCH-R410|SCH-T300|SCH-U310|SCH-U320|SCH-U350|SCH-U360|SCH-U365|SCH-U370|SCH-U380|SCH-U410|SCH-U430|SCH-U450|SCH-U460|SCH-U470|SCH-U490|SCH-U540|SCH-U550|SCH-U620|SCH-U640|SCH-U650|SCH-U660|SCH-U700|SCH-U740|SCH-U750|SCH-U810|SCH-U820|SCH-U900|SCH-U940|SCH-U960|SCS-26UC|SGH-A107|SGH-A117|SGH-A127|SGH-A137|SGH-A157|SGH-A167|SGH-A177|SGH-A187|SGH-A197|SGH-A227|SGH-A237|SGH-A257|SGH-A437|SGH-A517|SGH-A597|SGH-A637|SGH-A657|SGH-A667|SGH-A687|SGH-A697|SGH-A707|SGH-A717|SGH-A727|SGH-A737|SGH-A747|SGH-A767|SGH-A777|SGH-A797|SGH-A817|SGH-A827|SGH-A837|SGH-A847|SGH-A867|SGH-A877|SGH-A887|SGH-A897|SGH-A927|SGH-B100|SGH-B130|SGH-B200|SGH-B220|SGH-C100|SGH-C110|SGH-C120|SGH-C130|SGH-C140|SGH-C160|SGH-C170|SGH-C180|SGH-C200|SGH-C207|SGH-C210|SGH-C225|SGH-C230|SGH-C417|SGH-C450|SGH-D307|SGH-D347|SGH-D357|SGH-D407|SGH-D415|SGH-D780|SGH-D807|SGH-D980|SGH-E105|SGH-E200|SGH-E315|SGH-E316|SGH-E317|SGH-E335|SGH-E590|SGH-E635|SGH-E715|SGH-E890|SGH-F300|SGH-F480|SGH-I200|SGH-I300|SGH-I320|SGH-I550|SGH-I577|SGH-I600|SGH-I607|SGH-I617|SGH-I627|SGH-I637|SGH-I677|SGH-I700|SGH-I717|SGH-I727|SGH-i747M|SGH-I777|SGH-I780|SGH-I827|SGH-I847|SGH-I857|SGH-I896|SGH-I897|SGH-I900|SGH-I907|SGH-I917|SGH-I927|SGH-I937|SGH-I997|SGH-J150|SGH-J200|SGH-L170|SGH-L700|SGH-M110|SGH-M150|SGH-M200|SGH-N105|SGH-N500|SGH-N600|SGH-N620|SGH-N625|SGH-N700|SGH-N710|SGH-P107|SGH-P207|SGH-P300|SGH-P310|SGH-P520|SGH-P735|SGH-P777|SGH-Q105|SGH-R210|SGH-R220|SGH-R225|SGH-S105|SGH-S307|SGH-T109|SGH-T119|SGH-T139|SGH-T209|SGH-T219|SGH-T229|SGH-T239|SGH-T249|SGH-T259|SGH-T309|SGH-T319|SGH-T329|SGH-T339|SGH-T349|SGH-T359|SGH-T369|SGH-T379|SGH-T409|SGH-T429|SGH-T439|SGH-T459|SGH-T469|SGH-T479|SGH-T499|SGH-T509|SGH-T519|SGH-T539|SGH-T559|SGH-T589|SGH-T609|SGH-T619|SGH-T629|SGH-T639|SGH-T659|SGH-T669|SGH-T679|SGH-T709|SGH-T719|SGH-T729|SGH-T739|SGH-T746|SGH-T749|SGH-T759|SGH-T769|SGH-T809|SGH-T819|SGH-T839|SGH-T919|SGH-T929|SGH-T939|SGH-T959|SGH-T989|SGH-U100|SGH-U200|SGH-U800|SGH-V205|SGH-V206|SGH-X100|SGH-X105|SGH-X120|SGH-X140|SGH-X426|SGH-X427|SGH-X475|SGH-X495|SGH-X497|SGH-X507|SGH-X600|SGH-X610|SGH-X620|SGH-X630|SGH-X700|SGH-X820|SGH-X890|SGH-Z130|SGH-Z150|SGH-Z170|SGH-ZX10|SGH-ZX20|SHW-M110|SPH-A120|SPH-A400|SPH-A420|SPH-A460|SPH-A500|SPH-A560|SPH-A600|SPH-A620|SPH-A660|SPH-A700|SPH-A740|SPH-A760|SPH-A790|SPH-A800|SPH-A820|SPH-A840|SPH-A880|SPH-A900|SPH-A940|SPH-A960|SPH-D600|SPH-D700|SPH-D710|SPH-D720|SPH-I300|SPH-I325|SPH-I330|SPH-I350|SPH-I500|SPH-I600|SPH-I700|SPH-L700|SPH-M100|SPH-M220|SPH-M240|SPH-M300|SPH-M305|SPH-M320|SPH-M330|SPH-M350|SPH-M360|SPH-M370|SPH-M380|SPH-M510|SPH-M540|SPH-M550|SPH-M560|SPH-M570|SPH-M580|SPH-M610|SPH-M620|SPH-M630|SPH-M800|SPH-M810|SPH-M850|SPH-M900|SPH-M910|SPH-M920|SPH-M930|SPH-N100|SPH-N200|SPH-N240|SPH-N300|SPH-N400|SPH-Z400|SWC-E100|SCH-i909|GT-N7100|GT-N7105|SCH-I535|SM-N900A|SGH-I317|SGH-T999L|GT-S5360B|GT-
vendor: 24,103 bytes, line 43
43I8262|GT-S6802|GT-S6312|GT-S6310|GT-S5312|GT-S5310|GT-I9105|GT-I8510|GT-S6790N|SM-G7105|SM-N9005|GT-S5301|GT-I9295|GT-I9195|SM-C101|GT-S7392|GT-S7560|GT-B7610|GT-I5510|GT-S7582|GT-S7530E|GT-I8750|SM-G9006V|SM-G9008V|SM-G9009D|SM-G900A|SM-G900D|SM-G900F|SM-G900H|SM-G900I|SM-G900J|SM-G900K|SM-G900L|SM-G900M|SM-G900P|SM-G900R4|SM-G900S|SM-G900T|SM-G900V|SM-G900W8|SHV-E160K|SCH-P709|SCH-P729|SM-T2558|GT-I9205|SM-G9350|SM-J120F|SM-G920F|SM-G920V|SM-G930F|SM-N910C|SM-A310F|GT-I9190|SM-J500FN|SM-G903F|SM-J330F",LG:"\\bLG\\b;|LG[- ]?(C800|C900|E400|E610|E900|E-900|F160|F180K|F180L|F180S|730|855|L160|LS740|LS840|LS970|LU6200|MS690|MS695|MS770|MS840|MS870|MS910|P500|P700|P705|VM696|AS680|AS695|AX840|C729|E970|GS505|272|C395|E739BK|E960|L55C|L75C|LS696|LS860|P769BK|P350|P500|P509|P870|UN272|US730|VS840|VS950|LN272|LN510|LS670|LS855|LW690|MN270|MN510|P509|P769|P930|UN200|UN270|UN510|UN610|US670|US740|US760|UX265|UX840|VN271|VN530|VS660|VS700|VS740|VS750|VS910|VS920|VS930|VX9200|VX11000|AX840A|LW770|P506|P925|P999|E612|D955|D802|MS323|M257)",Sony:"SonyST|SonyLT|SonyEricsson|SonyEricssonLT15iv|LT18i|E10i|LT28h|LT26w|SonyEricssonMT27i|C5303|C6902|C6903|C6906|C6943|D2533",Asus:"Asus.*Galaxy|PadFone.*Mobile",NokiaLumia:"Lumia [0-9]{3,4}",Micromax:"Micromax.*\\b(A210|A92|A88|A72|A111|A110Q|A115|A116|A110|A90S|A26|A51|A35|A54|A25|A27|A89|A68|A65|A57|A90)\\b",Palm:"PalmSource|Palm",Vertu:"Vertu|Vertu.*Ltd|Vertu.*Ascent|Vertu.*Ayxta|Vertu.*Constellation(F|Quest)?|Vertu.*Monika|Vertu.*Signature",Pantech:"PANTECH|IM-A850S|IM-A840S|IM-A830L|IM-A830K|IM-A830S|IM-A820L|IM-A810K|IM-A810S|IM-A800S|IM-T100K|IM-A725L|IM-A780L|IM-A775C|IM-A770K|IM-A760S|IM-A750K|IM-A740S|IM-A730S|IM-A720L|IM-A710K|IM-A690L|IM-A690S|IM-A650S|IM-A630K|IM-A600S|VEGA PTL21|PT003|P8010|ADR910L|P6030|P6020|P9070|P4100|P9060|P5000|CDM8992|TXT8045|ADR8995|IS11PT|P2030|P6010|P8000|PT002|IS06|CDM8999|P9050|PT001|TXT8040|P2020|P9020|P2000|P7040|P7000|C790",Fly:"IQ230|IQ444|IQ450|IQ440|IQ442|IQ441|IQ245|IQ256|IQ236|IQ255|IQ235|IQ245|IQ275|IQ240|IQ285|IQ280|IQ270|IQ260|IQ250",Wiko:"KITE 4G|HIGHWAY|GETAWAY|STAIRWAY|DARKSIDE|DARKFULL|DARKNIGHT|DARKMOON|SLIDE|WAX 4G|RAINBOW|BLOOM|SUNSET|GOA(?!nna)|LENNY|BARRY|IGGY|OZZY|CINK FIVE|CINK PEAX|CINK PEAX 2|CINK SLIM|CINK SLIM 2|CINK +|CINK KING|CINK PEAX|CINK SLIM|SUBLIM",iMobile:"i-mobile (IQ|i-STYLE|idea|ZAA|Hitz)",SimValley:"\\b(SP-80|XT-930|SX-340|XT-930|SX-310|SP-360|SP60|SPT-800|SP-120|SPT-800|SP-140|SPX-5|SPX-8|SP-100|SPX-8|SPX-12)\\b",Wolfgang:"AT-B24D|AT-AS50HD|AT-AS40W|AT-AS55HD|AT-AS45q2|AT-B26D|AT-AS50Q",Alcatel:"Alcatel",Nintendo:"Nintendo (3DS|Switch)",Amoi:"Amoi",INQ:"INQ",GenericPhone:"Tapatalk|PDA;|SAGEM|\\bmmp\\b|pocket|\\bpsp\\b|symbian|Smartphone|smartfon|treo|up.browser|up.link|vodafone|\\bwap\\b|nokia|Series40|Series60|S60|SonyEricsson|N900|MAUI.*WAP.*Browser"},tablets:{iPad:"iPad|iPad.*Mobile",NexusTablet:"Android.*Nexus[\\s]+(7|9|10)",GoogleTablet:"Android.*Pixel C",SamsungTablet:"SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1003|GT-P1010|GT-P3105|GT-P6210|GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P3100|GT-P3108|GT-P3110|GT-P5100|GT-P5110|GT-P6200|GT-P7320|GT-P7511|GT-N8000|GT-P8510|SGH-I497|SPH-P500|SGH-T779|SCH-I705|SCH-I915|GT-N8013|GT-P3113|GT-P5113|GT-P8110|GT-N8010|GT-N8005|GT-N8020|GT-P1013|GT-P6201|GT-P7501|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|SHV-E230S|SHW-M180K|SHW-M180L|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|GT-I9200|GT-P5200|GT-P5210|GT-P5210X|SM-T311|SM-T310|SM-T310X|SM-T210|SM-T210R|SM-T211|SM-P600|SM-P601|SM-P605|SM-P900|SM-P901|SM-T217|SM-T217A|SM-T217S|SM-P6000|SM-T3100|SGH-I467|XE500|SM-T110|GT-P5220|GT-I9200X|GT-N5110X|GT-N5120|SM-P905|SM-T111|SM-T2105|SM-T315|SM-T320|SM-T320X|SM-T321|SM-T520|SM-T525|SM-T530NU|SM-T230NU|SM-T330NU|SM-T900|XE500T1C|SM-P605V|SM-P905V|SM-T337V|SM-T537V|SM-T707V|SM-T807V|SM-P600X|SM-P900X|SM-T210X|SM-T230|SM-T230X|SM-T325|GT-P7503|SM-T531|SM-T330|SM-T530|SM-T705|SM-T705C|SM-T535|SM-T331|SM-T800|SM-T700|SM-T537|SM-T807|SM-P907A|SM-T337A|SM-T537A|SM-T707A|SM-T807A|SM-T237|SM-T807P|SM-P607T|SM-T217T|SM-T337T|SM-T807T|SM-T116NQ|SM-T116BU|SM-P550|SM-T350|SM-T550|SM-T9000|SM-P9000|SM-T705Y|SM-T805|GT-P3113|SM-T710|SM-T810|SM-T815|SM-T360|SM-T533|SM-T113|SM-T335|SM-T715|SM-T560|SM-T670|SM-T677|SM-T377|SM-T567|SM-T357T|SM-T555|SM-T561|SM-T713|SM-T719|SM-T813|SM-T819|SM-T580|SM-T355Y?|SM-T280|SM-T817A|SM-T820|SM-W700|SM-P580|SM-T587|SM-P350|SM-P555M|SM-P355M|SM-T113NU|SM-T815Y|SM-T585|SM-T285|SM-T825|SM-W708|SM-T835",Kindle:"Kindle|Silk.*Accelerated|Android.*\\b(KFOT|KFTT|KFJWI|KFJWA|KFOTE|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|WFJWAE|KFSAWA|KFSAWI|KFASWI|KFARWI|KFFOWI|KFGIWI|KFMEWI)\\b|Android.*Silk/[0-9.]+ like Chrome/[0-9.]+ (?!Mobile)",SurfaceTablet:"Windows NT [0-9.]+; ARM;.*(Tablet|ARMBJS)",HPTablet:"HP Slate (7|8|10)|HP ElitePad 900|hp-tablet|EliteBook.*Touch|HP 8|Slate 21|HP SlateBook 10",AsusTablet:"^.*PadFone((?!Mobile).)*$|Transformer|TF101|TF101G|TF300T|TF300TG|TF300TL|TF700T|TF700KL|TF701T|TF810C|ME171|ME301T|ME302C|ME371MG|ME370T|ME372MG|ME172V|ME173X|ME400C|Slider SL101|\\bK00F\\b|\\bK00C\\b|\\bK00E\\b|\\bK00L\\b|TX201LA|ME176C|ME102A|\\bM80TA\\b|ME372CL|ME560CG|ME372CG|ME302KL| K010 | K011 | K017 | K01E |ME572C|ME103K|ME170C|ME171C|\\bME70C\\b|ME581C|ME581CL|ME8510C|ME181C|P01Y|PO1MA|P01Z|\\bP027\\b|\\bP024\\b|\\bP00C\\b",BlackBerryTablet:"PlayBook|RIM Tablet",HTCtablet:"HTC_Flyer_P512|HTC Flyer|HTC Jetstream|HTC-P715a|HTC EVO View 4G|PG41200|PG09410",MotorolaTablet:"xoom|sholest|MZ615|MZ605|MZ505|MZ601|MZ602|MZ603|MZ604|MZ606|MZ607|MZ608|MZ609|MZ615|MZ616|MZ617",NookTablet:"Android.*Nook|NookColor|nook browser|BNRV200|BNRV200A|BNTV250|BNTV250A|BNTV400|BNTV600|LogicPD Zoom2",AcerTablet:"Android.*; \\b(A100|A101|A110|A200|A210|A211|A500|A501|A510|A511|A700|A701|W500|W500P|W501|W501P|W510|W511|W700|G100|G100W|B1-A71|B1-710|B1-711|A1-810|A1-811|A1-830)\\b|W3-810|\\bA3-A10\\b|\\bA3-A11\\b|\\bA3-A20\\b|\\bA3-A30",ToshibaTablet:"Android.*(AT100|AT105|AT200|AT205|AT270|AT275|AT300|AT305|AT1S5|AT500|AT570|AT700|AT830)|TOSHIBA.*FOLIO",LGTablet:"\\bL-06C|LG-V909|LG-V900|LG-V700|LG-V510|LG-V500|LG-V410|LG-V400|LG-VK810\\b",FujitsuTablet:"Android.*\\b(F-01D|F-02F|F-05E|F-10D|M532|Q572)\\b",PrestigioTablet:"PMP3170B|PMP3270B|PMP3470B|PMP7170B|PMP3370B|PMP3570C|PMP5870C|PMP3670B|PMP5570C|PMP5770D|PMP3970B|PMP3870C|PMP5580C|PMP5880D|PMP5780D|PMP5588C|PMP7280C|PMP7280C3G|PMP7280|PMP7880D|PMP5597D|PMP5597|PMP7100D|PER3464|PER3274|PER3574|PER3884|PER5274|PER5474|PMP5097CPRO|PMP5097|PMP7380D|PMP5297C|PMP5297C_QUAD|PMP812E|PMP812E3G|PMP812F|PMP810E|PMP880TD|PMT3017|PMT3037|PMT3047|PMT3057|PMT7008|PMT5887|PMT5001|PMT5002",LenovoTablet:"Lenovo TAB|Idea(Tab|Pad)( A1|A10| K1|)|ThinkPad([ ]+)?Tablet|YT3-850M|YT3-X90L|YT3-X90F|YT3-X90X|Lenovo.*(S2109|S2110|S5000|S6000|K3011|A3000|A3500|A1000|A2107|A2109|A1107|A5500|A7600|B6000|B8000|B8080)(-|)(FL|F|HV|H|)|TB-X103F|TB-X304F|TB-X304L|TB-8703F|Tab2A7-10F|TB2-X30L",DellTablet:"Venue 11|Venue 8|Venue 7|Dell Streak 10|Dell Streak 7",YarvikTablet:"Android.*\\b(TAB210|TAB211|TAB224|TAB250|TAB260|TAB264|TAB310|TAB360|TAB364|TAB410|TAB411|TAB420|TAB424|TAB450|TAB460|TAB461|TAB464|TAB465|TAB467|TAB468|TAB07-100|TAB07-101|TAB07-150|TAB07-151|TAB07-152|TAB07-200|TAB07-201-3G|TAB07-210|TAB07-211|TAB07-212|TAB07-214|TAB07-220|TAB07-400|TAB07-485|TAB08-150|TAB08-200|TAB08-201-3G|TAB08-201-30|TAB09-100|TAB09-211|TAB09-410|TAB10-150|TAB10-201|TAB10-211|TAB10-400|TAB10-410|TAB13-201|TAB274EUK|TAB275EUK|TAB374EUK|TAB462EUK|TAB474EUK|TAB9-200)\\b",MedionTablet:"Android.*\\bOYO\\b|LIFE.*(P9212|P9514|P9516|S9512)|LIFETAB",ArnovaTablet:"97G4|AN10G2|AN7bG3|AN7fG3|AN8G3|AN8cG3|AN7G3|AN9G3|AN7dG3|AN7dG3ST|AN7dG3ChildPad|AN10bG3|AN10bG3DT|AN9G2",IntensoTablet:"INM8002KP|INM1010FP|INM805ND|Intenso Tab|TAB1004",IRUTablet:"M702pro",MegafonTablet:"MegaFon V9|\\bZTE V9\\b|Android.*\\bMT7A\\b",EbodaTablet:"E-Boda (Supreme|Impresspeed|Izzycomm|Essential)",AllViewTablet:"Allview.*(Viva|Alldro|City|Speed|All TV|Frenzy|Quasar|Shine|TX1|AX1|AX2)",ArchosTablet:"\\b(101G9|80G9|A101IT)\\b|Qilive 97R|Archos5|\\bARCHOS (70|79|80|90|97|101|FAMILYPAD|)(b|c|)(G10| Cobalt| TITANIUM(HD|)| Xenon| Neon|XSK| 2| XS 2| PLATINUM| CARBON|GAMEPAD)\\b",AinolTablet:"NOVO7|NOVO8|NOVO10|Novo7Aurora|Novo7Basic|NOVO7PALADIN|novo9-Spark",NokiaLumiaTablet:"Lumia 2520",SonyTablet:"Sony.*Tablet|Xperia Tablet|Sony Tablet S|SO-03E|SGPT12|SGPT13|SGPT114|SGPT121|SGPT122|SGPT123|SGPT111|SGPT112|SGPT113|SGPT131|SGPT132|SGPT133|SGPT211|SGPT212|SGPT213|SGP311|SGP312|SGP321|EBRD1101|EBRD1102|EBRD1201|SGP351|SGP341|SGP511|SGP512|SGP521|SGP541|SGP551|SGP621|SGP641|SGP612|SOT31|SGP771|SGP611|SGP612|SGP712",PhilipsTablet:"\\b(PI2010|PI3000|PI3100|PI3105|PI3110|PI3205|PI3210|PI3900|PI4010|PI7000|PI7100)\\b",CubeTablet:"Android.*(K8GT|U9GT|U10GT|U16GT|U17GT|U18GT|U19GT|U20GT|U23GT|U30GT)|CUBE U8GT",CobyTablet:"MID1042|MID1045|MID1125|MID1126|MID7012|MID7014|MID7015|MID7034|MID7035|MID7036|MID7042|MID7048|MID7127|MID8042|MID8048|MID8127|MID9042|MID9740|MID9742|MID7022|MID7010",MIDTablet:"M9701|M9000|M9100|M806|M1052|M806|T703|MID701|MID713|MID710|MID727|MID760|MID830|MID728|MID933|MID125|MID810|MID732|MID120|MID930|MID800|MID731|MID900|MID100|MID820|MID735|MID980|MID130|MID833|MID737|MID960|MID135|MID860|MID736|MID140|MID930|MID835|MID733|MID4X10",MSITablet:"MSI \\b(Primo 73K|Primo 73L|Primo 81L|Primo 77|Primo 93|Primo 75|Primo 76|Primo 73|Primo 81|Primo 91|Primo 90|Enjoy 71|Enjoy 7|Enjoy 10)\\b",SMiTTablet:"Android.*(\\bMID\\b|MID-560|MTV-T1200|MTV-PND531|MTV-P1101|MTV-PND530)",RockChipTablet:"Android.*(RK2818|RK2808A|RK2918|RK3066)|RK2738|RK2808A",FlyTablet:"IQ310|Fly Vision",bqTablet:"Android.*(bq)?.*(Elcano|Curie|Edison|Maxwell|Kepler|Pascal|Tesla|Hypatia|Platon|Newton|Livingstone|Cervantes|Avant|Aquaris ([E|M]10|M8))|Maxwell.*Lite|Maxwell.*Plus",HuaweiTablet:"MediaPad|MediaPad 7 Youth|IDEOS S7|S7-201c|S7-202u|S7-101|S7-103|S7-104|S7-105|S7-106|S7-201|S7-Slim|M2-A01L|BAH-L09|BAH-W09",NecTablet:"\\bN-06D|\\bN-08D",PantechTablet:"Pantech.*P4100",BronchoTablet:"Broncho.*(N701|N708|N802|a710)",VersusTablet:"TOUCHPAD.*[78910]|\\bTOUCHTAB\\b",ZyncTablet:"z1000|Z99 2G|z99|z930|z999|z990|z909|Z919|z900",PositivoTablet:"TB07STA|TB10STA|TB07FTA|TB10FTA",NabiTablet:"Android.*\\bNabi",KoboTablet:"Kobo Touch|\\bK080\\b|\\bVox\\b Build|\\bArc\\b Build",DanewTablet:"DSlide.*\\b(700|701R|702|703R|704|802|970|971|972|973|974|1010|1012)\\b",TexetTablet:"NaviPad|TB-772A|TM-7045|TM-7055|TM-9750|TM-7016|TM-7024|TM-7026|TM-7041|TM-7043|TM-7047|TM-8041|TM-9741|TM-9747|TM-9748|TM-9751|TM-7022|TM-7021|TM-7020|TM-7011|TM-7010|TM-7023|TM-7025|TM-7037W|TM-7038W|TM-7027W|TM-9720|TM-9725|TM-9737W|TM-1020|TM-9738W|TM-9740|TM-9743W|TB-807A|TB-771A|TB-727A|TB-725A|TB-719A|TB-823A|TB-805A|TB-723A|TB-715A|TB-707A|TB-705A|TB-709A|TB-711A|TB-890HD|TB-880HD|TB-790HD|TB-780HD|TB-770HD|TB-721HD|TB-710HD|TB-434HD|TB-860HD|TB-840HD|TB-760HD|TB-750HD|TB-740HD|TB-730HD|TB-722HD|TB-720HD|TB-700HD|TB-500HD|TB-470HD|TB-431HD|TB-430HD|TB-506|TB-504|TB-446|TB-436|TB-416|TB-146SE|TB-126SE",PlaystationTablet:"Playstation.*(Portable|Vita)",TrekstorTablet:"ST10416-1|VT10416-1|ST70408-1|ST702xx-1|ST702xx-2|ST80208|ST97216|ST70104-2|VT10416-2|ST10216-2A|SurfTab",PyleAudioTablet:"\\b(PTBL10CEU|PTBL10C|PTBL72BC|PTBL72BCEU|PTBL7CEU|PTBL7C|PTBL92BC|PTBL92BCEU|PTBL9CEU|PTBL9CUK|PTBL9C)\\b",AdvanTablet:"Android.* \\b(E3A|T3X|T5C|T5B|T3E|T3C|T3B|T1J|T1F|T2A|T1H|T1i|E1C|T1-E|T5-A|T4|E1-B|T2Ci|T1-B|T1-D|O1-A|E1-A|T1-A|T3A|T4i)\\b ",DanyTechTablet:"Genius Tab G3|Genius Tab S2|Genius Tab Q3|Genius Tab G4|Genius Tab Q4|Genius Tab G-II|Genius TAB GII|Genius TAB GIII|Genius Tab S1",GalapadTablet:"Android.*\\bG1\\b(?!\\))",MicromaxTablet:"Funbook|Micromax.*\\b(P250|P560|P360|P362|P600|P300|P350|P500|P275)\\b",KarbonnTablet:"Android.*\\b(A39|A37|A34|ST8|ST10|ST7|Smart Tab3|Smart Tab2)\\b",AllFineTablet:"Fine7 Genius|Fine7 Shine|Fine7 Air|Fine8 Style|Fine9 More|Fine10 Joy|Fine11 Wide",PROSCANTablet:"\\b(PEM63|PLT1023G|PLT1041|PLT1044|PLT1044G|PLT1091|PLT4311|PLT4311PL|PLT4315|PLT7030|PLT7033|PLT7033D|PLT7035|PLT7035D|PLT7044K|PLT7045K|PLT7045KB|PLT7071KG|PLT7072|PLT7223G|PLT7225G|PLT7777G|PLT7810K|PLT7849G|PLT7851G|PLT7852G|PLT8015|PLT8031|PLT8034|PLT8036|PLT8080K|PLT8082|PLT8088|PLT8223G|PLT8234G|PLT8235G|PLT8816K|PLT9011|PLT9045K|PLT9233G|PLT9735|PLT9760G|PLT9770G)\\b",YONESTablet:"BQ1078|BC1003|BC1077|RK9702|BC9730|BC9001|IT9001|BC7008|BC7010|BC708|BC728|BC7012|BC7030|BC7027|BC7026",ChangJiaTablet:"TPC7102|TPC7103|TPC7105|TPC7106|TPC7107|TPC7201|TPC7203|TPC7205|TPC7210|TPC7708|TPC7709|TPC7712|TPC7110|TPC8101|TPC8103|TPC8105|TPC8106|TPC8203|TPC8205|TPC8503|TPC9106|TPC9701|TPC97101|TPC97103|TPC97105|TPC97106|TPC97111|TPC97113|TPC97203|TPC97603|TPC97809|TPC97205|TPC10101|TPC10103|TPC10106|TPC10111|TPC10203|TPC10205|TPC10503",GUTablet:"TX-A1301|TX-M9002|Q702|kf026",PointOfViewTablet:"TAB-P506|TAB-navi-7-3G-M|TAB-P517|TAB-P-527|TAB-P701|TAB-P703|TAB-P721|TAB-P731N|TAB-P741|TAB-P825|TAB-P905|TAB-P925|TAB-PR945|TAB-PL1015|TAB-P1025|TAB-PI1045|TAB-P1325|TAB-PROTAB[0-9]+|TAB-PROTAB25|TAB-PROTAB26|TAB-PROTAB27|TAB-PROTAB26XL|TAB-PROTAB2-IPS9|TAB-PROTAB30-IPS9|TAB-PROTAB25XXL|TAB-PROTAB26-IPS10|TAB-PROTAB30-IPS10",OvermaxTablet:"OV-(SteelCore|NewBase|Basecore|Baseone|Exellen|Quattor|EduTab|Solution|ACTION|BasicTab|TeddyTab|MagicTab|Stream|TB-08|TB-09)|Qualcore 1027",HCLTablet:"HCL.*Tablet|Connect-3G-2.0|Connect-2G-2.0|ME Tablet U1|ME Tablet U2|ME Tablet G1|ME Tablet X1|ME Tablet Y2|ME Tablet Sync",DPSTablet:"DPS Dream 9|DPS Dual 7",VistureTablet:"V97 HD|i75 3G|Visture V4( HD)?|Visture V5( HD)?|Visture V10",CrestaTablet:"CTP(-)?810|CTP(-)?818|CTP(-)?828|CTP(-)?838|CTP(-)?888|CTP(-)?978|CTP(-)?980|CTP(-)?987|CTP(-)?988|CTP(-)?989",MediatekTablet:"\\bMT8125|MT8389|MT8135|MT8377\\b",ConcordeTablet:"Concorde([ ]+)?Tab|ConCorde ReadMan",GoCleverTablet:"GOCLEVER TAB|A7GOCLEVER|M1042|M7841|M742|R1042BK|R1041|TAB A975|TAB A7842|TAB A741|TAB A741L|TAB M723G|TAB M721|TAB A1021|TAB I921|TAB R721|TAB I720|TAB T76|TAB R70|TAB R76.2|TAB R106|TAB R83.2|TAB M813G|TAB I721|GCTA722|TAB I70|TAB I71|TAB S73|TAB R73|TAB R74|TAB R93|TAB R75|TAB R76.1|TAB A73|TAB A93|TAB A93.2|TAB T72|TAB R83|TAB R974|TAB R973|TAB A101|TAB A103|TAB A104|TAB A104.2|R105BK|M713G|A972BK|TAB A971|TAB R974.2|TAB R104|TAB R83.3|TAB A1042",ModecomTablet:"FreeTAB 9000|FreeTAB 7.4|FreeTAB 7004|FreeTAB 7800|FreeTAB 2096|FreeTAB 7.5|FreeTAB 1014|FreeTAB 1001 |FreeTAB 8001|FreeTAB 9706|FreeTAB 9702|FreeTAB 7003|FreeTAB 7002|FreeTAB 1002|FreeTAB 7801|FreeTAB 1331|FreeTAB 1004|FreeTAB 8002|FreeTAB 8014|FreeTAB 9704|FreeTAB 1003",VoninoTablet:"\\b(Argus[ _]?S|Diamond[ _]?79HD|Emerald[ _]?78E|Luna[ _]?70C|Onyx[ _]?S|Onyx[ _]?Z|Orin[ _]?HD|Orin[ _]?S|Otis[ _]?S|SpeedStar[ _]?S|Magnet[ _]?M9|Primus[ _]?94[ _]?3G|Primus[ _]?94HD|Primus[ _]?QS|Android.*\\bQ8\\b|Sirius[ _]?EVO[ _]?QS|Sirius[ _]?QS|Spirit[ _]?S)\\b",ECSTablet:"V07OT2|TM105A|S10OT1|TR10CS1",StorexTablet:"eZee[_']?(Tab|Go)[0-9]+|TabLC7|Looney Tunes Tab",VodafoneTablet:"SmartTab([ ]+)?[0-9]+|SmartTabII10|SmartTabII7|VF-1497",EssentielBTablet:"Smart[ ']?TAB[ ]+?[0-9]+|Family[ ']?TAB2",RossMoorTablet:"RM-790|RM-997|RMD-878G|RMD-974R|RMT-705A|RMT-701|RME-601|RMT-501|RMT-711",iMobileTablet:"i-mobile i-note",TolinoTablet:"tolino tab [0-9.]+|tolino shine",AudioSonicTablet:"\\bC-22Q|T7-QC|T-17B|T-17P\\b",AMPETablet:"Android.* A78 ",SkkTablet:"Android.* (SKYPAD|PHOENIX|CYCLOPS)",TecnoTablet:"TECNO P9|TECNO DP8D",JXDTablet:"Android.* \\b(F3000|A3300|JXD5000|JXD3000|JXD2000|JXD300B|JXD300|S5800|S7800|S602b|S5110b|S7300|S5300|S602|S603|S5100|S5110|S601|S7100a|P3000F|P3000s|P101|P200s|P1000m|P200m|P9100|P1000s|S6600b|S908|P1000|P300|S18|S6600|S9100)\\b",iJoyTablet:"Tablet (Spirit 7|Essentia|Galatea|Fusion|Onix 7|Landa|Titan|Scooby|Deox|Stella|Themis|Argon|Unique 7|Sygnus|Hexen|Finity 7|Cream|Cream X2|Jade|Neon 7|Neron 7|Kandy|Scape|Saphyr 7|Rebel|Biox|Rebel|Rebel 8GB|Myst|Draco 7|Myst|Tab7-004|Myst|Tadeo Jones|Tablet Boing|Arrow|Draco Dual Cam|Aurix|Mint|Amity|Revolution|Finity 9|Neon 9|T9w|Amity 4GB Dual Cam|Stone 4GB|Stone 8GB|Andromeda|Silken|X2|Andromeda II|Halley|Flame|Saphyr 9,7|Touch 8|Planet|Triton|Unique 10|Hexen 10|Memphis 4GB|Memphis 8GB|Onix 10)",FX2Tablet:"FX2 PAD7|FX2 PAD10",XoroTablet:"KidsPAD 701|PAD[ ]?712|PAD[ ]?714|PAD[ ]?716|PAD[ ]?717|PAD[ ]?718|PAD[ ]?720|PAD[ ]?721|PAD[ ]?722|PAD[ ]?790|PAD[ ]?792|PAD[ ]?900|PAD[ ]?9715D|PAD[ ]?9716DR|PAD[ ]?9718DR|PAD[ ]?9719QR|PAD[ ]?9720QR|TelePAD1030|Telepad1032|TelePAD730|TelePAD731|TelePAD732|TelePAD735Q|TelePAD830|TelePAD9730|TelePAD795|MegaPAD 1331|MegaPAD 1851|MegaPAD 2151",ViewsonicTablet:"ViewPad 10pi|ViewPad 10e|ViewPad 10s|ViewPad E72|ViewPad7|ViewPad E100|ViewPad 7e|ViewSonic VB733|VB100a",VerizonTablet:"QTAQZ3|QTAIR7|QTAQTZ3|QTASUN1|QTASUN2|QTAXIA1",OdysTablet:"LOOX|XENO10|ODYS[ -](Space|EVO|Xpress|NOON)|\\bXELIO\\b|Xelio10Pro|XELIO7PHONETAB|XELIO10EXTREME|XELIOPT2|NEO_QUAD10",CaptivaTablet:"CAPTIVA PAD",IconbitTablet:"NetTAB|NT-3702|NT-3702S|NT-3702S|NT-3603P|NT-3603P|NT-0704S|NT-0704S|NT-3805C|NT-3805C|NT-0806C|NT-0806C|NT-0909T|NT-0909T|NT-0907S|NT-0907S|NT-0902S|NT-0902S",TeclastTablet:"T98 4G|\\bP80\\b|\\bX90HD\\b|X98 Air|X98 Air 3G|\\bX89\\b|P80 3G|\\bX80h\\b|P98 Air|\\bX89HD\\b|P98 3G|\\bP90HD\\b|P89 3G|X98 3G|\\bP70h\\b|P79HD 3G|G18d 3G|\\bP79HD\\b|\\bP89s\\b|\\bA88\\b|\\bP10HD\\b|\\bP19HD\\b|G18 3G|\\bP78HD\\b|\\bA78\\b|\\bP75\\b|G17s 3G|G17h 3G|\\bP85t\\b|\\bP90\\b|\\bP11\\b|\\bP98t\\b|\\bP98HD\\b|\\bG18d\\b|\\bP85s\\b|\\bP11HD\\b|\\bP88s\\b|\\bA80HD\\b|\\bA80se\\b|\\bA10h\\b|\\bP89\\b|\\bP78s\\b|\\bG18\\b|\\bP85\\b|\\bA70h\\b|\\bA70\\b|\\bG17\\b|\\bP18\\b|\\bA80s\\b|\\bA11s\\b|\\bP88HD\\b|\\bA80h\\b|\\bP76s\\b|\\bP76h\\b|\\bP98\\b|\\bA10HD\\b|\\bP78\\b|\\bP88\\b|\\bA11\\b|\\bA10t\\b|\\bP76a\\b|\\bP76t\\b|\\bP76e\\b|\\bP85HD\\b|\\bP85a\\b|\\bP86\\b|\\bP75HD\\b|\\bP76v\\b|\\bA12\\b|\\bP75a\\b|\\bA15\\b|\\bP76Ti\\b|\\bP81HD\\b|\\bA10\\b|\\bT760VE\\b|\\bT720HD\\b|\\bP76\\b|\\bP73\\b|\\bP71\\b|\\bP72\\b|\\bT720SE\\b|\\bC520Ti\\b|\\bT760\\b|\\bT720VE\\b|T720-3GE|T720-WiFi",OndaTablet:"\\b(V975i|Vi30|VX530|V701|Vi60|V701s|Vi50|V801s|V719|Vx610w|VX610W|V819i|Vi10|VX580W|Vi10|V711s|V813|V811|V820w|V820|Vi20|V711|VI30W|V712|V891w|V972|V819w|V820w|Vi60|V820w|V711|V813s|V801|V819|V975s|V801|V819|V819|V818|V811|V712|V975m|V101w|V961w|V812|V818|V971|V971s|V919|V989|V116w|V102w|V973|Vi40)\\b[\\s]+|V10 \\b4G\\b",JaytechTablet:"TPC-PA762",BlaupunktTablet:"Endeavour 800NG|Endeavour 1010",DigmaTablet:"\\b(iDx10|iDx9|iDx8|iDx7|iDxD7|iDxD8|iDsQ8|iDsQ7|iDsQ8|iDsD10|iDnD7|3TS804H|iDsQ11|iDj7|iDs10)\\b",EvolioTablet:"ARIA_Mini_wifi|Aria[ _]Mini|Evolio X10|Evolio X7|Evolio X8|\\bEvotab\\b|\\bNeura\\b",LavaTablet:"QPAD E704|\\bIvoryS\\b|E-TAB IVORY|\\bE-TAB\\b",AocTablet:"MW0811|MW0812|MW0922|MTK8382|MW1031|MW0831|MW0821|MW0931|MW0712",MpmanTablet:"MP11 OCTA|MP10 OCTA|MPQC1114|MPQC1004|MPQC994|MPQC974|MPQC973|MPQC804|MPQC784|MPQC780|\\bMPG7\\b|MPDCG75|MPDCG71|MPDC1006|MP101DC|MPDC9000|MPDC905|MPDC706HD|MPDC706|MPDC705|MPDC110|MPDC100|MPDC99|MPDC97|MPDC88|MPDC8|MPDC77|MP709|MID701|MID711|MID170|MPDC703|MPQC1010",CelkonTablet:"CT695|CT888|CT[\\s]?910|CT7 Tab|CT9 Tab|CT3 Tab|CT2 Tab|CT1 Tab|C820|C720|\\bCT-1\\b",WolderTablet:"miTab \\b(DIAMOND|SPACE|BROOKLYN|NEO|FLY|MANHATTAN|FUNK|EVOLUTION|SKY|GOCAR|IRON|GENIUS|POP|MINT|EPSILON|BROADWAY|JUMP|HOP|LEGEND|NEW AGE|LINE|ADVANCE|FEEL|FOLLOW|LIKE|LINK|LIVE|THINK|FREEDOM|CHICAGO|CLEVELAND|BALTIMORE-GH|IOWA|BOSTON|SEATTLE|PHOENIX|DALLAS|IN 101|MasterChef)\\b",MediacomTablet:"M-MPI10C3G|M-SP10EG|M-SP10EGP|M-SP10HXAH|M-SP7HXAH|M-SP10HXBH|M-SP8HXAH|M-SP8MXA",MiTablet:"\\bMI PAD\\b|\\bHM NOTE 1W\\b",NibiruTablet:"Nibiru M1|Nibiru Jupiter One",NexoTablet:"NEXO NOVA|NEXO 10|NEXO AVIO|NEXO FREE|NEXO GO|NEXO EVO|NEXO 3G|NEXO SMART|NEXO KIDDO|NEXO MOBI",LeaderTablet:"TBLT10Q|TBLT10I|TBL-10WDKB|TBL-10WDKBO2013|TBL-W230V2|TBL-W450|TBL-W500|SV572|TBLT7I|TBA-AC7-8G|TBLT79|TBL-8W16|TBL-10W32|TBL-10WKB|TBL-W100",UbislateTablet:"UbiSlate[\\s]?7C",PocketBookTablet:"Pocketbook",KocasoTablet:"\\b(TB-1207)\\b",HisenseTablet:"\\b(F5281|E2371)\\b",Hudl:"Hudl HT7S3|Hudl 2",TelstraTablet:"T-Hub2",GenericTablet:"Android.*\\b97D\\b|Tablet(?!.*PC)|BNTV250A|MID-WCDMA|LogicPD Zoom2|\\bA7EB\\b|CatNova8|A1_07|CT704|CT1002|\\bM721\\b|rk30sdk|\\bEVOTAB\\b|M758A|ET904|ALUMIUM10|Smartfren Tab|Endeavour 1010|Tablet-PC-4|Tagi Tab|\\bM6pro\\b|CT1020W|arc 10HD|\\bTP750\\b|\\bQTAQZ3\\b|WVT101|TM1088|KT107"},oss:{AndroidOS:"Android",BlackBerryOS:"blackberry|\\bBB10\\b|rim tablet os",PalmOS:"PalmOS|avantgo|blazer|elaine|hiptop|palm|plucker|xiino",SymbianOS:"Symbian|SymbOS|Series60|Series40|SYB-[0-9]+|\\bS60\\b",WindowsMobileOS:"Windows CE.*(PPC|Smartphone|Mobile|[0-9]{3}x[0-9]{3})|Window Mobile|Windows Phone [0-9.]+|WCE;",WindowsPhoneOS:"Windows Phone 10.0|Windows Phone 8.1|Windows Phone 8.0|Windows Phone OS|XBLWP7|ZuneWP7|Windows NT 6.[23]; ARM;",iOS:"\\biPhone.*Mobile|\\biPod|\\biPad|AppleCoreMedia",MeeGoOS:"MeeGo",MaemoOS:"Maemo",JavaOS:"J2ME/|\\bMIDP\\b|\\bCLDC\\b",webOS:"webOS|hpwOS",badaOS:"\\bBada\\b",BREWOS:"BREW"},uas:{Chrome:"\\bCrMo\\b|CriOS|Android.*Chrome/[.0-9]* (Mobile)?",Dolfin:"\\bDolfin\\b",Opera:"Opera.*Mini|Opera.*Mobi|Android.*Opera|Mobile.*OPR/[0-9.]+$|Coast/[0-9.]+",Skyfire:"Skyfire",Edge:"Mobile Safari/[.0-9]* Edge",IE:"IEMobile|MSIEMobile",Firefox:"fennec|firefox.*maemo|(Mobile|Tablet).*Firefox|Firefox.*Mobile|FxiOS",Bolt:"bolt",TeaShark:"teashark",Blazer:"Blazer",Safari:"Version.*Mobile.*Safari|Safari.*Mobile|MobileSafari",WeChat:"\\bMicroMessenger\\b",UCBrowser:"UC.*Browser|UCWEB",baiduboxapp:"baiduboxapp",baidubrowser:"baidubrowser",DiigoBrowser:"DiigoBrowser",Puffin:"Puffin",Mercury:"\\bMercury\\b",ObigoBrowser:"Obigo",NetFront:"NF-Browser",GenericBrowser:"NokiaBrowser|OviBrowser|OneBrowser|TwonkyBeamBrowser|SEMC.*Browser|FlyFlow|Minimo|NetFront|Novarra-Vision|MQQBrowser|MicroMessenger",PaleMoon:"Android.*PaleMoon|Mobile.*PaleMoon"},props:{Mobile:"Mobile/[VER]",Build:"Build/[VER]",Version:"Version/[VER]",VendorID:"VendorID/[VER]",iPad:"iPad.*CPU[a-z ]+[VER]",iPhone:"iPhone.*CPU[a-z ]+[VER]",iPod:"iPod.*CPU[a-z ]+[VER]",Kindle:"Kindle/[VER]",Chrome:["Chrome/[VER]","CriOS/[VER]","CrMo/[VER]"],Coast:["Coast/[VER]"],Dolfin:"Dolfin/[VER]",Firefox:["Firefox/[VER]","FxiOS/[VER]"],Fennec:"Fennec/[VER]",Edge:"Edge/[VER]",IE:["IEMobile/[VER];","IEMobile [VER]","MSIE [VER];","Trident/[0-9.]+;.*rv:[VER]"],NetFront:"NetFront/[VER]",NokiaBrowser:"NokiaBrowser/[VER]",Opera:[" OPR/[VER]","Opera Mini/[VER]","Version/[VER]"],"Opera Mini":"Opera Mini/[VER]","Opera Mobi":"Version/[VER]",UCBrowser:["UCWEB[VER]","UC.*Browser/[VER]"],MQQBrowser:"MQQBrowser/[VER]",MicroMessenger:"MicroMessenger/[VER]",baiduboxapp:"baiduboxapp/[VER]",baidubrowser:"baidubrowser/[VER]",SamsungBrowser:"SamsungBrowser/[VER]",Iron:"Iron/[VER]",Safari:["Version/[VER]","Safari/[VER]"],Skyfire:"Skyfire/[VER]",Tizen:"Tizen/[VER]",Webkit:"webkit[ /][VER]",PaleMoon:"PaleMoon/[VER]",Gecko:"Gecko/[VER]",Trident:"Trident/[VER]",Presto:"Presto/[VER]",Goanna:"Goanna/[VER]",iOS:" \\bi?OS\\b [VER][ ;]{1}",Android:"Android [VER]",BlackBerry:["BlackBerry[\\w]+/[VER]","BlackBerry.*Version/[VER]","Version/[VER]"],BREW:"BREW [VER]",Java:"Java/[VER]","Windows Phone OS":["Windows Phone OS [VER]","Windows Phone [VER]"],"Windows Phone":"Windows Phone [VER]","Windows CE":"Windows CE/[VER]","Windows NT":"Windows NT [VER]",Symbian:["SymbianOS/[VER]","Symbian/[VER]"],webOS:["webOS/[VER]","hpwOS/[VER];"]},utils:{Bot:"Googlebot|facebookexternalhit|AdsBot-Google|Google Keyword Suggestion|Facebot|YandexBot|YandexMobileBot|bingbot|ia_archiver|AhrefsBot|Ezooms|GSLFbot|WBSearchBot|Twitterbot|TweetmemeBot|Twikle|PaperLiBot|Wotbox|UnwindFetchor|Exabot|MJ12bot|YandexImages|TurnitinBot|Pingdom",MobileBot:"Googlebot-Mobile|AdsBot-Google-Mobile|YahooSeeker/M1A1-R2D2",DesktopMode:"WPDesktop",TV:"SonyDTV|HbbTV",WebKit:"(webkit)[ /]([\\w.]+)",Console:"\\b(Nintendo|Nintendo WiiU|Nintendo 3DS|Nintendo Switch|PLAYSTATION|Xbox)\\b",Watch:"SM-V700"}},
vendor: 7,302 bytes, lines 43-44
43g.detectMobileBrowsers={fullPattern:/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,shortPattern:/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,
44tabletPattern:/android|ipad|playbook|silk/i};var h,i=Object.prototype.hasOwnProperty;return g.FALLBACK_PHONE="UnknownPhone",g.FALLBACK_TABLET="UnknownTablet",g.FALLBACK_MOBILE="UnknownMobile",h="isArray"in Array?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)},function(){var a,b,c,e,f,j,k=g.mobileDetectRules;for(a in k.props)if(i.call(k.props,a)){for(b=k.props[a],h(b)||(b=[b]),f=b.length,e=0;e<f;++e)c=b[e],j=c.indexOf("[VER]"),j>=0&&(c=c.substring(0,j)+"([\\w._\\+]+)"+c.substring(j+5)),b[e]=new RegExp(c,"i");k.props[a]=b}d(k.oss),d(k.phones),d(k.tablets),d(k.uas),d(k.utils),k.oss0={WindowsPhoneOS:k.oss.WindowsPhoneOS,WindowsMobileOS:k.oss.WindowsMobileOS}}(),g.findMatch=function(a,b){for(var c in a)if(i.call(a,c)&&a[c].test(b))return c;return null},g.findMatches=function(a,b){var c=[];for(var d in a)i.call(a,d)&&a[d].test(b)&&c.push(d);return c},g.getVersionStr=function(a,b){var c,d,e,f,h=g.mobileDetectRules.props;if(i.call(h,a))for(c=h[a],e=c.length,d=0;d<e;++d)if(f=c[d].exec(b),null!==f)return f[1];return null},g.getVersion=function(a,b){var c=g.getVersionStr(a,b);return c?g.prepareVersionNo(c):NaN},g.prepareVersionNo=function(a){var b;return b=a.split(/[a-z._ \/\-]/i),1===b.length&&(a=b[0]),b.length>1&&(a=b[0]+".",b.shift(),a+=b.join("")),Number(a)},g.isMobileFallback=function(a){return g.detectMobileBrowsers.fullPattern.test(a)||g.detectMobileBrowsers.shortPattern.test(a.substr(0,4))},g.isTabletFallback=function(a){return g.detectMobileBrowsers.tabletPattern.test(a)},g.prepareDetectionCache=function(a,c,d){if(a.mobile===b){var e,h,i;return(h=g.findMatch(g.mobileDetectRules.tablets,c))?(a.mobile=a.tablet=h,void(a.phone=null)):(e=g.findMatch(g.mobileDetectRules.phones,c))?(a.mobile=a.phone=e,void(a.tablet=null)):void(g.isMobileFallback(c)?(i=f.isPhoneSized(d),i===b?(a.mobile=g.FALLBACK_MOBILE,a.tablet=a.phone=null):i?(a.mobile=a.phone=g.FALLBACK_PHONE,a.tablet=null):(a.mobile=a.tablet=g.FALLBACK_TABLET,a.phone=null)):g.isTabletFallback(c)?(a.mobile=a.tablet=g.FALLBACK_TABLET,a.phone=null):a.mobile=a.tablet=a.phone=null)}},g.mobileGrade=function(a){var b=null!==a.mobile();return a.os("iOS")&&a.version("iPad")>=4.3||a.os("iOS")&&a.version("iPhone")>=3.1||a.os("iOS")&&a.version("iPod")>=3.1||a.version("Android")>2.1&&a.is("Webkit")||a.version("Windows Phone OS")>=7||a.is("BlackBerry")&&a.version("BlackBerry")>=6||a.match("Playbook.*Tablet")||a.version("webOS")>=1.4&&a.match("Palm|Pre|Pixi")||a.match("hp.*TouchPad")||a.is("Firefox")&&a.version("Firefox")>=12||a.is("Chrome")&&a.is("AndroidOS")&&a.version("Android")>=4||a.is("Skyfire")&&a.version("Skyfire")>=4.1&&a.is("AndroidOS")&&a.version("Android")>=2.3||a.is("Opera")&&a.version("Opera Mobi")>11&&a.is("AndroidOS")||a.is("MeeGoOS")||a.is("Tizen")||a.is("Dolfin")&&a.version("Bada")>=2||(a.is("UC Browser")||a.is("Dolfin"))&&a.version("Android")>=2.3||a.match("Kindle Fire")||a.is("Kindle")&&a.version("Kindle")>=3||a.is("AndroidOS")&&a.is("NookTablet")||a.version("Chrome")>=11&&!b||a.version("Safari")>=5&&!b||a.version("Firefox")>=4&&!b||a.version("MSIE")>=7&&!b||a.version("Opera")>=10&&!b?"A":a.os("iOS")&&a.version("iPad")<4.3||a.os("iOS")&&a.version("iPhone")<3.1||a.os("iOS")&&a.version("iPod")<3.1||a.is("Blackberry")&&a.version("BlackBerry")>=5&&a.version("BlackBerry")<6||a.version("Opera Mini")>=5&&a.version("Opera Mini")<=6.5&&(a.version("Android")>=2.3||a.is("iOS"))||a.match("NokiaN8|NokiaC7|N97.*Series60|Symbian/3")||a.version("Opera Mobi")>=11&&a.is("SymbianOS")?"B":(a.version("BlackBerry")<5||a.match("MSIEMobile|Windows CE.*Mobile")||a.version("Windows Mobile")<=5.2,"C")},g.detectOS=function(a){return g.findMatch(g.mobileDetectRules.oss0,a)||g.findMatch(g.mobileDetectRules.oss,a)},g.getDeviceSmallerSide=function(){return window.screen.width<window.screen.height?window.screen.width:window.screen.height},f.prototype={constructor:f,mobile:function(){return g.prepareDetectionCache(this._cache,this.ua,this.maxPhoneWidth),this._cache.mobile},phone:function(){return g.prepareDetectionCache(this._cache,this.ua,this.maxPhoneWidth),this._cache.phone},tablet:function(){return g.prepareDetectionCache(this._cache,this.ua,this.maxPhoneWidth),this._cache.tablet},userAgent:function(){return this._cache.userAgent===b&&(this._cache.userAgent=g.findMatch(g.mobileDetectRules.uas,this.ua)),this._cache.userAgent},userAgents:function(){return this._cache.userAgents===b&&(this._cache.userAgents=g.findMatches(g.mobileDetectRules.uas,this.ua)),this._cache.userAgents},os:function(){return this._cache.os===b&&(this._cache.os=g.detectOS(this.ua)),this._cache.os},version:function(a){return g.getVersion(a,this.ua)},versionStr:function(a){return g.getVersionStr(a,this.ua)},is:function(b){return c(this.userAgents(),b)||a(b,this.os())||a(b,this.phone())||a(b,this.tablet())||c(g.findMatches(g.mobileDetectRules.utils,this.ua),b)},match:function(a){return a instanceof RegExp||(a=new RegExp(a,"i")),a.test(this.ua)},isPhoneSized:function(a){return f.isPhoneSized(a||this.maxPhoneWidth)},mobileGrade:function(){return this._cache.grade===b&&(this._cache.grade=g.mobileGrade(this)),this._cache.grade}},"undefined"!=typeof window&&window.screen?f.isPhoneSized=function(a){return a<0?b:g.getDeviceSmallerSide()<=a}:f.isPhoneSized=function(){},f._impl=g,f.version="1.4.3 2018-09-08",f})}
44(function(a){if("undefined"!=typeof module&&module.exports)return function(a){module.exports=a()};if("function"==typeof define&&define.amd)return define;if("undefined"!=typeof window)return function(a){window.MobileDetect=a()};throw new Error("unknown environment")}());
45/*! jQuery slabtext plugin v2.2 MIT/GPL2 @freqdec */
46(function($){$.fn.slabText=function(options){var settings={fontRatio:0.78,forceNewCharCount:true,wrapAmpersand:true,headerBreakpoint:null,viewportBreakpoint:null,noResizeEvent:false,resizeThrottleTime:300,maxFontSize:999,postTweak:true,precision:3,minCharsPerLine:0};$("body").addClass("slabtexted");return this.each(function(){if(options){$.extend(settings,options);}var $this=$(this),keepSpans=$("span.slabtext",$this).length,words=keepSpans?[]:String($.trim($this.text())).replace(/\s{2,}/g," ").split(" "),origFontSize=null,idealCharPerLine=null,fontRatio=settings.fontRatio,forceNewCharCount=settings.forceNewCharCount,headerBreakpoint=settings.headerBreakpoint,viewportBreakpoint=settings.viewportBreakpoint,postTweak=settings.postTweak,precision=settings.precision,resizeThrottleTime=settings.resizeThrottleTime,minCharsPerLine=settings.minCharsPerLine,resizeThrottle=null,viewportWidth=$(window).width(),headLink=$this.find("a:first").attr("href")||$this.attr("href"),linkTitle=headLink?$this.find("a:first").attr("title"):"";if(!keepSpans&&minCharsPerLine&&words.join(" ").length<minCharsPerLine){return;}var grabPixelFontSize=function(){var dummy=jQuery('<div style="display:none;font-size:1em;margin:0;padding:0;height:auto;line-height:1;border:0;">&nbsp;</div>').appendTo($this),emH=dummy.height();dummy.remove();return emH;};var resizeSlabs=function resizeSlabs(){var parentWidth=$this.width(),fs;$this.removeClass("slabtextdone slabtextinactive");if(viewportBreakpoint&&viewportBreakpoint>viewportWidth||headerBreakpoint&&headerBreakpoint>parentWidth){$this.addClass("slabtextinactive");return;}fs=grabPixelFontSize();if(!keepSpans&&(forceNewCharCount||fs!=origFontSize)){origFontSize=fs;var newCharPerLine=Math.min(60,Math.floor(parentWidth/(origFontSize*fontRatio))),wordIndex=0,lineText=[],counter=0,preText="",postText="",finalText="",slice,preDiff,postDiff;if(newCharPerLine!=idealCharPerLine){idealCharPerLine=newCharPerLine;while(wordIndex<words.length){postText="";while(postText.length<idealCharPerLine){preText=postText;postText+=words[wordIndex]+" ";if(++wordIndex>=words.length){break;}}if(minCharsPerLine){slice=words.slice(wordIndex).join(" ");if(slice.length<minCharsPerLine){postText+=slice;preText=postText;wordIndex=words.length+2;}}preDiff=idealCharPerLine-preText.length;postDiff=postText.length-idealCharPerLine;if((preDiff<postDiff)&&(preText.length>=(minCharsPerLine||2))){finalText=preText;wordIndex--;}else{finalText=postText;}finalText=$("<div/>").text(finalText).html();if(settings.wrapAmpersand){finalText=finalText.replace(/&amp;/g,'<span class="amp">&amp;</span>');}finalText=$.trim(finalText);lineText.push('<span class="slabtext">'+finalText+"</span>");}$this.html(lineText.join(" "));if(headLink){$this.wrapInner('<a href="'+headLink+'" '+(linkTitle?'title="'+linkTitle+'" ':"")+"/>");}}}else{origFontSize=fs;}$("span.slabtext",$this).each(function(){var $span=$(this),innerText=$span.text(),wordSpacing=innerText.split(" ").length>1,diff,ratio,fontSize;if(postTweak){$span.css({"word-spacing":0,"letter-spacing":0});}ratio=parentWidth/$span.width();fontSize=parseFloat(this.style.fontSize)||origFontSize;$span.css("font-size",Math.min((fontSize*ratio).toFixed(precision),settings.maxFontSize)+"px");diff=!!postTweak?parentWidth-$span.width():false;if(diff){$span.css((wordSpacing?"word":"letter")+"-spacing",(diff/(wordSpacing?innerText.split(" ").length-1:innerText.length)).toFixed(precision)+"px");}});$this.addClass("slabtextdone");};resizeSlabs();if(!settings.noResizeEvent){$(window).resize(function(){if($(window).width()==viewportWidth){return;}viewportWidth=$(window).width();clearTimeout(resizeThrottle);resizeThrottle=setTimeout(resizeSlabs,resizeThrottleTime);});}});};})(jQuery);
47/*! jQuery Lazy 1.6.7 - MIT & GPL-2.0 license - Copyright 2012-2016 Daniel 'Eisbehr' Kern */
48!function(e,t,a,r){"use strict";function n(a,r,n,o){function i(){p=t.devicePixelRatio>1,l(n),r("delay")>=0&&setTimeout(function(){u(!0)},r("delay")),(r("delay")<0||r("combined"))&&(o.e=m(r("throttle"),function(e){"resize"===e.type&&(b=v=-1),u(e.all)}),o.a=function(e){l(e),n.push.apply(n,e)},o.g=function(){return n=e(n).filter(function(){return!e(this).data(r("loadedName"))})},u(),e(r("appendScroll")).on("scroll."+a.name+" resize."+a.name,o.e))}function l(t){if(t=e(t).filter(function(){return!e(this).data(r("handledName"))&&(e(this).attr(r("attribute"))||e(this).attr(r("loaderAttribute")))}).data("plugin_"+a.name,a),r("defaultImage")||r("placeholder"))for(var n=0;n<t.length;n++){var o=e(t[n]),i=t[n].tagName.toLowerCase(),l="background-image";"img"==i&&r("defaultImage")&&!o.attr("src")?o.attr("src",r("defaultImage")):"img"==i||!r("placeholder")||o.css(l)&&"none"!=o.css(l)||o.css(l,"url("/js/vendor/jquery-lazy/+r("placeholder")+")")}}function u(t){if(!n.length)return void(r("autoDestroy")&&a.destroy());for(var o=!1,i=r("imageBase")?r("imageBase"):"",l=0;l<n.length;
48l++)(function(a){if(c(a)||t){var n,l=e(a),u=a.tagName.toLowerCase(),f=l.attr(r("attribute"));l.data(r("handledName"))||r("visibleOnly")&&!l.is(":visible")||!(f&&("img"==u&&i+f!=l.attr("src")||"img"!=u&&i+f!=l.css("background-image"))||(n=l.attr(r("loaderAttribute"))))||(o=!0,l.data(r("handledName"),!0),d(l,u,i,n))}})(n[l]);o&&(n=e(n).filter(function(){return!e(this).data(r("handledName"))}))}function d(t,a,n,o){++h;var i=function(){A("onError",t),g()};if(A("beforeLoad",t),o)t.off("error").one("error",i),t.one("load",function(){r("removeAttribute")&&t.removeAttr(r("loaderAttribute")),t.data(r("loadedName"),!0),A("afterLoad",t),g()}),A(o,t,function(e){e?t.load():t.error()})||t.error();else{var l=e(new Image);l.one("error",i),l.one("load",function(){t.hide(),"img"==a?t.attr("src",l.attr("src")):t.css("background-image","url('"+l.attr("src")+"')"),t[r("effect")](r("effectTime")),r("removeAttribute")&&t.removeAttr(r("attribute")+" "+r("retinaAttribute")),t.data(r("loadedName"),!0),A("afterLoad",t),l.remove(),g()}),l.attr("src",n+t.attr(r(p&&t.attr(r("retinaAttribute"))?"retinaAttribute":"attribute"))),l.complete&&l.load()}}function c(e){var t=e.getBoundingClientRect(),a=r("scrollDirection"),n=r("threshold"),o=s()+n>t.top&&-n<t.bottom,i=f()+n>t.left&&-n<t.right;return"vertical"==a?o:"horizontal"==a?i:o&&i}function f(){return b>=0?b:b=e(t).width()}function s(){return v>=0?v:v=e(t).height()}function m(e,t){var n,o=0;return function(i,l){function u(){o=+new Date,t.call(a,i)}var d=+new Date-o;n&&clearTimeout(n),d>e||!r("enableThrottle")||l?u():n=setTimeout(u,e-d)}}function g(){--h,n.length||h||A("onFinishedAll")}function A(e,t,n){return(e=r(e))?(e.apply(a,[].slice.call(arguments,1)),!0):!1}var h=0,b=-1,v=-1,p=!1;!function(){"event"==r("bind")?i():e(t).on("load."+a.name,i)}()}function o(a,o){var i=this,l=e.extend({},i.configuration,o),u={};return i.config=function(e,t){return t===r?l[e]:(l[e]=t,i)},i.addItems=function(t){return u.a&&u.a("string"===e.type(t)?e(t):t),i},i.getItems=function(){return u.g?u.g():{}},i.update=function(e){return u.e&&u.e({},!e),i},i.loadAll=function(){return u.e&&u.e({all:!0},!0),i},i.destroy=function(){return e(i.config("appendScroll")).off("."+i.name,u.e),e(t).off("."+i.name),u={},r},n(i,i.config,a,u),i.config("chainable")?a:i}e.fn.Lazy=e.fn.lazy=function(e){return new o(this,e)},e.extend(o.prototype,{name:"lazy",configuration:{chainable:!0,autoDestroy:!0,bind:"load",threshold:500,visibleOnly:!1,appendScroll:t,scrollDirection:"both",imageBase:null,defaultImage:"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",placeholder:null,delay:-1,combined:!1,attribute:"data-src",retinaAttribute:"data-retina",loaderAttribute:"data-loader",removeAttribute:!0,handledName:"handled",loadedName:"loaded",effect:"show",effectTime:0,enableThrottle:!0,throttle:250,beforeLoad:null,afterLoad:null,onError:null,onFinishedAll:null}})}(jQuery,window,document);
49$(function() {
50    if ($('div.StageVoting_groupId').length) {
51        var vid    = $('div.StageVoting_groupId').data('voting');
52        var detail = $('div.StageVoting_groupId').data('detail');
53        $.ajax({
54            url: '/_votings/arena/last.voting.php',
55            type: 'GET',
56            data: {
57                location: $(location).attr('href'),
58                select: 'id',
59                id:vid,
60                detail: detail
61            },
62            dataType: 'html',
63            success: function (data) {
64                $('div.StageVoting_groupId').html(data);
65
66            }
67        })
68    }
69    if($('div.StageVoting_groupAuto').length) {
70        $.ajax({
71            url: '/_votings/arena/last.voting.php',
72            type: 'GET',
73            data: {
74                location: $(location).attr('href'),
75                select: 'last'
76            },
77            dataType: 'html',
78            success: function (data) {
79                $('div.StageVoting_groupAuto').html(data);
80
81            }
82        })
83    }
84    var request;
85    $(document).on('submit','form.StageVoting_form',function(e){
86        e.preventDefault();
87        var hash = $("input[name='i_vhash']:checked").val();
88        if( typeof hash === "undefined"){
89            $(".StageVoting_info").text("Bitte treffen Sie eine Auswahl");
90        } else {
91            var $form = $(this);
92            var $inputs = $form.find("input, select, button, textarea");
93            var serializedData = $form.serialize();
94            $inputs.prop("disabled", true);
95
96            request = $.ajax({
97                type: "POST",
98                url: "/_votings/arena/post.php",
99                data: serializedData,
100             });
101            request.done(function (response, textStatus, jqXHR){
102                // Log a message to the console
103                if($('div.StageVoting_groupAuto').length) {
104                    $('div.StageVoting_groupAuto').html(response);
105                }
106                if($('div.StageVoting_groupId').length) {
107                    $('div.StageVoting_groupId').html(response);
108                }
109
110            });
111            request.fail(function (jqXHR, textStatus, errorThrown){
112                // Log the error to the console
113                console.error(
114                    "The following error occurred: "+
115                    textStatus, errorThrown
116                );
117            });
118            request.always(function () {
119                // Reenable the inputs
120                $inputs.prop("disabled", false);
121            });
122        }
123    })
124
125});
126/* Click auf Logo nicht scrollen */
127$(".Logo").on("click", function () {
128    localStorage.setItem('click','Logo');
129});
130
131/* ---- iPad-Events --- */
132$(window).on("orientationchange resize",function(){
133  if ( $(".Ad-superbanner .ad_superbanner").length) {
134    $(document).trigger("webskin");    
135  }
136});
137
138/* --------------- GA Event Zählung --------------- */
139var socialmedia_click = function(type, target) {
140    var fo_sm = {
141          'hitType': 'event',
142          'eventCategory': 'socialmedia-share_' + type,
143          'eventAction': 'Klick',
144          'eventLabel': target,
145          'page': window.location.pathname,
146          'location': window.location.href
147          };
148      dfv_ga_repl(fo_sm);
149};
150
151$("body").on("click", ".NavigationSharingHeader_itemLink", function(event){
152  var d = event.currentTarget.getAttribute('data-te');
153  if (d !== null) {
154    socialmedia_click("stickyheader", event.currentTarget.getAttribute('data-te'));
155  }
156});
157$("body").on("click", ".NavigationSharingFooter_itemLink", function(event){
158  var d = event.currentTarget.getAttribute('data-te');
159  if (d !== null) {
160    socialmedia_click("footer", event.currentTarget.getAttribute('data-te'));
161  }
162});
163
164$("body").on("click", ".PageArticle_sticky .ButtonSharing", function(event){
165  var d = event.currentTarget.getAttribute('data-te');
166  if (d !== null) {
167    socialmedia_click("content", event.currentTarget.getAttribute('data-te'));
168  }
169});
170
171$("body").on("click", ".PageArticleAdvertorial_sticky .ButtonSharing", function(event){
172  var d = event.currentTarget.getAttribute('data-te');
173  if (d !== null) {
174    socialmedia_click("content", event.currentTarget.getAttribute('data-te'));
175  }
176});
177
178$("body").on("click", ".MediaGallery_sharingButtons a", function(event){
179  var d = event.currentTarget.getAttribute('data-te');
180  if (d !== null) {
181    socialmedia_click("gallery", event.currentTarget.getAttribute('data-te'));
182  }
183});
184
185$(".SiteHeader").on("click", ".NavigationMeta .FormLoginPopup_content button", function(event){
186  // Trigger Event bei Login-Link im Header
187  var fo_mr = {
188    'hitType': 'event',
189    'eventCategory': event.currentTarget.getAttribute('data-ga'),
190    'eventAction': 'Klick',
191    'eventLabel': 'Oben rechts',
192    'page': window.location.pathname,
193    'location': window.location.href
194  };
195  dfv_ga_repl(fo_mr);
196});
197
198$(".SiteHeader").on("click", ".NavigationMeta .FormLogoutPopup input[type=\"submit\"]", function(event){
199  // Trigger Event bei Logout-Link im Header
200  var fo_mr = {
201    'hitType': 'event',
202    'eventCategory': event.currentTarget.getAttribute('data-ga'),
203    'eventAction': 'Klick',
204    'eventLabel': 'Oben rechts',
205    'page': window.location.pathname,
206    'location': window.location.href
207  };
208  dfv_ga_repl(fo_mr);
209});
210
211$('section[class*=\'Stage\'] .ButtonMoreContent, div[class*=\'Stage\'] .ButtonMoreContent').on("click", function(){
212  // Trigger Event bei Bühnen-Link Mehr
213  var fo_mr = {
214    'hitType': 'event',
215    'eventCategory': $( this ).text(),
216    'eventAction': 'Klick',
217    'page': window.location.pathname,
218    'location': window.location.href
219  };
220  dfv_ga_repl(fo_mr);
221});
222
223$(".StageGalleriesEdgewise, .StageStorechecks, .StageGalleries").on("click", "a", function(event){
224  // Trigger Event bei Click auf Galerie Fotogaleriebühnen
225  var d = event.currentTarget.getAttribute('data-te');
226  if (d !== null) {
227    var stageTitle = $(this).closest('article').parent().parent().find('.StageTitle a').text();
228    if (typeof stageTitle === 'undefined' || stageTitle === '') {
229      stageTitle = $(this).closest('article').parent().parent().parent().find('.StageTitle a').text();
230    }
231
232    var fo_pw = {
233      'hitType': 'event',
234      'eventCategory': stageTitle + ' Bühne',
235      'eventAction': 'Klick',
236      'eventLabel': event.currentTarget.getAttribute('data-te'),
237      'page': window.location.pathname,
238      'location': window.location.href
239    };
240    dfv_ga_repl(fo_pw);
241  }
242});
243
244$(".StageFewOneRow, .StageTeaserFewTwoRows").on("click", "a", function(event){
245  // Trigger Event bei Click auf News Fashionbühne
246  var d = event.currentTarget.getAttribute('data-te');
247  if (d !== null) {
248    var fo_pw = {
249      'hitType': 'event',
250      'eventCategory': $(this).closest('article').parent().parent().find('.StageTitle a').text() + ' Bühne',
251      'eventAction': 'Klick',
252      'eventLabel': event.currentTarget.getAttribute('data-te'),
253      'page': window.location.pathname,
254      'location': window.location.href
255    };
256    dfv_ga_repl(fo_pw);
257  }
258});
259
260$(".StageTeaserMostRead_listMostRead-numbered").on("click", "a", function(event){
261  // Trigger Event bei Click auf Meist gelesen Blogroll
262  var d = event.currentTarget.getAttribute('data-te');
263  if (d !== null) {
264    var fo_pw = {
265      'hitType': 'event',
266      'eventCategory': 'Meist gelesen Blogroll',
267      'eventAction': 'Klick',
268      'eventLabel': event.currentTarget.getAttribute('data-te'),
269      'page': window.location.pathname,
270      'location': window.location.href
271    };
272    dfv_ga_repl(fo_pw);
273  }
274});
275
276$(".PageArticle_body").on("submit", ".StageVoting_form",function(){
277  // Trigger Event bei Umfrage
278     var fo_mr = {
279      'hitType': 'event',
280      'eventCategory': 'Umfrage',
281      'eventAction': 'Klick',
282      'eventLabel': 'Detail',
283      'page': window.location.pathname,
284      'location': window.location.href
285      };
286  dfv_ga_repl(fo_mr);
287   
288});
289
290$(".StageVoting").on("submit", ".StageVoting_form",function(){
291  // Trigger Event bei Umfrage
292     var fo_mr = {
293      'hitType': 'event',
294      'eventCategory': 'Umfrage',
295      'eventAction': 'Klick',
296      'eventLabel': 'Arena',
297      'page': window.location.pathname,
298      'location': window.location.href
299      };
300  dfv_ga_repl(fo_mr);
301   
302});
303
304/* --------------- Suche ---------- */
305
306$(function(){
307   var showSearch = function() {
308     
309    var l = $("a.navsearch").position().left;
310    console.log($("a.navsearch").position());
311     
312    $("#header-searchinput").show();
313        $("#header-searchinput").animate({
314           width: "250px",
315           right: "0"
316        }, 200 );
317  };
318
319  var hideSearch = function() {
320    $( "#header-searchinput" ).animate({
321            width: "0px",
322            right: "0"
323            }, 200, function() {
324            $("#header-searchinput").hide();
325          });
326  };
327  
328  var searchurl = $(location).attr('href');
329    
330  $(document).on("click touchstart",function(e) {
331
332    if($(e.target).attr('id') == "headersearch" && $("#header-searchinput").css("display") == "none") {
333      e.preventDefault();
334      showSearch();
335    }
336    else {
337      if ($(e.target).attr('id') == "header-searchfield" || $(e.target).attr('id') == "header-searchbutton") {
338          ;// Klick innerhalb des Suchfeldes
339      }
340      else {
341          hideSearch();
342      }
343    }
344  });
345  
346});
347
348/*---------- Aktionsseiten-Infobox ----------*/
349
350$(document).on("show-infobox", function(event, info_box_id, info_icon_position){
351  $("#"+info_box_id).css('top',info_icon_position.top + 30)
352    .css('left', info_icon_position.left - 160)
353    .css('display', 'block');
354});
355
356/*---------- Jobs auf News-Detailseite im Footer ----------*/
357
358$(".NewsJobs_item, .NewsJobs_header, .NewsJobs_footer").on("click", function(event){
359  if(event.currentTarget.getAttribute('data-te') !== undefined){
360     var fo_pw = {
361       'hitType': 'event',
362       'eventCategory': 'Jobs',
363       'eventAction': 'Klick',
364       'eventLabel': event.currentTarget.getAttribute('data-te'),
365       'page': window.location.pathname,
366       'location': window.location.href
367     };
368     dfv_ga_repl(fo_pw);
369  }
370});
371
372/*---------- Online-Specials Homepage ----------*/
373
374$('.StageLeadOnlineSpecialHomepage').each(function(){
375  if($('.Sponsor_item', this).length !== 0) {
376  } else {
377    $('.StageLeadOnlineSpecialHomepage_rightCol-inner', this).hide();
378  }
379});
380
381
382/* Online-Specials Sponsoren */
383
384$(".Sponsor_item-image img").on("click", function(){
385  var val = $(this).parent().parent().attr('href');
386  console.log("val: ");
387  console.log(val);
388  if(val !== undefined){
389    var fo_mr = {
390      'hitType': 'event',
391      'eventCategory': 'Dossiers',
392      'eventAction': 'click',
393      'eventLabel': val,
394      'page': window.location.pathname,
395      'location': window.location.href
396    };
397    dfv_ga_repl(fo_mr);
398
399
400  } else {
401    return false;
402  }
403});
404
405
406var md = new MobileDetect(window.navigator.userAgent);
407var oldScrollPosition;
408
409function preventEmptySearch() {
410  $('.SiteHeader_searchform button[type="submit"]').click(function(e) {
411    e.preventDefault();
412    if ( $('.SiteHeader_searchform input[type="text"]').val() !== '' ) {
413      $('.SiteHeader_searchform form').submit();
414    }
415  });
416
417  $('.SiteHeaderSticky_formSearch button[type="submit"]').click(function(e) {
418    e.preventDefault();
419    if ( $('.SiteHeaderSticky_formSearch input[type="text"]').val() !== '' ) {
420      $('.SiteHeaderSticky_formSearch form').submit();
421    }
422  });
423
424  $('.FormSearchMobile button[type="submit"]').click(function(e) {
425    e.preventDefault();
426    if ( $('.FormSearchMobile input[type="text"]').val() !== '' ) {
427      $('.FormSearchMobile').submit();
428    }
429  });
430
431  $('.FormSearch button[type="submit"]').click(function(e) {
432    e.preventDefault();
433    if ( $('.FormSearch input[type="text"]').val() !== '' ) {
434      $('.FormSearch').submit();
435    }
436  });
437}
438
439function initAsideNav() {
440  $('.aside-menu .toggle-menu').click(function(e) {
441    e.preventDefault();
442    $(this).closest('.aside-menu').toggleClass('open');
443    $(this).closest('.aside-menu').find('.collapse-area').one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function(e) {
444      if (e.originalEvent.propertyName === 'max-height') {
445        $(document.body).trigger("sticky_kit:recalc");
446      }
447    });
448  });
449}
450
451function initSearchToggle() {
452  $('.ToggleSearch').click(function() {
453    var searchform = '.SiteHeader .SiteHeader_searchform';
454
455    if ( $(searchform+':visible').length === 0 ) {
456      $(searchform).slideDown(225);
457      $('.ToggleSearch').css('color', '#E53212')
458      .parent().addClass('isActive');
459    } else if ( $(searchform+':visible').length > 0) {
460      $(searchform).slideUp(225);
461      $('.ToggleSearch').removeAttr('style')
462      .parent().removeClass('isActive');
463    }
464  });
465}
466
467function initMobileNav() {
468  $('.toggle-mobile-nav').click(function(e) {
469    $('body').toggleClass('mobile-nav-open');
470  });
471}
472
473function initNewsletterSelect() {
474  $('.newsletter-select').click(function(e) {
475    $(this).toggleClass('selected');
476  });
477}
478
479function initStickyColumn() {
480  var ButtonsSharing_margin_top = $('.PageArticle_content .PageArticle_sticky .ButtonsSharing, ' +
481    '.PageArticleAdvertorial_content .PageArticleAdvertorial_sticky .ButtonsSharing').css('margin-top');
482
483  $('.PageArticle_content .PageArticle_sticky, .PageArticleAdvertorial_content .PageArticleAdvertorial_sticky').stick_in_parent({
484    parent     : '.sticky-container',
485    offset_top: 97,
486    bottoming: true
487  }).on("sticky_kit:stick", function(e) {
488    $(this).addClass('is_sticky');
489    $('.PageArticle_content .PageArticle_sticky .ButtonsSharing,' +
490      '.PageArticleAdvertorial_content .PageArticleAdvertorial_sticky .ButtonsSharing ').css('margin-top',0);
491  })
492  .on("sticky_kit:bottom", function(e) {
493    $(this).parent().css('position', 'static');
494  })  
495  .on("sticky_kit:unstick", function(e) {
496    $(this).removeClass('is_sticky'); 
497    $('.PageArticle_content .PageArticle_sticky .ButtonsSharing,' +
498      '.PageArticleAdvertorial_content .PageArticleAdvertorial_sticky .ButtonsSharing').css('margin-top',ButtonsSharing_margin_top);
499  });
500  
501  $('a[href="#"]').click(function(e){
502    e.preventDefault();
503  });
504}
505
506var visible_ad = { v:false};
507
508function checkAdvertisement(sw, ct_clicks, adIDs, adIterator, direction, galId) {
509  'use strict';
510
511  if (typeof adIDs === 'undefined' || adIDs.length === 0) {
512    //sw.preventDefault();
513    return [ct_clicks, adIterator];
514  }
515
516  var firstCountDisplayBanner = 5; //Nutzer sieht 5 Bilder und nach 5. Klick den ersten Banner
517  var countDisplayBanner = firstCountDisplayBanner + 1; //Nutzer sieht 5 Bilder und nach 6. Klick nächsten Banner
518  var countSlides = sw.slides.length;
519  var hash;
520
521  //Banner ans Ende der Galerie setzen, wenn mehr Anzahl an Klicks definiert wurden, als es Galeriebilder (Slides) gibt
522  if ( firstCountDisplayBanner > (countSlides - 1) ) {
523    firstCountDisplayBanner = countDisplayBanner = countSlides - 1;
524  }
525
526  if (ct_clicks % countDisplayBanner === 0 || ct_clicks === firstCountDisplayBanner) {
527    if (ct_clicks === firstCountDisplayBanner) {
528     ct_clicks = countDisplayBanner;
529    }
530    sw.lockSwipes();
531    sw.disableKeyboardControl();
532    switch(direction) {
533      case 'next': hash = visible_ad.sn;
534        break;
535      case 'prev': hash = visible_ad.sp;
536        break;
537      default: break;
538    }
539    var banner_div = "<div id=\"renderSlot_Rectangle-Gal\" class=\"Ad banner gallery inner\"><script type=\"text/javascript\">adition.srq.push(function(api) { api.renderSlot(\"renderSlot_Rectangle-Gal\"); })</script></div>";
540    var banner_name = "Rectangle-Gal";
541    if (md.mobile() != null) {
542      banner_div  = "<div id=\"renderSlot_Mobil-Rectangle-Gal\" class=\"Ad banner gallery inner\"><script type=\"text/javascript\">adition.srq.push(function(api) { api.renderSlot(\"renderSlot_Mobil-Rectangle-Gal\"); })</script></div>";
543      banner_name = "Mobil-Rectangle-Gal";
544    }
545
546    $(".swiper-container.gallery-thumbs").css("display","none");
547
548
549    var content_pic = $("#" + galId + " .MediaGallery_sliderContainer.swiper-wrapper .swiper-slide[data-hash=\"" + hash + "\"], " +
550                        "#" + galId + " .MediaGalleryFullWidth_sliderContainer.swiper-wrapper .swiper-slide[data-hash=\"" + hash + "\"]").html();
551
552    adition.srq.push(function(api) {
553      api.configureRenderSlot("renderSlot_" + banner_name).setContentunitId(adIDs[adIterator]);
554      api.load(["renderSlot_" + banner_name ]).completeRendering();
555    });
556    adIterator++;
557    if (adIterator === adIDs.length) {
558      adIterator = 0;
559    }
560
561
562    $("#" + galId + " .swiper-wrapper .swiper-slide[data-hash=\"" + hash + "\"]").append(banner_div);
563    $("#" + galId + " .swiper-wrapper .swiper-slide[data-hash=\"" + hash + "\"]").children("div[class^='Media']").css('display','none');
564    visible_ad.v = true;
565
566    
567    // Desktop: Content einblenden, Swipen aktivieren
568    $(".swiper-button-prev, .swiper-button-next").on('click',{ sw: sw, content_pic: content_pic, visible_ad: visible_ad}, activateSwiping);
569    // Desktop: Content einblenden, Swipen aktivieren
570    $(document).on('keydown',{ sw: sw, content_pic: content_pic, visible_ad: visible_ad}, activateSwiping);
571    // Mobile-View: Content einblenden, Swipen aktivieren
572    $(".swiper-container").on('touchmove',{ sw: sw, content_pic: content_pic, visible_ad: visible_ad}, activateSwiping);
573
574    $('.swiper-button-prev, .swiper-button-next').css('width','18%');
575    ct_clicks++;
576  }
577  return [ct_clicks, adIterator];
578}
579
580function initLightbox(){
581
582  $('.img-feature.zoom, .zoomable').on('click',function(e) {
583    e.preventDefault();
584    var galId = $(this).attr('id');
585    var gid   = $(this).data('gid');
586    var url   = $(this).data('url');
587    var gtitle   = $(this).data('title');
588    var close = $(this).data('close');
589    var divid = '#m'+gid;
590    // console.log(close);
591    // console.log('lenght:'+ $('#m'+gid).length);
592    var stateObj = { gallery: gid };
593    history.pushState(stateObj, "start", url);
594    $.each( $('.modal'), function( key, value ) {
595      $(this).attr('class','unmodal hidden');
596    });
597    if($('#m'+gid).length == 0) {
598      $.ajax({
599        url: '/gallery/modal.php',
600        type: 'GET',
601        async: false,
602        data: {gid:gid},
603        dataType: 'HTML',
604        success: function(data) {
605          $('body').append(data);
606        }
607      });
608    } else {
609      $('#m'+gid).attr('class','modal idle');
610    }
611    var adid = $(divid).data("adid");
612    var ct_clicks = 0;
613
614    var mySwiper = new Swiper ($(divid + ' .swiper-container'), {
615      // Optional parameters
616      direction:  'horizontal',
617      loop:       true,
618      hashnav: true,
619      runCallbacksOnInit: false,
620      pagination: '.swiper-pagination',
621      nextButton: '.swiper-button-next',
622      prevButton: '.swiper-button-prev',
623      spaceBetween: 20,
624      observer: true,
625      observeParents: true,
626      onSlideChangeEnd: function (sw) {
627        visible_ad.sp = $("#" + gid + " .modal > .modal-background .swiper-wrapper .swiper-slide-prev").data("hash");
628        visible_ad.sn = $("#" + gid + " .modal > .modal-background .swiper-wrapper .swiper-slide-next").data("hash");
629      },
630      onSlideNextStart: function (sw) {
631        if (typeof window.sp_track_virtual_page_view === 'function') {
632          window.sp_track_virtual_page_view(galId, url, gtitle);
633        }
634        window.dfv_ga_vpageview(url, gtitle);
635        ct_clicks++;
636        check_adverstisment(sw, ct_clicks, adid, 'next', gid);
637      },
638      onSlidePrevStart: function (sw) {
639        if (typeof window.sp_track_virtual_page_view === 'function') {
640          window.sp_track_virtual_page_view(galId, url, gtitle);
641        }
642        window.dfv_ga_vpageview(url, gtitle);
643        ct_clicks++;
644        check_adverstisment(sw, ct_clicks, adid, 'prev', gid);
645      }
646    });
647    //console.log(mySwiper);
648    oldScrollPosition = $(document).scrollTop();
649    //console.log($('#m'+gid));
650    $('body').toggleClass('modal-open');
651    //$('body ' + divid).toggleClass('modal-open');
652    if (md.mobile() != null) {
653      // $('.modal').css('max-height', $(window).innerHeight());
654    }
655    $('.modal .modal-close').one('click',function(e) {
656      $("#readmorem" + gid).removeClass("active");
657      $(".swiper-slide .image img").removeClass("smooth");
658      console.log('url:'+url);
659      e.preventDefault();
660      if (close) {
661        $('body').removeClass('modal-open');
662        var stateObj = { gallery: gid };
663        history.pushState(stateObj, "close", '/galleries');
664        if (md.mobile() != null) {
665          $(document).scrollTop(oldScrollPosition);
666        }
667      } else {
668        window.location.href = '/galleries';
669        $('body').removeClass('modal-open');
670        var stateObj = { gallery: gid };
671        history.pushState(stateObj, "close", '/galleries');
672      }
673
674      // Bannerlogik zurücksetzen
675      // console.log("reset advertisement");
676      ct_clicks   = 0;
677      visible_ad  = { v:false };
678
679    });
680
681    /* Gallery Info Text */
682    if($('#m' + gid + ' .infotext').length && !$("#m" + gid + ' .social-media-bar .infotext').length) {
683      var infotext = $('#m' + gid + ' .infotext').detach();
684      infotext.appendTo("#m" + gid + ' .social-media-bar');
685    }
686    $('.modal .infotext, .galleryreadmore').on('click tap', function(e) {
687      var view_width  = $( window ).width();
688      var view_height = $( window ).height();
689      var info_width  = $('#readmorem'+gid).width();
690      var info_height = $('#readmorem'+gid).height();
691
692      $('#readmorem'+gid).css("top", (view_height / 2) - (info_height / 2));
693      $('#readmorem'+gid).css("left", (view_width / 2) - (info_width / 2));
694
695      $("#readmorem" + gid).toggleClass("active");
696      $(".swiper-slide .image img").toggleClass("smooth");
697
698      if($(".galleryreadmore.active").length){
699        mySwiper.lockSwipes();
700      }
701      else{
702        mySwiper.unlockSwipes();
703      }
704
705    });
706
707    $('.modal .modal-inner > .toggle-captions').on('click tap',function(e) {
708      console.log("toggle caption")
709      e.preventDefault();
710      $(this).closest('.modal').toggleClass('show-captions');
711    });
712
713  });
714
715}
716
717var galleryTop = new Array();
718var galleryThumbs = new Array();
719var galleryTopfw = new Array();
720var galleryThumbsfw = new Array();
721
722function activateSwiping(event){
723  // Aktiviert das Blättern und setzt die Eventhandler für das Stoppen zurück
724  $(".PageGallery_content .gallery-top .swiper-slide-active").html(event.data.content_pic);
725  $(this).parent().parent().find('.MediaGallery_sliderContainer.swiper-wrapper .swiper-slide-active, ' +
726                                 '.MediaGalleryFullWidth_sliderContainer.swiper-wrapper .swiper-slide-active').html(event.data.content_pic);
727  $(".banner.gallery.inner").remove();
728  $(".swiper-container.gallery-thumbs").css("display","block");
729
730  event.data.visible_ad.v = false;
731  event.data.sw.unlockSwipes();
732  event.data.sw.enableKeyboardControl();
733  $(".swiper-button-prev, .swiper-button-next").off('click',activateSwiping);
734  $(document).off('keydown', activateSwiping);
735  $(".swiper-container").off('touchmove', activateSwiping);
736}
737
738
739function initGallery() {
740
741  $('.MediaGallery').each(function(index){
742    var galId = $(this).attr('id');
743    var url   = $(this).data('url');
744    var galtitle   = $(this).data('title');
745    var close = $(this).data('close');
746    var divid = $(this).parent().attr('id');
747
748    //var adid = $("#"+galId).data("adid");
749    var adIDs = $("#"+galId).data("adids");
750    var adReturn = [];
751    var ct_clicks = 0;
752    var adIterator = 0;
753
754    galleryTop[index] = new Swiper ('#' + galId + ' .swiper-container.gallery-top', {
755      direction:  'horizontal',
756      loop:       false,
757      spaceBetween:        30,
758      nextButton:          '.swiper-button-next',
759      prevButton:          '.swiper-button-prev',
760      control:             galleryThumbs[index],
761      keyboardControl:     true,
762      observer: true,
763      observeParents: true,
764      hashnav: false,
765      centeredSlides:      true,
766      slideToClickedSlide: true,
767      runCallbacksOnInit: false,
768      //setTransform(slide,'translate3d('+(20)+'px,0,0)'),
769      onReachEnd: function(swiper) {
770        $('#swiper-left').css('width','15%');
771        console.log($('#swiper-left').css('width'));
772        //alert('jetzt kommt Werbung')
773      },
774      onTransitionEnd: function (sw) {
775        visible_ad.sp = $("#" + galId + " .swiper-wrapper .swiper-slide-prev").data("hash");
776        visible_ad.sn = $("#" + galId + " .swiper-wrapper .swiper-slide-next").data("hash");
777      },
778      onSlideNextStart: function (sw) {
779        if(sw.user_interaction === true){
780          window.dfv_iom_rpl();
781          if (typeof window.sp_track_virtual_page_view === 'function') {
782            window.sp_track_virtual_page_view(galId, url, galtitle);
783          }
784          window.dfv_ga_vpageview(url, galtitle);
785          ct_clicks++;
786          adReturn   = checkAdvertisement(sw, ct_clicks, adIDs, adIterator, 'next', galId);
787          ct_clicks  = adReturn[0];
788          adIterator = adReturn[1];
789          //sw.stopPropagation();
790        }
791      },
792      onSlidePrevStart: function (sw) {
793        if(sw.user_interaction === true){
794          window.dfv_iom_rpl();
795          if (typeof window.sp_track_virtual_page_view === 'function') {
796            window.sp_track_virtual_page_view(galId, url, galtitle);
797          }
798          window.dfv_ga_vpageview(url, galtitle);
799          ct_clicks++;
800          adReturn   = checkAdvertisement(sw, ct_clicks, adIDs, adIterator, 'prev', galId);
801          ct_clicks  = adReturn[0];
802          adIterator = adReturn[1];
803          //sw.stopPropagation();
804        }
805      },
806      onTouchStart(sw){
807        sw.user_interaction = true;0
808      }
809
810    });
811  });
812
813  $(".MediaGallery_slideArrowRight").css('opacity','1');
814  $(".MediaGallery_slideRight").on("click touchstart swipe", function () {
815    $(".MediaGallery_slideArrowRight").css('opacity','');
816  });
817}
818
819function initFullWidthGallery() {
820
821    $('.MediaGalleryFullWidth').each(function(index){
822        var galId = $(this).attr('id');
823        var url   = $(this).data('url');
824        var galtitle   = $(this).data('title');
825
826        var close = $(this).data('close');
827        var divid = $(this).parent().attr('id');
828
829        //var adid = $("#"+galId).data("adid");
830        var adIDs = $("#"+galId).data("adids");
831        var adReturn = [];
832        var ct_clicks = 0;
833        var adIterator = 0;
834
835        galleryTopfw[index] = new Swiper ('#' + galId + ' .swiper-container.gallery-top-fw', {
836            direction:           'horizontal',
837            loop:                true,
838            autoplay:            5000,
839            speed:               1000,
840            spaceBetween:        0,
841            nextButton:          '.swiper-button-next',
842            prevButton:          '.swiper-button-prev',
843            keyboardControl:     true,
844            observer:            true,
845            observeParents:      true,
846            hashnav:             false,
847            centeredSlides:      true,
848            slideToClickedSlide: true,
849            runCallbacksOnInit: false,
850            autoHeight: (window.innerWidth > 768) ? false : true,
851            //setTransform(slide,'translate3d('+(20)+'px,0,0)'),
852            onReachEnd: function(swiper) {
853                $('#swiper-left').css('width','15%');
854                        //alert('jetzt kommt Werbung')
855            },
856            onTransitionEnd: function (sw) {
857              visible_ad.sp = $("#" + galId + " .swiper-wrapper .swiper-slide-prev").data("hash");
858              visible_ad.sn = $("#" + galId + " .swiper-wrapper .swiper-slide-next").data("hash");
859            },
860          onSlideNextStart: function(sw){
861            if(sw.user_interaction === true){
862              window.dfv_iom_rpl();
863              if (typeof window.sp_track_virtual_page_view === 'function') {
864                window.sp_track_virtual_page_view(galId, url, galtitle);
865              }
866              window.dfv_ga_vpageview(url, galtitle);
867              ct_clicks++;
868              adReturn   = checkAdvertisement(sw, ct_clicks, adIDs, adIterator, 'next', galId);
869              ct_clicks  = adReturn[0];
870              adIterator = adReturn[1];
871              //sw.stopPropagation();
872            }
873          },
874          onSlidePrevStart: function(sw){
875            if(sw.user_interaction === true){
876              window.dfv_iom_rpl();
877              if (typeof window.sp_track_virtual_page_view === 'function') {
878                window.sp_track_virtual_page_view(galId, url, galtitle);
879              }
880              window.dfv_ga_vpageview(url, galtitle);
881              ct_clicks++;
882              adReturn   = checkAdvertisement(sw, ct_clicks, adIDs, adIterator, 'prev', galId);
883              ct_clicks  = adReturn[0];
884              adIterator = adReturn[1];
885              //sw.stopPropagation();
886            }
887          },
888          onTouchStart(sw){
889            sw.user_interaction = true;
890          }
891
892        });
893    });
894}
895
896function initCards() {
897  $('.card-collapse').on('click',(function(e) {
898    var me = $(this);
899    $('.card-collapse.open').not(this).removeClass('open');
900    me.toggleClass('open');
901  }));
902  $('.card-collapse').on('click','a',(function(e) {
903    //e.stopImmediatePropagation();
904    console.log('offa');
905    console.log($(this));
906    $(this).trigger('click');
907  }));
908}
909
910
911
912// __________________________________________________
913//
914//
915//			!Check Idle Time Mobile
916
917var timeoutID;
918
919function goInactive() {
920    if($('body').scrollTop() > 0) {
921      $('body').addClass('idle');
922    }
923    
924    $('.modal').addClass('idle');
925}
926 
927function goActive() {
928    $('body.idle').removeClass('idle');
929    $('.modal.idle').removeClass('idle');
930    startTimer();
931}
932 
933function resetTimer(e) {
934    window.clearTimeout(timeoutID);
935    goActive();
936}
937 
938function startTimer() {
939    // wait 2 seconds before calling goInactive
940    timeoutID = window.setTimeout(goInactive, 2000);
941}
942
943
944function make_square(element) {
945//   var cw = $(element).width();
946//   $(element).css({'height':cw+'px'});
947}
948
949
950
951
952
953 
954function setupIdle() {
955    this.addEventListener("mousemove", resetTimer);
956    this.addEventListener("mousedown", resetTimer);
957    this.addEventListener("keypress", resetTimer);
958    this.addEventListener("DOMMouseScroll", resetTimer);
959    this.addEventListener('mousewheel', resetTimer, {passive: true});
960    this.addEventListener("touchmove", resetTimer);
961    this.addEventListener("touchstart", resetTimer);
962    this.addEventListener("MSPointerMove", resetTimer);
963 
964    startTimer();
965}
966
967function initNewsletterBoxTheSpin() {
968  if ( $('.NLSpinBox') ) {
969    $('.NLSpinBox').css('bottom', '0');
970    $('.NLSpinBox').css('height', '0');
971    $('.NLSpinBox').delay(4000).css('display', 'block').animate({height: "210px"}, 500);
972
973    $('.NLSpinBox_close').click(function() {
974      $(".NLSpinBox").slideToggle(600, function() {
975       // Animation beendet
976      });
977    });
978  }
979}
980
981function createYoutubeApi() {
982  var tag = document.createElement('script');
983  tag.src = "https://www.youtube.com/iframe_api";
984  var firstScriptTag = document.getElementsByTagName('script')[0];
985  firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
986}
987
988$(document).ready(function(){
989//  $("a[href=#]").click(function(e) {
990//    e.preventDefault();
991//  });
992//  if (md.mobile() != null) {
993//    $('body').addClass('is-mobile');   
994//  }; 
995//  if (md.phone() != null) {
996//     $('.stage-fashion > .row > .col-sm-4').slice(-2).remove();
997//  }
998  initSearchToggle();
999  setupIdle();
1000  initStickyColumn();  
1001  initAsideNav();
1002  initMobileNav();
1003  preventEmptySearch();
1004  initLightbox();
1005  initCards();
1006  initNewsletterSelect();
1007  initGallery();
1008  initFullWidthGallery();
1009  initNewsletterBoxTheSpin();
1010  createYoutubeApi();
1011
1012  $('.ImageModal').colorbox({iframe:false, opacity: 0.8, maxWidth:'95%', maxHeight:'95%'});
1013
1014  // mobile Navigation Flyout
1015  $(".NavigationFlyout_toggleButton").on('click',function(e){
1016    e.preventDefault();$('.NavigationFlyout').toggleClass('isActive');
1017  });
1018  
1019  // mobile Navigation Flyout
1020  $(".NavigationMobile_toggle").on('click',function(e){
1021    e.preventDefault();$('.NavigationMobile').toggleClass('isActive');
1022    $('body').toggleClass('isFixed');
1023  });
1024  
1025  $('.paneltop').click( function() {
1026    $(this).css({"background-position":"0px -21px"})
1027    .siblings().animate({"height":"100px"}, 200)
1028  }, function() {
1029    $(this).css({"background-position":"0px 0px"})
1030    .siblings().animate({"height":"0px"}, 200);
1031  })
1032
1033   // Bilder quadratisieren
1034   $( '.to-be-squared .teaser-image' ).each(function( index ) {
1035      make_square($(this));
1036   });
1037   
1038  // Login-Popup/Logout-Popup
1039  var accountBtn = $(".NavigationMeta_item-account");
1040  var accountBtnLink = $(".NavigationMeta_item-account .NavigationMeta_itemLink");
1041  var loginPanel = $(".NavigationMeta .FormLoginPopup");
1042  var logoutPanel = $(".NavigationMeta .FormLogoutPopup");
1043  var panel = accountBtn.hasClass('isSignedOut') ? loginPanel : logoutPanel;
1044  var panel_input = $(".NavigationMeta .FormLoginPopup input");
1045
1046  function showPanel(selector, a) {
1047    selector.css('visibility', 'visible');
1048    a.addClass('isActive');
1049  }
1050  function hidePanel(selector, a) {
1051    selector.removeAttr('style');
1052    a.removeClass('isActive');
1053  }
1054
1055  $(".NavigationMeta .FormLoginPopup .FormField_icon").click(function() {
1056    $('.NavigationMeta .FormLoginPopup .FormField_control').trigger('click');
1057  });
1058
1059  accountBtn.click(function(e) {
1060    e.preventDefault();
1061  });
1062
1063  accountBtn.mouseover( function() { showPanel(panel, accountBtn); } );
1064  accountBtn.mouseout( function() { hidePanel(panel, accountBtn); } );
1065  panel.mouseover( function() { showPanel(panel, accountBtn); } );
1066  panel.mouseout( function() {
1067    if ( !panel_input.is(":focus") ) {
1068      hidePanel(panel, accountBtn);
1069    }
1070  });
1071
1072});
1073
1074// quadratische Bildergrößen beim Fenster-Verkleinern neu berechnen
1075$( window ).resize(function() {
1076   $( '.to-be-squared .teaser-image' ).each(function( index ) {
1077      make_square($(this));
1078   });
1079});
1080
1081function manage_input_active_state(selector) {
1082  $(selector).each(function() {
1083    if ( $(this).val() ) {
1084      $(this).addClass('FormField_control-filled');
1085    }
1086    $(this).change(function() {
1087      if ( $(this).val() ) {
1088        $(this).addClass('FormField_control-filled');
1089      }
1090      if ( $(this).val() === '' ) {
1091        $(this).removeClass('FormField_control-filled');
1092      }
1093    });
1094  });
1095}
1096
1097manage_input_active_state(".FormField_control:not([type='submit'])");
1098manage_input_active_state(".FormField_controlGroupField:not([type='submit'])");
1099
1100function handle_tooltip(target, tooltip_class) {
1101  tooltip = tooltip_class === undefined ? $('.Tooltip') : $(tooltip_class);
1102  target = $(target);
1103  target.on('mouseenter', 'a', function() {
1104    target + tooltip.show();
1105    target.on('mouseout', function() {
1106      target + tooltip.fadeOut();
1107    });
1108  });
1109};
1110
1111handle_tooltip('.StageLeadPremium_title');
1112handle_tooltip('.StageLeadPremium_title');
1113
1114(()=>{var __webpack_modules__={768:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>Embed});var _module__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(631),_utils_sendRequest__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(58),_utils_adBlockCheck__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(173),_tracking_module__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(558);function _await(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function _empty(){}function _invokeIgnored(e){var t=e();if(t&&t.then)return t.then(_empty)}function _async(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}function _awaitIgnored(e,t){if(!t)return e&&e.then?e.then(_empty):Promise.resolve()}function _invoke(e,t){var n=e();return n&&n.then?n.then(t):t(n)}function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach((function(t){_defineProperty(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var loadAutoplayList=_async((function(e,t,n,i){var o;return _invoke((function(){if(e.fallbackElementsPromise)return _awaitIgnored(e.fallbackElementsPromise)}),(function(){var a,r=null===(a=e.fallbackElements)||void 0===a?void 0:a.length;return _await(r?e.fallbackElements.map((function(e){return _objectSpread(_objectSpread({},e),{},{fallback_id:e.id})})):new Promise((function(n){(0,_utils_sendRequest__WEBPACK_IMPORTED_MODULE_1__.w)("https://api.embed.pinpoll.com/autoplay/nextEmbeds",{elementId:t,url:e.url,topic:e.topic},window.Pinpoll.storage).then((function(e){return e.json()})).then((function(t){var o;return n(null===(o=window.Pinpoll.embed)||void 0===o?void 0:o.sortPreferredAutoEmbeddedElements(t.elements,e,i))})).catch((function(e){console.log("Pinpoll: error during fetching autoplay polls",e),n([])}))})),(function(e){var t;return o=e,n&&(o=null===(t=o)||void 0===t?void 0:t.slice(0,n)),o}),r)}))})),Embed=function(){function Embed(e,t,n){var i=this;if(_classCallCheck(this,Embed),_defineProperty(this,"targetWindow",void 0),_defineProperty(this,"lazyLoading",void 0),_defineProperty(this,"type",void 0),_defineProperty(this,"id",void 0),_defineProperty(this,"iframe",void 0),_defineProperty(this,"element",void 0),_defineProperty(this,"mode",void 0),_defineProperty(this,"data",void 0),_defineProperty(this,"loaded",!1),_defineProperty(this,"instance",void 0),_defineProperty(this,"questionViewTriggered",!1),_defineProperty(this,"url",void 0),_defineProperty(this,"autoplay",null),_defineProperty(this,"nativeAd",null),_defineProperty(this,"pendings",{}),_defineProperty(this,"pendingPostMessages",[]),_defineProperty(this,"loadDataSet",!1),_defineProperty(this,"widgetIndex",void 0),_defineProperty(this,"stats",void 0),this.element=t,this.targetWindow=e.location,this.type=e.type,this.mode=e.mode,this.data=e,this.stats=n,this.id=generateId(e),this.widgetIndex=window.Pinpoll.embed.initedEmbeds,window.Pinpoll.embed.initedEmbeds+=1,this.lazyLoading="eager"!==e.loading&&"preload"!==e.loading,this.data.native)return this.loadNative(t,e).then((function(t){if(t){t.targetId=i.id,i.instance=t,i.instance.promises.preload?i.instance.promises.preload.then((function(){return i.stats.markLoad()})):i.stats.markLoad();var n=!1;i.instance.on("poll:initialized","global.js - statTracker",(function(){var e;n||(n=!0,i.stats.markRender(),i.stats.observeImpression((null===(e=i.instance)||void 0===e?void 0:e.container)||i.element))})),i.instance.on("poll:initialized","global.js",(function(){var n,o;t.elementId&&(e.id=+t.elementId,(0,_tracking_module__WEBPACK_IMPORTED_MODULE_2__.Z)(t.visitorStorage,{widgetIndex:"e"+(null!==(n=null===(o=window.Pinpoll.embed)||void 0===o?void 0:o.embeds.findIndex((function(e){return e===i})))&&void 0!==n?n:0),originPage:e.url,widgetLocation:buildUrl(e,t.targetId||"")}).start())}))}})).catch((function(e){console.error("Pinpoll: error during loading native embed",e)})),void this.registerEventListener();this.iframe=buildIframe(e,this.id),this.lazyLoading?(this.iframe.setAttribute("class","lazyload"),document.addEventListener("lazybeforeunveil",(function e(t){t.target===i.iframe&&((0,_module__WEBPACK_IMPORTED_MODULE_0__.oW)(i.data,i.element),i.url=buildUrl(i.data,i.id),i.iframe.setAttribute("data-src",
1114i.url),i.stats.markLoad(),document.removeEventListener("lazybeforeunveil",e))})),document.addEventListener("lazyloaded",(function e(t){t.target===i.iframe&&(i.loaded=!0,i.stats.markRender(),i.stats.observeImpression(i.iframe),document.removeEventListener("lazyloaded",e))}))):(this.loaded=!0,this.stats.markLoad(),this.url=buildUrl(e,this.id),this.iframe.src=this.url),this.registerEventListener(),t.parentNode===document.getElementsByTagName("head")[0]?document.body.appendChild(this.iframe):t.parentElement?t.parentElement.insertBefore(this.iframe,t):document.body.appendChild(this.iframe),this.lazyLoading||(this.stats.markRender(),this.stats.observeImpression(this.iframe))}return _createClass(Embed,[{key:"loadNative",value:function(e,t){if(!window.Pinpoll.nativeLoader){var n=document.createElement("script");n.async=!0,n.type="module",n.innerHTML="window.Pinpoll.nativeLoader = async (embedElement, options) => {\n                const { createEmbed } = await import('".concat("https://tools.pinpoll.com/embed-v2/main.js?v=1790061720894","');\n                return createEmbed(embedElement, options);\n            }"),document.head.appendChild(n)}return new Promise((function(n){!function i(){if("function"==typeof window.Pinpoll.nativeLoader)return n(window.Pinpoll.nativeLoader(e,t));setTimeout(i,100)}()}))}},{key:"loadNextEmbed",value:function(){if(this.autoplay){var e;this.autoplay.currentIndex=this.autoplay.currentIndex||0;var t=null===(e=this.autoplay.nextAutoplayedElements)||void 0===e?void 0:e[this.autoplay.currentIndex++];t&&this.loadEmbedItem(t)}}},{key:"registerEventListener",value:function(){var e=this;window.addEventListener("message",(function(t){var n,i,o=t.data;try{if("string"==typeof o){if(!o.startsWith("{"))return!1;o=JSON.parse(o)}}catch(e){console.warn(e)}if(o&&"object"===_typeof(o)&&o.action)if("vote"===o.action||"unvote"===o.action)-1!==navigator.appName.indexOf("Internet Explorer")&&-1===navigator.appVersion.indexOf("MSIE 1")&&(o=JSON.stringify(o)),null!==(n=e.iframe)&&void 0!==n&&n.contentWindow||(e.iframe=document.getElementById(e.id)),null===(i=e.iframe.contentWindow)||void 0===i||i.postMessage(o,e.targetWindow);else if(o.target===e.id)switch(o.action){case"get:loaddata":e.setLoadData();break;case"set:height":e.data.height||e.setEmbedHeight(o.value);break;case"get:recaptcha":e.activateRecaptcha(o.top,o.sitekey);break;case"poll-view:finished":e.questionViewTriggered=!0;break;case"autoplay:check":var a;e.initAutoplay(),e.autoplay&&(null===(a=e.autoplay.loadPromise)||void 0===a||a.then((function(){var t,n,i,o;null!==(t=e.autoplay)&&void 0!==t&&null!==(n=t.nextAutoplayedElements)&&void 0!==n&&n.length&&e.autoplay.nextAutoplayedElements[e.autoplay.currentIndex||0]&&(null===(i=e.iframe)||void 0===i||null===(o=i.contentWindow)||void 0===o||o.postMessage({action:"autoplay:ready"},"*"))})));break;case"autoplay:fire":e.loadNextEmbed();break;case"update:visitor":window.Pinpoll.storage.visitor=o.visitor;break;case"native-ad:set":(0,_utils_adBlockCheck__WEBPACK_IMPORTED_MODULE_3__.I)().finally((function(){var t;if(window.Pinpoll.userHasAdblock&&1===(null===(t=o.adConfig)||void 0===t?void 0:t.type))return console.warn("Pinpoll Native Ad: AdBlock detected, no native ad will be shown");e.setNativeAd(o.adTag,o.adConfig),e.nativeAd&&e.pendings.nativeinterstitial&&(e.nativeAd.onInterstitialStart(""+e.pendings.nativeinterstitial),e.pendings.nativeinterstitial=null)}));break;case"interstitial-start":e.nativeAd?e.nativeAd.onInterstitialStart(o.ad.duration):e.pendings.nativeinterstitial=o.ad.duration}}))}}
1114,{key:"setLoadData",value:function(){var e,t=this;if(null!==(e=this.iframe)&&void 0!==e&&e.contentWindow){var n,i,o={embed_url:this.url,visitor:window.Pinpoll.storage.visitor,trackingDone:null===(n=window.Pinpoll.tracking)||void 0===n?void 0:n.requestDone,cookieEnabled:navigator.cookieEnabled,originPage:this.data.url,path:window.location.pathname,fallback_id:this.data.fallback_id,autoplayedElementId:this.data.autoplayedElementId,cssClass:this.data.cssClass,parent_id:this.id,autoplayDelay:this.data.autoplayDelay};for(["consent","targetAds","customURL","ppId"].forEach((function(e){t.data[e]&&(o[e]=t.data[e])})),window.Pinpoll.appName&&(o.app=window.Pinpoll.appName),this.loadDataSet||void 0===this.widgetIndex||(o.widgetIndex="e"+this.widgetIndex),null===(i=this.iframe)||void 0===i||i.contentWindow.postMessage({action:"set:loaddata",data:o},"*"),this.loadDataSet=!0;this.pendingPostMessages.length;){var a=this.pendingPostMessages.shift();a&&this.postMessage(a)}}}},{key:"setNativeAd",value:function setNativeAd(adTag,adConfig){var _this4=this;if(adTag)if(this.nativeAd)this.nativeAd.handle("reinitialized",{adTag,adConfig})||this.nativeAd.show();else{var _ref,_this$instance2,container=document.createElement("div");container.setAttribute("style","position:relative;"),null===(_ref=this.iframe||(null===(_this$instance2=this.instance)||void 0===_this$instance2?void 0:_this$instance2.container))||void 0===_ref||_ref.after(container);var script=document.createElement("script");script.adData={config:adConfig,embed:this},script.innerText=adTag,container.append(script),this.nativeAd={script,container,handle:function handle(handlerName,params){return!!_this4.nativeAd&&!!_this4.nativeAd.script.adData.config[handlerName]&&(eval(String(_this4.nativeAd.script.adData.config[handlerName]))(params),!0)},hide:function(){_this4.nativeAd&&(_this4.nativeAd.handle("hide")||(_this4.nativeAd.container.style.visibility="hidden"),_this4.nativeAd.handle("hidden"))},show:function(){_this4.nativeAd&&(_this4.nativeAd.handle("show")||(_this4.nativeAd.container.style.visibility="visible"),_this4.nativeAd.handle("shown"))},onInterstitialStart:function(e){var t,n,i;null!==(t=_this4.nativeAd)&&void 0!==t&&t.handle("interstitialStart",{duration:e})||(null===(i=_this4.nativeAd)||void 0===i||i.hide(),setTimeout((function(){var e,t,n;(null===(e=_this4.nativeAd)||void 0===e?void 0:e.handle("interstitialStop"))||null===(t=_this4.nativeAd)||void 0===t||t.show(),null===(n=_this4.nativeAd)||void 0===n||n.handle("interstitialStopped")}),1e3*+e)),null===(n=_this4.nativeAd)||void 0===n||n.handle("interstitialStarted")}},this.nativeAd.handle("initialized",{adConfig})}}},{key:"loadEmbedItem",value:function(e){var t,n;this.iframe&&e&&(this.data.id=e.element_id,e.id&&(this.data.fallback_id=e.id),e.element_id&&(this.data.autoplayedElementId=e.element_id),e.custom_design_id&&(this.data.design=e.custom_design_id),null===(t=this.nativeAd)||void 0===t||t.hide(),this.id=generateId(this.data),this.url=buildUrl(this.data,this.id),null===(n=this.iframe)||void 0===n||n.setAttribute("id",this.id),this.iframe.src=this.url)}},{key:"setEmbedHeight",value:function(e){if(e&&parseFloat(e)){var t=document.getElementById(this.id);t&&(t.setAttribute("height",e),t.setAttribute("style","display:block;height:".concat(parseFloat(e),"px!important;")))}}},{key:"activateRecaptcha",value:function(e,t){var n=this,i=function(e){var i,o,a,r,l,s=document.createElement("div"),d=document.createElement("div");window.grecaptcha.render(d,{sitekey:t,callback:function(e){var t,i;null===(t=n.iframe)||void 0===t||null===(i=t.contentWindow)||void 0===i||i.postMessage({action:"recaptcha:success",response:e},n.targetWindow),s.style.opacity="0",s.style.transform="translateY(20px)",window.setTimeout((function(){var e;null==s||null===(e=s.parentNode)||void 0===e||e.removeChild(s)}),400)}}),s.appendChild(d),s.setAttribute("style","-webkit-transition:opacity .4s,-webkit-transform .4s;transition:opacity .4s,-webkit-transform .4s;transition:opacity .4s,transform .4s;transition:opacity .4s,transform .4s,-webkit-transform .4s;-webkit-transform:translateY(20px);transform:translateY(20px)"),s.style.position="absolute",s.style.width="".concat(null===(i=n.iframe)||void 0===i?void 0:i.offsetWidth,"px"),s.style.left="".concat(null===(o=n.iframe)||void 0===o?void 0:o.offsetLeft,"px"),s.style.top="".concat((null===(a=n.iframe)||void 0===a?void 0:a.offsetTop)||0+e,"px"),s.style["text-align"]="answer"!=n.type?"center":"left",d.style.display="inline-block",d.style.margin="answer"!=n.type?"0 0 0 12%":"0 0 0 8em",s.style.opacity="0",window.setTimeout((function(){s.style.opacity="1",s.setAttribute("style",s.getAttribute("style").replace("translateY(20px)","translateY(0)"))}),1),null===(r=n.iframe)||void 0===r||null===(l=r.parentNode)||void 0===l||l.insertBefore(s,n.iframe.nextSibling)};if(window.grecaptcha)i(e);
1114else{var o="recaptcha_".concat(this.id),a=document.createElement("script");a.src="https://www.google.com/recaptcha/api.js?onload=".concat(o,"&render=explicit"),a.async=!0,a.defer=!0,window[o]=function(){i(e)},document.head.appendChild(a)}}},{key:"postMessage",value:function(e){var t,n;this.loadDataSet?null===(t=this.iframe)||void 0===t||null===(n=t.contentWindow)||void 0===n||n.postMessage(e,this.targetWindow):this.pendingPostMessages.push(e)}},{key:"initPreload",value:function(){(0,_module__WEBPACK_IMPORTED_MODULE_0__.oW)(this.data,this.element);var e=this.instance;if(e)e.dispatch("poll:initPreload",e);else{var t=_objectSpread(_objectSpread({},this.data),{},{fallbackElementsPromise:void 0});this.postMessage({action:"preload:init",data:t})}"preload"===this.data.loading&&(this.data.loading="eager")}},{key:"reload",value:function(){this.iframe&&(this.iframe.src=buildUrl(this.data,this.id))}},{key:"loadAutoplayedElements",value:function(e){var t=this;this.autoplay&&(this.autoplay.loadPromise=_async((function(){return _invokeIgnored((function(){if(t.autoplay)return _await(loadAutoplayList(t.data,t.autoplay.elementId,e||t.autoplay.limit,t.iframe),(function(e){t.autoplay.nextAutoplayedElements=e,t.data.id||t.loadNextEmbed()}))}))}))())}},{key:"initAutoplay",value:function(){this.autoplay||void 0===this.data.autoplay||(this.autoplay={nextAutoplayedElements:void 0,limit:this.data.autoplay,elementId:this.data.id},this.loadAutoplayedElements())}}]),Embed}();function generateId(e){return"pinpoll_".concat(e.type,"_").concat(e.id,"_").concat(e.mode)}function buildIframe(e,t){var n;switch(e.type){case"quiz":n=500;break;case"answer":n=50;break;default:n=0}var i=document.createElement("iframe");i.setAttribute("title","Pinpoll Widget"),i.setAttribute("frameborder","0"),i.setAttribute("scrolling","no"),i.setAttribute("width","100%"),i.setAttribute("id",t),i.setAttribute("name",window.location.toString()),i.setAttribute("style","display:block; height:"+e.height||0);var o=e.height||n;return o&&i.setAttribute("height",o.toString()),i}function buildUrl(e,t){var n,i=!1,o="";e.styles&&(o+=e.styles),e.height&&(o+="".concat(o.length>0?"&":"","height=").concat(e.height)),e.trackmode&&"preview"===e.trackmode&&(o+="".concat(o.length>0?"&":"","previewMode=1")),e.simulate&&"on"===e.simulate&&(o+="".concat(o.length>0?"&":"","simulate=1")),e.editmode&&"on"===e.editmode&&(o+="".concat(o.length>0?"&":"","editMode=1"),i=!0),e.randomQuestions&&(o+="".concat(o.length>0?"&":"","randomQuestions=1")),e.randomAnswers&&(o+="".concat(o.length>0?"&":"","randomAnswers=1")),"preload"===e.loading&&(o+="".concat(o.length>0?"&":"","preloadMode=1")),e.blockAds&&(o+="".concat(o.length>0?"&":"","blockAds=1")),e.info&&Object.keys(e.info).length&&(o+="".concat(o.length>0?"&":"","info=").concat(encodeURIComponent(JSON.stringify(e.info)))),t&&(o+="".concat(o.length>0?"&":"","parentID=").concat(encodeURIComponent(t)));var a="";if(e.version)return"".concat(e.location,"/embed/").concat(e.version,"?id=").concat(e.id).concat(o?"&".concat(o):"");switch(e.type){case"answer":n="".concat(e.location,"/embed/answer/").concat(e.id).concat(o?"?".concat(o):"");break;default:"result"===e.mode&&(a+="/result"),n="".concat(e.location||"","/").concat(i?"direct/":"","embed/").concat("aipoll"===e.mode?"inspire/":"").concat(e.id).concat(a),e.design&&(n+="/cd/"+e.design),n+=o?"?".concat(o):""}return n}},631:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>g,oW:()=>v});var i=n(768);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var l=["served","loads","renders","impressions"],s=new Set(["url","ppid","class","consent","style","opointdata","rect_data","bis_style"]),d=["target-ads-","_","font-"],c=function(){function e(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:500;o(this,e),r(this,"endpoint",void 0),r(this,"flushDelayMs",void 0),r(this,"url",void 0),r(this,"embedcode",void 0),r(this,"stage",-1),r(this,"sentStage",-1),r(this,"flushTimer",null),r(this,"flushing",!1),r(this,"impressionObserver",void 0),this.endpoint=this.resolveEndpoint(),this.flushDelayMs=i,this.url=n,this.embedcode=this.buildEmbedcode(t),this.registerLifecycleFlush()}var t,n;return t=e,(n=[{key:"markServed",value:function(){this.mark("served")}},{key:"markLoad",value:function(){this.mark("loads")}},{key:"markRender",value:function(){this.mark("renders")}},{key:"markImpression",value:function(){var e=this.stage;this.mark("impressions",!1),this.stage>e&&(null!==this.flushTimer&&(window.clearTimeout(this.flushTimer),this.flushTimer=null),this.flush(!1))}},{key:"observeImpression",value:function(e){var t=this;this.stage>=l.indexOf("impressions")||("IntersectionObserver"in window?(this.impressionObserver||(this.impressionObserver=new IntersectionObserver((function(e){e.forEach((function(e){var n;e.isIntersecting&&e.intersectionRatio>=.5&&(t.markImpression(),null===(n=t.impressionObserver)||void 0===n||n.disconnect())}
1114))}),{threshold:[.5]})),this.impressionObserver.observe(e)):this.markImpression())}},{key:"resolveEndpoint",value:function(){var e="https://api.embed.pinpoll.com";return"".concat(e.replace(/\/+$/,""),"/v3/widget")}},{key:"buildEmbedcode",value:function(e){var t=this,n={};Array.from(e.attributes).sort((function(e,t){return e.name.localeCompare(t.name)})).forEach((function(e){var i=t.normalizeAttrName(e.name);!i||s.has(i)||d.some((function(e){return i.startsWith(e)}))||void 0!==n[i]||(n[i]=e.value)}));var i={};return Object.keys(n).sort().forEach((function(e){i[e]=n[e]})),JSON.stringify(i)}},{key:"normalizeAttrName",value:function(e){return e.startsWith("data-pinpoll-")?e.substring(13):e.startsWith("data-")?e.substring(5):e}},{key:"advance",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=l.indexOf(e);if(!(n<=this.stage)){if(n>this.stage+1)for(var i=this.stage+1;i<n;i++){var o=l[i];console.warn('Pinpoll: automatically marked skipped stage "'.concat(o,'" for embed ').concat(this.embedcode))}this.stage=n,t&&this.scheduleFlush()}}},{key:"scheduleFlush",value:function(){var e=this;this.endpoint&&(null!==this.flushTimer&&window.clearTimeout(this.flushTimer),this.flushTimer=window.setTimeout((function(){e.flushTimer=null,e.flush(!1)}),this.flushDelayMs))}},{key:"hasPending",value:function(){return this.stage>this.sentStage}},{key:"buildPayloadRow",value:function(e,t){var n=function(n){var i=l.indexOf(n);return i>e&&i<=t?1:0};return{url:this.url,embedcode:this.embedcode,served:n("served"),loads:n("loads"),renders:n("renders"),impressions:n("impressions")}}},{key:"flush",value:function(e){var t=this;if(this.endpoint&&this.hasPending()&&!this.flushing){var n=this.stage,i=this.buildPayloadRow(this.sentStage,n);if(i.served+i.loads+i.renders+i.impressions!==0){var o=i;e&&navigator.sendBeacon?navigator.sendBeacon(this.endpoint,new Blob([JSON.stringify(o)],{type:"application/json"}))&&(this.sentStage=Math.max(this.sentStage,n)):(this.flushing=!0,fetch(this.endpoint,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},credentials:"include",keepalive:e,body:JSON.stringify(o)}).then((function(){t.sentStage=Math.max(t.sentStage,n)})).catch((function(){})).finally((function(){t.flushing=!1,t.hasPending()&&t.scheduleFlush()})))}}}},{key:"mark",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.advance(e,t)}},{key:"registerLifecycleFlush",value:function(){var e=this;window.addEventListener("pagehide",(function(){return e.flush(!0)})),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e.flush(!0)}))}}])&&a(t.prototype,n),e}();function u(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=p(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){l=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(l)throw a}}}}function p(e,t){if(e){if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var m={1:"poll",2:"quiz",6:"personality_test"};function h(e){var t,n,i=e.getAttribute("data-pinpoll-location")||e.getAttribute("data-location")||"https://embed.pinpoll.com",o=e.getAttribute("data-design");return{type:e.getAttribute("data-pinpoll-type")||e.getAttribute("data-type")||"poll",aiPollMode:"aipoll"===e.getAttribute("data-mode"),version:e.getAttribute("data-version"),native:null!==e.getAttribute("data-native")||"v2"===e.getAttribute("data-version"),mode:e.getAttribute("data-pinpoll-mode")||e.getAttribute("data-mode")||"poll",location:i,trackmode:e.getAttribute("data-pinpoll-trackmode")||e.getAttribute("data-trackmode")||"default",editmode:e.getAttribute("data-pinpoll-editmode")||e.getAttribute("data-editmode")||"default",simulate:e.getAttribute("data-pinpoll-simulate")||e.getAttribute("data-simulate")||"default",id:parseInt(e.getAttribute("data-pinpoll-id")||e.getAttribute("data-id"),10)||0,height:parseInt(e.getAttribute("data-pinpoll-height")||e.getAttribute("data-height"),10)||0,label:e.getAttribute("data-pinpoll-label")||e.getAttribute("data-label")||"",bgcolor:e.getAttribute("data-pinpoll-bgcolor")||e.getAttribute("data-bgcolor")||"#2395a6",styles:function(){var t,n=/data(?:-pinpoll)?-style-(.+)/,i=[],o=u(e.attributes);try{for(o.s();!(t=o.n()).done;){var a=t.value,r=a.name.match(n);r&&i.push("".concat(encodeURIComponent(r[1]),"=").concat(encodeURIComponent(a.value)))}}catch(e){o.e(e)}finally{o.f()}return!!i.length&&i.join("&")}(),loading:e.getAttribute("data-loading")||!1,design:o?+o:null,randomQuestions:null!==e.getAttribute("random-questions"),randomAnswers:null!==e.getAttribute("random-answers"),forceLoad:null!==e.getAttribute("force-load"),cssClass:null===(t=e.getAttribute("data-css-class"))||void 0===t?void 0:t.trim(),customURL:null===(n=e.getAttribute("data-url"))||void 0===n?void 0:n.trim(),url:e.getAttribute("data-url")||(window.location.origin||"unknown_origin")+window.location.pathname,info:e.getAttributeNames().reduce((function(t,n){return n.startsWith("data-info-")&&(t[n.substring(10)]=e.getAttribute(n)),t}),{}),targetAds:e.getAttributeNames().reduce((function(t,n){return n.startsWith("data-target-a
1114ds-")&&(t[n.substring(16)]=e.getAttribute(n)),t}),{}),autoplay:[null,"false"].includes(e.getAttribute("data-autoplay"))?void 0:+(e.getAttribute("data-autoplay")||0),autoplayDelay:[null,""].includes(e.getAttribute("data-autoplay-delay"))?void 0:+(e.getAttribute("data-autoplay-delay")||0),mqeDelay:[null,""].includes(e.getAttribute("data-mqe-delay"))?void 0:+(e.getAttribute("data-mqe-delay")||0),blockAds:![null,"false","0"].includes(e.getAttribute("data-block-ads")),topic:e.getAttribute("data-topic"),ppId:e.getAttribute("data-ppid"),consent:e.getAttribute("data-consent"),muteVoted:![null,"false","0"].includes(e.getAttribute("data-mute-voted"))}}function v(e,t){var n,i=h(t);Object.assign(e,i,{id:i.id||e.id,design:null!==(n=i.design)&&void 0!==n?n:e.design})}const g=function(){return{embeds:[],initedEmbeds:0,fallbackElementsPromise:{},isElementAlreadyEmbedded:function(e,t,n){var i=t?m[t]:null;try{var o=['[data-pinpoll-id="'.concat(e,'"]'),'script[data-location*="'.concat(n||"pinpoll.com",'"][data-id="').concat(e,'"]')],a=i?o.map((function(e){return"".concat(e,":not([data-type]), ").concat(e,'[data-type="').concat(i,'"]')})).join(", "):o.join(", ");return!!document.body.querySelector(a)||!!this.embeds.find((function(t){var n,i,o;return(null===(n=t.data)||void 0===n?void 0:n.id)===e&&("poll"===(null===(i=t.data)||void 0===i?void 0:i.type)||"aipoll"===(null===(o=t.data)||void 0===o?void 0:o.type))}))}catch(e){return!1}},isAnyElementEmbedded:function(){return!!this.embeds.find((function(e){return"aipoll"!==e.mode}))||!!document.body.querySelector('[data-pinpoll-id]:not([data-mode="aipoll"]), script[data-location*="'.concat("pinpoll.com",'"][data-id]'))},getElementVotedStatus:function(e){var t,n,i=e.questions,o=e.multiple_vote_interval,a=null===(t=window.Pinpoll)||void 0===t||null===(n=t.storage)||void 0===n?void 0:n.votes;if(i&&a){var r=a.filter((function(e){return i.includes(e.question_id)}));if(null!=r&&r.length)return!o||r.find((function(e){return e.voted_at+o>(new Date).getTime()}))?2:1}return 0},sortPreferredAutoEmbeddedElements:function(e,t,n){var i=this,o=t.location,a=t.muteVoted,r=t.height,l=[];if(e){var s,d;if(l=e.filter((function(e){return!i.isElementAlreadyEmbedded(e.element_id,e.type_id,o)})),null!==(s=window.Pinpoll)&&void 0!==s&&s.appName&&(l=l.filter((function(e){return 1===e.type_id&&2===e.max_answers}))),null!==(d=window.Pinpoll)&&void 0!==d&&d.heightFilterActive&&r){var c=n&&n.parentNode!==document.getElementsByTagName("head")[0]&&n.parentElement?n.clientWidth:document.body.clientWidth;l=l.filter((function(e){try{var t=JSON.parse(e.height),n=Math.max.apply(Math,function(e){if(Array.isArray(e))return f(e)}(i=Object.keys(t).map(Number).filter((function(e){return e<=c})))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||p(i)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());if(t[n])return parseInt(t[n])<=r}catch(e){return!1}var i}))}a?l=l.filter((function(e){return 2!==i.getElementVotedStatus(e)})):l.length&&void 0===l[0].sort&&(l=l.sort((function(e,t){var n=i.getElementVotedStatus(e),o=i.getElementVotedStatus(t);return n===o?0:n<o?-1:1})))}return l},getFallbackElements:function(e,t){var n=t+e;if(!this.fallbackElementsPromise[n]){var i={url:e};t&&(i.topic=t),this.fallbackElementsPromise[n]=fetch("https://api.embed.pinpoll.com/aipolls/search?"+new URLSearchParams(i),{method:"GET"}).then((function(e){return e.json()})).then((function(e){return e})).catch((function(e){console.log("Pinpoll: error during fetching aipolls",e)}))}return this.fallbackElementsPromise[n]},initEmbed:function(e){var t=this;if(!this.embeds.find((function(t){return t.element===e}))){var n=h(e),o=new c(e,n.url);e.classList.add("loaded"),o.markServed(),n.id&&!n.native?this.embeds.push(new i.Z(n,e,o)):new Promise((function(t){"eager"!==n.loading&&"preload"!==n.loading?(e.classList.add("lazyload"),new Promise((function(t){document.addEventListener("lazybeforeunveil",(function(n){n.target===e&&t()}))})).finally((function(){t()}))):t()})).then((function(){v(n,e),n.native?t.embeds.push(new i.Z(n,e,o)):n.aiPollMode||n.topic?n.forceLoad||!t.isAnyElementEmbedded()?new Promise((function(e){n.aiPollMode?(o.markLoad(),fetch("https://api.embed.pinpoll.com/aipolls/first?"+new URLSearchParams({url:n.url}),{method:"GET"}).then((function(e){return e.json()})).then((function(t){n.id=t.id,e()})).catch((function(t){console.log("Pinpoll: error during fetching aipoll",t),e()}))):e()})).finally((function(){n.id?t.embeds.push(new i.Z(n,e,o)):(n.aiPollMode&&!n.topic||!n.aiPollMode&&n.topic)&&(o.markLoad(),n.fallbackElementsPromise=t.getFallbackElements(n.url,n.topic).then((function(a){var r,l=a.elements;n.fallbackElements=t.sortPreferredAutoEmbeddedElements(l,n,e);var s=null===(r=n.fallbackElements)||void 0===r?void 0:r.shift();s?(n.id=s.element_id,!n.design&&s.custom_design_id&&(n.design=s.custom_design_id),n.fallback_id=s.id,t.embeds.push(new i.Z(n,e,o))):console.log("Pinpoll: no suitable element found for",e)})))})):console.log("Pinpoll: not embedding as another element is already embedded",e):console.log("Pinpoll: no id or data specified for element",e)}))}},start:function(){var e=this;window.MutationObserver=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;var t=function(){var t,n=u(document.querySelectorAll("div[data-pinpoll-id]:not(.loaded), div.pinpoll:not(.loaded)"));try{for(n.s();!(t=n.n()).done;){var i=t.value;e.initEmbed(i)}}catch(e){n.e(e)}finally{n.f()}};t();var n=window.setInterval((function(){t()}),500);window.MutationObserver&&(window.setTimeout((function(){window.clearInterval(n)}),1e4),new window.MutationObserver((function(t){t.forEach((function(t){var n,i=u(t.addedNodes);try{for(i.s();!(n=i.n()).done;){var o=n.value;o.matches&&o.matches("div[data-pinpoll-id]:not(.loaded), div.pinpoll:not(.loaded)")&&e.initEmbed(o)}}catch(e){i.e(e)}finally{i.f()}}))})).observe(document,{childList:!0,subtree:!0}))},broadcast:function(e){var t,n=u(this.embeds);try{for(n.s();!(t=n.n()).done;)t.value.postMessage(e)}catch(e){n.e(e)}finally{n.f()}}}}},726:()=>{function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function t(t){for(var i=1;i<arguments.length;i++){var o=null!=arguments[i]?arguments[i]:{};
1114i%2?e(Object(o),!0).forEach((function(e){n(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e){var t=window.Pinpoll.storage.votes;t||(t=[]),-1===t.findIndex((function(t){return t.answer_id===e.answer_id&&t.voted_at===e.voted_at}))&&t.push(e),window.Pinpoll.storage.votes=t}window.addEventListener("message",(function(e){var n=e.data;try{if("string"==typeof n){if(!n.startsWith("{"))return!1;n=JSON.parse(n)}}catch(e){console.warn(e)}var a=function(t){e.source&&e.source.postMessage(t,e.origin)};if(n&&"object"===i(n)&&n.action)switch(n.action){case"get:visitor-votes":a({action:"return:visitor-votes",data:window.Pinpoll.storage.votes.map((function(e){return t(t({},e),{},{justVoted:!!window.Pinpoll.votelinkVotes.find((function(t){return t.answer_id===e.answer_id&&t.voted_at===e.voted_at}))})}))});break;case"add:visitor-vote":o(n.data);break;case"remove:visitor-vote":var r=window.Pinpoll.storage.votes,l=n.data,s=l.questionId,d=l.answerId;if(r){var c=r.filter((function(e){return(e.question_id||e.poll_id)!==s||e.answer_id!==d}));window.Pinpoll.storage.votes=c}break;case"remove:visitor-vote-element":var u=window.Pinpoll.storage.votes,p=n.data.questionIds;if(u){var f=u.filter((function(e){return!p.some((function(t){return t===e.question_id}))}));window.Pinpoll.storage.votes=f}break;case"add":var m=n.key;if(!m)break;var h=window.Pinpoll.storage[m];if(!h)break;if(!(h instanceof Array))break;h.push(n.value),window.Pinpoll.storage[m]=h;break;case"get":var v=n.key;if(!v)break;a({action:"return:"+v,data:{key:v,value:window.Pinpoll.storage[v]}})}return null})),function(){var e=new URL(window.location.href),t=e.searchParams.get("pinpoll_votes");if(t){var n;try{n=JSON.parse(t)}catch(e){console.warn("Pinpoll: Failed parsing pinpoll_votes GET parameter")}n&&n instanceof Array&&n.forEach((function(e){o(e),window.Pinpoll.votelinkVotes.push(e)}));try{e.searchParams.delete("pinpoll_votes"),window.history.pushState({},document.title,e.toString())}catch(e){}}}()},558:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var i=n(38),o=n(58),a=n(173);function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=function(e,t){var n=t||{},d=n.widgetIndex,c=n.originPage,u=n.widgetLocation,p={},f=(0,i.G)({BASE_DOMAIN:"pinpoll.com",CDN_ENDPOINT:"https://static.pinpoll.com",API_ENDPOINT:"https://pa.pinpoll.com/v1",cookiesEnabled:function(){if(navigator.cookieEnabled)return!0;document.cookie="cookietest=1";var e=-1!==document.cookie.indexOf("cookietest=");return document.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",e}(),thirdPartyCookiesEnabled:!1,tcfApi:{},requestSent:!1,requestDone:!1,start:function(e){"loading"===document.readyState?document.addEventListener("DOMContentLoaded",m):m(),e&&(p=e)}});function m(){window.setTimeout((function(){Promise.all([(0,a.I)(),window.location.hostname.match(f.BASE_DOMAIN)?Promise.resolve():new Promise((function(e){try{var t=document.createElement("iframe");t.style.display="none",t.title="Pinpoll Third Party Cookie Test",t.src="".concat(f.CDN_ENDPOINT,"/static/start.html"),window.addEventListener("message",(function(t){"MM:3PCunsupported"===t.data?f.thirdPartyCookiesEnabled=!1:"MM:3PCsupported"===t.data&&(f.thirdPartyCookiesEnabled=!0),e()}),!1),document.body.appendChild(t),window.setTimeout((function(){t.remove(),e()}),5e3)}catch(t){f.log("Could not check ThirdPartyCookiesEnabled",t),e()}})),window.ppTcString?(f.tcfApi.tcString=window.ppTcString,f.tcfApi.available=!!window.__tcfapi,Promise.resolve()):window.__tcfapi?(f.tcfApi.available=!0,new Promise((function(e){var t=(new Date).getTime();window.__tcfapi("addEventListener",2,(function(n,i){f.tcfApi.responseTime=(new Date).getTime()-t,i?f.tcfApi.tcString=n.tcString:f.log("tcf api responded with error",n),f.tcfApi.timeout||(f.tcfApi.timeout=!1),f.tcfApi.checkFinished=!0,e()})),window.setTimeout((function(){f.tcfApi.checkFinished||(f.tcfApi.timeout=!0,e())}),1e3)}))):(f.tcfApi.available=!1,Promise.resolve())]).then((function(){var t,n;t=u?function(){try{return new URL(u)}catch(e){return f.log("Could not parse widget location",e),document.location}}():document.location,n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1114t%2?l(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({timezone:(new Date).getTimezoneOffset(),adblock:window.Pinpoll.userHasAdblock?1:0,dnt:window.navigator.doNotTrack,cookiesEnabled:f.cookiesEnabled?1:0,localStorageEnabled:v(),thirdPartyCookiesEnabled:f.thirdPartyCookiesEnabled?1:0,referrer:c||document.referrer,title:document.title,tcString:f.tcfApi.tcString,tcfApiAvailable:f.tcfApi.available,location:{hash:t.hash,hostname:t.hostname,pathname:t.pathname,protocol:t.protocol,search:t.search},screen:{width:window.screen.width,height:window.screen.height,colorDepth:window.screen.colorDepth,orientation:window.screen.orientation?window.screen.orientation.type:null},metaTags:h(),widgetIndex:d||""},p),(0,o.w)(f.API_ENDPOINT,n,e).then((function(t){var n,i,o=t.headers.get("PP-Visitor");o&&(e.visitor=o,null===(n=window.Pinpoll)||void 0===n||null===(i=n.embed)||void 0===i||i.broadcast({action:"global:trackingDone",visitor:o}))})).catch((function(e){var t,n;f.log("fetch request failed",e),null===(t=window.Pinpoll)||void 0===t||null===(n=t.embed)||void 0===n||n.broadcast({action:"global:trackingDone"})})).finally((function(){f.requestDone=!0}))}))}))}function h(){var e,t={},n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,l=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){s=!0,a=e},f:function(){try{l||null==n.return||n.return()}finally{if(s)throw a}}}}(document.getElementsByTagName("meta"));try{for(n.s();!(e=n.n()).done;){var i=e.value,o=i.getAttribute("name")||i.getAttribute("property"),a=i.getAttribute("content");if(o&&a&&o.replace(/\s/g,"").length>0){var l=o.trim().toLowerCase(),s=t[l];s?s instanceof Array?t[l].push(a):t[l]=[s,a]:t[l]=a}}}catch(e){n.e(e)}finally{n.f()}return t}function v(){var e="test";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}}return f}},38:(e,t,n)=>{"use strict";function i(e){var t=e;return t.logs=[],t.log=function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];t.logs.push([new Date,n])},t}n.d(t,{G:()=>i})},173:(e,t,n)=>{"use strict";function i(){var e;return void 0!==(null===(e=window.Pinpoll)||void 0===e?void 0:e.userHasAdblock)?Promise.resolve(window.Pinpoll.userHasAdblock):new Promise((function(e){var t=window.setTimeout((function(){var e;null!==(e=window.Pinpoll)&&void 0!==e&&e.userHasAdblock||n(!1)}),1e3),n=function(n){clearTimeout(t),window.Pinpoll=window.Pinpoll||{},window.Pinpoll.userHasAdblock=n,e(n)},i=document.createElement("div");i.innerHTML="&nbsp;",i.style.position="absolute",i.className="native-ad-container mobile-ad js-ad_iframe";try{document.body.appendChild(i)}catch(e){console.log("Could not check Adblock",e),n(!1)}window.setTimeout((function(){n(0===i.offsetHeight),i.remove()}),100)}))}n.d(t,{I:()=>i})},58:(e,t,n)=>{"use strict";function i(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"post",o={Accept:"application/json","Content-Type":"application/json"},a=n.visitor;return a&&(o["PP-Visitor"]=a),fetch(e,{method:i,headers:o,credentials:"include",body:JSON.stringify(t)})}n.d(t,{w:()=>i})},90:e=>{!function(t,n){var i=function(e,t,n){"use strict";var i,o;if(function(){var t,n={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",fastLoadedClass:"ls-is-cached",iframeLoadMode:0,srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};for(t in o=e.lazySizesConfig||e.lazysizesConfig||{},n)t in o||(o[t]=n[t])}(),!t||!t.getElementsByClassName)return{init:function(){},cfg:o,noSupport:!0};var a,r,l,s,d,c,u,p,f,m,h,v,g,b,w,y,_,k,P,A,E,O,S,I,C,T,x,M,N,D,j,z,L,q,R,W,B,U,G,F,V,J,H,K,$=t.documentElement,Z=e.HTMLPictureElement,Y="addEventListener",X=e.addEventListener.bind(e),Q=e.setTimeout,ee=e.requestAnimationFrame||Q,te=e.requestIdleCallback,ne=/^picture$/i,ie=["load","error","lazyincluded","_lazyloaded"],oe={},ae=Array.prototype.forEach,re=function(e,t){return oe[t]||(oe[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")),oe[t].test(e.getAttribute("class")||"")&&oe[t]},le=function(e,t){re(e,t)||e.setAttribute("class",(e.getAttribute("class")||"").trim()+" "+t)},se=function(e,t){var n;(n=re(e,t))&&e.setAttribute("class",(e.getAttribute("class")||"").replace(n," "))},de=function(e,t,n){var i=n?Y:"removeEventListener";n&&de(e,t),ie.forEach((function(n){e[i](n,t)}))},ce=function(e,n,o,a,r){var l=t.createEvent("Event");return o||(o={}),o.instance=i,l.initEvent(n,!a,!r),l.detail=o,e.dispatchEvent(l),l},ue=function(t,n){var i;!Z&&(i=e.picturefill||o.pf)?(n&&n.src&&!t.getAttribute("srcset")&&t.setAttribute("srcset",n.src),i({reevaluate:!0,elements:[t]})):n&&n.src&&(t.src=n.src)},pe=function(e,t){return(getComputedStyle(e,null)||{})[t]},fe=function(e,t,n){for(n=n||e.offsetWidth;n<o.minSize&&t&&!e._lazysizesWidth;)n=t.offsetWidth,t=t.parentNode;return n},me=(V=[],J=F=[],(K=function(e,n){U&&!n?e.apply(this,arguments):(J.push(e),G||(G=!0,(t.hidden?Q:ee)(H)))})._lsFlush=H=function(){var e=J;for(J=F.length?V:F,U=!0,G=!1;e.length;)e.shift()();U=!1},K),he=function(e,t){return t?function(){me(e)}:function(){var t=this,n=arguments;me((function(){e.apply(t,n)}))}},ve=function(e){var t,i,o=function(){t=null,e()},a=function(){var e=n.now()-i;e<99?Q(a,99-e):(te||o)(o)};return function(){i=n.now(),t||(t=Q(a,99))}},ge=(_=/^img$/i,k=/^iframe$/i,P="onscroll"in e&&!/(gle|ing)bot/.test(navigator.userAgent),0,A=0,E=0,O=-1,S=function(e){E--,(!e||E<0||!e.target)&&(E=0)},I=function(e){return null==y&&(y="hidden"==pe(t.body,"visibility")),y||!("hidden"==pe(e.parentNode,"visibility")&&"hidden"==pe(e,"visibility"))},C=function(e,n){var i,o=e,a=I(e);for(v-=n,w+=n,g-=n,b+=n;a&&(o=o.offsetParent)&&o!=t.body&&o!=$;)(a=(pe(o,"opacity")||1)>0)&&"visible"!=pe(o,"overflow")&&(i=o.getBoundingClientRect(),a=b>i.left&&g<i.right&&w>i.top-1&&v<i.bottom+1);return a},x=function(e){var t,i=0,a=o.throttleDelay,r=o.ricTimeout,l=function(){t=!1,i=n.now(),e()},s=te&&r>49?function(){te(l,{timeout:r}),r!==o.ricTimeout&&(r=o.ricTimeout)}:he((function(){Q(l)}),!0);return function(e){var o;(e=!0===e)&&(r=33),t||(t=!0,(o=a-(n.now()-i))<0&&(o=0),e||o<9?s():Q(s,o))}}(T=function(){var e,n,a,r,l,s,u,f,_,k,S,T,x=i.elements;if((p=o.loadMode)&&E<8&&(e=x.length)){for(n=0,O++;n<e;n++)if(x[n]&&!x[n]._lazyRace)if(!P||i.prematureUnveil&&i.prematureUnveil(x[n]))q(x[n]);else if((f=x[n].getAttribute("data-expand"))&&(s=1*f)||(s=A),k||(k=!o.expand||o.expand<1?$.clientHeight>500&&$.clientWidth>500?500:370:o.expand,i._defEx=k,S=k*o.expFactor,T=o.hFac,y=null,A<S&&E<1&&O>2&&p>2&&!t.hidden?(A=S,O=0):A=p>1&&O>1&&E<6?k:0),_!==s&&(m=innerWidth+s*T,h=innerHeight+s,u=-1*s,_=s),a=x[n].getBoundingClientRect(),(w=a.bottom)>=u&&(v=a.top)<=h&&(b=a.right)>=u*T&&(g=a.left)<=m&&(w||b||g||v)&&(o.loadHidden||I(x[n]))&&(c&&E<3&&!f&&(p<3||O<4)||C(x[n],s))){if(q(x[n]),l=!0,E>9)break}else!l&&c&&!r&&E<4&&O<4&&p>
11142&&(d[0]||o.preloadAfterLoad)&&(d[0]||!f&&(w||b||g||v||"auto"!=x[n].getAttribute(o.sizesAttr)))&&(r=d[0]||x[n]);r&&!l&&q(r)}}),N=he(M=function(e){var t=e.target;t._lazyCache?delete t._lazyCache:(S(e),le(t,o.loadedClass),se(t,o.loadingClass),de(t,D),ce(t,"lazyloaded"))}),D=function(e){N({target:e.target})},j=function(e,t){var n=e.getAttribute("data-load-mode")||o.iframeLoadMode;0==n?e.contentWindow.location.replace(t):1==n&&(e.src=t)},z=function(e){var t,n=e.getAttribute(o.srcsetAttr);(t=o.customMedia[e.getAttribute("data-media")||e.getAttribute("media")])&&e.setAttribute("media",t),n&&e.setAttribute("srcset",n)},L=he((function(e,t,n,i,a){var r,l,s,d,c,p;(c=ce(e,"lazybeforeunveil",t)).defaultPrevented||(i&&(n?le(e,o.autosizesClass):e.setAttribute("sizes",i)),l=e.getAttribute(o.srcsetAttr),r=e.getAttribute(o.srcAttr),a&&(d=(s=e.parentNode)&&ne.test(s.nodeName||"")),p=t.firesLoad||"src"in e&&(l||r||d),c={target:e},le(e,o.loadingClass),p&&(clearTimeout(u),u=Q(S,2500),de(e,D,!0)),d&&ae.call(s.getElementsByTagName("source"),z),l?e.setAttribute("srcset",l):r&&!d&&(k.test(e.nodeName)?j(e,r):e.src=r),a&&(l||d)&&ue(e,{src:r})),e._lazyRace&&delete e._lazyRace,se(e,o.lazyClass),me((function(){var t=e.complete&&e.naturalWidth>1;p&&!t||(t&&le(e,o.fastLoadedClass),M(c),e._lazyCache=!0,Q((function(){"_lazyCache"in e&&delete e._lazyCache}),9)),"lazy"==e.loading&&E--}),!0)})),q=function(e){if(!e._lazyRace){var t,n=_.test(e.nodeName),i=n&&(e.getAttribute(o.sizesAttr)||e.getAttribute("sizes")),a="auto"==i;(!a&&c||!n||!e.getAttribute("src")&&!e.srcset||e.complete||re(e,o.errorClass)||!re(e,o.lazyClass))&&(t=ce(e,"lazyunveilread").detail,a&&be.updateElem(e,!0,e.offsetWidth),e._lazyRace=!0,E++,L(e,t,a,i,n))}},R=ve((function(){o.loadMode=3,x()})),B=function(){c||(n.now()-f<999?Q(B,999):(c=!0,o.loadMode=3,x(),X("scroll",W,!0)))},{_:function(){f=n.now(),i.elements=t.getElementsByClassName(o.lazyClass),d=t.getElementsByClassName(o.lazyClass+" "+o.preloadClass),X("scroll",x,!0),X("resize",x,!0),X("pageshow",(function(e){if(e.persisted){var n=t.querySelectorAll("."+o.loadingClass);n.length&&n.forEach&&ee((function(){n.forEach((function(e){e.complete&&q(e)}))}))}})),e.MutationObserver?new MutationObserver(x).observe($,{childList:!0,subtree:!0,attributes:!0}):($.addEventListener("DOMNodeInserted",x,!0),$.addEventListener("DOMAttrModified",x,!0),setInterval(x,999)),X("hashchange",x,!0),["focus","mouseover","click","load","transitionend","animationend"].forEach((function(e){t.addEventListener(e,x,!0)})),/d$|^c/.test(t.readyState)?B():(X("load",B),t.addEventListener("DOMContentLoaded",x),Q(B,2e4)),i.elements.length?(T(),me._lsFlush()):x()},checkElems:x,unveil:q,_aLSL:W=function(){3==o.loadMode&&(o.loadMode=2),R()}}),be=(r=he((function(e,t,n,i){var o,a,r;if(e._lazysizesWidth=i,i+="px",e.setAttribute("sizes",i),ne.test(t.nodeName||""))for(a=0,r=(o=t.getElementsByTagName("source")).length;a<r;a++)o[a].setAttribute("sizes",i);n.detail.dataAttr||ue(e,n.detail)})),l=function(e,t,n){var i,o=e.parentNode;o&&(n=fe(e,o,n),(i=ce(e,"lazybeforesizes",{width:n,dataAttr:!!t})).defaultPrevented||(n=i.detail.width)&&n!==e._lazysizesWidth&&r(e,o,i,n))},{_:function(){a=t.getElementsByClassName(o.autosizesClass),X("resize",s)},checkElems:s=ve((function(){var e,t=a.length;if(t)for(e=0;e<t;e++)l(a[e])})),updateElem:l}),we=function(){!we.i&&t.getElementsByClassName&&(we.i=!0,be._(),ge._())};return Q((function(){o.init&&we()})),i={cfg:o,autoSizer:be,loader:ge,init:we,uP:ue,aC:le,rC:se,hC:re,fire:ce,gW:fe,rAF:me}}(t,t.document,Date);t.lazySizes=i,e.exports&&(e.exports=i)}("undefined"!=typeof window?window:{})}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](n,n.exports,__webpack_require__),n.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var __webpack_exports__={};(()=>{"use strict";const e={embed:null,tracking:null,retargeting:null,remarketing:null,storage:function(){var e={};Object.defineProperty(e,"visitor",{set:function(e){if(window.Pinpoll.embed){var t;try{t=JSON.parse(localStorage.PP_visitor).value}catch(e){t=null}t!==e&&setTimeout((function(){window.Pinpoll.embed.broadcast({action:"set:visitor",visitor:e})}))}try{localStorage.PP_visitor=e&&"null"!==e?JSON.stringify({value:e,expires:(new Date).setDate((new Date).getDate()+30)}):JSON.stringify({value:e,expires:0})}catch(e){console.warn(e)}},get:function(){try{if(!localStorage.PP_visitor)return null;var e=JSON.parse(localStorage.PP_visitor);return e.expires&&e.expires<Date.now()?(delete localStorage.PP_visitor,null):(e.expires=(new Date).setDate((new Date).getDate()+30),localStorage.PP_visitor=JSON.stringify(e),e.value)}catch(e){return console.warn(e),null}}});for(var t=function(){var t=i[n];Object.defineProperty(e,t.id,{set:function(e){try{localStorage[t.key]=JSON.stringify(e)}catch(e){console.warn(e)}},get:function(){try{var e=localStorage[t.key];return e?JSON.parse(e):t.d}catch(e){return console.warn(e),t.d}}})},n=0,i=[{id:"votes",key:"PP_votes",d:[]},{id:"leadForms",key:"PP_forms",d:[]},{id:"lastTriggered",key:"PP_marketing",d:null}];n<i.length;n++)t();try{localStorage.pinpoll_allVisitorVotes&&(localStorage.PP_votes=localStorage.pinpoll_allVisitorVotes,delete localStorage.pinpoll_allVisitorVotes)}catch(e){}return e}(),heightFilterActive:!1,nativeLoader:void 0,votelinkVotes:[],init:function(){var e=document.querySelector("script[src*='pinpoll.com/global.js'][data-app]");e&&(this.appName=e.getAttribute("data-app"))}};window.Pinpoll&&Object.keys(window.Pinpoll).length>0||(window.Pinpoll=e,e.init())})(),(()=>{"use strict";var e=__webpack_require__(558);window.Pinpoll.tracking||(window.Pinpoll.tracking=(0,e.Z)(window.Pinpoll.storage,{widgetIndex:"global"}),window.Pinpoll.tracking.start(window.Pinpoll.appName?{app:window.Pinpoll.appName}:void 0))})(),(()=>{"use strict";var e=__webpack_require__(38),t=__webpack_require__(58);function n(){var e;if(null!==(e=window.Pinpoll)&&void 0!==e&&e.appName)return!0;var t=window.navigator,n=t.userAgent.toLowerCase();return/iphone|ipod|ipad/.test(n)&&!window.MSStream?!t.standalone&&!/safari/.test(n):n.includes("wv")}var i=eval;window.Pinpoll.retargeting||(window.Pinpoll.retargeting=function(o,a){var r,l,s=(0,e.G)({RETARGETING_ENDPOINT:"https://api2.dmp.pinpoll.com",pixelsLoaded:!1,pixels:[],isMobileDevice:(l=!1,r=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(r)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|
1114sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(r.substr(0,4)))&&(l=!0),l),isApp:n(),googleLoaded:!1,trackEmbedEvent:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(s.pixelsLoaded)d(e,n);else{var o=window.location!==window.parent.location?document.referrer:document.location.href;p({referrer:o,questionId:t,leadFormId:i}).then((function(t){s.pixelsLoaded=!0,t&&"success"===t.status&&t.data.length>0&&(s.pixels=t.data),d(e,n)})).catch((function(e){s.log("Retargeting Endpoint not reachable:",e)}))}},triggerPixels:function(e){c(e,!1)}});function d(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=s.pixels.filter((function(n){if(("vote"===e||"vote_click"===e)&&n.answer_id&&(!t.length||!t.includes(n.answer_id)))return!1;if("all"!==n.device_type){if(a&&n.device_type!==a)return!1;if(s.isApp&&"app"!==n.device_type)return!1;if(s.isMobileDevice&&"desktop"===n.device_type)return!1;if(!s.isMobileDevice&&"mobile"===n.device_type)return!1}return n.event===e}));(n=n.filter((function(e,t,n){return t===n.findIndex((function(t){return t.id===e.id}))}))).length&&c(n,!0)}function c(e,n){var a;e&&e.length>0&&(e.forEach((function(e){!function(e){switch(e.type){case"javascript":!function(e,t){e.externalcode?u({src:e.externalcode,async:!0},(function(){e.staticcode&&u({text:e.staticcode}),e.loaded=!0,t()})):e.staticcode?(u({text:e.staticcode}),e.loaded=!0,t()):t()}(e,(function(){e.trigger_code&&i(e.trigger_code)}));break;case"google":!function(e,t,n){if(window.google_trackConversion)window.google_trackConversion&&window.google_trackConversion({google_conversion_id:e,google_conversion_label:t,google_custom_value:n,google_custom_params:window.google_tag_params,google_remarketing_only:!0});else{var i=document.createElement("script");i.src="https://www.googleadservices.com/pagead/conversion_async.js",i.async=!0,i.addEventListener("load",(function(){s.googleLoaded=!0,window.google_trackConversion&&window.google_trackConversion({google_conversion_id:e,google_conversion_label:t,google_custom_value:n,google_custom_params:window.google_tag_params,google_remarketing_only:!0})}),!1),document.body.appendChild(i)}}(e.conversion_id,e.conversion_label,e.custom_value);break;case"facebook":e.event&&(e.group_title=e.event),function(e,t,n){if(function(e,t,n,i,o,a,r){e.fbq||(o=e.fbq=function(){o.callMethod?o.callMethod.apply(o,arguments):o.queue.push(arguments)},e._fbq||(e._fbq=o),o.push=o,o.loaded=!0,o.version="2.0",o.queue=[],(a=t.createElement(n)).async=!0,a.src="https://connect.facebook.net/en_US/fbevents.js",(r=t.getElementsByTagName(n)[0]).parentNode.insertBefore(a,r))}(window,document,"script"),window.fbq){window.fbq("init",e),window.fbq("track","PageView");var i="string"==typeof n&&n.length>0?{customValue:n}:{};window.fbq("trackCustom",t,i)}}(e.facebook_id,e.group_title,e.custom_value);break;case"image":t=e.source,(n=new Image).onload=function(){n.naturalHeight+n.naturalWidth!==0?document.body.appendChild(n):s.log("Error on loadImage: natural height and width === 0")},n.onerror=function(e){s.log(e)},t&&(n.src=t);break;default:s.log("Pixel execution error: no type specified!")}var t,n}(e)})),n&&(a={triggeredPixels:e.map((function(e){return{pixel_id:e.id,campaign_id:e.campaign_id}}))},(0,t.w)(s.RETARGETING_ENDPOINT+"/public/triggered",a,o).then((function(e){return e.json()})).then((function(e){"success"!==e.status&&s.log("Return type of triggered data did not success!",e.data)})).catch((function(e){s.log("Failed to send triggered data!",e)}))))}function u(e,t){var n=document.createElement("script");Object.keys(e).forEach((function(t){n[t]=e[t]})),t&&"function"==typeof t&&n.addEventListener("load",(function(e){t(null,e)}),!1),document.body.appendChild(n)}function p(e){return(0,t.w)(s.RETARGETING_ENDPOINT+"/public/tr",e,o).then((function(e){return e.json()}))}return s}(window.Pinpoll.storage),window.Pinpoll.remarketing=function(n,i){var o=(0,e.G)({RETARGETING_ENDPOINT:"https://api2.dmp.pinpoll.com",REMARKETING_MAX_TRIGGER_TIME:parseInt("MISSING_ENV_VAR".MIX_REMARKETING_MAX_TRIGGER_TIME||"",10)||36e5,start:function(){window.requestIdleCallback?window.requestIdleCallback((function(){a()}),{timeout:3e3}):window.setTimeout((function(){a()}),3e3)}});function a(){var e,a;!(a=i.lastTriggered)||Date.now()-a>o.REMARKETING_MAX_TRIGGER_TIME?(e={referrer:window.location.origin||window.location.hostname},(0,t.w)(o.RETARGETING_ENDPOINT+"/public/remarketing",e,i).then((function(e){return e.json()}))).then((function(e){i.lastTriggered=Date.now(),e.data.length&&n.triggerPixels(e.data)})).catch((function(e){o.log("Failed to send getRemarketingPixels",e)})):o.log("Checked Remarketing; last triggered happened within max trigger time, last triggered at:",i.lastTriggered)}return o.start(),o}(window.Pinpoll.retargeting,window.Pinpoll.storage))})(),(()=>{"use strict";var e=__webpack_require__(631);__webpack_require__(90),__webpack_require__(726),window.Pinpoll.embed||(window.Pinpoll.embed=(0,e.ZP)(),window.Pinpoll.embed.start())})()})();
1115$(document).ready(function() {
1116    /**
1117     * ersetzt das Carousel
1118     * durch ein swipen beim neu Laden der Seite
1119     * in data-ride wird onPageLoad getsetzt
1120     * die Ids des Elements muessen eindeutig sein !!!
1121     */
1122    $.each($("[data-ride]"), function (k, v) {
1123        if ($(this).data('ride') == 'onPageLoad') {
1124            var id = $(this).attr('id');
1125            var store_name = 'onPageLoad' + id;
1126            var stack = [];
1127            var count_elm = $(this).children(".carousel-inner").children(".item").length;            
1128            var random_stack_index = Math.floor(Math.random() * ((count_elm -1) + 1));                
1129            
1130            if (sessionStorage.getItem(store_name)) {
1131                stack = JSON.parse(sessionStorage.getItem(store_name));
1132            }
1133            if (stack.length !== count_elm) {
1134                stack = [];
1135                for (var i = 0; i < count_elm; i++) {
1136                    stack[i] = 0;
1137                }
1138                stack[random_stack_index] = 1;
1139            } else {
1140                stack.unshift('0');
1141                if (stack.pop() == 1) {
1142                    stack[0] = 1;
1143                }
1144            }
1145            $.each($(this).children(".carousel-inner").children(".item"), function (i, x) {
1146                if (stack[i] == 0) {
1147                    $(this).removeClass('active');
1148                } else {
1149                    $(this).addClass('active');
1150                }
1151            })
1152            sessionStorage.setItem(store_name, JSON.stringify(stack));
1153        }
1154    });
vendor: 4,748 bytes, lines 1155-1161
1155});
1156/*!
1157	Colorbox 1.6.3
1158	license: MIT
1159	http://www.jacklmoore.com/colorbox
1160*/
1161(function(t,e,i){function n(i,n,o){var r=e.createElement(i);return n&&(r.id=Z+n),o&&(r.style.cssText=o),t(r)}function o(){return i.innerHeight?i.innerHeight:t(i).height()}function r(e,i){i!==Object(i)&&(i={}),this.cache={},this.el=e,this.value=function(e){var n;return void 0===this.cache[e]&&(n=t(this.el).attr("data-cbox-"+e),void 0!==n?this.cache[e]=n:void 0!==i[e]?this.cache[e]=i[e]:void 0!==X[e]&&(this.cache[e]=X[e])),this.cache[e]},this.get=function(e){var i=this.value(e);return t.isFunction(i)?i.call(this.el,this):i}}function h(t){var e=W.length,i=(A+t)%e;return 0>i?e+i:i}function a(t,e){return Math.round((/%/.test(t)?("x"===e?E.width():o())/100:1)*parseInt(t,10))}function s(t,e){return t.get("photo")||t.get("photoRegex").test(e)}function l(t,e){return t.get("retinaUrl")&&i.devicePixelRatio>1?e.replace(t.get("photoRegex"),t.get("retinaSuffix")):e}function d(t){"contains"in x[0]&&!x[0].contains(t.target)&&t.target!==v[0]&&(t.stopPropagation(),x.focus())}function c(t){c.str!==t&&(x.add(v).removeClass(c.str).addClass(t),c.str=t)}function g(e){A=0,e&&e!==!1&&"nofollow"!==e?(W=t("."+te).filter(function(){var i=t.data(this,Y),n=new r(this,i);return n.get("rel")===e}),A=W.index(_.el),-1===A&&(W=W.add(_.el),A=W.length-1)):W=t(_.el)}function u(i){t(e).trigger(i),ae.triggerHandler(i)}function f(i){var o;if(!G){if(o=t(i).data(Y),_=new r(i,o),g(_.get("rel")),!$){$=q=!0,c(_.get("className")),x.css({visibility:"hidden",display:"block",opacity:""}),I=n(se,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),b.css({width:"",height:""}).append(I),j=T.height()+k.height()+b.outerHeight(!0)-b.height(),D=C.width()+H.width()+b.outerWidth(!0)-b.width(),N=I.outerHeight(!0),z=I.outerWidth(!0);var h=a(_.get("initialWidth"),"x"),s=a(_.get("initialHeight"),"y"),l=_.get("maxWidth"),f=_.get("maxHeight");_.w=Math.max((l!==!1?Math.min(h,a(l,"x")):h)-z-D,0),_.h=Math.max((f!==!1?Math.min(s,a(f,"y")):s)-N-j,0),I.css({width:"",height:_.h}),J.position(),u(ee),_.get("onOpen"),O.add(F).hide(),x.focus(),_.get("trapFocus")&&e.addEventListener&&(e.addEventListener("focus",d,!0),ae.one(re,function(){e.removeEventListener("focus",d,!0)})),_.get("returnFocus")&&ae.one(re,function(){t(_.el).focus()})}var p=parseFloat(_.get("opacity"));v.css({opacity:p===p?p:"",cursor:_.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),_.get("closeButton")?B.html(_.get("close")).appendTo(b):B.appendTo("<div/>"),w()}}function p(){x||(V=!1,E=t(i),x=n(se).attr({id:Y,"class":t.support.opacity===!1?Z+"IE":"",role:"dialog",tabindex:"-1"}).hide(),v=n(se,"Overlay").hide(),L=t([n(se,"LoadingOverlay")[0],n(se,"LoadingGraphic")[0]]),y=n(se,"Wrapper"),b=n(se,"Content").append(F=n(se,"Title"),R=n(se,"Current"),P=t('<button type="button"/>').attr({id:Z+"Previous"}),K=t('<button type="button"/>').attr({id:Z+"Next"}),S=n("button","Slideshow"),L),B=t('<button type="button"/>').attr({id:Z+"Close"}),y.append(n(se).append(n(se,"TopLeft"),T=n(se,"TopCenter"),n(se,"TopRight")),n(se,!1,"clear:left").append(C=n(se,"MiddleLeft"),b,H=n(se,"MiddleRight")),n(se,!1,"clear:left").append(n(se,"BottomLeft"),k=n(se,"BottomCenter"),n(se,"BottomRight"))).find("div div").css({"float":"left"}),M=n(se,!1,"position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"),O=K.add(P).add(R).add(S)),e.body&&!x.parent().length&&t(e.body).append(v,x.append(y,M))}function m(){function i(t){t.which>1||t.shiftKey||t.altKey||t.metaKey||t.ctrlKey||(t.preventDefault(),f(this))}return x?(V||(V=!0,K.click(function(){J.next()}),P.click(function(){J.prev()}),B.click(function(){J.close()}),v.click(function(){_.get("overlayClose")&&J.close()}),t(e).bind("keydown."+Z,function(t){var e=t.keyCode;$&&_.get("escKey")&&27===e&&(t.preventDefault(),J.close()),$&&_.get("arrowKey")&&W[1]&&!t.altKey&&(37===e?(t.preventDefault(),P.click()):39===e&&(t.preventDefault(),K.click()))}),t.isFunction(t.fn.on)?t(e).on("click."+Z,"."+te,i):t("."+te).live("click."+Z,i)),!0):!1}function w(){var e,o,r,h=J.prep,d=++le;if(q=!0,U=!1,u(he),u(ie),_.get("onLoad"),_.h=_.get("height")?a(_.get("height"),"y")-N-j:_.get("innerHeight")&&a(_.get("innerHeight"),"y"),_.w=_.get("width")?a(_.get("width"),"x")-z-D:_.get("innerWidth")&&a(_.get("innerWidth"),"x"),_.mw=_.w,_.mh=_.h,_.get("maxWidth")&&(_.mw=a(_.get("maxWidth"),"x")-z-D,_.mw=_.w&&_.w<_.mw?_.w:_.mw),_.get("maxHeight")&&(_.mh=a(_.get("maxHeight"),"y")-N-j,_.mh=_.h&&_.h<_.mh?_.h:_.mh),e=_.get("href"),Q=setTimeout(function(){L.show()},100),_.get("inline")){var c=t(e);r=t("<div>").hide().insertBefore(c),ae.one(he,function(){r.replaceWith(c)}),h(c)}else _.get("iframe")?h(" "):_.get("html")?h(_.get("html")):s(_,e)?(e=l(_,e),U=_.get("
1161createImg"),t(U).addClass(Z+"Photo").bind("error."+Z,function(){h(n(se,"Error").html(_.get("imgError")))}).one("load",function(){d===le&&setTimeout(function(){var e;_.get("retinaImage")&&i.devicePixelRatio>1&&(U.height=U.height/i.devicePixelRatio,U.width=U.width/i.devicePixelRatio),_.get("scalePhotos")&&(o=function(){U.height-=U.height*e,U.width-=U.width*e},_.mw&&U.width>_.mw&&(e=(U.width-_.mw)/U.width,o()),_.mh&&U.height>_.mh&&(e=(U.height-_.mh)/U.height,o())),_.h&&(U.style.marginTop=Math.max(_.mh-U.height,0)/2+"px"),W[1]&&(_.get("loop")||W[A+1])&&(U.style.cursor="pointer",t(U).bind("click."+Z,function(){J.next()})),U.style.width=U.width+"px",U.style.height=U.height+"px",h(U)},1)}),U.src=e):e&&M.load(e,_.get("data"),function(e,i){d===le&&h("error"===i?n(se,"Error").html(_.get("xhrError")):t(this).contents())})}var v,x,y,b,T,C,H,k,W,E,I,M,L,F,R,S,K,P,B,O,_,j,D,N,z,A,U,$,q,G,Q,J,V,X={html:!1,photo:!1,iframe:!1,inline:!1,transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,opacity:.9,preloading:!0,className:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0,fastIframe:!0,open:!1,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",returnFocus:!0,trapFocus:!0,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,rel:function(){return this.rel},href:function(){return t(this).attr("href")},title:function(){return this.title},createImg:function(){var e=new Image,i=t(this).data("cbox-img-attrs");return"object"==typeof i&&t.each(i,function(t,i){e[t]=i}),e},createIframe:function(){var i=e.createElement("iframe"),n=t(this).data("cbox-iframe-attrs");return"object"==typeof n&&t.each(n,function(t,e){i[t]=e}),"frameBorder"in i&&(i.frameBorder=0),"allowTransparency"in i&&(i.allowTransparency="true"),i.name=(new Date).getTime(),i.allowFullscreen=!0,i}},Y="colorbox",Z="cbox",te=Z+"Element",ee=Z+"_open",ie=Z+"_load",ne=Z+"_complete",oe=Z+"_cleanup",re=Z+"_closed",he=Z+"_purge",ae=t("<a/>"),se="div",le=0,de={},ce=function(){function t(){clearTimeout(h)}function e(){(_.get("loop")||W[A+1])&&(t(),h=setTimeout(J.next,_.get("slideshowSpeed")))}function i(){S.html(_.get("slideshowStop")).unbind(s).one(s,n),ae.bind(ne,e).bind(ie,t),x.removeClass(a+"off").addClass(a+"on")}function n(){t(),ae.unbind(ne,e).unbind(ie,t),S.html(_.get("slideshowStart")).unbind(s).one(s,function(){J.next(),i()}),x.removeClass(a+"on").addClass(a+"off")}function o(){r=!1,S.hide(),t(),ae.unbind(ne,e).unbind(ie,t),x.removeClass(a+"off "+a+"on")}var r,h,a=Z+"Slideshow_",s="click."+Z;return function(){r?_.get("slideshow")||(ae.unbind(oe,o),o()):_.get("slideshow")&&W[1]&&(r=!0,ae.one(oe,o),_.get("slideshowAuto")?i():n(),S.show())}}();t[Y]||(t(p),J=t.fn[Y]=t[Y]=function(e,i){var n,o=this;return e=e||{},t.isFunction(o)&&(o=t("<a/>"),e.open=!0),o[0]?(p(),m()&&(i&&(e.onComplete=i),o.each(function(){var i=t.data(this,Y)||{};t.data(this,Y,t.extend(i,e))}).addClass(te),n=new r(o[0],e),n.get("open")&&f(o[0])),o):o},J.position=function(e,i){function n(){T[0].style.width=k[0].style.width=b[0].style.width=parseInt(x[0].style.width,10)-D+"px",b[0].style.height=C[0].style.height=H[0].style.height=parseInt(x[0].style.height,10)-j+"px"}var r,h,s,l=0,d=0,c=x.offset();if(E.unbind("resize."+Z),x.css({top:-9e4,left:-9e4}),h=E.scrollTop(),s=E.scrollLeft(),_.get("fixed")?(c.top-=h,c.left-=s,x.css({position:"fixed"})):(l=h,d=s,x.css({position:"absolute"})),d+=_.get("right")!==!1?Math.max(E.width()-_.w-z-D-a(_.get("right"),"x"),0):_.get("left")!==!1?a(_.get("left"),"x"):Math.round(Math.max(E.width()-_.w-z-D,0)/2),l+=_.get("bottom")!==!1?Math.max(o()-_.h-N-j-a(_.get("bottom"),"y"),0):_.get("top")!==!1?a(_.get("top"),"y"):Math.round(Math.max(o()-_.h-N-j,0)/2),x.css({top:c.top,left
1161:c.left,visibility:"visible"}),y[0].style.width=y[0].style.height="9999px",r={width:_.w+z+D,height:_.h+N+j,top:l,left:d},e){var g=0;t.each(r,function(t){return r[t]!==de[t]?(g=e,void 0):void 0}),e=g}de=r,e||x.css(r),x.dequeue().animate(r,{duration:e||0,complete:function(){n(),q=!1,y[0].style.width=_.w+z+D+"px",y[0].style.height=_.h+N+j+"px",_.get("reposition")&&setTimeout(function(){E.bind("resize."+Z,J.position)},1),t.isFunction(i)&&i()},step:n})},J.resize=function(t){var e;$&&(t=t||{},t.width&&(_.w=a(t.width,"x")-z-D),t.innerWidth&&(_.w=a(t.innerWidth,"x")),I.css({width:_.w}),t.height&&(_.h=a(t.height,"y")-N-j),t.innerHeight&&(_.h=a(t.innerHeight,"y")),t.innerHeight||t.height||(e=I.scrollTop(),I.css({height:"auto"}),_.h=I.height()),I.css({height:_.h}),e&&I.scrollTop(e),J.position("none"===_.get("transition")?0:_.get("speed")))},J.prep=function(i){function o(){return _.w=_.w||I.width(),_.w=_.mw&&_.mw<_.w?_.mw:_.w,_.w}function a(){return _.h=_.h||I.height(),_.h=_.mh&&_.mh<_.h?_.mh:_.h,_.h}if($){var d,g="none"===_.get("transition")?0:_.get("speed");I.remove(),I=n(se,"LoadedContent").append(i),I.hide().appendTo(M.show()).css({width:o(),overflow:_.get("scrolling")?"auto":"hidden"}).css({height:a()}).prependTo(b),M.hide(),t(U).css({"float":"none"}),c(_.get("className")),d=function(){function i(){t.support.opacity===!1&&x[0].style.removeAttribute("filter")}var n,o,a=W.length;$&&(o=function(){clearTimeout(Q),L.hide(),u(ne),_.get("onComplete")},F.html(_.get("title")).show(),I.show(),a>1?("string"==typeof _.get("current")&&R.html(_.get("current").replace("{current}",A+1).replace("{total}",a)).show(),K[_.get("loop")||a-1>A?"show":"hide"]().html(_.get("next")),P[_.get("loop")||A?"show":"hide"]().html(_.get("previous")),ce(),_.get("preloading")&&t.each([h(-1),h(1)],function(){var i,n=W[this],o=new r(n,t.data(n,Y)),h=o.get("href");h&&s(o,h)&&(h=l(o,h),i=e.createElement("img"),i.src=h)})):O.hide(),_.get("iframe")?(n=_.get("createIframe"),_.get("scrolling")||(n.scrolling="no"),t(n).attr({src:_.get("href"),"class":Z+"Iframe"}).one("load",o).appendTo(I),ae.one(he,function(){n.src="//about:blank"}),_.get("fastIframe")&&t(n).trigger("load")):o(),"fade"===_.get("transition")?x.fadeTo(g,1,i):i())},"fade"===_.get("transition")?x.fadeTo(g,0,function(){J.position(0,d)}):J.position(g,d)}},J.next=function(){!q&&W[1]&&(_.get("loop")||W[A+1])&&(A=h(1),f(W[A]))},J.prev=function(){!q&&W[1]&&(_.get("loop")||A)&&(A=h(-1),f(W[A]))},J.close=function(){$&&!G&&(G=!0,$=!1,u(oe),_.get("onCleanup"),E.unbind("."+Z),v.fadeTo(_.get("fadeOut")||0,0),x.stop().fadeTo(_.get("fadeOut")||0,0,function(){x.hide(),v.hide(),u(he),I.remove(),setTimeout(function(){G=!1,u(re),_.get("onClosed")},1)}))},J.remove=function(){x&&(x.stop(),t[Y].close(),x.stop(!1,!0).remove(),v.remove(),G=!1,x=null,t("."+te).removeData(Y).removeClass(te),t(e).unbind("click."+Z).unbind("keydown."+Z))},J.element=function(){return t(_.el)},J.settings=X)})(jQuery,document,window);
1162/* Javascript plotting library for jQuery, version 0.8.3.
1163
1164Copyright (c) 2007-2014 IOLA and Ole Laursen.
1165Licensed under the MIT license.
1166
1167*/
1168
1169// first an inline dependency, jquery.colorhelpers.js, we inline it here
1170// for convenience
1171
1172/* Plugin for jQuery for working with colors.
1173 *
1174 * Version 1.1.
1175 *
1176 * Inspiration from jQuery color animation plugin by John Resig.
1177 *
1178 * Released under the MIT license by Ole Laursen, October 2009.
1179 *
1180 * Examples:
1181 *
1182 *   $.color.parse("#fff").scale('rgb', 0.25).add('a', -0.5).toString()
1183 *   var c = $.color.extract($("#mydiv"), 'background-color');
1184 *   console.log(c.r, c.g, c.b, c.a);
1185 *   $.color.make(100, 50, 25, 0.4).toString() // returns "rgba(100,50,25,0.4)"
1186 *
1187 * Note that .scale() and .add() return the same modified object
1188 * instead of making a new one.
1189 *
1190 * V. 1.1: Fix error handling so e.g. parsing an empty string does
1191 * produce a color rather than just crashing.
1192 */
1193(function($){$.color={};$.color.make=function(r,g,b,a){var o={};o.r=r||0;o.g=g||0;o.b=b||0;o.a=a!=null?a:1;o.add=function(c,d){for(var i=0;i<c.length;++i)o[c.charAt(i)]+=d;return o.normalize()};o.scale=function(c,f){for(var i=0;i<c.length;++i)o[c.charAt(i)]*=f;return o.normalize()};o.toString=function(){if(o.a>=1){return"rgb("+[o.r,o.g,o.b].join(",")+")"}else{return"rgba("+[o.r,o.g,o.b,o.a].join(",")+")"}};o.normalize=function(){function clamp(min,value,max){return value<min?min:value>max?max:value}o.r=clamp(0,parseInt(o.r),255);o.g=clamp(0,parseInt(o.g),255);o.b=clamp(0,parseInt(o.b),255);o.a=clamp(0,o.a,1);return o};o.clone=function(){return $.color.make(o.r,o.b,o.g,o.a)};return o.normalize()};$.color.extract=function(elem,css){var c;do{c=elem.css(css).toLowerCase();if(c!=""&&c!="transparent")break;elem=elem.parent()}while(elem.length&&!$.nodeName(elem.get(0),"body"));if(c=="rgba(0, 0, 0, 0)")c="transparent";return $.color.parse(c)};$.color.parse=function(str){var res,m=$.color.make;if(res=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3}
vendor: 124,626 bytes, lines 1193-4344
1193)\s*\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10));if(res=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10),parseFloat(res[4]));if(res=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55);if(res=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55,parseFloat(res[4]));if(res=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(str))return m(parseInt(res[1],16),parseInt(res[2],16),parseInt(res[3],16));if(res=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(str))return m(parseInt(res[1]+res[1],16),parseInt(res[2]+res[2],16),parseInt(res[3]+res[3],16));var name=$.trim(str).toLowerCase();if(name=="transparent")return m(255,255,255,0);else{res=lookupColors[name]||[0,0,0];return m(res[0],res[1],res[2])}};var lookupColors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);
1194
1195// the actual Flot code
1196(function($) {
1197
1198	// Cache the prototype hasOwnProperty for faster access
1199
1200	var hasOwnProperty = Object.prototype.hasOwnProperty;
1201
1202    // A shim to provide 'detach' to jQuery versions prior to 1.4.  Using a DOM
1203    // operation produces the same effect as detach, i.e. removing the element
1204    // without touching its jQuery data.
1205
1206    // Do not merge this into Flot 0.9, since it requires jQuery 1.4.4+.
1207
1208    if (!$.fn.detach) {
1209        $.fn.detach = function() {
1210            return this.each(function() {
1211                if (this.parentNode) {
1212                    this.parentNode.removeChild( this );
1213                }
1214            });
1215        };
1216    }
1217
1218	///////////////////////////////////////////////////////////////////////////
1219	// The Canvas object is a wrapper around an HTML5 <canvas> tag.
1220	//
1221	// @constructor
1222	// @param {string} cls List of classes to apply to the canvas.
1223	// @param {element} container Element onto which to append the canvas.
1224	//
1225	// Requiring a container is a little iffy, but unfortunately canvas
1226	// operations don't work unless the canvas is attached to the DOM.
1227
1228	function Canvas(cls, container) {
1229
1230		var element = container.children("." + cls)[0];
1231
1232		if (element == null) {
1233
1234			element = document.createElement("canvas");
1235			element.className = cls;
1236
1237			$(element).css({ direction: "ltr", position: "absolute", left: 0, top: 0 })
1238				.appendTo(container);
1239
1240			// If HTML5 Canvas isn't available, fall back to [Ex|Flash]canvas
1241
1242			if (!element.getContext) {
1243				if (window.G_vmlCanvasManager) {
1244					element = window.G_vmlCanvasManager.initElement(element);
1245				} else {
1246					throw new Error("Canvas is not available. If you're using IE with a fall-back such as Excanvas, then there's either a mistake in your conditional include, or the page has no DOCTYPE and is rendering in Quirks Mode.");
1247				}
1248			}
1249		}
1250
1251		this.element = element;
1252
1253		var context = this.context = element.getContext("2d");
1254
1255		// Determine the screen's ratio of physical to device-independent
1256		// pixels.  This is the ratio between the canvas width that the browser
1257		// advertises and the number of pixels actually present in that space.
1258
1259		// The iPhone 4, for example, has a device-independent width of 320px,
1260		// but its screen is actually 640px wide.  It therefore has a pixel
1261		// ratio of 2, while most normal devices have a ratio of 1.
1262
1263		var devicePixelRatio = window.devicePixelRatio || 1,
1264			backingStoreRatio =
1265				context.webkitBackingStorePixelRatio ||
1266				context.mozBackingStorePixelRatio ||
1267				context.msBackingStorePixelRatio ||
1268				context.oBackingStorePixelRatio ||
1269				context.backingStorePixelRatio || 1;
1270
1271		this.pixelRatio = devicePixelRatio / backingStoreRatio;
1272
1273		// Size the canvas to match the internal dimensions of its container
1274
1275		this.resize(container.width(), container.height());
1276
1277		// Collection of HTML div layers for text overlaid onto the canvas
1278
1279		this.textContainer = null;
1280		this.text = {};
1281
1282		// Cache of text fragments and metrics, so we can avoid expensively
1283		// re-calculating them when the plot is re-rendered in a loop.
1284
1285		this._textCache = {};
1286	}
1287
1288	// Resizes the canvas to the given dimensions.
1289	//
1290	// @param {number} width New width of the canvas, in pixels.
1291	// @param {number} width New height of the canvas, in pixels.
1292
1293	Canvas.prototype.resize = function(width, height) {
1294
1295		if (width <= 0 || height <= 0) {
1296			throw new Error("Invalid dimensions for plot, width = " + width + ", height = " + height);
1297		}
1298
1299		var element = this.element,
1300			context = this.context,
1301			pixelRatio = this.pixelRatio;
1302
1303		// Resize the canvas, increasing its density based on the display's
1304		// pixel ratio; basically giving it more pixels without increasing the
1305		// size of its element, to take advantage of the fact that retina
1306		// displays have that many more pixels in the same advertised space.
1307
1308		// Resizing should reset the state (excanvas seems to be buggy though)
1309
1310		if (this.width != width) {
1311			element.width = width * pixelRatio;
1312			element.style.width = width + "px";
1313			this.width = width;
1314		}
1315
1316		if (this.height != height) {
1317			element.height = height * pixelRatio;
1318			element.style.height = height + "px";
1319			this.height = height;
1320		}
1321
1322		// Save the context, so we can reset in case we get replotted.  The
1323		// restore ensure that we're really back at the initial state, and
1324		// should be safe even if we haven't saved the initial state yet.
1325
1326		context.restore();
1327		context.save();
1328
1329		// Scale the coordinate space to match the display density; so even though we
1330		// may have twice as many pixels, we still want lines and other drawing to
1331		// appear at the same size; the extra pixels will just make them crisper.
1332
1333		context.scale(pixelRatio, pixelRatio);
1334	};
1335
1336	// Clears the entire canvas area, not including any overlaid HTML text
1337
1338	Canvas.prototype.clear = function() {
1339		this.context.clearRect(0, 0, this.width, this.height);
1340	};
1341
1342	// Finishes rendering the canvas, including managing the text overlay.
1343
1344	Canvas.prototype.render = function() {
1345
1346		var cache = this._textCache;
1347
1348		// For each text layer, add elements marked as active that haven't
1349		// already been rendered, and remove those that are no longer active.
1350
1351		for (var layerKey in cache) {
1352			if (hasOwnProperty.call(cache, layerKey)) {
1353
1354				var layer = this.getTextLayer(layerKey),
1355					layerCache = cache[layerKey];
1356
1357				layer.hide();
1358
1359				for (var styleKey in layerCache) {
1360					if (hasOwnProperty.call(layerCache, styleKey)) {
1361						var styleCache = layerCache[styleKey];
1362						for (var key in styleCache) {
1363							if (hasOwnProperty.call(styleCache, key)) {
1364
1365								var positions = styleCache[key].positions;
1366
1367								for (var i = 0, position; position = positions[i]; i++) {
1368									if (position.active) {
1369										if (!position.rendered) {
1370											layer.append(position.element);
1371											position.rendered = true;
1372										}
1373									} else {
1374										positions.splice(i--, 1);
1375										if (position.rendered) {
1376											position.element.detach();
1377										}
1378									}
1379								}
1380
1381								if (positions.length == 0) {
1382									delete styleCache[key];
1383								}
1384							}
1385						}
1386					}
1387				}
1388
1389				layer.show();
1390			}
1391		}
1392	};
1393
1394	// Creates (if necessary) and returns the text overlay container.
1395	//
1396	// @param {string} classes String of space-separated CSS classes used to
1397	//     uniquely identify the text layer.
1398	// @return {object} The jQuery-wrapped text-layer div.
1399
1400	Canvas.prototype.getTextLayer = function(classes) {
1401
1402		var layer = this.text[classes];
1403
1404		// Create the text layer if it doesn't exist
1405
1406		if (layer == null) {
1407
1408			// Create the text layer container, if it doesn't exist
1409
1410			if (this.textContainer == null) {
1411				this.textContainer = $("<div class='flot-text'></div>")
1412					.css({
1413						position: "absolute",
1414						top: 0,
1415						left: 0,
1416						bottom: 0,
1417						right: 0,
1418						'font-size': "smaller",
1419						color: "#545454"
1420					})
1421					.insertAfter(this.element);
1422			}
1423
1424			layer = this.text[classes] = $("<div></div>")
1425				.addClass(classes)
1426				.css({
1427					position: "absolute",
1428					top: 0,
1429					left: 0,
1430					bottom: 0,
1431					right: 0
1432				})
1433				.appendTo(this.textContainer);
1434		}
1435
1436		return layer;
1437	};
1438
1439	// Creates (if necessary) and returns a text info object.
1440	//
1441	// The object looks like this:
1442	//
1443	// {
1444	//     width: Width of the text's wrapper div.
1445	//     height: Height of the text's wrapper div.
1446	//     element: The jQuery-wrapped HTML div containing the text.
1447	//     positions: Array of positions at which this text is drawn.
1448	// }
1449	//
1450	// The positions array contains objects that look like this:
1451	//
1452	// {
1453	//     active: Flag indicating whether the text should be visible.
1454	//     rendered: Flag indicating whether the text is currently visible.
1455	//     element: The jQuery-wrapped HTML div containing the text.
1456	//     x: X coordinate at which to draw the text.
1457	//     y: Y coordinate at which to draw the text.
1458	// }
1459	//
1460	// Each position after the first receives a clone of the original element.
1461	//
1462	// The idea is that that the width, height, and general 'identity' of the
1463	// text is constant no matter where it is placed; the placements are a
1464	// secondary property.
1465	//
1466	// Canvas maintains a cache of recently-used text info objects; getTextInfo
1467	// either returns the cached element or creates a new entry.
1468	//
1469	// @param {string} layer A string of space-separated CSS classes uniquely
1470	//     identifying the layer containing this text.
1471	// @param {string} text Text string to retrieve info for.
1472	// @param {(string|object)=} font Either a string of space-separated CSS
1473	//     classes or a font-spec object, defining the text's font and style.
1474	// @param {number=} angle Angle at which to rotate the text, in degrees.
1475	//     Angle is currently unused, it will be implemented in the future.
1476	// @param {number=} width Maximum width of the text before it wraps.
1477	// @return {object} a text info object.
1478
1479	Canvas.prototype.getTextInfo = function(layer, text, font, angle, width) {
1480
1481		var textStyle, layerCache, styleCache, info;
1482
1483		// Cast the value to a string, in case we were given a number or such
1484
1485		text = "" + text;
1486
1487		// If the font is a font-spec object, generate a CSS font definition
1488
1489		if (typeof font === "object") {
1490			textStyle = font.style + " " + font.variant + " " + font.weight + " " + font.size + "px/" + font.lineHeight + "px " + font.family;
1491		} else {
1492			textStyle = font;
1493		}
1494
1495		// Retrieve (or create) the cache for the text's layer and styles
1496
1497		layerCache = this._textCache[layer];
1498
1499		if (layerCache == null) {
1500			layerCache = this._textCache[layer] = {};
1501		}
1502
1503		styleCache = layerCache[textStyle];
1504
1505		if (styleCache == null) {
1506			styleCache = layerCache[textStyle] = {};
1507		}
1508
1509		info = styleCache[text];
1510
1511		// If we can't find a matching element in our cache, create a new one
1512
1513		if (info == null) {
1514
1515			var element = $("<div></div>").html(text)
1516				.css({
1517					position: "absolute",
1518					'max-width': width,
1519					top: -9999
1520				})
1521				.appendTo(this.getTextLayer(layer));
1522
1523			if (typeof font === "object") {
1524				element.css({
1525					font: textStyle,
1526					color: font.color
1527				});
1528			} else if (typeof font === "string") {
1529				element.addClass(font);
1530			}
1531
1532			info = styleCache[text] = {
1533				width: element.outerWidth(true),
1534				height: element.outerHeight(true),
1535				element: element,
1536				positions: []
1537			};
1538
1539			element.detach();
1540		}
1541
1542		return info;
1543	};
1544
1545	// Adds a text string to the canvas text overlay.
1546	//
1547	// The text isn't drawn immediately; it is marked as rendering, which will
1548	// result in its addition to the canvas on the next render pass.
1549	//
1550	// @param {string} layer A string of space-separated CSS classes uniquely
1551	//     identifying the layer containing this text.
1552	// @param {number} x X coordinate at which to draw the text.
1553	// @param {number} y Y coordinate at which to draw the text.
1554	// @param {string} text Text string to draw.
1555	// @param {(string|object)=} font Either a string of space-separated CSS
1556	//     classes or a font-spec object, defining the text's font and style.
1557	// @param {number=} angle Angle at which to rotate the text, in degrees.
1558	//     Angle is currently unused, it will be implemented in the future.
1559	// @param {number=} width Maximum width of the text before it wraps.
1560	// @param {string=} halign Horizontal alignment of the text; either "left",
1561	//     "center" or "right".
1562	// @param {string=} valign Vertical alignment of the text; either "top",
1563	//     "middle" or "bottom".
1564
1565	Canvas.prototype.addText = function(layer, x, y, text, font, angle, width, halign, valign) {
1566
1567		var info = this.getTextInfo(layer, text, font, angle, width),
1568			positions = info.positions;
1569
1570		// Tweak the div's position to match the text's alignment
1571
1572		if (halign == "center") {
1573			x -= info.width / 2;
1574		} else if (halign == "right") {
1575			x -= info.width;
1576		}
1577
1578		if (valign == "middle") {
1579			y -= info.height / 2;
1580		} else if (valign == "bottom") {
1581			y -= info.height;
1582		}
1583
1584		// Determine whether this text already exists at this position.
1585		// If so, mark it for inclusion in the next render pass.
1586
1587		for (var i = 0, position; position = positions[i]; i++) {
1588			if (position.x == x && position.y == y) {
1589				position.active = true;
1590				return;
1591			}
1592		}
1593
1594		// If the text doesn't exist at this position, create a new entry
1595
1596		// For the very first position we'll re-use the original element,
1597		// while for subsequent ones we'll clone it.
1598
1599		position = {
1600			active: true,
1601			rendered: false,
1602			element: positions.length ? info.element.clone() : info.element,
1603			x: x,
1604			y: y
1605		};
1606
1607		positions.push(position);
1608
1609		// Move the element to its final position within the container
1610
1611		position.element.css({
1612			top: Math.round(y),
1613			left: Math.round(x),
1614			'text-align': halign	// In case the text wraps
1615		});
1616	};
1617
1618	// Removes one or more text strings from the canvas text overlay.
1619	//
1620	// If no parameters are given, all text within the layer is removed.
1621	//
1622	// Note that the text is not immediately removed; it is simply marked as
1623	// inactive, which will result in its removal on the next render pass.
1624	// This avoids the performance penalty for 'clear and redraw' behavior,
1625	// where we potentially get rid of all text on a layer, but will likely
1626	// add back most or all of it later, as when redrawing axes, for example.
1627	//
1628	// @param {string} layer A string of space-separated CSS classes uniquely
1629	//     identifying the layer containing this text.
1630	// @param {number=} x X coordinate of the text.
1631	// @param {number=} y Y coordinate of the text.
1632	// @param {string=} text Text string to remove.
1633	// @param {(string|object)=} font Either a string of space-separated CSS
1634	//     classes or a font-spec object, defining the text's font and style.
1635	// @param {number=} angle Angle at which the text is rotated, in degrees.
1636	//     Angle is currently unused, it will be implemented in the future.
1637
1638	Canvas.prototype.removeText = function(layer, x, y, text, font, angle) {
1639		if (text == null) {
1640			var layerCache = this._textCache[layer];
1641			if (layerCache != null) {
1642				for (var styleKey in layerCache) {
1643					if (hasOwnProperty.call(layerCache, styleKey)) {
1644						var styleCache = layerCache[styleKey];
1645						for (var key in styleCache) {
1646							if (hasOwnProperty.call(styleCache, key)) {
1647								var positions = styleCache[key].positions;
1648								for (var i = 0, position; position = positions[i]; i++) {
1649									position.active = false;
1650								}
1651							}
1652						}
1653					}
1654				}
1655			}
1656		} else {
1657			var positions = this.getTextInfo(layer, text, font, angle).positions;
1658			for (var i = 0, position; position = positions[i]; i++) {
1659				if (position.x == x && position.y == y) {
1660					position.active = false;
1661				}
1662			}
1663		}
1664	};
1665
1666	///////////////////////////////////////////////////////////////////////////
1667	// The top-level container for the entire plot.
1668
1669    function Plot(placeholder, data_, options_, plugins) {
1670        // data is on the form:
1671        //   [ series1, series2 ... ]
1672        // where series is either just the data as [ [x1, y1], [x2, y2], ... ]
1673        // or { data: [ [x1, y1], [x2, y2], ... ], label: "some label", ... }
1674
1675        var series = [],
1676            options = {
1677                // the color theme used for graphs
1678                colors: ["#edc240", "#afd8f8", "#cb4b4b", "#4da74d", "#9440ed"],
1679                legend: {
1680                    show: true,
1681                    noColumns: 1, // number of colums in legend table
1682                    labelFormatter: null, // fn: string -> string
1683                    labelBoxBorderColor: "#ccc", // border color for the little label boxes
1684                    container: null, // container (as jQuery object) to put legend in, null means default on top of graph
1685                    position: "ne", // position of default legend container within plot
1686                    margin: 5, // distance from grid edge to default legend container within plot
1687                    backgroundColor: null, // null means auto-detect
1688                    backgroundOpacity: 0.85, // set to 0 to avoid background
1689                    sorted: null    // default to no legend sorting
1690                },
1691                xaxis: {
1692                    show: null, // null = auto-detect, true = always, false = never
1693                    position: "bottom", // or "top"
1694                    mode: null, // null or "time"
1695                    font: null, // null (derived from CSS in placeholder) or object like { size: 11, lineHeight: 13, style: "italic", weight: "bold", family: "sans-serif", variant: "small-caps" }
1696                    color: null, // base color, labels, ticks
1697                    tickColor: null, // possibly different color of ticks, e.g. "rgba(0,0,0,0.15)"
1698                    transform: null, // null or f: number -> number to transform axis
1699                    inverseTransform: null, // if transform is set, this should be the inverse function
1700                    min: null, // min. value to show, null means set automatically
1701                    max: null, // max. value to show, null means set automatically
1702                    autoscaleMargin: null, // margin in % to add if auto-setting min/max
1703                    ticks: null, // either [1, 3] or [[1, "a"], 3] or (fn: axis info -> ticks) or app. number of ticks for auto-ticks
1704                    tickFormatter: null, // fn: number -> string
1705                    labelWidth: null, // size of tick labels in pixels
1706                    labelHeight: null,
1707                    reserveSpace: null, // whether to reserve space even if axis isn't shown
1708                    tickLength: null, // size in pixels of ticks, or "full" for whole line
1709                    alignTicksWithAxis: null, // axis number or null for no sync
1710                    tickDecimals: null, // no. of decimals, null means auto
1711                    tickSize: null, // number or [number, "unit"]
1712                    minTickSize: null // number or [number, "unit"]
1713                },
1714                yaxis: {
1715                    autoscaleMargin: 0.02,
1716                    position: "left" // or "right"
1717                },
1718                xaxes: [],
1719                yaxes: [],
1720                series: {
1721                    points: {
1722                        show: false,
1723                        radius: 3,
1724                        lineWidth: 2, // in pixels
1725                        fill: true,
1726                        fillColor: "#ffffff",
1727                        symbol: "circle" // or callback
1728                    },
1729                    lines: {
1730                        // we don't put in show: false so we can see
1731                        // whether lines were actively disabled
1732                        lineWidth: 2, // in pixels
1733                        fill: false,
1734                        fillColor: null,
1735                        steps: false
1736                        // Omit 'zero', so we can later default its value to
1737                        // match that of the 'fill' option.
1738                    },
1739                    bars: {
1740                        show: false,
1741                        lineWidth: 2, // in pixels
1742                        barWidth: 1, // in units of the x axis
1743                        fill: true,
1744                        fillColor: null,
1745                        align: "left", // "left", "right", or "center"
1746                        horizontal: false,
1747                        zero: true
1748                    },
1749                    shadowSize: 3,
1750                    highlightColor: null
1751                },
1752                grid: {
1753                    show: true,
1754                    aboveData: false,
1755                    color: "#545454", // primary color used for outline and labels
1756                    backgroundColor: null, // null for transparent, else color
1757                    borderColor: null, // set if different from the grid color
1758                    tickColor: null, // color for the ticks, e.g. "rgba(0,0,0,0.15)"
1759                    margin: 0, // distance from the canvas edge to the grid
1760                    labelMargin: 5, // in pixels
1761                    axisMargin: 8, // in pixels
1762                    borderWidth: 2, // in pixels
1763                    minBorderMargin: null, // in pixels, null means taken from points radius
1764                    markings: null, // array of ranges or fn: axes -> array of ranges
1765                    markingsColor: "#f4f4f4",
1766                    markingsLineWidth: 2,
1767                    // interactive stuff
1768                    clickable: false,
1769                    hoverable: false,
1770                    autoHighlight: true, // highlight in case mouse is near
1771                    mouseActiveRadius: 10 // how far the mouse can be away to activate an item
1772                },
1773                interaction: {
1774                    redrawOverlayInterval: 1000/60 // time between updates, -1 means in same flow
1775                },
1776                hooks: {}
1777            },
1778        surface = null,     // the canvas for the plot itself
1779        overlay = null,     // canvas for interactive stuff on top of plot
1780        eventHolder = null, // jQuery object that events should be bound to
1781        ctx = null, octx = null,
1782        xaxes = [], yaxes = [],
1783        plotOffset = { left: 0, right: 0, top: 0, bottom: 0},
1784        plotWidth = 0, plotHeight = 0,
1785        hooks = {
1786            processOptions: [],
1787            processRawData: [],
1788            processDatapoints: [],
1789            processOffset: [],
1790            drawBackground: [],
1791            drawSeries: [],
1792            draw: [],
1793            bindEvents: [],
1794            drawOverlay: [],
1795            shutdown: []
1796        },
1797        plot = this;
1798
1799        // public functions
1800        plot.setData = setData;
1801        plot.setupGrid = setupGrid;
1802        plot.draw = draw;
1803        plot.getPlaceholder = function() { return placeholder; };
1804        plot.getCanvas = function() { return surface.element; };
1805        plot.getPlotOffset = function() { return plotOffset; };
1806        plot.width = function () { return plotWidth; };
1807        plot.height = function () { return plotHeight; };
1808        plot.offset = function () {
1809            var o = eventHolder.offset();
1810            o.left += plotOffset.left;
1811            o.top += plotOffset.top;
1812            return o;
1813        };
1814        plot.getData = function () { return series; };
1815        plot.getAxes = function () {
1816            var res = {}, i;
1817            $.each(xaxes.concat(yaxes), function (_, axis) {
1818                if (axis)
1819                    res[axis.direction + (axis.n != 1 ? axis.n : "") + "axis"] = axis;
1820            });
1821            return res;
1822        };
1823        plot.getXAxes = function () { return xaxes; };
1824        plot.getYAxes = function () { return yaxes; };
1825        plot.c2p = canvasToAxisCoords;
1826        plot.p2c = axisToCanvasCoords;
1827        plot.getOptions = function () { return options; };
1828        plot.highlight = highlight;
1829        plot.unhighlight = unhighlight;
1830        plot.triggerRedrawOverlay = triggerRedrawOverlay;
1831        plot.pointOffset = function(point) {
1832            return {
1833                left: parseInt(xaxes[axisNumber(point, "x") - 1].p2c(+point.x) + plotOffset.left, 10),
1834                top: parseInt(yaxes[axisNumber(point, "y") - 1].p2c(+point.y) + plotOffset.top, 10)
1835            };
1836        };
1837        plot.shutdown = shutdown;
1838        plot.destroy = function () {
1839            shutdown();
1840            placeholder.removeData("plot").empty();
1841
1842            series = [];
1843            options = null;
1844            surface = null;
1845            overlay = null;
1846            eventHolder = null;
1847            ctx = null;
1848            octx = null;
1849            xaxes = [];
1850            yaxes = [];
1851            hooks = null;
1852            highlights = [];
1853            plot = null;
1854        };
1855        plot.resize = function () {
1856        	var width = placeholder.width(),
1857        		height = placeholder.height();
1858            surface.resize(width, height);
1859            overlay.resize(width, height);
1860        };
1861
1862        // public attributes
1863        plot.hooks = hooks;
1864
1865        // initialize
1866        initPlugins(plot);
1867        parseOptions(options_);
1868        setupCanvases();
1869        setData(data_);
1870        setupGrid();
1871        draw();
1872        bindEvents();
1873
1874
1875        function executeHooks(hook, args) {
1876            args = [plot].concat(args);
1877            for (var i = 0; i < hook.length; ++i)
1878                hook[i].apply(this, args);
1879        }
1880
1881        function initPlugins() {
1882
1883            // References to key classes, allowing plugins to modify them
1884
1885            var classes = {
1886                Canvas: Canvas
1887            };
1888
1889            for (var i = 0; i < plugins.length; ++i) {
1890                var p = plugins[i];
1891                p.init(plot, classes);
1892                if (p.options)
1893                    $.extend(true, options, p.options);
1894            }
1895        }
1896
1897        function parseOptions(opts) {
1898
1899            $.extend(true, options, opts);
1900
1901            // $.extend merges arrays, rather than replacing them.  When less
1902            // colors are provided than the size of the default palette, we
1903            // end up with those colors plus the remaining defaults, which is
1904            // not expected behavior; avoid it by replacing them here.
1905
1906            if (opts && opts.colors) {
1907            	options.colors = opts.colors;
1908            }
1909
1910            if (options.xaxis.color == null)
1911                options.xaxis.color = $.color.parse(options.grid.color).scale('a', 0.22).toString();
1912            if (options.yaxis.color == null)
1913                options.yaxis.color = $.color.parse(options.grid.color).scale('a', 0.22).toString();
1914
1915            if (options.xaxis.tickColor == null) // grid.tickColor for back-compatibility
1916                options.xaxis.tickColor = options.grid.tickColor || options.xaxis.color;
1917            if (options.yaxis.tickColor == null) // grid.tickColor for back-compatibility
1918                options.yaxis.tickColor = options.grid.tickColor || options.yaxis.color;
1919
1920            if (options.grid.borderColor == null)
1921                options.grid.borderColor = options.grid.color;
1922            if (options.grid.tickColor == null)
1923                options.grid.tickColor = $.color.parse(options.grid.color).scale('a', 0.22).toString();
1924
1925            // Fill in defaults for axis options, including any unspecified
1926            // font-spec fields, if a font-spec was provided.
1927
1928            // If no x/y axis options were provided, create one of each anyway,
1929            // since the rest of the code assumes that they exist.
1930
1931            var i, axisOptions, axisCount,
1932                fontSize = placeholder.css("font-size"),
1933                fontSizeDefault = fontSize ? +fontSize.replace("px", "") : 13,
1934                fontDefaults = {
1935                    style: placeholder.css("font-style"),
1936                    size: Math.round(0.8 * fontSizeDefault),
1937                    variant: placeholder.css("font-variant"),
1938                    weight: placeholder.css("font-weight"),
1939                    family: placeholder.css("font-family")
1940                };
1941
1942            axisCount = options.xaxes.length || 1;
1943            for (i = 0; i < axisCount; ++i) {
1944
1945                axisOptions = options.xaxes[i];
1946                if (axisOptions && !axisOptions.tickColor) {
1947                    axisOptions.tickColor = axisOptions.color;
1948                }
1949
1950                axisOptions = $.extend(true, {}, options.xaxis, axisOptions);
1951                options.xaxes[i] = axisOptions;
1952
1953                if (axisOptions.font) {
1954                    axisOptions.font = $.extend({}, fontDefaults, axisOptions.font);
1955                    if (!axisOptions.font.color) {
1956                        axisOptions.font.color = axisOptions.color;
1957                    }
1958                    if (!axisOptions.font.lineHeight) {
1959                        axisOptions.font.lineHeight = Math.round(axisOptions.font.size * 1.15);
1960                    }
1961                }
1962            }
1963
1964            axisCount = options.yaxes.length || 1;
1965            for (i = 0; i < axisCount; ++i) {
1966
1967                axisOptions = options.yaxes[i];
1968                if (axisOptions && !axisOptions.tickColor) {
1969                    axisOptions.tickColor = axisOptions.color;
1970                }
1971
1972                axisOptions = $.extend(true, {}, options.yaxis, axisOptions);
1973                options.yaxes[i] = axisOptions;
1974
1975                if (axisOptions.font) {
1976                    axisOptions.font = $.extend({}, fontDefaults, axisOptions.font);
1977                    if (!axisOptions.font.color) {
1978                        axisOptions.font.color = axisOptions.color;
1979                    }
1980                    if (!axisOptions.font.lineHeight) {
1981                        axisOptions.font.lineHeight = Math.round(axisOptions.font.size * 1.15);
1982                    }
1983                }
1984            }
1985
1986            // backwards compatibility, to be removed in future
1987            if (options.xaxis.noTicks && options.xaxis.ticks == null)
1988                options.xaxis.ticks = options.xaxis.noTicks;
1989            if (options.yaxis.noTicks && options.yaxis.ticks == null)
1990                options.yaxis.ticks = options.yaxis.noTicks;
1991            if (options.x2axis) {
1992                options.xaxes[1] = $.extend(true, {}, options.xaxis, options.x2axis);
1993                options.xaxes[1].position = "top";
1994                // Override the inherit to allow the axis to auto-scale
1995                if (options.x2axis.min == null) {
1996                    options.xaxes[1].min = null;
1997                }
1998                if (options.x2axis.max == null) {
1999                    options.xaxes[1].max = null;
2000                }
2001            }
2002            if (options.y2axis) {
2003                options.yaxes[1] = $.extend(true, {}, options.yaxis, options.y2axis);
2004                options.yaxes[1].position = "right";
2005                // Override the inherit to allow the axis to auto-scale
2006                if (options.y2axis.min == null) {
2007                    options.yaxes[1].min = null;
2008                }
2009                if (options.y2axis.max == null) {
2010                    options.yaxes[1].max = null;
2011                }
2012            }
2013            if (options.grid.coloredAreas)
2014                options.grid.markings = options.grid.coloredAreas;
2015            if (options.grid.coloredAreasColor)
2016                options.grid.markingsColor = options.grid.coloredAreasColor;
2017            if (options.lines)
2018                $.extend(true, options.series.lines, options.lines);
2019            if (options.points)
2020                $.extend(true, options.series.points, options.points);
2021            if (options.bars)
2022                $.extend(true, options.series.bars, options.bars);
2023            if (options.shadowSize != null)
2024                options.series.shadowSize = options.shadowSize;
2025            if (options.highlightColor != null)
2026                options.series.highlightColor = options.highlightColor;
2027
2028            // save options on axes for future reference
2029            for (i = 0; i < options.xaxes.length; ++i)
2030                getOrCreateAxis(xaxes, i + 1).options = options.xaxes[i];
2031            for (i = 0; i < options.yaxes.length; ++i)
2032                getOrCreateAxis(yaxes, i + 1).options = options.yaxes[i];
2033
2034            // add hooks from options
2035            for (var n in hooks)
2036                if (options.hooks[n] && options.hooks[n].length)
2037                    hooks[n] = hooks[n].concat(options.hooks[n]);
2038
2039            executeHooks(hooks.processOptions, [options]);
2040        }
2041
2042        function setData(d) {
2043            series = parseData(d);
2044            fillInSeriesOptions();
2045            processData();
2046        }
2047
2048        function parseData(d) {
2049            var res = [];
2050            for (var i = 0; i < d.length; ++i) {
2051                var s = $.extend(true, {}, options.series);
2052
2053                if (d[i].data != null) {
2054                    s.data = d[i].data; // move the data instead of deep-copy
2055                    delete d[i].data;
2056
2057                    $.extend(true, s, d[i]);
2058
2059                    d[i].data = s.data;
2060                }
2061                else
2062                    s.data = d[i];
2063                res.push(s);
2064            }
2065
2066            return res;
2067        }
2068
2069        function axisNumber(obj, coord) {
2070            var a = obj[coord + "axis"];
2071            if (typeof a == "object") // if we got a real axis, extract number
2072                a = a.n;
2073            if (typeof a != "number")
2074                a = 1; // default to first axis
2075            return a;
2076        }
2077
2078        function allAxes() {
2079            // return flat array without annoying null entries
2080            return $.grep(xaxes.concat(yaxes), function (a) { return a; });
2081        }
2082
2083        function canvasToAxisCoords(pos) {
2084            // return an object with x/y corresponding to all used axes
2085            var res = {}, i, axis;
2086            for (i = 0; i < xaxes.length; ++i) {
2087                axis = xaxes[i];
2088                if (axis && axis.used)
2089                    res["x" + axis.n] = axis.c2p(pos.left);
2090            }
2091
2092            for (i = 0; i < yaxes.length; ++i) {
2093                axis = yaxes[i];
2094                if (axis && axis.used)
2095                    res["y" + axis.n] = axis.c2p(pos.top);
2096            }
2097
2098            if (res.x1 !== undefined)
2099                res.x = res.x1;
2100            if (res.y1 !== undefined)
2101                res.y = res.y1;
2102
2103            return res;
2104        }
2105
2106        function axisToCanvasCoords(pos) {
2107            // get canvas coords from the first pair of x/y found in pos
2108            var res = {}, i, axis, key;
2109
2110            for (i = 0; i < xaxes.length; ++i) {
2111                axis = xaxes[i];
2112                if (axis && axis.used) {
2113                    key = "x" + axis.n;
2114                    if (pos[key] == null && axis.n == 1)
2115                        key = "x";
2116
2117                    if (pos[key] != null) {
2118                        res.left = axis.p2c(pos[key]);
2119                        break;
2120                    }
2121                }
2122            }
2123
2124            for (i = 0; i < yaxes.length; ++i) {
2125                axis = yaxes[i];
2126                if (axis && axis.used) {
2127                    key = "y" + axis.n;
2128                    if (pos[key] == null && axis.n == 1)
2129                        key = "y";
2130
2131                    if (pos[key] != null) {
2132                        res.top = axis.p2c(pos[key]);
2133                        break;
2134                    }
2135                }
2136            }
2137
2138            return res;
2139        }
2140
2141        function getOrCreateAxis(axes, number) {
2142            if (!axes[number - 1])
2143                axes[number - 1] = {
2144                    n: number, // save the number for future reference
2145                    direction: axes == xaxes ? "x" : "y",
2146                    options: $.extend(true, {}, axes == xaxes ? options.xaxis : options.yaxis)
2147                };
2148
2149            return axes[number - 1];
2150        }
2151
2152        function fillInSeriesOptions() {
2153
2154            var neededColors = series.length, maxIndex = -1, i;
2155
2156            // Subtract the number of series that already have fixed colors or
2157            // color indexes from the number that we still need to generate.
2158
2159            for (i = 0; i < series.length; ++i) {
2160                var sc = series[i].color;
2161                if (sc != null) {
2162                    neededColors--;
2163                    if (typeof sc == "number" && sc > maxIndex) {
2164                        maxIndex = sc;
2165                    }
2166                }
2167            }
2168
2169            // If any of the series have fixed color indexes, then we need to
2170            // generate at least as many colors as the highest index.
2171
2172            if (neededColors <= maxIndex) {
2173                neededColors = maxIndex + 1;
2174            }
2175
2176            // Generate all the colors, using first the option colors and then
2177            // variations on those colors once they're exhausted.
2178
2179            var c, colors = [], colorPool = options.colors,
2180                colorPoolSize = colorPool.length, variation = 0;
2181
2182            for (i = 0; i < neededColors; i++) {
2183
2184                c = $.color.parse(colorPool[i % colorPoolSize] || "#666");
2185
2186                // Each time we exhaust the colors in the pool we adjust
2187                // a scaling factor used to produce more variations on
2188                // those colors. The factor alternates negative/positive
2189                // to produce lighter/darker colors.
2190
2191                // Reset the variation after every few cycles, or else
2192                // it will end up producing only white or black colors.
2193
2194                if (i % colorPoolSize == 0 && i) {
2195                    if (variation >= 0) {
2196                        if (variation < 0.5) {
2197                            variation = -variation - 0.2;
2198                        } else variation = 0;
2199                    } else variation = -variation;
2200                }
2201
2202                colors[i] = c.scale('rgb', 1 + variation);
2203            }
2204
2205            // Finalize the series options, filling in their colors
2206
2207            var colori = 0, s;
2208            for (i = 0; i < series.length; ++i) {
2209                s = series[i];
2210
2211                // assign colors
2212                if (s.color == null) {
2213                    s.color = colors[colori].toString();
2214                    ++colori;
2215                }
2216                else if (typeof s.color == "number")
2217                    s.color = colors[s.color].toString();
2218
2219                // turn on lines automatically in case nothing is set
2220                if (s.lines.show == null) {
2221                    var v, show = true;
2222                    for (v in s)
2223                        if (s[v] && s[v].show) {
2224                            show = false;
2225                            break;
2226                        }
2227                    if (show)
2228                        s.lines.show = true;
2229                }
2230
2231                // If nothing was provided for lines.zero, default it to match
2232                // lines.fill, since areas by default should extend to zero.
2233
2234                if (s.lines.zero == null) {
2235                    s.lines.zero = !!s.lines.fill;
2236                }
2237
2238                // setup axes
2239                s.xaxis = getOrCreateAxis(xaxes, axisNumber(s, "x"));
2240                s.yaxis = getOrCreateAxis(yaxes, axisNumber(s, "y"));
2241            }
2242        }
2243
2244        function processData() {
2245            var topSentry = Number.POSITIVE_INFINITY,
2246                bottomSentry = Number.NEGATIVE_INFINITY,
2247                fakeInfinity = Number.MAX_VALUE,
2248                i, j, k, m, length,
2249                s, points, ps, x, y, axis, val, f, p,
2250                data, format;
2251
2252            function updateAxis(axis, min, max) {
2253                if (min < axis.datamin && min != -fakeInfinity)
2254                    axis.datamin = min;
2255                if (max > axis.datamax && max != fakeInfinity)
2256                    axis.datamax = max;
2257            }
2258
2259            $.each(allAxes(), function (_, axis) {
2260                // init axis
2261                axis.datamin = topSentry;
2262                axis.datamax = bottomSentry;
2263                axis.used = false;
2264            });
2265
2266            for (i = 0; i < series.length; ++i) {
2267                s = series[i];
2268                s.datapoints = { points: [] };
2269
2270                executeHooks(hooks.processRawData, [ s, s.data, s.datapoints ]);
2271            }
2272
2273            // first pass: clean and copy data
2274            for (i = 0; i < series.length; ++i) {
2275                s = series[i];
2276
2277                data = s.data;
2278                format = s.datapoints.format;
2279
2280                if (!format) {
2281                    format = [];
2282                    // find out how to copy
2283                    format.push({ x: true, number: true, required: true });
2284                    format.push({ y: true, number: true, required: true });
2285
2286                    if (s.bars.show || (s.lines.show && s.lines.fill)) {
2287                        var autoscale = !!((s.bars.show && s.bars.zero) || (s.lines.show && s.lines.zero));
2288                        format.push({ y: true, number: true, required: false, defaultValue: 0, autoscale: autoscale });
2289                        if (s.bars.horizontal) {
2290                            delete format[format.length - 1].y;
2291                            format[format.length - 1].x = true;
2292                        }
2293                    }
2294
2295                    s.datapoints.format = format;
2296                }
2297
2298                if (s.datapoints.pointsize != null)
2299                    continue; // already filled in
2300
2301                s.datapoints.pointsize = format.length;
2302
2303                ps = s.datapoints.pointsize;
2304                points = s.datapoints.points;
2305
2306                var insertSteps = s.lines.show && s.lines.steps;
2307                s.xaxis.used = s.yaxis.used = true;
2308
2309                for (j = k = 0; j < data.length; ++j, k += ps) {
2310                    p = data[j];
2311
2312                    var nullify = p == null;
2313                    if (!nullify) {
2314                        for (m = 0; m < ps; ++m) {
2315                            val = p[m];
2316                            f = format[m];
2317
2318                            if (f) {
2319                                if (f.number && val != null) {
2320                                    val = +val; // convert to number
2321                                    if (isNaN(val))
2322                                        val = null;
2323                                    else if (val == Infinity)
2324                                        val = fakeInfinity;
2325                                    else if (val == -Infinity)
2326                                        val = -fakeInfinity;
2327                                }
2328
2329                                if (val == null) {
2330                                    if (f.required)
2331                                        nullify = true;
2332
2333                                    if (f.defaultValue != null)
2334                                        val = f.defaultValue;
2335                                }
2336                            }
2337
2338                            points[k + m] = val;
2339                        }
2340                    }
2341
2342                    if (nullify) {
2343                        for (m = 0; m < ps; ++m) {
2344                            val = points[k + m];
2345                            if (val != null) {
2346                                f = format[m];
2347                                // extract min/max info
2348                                if (f.autoscale !== false) {
2349                                    if (f.x) {
2350                                        updateAxis(s.xaxis, val, val);
2351                                    }
2352                                    if (f.y) {
2353                                        updateAxis(s.yaxis, val, val);
2354                                    }
2355                                }
2356                            }
2357                            points[k + m] = null;
2358                        }
2359                    }
2360                    else {
2361                        // a little bit of line specific stuff that
2362                        // perhaps shouldn't be here, but lacking
2363                        // better means...
2364                        if (insertSteps && k > 0
2365                            && points[k - ps] != null
2366                            && points[k - ps] != points[k]
2367                            && points[k - ps + 1] != points[k + 1]) {
2368                            // copy the point to make room for a middle point
2369                            for (m = 0; m < ps; ++m)
2370                                points[k + ps + m] = points[k + m];
2371
2372                            // middle point has same y
2373                            points[k + 1] = points[k - ps + 1];
2374
2375                            // we've added a point, better reflect that
2376                            k += ps;
2377                        }
2378                    }
2379                }
2380            }
2381
2382            // give the hooks a chance to run
2383            for (i = 0; i < series.length; ++i) {
2384                s = series[i];
2385
2386                executeHooks(hooks.processDatapoints, [ s, s.datapoints]);
2387            }
2388
2389            // second pass: find datamax/datamin for auto-scaling
2390            for (i = 0; i < series.length; ++i) {
2391                s = series[i];
2392                points = s.datapoints.points;
2393                ps = s.datapoints.pointsize;
2394                format = s.datapoints.format;
2395
2396                var xmin = topSentry, ymin = topSentry,
2397                    xmax = bottomSentry, ymax = bottomSentry;
2398
2399                for (j = 0; j < points.length; j += ps) {
2400                    if (points[j] == null)
2401                        continue;
2402
2403                    for (m = 0; m < ps; ++m) {
2404                        val = points[j + m];
2405                        f = format[m];
2406                        if (!f || f.autoscale === false || val == fakeInfinity || val == -fakeInfinity)
2407                            continue;
2408
2409                        if (f.x) {
2410                            if (val < xmin)
2411                                xmin = val;
2412                            if (val > xmax)
2413                                xmax = val;
2414                        }
2415                        if (f.y) {
2416                            if (val < ymin)
2417                                ymin = val;
2418                            if (val > ymax)
2419                                ymax = val;
2420                        }
2421                    }
2422                }
2423
2424                if (s.bars.show) {
2425                    // make sure we got room for the bar on the dancing floor
2426                    var delta;
2427
2428                    switch (s.bars.align) {
2429                        case "left":
2430                            delta = 0;
2431                            break;
2432                        case "right":
2433                            delta = -s.bars.barWidth;
2434                            break;
2435                        default:
2436                            delta = -s.bars.barWidth / 2;
2437                    }
2438
2439                    if (s.bars.horizontal) {
2440                        ymin += delta;
2441                        ymax += delta + s.bars.barWidth;
2442                    }
2443                    else {
2444                        xmin += delta;
2445                        xmax += delta + s.bars.barWidth;
2446                    }
2447                }
2448
2449                updateAxis(s.xaxis, xmin, xmax);
2450                updateAxis(s.yaxis, ymin, ymax);
2451            }
2452
2453            $.each(allAxes(), function (_, axis) {
2454                if (axis.datamin == topSentry)
2455                    axis.datamin = null;
2456                if (axis.datamax == bottomSentry)
2457                    axis.datamax = null;
2458            });
2459        }
2460
2461        function setupCanvases() {
2462
2463            // Make sure the placeholder is clear of everything except canvases
2464            // from a previous plot in this container that we'll try to re-use.
2465
2466            placeholder.css("padding", 0) // padding messes up the positioning
2467                .children().filter(function(){
2468                    return !$(this).hasClass("flot-overlay") && !$(this).hasClass('flot-base');
2469                }).remove();
2470
2471            if (placeholder.css("position") == 'static')
2472                placeholder.css("position", "relative"); // for positioning labels and overlay
2473
2474            surface = new Canvas("flot-base", placeholder);
2475            overlay = new Canvas("flot-overlay", placeholder); // overlay canvas for interactive features
2476
2477            ctx = surface.context;
2478            octx = overlay.context;
2479
2480            // define which element we're listening for events on
2481            eventHolder = $(overlay.element).unbind();
2482
2483            // If we're re-using a plot object, shut down the old one
2484
2485            var existing = placeholder.data("plot");
2486
2487            if (existing) {
2488                existing.shutdown();
2489                overlay.clear();
2490            }
2491
2492            // save in case we get replotted
2493            placeholder.data("plot", plot);
2494        }
2495
2496        function bindEvents() {
2497            // bind events
2498            if (options.grid.hoverable) {
2499                eventHolder.mousemove(onMouseMove);
2500
2501                // Use bind, rather than .mouseleave, because we officially
2502                // still support jQuery 1.2.6, which doesn't define a shortcut
2503                // for mouseenter or mouseleave.  This was a bug/oversight that
2504                // was fixed somewhere around 1.3.x.  We can return to using
2505                // .mouseleave when we drop support for 1.2.6.
2506
2507                eventHolder.bind("mouseleave", onMouseLeave);
2508            }
2509
2510            if (options.grid.clickable)
2511                eventHolder.click(onClick);
2512
2513            executeHooks(hooks.bindEvents, [eventHolder]);
2514        }
2515
2516        function shutdown() {
2517            if (redrawTimeout)
2518                clearTimeout(redrawTimeout);
2519
2520            eventHolder.unbind("mousemove", onMouseMove);
2521            eventHolder.unbind("mouseleave", onMouseLeave);
2522            eventHolder.unbind("click", onClick);
2523
2524            executeHooks(hooks.shutdown, [eventHolder]);
2525        }
2526
2527        function setTransformationHelpers(axis) {
2528            // set helper functions on the axis, assumes plot area
2529            // has been computed already
2530
2531            function identity(x) { return x; }
2532
2533            var s, m, t = axis.options.transform || identity,
2534                it = axis.options.inverseTransform;
2535
2536            // precompute how much the axis is scaling a point
2537            // in canvas space
2538            if (axis.direction == "x") {
2539                s = axis.scale = plotWidth / Math.abs(t(axis.max) - t(axis.min));
2540                m = Math.min(t(axis.max), t(axis.min));
2541            }
2542            else {
2543                s = axis.scale = plotHeight / Math.abs(t(axis.max) - t(axis.min));
2544                s = -s;
2545                m = Math.max(t(axis.max), t(axis.min));
2546            }
2547
2548            // data point to canvas coordinate
2549            if (t == identity) // slight optimization
2550                axis.p2c = function (p) { return (p - m) * s; };
2551            else
2552                axis.p2c = function (p) { return (t(p) - m) * s; };
2553            // canvas coordinate to data point
2554            if (!it)
2555                axis.c2p = function (c) { return m + c / s; };
2556            else
2557                axis.c2p = function (c) { return it(m + c / s); };
2558        }
2559
2560        function measureTickLabels(axis) {
2561
2562            var opts = axis.options,
2563                ticks = axis.ticks || [],
2564                labelWidth = opts.labelWidth || 0,
2565                labelHeight = opts.labelHeight || 0,
2566                maxWidth = labelWidth || (axis.direction == "x" ? Math.floor(surface.width / (ticks.length || 1)) : null),
2567                legacyStyles = axis.direction + "Axis " + axis.direction + axis.n + "Axis",
2568                layer = "flot-" + axis.direction + "-axis flot-" + axis.direction + axis.n + "-axis " + legacyStyles,
2569                font = opts.font || "flot-tick-label tickLabel";
2570
2571            for (var i = 0; i < ticks.length; ++i) {
2572
2573                var t = ticks[i];
2574
2575                if (!t.label)
2576                    continue;
2577
2578                var info = surface.getTextInfo(layer, t.label, font, null, maxWidth);
2579
2580                labelWidth = Math.max(labelWidth, info.width);
2581                labelHeight = Math.max(labelHeight, info.height);
2582            }
2583
2584            axis.labelWidth = opts.labelWidth || labelWidth;
2585            axis.labelHeight = opts.labelHeight || labelHeight;
2586        }
2587
2588        function allocateAxisBoxFirstPhase(axis) {
2589            // find the bounding box of the axis by looking at label
2590            // widths/heights and ticks, make room by diminishing the
2591            // plotOffset; this first phase only looks at one
2592            // dimension per axis, the other dimension depends on the
2593            // other axes so will have to wait
2594
2595            var lw = axis.labelWidth,
2596                lh = axis.labelHeight,
2597                pos = axis.options.position,
2598                isXAxis = axis.direction === "x",
2599                tickLength = axis.options.tickLength,
2600                axisMargin = options.grid.axisMargin,
2601                padding = options.grid.labelMargin,
2602                innermost = true,
2603                outermost = true,
2604                first = true,
2605                found = false;
2606
2607            // Determine the axis's position in its direction and on its side
2608
2609            $.each(isXAxis ? xaxes : yaxes, function(i, a) {
2610                if (a && (a.show || a.reserveSpace)) {
2611                    if (a === axis) {
2612                        found = true;
2613                    } else if (a.options.position === pos) {
2614                        if (found) {
2615                            outermost = false;
2616                        } else {
2617                            innermost = false;
2618                        }
2619                    }
2620                    if (!found) {
2621                        first = false;
2622                    }
2623                }
2624            });
2625
2626            // The outermost axis on each side has no margin
2627
2628            if (outermost) {
2629                axisMargin = 0;
2630            }
2631
2632            // The ticks for the first axis in each direction stretch across
2633
2634            if (tickLength == null) {
2635                tickLength = first ? "full" : 5;
2636            }
2637
2638            if (!isNaN(+tickLength))
2639                padding += +tickLength;
2640
2641            if (isXAxis) {
2642                lh += padding;
2643
2644                if (pos == "bottom") {
2645                    plotOffset.bottom += lh + axisMargin;
2646                    axis.box = { top: surface.height - plotOffset.bottom, height: lh };
2647                }
2648                else {
2649                    axis.box = { top: plotOffset.top + axisMargin, height: lh };
2650                    plotOffset.top += lh + axisMargin;
2651                }
2652            }
2653            else {
2654                lw += padding;
2655
2656                if (pos == "left") {
2657                    axis.box = { left: plotOffset.left + axisMargin, width: lw };
2658                    plotOffset.left += lw + axisMargin;
2659                }
2660                else {
2661                    plotOffset.right += lw + axisMargin;
2662                    axis.box = { left: surface.width - plotOffset.right, width: lw };
2663                }
2664            }
2665
2666             // save for future reference
2667            axis.position = pos;
2668            axis.tickLength = tickLength;
2669            axis.box.padding = padding;
2670            axis.innermost = innermost;
2671        }
2672
2673        function allocateAxisBoxSecondPhase(axis) {
2674            // now that all axis boxes have been placed in one
2675            // dimension, we can set the remaining dimension coordinates
2676            if (axis.direction == "x") {
2677                axis.box.left = plotOffset.left - axis.labelWidth / 2;
2678                axis.box.width = surface.width - plotOffset.left - plotOffset.right + axis.labelWidth;
2679            }
2680            else {
2681                axis.box.top = plotOffset.top - axis.labelHeight / 2;
2682                axis.box.height = surface.height - plotOffset.bottom - plotOffset.top + axis.labelHeight;
2683            }
2684        }
2685
2686        function adjustLayoutForThingsStickingOut() {
2687            // possibly adjust plot offset to ensure everything stays
2688            // inside the canvas and isn't clipped off
2689
2690            var minMargin = options.grid.minBorderMargin,
2691                axis, i;
2692
2693            // check stuff from the plot (FIXME: this should just read
2694            // a value from the series, otherwise it's impossible to
2695            // customize)
2696            if (minMargin == null) {
2697                minMargin = 0;
2698                for (i = 0; i < series.length; ++i)
2699                    minMargin = Math.max(minMargin, 2 * (series[i].points.radius + series[i].points.lineWidth/2));
2700            }
2701
2702            var margins = {
2703                left: minMargin,
2704                right: minMargin,
2705                top: minMargin,
2706                bottom: minMargin
2707            };
2708
2709            // check axis labels, note we don't check the actual
2710            // labels but instead use the overall width/height to not
2711            // jump as much around with replots
2712            $.each(allAxes(), function (_, axis) {
2713                if (axis.reserveSpace && axis.ticks && axis.ticks.length) {
2714                    if (axis.direction === "x") {
2715                        margins.left = Math.max(margins.left, axis.labelWidth / 2);
2716                        margins.right = Math.max(margins.right, axis.labelWidth / 2);
2717                    } else {
2718                        margins.bottom = Math.max(margins.bottom, axis.labelHeight / 2);
2719                        margins.top = Math.max(margins.top, axis.labelHeight / 2);
2720                    }
2721                }
2722            });
2723
2724            plotOffset.left = Math.ceil(Math.max(margins.left, plotOffset.left));
2725            plotOffset.right = Math.ceil(Math.max(margins.right, plotOffset.right));
2726            plotOffset.top = Math.ceil(Math.max(margins.top, plotOffset.top));
2727            plotOffset.bottom = Math.ceil(Math.max(margins.bottom, plotOffset.bottom));
2728        }
2729
2730        function setupGrid() {
2731            var i, axes = allAxes(), showGrid = options.grid.show;
2732
2733            // Initialize the plot's offset from the edge of the canvas
2734
2735            for (var a in plotOffset) {
2736                var margin = options.grid.margin || 0;
2737                plotOffset[a] = typeof margin == "number" ? margin : margin[a] || 0;
2738            }
2739
2740            executeHooks(hooks.processOffset, [plotOffset]);
2741
2742            // If the grid is visible, add its border width to the offset
2743
2744            for (var a in plotOffset) {
2745                if(typeof(options.grid.borderWidth) == "object") {
2746                    plotOffset[a] += showGrid ? options.grid.borderWidth[a] : 0;
2747                }
2748                else {
2749                    plotOffset[a] += showGrid ? options.grid.borderWidth : 0;
2750                }
2751            }
2752
2753            $.each(axes, function (_, axis) {
2754                var axisOpts = axis.options;
2755                axis.show = axisOpts.show == null ? axis.used : axisOpts.show;
2756                axis.reserveSpace = axisOpts.reserveSpace == null ? axis.show : axisOpts.reserveSpace;
2757                setRange(axis);
2758            });
2759
2760            if (showGrid) {
2761
2762                var allocatedAxes = $.grep(axes, function (axis) {
2763                    return axis.show || axis.reserveSpace;
2764                });
2765
2766                $.each(allocatedAxes, function (_, axis) {
2767                    // make the ticks
2768                    setupTickGeneration(axis);
2769                    setTicks(axis);
2770                    snapRangeToTicks(axis, axis.ticks);
2771                    // find labelWidth/Height for axis
2772                    measureTickLabels(axis);
2773                });
2774
2775                // with all dimensions calculated, we can compute the
2776                // axis bounding boxes, start from the outside
2777                // (reverse order)
2778                for (i = allocatedAxes.length - 1; i >= 0; --i)
2779                    allocateAxisBoxFirstPhase(allocatedAxes[i]);
2780
2781                // make sure we've got enough space for things that
2782                // might stick out
2783                adjustLayoutForThingsStickingOut();
2784
2785                $.each(allocatedAxes, function (_, axis) {
2786                    allocateAxisBoxSecondPhase(axis);
2787                });
2788            }
2789
2790            plotWidth = surface.width - plotOffset.left - plotOffset.right;
2791            plotHeight = surface.height - plotOffset.bottom - plotOffset.top;
2792
2793            // now we got the proper plot dimensions, we can compute the scaling
2794            $.each(axes, function (_, axis) {
2795                setTransformationHelpers(axis);
2796            });
2797
2798            if (showGrid) {
2799                drawAxisLabels();
2800            }
2801
2802            insertLegend();
2803        }
2804
2805        function setRange(axis) {
2806            var opts = axis.options,
2807                min = +(opts.min != null ? opts.min : axis.datamin),
2808                max = +(opts.max != null ? opts.max : axis.datamax),
2809                delta = max - min;
2810
2811            if (delta == 0.0) {
2812                // degenerate case
2813                var widen = max == 0 ? 1 : 0.01;
2814
2815                if (opts.min == null)
2816                    min -= widen;
2817                // always widen max if we couldn't widen min to ensure we
2818                // don't fall into min == max which doesn't work
2819                if (opts.max == null || opts.min != null)
2820                    max += widen;
2821            }
2822            else {
2823                // consider autoscaling
2824                var margin = opts.autoscaleMargin;
2825                if (margin != null) {
2826                    if (opts.min == null) {
2827                        min -= delta * margin;
2828                        // make sure we don't go below zero if all values
2829                        // are positive
2830                        if (min < 0 && axis.datamin != null && axis.datamin >= 0)
2831                            min = 0;
2832                    }
2833                    if (opts.max == null) {
2834                        max += delta * margin;
2835                        if (max > 0 && axis.datamax != null && axis.datamax <= 0)
2836                            max = 0;
2837                    }
2838                }
2839            }
2840            axis.min = min;
2841            axis.max = max;
2842        }
2843
2844        function setupTickGeneration(axis) {
2845            var opts = axis.options;
2846
2847            // estimate number of ticks
2848            var noTicks;
2849            if (typeof opts.ticks == "number" && opts.ticks > 0)
2850                noTicks = opts.ticks;
2851            else
2852                // heuristic based on the model a*sqrt(x) fitted to
2853                // some data points that seemed reasonable
2854                noTicks = 0.3 * Math.sqrt(axis.direction == "x" ? surface.width : surface.height);
2855
2856            var delta = (axis.max - axis.min) / noTicks,
2857                dec = -Math.floor(Math.log(delta) / Math.LN10),
2858                maxDec = opts.tickDecimals;
2859
2860            if (maxDec != null && dec > maxDec) {
2861                dec = maxDec;
2862            }
2863
2864            var magn = Math.pow(10, -dec),
2865                norm = delta / magn, // norm is between 1.0 and 10.0
2866                size;
2867
2868            if (norm < 1.5) {
2869                size = 1;
2870            } else if (norm < 3) {
2871                size = 2;
2872                // special case for 2.5, requires an extra decimal
2873                if (norm > 2.25 && (maxDec == null || dec + 1 <= maxDec)) {
2874                    size = 2.5;
2875                    ++dec;
2876                }
2877            } else if (norm < 7.5) {
2878                size = 5;
2879            } else {
2880                size = 10;
2881            }
2882
2883            size *= magn;
2884
2885            if (opts.minTickSize != null && size < opts.minTickSize) {
2886                size = opts.minTickSize;
2887            }
2888
2889            axis.delta = delta;
2890            axis.tickDecimals = Math.max(0, maxDec != null ? maxDec : dec);
2891            axis.tickSize = opts.tickSize || size;
2892
2893            // Time mode was moved to a plug-in in 0.8, and since so many people use it
2894            // we'll add an especially friendly reminder to make sure they included it.
2895
2896            if (opts.mode == "time" && !axis.tickGenerator) {
2897                throw new Error("Time mode requires the flot.time plugin.");
2898            }
2899
2900            // Flot supports base-10 axes; any other mode else is handled by a plug-in,
2901            // like flot.time.js.
2902
2903            if (!axis.tickGenerator) {
2904
2905                axis.tickGenerator = function (axis) {
2906
2907                    var ticks = [],
2908                        start = floorInBase(axis.min, axis.tickSize),
2909                        i = 0,
2910                        v = Number.NaN,
2911                        prev;
2912
2913                    do {
2914                        prev = v;
2915                        v = start + i * axis.tickSize;
2916                        ticks.push(v);
2917                        ++i;
2918                    } while (v < axis.max && v != prev);
2919                    return ticks;
2920                };
2921
2922				axis.tickFormatter = function (value, axis) {
2923
2924					var factor = axis.tickDecimals ? Math.pow(10, axis.tickDecimals) : 1;
2925					var formatted = "" + Math.round(value * factor) / factor;
2926
2927					// If tickDecimals was specified, ensure that we have exactly that
2928					// much precision; otherwise default to the value's own precision.
2929
2930					if (axis.tickDecimals != null) {
2931						var decimal = formatted.indexOf(".");
2932						var precision = decimal == -1 ? 0 : formatted.length - decimal - 1;
2933						if (precision < axis.tickDecimals) {
2934							return (precision ? formatted : formatted + ".") + ("" + factor).substr(1, axis.tickDecimals - precision);
2935						}
2936					}
2937
2938                    return formatted;
2939                };
2940            }
2941
2942            if ($.isFunction(opts.tickFormatter))
2943                axis.tickFormatter = function (v, axis) { return "" + opts.tickFormatter(v, axis); };
2944
2945            if (opts.alignTicksWithAxis != null) {
2946                var otherAxis = (axis.direction == "x" ? xaxes : yaxes)[opts.alignTicksWithAxis - 1];
2947                if (otherAxis && otherAxis.used && otherAxis != axis) {
2948                    // consider snapping min/max to outermost nice ticks
2949                    var niceTicks = axis.tickGenerator(axis);
2950                    if (niceTicks.length > 0) {
2951                        if (opts.min == null)
2952                            axis.min = Math.min(axis.min, niceTicks[0]);
2953                        if (opts.max == null && niceTicks.length > 1)
2954                            axis.max = Math.max(axis.max, niceTicks[niceTicks.length - 1]);
2955                    }
2956
2957                    axis.tickGenerator = function (axis) {
2958                        // copy ticks, scaled to this axis
2959                        var ticks = [], v, i;
2960                        for (i = 0; i < otherAxis.ticks.length; ++i) {
2961                            v = (otherAxis.ticks[i].v - otherAxis.min) / (otherAxis.max - otherAxis.min);
2962                            v = axis.min + v * (axis.max - axis.min);
2963                            ticks.push(v);
2964                        }
2965                        return ticks;
2966                    };
2967
2968                    // we might need an extra decimal since forced
2969                    // ticks don't necessarily fit naturally
2970                    if (!axis.mode && opts.tickDecimals == null) {
2971                        var extraDec = Math.max(0, -Math.floor(Math.log(axis.delta) / Math.LN10) + 1),
2972                            ts = axis.tickGenerator(axis);
2973
2974                        // only proceed if the tick interval rounded
2975                        // with an extra decimal doesn't give us a
2976                        // zero at end
2977                        if (!(ts.length > 1 && /\..*0$/.test((ts[1] - ts[0]).toFixed(extraDec))))
2978                            axis.tickDecimals = extraDec;
2979                    }
2980                }
2981            }
2982        }
2983
2984        function setTicks(axis) {
2985            var oticks = axis.options.ticks, ticks = [];
2986            if (oticks == null || (typeof oticks == "number" && oticks > 0))
2987                ticks = axis.tickGenerator(axis);
2988            else if (oticks) {
2989                if ($.isFunction(oticks))
2990                    // generate the ticks
2991                    ticks = oticks(axis);
2992                else
2993                    ticks = oticks;
2994            }
2995
2996            // clean up/labelify the supplied ticks, copy them over
2997            var i, v;
2998            axis.ticks = [];
2999            for (i = 0; i < ticks.length; ++i) {
3000                var label = null;
3001                var t = ticks[i];
3002                if (typeof t == "object") {
3003                    v = +t[0];
3004                    if (t.length > 1)
3005                        label = t[1];
3006                }
3007                else
3008                    v = +t;
3009                if (label == null)
3010                    label = axis.tickFormatter(v, axis);
3011                if (!isNaN(v))
3012                    axis.ticks.push({ v: v, label: label });
3013            }
3014        }
3015
3016        function snapRangeToTicks(axis, ticks) {
3017            if (axis.options.autoscaleMargin && ticks.length > 0) {
3018                // snap to ticks
3019                if (axis.options.min == null)
3020                    axis.min = Math.min(axis.min, ticks[0].v);
3021                if (axis.options.max == null && ticks.length > 1)
3022                    axis.max = Math.max(axis.max, ticks[ticks.length - 1].v);
3023            }
3024        }
3025
3026        function draw() {
3027
3028            surface.clear();
3029
3030            executeHooks(hooks.drawBackground, [ctx]);
3031
3032            var grid = options.grid;
3033
3034            // draw background, if any
3035            if (grid.show && grid.backgroundColor)
3036                drawBackground();
3037
3038            if (grid.show && !grid.aboveData) {
3039                drawGrid();
3040            }
3041
3042            for (var i = 0; i < series.length; ++i) {
3043                executeHooks(hooks.drawSeries, [ctx, series[i]]);
3044                drawSeries(series[i]);
3045            }
3046
3047            executeHooks(hooks.draw, [ctx]);
3048
3049            if (grid.show && grid.aboveData) {
3050                drawGrid();
3051            }
3052
3053            surface.render();
3054
3055            // A draw implies that either the axes or data have changed, so we
3056            // should probably update the overlay highlights as well.
3057
3058            triggerRedrawOverlay();
3059        }
3060
3061        function extractRange(ranges, coord) {
3062            var axis, from, to, key, axes = allAxes();
3063
3064            for (var i = 0; i < axes.length; ++i) {
3065                axis = axes[i];
3066                if (axis.direction == coord) {
3067                    key = coord + axis.n + "axis";
3068                    if (!ranges[key] && axis.n == 1)
3069                        key = coord + "axis"; // support x1axis as xaxis
3070                    if (ranges[key]) {
3071                        from = ranges[key].from;
3072                        to = ranges[key].to;
3073                        break;
3074                    }
3075                }
3076            }
3077
3078            // backwards-compat stuff - to be removed in future
3079            if (!ranges[key]) {
3080                axis = coord == "x" ? xaxes[0] : yaxes[0];
3081                from = ranges[coord + "1"];
3082                to = ranges[coord + "2"];
3083            }
3084
3085            // auto-reverse as an added bonus
3086            if (from != null && to != null && from > to) {
3087                var tmp = from;
3088                from = to;
3089                to = tmp;
3090            }
3091
3092            return { from: from, to: to, axis: axis };
3093        }
3094
3095        function drawBackground() {
3096            ctx.save();
3097            ctx.translate(plotOffset.left, plotOffset.top);
3098
3099            ctx.fillStyle = getColorOrGradient(options.grid.backgroundColor, plotHeight, 0, "rgba(255, 255, 255, 0)");
3100            ctx.fillRect(0, 0, plotWidth, plotHeight);
3101            ctx.restore();
3102        }
3103
3104        function drawGrid() {
3105            var i, axes, bw, bc;
3106
3107            ctx.save();
3108            ctx.translate(plotOffset.left, plotOffset.top);
3109
3110            // draw markings
3111            var markings = options.grid.markings;
3112            if (markings) {
3113                if ($.isFunction(markings)) {
3114                    axes = plot.getAxes();
3115                    // xmin etc. is backwards compatibility, to be
3116                    // removed in the future
3117                    axes.xmin = axes.xaxis.min;
3118                    axes.xmax = axes.xaxis.max;
3119                    axes.ymin = axes.yaxis.min;
3120                    axes.ymax = axes.yaxis.max;
3121
3122                    markings = markings(axes);
3123                }
3124
3125                for (i = 0; i < markings.length; ++i) {
3126                    var m = markings[i],
3127                        xrange = extractRange(m, "x"),
3128                        yrange = extractRange(m, "y");
3129
3130                    // fill in missing
3131                    if (xrange.from == null)
3132                        xrange.from = xrange.axis.min;
3133                    if (xrange.to == null)
3134                        xrange.to = xrange.axis.max;
3135                    if (yrange.from == null)
3136                        yrange.from = yrange.axis.min;
3137                    if (yrange.to == null)
3138                        yrange.to = yrange.axis.max;
3139
3140                    // clip
3141                    if (xrange.to < xrange.axis.min || xrange.from > xrange.axis.max ||
3142                        yrange.to < yrange.axis.min || yrange.from > yrange.axis.max)
3143                        continue;
3144
3145                    xrange.from = Math.max(xrange.from, xrange.axis.min);
3146                    xrange.to = Math.min(xrange.to, xrange.axis.max);
3147                    yrange.from = Math.max(yrange.from, yrange.axis.min);
3148                    yrange.to = Math.min(yrange.to, yrange.axis.max);
3149
3150                    var xequal = xrange.from === xrange.to,
3151                        yequal = yrange.from === yrange.to;
3152
3153                    if (xequal && yequal) {
3154                        continue;
3155                    }
3156
3157                    // then draw
3158                    xrange.from = Math.floor(xrange.axis.p2c(xrange.from));
3159                    xrange.to = Math.floor(xrange.axis.p2c(xrange.to));
3160                    yrange.from = Math.floor(yrange.axis.p2c(yrange.from));
3161                    yrange.to = Math.floor(yrange.axis.p2c(yrange.to));
3162
3163                    if (xequal || yequal) {
3164                        var lineWidth = m.lineWidth || options.grid.markingsLineWidth,
3165                            subPixel = lineWidth % 2 ? 0.5 : 0;
3166                        ctx.beginPath();
3167                        ctx.strokeStyle = m.color || options.grid.markingsColor;
3168                        ctx.lineWidth = lineWidth;
3169                        if (xequal) {
3170                            ctx.moveTo(xrange.to + subPixel, yrange.from);
3171                            ctx.lineTo(xrange.to + subPixel, yrange.to);
3172                        } else {
3173                            ctx.moveTo(xrange.from, yrange.to + subPixel);
3174                            ctx.lineTo(xrange.to, yrange.to + subPixel);                            
3175                        }
3176                        ctx.stroke();
3177                    } else {
3178                        ctx.fillStyle = m.color || options.grid.markingsColor;
3179                        ctx.fillRect(xrange.from, yrange.to,
3180                                     xrange.to - xrange.from,
3181                                     yrange.from - yrange.to);
3182                    }
3183                }
3184            }
3185
3186            // draw the ticks
3187            axes = allAxes();
3188            bw = options.grid.borderWidth;
3189
3190            for (var j = 0; j < axes.length; ++j) {
3191                var axis = axes[j], box = axis.box,
3192                    t = axis.tickLength, x, y, xoff, yoff;
3193                if (!axis.show || axis.ticks.length == 0)
3194                    continue;
3195
3196                ctx.lineWidth = 1;
3197
3198                // find the edges
3199                if (axis.direction == "x") {
3200                    x = 0;
3201                    if (t == "full")
3202                        y = (axis.position == "top" ? 0 : plotHeight);
3203                    else
3204                        y = box.top - plotOffset.top + (axis.position == "top" ? box.height : 0);
3205                }
3206                else {
3207                    y = 0;
3208                    if (t == "full")
3209                        x = (axis.position == "left" ? 0 : plotWidth);
3210                    else
3211                        x = box.left - plotOffset.left + (axis.position == "left" ? box.width : 0);
3212                }
3213
3214                // draw tick bar
3215                if (!axis.innermost) {
3216                    ctx.strokeStyle = axis.options.color;
3217                    ctx.beginPath();
3218                    xoff = yoff = 0;
3219                    if (axis.direction == "x")
3220                        xoff = plotWidth + 1;
3221                    else
3222                        yoff = plotHeight + 1;
3223
3224                    if (ctx.lineWidth == 1) {
3225                        if (axis.direction == "x") {
3226                            y = Math.floor(y) + 0.5;
3227                        } else {
3228                            x = Math.floor(x) + 0.5;
3229                        }
3230                    }
3231
3232                    ctx.moveTo(x, y);
3233                    ctx.lineTo(x + xoff, y + yoff);
3234                    ctx.stroke();
3235                }
3236
3237                // draw ticks
3238
3239                ctx.strokeStyle = axis.options.tickColor;
3240
3241                ctx.beginPath();
3242                for (i = 0; i < axis.ticks.length; ++i) {
3243                    var v = axis.ticks[i].v;
3244
3245                    xoff = yoff = 0;
3246
3247                    if (isNaN(v) || v < axis.min || v > axis.max
3248                        // skip those lying on the axes if we got a border
3249                        || (t == "full"
3250                            && ((typeof bw == "object" && bw[axis.position] > 0) || bw > 0)
3251                            && (v == axis.min || v == axis.max)))
3252                        continue;
3253
3254                    if (axis.direction == "x") {
3255                        x = axis.p2c(v);
3256                        yoff = t == "full" ? -plotHeight : t;
3257
3258                        if (axis.position == "top")
3259                            yoff = -yoff;
3260                    }
3261                    else {
3262                        y = axis.p2c(v);
3263                        xoff = t == "full" ? -plotWidth : t;
3264
3265                        if (axis.position == "left")
3266                            xoff = -xoff;
3267                    }
3268
3269                    if (ctx.lineWidth == 1) {
3270                        if (axis.direction == "x")
3271                            x = Math.floor(x) + 0.5;
3272                        else
3273                            y = Math.floor(y) + 0.5;
3274                    }
3275
3276                    ctx.moveTo(x, y);
3277                    ctx.lineTo(x + xoff, y + yoff);
3278                }
3279
3280                ctx.stroke();
3281            }
3282
3283
3284            // draw border
3285            if (bw) {
3286                // If either borderWidth or borderColor is an object, then draw the border
3287                // line by line instead of as one rectangle
3288                bc = options.grid.borderColor;
3289                if(typeof bw == "object" || typeof bc == "object") {
3290                    if (typeof bw !== "object") {
3291                        bw = {top: bw, right: bw, bottom: bw, left: bw};
3292                    }
3293                    if (typeof bc !== "object") {
3294                        bc = {top: bc, right: bc, bottom: bc, left: bc};
3295                    }
3296
3297                    if (bw.top > 0) {
3298                        ctx.strokeStyle = bc.top;
3299                        ctx.lineWidth = bw.top;
3300                        ctx.beginPath();
3301                        ctx.moveTo(0 - bw.left, 0 - bw.top/2);
3302                        ctx.lineTo(plotWidth, 0 - bw.top/2);
3303                        ctx.stroke();
3304                    }
3305
3306                    if (bw.right > 0) {
3307                        ctx.strokeStyle = bc.right;
3308                        ctx.lineWidth = bw.right;
3309                        ctx.beginPath();
3310                        ctx.moveTo(plotWidth + bw.right / 2, 0 - bw.top);
3311                        ctx.lineTo(plotWidth + bw.right / 2, plotHeight);
3312                        ctx.stroke();
3313                    }
3314
3315                    if (bw.bottom > 0) {
3316                        ctx.strokeStyle = bc.bottom;
3317                        ctx.lineWidth = bw.bottom;
3318                        ctx.beginPath();
3319                        ctx.moveTo(plotWidth + bw.right, plotHeight + bw.bottom / 2);
3320                        ctx.lineTo(0, plotHeight + bw.bottom / 2);
3321                        ctx.stroke();
3322                    }
3323
3324                    if (bw.left > 0) {
3325                        ctx.strokeStyle = bc.left;
3326                        ctx.lineWidth = bw.left;
3327                        ctx.beginPath();
3328                        ctx.moveTo(0 - bw.left/2, plotHeight + bw.bottom);
3329                        ctx.lineTo(0- bw.left/2, 0);
3330                        ctx.stroke();
3331                    }
3332                }
3333                else {
3334                    ctx.lineWidth = bw;
3335                    ctx.strokeStyle = options.grid.borderColor;
3336                    ctx.strokeRect(-bw/2, -bw/2, plotWidth + bw, plotHeight + bw);
3337                }
3338            }
3339
3340            ctx.restore();
3341        }
3342
3343        function drawAxisLabels() {
3344
3345            $.each(allAxes(), function (_, axis) {
3346                var box = axis.box,
3347                    legacyStyles = axis.direction + "Axis " + axis.direction + axis.n + "Axis",
3348                    layer = "flot-" + axis.direction + "-axis flot-" + axis.direction + axis.n + "-axis " + legacyStyles,
3349                    font = axis.options.font || "flot-tick-label tickLabel",
3350                    tick, x, y, halign, valign;
3351
3352                // Remove text before checking for axis.show and ticks.length;
3353                // otherwise plugins, like flot-tickrotor, that draw their own
3354                // tick labels will end up with both theirs and the defaults.
3355
3356                surface.removeText(layer);
3357
3358                if (!axis.show || axis.ticks.length == 0)
3359                    return;
3360
3361                for (var i = 0; i < axis.ticks.length; ++i) {
3362
3363                    tick = axis.ticks[i];
3364                    if (!tick.label || tick.v < axis.min || tick.v > axis.max)
3365                        continue;
3366
3367                    if (axis.direction == "x") {
3368                        halign = "center";
3369                        x = plotOffset.left + axis.p2c(tick.v);
3370                        if (axis.position == "bottom") {
3371                            y = box.top + box.padding;
3372                        } else {
3373                            y = box.top + box.height - box.padding;
3374                            valign = "bottom";
3375                        }
3376                    } else {
3377                        valign = "middle";
3378                        y = plotOffset.top + axis.p2c(tick.v);
3379                        if (axis.position == "left") {
3380                            x = box.left + box.width - box.padding;
3381                            halign = "right";
3382                        } else {
3383                            x = box.left + box.padding;
3384                        }
3385                    }
3386
3387                    surface.addText(layer, x, y, tick.label, font, null, null, halign, valign);
3388                }
3389            });
3390        }
3391
3392        function drawSeries(series) {
3393            if (series.lines.show)
3394                drawSeriesLines(series);
3395            if (series.bars.show)
3396                drawSeriesBars(series);
3397            if (series.points.show)
3398                drawSeriesPoints(series);
3399        }
3400
3401        function drawSeriesLines(series) {
3402            function plotLine(datapoints, xoffset, yoffset, axisx, axisy) {
3403                var points = datapoints.points,
3404                    ps = datapoints.pointsize,
3405                    prevx = null, prevy = null;
3406
3407                ctx.beginPath();
3408                for (var i = ps; i < points.length; i += ps) {
3409                    var x1 = points[i - ps], y1 = points[i - ps + 1],
3410                        x2 = points[i], y2 = points[i + 1];
3411
3412                    if (x1 == null || x2 == null)
3413                        continue;
3414
3415                    // clip with ymin
3416                    if (y1 <= y2 && y1 < axisy.min) {
3417                        if (y2 < axisy.min)
3418                            continue;   // line segment is outside
3419                        // compute new intersection point
3420                        x1 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;
3421                        y1 = axisy.min;
3422                    }
3423                    else if (y2 <= y1 && y2 < axisy.min) {
3424                        if (y1 < axisy.min)
3425                            continue;
3426                        x2 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;
3427                        y2 = axisy.min;
3428                    }
3429
3430                    // clip with ymax
3431                    if (y1 >= y2 && y1 > axisy.max) {
3432                        if (y2 > axisy.max)
3433                            continue;
3434                        x1 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;
3435                        y1 = axisy.max;
3436                    }
3437                    else if (y2 >= y1 && y2 > axisy.max) {
3438                        if (y1 > axisy.max)
3439                            continue;
3440                        x2 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;
3441                        y2 = axisy.max;
3442                    }
3443
3444                    // clip with xmin
3445                    if (x1 <= x2 && x1 < axisx.min) {
3446                        if (x2 < axisx.min)
3447                            continue;
3448                        y1 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;
3449                        x1 = axisx.min;
3450                    }
3451                    else if (x2 <= x1 && x2 < axisx.min) {
3452                        if (x1 < axisx.min)
3453                            continue;
3454                        y2 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;
3455                        x2 = axisx.min;
3456                    }
3457
3458                    // clip with xmax
3459                    if (x1 >= x2 && x1 > axisx.max) {
3460                        if (x2 > axisx.max)
3461                            continue;
3462                        y1 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;
3463                        x1 = axisx.max;
3464                    }
3465                    else if (x2 >= x1 && x2 > axisx.max) {
3466                        if (x1 > axisx.max)
3467                            continue;
3468                        y2 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;
3469                        x2 = axisx.max;
3470                    }
3471
3472                    if (x1 != prevx || y1 != prevy)
3473                        ctx.moveTo(axisx.p2c(x1) + xoffset, axisy.p2c(y1) + yoffset);
3474
3475                    prevx = x2;
3476                    prevy = y2;
3477                    ctx.lineTo(axisx.p2c(x2) + xoffset, axisy.p2c(y2) + yoffset);
3478                }
3479                ctx.stroke();
3480            }
3481
3482            function plotLineArea(datapoints, axisx, axisy) {
3483                var points = datapoints.points,
3484                    ps = datapoints.pointsize,
3485                    bottom = Math.min(Math.max(0, axisy.min), axisy.max),
3486                    i = 0, top, areaOpen = false,
3487                    ypos = 1, segmentStart = 0, segmentEnd = 0;
3488
3489                // we process each segment in two turns, first forward
3490                // direction to sketch out top, then once we hit the
3491                // end we go backwards to sketch the bottom
3492                while (true) {
3493                    if (ps > 0 && i > points.length + ps)
3494                        break;
3495
3496                    i += ps; // ps is negative if going backwards
3497
3498                    var x1 = points[i - ps],
3499                        y1 = points[i - ps + ypos],
3500                        x2 = points[i], y2 = points[i + ypos];
3501
3502                    if (areaOpen) {
3503                        if (ps > 0 && x1 != null && x2 == null) {
3504                            // at turning point
3505                            segmentEnd = i;
3506                            ps = -ps;
3507                            ypos = 2;
3508                            continue;
3509                        }
3510
3511                        if (ps < 0 && i == segmentStart + ps) {
3512                            // done with the reverse sweep
3513                            ctx.fill();
3514                            areaOpen = false;
3515                            ps = -ps;
3516                            ypos = 1;
3517                            i = segmentStart = segmentEnd + ps;
3518                            continue;
3519                        }
3520                    }
3521
3522                    if (x1 == null || x2 == null)
3523                        continue;
3524
3525                    // clip x values
3526
3527                    // clip with xmin
3528                    if (x1 <= x2 && x1 < axisx.min) {
3529                        if (x2 < axisx.min)
3530                            continue;
3531                        y1 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;
3532                        x1 = axisx.min;
3533                    }
3534                    else if (x2 <= x1 && x2 < axisx.min) {
3535                        if (x1 < axisx.min)
3536                            continue;
3537                        y2 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;
3538                        x2 = axisx.min;
3539                    }
3540
3541                    // clip with xmax
3542                    if (x1 >= x2 && x1 > axisx.max) {
3543                        if (x2 > axisx.max)
3544                            continue;
3545                        y1 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;
3546                        x1 = axisx.max;
3547                    }
3548                    else if (x2 >= x1 && x2 > axisx.max) {
3549                        if (x1 > axisx.max)
3550                            continue;
3551                        y2 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;
3552                        x2 = axisx.max;
3553                    }
3554
3555                    if (!areaOpen) {
3556                        // open area
3557                        ctx.beginPath();
3558                        ctx.moveTo(axisx.p2c(x1), axisy.p2c(bottom));
3559                        areaOpen = true;
3560                    }
3561
3562                    // now first check the case where both is outside
3563                    if (y1 >= axisy.max && y2 >= axisy.max) {
3564                        ctx.lineTo(axisx.p2c(x1), axisy.p2c(axisy.max));
3565                        ctx.lineTo(axisx.p2c(x2), axisy.p2c(axisy.max));
3566                        continue;
3567                    }
3568                    else if (y1 <= axisy.min && y2 <= axisy.min) {
3569                        ctx.lineTo(axisx.p2c(x1), axisy.p2c(axisy.min));
3570                        ctx.lineTo(axisx.p2c(x2), axisy.p2c(axisy.min));
3571                        continue;
3572                    }
3573
3574                    // else it's a bit more complicated, there might
3575                    // be a flat maxed out rectangle first, then a
3576                    // triangular cutout or reverse; to find these
3577                    // keep track of the current x values
3578                    var x1old = x1, x2old = x2;
3579
3580                    // clip the y values, without shortcutting, we
3581                    // go through all cases in turn
3582
3583                    // clip with ymin
3584                    if (y1 <= y2 && y1 < axisy.min && y2 >= axisy.min) {
3585                        x1 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;
3586                        y1 = axisy.min;
3587                    }
3588                    else if (y2 <= y1 && y2 < axisy.min && y1 >= axisy.min) {
3589                        x2 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;
3590                        y2 = axisy.min;
3591                    }
3592
3593                    // clip with ymax
3594                    if (y1 >= y2 && y1 > axisy.max && y2 <= axisy.max) {
3595                        x1 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;
3596                        y1 = axisy.max;
3597                    }
3598                    else if (y2 >= y1 && y2 > axisy.max && y1 <= axisy.max) {
3599                        x2 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;
3600                        y2 = axisy.max;
3601                    }
3602
3603                    // if the x value was changed we got a rectangle
3604                    // to fill
3605                    if (x1 != x1old) {
3606                        ctx.lineTo(axisx.p2c(x1old), axisy.p2c(y1));
3607                        // it goes to (x1, y1), but we fill that below
3608                    }
3609
3610                    // fill triangular section, this sometimes result
3611                    // in redundant points if (x1, y1) hasn't changed
3612                    // from previous line to, but we just ignore that
3613                    ctx.lineTo(axisx.p2c(x1), axisy.p2c(y1));
3614                    ctx.lineTo(axisx.p2c(x2), axisy.p2c(y2));
3615
3616                    // fill the other rectangle if it's there
3617                    if (x2 != x2old) {
3618                        ctx.lineTo(axisx.p2c(x2), axisy.p2c(y2));
3619                        ctx.lineTo(axisx.p2c(x2old), axisy.p2c(y2));
3620                    }
3621                }
3622            }
3623
3624            ctx.save();
3625            ctx.translate(plotOffset.left, plotOffset.top);
3626            ctx.lineJoin = "round";
3627
3628            var lw = series.lines.lineWidth,
3629                sw = series.shadowSize;
3630            // FIXME: consider another form of shadow when filling is turned on
3631            if (lw > 0 && sw > 0) {
3632                // draw shadow as a thick and thin line with transparency
3633                ctx.lineWidth = sw;
3634                ctx.strokeStyle = "rgba(0,0,0,0.1)";
3635                // position shadow at angle from the mid of line
3636                var angle = Math.PI/18;
3637                plotLine(series.datapoints, Math.sin(angle) * (lw/2 + sw/2), Math.cos(angle) * (lw/2 + sw/2), series.xaxis, series.yaxis);
3638                ctx.lineWidth = sw/2;
3639                plotLine(series.datapoints, Math.sin(angle) * (lw/2 + sw/4), Math.cos(angle) * (lw/2 + sw/4), series.xaxis, series.yaxis);
3640            }
3641
3642            ctx.lineWidth = lw;
3643            ctx.strokeStyle = series.color;
3644            var fillStyle = getFillStyle(series.lines, series.color, 0, plotHeight);
3645            if (fillStyle) {
3646                ctx.fillStyle = fillStyle;
3647                plotLineArea(series.datapoints, series.xaxis, series.yaxis);
3648            }
3649
3650            if (lw > 0)
3651                plotLine(series.datapoints, 0, 0, series.xaxis, series.yaxis);
3652            ctx.restore();
3653        }
3654
3655        function drawSeriesPoints(series) {
3656            function plotPoints(datapoints, radius, fillStyle, offset, shadow, axisx, axisy, symbol) {
3657                var points = datapoints.points, ps = datapoints.pointsize;
3658
3659                for (var i = 0; i < points.length; i += ps) {
3660                    var x = points[i], y = points[i + 1];
3661                    if (x == null || x < axisx.min || x > axisx.max || y < axisy.min || y > axisy.max)
3662                        continue;
3663
3664                    ctx.beginPath();
3665                    x = axisx.p2c(x);
3666                    y = axisy.p2c(y) + offset;
3667                    if (symbol == "circle")
3668                        ctx.arc(x, y, radius, 0, shadow ? Math.PI : Math.PI * 2, false);
3669                    else
3670                        symbol(ctx, x, y, radius, shadow);
3671                    ctx.closePath();
3672
3673                    if (fillStyle) {
3674                        ctx.fillStyle = fillStyle;
3675                        ctx.fill();
3676                    }
3677                    ctx.stroke();
3678                }
3679            }
3680
3681            ctx.save();
3682            ctx.translate(plotOffset.left, plotOffset.top);
3683
3684            var lw = series.points.lineWidth,
3685                sw = series.shadowSize,
3686                radius = series.points.radius,
3687                symbol = series.points.symbol;
3688
3689            // If the user sets the line width to 0, we change it to a very 
3690            // small value. A line width of 0 seems to force the default of 1.
3691            // Doing the conditional here allows the shadow setting to still be 
3692            // optional even with a lineWidth of 0.
3693
3694            if( lw == 0 )
3695                lw = 0.0001;
3696
3697            if (lw > 0 && sw > 0) {
3698                // draw shadow in two steps
3699                var w = sw / 2;
3700                ctx.lineWidth = w;
3701                ctx.strokeStyle = "rgba(0,0,0,0.1)";
3702                plotPoints(series.datapoints, radius, null, w + w/2, true,
3703                           series.xaxis, series.yaxis, symbol);
3704
3705                ctx.strokeStyle = "rgba(0,0,0,0.2)";
3706                plotPoints(series.datapoints, radius, null, w/2, true,
3707                           series.xaxis, series.yaxis, symbol);
3708            }
3709
3710            ctx.lineWidth = lw;
3711            ctx.strokeStyle = series.color;
3712            plotPoints(series.datapoints, radius,
3713                       getFillStyle(series.points, series.color), 0, false,
3714                       series.xaxis, series.yaxis, symbol);
3715            ctx.restore();
3716        }
3717
3718        function drawBar(x, y, b, barLeft, barRight, fillStyleCallback, axisx, axisy, c, horizontal, lineWidth) {
3719            var left, right, bottom, top,
3720                drawLeft, drawRight, drawTop, drawBottom,
3721                tmp;
3722
3723            // in horizontal mode, we start the bar from the left
3724            // instead of from the bottom so it appears to be
3725            // horizontal rather than vertical
3726            if (horizontal) {
3727                drawBottom = drawRight = drawTop = true;
3728                drawLeft = false;
3729                left = b;
3730                right = x;
3731                top = y + barLeft;
3732                bottom = y + barRight;
3733
3734                // account for negative bars
3735                if (right < left) {
3736                    tmp = right;
3737                    right = left;
3738                    left = tmp;
3739                    drawLeft = true;
3740                    drawRight = false;
3741                }
3742            }
3743            else {
3744                drawLeft = drawRight = drawTop = true;
3745                drawBottom = false;
3746                left = x + barLeft;
3747                right = x + barRight;
3748                bottom = b;
3749                top = y;
3750
3751                // account for negative bars
3752                if (top < bottom) {
3753                    tmp = top;
3754                    top = bottom;
3755                    bottom = tmp;
3756                    drawBottom = true;
3757                    drawTop = false;
3758                }
3759            }
3760
3761            // clip
3762            if (right < axisx.min || left > axisx.max ||
3763                top < axisy.min || bottom > axisy.max)
3764                return;
3765
3766            if (left < axisx.min) {
3767                left = axisx.min;
3768                drawLeft = false;
3769            }
3770
3771            if (right > axisx.max) {
3772                right = axisx.max;
3773                drawRight = false;
3774            }
3775
3776            if (bottom < axisy.min) {
3777                bottom = axisy.min;
3778                drawBottom = false;
3779            }
3780
3781            if (top > axisy.max) {
3782                top = axisy.max;
3783                drawTop = false;
3784            }
3785
3786            left = axisx.p2c(left);
3787            bottom = axisy.p2c(bottom);
3788            right = axisx.p2c(right);
3789            top = axisy.p2c(top);
3790
3791            // fill the bar
3792            if (fillStyleCallback) {
3793                c.fillStyle = fillStyleCallback(bottom, top);
3794                c.fillRect(left, top, right - left, bottom - top)
3795            }
3796
3797            // draw outline
3798            if (lineWidth > 0 && (drawLeft || drawRight || drawTop || drawBottom)) {
3799                c.beginPath();
3800
3801                // FIXME: inline moveTo is buggy with excanvas
3802                c.moveTo(left, bottom);
3803                if (drawLeft)
3804                    c.lineTo(left, top);
3805                else
3806                    c.moveTo(left, top);
3807                if (drawTop)
3808                    c.lineTo(right, top);
3809                else
3810                    c.moveTo(right, top);
3811                if (drawRight)
3812                    c.lineTo(right, bottom);
3813                else
3814                    c.moveTo(right, bottom);
3815                if (drawBottom)
3816                    c.lineTo(left, bottom);
3817                else
3818                    c.moveTo(left, bottom);
3819                c.stroke();
3820            }
3821        }
3822
3823        function drawSeriesBars(series) {
3824            function plotBars(datapoints, barLeft, barRight, fillStyleCallback, axisx, axisy) {
3825                var points = datapoints.points, ps = datapoints.pointsize;
3826
3827                for (var i = 0; i < points.length; i += ps) {
3828                    if (points[i] == null)
3829                        continue;
3830                    drawBar(points[i], points[i + 1], points[i + 2], barLeft, barRight, fillStyleCallback, axisx, axisy, ctx, series.bars.horizontal, series.bars.lineWidth);
3831                }
3832            }
3833
3834            ctx.save();
3835            ctx.translate(plotOffset.left, plotOffset.top);
3836
3837            // FIXME: figure out a way to add shadows (for instance along the right edge)
3838            ctx.lineWidth = series.bars.lineWidth;
3839            ctx.strokeStyle = series.color;
3840
3841            var barLeft;
3842
3843            switch (series.bars.align) {
3844                case "left":
3845                    barLeft = 0;
3846                    break;
3847                case "right":
3848                    barLeft = -series.bars.barWidth;
3849                    break;
3850                default:
3851                    barLeft = -series.bars.barWidth / 2;
3852            }
3853
3854            var fillStyleCallback = series.bars.fill ? function (bottom, top) { return getFillStyle(series.bars, series.color, bottom, top); } : null;
3855            plotBars(series.datapoints, barLeft, barLeft + series.bars.barWidth, fillStyleCallback, series.xaxis, series.yaxis);
3856            ctx.restore();
3857        }
3858
3859        function getFillStyle(filloptions, seriesColor, bottom, top) {
3860            var fill = filloptions.fill;
3861            if (!fill)
3862                return null;
3863
3864            if (filloptions.fillColor)
3865                return getColorOrGradient(filloptions.fillColor, bottom, top, seriesColor);
3866
3867            var c = $.color.parse(seriesColor);
3868            c.a = typeof fill == "number" ? fill : 0.4;
3869            c.normalize();
3870            return c.toString();
3871        }
3872
3873        function insertLegend() {
3874
3875            if (options.legend.container != null) {
3876                $(options.legend.container).html("");
3877            } else {
3878                placeholder.find(".legend").remove();
3879            }
3880
3881            if (!options.legend.show) {
3882                return;
3883            }
3884
3885            var fragments = [], entries = [], rowStarted = false,
3886                lf = options.legend.labelFormatter, s, label;
3887
3888            // Build a list of legend entries, with each having a label and a color
3889
3890            for (var i = 0; i < series.length; ++i) {
3891                s = series[i];
3892                if (s.label) {
3893                    label = lf ? lf(s.label, s) : s.label;
3894                    if (label) {
3895                        entries.push({
3896                            label: label,
3897                            color: s.color
3898                        });
3899                    }
3900                }
3901            }
3902
3903            // Sort the legend using either the default or a custom comparator
3904
3905            if (options.legend.sorted) {
3906                if ($.isFunction(options.legend.sorted)) {
3907                    entries.sort(options.legend.sorted);
3908                } else if (options.legend.sorted == "reverse") {
3909                	entries.reverse();
3910                } else {
3911                    var ascending = options.legend.sorted != "descending";
3912                    entries.sort(function(a, b) {
3913                        return a.label == b.label ? 0 : (
3914                            (a.label < b.label) != ascending ? 1 : -1   // Logical XOR
3915                        );
3916                    });
3917                }
3918            }
3919
3920            // Generate markup for the list of entries, in their final order
3921
3922            for (var i = 0; i < entries.length; ++i) {
3923
3924                var entry = entries[i];
3925
3926                if (i % options.legend.noColumns == 0) {
3927                    if (rowStarted)
3928                        fragments.push('</tr>');
3929                    fragments.push('<tr>');
3930                    rowStarted = true;
3931                }
3932
3933                fragments.push(
3934                    '<td class="legendColorBox"><div style="border:1px solid ' + options.legend.labelBoxBorderColor + ';padding:1px"><div style="width:4px;height:0;border:5px solid ' + entry.color + ';overflow:hidden"></div></div></td>' +
3935                    '<td class="legendLabel">' + entry.label + '</td>'
3936                );
3937            }
3938
3939            if (rowStarted)
3940                fragments.push('</tr>');
3941
3942            if (fragments.length == 0)
3943                return;
3944
3945            var table = '<table style="font-size:smaller;color:' + options.grid.color + '">' + fragments.join("") + '</table>';
3946            if (options.legend.container != null)
3947                $(options.legend.container).html(table);
3948            else {
3949                var pos = "",
3950                    p = options.legend.position,
3951                    m = options.legend.margin;
3952                if (m[0] == null)
3953                    m = [m, m];
3954                if (p.charAt(0) == "n")
3955                    pos += 'top:' + (m[1] + plotOffset.top) + 'px;';
3956                else if (p.charAt(0) == "s")
3957                    pos += 'bottom:' + (m[1] + plotOffset.bottom) + 'px;';
3958                if (p.charAt(1) == "e")
3959                    pos += 'right:' + (m[0] + plotOffset.right) + 'px;';
3960                else if (p.charAt(1) == "w")
3961                    pos += 'left:' + (m[0] + plotOffset.left) + 'px;';
3962                var legend = $('<div class="legend">' + table.replace('style="', 'style="position:absolute;' + pos +';') + '</div>').appendTo(placeholder);
3963                if (options.legend.backgroundOpacity != 0.0) {
3964                    // put in the transparent background
3965                    // separately to avoid blended labels and
3966                    // label boxes
3967                    var c = options.legend.backgroundColor;
3968                    if (c == null) {
3969                        c = options.grid.backgroundColor;
3970                        if (c && typeof c == "string")
3971                            c = $.color.parse(c);
3972                        else
3973                            c = $.color.extract(legend, 'background-color');
3974                        c.a = 1;
3975                        c = c.toString();
3976                    }
3977                    var div = legend.children();
3978                    $('<div style="position:absolute;width:' + div.width() + 'px;height:' + div.height() + 'px;' + pos +'background-color:' + c + ';"> </div>').prependTo(legend).css('opacity', options.legend.backgroundOpacity);
3979                }
3980            }
3981        }
3982
3983
3984        // interactive features
3985
3986        var highlights = [],
3987            redrawTimeout = null;
3988
3989        // returns the data item the mouse is over, or null if none is found
3990        function findNearbyItem(mouseX, mouseY, seriesFilter) {
3991            var maxDistance = options.grid.mouseActiveRadius,
3992                smallestDistance = maxDistance * maxDistance + 1,
3993                item = null, foundPoint = false, i, j, ps;
3994
3995            for (i = series.length - 1; i >= 0; --i) {
3996                if (!seriesFilter(series[i]))
3997                    continue;
3998
3999                var s = series[i],
4000                    axisx = s.xaxis,
4001                    axisy = s.yaxis,
4002                    points = s.datapoints.points,
4003                    mx = axisx.c2p(mouseX), // precompute some stuff to make the loop faster
4004                    my = axisy.c2p(mouseY),
4005                    maxx = maxDistance / axisx.scale,
4006                    maxy = maxDistance / axisy.scale;
4007
4008                ps = s.datapoints.pointsize;
4009                // with inverse transforms, we can't use the maxx/maxy
4010                // optimization, sadly
4011                if (axisx.options.inverseTransform)
4012                    maxx = Number.MAX_VALUE;
4013                if (axisy.options.inverseTransform)
4014                    maxy = Number.MAX_VALUE;
4015
4016                if (s.lines.show || s.points.show) {
4017                    for (j = 0; j < points.length; j += ps) {
4018                        var x = points[j], y = points[j + 1];
4019                        if (x == null)
4020                            continue;
4021
4022                        // For points and lines, the cursor must be within a
4023                        // certain distance to the data point
4024                        if (x - mx > maxx || x - mx < -maxx ||
4025                            y - my > maxy || y - my < -maxy)
4026                            continue;
4027
4028                        // We have to calculate distances in pixels, not in
4029                        // data units, because the scales of the axes may be different
4030                        var dx = Math.abs(axisx.p2c(x) - mouseX),
4031                            dy = Math.abs(axisy.p2c(y) - mouseY),
4032                            dist = dx * dx + dy * dy; // we save the sqrt
4033
4034                        // use <= to ensure last point takes precedence
4035                        // (last generally means on top of)
4036                        if (dist < smallestDistance) {
4037                            smallestDistance = dist;
4038                            item = [i, j / ps];
4039                        }
4040                    }
4041                }
4042
4043                if (s.bars.show && !item) { // no other point can be nearby
4044
4045                    var barLeft, barRight;
4046
4047                    switch (s.bars.align) {
4048                        case "left":
4049                            barLeft = 0;
4050                            break;
4051                        case "right":
4052                            barLeft = -s.bars.barWidth;
4053                            break;
4054                        default:
4055                            barLeft = -s.bars.barWidth / 2;
4056                    }
4057
4058                    barRight = barLeft + s.bars.barWidth;
4059
4060                    for (j = 0; j < points.length; j += ps) {
4061                        var x = points[j], y = points[j + 1], b = points[j + 2];
4062                        if (x == null)
4063                            continue;
4064
4065                        // for a bar graph, the cursor must be inside the bar
4066                        if (series[i].bars.horizontal ?
4067                            (mx <= Math.max(b, x) && mx >= Math.min(b, x) &&
4068                             my >= y + barLeft && my <= y + barRight) :
4069                            (mx >= x + barLeft && mx <= x + barRight &&
4070                             my >= Math.min(b, y) && my <= Math.max(b, y)))
4071                                item = [i, j / ps];
4072                    }
4073                }
4074            }
4075
4076            if (item) {
4077                i = item[0];
4078                j = item[1];
4079                ps = series[i].datapoints.pointsize;
4080
4081                return { datapoint: series[i].datapoints.points.slice(j * ps, (j + 1) * ps),
4082                         dataIndex: j,
4083                         series: series[i],
4084                         seriesIndex: i };
4085            }
4086
4087            return null;
4088        }
4089
4090        function onMouseMove(e) {
4091            if (options.grid.hoverable)
4092                triggerClickHoverEvent("plothover", e,
4093                                       function (s) { return s["hoverable"] != false; });
4094        }
4095
4096        function onMouseLeave(e) {
4097            if (options.grid.hoverable)
4098                triggerClickHoverEvent("plothover", e,
4099                                       function (s) { return false; });
4100        }
4101
4102        function onClick(e) {
4103            triggerClickHoverEvent("plotclick", e,
4104                                   function (s) { return s["clickable"] != false; });
4105        }
4106
4107        // trigger click or hover event (they send the same parameters
4108        // so we share their code)
4109        function triggerClickHoverEvent(eventname, event, seriesFilter) {
4110            var offset = eventHolder.offset(),
4111                canvasX = event.pageX - offset.left - plotOffset.left,
4112                canvasY = event.pageY - offset.top - plotOffset.top,
4113            pos = canvasToAxisCoords({ left: canvasX, top: canvasY });
4114
4115            pos.pageX = event.pageX;
4116            pos.pageY = event.pageY;
4117
4118            var item = findNearbyItem(canvasX, canvasY, seriesFilter);
4119
4120            if (item) {
4121                // fill in mouse pos for any listeners out there
4122                item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint[0]) + offset.left + plotOffset.left, 10);
4123                item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint[1]) + offset.top + plotOffset.top, 10);
4124            }
4125
4126            if (options.grid.autoHighlight) {
4127                // clear auto-highlights
4128                for (var i = 0; i < highlights.length; ++i) {
4129                    var h = highlights[i];
4130                    if (h.auto == eventname &&
4131                        !(item && h.series == item.series &&
4132                          h.point[0] == item.datapoint[0] &&
4133                          h.point[1] == item.datapoint[1]))
4134                        unhighlight(h.series, h.point);
4135                }
4136
4137                if (item)
4138                    highlight(item.series, item.datapoint, eventname);
4139            }
4140
4141            placeholder.trigger(eventname, [ pos, item ]);
4142        }
4143
4144        function triggerRedrawOverlay() {
4145            var t = options.interaction.redrawOverlayInterval;
4146            if (t == -1) {      // skip event queue
4147                drawOverlay();
4148                return;
4149            }
4150
4151            if (!redrawTimeout)
4152                redrawTimeout = setTimeout(drawOverlay, t);
4153        }
4154
4155        function drawOverlay() {
4156            redrawTimeout = null;
4157
4158            // draw highlights
4159            octx.save();
4160            overlay.clear();
4161            octx.translate(plotOffset.left, plotOffset.top);
4162
4163            var i, hi;
4164            for (i = 0; i < highlights.length; ++i) {
4165                hi = highlights[i];
4166
4167                if (hi.series.bars.show)
4168                    drawBarHighlight(hi.series, hi.point);
4169                else
4170                    drawPointHighlight(hi.series, hi.point);
4171            }
4172            octx.restore();
4173
4174            executeHooks(hooks.drawOverlay, [octx]);
4175        }
4176
4177        function highlight(s, point, auto) {
4178            if (typeof s == "number")
4179                s = series[s];
4180
4181            if (typeof point == "number") {
4182                var ps = s.datapoints.pointsize;
4183                point = s.datapoints.points.slice(ps * point, ps * (point + 1));
4184            }
4185
4186            var i = indexOfHighlight(s, point);
4187            if (i == -1) {
4188                highlights.push({ series: s, point: point, auto: auto });
4189
4190                triggerRedrawOverlay();
4191            }
4192            else if (!auto)
4193                highlights[i].auto = false;
4194        }
4195
4196        function unhighlight(s, point) {
4197            if (s == null && point == null) {
4198                highlights = [];
4199                triggerRedrawOverlay();
4200                return;
4201            }
4202
4203            if (typeof s == "number")
4204                s = series[s];
4205
4206            if (typeof point == "number") {
4207                var ps = s.datapoints.pointsize;
4208                point = s.datapoints.points.slice(ps * point, ps * (point + 1));
4209            }
4210
4211            var i = indexOfHighlight(s, point);
4212            if (i != -1) {
4213                highlights.splice(i, 1);
4214
4215                triggerRedrawOverlay();
4216            }
4217        }
4218
4219        function indexOfHighlight(s, p) {
4220            for (var i = 0; i < highlights.length; ++i) {
4221                var h = highlights[i];
4222                if (h.series == s && h.point[0] == p[0]
4223                    && h.point[1] == p[1])
4224                    return i;
4225            }
4226            return -1;
4227        }
4228
4229        function drawPointHighlight(series, point) {
4230            var x = point[0], y = point[1],
4231                axisx = series.xaxis, axisy = series.yaxis,
4232                highlightColor = (typeof series.highlightColor === "string") ? series.highlightColor : $.color.parse(series.color).scale('a', 0.5).toString();
4233
4234            if (x < axisx.min || x > axisx.max || y < axisy.min || y > axisy.max)
4235                return;
4236
4237            var pointRadius = series.points.radius + series.points.lineWidth / 2;
4238            octx.lineWidth = pointRadius;
4239            octx.strokeStyle = highlightColor;
4240            var radius = 1.5 * pointRadius;
4241            x = axisx.p2c(x);
4242            y = axisy.p2c(y);
4243
4244            octx.beginPath();
4245            if (series.points.symbol == "circle")
4246                octx.arc(x, y, radius, 0, 2 * Math.PI, false);
4247            else
4248                series.points.symbol(octx, x, y, radius, false);
4249            octx.closePath();
4250            octx.stroke();
4251        }
4252
4253        function drawBarHighlight(series, point) {
4254            var highlightColor = (typeof series.highlightColor === "string") ? series.highlightColor : $.color.parse(series.color).scale('a', 0.5).toString(),
4255                fillStyle = highlightColor,
4256                barLeft;
4257
4258            switch (series.bars.align) {
4259                case "left":
4260                    barLeft = 0;
4261                    break;
4262                case "right":
4263                    barLeft = -series.bars.barWidth;
4264                    break;
4265                default:
4266                    barLeft = -series.bars.barWidth / 2;
4267            }
4268
4269            octx.lineWidth = series.bars.lineWidth;
4270            octx.strokeStyle = highlightColor;
4271
4272            drawBar(point[0], point[1], point[2] || 0, barLeft, barLeft + series.bars.barWidth,
4273                    function () { return fillStyle; }, series.xaxis, series.yaxis, octx, series.bars.horizontal, series.bars.lineWidth);
4274        }
4275
4276        function getColorOrGradient(spec, bottom, top, defaultColor) {
4277            if (typeof spec == "string")
4278                return spec;
4279            else {
4280                // assume this is a gradient spec; IE currently only
4281                // supports a simple vertical gradient properly, so that's
4282                // what we support too
4283                var gradient = ctx.createLinearGradient(0, top, 0, bottom);
4284
4285                for (var i = 0, l = spec.colors.length; i < l; ++i) {
4286                    var c = spec.colors[i];
4287                    if (typeof c != "string") {
4288                        var co = $.color.parse(defaultColor);
4289                        if (c.brightness != null)
4290                            co = co.scale('rgb', c.brightness);
4291                        if (c.opacity != null)
4292                            co.a *= c.opacity;
4293                        c = co.toString();
4294                    }
4295                    gradient.addColorStop(i / (l - 1), c);
4296                }
4297
4298                return gradient;
4299            }
4300        }
4301    }
4302
4303    // Add the plot function to the top level of the jQuery object
4304
4305    $.plot = function(placeholder, data, options) {
4306        //var t0 = new Date();
4307        var plot = new Plot($(placeholder), data, options, $.plot.plugins);
4308        //(window.console ? console.log : alert)("time used (msecs): " + ((new Date()).getTime() - t0.getTime()));
4309        return plot;
4310    };
4311
4312    $.plot.version = "0.8.3";
4313
4314    $.plot.plugins = [];
4315
4316    // Also add the plot function as a chainable property
4317
4318    $.fn.plot = function(data, options) {
4319        return this.each(function() {
4320            $.plot(this, data, options);
4321        });
4322    };
4323
4324    // round to nearby lower multiple of base
4325    function floorInBase(n, base) {
4326        return base * Math.floor(n / base);
4327    }
4328
4329})(jQuery);
4330
4331/* Flot plugin for plotting textual data or categories.
4332
4333Copyright (c) 2007-2014 IOLA and Ole Laursen.
4334Licensed under the MIT license.
4335
4336Consider a dataset like [["February", 34], ["March", 20], ...]. This plugin
4337allows you to plot such a dataset directly.
4338
4339To enable it, you must specify mode: "categories" on the axis with the textual
4340labels, e.g.
4341
4342	$.plot("#placeholder", data, { xaxis: { mode: "categories" } });
4343
4344By default, the labels are ordered as they are met in the data series. If you
4345need a different ordering, you can specify "categories" on the axis options
4346and list the categories there:
4347
4348	xaxis: {
4349		mode: "categories",
4350		categories: ["February", "March", "April"]
4351	}
4352
4353If you need to customize the distances between the categories, you can specify
4354"categories" as an object mapping labels to values
4355
4356	xaxis: {
4357		mode: "categories",
4358		categories: { "February": 1, "March": 3, "April": 4 }
4359	}
4360
4361If you don't specify all categories, the remaining categories will be numbered
4362from the max value plus 1 (with a spacing of 1 between each).
4363
4364Internally, the plugin works by transforming the input data through an auto-
4365generated mapping where the first category becomes 0, the second 1, etc.
4366Hence, a point like ["February", 34] becomes [0, 34] internally in Flot (this
4367is visible in hover and click events that return numbers rather than the
4368category labels). The plugin also overrides the tick generator to spit out the
4369categories as ticks instead of the values.
4370
4371If you need to map a value back to its label, the mapping is always accessible
4372as "categories" on the axis object, e.g. plot.getAxes().xaxis.categories.
4373
4374*/
4375
4376(function ($) {
4377    var options = {
4378        xaxis: {
4379            categories: null
4380        },
4381        yaxis: {
4382            categories: null
4383        }
4384    };
4385    
4386    function processRawData(plot, series, data, datapoints) {
4387        // if categories are enabled, we need to disable
4388        // auto-transformation to numbers so the strings are intact
4389        // for later processing
4390
4391        var xCategories = series.xaxis.options.mode == "categories",
4392            yCategories = series.yaxis.options.mode == "categories";
4393        
4394        if (!(xCategories || yCategories))
4395            return;
4396
4397        var format = datapoints.format;
4398
4399        if (!format) {
4400            // FIXME: auto-detection should really not be defined here
4401            var s = series;
4402            format = [];
4403            format.push({ x: true, number: true, required: true });
4404            format.push({ y: true, number: true, required: true });
4405
4406            if (s.bars.show || (s.lines.show && s.lines.fill)) {
4407                var autoscale = !!((s.bars.show && s.bars.zero) || (s.lines.show && s.lines.zero));
4408                format.push({ y: true, number: true, required: false, defaultValue: 0, autoscale: autoscale });
4409                if (s.bars.horizontal) {
4410                    delete format[format.length - 1].y;
4411                    format[format.length - 1].x = true;
4412                }
4413            }
4414            
4415            datapoints.format = format;
4416        }
4417
4418        for (var m = 0; m < format.length; ++m) {
4419            if (format[m].x && xCategories)
4420                format[m].number = false;
4421            
4422            if (format[m].y && yCategories)
4423                format[m].number = false;
4424        }
4425    }
4426
4427    function getNextIndex(categories) {
4428        var index = -1;
4429        
4430        for (var v in categories)
4431            if (categories[v] > index)
4432                index = categories[v];
4433
4434        return index + 1;
4435    }
4436
4437    function categoriesTickGenerator(axis) {
4438        var res = [];
4439        for (var label in axis.categories) {
4440            var v = axis.categories[label];
4441            if (v >= axis.min && v <= axis.max)
4442                res.push([v, label]);
4443        }
4444
4445        res.sort(function (a, b) { return a[0] - b[0]; });
4446
4447        return res;
4448    }
4449    
4450    function setupCategoriesForAxis(series, axis, datapoints) {
4451        if (series[axis].options.mode != "categories")
4452            return;
4453        
4454        if (!series[axis].categories) {
4455            // parse options
4456            var c = {}, o = series[axis].options.categories || {};
4457            if ($.isArray(o)) {
4458                for (var i = 0; i < o.length; ++i)
4459                    c[o[i]] = i;
4460            }
4461            else {
4462                for (var v in o)
4463                    c[v] = o[v];
4464            }
4465            
4466            series[axis].categories = c;
4467        }
4468
4469        // fix ticks
4470        if (!series[axis].options.ticks)
4471            series[axis].options.ticks = categoriesTickGenerator;
4472
4473        transformPointsOnAxis(datapoints, axis, series[axis].categories);
4474    }
4475    
4476    function transformPointsOnAxis(datapoints, axis, categories) {
4477        // go through the points, transforming them
4478        var points = datapoints.points,
4479            ps = datapoints.pointsize,
4480            format = datapoints.format,
4481            formatColumn = axis.charAt(0),
4482            index = getNextIndex(categories);
4483
4484        for (var i = 0; i < points.length; i += ps) {
4485            if (points[i] == null)
4486                continue;
4487            
4488            for (var m = 0; m < ps; ++m) {
4489                var val = points[i + m];
4490
4491                if (val == null || !format[m][formatColumn])
4492                    continue;
4493
4494                if (!(val in categories)) {
4495                    categories[val] = index;
4496                    ++index;
4497                }
4498                
4499                points[i + m] = categories[val];
4500            }
4501        }
4502    }
4503
4504    function processDatapoints(plot, series, datapoints) {
4505        setupCategoriesForAxis(series, "xaxis", datapoints);
4506        setupCategoriesForAxis(series, "yaxis", datapoints);
4507    }
4508
4509    function init(plot) {
4510        plot.hooks.processRawData.push(processRawData);
4511        plot.hooks.processDatapoints.push(processDatapoints);
4512    }
4513    
4514    $.plot.plugins.push({
4515        init: init,
4516        options: options,
4517        name: 'categories',
4518        version: '1.0'
4519    });
vendor: 7,382 bytes, lines 4520-4766
4520})(jQuery);
4521
4522/* Flot plugin for rendering pie charts.
4523
4524Copyright (c) 2007-2014 IOLA and Ole Laursen.
4525Licensed under the MIT license.
4526
4527The plugin assumes that each series has a single data value, and that each
4528value is a positive integer or zero.  Negative numbers don't make sense for a
4529pie chart, and have unpredictable results.  The values do NOT need to be
4530passed in as percentages; the plugin will calculate the total and per-slice
4531percentages internally.
4532
4533* Created by Brian Medendorp
4534
4535* Updated with contributions from btburnett3, Anthony Aragues and Xavi Ivars
4536
4537The plugin supports these options:
4538
4539	series: {
4540		pie: {
4541			show: true/false
4542			radius: 0-1 for percentage of fullsize, or a specified pixel length, or 'auto'
4543			innerRadius: 0-1 for percentage of fullsize or a specified pixel length, for creating a donut effect
4544			startAngle: 0-2 factor of PI used for starting angle (in radians) i.e 3/2 starts at the top, 0 and 2 have the same result
4545			tilt: 0-1 for percentage to tilt the pie, where 1 is no tilt, and 0 is completely flat (nothing will show)
4546			offset: {
4547				top: integer value to move the pie up or down
4548				left: integer value to move the pie left or right, or 'auto'
4549			},
4550			stroke: {
4551				color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#FFF')
4552				width: integer pixel width of the stroke
4553			},
4554			label: {
4555				show: true/false, or 'auto'
4556				formatter:  a user-defined function that modifies the text/style of the label text
4557				radius: 0-1 for percentage of fullsize, or a specified pixel length
4558				background: {
4559					color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#000')
4560					opacity: 0-1
4561				},
4562				threshold: 0-1 for the percentage value at which to hide labels (if they're too small)
4563			},
4564			combine: {
4565				threshold: 0-1 for the percentage value at which to combine slices (if they're too small)
4566				color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#CCC'), if null, the plugin will automatically use the color of the first slice to be combined
4567				label: any text value of what the combined slice should be labeled
4568			}
4569			highlight: {
4570				opacity: 0-1
4571			}
4572		}
4573	}
4574
4575More detail and specific examples can be found in the included HTML file.
4576
4577*/
4578
4579(function($) {
4580
4581	// Maximum redraw attempts when fitting labels within the plot
4582
4583	var REDRAW_ATTEMPTS = 10;
4584
4585	// Factor by which to shrink the pie when fitting labels within the plot
4586
4587	var REDRAW_SHRINK = 0.95;
4588
4589	function init(plot) {
4590
4591		var canvas = null,
4592			target = null,
4593			options = null,
4594			maxRadius = null,
4595			centerLeft = null,
4596			centerTop = null,
4597			processed = false,
4598			ctx = null;
4599
4600		// interactive variables
4601
4602		var highlights = [];
4603
4604		// add hook to determine if pie plugin in enabled, and then perform necessary operations
4605
4606		plot.hooks.processOptions.push(function(plot, options) {
4607			if (options.series.pie.show) {
4608
4609				options.grid.show = false;
4610
4611				// set labels.show
4612
4613				if (options.series.pie.label.show == "auto") {
4614					if (options.legend.show) {
4615						options.series.pie.label.show = false;
4616					} else {
4617						options.series.pie.label.show = true;
4618					}
4619				}
4620
4621				// set radius
4622
4623				if (options.series.pie.radius == "auto") {
4624					if (options.series.pie.label.show) {
4625						options.series.pie.radius = 3/4;
4626					} else {
4627						options.series.pie.radius = 1;
4628					}
4629				}
4630
4631				// ensure sane tilt
4632
4633				if (options.series.pie.tilt > 1) {
4634					options.series.pie.tilt = 1;
4635				} else if (options.series.pie.tilt < 0) {
4636					options.series.pie.tilt = 0;
4637				}
4638			}
4639		});
4640
4641		plot.hooks.bindEvents.push(function(plot, eventHolder) {
4642			var options = plot.getOptions();
4643			if (options.series.pie.show) {
4644				if (options.grid.hoverable) {
4645					eventHolder.unbind("mousemove").mousemove(onMouseMove);
4646				}
4647				if (options.grid.clickable) {
4648					eventHolder.unbind("click").click(onClick);
4649				}
4650			}
4651		});
4652
4653		plot.hooks.processDatapoints.push(function(plot, series, data, datapoints) {
4654			var options = plot.getOptions();
4655			if (options.series.pie.show) {
4656				processDatapoints(plot, series, data, datapoints);
4657			}
4658		});
4659
4660		plot.hooks.drawOverlay.push(function(plot, octx) {
4661			var options = plot.getOptions();
4662			if (options.series.pie.show) {
4663				drawOverlay(plot, octx);
4664			}
4665		});
4666
4667		plot.hooks.draw.push(function(plot, newCtx) {
4668			var options = plot.getOptions();
4669			if (options.series.pie.show) {
4670				draw(plot, newCtx);
4671			}
4672		});
4673
4674		function processDatapoints(plot, series, datapoints) {
4675			if (!processed)	{
4676				processed = true;
4677				canvas = plot.getCanvas();
4678				target = $(canvas).parent();
4679				options = plot.getOptions();
4680				plot.setData(combine(plot.getData()));
4681			}
4682		}
4683
4684		function combine(data) {
4685
4686			var total = 0,
4687				combined = 0,
4688				numCombined = 0,
4689				color = options.series.pie.combine.color,
4690				newdata = [];
4691
4692			// Fix up the raw data from Flot, ensuring the data is numeric
4693
4694			for (var i = 0; i < data.length; ++i) {
4695
4696				var value = data[i].data;
4697
4698				// If the data is an array, we'll assume that it's a standard
4699				// Flot x-y pair, and are concerned only with the second value.
4700
4701				// Note how we use the original array, rather than creating a
4702				// new one; this is more efficient and preserves any extra data
4703				// that the user may have stored in higher indexes.
4704
4705				if ($.isArray(value) && value.length == 1) {
4706    				value = value[0];
4707				}
4708
4709				if ($.isArray(value)) {
4710					// Equivalent to $.isNumeric() but compatible with jQuery < 1.7
4711					if (!isNaN(parseFloat(value[1])) && isFinite(value[1])) {
4712						value[1] = +value[1];
4713					} else {
4714						value[1] = 0;
4715					}
4716				} else if (!isNaN(parseFloat(value)) && isFinite(value)) {
4717					value = [1, +value];
4718				} else {
4719					value = [1, 0];
4720				}
4721
4722				data[i].data = [value];
4723			}
4724
4725			// Sum up all the slices, so we can calculate percentages for each
4726
4727			for (var i = 0; i < data.length; ++i) {
4728				total += data[i].data[0][1];
4729			}
4730
4731			// Count the number of slices with percentages below the combine
4732			// threshold; if it turns out to be just one, we won't combine.
4733
4734			for (var i = 0; i < data.length; ++i) {
4735				var value = data[i].data[0][1];
4736				if (value / total <= options.series.pie.combine.threshold) {
4737					combined += value;
4738					numCombined++;
4739					if (!color) {
4740						color = data[i].color;
4741					}
4742				}
4743			}
4744
4745			for (var i = 0; i < data.length; ++i) {
4746				var value = data[i].data[0][1];
4747				if (numCombined < 2 || value / total > options.series.pie.combine.threshold) {
4748					newdata.push(
4749						$.extend(data[i], {     /* extend to allow keeping all other original data values
4750						                           and using them e.g. in labelFormatter. */
4751							data: [[1, value]],
4752							color: data[i].color,
4753							label: data[i].label,
4754							angle: value * Math.PI * 2 / total,
4755							percent: value / (total / 100)
4756						})
4757					);
4758				}
4759			}
4760
4761			if (numCombined > 1) {
4762				newdata.push({
4763					data: [[1, combined]],
4764					color: color,
4765					label: options.series.pie.combine.label,
4766					angle: combined * Math.PI * 2 / total,
4767					percent: combined / (total / 100)
4768				});
4769			}
4770
4771			return newdata;
4772		}
4773
4774		function draw(plot, newCtx) {
4775
4776			if (!target) {
4777				return; // if no series were passed
4778			}
4779
4780			var canvasWidth = plot.getPlaceholder().width(),
4781				canvasHeight = plot.getPlaceholder().height(),
4782				legendWidth = target.children().filter(".legend").children().width() || 0;
4783
4784			ctx = newCtx;
4785
4786			// WARNING: HACK! REWRITE THIS CODE AS SOON AS POSSIBLE!
4787
4788			// When combining smaller slices into an 'other' slice, we need to
4789			// add a new series.  Since Flot gives plugins no way to modify the
4790			// list of series, the pie plugin uses a hack where the first call
4791			// to processDatapoints results in a call to setData with the new
4792			// list of series, then subsequent processDatapoints do nothing.
4793
4794			// The plugin-global 'processed' flag is used to control this hack;
4795			// it starts out false, and is set to true after the first call to
4796			// processDatapoints.
4797
4798			// Unfortunately this turns future setData calls into no-ops; they
4799			// call processDatapoints, the flag is true, and nothing happens.
4800
vendor: 14,920 bytes, lines 4801-5298
4801			// To fix this we'll set the flag back to false here in draw, when
4802			// all series have been processed, so the next sequence of calls to
4803			// processDatapoints once again starts out with a slice-combine.
4804			// This is really a hack; in 0.9 we need to give plugins a proper
4805			// way to modify series before any processing begins.
4806
4807			processed = false;
4808
4809			// calculate maximum radius and center point
4810
4811			maxRadius =  Math.min(canvasWidth, canvasHeight / options.series.pie.tilt) / 2;
4812			centerTop = canvasHeight / 2 + options.series.pie.offset.top;
4813			centerLeft = canvasWidth / 2;
4814
4815			if (options.series.pie.offset.left == "auto") {
4816				if (options.legend.position.match("w")) {
4817					centerLeft += legendWidth / 2;
4818				} else {
4819					centerLeft -= legendWidth / 2;
4820				}
4821				if (centerLeft < maxRadius) {
4822					centerLeft = maxRadius;
4823				} else if (centerLeft > canvasWidth - maxRadius) {
4824					centerLeft = canvasWidth - maxRadius;
4825				}
4826			} else {
4827				centerLeft += options.series.pie.offset.left;
4828			}
4829
4830			var slices = plot.getData(),
4831				attempts = 0;
4832
4833			// Keep shrinking the pie's radius until drawPie returns true,
4834			// indicating that all the labels fit, or we try too many times.
4835
4836			do {
4837				if (attempts > 0) {
4838					maxRadius *= REDRAW_SHRINK;
4839				}
4840				attempts += 1;
4841				clear();
4842				if (options.series.pie.tilt <= 0.8) {
4843					drawShadow();
4844				}
4845			} while (!drawPie() && attempts < REDRAW_ATTEMPTS)
4846
4847			if (attempts >= REDRAW_ATTEMPTS) {
4848				clear();
4849				target.prepend("<div class='error'>Could not draw pie with labels contained inside canvas</div>");
4850			}
4851
4852			if (plot.setSeries && plot.insertLegend) {
4853				plot.setSeries(slices);
4854				plot.insertLegend();
4855			}
4856
4857			// we're actually done at this point, just defining internal functions at this point
4858
4859			function clear() {
4860				ctx.clearRect(0, 0, canvasWidth, canvasHeight);
4861				target.children().filter(".pieLabel, .pieLabelBackground").remove();
4862			}
4863
4864			function drawShadow() {
4865
4866				var shadowLeft = options.series.pie.shadow.left;
4867				var shadowTop = options.series.pie.shadow.top;
4868				var edge = 10;
4869				var alpha = options.series.pie.shadow.alpha;
4870				var radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius;
4871
4872				if (radius >= canvasWidth / 2 - shadowLeft || radius * options.series.pie.tilt >= canvasHeight / 2 - shadowTop || radius <= edge) {
4873					return;	// shadow would be outside canvas, so don't draw it
4874				}
4875
4876				ctx.save();
4877				ctx.translate(shadowLeft,shadowTop);
4878				ctx.globalAlpha = alpha;
4879				ctx.fillStyle = "#000";
4880
4881				// center and rotate to starting position
4882
4883				ctx.translate(centerLeft,centerTop);
4884				ctx.scale(1, options.series.pie.tilt);
4885
4886				//radius -= edge;
4887
4888				for (var i = 1; i <= edge; i++) {
4889					ctx.beginPath();
4890					ctx.arc(0, 0, radius, 0, Math.PI * 2, false);
4891					ctx.fill();
4892					radius -= i;
4893				}
4894
4895				ctx.restore();
4896			}
4897
4898			function drawPie() {
4899
4900				var startAngle = Math.PI * options.series.pie.startAngle;
4901				var radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius;
4902
4903				// center and rotate to starting position
4904
4905				ctx.save();
4906				ctx.translate(centerLeft,centerTop);
4907				ctx.scale(1, options.series.pie.tilt);
4908				//ctx.rotate(startAngle); // start at top; -- This doesn't work properly in Opera
4909
4910				// draw slices
4911
4912				ctx.save();
4913				var currentAngle = startAngle;
4914				for (var i = 0; i < slices.length; ++i) {
4915					slices[i].startAngle = currentAngle;
4916					drawSlice(slices[i].angle, slices[i].color, true);
4917				}
4918				ctx.restore();
4919
4920				// draw slice outlines
4921
4922				if (options.series.pie.stroke.width > 0) {
4923					ctx.save();
4924					ctx.lineWidth = options.series.pie.stroke.width;
4925					currentAngle = startAngle;
4926					for (var i = 0; i < slices.length; ++i) {
4927						drawSlice(slices[i].angle, options.series.pie.stroke.color, false);
4928					}
4929					ctx.restore();
4930				}
4931
4932				// draw donut hole
4933
4934				drawDonutHole(ctx);
4935
4936				ctx.restore();
4937
4938				// Draw the labels, returning true if they fit within the plot
4939
4940				if (options.series.pie.label.show) {
4941					return drawLabels();
4942				} else return true;
4943
4944				function drawSlice(angle, color, fill) {
4945
4946					if (angle <= 0 || isNaN(angle)) {
4947						return;
4948					}
4949
4950					if (fill) {
4951						ctx.fillStyle = color;
4952					} else {
4953						ctx.strokeStyle = color;
4954						ctx.lineJoin = "round";
4955					}
4956
4957					ctx.beginPath();
4958					if (Math.abs(angle - Math.PI * 2) > 0.000000001) {
4959						ctx.moveTo(0, 0); // Center of the pie
4960					}
4961
4962					//ctx.arc(0, 0, radius, 0, angle, false); // This doesn't work properly in Opera
4963					ctx.arc(0, 0, radius,currentAngle, currentAngle + angle / 2, false);
4964					ctx.arc(0, 0, radius,currentAngle + angle / 2, currentAngle + angle, false);
4965					ctx.closePath();
4966					//ctx.rotate(angle); // This doesn't work properly in Opera
4967					currentAngle += angle;
4968
4969					if (fill) {
4970						ctx.fill();
4971					} else {
4972						ctx.stroke();
4973					}
4974				}
4975
4976				function drawLabels() {
4977
4978					var currentAngle = startAngle;
4979					var radius = options.series.pie.label.radius > 1 ? options.series.pie.label.radius : maxRadius * options.series.pie.label.radius;
4980
4981					for (var i = 0; i < slices.length; ++i) {
4982						if (slices[i].percent >= options.series.pie.label.threshold * 100) {
4983							if (!drawLabel(slices[i], currentAngle, i)) {
4984								return false;
4985							}
4986						}
4987						currentAngle += slices[i].angle;
4988					}
4989
4990					return true;
4991
4992					function drawLabel(slice, startAngle, index) {
4993
4994						if (slice.data[0][1] == 0) {
4995							return true;
4996						}
4997
4998						// format label text
4999
5000						var lf = options.legend.labelFormatter, text, plf = options.series.pie.label.formatter;
5001
5002						if (lf) {
5003							text = lf(slice.label, slice);
5004						} else {
5005							text = slice.label;
5006						}
5007
5008						if (plf) {
5009							text = plf(text, slice);
5010						}
5011
5012						var halfAngle = ((startAngle + slice.angle) + startAngle) / 2;
5013						var x = centerLeft + Math.round(Math.cos(halfAngle) * radius);
5014						var y = centerTop + Math.round(Math.sin(halfAngle) * radius) * options.series.pie.tilt;
5015
5016						var html = "<span class='pieLabel' id='pieLabel" + index + "' style='position:absolute;top:" + y + "px;left:" + x + "px;'>" + text + "</span>";
5017						target.append(html);
5018
5019						var label = target.children("#pieLabel" + index);
5020						var labelTop = (y - label.height() / 2);
5021						var labelLeft = (x - label.width() / 2);
5022
5023						label.css("top", labelTop);
5024						label.css("left", labelLeft);
5025
5026						// check to make sure that the label is not outside the canvas
5027
5028						if (0 - labelTop > 0 || 0 - labelLeft > 0 || canvasHeight - (labelTop + label.height()) < 0 || canvasWidth - (labelLeft + label.width()) < 0) {
5029							return false;
5030						}
5031
5032						if (options.series.pie.label.background.opacity != 0) {
5033
5034							// put in the transparent background separately to avoid blended labels and label boxes
5035
5036							var c = options.series.pie.label.background.color;
5037
5038							if (c == null) {
5039								c = slice.color;
5040							}
5041
5042							var pos = "top:" + labelTop + "px;left:" + labelLeft + "px;";
5043							$("<div class='pieLabelBackground' style='position:absolute;width:" + label.width() + "px;height:" + label.height() + "px;" + pos + "background-color:" + c + ";'></div>")
5044								.css("opacity", options.series.pie.label.background.opacity)
5045								.insertBefore(label);
5046						}
5047
5048						return true;
5049					} // end individual label function
5050				} // end drawLabels function
5051			} // end drawPie function
5052		} // end draw function
5053
5054		// Placed here because it needs to be accessed from multiple locations
5055
5056		function drawDonutHole(layer) {
5057			if (options.series.pie.innerRadius > 0) {
5058
5059				// subtract the center
5060
5061				layer.save();
5062				var innerRadius = options.series.pie.innerRadius > 1 ? options.series.pie.innerRadius : maxRadius * options.series.pie.innerRadius;
5063				layer.globalCompositeOperation = "destination-out"; // this does not work with excanvas, but it will fall back to using the stroke color
5064				layer.beginPath();
5065				layer.fillStyle = options.series.pie.stroke.color;
5066				layer.arc(0, 0, innerRadius, 0, Math.PI * 2, false);
5067				layer.fill();
5068				layer.closePath();
5069				layer.restore();
5070
5071				// add inner stroke
5072
5073				layer.save();
5074				layer.beginPath();
5075				layer.strokeStyle = options.series.pie.stroke.color;
5076				layer.arc(0, 0, innerRadius, 0, Math.PI * 2, false);
5077				layer.stroke();
5078				layer.closePath();
5079				layer.restore();
5080
5081				// TODO: add extra shadow inside hole (with a mask) if the pie is tilted.
5082			}
5083		}
5084
5085		//-- Additional Interactive related functions --
5086
5087		function isPointInPoly(poly, pt) {
5088			for(var c = false, i = -1, l = poly.length, j = l - 1; ++i < l; j = i)
5089				((poly[i][1] <= pt[1] && pt[1] < poly[j][1]) || (poly[j][1] <= pt[1] && pt[1]< poly[i][1]))
5090				&& (pt[0] < (poly[j][0] - poly[i][0]) * (pt[1] - poly[i][1]) / (poly[j][1] - poly[i][1]) + poly[i][0])
5091				&& (c = !c);
5092			return c;
5093		}
5094
5095		function findNearbySlice(mouseX, mouseY) {
5096
5097			var slices = plot.getData(),
5098				options = plot.getOptions(),
5099				radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius,
5100				x, y;
5101
5102			for (var i = 0; i < slices.length; ++i) {
5103
5104				var s = slices[i];
5105
5106				if (s.pie.show) {
5107
5108					ctx.save();
5109					ctx.beginPath();
5110					ctx.moveTo(0, 0); // Center of the pie
5111					//ctx.scale(1, options.series.pie.tilt);	// this actually seems to break everything when here.
5112					ctx.arc(0, 0, radius, s.startAngle, s.startAngle + s.angle / 2, false);
5113					ctx.arc(0, 0, radius, s.startAngle + s.angle / 2, s.startAngle + s.angle, false);
5114					ctx.closePath();
5115					x = mouseX - centerLeft;
5116					y = mouseY - centerTop;
5117
5118					if (ctx.isPointInPath) {
5119						if (ctx.isPointInPath(mouseX - centerLeft, mouseY - centerTop)) {
5120							ctx.restore();
5121							return {
5122								datapoint: [s.percent, s.data],
5123								dataIndex: 0,
5124								series: s,
5125								seriesIndex: i
5126							};
5127						}
5128					} else {
5129
5130						// excanvas for IE doesn;t support isPointInPath, this is a workaround.
5131
5132						var p1X = radius * Math.cos(s.startAngle),
5133							p1Y = radius * Math.sin(s.startAngle),
5134							p2X = radius * Math.cos(s.startAngle + s.angle / 4),
5135							p2Y = radius * Math.sin(s.startAngle + s.angle / 4),
5136							p3X = radius * Math.cos(s.startAngle + s.angle / 2),
5137							p3Y = radius * Math.sin(s.startAngle + s.angle / 2),
5138							p4X = radius * Math.cos(s.startAngle + s.angle / 1.5),
5139							p4Y = radius * Math.sin(s.startAngle + s.angle / 1.5),
5140							p5X = radius * Math.cos(s.startAngle + s.angle),
5141							p5Y = radius * Math.sin(s.startAngle + s.angle),
5142							arrPoly = [[0, 0], [p1X, p1Y], [p2X, p2Y], [p3X, p3Y], [p4X, p4Y], [p5X, p5Y]],
5143							arrPoint = [x, y];
5144
5145						// TODO: perhaps do some mathmatical trickery here with the Y-coordinate to compensate for pie tilt?
5146
5147						if (isPointInPoly(arrPoly, arrPoint)) {
5148							ctx.restore();
5149							return {
5150								datapoint: [s.percent, s.data],
5151								dataIndex: 0,
5152								series: s,
5153								seriesIndex: i
5154							};
5155						}
5156					}
5157
5158					ctx.restore();
5159				}
5160			}
5161
5162			return null;
5163		}
5164
5165		function onMouseMove(e) {
5166			triggerClickHoverEvent("plothover", e);
5167		}
5168
5169		function onClick(e) {
5170			triggerClickHoverEvent("plotclick", e);
5171		}
5172
5173		// trigger click or hover event (they send the same parameters so we share their code)
5174
5175		function triggerClickHoverEvent(eventname, e) {
5176
5177			var offset = plot.offset();
5178			var canvasX = parseInt(e.pageX - offset.left);
5179			var canvasY =  parseInt(e.pageY - offset.top);
5180			var item = findNearbySlice(canvasX, canvasY);
5181
5182			if (options.grid.autoHighlight) {
5183
5184				// clear auto-highlights
5185
5186				for (var i = 0; i < highlights.length; ++i) {
5187					var h = highlights[i];
5188					if (h.auto == eventname && !(item && h.series == item.series)) {
5189						unhighlight(h.series);
5190					}
5191				}
5192			}
5193
5194			// highlight the slice
5195
5196			if (item) {
5197				highlight(item.series, eventname);
5198			}
5199
5200			// trigger any hover bind events
5201
5202			var pos = { pageX: e.pageX, pageY: e.pageY };
5203			target.trigger(eventname, [pos, item]);
5204		}
5205
5206		function highlight(s, auto) {
5207			//if (typeof s == "number") {
5208			//	s = series[s];
5209			//}
5210
5211			var i = indexOfHighlight(s);
5212
5213			if (i == -1) {
5214				highlights.push({ series: s, auto: auto });
5215				plot.triggerRedrawOverlay();
5216			} else if (!auto) {
5217				highlights[i].auto = false;
5218			}
5219		}
5220
5221		function unhighlight(s) {
5222			if (s == null) {
5223				highlights = [];
5224				plot.triggerRedrawOverlay();
5225			}
5226
5227			//if (typeof s == "number") {
5228			//	s = series[s];
5229			//}
5230
5231			var i = indexOfHighlight(s);
5232
5233			if (i != -1) {
5234				highlights.splice(i, 1);
5235				plot.triggerRedrawOverlay();
5236			}
5237		}
5238
5239		function indexOfHighlight(s) {
5240			for (var i = 0; i < highlights.length; ++i) {
5241				var h = highlights[i];
5242				if (h.series == s)
5243					return i;
5244			}
5245			return -1;
5246		}
5247
5248		function drawOverlay(plot, octx) {
5249
5250			var options = plot.getOptions();
5251
5252			var radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius;
5253
5254			octx.save();
5255			octx.translate(centerLeft, centerTop);
5256			octx.scale(1, options.series.pie.tilt);
5257
5258			for (var i = 0; i < highlights.length; ++i) {
5259				drawHighlight(highlights[i].series);
5260			}
5261
5262			drawDonutHole(octx);
5263
5264			octx.restore();
5265
5266			function drawHighlight(series) {
5267
5268				if (series.angle <= 0 || isNaN(series.angle)) {
5269					return;
5270				}
5271
5272				//octx.fillStyle = parseColor(options.series.pie.highlight.color).scale(null, null, null, options.series.pie.highlight.opacity).toString();
5273				octx.fillStyle = "rgba(255, 255, 255, " + options.series.pie.highlight.opacity + ")"; // this is temporary until we have access to parseColor
5274				octx.beginPath();
5275				if (Math.abs(series.angle - Math.PI * 2) > 0.000000001) {
5276					octx.moveTo(0, 0); // Center of the pie
5277				}
5278				octx.arc(0, 0, radius, series.startAngle, series.startAngle + series.angle / 2, false);
5279				octx.arc(0, 0, radius, series.startAngle + series.angle / 2, series.startAngle + series.angle, false);
5280				octx.closePath();
5281				octx.fill();
5282			}
5283		}
5284	} // end init (plugin body)
5285
5286	// define pie specific options and their default values
5287
5288	var options = {
5289		series: {
5290			pie: {
5291				show: false,
5292				radius: "auto",	// actual radius of the visible pie (based on full calculated radius if <=1, or hard pixel value)
5293				innerRadius: 0, /* for donut */
5294				startAngle: 3/2,
5295				tilt: 1,
5296				shadow: {
5297					left: 5,	// shadow left offset
5298					top: 15,	// shadow top offset
5299					alpha: 0.02	// shadow alpha
5300				},
5301				offset: {
5302					top: 0,
5303					left: "auto"
5304				},
5305				stroke: {
5306					color: "#fff",
5307					width: 1
5308				},
5309				label: {
5310					show: "auto",
5311					formatter: function(label, slice) {
5312						return "<div style='font-size:x-small;text-align:center;padding:2px;color:" + slice.color + ";'>" + label + "<br/>" + Math.round(slice.percent) + "%</div>";
5313					},	// formatter function
5314					radius: 1,	// radius at which to place the labels (based on full calculated radius if <=1, or hard pixel value)
5315					background: {
5316						color: null,
5317						opacity: 0
5318					},
5319					threshold: 0	// percentage at which to hide the label (i.e. the slice is too narrow)
5320				},
5321				combine: {
5322					threshold: -1,	// percentage at which to combine little slices into one larger slice
5323					color: null,	// color to give the new slice (auto-generated if null)
5324					label: "Other"	// label to give the new slice
5325				},
5326				highlight: {
5327					//color: "#fff",		// will add this functionality once parseColor is available
5328					opacity: 0.5
5329				}
5330			}
5331		}
5332	};
5333
5334	$.plot.plugins.push({
5335		init: init,
5336		options: options,
5337		name: "pie",
5338		version: "1.1"
5339	});
5340
5341})(jQuery);
5342
5343$(document).ready(function() {
5344
5345  $('.Form_newsletterSubscribe,' +
5346    '.PageArticle .FormRegisterNG,' +
5347    '.StageNewsletterSimple,' +
5348    '.PageRegister,' +
5349    '.StagePremiumPaywall'
5350  ).on('click', '.FormNLOptinPopup_open', function(e) {
5351    var parent = e.delegateTarget;
5352    $('.FormNLOptinPopup, .FormNLOptinPopup_overlay', parent).fadeIn();
5353
5354    $('input', parent).each(function() {
5355      if ($(this).attr('name') === 'i_email') {
5356        var user_email = $(this).val();
5357        if (user_email !== '' && user_email !== undefined) {
5358          var icon = "<i class=\"fas fa-envelope\"></i>";
5359          $('.FormNLOptinPopup_email', parent).html(icon + user_email);
5360        }
5361      }
5362    });
5363
5364    $('.FormNLOptinPopup_close-icon,' +
5365      '.FormNLOptinPopup_cancel,' +
5366      '.FormNLOptinPopup_overlay', parent).on('click', function(e) {
5367      $('.FormNLOptinPopup, .FormNLOptinPopup_overlay', parent).fadeOut();
5368    });
5369
5370  });
5371
5372});
5373
5374
5375/* Event-Listener Adition iframe */
5376window.addEventListener('message',function(event) {
5377  const origin = window.location.origin;
5378  if(event.origin !== origin) return;
5379
5380  let currentUrl = window.location.href;
5381
5382  let be_domainsInsertAdvTextDiv = [
5383    'iz.de',
5384    'handelextra.pl',
5385    'how-green-works.de',
5386    'foodservice24.pl',
5387    'horizont.net',
5388    'mmponline.pl',
5389    'lebensmittelzeitung.net',
5390    'tw-media.com',
5391    'pebbles.dfv-is.de',
5392    'fibers-in-process.de',
5393    'umweltwirtschaft.com',
5394    'wwt-online.de',
5395    'changement-magazin.de',
5396    'zoe-online.org'
5397  ];
5398
5399  let be_domainsAddSliderControl = ['ahgz.at', 'lebensmittelzeitung.net'];
5400
5401  let be_domainsContainerClass = {
5402    'default': 'PageFrame',
5403    'the-spin-off.com' : 'container',
5404    'horizont.net' : 'SiteHeader',
5405    'dfv-is.de' : 'SiteHeader',
5406    'fibers-in-process.de' : 'SiteHeader',
5407    'umweltwirtschaft.com' : 'SiteHeader',
5408    'wwt-online.de' : 'SiteHeader',
5409    'changement-magazin.de' : 'SiteHeader',
5410    'zoe-online.org' : 'SiteHeader'
5411  };
5412
5413  let be_domainsWideLayout = [
5414    'horizont.net',
5415    'mmponline.pl',
5416    'dfv-is.de',
5417    'fibers-in-process.de',
5418    'umweltwirtschaft.com',
5419    'wwt-online.de',
5420    'changement-magazin.de',
5421    'zoe-online.org'
5422  ];
5423
5424  function be_isDomainInUrl(domainsArray, currentUrl) {
5425    return domainsArray.some(domain => currentUrl.includes(domain));
5426  }
5427
5428  let wideLayout = false;
5429  if (be_isDomainInUrl(be_domainsWideLayout, currentUrl)) {
5430    wideLayout = true;
5431  }
5432
5433  let be_containerClass;
5434  const matchingKey = Object.keys(be_domainsContainerClass).find(key => currentUrl.includes(key));
5435
5436  if (matchingKey) {
5437    be_containerClass = be_domainsContainerClass[matchingKey];
5438  } else {
5439    be_containerClass = be_domainsContainerClass['default'];
5440  }
5441
5442  switch(event.data) {
5443    case 'text_ad': $(document).trigger('textAd');
5444      break;
5445    case 'teadsResize':
5446      $(document).trigger('teadsResize');
5447      break;
5448    case 'parallax':
5449      if (be_isDomainInUrl(be_domainsInsertAdvTextDiv, currentUrl)) {
5450        $(document).trigger('insertAdvTextDiv');
5451      }
5452      $(document).trigger('parallax');
5453      break;
5454    case 'bannerinit':
5455      $(document).trigger('sticky_initialize');
5456      $(document).trigger('resizeIframe');
5457      $(document).trigger('advertOnImage');
5458      $(document).trigger('clsAlignSuperbanner');
5459      $(document).trigger('clsAlignBillboard');
5460      $(document).trigger('BillboardHeight');
5461      $(document).trigger('alignSkyscraperLeft');
5462      if (be_isDomainInUrl(be_domainsAddSliderControl,currentUrl)) {
5463        $(document).trigger('adSliderControl');
5464      }
5465      if (be_isDomainInUrl(be_domainsInsertAdvTextDiv, currentUrl)) {
5466        $(document).trigger('insertAdvTextDiv');
5467      }
5468      break;
5469    case 'singlebanner':
5470      $(document).trigger('sticky_initialize');
5471      $(document).trigger('resizeIframe');
5472      $(document).trigger('clsAlignSuperbanner');
5473      $(document).trigger('clsAlignBillboard');
5474      break;
5475    case 'halfpage':
5476      $(document).trigger('halfpage', [be_containerClass]);
5477      break;
5478    case 'floorAd':
5479      $(document).trigger('floorAd');
5480      $(document).trigger('resizeIframe');
5481      break;
5482    case 'html5floorAd':
5483      $(document).trigger('html5floorAd');
5484      $(document).trigger('resizeIframe');
5485      break;
5486    case 'HTML5sitebar':
5487      $(document).trigger('html5sitebar');
5488      break;
5489    case 'layerAd':
5490      $(document).trigger('layerAd');
5491      $(document).trigger('resizeIframe');
5492      break;
5493    case 'bridgeAd':
5494      $(document).trigger('bridgeAd');
5495      break;
5496    case 'bridgeAdSticky':
5497      $(document).trigger('bridgeAdSticky');
5498      $(document).trigger('billboardSticky');
5499      break;
5500    case 'fullWidthBillboard':
5501      $(document).trigger('fullWidthBillboard');
5502      $(document).trigger('resizeIframe');
5503      break;
5504    case 'exitintent':
5505      $(document).trigger('exitintent');
5506      break;
5507    case 'background':
5508      $(document).trigger('changeBackgroundColor');
5509      break;
5510    case 'backgroundclick':
5511      $(document).trigger('isBackgroundClick');
5512      break;
5513    case 'counterAd':
5514      $(document).trigger('counterAd');
5515      break;
5516    case 'centerFrame': $(document).trigger('centerIframe');
5517      break;
5518    case 'blockadvertisement':
5519      $(document).trigger('blockadvertisement');
5520      break;
5521    case 'wallpapercolor':
5522      $(document).trigger('wallpapercolor');
5523      break;
5524    case 'sitebar':
5525    case 'sitebarHTML5':
5526      $(document).trigger('sitebar', [wideLayout]);
5527      break;
5528    case 'sitebar-switch':
5529      $(document).trigger('sitebar-switch', [be_domainsContainerClass, wideLayout]);
5530      $(document).trigger('resizeIframe');
5531      break;
5532    case 'sitebarLeft':
5533      $(document).trigger('sitebarLeft', [wideLayout]);
5534      break;
5535    case 'pushdown':
5536    case 'pushdown2':
5537    case 'pushdown3':
5538    case 'pushdown4':
5539    case 'pushdown5':
5540    case 'pushdown6':
5541    case 'pushdown7':
5542      const elementclass = event.data;
5543      $(document).trigger('pushdown', [elementclass]);
5544      break;
5545    case 'parallax_outstream':
5546      $(document).trigger('parallax_outstream');
5547      break;
5548    case 'dynamic_sitebar':
5549      $(document).trigger('dynamic_sitebar');
5550      break;
5551    case 'billboardSticky':
5552      $(document).trigger('billboardSticky');
5553      break;
5554    case 'dfvSolutionAd':
5555      $(document).trigger('dfvSolutionAd');
5556      break;
5557    case 'welcomeVideo':
5558      $(document).trigger('resizeIframe');
5559      $(document).trigger('welcomeAdVideo');  break;
5560    case 'welcomeVideoMobil':
5561      $(document).trigger('resizeIframe');
5562      $(document).trigger('welcomeAdVideoMobil');  break;
5563    case 'welcomeImage':
5564      $(document).trigger('resizeIframe');
5565      $(document).trigger('welcomeAdImage');  break;
5566    case 'welcomeImageMobil':
5567      $(document).trigger('resizeIframe');
5568      $(document).trigger('welcomeAdImageMobil');  break;
5569    case 'understitial':
5570      $(document).trigger('understitial');
5571      break;
5572    case 'bbreminder':
5573      $(document).trigger('resizeIframe');
5574      $(document).trigger('bbReminder');
5575      break;
5576    case 'fadeoutadvertisement':
5577      $(document).trigger('fadeoutadvertisement');
5578      break;
5579    default:
5580      return;
5581  }
5582
5583},false);
5584
5585/**
5586 *  billboardHeight
5587 *  billboard pushdown - margin bottom / overflow hidden
5588 */
5589$(document).one('billboardHeight', function() {
5590  const slots = document.querySelectorAll('#renderSlot_Billboard, #renderSlot_Mobil-Billboard');
5591
5592  slots.forEach(slot => {
5593    let banner_div = slot.querySelector('div');
5594    if (banner_div) {
5595      const checkStyleInterval = setInterval(() => {
5596        if (banner_div.getAttribute('style')) {
5597          banner_div.style.marginBottom = '20px';
5598          if (slot.offsetHeight < 290) { /* CLS */
5599            slot.style.marginBottom = '20px';
5600          }
5601          slot.style.overflow = 'hidden';
5602          clearInterval(checkStyleInterval);
5603        }
5604      }, 100);
5605    } else {
5606      const observer = new MutationObserver((mutationsList, observer) => {
5607        mutationsList.forEach(mutation => {
5608          if (mutation.type === 'childList') {
5609            banner_div = slot.querySelector('div');
5610            if (banner_div) {
5611              const checkStyleInterval = setInterval(() => {
5612                if (banner_div.getAttribute('style')) {
5613                  banner_div.style.marginBottom = '20px';
5614                  if (slot.offsetHeight < 290) { /* CLS */
5615                    slot.style.marginBottom = '20px';
5616                  }
5617                  slot.style.overflow = 'hidden';
5618                  clearInterval(checkStyleInterval);
5619                }
5620              }, 100);
5621              observer.disconnect();
5622            }
5623          }
5624        });
5625      });
5626      observer.observe(slot, { childList: true, subtree: true });
5627    }
5628  });
5629});
5630
5631/**
5632 *  billboardSticky
5633 */
5634$(document).on('billboardSticky', function(){
5635  const slot = $('#renderSlot_Billboard, #renderSlot_Mobil-Billboard');
5636  const billboardAdIframe = $('.billboardSticky');
5637  const stickyHeaderHeight = $('.SiteHeaderSticky').height();
5638
5639  const billboardPositionTop = slot.offset().top;
5640  const billboardMarginTop = parseFloat(billboardAdIframe.parent().css('margin-top'));
5641  let billboardStickyOffsetTop = stickyHeaderHeight + 5;
5642  let sTimer = 0;
5643  if (Math.sign(billboardMarginTop) === -1) {
5644    billboardStickyOffsetTop = billboardStickyOffsetTop + Math.abs(billboardMarginTop);
5645  } else {
5646    billboardStickyOffsetTop = billboardStickyOffsetTop - Math.abs(billboardMarginTop);
5647  }
5648
5649  const bId = String(billboardAdIframe.data('bannerid'));
5650  const lsKey = 'stickyBillboard_' + bId;
5651  const lsValue = localStorage.getItem(lsKey);
5652
5653  if (lsValue !== null) {
5654    const expireDate = JSON.parse(lsValue).expireAt;
5655    if (expireDate < new Date().getTime()) {
5656      localStorage.removeItem(lsKey);
5657    } else {
5658      return false;
5659    }
5660  }
5661
5662  if ($('.PageFrame').height() > 2000) {
5663    $(window).scroll(function () {
5664      if ($(window).scrollTop() > billboardPositionTop) {
5665        if (localStorage.getItem(lsKey) === null && !sTimer && !slot.hasClass('isStickyBillboard')) {
5666          slot.css({top: billboardStickyOffsetTop + 'px'});
5667          slot.addClass('isStickyBillboard');
5668
5669          sTimer = setTimeout(function () {
5670            slot.css({'zIndex': 998});
5671            slot.animate({'top': -600}, 3000, function () {
5672            });
5673            sTimer = 0;
5674            const expireAt = new Date(new Date().getTime() + (60000 * 1440)).getTime();
5675            localStorage.setItem(lsKey, JSON.stringify({expireAt: expireAt}));
5676          }, 2000);
5677        }
5678      } else {
5679        if (sTimer) {
5680          clearTimeout(sTimer);
5681          sTimer = 0;
5682        }
5683        slot.css({top: '0px'});
5684        slot.removeClass('isStickyBillboard');
5685      }
5686    });
5687  }
5688});
5689
5690/**
5691 *  parallax
5692 */
5693$(document).on("parallax", function(event){
5694  'use strict';
5695  const htmlTag = document.getElementsByTagName('html')[0];
5696  const peephole = $(".parallax").parent().parent();
5697  const parallax_div = $(".parallax").parent();
5698  const parallax_iframe = $(".parallax");
5699
5700  const peephole_width = peephole.width();
5701  const peephole_height = peephole.height();
5702
5703  const bgcolor = parallax_iframe.data("bgcolor");
5704  const parallax_ratio = parallax_iframe.data("height") / parallax_iframe.data("width");
5705
5706  htmlTag.classList.add('Ad_setZindex'); /* Workaround für Safari < v15 */
5707
5708  let viewportHeight = window.innerHeight - $(".SiteHeaderSticky").outerHeight(true);
5709  if (window.innerWidth < 768) {
5710    viewportHeight = window.innerHeight;
5711  }
5712  if (parallax_iframe.data("width") >= parallax_div.width()){
5713    parallax_iframe.height( parallax_div.width() * parallax_ratio);
5714  }
5715
5716  let ad_top = parseInt(viewportHeight - parallax_iframe.height()) / 2;
5717  const parallax_height_diff = Math.abs(viewportHeight - parallax_iframe.height()) * parallax_ratio;
5718  const parallax_width_diff = Math.floor(parallax_height_diff);
5719
5720  if ((parallax_iframe.data("height") >= viewportHeight) || (ad_top < parseInt($(".SiteHeaderSticky").outerHeight(true)))) {
5721    ad_top = $(".SiteHeaderSticky").outerHeight(true) +"px";
5722  }
5723
5724  peephole.height(viewportHeight);
5725  peephole.css("position","relative");
5726  peephole.prepend('<span class=\"Ad_parallax-borderTop\" style=\"width: ' + peephole_width + 'px;\"></span>'); /*Chrome-Render-Fix*/
5727
5728  parallax_div.css('width', peephole_width + 'px');
5729  parallax_div.css("height",viewportHeight);
5730  if (bgcolor) {
5731    parallax_div.css("background-color", bgcolor);
5732  }
5733  parallax_div.addClass('Ad_parallax-innerWrapper');
5734  parallax_div.css('margin', '0 auto');
5735  parallax_iframe.height(viewportHeight);
5736  const parallax_width = parallax_div.height() / parallax_ratio;
5737
5738  if ((peephole_height > viewportHeight) && (window.innerWidth < 768)) {
5739    parallax_iframe.width(parallax_width-parallax_width_diff);
5740  } else {
5741    parallax_iframe.width(parallax_width);
5742  }
5743
5744  if (parallax_width > peephole_width) {
5745    parallax_iframe.width(peephole_width);
5746  }
5747
5748  if (parallax_div.width() - parallax_iframe.width() > 48 ){
5749    parallax_iframe.css("margin-left", ((parallax_div.width() - parallax_iframe.width()) / 2) + "px");
5750  } else {
5751    parallax_iframe.css("margin-left", "0px");
5752  }
5753  parallax_iframe.css("position","fixed");
5754  parallax_iframe.css("bottom",ad_top);
5755  parallax_iframe.css("top",ad_top);
5756
5757});
5758
5759/**
5760 *  textAd
5761 */
5762$(document).one("textAd", function(event){
5763  /* Finde alle iframes mit der class .textAd */
5764  const $iframes = $("iframe.textAd");
5765
5766  /* Resize the iframes when the window is resized */
5767  $( window ).resize( function() {
5768    $iframes.each( function() {
5769      if ($(this).data("width") >= $(this).width()) {
5770        $(this).height( $(this).data("height") + 20 + (($(this).data("width")-$(this).width())/2));
5771      }
5772    });
5773    /* Resize to fix all iframes on page load. */
5774  }).resize();
5775});
5776
5777/**
5778 *  resizeIframe
5779 */
5780$(document).one("resizeIframe", function(event){
5781  /* Finde alle iframes mit der class .responsiveFrame */
5782  const $iframes = $("iframe.responsiveFrame");
5783
5784  /* Find and save the aspect ratio for all iframes */
5785  $iframes.each(function () {
5786    $( this ).data( "ratio", $(this).data("height") / $(this).data("width") );
5787    let slot = $(this).parent().parent();
5788    if (slot.parent().length && slot.parent().hasClass() ){
5789      if (slot.parent().attr('class').match(/slick-track/)) {
5790        /* SliderBannerArticleDetail_dots nur einblenden, wenn auch was geschaltet ist */
5791        $('.SliderBannerArticleDetail_dots').css('display','block');
5792      }
5793    }
5794  });
5795
5796  /* Resize the iframes when the window is resized */
5797  $( window ).resize( function() {
5798    $iframes.each( function() {
5799      if($(this).data("width") >= $(this).width()){
5800        $( this ).height( $(this).width() * $( this ).data( "ratio" ));
5801      }
5802    });
5803    /* Resize to fix all iframes on page load. */
5804  }).resize();
5805
5806});
5807
5808/**
5809 * adSliderControl
5810 */
5811$(document).one("adSliderControl", function(event) {
5812  /**
5813   *  Nur geschaltete Banner in Banner-Slider auf Artikelseite zeigen.
5814   *  Wenn es nur einen geschalteten Banner gibt, dann wird Auto-Slide deaktiviert
5815   *  und zum Slide mit dem Banner gesprungen. Sind beide Banner vorhanden,
5816   *  wird der Auto-Slide des Sliders wieder aktiviert.
5817   *
5818   *  Eine Umsetzung mit sowohl "unslick" als auch "slickRemove" funktionierte nicht,
5819   *  da dann alle Werbemittel nicht mehr sichtbar waren. Auch vornherein den Slider nur
5820   *  anzuwenden, wenn es mehr als einen Banner gibt, hatte nicht funktioniert, da das Banner-JS bereits
5821   *  verarbeitet war.
5822   */
5823  'use strict';
5824  const bannerSlider = '.SliderBannerArticleDetail';
5825  const bannerSliderDots = bannerSlider + '_dots';
5826  const slideSelectors = ['slick-slide00', 'slick-slide01'];
5827  const slideState = [];
5828
5829  $(bannerSliderDots).css('display', 'none');
5830  $(bannerSlider).slick('slickPause');
5831  $(bannerSlider).slick('slickGoTo', 0); /* Slider refreshen, damit Slides aufrufbar sind */
5832
5833  const waitForEl = function (slideSelectors, callback) {
5834    const startTimeInMs = Date.now();
5835
5836    for (let i = 0; i < slideSelectors.length; i++) {
5837      const selectorObj = document.getElementById(slideSelectors[i]);
5838      if (selectorObj && selectorObj.children.length && selectorObj.children[0].tagName === 'DIV') {
5839        slideState[i] = 1;
5840      } else {
5841        slideState[i] = 0;
5842      }
5843    }
5844
5845    if (slideState[0] === 1 && slideState[1] === 0) {
5846      $(bannerSlider).slick('slickGoTo', 0);
5847      callback();
5848      return;
5849    } else if (slideState[0] === 0 && slideState[1] === 1) {
5850      $(bannerSlider).slick('slickGoTo', 1);
5851      callback();
5852      return;
5853    } else if (slideState[0] === 1 && slideState[1] === 1) {
5854      $(bannerSlider).slick('slickPlay');
5855      $(bannerSliderDots + ' li').css('padding-left', '0');
5856      $(bannerSliderDots).css('display', 'block');
5857      callback();
5858      return;
5859    } else {
5860      setTimeout(function () {
5861        if (Date.now() - startTimeInMs > 10000) {
5862          /*Callback spätestens nach 10 Sekunden abbrechen */
5863          return;
5864        }
5865        waitForEl(slideSelectors, callback);
5866      }, 10);
5867    }
5868  };
5869
5870  waitForEl(slideSelectors, function() {});
5871
5872});
5873
5874/**
5875 * halfpage
5876 */
5877$(document).on("halfpage", function(event, be_containerClass){
5878
5879  /*
5880  const $iframes = $("iframe.halfpage");
5881
5882  $iframes.each(function(){
5883    const slot = $(this).parent().parent();
5884    slot.css("width","300px");
5885  });
5886  */
5887
5888  function halfpageResize() {
5889    /* Class-Name für sitebarContainer und .page-footer entsprechend einsetzen */
5890    const halfpageContainer = '.Ad-skyscraper-right';
5891
5892    const stageWidth = $("." + be_containerClass).width();
5893    let halfpageSpace = ($(this).width() - stageWidth) / 2;
5894    halfpageSpace = Math.floor(halfpageSpace) -15;
5895
5896    if ($(halfpageContainer + ' iframe.responsiveFrame').data("width") > halfpageSpace ) {
5897      $(halfpageContainer + ' iframe.responsiveFrame').width(halfpageSpace);
5898    }
5899
5900    const halfpageAd = $('.halfpage').parent().parent();
5901    const halfpage = $('.halfpage');
5902    const halfpage_width = halfpage.data('width');
5903
5904    if (halfpage_width > halfpageSpace ) {
5905      halfpage.width(halfpageSpace);
5906      halfpageAd.css("width",halfpageSpace+"px");
5907      halfpage.css("width",halfpageSpace+"px");
5908
5909      $(document).ready(function(){
5910        const halfpageDOM = halfpage.contents();
5911        halfpageDOM.find("iframe").css("width", halfpageSpace+"px");
5912        const currWinHeight = $(window).height();
5913        halfpageDOM.find("iframe").css("max-height", currWinHeight+"px");
5914      });
5915    }
5916  }
5917
5918  const halfpageAd = $('.halfpage').parent().parent();
5919  const halfpage    = $('.halfpage');
5920
5921  const halfpage_width = halfpage.data('width');
5922  halfpageAd.css("width",halfpage_width+'px');
5923  halfpageAd.css("max-width",halfpage_width+'px');
5924
5925  const halfpage_fixed = halfpage.data('fixed');
5926  if (halfpage_fixed != 'false') {
5927    halfpageAd.css("position","fixed");
5928  }
5929
5930  /* Resize halfpage when the window is resized */
5931  $( window ).resize( function() {
5932    halfpageResize();
5933    /* Resize to fix halfpage on page load. */
5934  }).resize();
5935
5936}
5936);
5937
5938
5939/**
5940 * floorAd
5941 */
5942$(document).on('floorAd', function(event) {
5943  const floorAd = $('.floorAd').parent().parent();
5944  const floorAdIframe = $('.floorAd');
5945  const floorAdIframeContent = $('.floorAd').contents();
5946  const scroll_pos = floorAdIframe.data('display-at-pixel');
5947  const set_pos = floorAdIframe.data('align');
5948  const display_on_scroll = floorAdIframe.data('display-on-scroll');
5949  const center_ad = floorAdIframe.data('center-ad');
5950  let isHidden = false;
5951
5952  floorAd.css('z-index', floorAdIframe.data('zindex'));
5953  if (display_on_scroll) {
5954    floorAd.css('display', 'none');
5955  }
5956  if (center_ad) {
5957    floorAd.css('text-align', 'center');
5958  }
5959
5960  if (set_pos) {
5961    floorAd.css('position', 'fixed');
5962    floorAd.css(floorAdIframe.data('vertical-pos'),floorAdIframe.data('vertical-px-offset'));
5963    floorAd.css(floorAdIframe.data('horizontal-pos'),floorAdIframe.data('horizontal-px-offset'));
5964  }
5965
5966  window.onscroll = function() {
5967    if( window && !isHidden) {
5968      if (document.documentElement.scrollTop > scroll_pos || self.pageYOffset > scroll_pos) {
5969        $(floorAd).fadeIn("slow");
5970      } else if (document.documentElement.scrollTop < scroll_pos || self.pageYOffset < scroll_pos) {
5971        $(floorAd).fadeOut("slow");
5972      }
5973    }
5974  };
5975
5976  floorAdIframeContent.find('.CloseAd').click(function() {
5977    $(floorAd).fadeOut('slow');
5978    isHidden = true;
5979  });
5980
5981});
5982
5983
5984/**
5985 * layerAd
5986 */
5987$(document).on('layerAd', function(event) {
5988  const layerAd = $('.layerAd').parent().parent();
5989  const layerAdWrapper = $('.layerAd').parent();
5990  const layerAdIframe = $('.layerAd');
5991  const ad_close_time = layerAdIframe.data('ad-close-time');
5992
5993  const bg_color = layerAdIframe.data('bgcolor');
5994  const bg_opacity = layerAdIframe.data('bgopacity');
5995
5996  const align_banner = layerAdIframe.data('align');
5997  const vertical_px_offset = layerAdIframe.data('vertical-px-offset');
5998  const vertical_pos = layerAdIframe.data('vertical-pos');
5999  const horizontal_px_offset = layerAdIframe.data('horizontal-px-offset');
6000  const horizontal_pos = layerAdIframe.data('horizontal-pos');
6001
6002  function convertHex(hex,opacity){
6003    hex = hex.replace('#','');
6004    r = parseInt(hex.substring(0,2), 16);
6005    g = parseInt(hex.substring(2,4), 16);
6006    b = parseInt(hex.substring(4,6), 16);
6007
6008    return 'rgba(' + r + ',' + g + ',' + b + ',' + opacity / 100 + ')';
6009  }
6010
6011  const bgColor_rgb = convertHex(bg_color, bg_opacity);
6012
6013  layerAd.css('width', '100%');
6014  layerAd.css('height', '100%');
6015  layerAd.css('background', bgColor_rgb);
6016  layerAd.css('position', 'fixed');
6017  layerAd.css('top', '0');
6018  layerAd.css('left', '0');
6019  layerAd.css('z-index', '12000');
6020
6021  layerAd.css('display', 'flex');
6022  layerAd.css('display', '-webkit-box');
6023  layerAd.css('display', '-webkit-flex');
6024  layerAd.css('display', '-ms-flexbox');
6025
6026  layerAd.css('-webkit-box-align', 'center');
6027  layerAd.css('-webkit-align-items', 'center');
6028  layerAd.css('-ms-flex-align', 'center');
6029  layerAd.css('align-items', 'center');
6030
6031  layerAd.css('-webkit-box-pack', 'center');
6032  layerAd.css('-webkit-justify-content', 'center');
6033  layerAd.css('-ms-flex-pack', 'center');
6034  layerAd.css('justify-content', 'center');
6035
6036
6037  layerAd.css('z-index', '12000');
6038
6039  layerAdWrapper.css('position', 'absolute');
6040  layerAdWrapper.prepend("<div class='layer_close' style='z-index: 13000; position:absolute; color: #ffffff; top:0; right:0;'><i title =\"schließen\" class=\"fa fa-close fa-2x\"></i></div>");
6041
6042  layerAdWrapper.css('margin', 'auto');
6043
6044  if (align_banner == 1) {
6045    if (vertical_pos == 'bottom') {
6046      layerAdWrapper.css('margin-bottom', vertical_px_offset+'px');
6047    } else {
6048      layerAdWrapper.css('margin-top', vertical_px_offset+'px');
6049    }
6050    if (horizontal_pos == 'left') {
6051      layerAdWrapper.css('margin-left', horizontal_px_offset+'px');
6052    } else {
6053      layerAdWrapper.css('margin-right', horizontal_px_offset+'px');
6054    }
6055  }
6056
6057  function showLayerAd() {
6058    layerAd.show();
6059  }
6060
6061  function closeLayerAd() {
6062    layerAd.hide();
6063  }
6064
6065  if (ad_close_time > 0){
6066    setTimeout(function(){closeLayerAd();}, ad_close_time*1000);
6067  }
6068
6069  $( ".layer_close" ).click(function() {
6070    layerAd.hide();
6071  });
6072});
6073
6074/**
6075 * exitintent
6076 */
6077$(document).one("exitintent", function(event){
6078  $( "html" ).one( "mouseleave", function() {
6079    $("#LayerModal").addClass("show");
6080  });
6081});
6082
6083/**
6084 * changeBackgroundColor
6085 */
6086$(document).on('changeBackgroundColor',function(event){
6087  const iframe = $('.fireplace'),
6088    bg_color = iframe.data('bgcolor');
6089  $(".Body").css('background-color', bg_color);
6090});
6091
6092/**
6093 * isBackgroundClick
6094 * On Background click go to clickurl
6095 */
6096$(document).on('isBackgroundClick',function(event){
6097
6098  $("#usercentrics-root").click(function(event ) {
6099    event.stopPropagation();
6100  });
6101
6102  $(".PageFrame").click(function(event ) {
6103    event.stopPropagation();
6104  });
6105
6106  $("#uc-center-container").click(function(event ) {
6107    event.stopPropagation();
6108  });
6109
6110  $(".Body").click(function() {
6111    const iframe = $('.bgclickplace');
6112    const clickurl = iframe.data('clickurl');
6113    window.open(clickurl, '_blank');
6114  });
6115});
6116
6117/**
6118 * counterAd
6119 */
6120$(document).one('counterAd', function(event) {
6121  const counterAd = $('.counterAd').parent().parent();
6122  const counterAdIframe = $('.counterAd');
6123
6124  const pl_id = counterAdIframe.data('contentunit');
6125  const clickurl = counterAdIframe.data('clickurl');
6126  const enddatum = counterAdIframe.data('enddatum');
6127  const counterimage = counterAdIframe.data('counterimage');
6128  const layout = counterAdIframe.data('layout');
6129
6130  let countertext = '';
6131
6132  countertext = countertext + '<div id=\"'+pl_id+'\" class="noanzeige" width=\"300\" height=\"300\">\n';
6133  countertext = countertext + '	<div>\n' ;
6134  countertext = countertext + '		<a target=\"_blank\" href=\"'+clickurl+'\">\n';
6135  if(typeof layout !== 'undefined' && layout === 'image') {
6136    countertext = countertext + '			<img src=\"' + counterimage + '\" title=\"\" alt=\"\" border=\"0\" width=\"300\" height=\"150\"/>\n';
6137  }
6138  countertext = countertext + '		</a>\n';
6139  countertext = countertext + '		<div class=\"banner_counter\" border=\"0\" width=\"300\" height=\"150\" style=\"max-width: 300px !important;\"> 	\n';
6140  countertext = countertext + '			<span id=\"clockline\"></span>\n';
6141  countertext = countertext + '				<div id=\"banner_counter\"></div>\n';
6142  countertext = countertext + '			<div  id=\"name_time_block\">\n';
6143  countertext = countertext + '				<span class=\"name_time\">Tage</span>\n';
6144  countertext = countertext + '				<span class=\"name_time\">Stunden</span>\n';
6145  countertext = countertext + '				<span class=\"name_time\">Minuten</span>\n';
6146  countertext = countertext + '			</div>\n';
6147  countertext = countertext + '		</div>	  \n';
6148  countertext = countertext + '	 \n';
6149  countertext = countertext + '	</div>\n';
6150  countertext = countertext + '\n';
6151  countertext = countertext + '</div>\n';
6152  counterAd.append(countertext);
6153  if(typeof layout !== 'undefined' && layout === 'image'){
6154    counterAdIframe.css("display","none");
6155  }
6156  counterAd.css('margin-top', '10px');
6157  $('.noanzeige').not(':first').remove();
6158  if(typeof jQuery == "function"){
6159    $(function() {
6160      $(document).trigger( "counter", enddatum);
6161    });
6162  }
6163
6164  $( counterAd ).closest('div').next().find('.line').removeClass("line");
6165});
6166
6167/**
6168 * counter
6169 */
6170$(document).on("counter", function(event, endtime){
6171
6172  /* Datum mit Punkt */
6173  let iso_end_date;
6174  if (endtime.match(/\./) ) {
6175    let iso_end_dateArr = endtime.split(".");
6176
6177    /* Umwandlung in Iso-Format */
6178    if (iso_end_dateArr[2] < 100) iso_end_dateArr[2] = "20" + iso_end_dateArr[2];
6179    iso_end_date = iso_end_dateArr[2] + "-" + iso_end_dateArr[0] + "-" +iso_end_dateArr[1];
6180
6181    /* Datum im Iso-Format, z.B. 2020-11-09 */
6182  } else {
6183    iso_end_date = endtime;
6184  }
6185
6186  const end = new Date(iso_end_date);
6187
6188  const _second = 1000;
6189  const _minute = _second * 60;
6190  const _hour = _minute * 60;
6191  const _day = _hour * 24;
6192  let timer;
6193
6194  function showRemaining() {
6195    const now = new Date();
6196    now.setHours(now.getHours() +1);
6197
6198    const distance = end - now;
6199    if (distance < 0) {
6200
6201      clearInterval(timer);
6202      document.getElementById('banner_counter').innerHTML = '<span class="time">0</span> ';
6203      document.getElementById('banner_counter').innerHTML += '<span class="time">0</span> ';
6204      document.getElementById('banner_counter').innerHTML += '<span class="time">0</span> ';
6205      return;
6206    }
6207    const days = Math.floor(distance / _day);
6208    const hours = Math.floor((distance % _day) / _hour);
6209    const minutes = Math.floor((distance % _hour) / _minute);
6210
6211    document.getElementById('banner_counter').innerHTML = '<span class="time">' + days + '</span> ';
6212    document.getElementById('banner_counter').innerHTML += '<span class="time">' + hours + '</span> ';
6213    document.getElementById('banner_counter').innerHTML += '<span class="time">' + minutes + '</span> ';
6214
6215  }
6216  timer = setInterval(showRemaining, 1000);
6217
6218});
6219
6220/**
6221 * centerIframe
6222 */
6223$(document).on('centerIframe', function(event){
6224  const iframe = $('.centeredFrame'),
6225    container = iframe.parent();
6226
6227  container.css('display', 'flex');
6228  container.css('flex-flow','column');
6229  iframe.css('align-self','center');
6230});
6231
6232/**
6233 * blockadvertisement
6234 */
6235$(document).on("blockadvertisement", function(event){
6236
6237  const iframe = $('.blockadvertisement');
6238  let container = iframe.parent();
6239  container.css("display","none");
6240});
6241
6242/**
6243 * wallpapercolor
6244 * Einfärben des body für Wallpaper
6245 */
6246$(document).on("wallpapercolor", function(event){
6247
6248  const iframe = $('.wallpaper_banner');
6249  const wallpapercolor = iframe.data("wallpapercolor");
6250  $('body').css("background-color",wallpapercolor);
6251
6252});
6253
6254/**
6255 * advertOnImage
6256 */
6257$(document).one("advertOnImage", function(event){
6258  const slot = $('[id^="renderSlot_Rectangle-Online-Specials"]');
6259  if (slot.hasClass("Ad-mediumRectangleStageTeaserAdvert")) {
6260    if (slot.children('div').length > 0) {
6261      slot.parent().css('padding', '5px');
6262      slot.parent().css('background-color', '#fff');
6263    }
6264
6265  }
6266
6267});
6268
6269/**
6270 * be_sitebarResize
6271 */
6272function be_sitebarResize(wideLayout, sitebarBid) {
6273  const browser_scrollbar_width = 0;
6274  let offsetLeft = 460;
6275  let outerWidth = 980;
6276  const sitebarContainer = '.Ad-skyscraper-right';
6277  if (($('.SiteFooter').length) && (!wideLayout)) {
6278    offsetLeft = $('.SiteFooter').offset().left + browser_scrollbar_width;
6279    outerWidth = $('.SiteFooter').outerWidth();
6280  } else if (($('.PageGallery').length) && (!wideLayout)) {
6281    offsetLeft = $('.PageGallery').offset().left + browser_scrollbar_width;
6282    outerWidth = $('.PageGallery').outerWidth();
6283  }
6284  if (wideLayout === true) {
6285    let siteHeader = document.querySelector('.SiteHeader') || document.querySelector('.SiteHeaderSticky_firstLine-inner');
6286    if (siteHeader) {
6287      let rect = siteHeader.getBoundingClientRect();
6288      offsetLeft = rect.left + browser_scrollbar_width;
6289
6290      let siteHeaderStyles = window.getComputedStyle(siteHeader);
6291      outerWidth = parseFloat(siteHeaderStyles.getPropertyValue('width'));
6292    }
6293  }
6294
6295  let rightOffset = $(this).width() - (offsetLeft + outerWidth);
6296  rightOffset = Math.floor(rightOffset);
6297
6298  if ($(sitebarContainer + ' iframe.responsiveFrame').data("width") > rightOffset ) {
6299    $(sitebarContainer + ' iframe.responsiveFrame').width(rightOffset);
6300  }
6301
6302  const iframeEl = document.querySelector('iframe.sitebar');
6303  let iFrameElDocument = iframeEl.contentDocument || iframeEl.contentWindow.document;
6304  let imgSitebar = iFrameElDocument.getElementById("sitebar"+sitebarBid);
6305  let imgSky = iFrameElDocument.getElementById("sky"+sitebarBid);
6306  const offsetLowLmt = 135;
6307  const offsetUpLmt = 215;
6308
6309  if (imgSky && imgSitebar) {
6310    if ((offsetLeft >= offsetLowLmt) && (offsetLeft < offsetUpLmt)) {
6311      imgSitebar.style.display = "none";
6312      imgSky.style.display = "inline";
6313    } else if (offsetLeft >= offsetUpLmt) {
6314      imgSitebar.style.display = "inline";
6315      imgSky.style.display = "none";
6316    }
6317    else if (offsetLeft < offsetLowLmt) {
6318        imgSitebar.style.display = "none";
6319        imgSky.style.display = "none";
6320      }
6321  }
6322
6323
6324  const sitebarAd = $('.sitebar').parent().parent();
6325  const sitebar = $('.sitebar');
6326  const sitebar_width = sitebar.data('width');
6327  const hideWidth = (sitebar.data('hidewidth') !== undefined ? sitebar.data('hidewidth') : 0);
6328
6329  if (rightOffset <= hideWidth) {
6330    sitebarAd.css('display', 'none');
6331    return;
6332  } else {
6333    sitebarAd.css('display', 'block');
6334  }
6335
6336
6337  if (sitebar_width > rightOffset ) {
6338    sitebar.width(rightOffset);
6339    sitebarAd.css("width",rightOffset+"px");
6340    sitebar.css("width",rightOffset+"px");
6341
6342    $(document).ready(function(){
6343      const sitebarDOM = sitebar.contents();
6344      sitebarDOM.find("iframe").css("width", rightOffset+"px");
6345      const currWinHeight = $(window).height();
6346      sitebarDOM.find("iframe").css("max-height", currWinHeight+"px");
6347    });
6348  }
6349}
6350
6351/**
6352 * sitebar
6353 */
6354$(document).on('sitebar',function(event, wideLayout) {
6355  const sitebarAd = $('.sitebar').parent().parent();
6356  const sitebar = $('.sitebar');
6357  const sitebarBid = sitebar[0].getAttribute("data-bid");
6358  const sbAdMarginTop = sitebar[0].getAttribute("data-margintop");
6359  if (sbAdMarginTop !== "0" && sbAdMarginTop !== "NULL") {
6360    sitebarAd.css("margin-top",sbAdMarginTop+'px');
6361  }
6362
6363  if ( sitebar.data('bgcolor') ) {
6364    const bg_color = sitebar.data('bgcolor');
6365    if (bg_color.startsWith("#")) {
6366      document.getElementsByTagName('body')[0].style.backgroundColor = bg_color;
6367    }
6368  }
6369
6370  const sitebar_width = sitebar.data('width');
6371  sitebarAd.css("width",sitebar_width+'px');
6372  sitebarAd.css("max-width",sitebar_width+'px');
6373  sitebar.css("max-height",'100vh');
6374
6375  const sitebar_fixed = sitebar.data('fixed');
6376  if (sitebar_fixed != 'false') {
6377    sitebarAd.css("position","fixed");
6378  }
6379
6380  /* Resize sitebar when the window is resized */
6381  $( window ).resize( function() {
6382    be_sitebarResize(wideLayout, sitebarBid);
6383    /* Resize to fix sitebar on page load. */
6384  }).resize();
6385
6386}
6386);
6387
6388/**
6389 * be_sitebarLeftResize
6390 */
6391function be_sitebarLeftResize(wideLayout, sitebarBid) {
6392  const browser_scrollbar_width = 15;
6393  let offsetLeft = 460;
6394  let outerWidth = 980;
6395  const sitebarLeftContainer = '.Ad-skyscraper-left';
6396  if (($('.SiteFooter').length) && (!wideLayout)) {
6397    offsetLeft = $('.SiteFooter').offset().left + browser_scrollbar_width;
6398    outerWidth = $('.SiteFooter').outerWidth();
6399  } else if (($('.PageGallery').length) && (!wideLayout)) {
6400    offsetLeft = $('.PageGallery').offset().left + browser_scrollbar_width;
6401    outerWidth = $('.PageGallery').outerWidth();
6402  }
6403  if (wideLayout === true) {
6404    let siteHeader = document.querySelector('.SiteHeader') || document.querySelector('.SiteHeaderSticky_firstLine-inner');
6405    if (siteHeader) {
6406      let rect = siteHeader.getBoundingClientRect();
6407      offsetLeft = rect.left + browser_scrollbar_width;
6408
6409      let siteHeaderStyles = window.getComputedStyle(siteHeader);
6410      outerWidth = parseFloat(siteHeaderStyles.getPropertyValue('width'));
6411    }
6412  }
6413
6414  let leftOffset = offsetLeft;
6415  leftOffset = Math.round(leftOffset);
6416
6417  if ($(sitebarLeftContainer + ' iframe.responsiveFrame').data("width") > leftOffset ) {
6418    $(sitebarLeftContainer + ' iframe.responsiveFrame').width(leftOffset);
6419  }
6420
6421  const iframeElLeft = document.querySelector('iframe.sitebarLeft');
6422  let iFrameElLeftDocument = iframeElLeft.contentDocument || iframeElLeft.contentWindow.document;
6423  let imgSitebar = iFrameElLeftDocument.getElementById("sitebar"+sitebarBid);
6424  let imgSky = iFrameElLeftDocument.getElementById("sky"+sitebarBid);
6425  const offsetLowLmt = 140;
6426  const offsetUpLmt = 320;
6427
6428  if (imgSky && imgSitebar) {
6429    if ((offsetLeft >= offsetLowLmt) && (offsetLeft < offsetUpLmt)) {
6430      imgSitebar.style.display = "none";
6431      imgSky.style.display = "inline";
6432    } else if (offsetLeft >= offsetUpLmt) {
6433      imgSitebar.style.display = "inline";
6434      imgSky.style.display = "none";
6435    }
6436    else if (offsetLeft < offsetLowLmt) {
6437        imgSitebar.style.display = "none";
6438        imgSky.style.display = "none";
6439      }
6440  }
6441
6442
6443  const sitebarAd = $('.sitebarLeft').parent().parent();
6444  const sitebar = $('.sitebarLeft');
6445  const sitebar_width = sitebar.data('width');
6446  const hideWidth = (sitebar.data('hidewidth') !== undefined ? sitebar.data('hidewidth') : 0) + 15;
6447
6448  if (leftOffset <= hideWidth) {
6449    sitebarAd.css('display', 'none');
6450    return;
6451  } else {
6452    sitebarAd.css('display', 'block');
6453  }
6454
6455
6456  let sidebarLeftMargin = Math.round(leftOffset);
6457  sitebarAd.css("margin-left","0px");
6458  let currSitebar_width = sitebarAd[0].offsetWidth;
6459
6460  if (sitebar_width >= leftOffset ) {
6461    leftOffset = leftOffset-browser_scrollbar_width;
6462
6463    sitebar.width(leftOffset);
6464    sitebarAd.css("width",leftOffset+"px");
6465    sitebar.css("width",leftOffset+"px");
6466
6467    $(document).ready(function(){
6468      const sitebarDOM = sitebar.contents();
6469      sitebarDOM.find("iframe").css("width", leftOffset+"px");
6470      const currWinHeight = $(window).height();
6471      sitebarDOM.find("iframe").css("max-height", currWinHeight+"px");
6472    });
6473  } else if (sitebar_width < leftOffset) {
6474    let sbMarginLeft = leftOffset - browser_scrollbar_width - sitebar_width;
6475
6476    sitebarAd.css("width",sitebar_width+"px");
6477    sitebar.css("width",sitebar_width+"px");
6478    sitebarAd.css("margin-left",sbMarginLeft+"px");
6479  }
6480}
6481
6482/**
6483 * sitebarLeft
6484 */
6485$(document).on('sitebarLeft',function(event, wideLayout) {
6486  const sitebarLeftAd = $('.sitebarLeft').parent().parent();
6487  const sitebarLeft = $('.sitebarLeft');
6488  const sitebarLeftBid = sitebarLeft[0].getAttribute("data-bid");
6489  const leftSitebarSlot = document.getElementById("renderSlot_Skyscraper-links");
6490  leftSitebarSlot.classList.add("leftSitebarSlot");
6491
6492  const sitebarLeft_width = sitebarLeft.data('width');
6493  sitebarLeftAd.css("width",sitebarLeft_width+'px');
6494  sitebarLeftAd.css("max-width",sitebarLeft_width+'px');
6495
6496  const sitebarLeft_fixed = sitebarLeft.data('fixed');
6497  if (sitebarLeft_fixed != 'false') {
6498    sitebarLeftAd.css("position","fixed");
6499  }
6500
6501  const sbAdLeftMarginTop = sitebarLeft[0].getAttribute("data-margintop");
6502  if (sbAdLeftMarginTop !== "0" && sbAdLeftMarginTop !== "NULL") {
6503    sitebarLeftAd.css("margin-top",sbAdLeftMarginTop+'px');
6504  }
6505
6506  /* Resize sitebarLeft when the window is resized */
6507  $( window ).resize( function() {
6508    be_sitebarLeftResize(wideLayout, sitebarLeftBid);
6509    /* Resize to fix sitebar on page load. */
6510  }).resize();
6511
6512  window.addEventListener('load', function() {
6513    be_sitebarLeftResize(wideLayout, sitebarLeftBid);
6514  });
6515
6516  window.onload = function() {
6517    be_sitebarLeftResize(wideLayout, sitebarLeftBid);
6518  };
6519
6520
6521});
6522
6523/**
6524 * teadsResize
6525 * teads Videos
6526 */
6527$(document).on('teadsResize',function(event){
6528  const iframe = $('.video_ad'),
6529    aspect_ratio = 1.7,
6530    wrapper = iframe.parent();
6531
6532  iframe.height(iframe.width()/aspect_ratio);
6533
6534  wrapper.css('display', 'flex');
6535  wrapper.css('flex-flow','column');
6536  iframe.css('align-self','center');
6537});
6538
6539/**
6540 * pushdown
6541 */
6542$(document).on("pushdown", function(event, elementclass){
6543
6544  const pushdown_iframe = $("." + elementclass);
6545  const pushdown_container = pushdown_iframe.parent();
6546
6547  const ad_height = pushdown_iframe.data("height");
6548  const ad_width = pushdown_iframe.data("width");
6549  const ad_margin_bottom = parseInt(pushdown_container.css("height")) - ad_height;
6550  const pushdownheight = pushdown_iframe.data("pushdownheight") + ad_margin_bottom;
6551  const pushdowntime = pushdown_iframe.data("pushdowntime"); /* Dauer der Animation */
6552  const closingtime = pushdown_iframe.data("closingtime") * 1000;   /* Initiales Einfahren */
6553  const pushdown_center_ad = pushdown_iframe.data("center_ad");
6554  const pushdown_func = pushdown_iframe.data("pushdown-func") ? 1 : 0;
6555  const no_initialpushdown = pushdown_iframe.data("no_initialpushdown") ? 1 : 0;
6556
6557  /* Werbemittel zentrieren */
6558  if(pushdown_center_ad == 1){
6559    pushdown_container.css("text-align","center");
6560  }
6561
6562  if(pushdown_func == 0){
6563
6564    /* prevent too large iFrame-height on smaller stage */
6565    let pushdown_iframeWidth = pushdown_iframe[0].clientWidth;
6566    let pushdownRatio = ad_height / ad_width;
6567    let pushdownHeight = Math.ceil(pushdown_iframeWidth * pushdownRatio);
6568    pushdown_iframe.css("height",pushdownHeight + "px");
6569
6570    return;
6571  }
6572
6573  /* Nutzer-Handling */
6574  pushdown_iframe.on("mouseover", function(event){
6575    clearTimeout(waiting_for_closing);
6576    $(document).trigger('pushdown-animation', [pushdown_container, pushdown_iframe, '1', pushdownheight]);
6577
6578    pushdown_iframe.one("mouseout", function(event){
6579      $(document).trigger('pushdown-animation', [pushdown_container, pushdown_iframe, '1', ad_height]);
6580    });
6581  });
6582
6583  /* Initiales Ausfahren */
6584  if(no_initialpushdown != 1) {
6585    $(document).trigger('pushdown-animation', [pushdown_container, pushdown_iframe, pushdowntime, pushdownheight]);
6586  }
6587
6588  /* Einfahren nach initialem Ausfahren */
6589  let waiting_for_closing = window.setTimeout(function(){
6590    $(document).trigger('pushdown-animation', [pushdown_container, pushdown_iframe, pushdowntime, ad_height]);
6591  }, closingtime);
6592
6593});
6594
6595/**
6596 * pushdown-animation
6597 */
6598$(document).on("pushdown-animation", function(event, pushdown_container, pushdown_iframe, movingtime, newheight){
6599
6600  pushdown_container.css({
6601    height           : newheight,
6602    WebkitTransition : 'height ' + movingtime + 's ease-in-out',
6603    MozTransition    : 'height ' + movingtime + 's ease-in-out',
6604    MsTransition     : 'height ' + movingtime + 's ease-in-out',
6605    OTransition      : 'height ' + movingtime + 's ease-in-out',
6606    transition       : 'height ' + movingtime + 's ease-in-out'
6607  });
6608  pushdown_iframe.css({
6609    height           : newheight,
6610    WebkitTransition : 'height ' + movingtime + 's ease-in-out',
6611    MozTransition    : 'height ' + movingtime + 's ease-in-out',
6612    MsTransition     : 'height ' + movingtime + 's ease-in-out',
6613    OTransition      : 'height ' + movingtime + 's ease-in-out',
6614    transition       : 'height ' + movingtime + 's ease-in-out'
6615  });
6616});
6617
6618/**
6619 * parallax_outstream
6620 */
6621$(document).on("parallax_outstream", function(event){
6622  const iframe = $('.parallax_outstream');
6623  const container = iframe.parent();
6624  container.attr("id","parallax_outstream");
6625  iframe.css("height","0px");
6626  iframe.css("width","0px");
6627});
6628
6629/**
6630 * dynamic_sitebar
6631 */
6632$(document).on("dynamic_sitebar", function(event){
6633  const iframe = $('.dynamic_sitebar');
6634  const container = iframe.parent();
6635  const dynamic_space = ($('.PageFrame').outerWidth(true) - $('.PageFrame').outerWidth()) / 2;
6636  container.css("width", dynamic_space +"px");
6637  container.css("position","fixed");
6638});
6639
6640/**
6641 * insertAdvTextDiv
6642 *
6643 * "Anzeige"-Position und Border an Werbemittelgroesse positionieren/anpassen
6644 */
6645$(document).on("insertAdvTextDiv", function(event) {
6646  const $iframes = $('[id^="renderSlot_"] iframe');
6647  let el = $('<div class="Ad_text"></div>');
6648
6649  $iframes.each(function () {
6650    if ($(this).data("width") == '1') {
6651      $(this).parent('div').css('height', '0');
6652      return;
6653    }
6654
6655    const slot = $(this).parent().parent();
6656    if ($(this).parent().parent().length) {
6657      if (slot.attr('id').match(/renderSlot_(Super*|Sky*|Rectangle-Gal|Mobil-Rectangle-Gal)/)) {
6658        return;
6659      }
6660    } else {
6661      return;
6662    }
6663    if (slot.parent().length && slot.parent().hasClass() ){
6664      if(slot.parent().attr('class').match(/slick-track/)){
6665        /* SliderBannerArticleDetail_dots nur einblenden, wenn auch was geschaltet ist */
6666        $('.SliderBannerArticleDetail_dots').css('display', 'block');
6667      }
6668    }
6669
6670    const ad_text_div = $(this).parent().find($(".Ad_text"));
6671    const ad_text_parallax_div = $(this).parent().parent().find($(".Ad_text"));
6672
6673    ad_text_div.css('margin', '');
6674    if ($(this).hasClass('parallax')) {
6675
6676      if(!ad_text_parallax_div.length > 0){
6677        $(this).parent().parent('div').prepend(el);
6678      }
6679      ad_text_parallax_div.css("margin", "0 auto");
6680      ad_text_parallax_div.css("width", '100%');
6681      if ($(this).data("ad_text_bgc")) {
6682        ad_text_parallax_div.css("background-color", $(this).data("ad_text_bgc"));
6683      }
6684      if ($(this).data("ad_text_margintop")) {
6685        ad_text_parallax_div.css("margin-top", $(this).data("ad_text_margintop"));
6686      }
6687      if ($(this).data("ad_text_maxheight")) {
6688        ad_text_parallax_div.css("max-height", $(this).data("ad_text_maxheight"));
6689      }
6690      if ($(this).data("ad_text_noborder")) {
6691        ad_text_parallax_div.addClass('html5BannerBefore');
6692      }
6693      ad_text_parallax_div.css("z-index", '10');
6694    } else {
6695      if (!ad_text_div.length > 0) {
6696        $(this).parent('div').prepend(el);
6697      }
6698      if (slot.attr('id').match(/renderSlot_(Rectangle-Aufmacher)/)) {
6699        ad_text_div.css("width", '100%');
6700      } else {
6701        ad_text_div.css("width", $(this).data("width"));
6702        ad_text_div.css("margin", "0 auto");
6703      }
6704
6705    }
6706
6707    if (/[^-]?width\s?:\s?100%/.test($(this).attr('style'))) {
6708      ad_text_div.css("margin", "0 auto");
6709    }
6710    el = el.clone();
6711  });
6712});
6713
6714/**
6715 * fadeoutadvertisement
6716 * Hierüber kann eine Platzierung animiert ausgeblendet werden
6717 */
6718$(document).on("fadeoutadvertisement", function(event){
6719
6720  const iframe = $('.fadeoutadvertisement');
6721  let container = iframe.parent();
6722  container.animate({
6723    height: "0px"
6724  }, 2000, function() {
6725    container.css("display","none");
6726  });
6727
6728});
6729
6730/**
6731 * be_reduceBackgroundOpacity
6732 * @param element
6733 * @param opacity
6734 */
6735function be_reduceBackgroundOpacity(element, opacity) {
6736  let backgroundColor = element.style.backgroundColor;
6737  if (backgroundColor.substring(0, 4) === "rgba") {
6738    /* if rgba format is already used, just update the alpha value */
6739    backgroundColor = backgroundColor.replace(/[^,]+(?=\))/, opacity);
6740  } else {
6741    /* convert hexadecimal or RGB format to rgba format and add alpha value */
6742    let r = 0, g = 0, b = 0;
6743    if (backgroundColor.substring(0, 1) === "#") {
6744      /* convert hexadecimal to RGB */
6745      const hex = backgroundColor.substring(1);
6746      r = parseInt(hex.substring(0, 2), 16);
6747      g = parseInt(hex.substring(2, 4), 16);
6748      b = parseInt(hex.substring(4, 6), 16);
6749    } else if (backgroundColor.substring(0, 3) === "rgb") {
6750      /* extract RGB values from comma-separated string */
6751      const values = backgroundColor.match(/\d+/g);
6752      r = parseInt(values[0]);
6753      g = parseInt(values[1]);
6754      b = parseInt(values[2]);
6755    }
6756    /* convert RGB to rgba */
6757    backgroundColor = "rgba(" + r + ", " + g + ", " + b + ", " + opacity + ")";
6758  }
6759  element.style.backgroundColor = backgroundColor;
6760}
6761
6762/**
6763 * be_changeBGColor
6764 * @param element
6765 * @param color1
6766 * @param color2
6767 * @param mixVal
6768 */
6769function be_changeBGColor(element, color1, color2, mixVal) {
6770  const hexToRgb = function (hex) {
6771    const r = parseInt(hex.slice(1, 3), 16);
6772    const g = parseInt(hex.slice(3, 5), 16);
6773    const b = parseInt(hex.slice(5, 7), 16);
6774
6775    return [r, g, b];
6776  };
6777
6778  const rgbToHex = function (rgb) {
6779    const componentToHex = function (component) {
6780      const hex = component.toString();
6781      return hex.length == 1 ? "0" + hex : hex;
6782    };
6783
6784    const r = componentToHex(rgb[0]);
6785    const g = componentToHex(rgb[1]);
6786    const b = componentToHex(rgb[2]);
6787
6788    return "#" + r + g + b;
6789  };
6790
6791  const color1Rgb = hexToRgb(color1);
6792  const color2Rgb = hexToRgb(color2);
6793
6794  const r = Math.round((1 - mixVal) * color1Rgb[0] + mixVal * color2Rgb[0]);
6795  const g = Math.round((1 - mixVal) * color1Rgb[1] + mixVal * color2Rgb[1]);
6796  const b = Math.round((1 - mixVal) * color1Rgb[2] + mixVal * color2Rgb[2]);
6797
6798  element.style.backgroundColor = rgbToHex([r, g, b]);
6799}
6800
6801/**
6802 * be_rgbToHex
6803 * @param rgb
6804 * @returns {string}
6805 */
6806function be_rgbToHex(rgb) {
6807  /* Liefert nur die Ziffern 0-9 und a-f */
6808  function hex(x) {
6809    return ("0" + parseInt(x).toString(16)).slice(-2);
6810  }
6811
6812  /* Konvertiere den RGB-String in eine Array */
6813  const rgbArray = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
6814  /* Wandle die RGB-Werte in Hexadezimalwerte um */
6815  return "#" + hex(rgbArray[1]) + hex(rgbArray[2]) + hex(rgbArray[3]);
6816}
6817
6818/**
6819 * welcomeAdVideo
6820 * WelcomeAd mit Video-URL, wird beim Scrollen ausgeblendet, hat Close-Button
6821 */
6822$(document).on('welcomeAdVideo', function(event) {
6823
6824  let welcomeAdIframe = $('.welcomeFrame');
6825  let wcVideoSrc = welcomeAdIframe.data('videosrc');
6826  let wcVideoCodecs = welcomeAdIframe.data('videocodecs');
6827  let wcBgColor = welcomeAdIframe.data('bgcolor');
6828  let wcClickUrl = welcomeAdIframe.data('clickurl');
6829  let wcStageMarginTop = welcomeAdIframe.data('stagemargintop');
6830  let wcMuteButton = welcomeAdIframe.data('mutebutton');
6831  let bodyEl = document.getElementsByTagName("BODY")[0];
6832  let superbannerAd = document.getElementById('renderSlot_Superbanner');
6833  let defaultBgColor = window.getComputedStyle(document.body).getPropertyValue('background-color');
6834  defaultBgColor = be_rgbToHex(defaultBgColor);
6835  if(wcBgColor != 'default') {
6836    bodyEl.style.backgroundColor = wcBgColor;
6837  }
6838  let bgEl = document.createElement("div");
6839  const stageEl = document.querySelector('.PageFrame');
6840  bgEl.classList.add("wcVideo");
6841  let videoEl = document.createElement("video");
6842  videoEl.setAttribute("preload", "auto");
6843  videoEl.setAttribute("loop", "");
6844  //videoEl.setAttribute("autoplay", "");
6845  videoEl.setAttribute("muted", "");
6846  videoEl.classList.add("wcVideoTag");
6847
6848  let wcCloseButton = document.createElement("button");
6849  let closeBtnTxt = welcomeAdIframe.data('closebtntxt');
6850  let wcCloseButtonText = closeBtnTxt != 'default' ? closeBtnTxt : 'schließen';
6851  wcCloseButton.classList.add("wcCloseButton");
6852  wcCloseButton.prepend(wcCloseButtonText);
6853
6854  let playBtnTxt = welcomeAdIframe.data('playbtntxt');
6855  let pauseBtnTxt = welcomeAdIframe.data('pausebtntxt');
6856
6857  bgEl.prepend(videoEl);
6858  bodyEl.prepend(wcCloseButton);
6859
6860  if (playBtnTxt != 'default') {
6861    let wcPlayButton = document.createElement("button");
6862    let wcPlayButtonText = welcomeAdIframe.data('playbtntxt');
6863    let wcPauseButtonText = welcomeAdIframe.data('pausebtntxt');
6864    wcPlayButton.classList.add("wcPlayButton");
6865    wcPlayButton.prepend(wcPlayButtonText);
6866    bodyEl.prepend(wcPlayButton);
6867  }
6868
6869  if (wcMuteButton) {
6870    let wcMuteButtonEl = document.createElement("button");
6871    wcMuteButtonEl.classList.add("wcMuteButton");
6872    let wcMuteButtonElText = "<i class='fa fa-volume-off fa-2x'> </i>";
6873    wcMuteButtonEl.innerHTML = wcMuteButtonElText;
6874    bodyEl.prepend(wcMuteButtonEl);
6875
6876  }
6877
6878  let sourceEl = document.createElement("source");
6879  sourceEl.setAttribute("src", wcVideoSrc);
6880  sourceEl.setAttribute("type", "video/mp4");
6881  sourceEl.setAttribute("codecs", wcVideoCodecs);
6882
6883  videoEl.prepend(sourceEl);
6884  bodyEl.prepend(bgEl);
6885
6886  function playWcVideo() {
6887    videoEl.play();
6888  }
6889
6890  function pauseWcVideo() {
6891    videoEl.pause();
6892  }
6893
6894  function toggleWcVideo() {
6895    if(wcVideo.paused){
6896      wcVideo.play();
6897      if (wcPlayButton) {
6898        wcPlayButton.className = "wcPauseButton";
6899        if (playBtnTxt != 'default') {
6900          let wcPauseButtonText = welcomeAdIframe.data('pausebtntxt');
6901          wcPlayButton.innerText = wcPauseButtonText;
6902        }
6903
6904      }
6905    }else{
6906      wcVideo.pause();
6907      if (wcPlayButton) {
6908        wcPlayButton.className = "wcPlayButton";
6909        if (playBtnTxt != 'default') {
6910          let wcPlayButtonText = welcomeAdIframe.data('playbtntxt');
6911          wcPlayButton.innerText = wcPlayButtonText;
6912        }
6913      }
6914    }
6915
6916    /*
6917     if(wcVideo.muted){
6918     wcVideo.muted = false;
6919     }else{
6920     wcVideo.muted = true;
6921     }
6922     */
6923  }
6924
6925  function toggleMuteButton() {
6926    if (wcVideo.muted) {
6927      wcVideo.muted = false;
6928      wcMuteButtonEl.classList.add("wcMuteOn");
6929      wcMuteButtonEl.classList.remove("wcMuteOff");
6930      wcMuteButtonEl.innerHTML = "<i class='fa fa-volume-up fa-2x'> </i>";
6931    } else {
6932      wcVideo.muted = true;
6933      wcMuteButtonEl.classList.add("wcMuteOff");
6934      wcMuteButtonEl.classList.remove("wcMuteOn");
6935      wcMuteButtonEl.innerHTML = "<i class='fa fa-volume-off fa-2x'> </i>";
6936    }
6937  }
6938
6939  let wcVideo = document.getElementsByClassName("wcVideoTag")[0];
6940  wcVideo.addEventListener("click", toggleWcVideo);
6941  wcVideo.muted = true;
6942  wcVideo.autoplay = true;
6943
6944
6945  let wcPlayButton = document.querySelector(".wcPlayButton");
6946  wcPlayButton.innerText = pauseBtnTxt;
6947
6948  if (wcPlayButton) {
6949    wcPlayButton.addEventListener("click", toggleWcVideo);
6950  }
6951
6952  let wcPauseButton = document.querySelector(".wcPauseButton");
6953  if (wcPauseButton) {
6954    wcPauseButton.addEventListener("click", toggleWcVideo);
6955  }
6956
6957  let wcMuteButtonEl = document.querySelector(".wcMuteButton");
6958  if (wcMuteButtonEl) {
6959    wcMuteButtonEl.addEventListener("click", toggleMuteButton);
6960  }
6961
6962  /* clickable background -> */
6963  const wcMouseOverHandler = function (event) {
6964    if (event.target === document.body) {
6965      document.body.style.cursor = 'pointer';
6966    }
6967  };
6968  document.addEventListener('mouseover', wcMouseOverHandler);
6969
6970  const wcMouseOutHandler = function (event) {
6971    if (event.target === document.body) {
6972      document.body.style.cursor = 'auto';
6973    }
6974  };
6975  document.addEventListener('mouseout', wcMouseOutHandler);
6976
6977  const clickHandler = function (event) {
6978    if (event.target === document.body) {
6979      window.open(wcClickUrl, '_blank');
6980    }
6981  };
6982  document.addEventListener('click', clickHandler);
6983  /* <- clickable background */
6984
6985  function fadeOutOnScroll(element, stageEl) {
6986    if (!element || !stageEl) {
6987      return;
6988    }
6989
6990    let distanceToTop = window.pageYOffset + element.getBoundingClientRect().top;
6991    const elementHeight = element.offsetHeight;
6992    const scrollTop = document.documentElement.scrollTop;
6993
6994    let opacity = 1;
6995    distanceToTop = 0;
6996    element.style.position = 'fixed';
6997
6998    if (scrollTop > distanceToTop) {
6999      opacity = 1 - (scrollTop - distanceToTop) / elementHeight;
7000      opacity = (opacity < 0) ? 0 : opacity;
7001      opacity = (opacity > 0.95) ? 1 : opacity;
7002    }
7003
7004    if (opacity >= 0) {
7005      element.style.opacity = opacity;
7006      /* be_reduceBackgroundOpacity(superbannerAd, opacity); */
7007      if(wcBgColor != 'default') {
7008        be_changeBGColor(bodyEl, defaultBgColor, wcBgColor, opacity);
7009      }
7010    }
7011  }
7012
7013  function scrollHandler() {
7014    fadeOutOnScroll(wcVideo, bgEl);
7015  }
7016
7017  window.addEventListener('scroll', scrollHandler, {passive: true});
7018
7019  /**
7020  * Close Button
7021  */
7022  function closeWcVideo() {
7023    wcVideo.remove();
7024    bodyEl.style.backgroundColor = defaultBgColor;
7025    superbannerAd.firstElementChild.remove();
7026    wcCloseButton.remove();
7027    if (wcPlayButton) {
7028      wcPlayButton.remove();
7029    }
7030    if (wcMuteButtonEl) {
7031      wcMuteButtonEl.remove();
7032    }
7033    window.removeEventListener('scroll', scrollHandler, {passive: true});
7034    document.removeEventListener('click', clickHandler);
7035    document.removeEventListener('mouseover', wcMouseOverHandler);
7036    document.removeEventListener('mouseout', wcMouseOutHandler);
7037    stageEl.style.transition = 'margin 1s';
7038    stageEl.style.marginTop = '0px';
7039  }
7040
7041  wcCloseButton.addEventListener("click", closeWcVideo);
7042
7043  /* wait until bg-video is available */
7044  let wcInterval = setInterval(function() {
7045    document.getElementById("renderSlot_Superbanner").style.height = "0";
7046    if (videoEl) {
7047      clearInterval(wcInterval);
7048      let OriginalStageMarginTop = wcStageMarginTop;
7049      let videoElStyle = getComputedStyle(videoEl);
7050      let videoElHeight = parseInt(videoElStyle.height);
7051      let videoElOrigHeight = videoEl.naturalHeight;
7052      videoElOrigHeight = videoElOrigHeight || welcomeAdIframe.data('height');
7053      if (videoElHeight > videoElOrigHeight) {
7054
7055        videoElHeight = videoElOrigHeight;
7056      }
7057
7058      let videoElRatio = (videoElHeight / videoElOrigHeight).toFixed(2);
7059      let StageMarginTop = Math.round(OriginalStageMarginTop * videoElRatio);
7060
7061      stageEl.style.marginTop = StageMarginTop+'px';
7062    }
7063    clearInterval(wcInterval);
7064  }, 200);
7065
7066});
7067
7068/**
7069 * welcomeAdImage
7070 * WelcomeAd mit Hintergrund-Image, wird beim Scrollen ausgeblendet, hat Close-Button
7071 */
7072$(document).on('welcomeAdImage', function(event) {
7073
7074  let welcomeAd = $('.welcomeFrame').parent().parent();
7075  let welcomeAdIframe = $('.welcomeFrame');
7076  let wcBgColor = welcomeAdIframe.data('bgcolor');
7077  let wcClickUrl = welcomeAdIframe.data('clickurl');
7078  let bodyEl = document.getElementsByTagName("BODY")[0];
7079  let superbannerAd = document.getElementById('renderSlot_Superbanner');
7080  let defaultBgColor = window.getComputedStyle(document.body).getPropertyValue('background-color');
7081  defaultBgColor = be_rgbToHex(defaultBgColor);
7082
7083  if(wcBgColor != 'default') {
7084    bodyEl.style.backgroundColor = wcBgColor;
7085  }
7086  let bgEl = document.createElement("div");
7087  const stageEl = document.querySelector('.PageFrame');
7088
7089  bgEl.classList.add("wcBgImage");
7090  let imgEl = document.createElement("img");
7091  imgEl.classList.add("wcBgImageTag");
7092
7093  let wcCloseButton = document.createElement("button");
7094  let closeBtnTxt = welcomeAdIframe.data('closebtntxt');
7095  let wcCloseButtonText = closeBtnTxt != 'default' ? closeBtnTxt : 'schließen';
7096
7097  wcCloseButton.classList.add("wcCloseButton");
7098  wcCloseButton.prepend(wcCloseButtonText);
7099
7100  bgEl.prepend(imgEl);
7101  bodyEl.prepend(wcCloseButton);
7102
7103  let bgImgSource = welcomeAdIframe.data('bgimagesrc');
7104
7105  imgEl.setAttribute('src',bgImgSource);
7106  bodyEl.prepend(bgEl);
7107
7108  /* clickable background -> */
7109  const wcMouseOverHandler = function (event) {
7110    if (event.target === document.body) {
7111      document.body.style.cursor = 'pointer';
7112    }
7113  };
7114  document.addEventListener('mouseover', wcMouseOverHandler);
7115
7116  const wcMouseOutHandler = function (event) {
7117    if (event.target === document.body) {
7118      document.body.style.cursor = 'auto';
7119    }
7120  };
7121  document.addEventListener('mouseout', wcMouseOutHandler);
7122
7123  const clickHandler = function (event) {
7124    if (event.target === document.body) {
7125      window.open(wcClickUrl, '_blank');
7126    }
7127  };
7128  document.addEventListener('click', clickHandler);
7129  /* <- clickable background */
7130
7131  /* Superbanner in Hintergrund und sticky -> */
7132  superbannerAd.classList.add("wcfixedSuperbanner");
7133  const stageElStyles = window.getComputedStyle(stageEl);
7134  const stageElMarginTop = stageElStyles.getPropertyValue('margin-top');
7135  stageEl.style.marginTop = superbannerAd.offsetHeight+'px';
7136  /*
7137   * Calculation of the distance from the stage to the top of the screen
7138   * in a fixed ratio of 1080 (width of background image) to 520 (original distance from stage to top of screen)
7139   */
7140  let wcInterval2 = setInterval(function() {
7141
7142    if (imgEl) {
7143      clearInterval(wcInterval2);
7144
7145      let imgElStyle = getComputedStyle(imgEl);
7146      let imgElCurrHeight = parseInt(imgElStyle.height);
7147
7148      let imgHeight = 520;
7149      /* let imgElOrigHeight = 1080; */
7150      let imgElOrigHeight = 720;
7151      let imgElRatio = (imgHeight / imgElOrigHeight).toFixed(2);
7152      let StageMarginTop = Math.round(imgElCurrHeight * imgElRatio);
7153
7154      stageEl.style.marginTop = StageMarginTop+'px';
7155    }
7156    clearInterval(wcInterval2);
7157  }, 200);
7158
7159
7160  /* <- Superbanner in Hintergrund und sticky */
7161
7162  /* clickable superbanner -> */
7163
7164  superbannerAd.addEventListener('mouseover', function() {
7165    superbannerAd.style.cursor = 'pointer';
7166  });
7167
7168  superbannerAd.addEventListener('mouseout', function() {
7169    superbannerAd.style.cursor = 'auto';
7170  });
7171
7172  superbannerAd.addEventListener('click', function() {
7173    window.open(wcClickUrl, '_blank');
7174  });
7175  /* <- clickable superbanner */
7176
7177  function fadeOutOnScroll(element, stageEl) {
7178    if (!element || !stageEl) {
7179      return;
7180    }
7181
7182    let distanceToTop = window.pageYOffset + element.getBoundingClientRect().top;
7183    const elementHeight = element.offsetHeight;
7184    const scrollTop = document.documentElement.scrollTop;
7185
7186    let opacity = 1;
7187    distanceToTop = 0;
7188    element.style.position = 'fixed';
7189
7190    if (scrollTop > distanceToTop) {
7191      opacity = 1 - (scrollTop - distanceToTop) / elementHeight;
7192      opacity = (opacity < 0) ? 0 : opacity;
7193      opacity = (opacity > 0.95) ? 1 : opacity;
7194    }
7195
7196    if (opacity >= 0) {
7197      element.style.opacity = opacity;
7198      /* be_reduceBackgroundOpacity(superbannerAd, opacity); */
7199      if(wcBgColor != 'default') {
7200        be_changeBGColor(bodyEl, defaultBgColor, wcBgColor, opacity);
7201      }
7202    }
7203  }
7204
7205  function scrollHandler() {
7206    fadeOutOnScroll(bgEl, stageEl);
7207  }
7208
7209  window.addEventListener('scroll', scrollHandler, {passive: true});
7210
7211  /*
7212   * Close Button
7213   */
7214  function closewcBgImage() {
7215    bgEl.remove();
7216    bodyEl.style.backgroundColor = defaultBgColor;
7217    superbannerAd.firstElementChild.remove();
7218    wcCloseButton.remove();
7219    window.removeEventListener('scroll', scrollHandler, {passive: true});
7220    document.removeEventListener('click', clickHandler);
7221    document.removeEventListener('mouseover', wcMouseOverHandler);
7222    document.removeEventListener('mouseout', wcMouseOutHandler);
7223    stageEl.style.transition = "margin-top 0.5s ease";
7224    stageEl.style.marginTop = stageElMarginTop;
7225  }
7226
7227  wcCloseButton.addEventListener("click", closewcBgImage);
7228
7229});
7230
7231/**
7232 * welcomeAdVideoMobil
7233 * WelcomeAd mit Video-URL für Mobil, hat Close-Button
7234 */
7235$(document).on('welcomeAdVideoMobil', function(event) {
7236
7237  let welcomeAdIframe = document.getElementById('welcomeFrameMobil');
7238
7239  let bodyEl = document.getElementsByTagName("BODY")[0];
7240  let superbannerAd = document.getElementById('renderSlot_Mobil-Superbanner');
7241
7242  let wcCloseButton = document.createElement("button");
7243  let closeBtnTxt = welcomeAdIframe.getAttribute('data-closebtntxt');
7244  let wcCloseButtonText = closeBtnTxt != 'default' ? closeBtnTxt : 'schließen';
7245  wcCloseButton.classList.add("wcCloseButtonMobil");
7246  wcCloseButton.prepend(wcCloseButtonText);
7247
7248  bodyEl.prepend(wcCloseButton);
7249
7250  let adHeight = superbannerAd.clientHeight;
7251
7252  welcomeAdIframe.style.position = "fixed";
7253  welcomeAdIframe.style.zIndex = "-1";
7254  superbannerAd.style.height = adHeight+"px";
7255
7256  wcCloseButton.style.top = adHeight-35+"px";
7257
7258
7259  /*
7260   * Create Video Tag
7261   */
7262  let bgEl = document.createElement("div");
7263  bgEl.classList.add("wcVideo");
7264  bgEl.classList.add("wcMobil");
7265
7266  let videoEl = document.createElement("video");
7267  videoEl.setAttribute("preload", "auto");
7268  videoEl.setAttribute("loop", "");
7269  videoEl.setAttribute("muted", "");
7270  videoEl.setAttribute("id", "wcVideoTag");
7271  videoEl.classList.add("wcVideoTag");
7272
7273  let wcVideoSrc = welcomeAdIframe.getAttribute('data-videosrc');
7274  let wcVideoCodecs = welcomeAdIframe.getAttribute('data-videocodecs');
7275  let sourceEl = document.createElement("source");
7276  sourceEl.setAttribute("src", wcVideoSrc);
7277  sourceEl.setAttribute("type", "video/mp4");
7278  sourceEl.setAttribute("codecs", wcVideoCodecs);
7279
7280  videoEl.prepend(sourceEl);
7281  bgEl.prepend(videoEl);
7282  bodyEl.prepend(bgEl);
7283
7284
7285
7286  /*
7287   * Close Button
7288   */
7289  function closeWcVideo() {
7290    superbannerAd.remove();
7291    wcCloseButton.remove();
7292    wcPlayButton.remove();
7293  }
7294
7295  wcCloseButton.addEventListener("click", closeWcVideo);
7296
7297
7298  /*
7299   * Play/Stop Button
7300   */
7301  let wcPlayBtnTxt = welcomeAdIframe.getAttribute('data-playbtntxt');
7302  let wcPauseBtnTxt = welcomeAdIframe.getAttribute('data-pausebtntxt');
7303
7304  let wcPlayButton = document.createElement("button");
7305  wcPlayButton.classList.add("wcPlayButtonMobil");
7306  wcPlayButton.prepend(wcPlayBtnTxt);
7307  bodyEl.prepend(wcPlayButton);
7308
7309  wcPlayButton.style.top = adHeight-35+"px";
7310
7311  wcPlayButton.addEventListener("click", toggleWcVideo);
7312
7313  let wcVideo = document.getElementById('wcVideo');
7314  wcVideo = videoEl;
7315
7316  function toggleWcVideo() {
7317    if(wcVideo.paused){
7318      wcVideo.play();
7319      if (wcPlayButton) {
7320        wcPlayButton.className = "wcPauseButtonMobil";
7321        if (wcPlayBtnTxt != 'default') {
7322          wcPlayButton.innerText = wcPauseBtnTxt;
7323        }
7324
7325      }
7326    }else{
7327      wcVideo.pause();
7328      if (wcPlayButton) {
7329        wcPlayButton.className = "wcPlayButtonMobil";
7330        if (wcPlayBtnTxt != 'default') {
7331          wcPlayButton.innerText = wcPlayBtnTxt;
7332        }
7333      }
7334    }
7335
7336    /*
7337     if(wcVideo.muted){
7338     wcVideo.muted = false;
7339     }else{
7340     wcVideo.muted = true;
7341     }
7342     */
7343  }
7344
7345});
7346
7347/**
7348 * dfvSolutionAd
7349 * Hierüber werden Funktionalitäten der dfv solution arena angestoßen
7350 */
7351$(document).on("dfvSolutionAd", function(event){
7352
7353  const dfv_sol_arena_ad_div = document.getElementById('div_dfvSolutionAd');
7354  const dfv_sol_arena_ad_iframe = document.getElementById('frame_dfvSolutionAd');
7355
7356  const dfv_sol_arena_ad_iframe_width = dfv_sol_arena_ad_iframe.getAttribute('data-width');
7357  const dfv_sol_arena_ad_iframe_height = dfv_sol_arena_ad_iframe.getAttribute('data-height');
7358
7359  dfv_sol_arena_ad_iframe.setAttribute('height',dfv_sol_arena_ad_iframe_height);
7360  dfv_sol_arena_ad_iframe.setAttribute('width',dfv_sol_arena_ad_iframe_width);
7361
7362  dfv_sol_arena_ad_div.classList.remove('noAdHint');
7363
7364});
7365
7366/**
7367 * welcomeAdImageMobil
7368 * WelcomeAd mit Grafik für Mobil, hat Close-Button
7369 */
7370$(document).on('welcomeAdImageMobil', function(event) {
7371
7372  let welcomeAdIframe = document.getElementById('welcomeFrameMobil');
7373
7374  let bodyEl = document.getElementsByTagName("BODY")[0];
7375  let superbannerAd = document.getElementById('renderSlot_Mobil-Superbanner');
7376
7377  let wcCloseButton = document.createElement("button");
7378  let closeBtnTxt = welcomeAdIframe.getAttribute('data-closebtntxt');
7379  let wcCloseButtonText = closeBtnTxt != 'default' ? closeBtnTxt : 'schließen';
7380  wcCloseButton.classList.add("wcCloseButtonMobil");
7381  wcCloseButton.prepend(wcCloseButtonText);
7382
7383  bodyEl.prepend(wcCloseButton);
7384
7385  let adHeight = superbannerAd.clientHeight;
7386
7387  welcomeAdIframe.style.position = "fixed";
7388  welcomeAdIframe.style.zIndex = "-1";
7389  superbannerAd.style.height = adHeight+"px";
7390
7391  wcCloseButton.style.top = adHeight-50+"px";
7392
7393  /*
7394   * Close Button
7395   */
7396  function closeWcVideo() {
7397    superbannerAd.remove();
7398    wcCloseButton.remove();
7399  }
7400
7401  wcCloseButton.addEventListener("click", closeWcVideo);
7402
7403});
7404
7405/**
7406 * be_isClassSet
7407 * @param el
7408 * @param className
7409 * @returns {boolean}
7410 */
7411function be_isClassSet(el,className) {
7412  const element = document.querySelector(el);
7413  if(element.classList.contains(className)) {
7414    return true;
7415  }
7416}
7417
7418/**
7419 * be_html5sitebarResize
7420 * @param sbWidth
7421 * @param sbHeight
7422 */
7423function be_html5sitebarResize(sbWidth, sbHeight) {
7424  const browser_scrollbar_width = 15;
7425  let offsetLeft = 460;
7426  let outerWidth = 980;
7427  const sitebarContainer = '.Ad-skyscraper-right';
7428  if ($('.SiteFooter').length) {
7429    offsetLeft = $('.SiteFooter').offset().left + browser_scrollbar_width;
7430    outerWidth = $('.SiteFooter').outerWidth();
7431  } else if ($('.PageGallery').length) {
7432    offsetLeft = $('.PageGallery').offset().left + browser_scrollbar_width;
7433    outerWidth = $('.PageGallery').outerWidth();
7434  }
7435
7436  let rightOffset = $(this).width() - (offsetLeft + outerWidth);
7437  rightOffset = Math.floor(rightOffset);
7438
7439  if ($(sitebarContainer + ' iframe.responsiveFrame').data("width") > rightOffset ) {
7440    $(sitebarContainer + ' iframe.responsiveFrame').width(rightOffset);
7441
7442    const bannerFrame = document.getElementById("sitebar");
7443    const innerBannerFrame = bannerFrame.contentWindow.document.getElementsByTagName("iframe")[0];
7444
7445    const imgRatio = sbHeight / sbWidth;
7446    const imgHeight = rightOffset * imgRatio;
7447
7448    const bannerImg = innerBannerFrame.contentWindow.document.getElementsByTagName("img")[1];
7449    bannerImg.style.width = rightOffset+"px";
7450    bannerImg.style.height = imgHeight+"px";
7451
7452  }
7453
7454  const sitebarAd = $('.sitebar').parent().parent();
7455  const sitebar = $('.sitebar');
7456  const sitebar_width = sitebar.data('width');
7457
7458
7459  if (sitebar_width > rightOffset ) {
7460    sitebar.width(rightOffset);
7461    sitebarAd.css("width",rightOffset+"px");
7462    sitebar.css("width",rightOffset+"px");
7463
7464    $(document).ready(function(){
7465      const sitebarDOM = sitebar.contents();
7466      sitebarDOM.find("iframe").css("width", rightOffset+"px");
7467      const currWinHeight = $(window).height();
7468      sitebarDOM.find("iframe").css("max-height", currWinHeight+"px");
7469    });
7470  }
7471}
7472
7473$(document).on('html5sitebar',function(event) {
7474
7475  const sitebarAd = $('.sitebar').parent().parent();
7476  const sitebar = $('.sitebar');
7477
7478  if ( sitebar.data('bgcolor') ) {
7479    const bg_color = sitebar.data('bgcolor');
7480    if ( bg_color.startsWith("#") ) {
7481      document.getElementsByTagName('body')[0].style.backgroundColor = bgcolor;
7482    }
7483  }
7484
7485  const sitebar_width = sitebar.data('width');
7486  const sitebar_height = sitebar.data('height');
7487
7488  sitebarAd.css("width",sitebar_width+'px');
7489  sitebarAd.css("max-width",sitebar_width+'px');
7490
7491  const sitebar_fixed = sitebar.data('fixed');
7492  if (sitebar_fixed != 'false') {
7493    sitebarAd.css("position","fixed");
7494  }
7495
7496  setTimeout(function(){
7497    /* Resize sitebar when the window is resized */
7498    $( window ).resize( function() {
7499      be_html5sitebarResize(sitebar_width, sitebar_height);
7500      /* Resize to fix sitebar on page load. */
7501    }).resize();
7502  },1000);
7503
7504});
7505
7506function be_sitebarSwitchResize(wideLayout, sitebarBid, switchPointSky, switchPointSitebar) {
7507  const browser_scrollbar_width = 0;
7508  let offsetLeft = 460;
7509  let outerWidth = 980;
7510  const sitebarContainer = '.Ad-skyscraper-right';
7511  if (($('.SiteFooter').length) && (!wideLayout)) {
7512    offsetLeft = $('.SiteFooter').offset().left + browser_scrollbar_width;
7513    outerWidth = $('.SiteFooter').outerWidth();
7514  } else if (($('.PageGallery').length) && (!wideLayout)) {
7515    offsetLeft = $('.PageGallery').offset().left + browser_scrollbar_width;
7516    outerWidth = $('.PageGallery').outerWidth();
7517  }
7518
7519  if (wideLayout === true) {
7520    let siteHeader = document.querySelector('.SiteHeader');
7521    if (siteHeader) {
7522      let rect = siteHeader.getBoundingClientRect();
7523      offsetLeft = rect.left + browser_scrollbar_width;
7524      let siteHeaderStyles = window.getComputedStyle(siteHeader);
7525      outerWidth = parseFloat(siteHeaderStyles.getPropertyValue('width'));
7526    }
7527  }
7528
7529  let rightOffset = $(this).width() - (offsetLeft + outerWidth);
7530  rightOffset = Math.floor(rightOffset);
7531  const sbContainer = $(sitebarContainer + ' iframe.responsiveFrame');
7532  const sbContainerWidth = sbContainer[0].clientWidth;
7533
7534  if (rightOffset >= switchPointSky ) {
7535    sbContainer.width(switchPointSky);
7536  }
7537  
7538  if (rightOffset > switchPointSitebar ) {
7539    sbContainer.width(rightOffset);
7540  }
7541
7542  const sitebarAd = $('.sitebar').parent().parent();
7543  const sitebar = $('.sitebar');
7544  const sitebar_width = sitebar.data('width');
7545
7546
7547  if (sitebar_width > rightOffset ) {
7548    sitebar.width(rightOffset);
7549    sitebarAd.css("width",rightOffset+"px");
7550    sitebar.css("width",rightOffset+"px");
7551
7552    $(document).ready(function(){
7553      const sitebarDOM = sitebar.contents();
7554      sitebarDOM.find("iframe").css("width", rightOffset+"px");
7555      const currWinHeight = $(window).height();
7556      sitebarDOM.find("iframe").css("max-height", currWinHeight+"px");
7557    });
7558  }
7559}
7560
7561/**
7562 * sitebar-switch
7563 */
7564$(document).on('sitebar-switch', function(event, be_domainsContainerClass, wideLayout) {
7565  function selectSkyAd() {
7566
7567    const sitebarSwitch = document.getElementById("sitebarSwitch");
7568
7569    if (sitebarSwitch) {
7570      const viewtagSkyOrig = sitebarSwitch.getAttribute('data-viewtag_sky');
7571      const clicktagSky = sitebarSwitch.getAttribute('data-clicktag_sky');
7572      const viewtagSitebarOrig = sitebarSwitch.getAttribute('data-viewtag_sb');
7573      const clicktagSitebar = sitebarSwitch.getAttribute('data-clicktag_sb');
7574      const switchPointSky = sitebarSwitch.getAttribute('data-sp_sky');
7575      const switchPointSitebar = sitebarSwitch.getAttribute('data-sp_sb');
7576      const bid = sitebarSwitch.getAttribute('data-bid');
7577      const viewtagSky = removeWptParam(viewtagSkyOrig);
7578      const viewtagSitebar = removeWptParam(viewtagSitebarOrig);
7579
7580      function getContainerClassForHostname(hostname, domainConfig) {
7581        hostname = hostname.toLowerCase();
7582        /* exakte Übereinstimmung? */
7583        if (Object.prototype.hasOwnProperty.call(domainConfig, hostname)) {
7584          return domainConfig[hostname];
7585        }
7586        /* partielle Übereinstimmungen? */
7587        for (const domain of Object.keys(domainConfig)) {
7588          if (hostname.endsWith(domain.toLowerCase())) {
7589            return domainConfig[domain];
7590          }
7591        }
7592        /* default bei keiner Übereinstimmung */
7593        return domainConfig['default'];
7594      }
7595
7596      const currentHostname = window.location.hostname;
7597      const containerClass = getContainerClassForHostname(currentHostname, be_domainsContainerClass);
7598      /* console.log(`Container class für ${currentHostname}: ${containerClass}`); */
7599
7600      const pageFrame = document.querySelector('.' + containerClass);
7601      const skyRight = document.querySelector('.Ad-skyscraper-right');
7602
7603        if (pageFrame && skyRight) {
7604
7605          /* Abstand Bühne zu rechten Rand */
7606
7607          const rect = pageFrame.getBoundingClientRect();
7608          const distanceToRight = window.innerWidth - rect.right;
7609
7610          /* img suchen und src ersetzen */
7611          const sbSwitchDocument = sitebarSwitch.contentDocument || sitebarSwitch.contentWindow.document;
7612          const imgElement = sbSwitchDocument.getElementById('banner-'+bid);
7613
7614          if (distanceToRight >= switchPointSitebar) {
7615            if (imgElement) {
7616              imgElement.src = viewtagSitebar;
7617              console.log('viewtagSitebar in src eingefügt');
7618
7619              skyRight.style.width = 'inherit';
7620
7621              const anchorElement = imgElement.closest('a');
7622              if (anchorElement) {
7623                anchorElement.href = clicktagSitebar;
7624              }
7625            } else {
7626              console.log('Bild nicht gefunden.');
7627            }
7628
7629          } else if (distanceToRight >= switchPointSky && distanceToRight < switchPointSitebar) {
7630            if (imgElement) {
7631              imgElement.src = viewtagSky;
7632              console.log('viewtagSky in src eingefügt');
7633              const anchorElement = imgElement.closest('a');
7634              if (anchorElement) {
7635                anchorElement.href = clicktagSky;
7636              }
7637            } else {
7638              console.log('kein img-Tag gefunden!');
7639            }
7640          }
7641
7642          /* Resize sitebar when the window is resized */
7643          $( window ).resize( function() {
7644            be_sitebarSwitchResize(wideLayout, bid, switchPointSky, switchPointSitebar);
7645            /* Resize to fix sitebar on page load. */
7646          }).resize();
7647
7648        }
7649
7650    }
7651  }
7652
7653  function removeWptParam(imgTag) {
7654
7655    const srcMatch = imgTag.match(/src="([^"]+)"/);
7656
7657    if (!srcMatch) return null;
7658
7659    let src = srcMatch[1];
7660    let [base, query] = src.split('?');
7661    if (!query) return src;
7662
7663    let filteredParams = query.split('&').filter(param => param !== 'wpt=C');
7664    let newSrc = `${base}?${filteredParams.join('&')}`;
7665    return newSrc;
7666  }
7667
7668  const switchObserver = new MutationObserver((mutationsList, observer) => {
7669    if (sitebarSwitch) {
7670      selectSkyAd();
7671      switchObserver.disconnect();
7672    }
7673  });
7674  switchObserver.observe(document.body, { childList: true, subtree: true });
7675
7676});
7677
7678
7679/**
7680 * clsAlignBillboard
7681 */
7682$(document).one("clsAlignBillboard", function(event){
7683  if (be_isClassSet('body','variableSlotHeight')) {
7684    let bannerElm = document.getElementById("renderSlot_Billboard");
7685    if (!bannerElm) { return; }
7686    bannerElm.classList.add("variableSlotHeight");
7687    return;
7688  }
7689  if ($("#renderSlot_Billboard > div > iframe").length){
7690    let bannerFrame = $("#renderSlot_Billboard > div > iframe");
7691    let bannerFrameHeight = bannerFrame.height();
7692    if (bannerFrameHeight < 250) {
7693      let bannerMargin = 250 - Math.round(bannerFrameHeight);
7694      bannerFrame.css('marginTop',bannerMargin);
7695    }
7696  }
7697  if ($("#renderSlot_Mobil-Rectangle-1 > div > iframe").length){
7698    if (be_isClassSet('body','variableSlotHeight')) {
7699      let bannerElm = document.getElementById("renderSlot_Mobil-Billboard");
7700      bannerElm.classList.add("variableSlotHeight");
7701      return;
7702    }
7703    let bannerFrame = $("#renderSlot_Mobil-Rectangle-1 > div > iframe");
7704    let bannerFrameHeight = bannerFrame.height();
7705    if (bannerFrameHeight < 93) {
7706      let bannerMargin = 93 - Math.round(bannerFrameHeight);
7707      bannerFrame.css('marginTop',bannerMargin);
7708    }
7709
7710  }
7711});
7712
7713/**
7714 * ClsAlignSuperbanner
7715 */
7716$(document).one("clsAlignSuperbanner", function(event){
7717  if ($("#renderSlot_Mobil-Superbanner > div > iframe").length) {
7718    if (be_isClassSet('body','variableSlotHeight')) {
7719      let bannerElm = document.getElementById("renderSlot_Mobil-Superbanner");
7720      bannerElm.classList.add("variableSlotHeight");
7721      return;
7722    }
7723    const bannerFrame = $("#renderSlot_Mobil-Superbanner > div > iframe");
7724    const bannerFrameHeight = bannerFrame.height();
7725    if (bannerFrameHeight < 93) {
7726      const bannerMargin = 93 - Math.round(bannerFrameHeight);
7727      bannerFrame.css('marginTop',bannerMargin);
7728    }
7729  }
7730});
7731
7732/**
7733 * alignSkyscraperLeft
7734 */
7735$(document).one("alignSkyscraperLeft", function(event){
7736  if ($("#renderSlot_Skyscraper-links > div > iframe").length) {
7737
7738    let leftSkyEl = document.getElementById("renderSlot_Skyscraper-links");
7739    if (leftSkyEl.classList.contains("leftSitebarSlot")) {
7740      return;
7741    }
7742
7743    let elementSkyLeft = document.querySelector('.Ad-skyscraper-left');
7744    let style = window.getComputedStyle(elementSkyLeft);
7745    let marginLeftSkyLeft = parseFloat(style.getPropertyValue('margin-left'));
7746
7747    const bannerFrame = $("#renderSlot_Skyscraper-links > div > iframe");
7748    let bannerFrameWidth = bannerFrame.data("width");
7749    if (bannerFrameWidth) {
7750      let offset = bannerFrameWidth - Math.abs(marginLeftSkyLeft);
7751      offset = Math.abs(offset);
7752      if (offset <= 20) { /* wenn versucht wurde durch css Abstand zur Bühne herzustellen */
7753        bannerFrameWidth = bannerFrameWidth + offset;
7754      }
7755      $("#renderSlot_Skyscraper-links").css("margin-left","-" + bannerFrameWidth + "px");
7756      $("#renderSlot_Skyscraper-links").css("width", bannerFrameWidth + "px");
7757    }
7758  }
7759});
7760
7761/**
7762 * bbReminder
7763 * Billboard
7764 */
7765$(document).one("bbReminder", function(event){
7766
7767  /* Billboard-Element auswählen */
7768  const billboard = document.getElementById("renderSlot_Billboard");
7769  const billboardIFrame = document.querySelector("#renderSlot_Billboard > div > iframe");
7770  const bBInitialHeight = billboardIFrame.getAttribute('data-height');
7771  let reminderTime = billboardIFrame.getAttribute('data-remtime')*1000;
7772  let reminderImg = billboardIFrame.getAttribute('data-remurl');
7773  let isFirstScroll = true;
7774
7775  window.addEventListener("scroll", function() {
7776    if (isFirstScroll){
7777      /* Billboard-Element fixieren */
7778      billboard.style.position  = "fixed";
7779      billboard.style.top       = "0";
7780      billboard.style.marginTop = "0";
7781      billboard.style.zIndex    = "1100";
7782      billboard.style.left      = "50%";
7783      billboard.style.transform = "translateX(-50%)";
7784
7785      /* Billboard für n Sekunden sichtbar machen */
7786      setTimeout(function(){
7787
7788        const bBiframe    = billboard.querySelector("iframe");
7789        const bBiframeHeight = bBiframe.offsetHeight;
7790        const startHeight = billboard.offsetHeight;
7791        const endHeight   = 0;
7792
7793        /* Animationsschleife starten */
7794        let currentHeight       = startHeight;
7795        const animationDuration = 500; /* Dauer der Animation in Millisekunden */
7796        const frameRate         = 60; /* Bildwiederholrate in Frames pro Sekunde */
7797        const frameDuration     = 1000 / frameRate; /* Dauer eines Frames in Millisekunden */
7798
7799        const animate = () => {
7800          /* Neue Höhe berechnen */
7801          const deltaHeight = (endHeight - startHeight) / (animationDuration / frameDuration);
7802          currentHeight += deltaHeight;
7803
7804          /* Höhe des DIV-Elements und des iFrames aktualisieren */
7805          billboard.style.height = `${currentHeight}px`;
7806          bBiframe.style.height  = `${currentHeight}px`;
7807          billboard.style.top = "0";
7808          billboard.style.top = "0";
7809
7810          /* Animation fortsetzen, bis die Endhöhe erreicht ist */
7811          if(currentHeight > endHeight){
7812            requestAnimationFrame(animate);
7813          }
7814        };
7815
7816        animate();
7817
7818        /* Reminder-Element erstellen und fixieren */
7819        const reminder                 = document.createElement("div");
7820        reminder.id                    = "bBreminder";
7821        reminder.style.position        = "fixed";
7822        reminder.style.top             = "0";
7823        reminder.style.left      = "50%";
7824        reminder.style.transform = "translateX(-50%)";
7825        reminder.style.width           = bBiframe.offsetWidth+"px";
7826        reminder.innerHTML = "<img src='"+ reminderImg +"' alt='Reminder'/>";
7827        reminder.style.zIndex          = "1100";
7828        document.body.appendChild(reminder);
7829
7830        /* Close-Button erstellen */
7831        const closeButton = document.createElement("button");
7832        closeButton.innerHTML = "<i class=\"far fa-times-circle fa-lg\"></i>";
7833        reminder.appendChild(closeButton);
7834        closeButton.setAttribute("id","closeReminder");
7835        const reopen = () => {
7836          /* Neue Höhe berechnen */
7837          const deltaHeight = (endHeight - startHeight) / (animationDuration / frameDuration);
7838          currentHeight -= deltaHeight; /* Hier wird die Höhe verringert, um das Element zu öffnen */
7839
7840          /* Höhe des DIV-Elements und des iFrames aktualisieren */
7841          billboard.style.height = `${currentHeight}px`;
7842          bBiframe.style.height  = `${currentHeight}px`;
7843
7844          /* Animation fortsetzen, bis die Start-Höhe erreicht ist */
7845          if(currentHeight < startHeight){
7846            requestAnimationFrame(reopen);
7847          }
7848        };
7849
7850        let bBopen = false;
7851
7852        function reminderClickHandler() {
7853          if (bBopen) {
7854            animate();
7855            bBopen = false;
7856          } else {
7857            reopen();
7858            bBopen = true;
7859          }
7860        }
7861        /* Klick-Event für den Reminder hinzufügen */
7862        reminder.addEventListener("click", reminderClickHandler);
7863
7864        /* Klick-Event für den CoseButton hinzufügen */
7865        closeButton.addEventListener("click", function(){
7866          /* Billboard-Element zurücksetzen */
7867          reminder.removeEventListener("click", reminderClickHandler);
7868          resizeObserver.disconnect();
7869          billboard.style.height = startHeight+"px";
7870          bBiframe.style.height = bBiframeHeight+"px";
7871          billboard.style.top = "revert";
7872          billboard.style.marginTop = "revert";
7873          billboard.style.zIndex    = "revert";
7874          billboard.style.left      = "revert";
7875          billboard.style.transform = "revert";
7876          billboard.style.position = "revert";
7877          reminder.style.display = "none";
7878        });
7879
7880        /* Funktion zum Aktualisieren der Position von reminder-div */
7881        function updateReminderPosition() {
7882          /* var billboardHeight = billboard.offsetHeight; */
7883          let billboardHeight = bBiframe.offsetHeight;
7884          const billboardWidth = bBiframe.clientWidth;
7885
7886          if (billboardHeight < 12) {
7887            billboardHeight = 0;
7888          }
7889          if (billboardHeight > bBInitialHeight) {
7890            billboardHeight = bBInitialHeight;
7891          }
7892          reminder.style.top = billboardHeight + "px";
7893          reminder.style.width = billboardWidth + "px";
7894        }
7895
7896        const resizeObserver = new ResizeObserver(updateReminderPosition);
7897        resizeObserver.observe(billboard);
7898
7899      }, reminderTime);
7900
7901      isFirstScroll = false;
7902    }
7903
7904  });
7905
7906});
7907
7908/**
7909 * bridgeAd
7910 */
7911$(document).on("bridgeAd", function(event){
7912  const bA_iframe = document.querySelector('.bridgeAdFrame');
7913  const bA_renderSlot = document.querySelector('.Ad-billboard');
7914  bA_renderSlot.classList.add('bridgeAdSlot');
7915});
7916
7917/**
7918 * bridgeAdSticky
7919 */
7920$(document).on("bridgeAdSticky", function(event){
7921  const bA_iframe = document.querySelector('.bridgeAdFrame');
7922  const bA_renderSlot = document.querySelector('.Ad-billboard');
7923  bA_renderSlot.classList.add('bridgeAdSlot');
7924  bA_iframe.classList.add('billboardSticky');
7925});
7926
7927/**
7928 * fullWidthBillboard
7929 */
7930$(document).on("fullWidthBillboard", function(event){
7931  const fw_renderSlot = document.querySelector('#renderSlot_Billboard');
7932  fw_renderSlot.classList.add('fullWidthBillboard');
7933});
7934
7935
7936/**
7937 * Events auch ohne trigger aus template
7938 */
7939window.addEventListener('load', function() {
7940  const billboardHeightEvent = new CustomEvent('billboardHeight');
7941  document.dispatchEvent(billboardHeightEvent);
7942});
7943
7944
7945/**
7946 * Understitial
7947 */
7948$(document).on('understitial',function(event) {
7949
7950  $(document).ready(function() {
7951    let understitialAd = document.querySelector('.understitial').parentNode.parentNode;
7952    let understitialAdWrapper = document.querySelector('.understitial').parentNode;
7953    let understitial = document.getElementsByClassName('understitial')[0];
7954    let us_height           = understitial.getAttribute("data-height");
7955    let us_width           = understitial.getAttribute("data-width");
7956    let setAdText           = understitial.getAttribute("data-setadtext");
7957    let us_btype = 'image';
7958    if (understitial.hasAttribute("data-btype")){
7959      us_btype = understitial.getAttribute("data-btype");
7960    }
7961
7962    function positioniereDiv(firstElm, seconElm) {
7963
7964      let firstElmWidth = firstElm.offsetWidth;
7965      let secondElmWidth = seconElm.offsetWidth;
7966      let firstElmPosition = firstElm.getBoundingClientRect();
7967      let firstElmDistanceLeft = firstElmPosition.left;
7968      let positionLeft = firstElmDistanceLeft + (firstElmWidth - secondElmWidth) / 2;
7969      positionLeft = positionLeft + (secondElmWidth / 2);
7970      seconElm.style.left = positionLeft + 'px';
7971    }
7972
7973    positioniereDiv(understitialAd, understitialAdWrapper);
7974
7975    understitialAd.classList.add("understitialAd");
7976
7977    understitialAdWrapper.style.position = "fixed";
7978    understitialAdWrapper.style.top = '50%';
7979    understitialAdWrapper.style.transform = "translate(-50%, -50%)";
7980    understitialAdWrapper.style.clipPath = "polygon(0 0, 100% 0, 100% 100%, 0 100%)";
7981    understitialAdWrapper.style.overflow = "auto";
7982    understitialAdWrapper.style.textAlign = "center";
7983    if(setAdText) {
7984      understitialAdWrapper.classList.add('Ad_text');
7985    }
7986
7987
7988    if (us_btype == 'stream' || us_btype == 'html5' || us_btype == 'image' || window.innerWidth < 768) {
7989      let outerIframe = document.getElementsByClassName('understitial')[0];
7990      let innerIframe = outerIframe.contentWindow.document.getElementById("usInnerIframe");
7991
7992
7993      /* adjust inner iFrame height and width */
7994      function adjustInnerIframeHeight() {
7995
7996        let understitialAdWidth = understitialAd.offsetWidth;
7997
7998
7999        /* consider possible lateral padding */
8000        let stylesUnderstitialAd = window.getComputedStyle(understitialAd);
8001        let uaPaddingLeft = parseInt(stylesUnderstitialAd.getPropertyValue('padding-left'), 10);
8002        let uaPaddingRight = parseInt(stylesUnderstitialAd.getPropertyValue('padding-right'), 10);
8003        let usMargin = 0;
8004        if (!isNaN(uaPaddingLeft)  || !isNaN(uaPaddingRight)) {
8005          usMargin = uaPaddingLeft + uaPaddingRight;
8006        }
8007
8008        understitialAdWrapper.style.width = understitialAdWidth-usMargin + "px";
8009
8010        outerIframe = document.getElementsByClassName('understitial')[0];
8011        let innerIframe = outerIframe.contentWindow.document.getElementById("usInnerIframe");
8012        if (innerIframe !== null) {
8013          let outerIframeHeight    = outerIframe.offsetHeight;
8014          innerIframe.style.height = outerIframeHeight + "px";
8015        }
8016
8017        /* adjust Banner Image TBD */
8018        let understitialHeight    = understitial.offsetHeight;
8019        let screenWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
8020        let screenHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
8021
8022        if ((understitialHeight >= (screenHeight - 70)) && (window.innerWidth > 768)) {
8023          const headerEl = document.querySelector('.SiteHeaderSticky');
8024          let heightDiff = understitialHeight - screenHeight;
8025
8026          if (headerEl) {
8027            const headerElHeight = 70;
8028            let smallerheight        = understitialHeight - headerElHeight*2 - heightDiff -35;
8029            let centerImage = understitial.contentDocument.querySelector('#understitialImage');
8030            understitial.style.height = Math.round(smallerheight) + "px";
8031            centerImage.style.height = Math.round(smallerheight) + "px";
8032          }
8033        } else {
8034          let centerImage = understitial.contentDocument.querySelector('#understitialImage');
8035          if (centerImage) {
8036            understitial.style.height = centerImage.offsetHeight + "px";
8037          }
8038        }
8039
8040        /* center understitial */
8041        understitialAdWrapper.style.textAlign = "center";
8042
8043        if (us_btype == 'html5') {
8044          innerIframe = outerIframe.contentDocument.querySelector('iframe');
8045          let innerIframeHeight = innerIframe.offsetHeight;
8046          let innerIframeWidth = innerIframe.offsetWidth;
8047
8048          /* get Height of pseudoelement before */
8049          let understitialAdWrapperBeforeStyle = window.getComputedStyle(understitialAdWrapper, '::before');
8050          let understitialAdWrapperHeight = parseInt(understitialAdWrapperBeforeStyle.getPropertyValue('height'), 10);
8051
8052          /* smaller width and height for iOS */
8053          const userAgent = navigator.userAgent;
8054
8055          if (userAgent.includes("iPhone")) {
8056            let smallerWidth        = innerIframeWidth - (innerIframeWidth * 0.15);
8057            innerIframe.style.width = Math.round(smallerWidth) + "px";
8058
8059          }
8060
8061          /* set height again and center content */
8062          understitialAdWrapper.style.height = innerIframeHeight + understitialAdWrapperHeight + "px";
8063          innerIframe.style.margin = "0 auto";
8064          understitialAdWrapper.style.overflow = "hidden";
8065        }
8066
8067      }
8068      adjustInnerIframeHeight();
8069      outerIframe.addEventListener("load", adjustInnerIframeHeight);
8070    }
8071
8072  });
8073});
8074
8075/* if BTA-Homepage-Aufmacher is empty then display= none */
8076document.addEventListener('DOMContentLoaded', function() {
8077  setTimeout(() => {
8078    const btaHomepageSlot = document.getElementById('renderSlot_BTA-Homepage-Aufmacher');
8079    const btaSubstitute = document.querySelector('article.btaSubstitute');
8080
8081    if (btaHomepageSlot) {
8082      const firstChild = btaHomepageSlot.firstElementChild;
8083
8084      if (!firstChild || firstChild.tagName !== 'DIV') {
8085        const btaArticle = document.querySelector('article.BTA-Homepage-Aufmacher');
8086        if (btaArticle) {
8087          btaArticle.style.display = 'none';
8088        }
8089        if (btaSubstitute) {
8090          btaSubstitute.style.display = 'block';
8091        }
8092      }
8093    }
8094  }, 1500);
8095});
8096
8097/* if BTA-Homepage-Nachrichten is empty then display= none */
8098document.addEventListener('DOMContentLoaded', function() {
8099  setTimeout(() => {
8100    const btaHomepageNachrichtenSlot = document.getElementById('renderSlot_BTA-Homepage-Nachrichten');
8101    const btaArticle = document.querySelector('.BTA-Homepage-Nachrichten');
8102
8103    if (btaHomepageNachrichtenSlot) {
8104      const firstChild = btaHomepageNachrichtenSlot.firstElementChild;
8105
8106      if (!firstChild || firstChild.tagName !== 'DIV') {
8107        if (btaArticle) {
8108          btaArticle.style.display = 'none';
8109        }
8110
8111      } else {
8112
8113        const section = document.querySelector('section.StageNewsAutoManualMostread');
8114        if (section) {
8115          const itemsContainer = section.querySelector('.StageNewsAutoManualMostread_items');
8116          if (itemsContainer) {
8117            const items = itemsContainer.querySelectorAll('.StageNewsAutoManualMostread_item');
8118            if (items.length >= 6) {
8119              /* selektiere 6. Element */
8120              const btaSubstitute = items[5];
8121              btaSubstitute.style.display = 'none';
8122              console.log('Das 6. Element:', btaSubstitute);
8123            } else {
8124              /* console.log('weniger als 6 Elemente mit Klasse "StageNewsAutoManualMostread_item".'); */
8125            }
8126          } else {
8127            /* console.log('Element mit Klasse "StageNewsAutoManualMostread_items" nicht gefunden.'); */
8128          }
8129        } else {
8130          /* console.log('<section>-Element mit Klasse "StageNewsAutoManualMostread" nicht gefunden.'); */
8131        }
8132
8133      }
8134    }
8135  }, 1500);
8136});
8137
8138/* if both BTA-asides are empty then display= none */
8139document.addEventListener('DOMContentLoaded', function() {
8140  setTimeout(() => {
8141    const btaasideSlot1 = document.getElementById('BTA-Artikeldetail-aSide-1');
8142    const btaasideSlot2 = document.getElementById('BTA-Artikeldetail-aSide-2');
8143
8144    function isValidDiv(child) {
8145      return (
8146        child &&
8147        child.tagName === 'DIV' &&
8148        child.innerHTML.trim() !== ''
8149      );
8150    }
8151
8152    let isSlot1Valid = false;
8153    let isSlot2Valid = false;
8154
8155    if (btaasideSlot1) {
8156      const firstChild1 = btaasideSlot1.firstElementChild;
8157      isSlot1Valid = isValidDiv(firstChild1);
8158    }
8159
8160    if (btaasideSlot2) {
8161      const firstChild2 = btaasideSlot2.firstElementChild;
8162      isSlot2Valid = isValidDiv(firstChild2);
8163    }
8164
8165    if (!isSlot1Valid && !isSlot2Valid) {
8166      const asideContainer = document.querySelector('.btaAsideContainer');
8167      if (asideContainer) {
8168        asideContainer.style.display = 'none';
8169      }
8170    }
8171
8172  }, 1500);
8173});
8174
8175var adition = adition || {};
8176adition.srq = adition.srq || [];
8177
8178$(document).ready( function() {
8179
8180  function gA_on_Action(action, data) {
8181    if (data.indexOf('GoogleAnalytics_action') !== -1) {
8182      var url = window.location.href
8183        .split("?")[0]
8184        .split("#")[0];
8185      url += '/user/registration/completed';
8186      switch (action) {
8187        case '/user/registerng/register/':
8188          window.dfv_ga_vpageview(url);
8189          if (typeof window.sp_track_virtual_page_view === 'function') {
8190            window.sp_track_virtual_page_view(null, url);
8191          }
8192          break;
8193        default:
8194      }
8195    }
8196  }
8197
8198  function getLocationURL(url) {
8199
8200    const searchParams = new URLSearchParams(window.location.href);
8201    if (searchParams.has('redirect')) {
8202      return searchParams.get('redirect').split("#")[0];
8203    }
8204
8205    return url.replace('?password=1&', '?')
8206      .replace('?password-en=1&', '?')
8207      .replace('?password=1', '')
8208      .replace('?password-en=1', '')
8209      .replace('&password=1', '')
8210      .replace('&password-en=1', '')
8211      .replace('?password', '?')
8212      .replace('?password-en', '?')
8213      .replace('&password', '')
8214      .replace('&password-en', '')
8215      .replace('?login=1', '?')
8216      .replace('?login-en=1', '?')
8217      .replace('&login=1', '')
8218      .replace('&login-en=1', '')
8219      .split("#")[0];
8220  }
8221
8222  function sendCCSconversionToCMS(path, verifyhash, cceconversionid, info) {
8223    console.log('sendCCSconversionToCMS', path, verifyhash, cceconversionid, info);
8224    const xhr = new XMLHttpRequest();
8225    xhr.open('POST', path);
8226    xhr.setRequestHeader('Content-Type', 'application/json');
8227    xhr.onreadystatechange = () => {
8228      if (xhr.readyState === XMLHttpRequest.DONE && xhr.status === 200) {
8229        console.log('cceconversion CMS OK');
8230      } else if (xhr.readyState === XMLHttpRequest.DONE) {
8231        console.log('cceconversion CMS failed');
8232      }
8233    };
8234    const json = JSON.stringify({'i_verifyhash': verifyhash, 'i_cceconversionid':cceconversionid, 'i_info': info});
8235    xhr.send(json);
8236  }
8237
8238  function pianoSendConversionEventAndGotoURL(data, url) {
8239    var cceconversionid = '';
8240    document.querySelectorAll('#PianoConversionObject[data-piano-cceconversion-id]').forEach(function(element) {cceconversionid = element.getAttribute('data-piano-cceconversion-id');});
8241    /* console.log('pianoSendConversionEvent "', cceconversionid, '" cX: ', typeof cX, 'cX.CCE', typeof cX.CCE); */
8242    let verifyhash = '';
8243    document.querySelectorAll('input[name=i_verifyhash]').forEach(function(element) {verifyhash = element.getAttribute('value');});
8244    if (cceconversionid === ''|| verifyhash === '') {
8245      if (verifyhash === '') {
8246        verifyhash = 'no verifyhash';
8247      }
8248      sendCCSconversionToCMS('/_piano/api/cceconversion/store/', verifyhash, 'NO', 'no-cceconversionid');
8249      window.location = url;
8250    }
8251    console.log('sendCCSconversionToCMS');
8252    sendCCSconversionToCMS('/_piano/api/cceconversion/store/', verifyhash, cceconversionid, 'start-send-conversion-event');
8253    if (typeof cX === 'undefined' || typeof cX.CCE === 'undefined') {
8254      sendCCSconversionToCMS('/_piano/api/cceconversion/store/', verifyhash, cceconversionid, 'error-no-cX-or-cXCCE');
8255      window.location = url;
8256    }
8257    else {
8258      console.log('sendConversionEvent');
8259      cX.CCE.callQueue.push(['sendConversionEvent', {
8260        'productId': cceconversionid,
8261        'funnelStep': 'convertProduct'
8262      }, {
8263        'callback': function (result) {
8264          console.log(result.httpStatus); // 200
8265          console.log(result.response); // {}
8266          let info =  (result.httpStatus !== 200) ? 'error-api-response' : 'OK';
8267          sendCCSconversionToCMS('/_piano/api/cceconversion/store/', verifyhash, cceconversionid, info);
8268          window.location = url;
8269        }
8270      }]);
8271    }
8272  }
8273  $('.FormRegisterNG').on('submit', '.FormRegisterNG_form',  function(event) {
8274    const formRegisterNg = $(this).closest('.FormRegisterNG');
8275    event.preventDefault();
8276    var action = event.currentTarget.getAttribute('action');
8277    var data = $( this ).serialize();
8278    $.post(
8279      action,
8280      data,
8281      function(data) {
8282        gA_on_Action(action, data);
8283        var url = '';
8284        let obj = null;
8285        try {
8286          obj = JSON.parse(data);
8287          switch (obj.step) {
8288            case 'thankyou':
8289              window.dataLayer.push({event: 'registration'});
8290              formRegisterNg.html( obj.html );
8291              window.location.href = '#formRegisterNG';
8292              break;
8293            case 'auto_login':
8294              const searchParams = new URLSearchParams(window.location.href);
8295              console.log( searchParams.has('community') , searchParams.has('community', 1));
8296              if ( searchParams.has('community') ) {
8297                window.location.href = '/community/';
8298                break;
8299              }
8300              url = getLocationURL(obj.url);
8301              window.location.href = url;
8302              break;
8303            case 'auto_login_conversion':
8304              url = getLocationURL(obj.url);
8305              pianoSendConversionEventAndGotoURL(data, url);
8306              break;
8307            default:
8308              formRegisterNg.html( obj.html );
8309              window.location.href = '#formRegisterNG';
8310          }
8311          return true;
8312        }
8313        catch(e) {
8314          console.log('JSON.parse(data) failed, use html replace', data);
8315        }
8316
8317        if (data === 'auto_login') {
8318          url = getLocationURL(window.location.href);
8319          window.location.href = url;
8320        } else if (data === 'auto_login_conversion' ) {
8321          url = getLocationURL(window.location.href);
8322          pianoSendConversionEventAndGotoURL(data, url);
8323        } else {
8324          let innerHtml = $(data).hasClass('FormRegisterNG_wrapper') ? $(data) : $(data).find('.FormRegisterNG_wrapper');
8325          if (innerHtml.length > 0) {
8326            formRegisterNg.html(innerHtml);
8327          } else {
8328            formRegisterNg.html(data);
8329          }
8330          window.location.href = '#formRegisterNG';
8331        }
8332      }
8333    );
8334  });
8335
8336  $('.FormRegisterNG').on('click', function(event) {
8337    const formRegisterNg = $(this);
8338    if ($(event.target).hasClass('FormRegisterNG_control-showPassword')) {
8339      event.preventDefault();
8340      var wdt = $('.FormRegisterNG_control-passwordField').css('width');
8341      if ($('.FormRegisterNG_control-passwordField').attr('type') === 'password') {
8342        $('.FormRegisterNG_control-passwordField').attr('type', 'text');
8343        if ($('a.FormRegisterNG_control-showPassword').text() === 'Show password') {
8344          $('a.FormRegisterNG_control-showPassword').text('Hide password');
8345        } else if ($('a.FormRegisterNG_control-showPassword').text() === 'Mostra password') {
8346          $('a.FormRegisterNG_control-showPassword').text('Inserire password');
8347        } else if ($('a.FormRegisterNG_control-showPassword').text() === 'Pokaż hasło') {
8348          $('a.FormRegisterNG_control-showPassword').text('Ukryj hasło');
8349        } else {
8350          $('a.FormRegisterNG_control-showPassword').text('Passwort ausblenden');
8351        }
8352      } else {
8353        $('.FormRegisterNG_control-passwordField').attr('type', 'password');
8354        if ($('a.FormRegisterNG_control-showPassword').text() === 'Hide password') {
8355          $('a.FormRegisterNG_control-showPassword').text('Show password');
8356        } else if ($('a.FormRegisterNG_control-showPassword').text() === 'Inserire password') {
8357          $('a.FormRegisterNG_control-showPassword').text('Mostra password');
8358        } else if ($('a.FormRegisterNG_control-showPassword').text() === 'Ukryj hasło') {
8359          $('a.FormRegisterNG_control-showPassword').text('Pokaż hasło');
8360        } else {
8361          $('a.FormRegisterNG_control-showPassword').text('Passwort einblenden');
8362        }
8363      }
8364      $('.FormRegisterNG_control-passwordField').css('width', wdt);
8365    } else if (event.target.getAttribute('data-action')) {
8366      event.preventDefault();
8367      var action = event.target.getAttribute('data-action');
8368      var url = event.target.getAttribute('data-url');
8369      data = 'url='+url;
8370      $.post(
8371        action,
8372        data,
8373        function(data) {
8374          gA_on_Action(action, data);
8375          formRegisterNg.html( data );
8376        }
8377      );
8378    }
8379  });
8380
8381});
8382
8383function initPremiumPaywallExpandOnAnker(get_status) {
8384  var url;
8385  var anker_exists;
8386
8387  url = window.location.href;
8388  anker_exists = url.indexOf("#formRegisterNG");
8389
8390  if ( anker_exists >= 0) {
8391    if (get_status !== true) {
8392      $('.FormRegisterNG_secondWrapper').addClass('isExpanded');
8393    } else {
8394      return true;
8395    }
8396  }
8397}
8398
8399function getQueryVariable(variable) {
8400  var query = window.location.search.substring(1);
8401  var vars = query.split("&");
8402  for (var i=0;i<vars.length;i++) {
8403    var pair = vars[i].split("=");
8404    if (pair[0] == variable) {
8405      return pair[1];
8406    }
8407  }
8408  return "";
8409}
8410
8411function fillForm(field_id,value, formID) {
8412  $('#'+formID + ' #'+field_id).val(decodeURIComponent(value));
8413}
8414
8415function initPremiumPaywallToggle() {
8416  var is_expanded;
8417  is_expanded = initPremiumPaywallExpandOnAnker(true);
8418
8419  // Diese Variablen dürfen per Get an die Reg-Bühne übergeben werden
8420  var allowed_get_params = ['email', 'firstname', 'lastname','anreden_id'];
8421 
8422  // Werte holen für formFillers und Formular vorbelegen
8423  allowed_get_params.forEach( function(entry)  {
8424    form_val = getQueryVariable(entry);
8425    if  (form_val.length > 0) {
8426      fillForm('i_' + entry, form_val,  'nl_order_single_form' )
8427    }
8428    if (form_val.length > 0 && entry == 'anreden_id') {
8429      document.getElementById('radio'+entry+form_val).checked = true;
8430      is_expanded
8431    }
8432  });
8433
8434  if ( is_expanded || $('.FormRegisterNG_secondWrapper').hasClass('isExpanded') ) {
8435    $('.FormRegisterNG_toggleButton-arrows').css('transform', 'rotate(180deg)');
8436  }
8437
8438  $('.StagePremiumPaywall .FormRegisterNG_firstWrapper').click(function() {
8439    var paywall = '.FormRegisterNG_secondWrapper';
8440
8441    if ( $(paywall+':visible').length === 0 ) {
8442      $(paywall).slideDown(225);
8443      $('.FormRegisterNG_toggleButton').addClass('isActive');
8444      $('.FormRegisterNG_toggleButton-arrows').css('transform', 'rotate(180deg)');
8445    } else if ( $(paywall+':visible').length > 0) {
8446      $(paywall).slideUp(225);
8447      $('.FormRegisterNG_toggleButton').removeClass('isActive');
8448      $('.FormRegisterNG_toggleButton-arrows').css('transform', 'rotate(0deg)');
8449    }
8450  });
8451}
8452
8453$(document).ready( function() {
8454  initPremiumPaywallToggle();
8455  initPremiumPaywallExpandOnAnker(false);
8456});
8457
8458 function setGallerySubtitle(slidername) {
8459    
8460    var subtitle = $("#"+slidername+".slider .flex-active-slide .imgsubtitle").html();
8461    $(".slider-subtitle." + slidername).html(subtitle);
8462  }
8463  
8464  function setGalleryTitle() {
8465    var title = $(".gallery-title").html();
8466    $(".fixed-header-title").html(title);
8467  }
8468/**
8469 * Swiper 3.4.2
8470 * Most modern mobile touch slider and framework with hardware accelerated transitions
8471 * 
8472 * http://www.idangero.us/swiper/
8473 * 
8474 * Copyright 2017, Vladimir Kharlampidi
8475 * The iDangero.us
8476 * http://www.idangero.us/
8477 * 
8478 * Licensed under MIT
8479 * 
8480 * Released on: March 10, 2017
8481 */
8482!function(){"use strict";var e,a=function(t,s){function r(e){return Math.floor(e)}function i(){var e=x.params.autoplay,a=x.slides.eq(x.activeIndex);a.attr("data-swiper-autoplay")&&(e=a.attr("data-swiper-autoplay")||x.params.autoplay),x.autoplayTimeoutId=setTimeout(function(){x.params.loop?(x.fixLoop(),x._slideNext(),x.emit("onAutoplay",x)):x.isEnd?s.autoplayStopOnLast?x.stopAutoplay():(x._slideTo(0),x.emit("onAutoplay",x)):(x._slideNext(),x.emit("onAutoplay",x))},e)}function n(a,t){var s=e(a.target);if(!s.is(t))if("string"==typeof t)s=s.parents(t);else if(t.nodeType){var r;return s.parents().each(function(e,a){a===t&&(r=t)}),r?t:void 0}if(0!==s.length)return s[0]}function o(e,a){a=a||{};var t=window.MutationObserver||window.WebkitMutationObserver,s=new t(function(e){e.forEach(function(e){x.onResize(!0),x.emit("onObserverUpdate",x,e)})});s.observe(e,{attributes:void 0===a.attributes||a.attributes,childList:void 0===a.childList||a.childList,characterData:void 0===a.characterData||a.characterData}),x.observers.push(s)}function l(e){e.originalEvent&&(e=e.originalEvent);var a=e.keyCode||e.charCode;
8482if(!x.params.allowSwipeToNext&&(x.isHorizontal()&&39===a||!x.isHorizontal()&&40===a))return!1;if(!x.params.allowSwipeToPrev&&(x.isHorizontal()&&37===a||!x.isHorizontal()&&38===a))return!1;if(!(e.shiftKey||e.altKey||e.ctrlKey||e.metaKey||document.activeElement&&document.activeElement.nodeName&&("input"===document.activeElement.nodeName.toLowerCase()||"textarea"===document.activeElement.nodeName.toLowerCase()))){if(37===a||39===a||38===a||40===a){var t=!1;if(x.container.parents("."+x.params.slideClass).length>0&&0===x.container.parents("."+x.params.slideActiveClass).length)return;var s={left:window.pageXOffset,top:window.pageYOffset},r=window.innerWidth,i=window.innerHeight,n=x.container.offset();x.rtl&&(n.left=n.left-x.container[0].scrollLeft);for(var o=[[n.left,n.top],[n.left+x.width,n.top],[n.left,n.top+x.height],[n.left+x.width,n.top+x.height]],l=0;l<o.length;l++){var p=o[l];p[0]>=s.left&&p[0]<=s.left+r&&p[1]>=s.top&&p[1]<=s.top+i&&(t=!0)}if(!t)return}x.isHorizontal()?(37!==a&&39!==a||(e.preventDefault?e.preventDefault():e.returnValue=!1),(39===a&&!x.rtl||37===a&&x.rtl)&&x.slideNext(),(37===a&&!x.rtl||39===a&&x.rtl)&&x.slidePrev()):(38!==a&&40!==a||(e.preventDefault?e.preventDefault():e.returnValue=!1),40===a&&x.slideNext(),38===a&&x.slidePrev()),x.emit("onKeyPress",x,a)}}function p(e){var a=0,t=0,s=0,r=0;return"detail"in e&&(t=e.detail),"wheelDelta"in e&&(t=-e.wheelDelta/120),"wheelDeltaY"in e&&(t=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(a=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(a=t,t=0),s=10*a,r=10*t,"deltaY"in e&&(r=e.deltaY),"deltaX"in e&&(s=e.deltaX),(s||r)&&e.deltaMode&&(1===e.deltaMode?(s*=40,r*=40):(s*=800,r*=800)),s&&!a&&(a=s<1?-1:1),r&&!t&&(t=r<1?-1:1),{spinX:a,spinY:t,pixelX:s,pixelY:r}}function d(e){e.originalEvent&&(e=e.originalEvent);var a=0,t=x.rtl?-1:1,s=p(e);if(x.params.mousewheelForceToAxis)if(x.isHorizontal()){if(!(Math.abs(s.pixelX)>Math.abs(s.pixelY)))return;a=s.pixelX*t}else{if(!(Math.abs(s.pixelY)>Math.abs(s.pixelX)))return;a=s.pixelY}else a=Math.abs(s.pixelX)>Math.abs(s.pixelY)?-s.pixelX*t:-s.pixelY;if(0!==a){if(x.params.mousewheelInvert&&(a=-a),x.params.freeMode){var r=x.getWrapperTranslate()+a*x.params.mousewheelSensitivity,i=x.isBeginning,n=x.isEnd;if(r>=x.minTranslate()&&(r=x.minTranslate()),r<=x.maxTranslate()&&(r=x.maxTranslate()),x.setWrapperTransition(0),x.setWrapperTranslate(r),x.updateProgress(),x.updateActiveIndex(),(!i&&x.isBeginning||!n&&x.isEnd)&&x.updateClasses(),x.params.freeModeSticky?(clearTimeout(x.mousewheel.timeout),x.mousewheel.timeout=setTimeout(function(){x.slideReset()},300)):x.params.lazyLoading&&x.lazy&&x.lazy.load(),x.emit("onScroll",x,e),x.params.autoplay&&x.params.autoplayDisableOnInteraction&&x.stopAutoplay(),0===r||r
8482===x.maxTranslate())return}else{if((new window.Date).getTime()-x.mousewheel.lastScrollTime>60)if(a<0)if(x.isEnd&&!x.params.loop||x.animating){if(x.params.mousewheelReleaseOnEdges)return!0}else x.slideNext(),x.emit("onScroll",x,e);else if(x.isBeginning&&!x.params.loop||x.animating){if(x.params.mousewheelReleaseOnEdges)return!0}else x.slidePrev(),x.emit("onScroll",x,e);x.mousewheel.lastScrollTime=(new window.Date).getTime()}return e.preventDefault?e.preventDefault():e.returnValue=!1,!1}}function m(a,t){a=e(a);var s,r,i,n=x.rtl?-1:1;s=a.attr("data-swiper-parallax")||"0",r=a.attr("data-swiper-parallax-x"),i=a.attr("data-swiper-parallax-y"),r||i?(r=r||"0",i=i||"0"):x.isHorizontal()?(r=s,i="0"):(i=s,r="0"),r=r.indexOf("%")>=0?parseInt(r,10)*t*n+"%":r*t*n+"px",i=i.indexOf("%")>=0?parseInt(i,10)*t+"%":i*t+"px",a.transform("translate3d("+r+", "+i+",0px)")}function u(e){return 0!==e.indexOf("on")&&(e=e[0]!==e[0].toUpperCase()?"on"+e[0].toUpperCase()+e.substring(1):"on"+e),e}if(!(this instanceof a))return new a(t,s);var c={direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,autoplay:!1,autoplayDisableOnInteraction:!0,autoplayStopOnLast:!1,iOSEdgeSwipeDetection:!1,iOSEdgeSwipeThreshold:20,freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",coverflow:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:!0},flip:{slideShadows:!0,limitRotation:!0},cube:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94},fade:{crossFade:!1},parallax:!1,zoom:!1,zoomMax:3,zoomMin:1,zoomToggle:!0,scrollbar:null,scrollbarHide:!0,scrollbarDraggable:!1,scrollbarSnapOnRelease:!1,keyboardControl:!1,mousewheelControl:!1,mousewheelReleaseOnEdges:!1,mousewheelInvert:!1,mousewheelForceToAxis:!1,mousewheelSensitivity:1,mousewheelEventsTarged:"container",hashnav:!1,hashnavWatchState:!1,history:!1,replaceState:!1,breakpoints:void 0,spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,centeredSlides:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,onlyExternal:!1,threshold:0,touchMoveStopPropagation:!0,touchReleaseOnEdges:!1,uniqueNavElements:!0,pagination:null,paginationElement:"span",paginationClickable:!1,paginationHide:!1,paginationBulletRender:null,paginationProgressRender:null,paginationFractionRender:null,paginationCustomRender:null,paginationType:"bullets",resistance:!0,resistanceRatio:.85,nextButton:null,prevButton:null,watchSlidesProgress:!1,watchSlidesVisibility:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,lazyLoading:!1,lazyLoadingInPrevNext:!1,lazyLoadingInPrevNextAmount:1,lazyLoadingOnTransitionStart:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,control:void 0,controlInverse:!1,controlBy:"slide",normalizeSlideIndex:!0,allowSwipeToPrev:!0,allowSwipeToNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",passiveListeners:!0,containerModifierClass:"swiper-container-",slideClass:"swiper-slide",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",bulletClass:"swiper-pagination-bullet",bulletActiveClass:"swiper-pagination-bullet-active",buttonDisabledClass:"swiper-button-disabled",paginationCurrentClass:"swiper-pagination-current",paginationTotalClass:"swiper-pagination-total",paginationHiddenClass:"swiper-pagination-hidden",paginationProgressbarClass:"swiper-pagination-progressbar",paginationClickableClass:"swiper-pagination-clickable",paginationModifierClass:"swiper-pagination-",lazyLoadingClass:"swiper-lazy",lazyStatusLoadingClass:"swiper-lazy-loading",lazyStatusLoadedClass:"swiper-lazy-loaded",lazyPreloaderClass:"swiper-lazy-preloader",notificationClass:"swiper-notification",preloaderClass:"preloader",zoomContainerClass:"swiper-zoom-container",observer:!1,observeParents:!1,a11y:!1,prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",runCallbacksOnInit:!0},g=s&&s.virtualTranslate;s=s||{};var h={};for(var v in s)if("object"!=typeof s[v]||null===s[v]||(s[v].nodeType||s[v]===window||s[v]===document||"undefined"!=typeof Dom7&&s[v]instanceof Dom7||"undefined"!=typeof jQuery&&s[v]instanceof jQuery))h[v]=s[v];else{h[v]={};for(var f in s[v])h[v][f]=s[v][f]}for(var w in c)if(void 0===s[w])s[w]=c[w];else if("object"==typeof s[w])for(var y in c[w])void 0===s[w][y]&&(s[w][y]=c[w][y]);var x=this;if(x.params=s,x.originalParams=h,x.classNames=[],void 0!==e&&"undefined"!=typeof Dom7&&(e=Dom7),(void 0!==e||(e="undefined"==typeof Dom7?window.Dom7||window.Zepto||window.jQuery:Dom7))&&(x.$=e,x.currentBreakpoint=void 0,x.getActiveBreakpoint=function(){if(!x.params.breakpoints)return!1;var e,a=!1,t=[];for(e in x.params.breakpoints)x.params.breakpoints.hasOwnProperty(e)&&t.push(e);t.sort(function(e,a){return parseInt(e,10)>parseInt(a,10)});for(var s=0;s<t.length;s++)(e=t[s])>=window.innerWidth&&!a&&(a=e);return a||"max"},x.setBreakpoint=function(){var e=x.getActiveBreakpoint();if(e&&x.currentBreakpoint!==e){var a=e in x.params.breakpoints?x.params.breakpoints[e]:x.originalParams,t=x.params.loop&&a.slidesPerView!==x.params.slidesPerView;for(var s in a)x.params[s]=a[s];x.currentBreakpoint=e,t&&x.destroyLoop&&x.reLoop(!0)}},x.params.breakpoints&&x.setBreakpoint(),x.container=e(t),0!==x.container.length)){if(x.container.length>1){var T=[];return x.container.each(function(){T.push(new a(this,s))}),T}
8482x.container[0].swiper=x,x.container.data("swiper",x),x.classNames.push(x.params.containerModifierClass+x.params.direction),x.params.freeMode&&x.classNames.push(x.params.containerModifierClass+"free-mode"),x.support.flexbox||(x.classNames.push(x.params.containerModifierClass+"no-flexbox"),x.params.slidesPerColumn=1),x.params.autoHeight&&x.classNames.push(x.params.containerModifierClass+"autoheight"),(x.params.parallax||x.params.watchSlidesVisibility)&&(x.params.watchSlidesProgress=!0),x.params.touchReleaseOnEdges&&(x.params.resistanceRatio=0),["cube","coverflow","flip"].indexOf(x.params.effect)>=0&&(x.support.transforms3d?(x.params.watchSlidesProgress=!0,x.classNames.push(x.params.containerModifierClass+"3d")):x.params.effect="slide"),"slide"!==x.params.effect&&x.classNames.push(x.params.containerModifierClass+x.params.effect),"cube"===x.params.effect&&(x.params.resistanceRatio=0,x.params.slidesPerView=1,x.params.slidesPerColumn=1,x.params.slidesPerGroup=1,x.params.centeredSlides=!1,x.params.spaceBetween=0,x.params.virtualTranslate=!0),"fade"!==x.params.effect&&"flip"!==x.params.effect||(x.params.slidesPerView=1,x.params.slidesPerColumn=1,x.params.slidesPerGroup=1,x.params.watchSlidesProgress=!0,x.params.spaceBetween=0,void 0===g&&(x.params.virtualTranslate=!0)),x.params.grabCursor&&x.support.touch&&(x.params.grabCursor=!1),x.wrapper=x.container.children("."+x.params.wrapperClass),x.params.pagination&&(x.paginationContainer=e(x.params.pagination),x.params.uniqueNavElements&&"string"==typeof x.params.pagination&&x.paginationContainer.length>1&&1===x.container.find(x.params.pagination).length&&(x.paginationContainer=x.container.find(x.params.pagination)),"bullets"===x.params.paginationType&&x.params.paginationClickable?x.paginationContainer.addClass(x.params.paginationModifierClass+"clickable"):x.params.paginationClickable=!1,x.paginationContainer.addClass(x.params.paginationModifierClass+x.params.paginationType)),(x.params.nextButton||x.params.prevButton)&&(x.params.nextButton&&(x.nextButton=e(x.params.nextButton),x.params.uniqueNavElements&&"string"==typeof x.params.nextButton&&x.nextButton.length>1&&1===x.container.find(x.params.nextButton).length&&(x.nextButton=x.container.find(x.params.nextButton))),x.params.prevButton&&(x.prevButton=e(x.params.prevButton),x.params.uniqueNavElements&&"string"==typeof x.params.prevButton&&x.prevButton.length>1&&1===x.container.find(x.params.prevButton).length&&(x.prevButton=x.container.find(x.params.prevButton)))),x.isHorizontal=function(){return"horizontal"===x.params.direction},x.rtl=x.isHorizontal()&&("rtl"===x.container[0].dir.toLowerCase()||"rtl"===x.c
8482ontainer.css("direction")),x.rtl&&x.classNames.push(x.params.containerModifierClass+"rtl"),x.rtl&&(x.wrongRTL="-webkit-box"===x.wrapper.css("display")),x.params.slidesPerColumn>1&&x.classNames.push(x.params.containerModifierClass+"multirow"),x.device.android&&x.classNames.push(x.params.containerModifierClass+"android"),x.container.addClass(x.classNames.join(" ")),x.translate=0,x.progress=0,x.velocity=0,x.lockSwipeToNext=function(){x.params.allowSwipeToNext=!1,x.params.allowSwipeToPrev===!1&&x.params.grabCursor&&x.unsetGrabCursor()},x.lockSwipeToPrev=function(){x.params.allowSwipeToPrev=!1,x.params.allowSwipeToNext===!1&&x.params.grabCursor&&x.unsetGrabCursor()},x.lockSwipes=function(){x.params.allowSwipeToNext=x.params.allowSwipeToPrev=!1,x.params.grabCursor&&x.unsetGrabCursor()},x.unlockSwipeToNext=function(){x.params.allowSwipeToNext=!0,x.params.allowSwipeToPrev===!0&&x.params.grabCursor&&x.setGrabCursor()},x.unlockSwipeToPrev=function(){x.params.allowSwipeToPrev=!0,x.params.allowSwipeToNext===!0&&x.params.grabCursor&&x.setGrabCursor()},x.unlockSwipes=function(){x.params.allowSwipeToNext=x.params.allowSwipeToPrev=!0,x.params.grabCursor&&x.setGrabCursor()},x.setGrabCursor=function(e){x.container[0].style.cursor="move",x.container[0].style.cursor=e?"-webkit-grabbing":"-webkit-grab",x.container[0].style.cursor=e?"-moz-grabbin":"-moz-grab",x.container[0].style.cursor=e?"grabbing":"grab"},x.unsetGrabCursor=function(){x.container[0].style.cursor=""},x.params.grabCursor&&x.setGrabCursor(),x.imagesToLoad=[],x.imagesLoaded=0,x.loadImage=function(e,a,t,s,r,i){function n(){i&&i()}var o;e.complete&&r?n():a?(o=new window.Image,o.onload=n,o.onerror=n,s&&(o.sizes=s),t&&(o.srcset=t),a&&(o.src=a)):n()},x.preloadImages=function(){function e(){void 0!==x&&null!==x&&x&&(void 0!==x.imagesLoaded&&x.imagesLoaded++,x.imagesLoaded===x.imagesToLoad.length&&(x.params.updateOnImagesReady&&x.update(),x.emit("onImagesReady",x)))}x.imagesToLoad=x.container.find("img");for(var a=0;a<x.imagesToLoad.length;a++)x.loadImage(x.imagesToLoad[a],x.imagesToLoad[a].currentSrc||x.imagesToLoad[a].getAttribute("src"),x.imagesToLoad[a].srcset||x.imagesToLoad[a].getAttribute("srcset"),x.imagesToLoad[a].sizes||x.imagesToLoad[a].getAttribute("sizes"),!0,e)},x.autoplayTimeoutId=void 0,x.autoplaying=!1,x.autoplayPaused=!1,x.startAutoplay=function(){return void 0===x.autoplayTimeoutId&&(!!x.params.autoplay&&(!x.autoplaying&&(x.autoplaying=!0,x.emit("onAutoplayStart",x),void i())))},x.stopAutoplay=function(e){x.autoplayTimeoutId&&(x.autoplayTimeoutId&&clearTimeout(x.autoplayTimeoutId),x.autoplaying=!1,x.autoplayTimeoutId=void 0,x.emit("onAutoplayStop",x))},x.pauseAutoplay=function(e){x.autoplayPaused||(x.autoplayTimeoutId&&clearTimeout(x.autoplayTimeoutId),x.autoplayPaused=!0,0===e?(x.autoplayPaused=!1,i()):x.wrapper.transitionEnd(function(){x&&(x.autoplayPaused=!1,x.autoplaying?i():x.stopAutoplay())}))},x.minTranslate=function(){return-x.snapGrid[0]},x.maxTranslate=function(){return-x.snapGrid[x.snapGrid.length-1]},x.updateAutoHeight=function(){var e,a=[],t=0;if("auto"!==x.params.slidesPerView&&x.params.slidesPerView>1)for(e=0;e<Math.ceil(x.params.slidesPerView);e++){var s=x.activeIndex+e;if(s>x.slides.length)break;a.push(x.slides.eq(s)[0])}else a.push(x.slides.eq(x.activeIndex)[0]);for(e=0;e<a.length;e++)if(void 0!==a[e]){var r=a[e].offsetHeight;t=r>t?r:t}t&&x.wrapper.css("height",t+"px")},x.updateContainerSize=function(){var e,a;e=void 0!==x.params.width?x.params.width:x.container[0].clientWidth,a=void 0!==x.params.height?x.params.height:x.container[0].clientHeight,0===e&&x.isHorizontal()||0===a&&!x.isHorizontal()||(e=e-parseInt(x.container.css("padding-left"),10)-parseInt(x.container.css("padding-right"),10),a=a-parseInt(x.container.css("padding-top"),10)-parseInt(x.container.css("padding-bottom"),10),x.width=e,x.height=a,x.size=x.isHorizontal()?x.width:x.height)},x.updateSlidesSize=function(){x.slides=x.wrapper.children("."+x.params.slideClass),x.snapGrid=[],x.slidesGrid=[],x.slidesSizesGrid=[];var e,a=x.params.spaceBetween,t=-x.params.slidesOffsetBefore,s=0,i=0;if(void 0!==x.size){"string"==typeof a&&a.indexOf("%")>=0&&(a=parseFloat(a.replace("%",""))/100*x.size),x.virtualSize=-a,x.rtl?x.slides.css({marginLeft:"",marginTop:""}):x.slides.css({marginRight:"",marginBottom:""});var n;x.params.slidesPerColumn>1&&(n=Math.floor(x.slides.length/x.params.slidesPerColumn)===x.slides.length/x.params.slidesPerColumn?x.slides.length:Math.ceil(x.slides.length/x.params.slidesPerColumn)*x.params.slidesPerColumn,"auto"!==x.params.slidesPerView&&"row"===x.params.slidesPerColumnFill&&(n=Math.max(n,x.params.slidesPerView*x.params.slidesPerColumn)));var o,l=x.params.slidesPerColumn,p=n/l,d=p-(x.params.slidesPerColumn*p-x.slides.length);for(e=0;e<x.slides.length;e++){o=0;var m=x.slides.eq(e);
8482if(x.params.slidesPerColumn>1){var u,c,g;"column"===x.params.slidesPerColumnFill?(c=Math.floor(e/l),g=e-c*l,(c>d||c===d&&g===l-1)&&++g>=l&&(g=0,c++),u=c+g*n/l,m.css({"-webkit-box-ordinal-group":u,"-moz-box-ordinal-group":u,"-ms-flex-order":u,"-webkit-order":u,order:u})):(g=Math.floor(e/p),c=e-g*p),m.css("margin-"+(x.isHorizontal()?"top":"left"),0!==g&&x.params.spaceBetween&&x.params.spaceBetween+"px").attr("data-swiper-column",c).attr("data-swiper-row",g)}"none"!==m.css("display")&&("auto"===x.params.slidesPerView?(o=x.isHorizontal()?m.outerWidth(!0):m.outerHeight(!0),x.params.roundLengths&&(o=r(o))):(o=(x.size-(x.params.slidesPerView-1)*a)/x.params.slidesPerView,x.params.roundLengths&&(o=r(o)),x.isHorizontal()?x.slides[e].style.width=o+"px":x.slides[e].style.height=o+"px"),x.slides[e].swiperSlideSize=o,x.slidesSizesGrid.push(o),x.params.centeredSlides?(t=t+o/2+s/2+a,0===s&&0!==e&&(t=t-x.size/2-a),0===e&&(t=t-x.size/2-a),Math.abs(t)<.001&&(t=0),i%x.params.slidesPerGroup==0&&x.snapGrid.push(t),x.slidesGrid.push(t)):(i%x.params.slidesPerGroup==0&&x.snapGrid.push(t),x.slidesGrid.push(t),t=t+o+a),x.virtualSize+=o+a,s=o,i++)}x.virtualSize=Math.max(x.virtualSize,x.size)+x.params.slidesOffsetAfter;var h;if(x.rtl&&x.wrongRTL&&("slide"===x.params.effect||"coverflow"===x.params.effect)&&x.wrapper.css({width:x.virtualSize+x.params.spaceBetween+"px"}),x.support.flexbox&&!x.params.setWrapperSize||(x.isHorizontal()?x.wrapper.css({width:x.virtualSize+x.params.spaceBetween+"px"}):x.wrapper.css({height:x.virtualSize+x.params.spaceBetween+"px"})),x.params.slidesPerColumn>1&&(x.virtualSize=(o+x.params.spaceBetween)*n,x.virtualSize=Math.ceil(x.virtualSize/x.params.slidesPerColumn)-x.params.spaceBetween,x.isHorizontal()?x.wrapper.css({width:x.virtualSize+x.params.spaceBetween+"px"}):x.wrapper.css({height:x.virtualSize+x.params.spaceBetween+"px"}),x.params.centeredSlides)){for(h=[],e=0;e<x.snapGrid.length;e++)x.snapGrid[e]<x.virtualSize+x.snapGrid[0]&&h.push(x.snapGrid[e]);x.snapGrid=h}if(!x.params.centeredSlides){for(h=[],e=0;e<x.snapGrid.length;e++)x.snapGrid[e]<=x.virtualSize-x.size&&h.push(x.snapGrid[e]);x.snapGrid=h,Math.floor(x.virtualSize-x.size)-Math.floor(x.snapGrid[x.snapGrid.length-1])>1&&x.snapGrid.push(x.virtualSize-x.size)}0===x.snapGrid.length&&(x.snapGrid=[0]),0!==x.params.spaceBetween&&(x.isHorizontal()?x.rtl?x.slides.css({marginLeft:a+"px"}):x.slides.css({marginRight:a+"px"}):x.slides.css({marginBottom:a+"px"})),x.params.watchSlidesProgress&&x.updateSlidesOffset()}},x.updateSlidesOffset=function(){for(var e=0;e<x.slides.length;e++)x.slides[e].swiperSlideOffset=x.isHorizontal()?x.slides[e].offsetLeft:x.slides[e].offsetTop},x.currentSlidesPerView=function(){var e,a,t=1;if(x.params.centeredSlides){var s,r=x.slides[x.activeIndex].swiperSlideSize;for(e=x.activeIndex+1;e<x.slides.length;e++)x.slides[e]&&!s&&(r+=x.slides[e].swiperSlideSize,t++,r>x.size&&(s=!0));for(a=x.activeIndex-1;a>=0;a--)x.slides[a]&&!s&&(r+=x.slides[a].swiperSlideSize,t++,r>x.size&&(s=!0))}else for(e=x.activeIndex+1;e<x.slides.length;e++)x.slidesGrid[e]-x.slidesGrid[x.activeIndex]<x.size&&t++;return t},x.updateSlidesProgress=function(e){if(void 0===e&&(e=x.translate||0),0!==x.slides.length){void 0===x.slides[0].swiperSlideOffset&&x.updateSlidesOffset();var a=-e;x.rtl&&(a=e),x.slides.removeClass(x.params.slideVisibleClass);for(var t=0;t<x.slides.length;t++){var s=x.slides[t],r=(a+(x.params.centeredSlides?x.minTranslate():0)-s.swiperSlideOffset)/(s.swiperSlideSize+x.params.spaceBetween);if(x.params.watchSlidesVisibility){var i=-(a-s.swiperSlideOffset),n=i+x.slidesSizesGrid[t];(i>=0&&i<x.size||n>0&&n<=x.size||i<=0&&n>=x.size)&&x.slides.eq(t).addClass(x.params.slideVisibleClass)}s.progress=x.rtl?-r:r}}},x.updateProgress=function(e){void 0===e&&(e=x.translate||0);var a=x.maxTranslate()-x.minTranslate(),t=x.isBeginning,s=x.isEnd;0===a?(x.progress=0,x.isBeginning=x.isEnd=!0):(x.progress=(e-x.minTranslate())/a,x.isBeginning=x.progress<=0,x.isEnd=x.progress>=1),x.isBeginning&&!t&&x.emit("onReachBeginning",x),x.isEnd&&!s&&x.emit("onReachEnd",x),x.params.watchSlidesProgress&&x.updateSlidesProgress(e),x.emit("onProgress",x,x.progress)},x.updateActiveIndex=function(){var e,a,t,s=x.rtl?x.translate:-x.translate;
8482for(a=0;a<x.slidesGrid.length;a++)void 0!==x.slidesGrid[a+1]?s>=x.slidesGrid[a]&&s<x.slidesGrid[a+1]-(x.slidesGrid[a+1]-x.slidesGrid[a])/2?e=a:s>=x.slidesGrid[a]&&s<x.slidesGrid[a+1]&&(e=a+1):s>=x.slidesGrid[a]&&(e=a);x.params.normalizeSlideIndex&&(e<0||void 0===e)&&(e=0),t=Math.floor(e/x.params.slidesPerGroup),t>=x.snapGrid.length&&(t=x.snapGrid.length-1),e!==x.activeIndex&&(x.snapIndex=t,x.previousIndex=x.activeIndex,x.activeIndex=e,x.updateClasses(),x.updateRealIndex())},x.updateRealIndex=function(){x.realIndex=parseInt(x.slides.eq(x.activeIndex).attr("data-swiper-slide-index")||x.activeIndex,10)},x.updateClasses=function(){x.slides.removeClass(x.params.slideActiveClass+" "+x.params.slideNextClass+" "+x.params.slidePrevClass+" "+x.params.slideDuplicateActiveClass+" "+x.params.slideDuplicateNextClass+" "+x.params.slideDuplicatePrevClass);var a=x.slides.eq(x.activeIndex);a.addClass(x.params.slideActiveClass),s.loop&&(a.hasClass(x.params.slideDuplicateClass)?x.wrapper.children("."+x.params.slideClass+":not(."+x.params.slideDuplicateClass+')[data-swiper-slide-index="'+x.realIndex+'"]').addClass(x.params.slideDuplicateActiveClass):x.wrapper.children("."+x.params.slideClass+"."+x.params.slideDuplicateClass+'[data-swiper-slide-index="'+x.realIndex+'"]').addClass(x.params.slideDuplicateActiveClass));var t=a.next("."+x.params.slideClass).addClass(x.params.slideNextClass);x.params.loop&&0===t.length&&(t=x.slides.eq(0),t.addClass(x.params.slideNextClass));var r=a.prev("."+x.params.slideClass).addClass(x.params.slidePrevClass);if(x.params.loop&&0===r.length&&(r=x.slides.eq(-1),r.addClass(x.params.slidePrevClass)),s.loop&&(t.hasClass(x.params.slideDuplicateClass)?x.wrapper.children("."+x.params.slideClass+":not(."+x.params.slideDuplicateClass+')[data-swiper-slide-index="'+t.attr("data-swiper-slide-index")+'"]').addClass(x.params.slideDuplicateNextClass):x.wrapper.children("."+x.params.slideClass+"."+x.params.slideDuplicateClass+'[data-swiper-slide-index="'+t.attr("data-swiper-slide-index")+'"]').addClass(x.params.slideDuplicateNextClass),r.hasClass(x.params.slideDuplicateClass)?x.wrapper.children("."+x.params.slideClass+":not(."+x.params.slideDuplicateClass+')[data-swiper-slide-index="'+r.attr("data-swiper-slide-index")+'"]').addClass(x.params.slideDuplicatePrevClass):x.wrapper.children("."+x.params.slideClass+"."+x.params.slideDuplicateClass+'[data-swiper-slide-index="'+r.attr("data-swiper-slide-index")+'"]').addClass(x.params.slideDuplicatePrevClass)),x.paginationContainer&&x.paginationContainer.length>0){var i,n=x.params.loop?Math.ceil((x.slides.length-2*x.loopedSlides)/x.params.slidesPerGroup):x.snapGrid.length;if(x.params.loop?(i=Math.ceil((x.activeIndex-x.loopedSlides)/x.params.slidesPerGroup),i>x.slides.length-1-2*x.loopedSlides&&(i-=x.slides.length-2*x.loopedSlides),i>n-1&&(i-=n),i<0&&"bullets"!==x.params.paginationType&&(i=n+i)):i=void 0!==x.snapIndex?x.snapIndex:x.activeIndex||0,"bullets"===x.params.paginationType&&x.bullets&&x.bullets.length>0&&(x.bullets.removeClass(x.params.bulletActiveClass),x.paginationContainer.length>1?x.bullets.each(function(){e(this).index()===i&&e(this).addClass(x.params.bulletActiveClass)}):x.bullets.eq(i).addClass(x.params.bulletActiveClass)),"fraction"===x.params.paginationType&&(x.paginationContainer.find("."+x.params.paginationCurrentClass).text(i+1),x.paginationContainer.find("."+x.params.paginationTotalClass).text(n)),"progress"===x.params.paginationType){var o=(i+1)/n,l=o,p=1;x.isHorizontal()||(p=o,l=1),x.paginationContainer.find("."+x.params.paginationProgressbarClass).transform("translate3d(0,0,0) scaleX("+l+") scaleY("+p+")").transition(x.params.speed)}"custom"===x.params.paginationType&&x.params.paginationCustomRender&&(x.paginationContainer.html(x.params.paginationCustomRender(x,i+1,n)),x.emit("onPaginationRendered",x,x.paginationContainer[0]))}x.params.loop||(x.params.prevButton&&x.prevButton&&x.prevButton.length>0&&(x.isBeginning?(x.prevButton.addClass(x.params.buttonDisabledClass),x.params.a11y&&x.a11y&&x.a11y.disable(x.prevButton)):(x.prevButton.removeClass(x.params.buttonDisabledClass),x.params.a11y&&x.a11y&&x.a11y.enable(x.prevButton))),x.params.nextButton&&x.nextButton&&x.nextButton.length>0&&(x.isEnd?(x.nextButton.addClass(x.params.buttonDisabledClass),x.params.a11y&&x.a11y&&x.a11y.disable(x.nextButton)):(x.nextButton.removeClass(x.params.buttonDisabledClass),x.params.a11y&&x.a11y&&x.a11y.enable(x.nextButton))))},x.updatePagination=function(){if(x.params.pagination&&x.paginationContainer&&x.paginationContainer.length>0){var e="";if("bullets"===x.params.paginationType){for(var a=x.params.loop?Math.
8482ceil((x.slides.length-2*x.loopedSlides)/x.params.slidesPerGroup):x.snapGrid.length,t=0;t<a;t++)e+=x.params.paginationBulletRender?x.params.paginationBulletRender(x,t,x.params.bulletClass):"<"+x.params.paginationElement+' class="'+x.params.bulletClass+'"></'+x.params.paginationElement+">";x.paginationContainer.html(e),x.bullets=x.paginationContainer.find("."+x.params.bulletClass),x.params.paginationClickable&&x.params.a11y&&x.a11y&&x.a11y.initPagination()}"fraction"===x.params.paginationType&&(e=x.params.paginationFractionRender?x.params.paginationFractionRender(x,x.params.paginationCurrentClass,x.params.paginationTotalClass):'<span class="'+x.params.paginationCurrentClass+'"></span> / <span class="'+x.params.paginationTotalClass+'"></span>',x.paginationContainer.html(e)),"progress"===x.params.paginationType&&(e=x.params.paginationProgressRender?x.params.paginationProgressRender(x,x.params.paginationProgressbarClass):'<span class="'+x.params.paginationProgressbarClass+'"></span>',x.paginationContainer.html(e)),"custom"!==x.params.paginationType&&x.emit("onPaginationRendered",x,x.paginationContainer[0])}},x.update=function(e){function a(){x.rtl,x.translate;t=Math.min(Math.max(x.translate,x.maxTranslate()),x.minTranslate()),x.setWrapperTranslate(t),x.updateActiveIndex(),x.updateClasses()}if(x){x.updateContainerSize(),x.updateSlidesSize(),x.updateProgress(),x.updatePagination(),x.updateClasses(),x.params.scrollbar&&x.scrollbar&&x.scrollbar.set();var t;if(e){x.controller&&x.controller.spline&&(x.controller.spline=void 0),x.params.freeMode?(a(),x.params.autoHeight&&x.updateAutoHeight()):(("auto"===x.params.slidesPerView||x.params.slidesPerView>1)&&x.isEnd&&!x.params.centeredSlides?x.slideTo(x.slides.length-1,0,!1,!0):x.slideTo(x.activeIndex,0,!1,!0))||a()}else x.params.autoHeight&&x.updateAutoHeight()}},x.onResize=function(e){x.params.onBeforeResize&&x.params.onBeforeResize(x),x.params.breakpoints&&x.setBreakpoint();var a=x.params.allowSwipeToPrev,t=x.params.allowSwipeToNext;x.params.allowSwipeToPrev=x.params.allowSwipeToNext=!0,x.updateContainerSize(),x.updateSlidesSize(),("auto"===x.params.slidesPerView||x.params.freeMode||e)&&x.updatePagination(),x.params.scrollbar&&x.scrollbar&&x.scrollbar.set(),x.controller&&x.controller.spline&&(x.controller.spline=void 0);var s=!1;if(x.params.freeMode){var r=Math.min(Math.max(x.translate,x.maxTranslate()),x.minTranslate());x.setWrapperTranslate(r),x.updateActiveIndex(),x.updateClasses(),x.params.autoHeight&&x.updateAutoHeight()}else x.updateClasses(),s=("auto"===x.params.slidesPerView||x.params.slidesPerView>1)&&x.isEnd&&!x.params.centeredSlides?x.slideTo(x.slides.length-1,0,!1,!0):x.slideTo(x.activeIndex,0,!1,!0);x.params.lazyLoading&&!s&&x.lazy&&x.lazy.load(),x.params.allowSwipeToPrev=a,x.params.allowSwipeToNext=t,x.params.onAfterResize&&x.params.onAfterResize(x)},x.touchEventsDesktop={start:"mousedown",move:"mousemove",end:"mouseup"},window.navigator.pointerEnabled?x.touchEventsDesktop={start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled&&(x.touchEventsDesktop={start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}),x.touchEvents={start:x.support.touch||!x.params.simulateTouch?"touchstart":x.touchEventsDesktop.start,move:x.support.touch||!x.params.simulateTouch?"touchmove":x.touchEventsDesktop.move,end:x.support.touch||!x.params.simulateTouch?"touchend":x.touchEventsDesktop.end},(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&("container"===x.params.touchEventsTarget?x.container:x.wrapper).addClass("swiper-wp8-"+x.params.direction),x.initEvents=function(e){var a=e?"off":"on",t=e?"removeEventListener":"addEventListener",r="container"===x.params.touchEventsTarget?x.container[0]:x.wrapper[0],i=x.support.touch?r:document,n=!!x.params.nested;if(x.browser.ie)r[t](x.touchEvents.start,x.onTouchStart,!1),i[t](x.touchEvents.move,x.onTouchMove,n),i[t](x.touchEvents.end,x.onTouchEnd,!1);else{if(x.support.touch){var o=!("touchstart"!==x.touchEvents.start||!x.support.passiveListener||!x.params.passiveListeners)&&{passive:!0,capture:!1};r[t](x.touchEvents.start,x.onTouchStart,o),r[t](x.touchEvents.move,x.onTouchMove,n),r[t](x.touchEvents.end,x.onTouchEnd,o)}(s.simulateTouch&&!x.device.ios&&!x.device.android||s.simulateTouch&&!x.support.touch&&x.device.ios)&&(r[t]("mousedown",x.onTouchStart,!1),document[t]("mousemove",x.onTouchMove,n),document[t]("mouseup",x.onTouchEnd,!1))}window[t]("resize",x.onResize),x.params.nextButton&&x.nextButton&&x.nextButton.length>0&&(x.nextButton[a]("click",x.onClickNext),x.params.a11y&&x.a11y&&x.nextButton[a]("keydown",x.a11y.onEnterKey)),x.params.prevButton&&x.prevButton&&x.prevButton.length>0&&(x.prevButton[a]("click",x.onClickPrev),x.params.a11y&&x.a11y&&x.prevButton[a]("keydown",x.a11y.onEnterKey)),x.params.pagination&&x.params.paginationClickable&&(x.paginationContainer[a]("click","."+x.params.bulletClass,x.onClickIndex),x.params.a11y&&x.a11y&&x.paginationContainer[a]("keydown","."+x.params.bulletClass,x.a11y.onEnterKey)),(x.params.preventClicks||x.params.preventClicksPropagation)&&r[t]("click",x.preventClicks,!0)},x.attachEvents=function(){x.initEvents()},x.detachEvents=function(){x.initEvents(!0)},x.allowClick=!0,x.preventClicks=function(e){x.allowClick||(x.params.preventClicks&&e.preventDefault(),x.params.preventClicksPropagation&&x.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))},x.onClickNext=function(e){e.preventDefault(),x.isEnd&&!x.params.loop||x.slideNext()},x.onClickPrev=function(e){e.preventDefault(),x.isBeginning&&!x.params.loop||x.slidePrev()},x.onClickIndex=function(a){a.preventDefault();var t=e(this).index()*x.params.slidesPerGroup
8483;x.params.loop&&(t+=x.loopedSlides),x.slideTo(t)},x.updateClickedSlide=function(a){var t=n(a,"."+x.params.slideClass),s=!1;if(t)for(var r=0;r<x.slides.length;r++)x.slides[r]===t&&(s=!0);if(!t||!s)return x.clickedSlide=void 0,void(x.clickedIndex=void 0);if(x.clickedSlide=t,x.clickedIndex=e(t).index(),x.params.slideToClickedSlide&&void 0!==x.clickedIndex&&x.clickedIndex!==x.activeIndex){var i,o=x.clickedIndex,l="auto"===x.params.slidesPerView?x.currentSlidesPerView():x.params.slidesPerView;if(x.params.loop){if(x.animating)return;i=parseInt(e(x.clickedSlide).attr("data-swiper-slide-index"),10),x.params.centeredSlides?o<x.loopedSlides-l/2||o>x.slides.length-x.loopedSlides+l/2?(x.fixLoop(),o=x.wrapper.children("."+x.params.slideClass+'[data-swiper-slide-index="'+i+'"]:not(.'+x.params.slideDuplicateClass+")").eq(0).index(),setTimeout(function(){x.slideTo(o)},0)):x.slideTo(o):o>x.slides.length-l?(x.fixLoop(),o=x.wrapper.children("."+x.params.slideClass+'[data-swiper-slide-index="'+i+'"]:not(.'+x.params.slideDuplicateClass+")").eq(0).index(),setTimeout(function(){x.slideTo(o)},0)):x.slideTo(o)}else x.slideTo(o)}};var b,C,S,z,M,P,E,I,k,D,L="input, select, textarea, button, video",B=Date.now(),H=[];x.animating=!1,x.touches={startX:0,startY:0,currentX:0,currentY:0,diff:0};var G,X;
8483x.onTouchStart=function(a){if(a.originalEvent&&(a=a.originalEvent),(G="touchstart"===a.type)||!("which"in a)||3!==a.which){if(x.params.noSwiping&&n(a,"."+x.params.noSwipingClass))return void(x.allowClick=!0);if(!x.params.swipeHandler||n(a,x.params.swipeHandler)){var t=x.touches.currentX="touchstart"===a.type?a.targetTouches[0].pageX:a.pageX,s=x.touches.currentY="touchstart"===a.type?a.targetTouches[0].pageY:a.pageY;if(!(x.device.ios&&x.params.iOSEdgeSwipeDetection&&t<=x.params.iOSEdgeSwipeThreshold)){if(b=!0,C=!1,S=!0,M=void 0,X=void 0,x.touches.startX=t,x.touches.startY=s,z=Date.now(),x.allowClick=!0,x.updateContainerSize(),x.swipeDirection=void 0,x.params.threshold>0&&(I=!1),"touchstart"!==a.type){var r=!0;e(a.target).is(L)&&(r=!1),document.activeElement&&e(document.activeElement).is(L)&&document.activeElement.blur(),r&&a.preventDefault()}x.emit("onTouchStart",x,a)}}}},x.onTouchMove=function(a){if(a.originalEvent&&(a=a.originalEvent),!G||"mousemove"!==a.type){if(a.preventedByNestedSwiper)return x.touches.startX="touchmove"===a.type?a.targetTouches[0].pageX:a.pageX,void(x.touches.startY="touchmove"===a.type?a.targetTouches[0].pageY:a.pageY);if(x.params.onlyExternal)return x.allowClick=!1,void(b&&(x.touches.startX=x.touches.currentX="touchmove"===a.type?a.targetTouches[0].pageX:a.pageX,x.touches.startY=x.touches.currentY="touchmove"===a.type?a.targetTouches[0].pageY:a.pageY,z=Date.now()));if(G&&x.params.touchReleaseOnEdges&&!x.params.loop)if(x.isHorizontal()){if(x.touches.currentX<x.touches.startX&&x.translate<=x.maxTranslate()||x.touches.currentX>x.touches.startX&&x.translate>=x.minTranslate())return}else if(x.touches.currentY<x.touches.startY&&x.translate<=x.maxTranslate()||x.touches.currentY>x.touches.startY&&x.translate>=x.minTranslate())return;if(G&&document.activeElement&&a.target===document.activeElement&&e(a.target).is(L))return C=!0,void(x.allowClick=!1);if(S&&x.emit("onTouchMove",x,a),!(a.targetTouches&&a.targetTouches.length>1)){if(x.touches.currentX="touchmove"===a.type?a.targetTouches[0].pageX:a.pageX,x.touches.currentY="touchmove"===a.type?a.targetTouches[0].pageY:a.pageY,void 0===M){var t;x.isHorizontal()&&x.touches.currentY===x.touches.startY||!x.isHorizontal()&&x.touches.currentX===x.touches.startX?M=!1:(t=180*Math.atan2(Math.abs(x.touches.currentY-x.touches.startY),Math.abs(x.touches.currentX-x.touches.startX))/Math.PI,M=x.isHorizontal()?t>x.params.touchAngle:90-t>x.params.touchAngle)}if(M&&x.emit("onTouchMoveOpposite",x,a),void 0===X&&(x.touches.currentX===x.touches.startX&&x.touches.currentY===x.touches.startY||(X=!0)),b){if(M)return void(b=!1);if(X){x.allowClick=!1,x.emit("onSliderMove",x,a),a.preventDefault(),x.params.touchMoveStopPropagation&&!x.params.nested&&a.stopPropagation(),C||(s.loop&&x.fixLoop(),E=x.getWrapperTranslate(),x.setWrapperTransition(0),x.animating&&x.wrapper.trigger("webkitTransitionEnd transitionend oTransitionEnd MSTransitionEnd msTransitionEnd"),x.params.autoplay&&x.autoplaying&&(x.params.autoplayDisableOnInteraction?x.stopAutoplay():x.pauseAutoplay()),D=!1,!x.params.grabCursor||x.params.allowSwipeToNext!==!0&&x.params.allowSwipeToPrev!==!0||x.setGrabCursor(!0)),C=!0;var r=x.touches.diff=x.isHorizontal()?x.touches.currentX-x.touches.startX:x.touches.currentY-x.touches.startY;r*=x.params.touchRatio,x.rtl&&(r=-r),x.swipeDirection=r>0?"prev":"next",P=r+E;var i=!0;if(r>0&&P>x.minTranslate()?(i=!1,x.params.resistance&&(P=x.minTranslate()-1+Math.pow(-x.minTranslate()+E+r,x.params.resistanceRatio))):r<0&&P<x.maxTranslate()&&(i=!1,x.params.resistance&&(P=x.maxTranslate()+1-Math.pow(x.maxTranslate()-E-r,x.params.resistanceRatio))),i&&(a.preventedByNestedSwiper=!0),!x.params.allowSwipeToNext&&"next"===x.swipeDirection&&P<E&&(P=E),!x.params.allowSwipeToPrev&&"prev"===x.swipeDirection&&P>E&&(P=E),x.params.threshold>0){if(!(Math.abs(r)>x.params.threshold||I))return void(P=E);if(!I)return I=!0,x.touches.startX=x.touches.currentX,x.touches.startY=x.touches.currentY,P=E,void(x.touches.diff=x.isHorizontal()?x.touches.currentX-x.touches.startX:x.touches.currentY-x.touches.startY)}x.params.followFinger&&((x.params.freeMode||x.params.watchSlidesProgress)&&x.updateActiveIndex(),x.params.freeMode&&(0===H.length&&H.push({position:x.touches[x.isHorizontal()?"startX":"startY"],time:z}),H.push({position:x.touches[x.isHorizontal()?"currentX":"currentY"],time:(new window.Date).getTime()})),x.updateProgress(P),x.setWrapperTranslate(P))}}}}}
vendor: 10,281 bytes, line 8483
8483,x.onTouchEnd=function(a){if(a.originalEvent&&(a=a.originalEvent),S&&x.emit("onTouchEnd",x,a),S=!1,b){x.params.grabCursor&&C&&b&&(x.params.allowSwipeToNext===!0||x.params.allowSwipeToPrev===!0)&&x.setGrabCursor(!1);var t=Date.now(),s=t-z;if(x.allowClick&&(x.updateClickedSlide(a),x.emit("onTap",x,a),s<300&&t-B>300&&(k&&clearTimeout(k),k=setTimeout(function(){x&&(x.params.paginationHide&&x.paginationContainer.length>0&&!e(a.target).hasClass(x.params.bulletClass)&&x.paginationContainer.toggleClass(x.params.paginationHiddenClass),x.emit("onClick",x,a))},300)),s<300&&t-B<300&&(k&&clearTimeout(k),x.emit("onDoubleTap",x,a))),B=Date.now(),setTimeout(function(){x&&(x.allowClick=!0)},0),!b||!C||!x.swipeDirection||0===x.touches.diff||P===E)return void(b=C=!1);b=C=!1;var r;if(r=x.params.followFinger?x.rtl?x.translate:-x.translate:-P,x.params.freeMode){if(r<-x.minTranslate())return void x.slideTo(x.activeIndex);if(r>-x.maxTranslate())return void(x.slides.length<x.snapGrid.length?x.slideTo(x.snapGrid.length-1):x.slideTo(x.slides.length-1));if(x.params.freeModeMomentum){if(H.length>1){var i=H.pop(),n=H.pop(),o=i.position-n.position,l=i.time-n.time;x.velocity=o/l,x.velocity=x.velocity/2,Math.abs(x.velocity)<x.params.freeModeMinimumVelocity&&(x.velocity=0),(l>150||(new window.Date).getTime()-i.time>300)&&(x.velocity=0)}else x.velocity=0;x.velocity=x.velocity*x.params.freeModeMomentumVelocityRatio,H.length=0;var p=1e3*x.params.freeModeMomentumRatio,d=x.velocity*p,m=x.translate+d;x.rtl&&(m=-m);var u,c=!1,g=20*Math.abs(x.velocity)*x.params.freeModeMomentumBounceRatio;if(m<x.maxTranslate())x.params.freeModeMomentumBounce?(m+x.maxTranslate()<-g&&(m=x.maxTranslate()-g),u=x.maxTranslate(),c=!0,D=!0):m=x.maxTranslate();else if(m>x.minTranslate())x.params.freeModeMomentumBounce?(m-x.minTranslate()>g&&(m=x.minTranslate()+g),u=x.minTranslate(),c=!0,D=!0):m=x.minTranslate();else if(x.params.freeModeSticky){var h,v=0;for(v=0;v<x.snapGrid.length;v+=1)if(x.snapGrid[v]>-m){h=v;break}m=Math.abs(x.snapGrid[h]-m)<Math.abs(x.snapGrid[h-1]-m)||"next"===x.swipeDirection?x.snapGrid[h]:x.snapGrid[h-1],x.rtl||(m=-m)}if(0!==x.velocity)p=x.rtl?Math.abs((-m-x.translate)/x.velocity):Math.abs((m-x.translate)/x.velocity);else if(x.params.freeModeSticky)return void x.slideReset();x.params.freeModeMomentumBounce&&c?(x.updateProgress(u),x.setWrapperTransition(p),x.setWrapperTranslate(m),x.onTransitionStart(),x.animating=!0,x.wrapper.transitionEnd(function(){x&&D&&(x.emit("onMomentumBounce",x),x.setWrapperTransition(x.params.speed),x.setWrapperTranslate(u),x.wrapper.transitionEnd(function(){x&&x.onTransitionEnd()}))})):x.velocity?(x.updateProgress(m),x.setWrapperTransition(p),x.setWrapperTranslate(m),x.onTransitionStart(),x.animating||(x.animating=!0,x.wrapper.transitionEnd(function(){x&&x.onTransitionEnd()}))):x.updateProgress(m),x.updateActiveIndex()}return void((!x.params.freeModeMomentum||s>=x.params.longSwipesMs)&&(x.updateProgress(),x.updateActiveIndex()))}var f,w=0,y=x.slidesSizesGrid[0];for(f=0;f<x.slidesGrid.length;f+=x.params.slidesPerGroup)void 0!==x.slidesGrid[f+x.params.slidesPerGroup]?r>=x.slidesGrid[f]&&r<x.slidesGrid[f+x.params.slidesPerGroup]&&(w=f,y=x.slidesGrid[f+x.params.slidesPerGroup]-x.slidesGrid[f]):r>=x.slidesGrid[f]&&(w=f,y=x.slidesGrid[x.slidesGrid.length-1]-x.slidesGrid[x.slidesGrid.length-2]);var T=(r-x.slidesGrid[w])/y;if(s>x.params.longSwipesMs){if(!x.params.longSwipes)return void x.slideTo(x.activeIndex);"next"===x.swipeDirection&&(T>=x.params.longSwipesRatio?x.slideTo(w+x.params.slidesPerGroup):x.slideTo(w)),"prev"===x.swipeDirection&&(T>1-x.params.longSwipesRatio?x.slideTo(w+x.params.slidesPerGroup):x.slideTo(w))}else{if(!x.params.shortSwipes)return void x.slideTo(x.activeIndex);"next"===x.swipeDirection&&x.slideTo(w+x.params.slidesPerGroup),"prev"===x.swipeDirection&&x.slideTo(w)}}},x._slideTo=function(e,a){return x.slideTo(e,a,!0,!0)},x.slideTo=function(e,a,t,s){void 0===t&&(t=!0),void 0===e&&(e=0),e<0&&(e=0),x.snapIndex=Math.floor(e/x.params.slidesPerGroup),x.snapIndex>=x.snapGrid.length&&(x.snapIndex=x.snapGrid.length-1);var r=-x.snapGrid[x.snapIndex];if(x.params.autoplay&&x.autoplaying&&(s||!x.params.autoplayDisableOnInteraction?x.pauseAutoplay(a):x.stopAutoplay()),x.updateProgress(r),x.params.normalizeSlideIndex)for(var i=0;i<x.slidesGrid.length;i++)-Math.floor(100*r)>=Math.floor(100*x.slidesGrid[i])&&(e=i);return!(!x.params.allowSwipeToNext&&r<x.translate&&r<x.minTranslate())&&(!(!x.params.allowSwipeToPrev&&r>x.translate&&r>x.maxTranslate()&&(x.activeIndex||0)!==e)&&(void 0===a&&(a=x.params.speed),x.previousIndex=x.activeIndex||0,x.activeIndex=e,x.updateRealIndex(),x.rtl&&-r===x.translate||!x.rtl&&r===x.translate?(x.params.autoHeight&&x.updateAutoHeight(),x.updateClasses(),"slide"!==x.params.effect&&x.setWrapperTranslate(r),!1):(x.updateClasses(),x.onTransitionStart(t),0===a||x.browser.lteIE9?(x.setWrapperTranslate(r),x.setWrapperTransition(0),x.onTransitionEnd(t)):(x.setWrapperTranslate(r),x.setWrapperTransition(a),x.animating||(x.animating=!0,x.wrapper.transitionEnd(function(){x&&x.onTransitionEnd(t)}))),!0)))},x.onTransitionStart=function(e){void 0===e&&(e=!0),x.params.autoHeight&&x.updateAutoHeight(),x.lazy&&x.lazy.onTransitionStart(),e&&(x.emit("onTransitionStart",x),x.activeIndex!==x.previousIndex&&(x.emit("onSlideChangeStart",x),x.activeIndex>x.previousIndex?x.emit("onSlideNextStart",x):x.emit("onSlidePrevStart",x)))},x.onTransitionEnd=function(e){x.animating=!1,x.setWrapperTransition(0),void 0===e&&(e=!0),x.lazy&&x.lazy.onTransitionEnd(),e&&(x.emit("onTransitionEnd",x),x.activeIndex!==x.previousIndex&&(x.emit("onSlideChangeEnd",x),x.activeIndex>x.previousIndex?x.emit("onSlideNextEnd",x):x.emit("onSlidePrevEnd",x))),x.params.history&&x.history&&x.history.setHistory(x.params.history,x.activeIndex),x.params.hashnav&&x.hashnav&&x.hashnav.setHash()},x.slideNext=function(e,a,t){if(x.params.loop){if(x.animating)return!1;x.fixLoop();x.container[0].clientLeft;return x.slideTo(x.activeIndex+x.params.slidesPerGroup,a,e,t)}return x.slideTo(x.activeIndex+x.params.slidesPerGroup,a,e,t)},x._slideNext=function(e){return x.slideNext(!0,e,!0)},x.slidePrev=function(e,a,t){if(x.params.loop){if(x.animating)return!1;x.fixLoop();x.container[0].clientLeft;return x.slideTo(x.activeIndex-1,a,e,t)}return x.slideTo(x.activeIndex-1,a,e,t)},x._slidePrev=function(e){return x.slidePrev(!0,e,!0)},x.slideReset=function(e,a,t){return x.slideTo(x.activeIndex,a,e)},x.disableTouchControl=function(){return x.params.onlyExternal=!0,!0},x.enableTouchControl=function(){return x.params.onlyExternal=!1,!0},x.setWrapperTransition=function(e,a){x.wrapper.transition(e),"slide"!==x.params.effect&&x.effects[x.params.effect]&&x.effects[x.params.effect].setTransition(e),x.params.parallax&&x.parallax&&x.parallax.setTransition(e),x.params.scrollbar&&x.scrollbar&&x.scrollbar.setTransition(e),x.params.control&&x.controller&&x.controller.setTransition(e,a),x.emit("onSetTransition",x,e)},x.setWrapperTranslate=function(e,a,t){var s=0,i=0;x.isHorizontal()?s=x.rtl?-e:e:i=e,x.params.roundLengths&&(s=r(s),i=r(i)),x.params.virtualTranslate||(x.support.transforms3d?x.wrapper.transform("translate3d("+s+"px, "+i+"px, 0px)"):x.wrapper.transform("translate("+s+"px, "+i+"px)")),x.translate=x.isHorizontal()?s:i;var n,o=x.maxTranslate()-x.minTranslate();n=0===o?0:(e-x.minTranslate())/o,n!==x.progress&&x.updateProgress(e),a&&x.updateActiveIndex(),"slide"!==x.params.effect&&x.effects[x.params.effect]&&x.effects[x.params.effect].setTranslate(x.translate),x.params.parallax&&x.parallax&&x.parallax.setTranslate(x.translate),x.params.scrollbar&&x.scrollbar&&x.scrollbar.setTranslate(x.translate),x.params.control&&x.controller&&x.controller.setTranslate(x.translate,t),x.emit("onSetTranslate",x,x.translate)},x.getTranslate=function(e,a){var t,s,r,i;return void 0===a&&(a="x"),x.params.virtualTranslate?x.rtl?-x.translate:x.translate:(r=window.getComputedStyle(e,null),window.WebKitCSSMatrix?(s=r.transform||r.webkitTransform,s.split(",").length>6&&(s=s.split(", ").map(function(e){return e.replace(",",".")}).join(", ")),i=new window.WebKitCSSMatrix("none"===s?"":s)):(i=r.MozTransform||r.OTransform||r.MsTransform||r.msTransform||r.transform||r.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),t=i.toString().split(",")),"x"===a&&(s=window.WebKitCSSMatrix?i.m41:16===t.length?parseFloat(t[12]):parseFloat(t[4])),"y"===a&&(s=window.WebKitCSSMatrix?i.m42:16===t.length?parseFloat(t[13]):parseFloat(t[5])),x.rtl&&s&&(s=-s),s||0)},x.getWrapperTranslate=function(e){return void 0===e&&(e=x.isHorizontal()?"x":"y"),x.getTranslate(x.wrapper[0],e)},x.observers=[],x.initObservers=function(){if(x.params.observeParents)for(var e=x.container.parents(),a=0;a<e.length;a++)o(e[a]);o(x.container[0],{childList:!1}),o(x.wrapper[0],{attributes:!1})},x.disconnectObservers=function(){for(var e=0;e<x.observers.length;e++)x.observers[e].disconnect();x.observers=[]},x.createLoop=function(){x.wrapper.children("."+x.params.slideClass+"."+x.params.slideDuplicateClass).remove();var a=x.wrapper.children("."+x.params.slideClass);"auto"!==x.params.slidesPerView||x.params.loopedSlides||(x.params.loopedSlides=a.length),x.loopedSlides=parseInt(x.params.loopedSlides||x.params.slidesPerView,10),x.loopedSlides=x.loopedSlides+x.params.loopAdditionalSlides,x.loopedSlides>a.length&&(x.loopedSlides=a.length);var t,s=[],r=[];for(a.each(function(t,i){var n=e(this);t<x.loopedSlides&&r.push(i),t<a.length&&t>=a.length-x.loopedSlides&&s.push(i),n.attr("data-swiper-slide-index",t)}),t=0;t<r.length;t++)x.wrapper.append(e(r[t].cloneNode(!0)).addClass(x.params.slideDuplicateClass));for(t=s.length-1;t>=0;t--)x.wrapper.prepend(e(s[t].cloneNode(!0)).addClass(x.params.slideDuplicateClass))},x.destroyLoop=function(){x.wrapper.children("."+x.params.slideClass+"."+x.params.slideDuplicateClass).remove(),x.slides.removeAttr("data-swiper-slide-index")},x.reLoop=function(e){var a=x.activeIndex-x.loopedSlides;x.destroyLoop(),x.createLoop(),x.updateSlidesSize(),e&&x.slideTo(a+x.loopedSlides,0,!1)},x.fixLoop=function(){var e;x.activeIndex<x.loopedSlides?(e=x.slides.length-3*x.loopedSlides+x.activeIndex,e+=x.loopedSlides,x.slideTo(e,0,!1,!0)):("auto"===x.params.slidesPerView&&x.activeIndex>=2*x.loopedSlides||x.activeIndex>
8483x.slides.length-2*x.params.slidesPerView)&&(e=-x.slides.length+x.activeIndex+x.loopedSlides,e+=x.loopedSlides,x.slideTo(e,0,!1,!0))},x.appendSlide=function(e){if(x.params.loop&&x.destroyLoop(),"object"==typeof e&&e.length)for(var a=0;a<e.length;a++)e[a]&&x.wrapper.append(e[a]);else x.wrapper.append(e);x.params.loop&&x.createLoop(),x.params.observer&&x.support.observer||x.update(!0)},x.prependSlide=function(e){x.params.loop&&x.destroyLoop();var a=x.activeIndex+1;if("object"==typeof e&&e.length){for(var t=0;t<e.length;t++)e[t]&&x.wrapper.prepend(e[t]);a=x.activeIndex+e.length}else x.wrapper.prepend(e);x.params.loop&&x.createLoop(),x.params.observer&&x.support.observer||x.update(!0),x.slideTo(a,0,!1)},x.removeSlide=function(e){x.params.loop&&(x.destroyLoop(),x.slides=x.wrapper.children("."+x.params.slideClass));var a,t=x.activeIndex;if("object"==typeof e&&e.length){for(var s=0;s<e.length;s++)a=e[s],x.slides[a]&&x.slides.eq(a).remove(),a<t&&t--;t=Math.max(t,0)}else a=e,x.slides[a]&&x.slides.eq(a).remove(),a<t&&t--,t=Math.max(t,0);x.params.loop&&x.createLoop(),x.params.observer&&x.support.observer||x.update(!0),x.params.loop?x.slideTo(t+x.loopedSlides,0,!1):x.slideTo(t,0,!1)},x.removeAllSlides=function(){for(var e=[],a=0;a<x.slides.length;a++)e.push(a);x.removeSlide(e)},x.effects={fade:{setTranslate:function(){for(var e=0;e<x.slides.length;e++){var a=x.slides.eq(e),t=a[0].swiperSlideOffset,s=-t;x.params.virtualTranslate||(s-=x.translate);var r=0;x.isHorizontal()||(r=s,s=0);var i=x.params.fade.crossFade?Math.max(1-Math.abs(a[0].progress),0):1+Math.min(Math.max(a[0].progress,-1),0);a.css({opacity:i}).transform("translate3d("+s+"px, "+r+"px, 0px)")}},setTransition:function(e){if(x.slides.transition(e),x.params.virtualTranslate&&0!==e){var a=!1;x.slides.transitionEnd(function(){if(!a&&x){a=!0,x.animating=!1;for(var e=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"],t=0;t<e.length;t++)x.wrapper.trigger(e[t])}})}}},flip:{setTranslate:function(){for(var a=0;a<x.slides.length;a++){var t=x.slides.eq(a),s=t[0].progress;x.params.flip.limitRotation&&(s=Math.max(Math.min(t[0].progress,1),-1));var r=t[0].swiperSlideOffset,i=-180*s,n=i,o=0,l=-r,p=0;if(x.isHorizontal()?x.rtl&&(n=-n):(p=l,l=0,o=-n,n=0),t[0].style.zIndex=-Math.abs(Math.round(s))+x.slides.length,x.params.flip.slideShadows){var d=x.isHorizontal()?t.find(".swiper-slide-shadow-left"):t.find(".swiper-slide-shadow-top"),m=x.isHorizontal()?t.find(".swiper-slide-shadow-right"):t.find(".swiper-slide-shadow-bottom");0===d.length&&(d=e('<div class="swiper-slide-shadow-'+(x.isHorizontal()?"left":"top")+'"></div>'),t.append(d)),0===m.length&&(m=e('<div class="swiper-slide-shadow-'+(x.isHorizontal()?"right":"bottom")+'"></div>'),t.append(m)),d.length&&(d[0].style.opacity=Math.max(-s,0)),m.length&&(m[0].style.opacity=Math.max(s,0))}t.transform("translate3d("+l+"px, "+p+"px, 0px) rotateX("+o+"deg) rotateY("+n+"deg)")}},setTransition:function(a){if(x.slides.transition(a).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(a),x.params.virtualTranslate&&0!==a){var t=!1;x.slides.eq(x.activeIndex).transitionEnd(function(){if(!t&&x&&e(this).hasClass(x.params.slideActiveClass)){t=!0,x.animating=!1;for(var a=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"],s=0;s<a.length;s++)x.wrapper.trigger(a[s])}})}}},cube:{setTranslate:function(){var a,t=0;x.params.cube.shadow&&(x.isHorizontal()?(a=x.wrapper.find(".swiper-cube-shadow"),0===a.length&&(a=e('<div class="swiper-cube-shadow"></div>'),x.wrapper.append(a)),a.css({height:x.width+"px"})):(a=x.container.find(".swiper-cube-shadow"),0===a.length&&(a=e('<div class="swiper-cube-shadow"></div>'),x.container.append(a))));for(var s=0;s<x.slides.length;s++){var r=x.slides.eq(s),i=90*s,n=Math.floor(i/360);x.rtl&&(i=-i,n=Math.floor(-i/360));var o=Math.max(Math.min(r[0].progress,1),-1),l=0,p=0,d=0;s%4==0?(l=4*-n*x.size,d=0):(s-1)%4==0?(l=0,d=4*-n*x.size):(s-2)%4==0?(l=x.size+4*n*x.size,d=x.size):(s-3)%4==0&&(l=-x.size,d=3*x.size+4*x.size*n),x.rtl&&(l=-l),x.isHorizontal()||(p=l,l=0);var m="rotateX("+(x.isHorizontal()?0:-i)+"deg) rotateY("+(x.isHorizontal()?i:0)+"deg) translate3d("+l+"px, "+p+"px, "+d+"px)";if(o<=1&&o>
8483-1&&(t=90*s+90*o,x.rtl&&(t=90*-s-90*o)),r.transform(m),x.params.cube.slideShadows){var u=x.isHorizontal()?r.find(".swiper-slide-shadow-left"):r.find(".swiper-slide-shadow-top"),c=x.isHorizontal()?r.find(".swiper-slide-shadow-right"):r.find(".swiper-slide-shadow-bottom");0===u.length&&(u=e('<div class="swiper-slide-shadow-'+(x.isHorizontal()?"left":"top")+'"></div>'),r.append(u)),0===c.length&&(c=e('<div class="swiper-slide-shadow-'+(x.isHorizontal()?"right":"bottom")+'"></div>'),r.append(c)),u.length&&(u[0].style.opacity=Math.max(-o,0)),c.length&&(c[0].style.opacity=Math.max(o,0))}}if(x.wrapper.css({"-webkit-transform-origin":"50% 50% -"+x.size/2+"px","-moz-transform-origin":"50% 50% -"+x.size/2+"px","-ms-transform-origin":"50% 50% -"+x.size/2+"px","transform-origin":"50% 50% -"+x.size/2+"px"}),x.params.cube.shadow)if(x.isHorizontal())a.transform("translate3d(0px, "+(x.width/2+x.params.cube.shadowOffset)+"px, "+-x.width/2+"px) rotateX(90deg) rotateZ(0deg) scale("+x.params.cube.shadowScale+")");else{var g=Math.abs(t)-90*Math.floor(Math.abs(t)/90),h=1.5-(Math.sin(2*g*Math.PI/360)/2+Math.cos(2*g*Math.PI/360)/2),v=x.params.cube.shadowScale,f=x.params.cube.shadowScale/h,w=x.params.cube.shadowOffset;a.transform("scale3d("+v+", 1, "+f+") translate3d(0px, "+(x.height/2+w)+"px, "+-x.height/2/f+"px) rotateX(-90deg)")}var y=x.isSafari||x.isUiWebView?-x.size/2:0;x.wrapper.transform("translate3d(0px,0,"+y+"px) rotateX("+(x.isHorizontal()?0:t)+"deg) rotateY("+(x.isHorizontal()?-t:0)+"deg)")},setTransition:function(e){x.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),x.params.cube.shadow&&!x.isHorizontal()&&x.container.find(".swiper-cube-shadow").transition(e)}},coverflow:{setTranslate:function(){for(var a=x.translate,t=x.isHorizontal()?-a+x.width/2:-a+x.height/2,s=x.isHorizontal()?x.params.coverflow.rotate:-x.params.coverflow.rotate,r=x.params.coverflow.depth,i=0,n=x.slides.length;i<n;i++){var o=x.slides.eq(i),l=x.slidesSizesGrid[i],p=o[0].swiperSlideOffset,d=(t-p-l/2)/l*x.params.coverflow.modifier,m=x.isHorizontal()?s*d:0,u=x.isHorizontal()?0:s*d,c=-r*Math.abs(d),g=x.isHorizontal()?0:x.params.coverflow.stretch*d,h=x.isHorizontal()?x.params.coverflow.stretch*d:0;Math.abs(h)<.001&&(h=0),Math.abs(g)<.001&&(g=0),Math.abs(c)<.001&&(c=0),Math.abs(m)<.001&&(m=0),Math.abs(u)<.001&&(u=0);var v="translate3d("+h+"px,"+g+"px,"+c+"px)  rotateX("+u+"deg) rotateY("+m+"deg)";if(o.transform(v),o[0].style.zIndex=1-Math.abs(Math.round(d)),x.params.coverflow.slideShadows){var f=x.isHorizontal()?o.find(".swiper-slide-shadow-left"):o.find(".swiper-slide-shadow-top"),w=x.isHorizontal()?o.find(".swiper-slide-shadow-right"):o.find(".swiper-slide-shadow-bottom");0===f.length&&(f=e('<div class="swiper-slide-shadow-'+(x.isHorizontal()?"left":"top")+'"></div>'),o.append(f)),0===w.length&&(w=e('<div class="swiper-slide-shadow-'+(x.isHorizontal()?"right":"bottom")+'"></div>'),o.append(w)),f.length&&(f[0].style.opacity=d>0?d:0),w.length&&(w[0].style.opacity=-d>0?-d:0)}}if(x.browser.ie){x.wrapper[0].style.perspectiveOrigin=t+"px 50%"}},setTransition:function(e){x.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e)}}},x.lazy={initialImageLoaded:!1,loadImageInSlide:function(a,t){if(void 0!==a&&(void 0===t&&(t=!0),0!==x.slides.length)){var s=x.slides.eq(a),r=s.find("."+x.params.lazyLoadingClass+":not(."+x.params.lazyStatusLoadedClass+"):not(."+x.params.lazyStatusLoadingClass+")");!s.hasClass(x.params.lazyLoadingClass)||s.hasClass(x.params.lazyStatusLoadedClass)||s.hasClass(x.params.lazyStatusLoadingClass)||(r=r.add(s[0])),0!==r.length&&r.each(function(){var a=e(this);a.addClass(x.params.lazyStatusLoadingClass);var r=a.attr("data-background"),i=a.attr("data-src"),n=a.attr("data-srcset"),o=a.attr("data-sizes");x.loadImage(a[0],i||r,n,o,!1,function(){if(void 0!==x&&null!==x&&x){if(r?(a.css("background-image",'url("'+r+'")'),a.removeAttr("data-background")):(n&&(a.attr("srcset",n
8483),a.removeAttr("data-srcset")),o&&(a.attr("sizes",o),a.removeAttr("data-sizes")),i&&(a.attr("src",i),a.removeAttr("data-src"))),a.addClass(x.params.lazyStatusLoadedClass).removeClass(x.params.lazyStatusLoadingClass),s.find("."+x.params.lazyPreloaderClass+", ."+x.params.preloaderClass).remove(),x.params.loop&&t){var e=s.attr("data-swiper-slide-index");if(s.hasClass(x.params.slideDuplicateClass)){var l=x.wrapper.children('[data-swiper-slide-index="'+e+'"]:not(.'+x.params.slideDuplicateClass+")");x.lazy.loadImageInSlide(l.index(),!1)}else{var p=x.wrapper.children("."+x.params.slideDuplicateClass+'[data-swiper-slide-index="'+e+'"]');x.lazy.loadImageInSlide(p.index(),!1)}}x.emit("onLazyImageReady",x,s[0],a[0])}}),x.emit("onLazyImageLoad",x,s[0],a[0])})}},load:function(){var a,t=x.params.slidesPerView;if("auto"===t&&(t=0),x.lazy.initialImageLoaded||(x.lazy.initialImageLoaded=!0),x.params.watchSlidesVisibility)x.wrapper.children("."+x.params.slideVisibleClass).each(function(){x.lazy.loadImageInSlide(e(this).index())});else if(t>1)for(a=x.activeIndex;a<x.activeIndex+t;a++)x.slides[a]&&x.lazy.loadImageInSlide(a);else x.lazy.loadImageInSlide(x.activeIndex);if(x.params.lazyLoadingInPrevNext)if(t>1||x.params.lazyLoadingInPrevNextAmount&&x.params.lazyLoadingInPrevNextAmount>1){var s=x.params.lazyLoadingInPrevNextAmount,r=t,i=Math.min(x.activeIndex+r+Math.max(s,r),x.slides.length),n=Math.max(x.activeIndex-Math.max(r,s),0);for(a=x.activeIndex+t;a<i;a++)x.slides[a]&&x.lazy.loadImageInSlide(a);for(a=n;a<x.activeIndex;a++)x.slides[a]&&x.lazy.loadImageInSlide(a)}else{var o=x.wrapper.children("."+x.params.slideNextClass);o.length>0&&x.lazy.loadImageInSlide(o.index());var l=x.wrapper.children("."+x.params.slidePrevClass);l.length>0&&x.lazy.loadImageInSlide(l.index())}},onTransitionStart:function(){x.params.lazyLoading&&(x.params.lazyLoadingOnTransitionStart||!x.params.lazyLoadingOnTransitionStart&&!x.lazy.initialImageLoaded)&&x.lazy.load()},onTransitionEnd:function(){x.params.lazyLoading&&!x.params.lazyLoadingOnTransitionStart&&x.lazy.load()}},x.scrollbar={isTouched:!1,setDragPosition:function(e){var a=x.scrollbar,t=x.isHorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageX:e.pageX||e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageY:e.pageY||e.clientY,s=t-a.track.offset()[x.isHorizontal()?"left":"top"]-a.dragSize/2,r=-x.minTranslate()*a.moveDivider,i=-x.maxTranslate()*a.moveDivider;s<r?s=r:s>i&&(s=i),s=-s/a.moveDivider,x.updateProgress(s),x.setWrapperTranslate(s,!0)},dragStart:function(e){var a=x.scrollbar;a.isTouched=!0,e.preventDefault(),e.stopPropagation(),a.setDragPosition(e),clearTimeout(a.dragTimeout),a.track.transition(0),x.params.scrollbarHide&&a.track.css("opacity",1),x.wrapper.transition(100),a.drag.transition(100),x.emit("onScrollbarDragStart",x)},dragMove:function(e){var a=x.scrollbar;a.isTouched&&(e.preventDefault?e.preventDefault():e.returnValue=!1,a.setDragPosition(e),x.wrapper.transition(0),a.track.transition(0),a.drag.transition(0),x.emit("onScrollbarDragMove",x))},dragEnd:function(e){var a=x.scrollbar;a.isTouched&&(a.isTouched=!1,x.params.scrollbarHide&&(clearTimeout(a.dragTimeout),a.dragTimeout=setTimeout(function(){a.track.css("opacity",0),a.track.transition(400)},1e3)),x.emit("onScrollbarDragEnd",x),x.params.scrollbarSnapOnRelease&&x.slideReset())},draggableEvents:function(){return x.params.simulateTouch!==!1||x.support.touch?x.touchEvents:x.touchEventsDesktop}(),enableDraggable:function(){var a=x.scrollbar,t=x.support.touch?a.track:document;e(a.track).on(a.draggableEvents.start,a.dragStart),e(t).on(a.draggableEvents.move,a.dragMove),e(t).on(a.draggableEvents.end,a.dragEnd)},disableDraggable:function(){var a=x.scrollbar,t=x.support.touch?a.track:document;e(a.track).off(a.draggableEvents.start,a.dragStart),e(t).off(a.draggableEvents.move,a.dragMove),e(t).off(a.draggableEvents.end,a.dragEnd)},set:function(){if(x.params.scrollbar){var a=x.scrollbar;a.track=e(x.params.scrollbar),x.params.uniqueNavElements&&"string"==typeof x.params.scrollbar&&a.track.length>1&&1===x.container.find(x.params.scrollbar).length&&(a.track=x.container.find(x.params.scrollbar)),a.drag=a.track.find(".swiper-scrollbar-drag"),0===a.drag.length&&(a.drag=e('<div class="swiper-scrollbar-drag"></div>'),a.track.append(a.drag)),a.drag[0].style.width="",a.drag[0].style.height="",a.trackSize=x.isHorizontal()?a.track[0].offsetWidth:a.track[0].offsetHeight,a.divider=x.size/x.virtualSize,a.moveDivider=a.divider*(a.trackSize/x.size),a.dragSize=a.trackSize*a.divider,x.isHorizontal()?a.drag[0].style.width=a.dragSize+"px":a.drag[0].style.height=a.dragSize+"px",a.divider>=1?a.track[0].style.display="none":a.track[0].style.display="",x.params.scrollbarHide&&(a.track[0].style.opacity=0)}},setTranslate:function(){if(x.params.scrollbar){var e,a=x.scrollbar,t=(x.translate,a.dragSize);e=(a.trackSize-a.dragSize)*x.progress,x.rtl&&x.isHorizontal()?(e=-e,e>0?(t=a.dragSize-e,e=0):-e+a.dragSize>a.trackSize&&(t=a.trackSize+e)):e<0?(t=a.dragSize+e,e=0):e+a.dragSize>a.trackSize&&(t=a.trackSize-e),x.isHorizontal()?(x.support.transforms3d?a.drag.transform("translate3d("+e+"px, 0, 0)"):a.drag.transform("translateX("+e+"px)"),a.drag[0].style.width=t+"px"):(x.support.transforms3d?a.drag.transform("translate3d(0px, "+e+"px, 0)"):a.drag.transform("translateY("+e+"px)"),a.drag[0].style.height=t+"px"),x.params.scrollbarHide&&(clearTimeout(a.timeout),a.track[0].style.opacity=1,a.timeout=setTimeout(function(){a.track[0].style.opacity=0,a.track.transition(400)},1e3))}},setTransition:function(e){x.params.scrollbar&&x.scrollbar.drag.transition(e)}},x.controller={LinearSpline:function(e,a){var t=function(){var e,a,t;return function(s,r){for(a=-1,e=s.length;e-a>1;)s[t=e+a>>1]<=r?a=t:e=t;return e}}();this.x=e,this.y=a,this.lastIndex=e.length-1;var s,r;this.x.length;this.interpolate=function(e){return e?(r=t(this.x,e),s=r-1,(e-this.x[s])*(this.y[r]-this.y[s])/(this.x[r]-this.x[s])+this.y[s]):0}},getInterpolateFunction:function(e){x.controller.spline||(x.controller.spline=x.params.loop?new x.controller.LinearSpline(x.slidesGrid,e.slidesGrid):new x.controller.LinearSpline(x.snapGrid,e.snapGrid))},setTranslate:function(e,t){function s(a){e=a.rtl&&"horizontal"===a.params.direction?-x.translate:x.translate,"slide"===x.params.controlBy&&(x.controller.getInterpolateFunction(a),i=-x.controller.spline.interpolate(-e)),i&&"container"!==x.params.controlBy||(r=(a.maxTranslate()-a.minTranslate())/(x.maxTranslate()-x.minTranslate()),i=(e-x.minTranslate())*r+a.minTranslate()),x.params.controlInverse&&(i=a.maxTranslate()-i),a.updateProgress(i),a.setWrapperTranslate(i,!1,x),a.updateActiveIndex()}var r,i,n=x.params.control;if(Array.isArray(n))for(var o=0;o<n.length;o++)n[o]!==t&&n[o]instanceof a&&s(n[o]);else n instanceof a&&t!==n&&s(n)},setTransition:function(e,t){function s(a){a.setWrapperTransition(e,x),0!==e&&(a.onTransitionStart(),a.wrapper.transitionEnd(function(){i&&(a.params.loop&&"slide"===x.params.controlBy&&a.fixLoop(),a.onTransitionEnd())}))}var r,i=x.params.control;if(Array.isArray(i))for(r=0;r<i.length;r++)i[r]!==t&&i[r]instanceof a&&s(i[r]);else i instanceof a&&t!==i&&s(i)}},x.hashnav={onHashCange:function(e,a){var t=document.location.hash.replace("#","");t!==x.slides.eq(x.activeIndex).attr("data-hash")&&x.slideTo(x.wrapper.children("."+x.params.slideClass+'[data-hash="'+t+'"]').index())},attachEvents:function(a){var t=a?"off":"on";e(window)[t]("hashchange",x.hashnav.onHashCange)},setHash:function(){
8484if(x.hashnav.initialized&&x.params.hashnav)if(x.params.replaceState&&window.history&&window.history.replaceState)window.history.replaceState(null,null,"#"+x.slides.eq(x.activeIndex).attr("data-hash")||"");else{var e=x.slides.eq(x.activeIndex),a=e.attr("data-hash")||e.attr("data-history");document.location.hash=a||""}},init:function(){if(x.params.hashnav&&!x.params.history){x.hashnav.initialized=!0;var e=document.location.hash.replace("#","");if(e)for(var a=0,t=x.slides.length;a<t;a++){var s=x.slides.eq(a),r=s.attr("data-hash")||s.attr("data-history");if(r===e&&!s.hasClass(x.params.slideDuplicateClass)){var i=s.index();x.slideTo(i,0,x.params.runCallbacksOnInit,!0)}}x.params.hashnavWatchState&&x.hashnav.attachEvents()}},destroy:function(){x.params.hashnavWatchState&&x.hashnav.attachEvents(!0)}},x.history={init:function(){if(x.params.history){if(!window.history||
8484!window.history.pushState)return x.params.history=!1,void(x.params.hashnav=!0);x.history.initialized=!0,this.paths=this.getPathValues(),(this.paths.key||this.paths.value)&&(this.scrollToSlide(0,this.paths.value,x.params.runCallbacksOnInit),x.params.replaceState||window.addEventListener("popstate",this.setHistoryPopState))}},setHistoryPopState:function(){x.history.paths=x.history.getPathValues(),x.history.scrollToSlide(x.params.speed,x.history.paths.value,!1)},getPathValues:function(){var e=window.location.pathname.slice(1).split("/"),a=e.length;return{key:e[a-2],value:e[a-1]}},setHistory:function(e,a){if(x.history.initialized&&x.params.history){var t=x.slides.eq(a),s=this.slugify(t.attr("data-history"));window.location.pathname.includes(e)||(s=e+"/"+s),x.params.replaceState?window.history.replaceState(null,null,s):window.history.pushState(null,null,s)}},slugify:function(e){return e.toString().toLowerCase().replace(/\s+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-").replace(/^-+/,"").replace(/-+$/,"")},scrollToSlide:function(e,a,t){if(a)for(var s=0,r=x.slides.length;s<r;s++){var i=x.slides.eq(s),n=this.slugify(i.attr("data-history"));if(n===a&&!i.hasClass(x.params.slideDuplicateClass)){var o=i.index();x.slideTo(o,e,t)}}else x.slideTo(0,e,t)}},x.disableKeyboardControl=function(){x.params.keyboardControl=!1,e(document).off("keydown",l)},x.enableKeyboardControl=function(){x.params.keyboardControl=!0,e(document).on("keydown",l)},x.mousewheel={event:!1,lastScrollTime:(new window.Date).getTime()},x.params.mousewheelControl&&(x.mousewheel.event=navigator.userAgent.indexOf("firefox")>-1?"DOMMouseScroll":function(){var e="onwheel"in document;if(!e){var a=document.createElement("div");a.setAttribute("onwheel","return;"),e="function"==typeof a.onwheel}return!e&&document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0&&(e=document.implementation.hasFeature("Events.wheel","3.0")),e}()?"wheel":"mousewheel"),x.disableMousewheelControl=function(){if(!x.mousewheel.event)return!1;var a=x.container;return"container"!==x.params.mousewheelEventsTarged&&(a=e(x.params.mousewheelEventsTarged)),a.off(x.mousewheel.event,d),x.params.mousewheelControl=!1,!0},x.enableMousewheelControl=function(){if(!x.mousewheel.event)return!1;var a=x.container;return"container"!==x.params.mousewheelEventsTarged&&(a=e(x.params.mousewheelEventsTarged)),a.on(x.mousewheel.event,d),x.params.mousewheelControl=!0,!0},x.parallax={setTranslate:function(){x.container.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){m(this,x.progress)}),x.slides.each(function(){var a=e(this);a.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){m(this,Math.min(Math.max(a[0].progress,-1),1))})})},setTransition:function(a){void 0===a&&(a=x.params.speed),x.container.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){var t=e(this),s=parseInt(t.attr("data-swiper-parallax-duration"),10)||a;0===a&&(s=0),t.transition(s)})}},x.zoom={scale:1,currentScale:1,isScaling:!1,gesture:{slide:void 0,slideWidth:void 0,slideHeight:void 0,image:void 0,imageWrap:void 0,zoomMax:x.params.zoomMax},image:{isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},velocity:{x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0},getDistanceBetweenTouches:function(e){if(e.targetTouches.length<2)return 1;var a=e.targetTouches[0].pageX,t=e.targetTouches[0].pageY,s=e.targetTouches[1].pageX,r=e.targetTouches[1].pageY;return Math.sqrt(Math.pow(s-a,2)+Math.pow(r-t,2))},onGestureStart:function(a){var t=x.zoom;if(!x.support.gestures){if("touchstart"!==a.type||"touchstart"===a.type&&a.targetTouches.length<2)return;t.gesture.scaleStart=t.getDistanceBetweenTouches(a)}if(!(t.gesture.slide&&t.gesture.slide.length||(t.gesture.slide=e(this),0===t.gesture.slide.length&&(t.gesture.slide=x.slides.eq(x.activeIndex)),t.gesture.image=t.gesture.slide.find("img, svg, canvas"),t.gesture.imageWrap=t.gesture.image.parent("."+x.params.zoomContainerClass),t.gesture.zoomMax=t.gesture.imageWrap.attr("data-swiper-zoom")||x.params.zoomMax,0!==t.gesture.imageWrap.length)))return void(t.gesture.image=void 0);t.gesture.image.transition(0),t.isScaling=!0},onGestureChange:function(e){var a=x.zoom;if(!x.support.gestures){if("touchmove"!==e.type||"touchmove"===e.type&&e.targetTouches.length<2)return;a.gesture.scaleMove=a.getDistanceBetweenTouches(e)}a.gesture.image&&0!==a.gesture.image.length&&(x.support.gestures?a.scale=e.scale*a.currentScale:a.scale=a.gesture.scaleMove/a.gesture.scaleStart*a.currentScale,a.scale>a.gesture.zoomMax&&(a.scale=a.gesture.zoomMax-1+Math.pow(a.scale-a.gesture.zoomMax+1,.5)),a.scale<x.params.zoomMin&&(a.scale=x.params.zoomMin+1-Math.pow(x.params.zoomMin-a.scale+1,.5)),a.gesture.image.transform("translate3d(0,
84840,0) scale("+a.scale+")"))},onGestureEnd:function(e){var a=x.zoom;!x.support.gestures&&("touchend"!==e.type||"touchend"===e.type&&e.changedTouches.length<2)||a.gesture.image&&0!==a.gesture.image.length&&(a.scale=Math.max(Math.min(a.scale,a.gesture.zoomMax),x.params.zoomMin),a.gesture.image.transition(x.params.speed).transform("translate3d(0,0,0) scale("+a.scale+")"),a.currentScale=a.scale,a.isScaling=!1,1===a.scale&&(a.gesture.slide=void 0))},onTouchStart:function(e,a){var t=e.zoom;t.gesture.image&&0!==t.gesture.image.length&&(t.image.isTouched||("android"===e.device.os&&a.preventDefault(),t.image.isTouched=!0,t.image.touchesStart.x="touchstart"===a.type?a.targetTouches[0].pageX:a.pageX,t.image.touchesStart.y="touchstart"===a.type?a.targetTouches[0].pageY:a.pageY))},onTouchMove:function(e){var a=x.zoom;if(a.gesture.image&&0!==a.gesture.image.length&&(x.allowClick=!1,a.image.isTouched&&a.gesture.slide)){a.image.isMoved||(a.image.width=a.gesture.image[0].offsetWidth,a.image.height=a.gesture.image[0].offsetHeight,a.image.startX=x.getTranslate(a.gesture.imageWrap[0],"x")||0,a.image.startY=x.getTranslate(a.gesture.imageWrap[0],"
8484y")||0,a.gesture.slideWidth=a.gesture.slide[0].offsetWidth,a.gesture.slideHeight=a.gesture.slide[0].offsetHeight,a.gesture.imageWrap.transition(0),x.rtl&&(a.image.startX=-a.image.startX),x.rtl&&(a.image.startY=-a.image.startY));var t=a.image.width*a.scale,s=a.image.height*a.scale;if(!(t<a.gesture.slideWidth&&s<a.gesture.slideHeight)){if(a.image.minX=Math.min(a.gesture.slideWidth/2-t/2,0),a.image.maxX=-a.image.minX,a.image.minY=Math.min(a.gesture.slideHeight/2-s/2,0),a.image.maxY=-a.image.minY,a.image.touchesCurrent.x="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,a.image.touchesCurrent.y="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,!a.image.isMoved&&!a.isScaling){if(x.isHorizontal()&&Math.floor(a.image.minX)===Math.floor(a.image.startX)&&a.image.touchesCurrent.x<a.image.touchesStart.x||Math.floor(a.image.maxX)===Math.floor(a.image.startX)&&a.image.touchesCurrent.x>a.image.touchesStart.x)return void(a.image.isTouched=!1);if(!x.isHorizontal()&&Math.floor(a.image.minY)===Math.floor(a.image.startY)&&a.image.touchesCurrent.y<a.image.touchesStart.y||Math.floor(a.image.maxY)===Math.floor(a.image.startY)&&a.image.touchesCurrent.y>a.image.touchesStart.y)return void(a.image.isTouched=!1)}e.preventDefault(),e.stopPropagation(),a.image.isMoved=!0,a.image.currentX=a.image.touchesCurrent.x-a.image.touchesStart.x+a.image.startX,a.image.currentY=a.image.touchesCurrent.y-a.image.touchesStart.y+a.image.startY,a.image.currentX<a.image.minX&&(a.image.currentX=a.image.minX+1-Math.pow(a.image.minX-a.image.currentX+1,.8)),a.image.currentX>a.image.maxX&&(a.image.currentX=a.image.maxX-1+Math.pow(a.image.currentX-a.image.maxX+1,.8)),a.image.currentY<a.image.minY&&(a.image.currentY=a.image.minY+1-Math.pow(a.image.minY-a.image.currentY+1,.8)),a.image.currentY>a.image.maxY&&(a.image.currentY=a.image.maxY-1+Math.pow(a.image.currentY-a.image.maxY+1,.8)),a.velocity.prevPositionX||(a.velocity.prevPositionX=a.image.touchesCurrent.x),a.velocity.prevPositionY||(a.velocity.prevPositionY=a.image.touchesCurrent.y),a.velocity.prevTime||(a.velocity.prevTime=Date.now()),a.velocity.x=(a.image.touchesCurrent.x-a.velocity.prevPositionX)/(Date.now()-a.velocity.prevTime)/2,a.velocity.y=(a.image.touchesCurrent.y-a.velocity.prevPositionY)/(Date.now()-a.velocity.prevTime)/2,Math.abs(a.image.touchesCurrent.x-a.velocity.prevPositionX)<2&&(a.velocity.x=0),Math.abs(a.image.touchesCurrent.y-a.velocity.prevPositionY)<2&&(a.velocity.y=0),a.velocity.prevPositionX=a.image.touchesCurrent.x,a.velocity.prevPositionY=a.image.touchesCurrent.y,a.velocity.prevTime=Date.now(),a.gesture.imageWrap.transform("translate3d("+a.image.currentX+"px, "+a.image.currentY+"px,0)")}}},onTouchEnd:function(e,a){var t=e.zoom;if(t.gesture.image&&0!==t.gesture.image.length){if(!t.image.isTouched||!t.image.isMoved)return t.image.isTouched=!1,void(t.image.isMoved=!1);t.image.isTouched=!1,t.image.isMoved=!1;var s=300,r=300,i=t.velocity.x*s,n=t.image.currentX+i,o=t.velocity.y*r,l=t.image.currentY+o;0!==t.velocity.x&&(s=Math.abs((n-t.image.currentX)/t.velocity.x)),0!==t.velocity.y&&(r=Math.abs((l-t.image.currentY)/t.velocity.y));var p=Math.max(s,r);t.image.currentX=n,t.image.currentY=l;var d=t.image.width*t.scale,m=t.image.height*t.scale;t.image.minX=Math.min(t.gesture.slideWidth/2-d/2,0),t.image.maxX=-t.image.minX,t.image.minY=Math.min(t.gesture.slideHeight/2-m/2,0),t.image.maxY=-t.image.minY,t.image.currentX=Math.max(Math.min(t.image.currentX,t.image.maxX),t.image.minX),t.image.currentY=Math.max(Math.min(t.image.currentY,t.image.maxY),t.image.minY),t.gesture.imageWrap.transition(p).transform("translate3d("+t.image.currentX+"px, "+t.image.currentY+"px,0)")}},onTransitionEnd:function(e){var a=e.zoom;a.gesture.slide&&e.previousIndex!==e.activeIndex&&(a.gesture.image.transform("translate3d(0,0,0) scale(1)"),a.gesture.imageWrap.transform("translate3d(0,0,0)"),a.gesture.slide=a.gesture.image=a.gesture.imageWrap=void 0,a.scale=a.currentScale=1)},toggleZoom:function(a,t){var s=a.zoom;if(s.gesture.slide||(s.gesture.slide=a.clickedSlide?e(a.clickedSlide):a.slides.eq(a.activeIndex),s.gesture.image=s.gesture.slide.find("img, svg, canvas"),s.gesture.imageWrap=s.gesture.image.parent("."+a.params.zoomContainerClass)),s.gesture.image&&0!==s.gesture.image.length){var r,i,n,o,l,p,d,m,u,c,g,h,v,f,w,y,x,T;void 0===s.image.touchesStart.x&&t?(r="touchend"===t.type?t.changedTouches[0].pageX:t.pageX,i="touchend"===t.type?t.changedTouches[0].pageY:t.pageY):(r=s.image.touchesStart.x,i=s.image.touchesStart.y),s.scale&&1!==s.scale?(s.scale=s.currentScale=1,s.gesture.imageWrap.transition(300).transform("translate3d(0,
84840,0)"),s.gesture.image.transition(300).transform("translate3d(0,0,0) scale(1)"),s.gesture.slide=void 0):(s.scale=s.currentScale=s.gesture.imageWrap.attr("data-swiper-zoom")||a.params.zoomMax,t?(x=s.gesture.slide[0].offsetWidth,T=s.gesture.slide[0].offsetHeight,n=s.gesture.slide.offset().left,o=s.gesture.slide.offset().top,l=n+x/2-r,p=o+T/2-i,u=s.gesture.image[0].offsetWidth,c=s.gesture.image[0].offsetHeight,g=u*s.scale,h=c*s.scale,v=Math.min(x/2-g/2,0),f=Math.min(T/2-h/2,0),w=-v,y=-f,d=l*s.scale,m=p*s.scale,d<v&&(d=v),d>w&&(d=w),m<f&&(m=f),m>y&&(m=y)):(d=0,m=0),s.gesture.imageWrap.transition(300).transform("translate3d("+d+"px, "+m+"px,0)"),s.gesture.image.transition(300).transform("translate3d(0,0,0) scale("+s.scale+")"))}},attachEvents:function(a){var t=a?"off":"on";if(x.params.zoom){var s=(x.slides,!("touchstart"!==x.touchEvents.start||!x.support.passiveListener||!x.params.passiveListeners)&&{passive:!0,capture:!1});x.support.gestures?(x.slides[t]("gesturestart",x.zoom.onGestureStart,s),x.slides[t]("gesturechange",x.zoom.onGestureChange,s),x.slides[t]("gestureend",x.zoom.onGestureEnd,s)):"touchstart"===x.touchEvents.start&&(x.slides[t](x.touchEvents.start,x.zoom.onGestureStart,s),x.slides[t](x.touchEvents.move,x.zoom.onGestureChange,s),x.slides[t](x.touchEvents.end,x.zoom.onGestureEnd,s)),x[t]("touchStart",x.zoom.onTouchStart),x.slides.each(function(a,s){e(s).find("."+x.params.zoomContainerClass).length>0&&e(s)[t](x.touchEvents.move,x.zoom.onTouchMove)}),x[t]("touchEnd",x.zoom.onTouchEnd),x[t]("transitionEnd",x.zoom.onTransitionEnd),x.params.zoomToggle&&x.on("doubleTap",x.zoom.toggleZoom)}},init:function(){x.zoom.attachEvents()},destroy:function(){x.zoom.attachEvents(!0)}},x._plugins=[];for(var Y in x.plugins){var A=x.plugins[Y](x,x.params[Y]);A&&x._plugins.push(A)}return x.callPlugins=function(e){for(var a=0;a<x._plugins.length;a++)e in x._plugins[a]&&x._plugins[a][e](arguments[1],arguments[2],arguments[3],arguments[4],arguments[5])},x.emitterEventListeners={},x.emit=function(e){x.params[e]&&x.params[e](arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]);var a;if(x.emitterEventListeners[e])for(a=0;a<x.emitterEventListeners[e].length;a++)x.emitterEventListeners[e][a](arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]);x.callPlugins&&x.callPlugins(e,arguments[1],arguments[2],arguments[3],arguments[4],arguments[5])},x.on=function(e,a){return e=u(e),x.emitterEventListeners[e]||(x.emitterEventListeners[e]=[]),x.emitterEventListeners[e].push(a),x},x.off=function(e,a){var t;if(e=u(e),void 0===a)return x.emitterEventListeners[e]=[],x;if(x.emitterEventListeners[e]&&0!==x.emitterEventListeners[e].length){for(t=0;t<x.emitterEventListeners[e].length;t++)x.emitterEventListeners[e][t]===a&&x.emitterEventListeners[e].splice(t,1);return x}},x.once=function(e,a){e=u(e);var t=function(){a(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4]),x.off(e,t)};return x.on(e,t),x},x.a11y={makeFocusable:function(e){return e.attr("tabIndex","0"),e},addRole:function(e,a){return e.attr("role",a),e},addLabel:function(e,a){return e.attr("aria-label",a),e},disable:function(e){return e.attr("aria-disabled",!0),e},enable:function(e){return e.attr("aria-disabled",!1),e},onEnterKey:function(a){13===a.keyCode&&(e(a.target).is(x.params.nextButton)?(x.onClickNext(a),x.isEnd?x.a11y.notify(x.params.lastSlideMessage):x.a11y.notify(x.params.nextSlideMessage)):e(a.target).is(x.params.prevButton)&&(x.onClickPrev(a),x.isBeginning?x.a11y.notify(x.params.firstSlideMessage):x.a11y.notify(x.params.prevSlideMessage)),e(a.target).is("."+x.params.bulletClass)&&e(a.target)[0].click())},liveRegion:e('<span class="'+x.params.notificationClass+'" aria-live="assertive" aria-atomic="true"></span>'),notify:function(e){var a=x.a11y.liveRegion;0!==a.length&&(a.html(""),a.html(e))},init:function(){x.params.nextButton&&x.nextButton&&x.nextButton.length>0&&(x.a11y.makeFocusable(x.nextButton),x.a11y.addRole(x.nextButton,"button"),x.a11y.addLabel(x.nextButton,x.params.nextSlideMessage)),x.params.prevButton&&x.prevButton&&x.prevButton.length>0&&(x.a11y.makeFocusable(x.prevButton),x.a11y.addRole(x.prevButton,"button"),x.a11y.addLabel(x.prevButton,x.params.prevSlideMessage)),e(x.container).append(x.a11y.liveRegion)},initPagination:function(){x.params.pagination&&x.params.paginationClickable&&x.bullets&&x.bullets.length&&x.bullets.each(function(){var a=e(this);x.a11y.makeFocusable(a),x.a11y.addRole(a,"button"),x.a11y.addLabel(a,x.params.paginationBulletMessage.replace(/{{index}}/,a.index()+1))})},destroy:function(){x.a11y.liveRegion&&x.a11y.liveRegion.length>0&&x.a11y.liveRegion.remove()}},x.init=function(){x.params.loop&&x.createLoop(),x.updateContainerSize(),x.updateSlidesSize(),x.updatePagination(),x.params.scrollbar&&x.scrollbar&&(x.scrollbar.set(),x.params.scrollbarDraggable&&x.scrollbar.enableDraggable()),"slide"!==x.params.effect&&x.effects[x.params.effect]&&(x.params.loop||x.updateProgress(),x.effects[x.params.effect].setTranslate()),x.params.loop?x.slideTo(x.params.initialSlide+x.loopedSlides,0,x.params.runCallbacksOnInit):(x.slideTo(x.params.initialSlide,0,x.params.runCallbacksOnInit),0===x.params.initialSlide&&(x.parallax&&x.params.parallax&&x.parallax.setTranslate(),x.lazy&&x.params.lazyLoading&&(x.lazy.load(),x.lazy.initialImageLoaded=!0))),x.attachEvents(),x.params.observer&&x.support.observer&&x.initObservers(),x.params.preloadImages&&!x.params.lazyLoading&&x.preloadImages(),x.params.zoom&&x.zoom&&x.zoom.init(),x.params.autoplay&&x.startAutoplay(),x.params.keyboardControl&&x.enableKeyboardControl&&x.enableKeyboardControl(),x.params.mousewheelControl&&x.enableMousewheelControl&&x.enableMousewheelControl(),x.params.hashnavReplaceState&&(x.params.replaceState=x.params.hashnavReplaceState),x.params.history&&x.history&&x.history.init(),x.params.hashnav&&x.hashnav&&x.hashnav.init(),x.params.a11y&&x.a11y&&x.a11y.init(),x.emit("onInit",x)},x.cleanupStyles=function(){x.container.removeClass(x.classNames.join(" ")).removeAttr("style"),x.wrapper.removeAttr("style"),x.slides&&x.slides.length&&x.slides.removeClass([x.params.slideVisibleClass,x.params.slideActiveClass,x.params.slideNextClass,x.params.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-column").removeAttr("data-swiper-row"),x.paginationContainer&&x.paginationContainer.length&&x.paginationContainer.removeClass(x.params.paginationHiddenClass),x.bullets&&x.bullets.length&&x.bullets.removeClass(x.params.bulletActiveClass),x.params.prevButton&&e(x.params.prevButton).removeClass(x.params.buttonDisabledClass),x.params.nextButton&&e(x.params.nextButton).removeClass(x.params.buttonDisabledClass),x.params.scrollbar&&x.scrollbar&&(x.scrollbar.track&&x.scrollbar.track.length&&x.scrollbar.track.removeAttr("style"),x.scrollbar.drag&&x.scrollbar.drag.length&&x.scrollbar.drag.removeAttr("style"))},x.destroy=function(e,a){x.detachEvents(),x.stopAutoplay(),x.params.scrollbar&&x.scrollbar&&x.params.scrollbarDraggable&&x.scrollbar.disableDraggable(),x.params.loop&&x.destroyLoop(),a&&x.cleanupStyles(),x.disconnectObservers(),x.params.zoom&&x.zoom&&x.zoom.destroy(),x.params.keyboardControl&&x.disableKeyboardControl&&x.disableKeyboardControl(),x.params.mousewheelControl&&x.disableMousewheelControl&&x.disableMousewheelControl(),x.params.a11y&&x.a11y&&x.a11y.destroy(),x.params.history&&!x.params.replaceState&&window.removeEventListener("popstate",x.history.setHistoryPopState),x.params.hashnav&&x.hashnav&&x.hashnav.destroy(),x.emit("onDestroy"),e!==!1&&(x=null)},x.init(),x}};a.prototype={isSafari:function(){var e=window.navigator.userAgent.toLowerCase();return e.indexOf("safari")>=0&&e.indexOf("chrome")<0&&e.indexOf("android")<0}
8484(),isUiWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent),isArray:function(e){return"[object Array]"===Object.prototype.toString.apply(e)},browser:{ie:window.navigator.pointerEnabled||window.navigator.msPointerEnabled,ieTouch:window.navigator.msPointerEnabled&&window.navigator.msMaxTouchPoints>1||window.navigator.pointerEnabled&&window.navigator.maxTouchPoints>1,lteIE9:function(){var e=document.createElement("div");return e.innerHTML="<!--[if lte IE 9]><i></i><![endif]-->",1===e.getElementsByTagName("i").length}()},device:function(){var e=window.navigator.userAgent,a=e.match(/(Android);?[\s\/]+([\d.]+)?/),t=e.match(/(iPad).*OS\s([\d_]+)/),s=e.match(/(iPod)(.*OS\s([\d_]+))?/),r=!t&&e.match(/(iPhone\sOS|iOS)\s([\d_]+)/);return{ios:t||r||s,android:a}}(),support:{touch:window.Modernizr&&Modernizr.touch===!0||function(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)}(),transforms3d:window.Modernizr&&Modernizr.csstransforms3d===!0||function(){var e=document.createElement("div").style;return"webkitPerspective"in e||"MozPerspective"in e||"OPerspective"in e||"MsPerspective"in e||"perspective"in e}(),flexbox:function(){for(var e=document.createElement("div").style,a="alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient".split(" "),t=0;t<a.length;t++)if(a[t]in e)return!0}(),observer:function(){return"MutationObserver"in window||"WebkitMutationObserver"in window}(),passiveListener:function(){var e=!1;try{var a=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassiveListener",null,a)}catch(e){}return e}(),gestures:function(){return"ongesturestart"in window}()},plugins:{}};for(var t=["jQuery","Zepto","Dom7"],s=0;s<t.length;s++)window[t[s]]&&function(e){e.fn.swiper=function(t){var s;return e(this).each(function(){var e=new a(this,t);s||(s=e)}),s}}(window[t[s]]);var r;r="undefined"==typeof Dom7?window.Dom7||window.Zepto||window.jQuery:Dom7,r&&("transitionEnd"in r.fn||(r.fn.transitionEnd=function(e){function a(i){if(i.target===this)for(e.call(this,i),t=0;t<s.length;t++)r.off(s[t],a)}var t,s=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"],r=this;if(e)for(t=0;t<s.length;t++)r.on(s[t],a);return this}),"transform"in r.fn||(r.fn.transform=function(e){for(var a=0;a<this.length;a++){var t=this[a].style;t.webkitTransform=t.MsTransform=t.msTransform=t.MozTransform=t.OTransform=t.transform=e}return this}),"transition"in r.fn||(r.fn.transition=function(e){"string"!=typeof e&&(e+="ms");for(var a=0;a<this.length;a++){var t=this[a].style;t.webkitTransitionDuration=t.MsTransitionDuration=t.msTransitionDuration=t.MozTransitionDuration=t.OTransitionDuration=t.transitionDuration=e}return this}),"outerWidth"in r.fn||(r.fn.outerWidth=function(e){return this.length>0?e?this[0].offsetWidth+parseFloat(this.css("margin-right"))+parseFloat(this.css("margin-left")):this[0].offsetWidth:null})),window.Swiper=a}(),"undefined"!=typeof module?module.exports=window.Swiper:"function"==typeof define&&define.amd&&define([],function(){"use strict";return window.Swiper});
8485//# 
8486
8487
8488
8489/* ----- DOCUMENT READY FUNCTION ------ */
8490
8491$(function() {
8492  
8493  if (!$("Body.BodyGallery").length ) {
8494    // Sticky Header nicht in Galerie-Detailseiten
8495
8496      $(window).on('scroll resize touchmove',function(){
8497        stickybegins = $(".SiteHeader").offset().top + $(".SiteHeader").height();
8498
8499        if($(this).scrollTop()>stickybegins && window.innerWidth>768){
8500          $('.SiteHeaderSticky').fadeIn();
8501        }else{
8502          $('.SiteHeaderSticky').fadeOut();
8503        }
8504      });
8505
8506
8507  }
8508
8509  
8510} );
8511 
8512

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.