Pixel Caffeine - Version 2.1.2

Version Description

  • 2020-04-15 =
  • Enhancement - Change additional_image_link format when multiple URLs, from single field and separated by comma, to multiple additional_image_link fields
  • Enhancement - Make ajax AddToCart working in the new WooCommerce blocks
  • Fix - Notice: Undefined index: order-received in ../pixel-caffeine/includes/supports/class-aepc-woocommerce-addon-support.php on line 138
  • Fix - Remove userAgent argument from pixel events, causing business privacy violation and not used anymore
  • Fix - Fatal error when WooCommerce Subscription process the automatic orders
  • Fix - Console error: [Facebook Pixel] - Call to "fbq('init', 'xxxxxxx', []);" with parameter "user_data" has an invalid value of "[]"
  • Support - WP Rocket: give ability to host Facebook Pixels locally on your server to help satisfy the PageSpeed recommendation for Leverage browser caching
Download this release

Release Info

Developer antoscarface
Plugin Icon 128x128 Pixel Caffeine
Version 2.1.2
Comparing to
See all releases

Code changes from version 2.1.1 to 2.1.2

build/admin.js CHANGED
@@ -1 +1 @@
1
- !function(t){function e(s){if(i[s])return i[s].exports;var n=i[s]={i:s,l:!1,exports:{}};return t[s].call(n.exports,n,n.exports,e),n.l=!0,n.exports}var i={};e.m=t,e.c=i,e.d=function(t,i,s){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:s})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=92)}({0:function(t,e){t.exports=jQuery},100:function(t,e){},17:function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=i(0),a=s(o);i(7);var r=i(8),l=s(r),h=i(9),c=s(h),d={alert_unsaved:function(){(0,a.default)(".wrap form").on("change.unsaved",":input:not(#date-range)",function(){c.default.set_unsaved()}).on("submit.unsaved",function(){c.default.set_saved()}),window.onbeforeunload=function(){if(c.default.unsaved)return aepc_admin.unsaved}},unset_alert_unsaved:function(){(0,a.default)(".wrap form").off("change.unsaved submit.unsaved"),window.onbeforeunload=function(){}},apply_autocomplete:function(t,e){t.is("select")?t.select2({data:{results:e}}):t.select2({tags:e})},addLoader:function(t){if(void 0!==t.data("select2")){t.data("select2").container.addClass("loading-data")}else t.is("div, form")?t.addClass("loading-data loading-box"):t.is("a")&&t.addClass("loading-data")},removeLoader:function(t){if(void 0!==t.data("select2")){t.data("select2").container.removeClass("loading-data")}else t.is("div, form")?t.removeClass("loading-data loading-box"):t.is("a")&&t.removeClass("loading-data")},removeMessage:function(t,e){"error"===e&&(e="danger"),t.find(".alert-"+e).length&&t.find(".alert-"+e).remove()},removeMainMessages:function(t){d.removeMessage((0,a.default)(".plugin-content"),t)},removeAllMainMessages:function(){d.removeMainMessages("success"),d.removeMainMessages("error")},addMessage:function(t,e,i){"error"===e&&(e="danger");var s="object"===(void 0===i?"undefined":n(i))?i:{text:i},o=s.text,r=s.dismiss_action,l=void 0!==r&&r,h=(0,a.default)("<button />",{type:"button",class:"close","data-dismiss":"alert",text:"×"});l&&h.data("data-dismiss-action",l),d.removeMessage(t,e),t.prepend((0,a.default)("<div />",{class:"alert alert-"+e+" alert-dismissable",role:"alert",html:o}).prepend(h))},addMessagesFromResponse:function(t){t.data.hasOwnProperty("messages")?(t.data.messages.length&&d.removeMessage((0,a.default)(".plugin-content"),"success"),t.data.messages.hasOwnProperty("success")&&t.data.messages.success.hasOwnProperty("main")&&t.data.messages.success.main.forEach(function(t){d.addMessage((0,a.default)(".plugin-content .alert-wrap"),"success",t)}),t.data.messages.hasOwnProperty("error")&&t.data.messages.error.hasOwnProperty("main")&&t.data.messages.error.main.forEach(function(t){d.addMessage((0,a.default)(".plugin-content .alert-wrap"),"error",t)})):t.hasOwnProperty("success")&&!t.success&&t.data.hasOwnProperty("main")&&t.data.main.forEach(function(t){d.addMessage((0,a.default)(".plugin-content .alert-wrap"),"error",t)})},refreshFragmentHTML:function(t,e){e.success?(d.unset_alert_unsaved(),t.replaceWith(e.data.html),d.addMessagesFromResponse(e),c.default.bootstrap_components({currentTarget:t}),c.default.custom_dropdown(),c.default.fields_components(),c.default.analyzed_distance(),d.alert_unsaved(),(0,a.default)(document).triggerHandler("fragment_html_refreshed")):d.addMessagesFromResponse(e)},reloadFragment:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(l.default.fragments.hasOwnProperty(t)&&aepc_admin.actions.hasOwnProperty("load_"+t)){var s=(0,a.default)(l.default.fragments[t]),n=function(){},o=function(){},r={action:aepc_admin.actions["load_"+t].name,_wpnonce:aepc_admin.actions["load_"+t].nonce};i&&a.default.inArray(t,["sidebar"])<0&&d.removeMessage((0,a.default)(".plugin-content"),"success"),i&&d.addLoader(s),window.location.href.slice(window.location.href.indexOf("?")+1).split("&").forEach(function(t){var e=t.split("=");a.default.inArray(e[0],["page","tab"])&&(r[e[0]]=e[1])}),void 0!==e&&(e.hasOwnProperty("success")&&(n=e.success,delete e.success),e.hasOwnProperty("beforeRender")&&(o=e.beforeRender,delete e.beforeRender),a.default.extend(r,e)),a.default.ajax({url:aepc_admin.ajax_url,data:r,complete:function(){d.removeLoader(s)},success:function(t){t.success&&(o(),d.refreshFragmentHTML(s,t)),n(t)},dataType:"json"})}}};e.default=d},22:function(t,e,i){"use strict";(function(t){var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};+function(t){function i(e){var i,s=e.attr("data-target")||(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return t(document).find(s)}function s(i){return this.each(function(){var s=t(this),o=s.data("bs.collapse"),a=t.extend({},n.DEFAULTS,s.data(),"object"==(void 0===i?"undefined":e(i))&&i);!o&&a.toggle&&/show|hide/.test(i)&&(a.toggle=!1),o||s.data("bs.collapse",o=new n(this,a)),"string"==typeof i&&o[i]()})}var n=function e(i,s){this.$element=t(i),this.options=t.extend({},e.DEFAULTS,s),this.$trigger=t('[data-toggle="collapse"][href="#'+i.id+'"],[data-toggle="collapse"][data-target="#'+i.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};n.VERSION="3.4.1",n.TRANSITION_DURATION=350,n.DEFAULTS={toggle:!0},n.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},n.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,i=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(i&&i.length&&(e=i.data("bs.collapse"))&&e.transitioning)){var o=t.Event("show.bs.collapse");if(this.$element.trigger(o),!o.isDefaultPrevented()){i&&i.length&&(s.call(i,"hide"),e||i.data("bs.collapse",null));var a=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[a](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var r=function(){this.$element.removeClass("collapsing").addClass("collapse in")[a](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return r.call(this);var l=t.camelCase(["scroll",a].join("-"));this.$element.one("bsTransitionEnd",t.proxy(r,this)).emulateTransitionEnd(n.TRANSITION_DURATION)[a](this.$element[0][l])}}}},n.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var i=this.dimension();this.$element[i](this.$element[i]())[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 s=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!t.support.transition)return s.call(this);this.$element[i](0).one("bsTransitionEnd",t.proxy(s,this)).emulateTransitionEnd(n.TRANSITION_DURATION)}}},n.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},n.prototype.getParent=function(){return t(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(e,s){var n=t(s);this.addAriaAndCollapsedClass(i(n),n)},this)).end()},n.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)};var o=t.fn.collapse;t.fn.collapse=s,t.fn.collapse.Constructor=n,t.fn.collapse.noConflict=function(){return t.fn.collapse=o,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(e){var n=t(this);n.attr("data-target")||e.preventDefault();var o=i(n),a=o.data("bs.collapse"),r=a?"toggle":n.data();s.call(o,r)})}(t)}).call(e,i(0))},23:function(t,e,i){"use strict";(function(t){var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};+function(t){function i(e,i){var s=e.nodeName.toLowerCase();if(-1!==t.inArray(s,i))return-1===t.inArray(s,a)||Boolean(e.nodeValue.match(h)||e.nodeValue.match(c));for(var n=t(i).filter(function(t,e){return e instanceof RegExp}),o=0,r=n.length;o<r;o++)if(s.match(n[o]))return!0;return!1}function s(e,s,n){if(0===e.length)return e;if(n&&"function"==typeof n)return n(e);if(!document.implementation||!document.implementation.createHTMLDocument)return e;var o=document.implementation.createHTMLDocument("sanitization");o.body.innerHTML=e;for(var a=t.map(s,function(t,e){return e}),r=t(o.body).find("*"),l=0,h=r.length;l<h;l++){var c=r[l],d=c.nodeName.toLowerCase();if(-1!==t.inArray(d,a))for(var p=t.map(c.attributes,function(t){return t}),u=[].concat(s["*"]||[],s[d]||[]),f=0,g=p.length;f<g;f++)i(p[f],u)||c.removeAttribute(p[f].nodeName);else c.parentNode.removeChild(c)}return o.body.innerHTML}function n(i){return this.each(function(){var s=t(this),n=s.data("bs.tooltip"),o="object"==(void 0===i?"undefined":e(i))&&i;!n&&/destroy|hide/.test(i)||(n||s.data("bs.tooltip",n=new d(this,o)),"string"==typeof i&&n[i]())})}var o=["sanitize","whiteList","sanitizeFn"],a=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],r=/^aria-[\w-]*$/i,l={"*":["class","dir","id","lang","role",r],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:[]},h=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:\/?#]*(?:[\/?#]|$))/gi,c=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i,d=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)};d.VERSION="3.4.1",d.TRANSITION_DURATION=150,d.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:l},d.prototype.init=function(e,i,s){if(this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(s),this.$viewport=this.options.viewport&&t(document).find(t.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 n=this.options.trigger.split(" "),o=n.length;o--;){var a=n[o];if("click"==a)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=a){var r="hover"==a?"mouseenter":"focusin",l="hover"==a?"mouseleave":"focusout";this.$element.on(r+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},d.prototype.getDefaults=function(){return d.DEFAULTS},d.prototype.getOptions=function(e){var i=this.$element.data();for(var n in i)i.hasOwnProperty(n)&&-1!==t.inArray(n,o)&&delete i[n];return e=t.extend({},this.getDefaults(),i,e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e.sanitize&&(e.template=s(e.template,e.whiteList,e.sanitizeFn)),e},d.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,function(t,s){i[t]!=s&&(e[t]=s)}),e},d.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusin"==e.type?"focus":"hover"]=!0),i.tip().hasClass("in")||"in"==i.hoverState?void(i.hoverState="in"):(clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show())},d.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},d.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusout"==e.type?"focus":"hover"]=!1),!i.isInStateTrue()){if(clearTimeout(i.timeout),i.hoverState="out",!i.options.delay||!i.options.delay.hide)return i.hide();i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)}},d.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var i=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!i)return;var s=this,n=this.tip(),o=this.getUID(this.type);this.setContent(),n.attr("id",o),this.$element.attr("aria-describedby",o),this.options.animation&&n.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,n[0],this.$element[0]):this.options.placement,r=/\s?auto?\s?/i,l=r.test(a);l&&(a=a.replace(r,"")||"top"),n.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?n.appendTo(t(document).find(this.options.container)):n.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var h=this.getPosition(),c=n[0].offsetWidth,p=n[0].offsetHeight;if(l){var u=a,f=this.getPosition(this.$viewport);a="bottom"==a&&h.bottom+p>f.bottom?"top":"top"==a&&h.top-p<f.top?"bottom":"right"==a&&h.right+c>f.width?"left":"left"==a&&h.left-c<f.left?"right":a,n.removeClass(u).addClass(a)}var g=this.getCalculatedOffset(a,h,c,p);this.applyPlacement(g,a);var m=function(){var t=s.hoverState;s.$element.trigger("shown.bs."+s.type),s.hoverState=null,"out"==t&&s.leave(s)};t.support.transition&&this.$tip.hasClass("fade")?n.one("bsTransitionEnd",m).emulateTransitionEnd(d.TRANSITION_DURATION):m()}},d.prototype.applyPlacement=function(e,i){var s=this.tip(),n=s[0].offsetWidth,o=s[0].offsetHeight,a=parseInt(s.css("margin-top"),10),r=parseInt(s.css("margin-left"),10);isNaN(a)&&(a=0),isNaN(r)&&(r=0),e.top+=a,e.left+=r,t.offset.setOffset(s[0],t.extend({using:function(t){s.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0),s.addClass("in");var l=s[0].offsetWidth,h=s[0].offsetHeight;"top"==i&&h!=o&&(e.top=e.top+o-h);var c=this.getViewportAdjustedDelta(i,e,l,h);c.left?e.left+=c.left:e.top+=c.top;var d=/top|bottom/.test(i),p=d?2*c.left-n+l:2*c.top-o+h,u=d?"offsetWidth":"offsetHeight";s.offset(e),this.replaceArrow(p,s[0][u],d)},d.prototype.replaceArrow=function(t,e,i){this.arrow().css(i?"left":"top",50*(1-t/e)+"%").css(i?"top":"left","")},d.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();this.options.html?(this.options.sanitize&&(e=s(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")},d.prototype.hide=function(e){function i(){"in"!=s.hoverState&&n.detach(),s.$element&&s.$element.removeAttr("aria-describedby").trigger("hidden.bs."+s.type),e&&e()}var s=this,n=t(this.$tip),o=t.Event("hide.bs."+this.type);if(this.$element.trigger(o),!o.isDefaultPrevented())return n.removeClass("in"),t.support.transition&&n.hasClass("fade")?n.one("bsTransitionEnd",i).emulateTransitionEnd(d.TRANSITION_DURATION):i(),this.hoverState=null,this},d.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","")},d.prototype.hasContent=function(){return this.getTitle()},d.prototype.getPosition=function(e){e=e||this.$element;var i=e[0],s="BODY"==i.tagName,n=i.getBoundingClientRect();null==n.width&&(n=t.extend({},n,{width:n.right-n.left,height:n.bottom-n.top}));var o=window.SVGElement&&i instanceof window.SVGElement,a=s?{top:0,left:0}:o?null:e.offset(),r={scroll:s?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()},l=s?{width:t(window).width(),height:t(window).height()}:null;return t.extend({},n,r,l,a)},d.prototype.getCalculatedOffset=function(t,e,i,s){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-i/2}:"top"==t?{top:e.top-s,left:e.left+e.width/2-i/2}:"left"==t?{top:e.top+e.height/2-s/2,left:e.left-i}:{top:e.top+e.height/2-s/2,left:e.left+e.width}},d.prototype.getViewportAdjustedDelta=function(t,e,i,s){var n={top:0,left:0};if(!this.$viewport)return n;var o=this.options.viewport&&this.options.viewport.padding||0,a=this.getPosition(this.$viewport);if(/right|left/.test(t)){var r=e.top-o-a.scroll,l=e.top+o-a.scroll+s;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-o,c=e.left+o+i;h<a.left?n.left=a.left-h:c>a.right&&(n.left=a.left+a.width-c)}return n},d.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)},d.prototype.getUID=function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},d.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(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},d.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},d.prototype.enable=function(){this.enabled=!0},d.prototype.disable=function(){this.enabled=!1},d.prototype.toggleEnabled=function(){this.enabled=!this.enabled},d.prototype.toggle=function(e){var i=this;e&&((i=t(e.currentTarget).data("bs."+this.type))||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i))),e?(i.inState.click=!i.inState.click,i.isInStateTrue()?i.enter(i):i.leave(i)):i.tip().hasClass("in")?i.leave(i):i.enter(i)},d.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})},d.prototype.sanitizeHtml=function(t){return s(t,this.options.whiteList,this.options.sanitizeFn)};var p=t.fn.tooltip;t.fn.tooltip=n,t.fn.tooltip.Constructor=d,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=p,this}}(t)}).call(e,i(0))},24:function(t,e,i){"use strict";(function(t){var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};+function(t){function i(i){return this.each(function(){var n=t(this),o=n.data("bs.popover"),a="object"==(void 0===i?"undefined":e(i))&&i;!o&&/destroy|hide/.test(i)||(o||n.data("bs.popover",o=new s(this,a)),"string"==typeof i&&o[i]())})}var s=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");s.VERSION="3.4.1",s.DEFAULTS=t.extend({},t.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=t.extend({},t.fn.tooltip.Constructor.prototype),s.prototype.constructor=s,s.prototype.getDefaults=function(){return s.DEFAULTS},s.prototype.setContent=function(){var t=this.tip(),i=this.getTitle(),s=this.getContent();if(this.options.html){var n=void 0===s?"undefined":e(s);this.options.sanitize&&(i=this.sanitizeHtml(i),"string"===n&&(s=this.sanitizeHtml(s))),t.find(".popover-title").html(i),t.find(".popover-content").children().detach().end()["string"===n?"html":"append"](s)}else t.find(".popover-title").text(i),t.find(".popover-content").children().detach().end().text(s);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 n=t.fn.popover;t.fn.popover=i,t.fn.popover.Constructor=s,t.fn.popover.noConflict=function(){return t.fn.popover=n,this}}(t)}).call(e,i(0))},25:function(t,e,i){"use strict";(function(t){+function(t){function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return!1}t.fn.emulateTransitionEnd=function(e){var i=!1,s=this;t(this).one("bsTransitionEnd",function(){i=!0});var n=function(){i||t(s).trigger(t.support.transition.end)};return setTimeout(n,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(t)}).call(e,i(0))},26:function(t,e,i){"use strict";(function(t){var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};+function(t){function i(i,n){return this.each(function(){var o=t(this),a=o.data("bs.modal"),r=t.extend({},s.DEFAULTS,o.data(),"object"==(void 0===i?"undefined":e(i))&&i);a||o.data("bs.modal",a=new s(this,r)),"string"==typeof i?a[i](n):r.show&&a.show(n)})}var s=function(e,i){this.options=i,this.$body=t(document.body),this.$element=t(e),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,t.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};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(e){var i=this,n=t.Event("show.bs.modal",{relatedTarget:e});this.$element.trigger(n),this.isShown||n.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"]',t.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){i.$element.one("mouseup.dismiss.bs.modal",function(e){t(e.target).is(i.$element)&&(i.ignoreBackdropClick=!0)})}),this.backdrop(function(){var n=t.support.transition&&i.$element.hasClass("fade");i.$element.parent().length||i.$element.appendTo(i.$body),i.$element.show().scrollTop(0),i.adjustDialog(),n&&i.$element[0].offsetWidth,i.$element.addClass("in"),i.enforceFocus();var o=t.Event("shown.bs.modal",{relatedTarget:e});n?i.$dialog.one("bsTransitionEnd",function(){i.$element.trigger("focus").trigger(o)}).emulateTransitionEnd(s.TRANSITION_DURATION):i.$element.trigger("focus").trigger(o)}))},s.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),t(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"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(s.TRANSITION_DURATION):this.hideModal())},s.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.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",t.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},s.prototype.resize=function(){this.isShown?t(window).on("resize.bs.modal",t.proxy(this.handleUpdate,this)):t(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(e){var i=this,n=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var o=t.support.transition&&n;if(this.$backdrop=t(document.createElement("div")).addClass("modal-backdrop "+n).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",t.proxy(function(t){if(this.ignoreBackdropClick)return void(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"),!e)return;o?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(s.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var a=function(){i.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",a).emulateTransitionEnd(s.BACKDROP_TRANSITION_DURATION):a()}else e&&e()},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 e=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"";var i=this.scrollbarWidth;this.bodyIsOverflowing&&(this.$body.css("padding-right",e+i),t(this.fixedContent).each(function(e,s){var n=s.style.paddingRight,o=t(s).css("padding-right");t(s).data("padding-right",n).css("padding-right",parseFloat(o)+i+"px")}))},s.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad),t(this.fixedContent).each(function(e,i){var s=t(i).data("padding-right");t(i).removeData("padding-right"),i.style.paddingRight=s||""})},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 n=t.fn.modal;t.fn.modal=i,t.fn.modal.Constructor=s,t.fn.modal.noConflict=function(){return t.fn.modal=n,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(e){var s=t(this),n=s.attr("href"),o=s.attr("data-target")||n&&n.replace(/.*(?=#[^\s]+$)/,""),a=t(document).find(o),r=a.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(n)&&n},a.data(),s.data());s.is("a")&&e.preventDefault(),a.one("show.bs.modal",function(t){t.isDefaultPrevented()||a.one("hidden.bs.modal",function(){s.is(":visible")&&s.trigger("focus")})}),i.call(a,r,this)})}(t)}).call(e,i(0))},27:function(t,e,i){"use strict";(function(t){!function(t){function e(t){return void 0===t.which||"number"==typeof t.which&&t.which>0&&(!t.ctrlKey&&!t.metaKey&&!t.altKey&&8!=t.which&&9!=t.which&&13!=t.which&&16!=t.which&&17!=t.which&&20!=t.which&&27!=t.which)}function i(e){var i=t(e);i.prop("disabled")||i.closest(".form-group").addClass("is-focused")}function s(t,e){var i;return i=t.hasClass("checkbox-inline")||t.hasClass("radio-inline")?t:t.closest(".checkbox").length?t.closest(".checkbox"):t.closest(".radio"),i.toggleClass("disabled",e)}function n(e){var n=!1;(e.is(t.material.options.checkboxElements)||e.is(t.material.options.radioElements))&&(n=!0),e.closest("label").hover(function(){var e=t(this).find("input"),o=e.prop("disabled");n&&s(t(this),o),o||i(e)},function(){o(t(this).find("input"))})}function o(e){t(e).closest(".form-group").removeClass("is-focused")}t.expr[":"].notmdproc=function(e){return!t(e).data("mdproc")},t.material={options:{validate:!0,input:!0,ripples:!0,checkbox:!0,togglebutton:!0,radio:!0,arrive:!0,autofill:!1,withRipples:[".btn:not(.btn-link)",".card-image",".navbar a:not(.withoutripple)",".dropdown-menu a",".nav-tabs a:not(.withoutripple)",".withripple",".pagination li:not(.active):not(.disabled) a:not(.withoutripple)"].join(","),inputElements:"input.form-control, textarea.form-control, select.form-control",checkboxElements:".checkbox > label > input[type=checkbox], label.checkbox-inline > input[type=checkbox]",togglebuttonElements:".togglebutton > label > input[type=checkbox]",radioElements:".radio > label > input[type=radio], label.radio-inline > input[type=radio]"},checkbox:function(e){n(t(e||this.options.checkboxElements).filter(":notmdproc").data("mdproc",!0).after("<span class='checkbox-material'><span class='check'></span></span>"))},togglebutton:function(e){n(t(e||this.options.togglebuttonElements).filter(":notmdproc").data("mdproc",!0).after("<span class='toggle'></span>"))},radio:function(e){n(t(e||this.options.radioElements).filter(":notmdproc").data("mdproc",!0).after("<span class='circle'></span><span class='check'></span>"))},input:function(e){t(e||this.options.inputElements).filter(":notmdproc").data("mdproc",!0).each(function(){var e=t(this),i=e.closest(".form-group");0!==i.length||"hidden"===e.attr("type")||e.attr("hidden")||(e.wrap("<div class='form-group'></div>"),i=e.closest(".form-group")),e.attr("data-hint")&&(e.after("<p class='help-block'>"+e.attr("data-hint")+"</p>"),e.removeAttr("data-hint"));var s={"input-lg":"form-group-lg","input-sm":"form-group-sm"};if(t.each(s,function(t,s){e.hasClass(t)&&(e.removeClass(t),i.addClass(s))}),e.hasClass("floating-label")){var n=e.attr("placeholder");e.attr("placeholder",null).removeClass("floating-label");var o=e.attr("id"),a="";o&&(a="for='"+o+"'"),i.addClass("label-floating"),e.after("<label "+a+"class='control-label'>"+n+"</label>")}null!==e.val()&&"undefined"!=e.val()&&""!==e.val()||i.addClass("is-empty"),i.find("input[type=file]").length>0&&i.addClass("is-fileinput")})},attachInputEventHandlers:function(){var s=this.options.validate;t(document).on("keydown paste",".form-control",function(i){e(i)&&t(this).closest(".form-group").removeClass("is-empty")}).on("keyup change",".form-control",function(){var e=t(this),i=e.closest(".form-group"),n=void 0===e[0].checkValidity||e[0].checkValidity();""===e.val()?i.addClass("is-empty"):i.removeClass("is-empty"),s&&(n?i.removeClass("has-error"):i.addClass("has-error"))}).on("focus",".form-control, .form-group.is-fileinput",function(){i(this)}).on("blur",".form-control, .form-group.is-fileinput",function(){o(this)}).on("change",".form-group input",function(){var e=t(this);if("file"!=e.attr("type")){var i=e.closest(".form-group");e.val()?i.removeClass("is-empty"):i.addClass("is-empty")}}).on("change",".form-group.is-fileinput input[type='file']",function(){var e=t(this),i=e.closest(".form-group"),s="";t.each(this.files,function(t,e){s+=e.name+", "}),s=s.substring(0,s.length-2),s?i.removeClass("is-empty"):i.addClass("is-empty"),i.find("input.form-control[readonly]").val(s)})},ripples:function(e){t(e||this.options.withRipples).ripples()},autofill:function(){var e=setInterval(function(){t("input[type!=checkbox]").each(function(){var e=t(this);e.val()&&e.val()!==e.attr("value")&&e.trigger("change")})},100);setTimeout(function(){clearInterval(e)},1e4)},attachAutofillEventHandlers:function(){var e;t(document).on("focus","input",function(){var i=t(this).parents("form").find("input").not("[type=file]");e=setInterval(function(){i.each(function(){var e=t(this);e.val()!==e.attr("value")&&e.trigger("change")})},100)}).on("blur",".form-group input",function(){clearInterval(e)})},init:function(e){this.options=t.extend({},this.options,e);var i=t(document);t.fn.ripples&&this.options.ripples&&this.ripples(),this.options.input&&(this.input(),this.attachInputEventHandlers()),this.options.checkbox&&this.checkbox(),this.options.togglebutton&&this.togglebutton(),this.options.radio&&this.radio(),this.options.autofill&&(this.autofill(),this.attachAutofillEventHandlers()),document.arrive&&this.options.arrive&&(t.fn.ripples&&this.options.ripples&&i.arrive(this.options.withRipples,function(){t.material.ripples(t(this))}),this.options.input&&i.arrive(this.options.inputElements,function(){t.material.input(t(this))}),this.options.checkbox&&i.arrive(this.options.checkboxElements,function(){t.material.checkbox(t(this))}),this.options.radio&&i.arrive(this.options.radioElements,function(){t.material.radio(t(this))}),this.options.togglebutton&&i.arrive(this.options.togglebuttonElements,function(){t.material.togglebutton(t(this))}))}}}(t)}).call(e,i(0))},7:function(t,e,i){"use strict";(function(t){var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(t){void 0===t.fn.each2&&t.extend(t.fn,{each2:function(e){for(var i=t([0]),s=-1,n=this.length;++s<n&&(i.context=i[0]=this[s])&&!1!==e.call(i[0],s,i););return this}})}(t),function(t,i){function s(e){var i=t(document.createTextNode(""));e.before(i),i.before(e),i.remove()}function n(t){function e(t){return H[t]||t}return t.replace(/[^\u0000-\u007E]/g,e)}function o(t,e){for(var i=0,s=e.length;i<s;i+=1)if(r(t,e[i]))return i;return-1}function a(){var e=t(W);e.appendTo("body");var i={width:e.width()-e[0].clientWidth,height:e.height()-e[0].clientHeight};return e.remove(),i}function r(t,e){return t===e||t!==i&&e!==i&&(null!==t&&null!==e&&(t.constructor===String?t+""==e+"":e.constructor===String&&e+""==t+""))}function l(e,i){var s,n,o;if(null===e||e.length<1)return[];for(s=e.split(i),n=0,o=s.length;n<o;n+=1)s[n]=t.trim(s[n]);return s}function h(t){return t.outerWidth(!1)-t.width()}function c(e){var s="keyup-change-value";e.on("keydown",function(){t.data(e,s)===i&&t.data(e,s,e.val())}),e.on("keyup",function(){var n=t.data(e,s);n!==i&&e.val()!==n&&(t.removeData(e,s),e.trigger("keyup-change"))})}function d(e){e.on("mousemove",function(e){var s=j;s!==i&&s.x===e.pageX&&s.y===e.pageY||t(e.target).trigger("mousemove-filtered",e)})}function p(t,e,s){s=s||i;var n;return function(){var i=arguments;window.clearTimeout(n),n=window.setTimeout(function(){e.apply(s,i)},t)}}function u(t,e){var i=p(t,function(t){e.trigger("scroll-debounced",t)});e.on("scroll",function(t){o(t.target,e.get())>=0&&i(t)})}function f(t){t[0]!==document.activeElement&&window.setTimeout(function(){var e,i=t[0],s=t.val().length;t.focus(),(i.offsetWidth>0||i.offsetHeight>0)&&i===document.activeElement&&(i.setSelectionRange?i.setSelectionRange(s,s):i.createTextRange&&(e=i.createTextRange(),e.collapse(!1),e.select()))},0)}function g(e){e=t(e)[0];var i=0,s=0;if("selectionStart"in e)i=e.selectionStart,s=e.selectionEnd-i;else if("selection"in document){e.focus();var n=document.selection.createRange();s=document.selection.createRange().text.length,n.moveStart("character",-e.value.length),i=n.text.length-s}return{offset:i,length:s}}function m(t){t.preventDefault(),t.stopPropagation()}function v(t){t.preventDefault(),t.stopImmediatePropagation()}function x(e){if(!R){var i=e[0].currentStyle||window.getComputedStyle(e[0],null);R=t(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:i.fontSize,fontFamily:i.fontFamily,fontStyle:i.fontStyle,fontWeight:i.fontWeight,letterSpacing:i.letterSpacing,textTransform:i.textTransform,whiteSpace:"nowrap"}),R.attr("class","select2-sizer"),t("body").append(R)}return R.text(e.val()),R.width()}function y(e,i,s){var n,o,a=[];n=t.trim(e.attr("class")),n&&(n=""+n,t(n.split(/\s+/)).each2(function(){0===this.indexOf("select2-")&&a.push(this)})),n=t.trim(i.attr("class")),n&&(n=""+n,t(n.split(/\s+/)).each2(function(){0!==this.indexOf("select2-")&&(o=s(this))&&a.push(o)})),e.attr("class",a.join(" "))}function b(t,e,i,s){var o=n(t.toUpperCase()).indexOf(n(e.toUpperCase())),a=e.length;if(o<0)return void i.push(s(t));i.push(s(t.substring(0,o))),i.push("<span class='select2-match'>"),i.push(s(t.substring(o,o+a))),i.push("</span>"),i.push(s(t.substring(o+a,t.length)))}function w(t){var e={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return String(t).replace(/[&<>"'\/\\]/g,function(t){return e[t]})}function k(e){var s,n=null,o=e.quietMillis||100,a=e.url,r=this;return function(l){window.clearTimeout(s),s=window.setTimeout(function(){var s=e.data,o=a,h=e.transport||t.fn.select2.ajaxDefaults.transport,c={type:e.type||"GET",cache:e.cache||!1,jsonpCallback:e.jsonpCallback||i,dataType:e.dataType||"json"},d=t.extend({},t.fn.select2.ajaxDefaults.params,c);s=s?s.call(r,l.term,l.page,l.context):null,o="function"==typeof o?o.call(r,l.term,l.page,l.context):o,n&&"function"==typeof n.abort&&n.abort(),e.params&&(t.isFunction(e.params)?t.extend(d,e.params.call(r)):t.extend(d,e.params)),t.extend(d,{url:o,dataType:e.dataType,data:s,success:function(t){var i=e.results(t,l.page,l);l.callback(i)},error:function(t,e,i){var s={hasError:!0,jqXHR:t,textStatus:e,errorThrown:i};l.callback(s)}}),n=h.call(r,d)},o)}}function M(e){var i,s,n=e,o=function(t){return""+t.text};t.isArray(n)&&(s=n,n={results:s}),!1===t.isFunction(n)&&(s=n,n=function(){return s});var a=n();return a.text&&(o=a.text,t.isFunction(o)||(i=a.text,o=function(t){return t[i]})),function(e){var i,s=e.term,a={results:[]};if(""===s)return void e.callback(n());i=function(n,a){var r,l;if(n=n[0],n.children){r={};for(l in n)n.hasOwnProperty(l)&&(r[l]=n[l]);r.children=[],t(n.children).each2(function(t,e){i(e,r.children)}),(r.children.length||e.matcher(s,o(r),n))&&a.push(r)}else e.matcher(s,o(n),n)&&a.push(n)},t(n().results).each2(function(t,e){i(e,a.results)}),e.callback(a)}}function S(e){var s=t.isFunction(e);return function(n){var o=n.term,a={results:[]},r=s?e(n):e;t.isArray(r)&&(t(r).each(function(){var t=this.text!==i,e=t?this.text:this;(""===o||n.matcher(o,e))&&a.results.push(t?this:{id:this,text:this})}),n.callback(a))}}function T(e,i){if(t.isFunction(e))return!0;if(!e)return!1;if("string"==typeof e)return!0;throw new Error(i+" must be a string, function, or falsy value")}function C(e,i){if(t.isFunction(e)){var s=Array.prototype.slice.call(arguments,2);return e.apply(i,s)}return e}function A(e){var i=0;return t.each(e,function(t,e){e.children?i+=A(e.children):i++}),i}function E(t,e,s,n){var o,a,l,h,c,d=t,p=!1;if(!n.createSearchChoice||!n.tokenSeparators||n.tokenSeparators.length<1)return i;for(;;){for(a=-1,l=0,h=n.tokenSeparators.length;l<h&&(c=n.tokenSeparators[l],!((a=t.indexOf(c))>=0));l++);if(a<0)break;if(o=t.substring(0,a),t=t.substring(a+c.length),o.length>0&&(o=n.createSearchChoice.call(this,o,e))!==i&&null!==o&&n.id(o)!==i&&null!==n.id(o)){for(p=!1,l=0,h=e.length;l<h;l++)if(r(n.id(o),n.id(e[l]))){p=!0;break}p||s(o)}}return d!==t?t:void 0}function P(){var e=this;t.each(arguments,function(t,i){e[i].remove(),e[i]=null})}function O(e,i){var s=function(){};return s.prototype=new e,s.prototype.constructor=s,s.prototype.parent=e.prototype,s.prototype=t.extend(s.prototype,i),s}if(window.Select2===i){var L,D,_,I,z,R,B,N,j={x:0,y:0},L={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(t){switch(t=t.which?t.which:t){case L.LEFT:case L.RIGHT:case L.UP:case L.DOWN:return!0}return!1},isControl:function(t){switch(t.which){case L.SHIFT:case L.CTRL:case L.ALT:return!0}return!!t.metaKey},isFunctionKey:function(t){return(t=t.which?t.which:t)>=112&&t<=123}},W="<div class='select2-measure-scrollbar'></div>",H={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};B=t(document),z=function(){var t=1;return function(){return t++}}(),D=O(Object,{bind:function(t){var e=this;return function(){t.apply(e,arguments)}},init:function(e){var s,n;this.opts=e=this.prepareOpts(e),this.id=e.id,e.element.data("select2")!==i&&null!==e.element.data("select2")&&e.element.data("select2").destroy(),this.container=this.createContainer(),this.liveRegion=t("<span>",{role:"status","aria-live":"polite"}).addClass("select2-hidden-accessible").appendTo(document.body),this.containerId="s2id_"+(e.element.attr("id")||"autogen"+z()),this.containerEventName=this.containerId.replace(/([.])/g,"_").replace(/([;&,\-\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.container.attr("title",e.element.attr("title")),this.body=t("body"),y(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.attr("style",e.element.attr("style")),this.container.css(C(e.containerCss,this.opts.element)),this.container.addClass(C(e.containerCssClass,this.opts.element)),this.elementTabIndex=this.opts.element.attr("tabindex"),this.opts.element.data("select2",this).attr("tabindex","-1").before(this.container).on("click.select2",m),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),y(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(C(e.dropdownCssClass,this.opts.element)),this.dropdown.data("select2",this),this.dropdown.on("click",m),this.results=s=this.container.find(".select2-results"),this.search=n=this.container.find("input.select2-input"),this.queryCount=0,this.resultsPage=0,this.context=null,this.initContainer(),this.container.on("click",m),d(this.results),this.dropdown.on("mousemove-filtered",".select2-results",this.bind(this.highlightUnderEvent)),this.dropdown.on("touchstart touchmove touchend",".select2-results",this.bind(function(t){this._touchEvent=!0,this.highlightUnderEvent(t)})),this.dropdown.on("touchmove",".select2-results",this.bind(this.touchMoved)),this.dropdown.on("touchstart touchend",".select2-results",this.bind(this.clearTouchMoved)),this.dropdown.on("click",this.bind(function(t){this._touchEvent&&(this._touchEvent=!1,this.selectHighlighted())})),u(80,this.results),this.dropdown.on("scroll-debounced",".select2-results",this.bind(this.loadMoreIfNeeded)),t(this.container).on("change",".select2-input",function(t){t.stopPropagation()}),t(this.dropdown).on("change",".select2-input",function(t){t.stopPropagation()}),t.fn.mousewheel&&s.mousewheel(function(t,e,i,n){var o=s.scrollTop();n>0&&o-n<=0?(s.scrollTop(0),m(t)):n<0&&s.get(0).scrollHeight-s.scrollTop()+n<=s.height()&&(s.scrollTop(s.get(0).scrollHeight-s.height()),m(t))}),c(n),n.on("keyup-change input paste",this.bind(this.updateResults)),n.on("focus",function(){n.addClass("select2-focused")}),n.on("blur",function(){n.removeClass("select2-focused")}),this.dropdown.on("mouseup",".select2-results",this.bind(function(e){t(e.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(e),this.selectHighlighted(e))})),this.dropdown.on("click mouseup mousedown touchstart touchend focusin",function(t){t.stopPropagation()}),this.nextSearchTerm=i,t.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),null!==e.maximumInputLength&&this.search.attr("maxlength",e.maximumInputLength);var o=e.element.prop("disabled");o===i&&(o=!1),this.enable(!o);var r=e.element.prop("readonly");r===i&&(r=!1),this.readonly(r),N=N||a(),this.autofocus=e.element.prop("autofocus"),e.element.prop("autofocus",!1),this.autofocus&&this.focus(),this.search.attr("placeholder",e.searchInputPlaceholder)},destroy:function(){var t=this.opts.element,e=t.data("select2"),s=this;this.close(),t.length&&t[0].detachEvent&&t.each(function(){this.detachEvent("onpropertychange",s._sync)}),this.propertyObserver&&(this.propertyObserver.disconnect(),this.propertyObserver=null),this._sync=null,e!==i&&(e.container.remove(),e.liveRegion.remove(),e.dropdown.remove(),t.removeClass("select2-offscreen").removeData("select2").off(".select2").prop("autofocus",this.autofocus||!1),this.elementTabIndex?t.attr({tabindex:this.elementTabIndex}):t.removeAttr("tabindex"),t.show()),P.call(this,"container","liveRegion","dropdown","results","search")},optionToData:function(t){return t.is("option")?{id:t.prop("value"),text:t.text(),element:t.get(),css:t.attr("class"),disabled:t.prop("disabled"),locked:r(t.attr("locked"),"locked")||r(t.data("locked"),!0)}:t.is("optgroup")?{text:t.attr("label"),children:[],element:t.get(),css:t.attr("class")}:void 0},prepareOpts:function(e){var s,n,o,a,h=this;if(s=e.element,"select"===s.get(0).tagName.toLowerCase()&&(this.select=n=e.element),n&&t.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in e)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}),e=t.extend({},{populateResults:function(s,n,o){var a,r=this.opts.id,l=this.liveRegion;(a=function(s,n,c){var d,p,u,f,g,m,v,x,y,b;s=e.sortResults(s,n,o);var w=[];for(d=0,p=s.length;d<p;d+=1)u=s[d],g=!0===u.disabled,f=!g&&r(u)!==i,m=u.children&&u.children.length>0,v=t("<li></li>"),v.addClass("select2-results-dept-"+c),v.addClass("select2-result"),v.addClass(f?"select2-result-selectable":"select2-result-unselectable"),g&&v.addClass("select2-disabled"),m&&v.addClass("select2-result-with-children"),v.addClass(h.opts.formatResultCssClass(u)),v.attr("role","presentation"),x=t(document.createElement("div")),x.addClass("select2-result-label"),x.attr("id","select2-result-label-"+z()),x.attr("role","option"),b=e.formatResult(u,x,o,h.opts.escapeMarkup),b!==i&&(x.html(b),v.append(x)),m&&(y=t("<ul></ul>"),y.addClass("select2-result-sub"),a(u.children,y,c+1),v.append(y)),v.data("select2-data",u),w.push(v[0]);n.append(w),l.text(e.formatMatches(s.length))})(n,s,0)}},t.fn.select2.defaults,e),"function"!=typeof e.id&&(o=e.id,e.id=function(t){return t[o]}),t.isArray(e.element.data("select2Tags"))){if("tags"in e)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+e.element.attr("id");e.tags=e.element.data("select2Tags")}if(n?(e.query=this.bind(function(t){var e,n,o,a={results:[],more:!1},r=t.term;o=function(e,i){var s;e.is("option")?t.matcher(r,e.text(),e)&&i.push(h.optionToData(e)):e.is("optgroup")&&(s=h.optionToData(e),e.children().each2(function(t,e){o(e,s.children)}),s.children.length>0&&i.push(s))},e=s.children(),this.getPlaceholder()!==i&&e.length>0&&(n=this.getPlaceholderOption())&&(e=e.not(n)),e.each2(function(t,e){o(e,a.results)}),t.callback(a)}),e.id=function(t){return t.id}):"query"in e||("ajax"in e?(a=e.element.data("ajax-url"),a&&a.length>0&&(e.ajax.url=a),e.query=k.call(e.element,e.ajax)):"data"in e?e.query=M(e.data):"tags"in e&&(e.query=S(e.tags),e.createSearchChoice===i&&(e.createSearchChoice=function(e){return{id:t.trim(e),text:t.trim(e)}}),e.initSelection===i&&(e.initSelection=function(i,s){var n=[];t(l(i.val(),e.separator)).each(function(){var i={id:this,text:this},s=e.tags;t.isFunction(s)&&(s=s()),t(s).each(function(){if(r(this.id,i.id))return i=this,!1}),n.push(i)}),s(n)}))),"function"!=typeof e.query)throw"query function not defined for Select2 "+e.element.attr("id");if("top"===e.createSearchChoicePosition)e.createSearchChoicePosition=function(t,e){t.unshift(e)};else if("bottom"===e.createSearchChoicePosition)e.createSearchChoicePosition=function(t,e){t.push(e)};else if("function"!=typeof e.createSearchChoicePosition)throw"invalid createSearchChoicePosition option must be 'top', 'bottom' or a custom function";return e},monitorSource:function(){var e,s=this.opts.element,n=this;s.on("change.select2",this.bind(function(t){!0!==this.opts.element.data("select2-change-triggered")&&this.initSelection()})),this._sync=this.bind(function(){var t=s.prop("disabled");t===i&&(t=!1),this.enable(!t);var e=s.prop("readonly");e===i&&(e=!1),this.readonly(e),y(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(C(this.opts.containerCssClass,this.opts.element)),y(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(C(this.opts.dropdownCssClass,this.opts.element))}),s.length&&s[0].attachEvent&&s.each(function(){this.attachEvent("onpropertychange",n._sync)}),(e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver)!==i&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new e(function(e){t.each(e,n._sync)}),this.propertyObserver.observe(s.get(0),{attributes:!0,subtree:!1}))},triggerSelect:function(e){var i=t.Event("select2-selecting",{val:this.id(e),object:e,choice:e});return this.opts.element.trigger(i),!i.isDefaultPrevented()},triggerChange:function(e){e=e||{},e=t.extend({},e,{type:"change",val:this.val()}),this.opts.element.data("select2-change-triggered",!0),this.opts.element.trigger(e),this.opts.element.data("select2-change-triggered",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},isInterfaceEnabled:function(){return!0===this.enabledInterface},enableInterface:function(){var t=this._enabled&&!this._readonly,e=!t;return t!==this.enabledInterface&&(this.container.toggleClass("select2-container-disabled",e),this.close(),this.enabledInterface=t,!0)},enable:function(t){t===i&&(t=!0),this._enabled!==t&&(this._enabled=t,this.opts.element.prop("disabled",!t),this.enableInterface())},disable:function(){this.enable(!1)},readonly:function(t){t===i&&(t=!1),this._readonly!==t&&(this._readonly=t,this.opts.element.prop("readonly",t),this.enableInterface())},opened:function(){return!!this.container&&this.container.hasClass("select2-dropdown-open")},positionDropdown:function(){var e,i,s,n,o,a=this.dropdown,r=this.container.offset(),l=this.container.outerHeight(!1),h=this.container.outerWidth(!1),c=a.outerHeight(!1),d=t(window),p=d.width(),u=d.height(),f=d.scrollLeft()+p,g=d.scrollTop()+u,m=r.top+l,v=r.left,x=m+c<=g,y=r.top-c>=d.scrollTop(),b=a.outerWidth(!1),w=v+b<=f,k=a.hasClass("select2-drop-above");k?(i=!0,!y&&x&&(s=!0,i=!1)):(i=!1,!x&&y&&(s=!0,i=!0)),s&&(a.hide(),r=this.container.offset(),l=this.container.outerHeight(!1),h=this.container.outerWidth(!1),c=a.outerHeight(!1),f=d.scrollLeft()+p,g=d.scrollTop()+u,m=r.top+l,v=r.left,b=a.outerWidth(!1),w=v+b<=f,a.show(),this.focusSearch()),this.opts.dropdownAutoWidth?(o=t(".select2-results",a)[0],a.addClass("select2-drop-auto-width"),a.css("width",""),b=a.outerWidth(!1)+(o.scrollHeight===o.clientHeight?0:N.width),b>h?h=b:b=h,c=a.outerHeight(!1),w=v+b<=f):this.container.removeClass("select2-drop-auto-width"),"static"!==this.body.css("position")&&(e=this.body.offset(),m-=e.top,v-=e.left),w||(v=r.left+this.container.outerWidth(!1)-b),n={left:v,width:h},i?(n.top=r.top-c,n.bottom="auto",this.container.addClass("select2-drop-above"),a.addClass("select2-drop-above")):(n.top=m,n.bottom="auto",this.container.removeClass("select2-drop-above"),a.removeClass("select2-drop-above")),n=t.extend(n,C(this.opts.dropdownCss,this.opts.element)),a.css(n)},shouldOpen:function(){var e;return!this.opened()&&(!1!==this._enabled&&!0!==this._readonly&&(e=t.Event("select2-opening"),this.opts.element.trigger(e),!e.isDefaultPrevented()))},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")},open:function(){return!!this.shouldOpen()&&(this.opening(),B.on("mousemove.select2Event",function(t){j.x=t.pageX,j.y=t.pageY}),!0)},opening:function(){var e,i=this.containerEventName,n="scroll."+i,o="resize."+i,a="orientationchange."+i;this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.clearDropdownAlignmentPreference(),this.dropdown[0]!==this.body.children().last()[0]&&this.dropdown.detach().appendTo(this.body),e=t("#select2-drop-mask"),0==e.length&&(e=t(document.createElement("div")),e.attr("id","select2-drop-mask").attr("class","select2-drop-mask"),e.hide(),e.appendTo(this.body),e.on("mousedown touchstart click",function(i){s(e);var n,o=t("#select2-drop");o.length>0&&(n=o.data("select2"),n.opts.selectOnBlur&&n.selectHighlighted({noFocus:!0}),n.close(),i.preventDefault(),i.stopPropagation())})),this.dropdown.prev()[0]!==e[0]&&this.dropdown.before(e),t("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),e.show(),this.positionDropdown(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active");var r=this;this.container.parents().add(window).each(function(){t(this).on(o+" "+n+" "+a,function(t){r.opened()&&r.positionDropdown()})})},close:function(){if(this.opened()){var e=this.containerEventName,i="scroll."+e,s="resize."+e,n="orientationchange."+e;this.container.parents().add(window).each(function(){t(this).off(i).off(s).off(n)}),this.clearDropdownAlignmentPreference(),t("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open").removeClass("select2-container-active"),this.results.empty(),B.off("mousemove.select2Event"),this.clearSearch(),this.search.removeClass("select2-active"),this.opts.element.trigger(t.Event("select2-close"))}},externalSearch:function(t){this.open(),this.search.val(t),this.updateResults(!1)},clearSearch:function(){},getMaximumSelectionSize:function(){return C(this.opts.maximumSelectionSize,this.opts.element)},ensureHighlightVisible:function(){var e,i,s,n,o,a,r,l,h=this.results;if(!((i=this.highlight())<0)){if(0==i)return void h.scrollTop(0);e=this.findHighlightableChoices().find(".select2-result-label"),s=t(e[i]),l=(s.offset()||{}).top||0,n=l+s.outerHeight(!0),i===e.length-1&&(r=h.find("li.select2-more-results"),r.length>0&&(n=r.offset().top+r.outerHeight(!0))),o=h.offset().top+h.outerHeight(!0),n>o&&h.scrollTop(h.scrollTop()+(n-o)),a=l-h.offset().top,a<0&&"none"!=s.css("display")&&h.scrollTop(h.scrollTop()+a)}},findHighlightableChoices:function(){return this.results.find(".select2-result-selectable:not(.select2-disabled):not(.select2-selected)")},moveHighlight:function(e){for(var i=this.findHighlightableChoices(),s=this.highlight();s>-1&&s<i.length;){s+=e;var n=t(i[s]);if(n.hasClass("select2-result-selectable")&&!n.hasClass("select2-disabled")&&!n.hasClass("select2-selected")){this.highlight(s);break}}},highlight:function(e){var i,s,n=this.findHighlightableChoices();if(0===arguments.length)return o(n.filter(".select2-highlighted")[0],n.get());e>=n.length&&(e=n.length-1),e<0&&(e=0),this.removeHighlight(),i=t(n[e]),i.addClass("select2-highlighted"),this.search.attr("aria-activedescendant",i.find(".select2-result-label").attr("id")),this.ensureHighlightVisible(),this.liveRegion.text(i.text()),(s=i.data("select2-data"))&&this.opts.element.trigger({type:"select2-highlight",val:this.id(s),choice:s})},removeHighlight:function(){this.results.find(".select2-highlighted").removeClass("select2-highlighted")},touchMoved:function(){this._touchMoved=!0},clearTouchMoved:function(){this._touchMoved=!1},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(e){var i=t(e.target).closest(".select2-result-selectable");if(i.length>0&&!i.is(".select2-highlighted")){var s=this.findHighlightableChoices();this.highlight(s.index(i))}else 0==i.length&&this.removeHighlight()},loadMoreIfNeeded:function(){var t=this.results,e=t.find("li.select2-more-results"),i=this.resultsPage+1,s=this,n=this.search.val(),o=this.context;0!==e.length&&e.offset().top-t.offset().top-t.height()<=this.opts.loadMorePadding&&(e.addClass("select2-active"),this.opts.query({element:this.opts.element,term:n,page:i,context:o,matcher:this.opts.matcher,callback:this.bind(function(a){s.opened()&&(s.opts.populateResults.call(this,t,a.results,{term:n,page:i,context:o}),s.postprocessResults(a,!1,!1),!0===a.more?(e.detach().appendTo(t).text(C(s.opts.formatLoadMore,s.opts.element,i+1)),window.setTimeout(function(){s.loadMoreIfNeeded()},10)):e.remove(),s.positionDropdown(),s.resultsPage=i,s.context=a.context,this.opts.element.trigger({type:"select2-loaded",items:a}))})}))},tokenize:function(){},updateResults:function(e){function s(){h.removeClass("select2-active"),p.positionDropdown(),c.find(".select2-no-results,.select2-selection-limit,.select2-searching").length?p.liveRegion.text(c.text()):p.liveRegion.text(p.opts.formatMatches(c.find(".select2-result-selectable").length))}function n(t){c.html(t),s()}var o,a,l,h=this.search,c=this.results,d=this.opts,p=this,u=h.val(),f=t.data(this.container,"select2-last-term");if((!0===e||!f||!r(u,f))&&(t.data(this.container,"select2-last-term",u),!0===e||!1!==this.showSearchInput&&this.opened())){l=++this.queryCount;var g=this.getMaximumSelectionSize();if(g>=1&&(o=this.data(),t.isArray(o)&&o.length>=g&&T(d.formatSelectionTooBig,"formatSelectionTooBig")))return void n("<li class='select2-selection-limit'>"+C(d.formatSelectionTooBig,d.element,g)+"</li>");if(h.val().length<d.minimumInputLength)return n(T(d.formatInputTooShort,"formatInputTooShort")?"<li class='select2-no-results'>"+C(d.formatInputTooShort,d.element,h.val(),d.minimumInputLength)+"</li>":""),void(e&&this.showSearch&&this.showSearch(!0));if(d.maximumInputLength&&h.val().length>d.maximumInputLength)return void n(T(d.formatInputTooLong,"formatInputTooLong")?"<li class='select2-no-results'>"+C(d.formatInputTooLong,d.element,h.val(),d.maximumInputLength)+"</li>":"");d.formatSearching&&0===this.findHighlightableChoices().length&&n("<li class='select2-searching'>"+C(d.formatSearching,d.element)+"</li>"),h.addClass("select2-active"),this.removeHighlight(),a=this.tokenize(),a!=i&&null!=a&&h.val(a),this.resultsPage=1,d.query({element:d.element,term:h.val(),page:this.resultsPage,context:null,matcher:d.matcher,callback:this.bind(function(o){var a;if(l==this.queryCount){if(!this.opened())return void this.search.removeClass("select2-active");if(o.hasError!==i&&T(d.formatAjaxError,"formatAjaxError"))return void n("<li class='select2-ajax-error'>"+C(d.formatAjaxError,d.element,o.jqXHR,o.textStatus,o.errorThrown)+"</li>");if(this.context=o.context===i?null:o.context,this.opts.createSearchChoice&&""!==h.val()&&(a=this.opts.createSearchChoice.call(p,h.val(),o.results))!==i&&null!==a&&p.id(a)!==i&&null!==p.id(a)&&0===t(o.results).filter(function(){return r(p.id(this),p.id(a))}).length&&this.opts.createSearchChoicePosition(o.results,a),0===o.results.length&&T(d.formatNoMatches,"formatNoMatches"))return void n("<li class='select2-no-results'>"+C(d.formatNoMatches,d.element,h.val())+"</li>");c.empty(),p.opts.populateResults.call(this,c,o.results,{term:h.val(),page:this.resultsPage,context:null}),!0===o.more&&T(d.formatLoadMore,"formatLoadMore")&&(c.append("<li class='select2-more-results'>"+d.escapeMarkup(C(d.formatLoadMore,d.element,this.resultsPage))+"</li>"),window.setTimeout(function(){p.loadMoreIfNeeded()},10)),this.postprocessResults(o,e),s(),this.opts.element.trigger({type:"select2-loaded",items:o})}})})}},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),this.close(),this.container.removeClass("select2-container-active"),this.search[0]===document.activeElement&&this.search.blur(),this.clearSearch(),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){f(this.search)},selectHighlighted:function(t){if(this._touchMoved)return void this.clearTouchMoved();var e=this.highlight(),i=this.results.find(".select2-highlighted"),s=i.closest(".select2-result").data("select2-data");s?(this.highlight(e),this.onSelect(s,t)):t&&t.noFocus&&this.close()},getPlaceholder:function(){var t;return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder||((t=this.getPlaceholderOption())!==i?t.text():i)},getPlaceholderOption:function(){if(this.select){var e=this.select.children("option").first();if(this.opts.placeholderOption!==i)return"first"===this.opts.placeholderOption&&e||"function"==typeof this.opts.placeholderOption&&this.opts.placeholderOption(this.select);if(""===t.trim(e.text())&&""===e.val())return e}},initContainerWidth:function(){function e(){var e,s,n,o,a,r;if("off"===this.opts.width)return null;if("element"===this.opts.width)return 0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px";if("copy"===this.opts.width||"resolve"===this.opts.width){if((e=this.opts.element.attr("style"))!==i)for(s=e.split(";"),o=0,a=s.length;o<a;o+=1)if(r=s[o].replace(/\s/g,""),null!==(n=r.match(/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i))&&n.length>=1)return n[1];return"resolve"===this.opts.width?(e=this.opts.element.css("width"),e.indexOf("%")>0?e:0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px"):null}return t.isFunction(this.opts.width)?this.opts.width():this.opts.width}var s=e.call(this);null!==s&&this.container.css("width",s)}}),_=O(D,{createContainer:function(){return t(document.createElement("div")).attr({class:"select2-container"}).html(["<a href='javascript:void(0)' class='select2-choice' tabindex='-1'>"," <span class='select2-chosen'>&#160;</span><abbr class='select2-search-choice-close'></abbr>"," <span class='select2-arrow' role='presentation'><b role='presentation'></b></span>","</a>","<label for='' class='select2-offscreen'></label>","<input class='select2-focusser select2-offscreen' type='text' aria-haspopup='true' role='button' />","<div class='select2-drop select2-display-none'>"," <div class='select2-search'>"," <label for='' class='select2-offscreen'></label>"," <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input' role='combobox' aria-expanded='true'"," aria-autocomplete='list' />"," </div>"," <ul class='select2-results' role='listbox'>"," </ul>","</div>"].join(""))},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.focusser.prop("disabled",!this.isInterfaceEnabled())},opening:function(){var e,s,n;this.opts.minimumResultsForSearch>=0&&this.showSearch(!0),this.parent.opening.apply(this,arguments),!1!==this.showSearchInput&&this.search.val(this.focusser.val()),this.opts.shouldFocusInput(this)&&(this.search.focus(),e=this.search.get(0),e.createTextRange?(s=e.createTextRange(),s.collapse(!1),s.select()):e.setSelectionRange&&(n=this.search.val().length,e.setSelectionRange(n,n))),""===this.search.val()&&this.nextSearchTerm!=i&&(this.search.val(this.nextSearchTerm),this.search.select()),this.focusser.prop("disabled",!0).val(""),this.updateResults(!0),this.opts.element.trigger(t.Event("select2-open"))},close:function(){this.opened()&&(this.parent.close.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},focus:function(){this.opened()?this.close():(this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus()},destroy:function(){t("label[for='"+this.focusser.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),P.call(this,"selection","focusser")},initContainer:function(){var e,i,n=this.container,o=this.dropdown,a=z();this.opts.minimumResultsForSearch<0?this.showSearch(!1):this.showSearch(!0),this.selection=e=n.find(".select2-choice"),this.focusser=n.find(".select2-focusser"),e.find(".select2-chosen").attr("id","select2-chosen-"+a),this.focusser.attr("aria-labelledby","select2-chosen-"+a),this.results.attr("id","select2-results-"+a),this.search.attr("aria-owns","select2-results-"+a),this.focusser.attr("id","s2id_autogen"+a),i=t("label[for='"+this.opts.element.attr("id")+"']"),this.focusser.prev().text(i.text()).attr("for",this.focusser.attr("id"));var r=this.opts.element.attr("title");this.opts.element.attr("title",r||i.text()),this.focusser.attr("tabindex",this.elementTabIndex),this.search.attr("id",this.focusser.attr("id")+"_search"),this.search.prev().text(t("label[for='"+this.focusser.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.search.on("keydown",this.bind(function(t){if(this.isInterfaceEnabled()&&229!=t.keyCode){if(t.which===L.PAGE_UP||t.which===L.PAGE_DOWN)return void m(t);switch(t.which){case L.UP:case L.DOWN:return this.moveHighlight(t.which===L.UP?-1:1),void m(t);case L.ENTER:return this.selectHighlighted(),void m(t);case L.TAB:return void this.selectHighlighted({noFocus:!0});case L.ESC:return this.cancel(t),void m(t)}}})),this.search.on("blur",this.bind(function(t){document.activeElement===this.body.get(0)&&window.setTimeout(this.bind(function(){this.opened()&&this.search.focus()}),0)})),this.focusser.on("keydown",this.bind(function(t){if(this.isInterfaceEnabled()&&t.which!==L.TAB&&!L.isControl(t)&&!L.isFunctionKey(t)&&t.which!==L.ESC){if(!1===this.opts.openOnEnter&&t.which===L.ENTER)return void m(t);if(t.which==L.DOWN||t.which==L.UP||t.which==L.ENTER&&this.opts.openOnEnter){if(t.altKey||t.ctrlKey||t.shiftKey||t.metaKey)return;return this.open(),void m(t)}return t.which==L.DELETE||t.which==L.BACKSPACE?(this.opts.allowClear&&this.clear(),void m(t)):void 0}})),c(this.focusser),this.focusser.on("keyup-change input",this.bind(function(t){if(this.opts.minimumResultsForSearch>=0){if(t.stopPropagation(),this.opened())return;this.open()}})),e.on("mousedown touchstart","abbr",this.bind(function(t){this.isInterfaceEnabled()&&(this.clear(),v(t),this.close(),this.selection.focus())})),e.on("mousedown touchstart",this.bind(function(i){s(e),this.container.hasClass("select2-container-active")||this.opts.element.trigger(t.Event("select2-focus")),this.opened()?this.close():this.isInterfaceEnabled()&&this.open(),m(i)})),o.on("mousedown touchstart",this.bind(function(){this.opts.shouldFocusInput(this)&&this.search.focus()})),e.on("focus",this.bind(function(t){m(t)})),this.focusser.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(t.Event("select2-focus")),this.container.addClass("select2-container-active")})).on("blur",this.bind(function(){this.opened()||(this.container.removeClass("select2-container-active"),this.opts.element.trigger(t.Event("select2-blur")))})),this.search.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(t.Event("select2-focus")),this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.setPlaceholder()},clear:function(e){var i=this.selection.data("select2-data");if(i){var s=t.Event("select2-clearing");if(this.opts.element.trigger(s),s.isDefaultPrevented())return;var n=this.getPlaceholderOption();this.opts.element.val(n?n.val():""),this.selection.find(".select2-chosen").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),!1!==e&&(this.opts.element.trigger({type:"select2-removed",val:this.id(i),choice:i}),this.triggerChange({removed:i}))}},initSelection:function(){if(this.isPlaceholderOptionSelected())this.updateSelection(null),this.close(),this.setPlaceholder();else{var t=this;this.opts.initSelection.call(null,this.opts.element,function(e){e!==i&&null!==e&&(t.updateSelection(e),t.close(),t.setPlaceholder(),t.nextSearchTerm=t.opts.nextSearchTerm(e,t.search.val()))})}},isPlaceholderOptionSelected:function(){var t;return this.getPlaceholder()!==i&&((t=this.getPlaceholderOption())!==i&&t.prop("selected")||""===this.opts.element.val()||this.opts.element.val()===i||null===this.opts.element.val())},prepareOpts:function(){var e=this.parent.prepareOpts.apply(this,arguments),i=this;return"select"===e.element.get(0).tagName.toLowerCase()?e.initSelection=function(t,e){var s=t.find("option").filter(function(){return this.selected&&!this.disabled});e(i.optionToData(s))}:"data"in e&&(e.initSelection=e.initSelection||function(i,s){var n=i.val(),o=null;e.query({matcher:function(t,i,s){var a=r(n,e.id(s));return a&&(o=s),a},callback:t.isFunction(s)?function(){s(o)}:t.noop})}),e},getPlaceholder:function(){return this.select&&this.getPlaceholderOption()===i?i:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var t=this.getPlaceholder();if(this.isPlaceholderOptionSelected()&&t!==i){if(this.select&&this.getPlaceholderOption()===i)return;this.selection.find(".select2-chosen").html(this.opts.escapeMarkup(t)),this.selection.addClass("select2-default"),this.container.removeClass("select2-allowclear")}},postprocessResults:function(t,e,i){var s=0,n=this;if(this.findHighlightableChoices().each2(function(t,e){if(r(n.id(e.data("select2-data")),n.opts.element.val()))return s=t,!1}),!1!==i&&(!0===e&&s>=0?this.highlight(s):this.highlight(0)),!0===e){var o=this.opts.minimumResultsForSearch;o>=0&&this.showSearch(A(t.results)>=o)}},showSearch:function(e){this.showSearchInput!==e&&(this.showSearchInput=e,this.dropdown.find(".select2-search").toggleClass("select2-search-hidden",!e),this.dropdown.find(".select2-search").toggleClass("select2-offscreen",!e),t(this.dropdown,this.container).toggleClass("select2-with-searchbox",e))},onSelect:function(t,e){if(this.triggerSelect(t)){var i=this.opts.element.val(),s=this.data();this.opts.element.val(this.id(t)),this.updateSelection(t),this.opts.element.trigger({type:"select2-selected",val:this.id(t),choice:t}),this.nextSearchTerm=this.opts.nextSearchTerm(t,this.search.val()),this.close(),e&&e.noFocus||!this.opts.shouldFocusInput(this)||this.focusser.focus(),r(i,this.id(t))||this.triggerChange({added:t,removed:s})}},updateSelection:function(t){var e,s,n=this.selection.find(".select2-chosen");this.selection.data("select2-data",t),n.empty(),null!==t&&(e=this.opts.formatSelection(t,n,this.opts.escapeMarkup)),e!==i&&n.append(e),s=this.opts.formatSelectionCssClass(t,n),s!==i&&n.addClass(s),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==i&&this.container.addClass("select2-allowclear")},val:function(){var t,e=!1,s=null,n=this,o=this.data();if(0===arguments.length)return this.opts.element.val();if(t=arguments[0],arguments.length>1&&(e=arguments[1]),this.select)this.select.val(t).find("option").filter(function(){return this.selected}).each2(function(t,e){return s=n.optionToData(e),!1}),this.updateSelection(s),this.setPlaceholder(),e&&this.triggerChange({added:s,removed:o});else{if(!t&&0!==t)return void this.clear(e);if(this.opts.initSelection===i)throw new Error("cannot call val() if initSelection() is not defined");this.opts.element.val(t),this.opts.initSelection(this.opts.element,function(t){n.opts.element.val(t?n.id(t):""),n.updateSelection(t),n.setPlaceholder(),e&&n.triggerChange({added:t,removed:o})})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(t){var e,s=!1;if(0===arguments.length)return e=this.selection.data("select2-data"),e==i&&(e=null),e;arguments.length>1&&(s=arguments[1]),t?(e=this.data(),this.opts.element.val(t?this.id(t):""),this.updateSelection(t),s&&this.triggerChange({added:t,removed:e})):this.clear(s)}}),I=O(D,{createContainer:function(){return t(document.createElement("div")).attr({class:"select2-container select2-container-multi"}).html(["<ul class='select2-choices'>"," <li class='select2-search-field'>"," <label for='' class='select2-offscreen'></label>"," <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'>"," </li>","</ul>","<div class='select2-drop select2-drop-multi select2-display-none'>"," <ul class='select2-results'>"," </ul>","</div>"].join(""))},prepareOpts:function(){var e=this.parent.prepareOpts.apply(this,arguments),i=this;return"select"===e.element.get(0).tagName.toLowerCase()?e.initSelection=function(t,e){var s=[];t.find("option").filter(function(){return this.selected&&!this.disabled}).each2(function(t,e){s.push(i.optionToData(e))}),e(s)}:"data"in e&&(e.initSelection=e.initSelection||function(i,s){var n=l(i.val(),e.separator),o=[];e.query({matcher:function(i,s,a){var l=t.grep(n,function(t){return r(t,e.id(a))}).length;return l&&o.push(a),l},callback:t.isFunction(s)?function(){for(var t=[],i=0;i<n.length;i++)for(var a=n[i],l=0;l<o.length;l++){var h=o[l];if(r(a,e.id(h))){t.push(h),o.splice(l,1);break}}s(t)}:t.noop})}),e},selectChoice:function(t){var e=this.container.find(".select2-search-choice-focus");e.length&&t&&t[0]==e[0]||(e.length&&this.opts.element.trigger("choice-deselected",e),e.removeClass("select2-search-choice-focus"),t&&t.length&&(this.close(),t.addClass("select2-search-choice-focus"),this.opts.element.trigger("choice-selected",t)))},destroy:function(){t("label[for='"+this.search.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),P.call(this,"searchContainer","selection")},initContainer:function(){var e,i=".select2-choices";this.searchContainer=this.container.find(".select2-search-field"),this.selection=e=this.container.find(i);var s=this;this.selection.on("click",".select2-search-choice:not(.select2-locked)",function(e){s.search[0].focus(),s.selectChoice(t(this))}),this.search.attr("id","s2id_autogen"+z()),this.search.prev().text(t("label[for='"+this.opts.element.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.search.on("input paste",this.bind(function(){this.search.attr("placeholder")&&0==this.search.val().length||this.isInterfaceEnabled()&&(this.opened()||this.open())})),this.search.attr("tabindex",this.elementTabIndex),this.keydowns=0,this.search.on("keydown",this.bind(function(t){if(this.isInterfaceEnabled()){++this.keydowns;var i=e.find(".select2-search-choice-focus"),s=i.prev(".select2-search-choice:not(.select2-locked)"),n=i.next(".select2-search-choice:not(.select2-locked)"),o=g(this.search);if(i.length&&(t.which==L.LEFT||t.which==L.RIGHT||t.which==L.BACKSPACE||t.which==L.DELETE||t.which==L.ENTER)){var a=i;return t.which==L.LEFT&&s.length?a=s:t.which==L.RIGHT?a=n.length?n:null:t.which===L.BACKSPACE?this.unselect(i.first())&&(this.search.width(10),a=s.length?s:n):t.which==L.DELETE?this.unselect(i.first())&&(this.search.width(10),a=n.length?n:null):t.which==L.ENTER&&(a=null),this.selectChoice(a),m(t),void(a&&a.length||this.open())}if((t.which===L.BACKSPACE&&1==this.keydowns||t.which==L.LEFT)&&0==o.offset&&!o.length)return this.selectChoice(e.find(".select2-search-choice:not(.select2-locked)").last()),void m(t);if(this.selectChoice(null),this.opened())switch(t.which){case L.UP:case L.DOWN:return this.moveHighlight(t.which===L.UP?-1:1),void m(t);case L.ENTER:return this.selectHighlighted(),void m(t);case L.TAB:return this.selectHighlighted({noFocus:!0}),void this.close();case L.ESC:return this.cancel(t),void m(t)}if(t.which!==L.TAB&&!L.isControl(t)&&!L.isFunctionKey(t)&&t.which!==L.BACKSPACE&&t.which!==L.ESC){if(t.which===L.ENTER){if(!1===this.opts.openOnEnter)return;if(t.altKey||t.ctrlKey||t.shiftKey||t.metaKey)return}this.open(),t.which!==L.PAGE_UP&&t.which!==L.PAGE_DOWN||m(t),t.which===L.ENTER&&m(t)}}})),this.search.on("keyup",this.bind(function(t){this.keydowns=0,this.resizeSearch()})),this.search.on("blur",this.bind(function(e){this.container.removeClass("select2-container-active"),this.search.removeClass("select2-focused"),this.selectChoice(null),this.opened()||this.clearSearch(),e.stopImmediatePropagation(),this.opts.element.trigger(t.Event("select2-blur"))})),this.container.on("click",i,this.bind(function(e){this.isInterfaceEnabled()&&(t(e.target).closest(".select2-search-choice").length>0||(this.selectChoice(null),this.clearPlaceholder(),this.container.hasClass("select2-container-active")||this.opts.element.trigger(t.Event("select2-focus")),this.open(),this.focusSearch(),e.preventDefault()))})),this.container.on("focus",i,this.bind(function(){this.isInterfaceEnabled()&&(this.container.hasClass("select2-container-active")||this.opts.element.trigger(t.Event("select2-focus")),this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder())})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.clearSearch()},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.search.prop("disabled",!this.isInterfaceEnabled())},initSelection:function(){if(""===this.opts.element.val()&&""===this.opts.element.text()&&(this.updateSelection([]),this.close(),this.clearSearch()),this.select||""!==this.opts.element.val()){var t=this;this.opts.initSelection.call(null,this.opts.element,function(e){e!==i&&null!==e&&(t.updateSelection(e),t.close(),t.clearSearch())})}},clearSearch:function(){var t=this.getPlaceholder(),e=this.getMaxSearchWidth();t!==i&&0===this.getVal().length&&!1===this.search.hasClass("select2-focused")?(this.search.val(t).addClass("select2-default"),this.search.width(e>0?e:this.container.css("width"))):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.clearPlaceholder(),this.resizeSearch(),this.parent.opening.apply(this,arguments),this.focusSearch(),""===this.search.val()&&this.nextSearchTerm!=i&&(this.search.val(this.nextSearchTerm),this.search.select()),this.updateResults(!0),this.opts.shouldFocusInput(this)&&this.search.focus(),this.opts.element.trigger(t.Event("select2-open"))},close:function(){this.opened()&&this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus()},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(e){var i=[],s=[],n=this;t(e).each(function(){o(n.id(this),i)<0&&(i.push(n.id(this)),s.push(this))}),e=s,this.selection.find(".select2-search-choice").remove(),t(e).each(function(){n.addSelectedChoice(this)}),n.postprocessResults()},tokenize:function(){var t=this.search.val();null!=(t=this.opts.tokenizer.call(this,t,this.data(),this.bind(this.onSelect),this.opts))&&t!=i&&(this.search.val(t),t.length>0&&this.open())},onSelect:function(t,e){this.triggerSelect(t)&&""!==t.text&&(this.addSelectedChoice(t),this.opts.element.trigger({type:"selected",val:this.id(t),choice:t}),this.nextSearchTerm=this.opts.nextSearchTerm(t,this.search.val()),this.clearSearch(),this.updateResults(),!this.select&&this.opts.closeOnSelect||this.postprocessResults(t,!1,!0===this.opts.closeOnSelect),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.getMaximumSelectionSize()>0&&this.val().length>=this.getMaximumSelectionSize()?this.updateResults(!0):this.nextSearchTerm!=i&&(this.search.val(this.nextSearchTerm),this.updateResults(),this.search.select()),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:t}),e&&e.noFocus||this.focusSearch())},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(e){var s,n,o=!e.locked,a=t("<li class='select2-search-choice'> <div></div> <a href='#' class='select2-search-choice-close' tabindex='-1'></a></li>"),r=t("<li class='select2-search-choice select2-locked'><div></div></li>"),l=o?a:r,h=this.id(e),c=this.getVal();s=this.opts.formatSelection(e,l.find("div"),this.opts.escapeMarkup),s!=i&&l.find("div").replaceWith("<div>"+s+"</div>"),n=this.opts.formatSelectionCssClass(e,l.find("div")),n!=i&&l.addClass(n),o&&l.find(".select2-search-choice-close").on("mousedown",m).on("click dblclick",this.bind(function(e){this.isInterfaceEnabled()&&(this.unselect(t(e.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),m(e),this.close(),this.focusSearch())})).on("focus",this.bind(function(){this.isInterfaceEnabled()&&(this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"))})),l.data("select2-data",e),l.insertBefore(this.searchContainer),c.push(h),this.setVal(c)},unselect:function(e){var i,s,n=this.getVal();if(e=e.closest(".select2-search-choice"),0===e.length)throw"Invalid argument: "+e+". Must be .select2-search-choice";if(i=e.data("select2-data")){var a=t.Event("select2-removing");if(a.val=this.id(i),a.choice=i,this.opts.element.trigger(a),a.isDefaultPrevented())return!1;for(;(s=o(this.id(i),n))>=0;)n.splice(s,1),this.setVal(n),this.select&&this.postprocessResults();return e.remove(),this.opts.element.trigger({type:"select2-removed",val:this.id(i),choice:i}),this.triggerChange({removed:i}),!0}},postprocessResults:function(t,e,i){var s=this.getVal(),n=this.results.find(".select2-result"),a=this.results.find(".select2-result-with-children"),r=this;n.each2(function(t,e){o(r.id(e.data("select2-data")),s)>=0&&(e.addClass("select2-selected"),e.find(".select2-result-selectable").addClass("select2-selected"))}),a.each2(function(t,e){e.is(".select2-result-selectable")||0!==e.find(".select2-result-selectable:not(.select2-selected)").length||e.addClass("select2-selected")}),-1==this.highlight()&&!1!==i&&r.highlight(0),!this.opts.createSearchChoice&&!n.filter(".select2-result:not(.select2-selected)").length>0&&(!t||t&&!t.more&&0===this.results.find(".select2-no-results").length)&&T(r.opts.formatNoMatches,"formatNoMatches")&&this.results.append("<li class='select2-no-results'>"+C(r.opts.formatNoMatches,r.opts.element,r.search.val())+"</li>")},getMaxSearchWidth:function(){return this.selection.width()-h(this.search)},resizeSearch:function(){var t,e,i,s,n,o=h(this.search);t=x(this.search)+10,e=this.search.offset().left,i=this.selection.width(),s=this.selection.offset().left,n=i-(e-s)-o,n<t&&(n=i-o),n<40&&(n=i-o),n<=0&&(n=t),this.search.width(Math.floor(n))},getVal:function(){var t;return this.select?(t=this.select.val(),null===t?[]:t):(t=this.opts.element.val(),l(t,this.opts.separator))},setVal:function(e){var i;this.select?this.select.val(e):(i=[],t(e).each(function(){o(this,i)<0&&i.push(this)}),this.opts.element.val(0===i.length?"":i.join(this.opts.separator)))},buildChangeDetails:function(t,e){for(var e=e.slice(0),t=t.slice(0),i=0;i<e.length;i++)for(var s=0;s<t.length;s++)r(this.opts.id(e[i]),this.opts.id(t[s]))&&(e.splice(i,1),i>0&&i--,t.splice(s,1),s--);return{added:e,removed:t}},val:function(e,s){var n,o=this;if(0===arguments.length)return this.getVal();if(n=this.data(),n.length||(n=[]),!e&&0!==e)return this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),void(s&&this.triggerChange({added:this.data(),removed:n}));if(this.setVal(e),this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),s&&this.triggerChange(this.buildChangeDetails(n,this.data()));else{if(this.opts.initSelection===i)throw new Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(e){var i=t.map(e,o.id);o.setVal(i),o.updateSelection(e),o.clearSearch(),s&&o.triggerChange(o.buildChangeDetails(n,o.data()))})}this.clearSearch()},onSortStart:function(){if(this.select)throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var e=[],i=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){e.push(i.opts.id(t(this).data("select2-data")))}),this.setVal(e),this.triggerChange()},data:function(e,i){var s,n,o=this;if(0===arguments.length)return this.selection.children(".select2-search-choice").map(function(){return t(this).data("select2-data")}).get();n=this.data(),e||(e=[]),s=t.map(e,function(t){return o.opts.id(t)}),this.setVal(s),this.updateSelection(e),this.clearSearch(),i&&this.triggerChange(this.buildChangeDetails(n,this.data()))}}),t.fn.select2=function(){var s,n,a,r,l,h=Array.prototype.slice.call(arguments,0),c=["val","destroy","opened","open","close","focus","isFocused","container","dropdown","onSortStart","onSortEnd","enable","disable","readonly","positionDropdown","data","search"],d=["opened","isFocused","container","dropdown"],p=["val","data"],u={search:"externalSearch"};return this.each(function(){if(0===h.length||"object"===e(h[0]))s=0===h.length?{}:t.extend({},h[0]),s.element=t(this),"select"===s.element.get(0).tagName.toLowerCase()?l=s.element.prop("multiple"):(l=s.multiple||!1,"tags"in s&&(s.multiple=l=!0)),n=l?new window.Select2.class.multi:new window.Select2.class.single,n.init(s);else{if("string"!=typeof h[0])throw"Invalid arguments to select2 plugin: "+h;if(o(h[0],c)<0)throw"Unknown method: "+h[0];if(r=i,(n=t(this).data("select2"))===i)return;if(a=h[0],"container"===a?r=n.container:"dropdown"===a?r=n.dropdown:(u[a]&&(a=u[a]),r=n[a].apply(n,h.slice(1))),o(h[0],d)>=0||o(h[0],p)>=0&&1==h.length)return!1}}),r===i?this:r},t.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(t,e,i,s){var n=[];return b(t.text,i.term,n,s),n.join("")},formatSelection:function(t,e,s){return t?s(t.text):i},sortResults:function(t,e,i){return t},formatResultCssClass:function(t){return t.css},formatSelectionCssClass:function(t,e){return i},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(t){return t==i?null:t.id},matcher:function(t,e){return n(""+e).toUpperCase().indexOf(n(""+t).toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:E,escapeMarkup:w,blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(t){return t},adaptDropdownCssClass:function(t){return null},nextSearchTerm:function(t,e){return i},searchInputPlaceholder:"",createSearchChoicePosition:"top",shouldFocusInput:function(t){return!(("ontouchstart"in window||navigator.msMaxTouchPoints>0)&&t.opts.minimumResultsForSearch<0)}},t.fn.select2.locales=[],t.fn.select2.locales.en={formatMatches:function(t){return 1===t?"One result is available, press enter to select it.":t+" results are available, use up and down arrow keys to navigate."},formatNoMatches:function(){return"No matches found"},formatAjaxError:function(t,e,i){return"Loading failed"},formatInputTooShort:function(t,e){var i=e-t.length;return"Please enter "+i+" or more character"+(1==i?"":"s")},formatInputTooLong:function(t,e){var i=t.length-e;return"Please delete "+i+" character"+(1==i?"":"s")},formatSelectionTooBig:function(t){return"You can only select "+t+" item"+(1==t?"":"s")},formatLoadMore:function(t){return"Loading more results…"},formatSearching:function(){return"Searching…"}},t.extend(t.fn.select2.defaults,t.fn.select2.locales.en),t.fn.select2.ajaxDefaults={transport:t.ajax,params:{type:"GET",cache:!1,dataType:"json"}},window.Select2={query:{ajax:k,local:M,tags:S},util:{debounce:p,markMatch:b,escapeMarkup:w,stripDiacritics:n},class:{abstract:D,single:_,multi:I}}}}(t)}).call(e,i(0))},8:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s={fragments:{fb_pixel_box:".panel.panel-settings-set-fb-px",ca_list:".panel.panel-ca-list",conversions_list:".panel.panel-ce-tracking",logs_list:".panel.panel-log-list",sidebar:".plugin-sidebar",product_feed_status:".js-product-feed-info",product_feed_schedule:".js-schedule-options.schedule-update"},loaders:[{action:"get_user_roles",dropdown:"input.user-roles"},{action:"get_standard_events",dropdown:"input.standard-events"},{action:"get_custom_fields",dropdown:"input.custom-fields"},{action:"get_languages",dropdown:"#conditions_language"},{action:"get_device_types",dropdown:"#conditions_device_types"},{action:"get_categories",dropdown:""},{action:"get_tags",dropdown:""},{action:"get_posts",dropdown:""},{action:"get_dpa_params",dropdown:""},{action:"get_currencies",dropdown:""}]};e.default=s},9:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=i(0),n=function(t){return t&&t.__esModule?t:{default:t}}(s);i(22),i(23),i(24),i(25),i(26),i(27),i(7);var o={dropdown_data:[],unsaved:!1,set_unsaved:function(){o.unsaved=!0},set_saved:function(){o.unsaved=!1},bootstrap_components:function(t){var e=(0,n.default)(void 0!==t?t.currentTarget:document);e.find(".collapse").collapse({toggle:!1}),e.find('[data-toggle="tooltip"], [data-tooltip]').tooltip(),e.find('[data-toggle="popover"]').popover({container:"#wpbody .pixel-caffeine-wrapper"}),n.default.material.init()},custom_dropdown:function(t){var e=(0,n.default)(void 0!==t?t.currentTarget:document);e.find("select").select2({minimumResultsForSearch:5}),e.find("input.multi-tags").select2({tags:[]}),e.find("select.dropdown-width-max").select2({minimumResultsForSearch:5,dropdownCssClass:"dropdown-width-max"})},fields_components:function(t){var e=(0,n.default)(void 0!==t?t.currentTarget:document.body);e.find("select.js-dep").on("change",function(){var t=(0,n.default)(this),e=t.closest("form"),i=t.val(),s=t.attr("id"),o=e.find('div[class*="'+s+'"]'),a=e.find("."+s+"-"+i);o.hide(),a.length&&a.show()}).trigger("change"),e.find(".control-wrap .checkbox .inline-text").on("focus",function(){(0,n.default)(this).siblings('input[type="checkbox"]').prop("checked",!0).trigger("change")}),e.find('.control-wrap .checkbox input[type="checkbox"]').on("change",function(){var t=(0,n.default)(this),e=t.is(":checked");t.closest("div.checkbox").removeClass("checked unchecked").addClass(e?"checked":"unchecked").find("input.inline-text").prop("disabled",!e)}).trigger("change"),e.find(".js-show-advanced-data").on("change.components",function(){var t=(0,n.default)(this);t.closest("form").find("div.advanced-data").collapse(t.is(":checked")?"show":"hide")}).trigger("change.components"),e.find("select#event_standard_events").on("change.components",function(){var t=(0,n.default)(this),e=t.closest("form"),i=t.find("option:selected").data("fields");e.find("div.event-field").hide(),n.default.each(i.split(",").map(function(t){return t.trim()}),function(t,i){e.find("div.event-field."+i+"-field").show()})}).trigger("change.components"),e.find("input.js-switch-labeled-tosave").on("change.components",function(){var t=(0,n.default)(this),e=t.closest(".form-group").find(".text-status"),i=t.is(":checked")?"yes":"no",s=t.closest(".togglebutton"),o=t.data("original-value");void 0===e.data("original-status")&&e.data("original-status",e.clone()),o!==i?(e.hasClass("text-status-pending")||s.addClass("pending"),e.addClass("text-status-pending").text(aepc_admin.switch_unsaved)):((0,n.default)(e.data("original-status")).hasClass("text-status-pending")||s.removeClass("pending"),e.replaceWith(e.data("original-status")))}).trigger("change.components"),e.find("input.js-switch-labeled").on("change.components",function(){var t=(0,n.default)(this),e=t.closest(".form-group").find(".text-status");e.removeClass("hide"),t.is(":checked")?e.filter(".text-status-off").addClass("hide"):e.filter(".text-status-on").addClass("hide")});var i=function(){e.find("div.js-custom-params").children("div").each(function(t){(0,n.default)(this).find('input[type="text"]').each(function(){var e=(0,n.default)(this);e.attr("name",e.attr("name").replace(/\[[0-9]+\]/,"["+t+"]")),e.attr("id",e.attr("id").replace(/_[0-9]+$/,"_"+t))})})};e.find(".js-add-custom-param").on("click",function(t){if("undefined"==typeof wp)return t;t.preventDefault();var e=wp.template("custom-params"),i=(0,n.default)(this).closest("div.js-custom-params"),s=parseInt(i.children("div").length);i.find(".js-custom-param:last").length?i.find(".js-custom-param:last").after(e({index:s-1})):i.prepend(e({index:s-1}))}),e.find(".js-custom-params").on("click",".js-delete-custom-param",function(t){t.preventDefault();var e=(0,n.default)(this),s=(0,n.default)("#modal-confirm-delete"),o=e.closest(".js-custom-param"),a=function(){s.modal("hide"),o.remove(),i()};""===o.find('input[id^="event_custom_params_key"]').val()&&""===o.find('input[id^="event_custom_params_value"]').val()?a():s.modal("show").one("click",".btn-ok",a)}),e.find("select[data-selected]").each(function(){var t=(0,n.default)(this),e=t.data("selected");t.data("selected","").val(e).trigger("change")}),e.find("select[data-selected]").each(function(){var t=(0,n.default)(this),e=t.data("selected");t.val(e).trigger("change")})},analyzed_distance:function(){var t=function(t){var e=(0,n.default)(window).scrollTop();return(0,n.default)(t).offset().top-e}(".plugin-content"),e=parseFloat((0,n.default)(".wp-toolbar").css("padding-top")),i=(0,n.default)(".alert-wrap"),s=i.height(),o=(0,n.default)(".alert-wrap-ghost");t<=e?(0===o.length&&i.after('<div class="alert-wrap-ghost"></div>').next(".alert-wrap-ghost").height(s),i.addClass("alert-fixed").css({top:e}).width((0,n.default)(".plugin-content").width())):(i.removeClass("alert-fixed").width("100%"),o.remove())}};e.default=o},92:function(t,e,i){i(93),i(96),i(9),i(8),i(99),i(17),t.exports=i(100)},93:function(t,e,i){"use strict";(function(t){function e(t){return t&&t.__esModule?t:{default:t}}var s=i(0),n=e(s);i(94),i(22),i(23),i(24),i(25),i(26),i(95),i(27),i(7);var o=i(8),a=e(o),r=i(17),l=e(r),h=i(9),c=e(h);t(document).ready(function(){var t=c.default.dropdown_data,e=function(e){var i=(0,n.default)(void 0!==e?e.currentTarget:document.body),s=a.default.loaders;n.default.each(s,function(e,s){if(aepc_admin.actions.hasOwnProperty(s.action)){if(t.hasOwnProperty(s.action))return void(""!==s.dropdown&&l.default.apply_autocomplete(i.find(s.dropdown),t[s.action]));t[s.action]=[],n.default.ajax({url:aepc_admin.ajax_url,data:{action:aepc_admin.actions[s.action].name,_wpnonce:aepc_admin.actions[s.action].nonce},success:function(e){t[s.action]=e,""!==s.dropdown&&l.default.apply_autocomplete(i.find(s.dropdown),e),(0,n.default)(document).trigger("loader_data_loaded",[t])},dataType:"json"})}}),i.find("#taxonomy_key").on("change.data",function(){var e=(0,n.default)(this).val().replace("tax_","");t.hasOwnProperty("get_categories")&&t.get_categories.hasOwnProperty(e)&&l.default.apply_autocomplete(i.find("#taxonomy_terms"),t.get_categories[e])}),i.find("#tag_key").on("change.data",function(){var e=(0,n.default)(this).val().replace("tax_","");t.hasOwnProperty("get_tags")&&t.get_tags.hasOwnProperty(e)&&l.default.apply_autocomplete(i.find("#tag_terms"),t.get_tags[e])}),i.find("#pt_key").on("change.data",function(){var e=(0,n.default)(this).val();t.hasOwnProperty("get_posts")&&t.get_posts.hasOwnProperty(e)&&l.default.apply_autocomplete(i.find("#pt_posts"),t.get_posts[e])}),i.find("#event_categories").on("change.data",function(){i.find("#taxonomy_key").trigger("change.data")}),i.find("#event_tax_post_tag").on("change.data",function(){i.find("#tag_key").trigger("change.data")}),i.find("#event_posts").on("change.data",function(){i.find("#pt_key").trigger("change.data")}),i.find("#event_pages").on("change.data",function(){t.hasOwnProperty("get_posts")&&t.get_posts.hasOwnProperty("page")&&l.default.apply_autocomplete(i.find("#pages"),t.get_posts.page)}),i.find("#event_custom_fields").on("change.data",function(e){var s=[{id:"[[any]]",text:aepc_admin.filter_any}];s=n.default.merge(s,t.get_custom_fields),i.find("#custom_field_keys option").remove(),i.find("#custom_field_keys").append(n.default.map(s,function(t,e){return"[[any]]"===t.id&&(t.text="--- "+t.text+" ---"),(0,n.default)("<option>",{val:t.id,text:t.text})}))}),i.find(".js-ecommerce input, .js-events input").on("change.data",function(){i.find("#dpa_key").select2({placeholder:aepc_admin.filter_custom_field_placeholder,searchInputPlaceholder:aepc_admin.filter_custom_field_placeholder,data:{results:t.get_dpa_params},query:function(e){var i={results:t.get_dpa_params};""!==e.term&&(i.results=n.default.merge([{id:e.term,text:e.term}],i.results)),i.results=i.results.filter(function(t){return e.matcher(e.term,t.text)}),e.callback(i)}}).select2("data",{id:i.find("#dpa_key").val(),text:i.find("#dpa_key").val()}).on("change",function(){i.find("#dpa_value").val("")}).off("change.dpa").on("change.dpa",function(){var e=(0,n.default)(this).val(),s=[];"content_ids"===e?t.hasOwnProperty("get_posts")&&(t.get_posts.hasOwnProperty("product")&&(s=t.get_posts.product.concat(s)),t.get_posts.hasOwnProperty("download")&&(s=t.get_posts.download.concat(s))):"content_category"===e?t.hasOwnProperty("get_categories")&&(t.get_categories.hasOwnProperty("product_cat")&&(s=t.get_categories.product_cat.concat(s)),t.get_categories.hasOwnProperty("download_category")&&(s=t.get_categories.download_category.concat(s))):"content_type"===e?s=["product","product_group"]:"currency"===e&&t.hasOwnProperty("get_currencies")&&(s=t.get_currencies.map(function(t){var e=document.createElement("textarea");return e.innerHTML=t.text,t.text=e.value,t})),s=s.filter(function(t,e){return!(0!==e&&"[[any]]"===t.id)}),i.find("#dpa_value").select2({tags:s})}).triggerHandler("change.dpa")})},i=function(t){var e=(0,n.default)(void 0!==t?t.currentTarget:document);e.find("select.js-collapse").on("change.bs",function(){var t=(0,n.default)(this),i=t.find("option:selected");e.find(i.data("target")).hasClass("in")||(e.find(t.data("parent")).find(".collapse").collapse("hide"),e.find(i.data("target")).collapse("show"))}).trigger("change.bs"),e.find("input.js-collapse").on("change.bs",function(){var t=(0,n.default)(this),i=t.filter(":checked");e.find(i.data("target")).hasClass("in")||(e.find(t.data("parent")).find(".collapse").collapse("hide"),e.find(i.data("target")).collapse("show"))}).trigger("change.bs"),e.find("#ca_event_type").on("change.bs",function(){e.find(".collapse-parameters").find(".collapse").collapse("hide"),e.find(".js-collapse-events").find("input:checked").prop("checked",!1)}),(0,n.default)(document).on("click",function(t){(0,n.default)('[data-toggle="popover"],[data-original-title]').each(function(){(0,n.default)(this).is(t.target)||0!==(0,n.default)(this).has(t.target).length||0!==(0,n.default)(".popover").has(t.target).length||((((0,n.default)(this).popover("hide").data("bs.popover")||{}).inState||{}).click=!1)})}),c.default.bootstrap_components(t)},s=function(t){var e=t.find(".js-include-filters"),i=t.find(".js-exclude-filters"),s=t.find(".js-ca-filters");0===e.find("ul.list-filter").find("li").length?e.addClass("hide"):e.removeClass("hide"),0===i.find("ul.list-filter").find("li").length?i.addClass("hide"):i.removeClass("hide"),e.hasClass("hide")&&i.hasClass("hide")?s.find("div.no-filters-feedback").removeClass("hide"):(s.find("div.no-filters-feedback").addClass("hide"),e.find("ul.list-filter").find("li:first").find(".filter-and").remove(),i.find("ul.list-filter").find("li:first").find(".filter-and").remove())},o=function(t){var e=(0,n.default)(this),i=(0,n.default)(t.relatedTarget),o=i.closest("form");e.find("#ca-filter-form").on("submit",function(t){t.preventDefault();var e=(0,n.default)(this),a=e.data("scope"),r=o.find(".js-ca-filters"),h=wp.template("ca-filter-item"),c=e.find('[name^="ca_rule[][main_condition]"]:checked'),d=e.find('button[type="submit"]'),p=d.text(),u=r.find(".js-"+c.val()+"-filters"),f=c.add(e.find('[name^="ca_rule[][event_type]"]')).add(e.find('[name^="ca_rule[][event]"]:checked')).add(e.find(".collapse-parameters .collapse.in").find('[name^="ca_rule[][conditions]"]')),g=function(t){var c=(0,n.default)("<div />"),g="add"===a?r.find("li").length:i.closest("li").data("filter-id");if(l.default.removeLoader(e),!t||0===t.length)return l.default.addMessage(e.find(".modal-body"),"error",aepc_admin.filter_no_condition_error),void d.text(p);f.each(function(){var t=(0,n.default)(this),e=t.attr("name"),i=t.val();c.append((0,n.default)("<input />",{type:"hidden",name:e.replace("[]","["+g+"]"),value:i}))});var m=h({nfilters:u.find("li").length-("edit"===a&&n.default.contains(u.get()[0],i.get()[0])?1:0),statement:t,hidden_inputs:c.html(),index:g});"edit"===a&&n.default.contains(u.get()[0],i.get()[0])?i.closest("li").html((0,n.default)(m).html()):(u.find("ul").append(m),"edit"!==a||n.default.contains(u.get()[0],i.get()[0])||i.closest("li").remove()),s(o),e.closest(".modal").modal("hide"),e.off("submit")};if(l.default.removeMessage(e.find(".modal-body"),"error"),0===e.find(".js-collapse-events input:checked").length)return void l.default.addMessage(e.find(".modal-body"),"error",aepc_admin.filter_no_data_error);l.default.addLoader(e),d.text(aepc_admin.filter_saving),n.default.ajax({url:aepc_admin.ajax_url,method:"GET",data:{filter:f.serializeArray(),action:aepc_admin.actions.get_filter_statement.name,_wpnonce:aepc_admin.actions.get_filter_statement.nonce},success:g,dataType:"html"})})},r=function(t){(0,n.default)(void 0!==t?t.currentTarget:document.body).find(".list-filter").on("click",".btn-delete",function(t){t.preventDefault();var e=(0,n.default)(this).closest("form"),i=(0,n.default)("#modal-confirm-delete"),o=(0,n.default)(this).closest("li");i.modal("show",(0,n.default)(this)).one("click",".btn-ok",function(){i.modal("hide"),o.remove(),s(e)})}).on("click",".btn-edit",function(t){t.preventDefault();var e=((0,n.default)(this).closest("form"),(0,n.default)("#modal-ca-edit-filter")),i=(0,n.default)(this).closest("li"),s=i.find(".hidden-fields input");e.on("modal-template-loaded",function(t){var e=(0,n.default)(this).find("form"),i=s.filter('[name*="[main_condition]"]').val();e.find('input[name*="main_condition"][value="'+i+'"]').prop("checked",!0).closest("label").addClass("active").siblings().removeClass("active");var o=s.filter('[name*="[event_type]"]').val(),a=(e.find('select[name*="event_type"]').val(o),s.filter('[name*="[event]"]').val()),r=e.find('input[name*="event"][value="'+a+'"]').prop("checked",!0),l=e.find(r.data("target")),h=s.filter('[name*="[conditions][0][key]"]').val(),c=s.filter('[name*="[conditions][0][operator]"]').val(),d=s.filter('[name*="[conditions][0][value]"]').val();l.find('[name*="[conditions][0][key]"]').is("#custom_field_keys")&&l.find("#custom_field_keys").append((0,n.default)("<option />",{val:h,text:h})),l.find('[name*="[conditions][0][key]"]').val(h),l.find('[name*="[conditions][0][operator]"]').val(c),l.find('[name*="[conditions][0][value]"]').val(d)}).one("show.bs.modal",function(){var t=(0,n.default)(this).find("form");t.find('[name*="event_type"]:checked').trigger("change.data"),t.find('[name*="event"]:checked').trigger("change.data"),t.find('.collapse.in [name*="[conditions][0][key]"]').trigger("change.data"),t.find('.collapse.in [name*="[conditions][0][operator]"]').trigger("change.data"),t.find('.collapse.in [name*="[conditions][0][value]"]').trigger("change.data")}).modal("show",(0,n.default)(this))})},h=function(e){var i=void 0!==e?(0,n.default)(this):(0,n.default)(document.body),s=i.find("select#aepc_account_id"),o=i.find("select#aepc_pixel_id"),a=(0,n.default)("form#mainform").find("#aepc_account_id").val(),r=(0,n.default)("form#mainform").find("#aepc_pixel_id").val(),h=function(){var e=s.val()?JSON.parse(s.val()).id:"";if(t.hasOwnProperty("get_pixel_ids")&&t.get_pixel_ids.hasOwnProperty(e)){var i=n.default.merge([{id:"",text:""}],t.get_pixel_ids[e]);1===i.length?(i[0].text=aepc_admin.fb_option_no_pixel,o.prop("disabled",!0)):o.prop("disabled",!1),o.find("option").remove(),o.append(n.default.map(i,function(t,e){return(0,n.default)("<option>",{val:t.id,text:t.text,selected:t.id===r})})),2===o.find("option").length&&o.find("option:eq(1)").prop("selected",!0),o.val(o.find("option:selected").val()).trigger("change")}},d=function(){var e=s.val()?JSON.parse(s.val()).id:"";l.default.addLoader(o),n.default.ajax({url:aepc_admin.ajax_url,data:{action:aepc_admin.actions.get_pixel_ids.name,_wpnonce:aepc_admin.actions.get_pixel_ids.nonce,account_id:e},success:function(i){t.hasOwnProperty("get_pixel_ids")||(t.get_pixel_ids={}),t.get_pixel_ids[e]=i,h(),l.default.removeLoader(o)},dataType:"json"})},p=function(e){if(void 0!==e&&e.hasOwnProperty("type")&&"change"===e.type&&(o.val("").trigger("change"),o.find("option").remove()),s.val()){var i=s.val()?JSON.parse(s.val()).id:"";t.hasOwnProperty("get_pixel_ids")&&t.get_pixel_ids.hasOwnProperty(i)?h():d()}},u=function(){if(t.hasOwnProperty("get_account_ids")){var e=n.default.merge([{id:"",text:""}],t.get_account_ids);s.find("option").remove(),s.append(n.default.map(e,function(t,e){return(0,n.default)("<option>",{val:t.id,text:t.text,selected:t.id===a})})),s.on("change",p).trigger("change")}},f=function(){l.default.addLoader(s),n.default.ajax({url:aepc_admin.ajax_url,data:{action:aepc_admin.actions.get_account_ids.name,_wpnonce:aepc_admin.actions.get_account_ids.nonce},success:function(e){!1===e.success?(l.default.addMessage((0,n.default)(".js-options-group"),"error",e.data),c.default.set_saved()):(t.get_account_ids=e,u()),l.default.removeLoader(s)},dataType:"json"})};if(a&&r){var g=JSON.parse(a),m=JSON.parse(r);s.append((0,n.default)("<option>",{val:a,text:g.name+" (#"+g.id+")",selected:!0})).trigger("change"),o.append((0,n.default)("<option>",{val:r,text:m.name+" (#"+m.id+")",selected:!0})).trigger("change")}!function(){s.length<=0||(t.hasOwnProperty("get_account_ids")?u():f())}(),p()};!function(){n.default.fn.select2&&n.default.extend(n.default.fn.select2.defaults,{dropdownCssClass:"adespresso-select2",containerCssClass:"adespresso-select2",formatNoMatches:!1})}(),e(),i(),c.default.custom_dropdown(),h(),c.default.fields_components(),r(),(0,n.default)(".modal-confirm").on("show.bs.modal",function(t){var e=(0,n.default)(this),i=t.hasOwnProperty("relatedTarget")?(0,n.default)(t.relatedTarget).attr("href"):"";n.default.inArray(i,[void 0,"","#","#_"])<0&&e.one("click",".btn-ok",function(t){t.preventDefault();var s={"fb-disconnect":"fb_pixel_box","ca-delete":"ca_list","conversion-delete":"conversions_list"},o=i.match(new RegExp("action=("+Object.keys(s).join("|")+")(&|$)"));o?(l.default.addLoader(e.find(".modal-content")),n.default.ajax({url:i+(i.indexOf("?")?"&":"?")+"ajax=1",method:"GET",success:function(t){if(t.success&&((0,n.default)(".sec-overlay").removeClass("sec-overlay"),(0,n.default)(".sub-panel-fb-connect.bumping").removeClass("bumping"),l.default.reloadFragment(s[o[1]]),e.modal("hide"),l.default.removeLoader(e.find(".modal-content")),window.history&&window.history.pushState)){var i=window.location.href.replace(/(\?|\&)ref=fblogin/,"");window.history.pushState({path:i},"",i)}},dataType:"json"})):(e.modal("hide"),window.location=i)})}),(0,n.default)(".js-form-modal").on("show.bs.modal",function(t){if("undefined"==typeof wp)return t;var e=(0,n.default)(this),i=(0,n.default)(t.relatedTarget),s=i.data("config"),o=wp.template(e.attr("id"));e.find(".modal-content").html(o(s)),e.trigger("modal-template-loaded")}).on("show.bs.modal",i).on("show.bs.modal",c.default.custom_dropdown).on("show.bs.modal",e).on("show.bs.modal",c.default.fields_components).on("show.bs.modal",o).on("show.bs.modal",r),(0,n.default)(document).on("submit",'form[data-toggle="ajax"]',function(t){t.preventDefault();var e=(0,n.default)(this),i=e,s=e.find('[type="submit"]'),o=s.text(),r=e.offset().top-50;e.find(".modal-body").length?i=e.find(".modal-body").first():e.find(".panel-body").length&&(i=e.find(".panel-body").first()),l.default.removeMessage(i,"error"),e.find(".has-error").removeClass("has-error"),e.find(".help-block-error").remove(),l.default.addLoader(e),n.default.ajax({url:aepc_admin.ajax_url,method:"POST",data:e.serialize(),success:function(t){if(t.success){var h={"fb-connect-options":"fb_pixel_box","ca-clone":"ca_list","ca-edit":"ca_list","conversion-edit":"conversions_list"},c=Object.keys(h).map(function(t){return"#modal-"+t}).join(","),d={};if(e.closest(".modal").length&&e.closest(".modal").is(c)){if(l.default.reloadFragment(h[e.closest(".modal").attr("id").replace("modal-","")]),e.closest(".modal").modal("hide"),l.default.removeLoader(e),window.history&&window.history.pushState){var p=window.location.href.replace(/(\?|\&)ref=fblogin/,"");window.history.pushState({path:p},"",p)}}else if(Object.keys(d).indexOf(e.data("action"))>=0)l.default.reloadFragment(d[e.data("action")]),l.default.removeLoader(e);else if(t.data.html&&t.data.fragment)l.default.refreshFragmentHTML((0,n.default)(a.default.fragments[t.data.fragment]),t),l.default.removeLoader(e);else{var u=e.attr("action");u?window.location.href=u:window.location.reload(!1)}}else{if(t.data.hasOwnProperty("refresh")&&t.data.refresh)return void(window.location.href=window.location.href.replace(/(\?|\&)ref=fblogin/,""));l.default.removeLoader(e),(0,n.default)("html, body").animate({scrollTop:r},300),s.text(o),t.data.hasOwnProperty("main")&&l.default.addMessage(i,"error",t.data.main.map(function(t){return t.text}).join("<br/>")),e.find("input, select").each(function(){var e=(0,n.default)(this),i=e.attr("id"),s=e.closest(".form-group"),o=e.closest(".control-wrap").find(".field-helper");t.data.hasOwnProperty(i)&&(s.addClass("has-error"),o.append((0,n.default)("<span />",{class:"help-block help-block-error",html:t.data[i].map(function(t){return t.text}).join("<br/>")}))),e.on("keyup change",function(){o.find(".help-block-error").remove()})})}},dataType:"json"})}),(0,n.default)(window).on("load",c.default.analyzed_distance).on("scroll",c.default.analyzed_distance).on("resize",c.default.analyzed_distance),(0,n.default)("#modal-fb-connect-options").on("show.bs.modal",function(t){if("undefined"==typeof wp)return t;var e=(0,n.default)(this),i=wp.template("modal-facebook-options");e.find(".modal-content").html(i([])),e.trigger("facebook-options-loaded")}).on("show.bs.modal",i).on("show.bs.modal",c.default.custom_dropdown).on("show.bs.modal",h),(0,n.default)(".sub-panel-fb-connect").on("change","#aepc_account_id",function(){var t=(0,n.default)(this).val(),e=(0,n.default)("#aepc_pixel_id").val();t&&e?(0,n.default)(".js-save-facebook-options").removeClass("disabled"):(0,n.default)(".js-save-facebook-options").addClass("disabled")}).on("change","#aepc_pixel_id",function(){var t=(0,n.default)("#aepc_account_id").val(),e=(0,n.default)(this).val();t&&e?(0,n.default)(".js-save-facebook-options").removeClass("disabled"):(0,n.default)(".js-save-facebook-options").addClass("disabled")}).on("click",".js-save-facebook-options:not(.disabled)",function(t){var e=(0,n.default)("#aepc_account_id").val(),i=(0,n.default)("#aepc_pixel_id").val();(0,n.default)(".sec-overlay").removeClass("sec-overlay"),(0,n.default)(".sub-panel-fb-connect.bumping").removeClass("bumping"),l.default.addLoader((0,n.default)(".panel.panel-settings-set-fb-px")),n.default.ajax({url:aepc_admin.ajax_url,method:"POST",data:{aepc_account_id:e,aepc_pixel_id:i,action:aepc_admin.actions.save_facebook_options.name,_wpnonce:aepc_admin.actions.save_facebook_options.nonce},success:function(t){if(t.success){if(window.history&&window.history.pushState){var e=window.location.href.replace(/(\?|\&)ref=fblogin/,"");window.history.pushState({path:e},"",e)}l.default.reloadFragment("fb_pixel_box"),c.default.set_saved()}},dataType:"json"})}),(0,n.default)(".wrap-custom-audiences").on("click",".js-ca-size-sync",function(t){var e=(0,n.default)(this),i=e.data("ca_id");l.default.removeMessage((0,n.default)(".plugin-content .alert-wrap"),"error"),l.default.addLoader((0,n.default)(".panel.panel-ca-list")),e.addClass("loading-data"),n.default.ajax({url:aepc_admin.ajax_url,method:"GET",data:{ca_id:i,action:aepc_admin.actions.refresh_ca_size.name,_wpnonce:aepc_admin.actions.refresh_ca_size.nonce},success:function(t){t.success?l.default.reloadFragment("ca_list"):l.default.addMessage((0,n.default)(".plugin-content .alert-wrap"),"error",t.data.message)},dataType:"json"})}),(0,n.default)(".wrap").on("click",".pagination li a",function(t){t.preventDefault();var e=(0,n.default)(this),i=e.attr("href"),s=i.match(/paged=([0-9]+)/);(0,n.default)(this).closest(".panel-ca-list").length?l.default.reloadFragment("ca_list",{paged:s[1]}):(0,n.default)(this).closest(".panel-ce-tracking").length?l.default.reloadFragment("conversions_list",{paged:s[1]}):(0,n.default)(this).closest(".panel-log-list").length&&l.default.reloadFragment("logs_list",{paged:s[1]}),window.history&&window.history.pushState&&window.history.pushState({path:i},"",i)}),(0,n.default)(".plugin-sidebar.loading-sec").length&&l.default.reloadFragment("sidebar");var d=[];(0,n.default)(".modal").on("show.bs.modal",function(t){d.push(t)}).on("hidden.bs.modal",function(t){(0,n.default)(d[d.length-1].relatedTarget).closest(".modal").length&&((0,n.default)("body").addClass("modal-open"),d.splice(d.length-1,1))}),(0,n.default)("#aepc-clear-transients").on("click",function(t){t.preventDefault();var e=(0,n.default)(this);l.default.addLoader(e),n.default.ajax({url:aepc_admin.ajax_url,method:"POST",data:{action:aepc_admin.actions.clear_transients.name,_wpnonce:aepc_admin.actions.clear_transients.nonce},success:function(t){l.default.removeLoader(e),t.success&&l.default.addMessage((0,n.default)(".plugin-content .alert-wrap"),"success",t.data.message)},dataType:"json"})}),(0,n.default)("#aepc-reset-fb-connection").on("click",function(t){t.preventDefault();var e=(0,n.default)(this);l.default.addLoader(e),n.default.ajax({url:aepc_admin.ajax_url,method:"POST",data:{action:aepc_admin.actions.reset_fb_connection.name,_wpnonce:aepc_admin.actions.reset_fb_connection.nonce},success:function(t){l.default.reloadFragment("fb_pixel_box",{success:function(i){l.default.removeLoader(e),t.success&&l.default.addMessage((0,n.default)(".plugin-content .alert-wrap"),"success",t.data.message)}})},dataType:"json"})}),(0,n.default)(".ecomm-conversions").find('input[type="checkbox"]').on("change",function(){var t=(0,n.default)("#aepc_enable_dpa");t.is(":checked")||t.prop("checked",!0).trigger("change")}),(0,n.default)(document).on("click","button[data-dismiss][data-dismiss-action]",function(){var t=(0,n.default)(this).data("dismiss-action");n.default.ajax({url:aepc_admin.ajax_url,method:"GET",data:{notice_id:t,action:aepc_admin.actions.dismiss_notice.name,_wpnonce:aepc_admin.actions.dismiss_notice.nonce},dataType:"json"})}),(0,n.default)(document).on("click",".js-remove-logs",function(t){t.preventDefault();var e=(0,n.default)(a.default.fragments.logs_list),i=(0,n.default)("#modal-confirm-delete");i.modal("show",(0,n.default)(this)).one("click",".btn-ok",function(){i.modal("hide"),l.default.addLoader(e),n.default.ajax({url:aepc_admin.ajax_url,method:"GET",data:{action:aepc_admin.actions.clear_logs.name,_wpnonce:aepc_admin.actions.clear_logs.nonce},success:function(t){l.default.refreshFragmentHTML(e,t)},dataType:"json"})})}),l.default.alert_unsaved()})}).call(e,i(0))},94:function(t,e,i){"use strict";(function(t){var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};+function(t){function i(i){return this.each(function(){var n=t(this),o=n.data("bs.button"),a="object"==(void 0===i?"undefined":e(i))&&i;o||n.data("bs.button",o=new s(this,a)),"toggle"==i?o.toggle():i&&o.setState(i)})}var s=function e(i,s){this.$element=t(i),this.options=t.extend({},e.DEFAULTS,s),this.isLoading=!1};s.VERSION="3.4.1",s.DEFAULTS={loadingText:"loading..."},s.prototype.setState=function(e){var i="disabled",s=this.$element,n=s.is("input")?"val":"html",o=s.data();e+="Text",null==o.resetText&&s.data("resetText",s[n]()),setTimeout(t.proxy(function(){s[n](null==o[e]?this.options[e]:o[e]),"loadingText"==e?(this.isLoading=!0,s.addClass(i).attr(i,i).prop(i,!0)):this.isLoading&&(this.isLoading=!1,s.removeClass(i).removeAttr(i).prop(i,!1))},this),0)},s.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 n=t.fn.button;t.fn.button=i,t.fn.button.Constructor=s,t.fn.button.noConflict=function(){return t.fn.button=n,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(e){var s=t(e.target).closest(".btn");i.call(s,"toggle"),t(e.target).is('input[type="radio"], input[type="checkbox"]')||(e.preventDefault(),s.is("input,button")?s.trigger("focus"):s.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(t)}).call(e,i(0))},95:function(t,e,i){"use strict";(function(t){+function(t){function e(e){return this.each(function(){var i=t(this),n=i.data("bs.alert");n||i.data("bs.alert",n=new s(this)),"string"==typeof e&&n[e].call(i)})}var i='[data-dismiss="alert"]',s=function(e){t(e).on("click",i,this.close)};s.VERSION="3.4.1",s.TRANSITION_DURATION=150,s.prototype.close=function(e){function i(){a.detach().trigger("closed.bs.alert").remove()}var n=t(this),o=n.attr("data-target");o||(o=n.attr("href"),o=o&&o.replace(/.*(?=#[^\s]*$)/,"")),o="#"===o?[]:o;var a=t(document).find(o);e&&e.preventDefault(),a.length||(a=n.closest(".alert")),a.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(a.removeClass("in"),t.support.transition&&a.hasClass("fade")?a.one("bsTransitionEnd",i).emulateTransitionEnd(s.TRANSITION_DURATION):i())};var n=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=s,t.fn.alert.noConflict=function(){return t.fn.alert=n,this},t(document).on("click.bs.alert.data-api",i,s.prototype.close)}(t)}).call(e,i(0))},96:function(t,e,i){"use strict";(function(t){function e(t){return t&&t.__esModule?t:{default:t}}var s=i(0),n=e(s),o=i(97),a=e(o);t(document).ready(function(){var t=(0,n.default)("#activity-chart");t.length&&n.default.getJSON(aepc_admin.ajax_url+"?action="+aepc_admin.actions.get_pixel_stats.name+"&_wpnonce="+aepc_admin.actions.get_pixel_stats.nonce,function(e){if(void 0!==e.success&&!1===e.success)return void Utils.addMessage(t,"info",e.data[0].message);var i=new Date;i.setUTCDate(i.getUTCDate()-7),i.setUTCHours(0,0,0,0),a.default.stockChart("activity-chart",{chart:{type:"line"},title:{text:null},navigator:{enabled:!0},rangeSelector:{enabled:!1},plotOptions:{spline:{marker:{enabled:!0}}},xAxis:{min:i.getTime()},yAxis:{gridLineColor:"#F4F4F4"},series:[{name:"Pixel fires",data:e,dataGrouping:{approximation:"sum",forced:!0,units:[["day",[1]]]},pointInterval:36e5}]}),t.closest(".panel").find("select#date-range").select2({minimumResultsForSearch:5,width:"element"}),t.closest(".panel").on("change.chart.range","select#date-range",function(){var e=t.highcharts(),i=(0,n.default)(this).val(),s=new Date,o=new Date;if(o.setDate(s.getUTCDate()-1),"today"===i)e.xAxis[0].setExtremes(s.setUTCHours(0,0,0,0),s.setUTCHours(23,59,59,999)),e.xAxis[0].setDataGrouping({approximation:"sum",forced:!0,units:[["hour",[1]]]});else if("yesterday"===i)e.xAxis[0].setExtremes(o.setUTCHours(0,0,0,0),o.setUTCHours(23,59,59,999)),e.xAxis[0].setDataGrouping({approximation:"sum",forced:!0,units:[["hour",[1]]]});else if("last-7-days"===i){var a=o;a.setDate(s.getUTCDate()-7),e.xAxis[0].setExtremes(a.setUTCHours(0,0,0,0),s.setUTCHours(23,59,59,999)),e.xAxis[0].setDataGrouping({approximation:"sum",forced:!0,units:[["day",[1]]]})}else if("last-14-days"===i){var r=o;r.setDate(s.getUTCDate()-14),e.xAxis[0].setExtremes(r.setUTCHours(0,0,0,0),s.setUTCHours(23,59,59,999)),e.xAxis[0].setDataGrouping({approximation:"sum",forced:!0,units:[["day",[1]]]})}})})})}).call(e,i(0))},97:function(t,e,i){"use strict";(function(t){var s,n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(o,a){"object"===n(t)&&t.exports?(a.default=a,t.exports=o.document?a(o):a):void 0!==(s=function(){return a(o)}.call(e,i,e,t))&&(t.exports=s)}("undefined"!=typeof window?window:void 0,function(t){function e(t,e,i,s){t.hasOwnProperty(e)||(t[e]=s.apply(null,i))}var i={};return e(i,"parts/Globals.js",[],function(){var e=void 0===t?"undefined"!=typeof window?window:{}:t,i=e.document,s=e.navigator&&e.navigator.userAgent||"",n=i&&i.createElementNS&&!!i.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,o=/(edge|msie|trident)/i.test(s)&&!e.opera,a=-1!==s.indexOf("Firefox"),r=-1!==s.indexOf("Chrome"),l=a&&4>parseInt(s.split("Firefox/")[1],10);return{product:"Highcharts",version:"7.1.1",deg2rad:2*Math.PI/360,doc:i,hasBidiBug:l,hasTouch:i&&void 0!==i.documentElement.ontouchstart,isMS:o,isWebKit:-1!==s.indexOf("AppleWebKit"),isFirefox:a,isChrome:r,isSafari:!r&&-1!==s.indexOf("Safari"),isTouchDevice:/(Mobile|Android|Windows Phone)/.test(s),SVG_NS:"http://www.w3.org/2000/svg",chartCount:0,seriesTypes:{},symbolSizes:{},svg:n,win:e,marginNames:["plotTop","marginRight","marginBottom","plotLeft"],noop:function(){},charts:[],dateFormats:{}}}),e(i,"parts/Utilities.js",[i["parts/Globals.js"]],function(t){t.timers=[];var e=t.charts,i=t.doc,s=t.win;t.error=function(e,i,n){var o=t.isNumber(e)?"Highcharts error #"+e+": www.highcharts.com/errors/"+e:e,a=function(){if(i)throw Error(o);s.console&&console.log(o)};n?t.fireEvent(n,"displayError",{code:e,message:o},a):a()},t.Fx=function(t,e,i){this.options=e,this.elem=t,this.prop=i},t.Fx.prototype={dSetter:function(){var t,e=this.paths[0],i=this.paths[1],s=[],n=this.now,o=e.length;if(1===n)s=this.toD;else if(o===i.length&&1>n)for(;o--;)t=parseFloat(e[o]),s[o]=isNaN(t)?i[o]:n*parseFloat(i[o]-t)+t;else s=i;this.elem.attr("d",s,null,!0)},update:function(){var t=this.elem,e=this.prop,i=this.now,s=this.options.step;this[e+"Setter"]?this[e+"Setter"]():t.attr?t.element&&t.attr(e,i,null,!0):t.style[e]=i+this.unit,s&&s.call(t,i,this)},run:function(e,i,n){var o=this,a=o.options,r=function t(e){return!t.stopped&&o.step(e)},l=s.requestAnimationFrame||function(t){setTimeout(t,13)},h=function e(){for(var i=0;i<t.timers.length;i++)t.timers[i]()||t.timers.splice(i--,1);t.timers.length&&l(e)};e!==i||this.elem["forceAnimate:"+this.prop]?(this.startTime=+new Date,this.start=e,this.end=i,this.unit=n,this.now=this.start,this.pos=0,r.elem=this.elem,r.prop=this.prop,r()&&1===t.timers.push(r)&&l(h)):(delete a.curAnim[this.prop],a.complete&&0===Object.keys(a.curAnim).length&&a.complete.call(this.elem))},step:function(e){var i,s=+new Date,n=this.options,o=this.elem,a=n.complete,r=n.duration,l=n.curAnim;return o.attr&&!o.element?e=!1:e||s>=r+this.startTime?(this.now=this.end,this.pos=1,this.update(),i=l[this.prop]=!0,t.objectEach(l,function(t){!0!==t&&(i=!1)}),i&&a&&a.call(o),e=!1):(this.pos=n.easing((s-this.startTime)/r),this.now=this.start+(this.end-this.start)*this.pos,this.update(),e=!0),e},initPath:function(e,i,s){function n(t){var e,i;for(c=t.length;c--;)e="M"===t[c]||"L"===t[c],i=/[a-zA-Z]/.test(t[c+3]),e&&i&&t.splice(c+1,0,t[c+1],t[c+2],t[c+1],t[c+2])}function o(t,e){for(;t.length<l;){t[0]=e[l-t.length];var i=t.slice(0,f);[].splice.apply(t,[0,0].concat(i)),m&&(i=t.slice(t.length-f),[].splice.apply(t,[t.length,0].concat(i)),c--)}t[0]="M"}function a(t,e){for(var i=(l-t.length)/f;0<i&&i--;)h=t.slice().splice(t.length/v-f,f*v),h[0]=e[l-f-i*f],u&&(h[f-6]=h[f-2],h[f-5]=h[f-1]),[].splice.apply(t,[t.length/v,0].concat(h)),m&&i--}i=i||"";var r,l,h,c,d=e.startX,p=e.endX,u=-1<i.indexOf("C"),f=u?7:3;i=i.split(" "),s=s.slice();var g,m=e.isArea,v=m?2:1;if(u&&(n(i),n(s)),d&&p){for(c=0;c<d.length;c++){if(d[c]===p[0]){r=c;break}if(d[0]===p[p.length-d.length+c]){r=c,g=!0;break}}void 0===r&&(i=[])}return i.length&&t.isNumber(r)&&(l=s.length+r*v*f,g?(o(i,s),a(s,i)):(o(s,i),a(i,s))),[i,s]},fillSetter:function(){t.Fx.prototype.strokeSetter.apply(this,arguments)},strokeSetter:function(){this.elem.attr(this.prop,t.color(this.start).tweenTo(t.color(this.end),this.pos),null,!0)}},t.merge=function(){var e,i,s=arguments,o={};for(!0===s[0]&&(o=s[1],s=Array.prototype.slice.call(s,2)),i=s.length,e=0;e<i;e++)o=function e(i,s){return"object"!==(void 0===i?"undefined":n(i))&&(i={}),t.objectEach(s,function(n,o){!t.isObject(n,!0)||t.isClass(n)||t.isDOMElement(n)?i[o]=s[o]:i[o]=e(i[o]||{},n)}),i}(o,s[e]);return o},t.pInt=function(t,e){return parseInt(t,e||10)},t.isString=function(t){return"string"==typeof t},t.isArray=function(t){return"[object Array]"===(t=Object.prototype.toString.call(t))||"[object Array Iterator]"===t},t.isObject=function(e,i){return!(!e||"object"!==(void 0===e?"undefined":n(e))||i&&t.isArray(e))},t.isDOMElement=function(e){return t.isObject(e)&&"number"==typeof e.nodeType},t.isClass=function(e){var i=e&&e.constructor;return!(!t.isObject(e,!0)||t.isDOMElement(e)||!i||!i.name||"Object"===i.name)},t.isNumber=function(t){return"number"==typeof t&&!isNaN(t)&&1/0>t&&-1/0<t},t.erase=function(t,e){for(var i=t.length;i--;)if(t[i]===e){t.splice(i,1);break}},t.defined=function(t){return void 0!==t&&null!==t},t.attr=function(e,i,s){var n;return t.isString(i)?t.defined(s)?e.setAttribute(i,s):e&&e.getAttribute&&((n=e.getAttribute(i))||"class"!==i||(n=e.getAttribute(i+"Name"))):t.defined(i)&&t.isObject(i)&&t.objectEach(i,function(t,i){e.setAttribute(i,t)}),n},t.splat=function(e){return t.isArray(e)?e:[e]},t.syncTimeout=function(t,e,i){if(e)return setTimeout(t,e,i);t.call(0,i)},t.clearTimeout=function(e){t.defined(e)&&clearTimeout(e)},t.extend=function(t,e){var i;t||(t={});for(i in e)t[i]=e[i];return t},t.pick=function(){var t,e,i=arguments,s=i.length;for(t=0;t<s;t++)if(void 0!==(e=i[t])&&null!==e)return e},t.css=function(e,i){t.isMS&&!t.svg&&i&&void 0!==i.opacity&&(i.filter="alpha(opacity="+100*i.opacity+")"),t.extend(e.style,i)},t.createElement=function(e,s,n,o,a){e=i.createElement(e);var r=t.css;return s&&t.extend(e,s),a&&r(e,{padding:0,border:"none",margin:0}),n&&r(e,n),o&&o.appendChild(e),e},t.extendClass=function(e,i){var s=function(){};return s.prototype=new e,t.extend(s.prototype,i),s},t.pad=function(t,e,i){return Array((e||2)+1-String(t).replace("-","").length).join(i||0)+t},t.relativeLength=function(t,e,i){return/%$/.test(t)?e*parseFloat(t)/100+(i||0):parseFloat(t)},t.wrap=function(t,e,i){var s=t[e];t[e]=function(){var t=Array.prototype.slice.call(arguments),e=arguments,n=this;return n.proceed=function(){s.apply(n,arguments.length?arguments:e)},t.unshift(s),t=i.apply(this,t),n.proceed=null,t}},t.datePropsToTimestamps=function(e){t.objectEach(e,function(i,s){t.isObject(i)&&"function"==typeof i.getTime?e[s]=i.getTime():(t.isObject(i)||t.isArray(i))&&t.datePropsToTimestamps(i)})},t.formatSingle=function(e,i,s){var n=/\.([0-9])/,o=t.defaultOptions.lang;return/f$/.test(e)?(s=(s=e.match(n))?s[1]:-1,null!==i&&(i=t.numberFormat(i,s,o.decimalPoint,-1<e.indexOf(",")?o.thousandsSep:""))):i=(s||t.time).dateFormat(e,i),i},t.format=function(e,i,s){for(var n,o,a,r,l,h="{",c=!1,d=[];e&&-1!==(h=e.indexOf(h));){if(n=e.slice(0,h),c){for(n=n.split(":"),o=n.shift().split("."),r=o.length,l=i,a=0;a<r;a++)l&&(l=l[o[a]]);n.length&&(l=t.formatSingle(n.join(":"),l,s)),d.push(l)}else d.push(n);e=e.slice(h+1),h=(c=!c)?"}":"{"}return d.push(e),d.join("")},t.getMagnitude=function(t){return Math.pow(10,Math.floor(Math.log(t)/Math.LN10))},t.normalizeTickInterval=function(e,i,s,n,o){var a,r=e;for(s=t.pick(s,1),a=e/s,i||(i=o?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],!1===n&&(1===s?i=i.filter(function(t){return 0==t%1}):.1>=s&&(i=[1/s]))),n=0;n<i.length&&(r=i[n],!(o&&r*s>=e||!o&&a<=(i[n]+(i[n+1]||i[n]))/2));n++);return r=t.correctFloat(r*s,-Math.round(Math.log(.001)/Math.LN10))},t.stableSort=function(t,e){var i,s,n=t.length;for(s=0;s<n;s++)t[s].safeI=s;for(t.sort(function(t,s){return i=e(t,s),0===i?t.safeI-s.safeI:i}),s=0;s<n;s++)delete t[s].safeI},t.arrayMin=function(t){for(var e=t.length,i=t[0];e--;)t[e]<i&&(i=t[e]);return i},t.arrayMax=function(t){for(var e=t.length,i=t[0];e--;)t[e]>i&&(i=t[e]);return i},t.destroyObjectProperties=function(e,i){t.objectEach(e,function(t,s){t&&t!==i&&t.destroy&&t.destroy(),delete e[s]})},t.discardElement=function(e){var i=t.garbageBin;i||(i=t.createElement("div")),e&&i.appendChild(e),i.innerHTML=""},t.correctFloat=function(t,e){return parseFloat(t.toPrecision(e||14))},t.setAnimation=function(e,i){i.renderer.globalAnimation=t.pick(e,i.options.chart.animation,!0)},t.animObject=function(e){return t.isObject(e)?t.merge(e):{duration:e?500:0}},t.timeUnits={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:24192e5,year:314496e5},t.numberFormat=function(e,i,s,n){e=+e||0,i=+i;var o,a,r=t.defaultOptions.lang,l=(e.toString().split(".")[1]||"").split("e")[0].length,h=e.toString().split("e");return-1===i?i=Math.min(l,20):t.isNumber(i)?i&&h[1]&&0>h[1]&&(o=i+ +h[1],0<=o?(h[0]=(+h[0]).toExponential(o).split("e")[0],i=o):(h[0]=h[0].split(".")[0]||0,e=20>i?(h[0]*Math.pow(10,h[1])).toFixed(i):0,h[1]=0)):i=2,a=(Math.abs(h[1]?h[0]:e)+Math.pow(10,-Math.max(i,l)-1)).toFixed(i),l=String(t.pInt(a)),o=3<l.length?l.length%3:0,s=t.pick(s,r.decimalPoint),n=t.pick(n,r.thousandsSep),e=(0>e?"-":"")+(o?l.substr(0,o)+n:""),e+=l.substr(o).replace(/(\d{3})(?=\d)/g,"$1"+n),i&&(e+=s+a.slice(-i)),h[1]&&0!=+e&&(e+="e"+h[1]),e},Math.easeInOutSine=function(t){return-.5*(Math.cos(Math.PI*t)-1)},t.getStyle=function(e,i,n){return"width"===i?Math.max(0,Math.min(e.offsetWidth,e.scrollWidth,e.getBoundingClientRect&&"none"===t.getStyle(e,"transform",!1)?Math.floor(e.getBoundingClientRect().width):1/0)-t.getStyle(e,"padding-left")-t.getStyle(e,"padding-right")):"height"===i?Math.max(0,Math.min(e.offsetHeight,e.scrollHeight)-t.getStyle(e,"padding-top")-t.getStyle(e,"padding-bottom")):(s.getComputedStyle||t.error(27,!0),(e=s.getComputedStyle(e,void 0))&&(e=e.getPropertyValue(i),t.pick(n,"opacity"!==i)&&(e=t.pInt(e))),e)},t.inArray=function(t,e,i){return e.indexOf(t,i)},t.find=Array.prototype.find?function(t,e){return t.find(e)}:function(t,e){var i,s=t.length;for(i=0;i<s;i++)if(e(t[i],i))return t[i]},t.keys=Object.keys,t.offset=function(t){var e=i.documentElement;return t=t.parentElement||t.parentNode?t.getBoundingClientRect():{top:0,left:0},{top:t.top+(s.pageYOffset||e.scrollTop)-(e.clientTop||0),left:t.left+(s.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}},t.stop=function(e,i){for(var s=t.timers.length;s--;)t.timers[s].elem!==e||i&&i!==t.timers[s].prop||(t.timers[s].stopped=!0)},t.objectEach=function(t,e,i){for(var s in t)t.hasOwnProperty(s)&&e.call(i||t[s],t[s],s,t)},t.objectEach({map:"map",each:"forEach",grep:"filter",reduce:"reduce",some:"some"},function(e,i){t[i]=function(t){return Array.prototype[e].apply(t,[].slice.call(arguments,1))}}),t.addEvent=function(e,i,s,n){var o,a=e.addEventListener||t.addEventListenerPolyfill;return o="function"==typeof e&&e.prototype?e.prototype.protoEvents=e.prototype.protoEvents||{}:e.hcEvents=e.hcEvents||{},t.Point&&e instanceof t.Point&&e.series&&e.series.chart&&(e.series.chart.runTrackerClick=!0),a&&a.call(e,i,s,!1),o[i]||(o[i]=[]),o[i].push(s),n&&t.isNumber(n.order)&&(s.order=n.order,o[i].sort(function(t,e){return t.order-e.order})),function(){t.removeEvent(e,i,s)}},t.removeEvent=function(e,i,s){function n(i,s){var n=e.removeEventListener||t.removeEventListenerPolyfill;n&&n.call(e,i,s,!1)}function o(s){var o,a;e.nodeName&&(i?(o={},o[i]=!0):o=s,t.objectEach(o,function(t,e){if(s[e])for(a=s[e].length;a--;)n(e,s[e][a])}))}var a,r;["protoEvents","hcEvents"].forEach(function(t){var l=e[t];l&&(i?(a=l[i]||[],s?(r=a.indexOf(s),-1<r&&(a.splice(r,1),l[i]=a),n(i,s)):(o(l),l[i]=[])):(o(l),e[t]={}))})},t.fireEvent=function(e,s,n,o){var a,r,l,h,c;n=n||{},i.createEvent&&(e.dispatchEvent||e.fireEvent)?(a=i.createEvent("Events"),a.initEvent(s,!0,!0),t.extend(a,n),e.dispatchEvent?e.dispatchEvent(a):e.fireEvent(s,a)):["protoEvents","hcEvents"].forEach(function(i){if(e[i])for(r=e[i][s]||[],l=r.length,n.target||t.extend(n,{preventDefault:function(){n.defaultPrevented=!0},target:e,type:s}),h=0;h<l;h++)(c=r[h])&&!1===c.call(e,n)&&n.preventDefault()}),o&&!n.defaultPrevented&&o.call(e,n)},t.animate=function(e,i,s){var n,o,a,r,l="";t.isObject(s)||(r=arguments,s={duration:r[2],easing:r[3],complete:r[4]}),t.isNumber(s.duration)||(s.duration=400),s.easing="function"==typeof s.easing?s.easing:Math[s.easing]||Math.easeInOutSine,s.curAnim=t.merge(i),t.objectEach(i,function(r,h){t.stop(e,h),a=new t.Fx(e,s,h),o=null,"d"===h?(a.paths=a.initPath(e,e.d,i.d),a.toD=i.d,n=0,o=1):e.attr?n=e.attr(h):(n=parseFloat(t.getStyle(e,h))||0,"opacity"!==h&&(l="px")),o||(o=r),o&&o.match&&o.match("px")&&(o=o.replace(/px/g,"")),a.run(n,o,l)})},t.seriesType=function(e,i,s,n,o){var a=t.getOptions(),r=t.seriesTypes;return a.plotOptions[e]=t.merge(a.plotOptions[i],s),r[e]=t.extendClass(r[i]||function(){},n),r[e].prototype.type=e,o&&(r[e].prototype.pointClass=t.extendClass(t.Point,o)),r[e]},t.uniqueKey=function(){var t=Math.random().toString(36).substring(2,9),e=0;return function(){return"highcharts-"+t+"-"+e++}}(),t.isFunction=function(t){return"function"==typeof t},s.jQuery&&(s.jQuery.fn.highcharts=function(){var i=[].slice.call(arguments);if(this[0])return i[0]?(new(t[t.isString(i[0])?i.shift():"Chart"])(this[0],i[0],i[1]),this):e[t.attr(this[0],"data-highcharts-chart")]})}),e(i,"parts/Color.js",[i["parts/Globals.js"]],function(t){var e=t.isNumber,i=t.merge,s=t.pInt;t.Color=function(e){if(!(this instanceof t.Color))return new t.Color(e);this.init(e)},t.Color.prototype={parsers:[{regex:/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*\)/,parse:function(t){return[s(t[1]),s(t[2]),s(t[3]),parseFloat(t[4],10)]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,parse:function(t){return[s(t[1]),s(t[2]),s(t[3]),1]}}],names:{white:"#ffffff",black:"#000000"},init:function(e){var i,s,n,o;if((this.input=e=this.names[e&&e.toLowerCase?e.toLowerCase():""]||e)&&e.stops)this.stops=e.stops.map(function(e){return new t.Color(e[1])});else if(e&&e.charAt&&"#"===e.charAt()&&(i=e.length,e=parseInt(e.substr(1),16),7===i?s=[(16711680&e)>>16,(65280&e)>>8,255&e,1]:4===i&&(s=[(3840&e)>>4|(3840&e)>>8,(240&e)>>4|240&e,(15&e)<<4|15&e,1])),!s)for(n=this.parsers.length;n--&&!s;)o=this.parsers[n],(i=o.regex.exec(e))&&(s=o.parse(i));this.rgba=s||[]},get:function(t){var s,n=this.input,o=this.rgba;return this.stops?(s=i(n),s.stops=[].concat(s.stops),this.stops.forEach(function(e,i){s.stops[i]=[s.stops[i][0],e.get(t)]})):s=o&&e(o[0])?"rgb"===t||!t&&1===o[3]?"rgb("+o[0]+","+o[1]+","+o[2]+")":"a"===t?o[3]:"rgba("+o.join(",")+")":n,s},brighten:function(t){var i,n=this.rgba;if(this.stops)this.stops.forEach(function(e){e.brighten(t)});else if(e(t)&&0!==t)for(i=0;3>i;i++)n[i]+=s(255*t),0>n[i]&&(n[i]=0),255<n[i]&&(n[i]=255);return this},setOpacity:function(t){return this.rgba[3]=t,this},tweenTo:function(t,e){var i=this.rgba,s=t.rgba;return s.length&&i&&i.length?(t=1!==s[3]||1!==i[3],e=(t?"rgba(":"rgb(")+Math.round(s[0]+(i[0]-s[0])*(1-e))+","+Math.round(s[1]+(i[1]-s[1])*(1-e))+","+Math.round(s[2]+(i[2]-s[2])*(1-e))+(t?","+(s[3]+(i[3]-s[3])*(1-e)):"")+")"):e=t.input||"none",e}},t.color=function(e){return new t.Color(e)}}),e(i,"parts/SvgRenderer.js",[i["parts/Globals.js"]],function(t){var e,i,s=t.addEvent,n=t.animate,o=t.attr,a=t.charts,r=t.color,l=t.css,h=t.createElement,c=t.defined,d=t.deg2rad,p=t.destroyObjectProperties,u=t.doc,f=t.extend,g=t.erase,m=t.hasTouch,v=t.isArray,x=t.isFirefox,y=t.isMS,b=t.isObject,w=t.isString,k=t.isWebKit,M=t.merge,S=t.noop,T=t.objectEach,C=t.pick,A=t.pInt,E=t.removeEvent,P=t.splat,O=t.stop,L=t.svg,D=t.SVG_NS,_=t.symbolSizes,I=t.win;e=t.SVGElement=function(){return this},f(e.prototype,{opacity:1,SVG_NS:D,textProps:"direction fontSize fontWeight fontFamily fontStyle color lineHeight width textAlign textDecoration textOverflow textOutline cursor".split(" "),init:function(e,i){this.element="span"===i?h(i):u.createElementNS(this.SVG_NS,i),this.renderer=e,t.fireEvent(this,"afterInit")},animate:function(e,i,s){var o=t.animObject(C(i,this.renderer.globalAnimation,!0));return C(u.hidden,u.msHidden,u.webkitHidden,!1)&&(o.duration=0),0!==o.duration?(s&&(o.complete=s),n(this,e,o)):(this.attr(e,null,s),t.objectEach(e,function(t,e){o.step&&o.step.call(this,t,{prop:e,pos:1})},this)),this},complexColor:function(e,i,s){var n,o,a,r,l,h,d,p,u,f,g,m,x=this.renderer,y=[];t.fireEvent(this.renderer,"complexColor",{args:arguments},function(){e.radialGradient?o="radialGradient":e.linearGradient&&(o="linearGradient"),o&&(a=e[o],l=x.gradients,d=e.stops,f=s.radialReference,v(a)&&(e[o]=a={x1:a[0],y1:a[1],x2:a[2],y2:a[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===o&&f&&!c(a.gradientUnits)&&(r=a,a=M(a,x.getRadialAttr(f,r),{gradientUnits:"userSpaceOnUse"})),T(a,function(t,e){"id"!==e&&y.push(e,t)}),T(d,function(t){y.push(t)}),y=y.join(","),l[y]?g=l[y].attr("id"):(a.id=g=t.uniqueKey(),l[y]=h=x.createElement(o).attr(a).add(x.defs),h.radAttr=r,h.stops=[],d.forEach(function(e){0===e[1].indexOf("rgba")?(n=t.color(e[1]),p=n.get("rgb"),u=n.get("a")):(p=e[1],u=1),e=x.createElement("stop").attr({offset:e[0],"stop-color":p,"stop-opacity":u}).add(h),h.stops.push(e)})),m="url("+x.url+"#"+g+")",s.setAttribute(i,m),s.gradient=y,e.toString=function(){return m})})},applyTextOutline:function(e){var i,s,n,a=this.element;-1!==e.indexOf("contrast")&&(e=e.replace(/contrast/g,this.renderer.getContrast(a.style.fill))),e=e.split(" "),i=e[e.length-1],(s=e[0])&&"none"!==s&&t.svg&&(this.fakeTS=!0,e=[].slice.call(a.getElementsByTagName("tspan")),this.ySetter=this.xSetter,s=s.replace(/(^[\d\.]+)(.*?)$/g,function(t,e,i){return 2*e+i}),this.removeTextOutline(e),n=a.firstChild,e.forEach(function(t,e){0===e&&(t.setAttribute("x",a.getAttribute("x")),e=a.getAttribute("y"),t.setAttribute("y",e||0),null===e&&a.setAttribute("y",0)),t=t.cloneNode(1),o(t,{class:"highcharts-text-outline",fill:i,stroke:i,"stroke-width":s,"stroke-linejoin":"round"}),a.insertBefore(t,n)}))},removeTextOutline:function(t){for(var e,i=t.length;i--;)e=t[i],"highcharts-text-outline"===e.getAttribute("class")&&g(t,this.element.removeChild(e))},symbolCustomAttribs:"x y width height r start end innerR anchorX anchorY rounded".split(" "),attr:function(e,i,s,n){var o,a,r,l,h=this.element,c=this,d=this.symbolCustomAttribs;return"string"==typeof e&&void 0!==i&&(o=e,e={},e[o]=i),"string"==typeof e?c=(this[e+"Getter"]||this._defaultGetter).call(this,e,h):(T(e,function(i,s){r=!1,n||O(this,s),this.symbolName&&-1!==t.inArray(s,d)&&(a||(this.symbolAttr(e),a=!0),r=!0),!this.rotation||"x"!==s&&"y"!==s||(this.doTransform=!0),r||(l=this[s+"Setter"]||this._defaultSetter,l.call(this,i,s,h),!this.styledMode&&this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(s)&&this.updateShadows(s,i,l))},this),this.afterSetters()),s&&s.call(this),c},afterSetters:function(){this.doTransform&&(this.updateTransform(),this.doTransform=!1)},updateShadows:function(t,e,i){for(var s=this.shadows,n=s.length;n--;)i.call(s[n],"height"===t?Math.max(e-(s[n].cutHeight||0),0):"d"===t?this.d:e,t,s[n])},addClass:function(t,e){var i=this.attr("class")||"";return e||(t=(t||"").split(/ /g).reduce(function(t,e){return-1===i.indexOf(e)&&t.push(e),t},i?[i]:[]).join(" ")),t!==i&&this.attr("class",t),this},hasClass:function(t){return-1!==(this.attr("class")||"").split(" ").indexOf(t)},removeClass:function(t){return this.attr("class",(this.attr("class")||"").replace(t,""))},symbolAttr:function(t){var e=this;"x y r start end width height innerR anchorX anchorY clockwise".split(" ").forEach(function(i){e[i]=C(t[i],e[i])}),e.attr({d:e.renderer.symbols[e.symbolName](e.x,e.y,e.width,e.height,e)})},clip:function(t){return this.attr("clip-path",t?"url("+this.renderer.url+"#"+t.id+")":"none")},crisp:function(t,e){var i;return e=e||t.strokeWidth||0,i=Math.round(e)%2/2,t.x=Math.floor(t.x||this.x||0)+i,t.y=Math.floor(t.y||this.y||0)+i,t.width=Math.floor((t.width||this.width||0)-2*i),t.height=Math.floor((t.height||this.height||0)-2*i),c(t.strokeWidth)&&(t.strokeWidth=e),t},css:function(t){var e,i,s=this.styles,n={},a=this.element,r="",h=!s,c=["textOutline","textOverflow","width"];return t&&t.color&&(t.fill=t.color),s&&T(t,function(t,e){t!==s[e]&&(n[e]=t,h=!0)}),h&&(s&&(t=f(s,n)),t&&(null===t.width||"auto"===t.width?delete this.textWidth:"text"===a.nodeName.toLowerCase()&&t.width&&(e=this.textWidth=A(t.width))),this.styles=t,e&&!L&&this.renderer.forExport&&delete t.width,a.namespaceURI===this.SVG_NS?(i=function(t,e){return"-"+e.toLowerCase()},T(t,function(t,e){-1===c.indexOf(e)&&(r+=e.replace(/([A-Z])/g,i)+":"+t+";")}),r&&o(a,"style",r)):l(a,t),this.added&&("text"===this.element.nodeName&&this.renderer.buildText(this),t&&t.textOutline&&this.applyTextOutline(t.textOutline))),this},getStyle:function(t){return I.getComputedStyle(this.element||this,"").getPropertyValue(t)},strokeWidth:function(){if(!this.renderer.styledMode)return this["stroke-width"]||0;var t,e=this.getStyle("stroke-width");return e.indexOf("px")===e.length-2?e=A(e):(t=u.createElementNS(D,"rect"),o(t,{width:e,"stroke-width":0}),this.element.parentNode.appendChild(t),e=t.getBBox().width,t.parentNode.removeChild(t)),e},on:function(t,e){var i=this,s=i.element;return m&&"click"===t?(s.ontouchstart=function(t){i.touchEventFired=Date.now(),t.preventDefault(),e.call(s,t)},s.onclick=function(t){(-1===I.navigator.userAgent.indexOf("Android")||1100<Date.now()-(i.touchEventFired||0))&&e.call(s,t)}):s["on"+t]=e,this},setRadialReference:function(t){var e=this.renderer.gradients[this.element.gradient];return this.element.radialReference=t,e&&e.radAttr&&e.animate(this.renderer.getRadialAttr(t,e.radAttr)),this},translate:function(t,e){return this.attr({translateX:t,translateY:e})},invert:function(t){return this.inverted=t,this.updateTransform(),this},updateTransform:function(){var t=this.translateX||0,e=this.translateY||0,i=this.scaleX,s=this.scaleY,n=this.inverted,o=this.rotation,a=this.matrix,r=this.element;n&&(t+=this.width,e+=this.height),t=["translate("+t+","+e+")"],c(a)&&t.push("matrix("+a.join(",")+")"),n?t.push("rotate(90) scale(-1,1)"):o&&t.push("rotate("+o+" "+C(this.rotationOriginX,r.getAttribute("x"),0)+" "+C(this.rotationOriginY,r.getAttribute("y")||0)+")"),(c(i)||c(s))&&t.push("scale("+C(i,1)+" "+C(s,1)+")"),t.length&&r.setAttribute("transform",t.join(" "))},toFront:function(){var t=this.element;return t.parentNode.appendChild(t),this},align:function(t,e,i){var s,n,o,a,r={};n=this.renderer,o=n.alignedObjects;var l,h;return t?(this.alignOptions=t,this.alignByTranslate=e,(!i||w(i))&&(this.alignTo=s=i||"renderer",g(o,this),o.push(this),i=null)):(t=this.alignOptions,e=this.alignByTranslate,s=this.alignTo),i=C(i,n[s],n),s=t.align,n=t.verticalAlign,o=(i.x||0)+(t.x||0),a=(i.y||0)+(t.y||0),"right"===s?l=1:"center"===s&&(l=2),l&&(o+=(i.width-(t.width||0))/l),r[e?"translateX":"x"]=Math.round(o),"bottom"===n?h=1:"middle"===n&&(h=2),h&&(a+=(i.height-(t.height||0))/h),r[e?"translateY":"y"]=Math.round(a),this[this.placed?"animate":"attr"](r),this.placed=!0,this.alignAttr=r,this},getBBox:function(t,i){var s,n,o,a,r,l=this.renderer,h=this.element,p=this.styles,u=this.textStr,g=l.cache,m=l.cacheKeys,v=h.namespaceURI===this.SVG_NS;if(i=C(i,this.rotation),n=i*d,o=l.styledMode?h&&e.prototype.getStyle.call(h,"font-size"):p&&p.fontSize,c(u)&&(r=u.toString(),-1===r.indexOf("<")&&(r=r.replace(/[0-9]/g,"0")),r+=["",i||0,o,this.textWidth,p&&p.textOverflow].join()),r&&!t&&(s=g[r]),!s){if(v||l.forExport){try{(a=this.fakeTS&&function(t){[].forEach.call(h.querySelectorAll(".highcharts-text-outline"),function(e){e.style.display=t})})&&a("none"),s=h.getBBox?f({},h.getBBox()):{width:h.offsetWidth,height:h.offsetHeight},a&&a("")}catch(t){}(!s||0>s.width)&&(s={width:0,height:0})}else s=this.htmlGetBBox();if(l.isSVG&&(t=s.width,l=s.height,v&&(s.height=l={"11px,17":14,"13px,20":16}[p&&p.fontSize+","+Math.round(l)]||l),i&&(s.width=Math.abs(l*Math.sin(n))+Math.abs(t*Math.cos(n)),s.height=Math.abs(l*Math.cos(n))+Math.abs(t*Math.sin(n)))),r&&0<s.height){for(;250<m.length;)delete g[m.shift()];g[r]||m.push(r),g[r]=s}}return s},show:function(t){return this.attr({visibility:t?"inherit":"visible"})},hide:function(){return this.attr({visibility:"hidden"})},fadeOut:function(t){var e=this;e.animate({opacity:0},{duration:t||150,complete:function(){e.attr({y:-9999})}})},add:function(t){var e,i=this.renderer,s=this.element;return t&&(this.parentGroup=t),this.parentInverted=t&&t.inverted,void 0!==this.textStr&&i.buildText(this),this.added=!0,(!t||t.handleZ||this.zIndex)&&(e=this.zIndexSetter()),e||(t?t.element:i.box).appendChild(s),this.onAdd&&this.onAdd(),this},safeRemoveChild:function(t){var e=t.parentNode;e&&e.removeChild(t)},destroy:function(){var t=this,e=t.element||{},i=t.renderer,s=i.isSVG&&"SPAN"===e.nodeName&&t.parentGroup,n=e.ownerSVGElement,o=t.clipPath;if(e.onclick=e.onmouseout=e.onmouseover=e.onmousemove=e.point=null,O(t),o&&n&&([].forEach.call(n.querySelectorAll("[clip-path],[CLIP-PATH]"),function(t){-1<t.getAttribute("clip-path").indexOf(o.element.id)&&t.removeAttribute("clip-path")}),t.clipPath=o.destroy()),t.stops){for(n=0;n<t.stops.length;n++)t.stops[n]=t.stops[n].destroy();t.stops=null}for(t.safeRemoveChild(e),i.styledMode||t.destroyShadows();s&&s.div&&0===s.div.childNodes.length;)e=s.parentGroup,t.safeRemoveChild(s.div),delete s.div,s=e;return t.alignTo&&g(i.alignedObjects,t),T(t,function(e,i){delete t[i]}),null},shadow:function(t,e,i){var s,n,a,r,l,h,c=[],d=this.element;if(t){if(!this.shadows){for(r=C(t.width,3),l=(t.opacity||.15)/r,h=this.parentInverted?"(-1,-1)":"("+C(t.offsetX,1)+", "+C(t.offsetY,1)+")",s=1;s<=r;s++)n=d.cloneNode(0),a=2*r+1-2*s,o(n,{stroke:t.color||"#000000","stroke-opacity":l*s,"stroke-width":a,transform:"translate"+h,fill:"none"}),n.setAttribute("class",(n.getAttribute("class")||"")+" highcharts-shadow"),i&&(o(n,"height",Math.max(o(n,"height")-a,0)),n.cutHeight=a),e?e.element.appendChild(n):d.parentNode&&d.parentNode.insertBefore(n,d),c.push(n);this.shadows=c}}else this.destroyShadows();return this},destroyShadows:function(){(this.shadows||[]).forEach(function(t){this.safeRemoveChild(t)},this),this.shadows=void 0},xGetter:function(t){return"circle"===this.element.nodeName&&("x"===t?t="cx":"y"===t&&(t="cy")),this._defaultGetter(t)},_defaultGetter:function(t){return t=C(this[t+"Value"],this[t],this.element?this.element.getAttribute(t):null,0),/^[\-0-9\.]+$/.test(t)&&(t=parseFloat(t)),t},dSetter:function(t,e,i){t&&t.join&&(t=t.join(" ")),/(NaN| {2}|^$)/.test(t)&&(t="M 0 0"),this[e]!==t&&(i.setAttribute(e,t),this[e]=t)},dashstyleSetter:function(t){var e,i=this["stroke-width"];if("inherit"===i&&(i=1),t=t&&t.toLowerCase()){for(t=t.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(","),e=t.length;e--;)t[e]=A(t[e])*i;t=t.join(",").replace(/NaN/g,"none"),this.element.setAttribute("stroke-dasharray",t)}},alignSetter:function(t){var e={left:"start",center:"middle",right:"end"};e[t]&&(this.alignValue=t,this.element.setAttribute("text-anchor",e[t]))},opacitySetter:function(t,e,i){this[e]=t,i.setAttribute(e,t)},titleSetter:function(t){var e=this.element.getElementsByTagName("title")[0];e||(e=u.createElementNS(this.SVG_NS,"title"),this.element.appendChild(e)),e.firstChild&&e.removeChild(e.firstChild),e.appendChild(u.createTextNode(String(C(t),"").replace(/<[^>]*>/g,"").replace(/&lt;/g,"<").replace(/&gt;/g,">")))},textSetter:function(t){t!==this.textStr&&(delete this.bBox,this.textStr=t,this.added&&this.renderer.buildText(this))},setTextPath:function(e,i){var s,n,o=this.element,a={textAnchor:"text-anchor"},r=!1,l=this.textPathWrapper,h=!l;if(i=M(!0,{enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}},i),s=i.attributes,e&&i&&i.enabled){if(this.options&&this.options.padding&&(s.dx=-this.options.padding),l||(this.textPathWrapper=l=this.renderer.createElement("textPath"),r=!0),n=l.element,(i=e.element.getAttribute("id"))||e.element.setAttribute("id",i=t.uniqueKey()),h)for(e=o.getElementsByTagName("tspan");e.length;)e[0].setAttribute("y",0),n.appendChild(e[0]);r&&l.add({element:this.text?this.text.element:o}),n.setAttributeNS("http://www.w3.org/1999/xlink","href",this.renderer.url+"#"+i),c(s.dy)&&(n.parentNode.setAttribute("dy",s.dy),delete s.dy),c(s.dx)&&(n.parentNode.setAttribute("dx",s.dx),delete s.dx),t.objectEach(s,function(t,e){n.setAttribute(a[e]||e,t)}),o.removeAttribute("transform"),this.removeTextOutline.call(l,[].slice.call(o.getElementsByTagName("tspan"))),this.applyTextOutline=this.updateTransform=S}else l&&(delete this.updateTransform,delete this.applyTextOutline,this.destroyTextPath(o,e));return this},destroyTextPath:function(t,e){var i;for(e.element.setAttribute("id",""),i=this.textPathWrapper.element.childNodes;i.length;)t.firstChild.appendChild(i[0]);t.firstChild.removeChild(this.textPathWrapper.element),delete e.textPathWrapper},fillSetter:function(t,e,i){"string"==typeof t?i.setAttribute(e,t):t&&this.complexColor(t,e,i)},visibilitySetter:function(t,e,i){"inherit"===t?i.removeAttribute(e):this[e]!==t&&i.setAttribute(e,t),this[e]=t},zIndexSetter:function(t,e){var i,s,n,o=this.renderer,a=this.parentGroup,r=(a||o).element||o.box,l=this.element,o=r===o.box;i=this.added;var h;if(c(t)?(l.setAttribute("data-z-index",t),t=+t,this[e]===t&&(i=!1)):c(this[e])&&l.removeAttribute("data-z-index"),this[e]=t,i){for((t=this.zIndex)&&a&&(a.handleZ=!0),e=r.childNodes,h=e.length-1;0<=h&&!s;h--)a=e[h],i=a.getAttribute("data-z-index"),n=!c(i),a!==l&&(0>t&&n&&!o&&!h?(r.insertBefore(l,e[h]),s=!0):(A(i)<=t||n&&(!c(t)||0<=t))&&(r.insertBefore(l,e[h+1]||null),s=!0));s||(r.insertBefore(l,e[o?3:0]||null),s=!0)}return s},_defaultSetter:function(t,e,i){i.setAttribute(e,t)}}),e.prototype.yGetter=e.prototype.xGetter,e.prototype.translateXSetter=e.prototype.translateYSetter=e.prototype.rotationSetter=e.prototype.verticalAlignSetter=e.prototype.rotationOriginXSetter=e.prototype.rotationOriginYSetter=e.prototype.scaleXSetter=e.prototype.scaleYSetter=e.prototype.matrixSetter=function(t,e){this[e]=t,this.doTransform=!0},e.prototype["stroke-widthSetter"]=e.prototype.strokeSetter=function(t,i,s){this[i]=t,this.stroke&&this["stroke-width"]?(e.prototype.fillSetter.call(this,this.stroke,"stroke",s),s.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0):"stroke-width"===i&&0===t&&this.hasStroke&&(s.removeAttribute("stroke"),this.hasStroke=!1)},i=t.SVGRenderer=function(){this.init.apply(this,arguments)},f(i.prototype,{Element:e,SVG_NS:D,init:function(t,e,i,n,a,r,h){var c;c=this.createElement("svg").attr({version:"1.1",class:"highcharts-root"}),h||c.css(this.getStyle(n)),n=c.element,t.appendChild(n),o(t,"dir","ltr"),-1===t.innerHTML.indexOf("xmlns")&&o(n,"xmlns",this.SVG_NS),this.isSVG=!0,this.box=n,this.boxWrapper=c,this.alignedObjects=[],this.url=(x||k)&&u.getElementsByTagName("base").length?I.location.href.split("#")[0].replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"",this.createElement("desc").add().element.appendChild(u.createTextNode("Created with Highcharts 7.1.1")),this.defs=this.createElement("defs").add(),this.allowHTML=r,this.forExport=a,this.styledMode=h,this.gradients={},this.cache={},this.cacheKeys=[],this.imgCount=0,this.setSize(e,i,!1);var d;x&&t.getBoundingClientRect&&(e=function(){l(t,{left:0,top:0}),d=t.getBoundingClientRect(),l(t,{left:Math.ceil(d.left)-d.left+"px",top:Math.ceil(d.top)-d.top+"px"})},e(),this.unSubPixelFix=s(I,"resize",e))},definition:function(t){function e(t,s){var n;return P(t).forEach(function(t){var o=i.createElement(t.tagName),a={};T(t,function(t,e){"tagName"!==e&&"children"!==e&&"textContent"!==e&&(a[e]=t)}),o.attr(a),o.add(s||i.defs),t.textContent&&o.element.appendChild(u.createTextNode(t.textContent)),e(t.children||[],o),n=o}),n}var i=this;return e(t)},getStyle:function(t){return this.style=f({fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',fontSize:"12px"},t)},setStyle:function(t){this.boxWrapper.css(this.getStyle(t))},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var t=this.defs;return this.box=null,this.boxWrapper=this.boxWrapper.destroy(),p(this.gradients||{}),this.gradients=null,t&&(this.defs=t.destroy()),this.unSubPixelFix&&this.unSubPixelFix(),this.alignedObjects=null},createElement:function(t){var e=new this.Element;return e.init(this,t),e},draw:S,getRadialAttr:function(t,e){return{cx:t[0]-t[2]/2+e.cx*t[2],cy:t[1]-t[2]/2+e.cy*t[2],r:e.r*t[2]}},truncate:function(t,e,i,s,n,o,a){var r,l,h,c=this,d=t.rotation,p=s?1:0,f=(i||s).length,g=f,m=[],v=function(t){e.firstChild&&e.removeChild(e.firstChild),t&&e.appendChild(u.createTextNode(t))},x=function(o,r){if(r=r||o,void 0===m[r])if(e.getSubStringLength)try{m[r]=n+e.getSubStringLength(0,s?r+1:r)}catch(t){}else c.getSpanWidth&&(v(a(i||s,o)),m[r]=n+c.getSpanWidth(t,e));return m[r]};if(t.rotation=0,l=x(e.textContent.length),h=n+l>o){for(;p<=f;)g=Math.ceil((p+f)/2),s&&(r=a(s,g)),l=x(g,r&&r.length-1),p===f?p=f+1:l>o?f=g-1:p=g;0===f?v(""):i&&f===i.length-1||v(r||a(i||s,g))}return s&&s.splice(0,g),t.actualWidth=l,t.rotation=d,h},escapes:{"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"},buildText:function(t){var e,i,s,n=t.element,a=this,r=a.forExport,h=C(t.textStr,"").toString(),c=-1!==h.indexOf("<"),d=n.childNodes,p=o(n,"x"),f=t.styles,g=t.textWidth,m=f&&f.lineHeight,v=f&&f.textOutline,x=f&&"ellipsis"===f.textOverflow,y=f&&"nowrap"===f.whiteSpace,b=f&&f.fontSize,w=d.length,f=g&&!t.added&&this.box,k=function(t){var e;return a.styledMode||(e=/(px|em)$/.test(t&&t.style.fontSize)?t.style.fontSize:b||a.style.fontSize||12),m?A(m):a.fontMetrics(e,t.getAttribute("style")?t:n).h},M=function(t,e){return T(a.escapes,function(i,s){e&&-1!==e.indexOf(i)||(t=t.toString().replace(new RegExp(i,"g"),s))}),t},S=function(t,e){var i;if(i=t.indexOf("<"),t=t.substring(i,t.indexOf(">")-i),-1!==(i=t.indexOf(e+"="))&&(i=i+e.length+1,'"'===(e=t.charAt(i))||"'"===e))return t=t.substring(i+1),t.substring(0,t.indexOf(e))};if((i=[h,x,y,m,v,b,g].join())!==t.textCache){for(t.textCache=i;w--;)n.removeChild(d[w]);c||v||x||g||-1!==h.indexOf(" ")?(f&&f.appendChild(n),c?(h=a.styledMode?h.replace(/<(b|strong)>/g,'<span class="highcharts-strong">').replace(/<(i|em)>/g,'<span class="highcharts-emphasized">'):h.replace(/<(b|strong)>/g,'<span style="font-weight:bold">').replace(/<(i|em)>/g,'<span style="font-style:italic">'),h=h.replace(/<a/g,"<span").replace(/<\/(b|strong|i|em|a)>/g,"</span>").split(/<br.*?>/g)):h=[h],h=h.filter(function(t){return""!==t}),h.forEach(function(i,h){var c,d=0,f=0;i=i.replace(/^\s+|\s+$/g,"").replace(/<span/g,"|||<span").replace(/<\/span>/g,"</span>|||"),c=i.split("|||"),c.forEach(function(i){if(""!==i||1===c.length){var m,v,w={},T=u.createElementNS(a.SVG_NS,"tspan");if((m=S(i,"class"))&&o(T,"class",m),(m=S(i,"style"))&&(m=m.replace(/(;| |^)color([ :])/,"$1fill$2"),o(T,"style",m)),(v=S(i,"href"))&&!r&&(o(T,"onclick",'location.href="'+v+'"'),o(T,"class","highcharts-anchor"),a.styledMode||l(T,{cursor:"pointer"}))," "!==(i=M(i.replace(/<[a-zA-Z\/](.|\n)*?>/g,"")||" "))){if(T.appendChild(u.createTextNode(i)),d?w.dx=0:h&&null!==p&&(w.x=p),o(T,w),n.appendChild(T),!d&&s&&(!L&&r&&l(T,{display:"block"}),o(T,"dy",k(T))),g){var C=i.replace(/([^\^])-/g,"$1- ").split(" "),w=!y&&(1<c.length||h||1<C.length);v=0;var A=k(T);if(x)e=a.truncate(t,T,i,void 0,0,Math.max(0,g-parseInt(b||12,10)),function(t,e){return t.substring(0,e)+"…"});else if(w)for(;C.length;)C.length&&!y&&0<v&&(T=u.createElementNS(D,"tspan"),o(T,{dy:A,x:p}),m&&o(T,"style",m),T.appendChild(u.createTextNode(C.join(" ").replace(/- /g,"-"))),n.appendChild(T)),a.truncate(t,T,null,C,0===v?f:0,g,function(t,e){return C.slice(0,e).join(" ").replace(/- /g,"-")}),f=t.actualWidth,v++}d++}}}),s=s||n.childNodes.length}),x&&e&&t.attr("title",M(t.textStr,["&lt;","&gt;"])),f&&f.removeChild(n),v&&t.applyTextOutline&&t.applyTextOutline(v)):n.appendChild(u.createTextNode(M(h)))}},getContrast:function(t){return t=r(t).rgba,t[0]*=1,t[1]*=1.2,t[2]*=.5,459<t[0]+t[1]+t[2]?"#000000":"#FFFFFF"},button:function(t,e,i,n,o,a,r,l,h,c){var d=this.label(t,e,i,h,null,null,c,null,"button"),p=0,u=this.styledMode;if(d.attr(M({padding:8,r:2},o)),!u){var g,m,v,x;o=M({fill:"#f7f7f7",stroke:"#cccccc","stroke-width":1,style:{color:"#333333",cursor:"pointer",fontWeight:"normal"}},o),g=o.style,delete o.style,a=M(o,{fill:"#e6e6e6"},a),m=a.style,delete a.style,r=M(o,{fill:"#e6ebf5",style:{color:"#000000",fontWeight:"bold"}},r),v=r.style,delete r.style,l=M(o,{style:{color:"#cccccc"}},l),x=l.style,delete l.style}return s(d.element,y?"mouseover":"mouseenter",function(){3!==p&&d.setState(1)}),s(d.element,y?"mouseout":"mouseleave",function(){3!==p&&d.setState(p)}),d.setState=function(t){1!==t&&(d.state=p=t),d.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+["normal","hover","pressed","disabled"][t||0]),u||d.attr([o,a,r,l][t||0]).css([g,m,v,x][t||0])},u||d.attr(o).css(f({cursor:"default"},g)),d.on("click",function(t){3!==p&&n.call(d,t)})},crispLine:function(t,e){return t[1]===t[4]&&(t[1]=t[4]=Math.round(t[1])-e%2/2),t[2]===t[5]&&(t[2]=t[5]=Math.round(t[2])+e%2/2),t},path:function(t){var e=this.styledMode?{}:{fill:"none"};return v(t)?e.d=t:b(t)&&f(e,t),this.createElement("path").attr(e)},circle:function(t,e,i){return t=b(t)?t:void 0===t?{}:{x:t,y:e,r:i},e=this.createElement("circle"),e.xSetter=e.ySetter=function(t,e,i){i.setAttribute("c"+e,t)},e.attr(t)},arc:function(t,e,i,s,n,o){return b(t)?(s=t,e=s.y,i=s.r,t=s.x):s={innerR:s,start:n,end:o},t=this.symbol("arc",t,e,i,i,s),t.r=i,t},rect:function(t,e,i,s,n,a){n=b(t)?t.r:n;var r=this.createElement("rect");return t=b(t)?t:void 0===t?{}:{x:t,y:e,width:Math.max(i,0),height:Math.max(s,0)},this.styledMode||(void 0!==a&&(t.strokeWidth=a,t=r.crisp(t)),t.fill="none"),n&&(t.r=n),r.rSetter=function(t,e,i){r.r=t,o(i,{rx:t,ry:t})},r.rGetter=function(){return r.r},r.attr(t)},setSize:function(t,e,i){var s=this.alignedObjects,n=s.length;for(this.width=t,this.height=e,this.boxWrapper.animate({width:t,height:e},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},duration:C(i,!0)?void 0:0});n--;)s[n].align()},g:function(t){var e=this.createElement("g");return t?e.attr({class:"highcharts-"+t}):e},image:function(t,e,i,n,o,a){var r,l={preserveAspectRatio:"none"},h=function(t,e){t.setAttributeNS?t.setAttributeNS("http://www.w3.org/1999/xlink","href",e):t.setAttribute("hc-svg-href",e)},c=function(e){h(r.element,t),a.call(r,e)};return 1<arguments.length&&f(l,{x:e,y:i,width:n,height:o}),r=this.createElement("image").attr(l),a?(h(r.element,"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),l=new I.Image,s(l,"load",c),l.src=t,l.complete&&c({})):h(r.element,t),r},symbol:function(t,e,i,s,n,o){var r,d,p,g=this,m=/^url\((.*?)\)$/,v=m.test(t),x=!v&&(this.symbols[t]?t:"circle"),y=x&&this.symbols[x],b=c(e)&&y&&y.call(this.symbols,Math.round(e),Math.round(i),s,n,o);return y?(r=this.path(b),g.styledMode||r.attr("fill","none"),f(r,{symbolName:x,x:e,y:i,width:s,height:n}),o&&f(r,o)):v&&(d=t.match(m)[1],r=this.image(d),r.imgwidth=C(_[d]&&_[d].width,o&&o.width),r.imgheight=C(_[d]&&_[d].height,o&&o.height),p=function(){r.attr({width:r.width,height:r.height})},["width","height"].forEach(function(t){r[t+"Setter"]=function(t,e){var i={},s=this["img"+e],n="width"===e?"translateX":"translateY";this[e]=t,c(s)&&(o&&"within"===o.backgroundSize&&this.width&&this.height&&(s=Math.round(s*Math.min(this.width/this.imgwidth,this.height/this.imgheight))),this.element&&this.element.setAttribute(e,s),this.alignByTranslate||(i[n]=((this[e]||0)-s)/2,this.attr(i)))}}),c(e)&&r.attr({x:e,y:i}),r.isImg=!0,c(r.imgwidth)&&c(r.imgheight)?p():(r.attr({width:0,height:0}),h("img",{onload:function(){var t=a[g.chartIndex];0===this.width&&(l(this,{position:"absolute",top:"-999em"}),u.body.appendChild(this)),_[d]={width:this.width,height:this.height},r.imgwidth=this.width,r.imgheight=this.height,r.element&&p(),this.parentNode&&this.parentNode.removeChild(this),!--g.imgCount&&t&&t.onload&&t.onload()},src:d}),this.imgCount++)),r},symbols:{circle:function(t,e,i,s){return this.arc(t+i/2,e+s/2,i/2,s/2,{start:.5*Math.PI,end:2.5*Math.PI,open:!1})},square:function(t,e,i,s){return["M",t,e,"L",t+i,e,t+i,e+s,t,e+s,"Z"]},triangle:function(t,e,i,s){return["M",t+i/2,e,"L",t+i,e+s,t,e+s,"Z"]},"triangle-down":function(t,e,i,s){return["M",t,e,"L",t+i,e,t+i/2,e+s,"Z"]},diamond:function(t,e,i,s){return["M",t+i/2,e,"L",t+i,e+s/2,t+i/2,e+s,t,e+s/2,"Z"]},arc:function(t,e,i,s,n){var o=n.start,a=n.r||i,r=n.r||s||i,l=n.end-.001;i=n.innerR,s=C(n.open,.001>Math.abs(n.end-n.start-2*Math.PI));var h=Math.cos(o),d=Math.sin(o),p=Math.cos(l),l=Math.sin(l),o=.001>n.end-o-Math.PI?0:1;return n=["M",t+a*h,e+r*d,"A",a,r,0,o,C(n.clockwise,1),t+a*p,e+r*l],c(i)&&n.push(s?"M":"L",t+i*p,e+i*l,"A",i,i,0,o,0,t+i*h,e+i*d),n.push(s?"":"Z"),n},callout:function(t,e,i,s,n){var o=Math.min(n&&n.r||0,i,s),a=o+6,r=n&&n.anchorX;n=n&&n.anchorY;var l;return l=["M",t+o,e,"L",t+i-o,e,"C",t+i,e,t+i,e,t+i,e+o,"L",t+i,e+s-o,"C",t+i,e+s,t+i,e+s,t+i-o,e+s,"L",t+o,e+s,"C",t,e+s,t,e+s,t,e+s-o,"L",t,e+o,"C",t,e,t,e,t+o,e],r&&r>i?n>e+a&&n<e+s-a?l.splice(13,3,"L",t+i,n-6,t+i+6,n,t+i,n+6,t+i,e+s-o):l.splice(13,3,"L",t+i,s/2,r,n,t+i,s/2,t+i,e+s-o):r&&0>r?n>e+a&&n<e+s-a?l.splice(33,3,"L",t,n+6,t-6,n,t,n-6,t,e+o):l.splice(33,3,"L",t,s/2,r,n,t,s/2,t,e+o):n&&n>s&&r>t+a&&r<t+i-a?l.splice(23,3,"L",r+6,e+s,r,e+s+6,r-6,e+s,t+o,e+s):n&&0>n&&r>t+a&&r<t+i-a&&l.splice(3,3,"L",r-6,e,r,e-6,r+6,e,i-o,e),l}},clipRect:function(e,i,s,n){var o=t.uniqueKey()+"-",a=this.createElement("clipPath").attr({id:o}).add(this.defs);return e=this.rect(e,i,s,n,0).add(a),e.id=o,e.clipPath=a,e.count=0,e},text:function(t,e,i,s){var n={};return!s||!this.allowHTML&&this.forExport?(n.x=Math.round(e||0),i&&(n.y=Math.round(i)),c(t)&&(n.text=t),t=this.createElement("text").attr(n),s||(t.xSetter=function(t,e,i){var s,n,o=i.getElementsByTagName("tspan"),a=i.getAttribute(e);for(n=0;n<o.length;n++)s=o[n],s.getAttribute(e)===a&&s.setAttribute(e,t);i.setAttribute(e,t)}),t):this.html(t,e,i)},fontMetrics:function(t,i){return t=!this.styledMode&&/px/.test(t)||!I.getComputedStyle?t||i&&i.style&&i.style.fontSize||this.style&&this.style.fontSize:i&&e.prototype.getStyle.call(i,"font-size"),t=/px/.test(t)?A(t):12,i=24>t?t+3:Math.round(1.2*t),{h:i,b:Math.round(.8*i),f:t}},rotCorr:function(t,e,i){var s=t;return e&&i&&(s=Math.max(s*Math.cos(e*d),4)),{x:-t/3*Math.sin(e*d),y:s}},label:function(i,s,n,o,a,r,l,h,d){var p,u,g,m,v,x,y,b,w,k,S,T,C=this,A=C.styledMode,P=C.g("button"!==d&&"label"),O=P.text=C.text("",0,0,l).attr({zIndex:1}),L=0,D=3,_=0,I={},z=/^url\((.*?)\)$/.test(o),R=A||z,B=function(){return A?p.strokeWidth()%2/2:(b?parseInt(b,10):0)%2/2};d&&P.addClass("highcharts-"+d),k=function(){var t=O.element.style,e={};u=(void 0===g||void 0===m||y)&&c(O.textStr)&&O.getBBox(),P.width=(g||u.width||0)+2*D+_,P.height=(m||u.height||0)+2*D,w=D+Math.min(C.fontMetrics(t&&t.fontSize,O).b,u?u.height:1/0),R&&(p||(P.box=p=C.symbols[o]||z?C.symbol(o):C.rect(),p.addClass(("button"===d?"":"highcharts-label-box")+(d?" highcharts-"+d+"-box":"")),p.add(P),t=B(),e.x=t,e.y=(h?-w:0)+t),e.width=Math.round(P.width),e.height=Math.round(P.height),p.attr(f(e,I)),I={})},S=function(){var t,e=_+D;t=h?0:w,c(g)&&u&&("center"===y||"right"===y)&&(e+={center:.5,right:1}[y]*(g-u.width)),e===O.x&&t===O.y||(O.attr("x",e),O.hasBoxWidthChanged&&(u=O.getBBox(!0),k()),void 0!==t&&O.attr("y",t)),O.x=e,O.y=t},T=function(t,e){p?p.attr(t,e):I[t]=e},P.onAdd=function(){O.add(P),P.attr({text:i||0===i?i:"",x:s,y:n}),p&&c(a)&&P.attr({anchorX:a,anchorY:r})},P.widthSetter=function(e){g=t.isNumber(e)?e:null},P.heightSetter=function(t){m=t},P["text-alignSetter"]=function(t){y=t},P.paddingSetter=function(t){c(t)&&t!==D&&(D=P.padding=t,S())},P.paddingLeftSetter=function(t){c(t)&&t!==_&&(_=t,S())},P.alignSetter=function(t){(t={left:0,center:.5,right:1}[t])!==L&&(L=t,u&&P.attr({x:v}))},P.textSetter=function(t){void 0!==t&&O.attr({text:t}),k(),S()},P["stroke-widthSetter"]=function(t,e){t&&(R=!0),b=this["stroke-width"]=t,T(e,t)},A?P.rSetter=function(t,e){T(e,t)}:P.strokeSetter=P.fillSetter=P.rSetter=function(t,e){"r"!==e&&("fill"===e&&t&&(R=!0),P[e]=t),T(e,t)},P.anchorXSetter=function(t,e){a=P.anchorX=t,T(e,Math.round(t)-B()-v)},P.anchorYSetter=function(t,e){r=P.anchorY=t,T(e,t-x)},P.xSetter=function(t){P.x=t,L&&(t-=L*((g||u.width)+2*D),P["forceAnimate:x"]=!0),v=Math.round(t),P.attr("translateX",v)},P.ySetter=function(t){x=P.y=Math.round(t),P.attr("translateY",x)};var N=P.css;return l={css:function(t){if(t){var e={};t=M(t),P.textProps.forEach(function(i){void 0!==t[i]&&(e[i]=t[i],delete t[i])}),O.css(e),"width"in e&&k(),"fontSize"in e&&(k(),S())}return N.call(P,t)},getBBox:function(){return{width:u.width+2*D,height:u.height+2*D,x:u.x-D,y:u.y-D}},destroy:function(){E(P.element,"mouseenter"),E(P.element,"mouseleave"),O&&(O=O.destroy()),p&&(p=p.destroy()),e.prototype.destroy.call(P),P=C=k=S=T=null}},A||(l.shadow=function(t){return t&&(k(),p&&p.shadow(t)),P}),f(P,l)}}),t.Renderer=i}),e(i,"parts/Html.js",[i["parts/Globals.js"]],function(t){var e=t.attr,i=t.createElement,s=t.css,n=t.defined,o=t.extend,a=t.isFirefox,r=t.isMS,l=t.isWebKit,h=t.pick,c=t.pInt,d=t.SVGElement,p=t.SVGRenderer,u=t.win;o(d.prototype,{htmlCss:function(t){var e,i="SPAN"===this.element.tagName&&t&&"width"in t,n=h(i&&t.width,void 0);return i&&(delete t.width,this.textWidth=n,e=!0),t&&"ellipsis"===t.textOverflow&&(t.whiteSpace="nowrap",t.overflow="hidden"),this.styles=o(this.styles,t),s(this.element,t),e&&this.htmlUpdateTransform(),this},htmlGetBBox:function(){var t=this.element;return{x:t.offsetLeft,y:t.offsetTop,width:t.offsetWidth,height:t.offsetHeight}},htmlUpdateTransform:function(){if(this.added){var t=this.renderer,e=this.element,i=this.translateX||0,o=this.translateY||0,a=this.x||0,r=this.y||0,l=this.textAlign||"left",h={left:0,center:.5,right:1}[l],d=this.styles,p=d&&d.whiteSpace;if(s(e,{marginLeft:i,marginTop:o}),!t.styledMode&&this.shadows&&this.shadows.forEach(function(t){s(t,{marginLeft:i+1,marginTop:o+1})}),this.inverted&&[].forEach.call(e.childNodes,function(i){t.invertChild(i,e)}),"SPAN"===e.tagName){var u,d=this.rotation,f=this.textWidth&&c(this.textWidth),g=[d,l,e.innerHTML,this.textWidth,this.textAlign].join();(u=f!==this.oldTextWidth)&&!(u=f>this.oldTextWidth)&&((u=this.textPxLength)||(s(e,{width:"",whiteSpace:p||"nowrap"}),u=e.offsetWidth),u=u>f),u&&(/[ \-]/.test(e.textContent||e.innerText)||"ellipsis"===e.style.textOverflow)?(s(e,{width:f+"px",display:"block",whiteSpace:p||"normal"}),this.oldTextWidth=f,this.hasBoxWidthChanged=!0):this.hasBoxWidthChanged=!1,g!==this.cTT&&(p=t.fontMetrics(e.style.fontSize,e).b,!n(d)||d===(this.oldRotation||0)&&l===this.oldAlign||this.setSpanRotation(d,h,p),this.getSpanCorrection(!n(d)&&this.textPxLength||e.offsetWidth,p,h,d,l)),s(e,{left:a+(this.xCorr||0)+"px",top:r+(this.yCorr||0)+"px"}),this.cTT=g,this.oldRotation=d,this.oldAlign=l}}else this.alignOnAdd=!0},setSpanRotation:function(t,e,i){var n={},o=this.renderer.getTransformKey();n[o]=n.transform="rotate("+t+"deg)",n[o+(a?"Origin":"-origin")]=n.transformOrigin=100*e+"% "+i+"px",s(this.element,n)},getSpanCorrection:function(t,e,i){this.xCorr=-t*i,this.yCorr=-e}}),o(p.prototype,{getTransformKey:function(){return r&&!/Edge/.test(u.navigator.userAgent)?"-ms-transform":l?"-webkit-transform":a?"MozTransform":u.opera?"-o-transform":""},html:function(s,n,a){var r=this.createElement("span"),l=r.element,c=r.renderer,p=c.isSVG,u=function(t,e){["opacity","visibility"].forEach(function(i){t[i+"Setter"]=function(s,n,o){var a=t.div?t.div.style:e;d.prototype[i+"Setter"].call(this,s,n,o),a&&(a[n]=s)}}),t.addedSetters=!0},f=t.charts[c.chartIndex],f=f&&f.styledMode;return r.textSetter=function(t){t!==l.innerHTML&&(delete this.bBox,delete this.oldTextWidth),this.textStr=t,l.innerHTML=h(t,""),r.doTransform=!0},p&&u(r,r.element.style),r.xSetter=r.ySetter=r.alignSetter=r.rotationSetter=function(t,e){"align"===e&&(e="textAlign"),r[e]=t,r.doTransform=!0},r.afterSetters=function(){this.doTransform&&(this.htmlUpdateTransform(),this.doTransform=!1)},r.attr({text:s,x:Math.round(n),y:Math.round(a)}).css({position:"absolute"}),f||r.css({fontFamily:this.style.fontFamily,fontSize:this.style.fontSize}),l.style.whiteSpace="nowrap",r.css=r.htmlCss,p&&(r.add=function(t){var s,n=c.box.parentNode,a=[];if(this.parentGroup=t){if(!(s=t.div)){for(;t;)a.push(t),t=t.parentGroup;a.reverse().forEach(function(t){function l(e,i){t[i]=e,"translateX"===i?h.left=e+"px":h.top=e+"px",t.doTransform=!0}var h,c=e(t.element,"class");c&&(c={className:c}),s=t.div=t.div||i("div",c,{position:"absolute",left:(t.translateX||0)+"px",top:(t.translateY||0)+"px",display:t.display,opacity:t.opacity,pointerEvents:t.styles&&t.styles.pointerEvents},s||n),h=s.style,o(t,{classSetter:function(t){return function(e){this.element.setAttribute("class",e),t.className=e}}(s),on:function(){return a[0].div&&r.on.apply({element:a[0].div},arguments),t},translateXSetter:l,translateYSetter:l}),t.addedSetters||u(t)})}}else s=n;return s.appendChild(l),r.added=!0,r.alignOnAdd&&r.htmlUpdateTransform(),r}),r}})}),e(i,"parts/Time.js",[i["parts/Globals.js"]],function(t){var e=t.defined,i=t.extend,s=t.merge,n=t.pick,o=t.timeUnits,a=t.win;t.Time=function(t){this.update(t,!1)},t.Time.prototype={defaultOptions:{},update:function(t){var e=n(t&&t.useUTC,!0),i=this;this.options=t=s(!0,this.options||{},t),this.Date=t.Date||a.Date||Date,this.timezoneOffset=(this.useUTC=e)&&t.timezoneOffset,this.getTimezoneOffset=this.timezoneOffsetFunction(),(this.variableTimezone=!(e&&!t.getTimezoneOffset&&!t.timezone))||this.timezoneOffset?(this.get=function(t,e){var s=e.getTime(),n=s-i.getTimezoneOffset(e);return e.setTime(n),t=e["getUTC"+t](),e.setTime(s),t},this.set=function(t,e,s){var n;"Milliseconds"===t||"Seconds"===t||"Minutes"===t&&0==e.getTimezoneOffset()%60?e["set"+t](s):(n=i.getTimezoneOffset(e),n=e.getTime()-n,e.setTime(n),e["setUTC"+t](s),t=i.getTimezoneOffset(e),n=e.getTime()+t,e.setTime(n))}):e?(this.get=function(t,e){return e["getUTC"+t]()},this.set=function(t,e,i){return e["setUTC"+t](i)}):(this.get=function(t,e){return e["get"+t]()},this.set=function(t,e,i){return e["set"+t](i)})},makeTime:function(e,i,s,o,a,r){var l,h,c;return this.useUTC?(l=this.Date.UTC.apply(0,arguments),h=this.getTimezoneOffset(l),l+=h,c=this.getTimezoneOffset(l),h!==c?l+=c-h:h-36e5!==this.getTimezoneOffset(l-36e5)||t.isSafari||(l-=36e5)):l=new this.Date(e,i,n(s,1),n(o,0),n(a,0),n(r,0)).getTime(),l},timezoneOffsetFunction:function(){var e=this,i=this.options,s=a.moment;if(!this.useUTC)return function(t){return 6e4*new Date(t).getTimezoneOffset()};if(i.timezone){if(s)return function(t){return 6e4*-s.tz(t,i.timezone).utcOffset()};t.error(25)}return this.useUTC&&i.getTimezoneOffset?function(t){return 6e4*i.getTimezoneOffset(t)}:function(){return 6e4*(e.timezoneOffset||0)}},dateFormat:function(e,i,s){if(!t.defined(i)||isNaN(i))return t.defaultOptions.lang.invalidDate||"";e=t.pick(e,"%Y-%m-%d %H:%M:%S");var n=this,o=new this.Date(i),a=this.get("Hours",o),r=this.get("Day",o),l=this.get("Date",o),h=this.get("Month",o),c=this.get("FullYear",o),d=t.defaultOptions.lang,p=d.weekdays,u=d.shortWeekdays,f=t.pad,o=t.extend({a:u?u[r]:p[r].substr(0,3),A:p[r],d:f(l),e:f(l,2," "),w:r,b:d.shortMonths[h],B:d.months[h],m:f(h+1),o:h+1,y:c.toString().substr(2,2),Y:c,H:f(a),k:a,I:f(a%12||12),l:a%12||12,M:f(n.get("Minutes",o)),p:12>a?"AM":"PM",P:12>a?"am":"pm",S:f(o.getSeconds()),L:f(Math.floor(i%1e3),3)},t.dateFormats);return t.objectEach(o,function(t,s){for(;-1!==e.indexOf("%"+s);)e=e.replace("%"+s,"function"==typeof t?t.call(n,i):t)}),s?e.substr(0,1).toUpperCase()+e.substr(1):e},resolveDTLFormat:function(e){return t.isObject(e,!0)?e:(e=t.splat(e),{main:e[0],from:e[1],to:e[2]})},getTimeTicks:function(t,s,a,r){var l,h,c=this,d=[],p={};l=new c.Date(s);var u,f=t.unitRange,g=t.count||1;if(r=n(r,1),e(s)){c.set("Milliseconds",l,f>=o.second?0:g*Math.floor(c.get("Milliseconds",l)/g)),f>=o.second&&c.set("Seconds",l,f>=o.minute?0:g*Math.floor(c.get("Seconds",l)/g)),f>=o.minute&&c.set("Minutes",l,f>=o.hour?0:g*Math.floor(c.get("Minutes",l)/g)),f>=o.hour&&c.set("Hours",l,f>=o.day?0:g*Math.floor(c.get("Hours",l)/g)),f>=o.day&&c.set("Date",l,f>=o.month?1:Math.max(1,g*Math.floor(c.get("Date",l)/g))),f>=o.month&&(c.set("Month",l,f>=o.year?0:g*Math.floor(c.get("Month",l)/g)),h=c.get("FullYear",l)),f>=o.year&&c.set("FullYear",l,h-h%g),f===o.week&&(h=c.get("Day",l),c.set("Date",l,c.get("Date",l)-h+r+(h<r?-7:0))),h=c.get("FullYear",l),r=c.get("Month",l);var m=c.get("Date",l),v=c.get("Hours",l);for(s=l.getTime(),c.variableTimezone&&(u=a-s>4*o.month||c.getTimezoneOffset(s)!==c.getTimezoneOffset(a)),s=l.getTime(),l=1;s<a;)d.push(s),s=f===o.year?c.makeTime(h+l*g,0):f===o.month?c.makeTime(h,r+l*g):!u||f!==o.day&&f!==o.week?u&&f===o.hour&&1<g?c.makeTime(h,r,m,v+l*g):s+f*g:c.makeTime(h,r,m+l*g*(f===o.day?1:7)),l++;d.push(s),f<=o.hour&&1e4>d.length&&d.forEach(function(t){0==t%18e5&&"000000000"===c.dateFormat("%H%M%S%L",t)&&(p[t]="day")})}return d.info=i(t,{higherRanks:p,totalRange:f*g}),d}}}),e(i,"parts/Options.js",[i["parts/Globals.js"]],function(t){var e=t.color,i=t.merge;t.defaultOptions={colors:"#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" "),symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),decimalPoint:".",numericSymbols:"kMGTPE".split(""),resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{},time:t.Time.prototype.defaultOptions,chart:{styledMode:!1,borderRadius:0,colorCount:10,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{zIndex:6},position:{align:"right",x:-10,y:10}},width:null,height:null,borderColor:"#335cad",backgroundColor:"#ffffff",plotBorderColor:"#cccccc"},title:{text:"Chart title",align:"center",margin:15,widthAdjust:-44},subtitle:{text:"",align:"center",widthAdjust:-44},plotOptions:{},labels:{style:{position:"absolute",color:"#333333"}},legend:{enabled:!0,align:"center",alignColumns:!0,layout:"horizontal",labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{activeColor:"#003399",inactiveColor:"#cccccc"},itemStyle:{color:"#333333",cursor:"pointer",fontSize:"12px",fontWeight:"bold",textOverflow:"ellipsis"},itemHoverStyle:{color:"#000000"},itemHiddenStyle:{color:"#cccccc"},shadow:!1,itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"#ffffff",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:t.svg,borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %b %e, %H:%M:%S.%L",second:"%A, %b %e, %H:%M:%S",minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",year:"%Y"},footerFormat:"",padding:8,snap:t.isTouchDevice?25:10,headerFormat:'<span style="font-size: 10px">{point.key}</span><br/>',pointFormat:'<span style="color:{point.color}">●</span> {series.name}: <b>{point.y}</b><br/>',backgroundColor:e("#f7f7f7").setOpacity(.85).get(),borderWidth:1,shadow:!0,style:{color:"#333333",cursor:"default",fontSize:"12px",pointerEvents:"none",whiteSpace:"nowrap"}},credits:{enabled:!0,href:"https://www.highcharts.com?credits",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#999999",fontSize:"9px"},text:"Highcharts.com"}},t.setOptions=function(e){return t.defaultOptions=i(!0,t.defaultOptions,e),t.time.update(i(t.defaultOptions.global,t.defaultOptions.time),!1),t.defaultOptions},t.getOptions=function(){return t.defaultOptions},t.defaultPlotOptions=t.defaultOptions.plotOptions,t.time=new t.Time(i(t.defaultOptions.global,t.defaultOptions.time)),t.dateFormat=function(e,i,s){return t.time.dateFormat(e,i,s)}}),e(i,"parts/Tick.js",[i["parts/Globals.js"]],function(t){var e=t.correctFloat,i=t.defined,s=t.destroyObjectProperties,n=t.fireEvent,o=t.isNumber,a=t.merge,r=t.pick,l=t.deg2rad;t.Tick=function(t,e,i,s,n){this.axis=t,this.pos=e,this.type=i||"",this.isNewLabel=this.isNew=!0,this.parameters=n||{},this.tickmarkOffset=this.parameters.tickmarkOffset,this.options=this.parameters.options,i||s||this.addLabel()},t.Tick.prototype={addLabel:function(){var s,n,o,l,h=this,c=h.axis,d=c.options,p=c.chart,u=c.categories,f=c.names,g=h.pos,m=r(h.options&&h.options.labels,d.labels),v=c.tickPositions,x=g===v[0],y=g===v[v.length-1],u=this.parameters.category||(u?r(u[g],f[g],g):g),b=h.label,v=v.info;c.isDatetimeAxis&&v&&(n=p.time.resolveDTLFormat(d.dateTimeLabelFormats[!d.grid&&v.higherRanks[g]||v.unitName]),s=n.main),h.isFirst=x,h.isLast=y,h.formatCtx={axis:c,chart:p,isFirst:x,isLast:y,dateTimeLabelFormat:s,tickPositionInfo:v,value:c.isLog?e(c.lin2log(u)):u,pos:g},d=c.labelFormatter.call(h.formatCtx,this.formatCtx),(l=n&&n.list)&&(h.shortenLabel=function(){for(o=0;o<l.length;o++)if(b.attr({text:c.labelFormatter.call(t.extend(h.formatCtx,{dateTimeLabelFormat:l[o]}))}),b.getBBox().width<c.getSlotWidth(h)-2*r(m.padding,5))return;b.attr({text:""})}),i(b)?b&&b.textStr!==d&&(!b.textWidth||m.style&&m.style.width||b.styles.width||b.css({width:null}),b.attr({text:d})):((h.label=b=i(d)&&m.enabled?p.renderer.text(d,0,0,m.useHTML).add(c.labelGroup):null)&&(p.styledMode||b.css(a(m.style)),b.textPxLength=b.getBBox().width),h.rotation=0)},getLabelSize:function(){return this.label?this.label.getBBox()[this.axis.horiz?"height":"width"]:0},handleOverflow:function(t){var e,i=this.axis,s=i.options.labels,n=t.x,o=i.chart.chartWidth,a=i.chart.spacing,h=r(i.labelLeft,Math.min(i.pos,a[3])),a=r(i.labelRight,Math.max(i.isRadial?0:i.pos+i.len,o-a[1])),c=this.label,d=this.rotation,p={left:0,center:.5,right:1}[i.labelAlign||c.attr("align")],u=c.getBBox().width,f=i.getSlotWidth(this),g=f,m=1,v={};d||"justify"!==r(s.overflow,"justify")?0>d&&n-p*u<h?e=Math.round(n/Math.cos(d*l)-h):0<d&&n+p*u>a&&(e=Math.round((o-n)/Math.cos(d*l))):(o=n+(1-p)*u,n-p*u<h?g=t.x+g*(1-p)-h:o>a&&(g=a-t.x+g*p,m=-1),g=Math.min(f,g),g<f&&"center"===i.labelAlign&&(t.x+=m*(f-g-p*(f-Math.min(u,g)))),(u>g||i.autoRotation&&(c.styles||{}).width)&&(e=g)),e&&(this.shortenLabel?this.shortenLabel():(v.width=Math.floor(e),(s.style||{}).textOverflow||(v.textOverflow="ellipsis"),c.css(v)))},getPosition:function(e,i,s,o){var a=this.axis,r=a.chart,l=o&&r.oldChartHeight||r.chartHeight;return e={x:e?t.correctFloat(a.translate(i+s,null,null,o)+a.transB):a.left+a.offset+(a.opposite?(o&&r.oldChartWidth||r.chartWidth)-a.right-a.left:0),y:e?l-a.bottom+a.offset-(a.opposite?a.height:0):t.correctFloat(l-a.translate(i+s,null,null,o)-a.transB)},n(this,"afterGetPosition",{pos:e}),e},getLabelPosition:function(t,e,s,o,a,r,h,c){var d=this.axis,p=d.transA,u=d.reversed,f=d.staggerLines,g=d.tickRotCorr||{x:0,y:0},m=a.y,v=o||d.reserveSpaceDefault?0:-d.labelOffset*("center"===d.labelAlign?.5:1),x={};return i(m)||(m=0===d.side?s.rotation?-8:-s.getBBox().height:2===d.side?g.y+8:Math.cos(s.rotation*l)*(g.y-s.getBBox(!1,0).height/2)),t=t+a.x+v+g.x-(r&&o?r*p*(u?-1:1):0),e=e+m-(r&&!o?r*p*(u?1:-1):0),f&&(s=h/(c||1)%f,d.opposite&&(s=f-s-1),e+=d.labelOffset/f*s),x.x=t,x.y=Math.round(e),n(this,"afterGetLabelPosition",{pos:x,tickmarkOffset:r,index:h}),x},getMarkPath:function(t,e,i,s,n,o){return o.crispLine(["M",t,e,"L",t+(n?0:-i),e+(n?i:0)],s)},renderGridLine:function(t,e,i){var s=this.axis,n=s.options,o=this.gridLine,a={},l=this.pos,h=this.type,c=r(this.tickmarkOffset,s.tickmarkOffset),d=s.chart.renderer,p=h?h+"Grid":"grid",u=n[p+"LineWidth"],f=n[p+"LineColor"],n=n[p+"LineDashStyle"];o||(s.chart.styledMode||(a.stroke=f,a["stroke-width"]=u,n&&(a.dashstyle=n)),h||(a.zIndex=1),t&&(e=0),this.gridLine=o=d.path().attr(a).addClass("highcharts-"+(h?h+"-":"")+"grid-line").add(s.gridGroup)),o&&(i=s.getPlotLinePath(l+c,o.strokeWidth()*i,t,"pass"))&&o[t||this.isNew?"attr":"animate"]({d:i,opacity:e})},renderMark:function(t,e,i){var s=this.axis,n=s.options,o=s.chart.renderer,a=this.type,l=a?a+"Tick":"tick",h=s.tickSize(l),c=this.mark,d=!c,p=t.x;t=t.y;var u=r(n[l+"Width"],!a&&s.isXAxis?1:0),n=n[l+"Color"];h&&(s.opposite&&(h[0]=-h[0]),d&&(this.mark=c=o.path().addClass("highcharts-"+(a?a+"-":"")+"tick").add(s.axisGroup),s.chart.styledMode||c.attr({stroke:n,"stroke-width":u})),c[d?"attr":"animate"]({d:this.getMarkPath(p,t,h[0],c.strokeWidth()*i,s.horiz,o),opacity:e}))},renderLabel:function(t,e,i,s){var n=this.axis,a=n.horiz,l=n.options,h=this.label,c=l.labels,d=c.step,n=r(this.tickmarkOffset,n.tickmarkOffset),p=!0,u=t.x;t=t.y,h&&o(u)&&(h.xy=t=this.getLabelPosition(u,t,h,a,c,n,s,d),this.isFirst&&!this.isLast&&!r(l.showFirstLabel,1)||this.isLast&&!this.isFirst&&!r(l.showLastLabel,1)?p=!1:!a||c.step||c.rotation||e||0===i||this.handleOverflow(t),d&&s%d&&(p=!1),p&&o(t.y)?(t.opacity=i,h[this.isNewLabel?"attr":"animate"](t),this.isNewLabel=!1):(h.attr("y",-9999),this.isNewLabel=!0))},render:function(e,i,s){var n=this.axis,o=n.horiz,a=this.pos,l=r(this.tickmarkOffset,n.tickmarkOffset),a=this.getPosition(o,a,l,i),l=a.x,h=a.y,n=o&&l===n.pos+n.len||!o&&h===n.pos?-1:1;s=r(s,1),this.isActive=!0,this.renderGridLine(i,s,n),this.renderMark(a,s,n),this.renderLabel(a,i,s,e),this.isNew=!1,t.fireEvent(this,"afterRender")},destroy:function(){s(this,this.axis)}}}),e(i,"parts/Axis.js",[i["parts/Globals.js"]],function(t){var e=t.addEvent,i=t.animObject,s=t.arrayMax,n=t.arrayMin,o=t.color,a=t.correctFloat,r=t.defaultOptions,l=t.defined,h=t.deg2rad,c=t.destroyObjectProperties,d=t.extend,p=t.fireEvent,u=t.format,f=t.getMagnitude,g=t.isArray,m=t.isNumber,v=t.isString,x=t.merge,y=t.normalizeTickInterval,b=t.objectEach,w=t.pick,k=t.removeEvent,M=t.seriesTypes,S=t.splat,T=t.syncTimeout,C=t.Tick,A=function(){this.init.apply(this,arguments)};return t.extend(A.prototype,{defaultOptions:{dateTimeLabelFormats:{millisecond:{main:"%H:%M:%S.%L",range:!1},second:{main:"%H:%M:%S",range:!1},minute:{main:"%H:%M",range:!1},hour:{main:"%H:%M",range:!1},day:{main:"%e. %b"},week:{main:"%e. %b"},month:{main:"%b '%y"},year:{main:"%Y"}},endOnTick:!1,labels:{enabled:!0,indentation:10,x:0,style:{color:"#666666",cursor:"default",fontSize:"11px"}},maxPadding:.01,minorTickLength:2,minorTickPosition:"outside",minPadding:.01,showEmpty:!0,startOfWeek:1,startOnTick:!1,tickLength:10,tickPixelInterval:100,tickmarkPlacement:"between",tickPosition:"outside",title:{align:"middle",style:{color:"#666666"}},type:"linear",minorGridLineColor:"#f2f2f2",minorGridLineWidth:1,minorTickColor:"#999999",lineColor:"#ccd6eb",lineWidth:1,gridLineColor:"#e6e6e6",tickColor:"#ccd6eb"},defaultYAxisOptions:{endOnTick:!0,maxPadding:.05,minPadding:.05,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8},startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{allowOverlap:!1,enabled:!1,formatter:function(){return t.numberFormat(this.total,-1)},style:{color:"#000000",fontSize:"11px",fontWeight:"bold",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0},defaultLeftAxisOptions:{labels:{x:-15},title:{rotation:270}},defaultRightAxisOptions:{labels:{x:15},title:{rotation:90}},defaultBottomAxisOptions:{labels:{autoRotation:[-45],x:0},margin:15,title:{rotation:0}},defaultTopAxisOptions:{labels:{autoRotation:[-45],x:0},margin:15,title:{rotation:0}},init:function(t,i){var s=i.isX,n=this;n.chart=t,n.horiz=t.inverted&&!n.isZAxis?!s:s,n.isXAxis=s,n.coll=n.coll||(s?"xAxis":"yAxis"),p(this,"init",{userOptions:i}),n.opposite=i.opposite,n.side=i.side||(n.horiz?n.opposite?0:2:n.opposite?1:3),n.setOptions(i);var o=this.options,a=o.type;n.labelFormatter=o.labels.formatter||n.defaultLabelFormatter,n.userOptions=i,n.minPixelPadding=0,n.reversed=o.reversed,n.visible=!1!==o.visible,n.zoomEnabled=!1!==o.zoomEnabled,n.hasNames="category"===a||!0===o.categories,n.categories=o.categories||n.hasNames,n.names||(n.names=[],n.names.keys={}),n.plotLinesAndBandsGroups={},n.isLog="logarithmic"===a,n.isDatetimeAxis="datetime"===a,n.positiveValuesOnly=n.isLog&&!n.allowNegativeLog,n.isLinked=l(o.linkedTo),n.ticks={},n.labelEdge=[],n.minorTicks={},n.plotLinesAndBands=[],n.alternateBands={},n.len=0,n.minRange=n.userMinRange=o.minRange||o.maxZoom,n.range=o.range,n.offset=o.offset||0,n.stacks={},n.oldStacks={},n.stacksTouched=0,n.max=null,n.min=null,n.crosshair=w(o.crosshair,S(t.options.tooltip.crosshairs)[s?0:1],!1),i=n.options.events,-1===t.axes.indexOf(n)&&(s?t.axes.splice(t.xAxis.length,0,n):t.axes.push(n),t[n.coll].push(n)),n.series=n.series||[],t.inverted&&!n.isZAxis&&s&&void 0===n.reversed&&(n.reversed=!0),b(i,function(t,i){e(n,i,t)}),n.lin2log=o.linearToLogConverter||n.lin2log,n.isLog&&(n.val2lin=n.log2lin,n.lin2val=n.lin2log),p(this,"afterInit")},setOptions:function(t){this.options=x(this.defaultOptions,"yAxis"===this.coll&&this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],x(r[this.coll],t)),p(this,"afterSetOptions",{userOptions:t})},defaultLabelFormatter:function(){var e,i=this.axis,s=this.value,n=i.chart.time,o=i.categories,a=this.dateTimeLabelFormat,l=r.lang,h=l.numericSymbols,l=l.numericSymbolMagnitude||1e3,c=h&&h.length,d=i.options.labels.format,i=i.isLog?Math.abs(s):i.tickInterval;if(d)e=u(d,this,n);else if(o)e=s;else if(a)e=n.dateFormat(a,s);else if(c&&1e3<=i)for(;c--&&void 0===e;)n=Math.pow(l,c+1),i>=n&&0==10*s%n&&null!==h[c]&&0!==s&&(e=t.numberFormat(s/n,-1)+h[c]);return void 0===e&&(e=1e4<=Math.abs(s)?t.numberFormat(s,-1):t.numberFormat(s,-1,void 0,"")),e},getSeriesExtremes:function(){var t,e=this,i=e.chart;p(this,"getSeriesExtremes",null,function(){e.hasVisibleSeries=!1,e.dataMin=e.dataMax=e.threshold=null,e.softThreshold=!e.isXAxis,e.buildStacks&&e.buildStacks(),e.series.forEach(function(s){if(s.visible||!i.options.chart.ignoreHiddenSeries){var n,o,a=s.options,r=a.threshold;e.hasVisibleSeries=!0,e.positiveValuesOnly&&0>=r&&(r=null),e.isXAxis?(a=s.xData,a.length&&(t=s.getXExtremes(a),n=t.min,o=t.max,m(n)||n instanceof Date||(a=a.filter(m),t=s.getXExtremes(a),n=t.min,o=t.max),a.length&&(e.dataMin=Math.min(w(e.dataMin,n),n),e.dataMax=Math.max(w(e.dataMax,o),o)))):(s.getExtremes(),o=s.dataMax,n=s.dataMin,l(n)&&l(o)&&(e.dataMin=Math.min(w(e.dataMin,n),n),e.dataMax=Math.max(w(e.dataMax,o),o)),l(r)&&(e.threshold=r),(!a.softThreshold||e.positiveValuesOnly)&&(e.softThreshold=!1))}})}),p(this,"afterGetSeriesExtremes")},translate:function(t,e,i,s,n,o){var a=this.linkedParent||this,r=1,l=0,h=s?a.oldTransA:a.transA;s=s?a.oldMin:a.min;var c=a.minPixelPadding;return n=(a.isOrdinal||a.isBroken||a.isLog&&n)&&a.lin2val,h||(h=a.transA),i&&(r*=-1,l=a.len),a.reversed&&(r*=-1,l-=r*(a.sector||a.len)),e?(t=(t*r+l-c)/h+s,n&&(t=a.lin2val(t))):(n&&(t=a.val2lin(t)),t=m(s)?r*(t-s)*h+l+r*c+(m(o)?h*o:0):void 0),t},toPixels:function(t,e){return this.translate(t,!1,!this.horiz,null,!0)+(e?0:this.pos)},toValue:function(t,e){return this.translate(t-(e?0:this.pos),!0,!this.horiz,null,!0)},getPlotLinePath:function(t,e,i,s,n){var o,a,r,l,h,c,d=this,u=d.chart,f=d.left,g=d.top,v=i&&u.oldChartHeight||u.chartHeight,x=i&&u.oldChartWidth||u.chartWidth,y=d.transB,b=function(t,e,i){return("pass"!==s&&t<e||t>i)&&(s?t=Math.min(Math.max(e,t),i):h=!0),t};return c={value:t,lineWidth:e,old:i,force:s,translatedValue:n},p(this,"getPlotLinePath",c,function(c){n=w(n,d.translate(t,null,null,i)),n=Math.min(Math.max(-1e5,n),1e5),o=r=Math.round(n+y),a=l=Math.round(v-n-y),m(n)?d.horiz?(a=g,l=v-d.bottom,o=r=b(o,f,f+d.width)):(o=f,r=x-d.right,a=l=b(a,g,g+d.height)):(h=!0,s=!1),c.path=h&&!s?null:u.renderer.crispLine(["M",o,a,"L",r,l],e||1)}),c.path},getLinearTickPositions:function(t,e,i){var s,n=a(Math.floor(e/t)*t);i=a(Math.ceil(i/t)*t);var o,r=[];if(a(n+t)===n&&(o=20),this.single)return[e];for(e=n;e<=i&&(r.push(e),(e=a(e+t,o))!==s);)s=e;return r},getMinorTickInterval:function(){var t=this.options;return!0===t.minorTicks?w(t.minorTickInterval,"auto"):!1===t.minorTicks?null:t.minorTickInterval},getMinorTickPositions:function(){var t=this,e=t.options,i=t.tickPositions,s=t.minorTickInterval,n=[],o=t.pointRangePadding||0,a=t.min-o,o=t.max+o,r=o-a;if(r&&r/s<t.len/3)if(t.isLog)this.paddedTicks.forEach(function(e,i,o){i&&n.push.apply(n,t.getLogTickPositions(s,o[i-1],o[i],!0))});else if(t.isDatetimeAxis&&"auto"===this.getMinorTickInterval())n=n.concat(t.getTimeTicks(t.normalizeTimeTickInterval(s),a,o,e.startOfWeek));else for(e=a+(i[0]-a)%s;e<=o&&e!==n[0];e+=s)n.push(e);return 0!==n.length&&t.trimTicks(n),n},adjustForMinRange:function(){var t,e,i,o,a,r,h,c,d=this.options,p=this.min,u=this.max;this.isXAxis&&void 0===this.minRange&&!this.isLog&&(l(d.min)||l(d.max)?this.minRange=null:(this.series.forEach(function(t){for(r=t.xData,o=h=t.xIncrement?1:r.length-1;0<o;o--)a=r[o]-r[o-1],(void 0===i||a<i)&&(i=a)}),this.minRange=Math.min(5*i,this.dataMax-this.dataMin))),u-p<this.minRange&&(e=this.dataMax-this.dataMin>=this.minRange,c=this.minRange,t=(c-u+p)/2,t=[p-t,w(d.min,p-t)],e&&(t[2]=this.isLog?this.log2lin(this.dataMin):this.dataMin),p=s(t),u=[p+c,w(d.max,p+c)],e&&(u[2]=this.isLog?this.log2lin(this.dataMax):this.dataMax),(u=n(u))-p<c&&(t[0]=u-c,t[1]=w(d.min,u-c),p=s(t))),this.min=p,this.max=u},getClosest:function(){var t;return this.categories?t=1:this.series.forEach(function(e){var i=e.closestPointRange,s=e.visible||!e.chart.options.chart.ignoreHiddenSeries;!e.noSharedTooltip&&l(i)&&s&&(t=l(t)?Math.min(t,i):i)}),t},nameToX:function(t){var e,i=g(this.categories),s=i?this.categories:this.names,n=t.options.x;return t.series.requireSorting=!1,l(n)||(n=!1===this.options.uniqueNames?t.series.autoIncrement():i?s.indexOf(t.name):w(s.keys[t.name],-1)),-1===n?i||(e=s.length):e=n,void 0!==e&&(this.names[e]=t.name,this.names.keys[t.name]=e),e},updateNames:function(){var t=this,e=this.names;0<e.length&&(Object.keys(e.keys).forEach(function(t){delete e.keys[t]}),e.length=0,this.minRange=this.userMinRange,(this.series||[]).forEach(function(e){e.xIncrement=null,e.points&&!e.isDirtyData||(t.max=Math.max(t.max,e.xData.length-1),e.processData(),e.generatePoints()),e.data.forEach(function(i,s){var n;i&&i.options&&void 0!==i.name&&void 0!==(n=t.nameToX(i))&&n!==i.x&&(i.x=n,e.xData[s]=n)})}))},setAxisTranslation:function(t){var e,i=this,s=i.max-i.min,n=i.axisPointRange||0,o=0,a=0,r=i.linkedParent,l=!!i.categories,h=i.transA,c=i.isXAxis;(c||l||n)&&(e=i.getClosest(),r?(o=r.minPointOffset,a=r.pointRangePadding):i.series.forEach(function(t){var s=l?1:c?w(t.options.pointRange,e,0):i.axisPointRange||0,r=t.options.pointPlacement;n=Math.max(n,s),i.single&&!l||(t=M.xrange&&t instanceof M.xrange?!c:c,o=Math.max(o,t&&v(r)?0:s/2),a=Math.max(a,t&&"on"===r?0:s))}),r=i.ordinalSlope&&e?i.ordinalSlope/e:1,i.minPointOffset=o*=r,i.pointRangePadding=a*=r,i.pointRange=Math.min(n,s),c&&(i.closestPointRange=e)),t&&(i.oldTransA=h),i.translationSlope=i.transA=h=i.staticScale||i.len/(s+a||1),i.transB=i.horiz?i.left:i.bottom,i.minPixelPadding=h*o,p(this,"afterSetAxisTranslation")},minFromRange:function(){return this.max-this.range},setTickInterval:function(e){var i,s,n,o,r=this,h=r.chart,c=r.options,d=r.isLog,u=r.isDatetimeAxis,g=r.isXAxis,v=r.isLinked,x=c.maxPadding,b=c.minPadding,k=c.tickInterval,M=c.tickPixelInterval,S=r.categories,T=m(r.threshold)?r.threshold:null,C=r.softThreshold;u||S||v||this.getTickAmount(),n=w(r.userMin,c.min),o=w(r.userMax,c.max),v?(r.linkedParent=h[r.coll][c.linkedTo],i=r.linkedParent.getExtremes(),r.min=w(i.min,i.dataMin),r.max=w(i.max,i.dataMax),c.type!==r.linkedParent.options.type&&t.error(11,1,h)):(!C&&l(T)&&(r.dataMin>=T?(i=T,b=0):r.dataMax<=T&&(s=T,x=0)),r.min=w(n,i,r.dataMin),r.max=w(o,s,r.dataMax)),d&&(r.positiveValuesOnly&&!e&&0>=Math.min(r.min,w(r.dataMin,r.min))&&t.error(10,1,h),r.min=a(r.log2lin(r.min),15),r.max=a(r.log2lin(r.max),15)),r.range&&l(r.max)&&(r.userMin=r.min=n=Math.max(r.dataMin,r.minFromRange()),r.userMax=o=r.max,r.range=null),p(r,"foundExtremes"),r.beforePadding&&r.beforePadding(),r.adjustForMinRange(),!(S||r.axisPointRange||r.usePercentage||v)&&l(r.min)&&l(r.max)&&(h=r.max-r.min)&&(!l(n)&&b&&(r.min-=h*b),!l(o)&&x&&(r.max+=h*x)),m(c.softMin)&&!m(r.userMin)&&c.softMin<r.min&&(r.min=n=c.softMin),m(c.softMax)&&!m(r.userMax)&&c.softMax>r.max&&(r.max=o=c.softMax),m(c.floor)&&(r.min=Math.min(Math.max(r.min,c.floor),Number.MAX_VALUE)),m(c.ceiling)&&(r.max=Math.max(Math.min(r.max,c.ceiling),w(r.userMax,-Number.MAX_VALUE))),C&&l(r.dataMin)&&(T=T||0,!l(n)&&r.min<T&&r.dataMin>=T?r.min=r.options.minRange?Math.min(T,r.max-r.minRange):T:!l(o)&&r.max>T&&r.dataMax<=T&&(r.max=r.options.minRange?Math.max(T,r.min+r.minRange):T)),r.tickInterval=r.min===r.max||void 0===r.min||void 0===r.max?1:v&&!k&&M===r.linkedParent.options.tickPixelInterval?k=r.linkedParent.tickInterval:w(k,this.tickAmount?(r.max-r.min)/Math.max(this.tickAmount-1,1):void 0,S?1:(r.max-r.min)*M/Math.max(r.len,M)),g&&!e&&r.series.forEach(function(t){t.processData(r.min!==r.oldMin||r.max!==r.oldMax)}),r.setAxisTranslation(!0),r.beforeSetTickPositions&&r.beforeSetTickPositions(),r.postProcessTickInterval&&(r.tickInterval=r.postProcessTickInterval(r.tickInterval)),r.pointRange&&!k&&(r.tickInterval=Math.max(r.pointRange,r.tickInterval)),e=w(c.minTickInterval,r.isDatetimeAxis&&r.closestPointRange),!k&&r.tickInterval<e&&(r.tickInterval=e),u||d||k||(r.tickInterval=y(r.tickInterval,null,f(r.tickInterval),w(c.allowDecimals,!(.5<r.tickInterval&&5>r.tickInterval&&1e3<r.max&&9999>r.max)),!!this.tickAmount)),this.tickAmount||(r.tickInterval=r.unsquish()),this.setTickPositions()},setTickPositions:function(){var e,i=this.options,s=i.tickPositions;e=this.getMinorTickInterval();var n=i.tickPositioner,o=i.startOnTick,a=i.endOnTick;this.tickmarkOffset=this.categories&&"between"===i.tickmarkPlacement&&1===this.tickInterval?.5:0,this.minorTickInterval="auto"===e&&this.tickInterval?this.tickInterval/5:e,this.single=this.min===this.max&&l(this.min)&&!this.tickAmount&&(parseInt(this.min,10)===this.min||!1!==i.allowDecimals),this.tickPositions=e=s&&s.slice(),!e&&(!this.ordinalPositions&&(this.max-this.min)/this.tickInterval>Math.max(2*this.len,200)?(e=[this.min,this.max],t.error(19,!1,this.chart)):e=this.isDatetimeAxis?this.getTimeTicks(this.normalizeTimeTickInterval(this.tickInterval,i.units),this.min,this.max,i.startOfWeek,this.ordinalPositions,this.closestPointRange,!0):this.isLog?this.getLogTickPositions(this.tickInterval,this.min,this.max):this.getLinearTickPositions(this.tickInterval,this.min,this.max),e.length>this.len&&(e=[e[0],e.pop()],e[0]===e[1]&&(e.length=1)),this.tickPositions=e,n&&(n=n.apply(this,[this.min,this.max])))&&(this.tickPositions=e=n),this.paddedTicks=e.slice(0),this.trimTicks(e,o,a),this.isLinked||(this.single&&2>e.length&&!this.categories&&(this.min-=.5,this.max+=.5),s||n||this.adjustTickAmount()),p(this,"afterSetTickPositions")},trimTicks:function(t,e,i){var s=t[0],n=t[t.length-1],o=this.minPointOffset||0;if(p(this,"trimTicks"),!this.isLinked){if(e&&-1/0!==s)this.min=s;else for(;this.min-o>t[0];)t.shift();if(i)this.max=n;else for(;this.max+o<t[t.length-1];)t.pop();0===t.length&&l(s)&&!this.options.tickPositions&&t.push((n+s)/2)}},alignToOthers:function(){var t,e={},i=this.options;return!1===this.chart.options.chart.alignTicks||!1===i.alignTicks||!1===i.startOnTick||!1===i.endOnTick||this.isLog||this.chart[this.coll].forEach(function(i){var s=i.options,s=[i.horiz?s.left:s.top,s.width,s.height,s.pane].join();i.series.length&&(e[s]?t=!0:e[s]=1)}),t},getTickAmount:function(){var t=this.options,e=t.tickAmount,i=t.tickPixelInterval;!l(t.tickInterval)&&this.len<i&&!this.isRadial&&!this.isLog&&t.startOnTick&&t.endOnTick&&(e=2),!e&&this.alignToOthers()&&(e=Math.ceil(this.len/i)+1),4>e&&(this.finalTickAmt=e,e=5),this.tickAmount=e},adjustTickAmount:function(){var t,e=this.options,i=this.tickInterval,s=this.tickPositions,n=this.tickAmount,o=this.finalTickAmt,r=s&&s.length,h=w(this.threshold,this.softThreshold?0:null);if(this.hasData()){if(r<n){for(t=this.min;s.length<n;)s.length%2||t===h?s.push(a(s[s.length-1]+i)):s.unshift(a(s[0]-i));this.transA*=(r-1)/(n-1),this.min=e.startOnTick?s[0]:Math.min(this.min,s[0]),this.max=e.endOnTick?s[s.length-1]:Math.max(this.max,s[s.length-1])}else r>n&&(this.tickInterval*=2,this.setTickPositions());if(l(o)){for(i=e=s.length;i--;)(3===o&&1==i%2||2>=o&&0<i&&i<e-1)&&s.splice(i,1);this.finalTickAmt=void 0}}},setScale:function(){var t,e=this.series.some(function(t){return t.isDirtyData||t.isDirty||t.xAxis.isDirty});this.oldMin=this.min,this.oldMax=this.max,this.oldAxisLength=this.len,this.setAxisSize(),(t=this.len!==this.oldAxisLength)||e||this.isLinked||this.forceRedraw||this.userMin!==this.oldUserMin||this.userMax!==this.oldUserMax||this.alignToOthers()?(this.resetStacks&&this.resetStacks(),this.forceRedraw=!1,this.getSeriesExtremes(),this.setTickInterval(),this.oldUserMin=this.userMin,this.oldUserMax=this.userMax,this.isDirty||(this.isDirty=t||this.min!==this.oldMin||this.max!==this.oldMax)):this.cleanStacks&&this.cleanStacks(),p(this,"afterSetScale")},setExtremes:function(t,e,i,s,n){var o=this,a=o.chart;i=w(i,!0),o.series.forEach(function(t){delete t.kdTree}),n=d(n,{min:t,max:e}),p(o,"setExtremes",n,function(){o.userMin=t,o.userMax=e,o.eventArgs=n,i&&a.redraw(s)})},zoom:function(t,e){var i=this.dataMin,s=this.dataMax,n=this.options,o=Math.min(i,w(n.min,i)),a=Math.max(s,w(n.max,s));return t={newMin:t,newMax:e},p(this,"zoom",t,function(t){var e=t.newMin,n=t.newMax;e===this.min&&n===this.max||(this.allowZoomOutside||(l(i)&&(e<o&&(e=o),e>a&&(e=a)),l(s)&&(n<o&&(n=o),n>a&&(n=a))),this.displayBtn=void 0!==e||void 0!==n,this.setExtremes(e,n,!1,void 0,{trigger:"zoom"})),t.zoomed=!0}),t.zoomed},setAxisSize:function(){var e=this.chart,i=this.options,s=i.offsets||[0,0,0,0],n=this.horiz,o=this.width=Math.round(t.relativeLength(w(i.width,e.plotWidth-s[3]+s[1]),e.plotWidth)),a=this.height=Math.round(t.relativeLength(w(i.height,e.plotHeight-s[0]+s[2]),e.plotHeight)),r=this.top=Math.round(t.relativeLength(w(i.top,e.plotTop+s[0]),e.plotHeight,e.plotTop)),i=this.left=Math.round(t.relativeLength(w(i.left,e.plotLeft+s[3]),e.plotWidth,e.plotLeft));this.bottom=e.chartHeight-a-r,this.right=e.chartWidth-o-i,this.len=Math.max(n?o:a,0),this.pos=n?i:r},getExtremes:function(){var t=this.isLog;return{min:t?a(this.lin2log(this.min)):this.min,max:t?a(this.lin2log(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(t){var e=this.isLog,i=e?this.lin2log(this.min):this.min,e=e?this.lin2log(this.max):this.max;return null===t||-1/0===t?t=i:1/0===t?t=e:i>t?t=i:e<t&&(t=e),this.translate(t,0,1,0,1)},autoLabelAlign:function(t){var e=(w(t,0)-90*this.side+720)%360;return t={align:"center"},p(this,"autoLabelAlign",t,function(t){15<e&&165>e?t.align="right":195<e&&345>e&&(t.align="left")}),t.align},tickSize:function(t){var e,i=this.options,s=i[t+"Length"],n=w(i[t+"Width"],"tick"===t&&this.isXAxis&&!this.categories?1:0);return n&&s&&("inside"===i[t+"Position"]&&(s=-s),e=[s,n]),t={tickSize:e},p(this,"afterTickSize",t),t.tickSize},labelMetrics:function(){var t=this.tickPositions&&this.tickPositions[0]||0;return this.chart.renderer.fontMetrics(this.options.labels.style&&this.options.labels.style.fontSize,this.ticks[t]&&this.ticks[t].label)},unsquish:function(){var t,e,i,s=this.options.labels,n=this.horiz,o=this.tickInterval,r=o,c=this.len/(((this.categories?1:0)+this.max-this.min)/o),d=s.rotation,p=this.labelMetrics(),u=Number.MAX_VALUE,f=this.max-this.min,g=function(t){var e=t/(c||1),e=1<e?Math.ceil(e):1;return e*o>f&&1/0!==t&&1/0!==c&&(e=Math.ceil(f/o)),a(e*o)};return n?(i=!s.staggerLines&&!s.step&&(l(d)?[d]:c<w(s.autoRotationLimit,80)&&s.autoRotation))&&i.forEach(function(i){var s;(i===d||i&&-90<=i&&90>=i)&&(e=g(Math.abs(p.h/Math.sin(h*i))),(s=e+Math.abs(i/360))<u&&(u=s,t=i,r=e))}):s.step||(r=g(p.h)),this.autoRotation=i,this.labelRotation=w(t,d),r},getSlotWidth:function(t){var e=this.chart,i=this.horiz,s=this.options.labels,n=Math.max(this.tickPositions.length-(this.categories?0:1),1),o=e.margin[3];return t&&t.slotWidth||i&&2>(s.step||0)&&!s.rotation&&(this.staggerLines||1)*this.len/n||!i&&(s.style&&parseInt(s.style.width,10)||o&&o-e.spacing[3]||.33*e.chartWidth)},renderUnsquish:function(){var t,e,i,s=this.chart,n=s.renderer,o=this.tickPositions,a=this.ticks,r=this.options.labels,l=r&&r.style||{},h=this.horiz,c=this.getSlotWidth(),d=Math.max(1,Math.round(c-2*(r.padding||5))),p={},u=this.labelMetrics(),f=r.style&&r.style.textOverflow,g=0;if(v(r.rotation)||(p.rotation=r.rotation||0),o.forEach(function(t){(t=a[t])&&t.label&&t.label.textPxLength>g&&(g=t.label.textPxLength)}),this.maxLabelLength=g,this.autoRotation)g>d&&g>u.h?p.rotation=this.labelRotation:this.labelRotation=0;else if(c&&(t=d,!f))for(e="clip",d=o.length;!h&&d--;)i=o[d],(i=a[i].label)&&(i.styles&&"ellipsis"===i.styles.textOverflow?i.css({textOverflow:"clip"}):i.textPxLength>c&&i.css({width:c+"px"}),i.getBBox().height>this.len/o.length-(u.h-u.f)&&(i.specificTextOverflow="ellipsis"));p.rotation&&(t=g>.5*s.chartHeight?.33*s.chartHeight:g,f||(e="ellipsis")),(this.labelAlign=r.align||this.autoLabelAlign(this.labelRotation))&&(p.align=this.labelAlign),o.forEach(function(i){var s=(i=a[i])&&i.label,n=l.width,o={};s&&(s.attr(p),i.shortenLabel?i.shortenLabel():t&&!n&&"nowrap"!==l.whiteSpace&&(t<s.textPxLength||"SPAN"===s.element.tagName)?(o.width=t,f||(o.textOverflow=s.specificTextOverflow||e),s.css(o)):s.styles&&s.styles.width&&!o.width&&!n&&s.css({width:null}),delete s.specificTextOverflow,i.rotation=p.rotation)},this),this.tickRotCorr=n.rotCorr(u.b,this.labelRotation||0,0!==this.side)},hasData:function(){return this.series.some(function(t){return t.hasData()})||this.options.showEmpty&&l(this.min)&&l(this.max)},addTitle:function(t){var e,i=this.chart.renderer,s=this.horiz,n=this.opposite,o=this.options.title,a=this.chart.styledMode;this.axisTitle||((e=o.textAlign)||(e=(s?{low:"left",middle:"center",high:"right"}:{low:n?"right":"left",middle:"center",high:n?"left":"right"})[o.align]),this.axisTitle=i.text(o.text,0,0,o.useHTML).attr({zIndex:7,rotation:o.rotation||0,align:e}).addClass("highcharts-axis-title"),a||this.axisTitle.css(x(o.style)),this.axisTitle.add(this.axisGroup),this.axisTitle.isNew=!0),a||o.style.width||this.isRadial||this.axisTitle.css({width:this.len}),this.axisTitle[t?"show":"hide"](!0)},generateTick:function(t){var e=this.ticks;e[t]?e[t].addLabel():e[t]=new C(this,t)},getOffset:function(){var t,e,i,s=this,n=s.chart,o=n.renderer,a=s.options,r=s.tickPositions,h=s.ticks,c=s.horiz,d=s.side,u=n.inverted&&!s.isZAxis?[1,0,3,2][d]:d,f=0,g=0,m=a.title,v=a.labels,x=0,y=n.axisOffset,n=n.clipOffset,k=[-1,1,1,-1][d],M=a.className,S=s.axisParent;t=s.hasData(),s.showAxis=e=t||w(a.showEmpty,!0),s.staggerLines=s.horiz&&v.staggerLines,s.axisGroup||(s.gridGroup=o.g("grid").attr({zIndex:a.gridZIndex||1}).addClass("highcharts-"+this.coll.toLowerCase()+"-grid "+(M||"")).add(S),s.axisGroup=o.g("axis").attr({zIndex:a.zIndex||2}).addClass("highcharts-"+this.coll.toLowerCase()+" "+(M||"")).add(S),s.labelGroup=o.g("axis-labels").attr({zIndex:v.zIndex||7}).addClass("highcharts-"+s.coll.toLowerCase()+"-labels "+(M||"")).add(S)),t||s.isLinked?(r.forEach(function(t,e){s.generateTick(t,e)}),s.renderUnsquish(),s.reserveSpaceDefault=0===d||2===d||{1:"left",3:"right"}[d]===s.labelAlign,w(v.reserveSpace,"center"===s.labelAlign||null,s.reserveSpaceDefault)&&r.forEach(function(t){x=Math.max(h[t].getLabelSize(),x)}),s.staggerLines&&(x*=s.staggerLines),s.labelOffset=x*(s.opposite?-1:1)):b(h,function(t,e){t.destroy(),delete h[e]}),m&&m.text&&!1!==m.enabled&&(s.addTitle(e),e&&!1!==m.reserveSpace&&(s.titleOffset=f=s.axisTitle.getBBox()[c?"height":"width"],i=m.offset,g=l(i)?0:w(m.margin,c?5:10))),s.renderLine(),s.offset=k*w(a.offset,y[d]?y[d]+(a.margin||0):0),s.tickRotCorr=s.tickRotCorr||{x:0,y:0},o=0===d?-s.labelMetrics().h:2===d?s.tickRotCorr.y:0,g=Math.abs(x)+g,x&&(g=g-o+k*(c?w(v.y,s.tickRotCorr.y+8*k):v.x)),s.axisTitleMargin=w(i,g),s.getMaxLabelDimensions&&(s.maxLabelDimensions=s.getMaxLabelDimensions(h,r)),c=this.tickSize("tick"),y[d]=Math.max(y[d],s.axisTitleMargin+f+k*s.offset,g,r&&r.length&&c?c[0]+k*s.offset:0),a=a.offset?0:2*Math.floor(s.axisLine.strokeWidth()/2),n[u]=Math.max(n[u],a),p(this,"afterGetOffset")},getLinePath:function(t){var e=this.chart,i=this.opposite,s=this.offset,n=this.horiz,o=this.left+(i?this.width:0)+s,s=e.chartHeight-this.bottom-(i?this.height:0)+s;return i&&(t*=-1),e.renderer.crispLine(["M",n?this.left:o,n?s:this.top,"L",n?e.chartWidth-this.right:o,n?s:e.chartHeight-this.bottom],t)},renderLine:function(){this.axisLine||(this.axisLine=this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup),this.chart.styledMode||this.axisLine.attr({stroke:this.options.lineColor,"stroke-width":this.options.lineWidth,zIndex:7}))},getTitlePosition:function(){var t=this.horiz,e=this.left,i=this.top,s=this.len,n=this.options.title,o=t?e:i,a=this.opposite,r=this.offset,l=n.x||0,h=n.y||0,c=this.axisTitle,d=this.chart.renderer.fontMetrics(n.style&&n.style.fontSize,c),c=Math.max(c.getBBox(null,0).height-d.h-1,0),s={low:o+(t?0:s),middle:o+s/2,high:o+(t?s:0)}[n.align],e=(t?i+this.height:e)+(t?1:-1)*(a?-1:1)*this.axisTitleMargin+[-c,c,d.f,-c][this.side],t={x:t?s+l:e+(a?this.width:0)+r+l,y:t?e+h-(a?this.height:0)+r:s+h};return p(this,"afterGetTitlePosition",{titlePosition:t}),t},renderMinorTick:function(t){var e=this.chart.hasRendered&&m(this.oldMin),i=this.minorTicks;i[t]||(i[t]=new C(this,t,"minor")),e&&i[t].isNew&&i[t].render(null,!0),i[t].render(null,!1,1)},renderTick:function(t,e){var i=this.isLinked,s=this.ticks,n=this.chart.hasRendered&&m(this.oldMin);(!i||t>=this.min&&t<=this.max)&&(s[t]||(s[t]=new C(this,t)),n&&s[t].isNew&&s[t].render(e,!0,-1),s[t].render(e))},render:function(){var e,s,n=this,o=n.chart,a=n.options,r=n.isLog,l=n.isLinked,h=n.tickPositions,c=n.axisTitle,d=n.ticks,u=n.minorTicks,f=n.alternateBands,g=a.stackLabels,v=a.alternateGridColor,x=n.tickmarkOffset,y=n.axisLine,w=n.showAxis,k=i(o.renderer.globalAnimation);n.labelEdge.length=0,n.overlap=!1,[d,u,f].forEach(function(t){b(t,function(t){t.isActive=!1})}),(n.hasData()||l)&&(n.minorTickInterval&&!n.categories&&n.getMinorTickPositions().forEach(function(t){n.renderMinorTick(t)}),h.length&&(h.forEach(function(t,e){n.renderTick(t,e)}),x&&(0===n.min||n.single)&&(d[-1]||(d[-1]=new C(n,-1,null,!0)),d[-1].render(-1))),v&&h.forEach(function(i,a){s=void 0!==h[a+1]?h[a+1]+x:n.max-x,0==a%2&&i<n.max&&s<=n.max+(o.polar?-x:x)&&(f[i]||(f[i]=new t.PlotLineOrBand(n)),e=i+x,f[i].options={from:r?n.lin2log(e):e,to:r?n.lin2log(s):s,color:v},f[i].render(),f[i].isActive=!0)}),n._addedPlotLB||((a.plotLines||[]).concat(a.plotBands||[]).forEach(function(t){n.addPlotBandOrLine(t)}),n._addedPlotLB=!0)),[d,u,f].forEach(function(t){var e,i=[],s=k.duration;b(t,function(t,e){t.isActive||(t.render(e,!1,0),t.isActive=!1,i.push(e))}),T(function(){for(e=i.length;e--;)t[i[e]]&&!t[i[e]].isActive&&(t[i[e]].destroy(),delete t[i[e]])},t!==f&&o.hasRendered&&s?s:0)}),y&&(y[y.isPlaced?"animate":"attr"]({d:this.getLinePath(y.strokeWidth())}),y.isPlaced=!0,y[w?"show":"hide"](!0)),c&&w&&(a=n.getTitlePosition(),m(a.y)?(c[c.isNew?"attr":"animate"](a),c.isNew=!1):(c.attr("y",-9999),c.isNew=!0)),g&&g.enabled&&n.renderStackTotals(),n.isDirty=!1,p(this,"afterRender")},redraw:function(){this.visible&&(this.render(),this.plotLinesAndBands.forEach(function(t){t.render()})),this.series.forEach(function(t){t.isDirty=!0})},keepProps:"extKey hcEvents names series userMax userMin".split(" "),destroy:function(t){var e,i=this,s=i.stacks,n=i.plotLinesAndBands;if(p(this,"destroy",{keepEvents:t}),t||k(i),b(s,function(t,e){c(t),s[e]=null}),[i.ticks,i.minorTicks,i.alternateBands].forEach(function(t){c(t)}),n)for(t=n.length;t--;)n[t].destroy();"stackTotalGroup axisLine axisTitle axisGroup gridGroup labelGroup cross scrollbar".split(" ").forEach(function(t){i[t]&&(i[t]=i[t].destroy())});for(e in i.plotLinesAndBandsGroups)i.plotLinesAndBandsGroups[e]=i.plotLinesAndBandsGroups[e].destroy();b(i,function(t,e){-1===i.keepProps.indexOf(e)&&delete i[e]})},drawCrosshair:function(t,e){var i,s,n=this.crosshair,a=w(n.snap,!0),r=this.cross;if(p(this,"drawCrosshair",{e:t,point:e}),t||(t=this.cross&&this.cross.e),this.crosshair&&!1!==(l(e)||!a)){if(a?l(e)&&(s=w(e.crosshairPos,this.isXAxis?e.plotX:this.len-e.plotY)):s=t&&(this.horiz?t.chartX-this.pos:this.len-t.chartY+this.pos),l(s)&&(i=this.getPlotLinePath(e&&(this.isXAxis?e.x:w(e.stackY,e.y)),null,null,null,s)||null),!l(i))return void this.hideCrosshair();a=this.categories&&!this.isRadial,r||(this.cross=r=this.chart.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-"+(a?"category ":"thin ")+n.className).attr({zIndex:w(n.zIndex,2)}).add(),this.chart.styledMode||(r.attr({stroke:n.color||(a?o("#ccd6eb").setOpacity(.25).get():"#cccccc"),"stroke-width":w(n.width,1)}).css({"pointer-events":"none"}),n.dashStyle&&r.attr({dashstyle:n.dashStyle}))),r.show().attr({d:i}),a&&!n.width&&r.attr({"stroke-width":this.transA}),this.cross.e=t}else this.hideCrosshair();p(this,"afterDrawCrosshair",{e:t,point:e})},hideCrosshair:function(){this.cross&&this.cross.hide(),p(this,"afterHideCrosshair")}}),t.Axis=A}),e(i,"parts/DateTimeAxis.js",[i["parts/Globals.js"]],function(t){var e=t.Axis,i=t.getMagnitude,s=t.normalizeTickInterval,n=t.timeUnits;e.prototype.getTimeTicks=function(){return this.chart.time.getTimeTicks.apply(this.chart.time,arguments)},e.prototype.normalizeTimeTickInterval=function(t,e){var o=e||[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2]],["week",[1,2]],["month",[1,2,3,4,6]],["year",null]];e=o[o.length-1];var a,r=n[e[0]],l=e[1];for(a=0;a<o.length&&(e=o[a],r=n[e[0]],l=e[1],!(o[a+1]&&t<=(r*l[l.length-1]+n[o[a+1][0]])/2));a++);return r===n.year&&t<5*r&&(l=[1,2,5]),t=s(t/r,l,"year"===e[0]?Math.max(i(t/r),1):1),{unitRange:r,count:t,unitName:e[0]}}}),e(i,"parts/LogarithmicAxis.js",[i["parts/Globals.js"]],function(t){var e=t.Axis,i=t.getMagnitude,s=t.normalizeTickInterval,n=t.pick;e.prototype.getLogTickPositions=function(t,e,o,a){var r=this.options,l=this.len,h=[];if(a||(this._minorAutoInterval=null),.5<=t)t=Math.round(t),h=this.getLinearTickPositions(t,e,o);else if(.08<=t)for(var c,d,p,u,f,l=Math.floor(e),r=.3<t?[1,2,4]:.15<t?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];l<o+1&&!f;l++)for(d=r.length,c=0;c<d&&!f;c++)p=this.log2lin(this.lin2log(l)*r[c]),p>e&&(!a||u<=o)&&void 0!==u&&h.push(u),u>o&&(f=!0),u=p;else e=this.lin2log(e),o=this.lin2log(o),t=a?this.getMinorTickInterval():r.tickInterval,t=n("auto"===t?null:t,this._minorAutoInterval,r.tickPixelInterval/(a?5:1)*(o-e)/((a?l/this.tickPositions.length:l)||1)),t=s(t,null,i(t)),h=this.getLinearTickPositions(t,e,o).map(this.log2lin),a||(this._minorAutoInterval=t/5);return a||(this.tickInterval=t),h},e.prototype.log2lin=function(t){return Math.log(t)/Math.LN10},e.prototype.lin2log=function(t){return Math.pow(10,t)}}),e(i,"parts/PlotLineOrBand.js",[i["parts/Globals.js"],i["parts/Axis.js"]],function(t,e){var i=t.arrayMax,s=t.arrayMin,n=t.defined,o=t.destroyObjectProperties,a=t.erase,r=t.merge,l=t.pick;t.PlotLineOrBand=function(t,e){this.axis=t,e&&(this.options=e,this.id=e.id)},t.PlotLineOrBand.prototype={render:function(){t.fireEvent(this,"render");var e=this,i=e.axis,s=i.horiz,o=e.options,a=o.label,h=e.label,c=o.to,d=o.from,p=o.value,u=n(d)&&n(c),f=n(p),g=e.svgElem,m=!g,v=[],x=o.color,y=l(o.zIndex,0),b=o.events,v={class:"highcharts-plot-"+(u?"band ":"line ")+(o.className||"")},w={},k=i.chart.renderer,M=u?"bands":"lines";if(i.isLog&&(d=i.log2lin(d),c=i.log2lin(c),p=i.log2lin(p)),i.chart.styledMode||(f?(v.stroke=x,v["stroke-width"]=o.width,o.dashStyle&&(v.dashstyle=o.dashStyle)):u&&(x&&(v.fill=x),o.borderWidth&&(v.stroke=o.borderColor,v["stroke-width"]=o.borderWidth))),w.zIndex=y,M+="-"+y,(x=i.plotLinesAndBandsGroups[M])||(i.plotLinesAndBandsGroups[M]=x=k.g("plot-"+M).attr(w).add()),m&&(e.svgElem=g=k.path().attr(v).add(x)),f)v=i.getPlotLinePath(p,g.strokeWidth());else{if(!u)return;v=i.getPlotBandPath(d,c,o)}return(m||!g.d)&&v&&v.length?(g.attr({d:v}),b&&t.objectEach(b,function(t,i){g.on(i,function(t){b[i].apply(e,[t])})})):g&&(v?(g.show(!0),g.animate({d:v})):g.d&&(g.hide(),h&&(e.label=h=h.destroy()))),a&&n(a.text)&&v&&v.length&&0<i.width&&0<i.height&&!v.isFlat?(a=r({align:s&&u&&"center",x:s?!u&&4:10,verticalAlign:!s&&u&&"middle",y:s?u?16:10:u?6:-4,rotation:s&&!u&&90},a),this.renderLabel(a,v,u,y)):h&&h.hide(),e},renderLabel:function(t,e,n,o){var a=this.label,r=this.axis.chart.renderer;a||(a={align:t.textAlign||t.align,rotation:t.rotation,class:"highcharts-plot-"+(n?"band":"line")+"-label "+(t.className||"")},a.zIndex=o,this.label=a=r.text(t.text,0,0,t.useHTML).attr(a).add(),this.axis.chart.styledMode||a.css(t.style)),o=e.xBounds||[e[1],e[4],n?e[6]:e[1]],e=e.yBounds||[e[2],e[5],n?e[7]:e[2]],n=s(o),r=s(e),a.align(t,!1,{x:n,y:r,width:i(o)-n,height:i(e)-r}),a.show(!0)},destroy:function(){a(this.axis.plotLinesAndBands,this),delete this.axis,o(this)}},t.extend(e.prototype,{getPlotBandPath:function(t,e){var i,s=this.getPlotLinePath(e,null,null,!0),n=this.getPlotLinePath(t,null,null,!0),o=[],a=this.horiz,r=1;if(t=t<this.min&&e<this.min||t>this.max&&e>this.max,n&&s)for(t&&(i=n.toString()===s.toString(),r=0),t=0;t<n.length;t+=6)a&&s[t+1]===n[t+1]?(s[t+1]+=r,s[t+4]+=r):a||s[t+2]!==n[t+2]||(s[t+2]+=r,s[t+5]+=r),o.push("M",n[t+1],n[t+2],"L",n[t+4],n[t+5],s[t+4],s[t+5],s[t+1],s[t+2],"z"),o.isFlat=i;return o},addPlotBand:function(t){return this.addPlotBandOrLine(t,"plotBands")},addPlotLine:function(t){return this.addPlotBandOrLine(t,"plotLines")},addPlotBandOrLine:function(e,i){var s=new t.PlotLineOrBand(this,e).render(),n=this.userOptions;return s&&(i&&(n[i]=n[i]||[],n[i].push(e)),this.plotLinesAndBands.push(s)),s},removePlotBandOrLine:function(t){for(var e=this.plotLinesAndBands,i=this.options,s=this.userOptions,n=e.length;n--;)e[n].id===t&&e[n].destroy();[i.plotLines||[],s.plotLines||[],i.plotBands||[],s.plotBands||[]].forEach(function(e){for(n=e.length;n--;)e[n].id===t&&a(e,e[n])})},removePlotBand:function(t){this.removePlotBandOrLine(t)},removePlotLine:function(t){this.removePlotBandOrLine(t)}})}),e(i,"parts/Tooltip.js",[i["parts/Globals.js"]],function(t){var e=t.doc,i=t.extend,s=t.format,n=t.isNumber,o=t.merge,a=t.pick,r=t.splat,l=t.syncTimeout,h=t.timeUnits;t.Tooltip=function(){this.init.apply(this,arguments)},t.Tooltip.prototype={init:function(t,e){this.chart=t,this.options=e,this.crosshairs=[],this.now={x:0,y:0},this.isHidden=!0,this.split=e.split&&!t.inverted,this.shared=e.shared||this.split,this.outside=e.outside&&!this.split},cleanSplit:function(t){this.chart.series.forEach(function(e){var i=e&&e.tt;i&&(!i.isActive||t?e.tt=i.destroy():i.isActive=!1)})},applyFilter:function(){var t=this.chart;t.renderer.definition({tagName:"filter",id:"drop-shadow-"+t.index,opacity:.5,children:[{tagName:"feGaussianBlur",in:"SourceAlpha",stdDeviation:1},{tagName:"feOffset",dx:1,dy:1},{tagName:"feComponentTransfer",children:[{tagName:"feFuncA",type:"linear",slope:.3}]},{tagName:"feMerge",children:[{tagName:"feMergeNode"},{tagName:"feMergeNode",in:"SourceGraphic"}]}]}),t.renderer.definition({tagName:"style",textContent:".highcharts-tooltip-"+t.index+"{filter:url(#drop-shadow-"+t.index+")}"})},getLabel:function(){var e,i,s=this,n=this.chart.renderer,o=this.chart.styledMode,a=this.options;return this.label||(this.outside&&(this.container=e=t.doc.createElement("div"),e.className="highcharts-tooltip-container",t.css(e,{position:"absolute",top:"1px",pointerEvents:a.style&&a.style.pointerEvents}),t.doc.body.appendChild(e),this.renderer=n=new t.Renderer(e,0,0)),this.split?this.label=n.g("tooltip"):(this.label=n.label("",0,0,a.shape||"callout",null,null,a.useHTML,null,"tooltip").attr({padding:a.padding,r:a.borderRadius}),o||this.label.attr({fill:a.backgroundColor,"stroke-width":a.borderWidth}).css(a.style).shadow(a.shadow)),o&&(this.applyFilter(),this.label.addClass("highcharts-tooltip-"+this.chart.index)),this.outside&&(i={x:this.label.xSetter,y:this.label.ySetter},this.label.xSetter=function(t,n){i[n].call(this.label,s.distance),e.style.left=t+"px"},this.label.ySetter=function(t,n){i[n].call(this.label,s.distance),e.style.top=t+"px"}),this.label.attr({zIndex:8}).add()),this.label},update:function(t){this.destroy(),o(!0,this.chart.options.tooltip.userOptions,t),this.init(this.chart,o(!0,this.options,t))},destroy:function(){this.label&&(this.label=this.label.destroy()),this.split&&this.tt&&(this.cleanSplit(this.chart,!0),this.tt=this.tt.destroy()),this.renderer&&(this.renderer=this.renderer.destroy(),t.discardElement(this.container)),t.clearTimeout(this.hideTimer),t.clearTimeout(this.tooltipTimeout)},move:function(e,s,n,o){var a=this,r=a.now,l=!1!==a.options.animation&&!a.isHidden&&(1<Math.abs(e-r.x)||1<Math.abs(s-r.y)),h=a.followPointer||1<a.len;i(r,{x:l?(2*r.x+e)/3:e,y:l?(r.y+s)/2:s,anchorX:h?void 0:l?(2*r.anchorX+n)/3:n,anchorY:h?void 0:l?(r.anchorY+o)/2:o}),a.getLabel().attr(r),l&&(t.clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){a&&a.move(e,s,n,o)},32))},hide:function(e){var i=this;t.clearTimeout(this.hideTimer),e=a(e,this.options.hideDelay,500),this.isHidden||(this.hideTimer=l(function(){i.getLabel()[e?"fadeOut":"hide"](),i.isHidden=!0},e))},getAnchor:function(t,e){var i,s,n=this.chart,o=n.pointer,a=n.inverted,l=n.plotTop,h=n.plotLeft,c=0,d=0;return t=r(t),this.followPointer&&e?(void 0===e.chartX&&(e=o.normalize(e)),t=[e.chartX-n.plotLeft,e.chartY-l]):t[0].tooltipPos?t=t[0].tooltipPos:(t.forEach(function(t){i=t.series.yAxis,s=t.series.xAxis,c+=t.plotX+(!a&&s?s.left-h:0),d+=(t.plotLow?(t.plotLow+t.plotHigh)/2:t.plotY)+(!a&&i?i.top-l:0)}),c/=t.length,d/=t.length,t=[a?n.plotWidth-d:c,this.shared&&!a&&1<t.length&&e?e.chartY-l:a?n.plotHeight-c:d]),t.map(Math.round)},getPosition:function(t,i,s){var n,o=this.chart,r=this.distance,l={},h=o.inverted&&s.h||0,c=this.outside,d=c?e.documentElement.clientWidth-2*r:o.chartWidth,p=c?Math.max(e.body.scrollHeight,e.documentElement.scrollHeight,e.body.offsetHeight,e.documentElement.offsetHeight,e.documentElement.clientHeight):o.chartHeight,u=o.pointer.chartPosition,f=["y",p,i,(c?u.top-r:0)+s.plotY+o.plotTop,c?0:o.plotTop,c?p:o.plotTop+o.plotHeight],g=["x",d,t,(c?u.left-r:0)+s.plotX+o.plotLeft,c?0:o.plotLeft,c?d:o.plotLeft+o.plotWidth],m=!this.followPointer&&a(s.ttBelow,!o.inverted==!!s.negative),v=function(t,e,i,s,n,o){var a=i<s-r,c=s+r+i<e,d=s-r-i;if(s+=r,m&&c)l[t]=s;else if(!m&&a)l[t]=d;else if(a)l[t]=Math.min(o-i,0>d-h?d:d-h);else{if(!c)return!1;l[t]=Math.max(n,s+h+i>e?s:s+h)}},x=function(t,e,i,s){var n;return s<r||s>e-r?n=!1:l[t]=s<i/2?1:s>e-i/2?e-i-2:s-i/2,n},y=function(t){var e=f;f=g,g=e,n=t};return(o.inverted||1<this.len)&&y(),function t(){!1!==v.apply(0,f)?!1!==x.apply(0,g)||n||(y(!0),t()):n?l.x=l.y=0:(y(!0),t())}(),l},defaultFormatter:function(t){var e,i=this.points||r(this);return e=[t.tooltipFooterHeaderFormatter(i[0])],e=e.concat(t.bodyFormatter(i)),e.push(t.tooltipFooterHeaderFormatter(i[0],!0)),e},refresh:function(e,i){var s,n,o,l=this.chart,h=this.options,c=e,d={},p=[];o=h.formatter||this.defaultFormatter;var d=this.shared,u=l.styledMode,f=[];h.enabled&&(t.clearTimeout(this.hideTimer),this.followPointer=r(c)[0].series.tooltipOptions.followPointer,n=this.getAnchor(c,i),i=n[0],s=n[1],!d||c.series&&c.series.noSharedTooltip?d=c.getLabelConfig():(f=l.pointer.getActiveSeries(c),l.series.forEach(function(t){(t.options.inactiveOtherPoints||-1===f.indexOf(t))&&t.setState("inactive",!0)}),c.forEach(function(t){t.setState("hover"),p.push(t.getLabelConfig())}),d={x:c[0].category,y:c[0].y},d.points=p,c=c[0]),this.len=p.length,o=o.call(d,this),d=c.series,this.distance=a(d.tooltipOptions.distance,16),!1===o?this.hide():(l=this.getLabel(),this.isHidden&&l.attr({opacity:1}).show(),this.split?this.renderSplit(o,r(e)):(h.style.width&&!u||l.css({width:this.chart.spacingBox.width}),l.attr({text:o&&o.join?o.join(""):o}),l.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-"+a(c.colorIndex,d.colorIndex)),u||l.attr({stroke:h.borderColor||c.color||d.color||"#666666"}),this.updatePosition({plotX:i,plotY:s,negative:c.negative,ttBelow:c.ttBelow,h:n[2]||0})),this.isHidden=!1),t.fireEvent(this,"refresh"))},renderSplit:function(e,i){var s,n=this,o=[],r=this.chart,l=r.renderer,h=!0,c=this.options,d=0,p=this.getLabel(),u=r.plotTop;t.isString(e)&&(e=[!1,e]),e.slice(0,i.length+1).forEach(function(t,e){if(!1!==t&&""!==t){e=i[e-1]||{isHeader:!0,plotX:i[0].plotX,plotY:r.plotHeight};var f=e.series||n,g=f.tt,m=e.series||{},v="highcharts-color-"+a(e.colorIndex,m.colorIndex,"none");g||(g={padding:c.padding,r:c.borderRadius},r.styledMode||(g.fill=c.backgroundColor,g.stroke=c.borderColor||e.color||m.color||"#333333",g["stroke-width"]=c.borderWidth),f.tt=g=l.label(null,null,null,(e.isHeader?c.headerShape:c.shape)||"callout",null,null,c.useHTML).addClass("highcharts-tooltip-box "+v).attr(g).add(p)),g.isActive=!0,g.attr({text:t}),r.styledMode||g.css(c.style).shadow(c.shadow),t=g.getBBox(),m=t.width+g.strokeWidth(),e.isHeader?(d=t.height,r.xAxis[0].opposite&&(s=!0,u-=d),m=Math.max(0,Math.min(e.plotX+r.plotLeft-m/2,r.chartWidth+(r.scrollablePixels?r.scrollablePixels-r.marginRight:0)-m))):m=e.plotX+r.plotLeft-a(c.distance,16)-m,0>m&&(h=!1),t=(e.series&&e.series.yAxis&&e.series.yAxis.pos)+(e.plotY||0),t-=u,e.isHeader&&(t=s?-d:r.plotHeight+d),o.push({target:t,rank:e.isHeader?1:0,size:f.tt.getBBox().height+1,point:e,x:m,tt:g})}}),this.cleanSplit(),c.positioner&&o.forEach(function(t){var e=c.positioner.call(n,t.tt.getBBox().width,t.size,t.point);t.x=e.x,t.align=0,t.target=e.y,t.rank=a(e.rank,t.rank)}),t.distribute(o,r.plotHeight+d),o.forEach(function(t){var e=t.point,i=e.series;t.tt.attr({visibility:void 0===t.pos?"hidden":"inherit",x:h||e.isHeader||c.positioner?t.x:e.plotX+r.plotLeft+n.distance,y:t.pos+u,anchorX:e.isHeader?e.plotX+r.plotLeft:e.plotX+i.xAxis.pos,anchorY:e.isHeader?r.plotTop+r.plotHeight/2:e.plotY+i.yAxis.pos})})},updatePosition:function(t){var e=this.chart,i=this.getLabel(),s=(this.options.positioner||this.getPosition).call(this,i.width,i.height,t),n=t.plotX+e.plotLeft;t=t.plotY+e.plotTop;var o;this.outside&&(o=(this.options.borderWidth||0)+2*this.distance,this.renderer.setSize(i.width+o,i.height+o,!1),n+=e.pointer.chartPosition.left-s.x,t+=e.pointer.chartPosition.top-s.y),this.move(Math.round(s.x),Math.round(s.y||0),n,t)},getDateFormat:function(t,e,i,s){var n,o,a=this.chart.time,r=a.dateFormat("%m-%d %H:%M:%S.%L",e),l={millisecond:15,second:12,minute:9,hour:6,day:3},c="millisecond";for(o in h){if(t===h.week&&+a.dateFormat("%w",e)===i&&"00:00:00.000"===r.substr(6)){o="week";break}if(h[o]>t){o=c;break}if(l[o]&&r.substr(l[o])!=="01-01 00:00:00.000".substr(l[o]))break;"week"!==o&&(c=o)}return o&&(n=a.resolveDTLFormat(s[o]).main),n},getXDateFormat:function(t,e,i){e=e.dateTimeLabelFormats;var s=i&&i.closestPointRange;return(s?this.getDateFormat(s,t.x,i.options.startOfWeek,e):e.day)||e.year},tooltipFooterHeaderFormatter:function(e,i){var o=i?"footer":"header",a=e.series,r=a.tooltipOptions,l=r.xDateFormat,h=a.xAxis,c=h&&"datetime"===h.options.type&&n(e.key),d=r[o+"Format"];return i={isFooter:i,labelConfig:e},t.fireEvent(this,"headerFormatter",i,function(t){c&&!l&&(l=this.getXDateFormat(e,r,h)),c&&l&&(e.point&&e.point.tooltipDateKeys||["key"]).forEach(function(t){d=d.replace("{point."+t+"}","{point."+t+":"+l+"}")}),a.chart.styledMode&&(d=this.styledModeFormat(d)),t.text=s(d,{point:e,series:a},this.chart.time)}),i.text},bodyFormatter:function(t){return t.map(function(t){var e=t.series.tooltipOptions;return(e[(t.point.formatPrefix||"point")+"Formatter"]||t.point.tooltipFormatter).call(t.point,e[(t.point.formatPrefix||"point")+"Format"]||"")})},styledModeFormat:function(t){return t.replace('style="font-size: 10px"','class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g,'class="highcharts-color-{$1.colorIndex}"')}}}),e(i,"parts/Pointer.js",[i["parts/Globals.js"]],function(t){var e=t.addEvent,i=t.attr,s=t.charts,n=t.color,o=t.css,a=t.defined,r=t.extend,l=t.find,h=t.fireEvent,c=t.isNumber,d=t.isObject,p=t.offset,u=t.pick,f=t.splat,g=t.Tooltip;t.Pointer=function(t,e){this.init(t,e)},t.Pointer.prototype={init:function(t,e){this.options=e,this.chart=t,this.runChartClick=e.chart.events&&!!e.chart.events.click,this.pinchDown=[],this.lastValidTouch={},g&&(t.tooltip=new g(t,e.tooltip),this.followTouchMove=u(e.tooltip.followTouchMove,!0)),this.setDOMEvents()},zoomOption:function(t){var e=this.chart,i=e.options.chart,s=i.zoomType||"",e=e.inverted;/touch/.test(t.type)&&(s=u(i.pinchType,s)),this.zoomX=t=/x/.test(s),this.zoomY=s=/y/.test(s),this.zoomHor=t&&!e||s&&e,this.zoomVert=s&&!e||t&&e,this.hasZoom=t||s},normalize:function(t,e){var i;return i=t.touches?t.touches.length?t.touches.item(0):t.changedTouches[0]:t,e||(this.chartPosition=e=p(this.chart.container)),r(t,{chartX:Math.round(i.pageX-e.left),chartY:Math.round(i.pageY-e.top)})},getCoordinates:function(t){var e={xAxis:[],yAxis:[]};return this.chart.axes.forEach(function(i){e[i.isXAxis?"xAxis":"yAxis"].push({axis:i,value:i.toValue(t[i.horiz?"chartX":"chartY"])})}),e},findNearestKDPoint:function(t,e,i){var s;return t.forEach(function(t){var n=!(t.noSharedTooltip&&e)&&0>t.options.findNearestPointBy.indexOf("y");if(t=t.searchPoint(i,n),(n=d(t,!0))&&!(n=!d(s,!0)))var n=s.distX-t.distX,o=s.dist-t.dist,a=(t.series.group&&t.series.group.zIndex)-(s.series.group&&s.series.group.zIndex),n=0<(0!==n&&e?n:0!==o?o:0!==a?a:s.series.index>t.series.index?-1:1);n&&(s=t)}),s},getPointFromEvent:function(t){t=t.target;for(var e;t&&!e;)e=t.point,t=t.parentNode;return e},getChartCoordinatesFromPoint:function(t,e){var i=t.series,s=i.xAxis,i=i.yAxis,n=u(t.clientX,t.plotX),o=t.shapeArgs;return s&&i?e?{chartX:s.len+s.pos-n,chartY:i.len+i.pos-t.plotY}:{chartX:n+s.pos,chartY:t.plotY+i.pos}:o&&o.x&&o.y?{chartX:o.x,chartY:o.y}:void 0},getHoverData:function(t,e,i,s,n,o){var a,r=[];s=!(!s||!t);var h=e&&!e.stickyTracking?[e]:i.filter(function(t){return t.visible&&!(!n&&t.directTouch)&&u(t.options.enableMouseTracking,!0)&&t.stickyTracking});return e=(a=s?t:this.findNearestKDPoint(h,n,o))&&a.series,a&&(n&&!e.noSharedTooltip?(h=i.filter(function(t){return t.visible&&!(!n&&t.directTouch)&&u(t.options.enableMouseTracking,!0)&&!t.noSharedTooltip}),h.forEach(function(t){var e=l(t.points,function(t){return t.x===a.x&&!t.isNull});d(e)&&(t.chart.isBoosting&&(e=t.getPoint(e)),r.push(e))})):r.push(a)),{hoverPoint:a,hoverSeries:e,hoverPoints:r}},runPointActions:function(i,n){var o,a=this.chart,r=a.tooltip&&a.tooltip.options.enabled?a.tooltip:void 0,l=!!r&&r.shared,h=n||a.hoverPoint,c=h&&h.series||a.hoverSeries,c=this.getHoverData(h,c,a.series,"touchmove"!==i.type&&(!!n||c&&c.directTouch&&this.isDirectTouch),l,i),d=[],h=c.hoverPoint;if(o=c.hoverPoints,n=(c=c.hoverSeries)&&c.tooltipOptions.followPointer,l=l&&c&&!c.noSharedTooltip,h&&(h!==a.hoverPoint||r&&r.isHidden)){if((a.hoverPoints||[]).forEach(function(t){-1===o.indexOf(t)&&t.setState()}),a.hoverSeries!==c&&c.onMouseOver(),d=this.getActiveSeries(o),a.series.forEach(function(t){(t.options.inactiveOtherPoints||-1===d.indexOf(t))&&t.setState("inactive",!0)}),(o||[]).forEach(function(t){t.setState("hover")}),a.hoverPoint&&a.hoverPoint.firePointEvent("mouseOut"),!h.series)return;h.firePointEvent("mouseOver"),a.hoverPoints=o,a.hoverPoint=h,r&&r.refresh(l?o:h,i)}else n&&r&&!r.isHidden&&(h=r.getAnchor([{}],i),r.updatePosition({plotX:h[0],plotY:h[1]}));this.unDocMouseMove||(this.unDocMouseMove=e(a.container.ownerDocument,"mousemove",function(e){var i=s[t.hoverChartIndex];i&&i.pointer.onDocumentMouseMove(e)})),a.axes.forEach(function(e){var s=u(e.crosshair.snap,!0),n=s?t.find(o,function(t){return t.series[e.coll]===e}):void 0;n||!s?e.drawCrosshair(i,n):e.hideCrosshair()})},getActiveSeries:function(t){var e,i=[];return(t||[]).forEach(function(t){e=t.series,i.push(e),e.linkedParent&&i.push(e.linkedParent),e.linkedSeries&&(i=i.concat(e.linkedSeries)),e.navigatorSeries&&i.push(e.navigatorSeries)}),i},reset:function(t,e){var i=this.chart,s=i.hoverSeries,n=i.hoverPoint,o=i.hoverPoints,a=i.tooltip,r=a&&a.shared?o:n;t&&r&&f(r).forEach(function(e){e.series.isCartesian&&void 0===e.plotX&&(t=!1)}),t?a&&r&&f(r).length&&(a.refresh(r),a.shared&&o?o.forEach(function(t){t.setState(t.state,!0),t.series.isCartesian&&(t.series.xAxis.crosshair&&t.series.xAxis.drawCrosshair(null,t),t.series.yAxis.crosshair&&t.series.yAxis.drawCrosshair(null,t))}):n&&(n.setState(n.state,!0),i.axes.forEach(function(t){t.crosshair&&t.drawCrosshair(null,n)}))):(n&&n.onMouseOut(),o&&o.forEach(function(t){t.setState()}),s&&s.onMouseOut(),a&&a.hide(e),this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove()),i.axes.forEach(function(t){t.hideCrosshair()}),this.hoverX=i.hoverPoints=i.hoverPoint=null)},scaleGroups:function(t,e){var i,s=this.chart;s.series.forEach(function(n){i=t||n.getPlotBox(),n.xAxis&&n.xAxis.zoomEnabled&&n.group&&(n.group.attr(i),n.markerGroup&&(n.markerGroup.attr(i),n.markerGroup.clip(e?s.clipRect:null)),n.dataLabelsGroup&&n.dataLabelsGroup.attr(i))}),s.clipRect.attr(e||s.clipBox)},dragStart:function(t){var e=this.chart;e.mouseIsDown=t.type,e.cancelClick=!1,e.mouseDownX=this.mouseDownX=t.chartX,e.mouseDownY=this.mouseDownY=t.chartY},drag:function(t){var e,i=this.chart,s=i.options.chart,o=t.chartX,a=t.chartY,r=this.zoomHor,l=this.zoomVert,h=i.plotLeft,c=i.plotTop,d=i.plotWidth,p=i.plotHeight,u=this.selectionMarker,f=this.mouseDownX,g=this.mouseDownY,m=s.panKey&&t[s.panKey+"Key"];u&&u.touch||(o<h?o=h:o>h+d&&(o=h+d),a<c?a=c:a>c+p&&(a=c+p),this.hasDragged=Math.sqrt(Math.pow(f-o,2)+Math.pow(g-a,2)),10<this.hasDragged&&(e=i.isInsidePlot(f-h,g-c),i.hasCartesianSeries&&(this.zoomX||this.zoomY)&&e&&!m&&!u&&(this.selectionMarker=u=i.renderer.rect(h,c,r?1:d,l?1:p,0).attr({class:"highcharts-selection-marker",zIndex:7}).add(),i.styledMode||u.attr({fill:s.selectionMarkerFill||n("#335cad").setOpacity(.25).get()})),u&&r&&(o-=f,u.attr({width:Math.abs(o),x:(0<o?0:o)+f})),u&&l&&(o=a-g,u.attr({height:Math.abs(o),y:(0<o?0:o)+g})),e&&!u&&s.panning&&i.pan(t,s.panning)))},drop:function(t){var e=this,i=this.chart,s=this.hasPinched;if(this.selectionMarker){var n,l={originalEvent:t,xAxis:[],yAxis:[]},d=this.selectionMarker,p=d.attr?d.attr("x"):d.x,u=d.attr?d.attr("y"):d.y,f=d.attr?d.attr("width"):d.width,g=d.attr?d.attr("height"):d.height;(this.hasDragged||s)&&(i.axes.forEach(function(i){if(i.zoomEnabled&&a(i.min)&&(s||e[{xAxis:"zoomX",yAxis:"zoomY"}[i.coll]])){var o=i.horiz,r="touchend"===t.type?i.minPixelPadding:0,h=i.toValue((o?p:u)+r),o=i.toValue((o?p+f:u+g)-r);l[i.coll].push({axis:i,min:Math.min(h,o),max:Math.max(h,o)}),n=!0}}),n&&h(i,"selection",l,function(t){i.zoom(r(t,s?{animation:!1}:null))})),c(i.index)&&(this.selectionMarker=this.selectionMarker.destroy()),s&&this.scaleGroups()}i&&c(i.index)&&(o(i.container,{cursor:i._cursor}),i.cancelClick=10<this.hasDragged,i.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[])},onContainerMouseDown:function(t){t=this.normalize(t),2!==t.button&&(this.zoomOption(t),t.preventDefault&&t.preventDefault(),this.dragStart(t))},onDocumentMouseUp:function(e){s[t.hoverChartIndex]&&s[t.hoverChartIndex].pointer.drop(e)},onDocumentMouseMove:function(t){var e=this.chart,i=this.chartPosition;t=this.normalize(t,i),!i||this.inClass(t.target,"highcharts-tracker")||e.isInsidePlot(t.chartX-e.plotLeft,t.chartY-e.plotTop)||this.reset()},onContainerMouseLeave:function(e){var i=s[t.hoverChartIndex];i&&(e.relatedTarget||e.toElement)&&(i.pointer.reset(),i.pointer.chartPosition=null)},onContainerMouseMove:function(e){var i=this.chart;a(t.hoverChartIndex)&&s[t.hoverChartIndex]&&s[t.hoverChartIndex].mouseIsDown||(t.hoverChartIndex=i.index),e=this.normalize(e),e.preventDefault||(e.returnValue=!1),"mousedown"===i.mouseIsDown&&this.drag(e),!this.inClass(e.target,"highcharts-tracker")&&!i.isInsidePlot(e.chartX-i.plotLeft,e.chartY-i.plotTop)||i.openMenu||this.runPointActions(e)},inClass:function(t,e){for(var s;t;){if(s=i(t,"class")){if(-1!==s.indexOf(e))return!0;if(-1!==s.indexOf("highcharts-container"))return!1}t=t.parentNode}},onTrackerMouseOut:function(t){var e=this.chart.hoverSeries;t=t.relatedTarget||t.toElement,this.isDirectTouch=!1,!e||!t||e.stickyTracking||this.inClass(t,"highcharts-tooltip")||this.inClass(t,"highcharts-series-"+e.index)&&this.inClass(t,"highcharts-tracker")||e.onMouseOut()},onContainerClick:function(t){var e=this.chart,i=e.hoverPoint,s=e.plotLeft,n=e.plotTop;t=this.normalize(t),e.cancelClick||(i&&this.inClass(t.target,"highcharts-tracker")?(h(i.series,"click",r(t,{point:i})),e.hoverPoint&&i.firePointEvent("click",t)):(r(t,this.getCoordinates(t)),e.isInsidePlot(t.chartX-s,t.chartY-n)&&h(e,"click",t)))},setDOMEvents:function(){var i=this,s=i.chart.container,n=s.ownerDocument;s.onmousedown=function(t){i.onContainerMouseDown(t)},s.onmousemove=function(t){i.onContainerMouseMove(t)},s.onclick=function(t){i.onContainerClick(t)},this.unbindContainerMouseLeave=e(s,"mouseleave",i.onContainerMouseLeave),t.unbindDocumentMouseUp||(t.unbindDocumentMouseUp=e(n,"mouseup",i.onDocumentMouseUp)),t.hasTouch&&(s.ontouchstart=function(t){i.onContainerTouchStart(t)},s.ontouchmove=function(t){i.onContainerTouchMove(t)},t.unbindDocumentTouchEnd||(t.unbindDocumentTouchEnd=e(n,"touchend",i.onDocumentTouchEnd)))},destroy:function(){var e=this;e.unDocMouseMove&&e.unDocMouseMove(),this.unbindContainerMouseLeave(),t.chartCount||(t.unbindDocumentMouseUp&&(t.unbindDocumentMouseUp=t.unbindDocumentMouseUp()),t.unbindDocumentTouchEnd&&(t.unbindDocumentTouchEnd=t.unbindDocumentTouchEnd())),clearInterval(e.tooltipTimeout),t.objectEach(e,function(t,i){e[i]=null})}}}),e(i,"parts/TouchPointer.js",[i["parts/Globals.js"]],function(t){var e=t.charts,i=t.extend,s=t.noop,n=t.pick;i(t.Pointer.prototype,{pinchTranslate:function(t,e,i,s,n,o){this.zoomHor&&this.pinchTranslateDirection(!0,t,e,i,s,n,o),this.zoomVert&&this.pinchTranslateDirection(!1,t,e,i,s,n,o)},pinchTranslateDirection:function(t,e,i,s,n,o,a,r){var l,h,c,d=this.chart,p=t?"x":"y",u=t?"X":"Y",f="chart"+u,g=t?"width":"height",m=d["plot"+(t?"Left":"Top")],v=r||1,x=d.inverted,y=d.bounds[t?"h":"v"],b=1===e.length,w=e[0][f],k=i[0][f],M=!b&&e[1][f],S=!b&&i[1][f];i=function(){!b&&20<Math.abs(w-M)&&(v=r||Math.abs(k-S)/Math.abs(w-M)),h=(m-k)/v+w,l=d["plot"+(t?"Width":"Height")]/v},i(),e=h,e<y.min?(e=y.min,c=!0):e+l>y.max&&(e=y.max-l,c=!0),c?(k-=.8*(k-a[p][0]),b||(S-=.8*(S-a[p][1])),i()):a[p]=[k,S],x||(o[p]=h-m,o[g]=l),o=x?1/v:v,n[g]=l,n[p]=e,s[x?t?"scaleY":"scaleX":"scale"+u]=v,s["translate"+u]=o*m+(k-o*w)},pinch:function(t){var e=this,o=e.chart,a=e.pinchDown,r=t.touches,l=r.length,h=e.lastValidTouch,c=e.hasZoom,d=e.selectionMarker,p={},u=1===l&&(e.inClass(t.target,"highcharts-tracker")&&o.runTrackerClick||e.runChartClick),f={};1<l&&(e.initiated=!0),c&&e.initiated&&!u&&t.preventDefault(),[].map.call(r,function(t){return e.normalize(t)}),"touchstart"===t.type?([].forEach.call(r,function(t,e){a[e]={chartX:t.chartX,chartY:t.chartY}}),h.x=[a[0].chartX,a[1]&&a[1].chartX],h.y=[a[0].chartY,a[1]&&a[1].chartY],o.axes.forEach(function(t){if(t.zoomEnabled){var e=o.bounds[t.horiz?"h":"v"],i=t.minPixelPadding,s=t.toPixels(n(t.options.min,t.dataMin)),a=t.toPixels(n(t.options.max,t.dataMax)),r=Math.max(s,a);e.min=Math.min(t.pos,Math.min(s,a)-i),e.max=Math.max(t.pos+t.len,r+i)}}),e.res=!0):e.followTouchMove&&1===l?this.runPointActions(e.normalize(t)):a.length&&(d||(e.selectionMarker=d=i({destroy:s,touch:!0},o.plotBox)),e.pinchTranslate(a,r,p,d,f,h),e.hasPinched=c,e.scaleGroups(p,f),e.res&&(e.res=!1,this.reset(!1,0)))},touch:function(e,i){var s,o=this.chart;o.index!==t.hoverChartIndex&&this.onContainerMouseLeave({relatedTarget:!0}),t.hoverChartIndex=o.index,1===e.touches.length?(e=this.normalize(e),o.isInsidePlot(e.chartX-o.plotLeft,e.chartY-o.plotTop)&&!o.openMenu?(i&&this.runPointActions(e),"touchmove"===e.type&&(i=this.pinchDown,s=!!i[0]&&4<=Math.sqrt(Math.pow(i[0].chartX-e.chartX,2)+Math.pow(i[0].chartY-e.chartY,2))),n(s,!0)&&this.pinch(e)):i&&this.reset()):2===e.touches.length&&this.pinch(e)},onContainerTouchStart:function(t){this.zoomOption(t),this.touch(t,!0)},onContainerTouchMove:function(t){this.touch(t)},onDocumentTouchEnd:function(i){e[t.hoverChartIndex]&&e[t.hoverChartIndex].pointer.drop(i)}})}),e(i,"parts/MSPointer.js",[i["parts/Globals.js"]],function(t){var e=t.addEvent,i=t.charts,s=t.css,n=t.doc,o=t.extend,a=t.noop,r=t.Pointer,l=t.removeEvent,h=t.win,c=t.wrap;if(!t.hasTouch&&(h.PointerEvent||h.MSPointerEvent)){var d={},p=!!h.PointerEvent,u=function(){var e=[];return e.item=function(t){return this[t]},t.objectEach(d,function(t){e.push({pageX:t.pageX,pageY:t.pageY,target:t.target})}),e},f=function(e,s,n,o){"touch"!==e.pointerType&&e.pointerType!==e.MSPOINTER_TYPE_TOUCH||!i[t.hoverChartIndex]||(o(e),o=i[t.hoverChartIndex].pointer,o[s]({type:n,target:e.currentTarget,preventDefault:a,touches:u()}))};o(r.prototype,{onContainerPointerDown:function(t){f(t,"onContainerTouchStart","touchstart",function(t){d[t.pointerId]={pageX:t.pageX,pageY:t.pageY,target:t.currentTarget}})},onContainerPointerMove:function(t){f(t,"onContainerTouchMove","touchmove",function(t){d[t.pointerId]={pageX:t.pageX,pageY:t.pageY},d[t.pointerId].target||(d[t.pointerId].target=t.currentTarget)})},onDocumentPointerUp:function(t){f(t,"onDocumentTouchEnd","touchend",function(t){delete d[t.pointerId]})},batchMSEvents:function(t){t(this.chart.container,p?"pointerdown":"MSPointerDown",this.onContainerPointerDown),t(this.chart.container,p?"pointermove":"MSPointerMove",this.onContainerPointerMove),t(n,p?"pointerup":"MSPointerUp",this.onDocumentPointerUp)}}),c(r.prototype,"init",function(t,e,i){t.call(this,e,i),this.hasZoom&&s(e.container,{"-ms-touch-action":"none","touch-action":"none"})}),c(r.prototype,"setDOMEvents",function(t){t.apply(this),(this.hasZoom||this.followTouchMove)&&this.batchMSEvents(e)}),c(r.prototype,"destroy",function(t){this.batchMSEvents(l),t.call(this)})}}),e(i,"parts/Legend.js",[i["parts/Globals.js"]],function(t){var e=t.addEvent,i=t.css,s=t.discardElement,n=t.defined,o=t.fireEvent,a=t.isFirefox,r=t.marginNames,l=t.merge,h=t.pick,c=t.setAnimation,d=t.stableSort,p=t.win,u=t.wrap;t.Legend=function(t,e){this.init(t,e)},t.Legend.prototype={init:function(t,i){this.chart=t,this.setOptions(i),i.enabled&&(this.render(),e(this.chart,"endResize",function(){this.legend.positionCheckboxes()}),this.proximate?this.unchartrender=e(this.chart,"render",function(){this.legend.proximatePositions(),this.legend.positionItems()}):this.unchartrender&&this.unchartrender())},setOptions:function(t){var e=h(t.padding,8);this.options=t,this.chart.styledMode||(this.itemStyle=t.itemStyle,this.itemHiddenStyle=l(this.itemStyle,t.itemHiddenStyle)),this.itemMarginTop=t.itemMarginTop||0,this.padding=e,this.initialItemY=e-5,this.symbolWidth=h(t.symbolWidth,16),this.pages=[],this.proximate="proximate"===t.layout&&!this.chart.inverted},update:function(t,e){var i=this.chart;this.setOptions(l(!0,this.options,t)),this.destroy(),i.isDirtyLegend=i.isDirtyBox=!0,h(e,!0)&&i.redraw(),o(this,"afterUpdate")},colorizeItem:function(t,e){if(t.legendGroup[e?"removeClass":"addClass"]("highcharts-legend-item-hidden"),!this.chart.styledMode){var i=this.options,s=t.legendItem,n=t.legendLine,a=t.legendSymbol,r=this.itemHiddenStyle.color,i=e?i.itemStyle.color:r,l=e?t.color||r:r,h=t.options&&t.options.marker,c={fill:l};s&&s.css({fill:i,color:i}),n&&n.attr({stroke:l}),a&&(h&&a.isMarker&&(c=t.pointAttribs(),e||(c.stroke=c.fill=r)),a.attr(c))}o(this,"afterColorizeItem",{item:t,visible:e})},positionItems:function(){this.allItems.forEach(this.positionItem,this),this.chart.isResizing||this.positionCheckboxes()},positionItem:function(t){var e=this.options,i=e.symbolPadding,e=!e.rtl,s=t._legendItemPos,o=s[0],s=s[1],a=t.checkbox;(t=t.legendGroup)&&t.element&&t[n(t.translateY)?"animate":"attr"]({translateX:e?o:this.legendWidth-o-2*i-4,translateY:s}),a&&(a.x=o,a.y=s)},destroyItem:function(t){var e=t.checkbox;["legendItem","legendLine","legendSymbol","legendGroup"].forEach(function(e){t[e]&&(t[e]=t[e].destroy())}),e&&s(t.checkbox)},destroy:function(){function t(t){this[t]&&(this[t]=this[t].destroy())}this.getAllItems().forEach(function(e){["legendItem","legendGroup"].forEach(t,e)}),"clipRect up down pager nav box title group".split(" ").forEach(t,this),this.display=null},positionCheckboxes:function(){var t,e=this.group&&this.group.alignAttr,s=this.clipHeight||this.legendHeight,n=this.titleHeight;e&&(t=e.translateY,this.allItems.forEach(function(o){var a,r=o.checkbox;r&&(a=t+n+r.y+(this.scrollOffset||0)+3,i(r,{left:e.translateX+o.checkboxOffset+r.x-20+"px",top:a+"px",display:this.proximate||a>t-6&&a<t+s-6?"":"none"}))},this))},renderTitle:function(){var t=this.options,e=this.padding,i=t.title,s=0;i.text&&(this.title||(this.title=this.chart.renderer.label(i.text,e-3,e-4,null,null,null,t.useHTML,null,"legend-title").attr({zIndex:1}),this.chart.styledMode||this.title.css(i.style),this.title.add(this.group)),i.width||this.title.css({width:this.maxLegendWidth+"px"}),t=this.title.getBBox(),s=t.height,this.offsetWidth=t.width,this.contentGroup.attr({translateY:s})),this.titleHeight=s},setText:function(e){var i=this.options;e.legendItem.attr({text:i.labelFormat?t.format(i.labelFormat,e,this.chart.time):i.labelFormatter.call(e)})},renderItem:function(t){var e=this.chart,i=e.renderer,s=this.options,n=this.symbolWidth,o=s.symbolPadding,a=this.itemStyle,r=this.itemHiddenStyle,c="horizontal"===s.layout?h(s.itemDistance,20):0,d=!s.rtl,p=t.legendItem,u=!t.series,f=!u&&t.series.drawLegendSymbol?t.series:t,g=f.options,g=this.createCheckboxForItem&&g&&g.showCheckbox,c=n+o+c+(g?20:0),m=s.useHTML,v=t.options.className;p||(t.legendGroup=i.g("legend-item").addClass("highcharts-"+f.type+"-series highcharts-color-"+t.colorIndex+(v?" "+v:"")+(u?" highcharts-series-"+t.index:"")).attr({zIndex:1}).add(this.scrollGroup),t.legendItem=p=i.text("",d?n+o:-o,this.baseline||0,m),e.styledMode||p.css(l(t.visible?a:r)),p.attr({align:d?"left":"right",zIndex:2}).add(t.legendGroup),this.baseline||(this.fontMetrics=i.fontMetrics(e.styledMode?12:a.fontSize,p),this.baseline=this.fontMetrics.f+3+this.itemMarginTop,p.attr("y",this.baseline)),this.symbolHeight=s.symbolHeight||this.fontMetrics.f,f.drawLegendSymbol(this,t),this.setItemEvents&&this.setItemEvents(t,p,m)),g&&!t.checkbox&&this.createCheckboxForItem(t),this.colorizeItem(t,t.visible),!e.styledMode&&a.width||p.css({width:(s.itemWidth||this.widthOption||e.spacingBox.width)-c}),this.setText(t),e=p.getBBox(),t.itemWidth=t.checkboxOffset=s.itemWidth||t.legendItemWidth||e.width+c,this.maxItemWidth=Math.max(this.maxItemWidth,t.itemWidth),this.totalItemWidth+=t.itemWidth,this.itemHeight=t.itemHeight=Math.round(t.legendItemHeight||e.height||this.symbolHeight)},layoutItem:function(t){var e=this.options,i=this.padding,s="horizontal"===e.layout,n=t.itemHeight,o=e.itemMarginBottom||0,a=this.itemMarginTop,r=s?h(e.itemDistance,20):0,l=this.maxLegendWidth,e=e.alignColumns&&this.totalItemWidth>l?this.maxItemWidth:t.itemWidth;s&&this.itemX-i+e>l&&(this.itemX=i,this.lastLineHeight&&(this.itemY+=a+this.lastLineHeight+o),this.lastLineHeight=0),this.lastItemY=a+this.itemY+o,this.lastLineHeight=Math.max(n,this.lastLineHeight),t._legendItemPos=[this.itemX,this.itemY],s?this.itemX+=e:(this.itemY+=a+n+o,this.lastLineHeight=n),this.offsetWidth=this.widthOption||Math.max((s?this.itemX-i-(t.checkbox?0:r):e)+i,this.offsetWidth)},getAllItems:function(){var t=[];return this.chart.series.forEach(function(e){var i=e&&e.options;e&&h(i.showInLegend,!n(i.linkedTo)&&void 0,!0)&&(t=t.concat(e.legendItems||("point"===i.legendType?e.data:e)))}),o(this,"afterGetAllItems",{allItems:t}),t},getAlignment:function(){var t=this.options;return this.proximate?t.align.charAt(0)+"tv":t.floating?"":t.align.charAt(0)+t.verticalAlign.charAt(0)+t.layout.charAt(0)},adjustMargins:function(t,e){var i=this.chart,s=this.options,o=this.getAlignment(),a=void 0!==i.options.title.margin?i.titleOffset+i.options.title.margin:0;o&&[/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/].forEach(function(l,c){l.test(o)&&!n(t[c])&&(i[r[c]]=Math.max(i[r[c]],i.legend[(c+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][c]*s[c%2?"x":"y"]+h(s.margin,12)+e[c]+(0===c&&(0===i.titleOffset?0:a))))})},proximatePositions:function(){var e=this.chart,i=[],s="left"===this.options.align;this.allItems.forEach(function(n){var o,a;a=s;var r;n.yAxis&&n.points&&(n.xAxis.options.reversed&&(a=!a),o=t.find(a?n.points:n.points.slice(0).reverse(),function(e){return t.isNumber(e.plotY)}),a=n.legendGroup.getBBox().height,r=n.yAxis.top-e.plotTop,n.visible?(o=o?o.plotY:n.yAxis.height,o+=r-.3*a):o=r+n.yAxis.height,i.push({target:o,size:a,item:n}))},this),t.distribute(i,e.plotHeight),i.forEach(function(t){t.item._legendItemPos[1]=e.plotTop-e.spacing[0]+t.pos})},render:function(){var e,i,s,n=this.chart,a=n.renderer,r=this.group,h=this.box,c=this.options,p=this.padding;this.itemX=p,this.itemY=this.initialItemY,this.lastItemY=this.offsetWidth=0,this.widthOption=t.relativeLength(c.width,n.spacingBox.width-p),e=n.spacingBox.width-2*p-c.x,-1<["rm","lm"].indexOf(this.getAlignment().substring(0,2))&&(e/=2),this.maxLegendWidth=this.widthOption||e,r||(this.group=r=a.g("legend").attr({zIndex:7}).add(),this.contentGroup=a.g().attr({zIndex:1}).add(r),this.scrollGroup=a.g().add(this.contentGroup)),this.renderTitle(),e=this.getAllItems(),d(e,function(t,e){return(t.options&&t.options.legendIndex||0)-(e.options&&e.options.legendIndex||0)}),c.reversed&&e.reverse(),this.allItems=e,this.display=i=!!e.length,this.itemHeight=this.totalItemWidth=this.maxItemWidth=this.lastLineHeight=0,e.forEach(this.renderItem,this),e.forEach(this.layoutItem,this),e=(this.widthOption||this.offsetWidth)+p,s=this.lastItemY+this.lastLineHeight+this.titleHeight,s=this.handleOverflow(s),s+=p,h||(this.box=h=a.rect().addClass("highcharts-legend-box").attr({r:c.borderRadius}).add(r),h.isNew=!0),n.styledMode||h.attr({stroke:c.borderColor,"stroke-width":c.borderWidth||0,fill:c.backgroundColor||"none"}).shadow(c.shadow),0<e&&0<s&&(h[h.isNew?"attr":"animate"](h.crisp.call({},{x:0,y:0,width:e,height:s},h.strokeWidth())),h.isNew=!1),h[i?"show":"hide"](),n.styledMode&&"none"===r.getStyle("display")&&(e=s=0),this.legendWidth=e,this.legendHeight=s,i&&(a=n.spacingBox,/(lth|ct|rth)/.test(this.getAlignment())&&(h=a.y+n.titleOffset,a=l(a,{y:0<n.titleOffset?h+=n.options.title.margin:h})),r.align(l(c,{width:e,height:s,verticalAlign:this.proximate?"top":c.verticalAlign}),!0,a)),this.proximate||this.positionItems(),o(this,"afterRender")},handleOverflow:function(t){var e,i,s=this,n=this.chart,o=n.renderer,a=this.options,r=a.y,l=this.padding,r=n.spacingBox.height+("top"===a.verticalAlign?-r:r)-l,c=a.maxHeight,d=this.clipRect,p=a.navigation,u=h(p.animation,!0),f=p.arrowSize||12,g=this.nav,m=this.pages,v=this.allItems,x=function(t){"number"==typeof t?d.attr({height:t}):d&&(s.clipRect=d.destroy(),s.contentGroup.clip()),s.contentGroup.div&&(s.contentGroup.div.style.clip=t?"rect("+l+"px,9999px,"+(l+t)+"px,0)":"auto")},y=function(t){return s[t]=o.circle(0,0,1.3*f).translate(f/2,f/2).add(g),n.styledMode||s[t].attr("fill","rgba(0,0,0,0.0001)"),s[t]};return"horizontal"!==a.layout||"middle"===a.verticalAlign||a.floating||(r/=2),c&&(r=Math.min(r,c)),m.length=0,t>r&&!1!==p.enabled?(this.clipHeight=e=Math.max(r-20-this.titleHeight-l,0),this.currentPage=h(this.currentPage,1),this.fullHeight=t,v.forEach(function(t,s){var n=t._legendItemPos[1],o=Math.round(t.legendItem.getBBox().height),a=m.length;(!a||n-m[a-1]>e&&(i||n)!==m[a-1])&&(m.push(i||n),a++),t.pageIx=a-1,i&&(v[s-1].pageIx=a-1),s===v.length-1&&n+o-m[a-1]>e&&n!==i&&(m.push(n),t.pageIx=a),n!==i&&(i=n)}),d||(d=s.clipRect=o.clipRect(0,l,9999,0),s.contentGroup.clip(d)),x(e),g||(this.nav=g=o.g().attr({zIndex:1}).add(this.group),this.up=o.symbol("triangle",0,0,f,f).add(g),y("upTracker").on("click",function(){s.scroll(-1,u)}),this.pager=o.text("",15,10).addClass("highcharts-legend-navigation"),n.styledMode||this.pager.css(p.style),this.pager.add(g),this.down=o.symbol("triangle-down",0,0,f,f).add(g),y("downTracker").on("click",function(){s.scroll(1,u)})),s.scroll(0),t=r):g&&(x(),this.nav=g.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0),t},scroll:function(t,e){var i=this.pages,s=i.length,n=this.currentPage+t;t=this.clipHeight;var o=this.options.navigation,a=this.pager,r=this.padding;n>s&&(n=s),0<n&&(void 0!==e&&c(e,this.chart),this.nav.attr({translateX:r,translateY:t+this.padding+7+this.titleHeight,visibility:"visible"}),[this.up,this.upTracker].forEach(function(t){t.attr({class:1===n?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})}),a.attr({text:n+"/"+s}),[this.down,this.downTracker].forEach(function(t){t.attr({x:18+this.pager.getBBox().width,class:n===s?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})},this),this.chart.styledMode||(this.up.attr({fill:1===n?o.inactiveColor:o.activeColor}),this.upTracker.css({cursor:1===n?"default":"pointer"}),this.down.attr({fill:n===s?o.inactiveColor:o.activeColor}),this.downTracker.css({cursor:n===s?"default":"pointer"})),this.scrollOffset=-i[n-1]+this.initialItemY,this.scrollGroup.animate({translateY:this.scrollOffset}),this.currentPage=n,this.positionCheckboxes())}},t.LegendSymbolMixin={drawRectangle:function(t,e){var i=t.symbolHeight,s=t.options.squareSymbol;e.legendSymbol=this.chart.renderer.rect(s?(t.symbolWidth-i)/2:0,t.baseline-i+1,s?i:t.symbolWidth,i,h(t.options.symbolRadius,i/2)).addClass("highcharts-point").attr({zIndex:3}).add(e.legendGroup)},drawLineMarker:function(t){var e=this.options,i=e.marker,s=t.symbolWidth,n=t.symbolHeight,o=n/2,a=this.chart.renderer,r=this.legendGroup;t=t.baseline-Math.round(.3*t.fontMetrics.b);var c={};this.chart.styledMode||(c={"stroke-width":e.lineWidth||0},e.dashStyle&&(c.dashstyle=e.dashStyle)),this.legendLine=a.path(["M",0,t,"L",s,t]).addClass("highcharts-graph").attr(c).add(r),i&&!1!==i.enabled&&s&&(e=Math.min(h(i.radius,o),o),0===this.symbol.indexOf("url")&&(i=l(i,{width:n,height:n}),e=0),this.legendSymbol=i=a.symbol(this.symbol,s/2-e,t-e,2*e,2*e,i).addClass("highcharts-point").add(r),i.isMarker=!0)}},(/Trident\/7\.0/.test(p.navigator&&p.navigator.userAgent)||a)&&u(t.Legend.prototype,"positionItem",function(t,e){var i=this,s=function(){e._legendItemPos&&t.call(i,e)};s(),i.bubbleLegend||setTimeout(s)})}),e(i,"parts/Chart.js",[i["parts/Globals.js"]],function(t){var e=t.addEvent,i=t.animate,s=t.animObject,n=t.attr,o=t.doc,a=t.Axis,r=t.createElement,l=t.defaultOptions,h=t.discardElement,c=t.charts,d=t.css,p=t.defined,u=t.extend,f=t.find,g=t.fireEvent,m=t.isNumber,v=t.isObject,x=t.isString,y=t.Legend,b=t.marginNames,w=t.merge,k=t.objectEach,M=t.Pointer,S=t.pick,T=t.pInt,C=t.removeEvent,A=t.seriesTypes,E=t.splat,P=t.syncTimeout,O=t.win,L=t.Chart=function(){this.getArgs.apply(this,arguments)};t.chart=function(t,e,i){return new L(t,e,i)},u(L.prototype,{callbacks:[],getArgs:function(){var t=[].slice.call(arguments);(x(t[0])||t[0].nodeName)&&(this.renderTo=t.shift()),this.init(t[0],t[1])},init:function(i,s){var n,o=i.series,a=i.plotOptions||{};g(this,"init",{args:arguments},function(){i.series=null,n=w(l,i),k(n.plotOptions,function(t,e){v(t)&&(t.tooltip=a[e]&&w(a[e].tooltip)||void 0)}),n.tooltip.userOptions=i.chart&&i.chart.forExport&&i.tooltip.userOptions||i.tooltip,n.series=i.series=o,this.userOptions=i;var r=n.chart,h=r.events;this.margin=[],this.spacing=[],this.bounds={h:{},v:{}},this.labelCollectors=[],this.callback=s,this.isResizing=0,this.options=n,this.axes=[],this.series=[],this.time=i.time&&Object.keys(i.time).length?new t.Time(i.time):t.time,this.styledMode=r.styledMode,this.hasCartesianSeries=r.showAxes;var d=this;d.index=c.length,c.push(d),t.chartCount++,h&&k(h,function(t,i){e(d,i,t)}),d.xAxis=[],d.yAxis=[],d.pointCount=d.colorCounter=d.symbolCounter=0,g(d,"afterInit"),d.firstRender()})},initSeries:function(e){var i=this.options.chart;return(i=A[e.type||i.type||i.defaultSeriesType])||t.error(17,!0,this),i=new i,i.init(this,e),i},orderSeries:function(t){var e=this.series;for(t=t||0;t<e.length;t++)e[t]&&(e[t].index=t,e[t].name=e[t].getName())},isInsidePlot:function(t,e,i){var s=i?e:t;return t=i?t:e,0<=s&&s<=this.plotWidth&&0<=t&&t<=this.plotHeight},redraw:function(e){g(this,"beforeRedraw");var i,s,n,o=this.axes,a=this.series,r=this.pointer,l=this.legend,h=this.userOptions.legend,c=this.isDirtyLegend,d=this.hasCartesianSeries,p=this.isDirtyBox,f=this.renderer,m=f.isHidden(),v=[];for(this.setResponsive&&this.setResponsive(!1),t.setAnimation(e,this),m&&this.temporaryDisplay(),this.layOutTitles(),e=a.length;e--;)if(n=a[e],n.options.stacking&&(i=!0,n.isDirty)){s=!0;break}if(s)for(e=a.length;e--;)n=a[e],n.options.stacking&&(n.isDirty=!0);a.forEach(function(t){t.isDirty&&("point"===t.options.legendType?(t.updateTotals&&t.updateTotals(),c=!0):h&&(h.labelFormatter||h.labelFormat)&&(c=!0)),t.isDirtyData&&g(t,"updatedData")}),c&&l&&l.options.enabled&&(l.render(),this.isDirtyLegend=!1),i&&this.getStacks(),d&&o.forEach(function(t){t.updateNames(),t.setScale()}),this.getMargins(),d&&(o.forEach(function(t){t.isDirty&&(p=!0)}),o.forEach(function(t){var e=t.min+","+t.max;t.extKey!==e&&(t.extKey=e,v.push(function(){g(t,"afterSetExtremes",u(t.eventArgs,t.getExtremes())),delete t.eventArgs})),(p||i)&&t.redraw()})),p&&this.drawChartBox(),g(this,"predraw"),a.forEach(function(t){(p||t.isDirty)&&t.visible&&t.redraw(),t.isDirtyData=!1}),r&&r.reset(!0),f.draw(),g(this,"redraw"),g(this,"render"),m&&this.temporaryDisplay(!0),v.forEach(function(t){t.call()})},get:function(t){function e(e){return e.id===t||e.options&&e.options.id===t}var i,s,n=this.series;for(i=f(this.axes,e)||f(this.series,e),s=0;!i&&s<n.length;s++)i=f(n[s].points||[],e);return i},getAxes:function(){var t=this,e=this.options,i=e.xAxis=E(e.xAxis||{}),e=e.yAxis=E(e.yAxis||{});g(this,"getAxes"),i.forEach(function(t,e){t.index=e,t.isX=!0}),e.forEach(function(t,e){t.index=e}),i.concat(e).forEach(function(e){new a(t,e)}),g(this,"afterGetAxes")},getSelectedPoints:function(){var t=[];return this.series.forEach(function(e){t=t.concat((e[e.hasGroupedData?"points":"data"]||[]).filter(function(t){return t.selected}))}),t},getSelectedSeries:function(){return this.series.filter(function(t){return t.selected})},setTitle:function(t,e,i){var s,n=this,o=n.options,a=n.styledMode;s=o.title=w(!a&&{style:{color:"#333333",fontSize:o.isStock?"16px":"18px"}},o.title,t),o=o.subtitle=w(!a&&{style:{color:"#666666"}},o.subtitle,e),[["title",t,s],["subtitle",e,o]].forEach(function(t,e){var i=t[0],s=n[i],o=t[1];t=t[2],s&&o&&(n[i]=s=s.destroy()),t&&!s&&(n[i]=n.renderer.text(t.text,0,0,t.useHTML).attr({align:t.align,class:"highcharts-"+i,zIndex:t.zIndex||4}).add(),n[i].update=function(t){n.setTitle(!e&&t,e&&t)},a||n[i].css(t.style))}),n.layOutTitles(i)},layOutTitles:function(t){var e,i=0,s=this.renderer,n=this.spacingBox;["title","subtitle"].forEach(function(t){var e=this[t],o=this.options[t];t="title"===t?-3:o.verticalAlign?0:i+2;var a;e&&(this.styledMode||(a=o.style.fontSize),a=s.fontMetrics(a,e).b,e.css({width:(o.width||n.width+o.widthAdjust)+"px"}).align(u({y:t+a},o),!1,"spacingBox"),o.floating||o.verticalAlign||(i=Math.ceil(i+e.getBBox(o.useHTML).height)))},this),e=this.titleOffset!==i,this.titleOffset=i,!this.isDirtyBox&&e&&(this.isDirtyBox=this.isDirtyLegend=e,this.hasRendered&&S(t,!0)&&this.isDirtyBox&&this.redraw())},getChartSize:function(){var e=this.options.chart,i=e.width,e=e.height,s=this.renderTo;p(i)||(this.containerWidth=t.getStyle(s,"width")),p(e)||(this.containerHeight=t.getStyle(s,"height")),this.chartWidth=Math.max(0,i||this.containerWidth||600),this.chartHeight=Math.max(0,t.relativeLength(e,this.chartWidth)||(1<this.containerHeight?this.containerHeight:400))},temporaryDisplay:function(e){var i=this.renderTo;if(e)for(;i&&i.style;)i.hcOrigStyle&&(t.css(i,i.hcOrigStyle),delete i.hcOrigStyle),i.hcOrigDetached&&(o.body.removeChild(i),i.hcOrigDetached=!1),i=i.parentNode;else for(;i&&i.style&&(o.body.contains(i)||i.parentNode||(i.hcOrigDetached=!0,o.body.appendChild(i)),("none"===t.getStyle(i,"display",!1)||i.hcOricDetached)&&(i.hcOrigStyle={display:i.style.display,height:i.style.height,overflow:i.style.overflow},e={display:"block",overflow:"hidden"},i!==this.renderTo&&(e.height=0),t.css(i,e),i.offsetWidth||i.style.setProperty("display","block","important")),(i=i.parentNode)!==o.body););},setClassName:function(t){this.container.className="highcharts-container "+(t||"")},getContainer:function(){var e,i,s,a=this.options,l=a.chart;e=this.renderTo;var h,p,f=t.uniqueKey();if(e||(this.renderTo=e=l.renderTo),x(e)&&(this.renderTo=e=o.getElementById(e)),e||t.error(13,!0,this),i=T(n(e,"data-highcharts-chart")),m(i)&&c[i]&&c[i].hasRendered&&c[i].destroy(),n(e,"data-highcharts-chart",this.index),e.innerHTML="",l.skipClone||e.offsetWidth||this.temporaryDisplay(),this.getChartSize(),i=this.chartWidth,s=this.chartHeight,d(e,{overflow:"hidden"}),this.styledMode||(h=u({position:"relative",overflow:"hidden",width:i+"px",height:s+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)"},l.style)),this.container=e=r("div",{id:f},h,e),this._cursor=e.style.cursor,this.renderer=new(t[l.renderer]||t.Renderer)(e,i,s,null,l.forExport,a.exporting&&a.exporting.allowHTML,this.styledMode),this.setClassName(l.className),this.styledMode)for(p in a.defs)this.renderer.definition(a.defs[p]);else this.renderer.setStyle(l.style);this.renderer.chartIndex=this.index,g(this,"afterGetContainer")},getMargins:function(t){var e=this.spacing,i=this.margin,s=this.titleOffset;this.resetMargins(),s&&!p(i[0])&&(this.plotTop=Math.max(this.plotTop,s+this.options.title.margin+e[0])),this.legend&&this.legend.display&&this.legend.adjustMargins(i,e),g(this,"getMargins"),t||this.getAxisMargins()},getAxisMargins:function(){var t=this,e=t.axisOffset=[0,0,0,0],i=t.margin;t.hasCartesianSeries&&t.axes.forEach(function(t){t.visible&&t.getOffset()}),b.forEach(function(s,n){p(i[n])||(t[s]+=e[n])}),t.setChartSize()},reflow:function(e){var i=this,s=i.options.chart,n=i.renderTo,a=p(s.width)&&p(s.height),r=s.width||t.getStyle(n,"width"),s=s.height||t.getStyle(n,"height"),n=e?e.target:O;a||i.isPrinting||!r||!s||n!==O&&n!==o||(r===i.containerWidth&&s===i.containerHeight||(t.clearTimeout(i.reflowTimeout),i.reflowTimeout=P(function(){i.container&&i.setSize(void 0,void 0,!1)},e?100:0)),i.containerWidth=r,i.containerHeight=s)},setReflow:function(t){var i=this;!1===t||this.unbindReflow?!1===t&&this.unbindReflow&&(this.unbindReflow=this.unbindReflow()):(this.unbindReflow=e(O,"resize",function(t){i.reflow(t)}),e(this,"destroy",this.unbindReflow))},setSize:function(e,n,o){var a,r=this,l=r.renderer;r.isResizing+=1,t.setAnimation(o,r),r.oldChartHeight=r.chartHeight,r.oldChartWidth=r.chartWidth,void 0!==e&&(r.options.chart.width=e),void 0!==n&&(r.options.chart.height=n),r.getChartSize(),r.styledMode||(a=l.globalAnimation,(a?i:d)(r.container,{width:r.chartWidth+"px",height:r.chartHeight+"px"},a)),r.setChartSize(!0),l.setSize(r.chartWidth,r.chartHeight,o),r.axes.forEach(function(t){t.isDirty=!0,t.setScale()}),r.isDirtyLegend=!0,r.isDirtyBox=!0,r.layOutTitles(),r.getMargins(),r.redraw(o),r.oldChartHeight=null,g(r,"resize"),P(function(){r&&g(r,"endResize",null,function(){--r.isResizing})},s(a).duration)},setChartSize:function(t){var e,i,s,n,o=this.inverted,a=this.renderer,r=this.chartWidth,l=this.chartHeight,h=this.options.chart,c=this.spacing,d=this.clipOffset;this.plotLeft=e=Math.round(this.plotLeft),this.plotTop=i=Math.round(this.plotTop),this.plotWidth=s=Math.max(0,Math.round(r-e-this.marginRight)),this.plotHeight=n=Math.max(0,Math.round(l-i-this.marginBottom)),this.plotSizeX=o?n:s,this.plotSizeY=o?s:n,this.plotBorderWidth=h.plotBorderWidth||0,this.spacingBox=a.spacingBox={x:c[3],y:c[0],width:r-c[3]-c[1],height:l-c[0]-c[2]},this.plotBox=a.plotBox={x:e,y:i,width:s,height:n},r=2*Math.floor(this.plotBorderWidth/2),o=Math.ceil(Math.max(r,d[3])/2),a=Math.ceil(Math.max(r,d[0])/2),this.clipBox={x:o,y:a,width:Math.floor(this.plotSizeX-Math.max(r,d[1])/2-o),height:Math.max(0,Math.floor(this.plotSizeY-Math.max(r,d[2])/2-a))},t||this.axes.forEach(function(t){t.setAxisSize(),t.setAxisTranslation()}),g(this,"afterSetChartSize",{skipAxes:t})},resetMargins:function(){g(this,"resetMargins");var t=this,e=t.options.chart;["margin","spacing"].forEach(function(i){var s=e[i],n=v(s)?s:[s,s,s,s];["Top","Right","Bottom","Left"].forEach(function(s,o){t[i][o]=S(e[i+s],n[o])})}),b.forEach(function(e,i){t[e]=S(t.margin[i],t.spacing[i])}),t.axisOffset=[0,0,0,0],t.clipOffset=[0,0,0,0]},drawChartBox:function(){var t,e,i=this.options.chart,s=this.renderer,n=this.chartWidth,o=this.chartHeight,a=this.chartBackground,r=this.plotBackground,l=this.plotBorder,h=this.styledMode,c=this.plotBGImage,d=i.backgroundColor,p=i.plotBackgroundColor,u=i.plotBackgroundImage,f=this.plotLeft,m=this.plotTop,v=this.plotWidth,x=this.plotHeight,y=this.plotBox,b=this.clipRect,w=this.clipBox,k="animate";a||(this.chartBackground=a=s.rect().addClass("highcharts-background").add(),k="attr"),h?t=e=a.strokeWidth():(t=i.borderWidth||0,e=t+(i.shadow?8:0),d={fill:d||"none"},(t||a["stroke-width"])&&(d.stroke=i.borderColor,d["stroke-width"]=t),a.attr(d).shadow(i.shadow)),a[k]({x:e/2,y:e/2,width:n-e-t%2,height:o-e-t%2,r:i.borderRadius}),k="animate",r||(k="attr",this.plotBackground=r=s.rect().addClass("highcharts-plot-background").add()),r[k](y),h||(r.attr({fill:p||"none"}).shadow(i.plotShadow),u&&(c?c.animate(y):this.plotBGImage=s.image(u,f,m,v,x).add())),b?b.animate({width:w.width,height:w.height}):this.clipRect=s.clipRect(w),k="animate",l||(k="attr",this.plotBorder=l=s.rect().addClass("highcharts-plot-border").attr({zIndex:1}).add()),h||l.attr({stroke:i.plotBorderColor,"stroke-width":i.plotBorderWidth||0,fill:"none"}),l[k](l.crisp({x:f,y:m,width:v,height:x},-l.strokeWidth())),this.isDirtyBox=!1,g(this,"afterDrawChartBox")},propFromSeries:function(){var t,e,i,s=this,n=s.options.chart,o=s.options.series;["inverted","angular","polar"].forEach(function(a){for(t=A[n.type||n.defaultSeriesType],i=n[a]||t&&t.prototype[a],e=o&&o.length;!i&&e--;)(t=A[o[e].type])&&t.prototype[a]&&(i=!0);s[a]=i})},linkSeries:function(){var t=this,e=t.series;e.forEach(function(t){t.linkedSeries.length=0}),e.forEach(function(e){var i=e.options.linkedTo;x(i)&&(i=":previous"===i?t.series[e.index-1]:t.get(i))&&i.linkedParent!==e&&(i.linkedSeries.push(e),e.linkedParent=i,e.visible=S(e.options.visible,i.options.visible,e.visible))}),g(this,"afterLinkSeries")},renderSeries:function(){this.series.forEach(function(t){t.translate(),t.render()})},renderLabels:function(){var t=this,e=t.options.labels;e.items&&e.items.forEach(function(i){var s=u(e.style,i.style),n=T(s.left)+t.plotLeft,o=T(s.top)+t.plotTop+12;delete s.left,delete s.top,t.renderer.text(i.html,n,o).attr({zIndex:2}).css(s).add()})},render:function(){var t,e,i,s=this.axes,n=this.renderer,o=this.options,a=0;this.setTitle(),this.legend=new y(this,o.legend),this.getStacks&&this.getStacks(),this.getMargins(!0),this.setChartSize(),o=this.plotWidth,s.some(function(t){if(t.horiz&&t.visible&&t.options.labels.enabled&&t.series.length)return a=21,!0}),t=this.plotHeight=Math.max(this.plotHeight-a,0),s.forEach(function(t){t.setScale()}),this.getAxisMargins(),e=1.1<o/this.plotWidth,i=1.05<t/this.plotHeight,(e||i)&&(s.forEach(function(t){(t.horiz&&e||!t.horiz&&i)&&t.setTickInterval(!0)}),this.getMargins()),this.drawChartBox(),this.hasCartesianSeries&&s.forEach(function(t){t.visible&&t.render()}),this.seriesGroup||(this.seriesGroup=n.g("series-group").attr({zIndex:3}).add()),this.renderSeries(),this.renderLabels(),this.addCredits(),this.setResponsive&&this.setResponsive(),this.hasRendered=!0},addCredits:function(t){var e=this;t=w(!0,this.options.credits,t),t.enabled&&!this.credits&&(this.credits=this.renderer.text(t.text+(this.mapCredits||""),0,0).addClass("highcharts-credits").on("click",function(){t.href&&(O.location.href=t.href)}).attr({align:t.position.align,zIndex:8}),e.styledMode||this.credits.css(t.style),this.credits.add().align(t.position),this.credits.update=function(t){e.credits=e.credits.destroy(),e.addCredits(t)})},destroy:function(){var e,i=this,s=i.axes,n=i.series,o=i.container,a=o&&o.parentNode;for(g(i,"destroy"),i.renderer.forExport?t.erase(c,i):c[i.index]=void 0,t.chartCount--,i.renderTo.removeAttribute("data-highcharts-chart"),C(i),e=s.length;e--;)s[e]=s[e].destroy();for(this.scroller&&this.scroller.destroy&&this.scroller.destroy(),e=n.length;e--;)n[e]=n[e].destroy();"title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" ").forEach(function(t){var e=i[t];e&&e.destroy&&(i[t]=e.destroy())}),o&&(o.innerHTML="",C(o),a&&h(o)),k(i,function(t,e){delete i[e]})},firstRender:function(){var e=this,i=e.options;e.isReadyToRender&&!e.isReadyToRender()||(e.getContainer(),e.resetMargins(),e.setChartSize(),e.propFromSeries(),e.getAxes(),(t.isArray(i.series)?i.series:[]).forEach(function(t){e.initSeries(t)}),e.linkSeries(),g(e,"beforeRender"),M&&(e.pointer=new M(e,i)),e.render(),!e.renderer.imgCount&&e.onload&&e.onload(),e.temporaryDisplay(!0))},onload:function(){[this.callback].concat(this.callbacks).forEach(function(t){t&&void 0!==this.index&&t.apply(this,[this])},this),g(this,"load"),g(this,"render"),p(this.index)&&this.setReflow(this.options.chart.reflow),this.onload=null}})}),e(i,"parts/ScrollablePlotArea.js",[i["parts/Globals.js"]],function(t){var e=t.addEvent,i=t.Chart;e(i,"afterSetChartSize",function(e){var i=this.options.chart.scrollablePlotArea;(i=i&&i.minWidth)&&!this.renderer.forExport&&(this.scrollablePixels=i=Math.max(0,i-this.chartWidth))&&(this.plotWidth+=i,this.clipBox.width+=i,e.skipAxes||this.axes.forEach(function(e){1===e.side?e.getPlotLinePath=function(){var i,s=this.right;return this.right=s-e.chart.scrollablePixels,i=t.Axis.prototype.getPlotLinePath.apply(this,arguments),this.right=s,i}:(e.setAxisSize(),e.setAxisTranslation())}))}),e(i,"render",function(){this.scrollablePixels?(this.setUpScrolling&&this.setUpScrolling(),this.applyFixed()):this.fixedDiv&&this.applyFixed()}),i.prototype.setUpScrolling=function(){this.scrollingContainer=t.createElement("div",{className:"highcharts-scrolling"},{overflowX:"auto",WebkitOverflowScrolling:"touch"},this.renderTo),this.innerContainer=t.createElement("div",{className:"highcharts-inner-container"},null,this.scrollingContainer),this.innerContainer.appendChild(this.container),this.setUpScrolling=null},i.prototype.moveFixedElements=function(){var t=this.container,e=this.fixedRenderer;[this.inverted?".highcharts-xaxis":".highcharts-yaxis",this.inverted?".highcharts-xaxis-labels":".highcharts-yaxis-labels",".highcharts-contextbutton",".highcharts-credits",".highcharts-legend",".highcharts-reset-zoom",".highcharts-subtitle",".highcharts-title",".highcharts-legend-checkbox"].forEach(function(i){[].forEach.call(t.querySelectorAll(i),function(t){(t.namespaceURI===e.SVG_NS?e.box:e.box.parentNode).appendChild(t),t.style.pointerEvents="auto"})})},i.prototype.applyFixed=function(){var i,s=!this.fixedDiv,n=this.options.chart.scrollablePlotArea;s&&(this.fixedDiv=t.createElement("div",{className:"highcharts-fixed"},{position:"absolute",overflow:"hidden",pointerEvents:"none",zIndex:2},null,!0),this.renderTo.insertBefore(this.fixedDiv,this.renderTo.firstChild),this.renderTo.style.overflow="visible",this.fixedRenderer=i=new t.Renderer(this.fixedDiv,0,0),this.scrollableMask=i.path().attr({fill:t.color(this.options.chart.backgroundColor||"#fff").setOpacity(t.pick(n.opacity,.85)).get(),zIndex:-1}).addClass("highcharts-scrollable-mask").add(),this.moveFixedElements(),e(this,"afterShowResetZoom",this.moveFixedElements)),this.fixedRenderer.setSize(this.chartWidth,this.chartHeight),i=this.chartWidth+this.scrollablePixels,t.stop(this.container),this.container.style.width=i+"px",this.renderer.boxWrapper.attr({width:i,height:this.chartHeight,viewBox:[0,0,i,this.chartHeight].join(" ")}),this.chartBackground.attr({width:i}),s&&n.scrollPositionX&&(this.scrollingContainer.scrollLeft=this.scrollablePixels*n.scrollPositionX),n=this.axisOffset,s=this.plotTop-n[0]-1,n=this.plotTop+this.plotHeight+n[2],i=this.plotLeft+this.plotWidth-this.scrollablePixels,this.scrollableMask.attr({d:this.scrollablePixels?["M",0,s,"L",this.plotLeft-1,s,"L",this.plotLeft-1,n,"L",0,n,"Z","M",i,s,"L",this.chartWidth,s,"L",this.chartWidth,n,"L",i,n,"Z"]:["M",0,0]})}}),e(i,"parts/Point.js",[i["parts/Globals.js"]],function(t){var e,i=t.extend,s=t.erase,o=t.fireEvent,a=t.format,r=t.isArray,l=t.isNumber,h=t.pick,c=t.uniqueKey,d=t.defined,p=t.removeEvent;t.Point=e=function(){},t.Point.prototype={init:function(t,e,i){return this.series=t,this.applyOptions(e,i),this.id=d(this.id)?this.id:c(),this.resolveColor(),t.chart.pointCount++,o(this,"afterInit"),this},resolveColor:function(){var t,e=this.series;t=e.chart.options.chart.colorCount;var i=e.chart.styledMode;i||this.options.color||(this.color=e.color),e.options.colorByPoint?(i||(t=e.options.colors||e.chart.options.colors,this.color=this.color||t[e.colorCounter],t=t.length),i=e.colorCounter,++e.colorCounter===t&&(e.colorCounter=0)):i=e.colorIndex,this.colorIndex=h(this.colorIndex,i)},applyOptions:function(t,s){var n=this.series,o=n.options.pointValKey||n.pointValKey;return t=e.prototype.optionsToObject.call(this,t),i(this,t),this.options=this.options?i(this.options,t):t,t.group&&delete this.group,t.dataLabels&&delete this.dataLabels,o&&(this.y=this[o]),(this.isNull=h(this.isValid&&!this.isValid(),null===this.x||!l(this.y,!0)))&&(this.formatPrefix="null"),this.selected&&(this.state="select"),"name"in this&&void 0===s&&n.xAxis&&n.xAxis.hasNames&&(this.x=n.xAxis.nameToX(this)),void 0===this.x&&n&&(this.x=void 0===s?n.autoIncrement(this):s),this},setNestedProperty:function(e,i,s){return s.split(".").reduce(function(e,s,n,o){return e[s]=o.length-1===n?i:t.isObject(e[s],!0)?e[s]:{},e[s]},e),e},optionsToObject:function(e){var i={},s=this.series,o=s.options.keys,a=o||s.pointArrayMap||["y"],h=a.length,c=0,d=0;if(l(e)||null===e)i[a[0]]=e;else if(r(e))for(!o&&e.length>h&&(s=n(e[0]),"string"===s?i.name=e[0]:"number"===s&&(i.x=e[0]),c++);d<h;)o&&void 0===e[c]||(0<a[d].indexOf(".")?t.Point.prototype.setNestedProperty(i,e[c],a[d]):i[a[d]]=e[c]),c++,d++;else"object"===(void 0===e?"undefined":n(e))&&(i=e,e.dataLabels&&(s._hasPointLabels=!0),e.marker&&(s._hasPointMarkers=!0));return i},getClassName:function(){return"highcharts-point"+(this.selected?" highcharts-point-select":"")+(this.negative?" highcharts-negative":"")+(this.isNull?" highcharts-null-point":"")+(void 0!==this.colorIndex?" highcharts-color-"+this.colorIndex:"")+(this.options.className?" "+this.options.className:"")+(this.zone&&this.zone.className?" "+this.zone.className.replace("highcharts-negative",""):"")},getZone:function(){var t,e=this.series,i=e.zones,e=e.zoneAxis||"y",s=0;for(t=i[s];this[e]>=t.value;)t=i[++s];return this.nonZonedColor||(this.nonZonedColor=this.color),this.color=t&&t.color&&!this.options.color?t.color:this.nonZonedColor,t},destroy:function(){var t,e=this.series.chart,i=e.hoverPoints;e.pointCount--,i&&(this.setState(),s(i,this),i.length||(e.hoverPoints=null)),this===e.hoverPoint&&this.onMouseOut(),(this.graphic||this.dataLabel||this.dataLabels)&&(p(this),this.destroyElements()),this.legendItem&&e.legend.destroyItem(this);for(t in this)this[t]=null},destroyElements:function(t){var e,i,s=this,n=[];for(t=t||{graphic:1,dataLabel:1},t.graphic&&n.push("graphic","shadowGroup"),t.dataLabel&&n.push("dataLabel","dataLabelUpper","connector"),i=n.length;i--;)e=n[i],s[e]&&(s[e]=s[e].destroy());["dataLabel","connector"].forEach(function(e){var i=e+"s";t[e]&&s[i]&&(s[i].forEach(function(t){t.element&&t.destroy()}),delete s[i])})},getLabelConfig:function(){return{x:this.category,y:this.y,color:this.color,colorIndex:this.colorIndex,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},tooltipFormatter:function(t){var e=this.series,i=e.tooltipOptions,s=h(i.valueDecimals,""),n=i.valuePrefix||"",o=i.valueSuffix||"";return e.chart.styledMode&&(t=e.chart.tooltip.styledModeFormat(t)),(e.pointArrayMap||["y"]).forEach(function(e){e="{point."+e,(n||o)&&(t=t.replace(RegExp(e+"}","g"),n+e+"}"+o)),t=t.replace(RegExp(e+"}","g"),e+":,."+s+"f}")}),a(t,{point:this,series:this.series},e.chart.time)},firePointEvent:function(t,e,i){var s=this,n=this.series.options;(n.point.events[t]||s.options&&s.options.events&&s.options.events[t])&&this.importEvents(),"click"===t&&n.allowPointSelect&&(i=function(t){s.select&&s.select(null,t.ctrlKey||t.metaKey||t.shiftKey)}),o(this,t,e,i)},visible:!0}}),e(i,"parts/Series.js",[i["parts/Globals.js"]],function(t){var e=t.addEvent,i=t.animObject,s=t.arrayMax,n=t.arrayMin,o=t.correctFloat,a=t.defaultOptions,r=t.defaultPlotOptions,l=t.defined,h=t.erase,c=t.extend,d=t.fireEvent,p=t.isArray,u=t.isNumber,f=t.isString,g=t.merge,m=t.objectEach,v=t.pick,x=t.removeEvent,y=t.splat,b=t.SVGElement,w=t.syncTimeout,k=t.win;t.Series=t.seriesType("line",null,{lineWidth:2,allowPointSelect:!1,showCheckbox:!1,animation:{duration:1e3},events:{},marker:{lineWidth:0,lineColor:"#ffffff",enabledThreshold:2,radius:4,states:{normal:{animation:!0},hover:{animation:{duration:50},enabled:!0,radiusPlus:2,lineWidthPlus:1},select:{fillColor:"#cccccc",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{align:"center",formatter:function(){return null===this.y?"":t.numberFormat(this.y,-1)},padding:5,style:{fontSize:"11px",fontWeight:"bold",color:"contrast",textOutline:"1px contrast"},verticalAlign:"bottom",x:0,y:0},cropThreshold:300,opacity:1,pointRange:0,softThreshold:!0,states:{normal:{animation:!0},hover:{animation:{duration:50},lineWidthPlus:1,marker:{},halo:{size:10,opacity:.25}},select:{animation:{duration:0}},inactive:{animation:{duration:50},opacity:.2}},stickyTracking:!0,turboThreshold:1e3,findNearestPointBy:"x"},{isCartesian:!0,pointClass:t.Point,sorted:!0,requireSorting:!0,directTouch:!1,axisTypes:["xAxis","yAxis"],colorCounter:0,parallelArrays:["x","y"],coll:"series",cropShoulder:1,init:function(t,i){d(this,"init",{options:i});var s,n,o=this,a=t.series;o.chart=t,o.options=i=o.setOptions(i),o.linkedSeries=[],o.bindAxes(),c(o,{name:i.name,state:"",visible:!1!==i.visible,selected:!0===i.selected}),s=i.events,m(s,function(t,i){o.hcEvents&&o.hcEvents[i]&&-1!==o.hcEvents[i].indexOf(t)||e(o,i,t)}),(s&&s.click||i.point&&i.point.events&&i.point.events.click||i.allowPointSelect)&&(t.runTrackerClick=!0),o.getColor(),o.getSymbol(),o.parallelArrays.forEach(function(t){o[t+"Data"]||(o[t+"Data"]=[])}),o.points||o.setData(i.data,!1),o.isCartesian&&(t.hasCartesianSeries=!0),a.length&&(n=a[a.length-1]),o._i=v(n&&n._i,-1)+1,t.orderSeries(this.insert(a)),d(this,"afterInit")},insert:function(t){var e,i=this.options.index;if(u(i)){for(e=t.length;e--;)if(i>=v(t[e].options.index,t[e]._i)){t.splice(e+1,0,this);break}-1===e&&t.unshift(this),e+=1}else t.push(this);return v(e,t.length-1)},bindAxes:function(){var e,i=this,s=i.options,n=i.chart;d(this,"bindAxes",null,function(){(i.axisTypes||[]).forEach(function(o){n[o].forEach(function(t){e=t.options,(s[o]===e.index||void 0!==s[o]&&s[o]===e.id||void 0===s[o]&&0===e.index)&&(i.insert(t.series),i[o]=t,t.isDirty=!0)}),i[o]||i.optionalAxis===o||t.error(18,!0,n)})})},updateParallelArrays:function(t,e){var i=t.series,s=arguments,n=u(e)?function(s){var n="y"===s&&i.toYData?i.toYData(t):t[s];i[s+"Data"][e]=n}:function(t){Array.prototype[e].apply(i[t+"Data"],Array.prototype.slice.call(s,2))};i.parallelArrays.forEach(n)},hasData:function(){return this.visible&&void 0!==this.dataMax&&void 0!==this.dataMin||this.visible&&this.yData&&0<this.yData.length},autoIncrement:function(){var t,e=this.options,i=this.xIncrement,s=e.pointIntervalUnit,n=this.chart.time,i=v(i,e.pointStart,0);return this.pointInterval=t=v(this.pointInterval,e.pointInterval,1),s&&(e=new n.Date(i),"day"===s?n.set("Date",e,n.get("Date",e)+t):"month"===s?n.set("Month",e,n.get("Month",e)+t):"year"===s&&n.set("FullYear",e,n.get("FullYear",e)+t),t=e.getTime()-i),this.xIncrement=i+t,i},setOptions:function(t){var e=this.chart,i=e.options,s=i.plotOptions,n=(e.userOptions||{}).plotOptions||{},o=s[this.type],r=g(t);return t=e.styledMode,d(this,"setOptions",{userOptions:r}),this.userOptions=r,e=g(o,s.series,r),this.tooltipOptions=g(a.tooltip,a.plotOptions.series&&a.plotOptions.series.tooltip,a.plotOptions[this.type].tooltip,i.tooltip.userOptions,s.series&&s.series.tooltip,s[this.type].tooltip,r.tooltip),this.stickyTracking=v(r.stickyTracking,n[this.type]&&n[this.type].stickyTracking,n.series&&n.series.stickyTracking,!(!this.tooltipOptions.shared||this.noSharedTooltip)||e.stickyTracking),null===o.marker&&delete e.marker,this.zoneAxis=e.zoneAxis,i=this.zones=(e.zones||[]).slice(),!e.negativeColor&&!e.negativeFillColor||e.zones||(s={value:e[this.zoneAxis+"Threshold"]||e.threshold||0,className:"highcharts-negative"},t||(s.color=e.negativeColor,s.fillColor=e.negativeFillColor),i.push(s)),i.length&&l(i[i.length-1].value)&&i.push(t?{}:{color:this.color,fillColor:this.fillColor}),d(this,"afterSetOptions",{options:e}),e},getName:function(){return v(this.options.name,"Series "+(this.index+1))},getCyclic:function(t,e,i){var s,n=this.chart,o=this.userOptions,a=t+"Index",r=t+"Counter",h=i?i.length:v(n.options.chart[t+"Count"],n[t+"Count"]);e||(s=v(o[a],o["_"+a]),l(s)||(n.series.length||(n[r]=0),o["_"+a]=s=n[r]%h,n[r]+=1),i&&(e=i[s])),void 0!==s&&(this[a]=s),this[t]=e},getColor:function(){this.chart.styledMode?this.getCyclic("color"):this.options.colorByPoint?this.options.color=null:this.getCyclic("color",this.options.color||r[this.type].color,this.chart.options.colors)},getSymbol:function(){this.getCyclic("symbol",this.options.marker.symbol,this.chart.options.symbols)},findPointIndex:function(t,e){var i=t.id;t=t.x;var s,n,o=this.points;return i&&void 0!==(n=(i=this.chart.get(i))&&i.index)&&(s=!0),void 0===n&&u(t)&&(n=this.xData.indexOf(t,e)),-1!==n&&void 0!==n&&this.cropped&&(n=n>=this.cropStart?n-this.cropStart:n),!s&&o[n]&&o[n].touched&&(n=void 0),n},drawLegendSymbol:t.LegendSymbolMixin.drawLineMarker,updateData:function(e){var i,s,n,o=this.options,a=this.points,r=[],l=this.requireSorting,h=e.length===a.length,c=!0;if(this.xIncrement=null,e.forEach(function(e,s){var c,d=t.defined(e)&&this.pointClass.prototype.optionsToObject.call({series:this},e)||{};c=d.x,(d.id||u(c))&&(c=this.findPointIndex(d,n),-1===c||void 0===c?r.push(e):a[c]&&e!==o.data[c]?(a[c].update(e,!1,null,!1),a[c].touched=!0,l&&(n=c+1)):a[c]&&(a[c].touched=!0),(!h||s!==c||this.hasDerivedData)&&(i=!0))},this),i)for(e=a.length;e--;)(s=a[e])&&!s.touched&&s.remove(!1);else h?e.forEach(function(t,e){a[e].update&&t!==a[e].y&&a[e].update(t,!1,null,!1)}):c=!1;return a.forEach(function(t){t&&(t.touched=!1)}),!!c&&(r.forEach(function(t){this.addPoint(t,!1,null,null,!1)},this),!0)},setData:function(e,i,s,n){var o,a,r=this,l=r.points,h=l&&l.length||0,c=r.options,d=r.chart,g=null,m=r.xAxis,x=c.turboThreshold,y=this.xData,b=this.yData,w=(o=r.pointArrayMap)&&o.length,k=c.keys,M=0,S=1;if(e=e||[],o=e.length,i=v(i,!0),!1!==n&&o&&h&&!r.cropped&&!r.hasGroupedData&&r.visible&&!r.isSeriesBoosting&&(a=this.updateData(e)),!a){if(r.xIncrement=null,r.colorCounter=0,this.parallelArrays.forEach(function(t){r[t+"Data"].length=0}),x&&o>x){for(s=0;null===g&&s<o;)g=e[s],s++;if(u(g))for(s=0;s<o;s++)y[s]=this.autoIncrement(),b[s]=e[s];else if(p(g))if(w)for(s=0;s<o;s++)g=e[s],y[s]=g[0],b[s]=g.slice(1,w+1);else for(k&&(M=k.indexOf("x"),S=k.indexOf("y"),M=0<=M?M:0,S=0<=S?S:1),s=0;s<o;s++)g=e[s],y[s]=g[M],b[s]=g[S];else t.error(12,!1,d)}else for(s=0;s<o;s++)void 0!==e[s]&&(g={series:r},r.pointClass.prototype.applyOptions.apply(g,[e[s]]),r.updateParallelArrays(g,s));for(b&&f(b[0])&&t.error(14,!0,d),r.data=[],r.options.data=r.userOptions.data=e,s=h;s--;)l[s]&&l[s].destroy&&l[s].destroy();m&&(m.minRange=m.userMinRange),r.isDirty=d.isDirtyBox=!0,r.isDirtyData=!!l,s=!1}"point"===c.legendType&&(this.processData(),this.generatePoints()),i&&d.redraw(s)},processData:function(e){var i,s=this.xData,n=this.yData,o=s.length;i=0;var a,r,l,h=this.xAxis,c=this.options;l=c.cropThreshold;var d,p,u=this.getExtremesFromAll||c.getExtremesFromAll,f=this.isCartesian,c=h&&h.val2lin,g=h&&h.isLog,m=this.requireSorting;if(f&&!this.isDirty&&!h.isDirty&&!this.yAxis.isDirty&&!e)return!1;for(h&&(e=h.getExtremes(),d=e.min,p=e.max),f&&this.sorted&&!u&&(!l||o>l||this.forceCrop)&&(s[o-1]<d||s[0]>p?(s=[],n=[]):this.yData&&(s[0]<d||s[o-1]>p)&&(i=this.cropData(this.xData,this.yData,d,p),s=i.xData,n=i.yData,i=i.start,a=!0)),l=s.length||1;--l;)o=g?c(s[l])-c(s[l-1]):s[l]-s[l-1],0<o&&(void 0===r||o<r)?r=o:0>o&&m&&(t.error(15,!1,this.chart),m=!1);this.cropped=a,this.cropStart=i,this.processedXData=s,this.processedYData=n,this.closestPointRange=r},cropData:function(t,e,i,s,n){var o,a=t.length,r=0,l=a;for(n=v(n,this.cropShoulder),o=0;o<a;o++)if(t[o]>=i){r=Math.max(0,o-n);break}for(i=o;i<a;i++)if(t[i]>s){l=i+n;break}return{xData:t.slice(r,l),yData:e.slice(r,l),start:r,end:l}},generatePoints:function(){var t,e,i,s,n=this.options,o=n.data,a=this.data,r=this.processedXData,l=this.processedYData,h=this.pointClass,p=r.length,u=this.cropStart||0,f=this.hasGroupedData,n=n.keys,g=[];for(a||f||(a=[],a.length=o.length,a=this.data=a),n&&f&&(this.options.keys=!1),s=0;s<p;s++)e=u+s,f?(i=(new h).init(this,[r[s]].concat(y(l[s]))),i.dataGroup=this.groupMap[s],i.dataGroup.options&&(i.options=i.dataGroup.options,c(i,i.dataGroup.options),delete i.dataLabels)):(i=a[e])||void 0===o[e]||(a[e]=i=(new h).init(this,o[e],r[s])),i&&(i.index=e,g[s]=i);if(this.options.keys=n,a&&(p!==(t=a.length)||f))for(s=0;s<t;s++)s!==u||f||(s+=p),a[s]&&(a[s].destroyElements(),a[s].plotX=void 0);this.data=a,this.points=g,d(this,"afterGeneratePoints")},getXExtremes:function(t){return{min:n(t),max:s(t)}},getExtremes:function(t){var e,i=this.yAxis,o=this.processedXData,a=[],r=0;e=this.xAxis.getExtremes();var l,h,c,f,g=e.min,m=e.max,v=this.requireSorting?this.cropShoulder:0;for(t=t||this.stackedYData||this.processedYData||[],e=t.length,f=0;f<e;f++)if(h=o[f],c=t[f],l=(u(c,!0)||p(c))&&(!i.positiveValuesOnly||c.length||0<c),h=this.getExtremesFromAll||this.options.getExtremesFromAll||this.cropped||(o[f+v]||h)>=g&&(o[f-v]||h)<=m,l&&h)if(l=c.length)for(;l--;)"number"==typeof c[l]&&(a[r++]=c[l]);else a[r++]=c;this.dataMin=n(a),this.dataMax=s(a),d(this,"afterGetExtremes")},translate:function(){this.processedXData||this.processData(),this.generatePoints();var t,e,i,s,n,a=this.options,r=a.stacking,h=this.xAxis,c=h.categories,f=this.yAxis,g=this.points,m=g.length,x=!!this.modifyValue,y=this.pointPlacementToXValue(),b=u(y),w=a.threshold,k=a.startFromThreshold?w:0,M=this.zoneAxis||"y",S=Number.MAX_VALUE;for(t=0;t<m;t++){var T=g[t],C=T.x;i=T.y;var A,E,P=T.low,O=r&&f.stacks[(this.negStacks&&i<(k?0:w)?"-":"")+this.stackKey];f.positiveValuesOnly&&null!==i&&0>=i&&(T.isNull=!0),T.plotX=e=o(Math.min(Math.max(-1e5,h.translate(C,0,0,0,1,y,"flags"===this.type)),1e5)),r&&this.visible&&!T.isNull&&O&&O[C]&&(n=this.getStackIndicator(n,C,this.index),A=O[C],E=A.points[n.key]),p(E)&&(P=E[0],i=E[1],P===k&&n.key===O[C].base&&(P=v(u(w)&&w,f.min)),f.positiveValuesOnly&&0>=P&&(P=null),T.total=T.stackTotal=A.total,T.percentage=A.total&&T.y/A.total*100,T.stackY=i,A.setOffset(this.pointXOffset||0,this.barW||0)),T.yBottom=l(P)?Math.min(Math.max(-1e5,f.translate(P,0,1,0,1)),1e5):null,x&&(i=this.modifyValue(i,T)),T.plotY=i="number"==typeof i&&1/0!==i?Math.min(Math.max(-1e5,f.translate(i,0,1,0,1)),1e5):void 0,T.isInside=void 0!==i&&0<=i&&i<=f.len&&0<=e&&e<=h.len,T.clientX=b?o(h.translate(C,0,0,0,1,y)):e,T.negative=T[M]<(a[M+"Threshold"]||w||0),T.category=c&&void 0!==c[T.x]?c[T.x]:T.x,T.isNull||(void 0!==s&&(S=Math.min(S,Math.abs(e-s))),s=e),T.zone=this.zones.length&&T.getZone()}this.closestPointRangePx=S,d(this,"afterTranslate")},getValidPoints:function(t,e,i){var s=this.chart;return(t||this.points||[]).filter(function(t){return!(e&&!s.isInsidePlot(t.plotX,t.plotY,s.inverted))&&(i||!t.isNull)})},setClip:function(t){var e=this.chart,i=this.options,s=e.renderer,n=e.inverted,o=this.clipBox,a=o||e.clipBox,r=this.sharedClipKey||["_sharedClip",t&&t.duration,t&&t.easing,a.height,i.xAxis,i.yAxis].join(),l=e[r],h=e[r+"m"];l||(t&&(a.width=0,n&&(a.x=e.plotSizeX),e[r+"m"]=h=s.clipRect(n?e.plotSizeX+99:-99,n?-e.plotLeft:-e.plotTop,99,n?e.chartWidth:e.chartHeight)),e[r]=l=s.clipRect(a),l.count={length:0}),t&&!l.count[this.index]&&(l.count[this.index]=!0,l.count.length+=1),!1!==i.clip&&(this.group.clip(t||o?l:e.clipRect),this.markerGroup.clip(h),this.sharedClipKey=r),t||(l.count[this.index]&&(delete l.count[this.index],--l.count.length),0===l.count.length&&r&&e[r]&&(o||(e[r]=e[r].destroy()),e[r+"m"]&&(e[r+"m"]=e[r+"m"].destroy())))},animate:function(t){var e,s=this.chart,n=i(this.options.animation);t?this.setClip(n):(e=this.sharedClipKey,(t=s[e])&&t.animate({width:s.plotSizeX,x:0},n),s[e+"m"]&&s[e+"m"].animate({width:s.plotSizeX+99,x:s.inverted?0:-99},n),this.animate=null)},afterAnimate:function(){this.setClip(),d(this,"afterAnimate"),this.finishedAnimating=!0},drawPoints:function(){var t,e,i,s,n,o,a,r,l=this.points,h=this.chart,c=this.options.marker,d=this[this.specialGroup]||this.markerGroup;t=this.xAxis;var p,u=v(c.enabled,!(t&&!t.isRadial)||null,this.closestPointRangePx>=c.enabledThreshold*c.radius);if(!1!==c.enabled||this._hasPointMarkers)for(t=0;t<l.length;t++)e=l[t],n=(s=e.graphic)?"animate":"attr",o=e.marker||{},a=!!e.marker,i=u&&void 0===o.enabled||o.enabled,r=!1!==e.isInside,i&&!e.isNull?(i=v(o.symbol,this.symbol),p=this.markerAttribs(e,e.selected&&"select"),s?s[r?"show":"hide"](!0).animate(p):r&&(0<p.width||e.hasImage)&&(e.graphic=s=h.renderer.symbol(i,p.x,p.y,p.width,p.height,a?o:c).add(d)),s&&!h.styledMode&&s[n](this.pointAttribs(e,e.selected&&"select")),s&&s.addClass(e.getClassName(),!0)):s&&(e.graphic=s.destroy())},markerAttribs:function(t,e){var i=this.options.marker,s=t.marker||{},n=s.symbol||i.symbol,o=v(s.radius,i.radius);return e&&(i=i.states[e],e=s.states&&s.states[e],o=v(e&&e.radius,i&&i.radius,o+(i&&i.radiusPlus||0))),t.hasImage=n&&0===n.indexOf("url"),t.hasImage&&(o=0),t={x:Math.floor(t.plotX)-o,y:t.plotY-o},o&&(t.width=t.height=2*o),t},pointAttribs:function(t,e){var i=this.options.marker,s=t&&t.options,n=s&&s.marker||{},o=this.color,a=s&&s.color,r=t&&t.color,s=v(n.lineWidth,i.lineWidth),l=t&&t.zone&&t.zone.color;return t=1,o=a||l||r||o,a=n.fillColor||i.fillColor||o,o=n.lineColor||i.lineColor||o,e&&(i=i.states[e],e=n.states&&n.states[e]||{},s=v(e.lineWidth,i.lineWidth,s+v(e.lineWidthPlus,i.lineWidthPlus,0)),a=e.fillColor||i.fillColor||a,o=e.lineColor||i.lineColor||o,t=v(e.opacity,i.opacity,t)),{stroke:o,"stroke-width":s,fill:a,opacity:t}},destroy:function(e){var i,s,n,o,a=this,r=a.chart,l=/AppleWebKit\/533/.test(k.navigator.userAgent),c=a.data||[];for(d(a,"destroy"),e||x(a),(a.axisTypes||[]).forEach(function(t){(o=a[t])&&o.series&&(h(o.series,a),o.isDirty=o.forceRedraw=!0)}),a.legendItem&&a.chart.legend.destroyItem(a),s=c.length;s--;)(n=c[s])&&n.destroy&&n.destroy();a.points=null,t.clearTimeout(a.animationTimeout),m(a,function(t,e){t instanceof b&&!t.survive&&(i=l&&"group"===e?"hide":"destroy",t[i]())}),r.hoverSeries===a&&(r.hoverSeries=null),h(r.series,a),r.orderSeries(),m(a,function(t,i){e&&"hcEvents"===i||delete a[i]})},getGraphPath:function(t,e,i){var s,n,o=this,a=o.options,r=a.step,h=[],c=[];return t=t||o.points,(s=t.reversed)&&t.reverse(),(r={right:1,center:2}[r]||r&&3)&&s&&(r=4-r),!a.connectNulls||e||i||(t=this.getValidPoints(t)),t.forEach(function(s,d){var p=s.plotX,u=s.plotY,f=t[d-1];(s.leftCliff||f&&f.rightCliff)&&!i&&(n=!0),s.isNull&&!l(e)&&0<d?n=!a.connectNulls:s.isNull&&!e?n=!0:(0===d||n?d=["M",s.plotX,s.plotY]:o.getPointSpline?d=o.getPointSpline(t,s,d):r?(d=1===r?["L",f.plotX,u]:2===r?["L",(f.plotX+p)/2,f.plotY,"L",(f.plotX+p)/2,u]:["L",p,f.plotY],d.push("L",p,u)):d=["L",p,u],c.push(s.x),r&&(c.push(s.x),2===r&&c.push(s.x)),h.push.apply(h,d),n=!1)}),h.xMap=c,o.graphPath=h},drawGraph:function(){var t=this,e=this.options,i=(this.gappedPath||this.getGraphPath).call(this),s=this.chart.styledMode,n=[["graph","highcharts-graph"]];s||n[0].push(e.lineColor||this.color||"#cccccc",e.dashStyle),n=t.getZonesGraphs(n),n.forEach(function(n,o){var a=n[0],r=t[a],l=r?"animate":"attr";r?(r.endX=t.preventGraphAnimation?null:i.xMap,r.animate({d:i})):i.length&&(t[a]=r=t.chart.renderer.path(i).addClass(n[1]).attr({zIndex:1}).add(t.group)),r&&!s&&(a={stroke:n[2],"stroke-width":e.lineWidth,fill:t.fillGraph&&t.color||"none"},n[3]?a.dashstyle=n[3]:"square"!==e.linecap&&(a["stroke-linecap"]=a["stroke-linejoin"]="round"),r[l](a).shadow(2>o&&e.shadow)),r&&(r.startX=i.xMap,r.isArea=i.isArea)})},getZonesGraphs:function(t){return this.zones.forEach(function(e,i){i=["zone-graph-"+i,"highcharts-graph highcharts-zone-graph-"+i+" "+(e.className||"")],this.chart.styledMode||i.push(e.color||this.color,e.dashStyle||this.options.dashStyle),t.push(i)},this),t},applyZones:function(){var t,e,i,s,n,o,a,r,l,h=this,c=this.chart,d=c.renderer,p=this.zones,u=this.clips||[],f=this.graph,g=this.area,m=Math.max(c.chartWidth,c.chartHeight),x=this[(this.zoneAxis||"y")+"Axis"],y=c.inverted,b=!1;p.length&&(f||g)&&x&&void 0!==x.min&&(n=x.reversed,o=x.horiz,f&&!this.showLine&&f.hide(),g&&g.hide(),s=x.getExtremes(),p.forEach(function(p,w){t=n?o?c.plotWidth:0:o?0:x.toPixels(s.min)||0,t=Math.min(Math.max(v(e,t),0),m),e=Math.min(Math.max(Math.round(x.toPixels(v(p.value,s.max),!0)||0),0),m),b&&(t=e=x.toPixels(s.max)),a=Math.abs(t-e),r=Math.min(t,e),l=Math.max(t,e),x.isXAxis?(i={x:y?l:r,y:0,width:a,height:m},o||(i.x=c.plotHeight-i.x)):(i={x:0,y:y?l:r,width:m,height:a},o&&(i.y=c.plotWidth-i.y)),y&&d.isVML&&(i=x.isXAxis?{x:0,y:n?r:l,height:i.width,width:c.chartWidth}:{x:i.y-c.plotLeft-c.spacingBox.x,y:0,width:i.height,height:c.chartHeight}),u[w]?u[w].animate(i):(u[w]=d.clipRect(i),f&&h["zone-graph-"+w].clip(u[w]),g&&h["zone-area-"+w].clip(u[w])),b=p.value>s.max,h.resetZones&&0===e&&(e=void 0)}),this.clips=u)},invertGroups:function(t){function i(){["group","markerGroup"].forEach(function(e){n[e]&&(o.renderer.isVML&&n[e].attr({width:n.yAxis.len,height:n.xAxis.len}),n[e].width=n.yAxis.len,n[e].height=n.xAxis.len,n[e].invert(t))})}var s,n=this,o=n.chart;n.xAxis&&(s=e(o,"resize",i),e(n,"destroy",s),i(),n.invertGroups=i)},plotGroup:function(t,e,i,s,n){var o=this[t],a=!o;return a&&(this[t]=o=this.chart.renderer.g().attr({zIndex:s||.1}).add(n)),o.addClass("highcharts-"+e+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series "+(l(this.colorIndex)?"highcharts-color-"+this.colorIndex+" ":"")+(this.options.className||"")+(o.hasClass("highcharts-tracker")?" highcharts-tracker":""),!0),o.attr({visibility:i})[a?"attr":"animate"](this.getPlotBox()),o},getPlotBox:function(){var t=this.chart,e=this.xAxis,i=this.yAxis;return t.inverted&&(e=i,i=this.xAxis),{translateX:e?e.left:t.plotLeft,translateY:i?i.top:t.plotTop,scaleX:1,scaleY:1}},render:function(){var t,e=this,s=e.chart,n=e.options,o=!!e.animate&&s.renderer.isSVG&&i(n.animation).duration,a=e.visible?"inherit":"hidden",r=n.zIndex,l=e.hasRendered,h=s.seriesGroup,c=s.inverted;d(this,"render"),t=e.plotGroup("group","series",a,r,h),e.markerGroup=e.plotGroup("markerGroup","markers",a,r,h),o&&e.animate(!0),t.inverted=!(!e.isCartesian&&!e.invertable)&&c,e.drawGraph&&(e.drawGraph(),e.applyZones()),e.visible&&e.drawPoints(),e.drawDataLabels&&e.drawDataLabels(),e.redrawPoints&&e.redrawPoints(),e.drawTracker&&!1!==e.options.enableMouseTracking&&e.drawTracker(),e.invertGroups(c),!1===n.clip||e.sharedClipKey||l||t.clip(s.clipRect),o&&e.animate(),l||(e.animationTimeout=w(function(){e.afterAnimate()},o)),e.isDirty=!1,e.hasRendered=!0,d(e,"afterRender")},redraw:function(){var t=this.chart,e=this.isDirty||this.isDirtyData,i=this.group,s=this.xAxis,n=this.yAxis;i&&(t.inverted&&i.attr({width:t.plotWidth,height:t.plotHeight}),i.animate({translateX:v(s&&s.left,t.plotLeft),translateY:v(n&&n.top,t.plotTop)})),this.translate(),this.render(),e&&delete this.kdTree},kdAxisArray:["clientX","plotY"],searchPoint:function(t,e){var i=this.xAxis,s=this.yAxis,n=this.chart.inverted;return this.searchKDTree({clientX:n?i.len-t.chartY+i.pos:t.chartX-i.pos,plotY:n?s.len-t.chartX+s.pos:t.chartY-s.pos},e,t)},buildKDTree:function(t){function e(t,s,n){var o,a;if(a=t&&t.length)return o=i.kdAxisArray[s%n],t.sort(function(t,e){return t[o]-e[o]}),a=Math.floor(a/2),{point:t[a],left:e(t.slice(0,a),s+1,n),right:e(t.slice(a+1),s+1,n)}}this.buildingKdTree=!0;var i=this,s=-1<i.options.findNearestPointBy.indexOf("y")?2:1;delete i.kdTree,w(function(){i.kdTree=e(i.getValidPoints(null,!i.directTouch),s,s),i.buildingKdTree=!1},i.options.kdNow||t&&"touchstart"===t.type?0:1)},searchKDTree:function(t,e,i){function s(t,e,i,h){var c,d,p=e.point,u=n.kdAxisArray[i%h],f=p;return d=l(t[o])&&l(p[o])?Math.pow(t[o]-p[o],2):null,c=l(t[a])&&l(p[a])?Math.pow(t[a]-p[a],2):null,c=(d||0)+(c||0),p.dist=l(c)?Math.sqrt(c):Number.MAX_VALUE,p.distX=l(d)?Math.sqrt(d):Number.MAX_VALUE,u=t[u]-p[u],c=0>u?"left":"right",d=0>u?"right":"left",e[c]&&(c=s(t,e[c],i+1,h),f=c[r]<f[r]?c:p),e[d]&&Math.sqrt(u*u)<f[r]&&(t=s(t,e[d],i+1,h),f=t[r]<f[r]?t:f),f}var n=this,o=this.kdAxisArray[0],a=this.kdAxisArray[1],r=e?"distX":"dist";if(e=-1<n.options.findNearestPointBy.indexOf("y")?2:1,this.kdTree||this.buildingKdTree||this.buildKDTree(i),this.kdTree)return s(t,this.kdTree,e,e)},pointPlacementToXValue:function(){var t=this.options.pointPlacement;return"between"===t&&(t=.5),u(t)&&(t*=v(this.options.pointRange||this.xAxis.pointRange)),t}})}),e(i,"parts/Stacking.js",[i["parts/Globals.js"]],function(t){var e=t.Axis,i=t.Chart,s=t.correctFloat,n=t.defined,o=t.destroyObjectProperties,a=t.format,r=t.objectEach,l=t.pick,h=t.Series;t.StackItem=function(t,e,i,s,n){var o=t.chart.inverted;this.axis=t,this.isNegative=i,this.options=e,this.x=s,this.total=null,this.points={},this.stack=n,this.rightCliff=this.leftCliff=0,this.alignOptions={align:e.align||(o?i?"left":"right":"center"),verticalAlign:e.verticalAlign||(o?"middle":i?"bottom":"top"),y:l(e.y,o?4:i?14:-6),x:l(e.x,o?i?-6:6:0)},this.textAlign=e.textAlign||(o?i?"right":"left":"center")},t.StackItem.prototype={destroy:function(){o(this,this.axis)},render:function(t){var e=this.axis.chart,i=this.options,s=i.format,s=s?a(s,this,e.time):i.formatter.call(this);this.label?this.label.attr({text:s,visibility:"hidden"}):this.label=e.renderer.text(s,null,null,i.useHTML).css(i.style).attr({align:this.textAlign,rotation:i.rotation,visibility:"hidden"}).add(t),this.label.labelrank=e.plotHeight},setOffset:function(t,e){var i=this.axis,s=i.chart,o=i.translate(i.usePercentage?100:this.total,0,0,0,1),a=i.translate(0),a=n(o)&&Math.abs(o-a);t=s.xAxis[0].translate(this.x)+t,i=n(o)&&this.getStackBox(s,this,t,o,e,a,i),(e=this.label)&&i&&(e.align(this.alignOptions,null,i),i=e.alignAttr,e[!1===this.options.crop||s.isInsidePlot(i.x,i.y)?"show":"hide"](!0))},getStackBox:function(t,e,i,s,n,o,a){var r=e.axis.reversed,l=t.inverted;return t=a.height+a.pos-(l?t.plotLeft:t.plotTop),e=e.isNegative&&!r||!e.isNegative&&r,{x:l?e?s:s-o:i,y:l?t-i-n:e?t-s-o:t-s,width:l?o:n,height:l?n:o}}},i.prototype.getStacks=function(){var t=this;t.yAxis.forEach(function(t){t.stacks&&t.hasVisibleSeries&&(t.oldStacks=t.stacks)}),t.series.forEach(function(e){!e.options.stacking||!0!==e.visible&&!1!==t.options.chart.ignoreHiddenSeries||(e.stackKey=e.type+l(e.options.stack,""))})},e.prototype.buildStacks=function(){var t,e=this.series,i=l(this.options.reversedStacks,!0),s=e.length;if(!this.isXAxis){for(this.usePercentage=!1,t=s;t--;)e[i?t:s-t-1].setStackedPoints();for(t=0;t<s;t++)e[t].modifyStacks()}},e.prototype.renderStackTotals=function(){var t=this.chart,e=t.renderer,i=this.stacks,s=this.stackTotalGroup;s||(this.stackTotalGroup=s=e.g("stack-labels").attr({visibility:"visible",zIndex:6}).add()),s.translate(t.plotLeft,t.plotTop),r(i,function(t){r(t,function(t){t.render(s)})})},e.prototype.resetStacks=function(){var t=this,e=t.stacks;t.isXAxis||r(e,function(e){r(e,function(i,s){i.touched<t.stacksTouched?(i.destroy(),delete e[s]):(i.total=null,i.cumulative=null)})})},e.prototype.cleanStacks=function(){var t;this.isXAxis||(this.oldStacks&&(t=this.stacks=this.oldStacks),r(t,function(t){r(t,function(t){t.cumulative=t.total})}))},h.prototype.setStackedPoints=function(){if(this.options.stacking&&(!0===this.visible||!1===this.chart.options.chart.ignoreHiddenSeries)){var e,i,o,a,r,h,c,d=this.processedXData,p=this.processedYData,u=[],f=p.length,g=this.options,m=g.threshold,v=l(g.startFromThreshold&&m,0),x=g.stack,g=g.stacking,y=this.stackKey,b="-"+y,w=this.negStacks,k=this.yAxis,M=k.stacks,S=k.oldStacks;for(k.stacksTouched+=1,r=0;r<f;r++)h=d[r],c=p[r],e=this.getStackIndicator(e,h,this.index),a=e.key,o=(i=w&&c<(v?0:m))?b:y,M[o]||(M[o]={}),M[o][h]||(S[o]&&S[o][h]?(M[o][h]=S[o][h],M[o][h].total=null):M[o][h]=new t.StackItem(k,k.options.stackLabels,i,h,x)),o=M[o][h],null!==c?(o.points[a]=o.points[this.index]=[l(o.cumulative,v)],n(o.cumulative)||(o.base=a),o.touched=k.stacksTouched,0<e.index&&!1===this.singleStacks&&(o.points[a][0]=o.points[this.index+","+h+",0"][0])):o.points[a]=o.points[this.index]=null,"percent"===g?(i=i?y:b,w&&M[i]&&M[i][h]?(i=M[i][h],o.total=i.total=Math.max(i.total,o.total)+Math.abs(c)||0):o.total=s(o.total+(Math.abs(c)||0))):o.total=s(o.total+(c||0)),o.cumulative=l(o.cumulative,v)+(c||0),null!==c&&(o.points[a].push(o.cumulative),u[r]=o.cumulative);"percent"===g&&(k.usePercentage=!0),this.stackedYData=u,k.oldStacks={}}},h.prototype.modifyStacks=function(){var t,e=this,i=e.stackKey,s=e.yAxis.stacks,n=e.processedXData,o=e.options.stacking;e[o+"Stacker"]&&[i,"-"+i].forEach(function(i){for(var a,r,l=n.length;l--;)a=n[l],t=e.getStackIndicator(t,a,e.index,i),(r=(a=s[i]&&s[i][a])&&a.points[t.key])&&e[o+"Stacker"](r,a,l)})},h.prototype.percentStacker=function(t,e,i){e=e.total?100/e.total:0,t[0]=s(t[0]*e),t[1]=s(t[1]*e),this.stackedYData[i]=t[1]},h.prototype.getStackIndicator=function(t,e,i,s){return!n(t)||t.x!==e||s&&t.key!==s?t={x:e,index:0,key:s}:t.index++,t.key=[i,e,t.index].join(),t}}),e(i,"parts/Dynamics.js",[i["parts/Globals.js"]],function(t){var e=t.addEvent,i=t.animate,s=t.Axis,n=t.Chart,o=t.createElement,a=t.css,r=t.defined,l=t.erase,h=t.extend,c=t.fireEvent,d=t.isNumber,p=t.isObject,u=t.isArray,f=t.merge,g=t.objectEach,m=t.pick,v=t.Point,x=t.Series,y=t.seriesTypes,b=t.setAnimation,w=t.splat;t.cleanRecursively=function(e,i){var s={};return g(e,function(n,o){p(e[o],!0)&&i[o]?(n=t.cleanRecursively(e[o],i[o]),Object.keys(n).length&&(s[o]=n)):(p(e[o])||e[o]!==i[o])&&(s[o]=e[o])}),s},h(n.prototype,{addSeries:function(t,e,i){var s,n=this;return t&&(e=m(e,!0),c(n,"addSeries",{options:t},function(){s=n.initSeries(t),n.isDirtyLegend=!0,n.linkSeries(),c(n,"afterAddSeries",{series:s}),e&&n.redraw(i)})),s},addAxis:function(t,e,i,n){var o=e?"xAxis":"yAxis",a=this.options;return t=f(t,{index:this[o].length,isX:e}),e=new s(this,t),a[o]=w(a[o]||{}),a[o].push(t),m(i,!0)&&this.redraw(n),e},showLoading:function(t){var s=this,n=s.options,r=s.loadingDiv,l=n.loading,c=function(){r&&a(r,{left:s.plotLeft+"px",top:s.plotTop+"px",width:s.plotWidth+"px",height:s.plotHeight+"px"})};r||(s.loadingDiv=r=o("div",{className:"highcharts-loading highcharts-loading-hidden"},null,s.container),s.loadingSpan=o("span",{className:"highcharts-loading-inner"},null,r),e(s,"redraw",c)),r.className="highcharts-loading",s.loadingSpan.innerHTML=t||n.lang.loading,s.styledMode||(a(r,h(l.style,{zIndex:10})),a(s.loadingSpan,l.labelStyle),s.loadingShown||(a(r,{opacity:0,display:""}),i(r,{opacity:l.style.opacity||.5},{duration:l.showDuration||0}))),s.loadingShown=!0,c()},hideLoading:function(){var t=this.options,e=this.loadingDiv;e&&(e.className="highcharts-loading highcharts-loading-hidden",this.styledMode||i(e,{opacity:0},{duration:t.loading.hideDuration||100,complete:function(){a(e,{display:"none"})}})),this.loadingShown=!1},propsRequireDirtyBox:"backgroundColor borderColor borderWidth borderRadius plotBackgroundColor plotBackgroundImage plotBorderColor plotBorderWidth plotShadow shadow".split(" "),propsRequireReflow:"margin marginTop marginRight marginBottom marginLeft spacing spacingTop spacingRight spacingBottom spacingLeft".split(" "),propsRequireUpdateSeries:"chart.inverted chart.polar chart.ignoreHiddenSeries chart.type colors plotOptions time tooltip".split(" "),collectionsWithUpdate:"xAxis yAxis zAxis series colorAxis pane".split(" "),update:function(e,i,s,n){var o,a,l,h,p=this,u={credits:"addCredits",title:"setTitle",subtitle:"setSubtitle"},v=[];c(p,"update",{options:e}),e.isResponsiveOptions||p.setResponsive(!1,!0),e=t.cleanRecursively(e,p.options),(o=e.chart)&&(f(!0,p.options.chart,o),"className"in o&&p.setClassName(o.className),"reflow"in o&&p.setReflow(o.reflow),("inverted"in o||"polar"in o||"type"in o)&&(p.propFromSeries(),a=!0),"alignTicks"in o&&(a=!0),g(o,function(t,e){-1!==p.propsRequireUpdateSeries.indexOf("chart."+e)&&(l=!0),-1!==p.propsRequireDirtyBox.indexOf(e)&&(p.isDirtyBox=!0),-1!==p.propsRequireReflow.indexOf(e)&&(h=!0)}),!p.styledMode&&"style"in o&&p.renderer.setStyle(o.style)),!p.styledMode&&e.colors&&(this.options.colors=e.colors),e.plotOptions&&f(!0,this.options.plotOptions,e.plotOptions),g(e,function(t,e){p[e]&&"function"==typeof p[e].update?p[e].update(t,!1):"function"==typeof p[u[e]]&&p[u[e]](t),"chart"!==e&&-1!==p.propsRequireUpdateSeries.indexOf(e)&&(l=!0)}),this.collectionsWithUpdate.forEach(function(t){var i;e[t]&&("series"===t&&(i=[],p[t].forEach(function(t,e){t.options.isInternal||i.push(m(t.options.index,e))})),w(e[t]).forEach(function(e,n){(n=r(e.id)&&p.get(e.id)||p[t][i?i[n]:n])&&n.coll===t&&(n.update(e,!1),s&&(n.touched=!0)),!n&&s&&("series"===t?p.addSeries(e,!1).touched=!0:"xAxis"!==t&&"yAxis"!==t||(p.addAxis(e,"xAxis"===t,!1).touched=!0))}),s&&p[t].forEach(function(t){t.touched||t.options.isInternal?delete t.touched:v.push(t)}))}),v.forEach(function(t){t.remove&&t.remove(!1)}),a&&p.axes.forEach(function(t){t.update({},!1)}),l&&p.series.forEach(function(t){t.update({},!1)}),e.loading&&f(!0,p.options.loading,e.loading),a=o&&o.width,o=o&&o.height,t.isString(o)&&(o=t.relativeLength(o,a||p.chartWidth)),h||d(a)&&a!==p.chartWidth||d(o)&&o!==p.chartHeight?p.setSize(a,o,n):m(i,!0)&&p.redraw(n),c(p,"afterUpdate",{options:e,redraw:i,animation:n})},setSubtitle:function(t){this.setTitle(void 0,t)}}),h(v.prototype,{update:function(t,e,i,s){function n(){a.applyOptions(t),null===a.y&&l&&(a.graphic=l.destroy()),p(t,!0)&&(l&&l.element&&t&&t.marker&&void 0!==t.marker.symbol&&(a.graphic=l.destroy()),t&&t.dataLabels&&a.dataLabel&&(a.dataLabel=a.dataLabel.destroy()),a.connector&&(a.connector=a.connector.destroy())),o=a.index,r.updateParallelArrays(a,o),c.data[o]=p(c.data[o],!0)||p(t,!0)?a.options:m(t,c.data[o]),r.isDirty=r.isDirtyData=!0,!r.fixedBox&&r.hasCartesianSeries&&(h.isDirtyBox=!0),"point"===c.legendType&&(h.isDirtyLegend=!0),e&&h.redraw(i)}var o,a=this,r=a.series,l=a.graphic,h=r.chart,c=r.options;e=m(e,!0),!1===s?n():a.firePointEvent("update",{options:t},n)},remove:function(t,e){this.series.removePoint(this.series.data.indexOf(this),t,e)}}),h(x.prototype,{addPoint:function(t,e,i,s,n){var o,a,r,l,h=this.options,d=this.data,p=this.chart,u=this.xAxis,u=u&&u.hasNames&&u.names,f=h.data,g=this.xData;if(e=m(e,!0),o={series:this},this.pointClass.prototype.applyOptions.apply(o,[t]),l=o.x,r=g.length,this.requireSorting&&l<g[r-1])for(a=!0;r&&g[r-1]>l;)r--;this.updateParallelArrays(o,"splice",r,0,0),this.updateParallelArrays(o,r),u&&o.name&&(u[l]=o.name),f.splice(r,0,t),a&&(this.data.splice(r,0,null),this.processData()),"point"===h.legendType&&this.generatePoints(),i&&(d[0]&&d[0].remove?d[0].remove(!1):(d.shift(),this.updateParallelArrays(o,"shift"),f.shift())),!1!==n&&c(this,"addPoint",{point:o}),this.isDirtyData=this.isDirty=!0,e&&p.redraw(s)},removePoint:function(t,e,i){var s=this,n=s.data,o=n[t],a=s.points,r=s.chart,l=function(){a&&a.length===n.length&&a.splice(t,1),n.splice(t,1),s.options.data.splice(t,1),s.updateParallelArrays(o||{series:s},"splice",t,1),o&&o.destroy(),s.isDirty=!0,s.isDirtyData=!0,e&&r.redraw()};b(i,r),e=m(e,!0),o?o.firePointEvent("remove",null,l):l()},remove:function(t,e,i,s){function n(){o.destroy(s),o.remove=null,a.isDirtyLegend=a.isDirtyBox=!0,a.linkSeries(),m(t,!0)&&a.redraw(e)}var o=this,a=o.chart;!1!==i?c(o,"remove",null,n):n()},update:function(e,i){e=t.cleanRecursively(e,this.userOptions),c(this,"update",{options:e});var s,n,o=this,a=o.chart,r=o.userOptions,l=o.initialType||o.type,d=e.type||r.type||a.options.chart.type,p=!(this.hasDerivedData||e.dataGrouping||d&&d!==this.type||void 0!==e.pointStart||e.pointInterval||e.pointIntervalUnit||e.keys),u=y[l].prototype,g=["group","markerGroup","dataLabelsGroup"],v=["navigatorSeries","baseSeries"],x=o.finishedAnimating&&{animation:!1},b={};p&&(v.push("data","isDirtyData","points","processedXData","processedYData","xIncrement"),!1!==e.visible&&v.push("area","graph"),o.parallelArrays.forEach(function(t){v.push(t+"Data")}),e.data&&this.setData(e.data,!1)),e=f(r,x,{index:void 0===r.index?o.index:r.index,pointStart:m(r.pointStart,o.xData[0])},!p&&{data:o.options.data},e),v=g.concat(v),v.forEach(function(t){v[t]=o[t],delete o[t]}),o.remove(!1,null,!1,!0);for(n in u)o[n]=void 0;y[d||l]?h(o,y[d||l].prototype):t.error(17,!0,a),v.forEach(function(t){o[t]=v[t]}),o.init(a,e),p&&this.points&&(s=o.options,!1===s.visible?(b.graphic=1,b.dataLabel=1):(s.marker&&!1===s.marker.enabled&&(b.graphic=1),s.dataLabels&&!1===s.dataLabels.enabled&&(b.dataLabel=1)),this.points.forEach(function(t){t&&t.series&&(t.resolveColor(),Object.keys(b).length&&t.destroyElements(b),!1===s.showInLegend&&t.legendItem&&a.legend.destroyItem(t))},this)),e.zIndex!==r.zIndex&&g.forEach(function(t){o[t]&&o[t].attr({zIndex:e.zIndex})}),o.initialType=l,a.linkSeries(),c(this,"afterUpdate"),m(i,!0)&&a.redraw(!!p&&void 0)},setName:function(t){this.name=this.options.name=this.userOptions.name=t,this.chart.isDirtyLegend=!0}}),h(s.prototype,{update:function(t,e){var i=this.chart,s=t&&t.events||{};t=f(this.userOptions,t),i.options[this.coll].indexOf&&(i.options[this.coll][i.options[this.coll].indexOf(this.userOptions)]=t),g(i.options[this.coll].events,function(t,e){void 0===s[e]&&(s[e]=void 0)}),this.destroy(!0),this.init(i,h(t,{events:s})),i.isDirtyBox=!0,m(e,!0)&&i.redraw()},remove:function(t){for(var e=this.chart,i=this.coll,s=this.series,n=s.length;n--;)s[n]&&s[n].remove(!1);l(e.axes,this),l(e[i],this),u(e.options[i])?e.options[i].splice(this.options.index,1):delete e.options[i],e[i].forEach(function(t,e){t.options.index=t.userOptions.index=e}),this.destroy(),e.isDirtyBox=!0,m(t,!0)&&e.redraw()},setTitle:function(t,e){this.update({title:t},e)},setCategories:function(t,e){this.update({categories:t},e)}})}),e(i,"parts/AreaSeries.js",[i["parts/Globals.js"]],function(t){var e=t.color,i=t.pick,s=t.Series;(0,t.seriesType)("area","line",{softThreshold:!1,threshold:0},{singleStacks:!1,getStackPoints:function(e){var s,n,o=[],a=[],r=this.xAxis,l=this.yAxis,h=l.stacks[this.stackKey],c={},d=this.index,p=l.series,u=p.length,f=i(l.options.reversedStacks,!0)?1:-1;if(e=e||this.points,this.options.stacking){for(n=0;n<e.length;n++)e[n].leftNull=e[n].rightNull=null,c[e[n].x]=e[n];t.objectEach(h,function(t,e){null!==t.total&&a.push(e)}),a.sort(function(t,e){return t-e}),s=p.map(function(t){return t.visible}),a.forEach(function(t,e){var i,p,g=0;if(c[t]&&!c[t].isNull)o.push(c[t]),[-1,1].forEach(function(o){var r=1===o?"rightNull":"leftNull",l=0,g=h[a[e+o]];if(g)for(n=d;0<=n&&n<u;)i=g.points[n],i||(n===d?c[t][r]=!0:s[n]&&(p=h[t].points[n])&&(l-=p[1]-p[0])),n+=f;c[t][1===o?"rightCliff":"leftCliff"]=l});else{for(n=d;0<=n&&n<u;){if(i=h[t].points[n]){g=i[1];break}n+=f}g=l.translate(g,0,1,0,1),o.push({isNull:!0,plotX:r.translate(t,0,0,0,1),x:t,plotY:g,yBottom:g})}})}return o},getGraphPath:function(t){var e,n,o,a,r=s.prototype.getGraphPath,l=this.options,h=l.stacking,c=this.yAxis,d=[],p=[],u=this.index,f=c.stacks[this.stackKey],g=l.threshold,m=c.getThreshold(l.threshold),l=l.connectNulls||"percent"===h,v=function(e,i,s){var n=t[e];e=h&&f[n.x].points[u];var a=n[s+"Null"]||0;s=n[s+"Cliff"]||0;var r,l,n=!0;s||a?(r=(a?e[0]:e[1])+s,l=e[0]+s,n=!!a):!h&&t[i]&&t[i].isNull&&(r=l=g),void 0!==r&&(p.push({plotX:o,plotY:null===r?m:c.getThreshold(r),isNull:n,isCliff:!0}),d.push({plotX:o,plotY:null===l?m:c.getThreshold(l),doCurve:!1}))};for(t=t||this.points,h&&(t=this.getStackPoints(t)),e=0;e<t.length;e++)n=t[e].isNull,o=i(t[e].rectPlotX,t[e].plotX),a=i(t[e].yBottom,m),(!n||l)&&(l||v(e,e-1,"left"),n&&!h&&l||(p.push(t[e]),d.push({x:e,plotX:o,plotY:a})),l||v(e,e+1,"right"));return e=r.call(this,p,!0,!0),d.reversed=!0,n=r.call(this,d,!0,!0),n.length&&(n[0]="L"),n=e.concat(n),r=r.call(this,p,!1,l),n.xMap=e.xMap,this.areaPath=n,r},drawGraph:function(){this.areaPath=[],s.prototype.drawGraph.apply(this);var t=this,n=this.areaPath,o=this.options,a=[["area","highcharts-area",this.color,o.fillColor]];this.zones.forEach(function(e,i){a.push(["zone-area-"+i,"highcharts-area highcharts-zone-area-"+i+" "+e.className,e.color||t.color,e.fillColor||o.fillColor])}),a.forEach(function(s){var a=s[0],r=t[a],l=r?"animate":"attr",h={};r?(r.endX=t.preventGraphAnimation?null:n.xMap,r.animate({d:n})):(h.zIndex=0,r=t[a]=t.chart.renderer.path(n).addClass(s[1]).add(t.group),r.isArea=!0),t.chart.styledMode||(h.fill=i(s[3],e(s[2]).setOpacity(i(o.fillOpacity,.75)).get())),r[l](h),r.startX=n.xMap,r.shiftUnit=o.step?2:1})},drawLegendSymbol:t.LegendSymbolMixin.drawRectangle})}),e(i,"parts/SplineSeries.js",[i["parts/Globals.js"]],function(t){var e=t.pick;(t=t.seriesType)("spline","line",{},{getPointSpline:function(t,i,s){var n=i.plotX,o=i.plotY,a=t[s-1];s=t[s+1];var r,l,h,c;if(a&&!a.isNull&&!1!==a.doCurve&&!i.isCliff&&s&&!s.isNull&&!1!==s.doCurve&&!i.isCliff){t=a.plotY,h=s.plotX,s=s.plotY;var d=0;r=(1.5*n+a.plotX)/2.5,l=(1.5*o+t)/2.5,h=(1.5*n+h)/2.5,c=(1.5*o+s)/2.5,h!==r&&(d=(c-l)*(h-n)/(h-r)+o-c),l+=d,c+=d,l>t&&l>o?(l=Math.max(t,o),c=2*o-l):l<t&&l<o&&(l=Math.min(t,o),c=2*o-l),c>s&&c>o?(c=Math.max(s,o),l=2*o-c):c<s&&c<o&&(c=Math.min(s,o),l=2*o-c),i.rightContX=h,i.rightContY=c}return i=["C",e(a.rightContX,a.plotX),e(a.rightContY,a.plotY),e(r,n),e(l,o),n,o],a.rightContX=a.rightContY=null,i}})}),e(i,"parts/AreaSplineSeries.js",[i["parts/Globals.js"]],function(t){var e=t.seriesTypes.area.prototype;(0,t.seriesType)("areaspline","spline",t.defaultPlotOptions.area,{getStackPoints:e.getStackPoints,getGraphPath:e.getGraphPath,drawGraph:e.drawGraph,drawLegendSymbol:t.LegendSymbolMixin.drawRectangle})}),e(i,"parts/ColumnSeries.js",[i["parts/Globals.js"]],function(t){var e=t.animObject,i=t.color,s=t.extend,n=t.defined,o=t.isNumber,a=t.merge,r=t.pick,l=t.Series,h=t.seriesType,c=t.svg;h("column","line",{borderRadius:0,crisp:!0,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{halo:!1,brightness:.1},select:{color:"#cccccc",borderColor:"#000000"}},dataLabels:{align:null,verticalAlign:null,y:null},softThreshold:!1,startFromThreshold:!0,stickyTracking:!1,tooltip:{distance:6},threshold:0,borderColor:"#ffffff"},{cropShoulder:0,directTouch:!0,trackerGroups:["group","dataLabelsGroup"],negStacks:!0,init:function(){l.prototype.init.apply(this,arguments);var t=this,e=t.chart;e.hasRendered&&e.series.forEach(function(e){e.type===t.type&&(e.isDirty=!0)})},getColumnMetrics:function(){var t,e=this,i=e.options,s=e.xAxis,n=e.yAxis,o=s.options.reversedStacks,o=s.reversed&&!o||!s.reversed&&o,a={},l=0;!1===i.grouping?l=1:e.chart.series.forEach(function(i){var s,o=i.options,r=i.yAxis;i.type!==e.type||!i.visible&&e.chart.options.chart.ignoreHiddenSeries||n.len!==r.len||n.pos!==r.pos||(o.stacking?(t=i.stackKey,void 0===a[t]&&(a[t]=l++),s=a[t]):!1!==o.grouping&&(s=l++),i.columnIndex=s)});var h=Math.min(Math.abs(s.transA)*(s.ordinalSlope||i.pointRange||s.closestPointRange||s.tickInterval||1),s.len),c=h*i.groupPadding,d=(h-2*c)/(l||1),i=Math.min(i.maxPointWidth||s.len,r(i.pointWidth,d*(1-2*i.pointPadding)));return e.columnMetrics={width:i,offset:(d-i)/2+(c+((e.columnIndex||0)+(o?1:0))*d-h/2)*(o?-1:1)},e.columnMetrics},crispCol:function(t,e,i,s){var n=this.chart,o=this.borderWidth,a=-(o%2?.5:0),o=o%2?.5:1;return n.inverted&&n.renderer.isVML&&(o+=1),this.options.crisp&&(i=Math.round(t+i)+a,t=Math.round(t)+a,i-=t),s=Math.round(e+s)+o,a=.5>=Math.abs(e)&&.5<s,e=Math.round(e)+o,s-=e,a&&s&&(--e,s+=1),{x:t,y:e,width:i,height:s}},translate:function(){var t=this,e=t.chart,i=t.options,s=t.dense=2>t.closestPointRange*t.xAxis.transA,s=t.borderWidth=r(i.borderWidth,s?0:1),o=t.yAxis,a=i.threshold,h=t.translatedThreshold=o.getThreshold(a),c=r(i.minPointLength,5),d=t.getColumnMetrics(),p=d.width,u=t.barW=Math.max(p,1+2*s),f=t.pointXOffset=d.offset;e.inverted&&(h-=.5),i.pointPadding&&(u=Math.ceil(u)),l.prototype.translate.apply(t),t.points.forEach(function(i){var s,l=r(i.yBottom,h),d=999+Math.abs(l),g=p,d=Math.min(Math.max(-d,i.plotY),o.len+d),m=i.plotX+f,v=u,x=Math.min(d,l),y=Math.max(d,l)-x;c&&Math.abs(y)<c&&(y=c,s=!o.reversed&&!i.negative||o.reversed&&i.negative,i.y===a&&t.dataMax<=a&&o.min<a&&(s=!s),x=Math.abs(x-h)>c?l-c:h-(s?c:0)),n(i.options.pointWidth)&&(g=v=Math.ceil(i.options.pointWidth),m-=Math.round((g-p)/2)),i.barX=m,i.pointWidth=g,i.tooltipPos=e.inverted?[o.len+o.pos-e.plotLeft-d,t.xAxis.len-m-v/2,y]:[m+v/2,d+o.pos-e.plotTop,y],i.shapeType=t.pointClass.prototype.shapeType||"rect",i.shapeArgs=t.crispCol.apply(t,i.isNull?[m,h,v,0]:[m,x,v,y])})},getSymbol:t.noop,drawLegendSymbol:t.LegendSymbolMixin.drawRectangle,drawGraph:function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")},pointAttribs:function(t,e){var s,n=this.options,o=this.pointAttrToOptions||{};s=o.stroke||"borderColor";var l,h=o["stroke-width"]||"borderWidth",c=t&&t.color||this.color,d=t&&t[s]||n[s]||this.color||c,p=t&&t[h]||n[h]||this[h]||0,o=t&&t.dashStyle||n.dashStyle,u=r(n.opacity,1);return t&&this.zones.length&&(l=t.getZone(),c=t.options.color||l&&l.color||this.color,l&&(d=l.borderColor||d,o=l.dashStyle||o,p=l.borderWidth||p)),e&&(t=a(n.states[e],t.options.states&&t.options.states[e]||{}),e=t.brightness,c=t.color||void 0!==e&&i(c).brighten(t.brightness).get()||c,d=t[s]||d,p=t[h]||p,o=t.dashStyle||o,u=r(t.opacity,u)),s={fill:c,stroke:d,"stroke-width":p,opacity:u},o&&(s.dashstyle=o),s},drawPoints:function(){var t,e=this,i=this.chart,s=e.options,n=i.renderer,r=s.animationLimit||250;e.points.forEach(function(l){var h=l.graphic,c=h&&i.pointCount<r?"animate":"attr";o(l.plotY)&&null!==l.y?(t=l.shapeArgs,h&&h.element.nodeName!==l.shapeType&&(h=h.destroy()),h?h[c](a(t)):l.graphic=h=n[l.shapeType](t).add(l.group||e.group),s.borderRadius&&h[c]({r:s.borderRadius}),i.styledMode||h[c](e.pointAttribs(l,l.selected&&"select")).shadow(!1!==l.allowShadow&&s.shadow,null,s.stacking&&!s.borderRadius),h.addClass(l.getClassName(),!0)):h&&(l.graphic=h.destroy())})},animate:function(t){var i,n=this,o=this.yAxis,a=n.options,r=this.chart.inverted,l={},h=r?"translateX":"translateY";c&&(t?(l.scaleY=.001,t=Math.min(o.pos+o.len,Math.max(o.pos,o.toPixels(a.threshold))),r?l.translateX=t-o.len:l.translateY=t,n.clipBox&&n.setClip(),n.group.attr(l)):(i=n.group.attr(h),n.group.animate({scaleY:1},s(e(n.options.animation),{step:function(t,e){l[h]=i+e.pos*(o.pos-i),n.group.attr(l)}})),n.animate=null))},remove:function(){var t=this,e=t.chart;e.hasRendered&&e.series.forEach(function(e){e.type===t.type&&(e.isDirty=!0)}),l.prototype.remove.apply(t,arguments)}})}),e(i,"parts/BarSeries.js",[i["parts/Globals.js"]],function(t){(t=t.seriesType)("bar","column",null,{inverted:!0})}),e(i,"parts/ScatterSeries.js",[i["parts/Globals.js"]],function(t){var e=t.Series;(0,t.seriesType)("scatter","line",{lineWidth:0,findNearestPointBy:"xy",jitter:{x:0,y:0},marker:{enabled:!0},tooltip:{headerFormat:'<span style="color:{point.color}">●</span> <span style="font-size: 10px"> {series.name}</span><br/>',pointFormat:"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"}},{sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1,drawGraph:function(){this.options.lineWidth&&e.prototype.drawGraph.call(this)},applyJitter:function(){var t=this,e=this.options.jitter,i=this.points.length;e&&this.points.forEach(function(s,n){["x","y"].forEach(function(o,a){var r,l,h,c="plot"+o.toUpperCase();e[o]&&!s.isNull&&(r=t[o+"Axis"],h=e[o]*r.transA,r&&!r.isLog&&(l=Math.max(0,s[c]-h),r=Math.min(r.len,s[c]+h),a=1e4*Math.sin(n+a*i),s[c]=l+(r-l)*(a-Math.floor(a)),"x"===o&&(s.clientX=s.plotX)))})})}}),t.addEvent(e,"afterTranslate",function(){this.applyJitter&&this.applyJitter()})}),e(i,"mixins/centered-series.js",[i["parts/Globals.js"]],function(t){var e=t.deg2rad,i=t.isNumber,s=t.pick,n=t.relativeLength;t.CenteredSeriesMixin={getCenter:function(){var t,e,i=this.options,o=this.chart,a=2*(i.slicedOffset||0),r=o.plotWidth-2*a,o=o.plotHeight-2*a,l=i.center,l=[s(l[0],"50%"),s(l[1],"50%"),i.size||"100%",i.innerSize||0],h=Math.min(r,o);for(t=0;4>t;++t)e=l[t],i=2>t||2===t&&/%$/.test(e),l[t]=n(e,[r,o,h,l[2]][t])+(i?a:0);return l[3]>l[2]&&(l[3]=l[2]),l},getStartAndEndRadians:function(t,s){return t=i(t)?t:0,s=i(s)&&s>t&&360>s-t?s:t+360,{start:e*(t+-90),end:e*(s+-90)}}}}),e(i,"parts/PieSeries.js",[i["parts/Globals.js"]],function(t){var e=t.addEvent,i=t.CenteredSeriesMixin,s=t.defined,n=i.getStartAndEndRadians,o=t.merge,a=t.noop,r=t.pick,l=t.Point,h=t.Series,c=t.seriesType,d=t.setAnimation;c("pie","line",{center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{allowOverlap:!0,connectorPadding:5,distance:30,enabled:!0,formatter:function(){return this.point.isNull?void 0:this.point.name},softConnector:!0,x:0,connectorShape:"fixedOffset",crookDistance:"70%"},ignoreHiddenPoint:!0,inactiveOtherPoints:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,stickyTracking:!1,tooltip:{followPointer:!0},borderColor:"#ffffff",borderWidth:1,states:{hover:{brightness:.1}}},{isCartesian:!1,requireSorting:!1,directTouch:!0,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],axisTypes:[],pointAttribs:t.seriesTypes.column.prototype.pointAttribs,animate:function(t){var e=this,i=e.points,s=e.startAngleRad;t||(i.forEach(function(t){var i=t.graphic,n=t.shapeArgs;i&&(i.attr({r:t.startR||e.center[3]/2,start:s,end:s}),i.animate({r:n.r,start:n.start,end:n.end},e.options.animation))}),e.animate=null)},hasData:function(){return!!this.processedXData.length},updateTotals:function(){var t,e,i=0,s=this.points,n=s.length,o=this.options.ignoreHiddenPoint;for(t=0;t<n;t++)e=s[t],i+=o&&!e.visible?0:e.isNull?0:e.y;for(this.total=i,t=0;t<n;t++)e=s[t],e.percentage=0<i&&(e.visible||!o)?e.y/i*100:0,e.total=i},generatePoints:function(){h.prototype.generatePoints.call(this),this.updateTotals()},getX:function(t,e,i){var s=this.center,n=this.radii?this.radii[i.index]:s[2]/2;return s[0]+(e?-1:1)*Math.cos(Math.asin(Math.max(Math.min((t-s[1])/(n+i.labelDistance),1),-1)))*(n+i.labelDistance)+(0<i.labelDistance?(e?-1:1)*this.options.dataLabels.padding:0)},translate:function(t){this.generatePoints();var e,i,s,o,a,l,h=0,c=this.options,d=c.slicedOffset,p=d+(c.borderWidth||0),u=n(c.startAngle,c.endAngle),f=this.startAngleRad=u.start,u=(this.endAngleRad=u.end)-f,g=this.points,m=c.dataLabels.distance,c=c.ignoreHiddenPoint,v=g.length;for(t||(this.center=t=this.getCenter()),a=0;a<v;a++)l=g[a],l.labelDistance=r(l.options.dataLabels&&l.options.dataLabels.distance,m),this.maxLabelDistance=Math.max(this.maxLabelDistance||0,l.labelDistance),e=f+h*u,c&&!l.visible||(h+=l.percentage/100),i=f+h*u,l.shapeType="arc",l.shapeArgs={x:t[0],y:t[1],r:t[2]/2,innerR:t[3]/2,start:Math.round(1e3*e)/1e3,end:Math.round(1e3*i)/1e3},i=(i+e)/2,i>1.5*Math.PI?i-=2*Math.PI:i<-Math.PI/2&&(i+=2*Math.PI),l.slicedTranslation={translateX:Math.round(Math.cos(i)*d),translateY:Math.round(Math.sin(i)*d)},s=Math.cos(i)*t[2]/2,o=Math.sin(i)*t[2]/2,l.tooltipPos=[t[0]+.7*s,t[1]+.7*o],l.half=i<-Math.PI/2||i>Math.PI/2?1:0,l.angle=i,e=Math.min(p,l.labelDistance/5),l.labelPosition={natural:{x:t[0]+s+Math.cos(i)*l.labelDistance,y:t[1]+o+Math.sin(i)*l.labelDistance},final:{},alignment:0>l.labelDistance?"center":l.half?"right":"left",connectorPosition:{breakAt:{x:t[0]+s+Math.cos(i)*e,y:t[1]+o+Math.sin(i)*e},touchingSliceAt:{x:t[0]+s,y:t[1]+o}}}},drawGraph:null,redrawPoints:function(){var t,e,i,s,n=this,a=n.chart,r=a.renderer,l=n.options.shadow;!l||n.shadowGroup||a.styledMode||(n.shadowGroup=r.g("shadow").attr({zIndex:-1}).add(n.group)),n.points.forEach(function(h){var c={};if(e=h.graphic,!h.isNull&&e){if(s=h.shapeArgs,t=h.getTranslate(),!a.styledMode){var d=h.shadowGroup;l&&!d&&(d=h.shadowGroup=r.g("shadow").add(n.shadowGroup)),d&&d.attr(t),i=n.pointAttribs(h,h.selected&&"select")}h.delayedRendering?(e.setRadialReference(n.center).attr(s).attr(t),a.styledMode||e.attr(i).attr({"stroke-linejoin":"round"}).shadow(l,d),h.delayRendering=!1):(e.setRadialReference(n.center),a.styledMode||o(!0,c,i),o(!0,c,s,t),e.animate(c)),e.attr({visibility:h.visible?"inherit":"hidden"}),e.addClass(h.getClassName())}else e&&(h.graphic=e.destroy())})},drawPoints:function(){var t=this.chart.renderer;this.points.forEach(function(e){e.graphic||(e.graphic=t[e.shapeType](e.shapeArgs).add(e.series.group),e.delayedRendering=!0)})},searchPoint:a,sortByAngle:function(t,e){t.sort(function(t,i){return void 0!==t.angle&&(i.angle-t.angle)*e})},drawLegendSymbol:t.LegendSymbolMixin.drawRectangle,getCenter:i.getCenter,getSymbol:a},{init:function(){l.prototype.init.apply(this,arguments);var t,i=this;return i.name=r(i.name,"Slice"),t=function(t){i.slice("select"===t.type)},e(i,"select",t),e(i,"unselect",t),i},isValid:function(){return t.isNumber(this.y,!0)&&0<=this.y},setVisible:function(t,e){var i=this,s=i.series,n=s.chart,o=s.options.ignoreHiddenPoint;e=r(e,o),t!==i.visible&&(i.visible=i.options.visible=t=void 0===t?!i.visible:t,s.options.data[s.data.indexOf(i)]=i.options,["graphic","dataLabel","connector","shadowGroup"].forEach(function(e){i[e]&&i[e][t?"show":"hide"](!0)}),i.legendItem&&n.legend.colorizeItem(i,t),t||"hover"!==i.state||i.setState(""),o&&(s.isDirty=!0),e&&n.redraw())},slice:function(t,e,i){var n=this.series;d(i,n.chart),r(e,!0),this.sliced=this.options.sliced=s(t)?t:!this.sliced,n.options.data[n.data.indexOf(this)]=this.options,this.graphic.animate(this.getTranslate()),this.shadowGroup&&this.shadowGroup.animate(this.getTranslate())},getTranslate:function(){return this.sliced?this.slicedTranslation:{translateX:0,translateY:0}},haloPath:function(t){var e=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(e.x,e.y,e.r+t,e.r+t,{innerR:this.shapeArgs.r-1,start:e.start,end:e.end})},connectorShapes:{fixedOffset:function(t,e,i){var s=e.breakAt;return e=e.touchingSliceAt,["M",t.x,t.y].concat(i.softConnector?["C",t.x+("left"===t.alignment?-5:5),t.y,2*s.x-e.x,2*s.y-e.y,s.x,s.y]:["L",s.x,s.y]).concat(["L",e.x,e.y])},straight:function(t,e){return e=e.touchingSliceAt,["M",t.x,t.y,"L",e.x,e.y]},crookedLine:function(e,i,s){i=i.touchingSliceAt;var n=this.series,o=n.center[0],a=n.chart.plotWidth,r=n.chart.plotLeft,n=e.alignment,l=this.shapeArgs.r;return s=t.relativeLength(s.crookDistance,1),s="left"===n?o+l+(a+r-o-l)*(1-s):r+(o-l)*s,o=["L",s,e.y],("left"===n?s>e.x||s<i.x:s<e.x||s>i.x)&&(o=[]),["M",e.x,e.y].concat(o).concat(["L",i.x,i.y])}},getConnectorPath:function(){var t=this.labelPosition,e=this.series.options.dataLabels,i=e.connectorShape,s=this.connectorShapes;return s[i]&&(i=s[i]),i.call(this,{x:t.final.x,y:t.final.y,alignment:t.alignment},t.connectorPosition,e)}})}),e(i,"parts/DataLabels.js",[i["parts/Globals.js"]],function(t){var e=t.arrayMax,i=t.defined,s=t.extend,n=t.format,o=t.merge,a=t.noop,r=t.pick,l=t.relativeLength,h=t.Series,c=t.seriesTypes,d=t.stableSort,p=t.isArray,u=t.splat;t.distribute=function(e,i,s){function n(t,e){return t.target-e.target}var o,a,l=!0,h=e,c=[];a=0;var p=h.reducedLen||i;for(o=e.length;o--;)a+=e[o].size;if(a>p){for(d(e,function(t,e){return(e.rank||0)-(t.rank||0)}),a=o=0;a<=p;)a+=e[o].size,o++;c=e.splice(o-1,e.length)}for(d(e,n),e=e.map(function(t){return{size:t.size,targets:[t.target],align:r(t.align,.5)}});l;){for(o=e.length;o--;)l=e[o],a=(Math.min.apply(0,l.targets)+Math.max.apply(0,l.targets))/2,l.pos=Math.min(Math.max(0,a-l.size*l.align),i-l.size);for(o=e.length,l=!1;o--;)0<o&&e[o-1].pos+e[o-1].size>e[o].pos&&(e[o-1].size+=e[o].size,e[o-1].targets=e[o-1].targets.concat(e[o].targets),e[o-1].align=.5,e[o-1].pos+e[o-1].size>i&&(e[o-1].pos=i-e[o-1].size),e.splice(o,1),l=!0)}h.push.apply(h,c),o=0,e.some(function(e){var n=0;if(e.targets.some(function(){if(h[o].pos=e.pos+n,Math.abs(h[o].pos-h[o].target)>s)return h.slice(0,o+1).forEach(function(t){delete t.pos}),h.reducedLen=(h.reducedLen||i)-.1*i,h.reducedLen>.1*i&&t.distribute(h,i,s),!0;n+=h[o].size,o++}))return!0}),d(h,n)},h.prototype.drawDataLabels=function(){function e(t,e){var i=e.filter;return!i||(e=i.operator,t=t[i.property],i=i.value,">"===e&&t>i||"<"===e&&t<i||">="===e&&t>=i||"<="===e&&t<=i||"=="===e&&t==i||"==="===e&&t===i)}function s(t,e){var i,s=[];if(p(t)&&!p(e))s=t.map(function(t){return o(t,e)});else if(p(e)&&!p(t))s=e.map(function(e){return o(t,e)});else if(p(t)||p(e))for(i=Math.max(t.length,e.length);i--;)s[i]=o(t[i],e[i]);else s=o(t,e);return s}var a,l,h=this,c=h.chart,d=h.options,f=d.dataLabels,g=h.points,m=h.hasRendered||0,v=t.animObject(d.animation).duration,x=Math.min(v,200),y=r(f.defer,0<x),b=c.renderer,f=s(s(c.options.plotOptions&&c.options.plotOptions.series&&c.options.plotOptions.series.dataLabels,c.options.plotOptions&&c.options.plotOptions[h.type]&&c.options.plotOptions[h.type].dataLabels),f);t.fireEvent(this,"drawDataLabels"),(p(f)||f.enabled||h._hasPointLabels)&&(l=h.plotGroup("dataLabelsGroup","data-labels",y&&!m?"hidden":"inherit",f.zIndex||6),y&&(l.attr({opacity:+m}),m||setTimeout(function(){var t=h.dataLabelsGroup;t&&(h.visible&&l.show(!0),t[d.animation?"animate":"attr"]({opacity:1},{duration:x}))},v-x)),g.forEach(function(o){a=u(s(f,o.dlOptions||o.options&&o.options.dataLabels)),a.forEach(function(s,a){var p,u,f,g,m=s.enabled&&(!o.isNull||o.dataLabelOnNull)&&e(o,s),v=o.dataLabels?o.dataLabels[a]:o.dataLabel,x=o.connectors?o.connectors[a]:o.connector,y=!v;m&&(p=o.getLabelConfig(),u=r(s[o.formatPrefix+"Format"],s.format),p=i(u)?n(u,p,c.time):(s[o.formatPrefix+"Formatter"]||s.formatter).call(p,s),u=s.style,f=s.rotation,c.styledMode||(u.color=r(s.color,u.color,h.color,"#000000"),"contrast"===u.color&&(o.contrastColor=b.getContrast(o.color||h.color),u.color=s.inside||0>r(s.distance,o.labelDistance)||d.stacking?o.contrastColor:"#000000"),d.cursor&&(u.cursor=d.cursor)),g={r:s.borderRadius||0,rotation:f,padding:s.padding,zIndex:1},c.styledMode||(g.fill=s.backgroundColor,g.stroke=s.borderColor,g["stroke-width"]=s.borderWidth),t.objectEach(g,function(t,e){void 0===t&&delete g[e]})),!v||m&&i(p)?m&&i(p)&&(v?g.text=p:(o.dataLabels=o.dataLabels||[],v=o.dataLabels[a]=f?b.text(p,0,-9999).addClass("highcharts-data-label"):b.label(p,0,-9999,s.shape,null,null,s.useHTML,null,"data-label"),a||(o.dataLabel=v),v.addClass(" highcharts-data-label-color-"+o.colorIndex+" "+(s.className||"")+(s.useHTML?" highcharts-tracker":""))),v.options=s,v.attr(g),c.styledMode||v.css(u).shadow(s.shadow),v.added||v.add(l),s.textPath&&v.setTextPath(o.getDataLabelPath&&o.getDataLabelPath(v)||o.graphic,s.textPath),h.alignDataLabel(o,v,s,null,y)):(o.dataLabel=o.dataLabel&&o.dataLabel.destroy(),o.dataLabels&&(1===o.dataLabels.length?delete o.dataLabels:delete o.dataLabels[a]),a||delete o.dataLabel,x&&(o.connector=o.connector.destroy(),o.connectors&&(1===o.connectors.length?delete o.connectors:delete o.connectors[a])))})})),t.fireEvent(this,"afterDrawDataLabels")},h.prototype.alignDataLabel=function(t,e,i,n,o){var a,l=this.chart,h=this.isCartesian&&l.inverted,c=r(t.dlBox&&t.dlBox.centerX,t.plotX,-9999),d=r(t.plotY,-9999),p=e.getBBox(),u=i.rotation,f=i.align,g=this.visible&&(t.series.forceDL||l.isInsidePlot(c,Math.round(d),h)||n&&l.isInsidePlot(c,h?n.x+1:n.y+n.height-1,h)),m="justify"===r(i.overflow,"justify");g&&(a=l.renderer.fontMetrics(l.styledMode?void 0:i.style.fontSize,e).b,n=s({x:h?this.yAxis.len-d:c,y:Math.round(h?this.xAxis.len-c:d),width:0,height:0},n),s(i,{width:p.width,height:p.height}),u?(m=!1,c=l.renderer.rotCorr(a,u),c={x:n.x+i.x+n.width/2+c.x,y:n.y+i.y+{top:0,middle:.5,bottom:1}[i.verticalAlign]*n.height},e[o?"attr":"animate"](c).attr({align:f}),d=(u+720)%360,d=180<d&&360>d,"left"===f?c.y-=d?p.height:0:"center"===f?(c.x-=p.width/2,c.y-=p.height/2):"right"===f&&(c.x-=p.width,c.y-=d?0:p.height),e.placed=!0,e.alignAttr=c):(e.align(i,null,n),c=e.alignAttr),m&&0<=n.height?t.isLabelJustified=this.justifyDataLabel(e,i,c,p,n,o):r(i.crop,!0)&&(g=l.isInsidePlot(c.x,c.y)&&l.isInsidePlot(c.x+p.width,c.y+p.height)),i.shape&&!u)&&e[o?"attr":"animate"]({anchorX:h?l.plotWidth-t.plotY:t.plotX,anchorY:h?l.plotHeight-t.plotX:t.plotY}),g||(e.attr({y:-9999}),e.placed=!1)},h.prototype.justifyDataLabel=function(t,e,i,s,n,o){var a,r,l=this.chart,h=e.align,c=e.verticalAlign,d=t.box?0:t.padding||0;return a=i.x+d,0>a&&("right"===h?e.align="left":e.x=-a,r=!0),a=i.x+s.width-d,a>l.plotWidth&&("left"===h?e.align="right":e.x=l.plotWidth-a,r=!0),a=i.y+d,0>a&&("bottom"===c?e.verticalAlign="top":e.y=-a,r=!0),a=i.y+s.height-d,a>l.plotHeight&&("top"===c?e.verticalAlign="bottom":e.y=l.plotHeight-a,r=!0),r&&(t.placed=!o,t.align(e,null,n)),r},c.pie&&(c.pie.prototype.dataLabelPositioners={radialDistributionY:function(t){return t.top+t.distributeBox.pos},radialDistributionX:function(t,e,i,s){return t.getX(i<e.top+2||i>e.bottom-2?s:i,e.half,e)},justify:function(t,e,i){return i[0]+(t.half?-1:1)*(e+t.labelDistance)},alignToPlotEdges:function(t,e,i,s){return t=t.getBBox().width,e?t+s:i-t-s},alignToConnectors:function(t,e,i,s){var n,o=0;return t.forEach(function(t){(n=t.dataLabel.getBBox().width)>o&&(o=n)}),e?o+s:i-o-s}},c.pie.prototype.drawDataLabels=function(){var s,n,a,l,c,d,p,u,f,g,m,v,x=this,y=x.data,b=x.chart,w=x.options.dataLabels,k=w.connectorPadding,M=b.plotWidth,S=b.plotHeight,T=b.plotLeft,C=Math.round(b.chartWidth/3),A=x.center,E=A[2]/2,P=A[1],O=[[],[]],L=[0,0,0,0],D=x.dataLabelPositioners;x.visible&&(w.enabled||x._hasPointLabels)&&(y.forEach(function(t){t.dataLabel&&t.visible&&t.dataLabel.shortened&&(t.dataLabel.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),t.dataLabel.shortened=!1)}),h.prototype.drawDataLabels.apply(x),y.forEach(function(t){t.dataLabel&&(t.visible?(O[t.half].push(t),t.dataLabel._pos=null,!i(w.style.width)&&!i(t.options.dataLabels&&t.options.dataLabels.style&&t.options.dataLabels.style.width)&&t.dataLabel.getBBox().width>C&&(t.dataLabel.css({width:.7*C}),t.dataLabel.shortened=!0)):(t.dataLabel=t.dataLabel.destroy(),t.dataLabels&&1===t.dataLabels.length&&delete t.dataLabels))}),O.forEach(function(e,n){var o,a,h,v=e.length,y=[];if(v)for(x.sortByAngle(e,n-.5),0<x.maxLabelDistance&&(o=Math.max(0,P-E-x.maxLabelDistance),a=Math.min(P+E+x.maxLabelDistance,b.plotHeight),e.forEach(function(t){0<t.labelDistance&&t.dataLabel&&(t.top=Math.max(0,P-E-t.labelDistance),t.bottom=Math.min(P+E+t.labelDistance,b.plotHeight),h=t.dataLabel.getBBox().height||21,t.distributeBox={target:t.labelPosition.natural.y-t.top+h/2,size:h,rank:t.y},y.push(t.distributeBox))}),o=a+h-o,t.distribute(y,o,o/5)),m=0;m<v;m++){if(s=e[m],d=s.labelPosition,l=s.dataLabel,g=!1===s.visible?"hidden":"inherit",f=o=d.natural.y,y&&i(s.distributeBox)&&(void 0===s.distributeBox.pos?g="hidden":(p=s.distributeBox.size,f=D.radialDistributionY(s))),delete s.positionIndex,w.justify)u=D.justify(s,E,A);else switch(w.alignTo){case"connectors":u=D.alignToConnectors(e,n,M,T);break;case"plotEdges":u=D.alignToPlotEdges(l,n,M,T);break;default:u=D.radialDistributionX(x,s,f,o)}l._attr={visibility:g,align:d.alignment},l._pos={x:u+w.x+({left:k,right:-k}[d.alignment]||0),y:f+w.y-10},d.final.x=u,d.final.y=f,r(w.crop,!0)&&(c=l.getBBox().width,o=null,u-c<k&&1===n?(o=Math.round(c-u+k),L[3]=Math.max(o,L[3])):u+c>M-k&&0===n&&(o=Math.round(u+c-M+k),L[1]=Math.max(o,L[1])),0>f-p/2?L[0]=Math.max(Math.round(p/2-f),L[0]):f+p/2>S&&(L[2]=Math.max(Math.round(f+p/2-S),L[2])),l.sideOverflow=o)}}),0===e(L)||this.verifyDataLabelOverflow(L))&&(this.placeDataLabels(),this.points.forEach(function(t){if(v=o(w,t.options.dataLabels),n=r(v.connectorWidth,1)){var e;a=t.connector,(l=t.dataLabel)&&l._pos&&t.visible&&0<t.labelDistance?(g=l._attr.visibility,(e=!a)&&(t.connector=a=b.renderer.path().addClass("highcharts-data-label-connector highcharts-color-"+t.colorIndex+(t.className?" "+t.className:"")).add(x.dataLabelsGroup),b.styledMode||a.attr({"stroke-width":n,stroke:v.connectorColor||t.color||"#666666"})),a[e?"attr":"animate"]({d:t.getConnectorPath()}),a.attr("visibility",g)):a&&(t.connector=a.destroy())}}))},c.pie.prototype.placeDataLabels=function(){this.points.forEach(function(t){var e,i=t.dataLabel;i&&t.visible&&((e=i._pos)?(i.sideOverflow&&(i._attr.width=Math.max(i.getBBox().width-i.sideOverflow,0),i.css({width:i._attr.width+"px",textOverflow:(this.options.dataLabels.style||{}).textOverflow||"ellipsis"}),i.shortened=!0),i.attr(i._attr),i[i.moved?"animate":"attr"](e),i.moved=!0):i&&i.attr({y:-9999})),delete t.distributeBox},this)},c.pie.prototype.alignDataLabel=a,c.pie.prototype.verifyDataLabelOverflow=function(t){var e,i=this.center,s=this.options,n=s.center,o=s.minSize||80,a=null!==s.size;return a||(null!==n[0]?e=Math.max(i[2]-Math.max(t[1],t[3]),o):(e=Math.max(i[2]-t[1]-t[3],o),i[0]+=(t[3]-t[1])/2),null!==n[1]?e=Math.max(Math.min(e,i[2]-Math.max(t[0],t[2])),o):(e=Math.max(Math.min(e,i[2]-t[0]-t[2]),o),i[1]+=(t[0]-t[2])/2),e<i[2]?(i[2]=e,i[3]=Math.min(l(s.innerSize||0,e),e),this.translate(i),this.drawDataLabels&&this.drawDataLabels()):a=!0),a}),c.column&&(c.column.prototype.alignDataLabel=function(t,e,i,s,n){var a=this.chart.inverted,l=t.series,c=t.dlBox||t.shapeArgs,d=r(t.below,t.plotY>r(this.translatedThreshold,l.yAxis.len)),p=r(i.inside,!!this.options.stacking);c&&(s=o(c),0>s.y&&(s.height+=s.y,s.y=0),c=s.y+s.height-l.yAxis.len,0<c&&(s.height-=c),a&&(s={x:l.yAxis.len-s.y-s.height,y:l.xAxis.len-s.x-s.width,width:s.height,height:s.width}),p||(a?(s.x+=d?0:s.width,s.width=0):(s.y+=d?s.height:0,s.height=0))),i.align=r(i.align,!a||p?"center":d?"right":"left"),i.verticalAlign=r(i.verticalAlign,a||p?"middle":d?"top":"bottom"),h.prototype.alignDataLabel.call(this,t,e,i,s,n),t.isLabelJustified&&t.contrastColor&&e.css({color:t.contrastColor})})}),e(i,"modules/overlapping-datalabels.src.js",[i["parts/Globals.js"]],function(t){var e=t.Chart,i=t.isArray,s=t.objectEach,n=t.pick,o=t.addEvent,a=t.fireEvent;o(e,"render",function(){var t=[];(this.labelCollectors||[]).forEach(function(e){t=t.concat(e())}),(this.yAxis||[]).forEach(function(e){e.options.stackLabels&&!e.options.stackLabels.allowOverlap&&s(e.stacks,function(e){s(e,function(e){t.push(e.label)})})}),(this.series||[]).forEach(function(e){var s=e.options.dataLabels;e.visible&&(!1!==s.enabled||e._hasPointLabels)&&e.points.forEach(function(e){e.visible&&(i(e.dataLabels)?e.dataLabels:e.dataLabel?[e.dataLabel]:[]).forEach(function(i){var s=i.options;i.labelrank=n(s.labelrank,e.labelrank,e.shapeArgs&&e.shapeArgs.height),s.allowOverlap||t.push(i)})})}),this.hideOverlappingLabels(t)}),e.prototype.hideOverlappingLabels=function(t){var e,i,s,n,o,r,l=this,h=t.length,c=l.renderer;for(s=function(t){var e,i,s,n=t.box?0:t.padding||0;if(s=0,t&&(!t.alignAttr||t.placed))return e=t.alignAttr||{x:t.attr("x"),y:t.attr("y")},i=t.parentGroup,t.width||(s=t.getBBox(),t.width=s.width,t.height=s.height,s=c.fontMetrics(null,t.element).h),{x:e.x+(i.translateX||0)+n,y:e.y+(i.translateY||0)+n-s,width:t.width-2*n,height:t.height-2*n}},i=0;i<h;i++)(e=t[i])&&(e.oldOpacity=e.opacity,e.newOpacity=1,e.absoluteBox=s(e));for(t.sort(function(t,e){return(e.labelrank||0)-(t.labelrank||0)}),i=0;i<h;i++)for(r=(s=t[i])&&s.absoluteBox,e=i+1;e<h;++e)o=(n=t[e])&&n.absoluteBox,r&&o&&s!==n&&0!==s.newOpacity&&0!==n.newOpacity&&(o=function(t,e,i,s,n,o,a,r){return!(n>t+i||n+a<t||o>e+s||o+r<e)}(r.x,r.y,r.width,r.height,o.x,o.y,o.width,o.height))&&((s.labelrank<n.labelrank?s:n).newOpacity=0);t.forEach(function(t){var e,i;t&&(i=t.newOpacity,t.oldOpacity!==i&&(t.alignAttr&&t.placed?(i?t.show(!0):e=function(){t.hide()},t.alignAttr.opacity=i,t[t.isOld?"animate":"attr"](t.alignAttr,null,e),a(l,"afterHideOverlappingLabels")):t.attr({opacity:i})),t.isOld=!0)})}}),e(i,"parts/Interaction.js",[i["parts/Globals.js"]],function(t){var e,i=t.addEvent,s=t.Chart,n=t.createElement,o=t.css,a=t.defaultOptions,r=t.defaultPlotOptions,l=t.extend,h=t.fireEvent,c=t.hasTouch,d=t.isObject,p=t.Legend,u=t.merge,f=t.pick,g=t.Point,m=t.Series,v=t.seriesTypes,x=t.svg;e=t.TrackerMixin={drawTrackerPoint:function(){var t=this,e=t.chart,i=e.pointer,s=function(t){var e=i.getPointFromEvent(t);void 0!==e&&(i.isDirectTouch=!0,e.onMouseOver(t))};t.points.forEach(function(t){t.graphic&&(t.graphic.element.point=t),t.dataLabel&&(t.dataLabel.div?t.dataLabel.div.point=t:t.dataLabel.element.point=t)}),t._hasTracking||(t.trackerGroups.forEach(function(n){t[n]&&(t[n].addClass("highcharts-tracker").on("mouseover",s).on("mouseout",function(t){i.onTrackerMouseOut(t)}),c&&t[n].on("touchstart",s),!e.styledMode&&t.options.cursor&&t[n].css(o).css({cursor:t.options.cursor}))}),t._hasTracking=!0),h(this,"afterDrawTracker")},drawTrackerGraph:function(){var t,e=this,i=e.options,s=i.trackByArea,n=[].concat(s?e.areaPath:e.graphPath),o=n.length,a=e.chart,r=a.pointer,l=a.renderer,d=a.options.tooltip.snap,p=e.tracker,u=function(){a.hoverSeries!==e&&e.onMouseOver()},f="rgba(192,192,192,"+(x?1e-4:.002)+")";if(o&&!s)for(t=o+1;t--;)"M"===n[t]&&n.splice(t+1,0,n[t+1]-d,n[t+2],"L"),(t&&"M"===n[t]||t===o)&&n.splice(t,0,"L",n[t-2]+d,n[t-1]);p?p.attr({d:n}):e.graph&&(e.tracker=l.path(n).attr({visibility:e.visible?"visible":"hidden",zIndex:2}).addClass(s?"highcharts-tracker-area":"highcharts-tracker-line").add(e.group),a.styledMode||e.tracker.attr({"stroke-linejoin":"round",stroke:f,fill:s?f:"none","stroke-width":e.graph.strokeWidth()+(s?0:2*d)}),[e.tracker,e.markerGroup].forEach(function(t){t.addClass("highcharts-tracker").on("mouseover",u).on("mouseout",function(t){r.onTrackerMouseOut(t)}),i.cursor&&!a.styledMode&&t.css({cursor:i.cursor}),c&&t.on("touchstart",u)})),h(this,"afterDrawTracker")}},v.column&&(v.column.prototype.drawTracker=e.drawTrackerPoint),v.pie&&(v.pie.prototype.drawTracker=e.drawTrackerPoint),v.scatter&&(v.scatter.prototype.drawTracker=e.drawTrackerPoint),l(p.prototype,{setItemEvents:function(t,e,i){var s=this,n=s.chart.renderer.boxWrapper,o=t instanceof g,a="highcharts-legend-"+(o?"point":"series")+"-active",r=s.chart.styledMode;(i?e:t.legendGroup).on("mouseover",function(){s.allItems.forEach(function(e){t!==e&&e.setState("inactive",!o)}),t.setState("hover"),t.visible&&n.addClass(a),r||e.css(s.options.itemHoverStyle)}).on("mouseout",function(){s.styledMode||e.css(u(t.visible?s.itemStyle:s.itemHiddenStyle)),s.allItems.forEach(function(e){t!==e&&e.setState("",!o)}),n.removeClass(a),t.setState()}).on("click",function(e){var i=function(){t.setVisible&&t.setVisible()};n.removeClass(a),e={browserEvent:e},t.firePointEvent?t.firePointEvent("legendItemClick",e,i):h(t,"legendItemClick",e,i)})},createCheckboxForItem:function(t){t.checkbox=n("input",{type:"checkbox",className:"highcharts-legend-checkbox",checked:t.selected,defaultChecked:t.selected},this.options.itemCheckboxStyle,this.chart.container),i(t.checkbox,"click",function(e){h(t.series||t,"checkboxClick",{checked:e.target.checked,item:t},function(){t.select()})})}}),l(s.prototype,{showResetZoom:function(){function t(){e.zoomOut()}var e=this,i=a.lang,s=e.options.chart.resetZoomButton,n=s.theme,o=n.states,r="chart"===s.relativeTo||"spaceBox"===s.relativeTo?null:"plotBox";h(this,"beforeShowResetZoom",null,function(){e.resetZoomButton=e.renderer.button(i.resetZoom,null,null,t,n,o&&o.hover).attr({align:s.position.align,title:i.resetZoomTitle}).addClass("highcharts-reset-zoom").add().align(s.position,!1,r)}),h(this,"afterShowResetZoom")},zoomOut:function(){h(this,"selection",{resetSelection:!0},this.zoom)},zoom:function(e){var i,s,n=this,o=n.pointer,a=!1,r=n.inverted?o.mouseDownX:o.mouseDownY;!e||e.resetSelection?(n.axes.forEach(function(t){i=t.zoom()}),o.initiated=!1):e.xAxis.concat(e.yAxis).forEach(function(e){var s=e.axis,l=n.inverted?s.left:s.top,h=n.inverted?l+s.width:l+s.height,c=s.isXAxis,d=!1;(!c&&r>=l&&r<=h||c||!t.defined(r))&&(d=!0),o[c?"zoomX":"zoomY"]&&d&&(i=s.zoom(e.min,e.max),s.displayBtn&&(a=!0))}),s=n.resetZoomButton,a&&!s?n.showResetZoom():!a&&d(s)&&(n.resetZoomButton=s.destroy()),i&&n.redraw(f(n.options.chart.animation,e&&e.animation,100>n.pointCount))},pan:function(t,e){var i,s=this,n=s.hoverPoints;h(this,"pan",{originalEvent:t},function(){n&&n.forEach(function(t){t.setState()}),("xy"===e?[1,0]:[1]).forEach(function(e){e=s[e?"xAxis":"yAxis"][0];var n=e.horiz,o=t[n?"chartX":"chartY"],n=n?"mouseDownX":"mouseDownY",a=s[n],r=(e.pointRange||0)/2,l=e.reversed&&!s.inverted||!e.reversed&&s.inverted?-1:1,h=e.getExtremes(),c=e.toValue(a-o,!0)+r*l,l=e.toValue(a+e.len-o,!0)-r*l,d=l<c,a=d?l:c,c=d?c:l,l=Math.min(h.dataMin,r?h.min:e.toValue(e.toPixels(h.min)-e.minPixelPadding)),r=Math.max(h.dataMax,r?h.max:e.toValue(e.toPixels(h.max)+e.minPixelPadding)),d=l-a;0<d&&(c+=d,a=l),d=c-r,0<d&&(c=r,a-=d),e.series.length&&a!==h.min&&c!==h.max&&(e.setExtremes(a,c,!1,!1,{trigger:"pan"}),i=!0),s[n]=o}),i&&s.redraw(!1),o(s.container,{cursor:"move"})})}}),l(g.prototype,{select:function(t,e){var i=this,s=i.series,n=s.chart;t=f(t,!i.selected),i.firePointEvent(t?"select":"unselect",{accumulate:e},function(){i.selected=i.options.selected=t,s.options.data[s.data.indexOf(i)]=i.options,i.setState(t&&"select"),e||n.getSelectedPoints().forEach(function(t){var e=t.series;t.selected&&t!==i&&(t.selected=t.options.selected=!1,e.options.data[e.data.indexOf(t)]=t.options,t.setState(n.hoverPoints&&e.options.inactiveOtherPoints?"inactive":""),t.firePointEvent("unselect"))})})},onMouseOver:function(t){var e=this.series.chart,i=e.pointer;t=t?i.normalize(t):i.getChartCoordinatesFromPoint(this,e.inverted),i.runPointActions(t,this)},onMouseOut:function(){var t=this.series.chart;this.firePointEvent("mouseOut"),this.series.options.inactiveOtherPoints||(t.hoverPoints||[]).forEach(function(t){t.setState()}),t.hoverPoints=t.hoverPoint=null},importEvents:function(){if(!this.hasImportedEvents){var e=this,s=u(e.series.options.point,e.options).events;e.events=s,t.objectEach(s,function(t,s){i(e,s,t)}),this.hasImportedEvents=!0}},setState:function(t,e){var i,s,n,o=Math.floor(this.plotX),a=this.plotY,c=this.series,d=this.state,p=c.options.states[t||"normal"]||{},u=r[c.type].marker&&c.options.marker,g=u&&!1===u.enabled,m=u&&u.states&&u.states[t||"normal"]||{},v=!1===m.enabled,x=c.stateMarkerGraphic,y=this.marker||{},b=c.chart,w=c.halo,k=u&&c.markerAttribs;(t=t||"")===this.state&&!e||this.selected&&"select"!==t||!1===p.enabled||t&&(v||g&&!1===m.enabled)||t&&y.states&&y.states[t]&&!1===y.states[t].enabled||(this.state=t,k&&(i=c.markerAttribs(this,t)),this.graphic?(d&&this.graphic.removeClass("highcharts-point-"+d),t&&this.graphic.addClass("highcharts-point-"+t),b.styledMode||(s=c.pointAttribs(this,t),n=f(b.options.chart.animation,p.animation),c.options.inactiveOtherPoints&&((this.dataLabels||[]).forEach(function(t){t&&t.animate({opacity:s.opacity},n)}),this.connector&&this.connector.animate({opacity:s.opacity},n)),this.graphic.animate(s,n)),i&&this.graphic.animate(i,f(b.options.chart.animation,m.animation,u.animation)),x&&x.hide()):(t&&m&&(d=y.symbol||c.symbol,x&&x.currentSymbol!==d&&(x=x.destroy()),x?x[e?"animate":"attr"]({x:i.x,y:i.y}):d&&(c.stateMarkerGraphic=x=b.renderer.symbol(d,i.x,i.y,i.width,i.height).add(c.markerGroup),x.currentSymbol=d),!b.styledMode&&x&&x.attr(c.pointAttribs(this,t))),x&&(x[t&&b.isInsidePlot(o,a,b.inverted)?"show":"hide"](),x.element.point=this)),(t=p.halo)&&t.size?(w||(c.halo=w=b.renderer.path().add((this.graphic||x).parentGroup)),w.show()[e?"animate":"attr"]({d:this.haloPath(t.size)}),w.attr({class:"highcharts-halo highcharts-color-"+f(this.colorIndex,c.colorIndex)+(this.className?" "+this.className:""),zIndex:-1}),w.point=this,b.styledMode||w.attr(l({fill:this.color||c.color,"fill-opacity":t.opacity},t.attributes))):w&&w.point&&w.point.haloPath&&w.animate({d:w.point.haloPath(0)},null,w.hide),h(this,"afterSetState"))},haloPath:function(t){return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX)-t,this.plotY-t,2*t,2*t)}}),l(m.prototype,{onMouseOver:function(){var t=this.chart,e=t.hoverSeries;e&&e!==this&&e.onMouseOut(),this.options.events.mouseOver&&h(this,"mouseOver"),this.setState("hover"),t.hoverSeries=this},onMouseOut:function(){var t=this.options,e=this.chart,i=e.tooltip,s=e.hoverPoint;e.hoverSeries=null,s&&s.onMouseOut(),this&&t.events.mouseOut&&h(this,"mouseOut"),!i||this.stickyTracking||i.shared&&!this.noSharedTooltip||i.hide(),e.series.forEach(function(t){t.setState("",!0)})},setState:function(t,e){var i=this,s=i.options,n=i.graph,o=s.inactiveOtherPoints,a=s.states,r=s.lineWidth,l=s.opacity,h=f(a[t||"normal"]&&a[t||"normal"].animation,i.chart.options.chart.animation),s=0;if(t=t||"",i.state!==t&&([i.group,i.markerGroup,i.dataLabelsGroup].forEach(function(e){e&&(i.state&&e.removeClass("highcharts-series-"+i.state),t&&e.addClass("highcharts-series-"+t))}),i.state=t,!i.chart.styledMode)){if(a[t]&&!1===a[t].enabled)return;if(t&&(r=a[t].lineWidth||r+(a[t].lineWidthPlus||0),l=f(a[t].opacity,l)),n&&!n.dashstyle)for(a={"stroke-width":r},n.animate(a,h);i["zone-graph-"+s];)i["zone-graph-"+s].attr(a),s+=1;o||[i.group,i.markerGroup,i.dataLabelsGroup,i.labelBySeries].forEach(function(t){t&&t.animate({opacity:l},h)})}e&&o&&i.points&&i.points.forEach(function(e){e.setState&&e.setState(t)})},setVisible:function(t,e){var i,s=this,n=s.chart,o=s.legendItem,a=n.options.chart.ignoreHiddenSeries,r=s.visible;i=(s.visible=t=s.options.visible=s.userOptions.visible=void 0===t?!r:t)?"show":"hide",["group","dataLabelsGroup","markerGroup","tracker","tt"].forEach(function(t){s[t]&&s[t][i]()}),n.hoverSeries!==s&&(n.hoverPoint&&n.hoverPoint.series)!==s||s.onMouseOut(),o&&n.legend.colorizeItem(s,t),s.isDirty=!0,s.options.stacking&&n.series.forEach(function(t){t.options.stacking&&t.visible&&(t.isDirty=!0)}),s.linkedSeries.forEach(function(e){e.setVisible(t,!1)}),a&&(n.isDirtyBox=!0),h(s,i),!1!==e&&n.redraw()},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(t){this.selected=t=this.options.selected=void 0===t?!this.selected:t,this.checkbox&&(this.checkbox.checked=t),h(this,t?"select":"unselect")},drawTracker:e.drawTrackerGraph})}),e(i,"parts/Responsive.js",[i["parts/Globals.js"]],function(t){var e=t.Chart,i=t.isArray,s=t.isObject,n=t.pick,o=t.splat;e.prototype.setResponsive=function(e,i){var s=this.options.responsive,n=[],o=this.currentResponsive;!i&&s&&s.rules&&s.rules.forEach(function(i){void 0===i._id&&(i._id=t.uniqueKey()),this.matchResponsiveRule(i,n,e)},this),i=t.merge.apply(0,n.map(function(e){return t.find(s.rules,function(t){return t._id===e}).chartOptions})),i.isResponsiveOptions=!0,(n=n.toString()||void 0)!==(o&&o.ruleIds)&&(o&&this.update(o.undoOptions,e),n?(o=this.currentOptions(i),o.isResponsiveOptions=!0,this.currentResponsive={ruleIds:n,mergedOptions:i,undoOptions:o},this.update(i,e)):this.currentResponsive=void 0)},e.prototype.matchResponsiveRule=function(t,e){var i=t.condition;(i.callback||function(){return this.chartWidth<=n(i.maxWidth,Number.MAX_VALUE)&&this.chartHeight<=n(i.maxHeight,Number.MAX_VALUE)&&this.chartWidth>=n(i.minWidth,0)&&this.chartHeight>=n(i.minHeight,0)}).call(this)&&e.push(t._id)},e.prototype.currentOptions=function(e){function a(e,r,l,h){var c;t.objectEach(e,function(t,e){if(!h&&-1<["series","xAxis","yAxis"].indexOf(e))for(t=o(t),l[e]=[],c=0;c<t.length;c++)r[e][c]&&(l[e][c]={},a(t[c],r[e][c],l[e][c],h+1));else s(t)?(l[e]=i(t)?[]:{},a(t,r[e]||{},l[e],h+1)):l[e]=n(r[e],null)})}var r={};return a(e,this.options,r,0),r}}),e(i,"masters/highcharts.src.js",[i["parts/Globals.js"]],function(t){return t}),e(i,"parts/Scrollbar.js",[i["parts/Globals.js"]],function(t){function e(t,e,i){this.init(t,e,i)}var i,s=t.addEvent,n=t.Axis,o=t.correctFloat,a=t.defaultOptions,r=t.defined,l=t.destroyObjectProperties,h=t.fireEvent,c=t.hasTouch,d=t.merge,p=t.pick,u=t.removeEvent,f={height:t.isTouchDevice?20:14,barBorderRadius:0,buttonBorderRadius:0,liveRedraw:void 0,margin:10,minWidth:6,step:.2,zIndex:3,barBackgroundColor:"#cccccc",barBorderWidth:1,barBorderColor:"#cccccc",buttonArrowColor:"#333333",buttonBackgroundColor:"#e6e6e6",buttonBorderColor:"#cccccc",buttonBorderWidth:1,rifleColor:"#333333",trackBackgroundColor:"#f2f2f2",trackBorderColor:"#f2f2f2",trackBorderWidth:1};a.scrollbar=d(!0,f,a.scrollbar),t.swapXY=i=function(t,e){var i,s=t.length;if(e)for(e=0;e<s;e+=3)i=t[e+1],t[e+1]=t[e+2],t[e+2]=i;return t},e.prototype={init:function(t,e,i){this.scrollbarButtons=[],this.renderer=t,this.userOptions=e,this.options=d(f,e),this.chart=i,this.size=p(this.options.size,this.options.height),e.enabled&&(this.render(),this.initEvents(),this.addEvents())},render:function(){var t,e=this.renderer,s=this.options,n=this.size,o=this.chart.styledMode;this.group=t=e.g("scrollbar").attr({zIndex:s.zIndex,translateY:-99999}).add(),this.track=e.rect().addClass("highcharts-scrollbar-track").attr({x:0,r:s.trackBorderRadius||0,height:n,width:n}).add(t),o||this.track.attr({fill:s.trackBackgroundColor,stroke:s.trackBorderColor,"stroke-width":s.trackBorderWidth}),this.trackBorderWidth=this.track.strokeWidth(),this.track.attr({y:-this.trackBorderWidth%2/2}),this.scrollbarGroup=e.g().add(t),this.scrollbar=e.rect().addClass("highcharts-scrollbar-thumb").attr({height:n,width:n,r:s.barBorderRadius||0}).add(this.scrollbarGroup),this.scrollbarRifles=e.path(i(["M",-3,n/4,"L",-3,2*n/3,"M",0,n/4,"L",0,2*n/3,"M",3,n/4,"L",3,2*n/3],s.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup),o||(this.scrollbar.attr({fill:s.barBackgroundColor,stroke:s.barBorderColor,"stroke-width":s.barBorderWidth}),this.scrollbarRifles.attr({stroke:s.rifleColor,"stroke-width":1})),this.scrollbarStrokeWidth=this.scrollbar.strokeWidth(),this.scrollbarGroup.translate(-this.scrollbarStrokeWidth%2/2,-this.scrollbarStrokeWidth%2/2),this.drawScrollbarButton(0),this.drawScrollbarButton(1)},position:function(t,e,i,s){var n=this.options.vertical,o=0,a=this.rendered?"animate":"attr";this.x=t,this.y=e+this.trackBorderWidth,this.width=i,this.xOffset=this.height=s,this.yOffset=o,n?(this.width=this.yOffset=i=o=this.size,this.xOffset=e=0,this.barWidth=s-2*i,this.x=t+=this.options.margin):(this.height=this.xOffset=s=e=this.size,this.barWidth=i-2*s,this.y+=this.options.margin),this.group[a]({translateX:t,translateY:this.y}),this.track[a]({width:i,height:s}),this.scrollbarButtons[1][a]({translateX:n?0:i-e,translateY:n?s-o:0})},drawScrollbarButton:function(t){var e,s=this.renderer,n=this.scrollbarButtons,o=this.options,a=this.size;e=s.g().add(this.group),n.push(e),e=s.rect().addClass("highcharts-scrollbar-button").add(e),this.chart.styledMode||e.attr({stroke:o.buttonBorderColor,"stroke-width":o.buttonBorderWidth,fill:o.buttonBackgroundColor}),e.attr(e.crisp({x:-.5,y:-.5,width:a+1,height:a+1,r:o.buttonBorderRadius},e.strokeWidth())),e=s.path(i(["M",a/2+(t?-1:1),a/2-3,"L",a/2+(t?-1:1),a/2+3,"L",a/2+(t?2:-2),a/2],o.vertical)).addClass("highcharts-scrollbar-arrow").add(n[t]),this.chart.styledMode||e.attr({fill:o.buttonArrowColor})},setRange:function(t,e){var i,s,n=this.options,a=n.vertical,l=n.minWidth,h=this.barWidth,c=!this.rendered||this.hasDragged||this.chart.navigator&&this.chart.navigator.hasDragged?"attr":"animate";r(h)&&(t=Math.max(t,0),i=Math.ceil(h*t),this.calculatedWidth=s=o(h*Math.min(e,1)-i),s<l&&(i=(h-l+s)*t,s=l),l=Math.floor(i+this.xOffset+this.yOffset),h=s/2-.5,this.from=t,this.to=e,a?(this.scrollbarGroup[c]({translateY:l}),this.scrollbar[c]({height:s}),this.scrollbarRifles[c]({translateY:h}),this.scrollbarTop=l,this.scrollbarLeft=0):(this.scrollbarGroup[c]({translateX:l}),this.scrollbar[c]({width:s}),this.scrollbarRifles[c]({translateX:h}),this.scrollbarLeft=l,this.scrollbarTop=0),12>=s?this.scrollbarRifles.hide():this.scrollbarRifles.show(!0),!1===n.showFull&&(0>=t&&1<=e?this.group.hide():this.group.show()),this.rendered=!0)},initEvents:function(){var t=this;t.mouseMoveHandler=function(e){var i=t.chart.pointer.normalize(e),s=t.options.vertical?"chartY":"chartX",n=t.initPositions;!t.grabbedCenter||e.touches&&0===e.touches[0][s]||(i=t.cursorToScrollbarPosition(i)[s],s=t[s],s=i-s,t.hasDragged=!0,t.updatePosition(n[0]+s,n[1]+s),t.hasDragged&&h(t,"changed",{from:t.from,to:t.to,trigger:"scrollbar",DOMType:e.type,DOMEvent:e}))},t.mouseUpHandler=function(e){t.hasDragged&&h(t,"changed",{from:t.from,to:t.to,trigger:"scrollbar",DOMType:e.type,DOMEvent:e}),t.grabbedCenter=t.hasDragged=t.chartX=t.chartY=null},t.mouseDownHandler=function(e){e=t.chart.pointer.normalize(e),e=t.cursorToScrollbarPosition(e),t.chartX=e.chartX,t.chartY=e.chartY,t.initPositions=[t.from,t.to],t.grabbedCenter=!0},t.buttonToMinClick=function(e){var i=o(t.to-t.from)*t.options.step;t.updatePosition(o(t.from-i),o(t.to-i)),h(t,"changed",{from:t.from,to:t.to,trigger:"scrollbar",DOMEvent:e})},t.buttonToMaxClick=function(e){var i=(t.to-t.from)*t.options.step;t.updatePosition(t.from+i,t.to+i),h(t,"changed",{from:t.from,to:t.to,trigger:"scrollbar",DOMEvent:e})},t.trackClick=function(e){var i=t.chart.pointer.normalize(e),s=t.to-t.from,n=t.y+t.scrollbarTop,o=t.x+t.scrollbarLeft;t.options.vertical&&i.chartY>n||!t.options.vertical&&i.chartX>o?t.updatePosition(t.from+s,t.to+s):t.updatePosition(t.from-s,t.to-s),h(t,"changed",{from:t.from,to:t.to,trigger:"scrollbar",DOMEvent:e})}},cursorToScrollbarPosition:function(t){var e=this.options,e=e.minWidth>this.calculatedWidth?e.minWidth:0;return{chartX:(t.chartX-this.x-this.xOffset)/(this.barWidth-e),chartY:(t.chartY-this.y-this.yOffset)/(this.barWidth-e)}},updatePosition:function(t,e){1<e&&(t=o(1-o(e-t)),e=1),0>t&&(e=o(e-t),t=0),this.from=t,this.to=e},update:function(t){this.destroy(),this.init(this.chart.renderer,d(!0,this.options,t),this.chart)},addEvents:function(){var t=this.options.inverted?[1,0]:[0,1],e=this.scrollbarButtons,i=this.scrollbarGroup.element,n=this.mouseDownHandler,o=this.mouseMoveHandler,a=this.mouseUpHandler,t=[[e[t[0]].element,"click",this.buttonToMinClick],[e[t[1]].element,"click",this.buttonToMaxClick],[this.track.element,"click",this.trackClick],[i,"mousedown",n],[i.ownerDocument,"mousemove",o],[i.ownerDocument,"mouseup",a]];c&&t.push([i,"touchstart",n],[i.ownerDocument,"touchmove",o],[i.ownerDocument,"touchend",a]),t.forEach(function(t){s.apply(null,t)}),this._events=t},removeEvents:function(){this._events.forEach(function(t){u.apply(null,t)}),this._events.length=0},destroy:function(){var t=this.chart.scroller;this.removeEvents(),["track","scrollbarRifles","scrollbar","scrollbarGroup","group"].forEach(function(t){this[t]&&this[t].destroy&&(this[t]=this[t].destroy())},this),t&&this===t.scrollbar&&(t.scrollbar=null,l(t.scrollbarButtons))}},t.Scrollbar||(s(n,"afterInit",function(){var i=this;i.options&&i.options.scrollbar&&i.options.scrollbar.enabled&&(i.options.scrollbar.vertical=!i.horiz,i.options.startOnTick=i.options.endOnTick=!1,i.scrollbar=new e(i.chart.renderer,i.options.scrollbar,i.chart),s(i.scrollbar,"changed",function(e){var s,n=Math.min(p(i.options.min,i.min),i.min,i.dataMin),o=Math.max(p(i.options.max,i.max),i.max,i.dataMax)-n;i.horiz&&!i.reversed||!i.horiz&&i.reversed?(s=n+o*this.to,n+=o*this.from):(s=n+o*(1-this.from),n+=o*(1-this.to)),p(this.options.liveRedraw,t.svg&&!t.isTouchDevice&&!this.chart.isBoosting)||"mouseup"===e.DOMType||!r(e.DOMType)?i.setExtremes(n,s,!0,"mousemove"!==e.DOMType,e):this.setRange(this.from,this.to)}))}),s(n,"afterRender",function(){var t=Math.min(p(this.options.min,this.min),this.min,p(this.dataMin,this.min)),e=Math.max(p(this.options.max,this.max),this.max,p(this.dataMax,this.max)),i=this.scrollbar,s=this.titleOffset||0;i&&(this.horiz?(i.position(this.left,this.top+this.height+2+this.chart.scrollbarsOffsets[1]+(this.opposite?0:s+this.axisTitleMargin+this.offset),this.width,this.height),s=1):(i.position(this.left+this.width+2+this.chart.scrollbarsOffsets[0]+(this.opposite?s+this.axisTitleMargin+this.offset:0),this.top,this.width,this.height),s=0),(!this.opposite&&!this.horiz||this.opposite&&this.horiz)&&(this.chart.scrollbarsOffsets[s]+=this.scrollbar.size+this.scrollbar.options.margin),isNaN(t)||isNaN(e)||!r(this.min)||!r(this.max)?i.setRange(0,0):(s=(this.min-t)/(e-t),t=(this.max-t)/(e-t),this.horiz&&!this.reversed||!this.horiz&&this.reversed?i.setRange(s,t):i.setRange(1-t,1-s)))}),s(n,"afterGetOffset",function(){var t=this.horiz?2:1,e=this.scrollbar;e&&(this.chart.scrollbarsOffsets=[0,0],this.chart.axisOffset[t]+=e.size+e.options.margin)}),t.Scrollbar=e)}),e(i,"parts/Navigator.js",[i["parts/Globals.js"]],function(t){function e(t){this.init(t)}var i,s=t.addEvent,n=t.Axis,o=t.Chart,a=t.color,r=t.defaultOptions,l=t.defined,h=t.destroyObjectProperties,c=t.erase,d=t.extend,p=t.hasTouch,u=t.isArray,f=t.isNumber,g=t.isTouchDevice,m=t.merge,v=t.pick,x=t.removeEvent,y=t.Scrollbar,b=t.Series,w=function(t){var e=[].filter.call(arguments,f);if(e.length)return Math[t].apply(0,e)};i=void 0===t.seriesTypes.areaspline?"line":"areaspline",d(r,{navigator:{height:40,margin:25,maskInside:!0,handles:{width:7,height:15,symbols:["navigator-handle","navigator-handle"],enabled:!0,lineWidth:1,backgroundColor:"#f2f2f2",borderColor:"#999999"},maskFill:a("#6685c2").setOpacity(.3).get(),outlineColor:"#cccccc",outlineWidth:1,series:{type:i,fillOpacity:.05,lineWidth:1,compare:null,dataGrouping:{approximation:"average",enabled:!0,groupPixelWidth:2,smoothed:!0,units:[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2,3,4]],["week",[1,2,3]],["month",[1,3,6]],["year",null]]},dataLabels:{enabled:!1,zIndex:2},id:"highcharts-navigator-series",className:"highcharts-navigator-series",lineColor:null,marker:{enabled:!1},pointRange:0,threshold:null},xAxis:{overscroll:0,className:"highcharts-navigator-xaxis",tickLength:0,lineWidth:0,gridLineColor:"#e6e6e6",gridLineWidth:1,tickPixelInterval:200,labels:{align:"left",style:{color:"#999999"},x:3,y:-4},crosshair:!1},yAxis:{className:"highcharts-navigator-yaxis",gridLineWidth:0,startOnTick:!1,endOnTick:!1,minPadding:.1,maxPadding:.1,labels:{enabled:!1},crosshair:!1,title:{text:null},tickLength:0,tickWidth:0}}}),t.Renderer.prototype.symbols["navigator-handle"]=function(t,e,i,s,n){return t=n.width/2,e=Math.round(t/3)+.5,n=n.height,["M",-t-1,.5,"L",t,.5,"L",t,n+.5,"L",-t-1,n+.5,"L",-t-1,.5,"M",-e,4,"L",-e,n-3,"M",e-1,4,"L",e-1,n-3]},n.prototype.toFixedRange=function(t,e,i,s){var n=this.chart&&this.chart.fixedRange;return t=v(i,this.translate(t,!0,!this.horiz)),e=v(s,this.translate(e,!0,!this.horiz)),i=n&&(e-t)/n,.7<i&&1.3>i&&(s?t=e-n:e=t+n),f(t)&&f(e)||(t=e=void 0),{min:t,max:e}},e.prototype={drawHandle:function(t,e,i,s){var n=this.navigatorOptions.handles.height;this.handles[e][s](i?{translateX:Math.round(this.left+this.height/2),translateY:Math.round(this.top+parseInt(t,10)+.5-n)}:{translateX:Math.round(this.left+parseInt(t,10)),translateY:Math.round(this.top+this.height/2-n/2-1)})},drawOutline:function(t,e,i,s){var n=this.navigatorOptions.maskInside,o=this.outline.strokeWidth(),a=o/2,o=o%2/2,r=this.outlineHeight,l=this.scrollbarHeight,h=this.size,c=this.left-l,d=this.top;i?(c-=a,i=d+e+o,e=d+t+o,t=["M",c+r,d-l-o,"L",c+r,i,"L",c,i,"L",c,e,"L",c+r,e,"L",c+r,d+h+l].concat(n?["M",c+r,i-a,"L",c+r,e+a]:[])):(t+=c+l-o,e+=c+l-o,d+=a,t=["M",c,d,"L",t,d,"L",t,d+r,"L",e,d+r,"L",e,d,"L",c+h+2*l,d].concat(n?["M",t-a,d,"L",e+a,d]:[])),this.outline[s]({d:t})},drawMasks:function(t,e,i,s){var n,o,a,r,l=this.left,h=this.top,c=this.height;i?(a=[l,l,l],r=[h,h+t,h+e],o=[c,c,c],n=[t,e-t,this.size-e]):(a=[l,l+t,l+e],r=[h,h,h],o=[t,e-t,this.size-e],n=[c,c,c]),this.shades.forEach(function(t,e){t[s]({x:a[e],y:r[e],width:o[e],height:n[e]})})},renderElements:function(){var t,e=this,i=e.navigatorOptions,s=i.maskInside,n=e.chart,o=n.renderer,a={cursor:n.inverted?"ns-resize":"ew-resize"};e.navigatorGroup=t=o.g("navigator").attr({zIndex:8,visibility:"hidden"}).add(),[!s,s,!s].forEach(function(s,r){e.shades[r]=o.rect().addClass("highcharts-navigator-mask"+(1===r?"-inside":"-outside")).add(t),n.styledMode||e.shades[r].attr({fill:s?i.maskFill:"rgba(0,0,0,0)"}).css(1===r&&a)}),e.outline=o.path().addClass("highcharts-navigator-outline").add(t),n.styledMode||e.outline.attr({"stroke-width":i.outlineWidth,stroke:i.outlineColor}),i.handles.enabled&&[0,1].forEach(function(s){if(i.handles.inverted=n.inverted,e.handles[s]=o.symbol(i.handles.symbols[s],-i.handles.width/2-1,0,i.handles.width,i.handles.height,i.handles),e.handles[s].attr({zIndex:7-s}).addClass("highcharts-navigator-handle highcharts-navigator-handle-"+["left","right"][s]).add(t),!n.styledMode){var r=i.handles;e.handles[s].attr({fill:r.backgroundColor,stroke:r.borderColor,"stroke-width":r.lineWidth}).css(a)}})},update:function(t){(this.series||[]).forEach(function(t){t.baseSeries&&delete t.baseSeries.navigatorSeries}),this.destroy(),m(!0,this.chart.options.navigator,this.options,t),this.init(this.chart)},render:function(e,i,s,n){var o,a,r,h=this.chart,c=this.scrollbarHeight,d=this.xAxis;o=d.fake?h.xAxis[0]:d;var p,u=this.navigatorEnabled,g=this.rendered;a=h.inverted;var m,x=h.xAxis[0].minRange,y=h.xAxis[0].options.maxRange;if(!this.hasDragged||l(s)){if(!f(e)||!f(i)){if(!g)return;s=0,n=v(d.width,o.width)}this.left=v(d.left,h.plotLeft+c+(a?h.plotWidth:0)),this.size=p=r=v(d.len,(a?h.plotHeight:h.plotWidth)-2*c),h=a?c:r+2*c,s=v(s,d.toPixels(e,!0)),n=v(n,d.toPixels(i,!0)),f(s)&&1/0!==Math.abs(s)||(s=0,n=h),e=d.toValue(s,!0),i=d.toValue(n,!0),m=Math.abs(t.correctFloat(i-e)),m<x?this.grabbedLeft?s=d.toPixels(i-x,!0):this.grabbedRight&&(n=d.toPixels(e+x,!0)):l(y)&&m>y&&(this.grabbedLeft?s=d.toPixels(i-y,!0):this.grabbedRight&&(n=d.toPixels(e+y,!0))),this.zoomedMax=Math.min(Math.max(s,n,0),p),this.zoomedMin=Math.min(Math.max(this.fixedWidth?this.zoomedMax-this.fixedWidth:Math.min(s,n),0),p),this.range=this.zoomedMax-this.zoomedMin,p=Math.round(this.zoomedMax),s=Math.round(this.zoomedMin),u&&(this.navigatorGroup.attr({visibility:"visible"}),g=g&&!this.hasDragged?"animate":"attr",this.drawMasks(s,p,a,g),this.drawOutline(s,p,a,g),this.navigatorOptions.handles.enabled&&(this.drawHandle(s,0,a,g),this.drawHandle(p,1,a,g))),this.scrollbar&&(a?(a=this.top-c,o=this.left-c+(u||!o.opposite?0:(o.titleOffset||0)+o.axisTitleMargin),c=r+2*c):(a=this.top+(u?this.height:-c),o=this.left-c),this.scrollbar.position(o,a,h,c),this.scrollbar.setRange(this.zoomedMin/(r||1),this.zoomedMax/(r||1))),this.rendered=!0}},addMouseEvents:function(){var t,e,i=this,n=i.chart,o=n.container,a=[];i.mouseMoveHandler=t=function(t){i.onMouseMove(t)},i.mouseUpHandler=e=function(t){i.onMouseUp(t)},a=i.getPartsEvents("mousedown"),a.push(s(o,"mousemove",t),s(o.ownerDocument,"mouseup",e)),p&&(a.push(s(o,"touchmove",t),s(o.ownerDocument,"touchend",e)),a.concat(i.getPartsEvents("touchstart"))),i.eventsToUnbind=a,i.series&&i.series[0]&&a.push(s(i.series[0].xAxis,"foundExtremes",function(){n.navigator.modifyNavigatorAxisExtremes()}))},getPartsEvents:function(t){var e=this,i=[];return["shades","handles"].forEach(function(n){e[n].forEach(function(o,a){i.push(s(o.element,t,function(t){e[n+"Mousedown"](t,a)}))})}),i},shadesMousedown:function(t,e){t=this.chart.pointer.normalize(t);var i,s,n=this.chart,o=this.xAxis,a=this.zoomedMin,r=this.left,h=this.size,c=this.range,d=t.chartX;n.inverted&&(d=t.chartY,r=this.top),1===e?(this.grabbedCenter=d,this.fixedWidth=c,this.dragOffset=d-a):(t=d-r-c/2,0===e?t=Math.max(0,t):2===e&&t+c>=h&&(t=h-c,this.reversedExtremes?(t-=c,s=this.getUnionExtremes().dataMin):i=this.getUnionExtremes().dataMax),t!==a&&(this.fixedWidth=c,e=o.toFixedRange(t,t+c,s,i),l(e.min)&&n.xAxis[0].setExtremes(Math.min(e.min,e.max),Math.max(e.min,e.max),!0,null,{trigger:"navigator"})))},handlesMousedown:function(t,e){this.chart.pointer.normalize(t),t=this.chart;var i=t.xAxis[0],s=this.reversedExtremes;0===e?(this.grabbedLeft=!0,this.otherHandlePos=this.zoomedMax,this.fixedExtreme=s?i.min:i.max):(this.grabbedRight=!0,this.otherHandlePos=this.zoomedMin,this.fixedExtreme=s?i.max:i.min),t.fixedRange=null},onMouseMove:function(e){var i=this,s=i.chart,n=i.left,o=i.navigatorSize,a=i.range,r=i.dragOffset,l=s.inverted;e.touches&&0===e.touches[0].pageX||(e=s.pointer.normalize(e),s=e.chartX,l&&(n=i.top,s=e.chartY),i.grabbedLeft?(i.hasDragged=!0,i.render(0,0,s-n,i.otherHandlePos)):i.grabbedRight?(i.hasDragged=!0,i.render(0,0,i.otherHandlePos,s-n)):i.grabbedCenter&&(i.hasDragged=!0,s<r?s=r:s>o+r-a&&(s=o+r-a),i.render(0,0,s-r,s-r+a)),i.hasDragged&&i.scrollbar&&v(i.scrollbar.options.liveRedraw,t.svg&&!g&&!this.chart.isBoosting)&&(e.DOMType=e.type,setTimeout(function(){i.onMouseUp(e)},0)))},onMouseUp:function(t){var e,i,s=this.chart,n=this.xAxis,o=this.scrollbar,a=t.DOMEvent||t;(!this.hasDragged||o&&o.hasDragged)&&"scrollbar"!==t.trigger||(o=this.getUnionExtremes(),this.zoomedMin===this.otherHandlePos?e=this.fixedExtreme:this.zoomedMax===this.otherHandlePos&&(i=this.fixedExtreme),this.zoomedMax===this.size&&(i=this.reversedExtremes?o.dataMin:o.dataMax),0===this.zoomedMin&&(e=this.reversedExtremes?o.dataMax:o.dataMin),n=n.toFixedRange(this.zoomedMin,this.zoomedMax,e,i),l(n.min)&&s.xAxis[0].setExtremes(Math.min(n.min,n.max),Math.max(n.min,n.max),!0,!this.hasDragged&&null,{trigger:"navigator",triggerOp:"navigator-drag",DOMEvent:a})),"mousemove"!==t.DOMType&&(this.grabbedLeft=this.grabbedRight=this.grabbedCenter=this.fixedWidth=this.fixedExtreme=this.otherHandlePos=this.hasDragged=this.dragOffset=null)},removeEvents:function(){this.eventsToUnbind&&(this.eventsToUnbind.forEach(function(t){t()}),this.eventsToUnbind=void 0),this.removeBaseSeriesEvents()},removeBaseSeriesEvents:function(){var t=this.baseSeries||[];this.navigatorEnabled&&t[0]&&(!1!==this.navigatorOptions.adaptToUpdatedData&&t.forEach(function(t){x(t,"updatedData",this.updatedDataHandler)},this),t[0].xAxis&&x(t[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes))},init:function(t){var e=t.options,i=e.navigator,o=i.enabled,a=e.scrollbar,r=a.enabled,e=o?i.height:0,l=r?a.height:0;this.handles=[],this.shades=[],this.chart=t,this.setBaseSeries(),this.height=e,this.scrollbarHeight=l,this.scrollbarEnabled=r,this.navigatorEnabled=o,this.navigatorOptions=i,this.scrollbarOptions=a,this.outlineHeight=e+l,this.opposite=v(i.opposite,!o&&t.inverted);var h=this,o=h.baseSeries,a=t.xAxis.length,r=t.yAxis.length,c=o&&o[0]&&o[0].xAxis||t.xAxis[0]||{options:{}};t.isDirtyBox=!0,h.navigatorEnabled?(h.xAxis=new n(t,m({breaks:c.options.breaks,ordinal:c.options.ordinal},i.xAxis,{id:"navigator-x-axis",yAxis:"navigator-y-axis",isX:!0,type:"datetime",index:a,isInternal:!0,offset:0,keepOrdinalPadding:!0,startOnTick:!1,endOnTick:!1,minPadding:0,maxPadding:0,zoomEnabled:!1},t.inverted?{offsets:[l,0,-l,0],width:e}:{offsets:[0,-l,0,l],height:e})),h.yAxis=new n(t,m(i.yAxis,{id:"navigator-y-axis",alignTicks:!1,offset:0,index:r,isInternal:!0,zoomEnabled:!1},t.inverted?{width:e}:{height:e})),o||i.series.data?h.updateNavigatorSeries(!1):0===t.series.length&&(h.unbindRedraw=s(t,"beforeRedraw",function(){0<t.series.length&&!h.series&&(h.setBaseSeries(),h.unbindRedraw())})),h.reversedExtremes=t.inverted&&!h.xAxis.reversed||!t.inverted&&h.xAxis.reversed,h.renderElements(),h.addMouseEvents()):h.xAxis={translate:function(e,i){var s=t.xAxis[0],n=s.getExtremes(),o=s.len-2*l,a=w("min",s.options.min,n.dataMin),s=w("max",s.options.max,n.dataMax)-a;return i?e*s/o+a:o*(e-a)/s},toPixels:function(t){return this.translate(t)},toValue:function(t){return this.translate(t,!0)},toFixedRange:n.prototype.toFixedRange,fake:!0},t.options.scrollbar.enabled&&(t.scrollbar=h.scrollbar=new y(t.renderer,m(t.options.scrollbar,{margin:h.navigatorEnabled?0:10,vertical:t.inverted}),t),s(h.scrollbar,"changed",function(e){var i=h.size,s=i*this.to,i=i*this.from;h.hasDragged=h.scrollbar.hasDragged,h.render(0,0,i,s),(t.options.scrollbar.liveRedraw||"mousemove"!==e.DOMType&&"touchmove"!==e.DOMType)&&setTimeout(function(){h.onMouseUp(e)})})),h.addBaseSeriesEvents(),h.addChartEvents()},getUnionExtremes:function(t){var e,i=this.chart.xAxis[0],s=this.xAxis,n=s.options,o=i.options;return t&&null===i.dataMin||(e={dataMin:v(n&&n.min,w("min",o.min,i.dataMin,s.dataMin,s.min)),dataMax:v(n&&n.max,w("max",o.max,i.dataMax,s.dataMax,s.max))}),e},setBaseSeries:function(e,i){var s=this.chart,n=this.baseSeries=[];e=e||s.options&&s.options.navigator.baseSeries||(s.series.length?t.find(s.series,function(t){return!t.options.isInternal}).index:0),(s.series||[]).forEach(function(t,i){t.options.isInternal||!t.options.showInNavigator&&(i!==e&&t.options.id!==e||!1===t.options.showInNavigator)||n.push(t)}),this.xAxis&&!this.xAxis.fake&&this.updateNavigatorSeries(!0,i)},updateNavigatorSeries:function(e,i){var s,n,o,a=this,l=a.chart,h=a.baseSeries,c=a.navigatorOptions.series,p={enableMouseTracking:!1,index:null,linkedTo:null,group:"nav",padXAxis:!1,xAxis:"navigator-x-axis",yAxis:"navigator-y-axis",showInLegend:!1,stacking:!1,isInternal:!0,states:{inactive:{opacity:1}}},f=a.series=(a.series||[]).filter(function(t){var e=t.baseSeries;return!(0>h.indexOf(e))||(e&&(x(e,"updatedData",a.updatedDataHandler),delete e.navigatorSeries),t.chart&&t.destroy(),!1)});h&&h.length&&h.forEach(function(t){var e=t.navigatorSeries,g=d({color:t.color,visible:t.visible},u(c)?r.navigator.series:c);e&&!1===a.navigatorOptions.adaptToUpdatedData||(p.name="Navigator "+h.length,s=t.options||{},o=s.navigatorOptions||{},n=m(s,p,g,o),g=o.data||g.data,a.hasNavigatorData=a.hasNavigatorData||!!g,n.data=g||s.data&&s.data.slice(0),e&&e.options?e.update(n,i):(t.navigatorSeries=l.initSeries(n),t.navigatorSeries.baseSeries=t,f.push(t.navigatorSeries)))}),(!c.data||h&&h.length)&&!u(c)||(a.hasNavigatorData=!1,c=t.splat(c),c.forEach(function(t,e){p.name="Navigator "+(f.length+1),n=m(r.navigator.series,{color:l.series[e]&&!l.series[e].options.isInternal&&l.series[e].color||l.options.colors[e]||l.options.colors[0]},p,t),n.data=t.data,n.data&&(a.hasNavigatorData=!0,f.push(l.initSeries(n)))})),e&&this.addBaseSeriesEvents()},addBaseSeriesEvents:function(){var t=this,e=t.baseSeries||[];e[0]&&e[0].xAxis&&s(e[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes),e.forEach(function(e){s(e,"show",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!0,!1)}),s(e,"hide",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!1,!1)}),!1!==this.navigatorOptions.adaptToUpdatedData&&e.xAxis&&s(e,"updatedData",this.updatedDataHandler),s(e,"remove",function(){this.navigatorSeries&&(c(t.series,this.navigatorSeries),l(this.navigatorSeries.options)&&this.navigatorSeries.remove(!1),delete this.navigatorSeries)})},this)},getBaseSeriesMin:function(t){return this.baseSeries.reduce(function(t,e){return Math.min(t,e.xData?e.xData[0]:t)},t)},modifyNavigatorAxisExtremes:function(){var t,e=this.xAxis;e.getExtremes&&(!(t=this.getUnionExtremes(!0))||t.dataMin===e.min&&t.dataMax===e.max||(e.min=t.dataMin,e.max=t.dataMax))},modifyBaseAxisExtremes:function(){var t,e,i=this.chart.navigator,s=this.getExtremes(),n=s.dataMin,o=s.dataMax,s=s.max-s.min,a=i.stickToMin,r=i.stickToMax,l=v(this.options.overscroll,0),h=i.series&&i.series[0],c=!!this.setExtremes;this.eventArgs&&"rangeSelectorButton"===this.eventArgs.trigger||(a&&(e=n,t=e+s),r&&(t=o+l,a||(e=Math.max(t-s,i.getBaseSeriesMin(h&&h.xData?h.xData[0]:-Number.MAX_VALUE)))),c&&(a||r)&&f(e)&&(this.min=this.userMin=e,this.max=this.userMax=t)),i.stickToMin=i.stickToMax=null},updatedDataHandler:function(){var t=this.chart.navigator,e=this.navigatorSeries,i=t.getBaseSeriesMin(this.xData[0]);t.stickToMax=t.reversedExtremes?0===Math.round(t.zoomedMin):Math.round(t.zoomedMax)>=Math.round(t.size),t.stickToMin=f(this.xAxis.min)&&this.xAxis.min<=i&&(!this.chart.fixedRange||!t.stickToMax),e&&!t.hasNavigatorData&&(e.options.pointStart=this.xData[0],e.setData(this.options.data,!1,null,!1))},addChartEvents:function(){this.eventsToUnbind||(this.eventsToUnbind=[]),this.eventsToUnbind.push(s(this.chart,"redraw",function(){var t=this.navigator,e=t&&(t.baseSeries&&t.baseSeries[0]&&t.baseSeries[0].xAxis||t.scrollbar&&this.xAxis[0]);e&&t.render(e.min,e.max)}),s(this.chart,"getMargins",function(){var t=this.navigator,e=t.opposite?"plotTop":"marginBottom";this.inverted&&(e=t.opposite?"marginRight":"plotLeft"),this[e]=(this[e]||0)+(t.navigatorEnabled||!this.inverted?t.outlineHeight:0)+t.navigatorOptions.margin}))},destroy:function(){this.removeEvents(),this.xAxis&&(c(this.chart.xAxis,this.xAxis),c(this.chart.axes,this.xAxis)),this.yAxis&&(c(this.chart.yAxis,this.yAxis),c(this.chart.axes,this.yAxis)),(this.series||[]).forEach(function(t){t.destroy&&t.destroy()}),"series xAxis yAxis shades outline scrollbarTrack scrollbarRifles scrollbarGroup scrollbar navigatorGroup rendered".split(" ").forEach(function(t){this[t]&&this[t].destroy&&this[t].destroy(),this[t]=null},this),[this.handles].forEach(function(t){h(t)},this)}},t.Navigator||(t.Navigator=e,s(n,"zoom",function(t){var e=this.chart.options,i=e.chart.zoomType,s=e.chart.pinchType,n=e.navigator,e=e.rangeSelector;this.isXAxis&&(n&&n.enabled||e&&e.enabled)&&("y"===i?t.zoomed=!1:(!g&&"xy"===i||g&&"xy"===s)&&this.options.range&&(i=this.previousZoom,l(t.newMin)?this.previousZoom=[this.min,this.max]:i&&(t.newMin=i[0],t.newMax=i[1],delete this.previousZoom))),void 0!==t.zoomed&&t.preventDefault()}),s(o,"beforeShowResetZoom",function(){var t=this.options,e=t.navigator,i=t.rangeSelector;if((e&&e.enabled||i&&i.enabled)&&(!g&&"x"===t.chart.zoomType||g&&"x"===t.chart.pinchType))return!1}),s(o,"beforeRender",function(){var t=this.options;(t.navigator.enabled||t.scrollbar.enabled)&&(this.scroller=this.navigator=new e(this))}),s(o,"afterSetChartSize",function(){var t,e,i,s,n=this.legend,o=this.navigator;o&&(e=n&&n.options,i=o.xAxis,s=o.yAxis,t=o.scrollbarHeight,this.inverted?(o.left=o.opposite?this.chartWidth-t-o.height:this.spacing[3]+t,o.top=this.plotTop+t):(o.left=this.plotLeft+t,o.top=o.navigatorOptions.top||this.chartHeight-o.height-t-this.spacing[2]-(this.rangeSelector&&this.extraBottomMargin?this.rangeSelector.getHeight():0)-(e&&"bottom"===e.verticalAlign&&e.enabled&&!e.floating?n.legendHeight+v(e.margin,10):0)),i&&s&&(this.inverted?i.options.left=s.options.left=o.left:i.options.top=s.options.top=o.top,i.setAxisSize(),s.setAxisSize()))}),s(o,"update",function(t){var e=t.options.navigator||{},i=t.options.scrollbar||{};this.navigator||this.scroller||!e.enabled&&!i.enabled||(m(!0,this.options.navigator,e),m(!0,this.options.scrollbar,i),delete t.options.navigator,delete t.options.scrollbar)}),s(o,"afterUpdate",function(t){this.navigator||this.scroller||!this.options.navigator.enabled&&!this.options.scrollbar.enabled||(this.scroller=this.navigator=new e(this),v(t.redraw,!0)&&this.redraw(t.animation))}),s(o,"afterAddSeries",function(){this.navigator&&this.navigator.setBaseSeries(null,!1)}),s(b,"afterUpdate",function(){this.chart.navigator&&!this.options.isInternal&&this.chart.navigator.setBaseSeries(null,!1)}),o.prototype.callbacks.push(function(t){var e=t.navigator;e&&t.xAxis[0]&&(t=t.xAxis[0].getExtremes(),e.render(t.min,t.max))}))}),e(i,"parts/OrdinalAxis.js",[i["parts/Globals.js"]],function(t){var e=t.addEvent,i=t.Axis,s=t.Chart,n=t.css,o=t.defined,a=t.extend,r=t.noop,l=t.pick,h=t.timeUnits;e(t.Series,"updatedData",function(){var t=this.xAxis;t&&t.options.ordinal&&delete t.ordinalIndex}),i.prototype.getTimeTicks=function(t,e,i,s,n,a,r){var l,c,d,p,u,f=0,g={},m=[],v=-Number.MAX_VALUE,x=this.options.tickPixelInterval,y=this.chart.time,b=[];if(!this.options.ordinal&&!this.options.breaks||!n||3>n.length||void 0===e)return y.getTimeTicks.apply(y,arguments);for(p=n.length,l=0;l<p;l++){if(u=l&&n[l-1]>i,n[l]<e&&(f=l),l===p-1||n[l+1]-n[l]>5*a||u){if(n[l]>v){for(c=y.getTimeTicks(t,n[f],n[l],s);c.length&&c[0]<=v;)c.shift();c.length&&(v=c[c.length-1]),b.push(m.length),m=m.concat(c)}f=l+1}if(u)break}if(c=c.info,r&&c.unitRange<=h.hour){for(l=m.length-1,f=1;f<l;f++)y.dateFormat("%d",m[f])!==y.dateFormat("%d",m[f-1])&&(g[m[f]]="day",d=!0);d&&(g[m[0]]="day"),c.higherRanks=g}if(c.segmentStarts=b,m.info=c,r&&o(x)){f=b=m.length,d=[];for(var w,y=[];f--;)l=this.translate(m[f]),w&&(y[f]=w-l),d[f]=w=l;for(y.sort(),y=y[Math.floor(y.length/2)],y<.6*x&&(y=null),f=m[b-1]>i?b-1:b,w=void 0;f--;)l=d[f],b=Math.abs(w-l),w&&b<.8*x&&(null===y||b<.8*y)?(g[m[f]]&&!g[m[f+1]]?(b=f+1,w=l):b=f,m.splice(b,1)):w=l}return m},a(i.prototype,{beforeSetTickPositions:function(){var t,e,i,s,n,o=[],a=!1,r=this.getExtremes(),h=r.min,c=r.max,d=this.isXAxis&&!!this.options.breaks,r=this.options.ordinal,p=Number.MAX_VALUE,u=this.chart.options.chart.ignoreHiddenSeries;if(r||d){if(this.series.forEach(function(i,s){if(e=[],!(u&&!1===i.visible||!1===i.takeOrdinalPosition&&!d)&&(o=o.concat(i.processedXData),t=o.length,o.sort(function(t,e){return t-e}),p=Math.min(p,l(i.closestPointRange,p)),t)){for(s=0;s<t-1;)o[s]!==o[s+1]&&e.push(o[s+1]),s++;e[0]!==o[0]&&e.unshift(o[0]),o=e}i.isSeriesBoosting&&(n=!0)}),n&&(o.length=0),2<(t=o.length)){for(i=o[1]-o[0],s=t-1;s--&&!a;)o[s+1]-o[s]!==i&&(a=!0);!this.options.keepOrdinalPadding&&(o[0]-h>i||c-o[o.length-1]>i)&&(a=!0)}else this.options.overscroll&&(2===t?p=o[1]-o[0]:1===t?(p=this.options.overscroll,o=[o[0],o[0]+p]):p=this.overscrollPointsRange);a?(this.options.overscroll&&(this.overscrollPointsRange=p,o=o.concat(this.getOverscrollPositions())),this.ordinalPositions=o,i=this.ordinal2lin(Math.max(h,o[0]),!0),s=Math.max(this.ordinal2lin(Math.min(c,o[o.length-1]),!0),1),this.ordinalSlope=c=(c-h)/(s-i),this.ordinalOffset=h-i*c):(this.overscrollPointsRange=l(this.closestPointRange,this.overscrollPointsRange),this.ordinalPositions=this.ordinalSlope=this.ordinalOffset=void 0)}this.isOrdinal=r&&a,this.groupIntervalFactor=null},val2lin:function(t,e){var i=this.ordinalPositions;if(i){var s,n,o=i.length;for(s=o;s--;)if(i[s]===t){n=s;break}for(s=o-1;s--;)if(t>i[s]||0===s){t=(t-i[s])/(i[s+1]-i[s]),n=s+t;break}e=e?n:this.ordinalSlope*(n||0)+this.ordinalOffset}else e=t;return e},lin2val:function(t,e){var i=this.ordinalPositions;if(i){var s,n=this.ordinalSlope,o=this.ordinalOffset,a=i.length-1;if(e)0>t?t=i[0]:t>a?t=i[a]:(a=Math.floor(t),s=t-a);else for(;a--;)if(e=n*a+o,t>=e){n=n*(a+1)+o,s=(t-e)/(n-e);break}return void 0!==s&&void 0!==i[a]?i[a]+(s?s*(i[a+1]-i[a]):0):t}return t},getExtendedPositions:function(){var t,e,s=this,n=s.chart,o=s.series[0].currentDataGrouping,a=s.ordinalIndex,l=o?o.count+o.unitName:"raw",h=s.options.overscroll,c=s.getExtremes();return a||(a=s.ordinalIndex={}),a[l]||(t={series:[],chart:n,getExtremes:function(){return{min:c.dataMin,max:c.dataMax+h}},options:{ordinal:!0},val2lin:i.prototype.val2lin,ordinal2lin:i.prototype.ordinal2lin},s.series.forEach(function(i){e={xAxis:t,xData:i.xData.slice(),chart:n,destroyGroupedData:r},e.xData=e.xData.concat(s.getOverscrollPositions()),e.options={dataGrouping:o?{enabled:!0,forced:!0,approximation:"open",units:[[o.unitName,[o.count]]]}:{enabled:!1}},i.processData.apply(e),t.series.push(e)}),s.beforeSetTickPositions.apply(t),a[l]=t.ordinalPositions),a[l]},getOverscrollPositions:function(){var e=this.options.overscroll,i=this.overscrollPointsRange,s=[],n=this.dataMax;if(t.defined(i))for(s.push(n);n<=this.dataMax+e;)n+=i,s.push(n);return s},getGroupIntervalFactor:function(t,e,i){var s;i=i.processedXData;var n=i.length,o=[];if(!(s=this.groupIntervalFactor)){for(s=0;s<n-1;s++)o[s]=i[s+1]-i[s];o.sort(function(t,e){return t-e}),o=o[Math.floor(n/2)],t=Math.max(t,i[0]),e=Math.min(e,i[n-1]),this.groupIntervalFactor=s=n*o/(e-t)}return s},postProcessTickInterval:function(t){var e=this.ordinalSlope;return e?this.options.breaks?this.closestPointRange||t:t/(e/this.closestPointRange):t}}),i.prototype.ordinal2lin=i.prototype.val2lin,e(s,"pan",function(t){var e=this.xAxis[0],i=e.options.overscroll,s=t.originalEvent.chartX,o=!1;if(e.options.ordinal&&e.series.length){var a,r=this.mouseDownX,l=e.getExtremes(),h=l.dataMax,c=l.min,d=l.max,p=this.hoverPoints,u=e.closestPointRange||e.overscrollPointsRange,r=(r-s)/(e.translationSlope*(e.ordinalSlope||u)),f={ordinalPositions:e.getExtendedPositions()},u=e.lin2val,g=e.val2lin;f.ordinalPositions?1<Math.abs(r)&&(p&&p.forEach(function(t){t.setState()}),0>r?(p=f,a=e.ordinalPositions?e:f):(p=e.ordinalPositions?e:f,a=f),f=a.ordinalPositions,h>f[f.length-1]&&f.push(h),this.fixedRange=d-c,r=e.toFixedRange(null,null,u.apply(p,[g.apply(p,[c,!0])+r,!0]),u.apply(a,[g.apply(a,[d,!0])+r,!0])),r.min>=Math.min(l.dataMin,c)&&r.max<=Math.max(h,d)+i&&e.setExtremes(r.min,r.max,!0,!1,{trigger:"pan"}),this.mouseDownX=s,n(this.container,{cursor:"move"})):o=!0}else o=!0;o?i&&(e.max=e.dataMax+i):t.preventDefault()}),e(i,"foundExtremes",function(){this.isXAxis&&o(this.options.overscroll)&&this.max===this.dataMax&&(!this.chart.mouseIsDown||this.isInternal)&&(!this.eventArgs||this.eventArgs&&"navigator"!==this.eventArgs.trigger)&&(this.max+=this.options.overscroll,!this.isInternal&&o(this.userMin)&&(this.min+=this.options.overscroll))})}),e(i,"modules/broken-axis.src.js",[i["parts/Globals.js"]],function(t){var e=t.addEvent,i=t.pick,s=t.extend,n=t.isArray,o=t.find,a=t.fireEvent,r=t.Axis,l=t.Series,h=function(t,e){return o(e,function(e){return e.from<t&&t<e.to})};s(r.prototype,{isInBreak:function(t,e){var i=t.repeat||1/0,s=t.from,n=t.to-t.from;return e=e>=s?(e-s)%i:i-(s-e)%i,t.inclusive?e<=n:e<n&&0!==e},isInAnyBreak:function(t,e){var s,n,o,a=this.options.breaks,r=a&&a.length;if(r){for(;r--;)this.isInBreak(a[r],t)&&(s=!0,n||(n=i(a[r].showPoints,!this.isXAxis)));o=s&&e?s&&!n:s}return o}}),e(r,"afterInit",function(){"function"==typeof this.setBreaks&&this.setBreaks(this.options.breaks,!1)}),e(r,"afterSetTickPositions",function(){if(this.isBroken){var t,e=this.tickPositions,i=this.tickPositions.info,s=[];for(t=0;t<e.length;t++)this.isInAnyBreak(e[t])||s.push(e[t]);this.tickPositions=s,this.tickPositions.info=i}}),e(r,"afterSetOptions",function(){this.isBroken&&(this.options.ordinal=!1)}),r.prototype.setBreaks=function(t,e){function s(t){var e,i,s=t;for(i=0;i<l.breakArray.length;i++)if(e=l.breakArray[i],e.to<=t)s-=e.len;else{if(e.from>=t)break;if(l.isInBreak(e,t)){s-=t-e.from;break}}return s}function o(t){var e,i;for(i=0;i<l.breakArray.length&&(e=l.breakArray[i],!(e.from>=t));i++)e.to<t?t+=e.len:l.isInBreak(e,t)&&(t+=e.len);return t}var l=this,c=n(t)&&!!t.length;l.isDirty=l.isBroken!==c,l.isBroken=c,l.options.breaks=l.userOptions.breaks=t,l.forceRedraw=!0,c||l.val2lin!==s||(delete l.val2lin,delete l.lin2val),c&&(l.userOptions.ordinal=!1,l.val2lin=s,l.lin2val=o,l.setExtremes=function(t,e,i,s,n){if(this.isBroken){for(var o,a=this.options.breaks;o=h(t,a);)t=o.to;for(;o=h(e,a);)e=o.from;e<t&&(e=t)}r.prototype.setExtremes.call(this,t,e,i,s,n)},l.setAxisTranslation=function(t){if(r.prototype.setAxisTranslation.call(this,t),this.unitLength=null,this.isBroken){t=l.options.breaks;var e,s,n,o,h=[],c=[],d=0,p=l.userMin||l.min,u=l.userMax||l.max,f=i(l.pointRangePadding,0);t.forEach(function(t){s=t.repeat||1/0,l.isInBreak(t,p)&&(p+=t.to%s-p%s),l.isInBreak(t,u)&&(u-=u%s-t.from%s)}),t.forEach(function(t){for(n=t.from,s=t.repeat||1/0;n-s>p;)n-=s;for(;n<p;)n+=s;for(o=n;o<u;o+=s)h.push({value:o,move:"in"}),h.push({value:o+(t.to-t.from),move:"out",size:t.breakSize})}),h.sort(function(t,e){return t.value===e.value?("in"===t.move?0:1)-("in"===e.move?0:1):t.value-e.value}),e=0,n=p,h.forEach(function(t){e+="in"===t.move?1:-1,1===e&&"in"===t.move&&(n=t.value),0===e&&(c.push({from:n,to:t.value,len:t.value-n-(t.size||0)}),d+=t.value-n-(t.size||0))}),l.breakArray=c,l.unitLength=u-p-d+f,a(l,"afterBreaks"),l.staticScale?l.transA=l.staticScale:l.unitLength&&(l.transA*=(u-l.min+f)/l.unitLength),f&&(l.minPixelPadding=l.transA*l.minPointOffset),l.min=p,l.max=u}}),i(e,!0)&&this.chart.redraw()},e(l,"afterGeneratePoints",function(){var t,e=this.xAxis,i=this.yAxis,s=this.points,n=s.length,o=this.options.connectNulls;if(e&&i&&(e.options.breaks||i.options.breaks))for(;n--;)t=s[n],null===t.y&&!1===o||!e.isInAnyBreak(t.x,!0)&&!i.isInAnyBreak(t.y,!0)||(s.splice(n,1),this.data[n]&&this.data[n].destroyElements())}),e(l,"afterRender",function(){this.drawBreaks(this.xAxis,["x"]),this.drawBreaks(this.yAxis,i(this.pointArrayMap,["y"]))}),t.Series.prototype.drawBreaks=function(t,e){var s,n,o,r,l=this,h=l.points;t&&e.forEach(function(e){s=t.breakArray||[],n=t.isXAxis?t.min:i(l.options.threshold,t.min),h.forEach(function(l){r=i(l["stack"+e.toUpperCase()],l[e]),s.forEach(function(e){o=!1,n<e.from&&r>e.to||n>e.from&&r<e.from?o="pointBreak":(n<e.from&&r>e.from&&r<e.to||n>e.from&&r>e.to&&r<e.from)&&(o="pointInBreak"),o&&a(t,o,{point:l,brk:e})})})})},t.Series.prototype.gappedPath=function(){var e=this.currentDataGrouping,i=e&&e.gapSize,e=this.options.gapSize,s=this.points.slice(),n=s.length-1,o=this.yAxis;if(e&&0<n)for("value"!==this.options.gapUnit&&(e*=this.closestPointRange),i&&i>e&&(e=i);n--;)s[n+1].x-s[n].x>e&&(i=(s[n].x+s[n+1].x)/2,s.splice(n+1,0,{isNull:!0,x:i}),this.options.stacking&&(i=o.stacks[this.stackKey][i]=new t.StackItem(o,o.options.stackLabels,!1,i,this.stack),i.total=0));return this.getGraphPath(s)}}),e(i,"masters/modules/broken-axis.src.js",[],function(){}),e(i,"parts/DataGrouping.js",[i["parts/Globals.js"]],function(t){var e=t.addEvent,i=t.arrayMax,s=t.arrayMin,n=t.Axis,o=t.defaultPlotOptions,a=t.defined,r=t.extend,l=t.format,h=t.isNumber,c=t.merge,d=t.pick,p=t.Point,u=t.Series,f=t.Tooltip,g=t.approximations={sum:function(t){var e,i=t.length;if(!i&&t.hasNulls)e=null;else if(i)for(e=0;i--;)e+=t[i];return e},average:function(t){var e=t.length;return t=g.sum(t),h(t)&&e&&(t/=e),t},averages:function(){var t=[];return[].forEach.call(arguments,function(e){t.push(g.average(e))}),void 0===t[0]?void 0:t},open:function(t){return t.length?t[0]:t.hasNulls?null:void 0},high:function(t){return t.length?i(t):t.hasNulls?null:void 0},low:function(t){return t.length?s(t):t.hasNulls?null:void 0},close:function(t){return t.length?t[t.length-1]:t.hasNulls?null:void 0},ohlc:function(t,e,i,s){if(t=g.open(t),e=g.high(e),i=g.low(i),s=g.close(s),h(t)||h(e)||h(i)||h(s))return[t,e,i,s]},range:function(t,e){return t=g.low(t),e=g.high(e),h(t)||h(e)?[t,e]:null===t&&null===e?null:void 0}},m=function(t,e,i,s){var n,o,r,l,d=this,p=d.data,u=d.options&&d.options.data,f=[],m=[],v=[],x=t.length,y=!!e,b=[],w=d.pointArrayMap,k=w&&w.length,M=["x"].concat(w||["y"]),S=0,T=0;for(s="function"==typeof s?s:g[s]?g[s]:g[d.getDGApproximation&&d.getDGApproximation()||"average"],k?w.forEach(function(){b.push([])}):b.push([]),r=k||1,l=0;l<=x&&!(t[l]>=i[0]);l++);for(l;l<=x;l++){for(;void 0!==i[S+1]&&t[l]>=i[S+1]||l===x;){for(n=i[S],d.dataGroupInfo={start:d.cropStart+T,length:b[0].length},o=s.apply(d,b),d.pointClass&&!a(d.dataGroupInfo.options)&&(d.dataGroupInfo.options=c(d.pointClass.prototype.optionsToObject.call({series:d},d.options.data[d.cropStart+T])),M.forEach(function(t){delete d.dataGroupInfo.options[t]})),void 0!==o&&(f.push(n),m.push(o),v.push(d.dataGroupInfo)),T=l,n=0;n<r;n++)b[n].length=0,b[n].hasNulls=!1;if(S+=1,l===x)break}if(l===x)break;if(w){n=d.cropStart+l,o=p&&p[n]||d.pointClass.prototype.applyOptions.apply({series:d},[u[n]]);var C;for(n=0;n<k;n++)C=o[w[n]],h(C)?b[n].push(C):null===C&&(b[n].hasNulls=!0)}else n=y?e[l]:null,h(n)?b[0].push(n):null===n&&(b[0].hasNulls=!0)}return{groupedXData:f,groupedYData:m,groupMap:v}},v={approximations:g,groupData:m},x=u.prototype,y=x.processData,b=x.generatePoints,w={groupPixelWidth:2,dateTimeLabelFormats:{millisecond:["%A, %b %e, %H:%M:%S.%L","%A, %b %e, %H:%M:%S.%L","-%H:%M:%S.%L"],second:["%A, %b %e, %H:%M:%S","%A, %b %e, %H:%M:%S","-%H:%M:%S"],minute:["%A, %b %e, %H:%M","%A, %b %e, %H:%M","-%H:%M"],hour:["%A, %b %e, %H:%M","%A, %b %e, %H:%M","-%H:%M"],day:["%A, %b %e, %Y","%A, %b %e","-%A, %b %e, %Y"],week:["Week from %A, %b %e, %Y","%A, %b %e","-%A, %b %e, %Y"],month:["%B %Y","%B","-%B %Y"],year:["%Y","%Y","-%Y"]}},k={line:{},spline:{},area:{},areaspline:{},column:{groupPixelWidth:10},columnrange:{groupPixelWidth:10},candlestick:{groupPixelWidth:10},ohlc:{groupPixelWidth:5}},M=t.defaultDataGroupingUnits=[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1]],["week",[1]],["month",[1,3,6]],["year",null]];return x.getDGApproximation=function(){return t.seriesTypes.arearange&&this instanceof t.seriesTypes.arearange?"range":t.seriesTypes.ohlc&&this instanceof t.seriesTypes.ohlc?"ohlc":t.seriesTypes.column&&this instanceof t.seriesTypes.column?"sum":"average"},x.groupData=m,x.processData=function(){var t,e,i=this.chart,s=this.options.dataGrouping,n=!1!==this.allowDG&&s&&d(s.enabled,i.options.isStock),o=this.visible||!i.options.chart.ignoreHiddenSeries,r=this.currentDataGrouping,l=!1;if(this.forceCrop=n,this.groupPixelWidth=null,this.hasProcessed=!0,n&&!this.requireSorting&&(this.requireSorting=l=!0),n=!1===y.apply(this,arguments)||!n,l&&(this.requireSorting=!1),!n){this.destroyGroupedData();var h,n=s.groupAll?this.xData:this.processedXData,c=s.groupAll?this.yData:this.processedYData,p=i.plotSizeX,i=this.xAxis,u=i.options.ordinal,f=this.groupPixelWidth=i.getGroupPixelWidth&&i.getGroupPixelWidth();if(f){this.isDirty=t=!0,this.points=null,l=i.getExtremes(),e=l.min;var l=l.max,u=u&&i.getGroupIntervalFactor(e,l,this)||1,f=f*(l-e)/p*u,p=i.getTimeTicks(i.normalizeTimeTickInterval(f,s.units||M),Math.min(e,n[0]),Math.max(l,n[n.length-1]),i.options.startOfWeek,n,this.closestPointRange),c=x.groupData.apply(this,[n,c,p,s.approximation]),n=c.groupedXData,u=c.groupedYData,g=0;if(s.smoothed&&n.length){for(h=n.length-1,n[h]=Math.min(n[h],l);h--&&0<h;)n[h]+=f/2;n[0]=Math.max(n[0],e)}for(h=1;h<p.length;h++)p.info.segmentStarts&&-1!==p.info.segmentStarts.indexOf(h)||(g=Math.max(p[h]-p[h-1],g));e=p.info,e.gapSize=g,this.closestPointRange=p.info.totalRange,this.groupMap=c.groupMap,a(n[0])&&n[0]<i.dataMin&&o&&((!a(i.options.min)&&i.min<=i.dataMin||i.min===i.dataMin)&&(i.min=n[0]),i.dataMin=n[0]),s.groupAll&&(s=this.cropData(n,u,i.min,i.max,1),n=s.xData,u=s.yData),this.processedXData=n,this.processedYData=u}else this.groupMap=null;this.hasGroupedData=t,this.currentDataGrouping=e,this.preventGraphAnimation=(r&&r.totalRange)!==(e&&e.totalRange)}},x.destroyGroupedData=function(){var t=this.groupedData;(t||[]).forEach(function(e,i){e&&(t[i]=e.destroy?e.destroy():null)}),this.groupedData=null},x.generatePoints=function(){b.apply(this),this.destroyGroupedData(),this.groupedData=this.hasGroupedData?this.points:null},e(p,"update",function(){if(this.dataGroup)return t.error(24,!1,this.series.chart),!1}),e(f,"headerFormatter",function(t){var e,i,s=this.chart.time,n=t.labelConfig,o=n.series,a=o.tooltipOptions,c=o.options.dataGrouping,d=a.xDateFormat,p=o.xAxis,u=a[(t.isFooter?"footer":"header")+"Format"];p&&"datetime"===p.options.type&&c&&h(n.key)&&(i=o.currentDataGrouping,c=c.dateTimeLabelFormats||w.dateTimeLabelFormats,i?(a=c[i.unitName],1===i.count?d=a[0]:(d=a[1],e=a[2])):!d&&c&&(d=this.getXDateFormat(n,a,p)),d=s.dateFormat(d,n.key),e&&(d+=s.dateFormat(e,n.key+i.totalRange-1)),o.chart.styledMode&&(u=this.styledModeFormat(u)),t.text=l(u,{point:r(n.point,{key:d}),series:o},s),t.preventDefault())}),e(u,"destroy",x.destroyGroupedData),e(u,"afterSetOptions",function(t){t=t.options;var e=this.type,i=this.chart.options.plotOptions,s=o[e].dataGrouping,n=this.useCommonDataGrouping&&w;(k[e]||n)&&(s||(s=c(w,k[e])),t.dataGrouping=c(n,s,i.series&&i.series.dataGrouping,i[e].dataGrouping,this.userOptions.dataGrouping))}),e(n,"afterSetScale",function(){this.series.forEach(function(t){t.hasProcessed=!1})}),n.prototype.getGroupPixelWidth=function(){var t,e,i=this.series,s=i.length,n=0,o=!1;for(t=s;t--;)(e=i[t].options.dataGrouping)&&(n=Math.max(n,d(e.groupPixelWidth,w.groupPixelWidth)));for(t=s;t--;)(e=i[t].options.dataGrouping)&&i[t].hasProcessed&&(s=(i[t].processedXData||i[t].data).length,i[t].groupPixelWidth||s>this.chart.plotSizeX/n||s&&e.forced)&&(o=!0);return o?n:0},n.prototype.setDataGrouping=function(t,e){var i;if(e=d(e,!0),t||(t={forced:!1,units:null}),this instanceof n)for(i=this.series.length;i--;)this.series[i].update({dataGrouping:t},!1);else this.chart.options.series.forEach(function(e){e.dataGrouping=t},!1);this.ordinalSlope=null,e&&this.chart.redraw()},t.dataGrouping=v}),e(i,"parts/OHLCSeries.js",[i["parts/Globals.js"]],function(t){var e=t.Point,i=t.seriesType,s=t.seriesTypes;i("ohlc","column",{lineWidth:1,tooltip:{pointFormat:'<span style="color:{point.color}">●</span> <b> {series.name}</b><br/>Open: {point.open}<br/>High: {point.high}<br/>Low: {point.low}<br/>Close: {point.close}<br/>'},threshold:null,states:{hover:{lineWidth:3}},stickyTracking:!0},{directTouch:!1,pointArrayMap:["open","high","low","close"],toYData:function(t){return[t.open,t.high,t.low,t.close]},pointValKey:"close",pointAttrToOptions:{stroke:"color","stroke-width":"lineWidth"},init:function(){s.column.prototype.init.apply(this,arguments),this.options.stacking=!1},pointAttribs:function(t,e){e=s.column.prototype.pointAttribs.call(this,t,e);var i=this.options;return delete e.fill,!t.options.color&&i.upColor&&t.open<t.close&&(e.stroke=i.upColor),e},translate:function(){var t=this,e=t.yAxis,i=!!t.modifyValue,n=["plotOpen","plotHigh","plotLow","plotClose","yBottom"];s.column.prototype.translate.apply(t),t.points.forEach(function(s){[s.open,s.high,s.low,s.close,s.low].forEach(function(o,a){null!==o&&(i&&(o=t.modifyValue(o)),s[n[a]]=e.toPixels(o,!0))}),s.tooltipPos[1]=s.plotHigh+e.pos-t.chart.plotTop})},drawPoints:function(){var t=this,e=t.chart;t.points.forEach(function(i){var s,n,o,a,r,l=i.graphic,h=!l;void 0!==i.plotY&&(l||(i.graphic=l=e.renderer.path().add(t.group)),e.styledMode||l.attr(t.pointAttribs(i,i.selected&&"select")),n=l.strokeWidth()%2/2,r=Math.round(i.plotX)-n,o=Math.round(i.shapeArgs.width/2),a=["M",r,Math.round(i.yBottom),"L",r,Math.round(i.plotHigh)],null!==i.open&&(s=Math.round(i.plotOpen)+n,a.push("M",r,s,"L",r-o,s)),null!==i.close&&(s=Math.round(i.plotClose)+n,a.push("M",r,s,"L",r+o,s)),l[h?"attr":"animate"]({d:a}).addClass(i.getClassName(),!0))})},animate:null},{getClassName:function(){return e.prototype.getClassName.call(this)+(this.open<this.close?" highcharts-point-up":" highcharts-point-down")}})}),e(i,"parts/CandlestickSeries.js",[i["parts/Globals.js"]],function(t){var e=t.defaultPlotOptions,i=t.merge,s=t.seriesType,n=t.seriesTypes;s("candlestick","ohlc",i(e.column,{states:{hover:{lineWidth:2}},tooltip:e.ohlc.tooltip,threshold:null,lineColor:"#000000",lineWidth:1,upColor:"#ffffff",stickyTracking:!0}),{pointAttribs:function(t,e){var i=n.column.prototype.pointAttribs.call(this,t,e),s=this.options,o=t.open<t.close,a=s.lineColor||this.color;return i["stroke-width"]=s.lineWidth,i.fill=t.options.color||(o?s.upColor||this.color:this.color),i.stroke=t.lineColor||(o?s.upLineColor||a:a),e&&(t=s.states[e],i.fill=t.color||i.fill,i.stroke=t.lineColor||i.stroke,i["stroke-width"]=t.lineWidth||i["stroke-width"]),i},drawPoints:function(){var t=this,e=t.chart,i=t.yAxis.reversed;t.points.forEach(function(s){var n,o,a,r,l,h,c,d=s.graphic,p=!d;void 0!==s.plotY&&(d||(s.graphic=d=e.renderer.path().add(t.group)),t.chart.styledMode||d.attr(t.pointAttribs(s,s.selected&&"select")).shadow(t.options.shadow),l=d.strokeWidth()%2/2,h=Math.round(s.plotX)-l,n=s.plotOpen,o=s.plotClose,a=Math.min(n,o),n=Math.max(n,o),c=Math.round(s.shapeArgs.width/2),o=i?n!==s.yBottom:Math.round(a)!==Math.round(s.plotHigh),r=i?Math.round(a)!==Math.round(s.plotHigh):n!==s.yBottom,a=Math.round(a)+l,n=Math.round(n)+l,l=[],l.push("M",h-c,n,"L",h-c,a,"L",h+c,a,"L",h+c,n,"Z","M",h,a,"L",h,o?Math.round(i?s.yBottom:s.plotHigh):a,"M",h,n,"L",h,r?Math.round(i?s.plotHigh:s.yBottom):n),d[p?"attr":"animate"]({d:l}).addClass(s.getClassName(),!0))})}})}),e(i,"mixins/on-series.js",[i["parts/Globals.js"]],function(t){var e=t.defined,i=t.seriesTypes,s=t.stableSort;return{getPlotBox:function(){return t.Series.prototype.getPlotBox.call(this.options.onSeries&&this.chart.get(this.options.onSeries)||this)},translate:function(){i.column.prototype.translate.apply(this);var t,n,o,a,r,l=this,h=l.options,c=l.chart,d=l.points,p=d.length-1,u=h.onSeries,u=u&&c.get(u),h=h.onKey||"y",f=u&&u.options.step,g=u&&u.points,m=g&&g.length,v=c.inverted,x=l.xAxis,y=l.yAxis,b=0;if(u&&u.visible&&m)for(b=(u.pointXOffset||0)+(u.barW||0)/2,c=u.currentDataGrouping,o=g[m-1].x+(c?c.totalRange:0),s(d,function(t,e){return t.x-e.x}),h="plot"+h[0].toUpperCase()+h.substr(1);m--&&d[p]&&(n=g[m],c=d[p],c.y=n.y,!(n.x<=c.x&&void 0!==n[h]&&(c.x<=o&&(c.plotY=n[h],n.x<c.x&&!f&&(a=g[m+1])&&void 0!==a[h]&&(r=(c.x-n.x)/(a.x-n.x),c.plotY+=r*(a[h]-n[h]),c.y+=r*(a.y-n.y))),p--,m++,0>p))););d.forEach(function(i,s){var n;i.plotX+=b,(void 0===i.plotY||v)&&(0<=i.plotX&&i.plotX<=x.len?v?(i.plotY=x.translate(i.x,0,1,0,1),i.plotX=e(i.y)?y.translate(i.y,0,0,0,1):0):i.plotY=(x.opposite?0:l.yAxis.len)+x.offset:i.shapeArgs={}),(t=d[s-1])&&t.plotX===i.plotX&&(void 0===t.stackIndex&&(t.stackIndex=0),n=t.stackIndex+1),i.stackIndex=n}),this.onSeries=u}}}),e(i,"parts/FlagsSeries.js",[i["parts/Globals.js"],i["mixins/on-series.js"]],function(t,e){function i(t){p[t+"pin"]=function(e,i,s,n,o){var a=o&&o.anchorX;o=o&&o.anchorY;var r;return"circle"===t&&n>s&&(e-=Math.round((n-s)/2),s=n),r=p[t](e,i,s,n),a&&o&&(r.push("M","circle"===t?e+s/2:r[1]+r[4]/2,i>o?i:i+n,"L",a,o),r=r.concat(p.circle(a-1,o-1,2,2))),r}}var s=t.addEvent,n=t.merge,o=t.noop,a=t.defined,r=t.Renderer,l=t.Series,h=t.seriesType,c=t.TrackerMixin,d=t.VMLRenderer,p=t.SVGRenderer.prototype.symbols;h("flags","column",{pointRange:0,allowOverlapX:!1,shape:"flag",stackDistance:12,textAlign:"center",tooltip:{pointFormat:"{point.text}<br/>"},threshold:null,y:-30,fillColor:"#ffffff",lineWidth:1,states:{hover:{lineColor:"#000000",fillColor:"#ccd6eb"}},style:{fontSize:"11px",fontWeight:"bold"}},{sorted:!1,noSharedTooltip:!0,allowDG:!1,takeOrdinalPosition:!1,trackerGroups:["markerGroup"],forceCrop:!0,init:l.prototype.init,pointAttribs:function(t,e){var i=this.options,s=t&&t.color||this.color,n=i.lineColor,o=t&&t.lineWidth;return t=t&&t.fillColor||i.fillColor,e&&(t=i.states[e].fillColor,n=i.states[e].lineColor,o=i.states[e].lineWidth),{fill:t||s,stroke:n||s,"stroke-width":o||i.lineWidth||0}},translate:e.translate,getPlotBox:e.getPlotBox,drawPoints:function(){var e,i,s,o,r,l,h,c,d=this.points,p=this.chart,u=p.renderer,f=p.inverted,g=this.options,m=g.y,v=this.yAxis,x={},y=[];for(o=d.length;o--;)r=d[o],c=(f?r.plotY:r.plotX)>this.xAxis.len,e=r.plotX,l=r.stackIndex,s=r.options.shape||g.shape,i=r.plotY,void 0!==i&&(i=r.plotY+m-(void 0!==l&&l*g.stackDistance)),r.anchorX=l?void 0:r.plotX,h=l?void 0:r.plotY,l=r.graphic,void 0!==i&&0<=e&&!c?(l||(l=r.graphic=u.label("",null,null,s,null,null,g.useHTML),p.styledMode||l.attr(this.pointAttribs(r)).css(n(g.style,r.style)),l.attr({align:"flag"===s?"left":"center",width:g.width,height:g.height,"text-align":g.textAlign}).addClass("highcharts-point").add(this.markerGroup),r.graphic.div&&(r.graphic.div.point=r),p.styledMode||l.shadow(g.shadow),l.isNew=!0),0<e&&(e-=l.strokeWidth()%2),s={y:i,anchorY:h},g.allowOverlapX&&(s.x=e,s.anchorX=r.anchorX),l.attr({text:r.options.title||g.title||"A"})[l.isNew?"attr":"animate"](s),g.allowOverlapX||(x[r.plotX]?x[r.plotX].size=Math.max(x[r.plotX].size,l.width):x[r.plotX]={align:0,size:l.width,target:e,anchorX:e}),r.tooltipPos=[e,i+v.pos-p.plotTop]):l&&(r.graphic=l.destroy());g.allowOverlapX||(t.objectEach(x,function(t){t.plotX=t.anchorX,y.push(t)}),t.distribute(y,f?v.len:this.xAxis.len,100),d.forEach(function(t){var e=t.graphic&&x[t.plotX];e&&(t.graphic[t.graphic.isNew?"attr":"animate"]({x:e.pos,anchorX:t.anchorX}),a(e.pos)?t.graphic.isNew=!1:(t.graphic.attr({x:-9999,anchorX:-9999}),t.graphic.isNew=!0))})),g.useHTML&&t.wrap(this.markerGroup,"on",function(e){return t.SVGElement.prototype.on.apply(e.apply(this,[].slice.call(arguments,1)),[].slice.call(arguments,1))})},drawTracker:function(){var t=this.points;c.drawTrackerPoint.apply(this),t.forEach(function(e){var i=e.graphic;i&&s(i.element,"mouseover",function(){0<e.stackIndex&&!e.raised&&(e._y=i.y,i.attr({y:e._y-8}),e.raised=!0),t.forEach(function(t){t!==e&&t.raised&&t.graphic&&(t.graphic.attr({y:t._y}),t.raised=!1)})})})},animate:function(t){t?this.setClip():this.animate=null},setClip:function(){l.prototype.setClip.apply(this,arguments),!1!==this.options.clip&&this.sharedClipKey&&this.markerGroup.clip(this.chart[this.sharedClipKey])},buildKDTree:o,invertGroups:o},{isValid:function(){return t.isNumber(this.y)||void 0===this.y}}),p.flag=function(t,e,i,s,n){var o=n&&n.anchorX||t;return n=n&&n.anchorY||e,p.circle(o-1,n-1,2,2).concat(["M",o,n,"L",t,e+s,t,e,t+i,e,t+i,e+s,t,e+s,"Z"])},i("circle"),i("square"),r===d&&["flag","circlepin","squarepin"].forEach(function(t){d.prototype.symbols[t]=p[t]})}),e(i,"parts/RangeSelector.js",[i["parts/Globals.js"]],function(t){function e(t){this.init(t)}var i=t.addEvent,s=t.Axis,n=t.Chart,o=t.css,a=t.createElement,r=t.defaultOptions,l=t.defined,h=t.destroyObjectProperties,c=t.discardElement,d=t.extend,p=t.fireEvent,u=t.isNumber,f=t.merge,g=t.pick,m=t.pInt,v=t.splat;d(r,{rangeSelector:{verticalAlign:"top",buttonTheme:{width:28,height:18,padding:2,zIndex:7},floating:!1,x:0,y:0,height:void 0,inputPosition:{align:"right",x:0,y:0},buttonPosition:{align:"left",x:0,y:0},labelStyle:{color:"#666666"}}}),r.lang=f(r.lang,{rangeSelectorZoom:"Zoom",rangeSelectorFrom:"From",rangeSelectorTo:"To"}),e.prototype={clickButton:function(t,e){var n,o,a,r,l,h=this.chart,c=this.buttonOptions[t],d=h.xAxis[0],p=h.scroller&&h.scroller.getUnionExtremes()||d||{},f=p.dataMin,m=p.dataMax,x=d&&Math.round(Math.min(d.max,g(m,d.max))),y=c.type,p=c._range,b=c.dataGrouping;if(null!==f&&null!==m){if(h.fixedRange=p,b&&(this.forcedDataGrouping=!0,s.prototype.setDataGrouping.call(d||{chart:this.chart},b,!1),this.frozenStates=c.preserveDataGrouping),"month"===y||"year"===y)d?(y={range:c,max:x,chart:h,dataMin:f,dataMax:m},n=d.minFromRange.call(y),u(y.newMax)&&(x=y.newMax)):p=c;else if(p)n=Math.max(x-p,f),x=Math.min(n+p,m);else if("ytd"===y){if(!d)return void(this.deferredYTDClick=t);void 0===m&&(f=Number.MAX_VALUE,m=Number.MIN_VALUE,h.series.forEach(function(t){t=t.xData,f=Math.min(t[0],f),m=Math.max(t[t.length-1],m)}),e=!1),x=this.getYTDExtremes(m,f,h.time.useUTC),n=a=x.min,x=x.max}else"all"===y&&d&&(n=f,x=m);n+=c._offsetMin,x+=c._offsetMax,this.setSelected(t),d?d.setExtremes(n,x,g(e,1),null,{trigger:"rangeSelectorButton",rangeSelectorButton:c}):(o=v(h.options.xAxis)[0],l=o.range,o.range=p,r=o.min,o.min=a,i(h,"load",function(){o.range=l,o.min=r}))}},setSelected:function(t){this.selected=this.options.selected=t},defaultButtons:[{type:"month",count:1,text:"1m"},{type:"month",count:3,text:"3m"},{type:"month",count:6,text:"6m"},{type:"ytd",text:"YTD"},{type:"year",count:1,text:"1y"},{type:"all",text:"All"}],init:function(t){var e=this,s=t.options.rangeSelector,n=s.buttons||[].concat(e.defaultButtons),o=s.selected,a=function(){var t=e.minInput,i=e.maxInput;t&&t.blur&&p(t,"blur"),i&&i.blur&&p(i,"blur")};e.chart=t,e.options=s,e.buttons=[],e.buttonOptions=n,this.unMouseDown=i(t.container,"mousedown",a),this.unResize=i(t,"resize",a),n.forEach(e.computeButtonRange),void 0!==o&&n[o]&&this.clickButton(o,!1),i(t,"load",function(){t.xAxis&&t.xAxis[0]&&i(t.xAxis[0],"setExtremes",function(i){this.max-this.min!==t.fixedRange&&"rangeSelectorButton"!==i.trigger&&"updatedData"!==i.trigger&&e.forcedDataGrouping&&!e.frozenStates&&this.setDataGrouping(!1,!1)})})},updateButtonStates:function(){var t=this,e=this.chart,i=e.xAxis[0],s=Math.round(i.max-i.min),n=!i.hasVisibleSeries,o=e.scroller&&e.scroller.getUnionExtremes()||i,a=o.dataMin,r=o.dataMax,e=t.getYTDExtremes(r,a,e.time.useUTC),l=e.min,h=e.max,c=t.selected,d=u(c),p=t.options.allButtonsEnabled,f=t.buttons;t.buttonOptions.forEach(function(e,o){var u=e._range,g=e.type,m=e.count||1,v=f[o],x=0,y=e._offsetMax-e._offsetMin;e=o===c;var b=u>r-a,w=u<i.minRange,k=!1,M=!1,u=u===s;("month"===g||"year"===g)&&s+36e5>=864e5*{month:28,year:365}[g]*m-y&&s-36e5<=864e5*{month:31,year:366}[g]*m+y?u=!0:"ytd"===g?(u=h-l+y===s,k=!e):"all"===g&&(u=i.max-i.min>=r-a,M=!e&&d&&u),g=!p&&(b||w||M||n),m=e&&u||u&&!d&&!k||e&&t.frozenStates,g?x=3:m&&(d=!0,x=2),v.state!==x&&(v.setState(x),0===x&&c===o&&t.setSelected(null))})},computeButtonRange:function(t){var e=t.type,i=t.count||1,s={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5};s[e]?t._range=s[e]*i:"month"!==e&&"year"!==e||(t._range=864e5*{month:30,year:365}[e]*i),t._offsetMin=g(t.offsetMin,0),t._offsetMax=g(t.offsetMax,0),t._range+=t._offsetMax-t._offsetMin},setInputValue:function(t,e){var i=this.chart.options.rangeSelector,s=this.chart.time,n=this[t+"Input"];l(e)&&(n.previousValue=n.HCTime,n.HCTime=e),n.value=s.dateFormat(i.inputEditDateFormat||"%Y-%m-%d",n.HCTime),this[t+"DateBox"].attr({text:s.dateFormat(i.inputDateFormat||"%b %e, %Y",n.HCTime)})},showInput:function(t){var e=this.inputGroup,i=this[t+"DateBox"];o(this[t+"Input"],{left:e.translateX+i.x+"px",top:e.translateY+"px",width:i.width-2+"px",height:i.height-2+"px",border:"2px solid silver"})},hideInput:function(t){o(this[t+"Input"],{border:0,width:"1px",height:"1px"}),this.setInputValue(t)},drawInput:function(e){function i(){var t=s.value,e=(g.inputDateParser||Date.parse)(t),i=h.xAxis[0],n=h.scroller&&h.scroller.xAxis?h.scroller.xAxis:i,o=n.dataMin,n=n.dataMax;e!==s.previousValue&&(s.previousValue=e,u(e)||(e=t.split("-"),e=Date.UTC(m(e[0]),m(e[1])-1,m(e[2]))),u(e)&&(h.time.useUTC||(e+=6e4*(new Date).getTimezoneOffset()),x?e>l.maxInput.HCTime?e=void 0:e<o&&(e=o):e<l.minInput.HCTime?e=void 0:e>n&&(e=n),void 0!==e&&i.setExtremes(x?e:i.min,x?i.max:e,void 0,void 0,{trigger:"rangeSelectorInput"})))}var s,n,l=this,h=l.chart,c=h.renderer.style||{},p=h.renderer,g=h.options.rangeSelector,v=l.div,x="min"===e,y=this.inputGroup;this[e+"Label"]=n=p.label(r.lang[x?"rangeSelectorFrom":"rangeSelectorTo"],this.inputGroup.offset).addClass("highcharts-range-label").attr({padding:2}).add(y),y.offset+=n.width+5,this[e+"DateBox"]=p=p.label("",y.offset).addClass("highcharts-range-input").attr({padding:2,width:g.inputBoxWidth||90,height:g.inputBoxHeight||17,"text-align":"center"}).on("click",function(){l.showInput(e),l[e+"Input"].focus()}),h.styledMode||p.attr({stroke:g.inputBoxBorderColor||"#cccccc","stroke-width":1}),p.add(y),y.offset+=p.width+(x?10:0),this[e+"Input"]=s=a("input",{name:e,className:"highcharts-range-selector",type:"text"},{top:h.plotTop+"px"},v),h.styledMode||(n.css(f(c,g.labelStyle)),p.css(f({color:"#333333"},c,g.inputStyle)),o(s,d({position:"absolute",border:0,width:"1px",height:"1px",padding:0,textAlign:"center",fontSize:c.fontSize,fontFamily:c.fontFamily,top:"-9999em"},g.inputStyle))),s.onfocus=function(){l.showInput(e)},s.onblur=function(){s===t.doc.activeElement&&(i(),l.hideInput(e),s.blur())},s.onchange=i,s.onkeypress=function(t){13===t.keyCode&&i()}},getPosition:function(){var t=this.chart,e=t.options.rangeSelector,t="top"===e.verticalAlign?t.plotTop-t.axisOffset[0]:0;return{buttonTop:t+e.buttonPosition.y,inputTop:t+e.inputPosition.y-10}},getYTDExtremes:function(t,e,i){var s=this.chart.time,n=new s.Date(t),o=s.get("FullYear",n);return i=i?s.Date.UTC(o,0,1):+new s.Date(o,0,1),e=Math.max(e||0,i),n=n.getTime(),{max:Math.min(t||n,n),min:e}},render:function(t,e){var i,s,n=this,o=n.chart,l=o.renderer,h=o.container,c=o.options,d=c.exporting&&!1!==c.exporting.enabled&&c.navigation&&c.navigation.buttonOptions,p=r.lang,u=n.div,f=c.rangeSelector,m=g(c.chart.style&&c.chart.style.zIndex,0)+1,c=f.floating,v=n.buttons,u=n.inputGroup,x=f.buttonTheme,y=f.buttonPosition,b=f.inputPosition,w=f.inputEnabled,k=x&&x.states,M=o.plotLeft,S=n.buttonGroup;s=n.rendered;var T,C=n.options.verticalAlign,A=o.legend,E=A&&A.options,P=y.y,O=b.y,L=s||!1,D=L?"animate":"attr",_=0,I=0;!1!==f.enabled&&(s||(n.group=s=l.g("range-selector-group").attr({zIndex:7}).add(),n.buttonGroup=S=l.g("range-selector-buttons").add(s),n.zoomText=l.text(p.rangeSelectorZoom,0,15).add(S),o.styledMode||(n.zoomText.css(f.labelStyle),x["stroke-width"]=g(x["stroke-width"],0)),n.buttonOptions.forEach(function(t,e){v[e]=l.button(t.text,0,0,function(i){var s,o=t.events&&t.events.click;o&&(s=o.call(t,i)),!1!==s&&n.clickButton(e),n.isActive=!0},x,k&&k.hover,k&&k.select,k&&k.disabled).attr({"text-align":"center"}).add(S)}),!1!==w&&(n.div=u=a("div",null,{position:"relative",height:0,zIndex:m}),h.parentNode.insertBefore(u,h),n.inputGroup=u=l.g("input-group").add(s),u.offset=0,n.drawInput("min"),n.drawInput("max"))),n.zoomText[D]({x:g(M+y.x,M)}),i=g(M+y.x,M)+n.zoomText.getBBox().width+5,n.buttonOptions.forEach(function(t,e){v[e][D]({x:i}),i+=v[e].width+g(f.buttonSpacing,5)}),M=o.plotLeft-o.spacing[3],n.updateButtonStates(),d&&this.titleCollision(o)&&"top"===C&&"right"===y.align&&y.y+S.getBBox().height-12<(d.y||0)+d.height&&(_=-40),"left"===y.align?T=y.x-o.spacing[3]:"right"===y.align&&(T=y.x+_-o.spacing[1]),S.align({y:y.y,width:S.getBBox().width,align:y.align,x:T},!0,o.spacingBox),n.group.placed=L,n.buttonGroup.placed=L,!1!==w&&(_=d&&this.titleCollision(o)&&"top"===C&&"right"===b.align&&b.y-u.getBBox().height-12<(d.y||0)+d.height+o.spacing[0]?-40:0,"left"===b.align?T=M:"right"===b.align&&(T=-Math.max(o.axisOffset[1],-_)),u.align({y:b.y,width:u.getBBox().width,align:b.align,x:b.x+T-2},!0,o.spacingBox),h=u.alignAttr.translateX+u.alignOptions.x-_+u.getBBox().x+2,d=u.alignOptions.width,p=S.alignAttr.translateX+S.getBBox().x,T=S.getBBox().width+20,(b.align===y.align||p+T>h&&h+d>p&&P<O+u.getBBox().height)&&u.attr({translateX:u.alignAttr.translateX+(o.axisOffset[1]>=-_?0:-_),translateY:u.alignAttr.translateY+S.getBBox().height+10}),n.setInputValue("min",t),n.setInputValue("max",e),n.inputGroup.placed=L),n.group.align({verticalAlign:C},!0,o.spacingBox),t=n.group.getBBox().height+20,e=n.group.alignAttr.translateY,"bottom"===C&&(A=E&&"bottom"===E.verticalAlign&&E.enabled&&!E.floating?A.legendHeight+g(E.margin,10):0,t=t+A-20,I=e-t-(c?0:f.y)-10),"top"===C?(c&&(I=0),o.titleOffset&&(I=o.titleOffset+o.options.title.margin),I+=o.margin[0]-o.spacing[0]||0):"middle"===C&&(O===P?I=0>O?e+void 0:e:(O||P)&&(I=0>O||0>P?I-Math.min(O,P):e-t+NaN)),n.group.translate(f.x,f.y+Math.floor(I)),!1!==w&&(n.minInput.style.marginTop=n.group.translateY+"px",n.maxInput.style.marginTop=n.group.translateY+"px"),n.rendered=!0)},getHeight:function(){var t=this.options,e=this.group,i=t.y,s=t.buttonPosition.y,n=t.inputPosition.y;return t.height?t.height:(t=e?e.getBBox(!0).height+13+i:0,e=Math.min(n,s),(0>n&&0>s||0<n&&0<s)&&(t+=Math.abs(e)),t)},titleCollision:function(t){return!(t.options.title.text||t.options.subtitle.text)},update:function(t){var e=this.chart;f(!0,e.options.rangeSelector,t),this.destroy(),this.init(e),e.rangeSelector.render()},destroy:function(){var i=this,s=i.minInput,n=i.maxInput;i.unMouseDown(),i.unResize(),h(i.buttons),s&&(s.onfocus=s.onblur=s.onchange=null),n&&(n.onfocus=n.onblur=n.onchange=null),t.objectEach(i,function(t,s){t&&"chart"!==s&&(t.destroy?t.destroy():t.nodeType&&c(this[s])),t!==e.prototype[s]&&(i[s]=null)},this)}},s.prototype.minFromRange=function(){var t,e,i,s=this.range,n={month:"Month",year:"FullYear"}[s.type],o=this.max,a=this.chart.time,r=function(t,e){var i=new a.Date(t),s=a.get(n,i);return a.set(n,i,s+e),s===a.get(n,i)&&i.setDate(0),i.getTime()-t};return u(s)?(t=o-s,i=s):(t=o+r(o,-s.count),this.chart&&(this.chart.fixedRange=o-t)),e=g(this.dataMin,Number.MIN_VALUE),u(t)||(t=e),t<=e&&(t=e,void 0===i&&(i=r(t,s.count)),this.newMax=Math.min(t+i,this.dataMax)),u(o)||(t=void 0),t},t.RangeSelector||(i(n,"afterGetContainer",function(){this.options.rangeSelector.enabled&&(this.rangeSelector=new e(this))}),i(n,"beforeRender",function(){var t=this.axes,e=this.rangeSelector;e&&(u(e.deferredYTDClick)&&(e.clickButton(e.deferredYTDClick),delete e.deferredYTDClick),t.forEach(function(t){t.updateNames(),t.setScale()}),this.getAxisMargins(),e.render(),t=e.options.verticalAlign,e.options.floating||("bottom"===t?this.extraBottomMargin=!0:"middle"!==t&&(this.extraTopMargin=!0)))}),i(n,"update",function(t){var i=t.options.rangeSelector;t=this.rangeSelector;var s=this.extraBottomMargin,n=this.extraTopMargin;i&&i.enabled&&!l(t)&&(this.options.rangeSelector.enabled=!0,this.rangeSelector=new e(this)),this.extraTopMargin=this.extraBottomMargin=!1,t&&(t.render(),i=i&&i.verticalAlign||t.options&&t.options.verticalAlign,t.options.floating||("bottom"===i?this.extraBottomMargin=!0:"middle"!==i&&(this.extraTopMargin=!0)),this.extraBottomMargin!==s||this.extraTopMargin!==n)&&(this.isDirtyBox=!0)}),i(n,"render",function(){var t=this.rangeSelector;t&&!t.options.floating&&(t.render(),t=t.options.verticalAlign,"bottom"===t?this.extraBottomMargin=!0:"middle"!==t&&(this.extraTopMargin=!0))}),i(n,"getMargins",function(){var t=this.rangeSelector;t&&(t=t.getHeight(),this.extraTopMargin&&(this.plotTop+=t),this.extraBottomMargin&&(this.marginBottom+=t))}),n.prototype.callbacks.push(function(t){function e(){s=t.xAxis[0].getExtremes(),u(s.min)&&a.render(s.min,s.max)}var s,n,o,a=t.rangeSelector;a&&(o=i(t.xAxis[0],"afterSetExtremes",function(t){a.render(t.min,t.max)}),n=i(t,"redraw",e),e()),i(t,"destroy",function(){a&&(n(),o())})}),t.RangeSelector=e)}),e(i,"parts/StockChart.js",[i["parts/Globals.js"]],function(t){var e=t.addEvent,i=t.arrayMax,s=t.arrayMin,n=t.Axis,o=t.Chart,a=t.defined,r=t.extend,l=t.format,h=t.isNumber,c=t.isString,d=t.merge,p=t.pick,u=t.Point,f=t.Renderer,g=t.Series,m=t.splat,v=t.SVGRenderer,x=t.VMLRenderer,y=g.prototype,b=y.init,w=y.processData,k=u.prototype.tooltipFormatter;t.StockChart=t.stockChart=function(e,i,s){var n,a=c(e)||e.nodeName,r=arguments[a?1:0],l=r,h=r.series,u=t.getOptions(),f=p(r.navigator&&r.navigator.enabled,u.navigator.enabled,!0),g=f?{startOnTick:!1,endOnTick:!1}:null,v={marker:{enabled:!1,radius:2}},x={shadow:!1,borderWidth:0};return r.xAxis=m(r.xAxis||{}).map(function(t,e){return d({minPadding:0,maxPadding:0,overscroll:0,ordinal:!0,title:{text:null},labels:{overflow:"justify"},showLastLabel:!0},u.xAxis,u.xAxis&&u.xAxis[e],t,{type:"datetime",categories:null},g)}),r.yAxis=m(r.yAxis||{}).map(function(t,e){return n=p(t.opposite,!0),d({labels:{y:-2},opposite:n,showLastLabel:!(!t.categories&&"category"!==t.type),title:{text:null}},u.yAxis,u.yAxis&&u.yAxis[e],t)}),r.series=null,r=d({chart:{panning:!0,pinchType:"x"},navigator:{enabled:f},scrollbar:{enabled:p(u.scrollbar.enabled,!0)},rangeSelector:{enabled:p(u.rangeSelector.enabled,!0)},title:{text:null},tooltip:{split:p(u.tooltip.split,!0),crosshairs:!0},legend:{enabled:!1},plotOptions:{line:v,spline:v,area:v,areaspline:v,arearange:v,areasplinerange:v,column:x,columnrange:x,candlestick:x,ohlc:x}},r,{isStock:!0}),r.series=l.series=h,a?new o(e,r,s):new o(r,i)},e(n,"autoLabelAlign",function(t){var e=this.chart,i=this.options,e=e._labelPanes=e._labelPanes||{},s=this.options.labels;this.chart.options.isStock&&"yAxis"===this.coll&&(i=i.top+","+i.height,!e[i]&&s.enabled&&(15===s.x&&(s.x=0),void 0===s.align&&(s.align="right"),e[i]=this,t.align="right",t.preventDefault()))}),e(n,"destroy",function(){var t=this.chart,e=this.options&&this.options.top+","+this.options.height;e&&t._labelPanes&&t._labelPanes[e]===this&&delete t._labelPanes[e]}),e(n,"getPlotLinePath",function(e){var i,s,n,o,r,l,d,u=this,f=this.isLinked&&!this.series?this.linkedParent.series:this.series,g=u.chart,m=g.renderer,v=u.left,x=u.top,y=[],b=[],w=e.translatedValue,k=e.value,M=e.force;"xAxis"!==u.coll&&"yAxis"!==u.coll||(e.preventDefault(),b=function(t){var e="xAxis"===t?"yAxis":"xAxis";return t=u.options[e],h(t)?[g[e][t]]:c(t)?[g.get(t)]:f.map(function(t){return t[e]})}(u.coll),r=u.isXAxis?g.yAxis:g.xAxis,r.forEach(function(t){if(a(t.options.id)?-1===t.options.id.indexOf("navigator"):1){var e=t.isXAxis?"yAxis":"xAxis",e=a(t.options[e])?g[e][t.options[e]]:g[e][0];u===e&&b.push(t)}}),l=b.length?[]:[u.isXAxis?g.yAxis[0]:g.xAxis[0]],b.forEach(function(e){-1!==l.indexOf(e)||t.find(l,function(t){return t.pos===e.pos&&t.len===e.len})||l.push(e)}),d=p(w,u.translate(k,null,null,e.old)),h(d)&&(u.horiz?l.forEach(function(t){var e;s=t.pos,o=s+t.len,i=n=Math.round(d+u.transB),"pass"!==M&&(i<v||i>v+u.width)&&(M?i=n=Math.min(Math.max(v,i),v+u.width):e=!0),e||y.push("M",i,s,"L",n,o)}):l.forEach(function(t){var e;i=t.pos,n=i+t.len,s=o=Math.round(x+u.height-d),"pass"!==M&&(s<x||s>x+u.height)&&(M?s=o=Math.min(Math.max(x,s),u.top+u.height):e=!0),e||y.push("M",i,s,"L",n,o)})),e.path=0<y.length?m.crispPolyLine(y,e.lineWidth||1):null)}),v.prototype.crispPolyLine=function(t,e){var i;for(i=0;i<t.length;i+=6)t[i+1]===t[i+4]&&(t[i+1]=t[i+4]=Math.round(t[i+1])-e%2/2),t[i+2]===t[i+5]&&(t[i+2]=t[i+5]=Math.round(t[i+2])+e%2/2);return t},f===x&&(x.prototype.crispPolyLine=v.prototype.crispPolyLine),e(n,"afterHideCrosshair",function(){this.crossLabel&&(this.crossLabel=this.crossLabel.hide())}),e(n,"afterDrawCrosshair",function(t){var e,i;if(a(this.crosshair.label)&&this.crosshair.label.enabled&&this.cross){var s=this.chart,n=this.options.crosshair.label,o=this.horiz;e=this.opposite,i=this.left;var h=this.top,c=this.crossLabel,d=n.format,u="",f="inside"===this.options.tickPosition,g=!1!==this.crosshair.snap,m=0,v=t.e||this.cross&&this.cross.e,x=t.point;t=this.lin2log;var y,b;this.isLog?(y=t(this.min),b=t(this.max)):(y=this.min,b=this.max),t=o?"center":e?"right"===this.labelAlign?"right":"left":"left"===this.labelAlign?"left":"center",c||(c=this.crossLabel=s.renderer.label(null,null,null,n.shape||"callout").addClass("highcharts-crosshair-label"+(this.series[0]&&" highcharts-color-"+this.series[0].colorIndex)).attr({align:n.align||t,padding:p(n.padding,8),r:p(n.borderRadius,3),zIndex:2}).add(this.labelGroup),s.styledMode||c.attr({fill:n.backgroundColor||this.series[0]&&this.series[0].color||"#666666",stroke:n.borderColor||"","stroke-width":n.borderWidth||0}).css(r({color:"#ffffff",fontWeight:"normal",fontSize:"11px",textAlign:"center"},n.style))),o?(t=g?x.plotX+i:v.chartX,h+=e?0:this.height):(t=e?this.width+i:0,h=g?x.plotY+h:v.chartY),d||n.formatter||(this.isDatetimeAxis&&(u="%b %d, %Y"),d="{value"+(u?":"+u:"")+"}"),u=g?x[this.isXAxis?"x":"y"]:this.toValue(o?v.chartX:v.chartY),c.attr({text:d?l(d,{value:u},s.time):n.formatter.call(this,u),x:t,y:h,visibility:u<y||u>b?"hidden":"visible"}),n=c.getBBox(),o?(f&&!e||!f&&e)&&(h=c.y-n.height):h=c.y-n.height/2,o?(e=i-n.x,i=i+this.width-n.x):(e="left"===this.labelAlign?i:0,i="right"===this.labelAlign?i+this.width:s.chartWidth),c.translateX<e&&(m=e-c.translateX),c.translateX+n.width>=i&&(m=-(c.translateX+n.width-i)),c.attr({x:t+m,y:h,anchorX:o?t:this.opposite?0:s.chartWidth,anchorY:o?this.opposite?s.chartHeight:0:h+n.height/2})}}),y.init=function(){b.apply(this,arguments),this.setCompare(this.options.compare)},y.setCompare=function(t){this.modifyValue="value"===t||"percent"===t?function(e,i){var s=this.compareValue;if(void 0!==e&&void 0!==s)return e="value"===t?e-s:e/s*100-(100===this.options.compareBase?0:100),i&&(i.change=e),e}:null,this.userOptions.compare=t,this.chart.hasRendered&&(this.isDirty=!0)},y.processData=function(){var t,e,i,s,n,o=-1,a=!0===this.options.compareStart?0:1;if(w.apply(this,arguments),this.xAxis&&this.processedYData)for(e=this.processedXData,i=this.processedYData,s=i.length,this.pointArrayMap&&(o=this.pointArrayMap.indexOf(this.options.pointValKey||this.pointValKey||"y")),t=0;t<s-a;t++)if(n=i[t]&&-1<o?i[t][o]:i[t],h(n)&&e[t+a]>=this.xAxis.min&&0!==n){this.compareValue=n;break}},e(g,"afterGetExtremes",function(){if(this.modifyValue){var t=[this.modifyValue(this.dataMin),this.modifyValue(this.dataMax)];this.dataMin=s(t),this.dataMax=i(t)}}),n.prototype.setCompare=function(t,e){this.isXAxis||(this.series.forEach(function(e){e.setCompare(t)}),p(e,!0)&&this.chart.redraw())},u.prototype.tooltipFormatter=function(e){return e=e.replace("{point.change}",(0<this.change?"+":"")+t.numberFormat(this.change,p(this.series.tooltipOptions.changeDecimals,2))),k.apply(this,[e])},e(g,"render",function(){var t;this.chart.is3d&&this.chart.is3d()||this.chart.polar||!this.xAxis||this.xAxis.isRadial||(t=this.yAxis.len-(this.xAxis.axisLine?Math.floor(this.xAxis.axisLine.strokeWidth()/2):0),!this.clipBox&&this.animate?(this.clipBox=d(this.chart.clipBox),this.clipBox.width=this.xAxis.len,this.clipBox.height=t):this.chart[this.sharedClipKey]&&(this.chart[this.sharedClipKey].animate({width:this.xAxis.len,height:t}),this.chart[this.sharedClipKey+"m"]&&this.chart[this.sharedClipKey+"m"].animate({width:this.xAxis.len})))}),e(o,"update",function(t){"scrollbar"in(t=t.options)&&this.navigator&&(d(!0,this.options.scrollbar,t.scrollbar),this.navigator.update({},!1),delete t.scrollbar)})}),e(i,"masters/modules/stock.src.js",[],function(){}),e(i,"masters/highstock.src.js",[i["masters/highcharts.src.js"]],function(t){return t}),i["masters/highstock.src.js"]._modules=i,i["masters/highstock.src.js"]})}).call(e,i(98)(t))},98:function(t,e,i){"use strict";t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},99:function(t,e,i){"use strict";(function(t){function e(t){return t&&t.__esModule?t:{default:t}}var s=i(0),n=e(s),o=i(17),a=e(o),r=i(8),l=e(r),h=i(9),c=e(h);i(7),t(document).ready(function(){var t=!1,e=function(){var t=(0,n.default)("select.js-product-catalogs"),e=(0,n.default)("select.js-product-feeds"),i=(0,n.default)("#product_catalog_config_schedule-update_fb_product_catalog_name"),s=(0,n.default)("#product_catalog_config_schedule-update_fb_product_feed_name"),o=(0,n.default)(l.default.fragments.product_feed_schedule),r=function(){var i=e.val(),r=t.val();if(r&&!(e.length<=0)){var l=function(){if(c.default.dropdown_data.hasOwnProperty("get_product_feed_ids")&&c.default.dropdown_data.get_product_feed_ids.hasOwnProperty(r)){var t=c.default.dropdown_data.get_product_feed_ids[r];e.prop("disabled",!1),e.append(n.default.map(t,function(t,e){return(0,n.default)("<option>",{val:t.id,text:t.name+" (#"+t.id+")",selected:t.id===i,"data-name":t.name})})),e.on("change",function(){var t=(0,n.default)(this).val();s.val((0,n.default)(this).find("option:selected").attr("data-name")),o.removeClass("hide"),a.default.reloadFragment("product_feed_schedule",{product_feed_id:t})})}};c.default.dropdown_data.hasOwnProperty("get_product_feed_ids")&&c.default.dropdown_data.get_product_feed_ids.hasOwnProperty(r)?l():function(){a.default.addLoader(e),e.find("option[value]").not(".select2-add").remove(),n.default.ajax({url:aepc_admin.ajax_url,data:{product_catalog_id:r,action:aepc_admin.actions.get_product_feed_ids.name,_wpnonce:aepc_admin.actions.get_product_feed_ids.nonce},success:function(i){!1===i.success?(a.default.addMessage((0,n.default)("#fb-update-catalog"),"error",i.data),t.select2("val","")):(c.default.dropdown_data.hasOwnProperty("get_product_feed_ids")||(c.default.dropdown_data.get_product_feed_ids={}),c.default.dropdown_data.get_product_feed_ids[r]=i.data,l()),a.default.removeLoader(e)},dataType:"json"})}()}};!function(){var e=t.val();if(!(t.length<=0)){var s=function(){if(c.default.dropdown_data.hasOwnProperty("get_product_catalog_ids")){var s=n.default.merge([{id:"",name:""}],c.default.dropdown_data.get_product_catalog_ids);if(t.find("option").remove(),t.append(n.default.map(s,function(t,i){return(0,n.default)("<option>",{val:t.id,text:t.name?t.name+" (#"+t.id+")":"",selected:t.id===e,"data-name":t.name})})),t.on("change",function(){i.val((0,n.default)(this).find("option:selected").attr("data-name")),r()}),t.find("option:selected").length){var o=c.default.unsaved;t.trigger("change"),c.default.unsaved=o}}};c.default.dropdown_data.hasOwnProperty("get_product_catalog_ids")?s():function(){a.default.addLoader(t),n.default.ajax({url:aepc_admin.ajax_url,data:{action:aepc_admin.actions.get_product_catalog_ids.name,_wpnonce:aepc_admin.actions.get_product_catalog_ids.nonce},success:function(e){!1===e.success?a.default.addMessage((0,n.default)("#fb-update-catalog"),"error",e.data):(c.default.dropdown_data.get_product_catalog_ids=e.data,s()),a.default.removeLoader(t)},dataType:"json"})}()}}(),r()},i=function(){(0,n.default)(".js-google-category").each(function(){var t=(0,n.default)(this);!function t(e){e.select2({data:function(){var t=e.data("options");return{results:t?t.map(function(t){return{id:t,text:t}}):[]}}}),e.on("change",function(){var e=(0,n.default)(this),i=e.closest(".js-categories-wrapper"),s=e.clone().val("").data("options","").data("level",parseInt(e.data("level"))+1);e.nextAll("input").select2("destroy").remove(),a.default.addLoader(i),n.default.ajax({url:aepc_admin.ajax_url,method:"POST",data:{parents:i.find("input.js-google-category").map(function(){return(0,n.default)(this).val()}).get(),action:aepc_admin.actions.get_google_categories.name,_wpnonce:aepc_admin.actions.get_google_categories.nonce},complete:function(){a.default.removeLoader(i)},success:function(i){0!==i.length&&(s.data("options",i).insertAfter(e),t(s))},dataType:"json"})})}(t)}),(0,n.default)("input.multi-tags[data-tags]").each(function(){var t=(0,n.default)(this);t.select2({tags:function(){return t.data("tags")}})})},s=function s(){!t&&0!==(0,n.default)(l.default.fragments.product_feed_status).length&&(0,n.default)(l.default.fragments.product_feed_status).hasClass("updating")&&setTimeout(function(){t=!0,a.default.reloadFragment("product_feed_status",{beforeRender:function(){a.default.removeAllMainMessages()},success:function(n){t=!1,i(),e(),s()}},!1)},3e3)};(0,n.default)(document).on("fragment_html_refreshed",function(){i(),s()}),(0,n.default)(document).on("click",".js-feed-delete",function(t){t.preventDefault();var e=(0,n.default)(this),i=(0,n.default)("#modal-confirm-delete"),s=e.data("feed-id");i.modal("show",e).one("click",".btn-ok",function(){i.modal("hide"),a.default.addLoader(e.closest(".panel")),n.default.ajax({url:aepc_admin.ajax_url,method:"POST",data:{name:s,action:aepc_admin.actions.delete_product_catalog_feed.name,_wpnonce:aepc_admin.actions.delete_product_catalog_feed.nonce},success:function(t){window.location.reload(!1)},dataType:"json"})})}),(0,n.default)(document).on("click",".js-feed-edit",function(t){t.preventDefault(),(0,n.default)(".js-edit-form").collapse("show")}),(0,n.default)(document).on("click",".js-product-feed-refresh",function(t){t.preventDefault();var e=(0,n.default)(this),o=(0,n.default)("#modal-confirm-refresh-product-feed"),r=e.data("feed-id");o.modal("show",e).one("click",".btn-ok",function(){o.modal("hide"),a.default.addLoader(e.closest(".panel")),a.default.removeAllMainMessages(),n.default.ajax({url:aepc_admin.ajax_url,method:"POST",data:{name:r,action:aepc_admin.actions.refresh_product_catalog_feed.name,_wpnonce:aepc_admin.actions.refresh_product_catalog_feed.nonce},complete:function(){a.default.removeLoader(e.closest(".panel"))},success:function(t){a.default.removeAllMainMessages(),a.default.refreshFragmentHTML((0,n.default)(l.default.fragments.product_feed_status),t),i(),s()},dataType:"json"})})}),(0,n.default)(document).on("click",".js-product-feed-save-interval",function(){var t=(0,n.default)(this),e=t.closest(".js-refresh-interval-option"),i=(0,n.default)("#product_catalog_config_refresh_cycle"),s=(0,n.default)("#product_catalog_config_refresh_cycle_type"),o=t.data("feed-id");a.default.addLoader(e),n.default.ajax({url:aepc_admin.ajax_url,method:"POST",data:{product_catalog_id:o,cycle:i.val(),cycle_type:s.val(),action:aepc_admin.actions.save_product_feed_refresh_interval.name,_wpnonce:aepc_admin.actions.save_product_feed_refresh_interval.nonce},complete:function(){a.default.removeLoader(e)},success:function(t){a.default.addMessagesFromResponse(t),c.default.set_saved()},dataType:"json"})}),(0,n.default)(document).on("click",".js-catalog-option",function(t){var e=(0,n.default)(this).closest("#automatic-facebook-options"),i=e.find(".panel"),s=(0,n.default)((0,n.default)(this).data("target"));if(!s.is(".hide"))return t;i.addClass("hide"),s.removeClass("hide")}).on("click",'[data-toggle="schedule-interval"]',function(t){var e=(0,n.default)('[data-schedule-option="'+(0,n.default)(this).data("dep")+'"]');(0,n.default)("[data-schedule-option]").addClass("hide"),e.removeClass("hide")}),s(),i(),e()})}).call(e,i(0))}});
1
+ !function(t){function e(s){if(i[s])return i[s].exports;var n=i[s]={i:s,l:!1,exports:{}};return t[s].call(n.exports,n,n.exports,e),n.l=!0,n.exports}var i={};e.m=t,e.c=i,e.d=function(t,i,s){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:s})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=92)}({0:function(t,e){t.exports=jQuery},100:function(t,e){},17:function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=i(0),a=s(o);i(7);var r=i(8),l=s(r),h=i(9),c=s(h),d={alert_unsaved:function(){(0,a.default)(".wrap form").on("change.unsaved",":input:not(#date-range)",function(){c.default.set_unsaved()}).on("submit.unsaved",function(){c.default.set_saved()}),window.onbeforeunload=function(){if(c.default.unsaved)return aepc_admin.unsaved}},unset_alert_unsaved:function(){(0,a.default)(".wrap form").off("change.unsaved submit.unsaved"),window.onbeforeunload=function(){}},apply_autocomplete:function(t,e){t.is("select")?t.select2({data:{results:e}}):t.select2({tags:e})},addLoader:function(t){if(void 0!==t.data("select2")){t.data("select2").container.addClass("loading-data")}else t.is("div, form")?t.addClass("loading-data loading-box"):t.is("a")&&t.addClass("loading-data")},removeLoader:function(t){if(void 0!==t.data("select2")){t.data("select2").container.removeClass("loading-data")}else t.is("div, form")?t.removeClass("loading-data loading-box"):t.is("a")&&t.removeClass("loading-data")},removeMessage:function(t,e){"error"===e&&(e="danger"),t.find(".alert-"+e).length&&t.find(".alert-"+e).remove()},removeMainMessages:function(t){d.removeMessage((0,a.default)(".plugin-content"),t)},removeAllMainMessages:function(){d.removeMainMessages("success"),d.removeMainMessages("error")},addMessage:function(t,e,i){"error"===e&&(e="danger");var s="object"===(void 0===i?"undefined":n(i))?i:{text:i},o=s.text,r=s.dismiss_action,l=void 0!==r&&r,h=(0,a.default)("<button />",{type:"button",class:"close","data-dismiss":"alert",text:"×"});l&&h.data("data-dismiss-action",l),d.removeMessage(t,e),t.prepend((0,a.default)("<div />",{class:"alert alert-"+e+" alert-dismissable",role:"alert",html:o}).prepend(h))},addMessagesFromResponse:function(t){t.data.hasOwnProperty("messages")?(t.data.messages.length&&d.removeMessage((0,a.default)(".plugin-content"),"success"),t.data.messages.hasOwnProperty("success")&&t.data.messages.success.hasOwnProperty("main")&&t.data.messages.success.main.forEach(function(t){d.addMessage((0,a.default)(".plugin-content .alert-wrap"),"success",t)}),t.data.messages.hasOwnProperty("error")&&t.data.messages.error.hasOwnProperty("main")&&t.data.messages.error.main.forEach(function(t){d.addMessage((0,a.default)(".plugin-content .alert-wrap"),"error",t)})):t.hasOwnProperty("success")&&!t.success&&t.data.hasOwnProperty("main")&&t.data.main.forEach(function(t){d.addMessage((0,a.default)(".plugin-content .alert-wrap"),"error",t)})},refreshFragmentHTML:function(t,e){e.success?(d.unset_alert_unsaved(),t.replaceWith(e.data.html),d.addMessagesFromResponse(e),c.default.bootstrap_components({currentTarget:t}),c.default.custom_dropdown(),c.default.fields_components(),c.default.analyzed_distance(),d.alert_unsaved(),(0,a.default)(document).triggerHandler("fragment_html_refreshed")):d.addMessagesFromResponse(e)},reloadFragment:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(l.default.fragments.hasOwnProperty(t)&&aepc_admin.actions.hasOwnProperty("load_"+t)){var s=(0,a.default)(l.default.fragments[t]),n=function(){},o=function(){},r={action:aepc_admin.actions["load_"+t].name,_wpnonce:aepc_admin.actions["load_"+t].nonce};i&&a.default.inArray(t,["sidebar"])<0&&d.removeMessage((0,a.default)(".plugin-content"),"success"),i&&d.addLoader(s),window.location.href.slice(window.location.href.indexOf("?")+1).split("&").forEach(function(t){var e=t.split("=");a.default.inArray(e[0],["page","tab"])&&(r[e[0]]=e[1])}),void 0!==e&&(e.hasOwnProperty("success")&&(n=e.success,delete e.success),e.hasOwnProperty("beforeRender")&&(o=e.beforeRender,delete e.beforeRender),a.default.extend(r,e)),a.default.ajax({url:aepc_admin.ajax_url,data:r,complete:function(){d.removeLoader(s)},success:function(t){t.success&&(o(),d.refreshFragmentHTML(s,t)),n(t)},dataType:"json"})}}};e.default=d},22:function(t,e,i){"use strict";(function(t){var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};+function(t){function i(e){var i,s=e.attr("data-target")||(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return t(document).find(s)}function s(i){return this.each(function(){var s=t(this),o=s.data("bs.collapse"),a=t.extend({},n.DEFAULTS,s.data(),"object"==(void 0===i?"undefined":e(i))&&i);!o&&a.toggle&&/show|hide/.test(i)&&(a.toggle=!1),o||s.data("bs.collapse",o=new n(this,a)),"string"==typeof i&&o[i]()})}var n=function e(i,s){this.$element=t(i),this.options=t.extend({},e.DEFAULTS,s),this.$trigger=t('[data-toggle="collapse"][href="#'+i.id+'"],[data-toggle="collapse"][data-target="#'+i.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};n.VERSION="3.4.1",n.TRANSITION_DURATION=350,n.DEFAULTS={toggle:!0},n.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},n.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,i=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(i&&i.length&&(e=i.data("bs.collapse"))&&e.transitioning)){var o=t.Event("show.bs.collapse");if(this.$element.trigger(o),!o.isDefaultPrevented()){i&&i.length&&(s.call(i,"hide"),e||i.data("bs.collapse",null));var a=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[a](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var r=function(){this.$element.removeClass("collapsing").addClass("collapse in")[a](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return r.call(this);var l=t.camelCase(["scroll",a].join("-"));this.$element.one("bsTransitionEnd",t.proxy(r,this)).emulateTransitionEnd(n.TRANSITION_DURATION)[a](this.$element[0][l])}}}},n.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var i=this.dimension();this.$element[i](this.$element[i]())[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 s=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!t.support.transition)return s.call(this);this.$element[i](0).one("bsTransitionEnd",t.proxy(s,this)).emulateTransitionEnd(n.TRANSITION_DURATION)}}},n.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},n.prototype.getParent=function(){return t(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(e,s){var n=t(s);this.addAriaAndCollapsedClass(i(n),n)},this)).end()},n.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)};var o=t.fn.collapse;t.fn.collapse=s,t.fn.collapse.Constructor=n,t.fn.collapse.noConflict=function(){return t.fn.collapse=o,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(e){var n=t(this);n.attr("data-target")||e.preventDefault();var o=i(n),a=o.data("bs.collapse"),r=a?"toggle":n.data();s.call(o,r)})}(t)}).call(e,i(0))},23:function(t,e,i){"use strict";(function(t){var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};+function(t){function i(e,i){var s=e.nodeName.toLowerCase();if(-1!==t.inArray(s,i))return-1===t.inArray(s,a)||Boolean(e.nodeValue.match(h)||e.nodeValue.match(c));for(var n=t(i).filter(function(t,e){return e instanceof RegExp}),o=0,r=n.length;o<r;o++)if(s.match(n[o]))return!0;return!1}function s(e,s,n){if(0===e.length)return e;if(n&&"function"==typeof n)return n(e);if(!document.implementation||!document.implementation.createHTMLDocument)return e;var o=document.implementation.createHTMLDocument("sanitization");o.body.innerHTML=e;for(var a=t.map(s,function(t,e){return e}),r=t(o.body).find("*"),l=0,h=r.length;l<h;l++){var c=r[l],d=c.nodeName.toLowerCase();if(-1!==t.inArray(d,a))for(var p=t.map(c.attributes,function(t){return t}),u=[].concat(s["*"]||[],s[d]||[]),f=0,g=p.length;f<g;f++)i(p[f],u)||c.removeAttribute(p[f].nodeName);else c.parentNode.removeChild(c)}return o.body.innerHTML}function n(i){return this.each(function(){var s=t(this),n=s.data("bs.tooltip"),o="object"==(void 0===i?"undefined":e(i))&&i;!n&&/destroy|hide/.test(i)||(n||s.data("bs.tooltip",n=new d(this,o)),"string"==typeof i&&n[i]())})}var o=["sanitize","whiteList","sanitizeFn"],a=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],r=/^aria-[\w-]*$/i,l={"*":["class","dir","id","lang","role",r],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:[]},h=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,c=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i,d=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)};d.VERSION="3.4.1",d.TRANSITION_DURATION=150,d.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:l},d.prototype.init=function(e,i,s){if(this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(s),this.$viewport=this.options.viewport&&t(document).find(t.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 n=this.options.trigger.split(" "),o=n.length;o--;){var a=n[o];if("click"==a)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=a){var r="hover"==a?"mouseenter":"focusin",l="hover"==a?"mouseleave":"focusout";this.$element.on(r+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},d.prototype.getDefaults=function(){return d.DEFAULTS},d.prototype.getOptions=function(e){var i=this.$element.data();for(var n in i)i.hasOwnProperty(n)&&-1!==t.inArray(n,o)&&delete i[n];return e=t.extend({},this.getDefaults(),i,e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e.sanitize&&(e.template=s(e.template,e.whiteList,e.sanitizeFn)),e},d.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,function(t,s){i[t]!=s&&(e[t]=s)}),e},d.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusin"==e.type?"focus":"hover"]=!0),i.tip().hasClass("in")||"in"==i.hoverState?void(i.hoverState="in"):(clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show())},d.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},d.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusout"==e.type?"focus":"hover"]=!1),!i.isInStateTrue()){if(clearTimeout(i.timeout),i.hoverState="out",!i.options.delay||!i.options.delay.hide)return i.hide();i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)}},d.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var i=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!i)return;var s=this,n=this.tip(),o=this.getUID(this.type);this.setContent(),n.attr("id",o),this.$element.attr("aria-describedby",o),this.options.animation&&n.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,n[0],this.$element[0]):this.options.placement,r=/\s?auto?\s?/i,l=r.test(a);l&&(a=a.replace(r,"")||"top"),n.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?n.appendTo(t(document).find(this.options.container)):n.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var h=this.getPosition(),c=n[0].offsetWidth,p=n[0].offsetHeight;if(l){var u=a,f=this.getPosition(this.$viewport);a="bottom"==a&&h.bottom+p>f.bottom?"top":"top"==a&&h.top-p<f.top?"bottom":"right"==a&&h.right+c>f.width?"left":"left"==a&&h.left-c<f.left?"right":a,n.removeClass(u).addClass(a)}var g=this.getCalculatedOffset(a,h,c,p);this.applyPlacement(g,a);var m=function(){var t=s.hoverState;s.$element.trigger("shown.bs."+s.type),s.hoverState=null,"out"==t&&s.leave(s)};t.support.transition&&this.$tip.hasClass("fade")?n.one("bsTransitionEnd",m).emulateTransitionEnd(d.TRANSITION_DURATION):m()}},d.prototype.applyPlacement=function(e,i){var s=this.tip(),n=s[0].offsetWidth,o=s[0].offsetHeight,a=parseInt(s.css("margin-top"),10),r=parseInt(s.css("margin-left"),10);isNaN(a)&&(a=0),isNaN(r)&&(r=0),e.top+=a,e.left+=r,t.offset.setOffset(s[0],t.extend({using:function(t){s.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0),s.addClass("in");var l=s[0].offsetWidth,h=s[0].offsetHeight;"top"==i&&h!=o&&(e.top=e.top+o-h);var c=this.getViewportAdjustedDelta(i,e,l,h);c.left?e.left+=c.left:e.top+=c.top;var d=/top|bottom/.test(i),p=d?2*c.left-n+l:2*c.top-o+h,u=d?"offsetWidth":"offsetHeight";s.offset(e),this.replaceArrow(p,s[0][u],d)},d.prototype.replaceArrow=function(t,e,i){this.arrow().css(i?"left":"top",50*(1-t/e)+"%").css(i?"top":"left","")},d.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();this.options.html?(this.options.sanitize&&(e=s(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")},d.prototype.hide=function(e){function i(){"in"!=s.hoverState&&n.detach(),s.$element&&s.$element.removeAttr("aria-describedby").trigger("hidden.bs."+s.type),e&&e()}var s=this,n=t(this.$tip),o=t.Event("hide.bs."+this.type);if(this.$element.trigger(o),!o.isDefaultPrevented())return n.removeClass("in"),t.support.transition&&n.hasClass("fade")?n.one("bsTransitionEnd",i).emulateTransitionEnd(d.TRANSITION_DURATION):i(),this.hoverState=null,this},d.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","")},d.prototype.hasContent=function(){return this.getTitle()},d.prototype.getPosition=function(e){e=e||this.$element;var i=e[0],s="BODY"==i.tagName,n=i.getBoundingClientRect();null==n.width&&(n=t.extend({},n,{width:n.right-n.left,height:n.bottom-n.top}));var o=window.SVGElement&&i instanceof window.SVGElement,a=s?{top:0,left:0}:o?null:e.offset(),r={scroll:s?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()},l=s?{width:t(window).width(),height:t(window).height()}:null;return t.extend({},n,r,l,a)},d.prototype.getCalculatedOffset=function(t,e,i,s){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-i/2}:"top"==t?{top:e.top-s,left:e.left+e.width/2-i/2}:"left"==t?{top:e.top+e.height/2-s/2,left:e.left-i}:{top:e.top+e.height/2-s/2,left:e.left+e.width}},d.prototype.getViewportAdjustedDelta=function(t,e,i,s){var n={top:0,left:0};if(!this.$viewport)return n;var o=this.options.viewport&&this.options.viewport.padding||0,a=this.getPosition(this.$viewport);if(/right|left/.test(t)){var r=e.top-o-a.scroll,l=e.top+o-a.scroll+s;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-o,c=e.left+o+i;h<a.left?n.left=a.left-h:c>a.right&&(n.left=a.left+a.width-c)}return n},d.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)},d.prototype.getUID=function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},d.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(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},d.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},d.prototype.enable=function(){this.enabled=!0},d.prototype.disable=function(){this.enabled=!1},d.prototype.toggleEnabled=function(){this.enabled=!this.enabled},d.prototype.toggle=function(e){var i=this;e&&((i=t(e.currentTarget).data("bs."+this.type))||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i))),e?(i.inState.click=!i.inState.click,i.isInStateTrue()?i.enter(i):i.leave(i)):i.tip().hasClass("in")?i.leave(i):i.enter(i)},d.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})},d.prototype.sanitizeHtml=function(t){return s(t,this.options.whiteList,this.options.sanitizeFn)};var p=t.fn.tooltip;t.fn.tooltip=n,t.fn.tooltip.Constructor=d,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=p,this}}(t)}).call(e,i(0))},24:function(t,e,i){"use strict";(function(t){var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};+function(t){function i(i){return this.each(function(){var n=t(this),o=n.data("bs.popover"),a="object"==(void 0===i?"undefined":e(i))&&i;!o&&/destroy|hide/.test(i)||(o||n.data("bs.popover",o=new s(this,a)),"string"==typeof i&&o[i]())})}var s=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");s.VERSION="3.4.1",s.DEFAULTS=t.extend({},t.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=t.extend({},t.fn.tooltip.Constructor.prototype),s.prototype.constructor=s,s.prototype.getDefaults=function(){return s.DEFAULTS},s.prototype.setContent=function(){var t=this.tip(),i=this.getTitle(),s=this.getContent();if(this.options.html){var n=void 0===s?"undefined":e(s);this.options.sanitize&&(i=this.sanitizeHtml(i),"string"===n&&(s=this.sanitizeHtml(s))),t.find(".popover-title").html(i),t.find(".popover-content").children().detach().end()["string"===n?"html":"append"](s)}else t.find(".popover-title").text(i),t.find(".popover-content").children().detach().end().text(s);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 n=t.fn.popover;t.fn.popover=i,t.fn.popover.Constructor=s,t.fn.popover.noConflict=function(){return t.fn.popover=n,this}}(t)}).call(e,i(0))},25:function(t,e,i){"use strict";(function(t){+function(t){function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return!1}t.fn.emulateTransitionEnd=function(e){var i=!1,s=this;t(this).one("bsTransitionEnd",function(){i=!0});var n=function(){i||t(s).trigger(t.support.transition.end)};return setTimeout(n,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(t)}).call(e,i(0))},26:function(t,e,i){"use strict";(function(t){var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};+function(t){function i(i,n){return this.each(function(){var o=t(this),a=o.data("bs.modal"),r=t.extend({},s.DEFAULTS,o.data(),"object"==(void 0===i?"undefined":e(i))&&i);a||o.data("bs.modal",a=new s(this,r)),"string"==typeof i?a[i](n):r.show&&a.show(n)})}var s=function(e,i){this.options=i,this.$body=t(document.body),this.$element=t(e),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,t.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};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(e){var i=this,n=t.Event("show.bs.modal",{relatedTarget:e});this.$element.trigger(n),this.isShown||n.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"]',t.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){i.$element.one("mouseup.dismiss.bs.modal",function(e){t(e.target).is(i.$element)&&(i.ignoreBackdropClick=!0)})}),this.backdrop(function(){var n=t.support.transition&&i.$element.hasClass("fade");i.$element.parent().length||i.$element.appendTo(i.$body),i.$element.show().scrollTop(0),i.adjustDialog(),n&&i.$element[0].offsetWidth,i.$element.addClass("in"),i.enforceFocus();var o=t.Event("shown.bs.modal",{relatedTarget:e});n?i.$dialog.one("bsTransitionEnd",function(){i.$element.trigger("focus").trigger(o)}).emulateTransitionEnd(s.TRANSITION_DURATION):i.$element.trigger("focus").trigger(o)}))},s.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),t(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"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(s.TRANSITION_DURATION):this.hideModal())},s.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.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",t.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},s.prototype.resize=function(){this.isShown?t(window).on("resize.bs.modal",t.proxy(this.handleUpdate,this)):t(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(e){var i=this,n=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var o=t.support.transition&&n;if(this.$backdrop=t(document.createElement("div")).addClass("modal-backdrop "+n).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",t.proxy(function(t){if(this.ignoreBackdropClick)return void(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"),!e)return;o?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(s.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var a=function(){i.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",a).emulateTransitionEnd(s.BACKDROP_TRANSITION_DURATION):a()}else e&&e()},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 e=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"";var i=this.scrollbarWidth;this.bodyIsOverflowing&&(this.$body.css("padding-right",e+i),t(this.fixedContent).each(function(e,s){var n=s.style.paddingRight,o=t(s).css("padding-right");t(s).data("padding-right",n).css("padding-right",parseFloat(o)+i+"px")}))},s.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad),t(this.fixedContent).each(function(e,i){var s=t(i).data("padding-right");t(i).removeData("padding-right"),i.style.paddingRight=s||""})},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 n=t.fn.modal;t.fn.modal=i,t.fn.modal.Constructor=s,t.fn.modal.noConflict=function(){return t.fn.modal=n,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(e){var s=t(this),n=s.attr("href"),o=s.attr("data-target")||n&&n.replace(/.*(?=#[^\s]+$)/,""),a=t(document).find(o),r=a.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(n)&&n},a.data(),s.data());s.is("a")&&e.preventDefault(),a.one("show.bs.modal",function(t){t.isDefaultPrevented()||a.one("hidden.bs.modal",function(){s.is(":visible")&&s.trigger("focus")})}),i.call(a,r,this)})}(t)}).call(e,i(0))},27:function(t,e,i){"use strict";(function(t){!function(t){function e(t){return void 0===t.which||"number"==typeof t.which&&t.which>0&&(!t.ctrlKey&&!t.metaKey&&!t.altKey&&8!=t.which&&9!=t.which&&13!=t.which&&16!=t.which&&17!=t.which&&20!=t.which&&27!=t.which)}function i(e){var i=t(e);i.prop("disabled")||i.closest(".form-group").addClass("is-focused")}function s(t,e){var i;return i=t.hasClass("checkbox-inline")||t.hasClass("radio-inline")?t:t.closest(".checkbox").length?t.closest(".checkbox"):t.closest(".radio"),i.toggleClass("disabled",e)}function n(e){var n=!1;(e.is(t.material.options.checkboxElements)||e.is(t.material.options.radioElements))&&(n=!0),e.closest("label").hover(function(){var e=t(this).find("input"),o=e.prop("disabled");n&&s(t(this),o),o||i(e)},function(){o(t(this).find("input"))})}function o(e){t(e).closest(".form-group").removeClass("is-focused")}t.expr[":"].notmdproc=function(e){return!t(e).data("mdproc")},t.material={options:{validate:!0,input:!0,ripples:!0,checkbox:!0,togglebutton:!0,radio:!0,arrive:!0,autofill:!1,withRipples:[".btn:not(.btn-link)",".card-image",".navbar a:not(.withoutripple)",".dropdown-menu a",".nav-tabs a:not(.withoutripple)",".withripple",".pagination li:not(.active):not(.disabled) a:not(.withoutripple)"].join(","),inputElements:"input.form-control, textarea.form-control, select.form-control",checkboxElements:".checkbox > label > input[type=checkbox], label.checkbox-inline > input[type=checkbox]",togglebuttonElements:".togglebutton > label > input[type=checkbox]",radioElements:".radio > label > input[type=radio], label.radio-inline > input[type=radio]"},checkbox:function(e){n(t(e||this.options.checkboxElements).filter(":notmdproc").data("mdproc",!0).after("<span class='checkbox-material'><span class='check'></span></span>"))},togglebutton:function(e){n(t(e||this.options.togglebuttonElements).filter(":notmdproc").data("mdproc",!0).after("<span class='toggle'></span>"))},radio:function(e){n(t(e||this.options.radioElements).filter(":notmdproc").data("mdproc",!0).after("<span class='circle'></span><span class='check'></span>"))},input:function(e){t(e||this.options.inputElements).filter(":notmdproc").data("mdproc",!0).each(function(){var e=t(this),i=e.closest(".form-group");0!==i.length||"hidden"===e.attr("type")||e.attr("hidden")||(e.wrap("<div class='form-group'></div>"),i=e.closest(".form-group")),e.attr("data-hint")&&(e.after("<p class='help-block'>"+e.attr("data-hint")+"</p>"),e.removeAttr("data-hint"));var s={"input-lg":"form-group-lg","input-sm":"form-group-sm"};if(t.each(s,function(t,s){e.hasClass(t)&&(e.removeClass(t),i.addClass(s))}),e.hasClass("floating-label")){var n=e.attr("placeholder");e.attr("placeholder",null).removeClass("floating-label");var o=e.attr("id"),a="";o&&(a="for='"+o+"'"),i.addClass("label-floating"),e.after("<label "+a+"class='control-label'>"+n+"</label>")}null!==e.val()&&"undefined"!=e.val()&&""!==e.val()||i.addClass("is-empty"),i.find("input[type=file]").length>0&&i.addClass("is-fileinput")})},attachInputEventHandlers:function(){var s=this.options.validate;t(document).on("keydown paste",".form-control",function(i){e(i)&&t(this).closest(".form-group").removeClass("is-empty")}).on("keyup change",".form-control",function(){var e=t(this),i=e.closest(".form-group"),n=void 0===e[0].checkValidity||e[0].checkValidity();""===e.val()?i.addClass("is-empty"):i.removeClass("is-empty"),s&&(n?i.removeClass("has-error"):i.addClass("has-error"))}).on("focus",".form-control, .form-group.is-fileinput",function(){i(this)}).on("blur",".form-control, .form-group.is-fileinput",function(){o(this)}).on("change",".form-group input",function(){var e=t(this);if("file"!=e.attr("type")){var i=e.closest(".form-group");e.val()?i.removeClass("is-empty"):i.addClass("is-empty")}}).on("change",".form-group.is-fileinput input[type='file']",function(){var e=t(this),i=e.closest(".form-group"),s="";t.each(this.files,function(t,e){s+=e.name+", "}),s=s.substring(0,s.length-2),s?i.removeClass("is-empty"):i.addClass("is-empty"),i.find("input.form-control[readonly]").val(s)})},ripples:function(e){t(e||this.options.withRipples).ripples()},autofill:function(){var e=setInterval(function(){t("input[type!=checkbox]").each(function(){var e=t(this);e.val()&&e.val()!==e.attr("value")&&e.trigger("change")})},100);setTimeout(function(){clearInterval(e)},1e4)},attachAutofillEventHandlers:function(){var e;t(document).on("focus","input",function(){var i=t(this).parents("form").find("input").not("[type=file]");e=setInterval(function(){i.each(function(){var e=t(this);e.val()!==e.attr("value")&&e.trigger("change")})},100)}).on("blur",".form-group input",function(){clearInterval(e)})},init:function(e){this.options=t.extend({},this.options,e);var i=t(document);t.fn.ripples&&this.options.ripples&&this.ripples(),this.options.input&&(this.input(),this.attachInputEventHandlers()),this.options.checkbox&&this.checkbox(),this.options.togglebutton&&this.togglebutton(),this.options.radio&&this.radio(),this.options.autofill&&(this.autofill(),this.attachAutofillEventHandlers()),document.arrive&&this.options.arrive&&(t.fn.ripples&&this.options.ripples&&i.arrive(this.options.withRipples,function(){t.material.ripples(t(this))}),this.options.input&&i.arrive(this.options.inputElements,function(){t.material.input(t(this))}),this.options.checkbox&&i.arrive(this.options.checkboxElements,function(){t.material.checkbox(t(this))}),this.options.radio&&i.arrive(this.options.radioElements,function(){t.material.radio(t(this))}),this.options.togglebutton&&i.arrive(this.options.togglebuttonElements,function(){t.material.togglebutton(t(this))}))}}}(t)}).call(e,i(0))},7:function(t,e,i){"use strict";(function(t){var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(t){void 0===t.fn.each2&&t.extend(t.fn,{each2:function(e){for(var i=t([0]),s=-1,n=this.length;++s<n&&(i.context=i[0]=this[s])&&!1!==e.call(i[0],s,i););return this}})}(t),function(t,i){function s(e){var i=t(document.createTextNode(""));e.before(i),i.before(e),i.remove()}function n(t){function e(t){return H[t]||t}return t.replace(/[^\u0000-\u007E]/g,e)}function o(t,e){for(var i=0,s=e.length;i<s;i+=1)if(r(t,e[i]))return i;return-1}function a(){var e=t(W);e.appendTo("body");var i={width:e.width()-e[0].clientWidth,height:e.height()-e[0].clientHeight};return e.remove(),i}function r(t,e){return t===e||t!==i&&e!==i&&(null!==t&&null!==e&&(t.constructor===String?t+""==e+"":e.constructor===String&&e+""==t+""))}function l(e,i){var s,n,o;if(null===e||e.length<1)return[];for(s=e.split(i),n=0,o=s.length;n<o;n+=1)s[n]=t.trim(s[n]);return s}function h(t){return t.outerWidth(!1)-t.width()}function c(e){var s="keyup-change-value";e.on("keydown",function(){t.data(e,s)===i&&t.data(e,s,e.val())}),e.on("keyup",function(){var n=t.data(e,s);n!==i&&e.val()!==n&&(t.removeData(e,s),e.trigger("keyup-change"))})}function d(e){e.on("mousemove",function(e){var s=j;s!==i&&s.x===e.pageX&&s.y===e.pageY||t(e.target).trigger("mousemove-filtered",e)})}function p(t,e,s){s=s||i;var n;return function(){var i=arguments;window.clearTimeout(n),n=window.setTimeout(function(){e.apply(s,i)},t)}}function u(t,e){var i=p(t,function(t){e.trigger("scroll-debounced",t)});e.on("scroll",function(t){o(t.target,e.get())>=0&&i(t)})}function f(t){t[0]!==document.activeElement&&window.setTimeout(function(){var e,i=t[0],s=t.val().length;t.focus(),(i.offsetWidth>0||i.offsetHeight>0)&&i===document.activeElement&&(i.setSelectionRange?i.setSelectionRange(s,s):i.createTextRange&&(e=i.createTextRange(),e.collapse(!1),e.select()))},0)}function g(e){e=t(e)[0];var i=0,s=0;if("selectionStart"in e)i=e.selectionStart,s=e.selectionEnd-i;else if("selection"in document){e.focus();var n=document.selection.createRange();s=document.selection.createRange().text.length,n.moveStart("character",-e.value.length),i=n.text.length-s}return{offset:i,length:s}}function m(t){t.preventDefault(),t.stopPropagation()}function v(t){t.preventDefault(),t.stopImmediatePropagation()}function x(e){if(!R){var i=e[0].currentStyle||window.getComputedStyle(e[0],null);R=t(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:i.fontSize,fontFamily:i.fontFamily,fontStyle:i.fontStyle,fontWeight:i.fontWeight,letterSpacing:i.letterSpacing,textTransform:i.textTransform,whiteSpace:"nowrap"}),R.attr("class","select2-sizer"),t("body").append(R)}return R.text(e.val()),R.width()}function y(e,i,s){var n,o,a=[];n=t.trim(e.attr("class")),n&&(n=""+n,t(n.split(/\s+/)).each2(function(){0===this.indexOf("select2-")&&a.push(this)})),n=t.trim(i.attr("class")),n&&(n=""+n,t(n.split(/\s+/)).each2(function(){0!==this.indexOf("select2-")&&(o=s(this))&&a.push(o)})),e.attr("class",a.join(" "))}function b(t,e,i,s){var o=n(t.toUpperCase()).indexOf(n(e.toUpperCase())),a=e.length;if(o<0)return void i.push(s(t));i.push(s(t.substring(0,o))),i.push("<span class='select2-match'>"),i.push(s(t.substring(o,o+a))),i.push("</span>"),i.push(s(t.substring(o+a,t.length)))}function w(t){var e={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return String(t).replace(/[&<>"'\/\\]/g,function(t){return e[t]})}function k(e){var s,n=null,o=e.quietMillis||100,a=e.url,r=this;return function(l){window.clearTimeout(s),s=window.setTimeout(function(){var s=e.data,o=a,h=e.transport||t.fn.select2.ajaxDefaults.transport,c={type:e.type||"GET",cache:e.cache||!1,jsonpCallback:e.jsonpCallback||i,dataType:e.dataType||"json"},d=t.extend({},t.fn.select2.ajaxDefaults.params,c);s=s?s.call(r,l.term,l.page,l.context):null,o="function"==typeof o?o.call(r,l.term,l.page,l.context):o,n&&"function"==typeof n.abort&&n.abort(),e.params&&(t.isFunction(e.params)?t.extend(d,e.params.call(r)):t.extend(d,e.params)),t.extend(d,{url:o,dataType:e.dataType,data:s,success:function(t){var i=e.results(t,l.page,l);l.callback(i)},error:function(t,e,i){var s={hasError:!0,jqXHR:t,textStatus:e,errorThrown:i};l.callback(s)}}),n=h.call(r,d)},o)}}function M(e){var i,s,n=e,o=function(t){return""+t.text};t.isArray(n)&&(s=n,n={results:s}),!1===t.isFunction(n)&&(s=n,n=function(){return s});var a=n();return a.text&&(o=a.text,t.isFunction(o)||(i=a.text,o=function(t){return t[i]})),function(e){var i,s=e.term,a={results:[]};if(""===s)return void e.callback(n());i=function(n,a){var r,l;if(n=n[0],n.children){r={};for(l in n)n.hasOwnProperty(l)&&(r[l]=n[l]);r.children=[],t(n.children).each2(function(t,e){i(e,r.children)}),(r.children.length||e.matcher(s,o(r),n))&&a.push(r)}else e.matcher(s,o(n),n)&&a.push(n)},t(n().results).each2(function(t,e){i(e,a.results)}),e.callback(a)}}function S(e){var s=t.isFunction(e);return function(n){var o=n.term,a={results:[]},r=s?e(n):e;t.isArray(r)&&(t(r).each(function(){var t=this.text!==i,e=t?this.text:this;(""===o||n.matcher(o,e))&&a.results.push(t?this:{id:this,text:this})}),n.callback(a))}}function T(e,i){if(t.isFunction(e))return!0;if(!e)return!1;if("string"==typeof e)return!0;throw new Error(i+" must be a string, function, or falsy value")}function C(e,i){if(t.isFunction(e)){var s=Array.prototype.slice.call(arguments,2);return e.apply(i,s)}return e}function A(e){var i=0;return t.each(e,function(t,e){e.children?i+=A(e.children):i++}),i}function E(t,e,s,n){var o,a,l,h,c,d=t,p=!1;if(!n.createSearchChoice||!n.tokenSeparators||n.tokenSeparators.length<1)return i;for(;;){for(a=-1,l=0,h=n.tokenSeparators.length;l<h&&(c=n.tokenSeparators[l],!((a=t.indexOf(c))>=0));l++);if(a<0)break;if(o=t.substring(0,a),t=t.substring(a+c.length),o.length>0&&(o=n.createSearchChoice.call(this,o,e))!==i&&null!==o&&n.id(o)!==i&&null!==n.id(o)){for(p=!1,l=0,h=e.length;l<h;l++)if(r(n.id(o),n.id(e[l]))){p=!0;break}p||s(o)}}return d!==t?t:void 0}function P(){var e=this;t.each(arguments,function(t,i){e[i].remove(),e[i]=null})}function O(e,i){var s=function(){};return s.prototype=new e,s.prototype.constructor=s,s.prototype.parent=e.prototype,s.prototype=t.extend(s.prototype,i),s}if(window.Select2===i){var L,D,_,I,z,R,B,N,j={x:0,y:0},L={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(t){switch(t=t.which?t.which:t){case L.LEFT:case L.RIGHT:case L.UP:case L.DOWN:return!0}return!1},isControl:function(t){switch(t.which){case L.SHIFT:case L.CTRL:case L.ALT:return!0}return!!t.metaKey},isFunctionKey:function(t){return(t=t.which?t.which:t)>=112&&t<=123}},W="<div class='select2-measure-scrollbar'></div>",H={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};B=t(document),z=function(){var t=1;return function(){return t++}}(),D=O(Object,{bind:function(t){var e=this;return function(){t.apply(e,arguments)}},init:function(e){var s,n;this.opts=e=this.prepareOpts(e),this.id=e.id,e.element.data("select2")!==i&&null!==e.element.data("select2")&&e.element.data("select2").destroy(),this.container=this.createContainer(),this.liveRegion=t("<span>",{role:"status","aria-live":"polite"}).addClass("select2-hidden-accessible").appendTo(document.body),this.containerId="s2id_"+(e.element.attr("id")||"autogen"+z()),this.containerEventName=this.containerId.replace(/([.])/g,"_").replace(/([;&,\-\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.container.attr("title",e.element.attr("title")),this.body=t("body"),y(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.attr("style",e.element.attr("style")),this.container.css(C(e.containerCss,this.opts.element)),this.container.addClass(C(e.containerCssClass,this.opts.element)),this.elementTabIndex=this.opts.element.attr("tabindex"),this.opts.element.data("select2",this).attr("tabindex","-1").before(this.container).on("click.select2",m),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),y(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(C(e.dropdownCssClass,this.opts.element)),this.dropdown.data("select2",this),this.dropdown.on("click",m),this.results=s=this.container.find(".select2-results"),this.search=n=this.container.find("input.select2-input"),this.queryCount=0,this.resultsPage=0,this.context=null,this.initContainer(),this.container.on("click",m),d(this.results),this.dropdown.on("mousemove-filtered",".select2-results",this.bind(this.highlightUnderEvent)),this.dropdown.on("touchstart touchmove touchend",".select2-results",this.bind(function(t){this._touchEvent=!0,this.highlightUnderEvent(t)})),this.dropdown.on("touchmove",".select2-results",this.bind(this.touchMoved)),this.dropdown.on("touchstart touchend",".select2-results",this.bind(this.clearTouchMoved)),this.dropdown.on("click",this.bind(function(t){this._touchEvent&&(this._touchEvent=!1,this.selectHighlighted())})),u(80,this.results),this.dropdown.on("scroll-debounced",".select2-results",this.bind(this.loadMoreIfNeeded)),t(this.container).on("change",".select2-input",function(t){t.stopPropagation()}),t(this.dropdown).on("change",".select2-input",function(t){t.stopPropagation()}),t.fn.mousewheel&&s.mousewheel(function(t,e,i,n){var o=s.scrollTop();n>0&&o-n<=0?(s.scrollTop(0),m(t)):n<0&&s.get(0).scrollHeight-s.scrollTop()+n<=s.height()&&(s.scrollTop(s.get(0).scrollHeight-s.height()),m(t))}),c(n),n.on("keyup-change input paste",this.bind(this.updateResults)),n.on("focus",function(){n.addClass("select2-focused")}),n.on("blur",function(){n.removeClass("select2-focused")}),this.dropdown.on("mouseup",".select2-results",this.bind(function(e){t(e.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(e),this.selectHighlighted(e))})),this.dropdown.on("click mouseup mousedown touchstart touchend focusin",function(t){t.stopPropagation()}),this.nextSearchTerm=i,t.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),null!==e.maximumInputLength&&this.search.attr("maxlength",e.maximumInputLength);var o=e.element.prop("disabled");o===i&&(o=!1),this.enable(!o);var r=e.element.prop("readonly");r===i&&(r=!1),this.readonly(r),N=N||a(),this.autofocus=e.element.prop("autofocus"),e.element.prop("autofocus",!1),this.autofocus&&this.focus(),this.search.attr("placeholder",e.searchInputPlaceholder)},destroy:function(){var t=this.opts.element,e=t.data("select2"),s=this;this.close(),t.length&&t[0].detachEvent&&t.each(function(){this.detachEvent("onpropertychange",s._sync)}),this.propertyObserver&&(this.propertyObserver.disconnect(),this.propertyObserver=null),this._sync=null,e!==i&&(e.container.remove(),e.liveRegion.remove(),e.dropdown.remove(),t.removeClass("select2-offscreen").removeData("select2").off(".select2").prop("autofocus",this.autofocus||!1),this.elementTabIndex?t.attr({tabindex:this.elementTabIndex}):t.removeAttr("tabindex"),t.show()),P.call(this,"container","liveRegion","dropdown","results","search")},optionToData:function(t){return t.is("option")?{id:t.prop("value"),text:t.text(),element:t.get(),css:t.attr("class"),disabled:t.prop("disabled"),locked:r(t.attr("locked"),"locked")||r(t.data("locked"),!0)}:t.is("optgroup")?{text:t.attr("label"),children:[],element:t.get(),css:t.attr("class")}:void 0},prepareOpts:function(e){var s,n,o,a,h=this;if(s=e.element,"select"===s.get(0).tagName.toLowerCase()&&(this.select=n=e.element),n&&t.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in e)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}),e=t.extend({},{populateResults:function(s,n,o){var a,r=this.opts.id,l=this.liveRegion;(a=function(s,n,c){var d,p,u,f,g,m,v,x,y,b;s=e.sortResults(s,n,o);var w=[];for(d=0,p=s.length;d<p;d+=1)u=s[d],g=!0===u.disabled,f=!g&&r(u)!==i,m=u.children&&u.children.length>0,v=t("<li></li>"),v.addClass("select2-results-dept-"+c),v.addClass("select2-result"),v.addClass(f?"select2-result-selectable":"select2-result-unselectable"),g&&v.addClass("select2-disabled"),m&&v.addClass("select2-result-with-children"),v.addClass(h.opts.formatResultCssClass(u)),v.attr("role","presentation"),x=t(document.createElement("div")),x.addClass("select2-result-label"),x.attr("id","select2-result-label-"+z()),x.attr("role","option"),b=e.formatResult(u,x,o,h.opts.escapeMarkup),b!==i&&(x.html(b),v.append(x)),m&&(y=t("<ul></ul>"),y.addClass("select2-result-sub"),a(u.children,y,c+1),v.append(y)),v.data("select2-data",u),w.push(v[0]);n.append(w),l.text(e.formatMatches(s.length))})(n,s,0)}},t.fn.select2.defaults,e),"function"!=typeof e.id&&(o=e.id,e.id=function(t){return t[o]}),t.isArray(e.element.data("select2Tags"))){if("tags"in e)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+e.element.attr("id");e.tags=e.element.data("select2Tags")}if(n?(e.query=this.bind(function(t){var e,n,o,a={results:[],more:!1},r=t.term;o=function(e,i){var s;e.is("option")?t.matcher(r,e.text(),e)&&i.push(h.optionToData(e)):e.is("optgroup")&&(s=h.optionToData(e),e.children().each2(function(t,e){o(e,s.children)}),s.children.length>0&&i.push(s))},e=s.children(),this.getPlaceholder()!==i&&e.length>0&&(n=this.getPlaceholderOption())&&(e=e.not(n)),e.each2(function(t,e){o(e,a.results)}),t.callback(a)}),e.id=function(t){return t.id}):"query"in e||("ajax"in e?(a=e.element.data("ajax-url"),a&&a.length>0&&(e.ajax.url=a),e.query=k.call(e.element,e.ajax)):"data"in e?e.query=M(e.data):"tags"in e&&(e.query=S(e.tags),e.createSearchChoice===i&&(e.createSearchChoice=function(e){return{id:t.trim(e),text:t.trim(e)}}),e.initSelection===i&&(e.initSelection=function(i,s){var n=[];t(l(i.val(),e.separator)).each(function(){var i={id:this,text:this},s=e.tags;t.isFunction(s)&&(s=s()),t(s).each(function(){if(r(this.id,i.id))return i=this,!1}),n.push(i)}),s(n)}))),"function"!=typeof e.query)throw"query function not defined for Select2 "+e.element.attr("id");if("top"===e.createSearchChoicePosition)e.createSearchChoicePosition=function(t,e){t.unshift(e)};else if("bottom"===e.createSearchChoicePosition)e.createSearchChoicePosition=function(t,e){t.push(e)};else if("function"!=typeof e.createSearchChoicePosition)throw"invalid createSearchChoicePosition option must be 'top', 'bottom' or a custom function";return e},monitorSource:function(){var e,s=this.opts.element,n=this;s.on("change.select2",this.bind(function(t){!0!==this.opts.element.data("select2-change-triggered")&&this.initSelection()})),this._sync=this.bind(function(){var t=s.prop("disabled");t===i&&(t=!1),this.enable(!t);var e=s.prop("readonly");e===i&&(e=!1),this.readonly(e),y(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(C(this.opts.containerCssClass,this.opts.element)),y(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(C(this.opts.dropdownCssClass,this.opts.element))}),s.length&&s[0].attachEvent&&s.each(function(){this.attachEvent("onpropertychange",n._sync)}),(e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver)!==i&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new e(function(e){t.each(e,n._sync)}),this.propertyObserver.observe(s.get(0),{attributes:!0,subtree:!1}))},triggerSelect:function(e){var i=t.Event("select2-selecting",{val:this.id(e),object:e,choice:e});return this.opts.element.trigger(i),!i.isDefaultPrevented()},triggerChange:function(e){e=e||{},e=t.extend({},e,{type:"change",val:this.val()}),this.opts.element.data("select2-change-triggered",!0),this.opts.element.trigger(e),this.opts.element.data("select2-change-triggered",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},isInterfaceEnabled:function(){return!0===this.enabledInterface},enableInterface:function(){var t=this._enabled&&!this._readonly,e=!t;return t!==this.enabledInterface&&(this.container.toggleClass("select2-container-disabled",e),this.close(),this.enabledInterface=t,!0)},enable:function(t){t===i&&(t=!0),this._enabled!==t&&(this._enabled=t,this.opts.element.prop("disabled",!t),this.enableInterface())},disable:function(){this.enable(!1)},readonly:function(t){t===i&&(t=!1),this._readonly!==t&&(this._readonly=t,this.opts.element.prop("readonly",t),this.enableInterface())},opened:function(){return!!this.container&&this.container.hasClass("select2-dropdown-open")},positionDropdown:function(){var e,i,s,n,o,a=this.dropdown,r=this.container.offset(),l=this.container.outerHeight(!1),h=this.container.outerWidth(!1),c=a.outerHeight(!1),d=t(window),p=d.width(),u=d.height(),f=d.scrollLeft()+p,g=d.scrollTop()+u,m=r.top+l,v=r.left,x=m+c<=g,y=r.top-c>=d.scrollTop(),b=a.outerWidth(!1),w=v+b<=f,k=a.hasClass("select2-drop-above");k?(i=!0,!y&&x&&(s=!0,i=!1)):(i=!1,!x&&y&&(s=!0,i=!0)),s&&(a.hide(),r=this.container.offset(),l=this.container.outerHeight(!1),h=this.container.outerWidth(!1),c=a.outerHeight(!1),f=d.scrollLeft()+p,g=d.scrollTop()+u,m=r.top+l,v=r.left,b=a.outerWidth(!1),w=v+b<=f,a.show(),this.focusSearch()),this.opts.dropdownAutoWidth?(o=t(".select2-results",a)[0],a.addClass("select2-drop-auto-width"),a.css("width",""),b=a.outerWidth(!1)+(o.scrollHeight===o.clientHeight?0:N.width),b>h?h=b:b=h,c=a.outerHeight(!1),w=v+b<=f):this.container.removeClass("select2-drop-auto-width"),"static"!==this.body.css("position")&&(e=this.body.offset(),m-=e.top,v-=e.left),w||(v=r.left+this.container.outerWidth(!1)-b),n={left:v,width:h},i?(n.top=r.top-c,n.bottom="auto",this.container.addClass("select2-drop-above"),a.addClass("select2-drop-above")):(n.top=m,n.bottom="auto",this.container.removeClass("select2-drop-above"),a.removeClass("select2-drop-above")),n=t.extend(n,C(this.opts.dropdownCss,this.opts.element)),a.css(n)},shouldOpen:function(){var e;return!this.opened()&&(!1!==this._enabled&&!0!==this._readonly&&(e=t.Event("select2-opening"),this.opts.element.trigger(e),!e.isDefaultPrevented()))},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")},open:function(){return!!this.shouldOpen()&&(this.opening(),B.on("mousemove.select2Event",function(t){j.x=t.pageX,j.y=t.pageY}),!0)},opening:function(){var e,i=this.containerEventName,n="scroll."+i,o="resize."+i,a="orientationchange."+i;this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.clearDropdownAlignmentPreference(),this.dropdown[0]!==this.body.children().last()[0]&&this.dropdown.detach().appendTo(this.body),e=t("#select2-drop-mask"),0==e.length&&(e=t(document.createElement("div")),e.attr("id","select2-drop-mask").attr("class","select2-drop-mask"),e.hide(),e.appendTo(this.body),e.on("mousedown touchstart click",function(i){s(e);var n,o=t("#select2-drop");o.length>0&&(n=o.data("select2"),n.opts.selectOnBlur&&n.selectHighlighted({noFocus:!0}),n.close(),i.preventDefault(),i.stopPropagation())})),this.dropdown.prev()[0]!==e[0]&&this.dropdown.before(e),t("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),e.show(),this.positionDropdown(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active");var r=this;this.container.parents().add(window).each(function(){t(this).on(o+" "+n+" "+a,function(t){r.opened()&&r.positionDropdown()})})},close:function(){if(this.opened()){var e=this.containerEventName,i="scroll."+e,s="resize."+e,n="orientationchange."+e;this.container.parents().add(window).each(function(){t(this).off(i).off(s).off(n)}),this.clearDropdownAlignmentPreference(),t("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open").removeClass("select2-container-active"),this.results.empty(),B.off("mousemove.select2Event"),this.clearSearch(),this.search.removeClass("select2-active"),this.opts.element.trigger(t.Event("select2-close"))}},externalSearch:function(t){this.open(),this.search.val(t),this.updateResults(!1)},clearSearch:function(){},getMaximumSelectionSize:function(){return C(this.opts.maximumSelectionSize,this.opts.element)},ensureHighlightVisible:function(){var e,i,s,n,o,a,r,l,h=this.results;if(!((i=this.highlight())<0)){if(0==i)return void h.scrollTop(0);e=this.findHighlightableChoices().find(".select2-result-label"),s=t(e[i]),l=(s.offset()||{}).top||0,n=l+s.outerHeight(!0),i===e.length-1&&(r=h.find("li.select2-more-results"),r.length>0&&(n=r.offset().top+r.outerHeight(!0))),o=h.offset().top+h.outerHeight(!0),n>o&&h.scrollTop(h.scrollTop()+(n-o)),a=l-h.offset().top,a<0&&"none"!=s.css("display")&&h.scrollTop(h.scrollTop()+a)}},findHighlightableChoices:function(){return this.results.find(".select2-result-selectable:not(.select2-disabled):not(.select2-selected)")},moveHighlight:function(e){for(var i=this.findHighlightableChoices(),s=this.highlight();s>-1&&s<i.length;){s+=e;var n=t(i[s]);if(n.hasClass("select2-result-selectable")&&!n.hasClass("select2-disabled")&&!n.hasClass("select2-selected")){this.highlight(s);break}}},highlight:function(e){var i,s,n=this.findHighlightableChoices();if(0===arguments.length)return o(n.filter(".select2-highlighted")[0],n.get());e>=n.length&&(e=n.length-1),e<0&&(e=0),this.removeHighlight(),i=t(n[e]),i.addClass("select2-highlighted"),this.search.attr("aria-activedescendant",i.find(".select2-result-label").attr("id")),this.ensureHighlightVisible(),this.liveRegion.text(i.text()),(s=i.data("select2-data"))&&this.opts.element.trigger({type:"select2-highlight",val:this.id(s),choice:s})},removeHighlight:function(){this.results.find(".select2-highlighted").removeClass("select2-highlighted")},touchMoved:function(){this._touchMoved=!0},clearTouchMoved:function(){this._touchMoved=!1},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(e){var i=t(e.target).closest(".select2-result-selectable");if(i.length>0&&!i.is(".select2-highlighted")){var s=this.findHighlightableChoices();this.highlight(s.index(i))}else 0==i.length&&this.removeHighlight()},loadMoreIfNeeded:function(){var t=this.results,e=t.find("li.select2-more-results"),i=this.resultsPage+1,s=this,n=this.search.val(),o=this.context;0!==e.length&&e.offset().top-t.offset().top-t.height()<=this.opts.loadMorePadding&&(e.addClass("select2-active"),this.opts.query({element:this.opts.element,term:n,page:i,context:o,matcher:this.opts.matcher,callback:this.bind(function(a){s.opened()&&(s.opts.populateResults.call(this,t,a.results,{term:n,page:i,context:o}),s.postprocessResults(a,!1,!1),!0===a.more?(e.detach().appendTo(t).text(C(s.opts.formatLoadMore,s.opts.element,i+1)),window.setTimeout(function(){s.loadMoreIfNeeded()},10)):e.remove(),s.positionDropdown(),s.resultsPage=i,s.context=a.context,this.opts.element.trigger({type:"select2-loaded",items:a}))})}))},tokenize:function(){},updateResults:function(e){function s(){h.removeClass("select2-active"),p.positionDropdown(),c.find(".select2-no-results,.select2-selection-limit,.select2-searching").length?p.liveRegion.text(c.text()):p.liveRegion.text(p.opts.formatMatches(c.find(".select2-result-selectable").length))}function n(t){c.html(t),s()}var o,a,l,h=this.search,c=this.results,d=this.opts,p=this,u=h.val(),f=t.data(this.container,"select2-last-term");if((!0===e||!f||!r(u,f))&&(t.data(this.container,"select2-last-term",u),!0===e||!1!==this.showSearchInput&&this.opened())){l=++this.queryCount;var g=this.getMaximumSelectionSize();if(g>=1&&(o=this.data(),t.isArray(o)&&o.length>=g&&T(d.formatSelectionTooBig,"formatSelectionTooBig")))return void n("<li class='select2-selection-limit'>"+C(d.formatSelectionTooBig,d.element,g)+"</li>");if(h.val().length<d.minimumInputLength)return n(T(d.formatInputTooShort,"formatInputTooShort")?"<li class='select2-no-results'>"+C(d.formatInputTooShort,d.element,h.val(),d.minimumInputLength)+"</li>":""),void(e&&this.showSearch&&this.showSearch(!0));if(d.maximumInputLength&&h.val().length>d.maximumInputLength)return void n(T(d.formatInputTooLong,"formatInputTooLong")?"<li class='select2-no-results'>"+C(d.formatInputTooLong,d.element,h.val(),d.maximumInputLength)+"</li>":"");d.formatSearching&&0===this.findHighlightableChoices().length&&n("<li class='select2-searching'>"+C(d.formatSearching,d.element)+"</li>"),h.addClass("select2-active"),this.removeHighlight(),a=this.tokenize(),a!=i&&null!=a&&h.val(a),this.resultsPage=1,d.query({element:d.element,term:h.val(),page:this.resultsPage,context:null,matcher:d.matcher,callback:this.bind(function(o){var a;if(l==this.queryCount){if(!this.opened())return void this.search.removeClass("select2-active");if(o.hasError!==i&&T(d.formatAjaxError,"formatAjaxError"))return void n("<li class='select2-ajax-error'>"+C(d.formatAjaxError,d.element,o.jqXHR,o.textStatus,o.errorThrown)+"</li>");if(this.context=o.context===i?null:o.context,this.opts.createSearchChoice&&""!==h.val()&&(a=this.opts.createSearchChoice.call(p,h.val(),o.results))!==i&&null!==a&&p.id(a)!==i&&null!==p.id(a)&&0===t(o.results).filter(function(){return r(p.id(this),p.id(a))}).length&&this.opts.createSearchChoicePosition(o.results,a),0===o.results.length&&T(d.formatNoMatches,"formatNoMatches"))return void n("<li class='select2-no-results'>"+C(d.formatNoMatches,d.element,h.val())+"</li>");c.empty(),p.opts.populateResults.call(this,c,o.results,{term:h.val(),page:this.resultsPage,context:null}),!0===o.more&&T(d.formatLoadMore,"formatLoadMore")&&(c.append("<li class='select2-more-results'>"+d.escapeMarkup(C(d.formatLoadMore,d.element,this.resultsPage))+"</li>"),window.setTimeout(function(){p.loadMoreIfNeeded()},10)),this.postprocessResults(o,e),s(),this.opts.element.trigger({type:"select2-loaded",items:o})}})})}},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),this.close(),this.container.removeClass("select2-container-active"),this.search[0]===document.activeElement&&this.search.blur(),this.clearSearch(),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){f(this.search)},selectHighlighted:function(t){if(this._touchMoved)return void this.clearTouchMoved();var e=this.highlight(),i=this.results.find(".select2-highlighted"),s=i.closest(".select2-result").data("select2-data");s?(this.highlight(e),this.onSelect(s,t)):t&&t.noFocus&&this.close()},getPlaceholder:function(){var t;return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder||((t=this.getPlaceholderOption())!==i?t.text():i)},getPlaceholderOption:function(){if(this.select){var e=this.select.children("option").first();if(this.opts.placeholderOption!==i)return"first"===this.opts.placeholderOption&&e||"function"==typeof this.opts.placeholderOption&&this.opts.placeholderOption(this.select);if(""===t.trim(e.text())&&""===e.val())return e}},initContainerWidth:function(){function e(){var e,s,n,o,a,r;if("off"===this.opts.width)return null;if("element"===this.opts.width)return 0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px";if("copy"===this.opts.width||"resolve"===this.opts.width){if((e=this.opts.element.attr("style"))!==i)for(s=e.split(";"),o=0,a=s.length;o<a;o+=1)if(r=s[o].replace(/\s/g,""),null!==(n=r.match(/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i))&&n.length>=1)return n[1];return"resolve"===this.opts.width?(e=this.opts.element.css("width"),e.indexOf("%")>0?e:0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px"):null}return t.isFunction(this.opts.width)?this.opts.width():this.opts.width}var s=e.call(this);null!==s&&this.container.css("width",s)}}),_=O(D,{createContainer:function(){return t(document.createElement("div")).attr({class:"select2-container"}).html(["<a href='javascript:void(0)' class='select2-choice' tabindex='-1'>"," <span class='select2-chosen'>&#160;</span><abbr class='select2-search-choice-close'></abbr>"," <span class='select2-arrow' role='presentation'><b role='presentation'></b></span>","</a>","<label for='' class='select2-offscreen'></label>","<input class='select2-focusser select2-offscreen' type='text' aria-haspopup='true' role='button' />","<div class='select2-drop select2-display-none'>"," <div class='select2-search'>"," <label for='' class='select2-offscreen'></label>"," <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input' role='combobox' aria-expanded='true'"," aria-autocomplete='list' />"," </div>"," <ul class='select2-results' role='listbox'>"," </ul>","</div>"].join(""))},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.focusser.prop("disabled",!this.isInterfaceEnabled())},opening:function(){var e,s,n;this.opts.minimumResultsForSearch>=0&&this.showSearch(!0),this.parent.opening.apply(this,arguments),!1!==this.showSearchInput&&this.search.val(this.focusser.val()),this.opts.shouldFocusInput(this)&&(this.search.focus(),e=this.search.get(0),e.createTextRange?(s=e.createTextRange(),s.collapse(!1),s.select()):e.setSelectionRange&&(n=this.search.val().length,e.setSelectionRange(n,n))),""===this.search.val()&&this.nextSearchTerm!=i&&(this.search.val(this.nextSearchTerm),this.search.select()),this.focusser.prop("disabled",!0).val(""),this.updateResults(!0),this.opts.element.trigger(t.Event("select2-open"))},close:function(){this.opened()&&(this.parent.close.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},focus:function(){this.opened()?this.close():(this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus()},destroy:function(){t("label[for='"+this.focusser.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),P.call(this,"selection","focusser")},initContainer:function(){var e,i,n=this.container,o=this.dropdown,a=z();this.opts.minimumResultsForSearch<0?this.showSearch(!1):this.showSearch(!0),this.selection=e=n.find(".select2-choice"),this.focusser=n.find(".select2-focusser"),e.find(".select2-chosen").attr("id","select2-chosen-"+a),this.focusser.attr("aria-labelledby","select2-chosen-"+a),this.results.attr("id","select2-results-"+a),this.search.attr("aria-owns","select2-results-"+a),this.focusser.attr("id","s2id_autogen"+a),i=t("label[for='"+this.opts.element.attr("id")+"']"),this.focusser.prev().text(i.text()).attr("for",this.focusser.attr("id"));var r=this.opts.element.attr("title");this.opts.element.attr("title",r||i.text()),this.focusser.attr("tabindex",this.elementTabIndex),this.search.attr("id",this.focusser.attr("id")+"_search"),this.search.prev().text(t("label[for='"+this.focusser.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.search.on("keydown",this.bind(function(t){if(this.isInterfaceEnabled()&&229!=t.keyCode){if(t.which===L.PAGE_UP||t.which===L.PAGE_DOWN)return void m(t);switch(t.which){case L.UP:case L.DOWN:return this.moveHighlight(t.which===L.UP?-1:1),void m(t);case L.ENTER:return this.selectHighlighted(),void m(t);case L.TAB:return void this.selectHighlighted({noFocus:!0});case L.ESC:return this.cancel(t),void m(t)}}})),this.search.on("blur",this.bind(function(t){document.activeElement===this.body.get(0)&&window.setTimeout(this.bind(function(){this.opened()&&this.search.focus()}),0)})),this.focusser.on("keydown",this.bind(function(t){if(this.isInterfaceEnabled()&&t.which!==L.TAB&&!L.isControl(t)&&!L.isFunctionKey(t)&&t.which!==L.ESC){if(!1===this.opts.openOnEnter&&t.which===L.ENTER)return void m(t);if(t.which==L.DOWN||t.which==L.UP||t.which==L.ENTER&&this.opts.openOnEnter){if(t.altKey||t.ctrlKey||t.shiftKey||t.metaKey)return;return this.open(),void m(t)}return t.which==L.DELETE||t.which==L.BACKSPACE?(this.opts.allowClear&&this.clear(),void m(t)):void 0}})),c(this.focusser),this.focusser.on("keyup-change input",this.bind(function(t){if(this.opts.minimumResultsForSearch>=0){if(t.stopPropagation(),this.opened())return;this.open()}})),e.on("mousedown touchstart","abbr",this.bind(function(t){this.isInterfaceEnabled()&&(this.clear(),v(t),this.close(),this.selection.focus())})),e.on("mousedown touchstart",this.bind(function(i){s(e),this.container.hasClass("select2-container-active")||this.opts.element.trigger(t.Event("select2-focus")),this.opened()?this.close():this.isInterfaceEnabled()&&this.open(),m(i)})),o.on("mousedown touchstart",this.bind(function(){this.opts.shouldFocusInput(this)&&this.search.focus()})),e.on("focus",this.bind(function(t){m(t)})),this.focusser.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(t.Event("select2-focus")),this.container.addClass("select2-container-active")})).on("blur",this.bind(function(){this.opened()||(this.container.removeClass("select2-container-active"),this.opts.element.trigger(t.Event("select2-blur")))})),this.search.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(t.Event("select2-focus")),this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.setPlaceholder()},clear:function(e){var i=this.selection.data("select2-data");if(i){var s=t.Event("select2-clearing");if(this.opts.element.trigger(s),s.isDefaultPrevented())return;var n=this.getPlaceholderOption();this.opts.element.val(n?n.val():""),this.selection.find(".select2-chosen").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),!1!==e&&(this.opts.element.trigger({type:"select2-removed",val:this.id(i),choice:i}),this.triggerChange({removed:i}))}},initSelection:function(){if(this.isPlaceholderOptionSelected())this.updateSelection(null),this.close(),this.setPlaceholder();else{var t=this;this.opts.initSelection.call(null,this.opts.element,function(e){e!==i&&null!==e&&(t.updateSelection(e),t.close(),t.setPlaceholder(),t.nextSearchTerm=t.opts.nextSearchTerm(e,t.search.val()))})}},isPlaceholderOptionSelected:function(){var t;return this.getPlaceholder()!==i&&((t=this.getPlaceholderOption())!==i&&t.prop("selected")||""===this.opts.element.val()||this.opts.element.val()===i||null===this.opts.element.val())},prepareOpts:function(){var e=this.parent.prepareOpts.apply(this,arguments),i=this;return"select"===e.element.get(0).tagName.toLowerCase()?e.initSelection=function(t,e){var s=t.find("option").filter(function(){return this.selected&&!this.disabled});e(i.optionToData(s))}:"data"in e&&(e.initSelection=e.initSelection||function(i,s){var n=i.val(),o=null;e.query({matcher:function(t,i,s){var a=r(n,e.id(s));return a&&(o=s),a},callback:t.isFunction(s)?function(){s(o)}:t.noop})}),e},getPlaceholder:function(){return this.select&&this.getPlaceholderOption()===i?i:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var t=this.getPlaceholder();if(this.isPlaceholderOptionSelected()&&t!==i){if(this.select&&this.getPlaceholderOption()===i)return;this.selection.find(".select2-chosen").html(this.opts.escapeMarkup(t)),this.selection.addClass("select2-default"),this.container.removeClass("select2-allowclear")}},postprocessResults:function(t,e,i){var s=0,n=this;if(this.findHighlightableChoices().each2(function(t,e){if(r(n.id(e.data("select2-data")),n.opts.element.val()))return s=t,!1}),!1!==i&&(!0===e&&s>=0?this.highlight(s):this.highlight(0)),!0===e){var o=this.opts.minimumResultsForSearch;o>=0&&this.showSearch(A(t.results)>=o)}},showSearch:function(e){this.showSearchInput!==e&&(this.showSearchInput=e,this.dropdown.find(".select2-search").toggleClass("select2-search-hidden",!e),this.dropdown.find(".select2-search").toggleClass("select2-offscreen",!e),t(this.dropdown,this.container).toggleClass("select2-with-searchbox",e))},onSelect:function(t,e){if(this.triggerSelect(t)){var i=this.opts.element.val(),s=this.data();this.opts.element.val(this.id(t)),this.updateSelection(t),this.opts.element.trigger({type:"select2-selected",val:this.id(t),choice:t}),this.nextSearchTerm=this.opts.nextSearchTerm(t,this.search.val()),this.close(),e&&e.noFocus||!this.opts.shouldFocusInput(this)||this.focusser.focus(),r(i,this.id(t))||this.triggerChange({added:t,removed:s})}},updateSelection:function(t){var e,s,n=this.selection.find(".select2-chosen");this.selection.data("select2-data",t),n.empty(),null!==t&&(e=this.opts.formatSelection(t,n,this.opts.escapeMarkup)),e!==i&&n.append(e),s=this.opts.formatSelectionCssClass(t,n),s!==i&&n.addClass(s),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==i&&this.container.addClass("select2-allowclear")},val:function(){var t,e=!1,s=null,n=this,o=this.data();if(0===arguments.length)return this.opts.element.val();if(t=arguments[0],arguments.length>1&&(e=arguments[1]),this.select)this.select.val(t).find("option").filter(function(){return this.selected}).each2(function(t,e){return s=n.optionToData(e),!1}),this.updateSelection(s),this.setPlaceholder(),e&&this.triggerChange({added:s,removed:o});else{if(!t&&0!==t)return void this.clear(e);if(this.opts.initSelection===i)throw new Error("cannot call val() if initSelection() is not defined");this.opts.element.val(t),this.opts.initSelection(this.opts.element,function(t){n.opts.element.val(t?n.id(t):""),n.updateSelection(t),n.setPlaceholder(),e&&n.triggerChange({added:t,removed:o})})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(t){var e,s=!1;if(0===arguments.length)return e=this.selection.data("select2-data"),e==i&&(e=null),e;arguments.length>1&&(s=arguments[1]),t?(e=this.data(),this.opts.element.val(t?this.id(t):""),this.updateSelection(t),s&&this.triggerChange({added:t,removed:e})):this.clear(s)}}),I=O(D,{createContainer:function(){return t(document.createElement("div")).attr({class:"select2-container select2-container-multi"}).html(["<ul class='select2-choices'>"," <li class='select2-search-field'>"," <label for='' class='select2-offscreen'></label>"," <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'>"," </li>","</ul>","<div class='select2-drop select2-drop-multi select2-display-none'>"," <ul class='select2-results'>"," </ul>","</div>"].join(""))},prepareOpts:function(){var e=this.parent.prepareOpts.apply(this,arguments),i=this;return"select"===e.element.get(0).tagName.toLowerCase()?e.initSelection=function(t,e){var s=[];t.find("option").filter(function(){return this.selected&&!this.disabled}).each2(function(t,e){s.push(i.optionToData(e))}),e(s)}:"data"in e&&(e.initSelection=e.initSelection||function(i,s){var n=l(i.val(),e.separator),o=[];e.query({matcher:function(i,s,a){var l=t.grep(n,function(t){return r(t,e.id(a))}).length;return l&&o.push(a),l},callback:t.isFunction(s)?function(){for(var t=[],i=0;i<n.length;i++)for(var a=n[i],l=0;l<o.length;l++){var h=o[l];if(r(a,e.id(h))){t.push(h),o.splice(l,1);break}}s(t)}:t.noop})}),e},selectChoice:function(t){var e=this.container.find(".select2-search-choice-focus");e.length&&t&&t[0]==e[0]||(e.length&&this.opts.element.trigger("choice-deselected",e),e.removeClass("select2-search-choice-focus"),t&&t.length&&(this.close(),t.addClass("select2-search-choice-focus"),this.opts.element.trigger("choice-selected",t)))},destroy:function(){t("label[for='"+this.search.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),P.call(this,"searchContainer","selection")},initContainer:function(){var e,i=".select2-choices";this.searchContainer=this.container.find(".select2-search-field"),this.selection=e=this.container.find(i);var s=this;this.selection.on("click",".select2-search-choice:not(.select2-locked)",function(e){s.search[0].focus(),s.selectChoice(t(this))}),this.search.attr("id","s2id_autogen"+z()),this.search.prev().text(t("label[for='"+this.opts.element.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.search.on("input paste",this.bind(function(){this.search.attr("placeholder")&&0==this.search.val().length||this.isInterfaceEnabled()&&(this.opened()||this.open())})),this.search.attr("tabindex",this.elementTabIndex),this.keydowns=0,this.search.on("keydown",this.bind(function(t){if(this.isInterfaceEnabled()){++this.keydowns;var i=e.find(".select2-search-choice-focus"),s=i.prev(".select2-search-choice:not(.select2-locked)"),n=i.next(".select2-search-choice:not(.select2-locked)"),o=g(this.search);if(i.length&&(t.which==L.LEFT||t.which==L.RIGHT||t.which==L.BACKSPACE||t.which==L.DELETE||t.which==L.ENTER)){var a=i;return t.which==L.LEFT&&s.length?a=s:t.which==L.RIGHT?a=n.length?n:null:t.which===L.BACKSPACE?this.unselect(i.first())&&(this.search.width(10),a=s.length?s:n):t.which==L.DELETE?this.unselect(i.first())&&(this.search.width(10),a=n.length?n:null):t.which==L.ENTER&&(a=null),this.selectChoice(a),m(t),void(a&&a.length||this.open())}if((t.which===L.BACKSPACE&&1==this.keydowns||t.which==L.LEFT)&&0==o.offset&&!o.length)return this.selectChoice(e.find(".select2-search-choice:not(.select2-locked)").last()),void m(t);if(this.selectChoice(null),this.opened())switch(t.which){case L.UP:case L.DOWN:return this.moveHighlight(t.which===L.UP?-1:1),void m(t);case L.ENTER:return this.selectHighlighted(),void m(t);case L.TAB:return this.selectHighlighted({noFocus:!0}),void this.close();case L.ESC:return this.cancel(t),void m(t)}if(t.which!==L.TAB&&!L.isControl(t)&&!L.isFunctionKey(t)&&t.which!==L.BACKSPACE&&t.which!==L.ESC){if(t.which===L.ENTER){if(!1===this.opts.openOnEnter)return;if(t.altKey||t.ctrlKey||t.shiftKey||t.metaKey)return}this.open(),t.which!==L.PAGE_UP&&t.which!==L.PAGE_DOWN||m(t),t.which===L.ENTER&&m(t)}}})),this.search.on("keyup",this.bind(function(t){this.keydowns=0,this.resizeSearch()})),this.search.on("blur",this.bind(function(e){this.container.removeClass("select2-container-active"),this.search.removeClass("select2-focused"),this.selectChoice(null),this.opened()||this.clearSearch(),e.stopImmediatePropagation(),this.opts.element.trigger(t.Event("select2-blur"))})),this.container.on("click",i,this.bind(function(e){this.isInterfaceEnabled()&&(t(e.target).closest(".select2-search-choice").length>0||(this.selectChoice(null),this.clearPlaceholder(),this.container.hasClass("select2-container-active")||this.opts.element.trigger(t.Event("select2-focus")),this.open(),this.focusSearch(),e.preventDefault()))})),this.container.on("focus",i,this.bind(function(){this.isInterfaceEnabled()&&(this.container.hasClass("select2-container-active")||this.opts.element.trigger(t.Event("select2-focus")),this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder())})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.clearSearch()},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.search.prop("disabled",!this.isInterfaceEnabled())},initSelection:function(){if(""===this.opts.element.val()&&""===this.opts.element.text()&&(this.updateSelection([]),this.close(),this.clearSearch()),this.select||""!==this.opts.element.val()){var t=this;this.opts.initSelection.call(null,this.opts.element,function(e){e!==i&&null!==e&&(t.updateSelection(e),t.close(),t.clearSearch())})}},clearSearch:function(){var t=this.getPlaceholder(),e=this.getMaxSearchWidth();t!==i&&0===this.getVal().length&&!1===this.search.hasClass("select2-focused")?(this.search.val(t).addClass("select2-default"),this.search.width(e>0?e:this.container.css("width"))):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.clearPlaceholder(),this.resizeSearch(),this.parent.opening.apply(this,arguments),this.focusSearch(),""===this.search.val()&&this.nextSearchTerm!=i&&(this.search.val(this.nextSearchTerm),this.search.select()),this.updateResults(!0),this.opts.shouldFocusInput(this)&&this.search.focus(),this.opts.element.trigger(t.Event("select2-open"))},close:function(){this.opened()&&this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus()},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(e){var i=[],s=[],n=this;t(e).each(function(){o(n.id(this),i)<0&&(i.push(n.id(this)),s.push(this))}),e=s,this.selection.find(".select2-search-choice").remove(),t(e).each(function(){n.addSelectedChoice(this)}),n.postprocessResults()},tokenize:function(){var t=this.search.val();null!=(t=this.opts.tokenizer.call(this,t,this.data(),this.bind(this.onSelect),this.opts))&&t!=i&&(this.search.val(t),t.length>0&&this.open())},onSelect:function(t,e){this.triggerSelect(t)&&""!==t.text&&(this.addSelectedChoice(t),this.opts.element.trigger({type:"selected",val:this.id(t),choice:t}),this.nextSearchTerm=this.opts.nextSearchTerm(t,this.search.val()),this.clearSearch(),this.updateResults(),!this.select&&this.opts.closeOnSelect||this.postprocessResults(t,!1,!0===this.opts.closeOnSelect),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.getMaximumSelectionSize()>0&&this.val().length>=this.getMaximumSelectionSize()?this.updateResults(!0):this.nextSearchTerm!=i&&(this.search.val(this.nextSearchTerm),this.updateResults(),this.search.select()),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:t}),e&&e.noFocus||this.focusSearch())},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(e){var s,n,o=!e.locked,a=t("<li class='select2-search-choice'> <div></div> <a href='#' class='select2-search-choice-close' tabindex='-1'></a></li>"),r=t("<li class='select2-search-choice select2-locked'><div></div></li>"),l=o?a:r,h=this.id(e),c=this.getVal();s=this.opts.formatSelection(e,l.find("div"),this.opts.escapeMarkup),s!=i&&l.find("div").replaceWith("<div>"+s+"</div>"),n=this.opts.formatSelectionCssClass(e,l.find("div")),n!=i&&l.addClass(n),o&&l.find(".select2-search-choice-close").on("mousedown",m).on("click dblclick",this.bind(function(e){this.isInterfaceEnabled()&&(this.unselect(t(e.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),m(e),this.close(),this.focusSearch())})).on("focus",this.bind(function(){this.isInterfaceEnabled()&&(this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"))})),l.data("select2-data",e),l.insertBefore(this.searchContainer),c.push(h),this.setVal(c)},unselect:function(e){var i,s,n=this.getVal();if(e=e.closest(".select2-search-choice"),0===e.length)throw"Invalid argument: "+e+". Must be .select2-search-choice";if(i=e.data("select2-data")){var a=t.Event("select2-removing");if(a.val=this.id(i),a.choice=i,this.opts.element.trigger(a),a.isDefaultPrevented())return!1;for(;(s=o(this.id(i),n))>=0;)n.splice(s,1),this.setVal(n),this.select&&this.postprocessResults();return e.remove(),this.opts.element.trigger({type:"select2-removed",val:this.id(i),choice:i}),this.triggerChange({removed:i}),!0}},postprocessResults:function(t,e,i){var s=this.getVal(),n=this.results.find(".select2-result"),a=this.results.find(".select2-result-with-children"),r=this;n.each2(function(t,e){o(r.id(e.data("select2-data")),s)>=0&&(e.addClass("select2-selected"),e.find(".select2-result-selectable").addClass("select2-selected"))}),a.each2(function(t,e){e.is(".select2-result-selectable")||0!==e.find(".select2-result-selectable:not(.select2-selected)").length||e.addClass("select2-selected")}),-1==this.highlight()&&!1!==i&&r.highlight(0),!this.opts.createSearchChoice&&!n.filter(".select2-result:not(.select2-selected)").length>0&&(!t||t&&!t.more&&0===this.results.find(".select2-no-results").length)&&T(r.opts.formatNoMatches,"formatNoMatches")&&this.results.append("<li class='select2-no-results'>"+C(r.opts.formatNoMatches,r.opts.element,r.search.val())+"</li>")},getMaxSearchWidth:function(){return this.selection.width()-h(this.search)},resizeSearch:function(){var t,e,i,s,n,o=h(this.search);t=x(this.search)+10,e=this.search.offset().left,i=this.selection.width(),s=this.selection.offset().left,n=i-(e-s)-o,n<t&&(n=i-o),n<40&&(n=i-o),n<=0&&(n=t),this.search.width(Math.floor(n))},getVal:function(){var t;return this.select?(t=this.select.val(),null===t?[]:t):(t=this.opts.element.val(),l(t,this.opts.separator))},setVal:function(e){var i;this.select?this.select.val(e):(i=[],t(e).each(function(){o(this,i)<0&&i.push(this)}),this.opts.element.val(0===i.length?"":i.join(this.opts.separator)))},buildChangeDetails:function(t,e){for(var e=e.slice(0),t=t.slice(0),i=0;i<e.length;i++)for(var s=0;s<t.length;s++)r(this.opts.id(e[i]),this.opts.id(t[s]))&&(e.splice(i,1),i>0&&i--,t.splice(s,1),s--);return{added:e,removed:t}},val:function(e,s){var n,o=this;if(0===arguments.length)return this.getVal();if(n=this.data(),n.length||(n=[]),!e&&0!==e)return this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),void(s&&this.triggerChange({added:this.data(),removed:n}));if(this.setVal(e),this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),s&&this.triggerChange(this.buildChangeDetails(n,this.data()));else{if(this.opts.initSelection===i)throw new Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(e){var i=t.map(e,o.id);o.setVal(i),o.updateSelection(e),o.clearSearch(),s&&o.triggerChange(o.buildChangeDetails(n,o.data()))})}this.clearSearch()},onSortStart:function(){if(this.select)throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var e=[],i=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){e.push(i.opts.id(t(this).data("select2-data")))}),this.setVal(e),this.triggerChange()},data:function(e,i){var s,n,o=this;if(0===arguments.length)return this.selection.children(".select2-search-choice").map(function(){return t(this).data("select2-data")}).get();n=this.data(),e||(e=[]),s=t.map(e,function(t){return o.opts.id(t)}),this.setVal(s),this.updateSelection(e),this.clearSearch(),i&&this.triggerChange(this.buildChangeDetails(n,this.data()))}}),t.fn.select2=function(){var s,n,a,r,l,h=Array.prototype.slice.call(arguments,0),c=["val","destroy","opened","open","close","focus","isFocused","container","dropdown","onSortStart","onSortEnd","enable","disable","readonly","positionDropdown","data","search"],d=["opened","isFocused","container","dropdown"],p=["val","data"],u={search:"externalSearch"};return this.each(function(){if(0===h.length||"object"===e(h[0]))s=0===h.length?{}:t.extend({},h[0]),s.element=t(this),"select"===s.element.get(0).tagName.toLowerCase()?l=s.element.prop("multiple"):(l=s.multiple||!1,"tags"in s&&(s.multiple=l=!0)),n=l?new window.Select2.class.multi:new window.Select2.class.single,n.init(s);else{if("string"!=typeof h[0])throw"Invalid arguments to select2 plugin: "+h;if(o(h[0],c)<0)throw"Unknown method: "+h[0];if(r=i,(n=t(this).data("select2"))===i)return;if(a=h[0],"container"===a?r=n.container:"dropdown"===a?r=n.dropdown:(u[a]&&(a=u[a]),r=n[a].apply(n,h.slice(1))),o(h[0],d)>=0||o(h[0],p)>=0&&1==h.length)return!1}}),r===i?this:r},t.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(t,e,i,s){var n=[];return b(t.text,i.term,n,s),n.join("")},formatSelection:function(t,e,s){return t?s(t.text):i},sortResults:function(t,e,i){return t},formatResultCssClass:function(t){return t.css},formatSelectionCssClass:function(t,e){return i},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(t){return t==i?null:t.id},matcher:function(t,e){return n(""+e).toUpperCase().indexOf(n(""+t).toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:E,escapeMarkup:w,blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(t){return t},adaptDropdownCssClass:function(t){return null},nextSearchTerm:function(t,e){return i},searchInputPlaceholder:"",createSearchChoicePosition:"top",shouldFocusInput:function(t){return!(("ontouchstart"in window||navigator.msMaxTouchPoints>0)&&t.opts.minimumResultsForSearch<0)}},t.fn.select2.locales=[],t.fn.select2.locales.en={formatMatches:function(t){return 1===t?"One result is available, press enter to select it.":t+" results are available, use up and down arrow keys to navigate."},formatNoMatches:function(){return"No matches found"},formatAjaxError:function(t,e,i){return"Loading failed"},formatInputTooShort:function(t,e){var i=e-t.length;return"Please enter "+i+" or more character"+(1==i?"":"s")},formatInputTooLong:function(t,e){var i=t.length-e;return"Please delete "+i+" character"+(1==i?"":"s")},formatSelectionTooBig:function(t){return"You can only select "+t+" item"+(1==t?"":"s")},formatLoadMore:function(t){return"Loading more results…"},formatSearching:function(){return"Searching…"}},t.extend(t.fn.select2.defaults,t.fn.select2.locales.en),t.fn.select2.ajaxDefaults={transport:t.ajax,params:{type:"GET",cache:!1,dataType:"json"}},window.Select2={query:{ajax:k,local:M,tags:S},util:{debounce:p,markMatch:b,escapeMarkup:w,stripDiacritics:n},class:{abstract:D,single:_,multi:I}}}}(t)}).call(e,i(0))},8:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s={fragments:{fb_pixel_box:".panel.panel-settings-set-fb-px",ca_list:".panel.panel-ca-list",conversions_list:".panel.panel-ce-tracking",logs_list:".panel.panel-log-list",sidebar:".plugin-sidebar",product_feed_status:".js-product-feed-info",product_feed_schedule:".js-schedule-options.schedule-update"},loaders:[{action:"get_user_roles",dropdown:"input.user-roles"},{action:"get_standard_events",dropdown:"input.standard-events"},{action:"get_custom_fields",dropdown:"input.custom-fields"},{action:"get_languages",dropdown:"#conditions_language"},{action:"get_device_types",dropdown:"#conditions_device_types"},{action:"get_categories",dropdown:""},{action:"get_tags",dropdown:""},{action:"get_posts",dropdown:""},{action:"get_dpa_params",dropdown:""},{action:"get_currencies",dropdown:""}]};e.default=s},9:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=i(0),n=function(t){return t&&t.__esModule?t:{default:t}}(s);i(22),i(23),i(24),i(25),i(26),i(27),i(7);var o={dropdown_data:[],unsaved:!1,set_unsaved:function(){o.unsaved=!0},set_saved:function(){o.unsaved=!1},bootstrap_components:function(t){var e=(0,n.default)(void 0!==t?t.currentTarget:document);e.find(".collapse").collapse({toggle:!1}),e.find('[data-toggle="tooltip"], [data-tooltip]').tooltip(),e.find('[data-toggle="popover"]').popover({container:"#wpbody .pixel-caffeine-wrapper"}),n.default.material.init()},custom_dropdown:function(t){var e=(0,n.default)(void 0!==t?t.currentTarget:document);e.find("select").select2({minimumResultsForSearch:5}),e.find("input.multi-tags").select2({tags:[]}),e.find("select.dropdown-width-max").select2({minimumResultsForSearch:5,dropdownCssClass:"dropdown-width-max"})},fields_components:function(t){var e=(0,n.default)(void 0!==t?t.currentTarget:document.body);e.find("select.js-dep").on("change",function(){var t=(0,n.default)(this),e=t.closest("form"),i=t.val(),s=t.attr("id"),o=e.find('div[class*="'+s+'"]'),a=e.find("."+s+"-"+i);o.hide(),a.length&&a.show()}).trigger("change"),e.find(".control-wrap .checkbox .inline-text").on("focus",function(){(0,n.default)(this).siblings('input[type="checkbox"]').prop("checked",!0).trigger("change")}),e.find('.control-wrap .checkbox input[type="checkbox"]').on("change",function(){var t=(0,n.default)(this),e=t.is(":checked");t.closest("div.checkbox").removeClass("checked unchecked").addClass(e?"checked":"unchecked").find("input.inline-text").prop("disabled",!e)}).trigger("change"),e.find(".js-show-advanced-data").on("change.components",function(){var t=(0,n.default)(this);t.closest("form").find("div.advanced-data").collapse(t.is(":checked")?"show":"hide")}).trigger("change.components"),e.find("select#event_standard_events").on("change.components",function(){var t=(0,n.default)(this),e=t.closest("form"),i=t.find("option:selected").data("fields");e.find("div.event-field").hide(),n.default.each(i.split(",").map(function(t){return t.trim()}),function(t,i){e.find("div.event-field."+i+"-field").show()})}).trigger("change.components"),e.find("input.js-switch-labeled-tosave").on("change.components",function(){var t=(0,n.default)(this),e=t.closest(".form-group").find(".text-status"),i=t.is(":checked")?"yes":"no",s=t.closest(".togglebutton"),o=t.data("original-value");void 0===e.data("original-status")&&e.data("original-status",e.clone()),o!==i?(e.hasClass("text-status-pending")||s.addClass("pending"),e.addClass("text-status-pending").text(aepc_admin.switch_unsaved)):((0,n.default)(e.data("original-status")).hasClass("text-status-pending")||s.removeClass("pending"),e.replaceWith(e.data("original-status")))}).trigger("change.components"),e.find("input.js-switch-labeled").on("change.components",function(){var t=(0,n.default)(this),e=t.closest(".form-group").find(".text-status");e.removeClass("hide"),t.is(":checked")?e.filter(".text-status-off").addClass("hide"):e.filter(".text-status-on").addClass("hide")});var i=function(){e.find("div.js-custom-params").children("div").each(function(t){(0,n.default)(this).find('input[type="text"]').each(function(){var e=(0,n.default)(this);e.attr("name",e.attr("name").replace(/\[[0-9]+\]/,"["+t+"]")),e.attr("id",e.attr("id").replace(/_[0-9]+$/,"_"+t))})})};e.find(".js-add-custom-param").on("click",function(t){if("undefined"==typeof wp)return t;t.preventDefault();var e=wp.template("custom-params"),i=(0,n.default)(this).closest("div.js-custom-params"),s=parseInt(i.children("div").length);i.find(".js-custom-param:last").length?i.find(".js-custom-param:last").after(e({index:s-1})):i.prepend(e({index:s-1}))}),e.find(".js-custom-params").on("click",".js-delete-custom-param",function(t){t.preventDefault();var e=(0,n.default)(this),s=(0,n.default)("#modal-confirm-delete"),o=e.closest(".js-custom-param"),a=function(){s.modal("hide"),o.remove(),i()};""===o.find('input[id^="event_custom_params_key"]').val()&&""===o.find('input[id^="event_custom_params_value"]').val()?a():s.modal("show").one("click",".btn-ok",a)}),e.find("select[data-selected]").each(function(){var t=(0,n.default)(this),e=t.data("selected");t.data("selected","").val(e).trigger("change")}),e.find("select[data-selected]").each(function(){var t=(0,n.default)(this),e=t.data("selected");t.val(e).trigger("change")})},analyzed_distance:function(){var t=function(t){var e=(0,n.default)(window).scrollTop();return(0,n.default)(t).offset().top-e}(".plugin-content"),e=parseFloat((0,n.default)(".wp-toolbar").css("padding-top")),i=(0,n.default)(".alert-wrap"),s=i.height(),o=(0,n.default)(".alert-wrap-ghost");t<=e?(0===o.length&&i.after('<div class="alert-wrap-ghost"></div>').next(".alert-wrap-ghost").height(s),i.addClass("alert-fixed").css({top:e}).width((0,n.default)(".plugin-content").width())):(i.removeClass("alert-fixed").width("100%"),o.remove())}};e.default=o},92:function(t,e,i){i(93),i(96),i(9),i(8),i(99),i(17),t.exports=i(100)},93:function(t,e,i){"use strict";(function(t){function e(t){return t&&t.__esModule?t:{default:t}}var s=i(0),n=e(s);i(94),i(22),i(23),i(24),i(25),i(26),i(95),i(27),i(7);var o=i(8),a=e(o),r=i(17),l=e(r),h=i(9),c=e(h);t(document).ready(function(){var t=c.default.dropdown_data,e=function(e){var i=(0,n.default)(void 0!==e?e.currentTarget:document.body),s=a.default.loaders;n.default.each(s,function(e,s){if(aepc_admin.actions.hasOwnProperty(s.action)){if(t.hasOwnProperty(s.action))return void(""!==s.dropdown&&l.default.apply_autocomplete(i.find(s.dropdown),t[s.action]));t[s.action]=[],n.default.ajax({url:aepc_admin.ajax_url,data:{action:aepc_admin.actions[s.action].name,_wpnonce:aepc_admin.actions[s.action].nonce},success:function(e){t[s.action]=e,""!==s.dropdown&&l.default.apply_autocomplete(i.find(s.dropdown),e),(0,n.default)(document).trigger("loader_data_loaded",[t])},dataType:"json"})}}),i.find("#taxonomy_key").on("change.data",function(){var e=(0,n.default)(this).val().replace("tax_","");t.hasOwnProperty("get_categories")&&t.get_categories.hasOwnProperty(e)&&l.default.apply_autocomplete(i.find("#taxonomy_terms"),t.get_categories[e])}),i.find("#tag_key").on("change.data",function(){var e=(0,n.default)(this).val().replace("tax_","");t.hasOwnProperty("get_tags")&&t.get_tags.hasOwnProperty(e)&&l.default.apply_autocomplete(i.find("#tag_terms"),t.get_tags[e])}),i.find("#pt_key").on("change.data",function(){var e=(0,n.default)(this).val();t.hasOwnProperty("get_posts")&&t.get_posts.hasOwnProperty(e)&&l.default.apply_autocomplete(i.find("#pt_posts"),t.get_posts[e])}),i.find("#event_categories").on("change.data",function(){i.find("#taxonomy_key").trigger("change.data")}),i.find("#event_tax_post_tag").on("change.data",function(){i.find("#tag_key").trigger("change.data")}),i.find("#event_posts").on("change.data",function(){i.find("#pt_key").trigger("change.data")}),i.find("#event_pages").on("change.data",function(){t.hasOwnProperty("get_posts")&&t.get_posts.hasOwnProperty("page")&&l.default.apply_autocomplete(i.find("#pages"),t.get_posts.page)}),i.find("#event_custom_fields").on("change.data",function(e){var s=[{id:"[[any]]",text:aepc_admin.filter_any}];s=n.default.merge(s,t.get_custom_fields),i.find("#custom_field_keys option").remove(),i.find("#custom_field_keys").append(n.default.map(s,function(t,e){return"[[any]]"===t.id&&(t.text="--- "+t.text+" ---"),(0,n.default)("<option>",{val:t.id,text:t.text})}))}),i.find(".js-ecommerce input, .js-events input").on("change.data",function(){i.find("#dpa_key").select2({placeholder:aepc_admin.filter_custom_field_placeholder,searchInputPlaceholder:aepc_admin.filter_custom_field_placeholder,data:{results:t.get_dpa_params},query:function(e){var i={results:t.get_dpa_params};""!==e.term&&(i.results=n.default.merge([{id:e.term,text:e.term}],i.results)),i.results=i.results.filter(function(t){return e.matcher(e.term,t.text)}),e.callback(i)}}).select2("data",{id:i.find("#dpa_key").val(),text:i.find("#dpa_key").val()}).on("change",function(){i.find("#dpa_value").val("")}).off("change.dpa").on("change.dpa",function(){var e=(0,n.default)(this).val(),s=[];"content_ids"===e?t.hasOwnProperty("get_posts")&&(t.get_posts.hasOwnProperty("product")&&(s=t.get_posts.product.concat(s)),t.get_posts.hasOwnProperty("download")&&(s=t.get_posts.download.concat(s))):"content_category"===e?t.hasOwnProperty("get_categories")&&(t.get_categories.hasOwnProperty("product_cat")&&(s=t.get_categories.product_cat.concat(s)),t.get_categories.hasOwnProperty("download_category")&&(s=t.get_categories.download_category.concat(s))):"content_type"===e?s=["product","product_group"]:"currency"===e&&t.hasOwnProperty("get_currencies")&&(s=t.get_currencies.map(function(t){var e=document.createElement("textarea");return e.innerHTML=t.text,t.text=e.value,t})),s=s.filter(function(t,e){return!(0!==e&&"[[any]]"===t.id)}),i.find("#dpa_value").select2({tags:s})}).triggerHandler("change.dpa")})},i=function(t){var e=(0,n.default)(void 0!==t?t.currentTarget:document);e.find("select.js-collapse").on("change.bs",function(){var t=(0,n.default)(this),i=t.find("option:selected");e.find(i.data("target")).hasClass("in")||(e.find(t.data("parent")).find(".collapse").collapse("hide"),e.find(i.data("target")).collapse("show"))}).trigger("change.bs"),e.find("input.js-collapse").on("change.bs",function(){var t=(0,n.default)(this),i=t.filter(":checked");e.find(i.data("target")).hasClass("in")||(e.find(t.data("parent")).find(".collapse").collapse("hide"),e.find(i.data("target")).collapse("show"))}).trigger("change.bs"),e.find("#ca_event_type").on("change.bs",function(){e.find(".collapse-parameters").find(".collapse").collapse("hide"),e.find(".js-collapse-events").find("input:checked").prop("checked",!1)}),(0,n.default)(document).on("click",function(t){(0,n.default)('[data-toggle="popover"],[data-original-title]').each(function(){(0,n.default)(this).is(t.target)||0!==(0,n.default)(this).has(t.target).length||0!==(0,n.default)(".popover").has(t.target).length||((((0,n.default)(this).popover("hide").data("bs.popover")||{}).inState||{}).click=!1)})}),c.default.bootstrap_components(t)},s=function(t){var e=t.find(".js-include-filters"),i=t.find(".js-exclude-filters"),s=t.find(".js-ca-filters");0===e.find("ul.list-filter").find("li").length?e.addClass("hide"):e.removeClass("hide"),0===i.find("ul.list-filter").find("li").length?i.addClass("hide"):i.removeClass("hide"),e.hasClass("hide")&&i.hasClass("hide")?s.find("div.no-filters-feedback").removeClass("hide"):(s.find("div.no-filters-feedback").addClass("hide"),e.find("ul.list-filter").find("li:first").find(".filter-and").remove(),i.find("ul.list-filter").find("li:first").find(".filter-and").remove())},o=function(t){var e=(0,n.default)(this),i=(0,n.default)(t.relatedTarget),o=i.closest("form");e.find("#ca-filter-form").on("submit",function(t){t.preventDefault();var e=(0,n.default)(this),a=e.data("scope"),r=o.find(".js-ca-filters"),h=wp.template("ca-filter-item"),c=e.find('[name^="ca_rule[][main_condition]"]:checked'),d=e.find('button[type="submit"]'),p=d.text(),u=r.find(".js-"+c.val()+"-filters"),f=c.add(e.find('[name^="ca_rule[][event_type]"]')).add(e.find('[name^="ca_rule[][event]"]:checked')).add(e.find(".collapse-parameters .collapse.in").find('[name^="ca_rule[][conditions]"]')),g=function(t){var c=(0,n.default)("<div />"),g="add"===a?r.find("li").length:i.closest("li").data("filter-id");if(l.default.removeLoader(e),!t||0===t.length)return l.default.addMessage(e.find(".modal-body"),"error",aepc_admin.filter_no_condition_error),void d.text(p);f.each(function(){var t=(0,n.default)(this),e=t.attr("name"),i=t.val();c.append((0,n.default)("<input />",{type:"hidden",name:e.replace("[]","["+g+"]"),value:i}))});var m=h({nfilters:u.find("li").length-("edit"===a&&n.default.contains(u.get()[0],i.get()[0])?1:0),statement:t,hidden_inputs:c.html(),index:g});"edit"===a&&n.default.contains(u.get()[0],i.get()[0])?i.closest("li").html((0,n.default)(m).html()):(u.find("ul").append(m),"edit"!==a||n.default.contains(u.get()[0],i.get()[0])||i.closest("li").remove()),s(o),e.closest(".modal").modal("hide"),e.off("submit")};if(l.default.removeMessage(e.find(".modal-body"),"error"),0===e.find(".js-collapse-events input:checked").length)return void l.default.addMessage(e.find(".modal-body"),"error",aepc_admin.filter_no_data_error);l.default.addLoader(e),d.text(aepc_admin.filter_saving),n.default.ajax({url:aepc_admin.ajax_url,method:"GET",data:{filter:f.serializeArray(),action:aepc_admin.actions.get_filter_statement.name,_wpnonce:aepc_admin.actions.get_filter_statement.nonce},success:g,dataType:"html"})})},r=function(t){(0,n.default)(void 0!==t?t.currentTarget:document.body).find(".list-filter").on("click",".btn-delete",function(t){t.preventDefault();var e=(0,n.default)(this).closest("form"),i=(0,n.default)("#modal-confirm-delete"),o=(0,n.default)(this).closest("li");i.modal("show",(0,n.default)(this)).one("click",".btn-ok",function(){i.modal("hide"),o.remove(),s(e)})}).on("click",".btn-edit",function(t){t.preventDefault();var e=((0,n.default)(this).closest("form"),(0,n.default)("#modal-ca-edit-filter")),i=(0,n.default)(this).closest("li"),s=i.find(".hidden-fields input");e.on("modal-template-loaded",function(t){var e=(0,n.default)(this).find("form"),i=s.filter('[name*="[main_condition]"]').val();e.find('input[name*="main_condition"][value="'+i+'"]').prop("checked",!0).closest("label").addClass("active").siblings().removeClass("active");var o=s.filter('[name*="[event_type]"]').val(),a=(e.find('select[name*="event_type"]').val(o),s.filter('[name*="[event]"]').val()),r=e.find('input[name*="event"][value="'+a+'"]').prop("checked",!0),l=e.find(r.data("target")),h=s.filter('[name*="[conditions][0][key]"]').val(),c=s.filter('[name*="[conditions][0][operator]"]').val(),d=s.filter('[name*="[conditions][0][value]"]').val();l.find('[name*="[conditions][0][key]"]').is("#custom_field_keys")&&l.find("#custom_field_keys").append((0,n.default)("<option />",{val:h,text:h})),l.find('[name*="[conditions][0][key]"]').val(h),l.find('[name*="[conditions][0][operator]"]').val(c),l.find('[name*="[conditions][0][value]"]').val(d)}).one("show.bs.modal",function(){var t=(0,n.default)(this).find("form");t.find('[name*="event_type"]:checked').trigger("change.data"),t.find('[name*="event"]:checked').trigger("change.data"),t.find('.collapse.in [name*="[conditions][0][key]"]').trigger("change.data"),t.find('.collapse.in [name*="[conditions][0][operator]"]').trigger("change.data"),t.find('.collapse.in [name*="[conditions][0][value]"]').trigger("change.data")}).modal("show",(0,n.default)(this))})},h=function(e){var i=void 0!==e?(0,n.default)(this):(0,n.default)(document.body),s=i.find("select#aepc_account_id"),o=i.find("select#aepc_pixel_id"),a=(0,n.default)("form#mainform").find("#aepc_account_id").val(),r=(0,n.default)("form#mainform").find("#aepc_pixel_id").val(),h=function(){var e=s.val()?JSON.parse(s.val()).id:"";if(t.hasOwnProperty("get_pixel_ids")&&t.get_pixel_ids.hasOwnProperty(e)){var i=n.default.merge([{id:"",text:""}],t.get_pixel_ids[e]);1===i.length?(i[0].text=aepc_admin.fb_option_no_pixel,o.prop("disabled",!0)):o.prop("disabled",!1),o.find("option").remove(),o.append(n.default.map(i,function(t,e){return(0,n.default)("<option>",{val:t.id,text:t.text,selected:t.id===r})})),2===o.find("option").length&&o.find("option:eq(1)").prop("selected",!0),o.val(o.find("option:selected").val()).trigger("change")}},d=function(){var e=s.val()?JSON.parse(s.val()).id:"";l.default.addLoader(o),n.default.ajax({url:aepc_admin.ajax_url,data:{action:aepc_admin.actions.get_pixel_ids.name,_wpnonce:aepc_admin.actions.get_pixel_ids.nonce,account_id:e},success:function(i){t.hasOwnProperty("get_pixel_ids")||(t.get_pixel_ids={}),t.get_pixel_ids[e]=i,h(),l.default.removeLoader(o)},dataType:"json"})},p=function(e){if(void 0!==e&&e.hasOwnProperty("type")&&"change"===e.type&&(o.val("").trigger("change"),o.find("option").remove()),s.val()){var i=s.val()?JSON.parse(s.val()).id:"";t.hasOwnProperty("get_pixel_ids")&&t.get_pixel_ids.hasOwnProperty(i)?h():d()}},u=function(){if(t.hasOwnProperty("get_account_ids")){var e=n.default.merge([{id:"",text:""}],t.get_account_ids);s.find("option").remove(),s.append(n.default.map(e,function(t,e){return(0,n.default)("<option>",{val:t.id,text:t.text,selected:t.id===a})})),s.on("change",p).trigger("change")}},f=function(){l.default.addLoader(s),n.default.ajax({url:aepc_admin.ajax_url,data:{action:aepc_admin.actions.get_account_ids.name,_wpnonce:aepc_admin.actions.get_account_ids.nonce},success:function(e){!1===e.success?(l.default.addMessage((0,n.default)(".js-options-group"),"error",e.data),c.default.set_saved()):(t.get_account_ids=e,u()),l.default.removeLoader(s)},dataType:"json"})};if(a&&r){var g=JSON.parse(a),m=JSON.parse(r);s.append((0,n.default)("<option>",{val:a,text:g.name+" (#"+g.id+")",selected:!0})).trigger("change"),o.append((0,n.default)("<option>",{val:r,text:m.name+" (#"+m.id+")",selected:!0})).trigger("change")}!function(){s.length<=0||(t.hasOwnProperty("get_account_ids")?u():f())}(),p()};!function(){n.default.fn.select2&&n.default.extend(n.default.fn.select2.defaults,{dropdownCssClass:"adespresso-select2",containerCssClass:"adespresso-select2",formatNoMatches:!1})}(),e(),i(),c.default.custom_dropdown(),h(),c.default.fields_components(),r(),(0,n.default)(".modal-confirm").on("show.bs.modal",function(t){var e=(0,n.default)(this),i=t.hasOwnProperty("relatedTarget")?(0,n.default)(t.relatedTarget).attr("href"):"";n.default.inArray(i,[void 0,"","#","#_"])<0&&e.one("click",".btn-ok",function(t){t.preventDefault();var s={"fb-disconnect":"fb_pixel_box","ca-delete":"ca_list","conversion-delete":"conversions_list"},o=i.match(new RegExp("action=("+Object.keys(s).join("|")+")(&|$)"));o?(l.default.addLoader(e.find(".modal-content")),n.default.ajax({url:i+(i.indexOf("?")?"&":"?")+"ajax=1",method:"GET",success:function(t){if(t.success&&((0,n.default)(".sec-overlay").removeClass("sec-overlay"),(0,n.default)(".sub-panel-fb-connect.bumping").removeClass("bumping"),l.default.reloadFragment(s[o[1]]),e.modal("hide"),l.default.removeLoader(e.find(".modal-content")),window.history&&window.history.pushState)){var i=window.location.href.replace(/(\?|\&)ref=fblogin/,"");window.history.pushState({path:i},"",i)}},dataType:"json"})):(e.modal("hide"),window.location=i)})}),(0,n.default)(".js-form-modal").on("show.bs.modal",function(t){if("undefined"==typeof wp)return t;var e=(0,n.default)(this),i=(0,n.default)(t.relatedTarget),s=i.data("config"),o=wp.template(e.attr("id"));e.find(".modal-content").html(o(s)),e.trigger("modal-template-loaded")}).on("show.bs.modal",i).on("show.bs.modal",c.default.custom_dropdown).on("show.bs.modal",e).on("show.bs.modal",c.default.fields_components).on("show.bs.modal",o).on("show.bs.modal",r),(0,n.default)(document).on("submit",'form[data-toggle="ajax"]',function(t){t.preventDefault();var e=(0,n.default)(this),i=e,s=e.find('[type="submit"]'),o=s.text(),r=e.offset().top-50;e.find(".modal-body").length?i=e.find(".modal-body").first():e.find(".panel-body").length&&(i=e.find(".panel-body").first()),l.default.removeMessage(i,"error"),e.find(".has-error").removeClass("has-error"),e.find(".help-block-error").remove(),l.default.addLoader(e),n.default.ajax({url:aepc_admin.ajax_url,method:"POST",data:e.serialize(),success:function(t){if(t.success){var h={"fb-connect-options":"fb_pixel_box","ca-clone":"ca_list","ca-edit":"ca_list","conversion-edit":"conversions_list"},c=Object.keys(h).map(function(t){return"#modal-"+t}).join(","),d={};if(e.closest(".modal").length&&e.closest(".modal").is(c)){if(l.default.reloadFragment(h[e.closest(".modal").attr("id").replace("modal-","")]),e.closest(".modal").modal("hide"),l.default.removeLoader(e),window.history&&window.history.pushState){var p=window.location.href.replace(/(\?|\&)ref=fblogin/,"");window.history.pushState({path:p},"",p)}}else if(Object.keys(d).indexOf(e.data("action"))>=0)l.default.reloadFragment(d[e.data("action")]),l.default.removeLoader(e);else if(t.data.html&&t.data.fragment)l.default.refreshFragmentHTML((0,n.default)(a.default.fragments[t.data.fragment]),t),l.default.removeLoader(e);else{var u=e.attr("action");u?window.location.href=u:window.location.reload(!1)}}else{if(t.data.hasOwnProperty("refresh")&&t.data.refresh)return void(window.location.href=window.location.href.replace(/(\?|\&)ref=fblogin/,""));l.default.removeLoader(e),(0,n.default)("html, body").animate({scrollTop:r},300),s.text(o),t.data.hasOwnProperty("main")&&l.default.addMessage(i,"error",t.data.main.map(function(t){return t.text}).join("<br/>")),e.find("input, select").each(function(){var e=(0,n.default)(this),i=e.attr("id"),s=e.closest(".form-group"),o=e.closest(".control-wrap").find(".field-helper");t.data.hasOwnProperty(i)&&(s.addClass("has-error"),o.append((0,n.default)("<span />",{class:"help-block help-block-error",html:t.data[i].map(function(t){return t.text}).join("<br/>")}))),e.on("keyup change",function(){o.find(".help-block-error").remove()})})}},dataType:"json"})}),(0,n.default)(window).on("load",c.default.analyzed_distance).on("scroll",c.default.analyzed_distance).on("resize",c.default.analyzed_distance),(0,n.default)("#modal-fb-connect-options").on("show.bs.modal",function(t){if("undefined"==typeof wp)return t;var e=(0,n.default)(this),i=wp.template("modal-facebook-options");e.find(".modal-content").html(i([])),e.trigger("facebook-options-loaded")}).on("show.bs.modal",i).on("show.bs.modal",c.default.custom_dropdown).on("show.bs.modal",h),(0,n.default)(".sub-panel-fb-connect").on("change","#aepc_account_id",function(){var t=(0,n.default)(this).val(),e=(0,n.default)("#aepc_pixel_id").val();t&&e?(0,n.default)(".js-save-facebook-options").removeClass("disabled"):(0,n.default)(".js-save-facebook-options").addClass("disabled")}).on("change","#aepc_pixel_id",function(){var t=(0,n.default)("#aepc_account_id").val(),e=(0,n.default)(this).val();t&&e?(0,n.default)(".js-save-facebook-options").removeClass("disabled"):(0,n.default)(".js-save-facebook-options").addClass("disabled")}).on("click",".js-save-facebook-options:not(.disabled)",function(t){var e=(0,n.default)("#aepc_account_id").val(),i=(0,n.default)("#aepc_pixel_id").val();(0,n.default)(".sec-overlay").removeClass("sec-overlay"),(0,n.default)(".sub-panel-fb-connect.bumping").removeClass("bumping"),l.default.addLoader((0,n.default)(".panel.panel-settings-set-fb-px")),n.default.ajax({url:aepc_admin.ajax_url,method:"POST",data:{aepc_account_id:e,aepc_pixel_id:i,action:aepc_admin.actions.save_facebook_options.name,_wpnonce:aepc_admin.actions.save_facebook_options.nonce},success:function(t){if(t.success){if(window.history&&window.history.pushState){var e=window.location.href.replace(/(\?|\&)ref=fblogin/,"");window.history.pushState({path:e},"",e)}l.default.reloadFragment("fb_pixel_box"),c.default.set_saved()}},dataType:"json"})}),(0,n.default)(".wrap-custom-audiences").on("click",".js-ca-size-sync",function(t){var e=(0,n.default)(this),i=e.data("ca_id");l.default.removeMessage((0,n.default)(".plugin-content .alert-wrap"),"error"),l.default.addLoader((0,n.default)(".panel.panel-ca-list")),e.addClass("loading-data"),n.default.ajax({url:aepc_admin.ajax_url,method:"GET",data:{ca_id:i,action:aepc_admin.actions.refresh_ca_size.name,_wpnonce:aepc_admin.actions.refresh_ca_size.nonce},success:function(t){t.success?l.default.reloadFragment("ca_list"):l.default.addMessage((0,n.default)(".plugin-content .alert-wrap"),"error",t.data.message)},dataType:"json"})}),(0,n.default)(".wrap").on("click",".pagination li a",function(t){t.preventDefault();var e=(0,n.default)(this),i=e.attr("href"),s=i.match(/paged=([0-9]+)/);(0,n.default)(this).closest(".panel-ca-list").length?l.default.reloadFragment("ca_list",{paged:s[1]}):(0,n.default)(this).closest(".panel-ce-tracking").length?l.default.reloadFragment("conversions_list",{paged:s[1]}):(0,n.default)(this).closest(".panel-log-list").length&&l.default.reloadFragment("logs_list",{paged:s[1]}),window.history&&window.history.pushState&&window.history.pushState({path:i},"",i)}),(0,n.default)(".plugin-sidebar.loading-sec").length&&l.default.reloadFragment("sidebar");var d=[];(0,n.default)(".modal").on("show.bs.modal",function(t){d.push(t)}).on("hidden.bs.modal",function(t){(0,n.default)(d[d.length-1].relatedTarget).closest(".modal").length&&((0,n.default)("body").addClass("modal-open"),d.splice(d.length-1,1))}),(0,n.default)("#aepc-clear-transients").on("click",function(t){t.preventDefault();var e=(0,n.default)(this);l.default.addLoader(e),n.default.ajax({url:aepc_admin.ajax_url,method:"POST",data:{action:aepc_admin.actions.clear_transients.name,_wpnonce:aepc_admin.actions.clear_transients.nonce},success:function(t){l.default.removeLoader(e),t.success&&l.default.addMessage((0,n.default)(".plugin-content .alert-wrap"),"success",t.data.message)},dataType:"json"})}),(0,n.default)("#aepc-reset-fb-connection").on("click",function(t){t.preventDefault();var e=(0,n.default)(this);l.default.addLoader(e),n.default.ajax({url:aepc_admin.ajax_url,method:"POST",data:{action:aepc_admin.actions.reset_fb_connection.name,_wpnonce:aepc_admin.actions.reset_fb_connection.nonce},success:function(t){l.default.reloadFragment("fb_pixel_box",{success:function(i){l.default.removeLoader(e),t.success&&l.default.addMessage((0,n.default)(".plugin-content .alert-wrap"),"success",t.data.message)}})},dataType:"json"})}),(0,n.default)(".ecomm-conversions").find('input[type="checkbox"]').on("change",function(){var t=(0,n.default)("#aepc_enable_dpa");t.is(":checked")||t.prop("checked",!0).trigger("change")}),(0,n.default)(document).on("click","button[data-dismiss][data-dismiss-action]",function(){var t=(0,n.default)(this).data("dismiss-action");n.default.ajax({url:aepc_admin.ajax_url,method:"GET",data:{notice_id:t,action:aepc_admin.actions.dismiss_notice.name,_wpnonce:aepc_admin.actions.dismiss_notice.nonce},dataType:"json"})}),(0,n.default)(document).on("click",".js-remove-logs",function(t){t.preventDefault();var e=(0,n.default)(a.default.fragments.logs_list),i=(0,n.default)("#modal-confirm-delete");i.modal("show",(0,n.default)(this)).one("click",".btn-ok",function(){i.modal("hide"),l.default.addLoader(e),n.default.ajax({url:aepc_admin.ajax_url,method:"GET",data:{action:aepc_admin.actions.clear_logs.name,_wpnonce:aepc_admin.actions.clear_logs.nonce},success:function(t){l.default.refreshFragmentHTML(e,t)},dataType:"json"})})}),l.default.alert_unsaved()})}).call(e,i(0))},94:function(t,e,i){"use strict";(function(t){var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};+function(t){function i(i){return this.each(function(){var n=t(this),o=n.data("bs.button"),a="object"==(void 0===i?"undefined":e(i))&&i;o||n.data("bs.button",o=new s(this,a)),"toggle"==i?o.toggle():i&&o.setState(i)})}var s=function e(i,s){this.$element=t(i),this.options=t.extend({},e.DEFAULTS,s),this.isLoading=!1};s.VERSION="3.4.1",s.DEFAULTS={loadingText:"loading..."},s.prototype.setState=function(e){var i="disabled",s=this.$element,n=s.is("input")?"val":"html",o=s.data();e+="Text",null==o.resetText&&s.data("resetText",s[n]()),setTimeout(t.proxy(function(){s[n](null==o[e]?this.options[e]:o[e]),"loadingText"==e?(this.isLoading=!0,s.addClass(i).attr(i,i).prop(i,!0)):this.isLoading&&(this.isLoading=!1,s.removeClass(i).removeAttr(i).prop(i,!1))},this),0)},s.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 n=t.fn.button;t.fn.button=i,t.fn.button.Constructor=s,t.fn.button.noConflict=function(){return t.fn.button=n,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(e){var s=t(e.target).closest(".btn");i.call(s,"toggle"),t(e.target).is('input[type="radio"], input[type="checkbox"]')||(e.preventDefault(),s.is("input,button")?s.trigger("focus"):s.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(t)}).call(e,i(0))},95:function(t,e,i){"use strict";(function(t){+function(t){function e(e){return this.each(function(){var i=t(this),n=i.data("bs.alert");n||i.data("bs.alert",n=new s(this)),"string"==typeof e&&n[e].call(i)})}var i='[data-dismiss="alert"]',s=function(e){t(e).on("click",i,this.close)};s.VERSION="3.4.1",s.TRANSITION_DURATION=150,s.prototype.close=function(e){function i(){a.detach().trigger("closed.bs.alert").remove()}var n=t(this),o=n.attr("data-target");o||(o=n.attr("href"),o=o&&o.replace(/.*(?=#[^\s]*$)/,"")),o="#"===o?[]:o;var a=t(document).find(o);e&&e.preventDefault(),a.length||(a=n.closest(".alert")),a.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(a.removeClass("in"),t.support.transition&&a.hasClass("fade")?a.one("bsTransitionEnd",i).emulateTransitionEnd(s.TRANSITION_DURATION):i())};var n=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=s,t.fn.alert.noConflict=function(){return t.fn.alert=n,this},t(document).on("click.bs.alert.data-api",i,s.prototype.close)}(t)}).call(e,i(0))},96:function(t,e,i){"use strict";(function(t){function e(t){return t&&t.__esModule?t:{default:t}}var s=i(0),n=e(s),o=i(97),a=e(o);t(document).ready(function(){var t=(0,n.default)("#activity-chart");t.length&&n.default.getJSON(aepc_admin.ajax_url+"?action="+aepc_admin.actions.get_pixel_stats.name+"&_wpnonce="+aepc_admin.actions.get_pixel_stats.nonce,function(e){if(void 0!==e.success&&!1===e.success)return void Utils.addMessage(t,"info",e.data[0].message);var i=new Date;i.setUTCDate(i.getUTCDate()-7),i.setUTCHours(0,0,0,0),a.default.stockChart("activity-chart",{chart:{type:"line"},title:{text:null},navigator:{enabled:!0},rangeSelector:{enabled:!1},plotOptions:{spline:{marker:{enabled:!0}}},xAxis:{min:i.getTime()},yAxis:{gridLineColor:"#F4F4F4"},series:[{name:"Pixel fires",data:e,dataGrouping:{approximation:"sum",forced:!0,units:[["day",[1]]]},pointInterval:36e5}]}),t.closest(".panel").find("select#date-range").select2({minimumResultsForSearch:5,width:"element"}),t.closest(".panel").on("change.chart.range","select#date-range",function(){var e=t.highcharts(),i=(0,n.default)(this).val(),s=new Date,o=new Date;if(o.setDate(s.getUTCDate()-1),"today"===i)e.xAxis[0].setExtremes(s.setUTCHours(0,0,0,0),s.setUTCHours(23,59,59,999)),e.xAxis[0].setDataGrouping({approximation:"sum",forced:!0,units:[["hour",[1]]]});else if("yesterday"===i)e.xAxis[0].setExtremes(o.setUTCHours(0,0,0,0),o.setUTCHours(23,59,59,999)),e.xAxis[0].setDataGrouping({approximation:"sum",forced:!0,units:[["hour",[1]]]});else if("last-7-days"===i){var a=o;a.setDate(s.getUTCDate()-7),e.xAxis[0].setExtremes(a.setUTCHours(0,0,0,0),s.setUTCHours(23,59,59,999)),e.xAxis[0].setDataGrouping({approximation:"sum",forced:!0,units:[["day",[1]]]})}else if("last-14-days"===i){var r=o;r.setDate(s.getUTCDate()-14),e.xAxis[0].setExtremes(r.setUTCHours(0,0,0,0),s.setUTCHours(23,59,59,999)),e.xAxis[0].setDataGrouping({approximation:"sum",forced:!0,units:[["day",[1]]]})}})})})}).call(e,i(0))},97:function(t,e,i){"use strict";(function(t){var s,n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(o,a){"object"===n(t)&&t.exports?(a.default=a,t.exports=o.document?a(o):a):void 0!==(s=function(){return a(o)}.call(e,i,e,t))&&(t.exports=s)}("undefined"!=typeof window?window:void 0,function(t){function e(t,e,i,s){t.hasOwnProperty(e)||(t[e]=s.apply(null,i))}var i={};return e(i,"parts/Globals.js",[],function(){var e=void 0===t?"undefined"!=typeof window?window:{}:t,i=e.document,s=e.navigator&&e.navigator.userAgent||"",n=i&&i.createElementNS&&!!i.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,o=/(edge|msie|trident)/i.test(s)&&!e.opera,a=-1!==s.indexOf("Firefox"),r=-1!==s.indexOf("Chrome"),l=a&&4>parseInt(s.split("Firefox/")[1],10);return{product:"Highcharts",version:"7.1.1",deg2rad:2*Math.PI/360,doc:i,hasBidiBug:l,hasTouch:i&&void 0!==i.documentElement.ontouchstart,isMS:o,isWebKit:-1!==s.indexOf("AppleWebKit"),isFirefox:a,isChrome:r,isSafari:!r&&-1!==s.indexOf("Safari"),isTouchDevice:/(Mobile|Android|Windows Phone)/.test(s),SVG_NS:"http://www.w3.org/2000/svg",chartCount:0,seriesTypes:{},symbolSizes:{},svg:n,win:e,marginNames:["plotTop","marginRight","marginBottom","plotLeft"],noop:function(){},charts:[],dateFormats:{}}}),e(i,"parts/Utilities.js",[i["parts/Globals.js"]],function(t){t.timers=[];var e=t.charts,i=t.doc,s=t.win;t.error=function(e,i,n){var o=t.isNumber(e)?"Highcharts error #"+e+": www.highcharts.com/errors/"+e:e,a=function(){if(i)throw Error(o);s.console&&console.log(o)};n?t.fireEvent(n,"displayError",{code:e,message:o},a):a()},t.Fx=function(t,e,i){this.options=e,this.elem=t,this.prop=i},t.Fx.prototype={dSetter:function(){var t,e=this.paths[0],i=this.paths[1],s=[],n=this.now,o=e.length;if(1===n)s=this.toD;else if(o===i.length&&1>n)for(;o--;)t=parseFloat(e[o]),s[o]=isNaN(t)?i[o]:n*parseFloat(i[o]-t)+t;else s=i;this.elem.attr("d",s,null,!0)},update:function(){var t=this.elem,e=this.prop,i=this.now,s=this.options.step;this[e+"Setter"]?this[e+"Setter"]():t.attr?t.element&&t.attr(e,i,null,!0):t.style[e]=i+this.unit,s&&s.call(t,i,this)},run:function(e,i,n){var o=this,a=o.options,r=function t(e){return!t.stopped&&o.step(e)},l=s.requestAnimationFrame||function(t){setTimeout(t,13)},h=function e(){for(var i=0;i<t.timers.length;i++)t.timers[i]()||t.timers.splice(i--,1);t.timers.length&&l(e)};e!==i||this.elem["forceAnimate:"+this.prop]?(this.startTime=+new Date,this.start=e,this.end=i,this.unit=n,this.now=this.start,this.pos=0,r.elem=this.elem,r.prop=this.prop,r()&&1===t.timers.push(r)&&l(h)):(delete a.curAnim[this.prop],a.complete&&0===Object.keys(a.curAnim).length&&a.complete.call(this.elem))},step:function(e){var i,s=+new Date,n=this.options,o=this.elem,a=n.complete,r=n.duration,l=n.curAnim;return o.attr&&!o.element?e=!1:e||s>=r+this.startTime?(this.now=this.end,this.pos=1,this.update(),i=l[this.prop]=!0,t.objectEach(l,function(t){!0!==t&&(i=!1)}),i&&a&&a.call(o),e=!1):(this.pos=n.easing((s-this.startTime)/r),this.now=this.start+(this.end-this.start)*this.pos,this.update(),e=!0),e},initPath:function(e,i,s){function n(t){var e,i;for(c=t.length;c--;)e="M"===t[c]||"L"===t[c],i=/[a-zA-Z]/.test(t[c+3]),e&&i&&t.splice(c+1,0,t[c+1],t[c+2],t[c+1],t[c+2])}function o(t,e){for(;t.length<l;){t[0]=e[l-t.length];var i=t.slice(0,f);[].splice.apply(t,[0,0].concat(i)),m&&(i=t.slice(t.length-f),[].splice.apply(t,[t.length,0].concat(i)),c--)}t[0]="M"}function a(t,e){for(var i=(l-t.length)/f;0<i&&i--;)h=t.slice().splice(t.length/v-f,f*v),h[0]=e[l-f-i*f],u&&(h[f-6]=h[f-2],h[f-5]=h[f-1]),[].splice.apply(t,[t.length/v,0].concat(h)),m&&i--}i=i||"";var r,l,h,c,d=e.startX,p=e.endX,u=-1<i.indexOf("C"),f=u?7:3;i=i.split(" "),s=s.slice();var g,m=e.isArea,v=m?2:1;if(u&&(n(i),n(s)),d&&p){for(c=0;c<d.length;c++){if(d[c]===p[0]){r=c;break}if(d[0]===p[p.length-d.length+c]){r=c,g=!0;break}}void 0===r&&(i=[])}return i.length&&t.isNumber(r)&&(l=s.length+r*v*f,g?(o(i,s),a(s,i)):(o(s,i),a(i,s))),[i,s]},fillSetter:function(){t.Fx.prototype.strokeSetter.apply(this,arguments)},strokeSetter:function(){this.elem.attr(this.prop,t.color(this.start).tweenTo(t.color(this.end),this.pos),null,!0)}},t.merge=function(){var e,i,s=arguments,o={};for(!0===s[0]&&(o=s[1],s=Array.prototype.slice.call(s,2)),i=s.length,e=0;e<i;e++)o=function e(i,s){return"object"!==(void 0===i?"undefined":n(i))&&(i={}),t.objectEach(s,function(n,o){!t.isObject(n,!0)||t.isClass(n)||t.isDOMElement(n)?i[o]=s[o]:i[o]=e(i[o]||{},n)}),i}(o,s[e]);return o},t.pInt=function(t,e){return parseInt(t,e||10)},t.isString=function(t){return"string"==typeof t},t.isArray=function(t){return"[object Array]"===(t=Object.prototype.toString.call(t))||"[object Array Iterator]"===t},t.isObject=function(e,i){return!(!e||"object"!==(void 0===e?"undefined":n(e))||i&&t.isArray(e))},t.isDOMElement=function(e){return t.isObject(e)&&"number"==typeof e.nodeType},t.isClass=function(e){var i=e&&e.constructor;return!(!t.isObject(e,!0)||t.isDOMElement(e)||!i||!i.name||"Object"===i.name)},t.isNumber=function(t){return"number"==typeof t&&!isNaN(t)&&1/0>t&&-1/0<t},t.erase=function(t,e){for(var i=t.length;i--;)if(t[i]===e){t.splice(i,1);break}},t.defined=function(t){return void 0!==t&&null!==t},t.attr=function(e,i,s){var n;return t.isString(i)?t.defined(s)?e.setAttribute(i,s):e&&e.getAttribute&&((n=e.getAttribute(i))||"class"!==i||(n=e.getAttribute(i+"Name"))):t.defined(i)&&t.isObject(i)&&t.objectEach(i,function(t,i){e.setAttribute(i,t)}),n},t.splat=function(e){return t.isArray(e)?e:[e]},t.syncTimeout=function(t,e,i){if(e)return setTimeout(t,e,i);t.call(0,i)},t.clearTimeout=function(e){t.defined(e)&&clearTimeout(e)},t.extend=function(t,e){var i;t||(t={});for(i in e)t[i]=e[i];return t},t.pick=function(){var t,e,i=arguments,s=i.length;for(t=0;t<s;t++)if(void 0!==(e=i[t])&&null!==e)return e},t.css=function(e,i){t.isMS&&!t.svg&&i&&void 0!==i.opacity&&(i.filter="alpha(opacity="+100*i.opacity+")"),t.extend(e.style,i)},t.createElement=function(e,s,n,o,a){e=i.createElement(e);var r=t.css;return s&&t.extend(e,s),a&&r(e,{padding:0,border:"none",margin:0}),n&&r(e,n),o&&o.appendChild(e),e},t.extendClass=function(e,i){var s=function(){};return s.prototype=new e,t.extend(s.prototype,i),s},t.pad=function(t,e,i){return Array((e||2)+1-String(t).replace("-","").length).join(i||0)+t},t.relativeLength=function(t,e,i){return/%$/.test(t)?e*parseFloat(t)/100+(i||0):parseFloat(t)},t.wrap=function(t,e,i){var s=t[e];t[e]=function(){var t=Array.prototype.slice.call(arguments),e=arguments,n=this;return n.proceed=function(){s.apply(n,arguments.length?arguments:e)},t.unshift(s),t=i.apply(this,t),n.proceed=null,t}},t.datePropsToTimestamps=function(e){t.objectEach(e,function(i,s){t.isObject(i)&&"function"==typeof i.getTime?e[s]=i.getTime():(t.isObject(i)||t.isArray(i))&&t.datePropsToTimestamps(i)})},t.formatSingle=function(e,i,s){var n=/\.([0-9])/,o=t.defaultOptions.lang;return/f$/.test(e)?(s=(s=e.match(n))?s[1]:-1,null!==i&&(i=t.numberFormat(i,s,o.decimalPoint,-1<e.indexOf(",")?o.thousandsSep:""))):i=(s||t.time).dateFormat(e,i),i},t.format=function(e,i,s){for(var n,o,a,r,l,h="{",c=!1,d=[];e&&-1!==(h=e.indexOf(h));){if(n=e.slice(0,h),c){for(n=n.split(":"),o=n.shift().split("."),r=o.length,l=i,a=0;a<r;a++)l&&(l=l[o[a]]);n.length&&(l=t.formatSingle(n.join(":"),l,s)),d.push(l)}else d.push(n);e=e.slice(h+1),h=(c=!c)?"}":"{"}return d.push(e),d.join("")},t.getMagnitude=function(t){return Math.pow(10,Math.floor(Math.log(t)/Math.LN10))},t.normalizeTickInterval=function(e,i,s,n,o){var a,r=e;for(s=t.pick(s,1),a=e/s,i||(i=o?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],!1===n&&(1===s?i=i.filter(function(t){return 0==t%1}):.1>=s&&(i=[1/s]))),n=0;n<i.length&&(r=i[n],!(o&&r*s>=e||!o&&a<=(i[n]+(i[n+1]||i[n]))/2));n++);return r=t.correctFloat(r*s,-Math.round(Math.log(.001)/Math.LN10))},t.stableSort=function(t,e){var i,s,n=t.length;for(s=0;s<n;s++)t[s].safeI=s;for(t.sort(function(t,s){return i=e(t,s),0===i?t.safeI-s.safeI:i}),s=0;s<n;s++)delete t[s].safeI},t.arrayMin=function(t){for(var e=t.length,i=t[0];e--;)t[e]<i&&(i=t[e]);return i},t.arrayMax=function(t){for(var e=t.length,i=t[0];e--;)t[e]>i&&(i=t[e]);return i},t.destroyObjectProperties=function(e,i){t.objectEach(e,function(t,s){t&&t!==i&&t.destroy&&t.destroy(),delete e[s]})},t.discardElement=function(e){var i=t.garbageBin;i||(i=t.createElement("div")),e&&i.appendChild(e),i.innerHTML=""},t.correctFloat=function(t,e){return parseFloat(t.toPrecision(e||14))},t.setAnimation=function(e,i){i.renderer.globalAnimation=t.pick(e,i.options.chart.animation,!0)},t.animObject=function(e){return t.isObject(e)?t.merge(e):{duration:e?500:0}},t.timeUnits={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:24192e5,year:314496e5},t.numberFormat=function(e,i,s,n){e=+e||0,i=+i;var o,a,r=t.defaultOptions.lang,l=(e.toString().split(".")[1]||"").split("e")[0].length,h=e.toString().split("e");return-1===i?i=Math.min(l,20):t.isNumber(i)?i&&h[1]&&0>h[1]&&(o=i+ +h[1],0<=o?(h[0]=(+h[0]).toExponential(o).split("e")[0],i=o):(h[0]=h[0].split(".")[0]||0,e=20>i?(h[0]*Math.pow(10,h[1])).toFixed(i):0,h[1]=0)):i=2,a=(Math.abs(h[1]?h[0]:e)+Math.pow(10,-Math.max(i,l)-1)).toFixed(i),l=String(t.pInt(a)),o=3<l.length?l.length%3:0,s=t.pick(s,r.decimalPoint),n=t.pick(n,r.thousandsSep),e=(0>e?"-":"")+(o?l.substr(0,o)+n:""),e+=l.substr(o).replace(/(\d{3})(?=\d)/g,"$1"+n),i&&(e+=s+a.slice(-i)),h[1]&&0!=+e&&(e+="e"+h[1]),e},Math.easeInOutSine=function(t){return-.5*(Math.cos(Math.PI*t)-1)},t.getStyle=function(e,i,n){return"width"===i?Math.max(0,Math.min(e.offsetWidth,e.scrollWidth,e.getBoundingClientRect&&"none"===t.getStyle(e,"transform",!1)?Math.floor(e.getBoundingClientRect().width):1/0)-t.getStyle(e,"padding-left")-t.getStyle(e,"padding-right")):"height"===i?Math.max(0,Math.min(e.offsetHeight,e.scrollHeight)-t.getStyle(e,"padding-top")-t.getStyle(e,"padding-bottom")):(s.getComputedStyle||t.error(27,!0),(e=s.getComputedStyle(e,void 0))&&(e=e.getPropertyValue(i),t.pick(n,"opacity"!==i)&&(e=t.pInt(e))),e)},t.inArray=function(t,e,i){return e.indexOf(t,i)},t.find=Array.prototype.find?function(t,e){return t.find(e)}:function(t,e){var i,s=t.length;for(i=0;i<s;i++)if(e(t[i],i))return t[i]},t.keys=Object.keys,t.offset=function(t){var e=i.documentElement;return t=t.parentElement||t.parentNode?t.getBoundingClientRect():{top:0,left:0},{top:t.top+(s.pageYOffset||e.scrollTop)-(e.clientTop||0),left:t.left+(s.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}},t.stop=function(e,i){for(var s=t.timers.length;s--;)t.timers[s].elem!==e||i&&i!==t.timers[s].prop||(t.timers[s].stopped=!0)},t.objectEach=function(t,e,i){for(var s in t)t.hasOwnProperty(s)&&e.call(i||t[s],t[s],s,t)},t.objectEach({map:"map",each:"forEach",grep:"filter",reduce:"reduce",some:"some"},function(e,i){t[i]=function(t){return Array.prototype[e].apply(t,[].slice.call(arguments,1))}}),t.addEvent=function(e,i,s,n){var o,a=e.addEventListener||t.addEventListenerPolyfill;return o="function"==typeof e&&e.prototype?e.prototype.protoEvents=e.prototype.protoEvents||{}:e.hcEvents=e.hcEvents||{},t.Point&&e instanceof t.Point&&e.series&&e.series.chart&&(e.series.chart.runTrackerClick=!0),a&&a.call(e,i,s,!1),o[i]||(o[i]=[]),o[i].push(s),n&&t.isNumber(n.order)&&(s.order=n.order,o[i].sort(function(t,e){return t.order-e.order})),function(){t.removeEvent(e,i,s)}},t.removeEvent=function(e,i,s){function n(i,s){var n=e.removeEventListener||t.removeEventListenerPolyfill;n&&n.call(e,i,s,!1)}function o(s){var o,a;e.nodeName&&(i?(o={},o[i]=!0):o=s,t.objectEach(o,function(t,e){if(s[e])for(a=s[e].length;a--;)n(e,s[e][a])}))}var a,r;["protoEvents","hcEvents"].forEach(function(t){var l=e[t];l&&(i?(a=l[i]||[],s?(r=a.indexOf(s),-1<r&&(a.splice(r,1),l[i]=a),n(i,s)):(o(l),l[i]=[])):(o(l),e[t]={}))})},t.fireEvent=function(e,s,n,o){var a,r,l,h,c;n=n||{},i.createEvent&&(e.dispatchEvent||e.fireEvent)?(a=i.createEvent("Events"),a.initEvent(s,!0,!0),t.extend(a,n),e.dispatchEvent?e.dispatchEvent(a):e.fireEvent(s,a)):["protoEvents","hcEvents"].forEach(function(i){if(e[i])for(r=e[i][s]||[],l=r.length,n.target||t.extend(n,{preventDefault:function(){n.defaultPrevented=!0},target:e,type:s}),h=0;h<l;h++)(c=r[h])&&!1===c.call(e,n)&&n.preventDefault()}),o&&!n.defaultPrevented&&o.call(e,n)},t.animate=function(e,i,s){var n,o,a,r,l="";t.isObject(s)||(r=arguments,s={duration:r[2],easing:r[3],complete:r[4]}),t.isNumber(s.duration)||(s.duration=400),s.easing="function"==typeof s.easing?s.easing:Math[s.easing]||Math.easeInOutSine,s.curAnim=t.merge(i),t.objectEach(i,function(r,h){t.stop(e,h),a=new t.Fx(e,s,h),o=null,"d"===h?(a.paths=a.initPath(e,e.d,i.d),a.toD=i.d,n=0,o=1):e.attr?n=e.attr(h):(n=parseFloat(t.getStyle(e,h))||0,"opacity"!==h&&(l="px")),o||(o=r),o&&o.match&&o.match("px")&&(o=o.replace(/px/g,"")),a.run(n,o,l)})},t.seriesType=function(e,i,s,n,o){var a=t.getOptions(),r=t.seriesTypes;return a.plotOptions[e]=t.merge(a.plotOptions[i],s),r[e]=t.extendClass(r[i]||function(){},n),r[e].prototype.type=e,o&&(r[e].prototype.pointClass=t.extendClass(t.Point,o)),r[e]},t.uniqueKey=function(){var t=Math.random().toString(36).substring(2,9),e=0;return function(){return"highcharts-"+t+"-"+e++}}(),t.isFunction=function(t){return"function"==typeof t},s.jQuery&&(s.jQuery.fn.highcharts=function(){var i=[].slice.call(arguments);if(this[0])return i[0]?(new(t[t.isString(i[0])?i.shift():"Chart"])(this[0],i[0],i[1]),this):e[t.attr(this[0],"data-highcharts-chart")]})}),e(i,"parts/Color.js",[i["parts/Globals.js"]],function(t){var e=t.isNumber,i=t.merge,s=t.pInt;t.Color=function(e){if(!(this instanceof t.Color))return new t.Color(e);this.init(e)},t.Color.prototype={parsers:[{regex:/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*\)/,parse:function(t){return[s(t[1]),s(t[2]),s(t[3]),parseFloat(t[4],10)]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,parse:function(t){return[s(t[1]),s(t[2]),s(t[3]),1]}}],names:{white:"#ffffff",black:"#000000"},init:function(e){var i,s,n,o;if((this.input=e=this.names[e&&e.toLowerCase?e.toLowerCase():""]||e)&&e.stops)this.stops=e.stops.map(function(e){return new t.Color(e[1])});else if(e&&e.charAt&&"#"===e.charAt()&&(i=e.length,e=parseInt(e.substr(1),16),7===i?s=[(16711680&e)>>16,(65280&e)>>8,255&e,1]:4===i&&(s=[(3840&e)>>4|(3840&e)>>8,(240&e)>>4|240&e,(15&e)<<4|15&e,1])),!s)for(n=this.parsers.length;n--&&!s;)o=this.parsers[n],(i=o.regex.exec(e))&&(s=o.parse(i));this.rgba=s||[]},get:function(t){var s,n=this.input,o=this.rgba;return this.stops?(s=i(n),s.stops=[].concat(s.stops),this.stops.forEach(function(e,i){s.stops[i]=[s.stops[i][0],e.get(t)]})):s=o&&e(o[0])?"rgb"===t||!t&&1===o[3]?"rgb("+o[0]+","+o[1]+","+o[2]+")":"a"===t?o[3]:"rgba("+o.join(",")+")":n,s},brighten:function(t){var i,n=this.rgba;if(this.stops)this.stops.forEach(function(e){e.brighten(t)});else if(e(t)&&0!==t)for(i=0;3>i;i++)n[i]+=s(255*t),0>n[i]&&(n[i]=0),255<n[i]&&(n[i]=255);return this},setOpacity:function(t){return this.rgba[3]=t,this},tweenTo:function(t,e){var i=this.rgba,s=t.rgba;return s.length&&i&&i.length?(t=1!==s[3]||1!==i[3],e=(t?"rgba(":"rgb(")+Math.round(s[0]+(i[0]-s[0])*(1-e))+","+Math.round(s[1]+(i[1]-s[1])*(1-e))+","+Math.round(s[2]+(i[2]-s[2])*(1-e))+(t?","+(s[3]+(i[3]-s[3])*(1-e)):"")+")"):e=t.input||"none",e}},t.color=function(e){return new t.Color(e)}}),e(i,"parts/SvgRenderer.js",[i["parts/Globals.js"]],function(t){var e,i,s=t.addEvent,n=t.animate,o=t.attr,a=t.charts,r=t.color,l=t.css,h=t.createElement,c=t.defined,d=t.deg2rad,p=t.destroyObjectProperties,u=t.doc,f=t.extend,g=t.erase,m=t.hasTouch,v=t.isArray,x=t.isFirefox,y=t.isMS,b=t.isObject,w=t.isString,k=t.isWebKit,M=t.merge,S=t.noop,T=t.objectEach,C=t.pick,A=t.pInt,E=t.removeEvent,P=t.splat,O=t.stop,L=t.svg,D=t.SVG_NS,_=t.symbolSizes,I=t.win;e=t.SVGElement=function(){return this},f(e.prototype,{opacity:1,SVG_NS:D,textProps:"direction fontSize fontWeight fontFamily fontStyle color lineHeight width textAlign textDecoration textOverflow textOutline cursor".split(" "),init:function(e,i){this.element="span"===i?h(i):u.createElementNS(this.SVG_NS,i),this.renderer=e,t.fireEvent(this,"afterInit")},animate:function(e,i,s){var o=t.animObject(C(i,this.renderer.globalAnimation,!0));return C(u.hidden,u.msHidden,u.webkitHidden,!1)&&(o.duration=0),0!==o.duration?(s&&(o.complete=s),n(this,e,o)):(this.attr(e,null,s),t.objectEach(e,function(t,e){o.step&&o.step.call(this,t,{prop:e,pos:1})},this)),this},complexColor:function(e,i,s){var n,o,a,r,l,h,d,p,u,f,g,m,x=this.renderer,y=[];t.fireEvent(this.renderer,"complexColor",{args:arguments},function(){e.radialGradient?o="radialGradient":e.linearGradient&&(o="linearGradient"),o&&(a=e[o],l=x.gradients,d=e.stops,f=s.radialReference,v(a)&&(e[o]=a={x1:a[0],y1:a[1],x2:a[2],y2:a[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===o&&f&&!c(a.gradientUnits)&&(r=a,a=M(a,x.getRadialAttr(f,r),{gradientUnits:"userSpaceOnUse"})),T(a,function(t,e){"id"!==e&&y.push(e,t)}),T(d,function(t){y.push(t)}),y=y.join(","),l[y]?g=l[y].attr("id"):(a.id=g=t.uniqueKey(),l[y]=h=x.createElement(o).attr(a).add(x.defs),h.radAttr=r,h.stops=[],d.forEach(function(e){0===e[1].indexOf("rgba")?(n=t.color(e[1]),p=n.get("rgb"),u=n.get("a")):(p=e[1],u=1),e=x.createElement("stop").attr({offset:e[0],"stop-color":p,"stop-opacity":u}).add(h),h.stops.push(e)})),m="url("+x.url+"#"+g+")",s.setAttribute(i,m),s.gradient=y,e.toString=function(){return m})})},applyTextOutline:function(e){var i,s,n,a=this.element;-1!==e.indexOf("contrast")&&(e=e.replace(/contrast/g,this.renderer.getContrast(a.style.fill))),e=e.split(" "),i=e[e.length-1],(s=e[0])&&"none"!==s&&t.svg&&(this.fakeTS=!0,e=[].slice.call(a.getElementsByTagName("tspan")),this.ySetter=this.xSetter,s=s.replace(/(^[\d\.]+)(.*?)$/g,function(t,e,i){return 2*e+i}),this.removeTextOutline(e),n=a.firstChild,e.forEach(function(t,e){0===e&&(t.setAttribute("x",a.getAttribute("x")),e=a.getAttribute("y"),t.setAttribute("y",e||0),null===e&&a.setAttribute("y",0)),t=t.cloneNode(1),o(t,{class:"highcharts-text-outline",fill:i,stroke:i,"stroke-width":s,"stroke-linejoin":"round"}),a.insertBefore(t,n)}))},removeTextOutline:function(t){for(var e,i=t.length;i--;)e=t[i],"highcharts-text-outline"===e.getAttribute("class")&&g(t,this.element.removeChild(e))},symbolCustomAttribs:"x y width height r start end innerR anchorX anchorY rounded".split(" "),attr:function(e,i,s,n){var o,a,r,l,h=this.element,c=this,d=this.symbolCustomAttribs;return"string"==typeof e&&void 0!==i&&(o=e,e={},e[o]=i),"string"==typeof e?c=(this[e+"Getter"]||this._defaultGetter).call(this,e,h):(T(e,function(i,s){r=!1,n||O(this,s),this.symbolName&&-1!==t.inArray(s,d)&&(a||(this.symbolAttr(e),a=!0),r=!0),!this.rotation||"x"!==s&&"y"!==s||(this.doTransform=!0),r||(l=this[s+"Setter"]||this._defaultSetter,l.call(this,i,s,h),!this.styledMode&&this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(s)&&this.updateShadows(s,i,l))},this),this.afterSetters()),s&&s.call(this),c},afterSetters:function(){this.doTransform&&(this.updateTransform(),this.doTransform=!1)},updateShadows:function(t,e,i){for(var s=this.shadows,n=s.length;n--;)i.call(s[n],"height"===t?Math.max(e-(s[n].cutHeight||0),0):"d"===t?this.d:e,t,s[n])},addClass:function(t,e){var i=this.attr("class")||"";return e||(t=(t||"").split(/ /g).reduce(function(t,e){return-1===i.indexOf(e)&&t.push(e),t},i?[i]:[]).join(" ")),t!==i&&this.attr("class",t),this},hasClass:function(t){return-1!==(this.attr("class")||"").split(" ").indexOf(t)},removeClass:function(t){return this.attr("class",(this.attr("class")||"").replace(t,""))},symbolAttr:function(t){var e=this;"x y r start end width height innerR anchorX anchorY clockwise".split(" ").forEach(function(i){e[i]=C(t[i],e[i])}),e.attr({d:e.renderer.symbols[e.symbolName](e.x,e.y,e.width,e.height,e)})},clip:function(t){return this.attr("clip-path",t?"url("+this.renderer.url+"#"+t.id+")":"none")},crisp:function(t,e){var i;return e=e||t.strokeWidth||0,i=Math.round(e)%2/2,t.x=Math.floor(t.x||this.x||0)+i,t.y=Math.floor(t.y||this.y||0)+i,t.width=Math.floor((t.width||this.width||0)-2*i),t.height=Math.floor((t.height||this.height||0)-2*i),c(t.strokeWidth)&&(t.strokeWidth=e),t},css:function(t){var e,i,s=this.styles,n={},a=this.element,r="",h=!s,c=["textOutline","textOverflow","width"];return t&&t.color&&(t.fill=t.color),s&&T(t,function(t,e){t!==s[e]&&(n[e]=t,h=!0)}),h&&(s&&(t=f(s,n)),t&&(null===t.width||"auto"===t.width?delete this.textWidth:"text"===a.nodeName.toLowerCase()&&t.width&&(e=this.textWidth=A(t.width))),this.styles=t,e&&!L&&this.renderer.forExport&&delete t.width,a.namespaceURI===this.SVG_NS?(i=function(t,e){return"-"+e.toLowerCase()},T(t,function(t,e){-1===c.indexOf(e)&&(r+=e.replace(/([A-Z])/g,i)+":"+t+";")}),r&&o(a,"style",r)):l(a,t),this.added&&("text"===this.element.nodeName&&this.renderer.buildText(this),t&&t.textOutline&&this.applyTextOutline(t.textOutline))),this},getStyle:function(t){return I.getComputedStyle(this.element||this,"").getPropertyValue(t)},strokeWidth:function(){if(!this.renderer.styledMode)return this["stroke-width"]||0;var t,e=this.getStyle("stroke-width");return e.indexOf("px")===e.length-2?e=A(e):(t=u.createElementNS(D,"rect"),o(t,{width:e,"stroke-width":0}),this.element.parentNode.appendChild(t),e=t.getBBox().width,t.parentNode.removeChild(t)),e},on:function(t,e){var i=this,s=i.element;return m&&"click"===t?(s.ontouchstart=function(t){i.touchEventFired=Date.now(),t.preventDefault(),e.call(s,t)},s.onclick=function(t){(-1===I.navigator.userAgent.indexOf("Android")||1100<Date.now()-(i.touchEventFired||0))&&e.call(s,t)}):s["on"+t]=e,this},setRadialReference:function(t){var e=this.renderer.gradients[this.element.gradient];return this.element.radialReference=t,e&&e.radAttr&&e.animate(this.renderer.getRadialAttr(t,e.radAttr)),this},translate:function(t,e){return this.attr({translateX:t,translateY:e})},invert:function(t){return this.inverted=t,this.updateTransform(),this},updateTransform:function(){var t=this.translateX||0,e=this.translateY||0,i=this.scaleX,s=this.scaleY,n=this.inverted,o=this.rotation,a=this.matrix,r=this.element;n&&(t+=this.width,e+=this.height),t=["translate("+t+","+e+")"],c(a)&&t.push("matrix("+a.join(",")+")"),n?t.push("rotate(90) scale(-1,1)"):o&&t.push("rotate("+o+" "+C(this.rotationOriginX,r.getAttribute("x"),0)+" "+C(this.rotationOriginY,r.getAttribute("y")||0)+")"),(c(i)||c(s))&&t.push("scale("+C(i,1)+" "+C(s,1)+")"),t.length&&r.setAttribute("transform",t.join(" "))},toFront:function(){var t=this.element;return t.parentNode.appendChild(t),this},align:function(t,e,i){var s,n,o,a,r={};n=this.renderer,o=n.alignedObjects;var l,h;return t?(this.alignOptions=t,this.alignByTranslate=e,(!i||w(i))&&(this.alignTo=s=i||"renderer",g(o,this),o.push(this),i=null)):(t=this.alignOptions,e=this.alignByTranslate,s=this.alignTo),i=C(i,n[s],n),s=t.align,n=t.verticalAlign,o=(i.x||0)+(t.x||0),a=(i.y||0)+(t.y||0),"right"===s?l=1:"center"===s&&(l=2),l&&(o+=(i.width-(t.width||0))/l),r[e?"translateX":"x"]=Math.round(o),"bottom"===n?h=1:"middle"===n&&(h=2),h&&(a+=(i.height-(t.height||0))/h),r[e?"translateY":"y"]=Math.round(a),this[this.placed?"animate":"attr"](r),this.placed=!0,this.alignAttr=r,this},getBBox:function(t,i){var s,n,o,a,r,l=this.renderer,h=this.element,p=this.styles,u=this.textStr,g=l.cache,m=l.cacheKeys,v=h.namespaceURI===this.SVG_NS;if(i=C(i,this.rotation),n=i*d,o=l.styledMode?h&&e.prototype.getStyle.call(h,"font-size"):p&&p.fontSize,c(u)&&(r=u.toString(),-1===r.indexOf("<")&&(r=r.replace(/[0-9]/g,"0")),r+=["",i||0,o,this.textWidth,p&&p.textOverflow].join()),r&&!t&&(s=g[r]),!s){if(v||l.forExport){try{(a=this.fakeTS&&function(t){[].forEach.call(h.querySelectorAll(".highcharts-text-outline"),function(e){e.style.display=t})})&&a("none"),s=h.getBBox?f({},h.getBBox()):{width:h.offsetWidth,height:h.offsetHeight},a&&a("")}catch(t){}(!s||0>s.width)&&(s={width:0,height:0})}else s=this.htmlGetBBox();if(l.isSVG&&(t=s.width,l=s.height,v&&(s.height=l={"11px,17":14,"13px,20":16}[p&&p.fontSize+","+Math.round(l)]||l),i&&(s.width=Math.abs(l*Math.sin(n))+Math.abs(t*Math.cos(n)),s.height=Math.abs(l*Math.cos(n))+Math.abs(t*Math.sin(n)))),r&&0<s.height){for(;250<m.length;)delete g[m.shift()];g[r]||m.push(r),g[r]=s}}return s},show:function(t){return this.attr({visibility:t?"inherit":"visible"})},hide:function(){return this.attr({visibility:"hidden"})},fadeOut:function(t){var e=this;e.animate({opacity:0},{duration:t||150,complete:function(){e.attr({y:-9999})}})},add:function(t){var e,i=this.renderer,s=this.element;return t&&(this.parentGroup=t),this.parentInverted=t&&t.inverted,void 0!==this.textStr&&i.buildText(this),this.added=!0,(!t||t.handleZ||this.zIndex)&&(e=this.zIndexSetter()),e||(t?t.element:i.box).appendChild(s),this.onAdd&&this.onAdd(),this},safeRemoveChild:function(t){var e=t.parentNode;e&&e.removeChild(t)},destroy:function(){var t=this,e=t.element||{},i=t.renderer,s=i.isSVG&&"SPAN"===e.nodeName&&t.parentGroup,n=e.ownerSVGElement,o=t.clipPath;if(e.onclick=e.onmouseout=e.onmouseover=e.onmousemove=e.point=null,O(t),o&&n&&([].forEach.call(n.querySelectorAll("[clip-path],[CLIP-PATH]"),function(t){-1<t.getAttribute("clip-path").indexOf(o.element.id)&&t.removeAttribute("clip-path")}),t.clipPath=o.destroy()),t.stops){for(n=0;n<t.stops.length;n++)t.stops[n]=t.stops[n].destroy();t.stops=null}for(t.safeRemoveChild(e),i.styledMode||t.destroyShadows();s&&s.div&&0===s.div.childNodes.length;)e=s.parentGroup,t.safeRemoveChild(s.div),delete s.div,s=e;return t.alignTo&&g(i.alignedObjects,t),T(t,function(e,i){delete t[i]}),null},shadow:function(t,e,i){var s,n,a,r,l,h,c=[],d=this.element;if(t){if(!this.shadows){for(r=C(t.width,3),l=(t.opacity||.15)/r,h=this.parentInverted?"(-1,-1)":"("+C(t.offsetX,1)+", "+C(t.offsetY,1)+")",s=1;s<=r;s++)n=d.cloneNode(0),a=2*r+1-2*s,o(n,{stroke:t.color||"#000000","stroke-opacity":l*s,"stroke-width":a,transform:"translate"+h,fill:"none"}),n.setAttribute("class",(n.getAttribute("class")||"")+" highcharts-shadow"),i&&(o(n,"height",Math.max(o(n,"height")-a,0)),n.cutHeight=a),e?e.element.appendChild(n):d.parentNode&&d.parentNode.insertBefore(n,d),c.push(n);this.shadows=c}}else this.destroyShadows();return this},destroyShadows:function(){(this.shadows||[]).forEach(function(t){this.safeRemoveChild(t)},this),this.shadows=void 0},xGetter:function(t){return"circle"===this.element.nodeName&&("x"===t?t="cx":"y"===t&&(t="cy")),this._defaultGetter(t)},_defaultGetter:function(t){return t=C(this[t+"Value"],this[t],this.element?this.element.getAttribute(t):null,0),/^[\-0-9\.]+$/.test(t)&&(t=parseFloat(t)),t},dSetter:function(t,e,i){t&&t.join&&(t=t.join(" ")),/(NaN| {2}|^$)/.test(t)&&(t="M 0 0"),this[e]!==t&&(i.setAttribute(e,t),this[e]=t)},dashstyleSetter:function(t){var e,i=this["stroke-width"];if("inherit"===i&&(i=1),t=t&&t.toLowerCase()){for(t=t.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(","),e=t.length;e--;)t[e]=A(t[e])*i;t=t.join(",").replace(/NaN/g,"none"),this.element.setAttribute("stroke-dasharray",t)}},alignSetter:function(t){var e={left:"start",center:"middle",right:"end"};e[t]&&(this.alignValue=t,this.element.setAttribute("text-anchor",e[t]))},opacitySetter:function(t,e,i){this[e]=t,i.setAttribute(e,t)},titleSetter:function(t){var e=this.element.getElementsByTagName("title")[0];e||(e=u.createElementNS(this.SVG_NS,"title"),this.element.appendChild(e)),e.firstChild&&e.removeChild(e.firstChild),e.appendChild(u.createTextNode(String(C(t),"").replace(/<[^>]*>/g,"").replace(/&lt;/g,"<").replace(/&gt;/g,">")))},textSetter:function(t){t!==this.textStr&&(delete this.bBox,this.textStr=t,this.added&&this.renderer.buildText(this))},setTextPath:function(e,i){var s,n,o=this.element,a={textAnchor:"text-anchor"},r=!1,l=this.textPathWrapper,h=!l;if(i=M(!0,{enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}},i),s=i.attributes,e&&i&&i.enabled){if(this.options&&this.options.padding&&(s.dx=-this.options.padding),l||(this.textPathWrapper=l=this.renderer.createElement("textPath"),r=!0),n=l.element,(i=e.element.getAttribute("id"))||e.element.setAttribute("id",i=t.uniqueKey()),h)for(e=o.getElementsByTagName("tspan");e.length;)e[0].setAttribute("y",0),n.appendChild(e[0]);r&&l.add({element:this.text?this.text.element:o}),n.setAttributeNS("http://www.w3.org/1999/xlink","href",this.renderer.url+"#"+i),c(s.dy)&&(n.parentNode.setAttribute("dy",s.dy),delete s.dy),c(s.dx)&&(n.parentNode.setAttribute("dx",s.dx),delete s.dx),t.objectEach(s,function(t,e){n.setAttribute(a[e]||e,t)}),o.removeAttribute("transform"),this.removeTextOutline.call(l,[].slice.call(o.getElementsByTagName("tspan"))),this.applyTextOutline=this.updateTransform=S}else l&&(delete this.updateTransform,delete this.applyTextOutline,this.destroyTextPath(o,e));return this},destroyTextPath:function(t,e){var i;for(e.element.setAttribute("id",""),i=this.textPathWrapper.element.childNodes;i.length;)t.firstChild.appendChild(i[0]);t.firstChild.removeChild(this.textPathWrapper.element),delete e.textPathWrapper},fillSetter:function(t,e,i){"string"==typeof t?i.setAttribute(e,t):t&&this.complexColor(t,e,i)},visibilitySetter:function(t,e,i){"inherit"===t?i.removeAttribute(e):this[e]!==t&&i.setAttribute(e,t),this[e]=t},zIndexSetter:function(t,e){var i,s,n,o=this.renderer,a=this.parentGroup,r=(a||o).element||o.box,l=this.element,o=r===o.box;i=this.added;var h;if(c(t)?(l.setAttribute("data-z-index",t),t=+t,this[e]===t&&(i=!1)):c(this[e])&&l.removeAttribute("data-z-index"),this[e]=t,i){for((t=this.zIndex)&&a&&(a.handleZ=!0),e=r.childNodes,h=e.length-1;0<=h&&!s;h--)a=e[h],i=a.getAttribute("data-z-index"),n=!c(i),a!==l&&(0>t&&n&&!o&&!h?(r.insertBefore(l,e[h]),s=!0):(A(i)<=t||n&&(!c(t)||0<=t))&&(r.insertBefore(l,e[h+1]||null),s=!0));s||(r.insertBefore(l,e[o?3:0]||null),s=!0)}return s},_defaultSetter:function(t,e,i){i.setAttribute(e,t)}}),e.prototype.yGetter=e.prototype.xGetter,e.prototype.translateXSetter=e.prototype.translateYSetter=e.prototype.rotationSetter=e.prototype.verticalAlignSetter=e.prototype.rotationOriginXSetter=e.prototype.rotationOriginYSetter=e.prototype.scaleXSetter=e.prototype.scaleYSetter=e.prototype.matrixSetter=function(t,e){this[e]=t,this.doTransform=!0},e.prototype["stroke-widthSetter"]=e.prototype.strokeSetter=function(t,i,s){this[i]=t,this.stroke&&this["stroke-width"]?(e.prototype.fillSetter.call(this,this.stroke,"stroke",s),s.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0):"stroke-width"===i&&0===t&&this.hasStroke&&(s.removeAttribute("stroke"),this.hasStroke=!1)},i=t.SVGRenderer=function(){this.init.apply(this,arguments)},f(i.prototype,{Element:e,SVG_NS:D,init:function(t,e,i,n,a,r,h){var c;c=this.createElement("svg").attr({version:"1.1",class:"highcharts-root"}),h||c.css(this.getStyle(n)),n=c.element,t.appendChild(n),o(t,"dir","ltr"),-1===t.innerHTML.indexOf("xmlns")&&o(n,"xmlns",this.SVG_NS),this.isSVG=!0,this.box=n,this.boxWrapper=c,this.alignedObjects=[],this.url=(x||k)&&u.getElementsByTagName("base").length?I.location.href.split("#")[0].replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"",this.createElement("desc").add().element.appendChild(u.createTextNode("Created with Highcharts 7.1.1")),this.defs=this.createElement("defs").add(),this.allowHTML=r,this.forExport=a,this.styledMode=h,this.gradients={},this.cache={},this.cacheKeys=[],this.imgCount=0,this.setSize(e,i,!1);var d;x&&t.getBoundingClientRect&&(e=function(){l(t,{left:0,top:0}),d=t.getBoundingClientRect(),l(t,{left:Math.ceil(d.left)-d.left+"px",top:Math.ceil(d.top)-d.top+"px"})},e(),this.unSubPixelFix=s(I,"resize",e))},definition:function(t){function e(t,s){var n;return P(t).forEach(function(t){var o=i.createElement(t.tagName),a={};T(t,function(t,e){"tagName"!==e&&"children"!==e&&"textContent"!==e&&(a[e]=t)}),o.attr(a),o.add(s||i.defs),t.textContent&&o.element.appendChild(u.createTextNode(t.textContent)),e(t.children||[],o),n=o}),n}var i=this;return e(t)},getStyle:function(t){return this.style=f({fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',fontSize:"12px"},t)},setStyle:function(t){this.boxWrapper.css(this.getStyle(t))},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var t=this.defs;return this.box=null,this.boxWrapper=this.boxWrapper.destroy(),p(this.gradients||{}),this.gradients=null,t&&(this.defs=t.destroy()),this.unSubPixelFix&&this.unSubPixelFix(),this.alignedObjects=null},createElement:function(t){var e=new this.Element;return e.init(this,t),e},draw:S,getRadialAttr:function(t,e){return{cx:t[0]-t[2]/2+e.cx*t[2],cy:t[1]-t[2]/2+e.cy*t[2],r:e.r*t[2]}},truncate:function(t,e,i,s,n,o,a){var r,l,h,c=this,d=t.rotation,p=s?1:0,f=(i||s).length,g=f,m=[],v=function(t){e.firstChild&&e.removeChild(e.firstChild),t&&e.appendChild(u.createTextNode(t))},x=function(o,r){if(r=r||o,void 0===m[r])if(e.getSubStringLength)try{m[r]=n+e.getSubStringLength(0,s?r+1:r)}catch(t){}else c.getSpanWidth&&(v(a(i||s,o)),m[r]=n+c.getSpanWidth(t,e));return m[r]};if(t.rotation=0,l=x(e.textContent.length),h=n+l>o){for(;p<=f;)g=Math.ceil((p+f)/2),s&&(r=a(s,g)),l=x(g,r&&r.length-1),p===f?p=f+1:l>o?f=g-1:p=g;0===f?v(""):i&&f===i.length-1||v(r||a(i||s,g))}return s&&s.splice(0,g),t.actualWidth=l,t.rotation=d,h},escapes:{"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"},buildText:function(t){var e,i,s,n=t.element,a=this,r=a.forExport,h=C(t.textStr,"").toString(),c=-1!==h.indexOf("<"),d=n.childNodes,p=o(n,"x"),f=t.styles,g=t.textWidth,m=f&&f.lineHeight,v=f&&f.textOutline,x=f&&"ellipsis"===f.textOverflow,y=f&&"nowrap"===f.whiteSpace,b=f&&f.fontSize,w=d.length,f=g&&!t.added&&this.box,k=function(t){var e;return a.styledMode||(e=/(px|em)$/.test(t&&t.style.fontSize)?t.style.fontSize:b||a.style.fontSize||12),m?A(m):a.fontMetrics(e,t.getAttribute("style")?t:n).h},M=function(t,e){return T(a.escapes,function(i,s){e&&-1!==e.indexOf(i)||(t=t.toString().replace(new RegExp(i,"g"),s))}),t},S=function(t,e){var i;if(i=t.indexOf("<"),t=t.substring(i,t.indexOf(">")-i),-1!==(i=t.indexOf(e+"="))&&(i=i+e.length+1,'"'===(e=t.charAt(i))||"'"===e))return t=t.substring(i+1),t.substring(0,t.indexOf(e))};if((i=[h,x,y,m,v,b,g].join())!==t.textCache){for(t.textCache=i;w--;)n.removeChild(d[w]);c||v||x||g||-1!==h.indexOf(" ")?(f&&f.appendChild(n),c?(h=a.styledMode?h.replace(/<(b|strong)>/g,'<span class="highcharts-strong">').replace(/<(i|em)>/g,'<span class="highcharts-emphasized">'):h.replace(/<(b|strong)>/g,'<span style="font-weight:bold">').replace(/<(i|em)>/g,'<span style="font-style:italic">'),h=h.replace(/<a/g,"<span").replace(/<\/(b|strong|i|em|a)>/g,"</span>").split(/<br.*?>/g)):h=[h],h=h.filter(function(t){return""!==t}),h.forEach(function(i,h){var c,d=0,f=0;i=i.replace(/^\s+|\s+$/g,"").replace(/<span/g,"|||<span").replace(/<\/span>/g,"</span>|||"),c=i.split("|||"),c.forEach(function(i){if(""!==i||1===c.length){var m,v,w={},T=u.createElementNS(a.SVG_NS,"tspan");if((m=S(i,"class"))&&o(T,"class",m),(m=S(i,"style"))&&(m=m.replace(/(;| |^)color([ :])/,"$1fill$2"),o(T,"style",m)),(v=S(i,"href"))&&!r&&(o(T,"onclick",'location.href="'+v+'"'),o(T,"class","highcharts-anchor"),a.styledMode||l(T,{cursor:"pointer"}))," "!==(i=M(i.replace(/<[a-zA-Z\/](.|\n)*?>/g,"")||" "))){if(T.appendChild(u.createTextNode(i)),d?w.dx=0:h&&null!==p&&(w.x=p),o(T,w),n.appendChild(T),!d&&s&&(!L&&r&&l(T,{display:"block"}),o(T,"dy",k(T))),g){var C=i.replace(/([^\^])-/g,"$1- ").split(" "),w=!y&&(1<c.length||h||1<C.length);v=0;var A=k(T);if(x)e=a.truncate(t,T,i,void 0,0,Math.max(0,g-parseInt(b||12,10)),function(t,e){return t.substring(0,e)+"…"});else if(w)for(;C.length;)C.length&&!y&&0<v&&(T=u.createElementNS(D,"tspan"),o(T,{dy:A,x:p}),m&&o(T,"style",m),T.appendChild(u.createTextNode(C.join(" ").replace(/- /g,"-"))),n.appendChild(T)),a.truncate(t,T,null,C,0===v?f:0,g,function(t,e){return C.slice(0,e).join(" ").replace(/- /g,"-")}),f=t.actualWidth,v++}d++}}}),s=s||n.childNodes.length}),x&&e&&t.attr("title",M(t.textStr,["&lt;","&gt;"])),f&&f.removeChild(n),v&&t.applyTextOutline&&t.applyTextOutline(v)):n.appendChild(u.createTextNode(M(h)))}},getContrast:function(t){return t=r(t).rgba,t[0]*=1,t[1]*=1.2,t[2]*=.5,459<t[0]+t[1]+t[2]?"#000000":"#FFFFFF"},button:function(t,e,i,n,o,a,r,l,h,c){var d=this.label(t,e,i,h,null,null,c,null,"button"),p=0,u=this.styledMode;if(d.attr(M({padding:8,r:2},o)),!u){var g,m,v,x;o=M({fill:"#f7f7f7",stroke:"#cccccc","stroke-width":1,style:{color:"#333333",cursor:"pointer",fontWeight:"normal"}},o),g=o.style,delete o.style,a=M(o,{fill:"#e6e6e6"},a),m=a.style,delete a.style,r=M(o,{fill:"#e6ebf5",style:{color:"#000000",fontWeight:"bold"}},r),v=r.style,delete r.style,l=M(o,{style:{color:"#cccccc"}},l),x=l.style,delete l.style}return s(d.element,y?"mouseover":"mouseenter",function(){3!==p&&d.setState(1)}),s(d.element,y?"mouseout":"mouseleave",function(){3!==p&&d.setState(p)}),d.setState=function(t){1!==t&&(d.state=p=t),d.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+["normal","hover","pressed","disabled"][t||0]),u||d.attr([o,a,r,l][t||0]).css([g,m,v,x][t||0])},u||d.attr(o).css(f({cursor:"default"},g)),d.on("click",function(t){3!==p&&n.call(d,t)})},crispLine:function(t,e){return t[1]===t[4]&&(t[1]=t[4]=Math.round(t[1])-e%2/2),t[2]===t[5]&&(t[2]=t[5]=Math.round(t[2])+e%2/2),t},path:function(t){var e=this.styledMode?{}:{fill:"none"};return v(t)?e.d=t:b(t)&&f(e,t),this.createElement("path").attr(e)},circle:function(t,e,i){return t=b(t)?t:void 0===t?{}:{x:t,y:e,r:i},e=this.createElement("circle"),e.xSetter=e.ySetter=function(t,e,i){i.setAttribute("c"+e,t)},e.attr(t)},arc:function(t,e,i,s,n,o){return b(t)?(s=t,e=s.y,i=s.r,t=s.x):s={innerR:s,start:n,end:o},t=this.symbol("arc",t,e,i,i,s),t.r=i,t},rect:function(t,e,i,s,n,a){n=b(t)?t.r:n;var r=this.createElement("rect");return t=b(t)?t:void 0===t?{}:{x:t,y:e,width:Math.max(i,0),height:Math.max(s,0)},this.styledMode||(void 0!==a&&(t.strokeWidth=a,t=r.crisp(t)),t.fill="none"),n&&(t.r=n),r.rSetter=function(t,e,i){r.r=t,o(i,{rx:t,ry:t})},r.rGetter=function(){return r.r},r.attr(t)},setSize:function(t,e,i){var s=this.alignedObjects,n=s.length;for(this.width=t,this.height=e,this.boxWrapper.animate({width:t,height:e},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},duration:C(i,!0)?void 0:0});n--;)s[n].align()},g:function(t){var e=this.createElement("g");return t?e.attr({class:"highcharts-"+t}):e},image:function(t,e,i,n,o,a){var r,l={preserveAspectRatio:"none"},h=function(t,e){t.setAttributeNS?t.setAttributeNS("http://www.w3.org/1999/xlink","href",e):t.setAttribute("hc-svg-href",e)},c=function(e){h(r.element,t),a.call(r,e)};return 1<arguments.length&&f(l,{x:e,y:i,width:n,height:o}),r=this.createElement("image").attr(l),a?(h(r.element,"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),l=new I.Image,s(l,"load",c),l.src=t,l.complete&&c({})):h(r.element,t),r},symbol:function(t,e,i,s,n,o){var r,d,p,g=this,m=/^url\((.*?)\)$/,v=m.test(t),x=!v&&(this.symbols[t]?t:"circle"),y=x&&this.symbols[x],b=c(e)&&y&&y.call(this.symbols,Math.round(e),Math.round(i),s,n,o);return y?(r=this.path(b),g.styledMode||r.attr("fill","none"),f(r,{symbolName:x,x:e,y:i,width:s,height:n}),o&&f(r,o)):v&&(d=t.match(m)[1],r=this.image(d),r.imgwidth=C(_[d]&&_[d].width,o&&o.width),r.imgheight=C(_[d]&&_[d].height,o&&o.height),p=function(){r.attr({width:r.width,height:r.height})},["width","height"].forEach(function(t){r[t+"Setter"]=function(t,e){var i={},s=this["img"+e],n="width"===e?"translateX":"translateY";this[e]=t,c(s)&&(o&&"within"===o.backgroundSize&&this.width&&this.height&&(s=Math.round(s*Math.min(this.width/this.imgwidth,this.height/this.imgheight))),this.element&&this.element.setAttribute(e,s),this.alignByTranslate||(i[n]=((this[e]||0)-s)/2,this.attr(i)))}}),c(e)&&r.attr({x:e,y:i}),r.isImg=!0,c(r.imgwidth)&&c(r.imgheight)?p():(r.attr({width:0,height:0}),h("img",{onload:function(){var t=a[g.chartIndex];0===this.width&&(l(this,{position:"absolute",top:"-999em"}),u.body.appendChild(this)),_[d]={width:this.width,height:this.height},r.imgwidth=this.width,r.imgheight=this.height,r.element&&p(),this.parentNode&&this.parentNode.removeChild(this),!--g.imgCount&&t&&t.onload&&t.onload()},src:d}),this.imgCount++)),r},symbols:{circle:function(t,e,i,s){return this.arc(t+i/2,e+s/2,i/2,s/2,{start:.5*Math.PI,end:2.5*Math.PI,open:!1})},square:function(t,e,i,s){return["M",t,e,"L",t+i,e,t+i,e+s,t,e+s,"Z"]},triangle:function(t,e,i,s){return["M",t+i/2,e,"L",t+i,e+s,t,e+s,"Z"]},"triangle-down":function(t,e,i,s){return["M",t,e,"L",t+i,e,t+i/2,e+s,"Z"]},diamond:function(t,e,i,s){return["M",t+i/2,e,"L",t+i,e+s/2,t+i/2,e+s,t,e+s/2,"Z"]},arc:function(t,e,i,s,n){var o=n.start,a=n.r||i,r=n.r||s||i,l=n.end-.001;i=n.innerR,s=C(n.open,.001>Math.abs(n.end-n.start-2*Math.PI));var h=Math.cos(o),d=Math.sin(o),p=Math.cos(l),l=Math.sin(l),o=.001>n.end-o-Math.PI?0:1;return n=["M",t+a*h,e+r*d,"A",a,r,0,o,C(n.clockwise,1),t+a*p,e+r*l],c(i)&&n.push(s?"M":"L",t+i*p,e+i*l,"A",i,i,0,o,0,t+i*h,e+i*d),n.push(s?"":"Z"),n},callout:function(t,e,i,s,n){var o=Math.min(n&&n.r||0,i,s),a=o+6,r=n&&n.anchorX;n=n&&n.anchorY;var l;return l=["M",t+o,e,"L",t+i-o,e,"C",t+i,e,t+i,e,t+i,e+o,"L",t+i,e+s-o,"C",t+i,e+s,t+i,e+s,t+i-o,e+s,"L",t+o,e+s,"C",t,e+s,t,e+s,t,e+s-o,"L",t,e+o,"C",t,e,t,e,t+o,e],r&&r>i?n>e+a&&n<e+s-a?l.splice(13,3,"L",t+i,n-6,t+i+6,n,t+i,n+6,t+i,e+s-o):l.splice(13,3,"L",t+i,s/2,r,n,t+i,s/2,t+i,e+s-o):r&&0>r?n>e+a&&n<e+s-a?l.splice(33,3,"L",t,n+6,t-6,n,t,n-6,t,e+o):l.splice(33,3,"L",t,s/2,r,n,t,s/2,t,e+o):n&&n>s&&r>t+a&&r<t+i-a?l.splice(23,3,"L",r+6,e+s,r,e+s+6,r-6,e+s,t+o,e+s):n&&0>n&&r>t+a&&r<t+i-a&&l.splice(3,3,"L",r-6,e,r,e-6,r+6,e,i-o,e),l}},clipRect:function(e,i,s,n){var o=t.uniqueKey()+"-",a=this.createElement("clipPath").attr({id:o}).add(this.defs);return e=this.rect(e,i,s,n,0).add(a),e.id=o,e.clipPath=a,e.count=0,e},text:function(t,e,i,s){var n={};return!s||!this.allowHTML&&this.forExport?(n.x=Math.round(e||0),i&&(n.y=Math.round(i)),c(t)&&(n.text=t),t=this.createElement("text").attr(n),s||(t.xSetter=function(t,e,i){var s,n,o=i.getElementsByTagName("tspan"),a=i.getAttribute(e);for(n=0;n<o.length;n++)s=o[n],s.getAttribute(e)===a&&s.setAttribute(e,t);i.setAttribute(e,t)}),t):this.html(t,e,i)},fontMetrics:function(t,i){return t=!this.styledMode&&/px/.test(t)||!I.getComputedStyle?t||i&&i.style&&i.style.fontSize||this.style&&this.style.fontSize:i&&e.prototype.getStyle.call(i,"font-size"),t=/px/.test(t)?A(t):12,i=24>t?t+3:Math.round(1.2*t),{h:i,b:Math.round(.8*i),f:t}},rotCorr:function(t,e,i){var s=t;return e&&i&&(s=Math.max(s*Math.cos(e*d),4)),{x:-t/3*Math.sin(e*d),y:s}},label:function(i,s,n,o,a,r,l,h,d){var p,u,g,m,v,x,y,b,w,k,S,T,C=this,A=C.styledMode,P=C.g("button"!==d&&"label"),O=P.text=C.text("",0,0,l).attr({zIndex:1}),L=0,D=3,_=0,I={},z=/^url\((.*?)\)$/.test(o),R=A||z,B=function(){return A?p.strokeWidth()%2/2:(b?parseInt(b,10):0)%2/2};d&&P.addClass("highcharts-"+d),k=function(){var t=O.element.style,e={};u=(void 0===g||void 0===m||y)&&c(O.textStr)&&O.getBBox(),P.width=(g||u.width||0)+2*D+_,P.height=(m||u.height||0)+2*D,w=D+Math.min(C.fontMetrics(t&&t.fontSize,O).b,u?u.height:1/0),R&&(p||(P.box=p=C.symbols[o]||z?C.symbol(o):C.rect(),p.addClass(("button"===d?"":"highcharts-label-box")+(d?" highcharts-"+d+"-box":"")),p.add(P),t=B(),e.x=t,e.y=(h?-w:0)+t),e.width=Math.round(P.width),e.height=Math.round(P.height),p.attr(f(e,I)),I={})},S=function(){var t,e=_+D;t=h?0:w,c(g)&&u&&("center"===y||"right"===y)&&(e+={center:.5,right:1}[y]*(g-u.width)),e===O.x&&t===O.y||(O.attr("x",e),O.hasBoxWidthChanged&&(u=O.getBBox(!0),k()),void 0!==t&&O.attr("y",t)),O.x=e,O.y=t},T=function(t,e){p?p.attr(t,e):I[t]=e},P.onAdd=function(){O.add(P),P.attr({text:i||0===i?i:"",x:s,y:n}),p&&c(a)&&P.attr({anchorX:a,anchorY:r})},P.widthSetter=function(e){g=t.isNumber(e)?e:null},P.heightSetter=function(t){m=t},P["text-alignSetter"]=function(t){y=t},P.paddingSetter=function(t){c(t)&&t!==D&&(D=P.padding=t,S())},P.paddingLeftSetter=function(t){c(t)&&t!==_&&(_=t,S())},P.alignSetter=function(t){(t={left:0,center:.5,right:1}[t])!==L&&(L=t,u&&P.attr({x:v}))},P.textSetter=function(t){void 0!==t&&O.attr({text:t}),k(),S()},P["stroke-widthSetter"]=function(t,e){t&&(R=!0),b=this["stroke-width"]=t,T(e,t)},A?P.rSetter=function(t,e){T(e,t)}:P.strokeSetter=P.fillSetter=P.rSetter=function(t,e){"r"!==e&&("fill"===e&&t&&(R=!0),P[e]=t),T(e,t)},P.anchorXSetter=function(t,e){a=P.anchorX=t,T(e,Math.round(t)-B()-v)},P.anchorYSetter=function(t,e){r=P.anchorY=t,T(e,t-x)},P.xSetter=function(t){P.x=t,L&&(t-=L*((g||u.width)+2*D),P["forceAnimate:x"]=!0),v=Math.round(t),P.attr("translateX",v)},P.ySetter=function(t){x=P.y=Math.round(t),P.attr("translateY",x)};var N=P.css;return l={css:function(t){if(t){var e={};t=M(t),P.textProps.forEach(function(i){void 0!==t[i]&&(e[i]=t[i],delete t[i])}),O.css(e),"width"in e&&k(),"fontSize"in e&&(k(),S())}return N.call(P,t)},getBBox:function(){return{width:u.width+2*D,height:u.height+2*D,x:u.x-D,y:u.y-D}},destroy:function(){E(P.element,"mouseenter"),E(P.element,"mouseleave"),O&&(O=O.destroy()),p&&(p=p.destroy()),e.prototype.destroy.call(P),P=C=k=S=T=null}},A||(l.shadow=function(t){return t&&(k(),p&&p.shadow(t)),P}),f(P,l)}}),t.Renderer=i}),e(i,"parts/Html.js",[i["parts/Globals.js"]],function(t){var e=t.attr,i=t.createElement,s=t.css,n=t.defined,o=t.extend,a=t.isFirefox,r=t.isMS,l=t.isWebKit,h=t.pick,c=t.pInt,d=t.SVGElement,p=t.SVGRenderer,u=t.win;o(d.prototype,{htmlCss:function(t){var e,i="SPAN"===this.element.tagName&&t&&"width"in t,n=h(i&&t.width,void 0);return i&&(delete t.width,this.textWidth=n,e=!0),t&&"ellipsis"===t.textOverflow&&(t.whiteSpace="nowrap",t.overflow="hidden"),this.styles=o(this.styles,t),s(this.element,t),e&&this.htmlUpdateTransform(),this},htmlGetBBox:function(){var t=this.element;return{x:t.offsetLeft,y:t.offsetTop,width:t.offsetWidth,height:t.offsetHeight}},htmlUpdateTransform:function(){if(this.added){var t=this.renderer,e=this.element,i=this.translateX||0,o=this.translateY||0,a=this.x||0,r=this.y||0,l=this.textAlign||"left",h={left:0,center:.5,right:1}[l],d=this.styles,p=d&&d.whiteSpace;if(s(e,{marginLeft:i,marginTop:o}),!t.styledMode&&this.shadows&&this.shadows.forEach(function(t){s(t,{marginLeft:i+1,marginTop:o+1})}),this.inverted&&[].forEach.call(e.childNodes,function(i){t.invertChild(i,e)}),"SPAN"===e.tagName){var u,d=this.rotation,f=this.textWidth&&c(this.textWidth),g=[d,l,e.innerHTML,this.textWidth,this.textAlign].join();(u=f!==this.oldTextWidth)&&!(u=f>this.oldTextWidth)&&((u=this.textPxLength)||(s(e,{width:"",whiteSpace:p||"nowrap"}),u=e.offsetWidth),u=u>f),u&&(/[ \-]/.test(e.textContent||e.innerText)||"ellipsis"===e.style.textOverflow)?(s(e,{width:f+"px",display:"block",whiteSpace:p||"normal"}),this.oldTextWidth=f,this.hasBoxWidthChanged=!0):this.hasBoxWidthChanged=!1,g!==this.cTT&&(p=t.fontMetrics(e.style.fontSize,e).b,!n(d)||d===(this.oldRotation||0)&&l===this.oldAlign||this.setSpanRotation(d,h,p),this.getSpanCorrection(!n(d)&&this.textPxLength||e.offsetWidth,p,h,d,l)),s(e,{left:a+(this.xCorr||0)+"px",top:r+(this.yCorr||0)+"px"}),this.cTT=g,this.oldRotation=d,this.oldAlign=l}}else this.alignOnAdd=!0},setSpanRotation:function(t,e,i){var n={},o=this.renderer.getTransformKey();n[o]=n.transform="rotate("+t+"deg)",n[o+(a?"Origin":"-origin")]=n.transformOrigin=100*e+"% "+i+"px",s(this.element,n)},getSpanCorrection:function(t,e,i){this.xCorr=-t*i,this.yCorr=-e}}),o(p.prototype,{getTransformKey:function(){return r&&!/Edge/.test(u.navigator.userAgent)?"-ms-transform":l?"-webkit-transform":a?"MozTransform":u.opera?"-o-transform":""},html:function(s,n,a){var r=this.createElement("span"),l=r.element,c=r.renderer,p=c.isSVG,u=function(t,e){["opacity","visibility"].forEach(function(i){t[i+"Setter"]=function(s,n,o){var a=t.div?t.div.style:e;d.prototype[i+"Setter"].call(this,s,n,o),a&&(a[n]=s)}}),t.addedSetters=!0},f=t.charts[c.chartIndex],f=f&&f.styledMode;return r.textSetter=function(t){t!==l.innerHTML&&(delete this.bBox,delete this.oldTextWidth),this.textStr=t,l.innerHTML=h(t,""),r.doTransform=!0},p&&u(r,r.element.style),r.xSetter=r.ySetter=r.alignSetter=r.rotationSetter=function(t,e){"align"===e&&(e="textAlign"),r[e]=t,r.doTransform=!0},r.afterSetters=function(){this.doTransform&&(this.htmlUpdateTransform(),this.doTransform=!1)},r.attr({text:s,x:Math.round(n),y:Math.round(a)}).css({position:"absolute"}),f||r.css({fontFamily:this.style.fontFamily,fontSize:this.style.fontSize}),l.style.whiteSpace="nowrap",r.css=r.htmlCss,p&&(r.add=function(t){var s,n=c.box.parentNode,a=[];if(this.parentGroup=t){if(!(s=t.div)){for(;t;)a.push(t),t=t.parentGroup;a.reverse().forEach(function(t){function l(e,i){t[i]=e,"translateX"===i?h.left=e+"px":h.top=e+"px",t.doTransform=!0}var h,c=e(t.element,"class");c&&(c={className:c}),s=t.div=t.div||i("div",c,{position:"absolute",left:(t.translateX||0)+"px",top:(t.translateY||0)+"px",display:t.display,opacity:t.opacity,pointerEvents:t.styles&&t.styles.pointerEvents},s||n),h=s.style,o(t,{classSetter:function(t){return function(e){this.element.setAttribute("class",e),t.className=e}}(s),on:function(){return a[0].div&&r.on.apply({element:a[0].div},arguments),t},translateXSetter:l,translateYSetter:l}),t.addedSetters||u(t)})}}else s=n;return s.appendChild(l),r.added=!0,r.alignOnAdd&&r.htmlUpdateTransform(),r}),r}})}),e(i,"parts/Time.js",[i["parts/Globals.js"]],function(t){var e=t.defined,i=t.extend,s=t.merge,n=t.pick,o=t.timeUnits,a=t.win;t.Time=function(t){this.update(t,!1)},t.Time.prototype={defaultOptions:{},update:function(t){var e=n(t&&t.useUTC,!0),i=this;this.options=t=s(!0,this.options||{},t),this.Date=t.Date||a.Date||Date,this.timezoneOffset=(this.useUTC=e)&&t.timezoneOffset,this.getTimezoneOffset=this.timezoneOffsetFunction(),(this.variableTimezone=!(e&&!t.getTimezoneOffset&&!t.timezone))||this.timezoneOffset?(this.get=function(t,e){var s=e.getTime(),n=s-i.getTimezoneOffset(e);return e.setTime(n),t=e["getUTC"+t](),e.setTime(s),t},this.set=function(t,e,s){var n;"Milliseconds"===t||"Seconds"===t||"Minutes"===t&&0==e.getTimezoneOffset()%60?e["set"+t](s):(n=i.getTimezoneOffset(e),n=e.getTime()-n,e.setTime(n),e["setUTC"+t](s),t=i.getTimezoneOffset(e),n=e.getTime()+t,e.setTime(n))}):e?(this.get=function(t,e){return e["getUTC"+t]()},this.set=function(t,e,i){return e["setUTC"+t](i)}):(this.get=function(t,e){return e["get"+t]()},this.set=function(t,e,i){return e["set"+t](i)})},makeTime:function(e,i,s,o,a,r){var l,h,c;return this.useUTC?(l=this.Date.UTC.apply(0,arguments),h=this.getTimezoneOffset(l),l+=h,c=this.getTimezoneOffset(l),h!==c?l+=c-h:h-36e5!==this.getTimezoneOffset(l-36e5)||t.isSafari||(l-=36e5)):l=new this.Date(e,i,n(s,1),n(o,0),n(a,0),n(r,0)).getTime(),l},timezoneOffsetFunction:function(){var e=this,i=this.options,s=a.moment;if(!this.useUTC)return function(t){return 6e4*new Date(t).getTimezoneOffset()};if(i.timezone){if(s)return function(t){return 6e4*-s.tz(t,i.timezone).utcOffset()};t.error(25)}return this.useUTC&&i.getTimezoneOffset?function(t){return 6e4*i.getTimezoneOffset(t)}:function(){return 6e4*(e.timezoneOffset||0)}},dateFormat:function(e,i,s){if(!t.defined(i)||isNaN(i))return t.defaultOptions.lang.invalidDate||"";e=t.pick(e,"%Y-%m-%d %H:%M:%S");var n=this,o=new this.Date(i),a=this.get("Hours",o),r=this.get("Day",o),l=this.get("Date",o),h=this.get("Month",o),c=this.get("FullYear",o),d=t.defaultOptions.lang,p=d.weekdays,u=d.shortWeekdays,f=t.pad,o=t.extend({a:u?u[r]:p[r].substr(0,3),A:p[r],d:f(l),e:f(l,2," "),w:r,b:d.shortMonths[h],B:d.months[h],m:f(h+1),o:h+1,y:c.toString().substr(2,2),Y:c,H:f(a),k:a,I:f(a%12||12),l:a%12||12,M:f(n.get("Minutes",o)),p:12>a?"AM":"PM",P:12>a?"am":"pm",S:f(o.getSeconds()),L:f(Math.floor(i%1e3),3)},t.dateFormats);return t.objectEach(o,function(t,s){for(;-1!==e.indexOf("%"+s);)e=e.replace("%"+s,"function"==typeof t?t.call(n,i):t)}),s?e.substr(0,1).toUpperCase()+e.substr(1):e},resolveDTLFormat:function(e){return t.isObject(e,!0)?e:(e=t.splat(e),{main:e[0],from:e[1],to:e[2]})},getTimeTicks:function(t,s,a,r){var l,h,c=this,d=[],p={};l=new c.Date(s);var u,f=t.unitRange,g=t.count||1;if(r=n(r,1),e(s)){c.set("Milliseconds",l,f>=o.second?0:g*Math.floor(c.get("Milliseconds",l)/g)),f>=o.second&&c.set("Seconds",l,f>=o.minute?0:g*Math.floor(c.get("Seconds",l)/g)),f>=o.minute&&c.set("Minutes",l,f>=o.hour?0:g*Math.floor(c.get("Minutes",l)/g)),f>=o.hour&&c.set("Hours",l,f>=o.day?0:g*Math.floor(c.get("Hours",l)/g)),f>=o.day&&c.set("Date",l,f>=o.month?1:Math.max(1,g*Math.floor(c.get("Date",l)/g))),f>=o.month&&(c.set("Month",l,f>=o.year?0:g*Math.floor(c.get("Month",l)/g)),h=c.get("FullYear",l)),f>=o.year&&c.set("FullYear",l,h-h%g),f===o.week&&(h=c.get("Day",l),c.set("Date",l,c.get("Date",l)-h+r+(h<r?-7:0))),h=c.get("FullYear",l),r=c.get("Month",l);var m=c.get("Date",l),v=c.get("Hours",l);for(s=l.getTime(),c.variableTimezone&&(u=a-s>4*o.month||c.getTimezoneOffset(s)!==c.getTimezoneOffset(a)),s=l.getTime(),l=1;s<a;)d.push(s),s=f===o.year?c.makeTime(h+l*g,0):f===o.month?c.makeTime(h,r+l*g):!u||f!==o.day&&f!==o.week?u&&f===o.hour&&1<g?c.makeTime(h,r,m,v+l*g):s+f*g:c.makeTime(h,r,m+l*g*(f===o.day?1:7)),l++;d.push(s),f<=o.hour&&1e4>d.length&&d.forEach(function(t){0==t%18e5&&"000000000"===c.dateFormat("%H%M%S%L",t)&&(p[t]="day")})}return d.info=i(t,{higherRanks:p,totalRange:f*g}),d}}}),e(i,"parts/Options.js",[i["parts/Globals.js"]],function(t){var e=t.color,i=t.merge;t.defaultOptions={colors:"#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" "),symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),decimalPoint:".",numericSymbols:"kMGTPE".split(""),resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{},time:t.Time.prototype.defaultOptions,chart:{styledMode:!1,borderRadius:0,colorCount:10,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{zIndex:6},position:{align:"right",x:-10,y:10}},width:null,height:null,borderColor:"#335cad",backgroundColor:"#ffffff",plotBorderColor:"#cccccc"},title:{text:"Chart title",align:"center",margin:15,widthAdjust:-44},subtitle:{text:"",align:"center",widthAdjust:-44},plotOptions:{},labels:{style:{position:"absolute",color:"#333333"}},legend:{enabled:!0,align:"center",alignColumns:!0,layout:"horizontal",labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{activeColor:"#003399",inactiveColor:"#cccccc"},itemStyle:{color:"#333333",cursor:"pointer",fontSize:"12px",fontWeight:"bold",textOverflow:"ellipsis"},itemHoverStyle:{color:"#000000"},itemHiddenStyle:{color:"#cccccc"},shadow:!1,itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"#ffffff",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:t.svg,borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %b %e, %H:%M:%S.%L",second:"%A, %b %e, %H:%M:%S",minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",year:"%Y"},footerFormat:"",padding:8,snap:t.isTouchDevice?25:10,headerFormat:'<span style="font-size: 10px">{point.key}</span><br/>',pointFormat:'<span style="color:{point.color}">●</span> {series.name}: <b>{point.y}</b><br/>',backgroundColor:e("#f7f7f7").setOpacity(.85).get(),borderWidth:1,shadow:!0,style:{color:"#333333",cursor:"default",fontSize:"12px",pointerEvents:"none",whiteSpace:"nowrap"}},credits:{enabled:!0,href:"https://www.highcharts.com?credits",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#999999",fontSize:"9px"},text:"Highcharts.com"}},t.setOptions=function(e){return t.defaultOptions=i(!0,t.defaultOptions,e),t.time.update(i(t.defaultOptions.global,t.defaultOptions.time),!1),t.defaultOptions},t.getOptions=function(){return t.defaultOptions},t.defaultPlotOptions=t.defaultOptions.plotOptions,t.time=new t.Time(i(t.defaultOptions.global,t.defaultOptions.time)),t.dateFormat=function(e,i,s){return t.time.dateFormat(e,i,s)}}),e(i,"parts/Tick.js",[i["parts/Globals.js"]],function(t){var e=t.correctFloat,i=t.defined,s=t.destroyObjectProperties,n=t.fireEvent,o=t.isNumber,a=t.merge,r=t.pick,l=t.deg2rad;t.Tick=function(t,e,i,s,n){this.axis=t,this.pos=e,this.type=i||"",this.isNewLabel=this.isNew=!0,this.parameters=n||{},this.tickmarkOffset=this.parameters.tickmarkOffset,this.options=this.parameters.options,i||s||this.addLabel()},t.Tick.prototype={addLabel:function(){var s,n,o,l,h=this,c=h.axis,d=c.options,p=c.chart,u=c.categories,f=c.names,g=h.pos,m=r(h.options&&h.options.labels,d.labels),v=c.tickPositions,x=g===v[0],y=g===v[v.length-1],u=this.parameters.category||(u?r(u[g],f[g],g):g),b=h.label,v=v.info;c.isDatetimeAxis&&v&&(n=p.time.resolveDTLFormat(d.dateTimeLabelFormats[!d.grid&&v.higherRanks[g]||v.unitName]),s=n.main),h.isFirst=x,h.isLast=y,h.formatCtx={axis:c,chart:p,isFirst:x,isLast:y,dateTimeLabelFormat:s,tickPositionInfo:v,value:c.isLog?e(c.lin2log(u)):u,pos:g},d=c.labelFormatter.call(h.formatCtx,this.formatCtx),(l=n&&n.list)&&(h.shortenLabel=function(){for(o=0;o<l.length;o++)if(b.attr({text:c.labelFormatter.call(t.extend(h.formatCtx,{dateTimeLabelFormat:l[o]}))}),b.getBBox().width<c.getSlotWidth(h)-2*r(m.padding,5))return;b.attr({text:""})}),i(b)?b&&b.textStr!==d&&(!b.textWidth||m.style&&m.style.width||b.styles.width||b.css({width:null}),b.attr({text:d})):((h.label=b=i(d)&&m.enabled?p.renderer.text(d,0,0,m.useHTML).add(c.labelGroup):null)&&(p.styledMode||b.css(a(m.style)),b.textPxLength=b.getBBox().width),h.rotation=0)},getLabelSize:function(){return this.label?this.label.getBBox()[this.axis.horiz?"height":"width"]:0},handleOverflow:function(t){var e,i=this.axis,s=i.options.labels,n=t.x,o=i.chart.chartWidth,a=i.chart.spacing,h=r(i.labelLeft,Math.min(i.pos,a[3])),a=r(i.labelRight,Math.max(i.isRadial?0:i.pos+i.len,o-a[1])),c=this.label,d=this.rotation,p={left:0,center:.5,right:1}[i.labelAlign||c.attr("align")],u=c.getBBox().width,f=i.getSlotWidth(this),g=f,m=1,v={};d||"justify"!==r(s.overflow,"justify")?0>d&&n-p*u<h?e=Math.round(n/Math.cos(d*l)-h):0<d&&n+p*u>a&&(e=Math.round((o-n)/Math.cos(d*l))):(o=n+(1-p)*u,n-p*u<h?g=t.x+g*(1-p)-h:o>a&&(g=a-t.x+g*p,m=-1),g=Math.min(f,g),g<f&&"center"===i.labelAlign&&(t.x+=m*(f-g-p*(f-Math.min(u,g)))),(u>g||i.autoRotation&&(c.styles||{}).width)&&(e=g)),e&&(this.shortenLabel?this.shortenLabel():(v.width=Math.floor(e),(s.style||{}).textOverflow||(v.textOverflow="ellipsis"),c.css(v)))},getPosition:function(e,i,s,o){var a=this.axis,r=a.chart,l=o&&r.oldChartHeight||r.chartHeight;return e={x:e?t.correctFloat(a.translate(i+s,null,null,o)+a.transB):a.left+a.offset+(a.opposite?(o&&r.oldChartWidth||r.chartWidth)-a.right-a.left:0),y:e?l-a.bottom+a.offset-(a.opposite?a.height:0):t.correctFloat(l-a.translate(i+s,null,null,o)-a.transB)},n(this,"afterGetPosition",{pos:e}),e},getLabelPosition:function(t,e,s,o,a,r,h,c){var d=this.axis,p=d.transA,u=d.reversed,f=d.staggerLines,g=d.tickRotCorr||{x:0,y:0},m=a.y,v=o||d.reserveSpaceDefault?0:-d.labelOffset*("center"===d.labelAlign?.5:1),x={};return i(m)||(m=0===d.side?s.rotation?-8:-s.getBBox().height:2===d.side?g.y+8:Math.cos(s.rotation*l)*(g.y-s.getBBox(!1,0).height/2)),t=t+a.x+v+g.x-(r&&o?r*p*(u?-1:1):0),e=e+m-(r&&!o?r*p*(u?1:-1):0),f&&(s=h/(c||1)%f,d.opposite&&(s=f-s-1),e+=d.labelOffset/f*s),x.x=t,x.y=Math.round(e),n(this,"afterGetLabelPosition",{pos:x,tickmarkOffset:r,index:h}),x},getMarkPath:function(t,e,i,s,n,o){return o.crispLine(["M",t,e,"L",t+(n?0:-i),e+(n?i:0)],s)},renderGridLine:function(t,e,i){var s=this.axis,n=s.options,o=this.gridLine,a={},l=this.pos,h=this.type,c=r(this.tickmarkOffset,s.tickmarkOffset),d=s.chart.renderer,p=h?h+"Grid":"grid",u=n[p+"LineWidth"],f=n[p+"LineColor"],n=n[p+"LineDashStyle"];o||(s.chart.styledMode||(a.stroke=f,a["stroke-width"]=u,n&&(a.dashstyle=n)),h||(a.zIndex=1),t&&(e=0),this.gridLine=o=d.path().attr(a).addClass("highcharts-"+(h?h+"-":"")+"grid-line").add(s.gridGroup)),o&&(i=s.getPlotLinePath(l+c,o.strokeWidth()*i,t,"pass"))&&o[t||this.isNew?"attr":"animate"]({d:i,opacity:e})},renderMark:function(t,e,i){var s=this.axis,n=s.options,o=s.chart.renderer,a=this.type,l=a?a+"Tick":"tick",h=s.tickSize(l),c=this.mark,d=!c,p=t.x;t=t.y;var u=r(n[l+"Width"],!a&&s.isXAxis?1:0),n=n[l+"Color"];h&&(s.opposite&&(h[0]=-h[0]),d&&(this.mark=c=o.path().addClass("highcharts-"+(a?a+"-":"")+"tick").add(s.axisGroup),s.chart.styledMode||c.attr({stroke:n,"stroke-width":u})),c[d?"attr":"animate"]({d:this.getMarkPath(p,t,h[0],c.strokeWidth()*i,s.horiz,o),opacity:e}))},renderLabel:function(t,e,i,s){var n=this.axis,a=n.horiz,l=n.options,h=this.label,c=l.labels,d=c.step,n=r(this.tickmarkOffset,n.tickmarkOffset),p=!0,u=t.x;t=t.y,h&&o(u)&&(h.xy=t=this.getLabelPosition(u,t,h,a,c,n,s,d),this.isFirst&&!this.isLast&&!r(l.showFirstLabel,1)||this.isLast&&!this.isFirst&&!r(l.showLastLabel,1)?p=!1:!a||c.step||c.rotation||e||0===i||this.handleOverflow(t),d&&s%d&&(p=!1),p&&o(t.y)?(t.opacity=i,h[this.isNewLabel?"attr":"animate"](t),this.isNewLabel=!1):(h.attr("y",-9999),this.isNewLabel=!0))},render:function(e,i,s){var n=this.axis,o=n.horiz,a=this.pos,l=r(this.tickmarkOffset,n.tickmarkOffset),a=this.getPosition(o,a,l,i),l=a.x,h=a.y,n=o&&l===n.pos+n.len||!o&&h===n.pos?-1:1;s=r(s,1),this.isActive=!0,this.renderGridLine(i,s,n),this.renderMark(a,s,n),this.renderLabel(a,i,s,e),this.isNew=!1,t.fireEvent(this,"afterRender")},destroy:function(){s(this,this.axis)}}}),e(i,"parts/Axis.js",[i["parts/Globals.js"]],function(t){var e=t.addEvent,i=t.animObject,s=t.arrayMax,n=t.arrayMin,o=t.color,a=t.correctFloat,r=t.defaultOptions,l=t.defined,h=t.deg2rad,c=t.destroyObjectProperties,d=t.extend,p=t.fireEvent,u=t.format,f=t.getMagnitude,g=t.isArray,m=t.isNumber,v=t.isString,x=t.merge,y=t.normalizeTickInterval,b=t.objectEach,w=t.pick,k=t.removeEvent,M=t.seriesTypes,S=t.splat,T=t.syncTimeout,C=t.Tick,A=function(){this.init.apply(this,arguments)};return t.extend(A.prototype,{defaultOptions:{dateTimeLabelFormats:{millisecond:{main:"%H:%M:%S.%L",range:!1},second:{main:"%H:%M:%S",range:!1},minute:{main:"%H:%M",range:!1},hour:{main:"%H:%M",range:!1},day:{main:"%e. %b"},week:{main:"%e. %b"},month:{main:"%b '%y"},year:{main:"%Y"}},endOnTick:!1,labels:{enabled:!0,indentation:10,x:0,style:{color:"#666666",cursor:"default",fontSize:"11px"}},maxPadding:.01,minorTickLength:2,minorTickPosition:"outside",minPadding:.01,showEmpty:!0,startOfWeek:1,startOnTick:!1,tickLength:10,tickPixelInterval:100,tickmarkPlacement:"between",tickPosition:"outside",title:{align:"middle",style:{color:"#666666"}},type:"linear",minorGridLineColor:"#f2f2f2",minorGridLineWidth:1,minorTickColor:"#999999",lineColor:"#ccd6eb",lineWidth:1,gridLineColor:"#e6e6e6",tickColor:"#ccd6eb"},defaultYAxisOptions:{endOnTick:!0,maxPadding:.05,minPadding:.05,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8},startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{allowOverlap:!1,enabled:!1,formatter:function(){return t.numberFormat(this.total,-1)},style:{color:"#000000",fontSize:"11px",fontWeight:"bold",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0},defaultLeftAxisOptions:{labels:{x:-15},title:{rotation:270}},defaultRightAxisOptions:{labels:{x:15},title:{rotation:90}},defaultBottomAxisOptions:{labels:{autoRotation:[-45],x:0},margin:15,title:{rotation:0}},defaultTopAxisOptions:{labels:{autoRotation:[-45],x:0},margin:15,title:{rotation:0}},init:function(t,i){var s=i.isX,n=this;n.chart=t,n.horiz=t.inverted&&!n.isZAxis?!s:s,n.isXAxis=s,n.coll=n.coll||(s?"xAxis":"yAxis"),p(this,"init",{userOptions:i}),n.opposite=i.opposite,n.side=i.side||(n.horiz?n.opposite?0:2:n.opposite?1:3),n.setOptions(i);var o=this.options,a=o.type;n.labelFormatter=o.labels.formatter||n.defaultLabelFormatter,n.userOptions=i,n.minPixelPadding=0,n.reversed=o.reversed,n.visible=!1!==o.visible,n.zoomEnabled=!1!==o.zoomEnabled,n.hasNames="category"===a||!0===o.categories,n.categories=o.categories||n.hasNames,n.names||(n.names=[],n.names.keys={}),n.plotLinesAndBandsGroups={},n.isLog="logarithmic"===a,n.isDatetimeAxis="datetime"===a,n.positiveValuesOnly=n.isLog&&!n.allowNegativeLog,n.isLinked=l(o.linkedTo),n.ticks={},n.labelEdge=[],n.minorTicks={},n.plotLinesAndBands=[],n.alternateBands={},n.len=0,n.minRange=n.userMinRange=o.minRange||o.maxZoom,n.range=o.range,n.offset=o.offset||0,n.stacks={},n.oldStacks={},n.stacksTouched=0,n.max=null,n.min=null,n.crosshair=w(o.crosshair,S(t.options.tooltip.crosshairs)[s?0:1],!1),i=n.options.events,-1===t.axes.indexOf(n)&&(s?t.axes.splice(t.xAxis.length,0,n):t.axes.push(n),t[n.coll].push(n)),n.series=n.series||[],t.inverted&&!n.isZAxis&&s&&void 0===n.reversed&&(n.reversed=!0),b(i,function(t,i){e(n,i,t)}),n.lin2log=o.linearToLogConverter||n.lin2log,n.isLog&&(n.val2lin=n.log2lin,n.lin2val=n.lin2log),p(this,"afterInit")},setOptions:function(t){this.options=x(this.defaultOptions,"yAxis"===this.coll&&this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],x(r[this.coll],t)),p(this,"afterSetOptions",{userOptions:t})},defaultLabelFormatter:function(){var e,i=this.axis,s=this.value,n=i.chart.time,o=i.categories,a=this.dateTimeLabelFormat,l=r.lang,h=l.numericSymbols,l=l.numericSymbolMagnitude||1e3,c=h&&h.length,d=i.options.labels.format,i=i.isLog?Math.abs(s):i.tickInterval;if(d)e=u(d,this,n);else if(o)e=s;else if(a)e=n.dateFormat(a,s);else if(c&&1e3<=i)for(;c--&&void 0===e;)n=Math.pow(l,c+1),i>=n&&0==10*s%n&&null!==h[c]&&0!==s&&(e=t.numberFormat(s/n,-1)+h[c]);return void 0===e&&(e=1e4<=Math.abs(s)?t.numberFormat(s,-1):t.numberFormat(s,-1,void 0,"")),e},getSeriesExtremes:function(){var t,e=this,i=e.chart;p(this,"getSeriesExtremes",null,function(){e.hasVisibleSeries=!1,e.dataMin=e.dataMax=e.threshold=null,e.softThreshold=!e.isXAxis,e.buildStacks&&e.buildStacks(),e.series.forEach(function(s){if(s.visible||!i.options.chart.ignoreHiddenSeries){var n,o,a=s.options,r=a.threshold;e.hasVisibleSeries=!0,e.positiveValuesOnly&&0>=r&&(r=null),e.isXAxis?(a=s.xData,a.length&&(t=s.getXExtremes(a),n=t.min,o=t.max,m(n)||n instanceof Date||(a=a.filter(m),t=s.getXExtremes(a),n=t.min,o=t.max),a.length&&(e.dataMin=Math.min(w(e.dataMin,n),n),e.dataMax=Math.max(w(e.dataMax,o),o)))):(s.getExtremes(),o=s.dataMax,n=s.dataMin,l(n)&&l(o)&&(e.dataMin=Math.min(w(e.dataMin,n),n),e.dataMax=Math.max(w(e.dataMax,o),o)),l(r)&&(e.threshold=r),(!a.softThreshold||e.positiveValuesOnly)&&(e.softThreshold=!1))}})}),p(this,"afterGetSeriesExtremes")},translate:function(t,e,i,s,n,o){var a=this.linkedParent||this,r=1,l=0,h=s?a.oldTransA:a.transA;s=s?a.oldMin:a.min;var c=a.minPixelPadding;return n=(a.isOrdinal||a.isBroken||a.isLog&&n)&&a.lin2val,h||(h=a.transA),i&&(r*=-1,l=a.len),a.reversed&&(r*=-1,l-=r*(a.sector||a.len)),e?(t=(t*r+l-c)/h+s,n&&(t=a.lin2val(t))):(n&&(t=a.val2lin(t)),t=m(s)?r*(t-s)*h+l+r*c+(m(o)?h*o:0):void 0),t},toPixels:function(t,e){return this.translate(t,!1,!this.horiz,null,!0)+(e?0:this.pos)},toValue:function(t,e){return this.translate(t-(e?0:this.pos),!0,!this.horiz,null,!0)},getPlotLinePath:function(t,e,i,s,n){var o,a,r,l,h,c,d=this,u=d.chart,f=d.left,g=d.top,v=i&&u.oldChartHeight||u.chartHeight,x=i&&u.oldChartWidth||u.chartWidth,y=d.transB,b=function(t,e,i){return("pass"!==s&&t<e||t>i)&&(s?t=Math.min(Math.max(e,t),i):h=!0),t};return c={value:t,lineWidth:e,old:i,force:s,translatedValue:n},p(this,"getPlotLinePath",c,function(c){n=w(n,d.translate(t,null,null,i)),n=Math.min(Math.max(-1e5,n),1e5),o=r=Math.round(n+y),a=l=Math.round(v-n-y),m(n)?d.horiz?(a=g,l=v-d.bottom,o=r=b(o,f,f+d.width)):(o=f,r=x-d.right,a=l=b(a,g,g+d.height)):(h=!0,s=!1),c.path=h&&!s?null:u.renderer.crispLine(["M",o,a,"L",r,l],e||1)}),c.path},getLinearTickPositions:function(t,e,i){var s,n=a(Math.floor(e/t)*t);i=a(Math.ceil(i/t)*t);var o,r=[];if(a(n+t)===n&&(o=20),this.single)return[e];for(e=n;e<=i&&(r.push(e),(e=a(e+t,o))!==s);)s=e;return r},getMinorTickInterval:function(){var t=this.options;return!0===t.minorTicks?w(t.minorTickInterval,"auto"):!1===t.minorTicks?null:t.minorTickInterval},getMinorTickPositions:function(){var t=this,e=t.options,i=t.tickPositions,s=t.minorTickInterval,n=[],o=t.pointRangePadding||0,a=t.min-o,o=t.max+o,r=o-a;if(r&&r/s<t.len/3)if(t.isLog)this.paddedTicks.forEach(function(e,i,o){i&&n.push.apply(n,t.getLogTickPositions(s,o[i-1],o[i],!0))});else if(t.isDatetimeAxis&&"auto"===this.getMinorTickInterval())n=n.concat(t.getTimeTicks(t.normalizeTimeTickInterval(s),a,o,e.startOfWeek));else for(e=a+(i[0]-a)%s;e<=o&&e!==n[0];e+=s)n.push(e);return 0!==n.length&&t.trimTicks(n),n},adjustForMinRange:function(){var t,e,i,o,a,r,h,c,d=this.options,p=this.min,u=this.max;this.isXAxis&&void 0===this.minRange&&!this.isLog&&(l(d.min)||l(d.max)?this.minRange=null:(this.series.forEach(function(t){for(r=t.xData,o=h=t.xIncrement?1:r.length-1;0<o;o--)a=r[o]-r[o-1],(void 0===i||a<i)&&(i=a)}),this.minRange=Math.min(5*i,this.dataMax-this.dataMin))),u-p<this.minRange&&(e=this.dataMax-this.dataMin>=this.minRange,c=this.minRange,t=(c-u+p)/2,t=[p-t,w(d.min,p-t)],e&&(t[2]=this.isLog?this.log2lin(this.dataMin):this.dataMin),p=s(t),u=[p+c,w(d.max,p+c)],e&&(u[2]=this.isLog?this.log2lin(this.dataMax):this.dataMax),(u=n(u))-p<c&&(t[0]=u-c,t[1]=w(d.min,u-c),p=s(t))),this.min=p,this.max=u},getClosest:function(){var t;return this.categories?t=1:this.series.forEach(function(e){var i=e.closestPointRange,s=e.visible||!e.chart.options.chart.ignoreHiddenSeries;!e.noSharedTooltip&&l(i)&&s&&(t=l(t)?Math.min(t,i):i)}),t},nameToX:function(t){var e,i=g(this.categories),s=i?this.categories:this.names,n=t.options.x;return t.series.requireSorting=!1,l(n)||(n=!1===this.options.uniqueNames?t.series.autoIncrement():i?s.indexOf(t.name):w(s.keys[t.name],-1)),-1===n?i||(e=s.length):e=n,void 0!==e&&(this.names[e]=t.name,this.names.keys[t.name]=e),e},updateNames:function(){var t=this,e=this.names;0<e.length&&(Object.keys(e.keys).forEach(function(t){delete e.keys[t]}),e.length=0,this.minRange=this.userMinRange,(this.series||[]).forEach(function(e){e.xIncrement=null,e.points&&!e.isDirtyData||(t.max=Math.max(t.max,e.xData.length-1),e.processData(),e.generatePoints()),e.data.forEach(function(i,s){var n;i&&i.options&&void 0!==i.name&&void 0!==(n=t.nameToX(i))&&n!==i.x&&(i.x=n,e.xData[s]=n)})}))},setAxisTranslation:function(t){var e,i=this,s=i.max-i.min,n=i.axisPointRange||0,o=0,a=0,r=i.linkedParent,l=!!i.categories,h=i.transA,c=i.isXAxis;(c||l||n)&&(e=i.getClosest(),r?(o=r.minPointOffset,a=r.pointRangePadding):i.series.forEach(function(t){var s=l?1:c?w(t.options.pointRange,e,0):i.axisPointRange||0,r=t.options.pointPlacement;n=Math.max(n,s),i.single&&!l||(t=M.xrange&&t instanceof M.xrange?!c:c,o=Math.max(o,t&&v(r)?0:s/2),a=Math.max(a,t&&"on"===r?0:s))}),r=i.ordinalSlope&&e?i.ordinalSlope/e:1,i.minPointOffset=o*=r,i.pointRangePadding=a*=r,i.pointRange=Math.min(n,s),c&&(i.closestPointRange=e)),t&&(i.oldTransA=h),i.translationSlope=i.transA=h=i.staticScale||i.len/(s+a||1),i.transB=i.horiz?i.left:i.bottom,i.minPixelPadding=h*o,p(this,"afterSetAxisTranslation")},minFromRange:function(){return this.max-this.range},setTickInterval:function(e){var i,s,n,o,r=this,h=r.chart,c=r.options,d=r.isLog,u=r.isDatetimeAxis,g=r.isXAxis,v=r.isLinked,x=c.maxPadding,b=c.minPadding,k=c.tickInterval,M=c.tickPixelInterval,S=r.categories,T=m(r.threshold)?r.threshold:null,C=r.softThreshold;u||S||v||this.getTickAmount(),n=w(r.userMin,c.min),o=w(r.userMax,c.max),v?(r.linkedParent=h[r.coll][c.linkedTo],i=r.linkedParent.getExtremes(),r.min=w(i.min,i.dataMin),r.max=w(i.max,i.dataMax),c.type!==r.linkedParent.options.type&&t.error(11,1,h)):(!C&&l(T)&&(r.dataMin>=T?(i=T,b=0):r.dataMax<=T&&(s=T,x=0)),r.min=w(n,i,r.dataMin),r.max=w(o,s,r.dataMax)),d&&(r.positiveValuesOnly&&!e&&0>=Math.min(r.min,w(r.dataMin,r.min))&&t.error(10,1,h),r.min=a(r.log2lin(r.min),15),r.max=a(r.log2lin(r.max),15)),r.range&&l(r.max)&&(r.userMin=r.min=n=Math.max(r.dataMin,r.minFromRange()),r.userMax=o=r.max,r.range=null),p(r,"foundExtremes"),r.beforePadding&&r.beforePadding(),r.adjustForMinRange(),!(S||r.axisPointRange||r.usePercentage||v)&&l(r.min)&&l(r.max)&&(h=r.max-r.min)&&(!l(n)&&b&&(r.min-=h*b),!l(o)&&x&&(r.max+=h*x)),m(c.softMin)&&!m(r.userMin)&&c.softMin<r.min&&(r.min=n=c.softMin),m(c.softMax)&&!m(r.userMax)&&c.softMax>r.max&&(r.max=o=c.softMax),m(c.floor)&&(r.min=Math.min(Math.max(r.min,c.floor),Number.MAX_VALUE)),m(c.ceiling)&&(r.max=Math.max(Math.min(r.max,c.ceiling),w(r.userMax,-Number.MAX_VALUE))),C&&l(r.dataMin)&&(T=T||0,!l(n)&&r.min<T&&r.dataMin>=T?r.min=r.options.minRange?Math.min(T,r.max-r.minRange):T:!l(o)&&r.max>T&&r.dataMax<=T&&(r.max=r.options.minRange?Math.max(T,r.min+r.minRange):T)),r.tickInterval=r.min===r.max||void 0===r.min||void 0===r.max?1:v&&!k&&M===r.linkedParent.options.tickPixelInterval?k=r.linkedParent.tickInterval:w(k,this.tickAmount?(r.max-r.min)/Math.max(this.tickAmount-1,1):void 0,S?1:(r.max-r.min)*M/Math.max(r.len,M)),g&&!e&&r.series.forEach(function(t){t.processData(r.min!==r.oldMin||r.max!==r.oldMax)}),r.setAxisTranslation(!0),r.beforeSetTickPositions&&r.beforeSetTickPositions(),r.postProcessTickInterval&&(r.tickInterval=r.postProcessTickInterval(r.tickInterval)),r.pointRange&&!k&&(r.tickInterval=Math.max(r.pointRange,r.tickInterval)),e=w(c.minTickInterval,r.isDatetimeAxis&&r.closestPointRange),!k&&r.tickInterval<e&&(r.tickInterval=e),u||d||k||(r.tickInterval=y(r.tickInterval,null,f(r.tickInterval),w(c.allowDecimals,!(.5<r.tickInterval&&5>r.tickInterval&&1e3<r.max&&9999>r.max)),!!this.tickAmount)),this.tickAmount||(r.tickInterval=r.unsquish()),this.setTickPositions()},setTickPositions:function(){var e,i=this.options,s=i.tickPositions;e=this.getMinorTickInterval();var n=i.tickPositioner,o=i.startOnTick,a=i.endOnTick;this.tickmarkOffset=this.categories&&"between"===i.tickmarkPlacement&&1===this.tickInterval?.5:0,this.minorTickInterval="auto"===e&&this.tickInterval?this.tickInterval/5:e,this.single=this.min===this.max&&l(this.min)&&!this.tickAmount&&(parseInt(this.min,10)===this.min||!1!==i.allowDecimals),this.tickPositions=e=s&&s.slice(),!e&&(!this.ordinalPositions&&(this.max-this.min)/this.tickInterval>Math.max(2*this.len,200)?(e=[this.min,this.max],t.error(19,!1,this.chart)):e=this.isDatetimeAxis?this.getTimeTicks(this.normalizeTimeTickInterval(this.tickInterval,i.units),this.min,this.max,i.startOfWeek,this.ordinalPositions,this.closestPointRange,!0):this.isLog?this.getLogTickPositions(this.tickInterval,this.min,this.max):this.getLinearTickPositions(this.tickInterval,this.min,this.max),e.length>this.len&&(e=[e[0],e.pop()],e[0]===e[1]&&(e.length=1)),this.tickPositions=e,n&&(n=n.apply(this,[this.min,this.max])))&&(this.tickPositions=e=n),this.paddedTicks=e.slice(0),this.trimTicks(e,o,a),this.isLinked||(this.single&&2>e.length&&!this.categories&&(this.min-=.5,this.max+=.5),s||n||this.adjustTickAmount()),p(this,"afterSetTickPositions")},trimTicks:function(t,e,i){var s=t[0],n=t[t.length-1],o=this.minPointOffset||0;if(p(this,"trimTicks"),!this.isLinked){if(e&&-1/0!==s)this.min=s;else for(;this.min-o>t[0];)t.shift();if(i)this.max=n;else for(;this.max+o<t[t.length-1];)t.pop();0===t.length&&l(s)&&!this.options.tickPositions&&t.push((n+s)/2)}},alignToOthers:function(){var t,e={},i=this.options;return!1===this.chart.options.chart.alignTicks||!1===i.alignTicks||!1===i.startOnTick||!1===i.endOnTick||this.isLog||this.chart[this.coll].forEach(function(i){var s=i.options,s=[i.horiz?s.left:s.top,s.width,s.height,s.pane].join();i.series.length&&(e[s]?t=!0:e[s]=1)}),t},getTickAmount:function(){var t=this.options,e=t.tickAmount,i=t.tickPixelInterval;!l(t.tickInterval)&&this.len<i&&!this.isRadial&&!this.isLog&&t.startOnTick&&t.endOnTick&&(e=2),!e&&this.alignToOthers()&&(e=Math.ceil(this.len/i)+1),4>e&&(this.finalTickAmt=e,e=5),this.tickAmount=e},adjustTickAmount:function(){var t,e=this.options,i=this.tickInterval,s=this.tickPositions,n=this.tickAmount,o=this.finalTickAmt,r=s&&s.length,h=w(this.threshold,this.softThreshold?0:null);if(this.hasData()){if(r<n){for(t=this.min;s.length<n;)s.length%2||t===h?s.push(a(s[s.length-1]+i)):s.unshift(a(s[0]-i));this.transA*=(r-1)/(n-1),this.min=e.startOnTick?s[0]:Math.min(this.min,s[0]),this.max=e.endOnTick?s[s.length-1]:Math.max(this.max,s[s.length-1])}else r>n&&(this.tickInterval*=2,this.setTickPositions());if(l(o)){for(i=e=s.length;i--;)(3===o&&1==i%2||2>=o&&0<i&&i<e-1)&&s.splice(i,1);this.finalTickAmt=void 0}}},setScale:function(){var t,e=this.series.some(function(t){return t.isDirtyData||t.isDirty||t.xAxis.isDirty});this.oldMin=this.min,this.oldMax=this.max,this.oldAxisLength=this.len,this.setAxisSize(),(t=this.len!==this.oldAxisLength)||e||this.isLinked||this.forceRedraw||this.userMin!==this.oldUserMin||this.userMax!==this.oldUserMax||this.alignToOthers()?(this.resetStacks&&this.resetStacks(),this.forceRedraw=!1,this.getSeriesExtremes(),this.setTickInterval(),this.oldUserMin=this.userMin,this.oldUserMax=this.userMax,this.isDirty||(this.isDirty=t||this.min!==this.oldMin||this.max!==this.oldMax)):this.cleanStacks&&this.cleanStacks(),p(this,"afterSetScale")},setExtremes:function(t,e,i,s,n){var o=this,a=o.chart;i=w(i,!0),o.series.forEach(function(t){delete t.kdTree}),n=d(n,{min:t,max:e}),p(o,"setExtremes",n,function(){o.userMin=t,o.userMax=e,o.eventArgs=n,i&&a.redraw(s)})},zoom:function(t,e){var i=this.dataMin,s=this.dataMax,n=this.options,o=Math.min(i,w(n.min,i)),a=Math.max(s,w(n.max,s));return t={newMin:t,newMax:e},p(this,"zoom",t,function(t){var e=t.newMin,n=t.newMax;e===this.min&&n===this.max||(this.allowZoomOutside||(l(i)&&(e<o&&(e=o),e>a&&(e=a)),l(s)&&(n<o&&(n=o),n>a&&(n=a))),this.displayBtn=void 0!==e||void 0!==n,this.setExtremes(e,n,!1,void 0,{trigger:"zoom"})),t.zoomed=!0}),t.zoomed},setAxisSize:function(){var e=this.chart,i=this.options,s=i.offsets||[0,0,0,0],n=this.horiz,o=this.width=Math.round(t.relativeLength(w(i.width,e.plotWidth-s[3]+s[1]),e.plotWidth)),a=this.height=Math.round(t.relativeLength(w(i.height,e.plotHeight-s[0]+s[2]),e.plotHeight)),r=this.top=Math.round(t.relativeLength(w(i.top,e.plotTop+s[0]),e.plotHeight,e.plotTop)),i=this.left=Math.round(t.relativeLength(w(i.left,e.plotLeft+s[3]),e.plotWidth,e.plotLeft));this.bottom=e.chartHeight-a-r,this.right=e.chartWidth-o-i,this.len=Math.max(n?o:a,0),this.pos=n?i:r},getExtremes:function(){var t=this.isLog;return{min:t?a(this.lin2log(this.min)):this.min,max:t?a(this.lin2log(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(t){var e=this.isLog,i=e?this.lin2log(this.min):this.min,e=e?this.lin2log(this.max):this.max;return null===t||-1/0===t?t=i:1/0===t?t=e:i>t?t=i:e<t&&(t=e),this.translate(t,0,1,0,1)},autoLabelAlign:function(t){var e=(w(t,0)-90*this.side+720)%360;return t={align:"center"},p(this,"autoLabelAlign",t,function(t){15<e&&165>e?t.align="right":195<e&&345>e&&(t.align="left")}),t.align},tickSize:function(t){var e,i=this.options,s=i[t+"Length"],n=w(i[t+"Width"],"tick"===t&&this.isXAxis&&!this.categories?1:0);return n&&s&&("inside"===i[t+"Position"]&&(s=-s),e=[s,n]),t={tickSize:e},p(this,"afterTickSize",t),t.tickSize},labelMetrics:function(){var t=this.tickPositions&&this.tickPositions[0]||0;return this.chart.renderer.fontMetrics(this.options.labels.style&&this.options.labels.style.fontSize,this.ticks[t]&&this.ticks[t].label)},unsquish:function(){var t,e,i,s=this.options.labels,n=this.horiz,o=this.tickInterval,r=o,c=this.len/(((this.categories?1:0)+this.max-this.min)/o),d=s.rotation,p=this.labelMetrics(),u=Number.MAX_VALUE,f=this.max-this.min,g=function(t){var e=t/(c||1),e=1<e?Math.ceil(e):1;return e*o>f&&1/0!==t&&1/0!==c&&(e=Math.ceil(f/o)),a(e*o)};return n?(i=!s.staggerLines&&!s.step&&(l(d)?[d]:c<w(s.autoRotationLimit,80)&&s.autoRotation))&&i.forEach(function(i){var s;(i===d||i&&-90<=i&&90>=i)&&(e=g(Math.abs(p.h/Math.sin(h*i))),(s=e+Math.abs(i/360))<u&&(u=s,t=i,r=e))}):s.step||(r=g(p.h)),this.autoRotation=i,this.labelRotation=w(t,d),r},getSlotWidth:function(t){var e=this.chart,i=this.horiz,s=this.options.labels,n=Math.max(this.tickPositions.length-(this.categories?0:1),1),o=e.margin[3];return t&&t.slotWidth||i&&2>(s.step||0)&&!s.rotation&&(this.staggerLines||1)*this.len/n||!i&&(s.style&&parseInt(s.style.width,10)||o&&o-e.spacing[3]||.33*e.chartWidth)},renderUnsquish:function(){var t,e,i,s=this.chart,n=s.renderer,o=this.tickPositions,a=this.ticks,r=this.options.labels,l=r&&r.style||{},h=this.horiz,c=this.getSlotWidth(),d=Math.max(1,Math.round(c-2*(r.padding||5))),p={},u=this.labelMetrics(),f=r.style&&r.style.textOverflow,g=0;if(v(r.rotation)||(p.rotation=r.rotation||0),o.forEach(function(t){(t=a[t])&&t.label&&t.label.textPxLength>g&&(g=t.label.textPxLength)}),this.maxLabelLength=g,this.autoRotation)g>d&&g>u.h?p.rotation=this.labelRotation:this.labelRotation=0;else if(c&&(t=d,!f))for(e="clip",d=o.length;!h&&d--;)i=o[d],(i=a[i].label)&&(i.styles&&"ellipsis"===i.styles.textOverflow?i.css({textOverflow:"clip"}):i.textPxLength>c&&i.css({width:c+"px"}),i.getBBox().height>this.len/o.length-(u.h-u.f)&&(i.specificTextOverflow="ellipsis"));p.rotation&&(t=g>.5*s.chartHeight?.33*s.chartHeight:g,f||(e="ellipsis")),(this.labelAlign=r.align||this.autoLabelAlign(this.labelRotation))&&(p.align=this.labelAlign),o.forEach(function(i){var s=(i=a[i])&&i.label,n=l.width,o={};s&&(s.attr(p),i.shortenLabel?i.shortenLabel():t&&!n&&"nowrap"!==l.whiteSpace&&(t<s.textPxLength||"SPAN"===s.element.tagName)?(o.width=t,f||(o.textOverflow=s.specificTextOverflow||e),s.css(o)):s.styles&&s.styles.width&&!o.width&&!n&&s.css({width:null}),delete s.specificTextOverflow,i.rotation=p.rotation)},this),this.tickRotCorr=n.rotCorr(u.b,this.labelRotation||0,0!==this.side)},hasData:function(){return this.series.some(function(t){return t.hasData()})||this.options.showEmpty&&l(this.min)&&l(this.max)},addTitle:function(t){var e,i=this.chart.renderer,s=this.horiz,n=this.opposite,o=this.options.title,a=this.chart.styledMode;this.axisTitle||((e=o.textAlign)||(e=(s?{low:"left",middle:"center",high:"right"}:{low:n?"right":"left",middle:"center",high:n?"left":"right"})[o.align]),this.axisTitle=i.text(o.text,0,0,o.useHTML).attr({zIndex:7,rotation:o.rotation||0,align:e}).addClass("highcharts-axis-title"),a||this.axisTitle.css(x(o.style)),this.axisTitle.add(this.axisGroup),this.axisTitle.isNew=!0),a||o.style.width||this.isRadial||this.axisTitle.css({width:this.len}),this.axisTitle[t?"show":"hide"](!0)},generateTick:function(t){var e=this.ticks;e[t]?e[t].addLabel():e[t]=new C(this,t)},getOffset:function(){var t,e,i,s=this,n=s.chart,o=n.renderer,a=s.options,r=s.tickPositions,h=s.ticks,c=s.horiz,d=s.side,u=n.inverted&&!s.isZAxis?[1,0,3,2][d]:d,f=0,g=0,m=a.title,v=a.labels,x=0,y=n.axisOffset,n=n.clipOffset,k=[-1,1,1,-1][d],M=a.className,S=s.axisParent;t=s.hasData(),s.showAxis=e=t||w(a.showEmpty,!0),s.staggerLines=s.horiz&&v.staggerLines,s.axisGroup||(s.gridGroup=o.g("grid").attr({zIndex:a.gridZIndex||1}).addClass("highcharts-"+this.coll.toLowerCase()+"-grid "+(M||"")).add(S),s.axisGroup=o.g("axis").attr({zIndex:a.zIndex||2}).addClass("highcharts-"+this.coll.toLowerCase()+" "+(M||"")).add(S),s.labelGroup=o.g("axis-labels").attr({zIndex:v.zIndex||7}).addClass("highcharts-"+s.coll.toLowerCase()+"-labels "+(M||"")).add(S)),t||s.isLinked?(r.forEach(function(t,e){s.generateTick(t,e)}),s.renderUnsquish(),s.reserveSpaceDefault=0===d||2===d||{1:"left",3:"right"}[d]===s.labelAlign,w(v.reserveSpace,"center"===s.labelAlign||null,s.reserveSpaceDefault)&&r.forEach(function(t){x=Math.max(h[t].getLabelSize(),x)}),s.staggerLines&&(x*=s.staggerLines),s.labelOffset=x*(s.opposite?-1:1)):b(h,function(t,e){t.destroy(),delete h[e]}),m&&m.text&&!1!==m.enabled&&(s.addTitle(e),e&&!1!==m.reserveSpace&&(s.titleOffset=f=s.axisTitle.getBBox()[c?"height":"width"],i=m.offset,g=l(i)?0:w(m.margin,c?5:10))),s.renderLine(),s.offset=k*w(a.offset,y[d]?y[d]+(a.margin||0):0),s.tickRotCorr=s.tickRotCorr||{x:0,y:0},o=0===d?-s.labelMetrics().h:2===d?s.tickRotCorr.y:0,g=Math.abs(x)+g,x&&(g=g-o+k*(c?w(v.y,s.tickRotCorr.y+8*k):v.x)),s.axisTitleMargin=w(i,g),s.getMaxLabelDimensions&&(s.maxLabelDimensions=s.getMaxLabelDimensions(h,r)),c=this.tickSize("tick"),y[d]=Math.max(y[d],s.axisTitleMargin+f+k*s.offset,g,r&&r.length&&c?c[0]+k*s.offset:0),a=a.offset?0:2*Math.floor(s.axisLine.strokeWidth()/2),n[u]=Math.max(n[u],a),p(this,"afterGetOffset")},getLinePath:function(t){var e=this.chart,i=this.opposite,s=this.offset,n=this.horiz,o=this.left+(i?this.width:0)+s,s=e.chartHeight-this.bottom-(i?this.height:0)+s;return i&&(t*=-1),e.renderer.crispLine(["M",n?this.left:o,n?s:this.top,"L",n?e.chartWidth-this.right:o,n?s:e.chartHeight-this.bottom],t)},renderLine:function(){this.axisLine||(this.axisLine=this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup),this.chart.styledMode||this.axisLine.attr({stroke:this.options.lineColor,"stroke-width":this.options.lineWidth,zIndex:7}))},getTitlePosition:function(){var t=this.horiz,e=this.left,i=this.top,s=this.len,n=this.options.title,o=t?e:i,a=this.opposite,r=this.offset,l=n.x||0,h=n.y||0,c=this.axisTitle,d=this.chart.renderer.fontMetrics(n.style&&n.style.fontSize,c),c=Math.max(c.getBBox(null,0).height-d.h-1,0),s={low:o+(t?0:s),middle:o+s/2,high:o+(t?s:0)}[n.align],e=(t?i+this.height:e)+(t?1:-1)*(a?-1:1)*this.axisTitleMargin+[-c,c,d.f,-c][this.side],t={x:t?s+l:e+(a?this.width:0)+r+l,y:t?e+h-(a?this.height:0)+r:s+h};return p(this,"afterGetTitlePosition",{titlePosition:t}),t},renderMinorTick:function(t){var e=this.chart.hasRendered&&m(this.oldMin),i=this.minorTicks;i[t]||(i[t]=new C(this,t,"minor")),e&&i[t].isNew&&i[t].render(null,!0),i[t].render(null,!1,1)},renderTick:function(t,e){var i=this.isLinked,s=this.ticks,n=this.chart.hasRendered&&m(this.oldMin);(!i||t>=this.min&&t<=this.max)&&(s[t]||(s[t]=new C(this,t)),n&&s[t].isNew&&s[t].render(e,!0,-1),s[t].render(e))},render:function(){var e,s,n=this,o=n.chart,a=n.options,r=n.isLog,l=n.isLinked,h=n.tickPositions,c=n.axisTitle,d=n.ticks,u=n.minorTicks,f=n.alternateBands,g=a.stackLabels,v=a.alternateGridColor,x=n.tickmarkOffset,y=n.axisLine,w=n.showAxis,k=i(o.renderer.globalAnimation);n.labelEdge.length=0,n.overlap=!1,[d,u,f].forEach(function(t){b(t,function(t){t.isActive=!1})}),(n.hasData()||l)&&(n.minorTickInterval&&!n.categories&&n.getMinorTickPositions().forEach(function(t){n.renderMinorTick(t)}),h.length&&(h.forEach(function(t,e){n.renderTick(t,e)}),x&&(0===n.min||n.single)&&(d[-1]||(d[-1]=new C(n,-1,null,!0)),d[-1].render(-1))),v&&h.forEach(function(i,a){s=void 0!==h[a+1]?h[a+1]+x:n.max-x,0==a%2&&i<n.max&&s<=n.max+(o.polar?-x:x)&&(f[i]||(f[i]=new t.PlotLineOrBand(n)),e=i+x,f[i].options={from:r?n.lin2log(e):e,to:r?n.lin2log(s):s,color:v},f[i].render(),f[i].isActive=!0)}),n._addedPlotLB||((a.plotLines||[]).concat(a.plotBands||[]).forEach(function(t){n.addPlotBandOrLine(t)}),n._addedPlotLB=!0)),[d,u,f].forEach(function(t){var e,i=[],s=k.duration;b(t,function(t,e){t.isActive||(t.render(e,!1,0),t.isActive=!1,i.push(e))}),T(function(){for(e=i.length;e--;)t[i[e]]&&!t[i[e]].isActive&&(t[i[e]].destroy(),delete t[i[e]])},t!==f&&o.hasRendered&&s?s:0)}),y&&(y[y.isPlaced?"animate":"attr"]({d:this.getLinePath(y.strokeWidth())}),y.isPlaced=!0,y[w?"show":"hide"](!0)),c&&w&&(a=n.getTitlePosition(),m(a.y)?(c[c.isNew?"attr":"animate"](a),c.isNew=!1):(c.attr("y",-9999),c.isNew=!0)),g&&g.enabled&&n.renderStackTotals(),n.isDirty=!1,p(this,"afterRender")},redraw:function(){this.visible&&(this.render(),this.plotLinesAndBands.forEach(function(t){t.render()})),this.series.forEach(function(t){t.isDirty=!0})},keepProps:"extKey hcEvents names series userMax userMin".split(" "),destroy:function(t){var e,i=this,s=i.stacks,n=i.plotLinesAndBands;if(p(this,"destroy",{keepEvents:t}),t||k(i),b(s,function(t,e){c(t),s[e]=null}),[i.ticks,i.minorTicks,i.alternateBands].forEach(function(t){c(t)}),n)for(t=n.length;t--;)n[t].destroy();"stackTotalGroup axisLine axisTitle axisGroup gridGroup labelGroup cross scrollbar".split(" ").forEach(function(t){i[t]&&(i[t]=i[t].destroy())});for(e in i.plotLinesAndBandsGroups)i.plotLinesAndBandsGroups[e]=i.plotLinesAndBandsGroups[e].destroy();b(i,function(t,e){-1===i.keepProps.indexOf(e)&&delete i[e]})},drawCrosshair:function(t,e){var i,s,n=this.crosshair,a=w(n.snap,!0),r=this.cross;if(p(this,"drawCrosshair",{e:t,point:e}),t||(t=this.cross&&this.cross.e),this.crosshair&&!1!==(l(e)||!a)){if(a?l(e)&&(s=w(e.crosshairPos,this.isXAxis?e.plotX:this.len-e.plotY)):s=t&&(this.horiz?t.chartX-this.pos:this.len-t.chartY+this.pos),l(s)&&(i=this.getPlotLinePath(e&&(this.isXAxis?e.x:w(e.stackY,e.y)),null,null,null,s)||null),!l(i))return void this.hideCrosshair();a=this.categories&&!this.isRadial,r||(this.cross=r=this.chart.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-"+(a?"category ":"thin ")+n.className).attr({zIndex:w(n.zIndex,2)}).add(),this.chart.styledMode||(r.attr({stroke:n.color||(a?o("#ccd6eb").setOpacity(.25).get():"#cccccc"),"stroke-width":w(n.width,1)}).css({"pointer-events":"none"}),n.dashStyle&&r.attr({dashstyle:n.dashStyle}))),r.show().attr({d:i}),a&&!n.width&&r.attr({"stroke-width":this.transA}),this.cross.e=t}else this.hideCrosshair();p(this,"afterDrawCrosshair",{e:t,point:e})},hideCrosshair:function(){this.cross&&this.cross.hide(),p(this,"afterHideCrosshair")}}),t.Axis=A}),e(i,"parts/DateTimeAxis.js",[i["parts/Globals.js"]],function(t){var e=t.Axis,i=t.getMagnitude,s=t.normalizeTickInterval,n=t.timeUnits;e.prototype.getTimeTicks=function(){return this.chart.time.getTimeTicks.apply(this.chart.time,arguments)},e.prototype.normalizeTimeTickInterval=function(t,e){var o=e||[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2]],["week",[1,2]],["month",[1,2,3,4,6]],["year",null]];e=o[o.length-1];var a,r=n[e[0]],l=e[1];for(a=0;a<o.length&&(e=o[a],r=n[e[0]],l=e[1],!(o[a+1]&&t<=(r*l[l.length-1]+n[o[a+1][0]])/2));a++);return r===n.year&&t<5*r&&(l=[1,2,5]),t=s(t/r,l,"year"===e[0]?Math.max(i(t/r),1):1),{unitRange:r,count:t,unitName:e[0]}}}),e(i,"parts/LogarithmicAxis.js",[i["parts/Globals.js"]],function(t){var e=t.Axis,i=t.getMagnitude,s=t.normalizeTickInterval,n=t.pick;e.prototype.getLogTickPositions=function(t,e,o,a){var r=this.options,l=this.len,h=[];if(a||(this._minorAutoInterval=null),.5<=t)t=Math.round(t),h=this.getLinearTickPositions(t,e,o);else if(.08<=t)for(var c,d,p,u,f,l=Math.floor(e),r=.3<t?[1,2,4]:.15<t?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];l<o+1&&!f;l++)for(d=r.length,c=0;c<d&&!f;c++)p=this.log2lin(this.lin2log(l)*r[c]),p>e&&(!a||u<=o)&&void 0!==u&&h.push(u),u>o&&(f=!0),u=p;else e=this.lin2log(e),o=this.lin2log(o),t=a?this.getMinorTickInterval():r.tickInterval,t=n("auto"===t?null:t,this._minorAutoInterval,r.tickPixelInterval/(a?5:1)*(o-e)/((a?l/this.tickPositions.length:l)||1)),t=s(t,null,i(t)),h=this.getLinearTickPositions(t,e,o).map(this.log2lin),a||(this._minorAutoInterval=t/5);return a||(this.tickInterval=t),h},e.prototype.log2lin=function(t){return Math.log(t)/Math.LN10},e.prototype.lin2log=function(t){return Math.pow(10,t)}}),e(i,"parts/PlotLineOrBand.js",[i["parts/Globals.js"],i["parts/Axis.js"]],function(t,e){var i=t.arrayMax,s=t.arrayMin,n=t.defined,o=t.destroyObjectProperties,a=t.erase,r=t.merge,l=t.pick;t.PlotLineOrBand=function(t,e){this.axis=t,e&&(this.options=e,this.id=e.id)},t.PlotLineOrBand.prototype={render:function(){t.fireEvent(this,"render");var e=this,i=e.axis,s=i.horiz,o=e.options,a=o.label,h=e.label,c=o.to,d=o.from,p=o.value,u=n(d)&&n(c),f=n(p),g=e.svgElem,m=!g,v=[],x=o.color,y=l(o.zIndex,0),b=o.events,v={class:"highcharts-plot-"+(u?"band ":"line ")+(o.className||"")},w={},k=i.chart.renderer,M=u?"bands":"lines";if(i.isLog&&(d=i.log2lin(d),c=i.log2lin(c),p=i.log2lin(p)),i.chart.styledMode||(f?(v.stroke=x,v["stroke-width"]=o.width,o.dashStyle&&(v.dashstyle=o.dashStyle)):u&&(x&&(v.fill=x),o.borderWidth&&(v.stroke=o.borderColor,v["stroke-width"]=o.borderWidth))),w.zIndex=y,M+="-"+y,(x=i.plotLinesAndBandsGroups[M])||(i.plotLinesAndBandsGroups[M]=x=k.g("plot-"+M).attr(w).add()),m&&(e.svgElem=g=k.path().attr(v).add(x)),f)v=i.getPlotLinePath(p,g.strokeWidth());else{if(!u)return;v=i.getPlotBandPath(d,c,o)}return(m||!g.d)&&v&&v.length?(g.attr({d:v}),b&&t.objectEach(b,function(t,i){g.on(i,function(t){b[i].apply(e,[t])})})):g&&(v?(g.show(!0),g.animate({d:v})):g.d&&(g.hide(),h&&(e.label=h=h.destroy()))),a&&n(a.text)&&v&&v.length&&0<i.width&&0<i.height&&!v.isFlat?(a=r({align:s&&u&&"center",x:s?!u&&4:10,verticalAlign:!s&&u&&"middle",y:s?u?16:10:u?6:-4,rotation:s&&!u&&90},a),this.renderLabel(a,v,u,y)):h&&h.hide(),e},renderLabel:function(t,e,n,o){var a=this.label,r=this.axis.chart.renderer;a||(a={align:t.textAlign||t.align,rotation:t.rotation,class:"highcharts-plot-"+(n?"band":"line")+"-label "+(t.className||"")},a.zIndex=o,this.label=a=r.text(t.text,0,0,t.useHTML).attr(a).add(),this.axis.chart.styledMode||a.css(t.style)),o=e.xBounds||[e[1],e[4],n?e[6]:e[1]],e=e.yBounds||[e[2],e[5],n?e[7]:e[2]],n=s(o),r=s(e),a.align(t,!1,{x:n,y:r,width:i(o)-n,height:i(e)-r}),a.show(!0)},destroy:function(){a(this.axis.plotLinesAndBands,this),delete this.axis,o(this)}},t.extend(e.prototype,{getPlotBandPath:function(t,e){var i,s=this.getPlotLinePath(e,null,null,!0),n=this.getPlotLinePath(t,null,null,!0),o=[],a=this.horiz,r=1;if(t=t<this.min&&e<this.min||t>this.max&&e>this.max,n&&s)for(t&&(i=n.toString()===s.toString(),r=0),t=0;t<n.length;t+=6)a&&s[t+1]===n[t+1]?(s[t+1]+=r,s[t+4]+=r):a||s[t+2]!==n[t+2]||(s[t+2]+=r,s[t+5]+=r),o.push("M",n[t+1],n[t+2],"L",n[t+4],n[t+5],s[t+4],s[t+5],s[t+1],s[t+2],"z"),o.isFlat=i;return o},addPlotBand:function(t){return this.addPlotBandOrLine(t,"plotBands")},addPlotLine:function(t){return this.addPlotBandOrLine(t,"plotLines")},addPlotBandOrLine:function(e,i){var s=new t.PlotLineOrBand(this,e).render(),n=this.userOptions;return s&&(i&&(n[i]=n[i]||[],n[i].push(e)),this.plotLinesAndBands.push(s)),s},removePlotBandOrLine:function(t){for(var e=this.plotLinesAndBands,i=this.options,s=this.userOptions,n=e.length;n--;)e[n].id===t&&e[n].destroy();[i.plotLines||[],s.plotLines||[],i.plotBands||[],s.plotBands||[]].forEach(function(e){for(n=e.length;n--;)e[n].id===t&&a(e,e[n])})},removePlotBand:function(t){this.removePlotBandOrLine(t)},removePlotLine:function(t){this.removePlotBandOrLine(t)}})}),e(i,"parts/Tooltip.js",[i["parts/Globals.js"]],function(t){var e=t.doc,i=t.extend,s=t.format,n=t.isNumber,o=t.merge,a=t.pick,r=t.splat,l=t.syncTimeout,h=t.timeUnits;t.Tooltip=function(){this.init.apply(this,arguments)},t.Tooltip.prototype={init:function(t,e){this.chart=t,this.options=e,this.crosshairs=[],this.now={x:0,y:0},this.isHidden=!0,this.split=e.split&&!t.inverted,this.shared=e.shared||this.split,this.outside=e.outside&&!this.split},cleanSplit:function(t){this.chart.series.forEach(function(e){var i=e&&e.tt;i&&(!i.isActive||t?e.tt=i.destroy():i.isActive=!1)})},applyFilter:function(){var t=this.chart;t.renderer.definition({tagName:"filter",id:"drop-shadow-"+t.index,opacity:.5,children:[{tagName:"feGaussianBlur",in:"SourceAlpha",stdDeviation:1},{tagName:"feOffset",dx:1,dy:1},{tagName:"feComponentTransfer",children:[{tagName:"feFuncA",type:"linear",slope:.3}]},{tagName:"feMerge",children:[{tagName:"feMergeNode"},{tagName:"feMergeNode",in:"SourceGraphic"}]}]}),t.renderer.definition({tagName:"style",textContent:".highcharts-tooltip-"+t.index+"{filter:url(#drop-shadow-"+t.index+")}"})},getLabel:function(){var e,i,s=this,n=this.chart.renderer,o=this.chart.styledMode,a=this.options;return this.label||(this.outside&&(this.container=e=t.doc.createElement("div"),e.className="highcharts-tooltip-container",t.css(e,{position:"absolute",top:"1px",pointerEvents:a.style&&a.style.pointerEvents}),t.doc.body.appendChild(e),this.renderer=n=new t.Renderer(e,0,0)),this.split?this.label=n.g("tooltip"):(this.label=n.label("",0,0,a.shape||"callout",null,null,a.useHTML,null,"tooltip").attr({padding:a.padding,r:a.borderRadius}),o||this.label.attr({fill:a.backgroundColor,"stroke-width":a.borderWidth}).css(a.style).shadow(a.shadow)),o&&(this.applyFilter(),this.label.addClass("highcharts-tooltip-"+this.chart.index)),this.outside&&(i={x:this.label.xSetter,y:this.label.ySetter},this.label.xSetter=function(t,n){i[n].call(this.label,s.distance),e.style.left=t+"px"},this.label.ySetter=function(t,n){i[n].call(this.label,s.distance),e.style.top=t+"px"}),this.label.attr({zIndex:8}).add()),this.label},update:function(t){this.destroy(),o(!0,this.chart.options.tooltip.userOptions,t),this.init(this.chart,o(!0,this.options,t))},destroy:function(){this.label&&(this.label=this.label.destroy()),this.split&&this.tt&&(this.cleanSplit(this.chart,!0),this.tt=this.tt.destroy()),this.renderer&&(this.renderer=this.renderer.destroy(),t.discardElement(this.container)),t.clearTimeout(this.hideTimer),t.clearTimeout(this.tooltipTimeout)},move:function(e,s,n,o){var a=this,r=a.now,l=!1!==a.options.animation&&!a.isHidden&&(1<Math.abs(e-r.x)||1<Math.abs(s-r.y)),h=a.followPointer||1<a.len;i(r,{x:l?(2*r.x+e)/3:e,y:l?(r.y+s)/2:s,anchorX:h?void 0:l?(2*r.anchorX+n)/3:n,anchorY:h?void 0:l?(r.anchorY+o)/2:o}),a.getLabel().attr(r),l&&(t.clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){a&&a.move(e,s,n,o)},32))},hide:function(e){var i=this;t.clearTimeout(this.hideTimer),e=a(e,this.options.hideDelay,500),this.isHidden||(this.hideTimer=l(function(){i.getLabel()[e?"fadeOut":"hide"](),i.isHidden=!0},e))},getAnchor:function(t,e){var i,s,n=this.chart,o=n.pointer,a=n.inverted,l=n.plotTop,h=n.plotLeft,c=0,d=0;return t=r(t),this.followPointer&&e?(void 0===e.chartX&&(e=o.normalize(e)),t=[e.chartX-n.plotLeft,e.chartY-l]):t[0].tooltipPos?t=t[0].tooltipPos:(t.forEach(function(t){i=t.series.yAxis,s=t.series.xAxis,c+=t.plotX+(!a&&s?s.left-h:0),d+=(t.plotLow?(t.plotLow+t.plotHigh)/2:t.plotY)+(!a&&i?i.top-l:0)}),c/=t.length,d/=t.length,t=[a?n.plotWidth-d:c,this.shared&&!a&&1<t.length&&e?e.chartY-l:a?n.plotHeight-c:d]),t.map(Math.round)},getPosition:function(t,i,s){var n,o=this.chart,r=this.distance,l={},h=o.inverted&&s.h||0,c=this.outside,d=c?e.documentElement.clientWidth-2*r:o.chartWidth,p=c?Math.max(e.body.scrollHeight,e.documentElement.scrollHeight,e.body.offsetHeight,e.documentElement.offsetHeight,e.documentElement.clientHeight):o.chartHeight,u=o.pointer.chartPosition,f=["y",p,i,(c?u.top-r:0)+s.plotY+o.plotTop,c?0:o.plotTop,c?p:o.plotTop+o.plotHeight],g=["x",d,t,(c?u.left-r:0)+s.plotX+o.plotLeft,c?0:o.plotLeft,c?d:o.plotLeft+o.plotWidth],m=!this.followPointer&&a(s.ttBelow,!o.inverted==!!s.negative),v=function(t,e,i,s,n,o){var a=i<s-r,c=s+r+i<e,d=s-r-i;if(s+=r,m&&c)l[t]=s;else if(!m&&a)l[t]=d;else if(a)l[t]=Math.min(o-i,0>d-h?d:d-h);else{if(!c)return!1;l[t]=Math.max(n,s+h+i>e?s:s+h)}},x=function(t,e,i,s){var n;return s<r||s>e-r?n=!1:l[t]=s<i/2?1:s>e-i/2?e-i-2:s-i/2,n},y=function(t){var e=f;f=g,g=e,n=t};return(o.inverted||1<this.len)&&y(),function t(){!1!==v.apply(0,f)?!1!==x.apply(0,g)||n||(y(!0),t()):n?l.x=l.y=0:(y(!0),t())}(),l},defaultFormatter:function(t){var e,i=this.points||r(this);return e=[t.tooltipFooterHeaderFormatter(i[0])],e=e.concat(t.bodyFormatter(i)),e.push(t.tooltipFooterHeaderFormatter(i[0],!0)),e},refresh:function(e,i){var s,n,o,l=this.chart,h=this.options,c=e,d={},p=[];o=h.formatter||this.defaultFormatter;var d=this.shared,u=l.styledMode,f=[];h.enabled&&(t.clearTimeout(this.hideTimer),this.followPointer=r(c)[0].series.tooltipOptions.followPointer,n=this.getAnchor(c,i),i=n[0],s=n[1],!d||c.series&&c.series.noSharedTooltip?d=c.getLabelConfig():(f=l.pointer.getActiveSeries(c),l.series.forEach(function(t){(t.options.inactiveOtherPoints||-1===f.indexOf(t))&&t.setState("inactive",!0)}),c.forEach(function(t){t.setState("hover"),p.push(t.getLabelConfig())}),d={x:c[0].category,y:c[0].y},d.points=p,c=c[0]),this.len=p.length,o=o.call(d,this),d=c.series,this.distance=a(d.tooltipOptions.distance,16),!1===o?this.hide():(l=this.getLabel(),this.isHidden&&l.attr({opacity:1}).show(),this.split?this.renderSplit(o,r(e)):(h.style.width&&!u||l.css({width:this.chart.spacingBox.width}),l.attr({text:o&&o.join?o.join(""):o}),l.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-"+a(c.colorIndex,d.colorIndex)),u||l.attr({stroke:h.borderColor||c.color||d.color||"#666666"}),this.updatePosition({plotX:i,plotY:s,negative:c.negative,ttBelow:c.ttBelow,h:n[2]||0})),this.isHidden=!1),t.fireEvent(this,"refresh"))},renderSplit:function(e,i){var s,n=this,o=[],r=this.chart,l=r.renderer,h=!0,c=this.options,d=0,p=this.getLabel(),u=r.plotTop;t.isString(e)&&(e=[!1,e]),e.slice(0,i.length+1).forEach(function(t,e){if(!1!==t&&""!==t){e=i[e-1]||{isHeader:!0,plotX:i[0].plotX,plotY:r.plotHeight};var f=e.series||n,g=f.tt,m=e.series||{},v="highcharts-color-"+a(e.colorIndex,m.colorIndex,"none");g||(g={padding:c.padding,r:c.borderRadius},r.styledMode||(g.fill=c.backgroundColor,g.stroke=c.borderColor||e.color||m.color||"#333333",g["stroke-width"]=c.borderWidth),f.tt=g=l.label(null,null,null,(e.isHeader?c.headerShape:c.shape)||"callout",null,null,c.useHTML).addClass("highcharts-tooltip-box "+v).attr(g).add(p)),g.isActive=!0,g.attr({text:t}),r.styledMode||g.css(c.style).shadow(c.shadow),t=g.getBBox(),m=t.width+g.strokeWidth(),e.isHeader?(d=t.height,r.xAxis[0].opposite&&(s=!0,u-=d),m=Math.max(0,Math.min(e.plotX+r.plotLeft-m/2,r.chartWidth+(r.scrollablePixels?r.scrollablePixels-r.marginRight:0)-m))):m=e.plotX+r.plotLeft-a(c.distance,16)-m,0>m&&(h=!1),t=(e.series&&e.series.yAxis&&e.series.yAxis.pos)+(e.plotY||0),t-=u,e.isHeader&&(t=s?-d:r.plotHeight+d),o.push({target:t,rank:e.isHeader?1:0,size:f.tt.getBBox().height+1,point:e,x:m,tt:g})}}),this.cleanSplit(),c.positioner&&o.forEach(function(t){var e=c.positioner.call(n,t.tt.getBBox().width,t.size,t.point);t.x=e.x,t.align=0,t.target=e.y,t.rank=a(e.rank,t.rank)}),t.distribute(o,r.plotHeight+d),o.forEach(function(t){var e=t.point,i=e.series;t.tt.attr({visibility:void 0===t.pos?"hidden":"inherit",x:h||e.isHeader||c.positioner?t.x:e.plotX+r.plotLeft+n.distance,y:t.pos+u,anchorX:e.isHeader?e.plotX+r.plotLeft:e.plotX+i.xAxis.pos,anchorY:e.isHeader?r.plotTop+r.plotHeight/2:e.plotY+i.yAxis.pos})})},updatePosition:function(t){var e=this.chart,i=this.getLabel(),s=(this.options.positioner||this.getPosition).call(this,i.width,i.height,t),n=t.plotX+e.plotLeft;t=t.plotY+e.plotTop;var o;this.outside&&(o=(this.options.borderWidth||0)+2*this.distance,this.renderer.setSize(i.width+o,i.height+o,!1),n+=e.pointer.chartPosition.left-s.x,t+=e.pointer.chartPosition.top-s.y),this.move(Math.round(s.x),Math.round(s.y||0),n,t)},getDateFormat:function(t,e,i,s){var n,o,a=this.chart.time,r=a.dateFormat("%m-%d %H:%M:%S.%L",e),l={millisecond:15,second:12,minute:9,hour:6,day:3},c="millisecond";for(o in h){if(t===h.week&&+a.dateFormat("%w",e)===i&&"00:00:00.000"===r.substr(6)){o="week";break}if(h[o]>t){o=c;break}if(l[o]&&r.substr(l[o])!=="01-01 00:00:00.000".substr(l[o]))break;"week"!==o&&(c=o)}return o&&(n=a.resolveDTLFormat(s[o]).main),n},getXDateFormat:function(t,e,i){e=e.dateTimeLabelFormats;var s=i&&i.closestPointRange;return(s?this.getDateFormat(s,t.x,i.options.startOfWeek,e):e.day)||e.year},tooltipFooterHeaderFormatter:function(e,i){var o=i?"footer":"header",a=e.series,r=a.tooltipOptions,l=r.xDateFormat,h=a.xAxis,c=h&&"datetime"===h.options.type&&n(e.key),d=r[o+"Format"];return i={isFooter:i,labelConfig:e},t.fireEvent(this,"headerFormatter",i,function(t){c&&!l&&(l=this.getXDateFormat(e,r,h)),c&&l&&(e.point&&e.point.tooltipDateKeys||["key"]).forEach(function(t){d=d.replace("{point."+t+"}","{point."+t+":"+l+"}")}),a.chart.styledMode&&(d=this.styledModeFormat(d)),t.text=s(d,{point:e,series:a},this.chart.time)}),i.text},bodyFormatter:function(t){return t.map(function(t){var e=t.series.tooltipOptions;return(e[(t.point.formatPrefix||"point")+"Formatter"]||t.point.tooltipFormatter).call(t.point,e[(t.point.formatPrefix||"point")+"Format"]||"")})},styledModeFormat:function(t){return t.replace('style="font-size: 10px"','class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g,'class="highcharts-color-{$1.colorIndex}"')}}}),e(i,"parts/Pointer.js",[i["parts/Globals.js"]],function(t){var e=t.addEvent,i=t.attr,s=t.charts,n=t.color,o=t.css,a=t.defined,r=t.extend,l=t.find,h=t.fireEvent,c=t.isNumber,d=t.isObject,p=t.offset,u=t.pick,f=t.splat,g=t.Tooltip;t.Pointer=function(t,e){this.init(t,e)},t.Pointer.prototype={init:function(t,e){this.options=e,this.chart=t,this.runChartClick=e.chart.events&&!!e.chart.events.click,this.pinchDown=[],this.lastValidTouch={},g&&(t.tooltip=new g(t,e.tooltip),this.followTouchMove=u(e.tooltip.followTouchMove,!0)),this.setDOMEvents()},zoomOption:function(t){var e=this.chart,i=e.options.chart,s=i.zoomType||"",e=e.inverted;/touch/.test(t.type)&&(s=u(i.pinchType,s)),this.zoomX=t=/x/.test(s),this.zoomY=s=/y/.test(s),this.zoomHor=t&&!e||s&&e,this.zoomVert=s&&!e||t&&e,this.hasZoom=t||s},normalize:function(t,e){var i;return i=t.touches?t.touches.length?t.touches.item(0):t.changedTouches[0]:t,e||(this.chartPosition=e=p(this.chart.container)),r(t,{chartX:Math.round(i.pageX-e.left),chartY:Math.round(i.pageY-e.top)})},getCoordinates:function(t){var e={xAxis:[],yAxis:[]};return this.chart.axes.forEach(function(i){e[i.isXAxis?"xAxis":"yAxis"].push({axis:i,value:i.toValue(t[i.horiz?"chartX":"chartY"])})}),e},findNearestKDPoint:function(t,e,i){var s;return t.forEach(function(t){var n=!(t.noSharedTooltip&&e)&&0>t.options.findNearestPointBy.indexOf("y");if(t=t.searchPoint(i,n),(n=d(t,!0))&&!(n=!d(s,!0)))var n=s.distX-t.distX,o=s.dist-t.dist,a=(t.series.group&&t.series.group.zIndex)-(s.series.group&&s.series.group.zIndex),n=0<(0!==n&&e?n:0!==o?o:0!==a?a:s.series.index>t.series.index?-1:1);n&&(s=t)}),s},getPointFromEvent:function(t){t=t.target;for(var e;t&&!e;)e=t.point,t=t.parentNode;return e},getChartCoordinatesFromPoint:function(t,e){var i=t.series,s=i.xAxis,i=i.yAxis,n=u(t.clientX,t.plotX),o=t.shapeArgs;return s&&i?e?{chartX:s.len+s.pos-n,chartY:i.len+i.pos-t.plotY}:{chartX:n+s.pos,chartY:t.plotY+i.pos}:o&&o.x&&o.y?{chartX:o.x,chartY:o.y}:void 0},getHoverData:function(t,e,i,s,n,o){var a,r=[];s=!(!s||!t);var h=e&&!e.stickyTracking?[e]:i.filter(function(t){return t.visible&&!(!n&&t.directTouch)&&u(t.options.enableMouseTracking,!0)&&t.stickyTracking});return e=(a=s?t:this.findNearestKDPoint(h,n,o))&&a.series,a&&(n&&!e.noSharedTooltip?(h=i.filter(function(t){return t.visible&&!(!n&&t.directTouch)&&u(t.options.enableMouseTracking,!0)&&!t.noSharedTooltip}),h.forEach(function(t){var e=l(t.points,function(t){return t.x===a.x&&!t.isNull});d(e)&&(t.chart.isBoosting&&(e=t.getPoint(e)),r.push(e))})):r.push(a)),{hoverPoint:a,hoverSeries:e,hoverPoints:r}},runPointActions:function(i,n){var o,a=this.chart,r=a.tooltip&&a.tooltip.options.enabled?a.tooltip:void 0,l=!!r&&r.shared,h=n||a.hoverPoint,c=h&&h.series||a.hoverSeries,c=this.getHoverData(h,c,a.series,"touchmove"!==i.type&&(!!n||c&&c.directTouch&&this.isDirectTouch),l,i),d=[],h=c.hoverPoint;if(o=c.hoverPoints,n=(c=c.hoverSeries)&&c.tooltipOptions.followPointer,l=l&&c&&!c.noSharedTooltip,h&&(h!==a.hoverPoint||r&&r.isHidden)){if((a.hoverPoints||[]).forEach(function(t){-1===o.indexOf(t)&&t.setState()}),a.hoverSeries!==c&&c.onMouseOver(),d=this.getActiveSeries(o),a.series.forEach(function(t){(t.options.inactiveOtherPoints||-1===d.indexOf(t))&&t.setState("inactive",!0)}),(o||[]).forEach(function(t){t.setState("hover")}),a.hoverPoint&&a.hoverPoint.firePointEvent("mouseOut"),!h.series)return;h.firePointEvent("mouseOver"),a.hoverPoints=o,a.hoverPoint=h,r&&r.refresh(l?o:h,i)}else n&&r&&!r.isHidden&&(h=r.getAnchor([{}],i),r.updatePosition({plotX:h[0],plotY:h[1]}));this.unDocMouseMove||(this.unDocMouseMove=e(a.container.ownerDocument,"mousemove",function(e){var i=s[t.hoverChartIndex];i&&i.pointer.onDocumentMouseMove(e)})),a.axes.forEach(function(e){var s=u(e.crosshair.snap,!0),n=s?t.find(o,function(t){return t.series[e.coll]===e}):void 0;n||!s?e.drawCrosshair(i,n):e.hideCrosshair()})},getActiveSeries:function(t){var e,i=[];return(t||[]).forEach(function(t){e=t.series,i.push(e),e.linkedParent&&i.push(e.linkedParent),e.linkedSeries&&(i=i.concat(e.linkedSeries)),e.navigatorSeries&&i.push(e.navigatorSeries)}),i},reset:function(t,e){var i=this.chart,s=i.hoverSeries,n=i.hoverPoint,o=i.hoverPoints,a=i.tooltip,r=a&&a.shared?o:n;t&&r&&f(r).forEach(function(e){e.series.isCartesian&&void 0===e.plotX&&(t=!1)}),t?a&&r&&f(r).length&&(a.refresh(r),a.shared&&o?o.forEach(function(t){t.setState(t.state,!0),t.series.isCartesian&&(t.series.xAxis.crosshair&&t.series.xAxis.drawCrosshair(null,t),t.series.yAxis.crosshair&&t.series.yAxis.drawCrosshair(null,t))}):n&&(n.setState(n.state,!0),i.axes.forEach(function(t){t.crosshair&&t.drawCrosshair(null,n)}))):(n&&n.onMouseOut(),o&&o.forEach(function(t){t.setState()}),s&&s.onMouseOut(),a&&a.hide(e),this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove()),i.axes.forEach(function(t){t.hideCrosshair()}),this.hoverX=i.hoverPoints=i.hoverPoint=null)},scaleGroups:function(t,e){var i,s=this.chart;s.series.forEach(function(n){i=t||n.getPlotBox(),n.xAxis&&n.xAxis.zoomEnabled&&n.group&&(n.group.attr(i),n.markerGroup&&(n.markerGroup.attr(i),n.markerGroup.clip(e?s.clipRect:null)),n.dataLabelsGroup&&n.dataLabelsGroup.attr(i))}),s.clipRect.attr(e||s.clipBox)},dragStart:function(t){var e=this.chart;e.mouseIsDown=t.type,e.cancelClick=!1,e.mouseDownX=this.mouseDownX=t.chartX,e.mouseDownY=this.mouseDownY=t.chartY},drag:function(t){var e,i=this.chart,s=i.options.chart,o=t.chartX,a=t.chartY,r=this.zoomHor,l=this.zoomVert,h=i.plotLeft,c=i.plotTop,d=i.plotWidth,p=i.plotHeight,u=this.selectionMarker,f=this.mouseDownX,g=this.mouseDownY,m=s.panKey&&t[s.panKey+"Key"];u&&u.touch||(o<h?o=h:o>h+d&&(o=h+d),a<c?a=c:a>c+p&&(a=c+p),this.hasDragged=Math.sqrt(Math.pow(f-o,2)+Math.pow(g-a,2)),10<this.hasDragged&&(e=i.isInsidePlot(f-h,g-c),i.hasCartesianSeries&&(this.zoomX||this.zoomY)&&e&&!m&&!u&&(this.selectionMarker=u=i.renderer.rect(h,c,r?1:d,l?1:p,0).attr({class:"highcharts-selection-marker",zIndex:7}).add(),i.styledMode||u.attr({fill:s.selectionMarkerFill||n("#335cad").setOpacity(.25).get()})),u&&r&&(o-=f,u.attr({width:Math.abs(o),x:(0<o?0:o)+f})),u&&l&&(o=a-g,u.attr({height:Math.abs(o),y:(0<o?0:o)+g})),e&&!u&&s.panning&&i.pan(t,s.panning)))},drop:function(t){var e=this,i=this.chart,s=this.hasPinched;if(this.selectionMarker){var n,l={originalEvent:t,xAxis:[],yAxis:[]},d=this.selectionMarker,p=d.attr?d.attr("x"):d.x,u=d.attr?d.attr("y"):d.y,f=d.attr?d.attr("width"):d.width,g=d.attr?d.attr("height"):d.height;(this.hasDragged||s)&&(i.axes.forEach(function(i){if(i.zoomEnabled&&a(i.min)&&(s||e[{xAxis:"zoomX",yAxis:"zoomY"}[i.coll]])){var o=i.horiz,r="touchend"===t.type?i.minPixelPadding:0,h=i.toValue((o?p:u)+r),o=i.toValue((o?p+f:u+g)-r);l[i.coll].push({axis:i,min:Math.min(h,o),max:Math.max(h,o)}),n=!0}}),n&&h(i,"selection",l,function(t){i.zoom(r(t,s?{animation:!1}:null))})),c(i.index)&&(this.selectionMarker=this.selectionMarker.destroy()),s&&this.scaleGroups()}i&&c(i.index)&&(o(i.container,{cursor:i._cursor}),i.cancelClick=10<this.hasDragged,i.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[])},onContainerMouseDown:function(t){t=this.normalize(t),2!==t.button&&(this.zoomOption(t),t.preventDefault&&t.preventDefault(),this.dragStart(t))},onDocumentMouseUp:function(e){s[t.hoverChartIndex]&&s[t.hoverChartIndex].pointer.drop(e)},onDocumentMouseMove:function(t){var e=this.chart,i=this.chartPosition;t=this.normalize(t,i),!i||this.inClass(t.target,"highcharts-tracker")||e.isInsidePlot(t.chartX-e.plotLeft,t.chartY-e.plotTop)||this.reset()},onContainerMouseLeave:function(e){var i=s[t.hoverChartIndex];i&&(e.relatedTarget||e.toElement)&&(i.pointer.reset(),i.pointer.chartPosition=null)},onContainerMouseMove:function(e){var i=this.chart;a(t.hoverChartIndex)&&s[t.hoverChartIndex]&&s[t.hoverChartIndex].mouseIsDown||(t.hoverChartIndex=i.index),e=this.normalize(e),e.preventDefault||(e.returnValue=!1),"mousedown"===i.mouseIsDown&&this.drag(e),!this.inClass(e.target,"highcharts-tracker")&&!i.isInsidePlot(e.chartX-i.plotLeft,e.chartY-i.plotTop)||i.openMenu||this.runPointActions(e)},inClass:function(t,e){for(var s;t;){if(s=i(t,"class")){if(-1!==s.indexOf(e))return!0;if(-1!==s.indexOf("highcharts-container"))return!1}t=t.parentNode}},onTrackerMouseOut:function(t){var e=this.chart.hoverSeries;t=t.relatedTarget||t.toElement,this.isDirectTouch=!1,!e||!t||e.stickyTracking||this.inClass(t,"highcharts-tooltip")||this.inClass(t,"highcharts-series-"+e.index)&&this.inClass(t,"highcharts-tracker")||e.onMouseOut()},onContainerClick:function(t){var e=this.chart,i=e.hoverPoint,s=e.plotLeft,n=e.plotTop;t=this.normalize(t),e.cancelClick||(i&&this.inClass(t.target,"highcharts-tracker")?(h(i.series,"click",r(t,{point:i})),e.hoverPoint&&i.firePointEvent("click",t)):(r(t,this.getCoordinates(t)),e.isInsidePlot(t.chartX-s,t.chartY-n)&&h(e,"click",t)))},setDOMEvents:function(){var i=this,s=i.chart.container,n=s.ownerDocument;s.onmousedown=function(t){i.onContainerMouseDown(t)},s.onmousemove=function(t){i.onContainerMouseMove(t)},s.onclick=function(t){i.onContainerClick(t)},this.unbindContainerMouseLeave=e(s,"mouseleave",i.onContainerMouseLeave),t.unbindDocumentMouseUp||(t.unbindDocumentMouseUp=e(n,"mouseup",i.onDocumentMouseUp)),t.hasTouch&&(s.ontouchstart=function(t){i.onContainerTouchStart(t)},s.ontouchmove=function(t){i.onContainerTouchMove(t)},t.unbindDocumentTouchEnd||(t.unbindDocumentTouchEnd=e(n,"touchend",i.onDocumentTouchEnd)))},destroy:function(){var e=this;e.unDocMouseMove&&e.unDocMouseMove(),this.unbindContainerMouseLeave(),t.chartCount||(t.unbindDocumentMouseUp&&(t.unbindDocumentMouseUp=t.unbindDocumentMouseUp()),t.unbindDocumentTouchEnd&&(t.unbindDocumentTouchEnd=t.unbindDocumentTouchEnd())),clearInterval(e.tooltipTimeout),t.objectEach(e,function(t,i){e[i]=null})}}}),e(i,"parts/TouchPointer.js",[i["parts/Globals.js"]],function(t){var e=t.charts,i=t.extend,s=t.noop,n=t.pick;i(t.Pointer.prototype,{pinchTranslate:function(t,e,i,s,n,o){this.zoomHor&&this.pinchTranslateDirection(!0,t,e,i,s,n,o),this.zoomVert&&this.pinchTranslateDirection(!1,t,e,i,s,n,o)},pinchTranslateDirection:function(t,e,i,s,n,o,a,r){var l,h,c,d=this.chart,p=t?"x":"y",u=t?"X":"Y",f="chart"+u,g=t?"width":"height",m=d["plot"+(t?"Left":"Top")],v=r||1,x=d.inverted,y=d.bounds[t?"h":"v"],b=1===e.length,w=e[0][f],k=i[0][f],M=!b&&e[1][f],S=!b&&i[1][f];i=function(){!b&&20<Math.abs(w-M)&&(v=r||Math.abs(k-S)/Math.abs(w-M)),h=(m-k)/v+w,l=d["plot"+(t?"Width":"Height")]/v},i(),e=h,e<y.min?(e=y.min,c=!0):e+l>y.max&&(e=y.max-l,c=!0),c?(k-=.8*(k-a[p][0]),b||(S-=.8*(S-a[p][1])),i()):a[p]=[k,S],x||(o[p]=h-m,o[g]=l),o=x?1/v:v,n[g]=l,n[p]=e,s[x?t?"scaleY":"scaleX":"scale"+u]=v,s["translate"+u]=o*m+(k-o*w)},pinch:function(t){var e=this,o=e.chart,a=e.pinchDown,r=t.touches,l=r.length,h=e.lastValidTouch,c=e.hasZoom,d=e.selectionMarker,p={},u=1===l&&(e.inClass(t.target,"highcharts-tracker")&&o.runTrackerClick||e.runChartClick),f={};1<l&&(e.initiated=!0),c&&e.initiated&&!u&&t.preventDefault(),[].map.call(r,function(t){return e.normalize(t)}),"touchstart"===t.type?([].forEach.call(r,function(t,e){a[e]={chartX:t.chartX,chartY:t.chartY}}),h.x=[a[0].chartX,a[1]&&a[1].chartX],h.y=[a[0].chartY,a[1]&&a[1].chartY],o.axes.forEach(function(t){if(t.zoomEnabled){var e=o.bounds[t.horiz?"h":"v"],i=t.minPixelPadding,s=t.toPixels(n(t.options.min,t.dataMin)),a=t.toPixels(n(t.options.max,t.dataMax)),r=Math.max(s,a);e.min=Math.min(t.pos,Math.min(s,a)-i),e.max=Math.max(t.pos+t.len,r+i)}}),e.res=!0):e.followTouchMove&&1===l?this.runPointActions(e.normalize(t)):a.length&&(d||(e.selectionMarker=d=i({destroy:s,touch:!0},o.plotBox)),e.pinchTranslate(a,r,p,d,f,h),e.hasPinched=c,e.scaleGroups(p,f),e.res&&(e.res=!1,this.reset(!1,0)))},touch:function(e,i){var s,o=this.chart;o.index!==t.hoverChartIndex&&this.onContainerMouseLeave({relatedTarget:!0}),t.hoverChartIndex=o.index,1===e.touches.length?(e=this.normalize(e),o.isInsidePlot(e.chartX-o.plotLeft,e.chartY-o.plotTop)&&!o.openMenu?(i&&this.runPointActions(e),"touchmove"===e.type&&(i=this.pinchDown,s=!!i[0]&&4<=Math.sqrt(Math.pow(i[0].chartX-e.chartX,2)+Math.pow(i[0].chartY-e.chartY,2))),n(s,!0)&&this.pinch(e)):i&&this.reset()):2===e.touches.length&&this.pinch(e)},onContainerTouchStart:function(t){this.zoomOption(t),this.touch(t,!0)},onContainerTouchMove:function(t){this.touch(t)},onDocumentTouchEnd:function(i){e[t.hoverChartIndex]&&e[t.hoverChartIndex].pointer.drop(i)}})}),e(i,"parts/MSPointer.js",[i["parts/Globals.js"]],function(t){var e=t.addEvent,i=t.charts,s=t.css,n=t.doc,o=t.extend,a=t.noop,r=t.Pointer,l=t.removeEvent,h=t.win,c=t.wrap;if(!t.hasTouch&&(h.PointerEvent||h.MSPointerEvent)){var d={},p=!!h.PointerEvent,u=function(){var e=[];return e.item=function(t){return this[t]},t.objectEach(d,function(t){e.push({pageX:t.pageX,pageY:t.pageY,target:t.target})}),e},f=function(e,s,n,o){"touch"!==e.pointerType&&e.pointerType!==e.MSPOINTER_TYPE_TOUCH||!i[t.hoverChartIndex]||(o(e),o=i[t.hoverChartIndex].pointer,o[s]({type:n,target:e.currentTarget,preventDefault:a,touches:u()}))};o(r.prototype,{onContainerPointerDown:function(t){f(t,"onContainerTouchStart","touchstart",function(t){d[t.pointerId]={pageX:t.pageX,pageY:t.pageY,target:t.currentTarget}})},onContainerPointerMove:function(t){f(t,"onContainerTouchMove","touchmove",function(t){d[t.pointerId]={pageX:t.pageX,pageY:t.pageY},d[t.pointerId].target||(d[t.pointerId].target=t.currentTarget)})},onDocumentPointerUp:function(t){f(t,"onDocumentTouchEnd","touchend",function(t){delete d[t.pointerId]})},batchMSEvents:function(t){t(this.chart.container,p?"pointerdown":"MSPointerDown",this.onContainerPointerDown),t(this.chart.container,p?"pointermove":"MSPointerMove",this.onContainerPointerMove),t(n,p?"pointerup":"MSPointerUp",this.onDocumentPointerUp)}}),c(r.prototype,"init",function(t,e,i){t.call(this,e,i),this.hasZoom&&s(e.container,{"-ms-touch-action":"none","touch-action":"none"})}),c(r.prototype,"setDOMEvents",function(t){t.apply(this),(this.hasZoom||this.followTouchMove)&&this.batchMSEvents(e)}),c(r.prototype,"destroy",function(t){this.batchMSEvents(l),t.call(this)})}}),e(i,"parts/Legend.js",[i["parts/Globals.js"]],function(t){var e=t.addEvent,i=t.css,s=t.discardElement,n=t.defined,o=t.fireEvent,a=t.isFirefox,r=t.marginNames,l=t.merge,h=t.pick,c=t.setAnimation,d=t.stableSort,p=t.win,u=t.wrap;t.Legend=function(t,e){this.init(t,e)},t.Legend.prototype={init:function(t,i){this.chart=t,this.setOptions(i),i.enabled&&(this.render(),e(this.chart,"endResize",function(){this.legend.positionCheckboxes()}),this.proximate?this.unchartrender=e(this.chart,"render",function(){this.legend.proximatePositions(),this.legend.positionItems()}):this.unchartrender&&this.unchartrender())},setOptions:function(t){var e=h(t.padding,8);this.options=t,this.chart.styledMode||(this.itemStyle=t.itemStyle,this.itemHiddenStyle=l(this.itemStyle,t.itemHiddenStyle)),this.itemMarginTop=t.itemMarginTop||0,this.padding=e,this.initialItemY=e-5,this.symbolWidth=h(t.symbolWidth,16),this.pages=[],this.proximate="proximate"===t.layout&&!this.chart.inverted},update:function(t,e){var i=this.chart;this.setOptions(l(!0,this.options,t)),this.destroy(),i.isDirtyLegend=i.isDirtyBox=!0,h(e,!0)&&i.redraw(),o(this,"afterUpdate")},colorizeItem:function(t,e){if(t.legendGroup[e?"removeClass":"addClass"]("highcharts-legend-item-hidden"),!this.chart.styledMode){var i=this.options,s=t.legendItem,n=t.legendLine,a=t.legendSymbol,r=this.itemHiddenStyle.color,i=e?i.itemStyle.color:r,l=e?t.color||r:r,h=t.options&&t.options.marker,c={fill:l};s&&s.css({fill:i,color:i}),n&&n.attr({stroke:l}),a&&(h&&a.isMarker&&(c=t.pointAttribs(),e||(c.stroke=c.fill=r)),a.attr(c))}o(this,"afterColorizeItem",{item:t,visible:e})},positionItems:function(){this.allItems.forEach(this.positionItem,this),this.chart.isResizing||this.positionCheckboxes()},positionItem:function(t){var e=this.options,i=e.symbolPadding,e=!e.rtl,s=t._legendItemPos,o=s[0],s=s[1],a=t.checkbox;(t=t.legendGroup)&&t.element&&t[n(t.translateY)?"animate":"attr"]({translateX:e?o:this.legendWidth-o-2*i-4,translateY:s}),a&&(a.x=o,a.y=s)},destroyItem:function(t){var e=t.checkbox;["legendItem","legendLine","legendSymbol","legendGroup"].forEach(function(e){t[e]&&(t[e]=t[e].destroy())}),e&&s(t.checkbox)},destroy:function(){function t(t){this[t]&&(this[t]=this[t].destroy())}this.getAllItems().forEach(function(e){["legendItem","legendGroup"].forEach(t,e)}),"clipRect up down pager nav box title group".split(" ").forEach(t,this),this.display=null},positionCheckboxes:function(){var t,e=this.group&&this.group.alignAttr,s=this.clipHeight||this.legendHeight,n=this.titleHeight;e&&(t=e.translateY,this.allItems.forEach(function(o){var a,r=o.checkbox;r&&(a=t+n+r.y+(this.scrollOffset||0)+3,i(r,{left:e.translateX+o.checkboxOffset+r.x-20+"px",top:a+"px",display:this.proximate||a>t-6&&a<t+s-6?"":"none"}))},this))},renderTitle:function(){var t=this.options,e=this.padding,i=t.title,s=0;i.text&&(this.title||(this.title=this.chart.renderer.label(i.text,e-3,e-4,null,null,null,t.useHTML,null,"legend-title").attr({zIndex:1}),this.chart.styledMode||this.title.css(i.style),this.title.add(this.group)),i.width||this.title.css({width:this.maxLegendWidth+"px"}),t=this.title.getBBox(),s=t.height,this.offsetWidth=t.width,this.contentGroup.attr({translateY:s})),this.titleHeight=s},setText:function(e){var i=this.options;e.legendItem.attr({text:i.labelFormat?t.format(i.labelFormat,e,this.chart.time):i.labelFormatter.call(e)})},renderItem:function(t){var e=this.chart,i=e.renderer,s=this.options,n=this.symbolWidth,o=s.symbolPadding,a=this.itemStyle,r=this.itemHiddenStyle,c="horizontal"===s.layout?h(s.itemDistance,20):0,d=!s.rtl,p=t.legendItem,u=!t.series,f=!u&&t.series.drawLegendSymbol?t.series:t,g=f.options,g=this.createCheckboxForItem&&g&&g.showCheckbox,c=n+o+c+(g?20:0),m=s.useHTML,v=t.options.className;p||(t.legendGroup=i.g("legend-item").addClass("highcharts-"+f.type+"-series highcharts-color-"+t.colorIndex+(v?" "+v:"")+(u?" highcharts-series-"+t.index:"")).attr({zIndex:1}).add(this.scrollGroup),t.legendItem=p=i.text("",d?n+o:-o,this.baseline||0,m),e.styledMode||p.css(l(t.visible?a:r)),p.attr({align:d?"left":"right",zIndex:2}).add(t.legendGroup),this.baseline||(this.fontMetrics=i.fontMetrics(e.styledMode?12:a.fontSize,p),this.baseline=this.fontMetrics.f+3+this.itemMarginTop,p.attr("y",this.baseline)),this.symbolHeight=s.symbolHeight||this.fontMetrics.f,f.drawLegendSymbol(this,t),this.setItemEvents&&this.setItemEvents(t,p,m)),g&&!t.checkbox&&this.createCheckboxForItem(t),this.colorizeItem(t,t.visible),!e.styledMode&&a.width||p.css({width:(s.itemWidth||this.widthOption||e.spacingBox.width)-c}),this.setText(t),e=p.getBBox(),t.itemWidth=t.checkboxOffset=s.itemWidth||t.legendItemWidth||e.width+c,this.maxItemWidth=Math.max(this.maxItemWidth,t.itemWidth),this.totalItemWidth+=t.itemWidth,this.itemHeight=t.itemHeight=Math.round(t.legendItemHeight||e.height||this.symbolHeight)},layoutItem:function(t){var e=this.options,i=this.padding,s="horizontal"===e.layout,n=t.itemHeight,o=e.itemMarginBottom||0,a=this.itemMarginTop,r=s?h(e.itemDistance,20):0,l=this.maxLegendWidth,e=e.alignColumns&&this.totalItemWidth>l?this.maxItemWidth:t.itemWidth;s&&this.itemX-i+e>l&&(this.itemX=i,this.lastLineHeight&&(this.itemY+=a+this.lastLineHeight+o),this.lastLineHeight=0),this.lastItemY=a+this.itemY+o,this.lastLineHeight=Math.max(n,this.lastLineHeight),t._legendItemPos=[this.itemX,this.itemY],s?this.itemX+=e:(this.itemY+=a+n+o,this.lastLineHeight=n),this.offsetWidth=this.widthOption||Math.max((s?this.itemX-i-(t.checkbox?0:r):e)+i,this.offsetWidth)},getAllItems:function(){var t=[];return this.chart.series.forEach(function(e){var i=e&&e.options;e&&h(i.showInLegend,!n(i.linkedTo)&&void 0,!0)&&(t=t.concat(e.legendItems||("point"===i.legendType?e.data:e)))}),o(this,"afterGetAllItems",{allItems:t}),t},getAlignment:function(){var t=this.options;return this.proximate?t.align.charAt(0)+"tv":t.floating?"":t.align.charAt(0)+t.verticalAlign.charAt(0)+t.layout.charAt(0)},adjustMargins:function(t,e){var i=this.chart,s=this.options,o=this.getAlignment(),a=void 0!==i.options.title.margin?i.titleOffset+i.options.title.margin:0;o&&[/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/].forEach(function(l,c){l.test(o)&&!n(t[c])&&(i[r[c]]=Math.max(i[r[c]],i.legend[(c+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][c]*s[c%2?"x":"y"]+h(s.margin,12)+e[c]+(0===c&&(0===i.titleOffset?0:a))))})},proximatePositions:function(){var e=this.chart,i=[],s="left"===this.options.align;this.allItems.forEach(function(n){var o,a;a=s;var r;n.yAxis&&n.points&&(n.xAxis.options.reversed&&(a=!a),o=t.find(a?n.points:n.points.slice(0).reverse(),function(e){return t.isNumber(e.plotY)}),a=n.legendGroup.getBBox().height,r=n.yAxis.top-e.plotTop,n.visible?(o=o?o.plotY:n.yAxis.height,o+=r-.3*a):o=r+n.yAxis.height,i.push({target:o,size:a,item:n}))},this),t.distribute(i,e.plotHeight),i.forEach(function(t){t.item._legendItemPos[1]=e.plotTop-e.spacing[0]+t.pos})},render:function(){var e,i,s,n=this.chart,a=n.renderer,r=this.group,h=this.box,c=this.options,p=this.padding;this.itemX=p,this.itemY=this.initialItemY,this.lastItemY=this.offsetWidth=0,this.widthOption=t.relativeLength(c.width,n.spacingBox.width-p),e=n.spacingBox.width-2*p-c.x,-1<["rm","lm"].indexOf(this.getAlignment().substring(0,2))&&(e/=2),this.maxLegendWidth=this.widthOption||e,r||(this.group=r=a.g("legend").attr({zIndex:7}).add(),this.contentGroup=a.g().attr({zIndex:1}).add(r),this.scrollGroup=a.g().add(this.contentGroup)),this.renderTitle(),e=this.getAllItems(),d(e,function(t,e){return(t.options&&t.options.legendIndex||0)-(e.options&&e.options.legendIndex||0)}),c.reversed&&e.reverse(),this.allItems=e,this.display=i=!!e.length,this.itemHeight=this.totalItemWidth=this.maxItemWidth=this.lastLineHeight=0,e.forEach(this.renderItem,this),e.forEach(this.layoutItem,this),e=(this.widthOption||this.offsetWidth)+p,s=this.lastItemY+this.lastLineHeight+this.titleHeight,s=this.handleOverflow(s),s+=p,h||(this.box=h=a.rect().addClass("highcharts-legend-box").attr({r:c.borderRadius}).add(r),h.isNew=!0),n.styledMode||h.attr({stroke:c.borderColor,"stroke-width":c.borderWidth||0,fill:c.backgroundColor||"none"}).shadow(c.shadow),0<e&&0<s&&(h[h.isNew?"attr":"animate"](h.crisp.call({},{x:0,y:0,width:e,height:s},h.strokeWidth())),h.isNew=!1),h[i?"show":"hide"](),n.styledMode&&"none"===r.getStyle("display")&&(e=s=0),this.legendWidth=e,this.legendHeight=s,i&&(a=n.spacingBox,/(lth|ct|rth)/.test(this.getAlignment())&&(h=a.y+n.titleOffset,a=l(a,{y:0<n.titleOffset?h+=n.options.title.margin:h})),r.align(l(c,{width:e,height:s,verticalAlign:this.proximate?"top":c.verticalAlign}),!0,a)),this.proximate||this.positionItems(),o(this,"afterRender")},handleOverflow:function(t){var e,i,s=this,n=this.chart,o=n.renderer,a=this.options,r=a.y,l=this.padding,r=n.spacingBox.height+("top"===a.verticalAlign?-r:r)-l,c=a.maxHeight,d=this.clipRect,p=a.navigation,u=h(p.animation,!0),f=p.arrowSize||12,g=this.nav,m=this.pages,v=this.allItems,x=function(t){"number"==typeof t?d.attr({height:t}):d&&(s.clipRect=d.destroy(),s.contentGroup.clip()),s.contentGroup.div&&(s.contentGroup.div.style.clip=t?"rect("+l+"px,9999px,"+(l+t)+"px,0)":"auto")},y=function(t){return s[t]=o.circle(0,0,1.3*f).translate(f/2,f/2).add(g),n.styledMode||s[t].attr("fill","rgba(0,0,0,0.0001)"),s[t]};return"horizontal"!==a.layout||"middle"===a.verticalAlign||a.floating||(r/=2),c&&(r=Math.min(r,c)),m.length=0,t>r&&!1!==p.enabled?(this.clipHeight=e=Math.max(r-20-this.titleHeight-l,0),this.currentPage=h(this.currentPage,1),this.fullHeight=t,v.forEach(function(t,s){var n=t._legendItemPos[1],o=Math.round(t.legendItem.getBBox().height),a=m.length;(!a||n-m[a-1]>e&&(i||n)!==m[a-1])&&(m.push(i||n),a++),t.pageIx=a-1,i&&(v[s-1].pageIx=a-1),s===v.length-1&&n+o-m[a-1]>e&&n!==i&&(m.push(n),t.pageIx=a),n!==i&&(i=n)}),d||(d=s.clipRect=o.clipRect(0,l,9999,0),s.contentGroup.clip(d)),x(e),g||(this.nav=g=o.g().attr({zIndex:1}).add(this.group),this.up=o.symbol("triangle",0,0,f,f).add(g),y("upTracker").on("click",function(){s.scroll(-1,u)}),this.pager=o.text("",15,10).addClass("highcharts-legend-navigation"),n.styledMode||this.pager.css(p.style),this.pager.add(g),this.down=o.symbol("triangle-down",0,0,f,f).add(g),y("downTracker").on("click",function(){s.scroll(1,u)})),s.scroll(0),t=r):g&&(x(),this.nav=g.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0),t},scroll:function(t,e){var i=this.pages,s=i.length,n=this.currentPage+t;t=this.clipHeight;var o=this.options.navigation,a=this.pager,r=this.padding;n>s&&(n=s),0<n&&(void 0!==e&&c(e,this.chart),this.nav.attr({translateX:r,translateY:t+this.padding+7+this.titleHeight,visibility:"visible"}),[this.up,this.upTracker].forEach(function(t){t.attr({class:1===n?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})}),a.attr({text:n+"/"+s}),[this.down,this.downTracker].forEach(function(t){t.attr({x:18+this.pager.getBBox().width,class:n===s?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})},this),this.chart.styledMode||(this.up.attr({fill:1===n?o.inactiveColor:o.activeColor}),this.upTracker.css({cursor:1===n?"default":"pointer"}),this.down.attr({fill:n===s?o.inactiveColor:o.activeColor}),this.downTracker.css({cursor:n===s?"default":"pointer"})),this.scrollOffset=-i[n-1]+this.initialItemY,this.scrollGroup.animate({translateY:this.scrollOffset}),this.currentPage=n,this.positionCheckboxes())}},t.LegendSymbolMixin={drawRectangle:function(t,e){var i=t.symbolHeight,s=t.options.squareSymbol;e.legendSymbol=this.chart.renderer.rect(s?(t.symbolWidth-i)/2:0,t.baseline-i+1,s?i:t.symbolWidth,i,h(t.options.symbolRadius,i/2)).addClass("highcharts-point").attr({zIndex:3}).add(e.legendGroup)},drawLineMarker:function(t){var e=this.options,i=e.marker,s=t.symbolWidth,n=t.symbolHeight,o=n/2,a=this.chart.renderer,r=this.legendGroup;t=t.baseline-Math.round(.3*t.fontMetrics.b);var c={};this.chart.styledMode||(c={"stroke-width":e.lineWidth||0},e.dashStyle&&(c.dashstyle=e.dashStyle)),this.legendLine=a.path(["M",0,t,"L",s,t]).addClass("highcharts-graph").attr(c).add(r),i&&!1!==i.enabled&&s&&(e=Math.min(h(i.radius,o),o),0===this.symbol.indexOf("url")&&(i=l(i,{width:n,height:n}),e=0),this.legendSymbol=i=a.symbol(this.symbol,s/2-e,t-e,2*e,2*e,i).addClass("highcharts-point").add(r),i.isMarker=!0)}},(/Trident\/7\.0/.test(p.navigator&&p.navigator.userAgent)||a)&&u(t.Legend.prototype,"positionItem",function(t,e){var i=this,s=function(){e._legendItemPos&&t.call(i,e)};s(),i.bubbleLegend||setTimeout(s)})}),e(i,"parts/Chart.js",[i["parts/Globals.js"]],function(t){var e=t.addEvent,i=t.animate,s=t.animObject,n=t.attr,o=t.doc,a=t.Axis,r=t.createElement,l=t.defaultOptions,h=t.discardElement,c=t.charts,d=t.css,p=t.defined,u=t.extend,f=t.find,g=t.fireEvent,m=t.isNumber,v=t.isObject,x=t.isString,y=t.Legend,b=t.marginNames,w=t.merge,k=t.objectEach,M=t.Pointer,S=t.pick,T=t.pInt,C=t.removeEvent,A=t.seriesTypes,E=t.splat,P=t.syncTimeout,O=t.win,L=t.Chart=function(){this.getArgs.apply(this,arguments)};t.chart=function(t,e,i){return new L(t,e,i)},u(L.prototype,{callbacks:[],getArgs:function(){var t=[].slice.call(arguments);(x(t[0])||t[0].nodeName)&&(this.renderTo=t.shift()),this.init(t[0],t[1])},init:function(i,s){var n,o=i.series,a=i.plotOptions||{};g(this,"init",{args:arguments},function(){i.series=null,n=w(l,i),k(n.plotOptions,function(t,e){v(t)&&(t.tooltip=a[e]&&w(a[e].tooltip)||void 0)}),n.tooltip.userOptions=i.chart&&i.chart.forExport&&i.tooltip.userOptions||i.tooltip,n.series=i.series=o,this.userOptions=i;var r=n.chart,h=r.events;this.margin=[],this.spacing=[],this.bounds={h:{},v:{}},this.labelCollectors=[],this.callback=s,this.isResizing=0,this.options=n,this.axes=[],this.series=[],this.time=i.time&&Object.keys(i.time).length?new t.Time(i.time):t.time,this.styledMode=r.styledMode,this.hasCartesianSeries=r.showAxes;var d=this;d.index=c.length,c.push(d),t.chartCount++,h&&k(h,function(t,i){e(d,i,t)}),d.xAxis=[],d.yAxis=[],d.pointCount=d.colorCounter=d.symbolCounter=0,g(d,"afterInit"),d.firstRender()})},initSeries:function(e){var i=this.options.chart;return(i=A[e.type||i.type||i.defaultSeriesType])||t.error(17,!0,this),i=new i,i.init(this,e),i},orderSeries:function(t){var e=this.series;for(t=t||0;t<e.length;t++)e[t]&&(e[t].index=t,e[t].name=e[t].getName())},isInsidePlot:function(t,e,i){var s=i?e:t;return t=i?t:e,0<=s&&s<=this.plotWidth&&0<=t&&t<=this.plotHeight},redraw:function(e){g(this,"beforeRedraw");var i,s,n,o=this.axes,a=this.series,r=this.pointer,l=this.legend,h=this.userOptions.legend,c=this.isDirtyLegend,d=this.hasCartesianSeries,p=this.isDirtyBox,f=this.renderer,m=f.isHidden(),v=[];for(this.setResponsive&&this.setResponsive(!1),t.setAnimation(e,this),m&&this.temporaryDisplay(),this.layOutTitles(),e=a.length;e--;)if(n=a[e],n.options.stacking&&(i=!0,n.isDirty)){s=!0;break}if(s)for(e=a.length;e--;)n=a[e],n.options.stacking&&(n.isDirty=!0);a.forEach(function(t){t.isDirty&&("point"===t.options.legendType?(t.updateTotals&&t.updateTotals(),c=!0):h&&(h.labelFormatter||h.labelFormat)&&(c=!0)),t.isDirtyData&&g(t,"updatedData")}),c&&l&&l.options.enabled&&(l.render(),this.isDirtyLegend=!1),i&&this.getStacks(),d&&o.forEach(function(t){t.updateNames(),t.setScale()}),this.getMargins(),d&&(o.forEach(function(t){t.isDirty&&(p=!0)}),o.forEach(function(t){var e=t.min+","+t.max;t.extKey!==e&&(t.extKey=e,v.push(function(){g(t,"afterSetExtremes",u(t.eventArgs,t.getExtremes())),delete t.eventArgs})),(p||i)&&t.redraw()})),p&&this.drawChartBox(),g(this,"predraw"),a.forEach(function(t){(p||t.isDirty)&&t.visible&&t.redraw(),t.isDirtyData=!1}),r&&r.reset(!0),f.draw(),g(this,"redraw"),g(this,"render"),m&&this.temporaryDisplay(!0),v.forEach(function(t){t.call()})},get:function(t){function e(e){return e.id===t||e.options&&e.options.id===t}var i,s,n=this.series;for(i=f(this.axes,e)||f(this.series,e),s=0;!i&&s<n.length;s++)i=f(n[s].points||[],e);return i},getAxes:function(){var t=this,e=this.options,i=e.xAxis=E(e.xAxis||{}),e=e.yAxis=E(e.yAxis||{});g(this,"getAxes"),i.forEach(function(t,e){t.index=e,t.isX=!0}),e.forEach(function(t,e){t.index=e}),i.concat(e).forEach(function(e){new a(t,e)}),g(this,"afterGetAxes")},getSelectedPoints:function(){var t=[];return this.series.forEach(function(e){t=t.concat((e[e.hasGroupedData?"points":"data"]||[]).filter(function(t){return t.selected}))}),t},getSelectedSeries:function(){return this.series.filter(function(t){return t.selected})},setTitle:function(t,e,i){var s,n=this,o=n.options,a=n.styledMode;s=o.title=w(!a&&{style:{color:"#333333",fontSize:o.isStock?"16px":"18px"}},o.title,t),o=o.subtitle=w(!a&&{style:{color:"#666666"}},o.subtitle,e),[["title",t,s],["subtitle",e,o]].forEach(function(t,e){var i=t[0],s=n[i],o=t[1];t=t[2],s&&o&&(n[i]=s=s.destroy()),t&&!s&&(n[i]=n.renderer.text(t.text,0,0,t.useHTML).attr({align:t.align,class:"highcharts-"+i,zIndex:t.zIndex||4}).add(),n[i].update=function(t){n.setTitle(!e&&t,e&&t)},a||n[i].css(t.style))}),n.layOutTitles(i)},layOutTitles:function(t){var e,i=0,s=this.renderer,n=this.spacingBox;["title","subtitle"].forEach(function(t){var e=this[t],o=this.options[t];t="title"===t?-3:o.verticalAlign?0:i+2;var a;e&&(this.styledMode||(a=o.style.fontSize),a=s.fontMetrics(a,e).b,e.css({width:(o.width||n.width+o.widthAdjust)+"px"}).align(u({y:t+a},o),!1,"spacingBox"),o.floating||o.verticalAlign||(i=Math.ceil(i+e.getBBox(o.useHTML).height)))},this),e=this.titleOffset!==i,this.titleOffset=i,!this.isDirtyBox&&e&&(this.isDirtyBox=this.isDirtyLegend=e,this.hasRendered&&S(t,!0)&&this.isDirtyBox&&this.redraw())},getChartSize:function(){var e=this.options.chart,i=e.width,e=e.height,s=this.renderTo;p(i)||(this.containerWidth=t.getStyle(s,"width")),p(e)||(this.containerHeight=t.getStyle(s,"height")),this.chartWidth=Math.max(0,i||this.containerWidth||600),this.chartHeight=Math.max(0,t.relativeLength(e,this.chartWidth)||(1<this.containerHeight?this.containerHeight:400))},temporaryDisplay:function(e){var i=this.renderTo;if(e)for(;i&&i.style;)i.hcOrigStyle&&(t.css(i,i.hcOrigStyle),delete i.hcOrigStyle),i.hcOrigDetached&&(o.body.removeChild(i),i.hcOrigDetached=!1),i=i.parentNode;else for(;i&&i.style&&(o.body.contains(i)||i.parentNode||(i.hcOrigDetached=!0,o.body.appendChild(i)),("none"===t.getStyle(i,"display",!1)||i.hcOricDetached)&&(i.hcOrigStyle={display:i.style.display,height:i.style.height,overflow:i.style.overflow},e={display:"block",overflow:"hidden"},i!==this.renderTo&&(e.height=0),t.css(i,e),i.offsetWidth||i.style.setProperty("display","block","important")),(i=i.parentNode)!==o.body););},setClassName:function(t){this.container.className="highcharts-container "+(t||"")},getContainer:function(){var e,i,s,a=this.options,l=a.chart;e=this.renderTo;var h,p,f=t.uniqueKey();if(e||(this.renderTo=e=l.renderTo),x(e)&&(this.renderTo=e=o.getElementById(e)),e||t.error(13,!0,this),i=T(n(e,"data-highcharts-chart")),m(i)&&c[i]&&c[i].hasRendered&&c[i].destroy(),n(e,"data-highcharts-chart",this.index),e.innerHTML="",l.skipClone||e.offsetWidth||this.temporaryDisplay(),this.getChartSize(),i=this.chartWidth,s=this.chartHeight,d(e,{overflow:"hidden"}),this.styledMode||(h=u({position:"relative",overflow:"hidden",width:i+"px",height:s+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)"},l.style)),this.container=e=r("div",{id:f},h,e),this._cursor=e.style.cursor,this.renderer=new(t[l.renderer]||t.Renderer)(e,i,s,null,l.forExport,a.exporting&&a.exporting.allowHTML,this.styledMode),this.setClassName(l.className),this.styledMode)for(p in a.defs)this.renderer.definition(a.defs[p]);else this.renderer.setStyle(l.style);this.renderer.chartIndex=this.index,g(this,"afterGetContainer")},getMargins:function(t){var e=this.spacing,i=this.margin,s=this.titleOffset;this.resetMargins(),s&&!p(i[0])&&(this.plotTop=Math.max(this.plotTop,s+this.options.title.margin+e[0])),this.legend&&this.legend.display&&this.legend.adjustMargins(i,e),g(this,"getMargins"),t||this.getAxisMargins()},getAxisMargins:function(){var t=this,e=t.axisOffset=[0,0,0,0],i=t.margin;t.hasCartesianSeries&&t.axes.forEach(function(t){t.visible&&t.getOffset()}),b.forEach(function(s,n){p(i[n])||(t[s]+=e[n])}),t.setChartSize()},reflow:function(e){var i=this,s=i.options.chart,n=i.renderTo,a=p(s.width)&&p(s.height),r=s.width||t.getStyle(n,"width"),s=s.height||t.getStyle(n,"height"),n=e?e.target:O;a||i.isPrinting||!r||!s||n!==O&&n!==o||(r===i.containerWidth&&s===i.containerHeight||(t.clearTimeout(i.reflowTimeout),i.reflowTimeout=P(function(){i.container&&i.setSize(void 0,void 0,!1)},e?100:0)),i.containerWidth=r,i.containerHeight=s)},setReflow:function(t){var i=this;!1===t||this.unbindReflow?!1===t&&this.unbindReflow&&(this.unbindReflow=this.unbindReflow()):(this.unbindReflow=e(O,"resize",function(t){i.reflow(t)}),e(this,"destroy",this.unbindReflow))},setSize:function(e,n,o){var a,r=this,l=r.renderer;r.isResizing+=1,t.setAnimation(o,r),r.oldChartHeight=r.chartHeight,r.oldChartWidth=r.chartWidth,void 0!==e&&(r.options.chart.width=e),void 0!==n&&(r.options.chart.height=n),r.getChartSize(),r.styledMode||(a=l.globalAnimation,(a?i:d)(r.container,{width:r.chartWidth+"px",height:r.chartHeight+"px"},a)),r.setChartSize(!0),l.setSize(r.chartWidth,r.chartHeight,o),r.axes.forEach(function(t){t.isDirty=!0,t.setScale()}),r.isDirtyLegend=!0,r.isDirtyBox=!0,r.layOutTitles(),r.getMargins(),r.redraw(o),r.oldChartHeight=null,g(r,"resize"),P(function(){r&&g(r,"endResize",null,function(){--r.isResizing})},s(a).duration)},setChartSize:function(t){var e,i,s,n,o=this.inverted,a=this.renderer,r=this.chartWidth,l=this.chartHeight,h=this.options.chart,c=this.spacing,d=this.clipOffset;this.plotLeft=e=Math.round(this.plotLeft),this.plotTop=i=Math.round(this.plotTop),this.plotWidth=s=Math.max(0,Math.round(r-e-this.marginRight)),this.plotHeight=n=Math.max(0,Math.round(l-i-this.marginBottom)),this.plotSizeX=o?n:s,this.plotSizeY=o?s:n,this.plotBorderWidth=h.plotBorderWidth||0,this.spacingBox=a.spacingBox={x:c[3],y:c[0],width:r-c[3]-c[1],height:l-c[0]-c[2]},this.plotBox=a.plotBox={x:e,y:i,width:s,height:n},r=2*Math.floor(this.plotBorderWidth/2),o=Math.ceil(Math.max(r,d[3])/2),a=Math.ceil(Math.max(r,d[0])/2),this.clipBox={x:o,y:a,width:Math.floor(this.plotSizeX-Math.max(r,d[1])/2-o),height:Math.max(0,Math.floor(this.plotSizeY-Math.max(r,d[2])/2-a))},t||this.axes.forEach(function(t){t.setAxisSize(),t.setAxisTranslation()}),g(this,"afterSetChartSize",{skipAxes:t})},resetMargins:function(){g(this,"resetMargins");var t=this,e=t.options.chart;["margin","spacing"].forEach(function(i){var s=e[i],n=v(s)?s:[s,s,s,s];["Top","Right","Bottom","Left"].forEach(function(s,o){t[i][o]=S(e[i+s],n[o])})}),b.forEach(function(e,i){t[e]=S(t.margin[i],t.spacing[i])}),t.axisOffset=[0,0,0,0],t.clipOffset=[0,0,0,0]},drawChartBox:function(){var t,e,i=this.options.chart,s=this.renderer,n=this.chartWidth,o=this.chartHeight,a=this.chartBackground,r=this.plotBackground,l=this.plotBorder,h=this.styledMode,c=this.plotBGImage,d=i.backgroundColor,p=i.plotBackgroundColor,u=i.plotBackgroundImage,f=this.plotLeft,m=this.plotTop,v=this.plotWidth,x=this.plotHeight,y=this.plotBox,b=this.clipRect,w=this.clipBox,k="animate";a||(this.chartBackground=a=s.rect().addClass("highcharts-background").add(),k="attr"),h?t=e=a.strokeWidth():(t=i.borderWidth||0,e=t+(i.shadow?8:0),d={fill:d||"none"},(t||a["stroke-width"])&&(d.stroke=i.borderColor,d["stroke-width"]=t),a.attr(d).shadow(i.shadow)),a[k]({x:e/2,y:e/2,width:n-e-t%2,height:o-e-t%2,r:i.borderRadius}),k="animate",r||(k="attr",this.plotBackground=r=s.rect().addClass("highcharts-plot-background").add()),r[k](y),h||(r.attr({fill:p||"none"}).shadow(i.plotShadow),u&&(c?c.animate(y):this.plotBGImage=s.image(u,f,m,v,x).add())),b?b.animate({width:w.width,height:w.height}):this.clipRect=s.clipRect(w),k="animate",l||(k="attr",this.plotBorder=l=s.rect().addClass("highcharts-plot-border").attr({zIndex:1}).add()),h||l.attr({stroke:i.plotBorderColor,"stroke-width":i.plotBorderWidth||0,fill:"none"}),l[k](l.crisp({x:f,y:m,width:v,height:x},-l.strokeWidth())),this.isDirtyBox=!1,g(this,"afterDrawChartBox")},propFromSeries:function(){var t,e,i,s=this,n=s.options.chart,o=s.options.series;["inverted","angular","polar"].forEach(function(a){for(t=A[n.type||n.defaultSeriesType],i=n[a]||t&&t.prototype[a],e=o&&o.length;!i&&e--;)(t=A[o[e].type])&&t.prototype[a]&&(i=!0);s[a]=i})},linkSeries:function(){var t=this,e=t.series;e.forEach(function(t){t.linkedSeries.length=0}),e.forEach(function(e){var i=e.options.linkedTo;x(i)&&(i=":previous"===i?t.series[e.index-1]:t.get(i))&&i.linkedParent!==e&&(i.linkedSeries.push(e),e.linkedParent=i,e.visible=S(e.options.visible,i.options.visible,e.visible))}),g(this,"afterLinkSeries")},renderSeries:function(){this.series.forEach(function(t){t.translate(),t.render()})},renderLabels:function(){var t=this,e=t.options.labels;e.items&&e.items.forEach(function(i){var s=u(e.style,i.style),n=T(s.left)+t.plotLeft,o=T(s.top)+t.plotTop+12;delete s.left,delete s.top,t.renderer.text(i.html,n,o).attr({zIndex:2}).css(s).add()})},render:function(){var t,e,i,s=this.axes,n=this.renderer,o=this.options,a=0;this.setTitle(),this.legend=new y(this,o.legend),this.getStacks&&this.getStacks(),this.getMargins(!0),this.setChartSize(),o=this.plotWidth,s.some(function(t){if(t.horiz&&t.visible&&t.options.labels.enabled&&t.series.length)return a=21,!0}),t=this.plotHeight=Math.max(this.plotHeight-a,0),s.forEach(function(t){t.setScale()}),this.getAxisMargins(),e=1.1<o/this.plotWidth,i=1.05<t/this.plotHeight,(e||i)&&(s.forEach(function(t){(t.horiz&&e||!t.horiz&&i)&&t.setTickInterval(!0)}),this.getMargins()),this.drawChartBox(),this.hasCartesianSeries&&s.forEach(function(t){t.visible&&t.render()}),this.seriesGroup||(this.seriesGroup=n.g("series-group").attr({zIndex:3}).add()),this.renderSeries(),this.renderLabels(),this.addCredits(),this.setResponsive&&this.setResponsive(),this.hasRendered=!0},addCredits:function(t){var e=this;t=w(!0,this.options.credits,t),t.enabled&&!this.credits&&(this.credits=this.renderer.text(t.text+(this.mapCredits||""),0,0).addClass("highcharts-credits").on("click",function(){t.href&&(O.location.href=t.href)}).attr({align:t.position.align,zIndex:8}),e.styledMode||this.credits.css(t.style),this.credits.add().align(t.position),this.credits.update=function(t){e.credits=e.credits.destroy(),e.addCredits(t)})},destroy:function(){var e,i=this,s=i.axes,n=i.series,o=i.container,a=o&&o.parentNode;for(g(i,"destroy"),i.renderer.forExport?t.erase(c,i):c[i.index]=void 0,t.chartCount--,i.renderTo.removeAttribute("data-highcharts-chart"),C(i),e=s.length;e--;)s[e]=s[e].destroy();for(this.scroller&&this.scroller.destroy&&this.scroller.destroy(),e=n.length;e--;)n[e]=n[e].destroy();"title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" ").forEach(function(t){var e=i[t];e&&e.destroy&&(i[t]=e.destroy())}),o&&(o.innerHTML="",C(o),a&&h(o)),k(i,function(t,e){delete i[e]})},firstRender:function(){var e=this,i=e.options;e.isReadyToRender&&!e.isReadyToRender()||(e.getContainer(),e.resetMargins(),e.setChartSize(),e.propFromSeries(),e.getAxes(),(t.isArray(i.series)?i.series:[]).forEach(function(t){e.initSeries(t)}),e.linkSeries(),g(e,"beforeRender"),M&&(e.pointer=new M(e,i)),e.render(),!e.renderer.imgCount&&e.onload&&e.onload(),e.temporaryDisplay(!0))},onload:function(){[this.callback].concat(this.callbacks).forEach(function(t){t&&void 0!==this.index&&t.apply(this,[this])},this),g(this,"load"),g(this,"render"),p(this.index)&&this.setReflow(this.options.chart.reflow),this.onload=null}})}),e(i,"parts/ScrollablePlotArea.js",[i["parts/Globals.js"]],function(t){var e=t.addEvent,i=t.Chart;e(i,"afterSetChartSize",function(e){var i=this.options.chart.scrollablePlotArea;(i=i&&i.minWidth)&&!this.renderer.forExport&&(this.scrollablePixels=i=Math.max(0,i-this.chartWidth))&&(this.plotWidth+=i,this.clipBox.width+=i,e.skipAxes||this.axes.forEach(function(e){1===e.side?e.getPlotLinePath=function(){var i,s=this.right;return this.right=s-e.chart.scrollablePixels,i=t.Axis.prototype.getPlotLinePath.apply(this,arguments),this.right=s,i}:(e.setAxisSize(),e.setAxisTranslation())}))}),e(i,"render",function(){this.scrollablePixels?(this.setUpScrolling&&this.setUpScrolling(),this.applyFixed()):this.fixedDiv&&this.applyFixed()}),i.prototype.setUpScrolling=function(){this.scrollingContainer=t.createElement("div",{className:"highcharts-scrolling"},{overflowX:"auto",WebkitOverflowScrolling:"touch"},this.renderTo),this.innerContainer=t.createElement("div",{className:"highcharts-inner-container"},null,this.scrollingContainer),this.innerContainer.appendChild(this.container),this.setUpScrolling=null},i.prototype.moveFixedElements=function(){var t=this.container,e=this.fixedRenderer;[this.inverted?".highcharts-xaxis":".highcharts-yaxis",this.inverted?".highcharts-xaxis-labels":".highcharts-yaxis-labels",".highcharts-contextbutton",".highcharts-credits",".highcharts-legend",".highcharts-reset-zoom",".highcharts-subtitle",".highcharts-title",".highcharts-legend-checkbox"].forEach(function(i){[].forEach.call(t.querySelectorAll(i),function(t){(t.namespaceURI===e.SVG_NS?e.box:e.box.parentNode).appendChild(t),t.style.pointerEvents="auto"})})},i.prototype.applyFixed=function(){var i,s=!this.fixedDiv,n=this.options.chart.scrollablePlotArea;s&&(this.fixedDiv=t.createElement("div",{className:"highcharts-fixed"},{position:"absolute",overflow:"hidden",pointerEvents:"none",zIndex:2},null,!0),this.renderTo.insertBefore(this.fixedDiv,this.renderTo.firstChild),this.renderTo.style.overflow="visible",this.fixedRenderer=i=new t.Renderer(this.fixedDiv,0,0),this.scrollableMask=i.path().attr({fill:t.color(this.options.chart.backgroundColor||"#fff").setOpacity(t.pick(n.opacity,.85)).get(),zIndex:-1}).addClass("highcharts-scrollable-mask").add(),this.moveFixedElements(),e(this,"afterShowResetZoom",this.moveFixedElements)),this.fixedRenderer.setSize(this.chartWidth,this.chartHeight),i=this.chartWidth+this.scrollablePixels,t.stop(this.container),this.container.style.width=i+"px",this.renderer.boxWrapper.attr({width:i,height:this.chartHeight,viewBox:[0,0,i,this.chartHeight].join(" ")}),this.chartBackground.attr({width:i}),s&&n.scrollPositionX&&(this.scrollingContainer.scrollLeft=this.scrollablePixels*n.scrollPositionX),n=this.axisOffset,s=this.plotTop-n[0]-1,n=this.plotTop+this.plotHeight+n[2],i=this.plotLeft+this.plotWidth-this.scrollablePixels,this.scrollableMask.attr({d:this.scrollablePixels?["M",0,s,"L",this.plotLeft-1,s,"L",this.plotLeft-1,n,"L",0,n,"Z","M",i,s,"L",this.chartWidth,s,"L",this.chartWidth,n,"L",i,n,"Z"]:["M",0,0]})}}),e(i,"parts/Point.js",[i["parts/Globals.js"]],function(t){var e,i=t.extend,s=t.erase,o=t.fireEvent,a=t.format,r=t.isArray,l=t.isNumber,h=t.pick,c=t.uniqueKey,d=t.defined,p=t.removeEvent;t.Point=e=function(){},t.Point.prototype={init:function(t,e,i){return this.series=t,this.applyOptions(e,i),this.id=d(this.id)?this.id:c(),this.resolveColor(),t.chart.pointCount++,o(this,"afterInit"),this},resolveColor:function(){var t,e=this.series;t=e.chart.options.chart.colorCount;var i=e.chart.styledMode;i||this.options.color||(this.color=e.color),e.options.colorByPoint?(i||(t=e.options.colors||e.chart.options.colors,this.color=this.color||t[e.colorCounter],t=t.length),i=e.colorCounter,++e.colorCounter===t&&(e.colorCounter=0)):i=e.colorIndex,this.colorIndex=h(this.colorIndex,i)},applyOptions:function(t,s){var n=this.series,o=n.options.pointValKey||n.pointValKey;return t=e.prototype.optionsToObject.call(this,t),i(this,t),this.options=this.options?i(this.options,t):t,t.group&&delete this.group,t.dataLabels&&delete this.dataLabels,o&&(this.y=this[o]),(this.isNull=h(this.isValid&&!this.isValid(),null===this.x||!l(this.y,!0)))&&(this.formatPrefix="null"),this.selected&&(this.state="select"),"name"in this&&void 0===s&&n.xAxis&&n.xAxis.hasNames&&(this.x=n.xAxis.nameToX(this)),void 0===this.x&&n&&(this.x=void 0===s?n.autoIncrement(this):s),this},setNestedProperty:function(e,i,s){return s.split(".").reduce(function(e,s,n,o){return e[s]=o.length-1===n?i:t.isObject(e[s],!0)?e[s]:{},e[s]},e),e},optionsToObject:function(e){var i={},s=this.series,o=s.options.keys,a=o||s.pointArrayMap||["y"],h=a.length,c=0,d=0;if(l(e)||null===e)i[a[0]]=e;else if(r(e))for(!o&&e.length>h&&(s=n(e[0]),"string"===s?i.name=e[0]:"number"===s&&(i.x=e[0]),c++);d<h;)o&&void 0===e[c]||(0<a[d].indexOf(".")?t.Point.prototype.setNestedProperty(i,e[c],a[d]):i[a[d]]=e[c]),c++,d++;else"object"===(void 0===e?"undefined":n(e))&&(i=e,e.dataLabels&&(s._hasPointLabels=!0),e.marker&&(s._hasPointMarkers=!0));return i},getClassName:function(){return"highcharts-point"+(this.selected?" highcharts-point-select":"")+(this.negative?" highcharts-negative":"")+(this.isNull?" highcharts-null-point":"")+(void 0!==this.colorIndex?" highcharts-color-"+this.colorIndex:"")+(this.options.className?" "+this.options.className:"")+(this.zone&&this.zone.className?" "+this.zone.className.replace("highcharts-negative",""):"")},getZone:function(){var t,e=this.series,i=e.zones,e=e.zoneAxis||"y",s=0;for(t=i[s];this[e]>=t.value;)t=i[++s];return this.nonZonedColor||(this.nonZonedColor=this.color),this.color=t&&t.color&&!this.options.color?t.color:this.nonZonedColor,t},destroy:function(){var t,e=this.series.chart,i=e.hoverPoints;e.pointCount--,i&&(this.setState(),s(i,this),i.length||(e.hoverPoints=null)),this===e.hoverPoint&&this.onMouseOut(),(this.graphic||this.dataLabel||this.dataLabels)&&(p(this),this.destroyElements()),this.legendItem&&e.legend.destroyItem(this);for(t in this)this[t]=null},destroyElements:function(t){var e,i,s=this,n=[];for(t=t||{graphic:1,dataLabel:1},t.graphic&&n.push("graphic","shadowGroup"),t.dataLabel&&n.push("dataLabel","dataLabelUpper","connector"),i=n.length;i--;)e=n[i],s[e]&&(s[e]=s[e].destroy());["dataLabel","connector"].forEach(function(e){var i=e+"s";t[e]&&s[i]&&(s[i].forEach(function(t){t.element&&t.destroy()}),delete s[i])})},getLabelConfig:function(){return{x:this.category,y:this.y,color:this.color,colorIndex:this.colorIndex,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},tooltipFormatter:function(t){var e=this.series,i=e.tooltipOptions,s=h(i.valueDecimals,""),n=i.valuePrefix||"",o=i.valueSuffix||"";return e.chart.styledMode&&(t=e.chart.tooltip.styledModeFormat(t)),(e.pointArrayMap||["y"]).forEach(function(e){e="{point."+e,(n||o)&&(t=t.replace(RegExp(e+"}","g"),n+e+"}"+o)),t=t.replace(RegExp(e+"}","g"),e+":,."+s+"f}")}),a(t,{point:this,series:this.series},e.chart.time)},firePointEvent:function(t,e,i){var s=this,n=this.series.options;(n.point.events[t]||s.options&&s.options.events&&s.options.events[t])&&this.importEvents(),"click"===t&&n.allowPointSelect&&(i=function(t){s.select&&s.select(null,t.ctrlKey||t.metaKey||t.shiftKey)}),o(this,t,e,i)},visible:!0}}),e(i,"parts/Series.js",[i["parts/Globals.js"]],function(t){var e=t.addEvent,i=t.animObject,s=t.arrayMax,n=t.arrayMin,o=t.correctFloat,a=t.defaultOptions,r=t.defaultPlotOptions,l=t.defined,h=t.erase,c=t.extend,d=t.fireEvent,p=t.isArray,u=t.isNumber,f=t.isString,g=t.merge,m=t.objectEach,v=t.pick,x=t.removeEvent,y=t.splat,b=t.SVGElement,w=t.syncTimeout,k=t.win;t.Series=t.seriesType("line",null,{lineWidth:2,allowPointSelect:!1,showCheckbox:!1,animation:{duration:1e3},events:{},marker:{lineWidth:0,lineColor:"#ffffff",enabledThreshold:2,radius:4,states:{normal:{animation:!0},hover:{animation:{duration:50},enabled:!0,radiusPlus:2,lineWidthPlus:1},select:{fillColor:"#cccccc",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{align:"center",formatter:function(){return null===this.y?"":t.numberFormat(this.y,-1)},padding:5,style:{fontSize:"11px",fontWeight:"bold",color:"contrast",textOutline:"1px contrast"},verticalAlign:"bottom",x:0,y:0},cropThreshold:300,opacity:1,pointRange:0,softThreshold:!0,states:{normal:{animation:!0},hover:{animation:{duration:50},lineWidthPlus:1,marker:{},halo:{size:10,opacity:.25}},select:{animation:{duration:0}},inactive:{animation:{duration:50},opacity:.2}},stickyTracking:!0,turboThreshold:1e3,findNearestPointBy:"x"},{isCartesian:!0,pointClass:t.Point,sorted:!0,requireSorting:!0,directTouch:!1,axisTypes:["xAxis","yAxis"],colorCounter:0,parallelArrays:["x","y"],coll:"series",cropShoulder:1,init:function(t,i){d(this,"init",{options:i});var s,n,o=this,a=t.series;o.chart=t,o.options=i=o.setOptions(i),o.linkedSeries=[],o.bindAxes(),c(o,{name:i.name,state:"",visible:!1!==i.visible,selected:!0===i.selected}),s=i.events,m(s,function(t,i){o.hcEvents&&o.hcEvents[i]&&-1!==o.hcEvents[i].indexOf(t)||e(o,i,t)}),(s&&s.click||i.point&&i.point.events&&i.point.events.click||i.allowPointSelect)&&(t.runTrackerClick=!0),o.getColor(),o.getSymbol(),o.parallelArrays.forEach(function(t){o[t+"Data"]||(o[t+"Data"]=[])}),o.points||o.setData(i.data,!1),o.isCartesian&&(t.hasCartesianSeries=!0),a.length&&(n=a[a.length-1]),o._i=v(n&&n._i,-1)+1,t.orderSeries(this.insert(a)),d(this,"afterInit")},insert:function(t){var e,i=this.options.index;if(u(i)){for(e=t.length;e--;)if(i>=v(t[e].options.index,t[e]._i)){t.splice(e+1,0,this);break}-1===e&&t.unshift(this),e+=1}else t.push(this);return v(e,t.length-1)},bindAxes:function(){var e,i=this,s=i.options,n=i.chart;d(this,"bindAxes",null,function(){(i.axisTypes||[]).forEach(function(o){n[o].forEach(function(t){e=t.options,(s[o]===e.index||void 0!==s[o]&&s[o]===e.id||void 0===s[o]&&0===e.index)&&(i.insert(t.series),i[o]=t,t.isDirty=!0)}),i[o]||i.optionalAxis===o||t.error(18,!0,n)})})},updateParallelArrays:function(t,e){var i=t.series,s=arguments,n=u(e)?function(s){var n="y"===s&&i.toYData?i.toYData(t):t[s];i[s+"Data"][e]=n}:function(t){Array.prototype[e].apply(i[t+"Data"],Array.prototype.slice.call(s,2))};i.parallelArrays.forEach(n)},hasData:function(){return this.visible&&void 0!==this.dataMax&&void 0!==this.dataMin||this.visible&&this.yData&&0<this.yData.length},autoIncrement:function(){var t,e=this.options,i=this.xIncrement,s=e.pointIntervalUnit,n=this.chart.time,i=v(i,e.pointStart,0);return this.pointInterval=t=v(this.pointInterval,e.pointInterval,1),s&&(e=new n.Date(i),"day"===s?n.set("Date",e,n.get("Date",e)+t):"month"===s?n.set("Month",e,n.get("Month",e)+t):"year"===s&&n.set("FullYear",e,n.get("FullYear",e)+t),t=e.getTime()-i),this.xIncrement=i+t,i},setOptions:function(t){var e=this.chart,i=e.options,s=i.plotOptions,n=(e.userOptions||{}).plotOptions||{},o=s[this.type],r=g(t);return t=e.styledMode,d(this,"setOptions",{userOptions:r}),this.userOptions=r,e=g(o,s.series,r),this.tooltipOptions=g(a.tooltip,a.plotOptions.series&&a.plotOptions.series.tooltip,a.plotOptions[this.type].tooltip,i.tooltip.userOptions,s.series&&s.series.tooltip,s[this.type].tooltip,r.tooltip),this.stickyTracking=v(r.stickyTracking,n[this.type]&&n[this.type].stickyTracking,n.series&&n.series.stickyTracking,!(!this.tooltipOptions.shared||this.noSharedTooltip)||e.stickyTracking),null===o.marker&&delete e.marker,this.zoneAxis=e.zoneAxis,i=this.zones=(e.zones||[]).slice(),!e.negativeColor&&!e.negativeFillColor||e.zones||(s={value:e[this.zoneAxis+"Threshold"]||e.threshold||0,className:"highcharts-negative"},t||(s.color=e.negativeColor,s.fillColor=e.negativeFillColor),i.push(s)),i.length&&l(i[i.length-1].value)&&i.push(t?{}:{color:this.color,fillColor:this.fillColor}),d(this,"afterSetOptions",{options:e}),e},getName:function(){return v(this.options.name,"Series "+(this.index+1))},getCyclic:function(t,e,i){var s,n=this.chart,o=this.userOptions,a=t+"Index",r=t+"Counter",h=i?i.length:v(n.options.chart[t+"Count"],n[t+"Count"]);e||(s=v(o[a],o["_"+a]),l(s)||(n.series.length||(n[r]=0),o["_"+a]=s=n[r]%h,n[r]+=1),i&&(e=i[s])),void 0!==s&&(this[a]=s),this[t]=e},getColor:function(){this.chart.styledMode?this.getCyclic("color"):this.options.colorByPoint?this.options.color=null:this.getCyclic("color",this.options.color||r[this.type].color,this.chart.options.colors)},getSymbol:function(){this.getCyclic("symbol",this.options.marker.symbol,this.chart.options.symbols)},findPointIndex:function(t,e){var i=t.id;t=t.x;var s,n,o=this.points;return i&&void 0!==(n=(i=this.chart.get(i))&&i.index)&&(s=!0),void 0===n&&u(t)&&(n=this.xData.indexOf(t,e)),-1!==n&&void 0!==n&&this.cropped&&(n=n>=this.cropStart?n-this.cropStart:n),!s&&o[n]&&o[n].touched&&(n=void 0),n},drawLegendSymbol:t.LegendSymbolMixin.drawLineMarker,updateData:function(e){var i,s,n,o=this.options,a=this.points,r=[],l=this.requireSorting,h=e.length===a.length,c=!0;if(this.xIncrement=null,e.forEach(function(e,s){var c,d=t.defined(e)&&this.pointClass.prototype.optionsToObject.call({series:this},e)||{};c=d.x,(d.id||u(c))&&(c=this.findPointIndex(d,n),-1===c||void 0===c?r.push(e):a[c]&&e!==o.data[c]?(a[c].update(e,!1,null,!1),a[c].touched=!0,l&&(n=c+1)):a[c]&&(a[c].touched=!0),(!h||s!==c||this.hasDerivedData)&&(i=!0))},this),i)for(e=a.length;e--;)(s=a[e])&&!s.touched&&s.remove(!1);else h?e.forEach(function(t,e){a[e].update&&t!==a[e].y&&a[e].update(t,!1,null,!1)}):c=!1;return a.forEach(function(t){t&&(t.touched=!1)}),!!c&&(r.forEach(function(t){this.addPoint(t,!1,null,null,!1)},this),!0)},setData:function(e,i,s,n){var o,a,r=this,l=r.points,h=l&&l.length||0,c=r.options,d=r.chart,g=null,m=r.xAxis,x=c.turboThreshold,y=this.xData,b=this.yData,w=(o=r.pointArrayMap)&&o.length,k=c.keys,M=0,S=1;if(e=e||[],o=e.length,i=v(i,!0),!1!==n&&o&&h&&!r.cropped&&!r.hasGroupedData&&r.visible&&!r.isSeriesBoosting&&(a=this.updateData(e)),!a){if(r.xIncrement=null,r.colorCounter=0,this.parallelArrays.forEach(function(t){r[t+"Data"].length=0}),x&&o>x){for(s=0;null===g&&s<o;)g=e[s],s++;if(u(g))for(s=0;s<o;s++)y[s]=this.autoIncrement(),b[s]=e[s];else if(p(g))if(w)for(s=0;s<o;s++)g=e[s],y[s]=g[0],b[s]=g.slice(1,w+1);else for(k&&(M=k.indexOf("x"),S=k.indexOf("y"),M=0<=M?M:0,S=0<=S?S:1),s=0;s<o;s++)g=e[s],y[s]=g[M],b[s]=g[S];else t.error(12,!1,d)}else for(s=0;s<o;s++)void 0!==e[s]&&(g={series:r},r.pointClass.prototype.applyOptions.apply(g,[e[s]]),r.updateParallelArrays(g,s));for(b&&f(b[0])&&t.error(14,!0,d),r.data=[],r.options.data=r.userOptions.data=e,s=h;s--;)l[s]&&l[s].destroy&&l[s].destroy();m&&(m.minRange=m.userMinRange),r.isDirty=d.isDirtyBox=!0,r.isDirtyData=!!l,s=!1}"point"===c.legendType&&(this.processData(),this.generatePoints()),i&&d.redraw(s)},processData:function(e){var i,s=this.xData,n=this.yData,o=s.length;i=0;var a,r,l,h=this.xAxis,c=this.options;l=c.cropThreshold;var d,p,u=this.getExtremesFromAll||c.getExtremesFromAll,f=this.isCartesian,c=h&&h.val2lin,g=h&&h.isLog,m=this.requireSorting;if(f&&!this.isDirty&&!h.isDirty&&!this.yAxis.isDirty&&!e)return!1;for(h&&(e=h.getExtremes(),d=e.min,p=e.max),f&&this.sorted&&!u&&(!l||o>l||this.forceCrop)&&(s[o-1]<d||s[0]>p?(s=[],n=[]):this.yData&&(s[0]<d||s[o-1]>p)&&(i=this.cropData(this.xData,this.yData,d,p),s=i.xData,n=i.yData,i=i.start,a=!0)),l=s.length||1;--l;)o=g?c(s[l])-c(s[l-1]):s[l]-s[l-1],0<o&&(void 0===r||o<r)?r=o:0>o&&m&&(t.error(15,!1,this.chart),m=!1);this.cropped=a,this.cropStart=i,this.processedXData=s,this.processedYData=n,this.closestPointRange=r},cropData:function(t,e,i,s,n){var o,a=t.length,r=0,l=a;for(n=v(n,this.cropShoulder),o=0;o<a;o++)if(t[o]>=i){r=Math.max(0,o-n);break}for(i=o;i<a;i++)if(t[i]>s){l=i+n;break}return{xData:t.slice(r,l),yData:e.slice(r,l),start:r,end:l}},generatePoints:function(){var t,e,i,s,n=this.options,o=n.data,a=this.data,r=this.processedXData,l=this.processedYData,h=this.pointClass,p=r.length,u=this.cropStart||0,f=this.hasGroupedData,n=n.keys,g=[];for(a||f||(a=[],a.length=o.length,a=this.data=a),n&&f&&(this.options.keys=!1),s=0;s<p;s++)e=u+s,f?(i=(new h).init(this,[r[s]].concat(y(l[s]))),i.dataGroup=this.groupMap[s],i.dataGroup.options&&(i.options=i.dataGroup.options,c(i,i.dataGroup.options),delete i.dataLabels)):(i=a[e])||void 0===o[e]||(a[e]=i=(new h).init(this,o[e],r[s])),i&&(i.index=e,g[s]=i);if(this.options.keys=n,a&&(p!==(t=a.length)||f))for(s=0;s<t;s++)s!==u||f||(s+=p),a[s]&&(a[s].destroyElements(),a[s].plotX=void 0);this.data=a,this.points=g,d(this,"afterGeneratePoints")},getXExtremes:function(t){return{min:n(t),max:s(t)}},getExtremes:function(t){var e,i=this.yAxis,o=this.processedXData,a=[],r=0;e=this.xAxis.getExtremes();var l,h,c,f,g=e.min,m=e.max,v=this.requireSorting?this.cropShoulder:0;for(t=t||this.stackedYData||this.processedYData||[],e=t.length,f=0;f<e;f++)if(h=o[f],c=t[f],l=(u(c,!0)||p(c))&&(!i.positiveValuesOnly||c.length||0<c),h=this.getExtremesFromAll||this.options.getExtremesFromAll||this.cropped||(o[f+v]||h)>=g&&(o[f-v]||h)<=m,l&&h)if(l=c.length)for(;l--;)"number"==typeof c[l]&&(a[r++]=c[l]);else a[r++]=c;this.dataMin=n(a),this.dataMax=s(a),d(this,"afterGetExtremes")},translate:function(){this.processedXData||this.processData(),this.generatePoints();var t,e,i,s,n,a=this.options,r=a.stacking,h=this.xAxis,c=h.categories,f=this.yAxis,g=this.points,m=g.length,x=!!this.modifyValue,y=this.pointPlacementToXValue(),b=u(y),w=a.threshold,k=a.startFromThreshold?w:0,M=this.zoneAxis||"y",S=Number.MAX_VALUE;for(t=0;t<m;t++){var T=g[t],C=T.x;i=T.y;var A,E,P=T.low,O=r&&f.stacks[(this.negStacks&&i<(k?0:w)?"-":"")+this.stackKey];f.positiveValuesOnly&&null!==i&&0>=i&&(T.isNull=!0),T.plotX=e=o(Math.min(Math.max(-1e5,h.translate(C,0,0,0,1,y,"flags"===this.type)),1e5)),r&&this.visible&&!T.isNull&&O&&O[C]&&(n=this.getStackIndicator(n,C,this.index),A=O[C],E=A.points[n.key]),p(E)&&(P=E[0],i=E[1],P===k&&n.key===O[C].base&&(P=v(u(w)&&w,f.min)),f.positiveValuesOnly&&0>=P&&(P=null),T.total=T.stackTotal=A.total,T.percentage=A.total&&T.y/A.total*100,T.stackY=i,A.setOffset(this.pointXOffset||0,this.barW||0)),T.yBottom=l(P)?Math.min(Math.max(-1e5,f.translate(P,0,1,0,1)),1e5):null,x&&(i=this.modifyValue(i,T)),T.plotY=i="number"==typeof i&&1/0!==i?Math.min(Math.max(-1e5,f.translate(i,0,1,0,1)),1e5):void 0,T.isInside=void 0!==i&&0<=i&&i<=f.len&&0<=e&&e<=h.len,T.clientX=b?o(h.translate(C,0,0,0,1,y)):e,T.negative=T[M]<(a[M+"Threshold"]||w||0),T.category=c&&void 0!==c[T.x]?c[T.x]:T.x,T.isNull||(void 0!==s&&(S=Math.min(S,Math.abs(e-s))),s=e),T.zone=this.zones.length&&T.getZone()}this.closestPointRangePx=S,d(this,"afterTranslate")},getValidPoints:function(t,e,i){var s=this.chart;return(t||this.points||[]).filter(function(t){return!(e&&!s.isInsidePlot(t.plotX,t.plotY,s.inverted))&&(i||!t.isNull)})},setClip:function(t){var e=this.chart,i=this.options,s=e.renderer,n=e.inverted,o=this.clipBox,a=o||e.clipBox,r=this.sharedClipKey||["_sharedClip",t&&t.duration,t&&t.easing,a.height,i.xAxis,i.yAxis].join(),l=e[r],h=e[r+"m"];l||(t&&(a.width=0,n&&(a.x=e.plotSizeX),e[r+"m"]=h=s.clipRect(n?e.plotSizeX+99:-99,n?-e.plotLeft:-e.plotTop,99,n?e.chartWidth:e.chartHeight)),e[r]=l=s.clipRect(a),l.count={length:0}),t&&!l.count[this.index]&&(l.count[this.index]=!0,l.count.length+=1),!1!==i.clip&&(this.group.clip(t||o?l:e.clipRect),this.markerGroup.clip(h),this.sharedClipKey=r),t||(l.count[this.index]&&(delete l.count[this.index],--l.count.length),0===l.count.length&&r&&e[r]&&(o||(e[r]=e[r].destroy()),e[r+"m"]&&(e[r+"m"]=e[r+"m"].destroy())))},animate:function(t){var e,s=this.chart,n=i(this.options.animation);t?this.setClip(n):(e=this.sharedClipKey,(t=s[e])&&t.animate({width:s.plotSizeX,x:0},n),s[e+"m"]&&s[e+"m"].animate({width:s.plotSizeX+99,x:s.inverted?0:-99},n),this.animate=null)},afterAnimate:function(){this.setClip(),d(this,"afterAnimate"),this.finishedAnimating=!0},drawPoints:function(){var t,e,i,s,n,o,a,r,l=this.points,h=this.chart,c=this.options.marker,d=this[this.specialGroup]||this.markerGroup;t=this.xAxis;var p,u=v(c.enabled,!(t&&!t.isRadial)||null,this.closestPointRangePx>=c.enabledThreshold*c.radius);if(!1!==c.enabled||this._hasPointMarkers)for(t=0;t<l.length;t++)e=l[t],n=(s=e.graphic)?"animate":"attr",o=e.marker||{},a=!!e.marker,i=u&&void 0===o.enabled||o.enabled,r=!1!==e.isInside,i&&!e.isNull?(i=v(o.symbol,this.symbol),p=this.markerAttribs(e,e.selected&&"select"),s?s[r?"show":"hide"](!0).animate(p):r&&(0<p.width||e.hasImage)&&(e.graphic=s=h.renderer.symbol(i,p.x,p.y,p.width,p.height,a?o:c).add(d)),s&&!h.styledMode&&s[n](this.pointAttribs(e,e.selected&&"select")),s&&s.addClass(e.getClassName(),!0)):s&&(e.graphic=s.destroy())},markerAttribs:function(t,e){var i=this.options.marker,s=t.marker||{},n=s.symbol||i.symbol,o=v(s.radius,i.radius);return e&&(i=i.states[e],e=s.states&&s.states[e],o=v(e&&e.radius,i&&i.radius,o+(i&&i.radiusPlus||0))),t.hasImage=n&&0===n.indexOf("url"),t.hasImage&&(o=0),t={x:Math.floor(t.plotX)-o,y:t.plotY-o},o&&(t.width=t.height=2*o),t},pointAttribs:function(t,e){var i=this.options.marker,s=t&&t.options,n=s&&s.marker||{},o=this.color,a=s&&s.color,r=t&&t.color,s=v(n.lineWidth,i.lineWidth),l=t&&t.zone&&t.zone.color;return t=1,o=a||l||r||o,a=n.fillColor||i.fillColor||o,o=n.lineColor||i.lineColor||o,e&&(i=i.states[e],e=n.states&&n.states[e]||{},s=v(e.lineWidth,i.lineWidth,s+v(e.lineWidthPlus,i.lineWidthPlus,0)),a=e.fillColor||i.fillColor||a,o=e.lineColor||i.lineColor||o,t=v(e.opacity,i.opacity,t)),{stroke:o,"stroke-width":s,fill:a,opacity:t}},destroy:function(e){var i,s,n,o,a=this,r=a.chart,l=/AppleWebKit\/533/.test(k.navigator.userAgent),c=a.data||[];for(d(a,"destroy"),e||x(a),(a.axisTypes||[]).forEach(function(t){(o=a[t])&&o.series&&(h(o.series,a),o.isDirty=o.forceRedraw=!0)}),a.legendItem&&a.chart.legend.destroyItem(a),s=c.length;s--;)(n=c[s])&&n.destroy&&n.destroy();a.points=null,t.clearTimeout(a.animationTimeout),m(a,function(t,e){t instanceof b&&!t.survive&&(i=l&&"group"===e?"hide":"destroy",t[i]())}),r.hoverSeries===a&&(r.hoverSeries=null),h(r.series,a),r.orderSeries(),m(a,function(t,i){e&&"hcEvents"===i||delete a[i]})},getGraphPath:function(t,e,i){var s,n,o=this,a=o.options,r=a.step,h=[],c=[];return t=t||o.points,(s=t.reversed)&&t.reverse(),(r={right:1,center:2}[r]||r&&3)&&s&&(r=4-r),!a.connectNulls||e||i||(t=this.getValidPoints(t)),t.forEach(function(s,d){var p=s.plotX,u=s.plotY,f=t[d-1];(s.leftCliff||f&&f.rightCliff)&&!i&&(n=!0),s.isNull&&!l(e)&&0<d?n=!a.connectNulls:s.isNull&&!e?n=!0:(0===d||n?d=["M",s.plotX,s.plotY]:o.getPointSpline?d=o.getPointSpline(t,s,d):r?(d=1===r?["L",f.plotX,u]:2===r?["L",(f.plotX+p)/2,f.plotY,"L",(f.plotX+p)/2,u]:["L",p,f.plotY],d.push("L",p,u)):d=["L",p,u],c.push(s.x),r&&(c.push(s.x),2===r&&c.push(s.x)),h.push.apply(h,d),n=!1)}),h.xMap=c,o.graphPath=h},drawGraph:function(){var t=this,e=this.options,i=(this.gappedPath||this.getGraphPath).call(this),s=this.chart.styledMode,n=[["graph","highcharts-graph"]];s||n[0].push(e.lineColor||this.color||"#cccccc",e.dashStyle),n=t.getZonesGraphs(n),n.forEach(function(n,o){var a=n[0],r=t[a],l=r?"animate":"attr";r?(r.endX=t.preventGraphAnimation?null:i.xMap,r.animate({d:i})):i.length&&(t[a]=r=t.chart.renderer.path(i).addClass(n[1]).attr({zIndex:1}).add(t.group)),r&&!s&&(a={stroke:n[2],"stroke-width":e.lineWidth,fill:t.fillGraph&&t.color||"none"},n[3]?a.dashstyle=n[3]:"square"!==e.linecap&&(a["stroke-linecap"]=a["stroke-linejoin"]="round"),r[l](a).shadow(2>o&&e.shadow)),r&&(r.startX=i.xMap,r.isArea=i.isArea)})},getZonesGraphs:function(t){return this.zones.forEach(function(e,i){i=["zone-graph-"+i,"highcharts-graph highcharts-zone-graph-"+i+" "+(e.className||"")],this.chart.styledMode||i.push(e.color||this.color,e.dashStyle||this.options.dashStyle),t.push(i)},this),t},applyZones:function(){var t,e,i,s,n,o,a,r,l,h=this,c=this.chart,d=c.renderer,p=this.zones,u=this.clips||[],f=this.graph,g=this.area,m=Math.max(c.chartWidth,c.chartHeight),x=this[(this.zoneAxis||"y")+"Axis"],y=c.inverted,b=!1;p.length&&(f||g)&&x&&void 0!==x.min&&(n=x.reversed,o=x.horiz,f&&!this.showLine&&f.hide(),g&&g.hide(),s=x.getExtremes(),p.forEach(function(p,w){t=n?o?c.plotWidth:0:o?0:x.toPixels(s.min)||0,t=Math.min(Math.max(v(e,t),0),m),e=Math.min(Math.max(Math.round(x.toPixels(v(p.value,s.max),!0)||0),0),m),b&&(t=e=x.toPixels(s.max)),a=Math.abs(t-e),r=Math.min(t,e),l=Math.max(t,e),x.isXAxis?(i={x:y?l:r,y:0,width:a,height:m},o||(i.x=c.plotHeight-i.x)):(i={x:0,y:y?l:r,width:m,height:a},o&&(i.y=c.plotWidth-i.y)),y&&d.isVML&&(i=x.isXAxis?{x:0,y:n?r:l,height:i.width,width:c.chartWidth}:{x:i.y-c.plotLeft-c.spacingBox.x,y:0,width:i.height,height:c.chartHeight}),u[w]?u[w].animate(i):(u[w]=d.clipRect(i),f&&h["zone-graph-"+w].clip(u[w]),g&&h["zone-area-"+w].clip(u[w])),b=p.value>s.max,h.resetZones&&0===e&&(e=void 0)}),this.clips=u)},invertGroups:function(t){function i(){["group","markerGroup"].forEach(function(e){n[e]&&(o.renderer.isVML&&n[e].attr({width:n.yAxis.len,height:n.xAxis.len}),n[e].width=n.yAxis.len,n[e].height=n.xAxis.len,n[e].invert(t))})}var s,n=this,o=n.chart;n.xAxis&&(s=e(o,"resize",i),e(n,"destroy",s),i(),n.invertGroups=i)},plotGroup:function(t,e,i,s,n){var o=this[t],a=!o;return a&&(this[t]=o=this.chart.renderer.g().attr({zIndex:s||.1}).add(n)),o.addClass("highcharts-"+e+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series "+(l(this.colorIndex)?"highcharts-color-"+this.colorIndex+" ":"")+(this.options.className||"")+(o.hasClass("highcharts-tracker")?" highcharts-tracker":""),!0),o.attr({visibility:i})[a?"attr":"animate"](this.getPlotBox()),o},getPlotBox:function(){var t=this.chart,e=this.xAxis,i=this.yAxis;return t.inverted&&(e=i,i=this.xAxis),{translateX:e?e.left:t.plotLeft,translateY:i?i.top:t.plotTop,scaleX:1,scaleY:1}},render:function(){var t,e=this,s=e.chart,n=e.options,o=!!e.animate&&s.renderer.isSVG&&i(n.animation).duration,a=e.visible?"inherit":"hidden",r=n.zIndex,l=e.hasRendered,h=s.seriesGroup,c=s.inverted;d(this,"render"),t=e.plotGroup("group","series",a,r,h),e.markerGroup=e.plotGroup("markerGroup","markers",a,r,h),o&&e.animate(!0),t.inverted=!(!e.isCartesian&&!e.invertable)&&c,e.drawGraph&&(e.drawGraph(),e.applyZones()),e.visible&&e.drawPoints(),e.drawDataLabels&&e.drawDataLabels(),e.redrawPoints&&e.redrawPoints(),e.drawTracker&&!1!==e.options.enableMouseTracking&&e.drawTracker(),e.invertGroups(c),!1===n.clip||e.sharedClipKey||l||t.clip(s.clipRect),o&&e.animate(),l||(e.animationTimeout=w(function(){e.afterAnimate()},o)),e.isDirty=!1,e.hasRendered=!0,d(e,"afterRender")},redraw:function(){var t=this.chart,e=this.isDirty||this.isDirtyData,i=this.group,s=this.xAxis,n=this.yAxis;i&&(t.inverted&&i.attr({width:t.plotWidth,height:t.plotHeight}),i.animate({translateX:v(s&&s.left,t.plotLeft),translateY:v(n&&n.top,t.plotTop)})),this.translate(),this.render(),e&&delete this.kdTree},kdAxisArray:["clientX","plotY"],searchPoint:function(t,e){var i=this.xAxis,s=this.yAxis,n=this.chart.inverted;return this.searchKDTree({clientX:n?i.len-t.chartY+i.pos:t.chartX-i.pos,plotY:n?s.len-t.chartX+s.pos:t.chartY-s.pos},e,t)},buildKDTree:function(t){function e(t,s,n){var o,a;if(a=t&&t.length)return o=i.kdAxisArray[s%n],t.sort(function(t,e){return t[o]-e[o]}),a=Math.floor(a/2),{point:t[a],left:e(t.slice(0,a),s+1,n),right:e(t.slice(a+1),s+1,n)}}this.buildingKdTree=!0;var i=this,s=-1<i.options.findNearestPointBy.indexOf("y")?2:1;delete i.kdTree,w(function(){i.kdTree=e(i.getValidPoints(null,!i.directTouch),s,s),i.buildingKdTree=!1},i.options.kdNow||t&&"touchstart"===t.type?0:1)},searchKDTree:function(t,e,i){function s(t,e,i,h){var c,d,p=e.point,u=n.kdAxisArray[i%h],f=p;return d=l(t[o])&&l(p[o])?Math.pow(t[o]-p[o],2):null,c=l(t[a])&&l(p[a])?Math.pow(t[a]-p[a],2):null,c=(d||0)+(c||0),p.dist=l(c)?Math.sqrt(c):Number.MAX_VALUE,p.distX=l(d)?Math.sqrt(d):Number.MAX_VALUE,u=t[u]-p[u],c=0>u?"left":"right",d=0>u?"right":"left",e[c]&&(c=s(t,e[c],i+1,h),f=c[r]<f[r]?c:p),e[d]&&Math.sqrt(u*u)<f[r]&&(t=s(t,e[d],i+1,h),f=t[r]<f[r]?t:f),f}var n=this,o=this.kdAxisArray[0],a=this.kdAxisArray[1],r=e?"distX":"dist";if(e=-1<n.options.findNearestPointBy.indexOf("y")?2:1,this.kdTree||this.buildingKdTree||this.buildKDTree(i),this.kdTree)return s(t,this.kdTree,e,e)},pointPlacementToXValue:function(){var t=this.options.pointPlacement;return"between"===t&&(t=.5),u(t)&&(t*=v(this.options.pointRange||this.xAxis.pointRange)),t}})}),e(i,"parts/Stacking.js",[i["parts/Globals.js"]],function(t){var e=t.Axis,i=t.Chart,s=t.correctFloat,n=t.defined,o=t.destroyObjectProperties,a=t.format,r=t.objectEach,l=t.pick,h=t.Series;t.StackItem=function(t,e,i,s,n){var o=t.chart.inverted;this.axis=t,this.isNegative=i,this.options=e,this.x=s,this.total=null,this.points={},this.stack=n,this.rightCliff=this.leftCliff=0,this.alignOptions={align:e.align||(o?i?"left":"right":"center"),verticalAlign:e.verticalAlign||(o?"middle":i?"bottom":"top"),y:l(e.y,o?4:i?14:-6),x:l(e.x,o?i?-6:6:0)},this.textAlign=e.textAlign||(o?i?"right":"left":"center")},t.StackItem.prototype={destroy:function(){o(this,this.axis)},render:function(t){var e=this.axis.chart,i=this.options,s=i.format,s=s?a(s,this,e.time):i.formatter.call(this);this.label?this.label.attr({text:s,visibility:"hidden"}):this.label=e.renderer.text(s,null,null,i.useHTML).css(i.style).attr({align:this.textAlign,rotation:i.rotation,visibility:"hidden"}).add(t),this.label.labelrank=e.plotHeight},setOffset:function(t,e){var i=this.axis,s=i.chart,o=i.translate(i.usePercentage?100:this.total,0,0,0,1),a=i.translate(0),a=n(o)&&Math.abs(o-a);t=s.xAxis[0].translate(this.x)+t,i=n(o)&&this.getStackBox(s,this,t,o,e,a,i),(e=this.label)&&i&&(e.align(this.alignOptions,null,i),i=e.alignAttr,e[!1===this.options.crop||s.isInsidePlot(i.x,i.y)?"show":"hide"](!0))},getStackBox:function(t,e,i,s,n,o,a){var r=e.axis.reversed,l=t.inverted;return t=a.height+a.pos-(l?t.plotLeft:t.plotTop),e=e.isNegative&&!r||!e.isNegative&&r,{x:l?e?s:s-o:i,y:l?t-i-n:e?t-s-o:t-s,width:l?o:n,height:l?n:o}}},i.prototype.getStacks=function(){var t=this;t.yAxis.forEach(function(t){t.stacks&&t.hasVisibleSeries&&(t.oldStacks=t.stacks)}),t.series.forEach(function(e){!e.options.stacking||!0!==e.visible&&!1!==t.options.chart.ignoreHiddenSeries||(e.stackKey=e.type+l(e.options.stack,""))})},e.prototype.buildStacks=function(){var t,e=this.series,i=l(this.options.reversedStacks,!0),s=e.length;if(!this.isXAxis){for(this.usePercentage=!1,t=s;t--;)e[i?t:s-t-1].setStackedPoints();for(t=0;t<s;t++)e[t].modifyStacks()}},e.prototype.renderStackTotals=function(){var t=this.chart,e=t.renderer,i=this.stacks,s=this.stackTotalGroup;s||(this.stackTotalGroup=s=e.g("stack-labels").attr({visibility:"visible",zIndex:6}).add()),s.translate(t.plotLeft,t.plotTop),r(i,function(t){r(t,function(t){t.render(s)})})},e.prototype.resetStacks=function(){var t=this,e=t.stacks;t.isXAxis||r(e,function(e){r(e,function(i,s){i.touched<t.stacksTouched?(i.destroy(),delete e[s]):(i.total=null,i.cumulative=null)})})},e.prototype.cleanStacks=function(){var t;this.isXAxis||(this.oldStacks&&(t=this.stacks=this.oldStacks),r(t,function(t){r(t,function(t){t.cumulative=t.total})}))},h.prototype.setStackedPoints=function(){if(this.options.stacking&&(!0===this.visible||!1===this.chart.options.chart.ignoreHiddenSeries)){var e,i,o,a,r,h,c,d=this.processedXData,p=this.processedYData,u=[],f=p.length,g=this.options,m=g.threshold,v=l(g.startFromThreshold&&m,0),x=g.stack,g=g.stacking,y=this.stackKey,b="-"+y,w=this.negStacks,k=this.yAxis,M=k.stacks,S=k.oldStacks;for(k.stacksTouched+=1,r=0;r<f;r++)h=d[r],c=p[r],e=this.getStackIndicator(e,h,this.index),a=e.key,o=(i=w&&c<(v?0:m))?b:y,M[o]||(M[o]={}),M[o][h]||(S[o]&&S[o][h]?(M[o][h]=S[o][h],M[o][h].total=null):M[o][h]=new t.StackItem(k,k.options.stackLabels,i,h,x)),o=M[o][h],null!==c?(o.points[a]=o.points[this.index]=[l(o.cumulative,v)],n(o.cumulative)||(o.base=a),o.touched=k.stacksTouched,0<e.index&&!1===this.singleStacks&&(o.points[a][0]=o.points[this.index+","+h+",0"][0])):o.points[a]=o.points[this.index]=null,"percent"===g?(i=i?y:b,w&&M[i]&&M[i][h]?(i=M[i][h],o.total=i.total=Math.max(i.total,o.total)+Math.abs(c)||0):o.total=s(o.total+(Math.abs(c)||0))):o.total=s(o.total+(c||0)),o.cumulative=l(o.cumulative,v)+(c||0),null!==c&&(o.points[a].push(o.cumulative),u[r]=o.cumulative);"percent"===g&&(k.usePercentage=!0),this.stackedYData=u,k.oldStacks={}}},h.prototype.modifyStacks=function(){var t,e=this,i=e.stackKey,s=e.yAxis.stacks,n=e.processedXData,o=e.options.stacking;e[o+"Stacker"]&&[i,"-"+i].forEach(function(i){for(var a,r,l=n.length;l--;)a=n[l],t=e.getStackIndicator(t,a,e.index,i),(r=(a=s[i]&&s[i][a])&&a.points[t.key])&&e[o+"Stacker"](r,a,l)})},h.prototype.percentStacker=function(t,e,i){e=e.total?100/e.total:0,t[0]=s(t[0]*e),t[1]=s(t[1]*e),this.stackedYData[i]=t[1]},h.prototype.getStackIndicator=function(t,e,i,s){return!n(t)||t.x!==e||s&&t.key!==s?t={x:e,index:0,key:s}:t.index++,t.key=[i,e,t.index].join(),t}}),e(i,"parts/Dynamics.js",[i["parts/Globals.js"]],function(t){var e=t.addEvent,i=t.animate,s=t.Axis,n=t.Chart,o=t.createElement,a=t.css,r=t.defined,l=t.erase,h=t.extend,c=t.fireEvent,d=t.isNumber,p=t.isObject,u=t.isArray,f=t.merge,g=t.objectEach,m=t.pick,v=t.Point,x=t.Series,y=t.seriesTypes,b=t.setAnimation,w=t.splat;t.cleanRecursively=function(e,i){var s={};return g(e,function(n,o){p(e[o],!0)&&i[o]?(n=t.cleanRecursively(e[o],i[o]),Object.keys(n).length&&(s[o]=n)):(p(e[o])||e[o]!==i[o])&&(s[o]=e[o])}),s},h(n.prototype,{addSeries:function(t,e,i){var s,n=this;return t&&(e=m(e,!0),c(n,"addSeries",{options:t},function(){s=n.initSeries(t),n.isDirtyLegend=!0,n.linkSeries(),c(n,"afterAddSeries",{series:s}),e&&n.redraw(i)})),s},addAxis:function(t,e,i,n){var o=e?"xAxis":"yAxis",a=this.options;return t=f(t,{index:this[o].length,isX:e}),e=new s(this,t),a[o]=w(a[o]||{}),a[o].push(t),m(i,!0)&&this.redraw(n),e},showLoading:function(t){var s=this,n=s.options,r=s.loadingDiv,l=n.loading,c=function(){r&&a(r,{left:s.plotLeft+"px",top:s.plotTop+"px",width:s.plotWidth+"px",height:s.plotHeight+"px"})};r||(s.loadingDiv=r=o("div",{className:"highcharts-loading highcharts-loading-hidden"},null,s.container),s.loadingSpan=o("span",{className:"highcharts-loading-inner"},null,r),e(s,"redraw",c)),r.className="highcharts-loading",s.loadingSpan.innerHTML=t||n.lang.loading,s.styledMode||(a(r,h(l.style,{zIndex:10})),a(s.loadingSpan,l.labelStyle),s.loadingShown||(a(r,{opacity:0,display:""}),i(r,{opacity:l.style.opacity||.5},{duration:l.showDuration||0}))),s.loadingShown=!0,c()},hideLoading:function(){var t=this.options,e=this.loadingDiv;e&&(e.className="highcharts-loading highcharts-loading-hidden",this.styledMode||i(e,{opacity:0},{duration:t.loading.hideDuration||100,complete:function(){a(e,{display:"none"})}})),this.loadingShown=!1},propsRequireDirtyBox:"backgroundColor borderColor borderWidth borderRadius plotBackgroundColor plotBackgroundImage plotBorderColor plotBorderWidth plotShadow shadow".split(" "),propsRequireReflow:"margin marginTop marginRight marginBottom marginLeft spacing spacingTop spacingRight spacingBottom spacingLeft".split(" "),propsRequireUpdateSeries:"chart.inverted chart.polar chart.ignoreHiddenSeries chart.type colors plotOptions time tooltip".split(" "),collectionsWithUpdate:"xAxis yAxis zAxis series colorAxis pane".split(" "),update:function(e,i,s,n){var o,a,l,h,p=this,u={credits:"addCredits",title:"setTitle",subtitle:"setSubtitle"},v=[];c(p,"update",{options:e}),e.isResponsiveOptions||p.setResponsive(!1,!0),e=t.cleanRecursively(e,p.options),(o=e.chart)&&(f(!0,p.options.chart,o),"className"in o&&p.setClassName(o.className),"reflow"in o&&p.setReflow(o.reflow),("inverted"in o||"polar"in o||"type"in o)&&(p.propFromSeries(),a=!0),"alignTicks"in o&&(a=!0),g(o,function(t,e){-1!==p.propsRequireUpdateSeries.indexOf("chart."+e)&&(l=!0),-1!==p.propsRequireDirtyBox.indexOf(e)&&(p.isDirtyBox=!0),-1!==p.propsRequireReflow.indexOf(e)&&(h=!0)}),!p.styledMode&&"style"in o&&p.renderer.setStyle(o.style)),!p.styledMode&&e.colors&&(this.options.colors=e.colors),e.plotOptions&&f(!0,this.options.plotOptions,e.plotOptions),g(e,function(t,e){p[e]&&"function"==typeof p[e].update?p[e].update(t,!1):"function"==typeof p[u[e]]&&p[u[e]](t),"chart"!==e&&-1!==p.propsRequireUpdateSeries.indexOf(e)&&(l=!0)}),this.collectionsWithUpdate.forEach(function(t){var i;e[t]&&("series"===t&&(i=[],p[t].forEach(function(t,e){t.options.isInternal||i.push(m(t.options.index,e))})),w(e[t]).forEach(function(e,n){(n=r(e.id)&&p.get(e.id)||p[t][i?i[n]:n])&&n.coll===t&&(n.update(e,!1),s&&(n.touched=!0)),!n&&s&&("series"===t?p.addSeries(e,!1).touched=!0:"xAxis"!==t&&"yAxis"!==t||(p.addAxis(e,"xAxis"===t,!1).touched=!0))}),s&&p[t].forEach(function(t){t.touched||t.options.isInternal?delete t.touched:v.push(t)}))}),v.forEach(function(t){t.remove&&t.remove(!1)}),a&&p.axes.forEach(function(t){t.update({},!1)}),l&&p.series.forEach(function(t){t.update({},!1)}),e.loading&&f(!0,p.options.loading,e.loading),a=o&&o.width,o=o&&o.height,t.isString(o)&&(o=t.relativeLength(o,a||p.chartWidth)),h||d(a)&&a!==p.chartWidth||d(o)&&o!==p.chartHeight?p.setSize(a,o,n):m(i,!0)&&p.redraw(n),c(p,"afterUpdate",{options:e,redraw:i,animation:n})},setSubtitle:function(t){this.setTitle(void 0,t)}}),h(v.prototype,{update:function(t,e,i,s){function n(){a.applyOptions(t),null===a.y&&l&&(a.graphic=l.destroy()),p(t,!0)&&(l&&l.element&&t&&t.marker&&void 0!==t.marker.symbol&&(a.graphic=l.destroy()),t&&t.dataLabels&&a.dataLabel&&(a.dataLabel=a.dataLabel.destroy()),a.connector&&(a.connector=a.connector.destroy())),o=a.index,r.updateParallelArrays(a,o),c.data[o]=p(c.data[o],!0)||p(t,!0)?a.options:m(t,c.data[o]),r.isDirty=r.isDirtyData=!0,!r.fixedBox&&r.hasCartesianSeries&&(h.isDirtyBox=!0),"point"===c.legendType&&(h.isDirtyLegend=!0),e&&h.redraw(i)}var o,a=this,r=a.series,l=a.graphic,h=r.chart,c=r.options;e=m(e,!0),!1===s?n():a.firePointEvent("update",{options:t},n)},remove:function(t,e){this.series.removePoint(this.series.data.indexOf(this),t,e)}}),h(x.prototype,{addPoint:function(t,e,i,s,n){var o,a,r,l,h=this.options,d=this.data,p=this.chart,u=this.xAxis,u=u&&u.hasNames&&u.names,f=h.data,g=this.xData;if(e=m(e,!0),o={series:this},this.pointClass.prototype.applyOptions.apply(o,[t]),l=o.x,r=g.length,this.requireSorting&&l<g[r-1])for(a=!0;r&&g[r-1]>l;)r--;this.updateParallelArrays(o,"splice",r,0,0),this.updateParallelArrays(o,r),u&&o.name&&(u[l]=o.name),f.splice(r,0,t),a&&(this.data.splice(r,0,null),this.processData()),"point"===h.legendType&&this.generatePoints(),i&&(d[0]&&d[0].remove?d[0].remove(!1):(d.shift(),this.updateParallelArrays(o,"shift"),f.shift())),!1!==n&&c(this,"addPoint",{point:o}),this.isDirtyData=this.isDirty=!0,e&&p.redraw(s)},removePoint:function(t,e,i){var s=this,n=s.data,o=n[t],a=s.points,r=s.chart,l=function(){a&&a.length===n.length&&a.splice(t,1),n.splice(t,1),s.options.data.splice(t,1),s.updateParallelArrays(o||{series:s},"splice",t,1),o&&o.destroy(),s.isDirty=!0,s.isDirtyData=!0,e&&r.redraw()};b(i,r),e=m(e,!0),o?o.firePointEvent("remove",null,l):l()},remove:function(t,e,i,s){function n(){o.destroy(s),o.remove=null,a.isDirtyLegend=a.isDirtyBox=!0,a.linkSeries(),m(t,!0)&&a.redraw(e)}var o=this,a=o.chart;!1!==i?c(o,"remove",null,n):n()},update:function(e,i){e=t.cleanRecursively(e,this.userOptions),c(this,"update",{options:e});var s,n,o=this,a=o.chart,r=o.userOptions,l=o.initialType||o.type,d=e.type||r.type||a.options.chart.type,p=!(this.hasDerivedData||e.dataGrouping||d&&d!==this.type||void 0!==e.pointStart||e.pointInterval||e.pointIntervalUnit||e.keys),u=y[l].prototype,g=["group","markerGroup","dataLabelsGroup"],v=["navigatorSeries","baseSeries"],x=o.finishedAnimating&&{animation:!1},b={};p&&(v.push("data","isDirtyData","points","processedXData","processedYData","xIncrement"),!1!==e.visible&&v.push("area","graph"),o.parallelArrays.forEach(function(t){v.push(t+"Data")}),e.data&&this.setData(e.data,!1)),e=f(r,x,{index:void 0===r.index?o.index:r.index,pointStart:m(r.pointStart,o.xData[0])},!p&&{data:o.options.data},e),v=g.concat(v),v.forEach(function(t){v[t]=o[t],delete o[t]}),o.remove(!1,null,!1,!0);for(n in u)o[n]=void 0;y[d||l]?h(o,y[d||l].prototype):t.error(17,!0,a),v.forEach(function(t){o[t]=v[t]}),o.init(a,e),p&&this.points&&(s=o.options,!1===s.visible?(b.graphic=1,b.dataLabel=1):(s.marker&&!1===s.marker.enabled&&(b.graphic=1),s.dataLabels&&!1===s.dataLabels.enabled&&(b.dataLabel=1)),this.points.forEach(function(t){t&&t.series&&(t.resolveColor(),Object.keys(b).length&&t.destroyElements(b),!1===s.showInLegend&&t.legendItem&&a.legend.destroyItem(t))},this)),e.zIndex!==r.zIndex&&g.forEach(function(t){o[t]&&o[t].attr({zIndex:e.zIndex})}),o.initialType=l,a.linkSeries(),c(this,"afterUpdate"),m(i,!0)&&a.redraw(!!p&&void 0)},setName:function(t){this.name=this.options.name=this.userOptions.name=t,this.chart.isDirtyLegend=!0}}),h(s.prototype,{update:function(t,e){var i=this.chart,s=t&&t.events||{};t=f(this.userOptions,t),i.options[this.coll].indexOf&&(i.options[this.coll][i.options[this.coll].indexOf(this.userOptions)]=t),g(i.options[this.coll].events,function(t,e){void 0===s[e]&&(s[e]=void 0)}),this.destroy(!0),this.init(i,h(t,{events:s})),i.isDirtyBox=!0,m(e,!0)&&i.redraw()},remove:function(t){for(var e=this.chart,i=this.coll,s=this.series,n=s.length;n--;)s[n]&&s[n].remove(!1);l(e.axes,this),l(e[i],this),u(e.options[i])?e.options[i].splice(this.options.index,1):delete e.options[i],e[i].forEach(function(t,e){t.options.index=t.userOptions.index=e}),this.destroy(),e.isDirtyBox=!0,m(t,!0)&&e.redraw()},setTitle:function(t,e){this.update({title:t},e)},setCategories:function(t,e){this.update({categories:t},e)}})}),e(i,"parts/AreaSeries.js",[i["parts/Globals.js"]],function(t){var e=t.color,i=t.pick,s=t.Series;(0,t.seriesType)("area","line",{softThreshold:!1,threshold:0},{singleStacks:!1,getStackPoints:function(e){var s,n,o=[],a=[],r=this.xAxis,l=this.yAxis,h=l.stacks[this.stackKey],c={},d=this.index,p=l.series,u=p.length,f=i(l.options.reversedStacks,!0)?1:-1;if(e=e||this.points,this.options.stacking){for(n=0;n<e.length;n++)e[n].leftNull=e[n].rightNull=null,c[e[n].x]=e[n];t.objectEach(h,function(t,e){null!==t.total&&a.push(e)}),a.sort(function(t,e){return t-e}),s=p.map(function(t){return t.visible}),a.forEach(function(t,e){var i,p,g=0;if(c[t]&&!c[t].isNull)o.push(c[t]),[-1,1].forEach(function(o){var r=1===o?"rightNull":"leftNull",l=0,g=h[a[e+o]];if(g)for(n=d;0<=n&&n<u;)i=g.points[n],i||(n===d?c[t][r]=!0:s[n]&&(p=h[t].points[n])&&(l-=p[1]-p[0])),n+=f;c[t][1===o?"rightCliff":"leftCliff"]=l});else{for(n=d;0<=n&&n<u;){if(i=h[t].points[n]){g=i[1];break}n+=f}g=l.translate(g,0,1,0,1),o.push({isNull:!0,plotX:r.translate(t,0,0,0,1),x:t,plotY:g,yBottom:g})}})}return o},getGraphPath:function(t){var e,n,o,a,r=s.prototype.getGraphPath,l=this.options,h=l.stacking,c=this.yAxis,d=[],p=[],u=this.index,f=c.stacks[this.stackKey],g=l.threshold,m=c.getThreshold(l.threshold),l=l.connectNulls||"percent"===h,v=function(e,i,s){var n=t[e];e=h&&f[n.x].points[u];var a=n[s+"Null"]||0;s=n[s+"Cliff"]||0;var r,l,n=!0;s||a?(r=(a?e[0]:e[1])+s,l=e[0]+s,n=!!a):!h&&t[i]&&t[i].isNull&&(r=l=g),void 0!==r&&(p.push({plotX:o,plotY:null===r?m:c.getThreshold(r),isNull:n,isCliff:!0}),d.push({plotX:o,plotY:null===l?m:c.getThreshold(l),doCurve:!1}))};for(t=t||this.points,h&&(t=this.getStackPoints(t)),e=0;e<t.length;e++)n=t[e].isNull,o=i(t[e].rectPlotX,t[e].plotX),a=i(t[e].yBottom,m),(!n||l)&&(l||v(e,e-1,"left"),n&&!h&&l||(p.push(t[e]),d.push({x:e,plotX:o,plotY:a})),l||v(e,e+1,"right"));return e=r.call(this,p,!0,!0),d.reversed=!0,n=r.call(this,d,!0,!0),n.length&&(n[0]="L"),n=e.concat(n),r=r.call(this,p,!1,l),n.xMap=e.xMap,this.areaPath=n,r},drawGraph:function(){this.areaPath=[],s.prototype.drawGraph.apply(this);var t=this,n=this.areaPath,o=this.options,a=[["area","highcharts-area",this.color,o.fillColor]];this.zones.forEach(function(e,i){a.push(["zone-area-"+i,"highcharts-area highcharts-zone-area-"+i+" "+e.className,e.color||t.color,e.fillColor||o.fillColor])}),a.forEach(function(s){var a=s[0],r=t[a],l=r?"animate":"attr",h={};r?(r.endX=t.preventGraphAnimation?null:n.xMap,r.animate({d:n})):(h.zIndex=0,r=t[a]=t.chart.renderer.path(n).addClass(s[1]).add(t.group),r.isArea=!0),t.chart.styledMode||(h.fill=i(s[3],e(s[2]).setOpacity(i(o.fillOpacity,.75)).get())),r[l](h),r.startX=n.xMap,r.shiftUnit=o.step?2:1})},drawLegendSymbol:t.LegendSymbolMixin.drawRectangle})}),e(i,"parts/SplineSeries.js",[i["parts/Globals.js"]],function(t){var e=t.pick;(t=t.seriesType)("spline","line",{},{getPointSpline:function(t,i,s){var n=i.plotX,o=i.plotY,a=t[s-1];s=t[s+1];var r,l,h,c;if(a&&!a.isNull&&!1!==a.doCurve&&!i.isCliff&&s&&!s.isNull&&!1!==s.doCurve&&!i.isCliff){t=a.plotY,h=s.plotX,s=s.plotY;var d=0;r=(1.5*n+a.plotX)/2.5,l=(1.5*o+t)/2.5,h=(1.5*n+h)/2.5,c=(1.5*o+s)/2.5,h!==r&&(d=(c-l)*(h-n)/(h-r)+o-c),l+=d,c+=d,l>t&&l>o?(l=Math.max(t,o),c=2*o-l):l<t&&l<o&&(l=Math.min(t,o),c=2*o-l),c>s&&c>o?(c=Math.max(s,o),l=2*o-c):c<s&&c<o&&(c=Math.min(s,o),l=2*o-c),i.rightContX=h,i.rightContY=c}return i=["C",e(a.rightContX,a.plotX),e(a.rightContY,a.plotY),e(r,n),e(l,o),n,o],a.rightContX=a.rightContY=null,i}})}),e(i,"parts/AreaSplineSeries.js",[i["parts/Globals.js"]],function(t){var e=t.seriesTypes.area.prototype;(0,t.seriesType)("areaspline","spline",t.defaultPlotOptions.area,{getStackPoints:e.getStackPoints,getGraphPath:e.getGraphPath,drawGraph:e.drawGraph,drawLegendSymbol:t.LegendSymbolMixin.drawRectangle})}),e(i,"parts/ColumnSeries.js",[i["parts/Globals.js"]],function(t){var e=t.animObject,i=t.color,s=t.extend,n=t.defined,o=t.isNumber,a=t.merge,r=t.pick,l=t.Series,h=t.seriesType,c=t.svg;h("column","line",{borderRadius:0,crisp:!0,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{halo:!1,brightness:.1},select:{color:"#cccccc",borderColor:"#000000"}},dataLabels:{align:null,verticalAlign:null,y:null},softThreshold:!1,startFromThreshold:!0,stickyTracking:!1,tooltip:{distance:6},threshold:0,borderColor:"#ffffff"},{cropShoulder:0,directTouch:!0,trackerGroups:["group","dataLabelsGroup"],negStacks:!0,init:function(){l.prototype.init.apply(this,arguments);var t=this,e=t.chart;e.hasRendered&&e.series.forEach(function(e){e.type===t.type&&(e.isDirty=!0)})},getColumnMetrics:function(){var t,e=this,i=e.options,s=e.xAxis,n=e.yAxis,o=s.options.reversedStacks,o=s.reversed&&!o||!s.reversed&&o,a={},l=0;!1===i.grouping?l=1:e.chart.series.forEach(function(i){var s,o=i.options,r=i.yAxis;i.type!==e.type||!i.visible&&e.chart.options.chart.ignoreHiddenSeries||n.len!==r.len||n.pos!==r.pos||(o.stacking?(t=i.stackKey,void 0===a[t]&&(a[t]=l++),s=a[t]):!1!==o.grouping&&(s=l++),i.columnIndex=s)});var h=Math.min(Math.abs(s.transA)*(s.ordinalSlope||i.pointRange||s.closestPointRange||s.tickInterval||1),s.len),c=h*i.groupPadding,d=(h-2*c)/(l||1),i=Math.min(i.maxPointWidth||s.len,r(i.pointWidth,d*(1-2*i.pointPadding)));return e.columnMetrics={width:i,offset:(d-i)/2+(c+((e.columnIndex||0)+(o?1:0))*d-h/2)*(o?-1:1)},e.columnMetrics},crispCol:function(t,e,i,s){var n=this.chart,o=this.borderWidth,a=-(o%2?.5:0),o=o%2?.5:1;return n.inverted&&n.renderer.isVML&&(o+=1),this.options.crisp&&(i=Math.round(t+i)+a,t=Math.round(t)+a,i-=t),s=Math.round(e+s)+o,a=.5>=Math.abs(e)&&.5<s,e=Math.round(e)+o,s-=e,a&&s&&(--e,s+=1),{x:t,y:e,width:i,height:s}},translate:function(){var t=this,e=t.chart,i=t.options,s=t.dense=2>t.closestPointRange*t.xAxis.transA,s=t.borderWidth=r(i.borderWidth,s?0:1),o=t.yAxis,a=i.threshold,h=t.translatedThreshold=o.getThreshold(a),c=r(i.minPointLength,5),d=t.getColumnMetrics(),p=d.width,u=t.barW=Math.max(p,1+2*s),f=t.pointXOffset=d.offset;e.inverted&&(h-=.5),i.pointPadding&&(u=Math.ceil(u)),l.prototype.translate.apply(t),t.points.forEach(function(i){var s,l=r(i.yBottom,h),d=999+Math.abs(l),g=p,d=Math.min(Math.max(-d,i.plotY),o.len+d),m=i.plotX+f,v=u,x=Math.min(d,l),y=Math.max(d,l)-x;c&&Math.abs(y)<c&&(y=c,s=!o.reversed&&!i.negative||o.reversed&&i.negative,i.y===a&&t.dataMax<=a&&o.min<a&&(s=!s),x=Math.abs(x-h)>c?l-c:h-(s?c:0)),n(i.options.pointWidth)&&(g=v=Math.ceil(i.options.pointWidth),m-=Math.round((g-p)/2)),i.barX=m,i.pointWidth=g,i.tooltipPos=e.inverted?[o.len+o.pos-e.plotLeft-d,t.xAxis.len-m-v/2,y]:[m+v/2,d+o.pos-e.plotTop,y],i.shapeType=t.pointClass.prototype.shapeType||"rect",i.shapeArgs=t.crispCol.apply(t,i.isNull?[m,h,v,0]:[m,x,v,y])})},getSymbol:t.noop,drawLegendSymbol:t.LegendSymbolMixin.drawRectangle,drawGraph:function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")},pointAttribs:function(t,e){var s,n=this.options,o=this.pointAttrToOptions||{};s=o.stroke||"borderColor";var l,h=o["stroke-width"]||"borderWidth",c=t&&t.color||this.color,d=t&&t[s]||n[s]||this.color||c,p=t&&t[h]||n[h]||this[h]||0,o=t&&t.dashStyle||n.dashStyle,u=r(n.opacity,1);return t&&this.zones.length&&(l=t.getZone(),c=t.options.color||l&&l.color||this.color,l&&(d=l.borderColor||d,o=l.dashStyle||o,p=l.borderWidth||p)),e&&(t=a(n.states[e],t.options.states&&t.options.states[e]||{}),e=t.brightness,c=t.color||void 0!==e&&i(c).brighten(t.brightness).get()||c,d=t[s]||d,p=t[h]||p,o=t.dashStyle||o,u=r(t.opacity,u)),s={fill:c,stroke:d,"stroke-width":p,opacity:u},o&&(s.dashstyle=o),s},drawPoints:function(){var t,e=this,i=this.chart,s=e.options,n=i.renderer,r=s.animationLimit||250;e.points.forEach(function(l){var h=l.graphic,c=h&&i.pointCount<r?"animate":"attr";o(l.plotY)&&null!==l.y?(t=l.shapeArgs,h&&h.element.nodeName!==l.shapeType&&(h=h.destroy()),h?h[c](a(t)):l.graphic=h=n[l.shapeType](t).add(l.group||e.group),s.borderRadius&&h[c]({r:s.borderRadius}),i.styledMode||h[c](e.pointAttribs(l,l.selected&&"select")).shadow(!1!==l.allowShadow&&s.shadow,null,s.stacking&&!s.borderRadius),h.addClass(l.getClassName(),!0)):h&&(l.graphic=h.destroy())})},animate:function(t){var i,n=this,o=this.yAxis,a=n.options,r=this.chart.inverted,l={},h=r?"translateX":"translateY";c&&(t?(l.scaleY=.001,t=Math.min(o.pos+o.len,Math.max(o.pos,o.toPixels(a.threshold))),r?l.translateX=t-o.len:l.translateY=t,n.clipBox&&n.setClip(),n.group.attr(l)):(i=n.group.attr(h),n.group.animate({scaleY:1},s(e(n.options.animation),{step:function(t,e){l[h]=i+e.pos*(o.pos-i),n.group.attr(l)}})),n.animate=null))},remove:function(){var t=this,e=t.chart;e.hasRendered&&e.series.forEach(function(e){e.type===t.type&&(e.isDirty=!0)}),l.prototype.remove.apply(t,arguments)}})}),e(i,"parts/BarSeries.js",[i["parts/Globals.js"]],function(t){(t=t.seriesType)("bar","column",null,{inverted:!0})}),e(i,"parts/ScatterSeries.js",[i["parts/Globals.js"]],function(t){var e=t.Series;(0,t.seriesType)("scatter","line",{lineWidth:0,findNearestPointBy:"xy",jitter:{x:0,y:0},marker:{enabled:!0},tooltip:{headerFormat:'<span style="color:{point.color}">●</span> <span style="font-size: 10px"> {series.name}</span><br/>',pointFormat:"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"}},{sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1,drawGraph:function(){this.options.lineWidth&&e.prototype.drawGraph.call(this)},applyJitter:function(){var t=this,e=this.options.jitter,i=this.points.length;e&&this.points.forEach(function(s,n){["x","y"].forEach(function(o,a){var r,l,h,c="plot"+o.toUpperCase();e[o]&&!s.isNull&&(r=t[o+"Axis"],h=e[o]*r.transA,r&&!r.isLog&&(l=Math.max(0,s[c]-h),r=Math.min(r.len,s[c]+h),a=1e4*Math.sin(n+a*i),s[c]=l+(r-l)*(a-Math.floor(a)),"x"===o&&(s.clientX=s.plotX)))})})}}),t.addEvent(e,"afterTranslate",function(){this.applyJitter&&this.applyJitter()})}),e(i,"mixins/centered-series.js",[i["parts/Globals.js"]],function(t){var e=t.deg2rad,i=t.isNumber,s=t.pick,n=t.relativeLength;t.CenteredSeriesMixin={getCenter:function(){var t,e,i=this.options,o=this.chart,a=2*(i.slicedOffset||0),r=o.plotWidth-2*a,o=o.plotHeight-2*a,l=i.center,l=[s(l[0],"50%"),s(l[1],"50%"),i.size||"100%",i.innerSize||0],h=Math.min(r,o);for(t=0;4>t;++t)e=l[t],i=2>t||2===t&&/%$/.test(e),l[t]=n(e,[r,o,h,l[2]][t])+(i?a:0);return l[3]>l[2]&&(l[3]=l[2]),l},getStartAndEndRadians:function(t,s){return t=i(t)?t:0,s=i(s)&&s>t&&360>s-t?s:t+360,{start:e*(t+-90),end:e*(s+-90)}}}}),e(i,"parts/PieSeries.js",[i["parts/Globals.js"]],function(t){var e=t.addEvent,i=t.CenteredSeriesMixin,s=t.defined,n=i.getStartAndEndRadians,o=t.merge,a=t.noop,r=t.pick,l=t.Point,h=t.Series,c=t.seriesType,d=t.setAnimation;c("pie","line",{center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{allowOverlap:!0,connectorPadding:5,distance:30,enabled:!0,formatter:function(){return this.point.isNull?void 0:this.point.name},softConnector:!0,x:0,connectorShape:"fixedOffset",crookDistance:"70%"},ignoreHiddenPoint:!0,inactiveOtherPoints:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,stickyTracking:!1,tooltip:{followPointer:!0},borderColor:"#ffffff",borderWidth:1,states:{hover:{brightness:.1}}},{isCartesian:!1,requireSorting:!1,directTouch:!0,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],axisTypes:[],pointAttribs:t.seriesTypes.column.prototype.pointAttribs,animate:function(t){var e=this,i=e.points,s=e.startAngleRad;t||(i.forEach(function(t){var i=t.graphic,n=t.shapeArgs;i&&(i.attr({r:t.startR||e.center[3]/2,start:s,end:s}),i.animate({r:n.r,start:n.start,end:n.end},e.options.animation))}),e.animate=null)},hasData:function(){return!!this.processedXData.length},updateTotals:function(){var t,e,i=0,s=this.points,n=s.length,o=this.options.ignoreHiddenPoint;for(t=0;t<n;t++)e=s[t],i+=o&&!e.visible?0:e.isNull?0:e.y;for(this.total=i,t=0;t<n;t++)e=s[t],e.percentage=0<i&&(e.visible||!o)?e.y/i*100:0,e.total=i},generatePoints:function(){h.prototype.generatePoints.call(this),this.updateTotals()},getX:function(t,e,i){var s=this.center,n=this.radii?this.radii[i.index]:s[2]/2;return s[0]+(e?-1:1)*Math.cos(Math.asin(Math.max(Math.min((t-s[1])/(n+i.labelDistance),1),-1)))*(n+i.labelDistance)+(0<i.labelDistance?(e?-1:1)*this.options.dataLabels.padding:0)},translate:function(t){this.generatePoints();var e,i,s,o,a,l,h=0,c=this.options,d=c.slicedOffset,p=d+(c.borderWidth||0),u=n(c.startAngle,c.endAngle),f=this.startAngleRad=u.start,u=(this.endAngleRad=u.end)-f,g=this.points,m=c.dataLabels.distance,c=c.ignoreHiddenPoint,v=g.length;for(t||(this.center=t=this.getCenter()),a=0;a<v;a++)l=g[a],l.labelDistance=r(l.options.dataLabels&&l.options.dataLabels.distance,m),this.maxLabelDistance=Math.max(this.maxLabelDistance||0,l.labelDistance),e=f+h*u,c&&!l.visible||(h+=l.percentage/100),i=f+h*u,l.shapeType="arc",l.shapeArgs={x:t[0],y:t[1],r:t[2]/2,innerR:t[3]/2,start:Math.round(1e3*e)/1e3,end:Math.round(1e3*i)/1e3},i=(i+e)/2,i>1.5*Math.PI?i-=2*Math.PI:i<-Math.PI/2&&(i+=2*Math.PI),l.slicedTranslation={translateX:Math.round(Math.cos(i)*d),translateY:Math.round(Math.sin(i)*d)},s=Math.cos(i)*t[2]/2,o=Math.sin(i)*t[2]/2,l.tooltipPos=[t[0]+.7*s,t[1]+.7*o],l.half=i<-Math.PI/2||i>Math.PI/2?1:0,l.angle=i,e=Math.min(p,l.labelDistance/5),l.labelPosition={natural:{x:t[0]+s+Math.cos(i)*l.labelDistance,y:t[1]+o+Math.sin(i)*l.labelDistance},final:{},alignment:0>l.labelDistance?"center":l.half?"right":"left",connectorPosition:{breakAt:{x:t[0]+s+Math.cos(i)*e,y:t[1]+o+Math.sin(i)*e},touchingSliceAt:{x:t[0]+s,y:t[1]+o}}}},drawGraph:null,redrawPoints:function(){var t,e,i,s,n=this,a=n.chart,r=a.renderer,l=n.options.shadow;!l||n.shadowGroup||a.styledMode||(n.shadowGroup=r.g("shadow").attr({zIndex:-1}).add(n.group)),n.points.forEach(function(h){var c={};if(e=h.graphic,!h.isNull&&e){if(s=h.shapeArgs,t=h.getTranslate(),!a.styledMode){var d=h.shadowGroup;l&&!d&&(d=h.shadowGroup=r.g("shadow").add(n.shadowGroup)),d&&d.attr(t),i=n.pointAttribs(h,h.selected&&"select")}h.delayedRendering?(e.setRadialReference(n.center).attr(s).attr(t),a.styledMode||e.attr(i).attr({"stroke-linejoin":"round"}).shadow(l,d),h.delayRendering=!1):(e.setRadialReference(n.center),a.styledMode||o(!0,c,i),o(!0,c,s,t),e.animate(c)),e.attr({visibility:h.visible?"inherit":"hidden"}),e.addClass(h.getClassName())}else e&&(h.graphic=e.destroy())})},drawPoints:function(){var t=this.chart.renderer;this.points.forEach(function(e){e.graphic||(e.graphic=t[e.shapeType](e.shapeArgs).add(e.series.group),e.delayedRendering=!0)})},searchPoint:a,sortByAngle:function(t,e){t.sort(function(t,i){return void 0!==t.angle&&(i.angle-t.angle)*e})},drawLegendSymbol:t.LegendSymbolMixin.drawRectangle,getCenter:i.getCenter,getSymbol:a},{init:function(){l.prototype.init.apply(this,arguments);var t,i=this;return i.name=r(i.name,"Slice"),t=function(t){i.slice("select"===t.type)},e(i,"select",t),e(i,"unselect",t),i},isValid:function(){return t.isNumber(this.y,!0)&&0<=this.y},setVisible:function(t,e){var i=this,s=i.series,n=s.chart,o=s.options.ignoreHiddenPoint;e=r(e,o),t!==i.visible&&(i.visible=i.options.visible=t=void 0===t?!i.visible:t,s.options.data[s.data.indexOf(i)]=i.options,["graphic","dataLabel","connector","shadowGroup"].forEach(function(e){i[e]&&i[e][t?"show":"hide"](!0)}),i.legendItem&&n.legend.colorizeItem(i,t),t||"hover"!==i.state||i.setState(""),o&&(s.isDirty=!0),e&&n.redraw())},slice:function(t,e,i){var n=this.series;d(i,n.chart),r(e,!0),this.sliced=this.options.sliced=s(t)?t:!this.sliced,n.options.data[n.data.indexOf(this)]=this.options,this.graphic.animate(this.getTranslate()),this.shadowGroup&&this.shadowGroup.animate(this.getTranslate())},getTranslate:function(){return this.sliced?this.slicedTranslation:{translateX:0,translateY:0}},haloPath:function(t){var e=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(e.x,e.y,e.r+t,e.r+t,{innerR:this.shapeArgs.r-1,start:e.start,end:e.end})},connectorShapes:{fixedOffset:function(t,e,i){var s=e.breakAt;return e=e.touchingSliceAt,["M",t.x,t.y].concat(i.softConnector?["C",t.x+("left"===t.alignment?-5:5),t.y,2*s.x-e.x,2*s.y-e.y,s.x,s.y]:["L",s.x,s.y]).concat(["L",e.x,e.y])},straight:function(t,e){return e=e.touchingSliceAt,["M",t.x,t.y,"L",e.x,e.y]},crookedLine:function(e,i,s){i=i.touchingSliceAt;var n=this.series,o=n.center[0],a=n.chart.plotWidth,r=n.chart.plotLeft,n=e.alignment,l=this.shapeArgs.r;return s=t.relativeLength(s.crookDistance,1),s="left"===n?o+l+(a+r-o-l)*(1-s):r+(o-l)*s,o=["L",s,e.y],("left"===n?s>e.x||s<i.x:s<e.x||s>i.x)&&(o=[]),["M",e.x,e.y].concat(o).concat(["L",i.x,i.y])}},getConnectorPath:function(){var t=this.labelPosition,e=this.series.options.dataLabels,i=e.connectorShape,s=this.connectorShapes;return s[i]&&(i=s[i]),i.call(this,{x:t.final.x,y:t.final.y,alignment:t.alignment},t.connectorPosition,e)}})}),e(i,"parts/DataLabels.js",[i["parts/Globals.js"]],function(t){var e=t.arrayMax,i=t.defined,s=t.extend,n=t.format,o=t.merge,a=t.noop,r=t.pick,l=t.relativeLength,h=t.Series,c=t.seriesTypes,d=t.stableSort,p=t.isArray,u=t.splat;t.distribute=function(e,i,s){function n(t,e){return t.target-e.target}var o,a,l=!0,h=e,c=[];a=0;var p=h.reducedLen||i;for(o=e.length;o--;)a+=e[o].size;if(a>p){for(d(e,function(t,e){return(e.rank||0)-(t.rank||0)}),a=o=0;a<=p;)a+=e[o].size,o++;c=e.splice(o-1,e.length)}for(d(e,n),e=e.map(function(t){return{size:t.size,targets:[t.target],align:r(t.align,.5)}});l;){for(o=e.length;o--;)l=e[o],a=(Math.min.apply(0,l.targets)+Math.max.apply(0,l.targets))/2,l.pos=Math.min(Math.max(0,a-l.size*l.align),i-l.size);for(o=e.length,l=!1;o--;)0<o&&e[o-1].pos+e[o-1].size>e[o].pos&&(e[o-1].size+=e[o].size,e[o-1].targets=e[o-1].targets.concat(e[o].targets),e[o-1].align=.5,e[o-1].pos+e[o-1].size>i&&(e[o-1].pos=i-e[o-1].size),e.splice(o,1),l=!0)}h.push.apply(h,c),o=0,e.some(function(e){var n=0;if(e.targets.some(function(){if(h[o].pos=e.pos+n,Math.abs(h[o].pos-h[o].target)>s)return h.slice(0,o+1).forEach(function(t){delete t.pos}),h.reducedLen=(h.reducedLen||i)-.1*i,h.reducedLen>.1*i&&t.distribute(h,i,s),!0;n+=h[o].size,o++}))return!0}),d(h,n)},h.prototype.drawDataLabels=function(){function e(t,e){var i=e.filter;return!i||(e=i.operator,t=t[i.property],i=i.value,">"===e&&t>i||"<"===e&&t<i||">="===e&&t>=i||"<="===e&&t<=i||"=="===e&&t==i||"==="===e&&t===i)}function s(t,e){var i,s=[];if(p(t)&&!p(e))s=t.map(function(t){return o(t,e)});else if(p(e)&&!p(t))s=e.map(function(e){return o(t,e)});else if(p(t)||p(e))for(i=Math.max(t.length,e.length);i--;)s[i]=o(t[i],e[i]);else s=o(t,e);return s}var a,l,h=this,c=h.chart,d=h.options,f=d.dataLabels,g=h.points,m=h.hasRendered||0,v=t.animObject(d.animation).duration,x=Math.min(v,200),y=r(f.defer,0<x),b=c.renderer,f=s(s(c.options.plotOptions&&c.options.plotOptions.series&&c.options.plotOptions.series.dataLabels,c.options.plotOptions&&c.options.plotOptions[h.type]&&c.options.plotOptions[h.type].dataLabels),f);t.fireEvent(this,"drawDataLabels"),(p(f)||f.enabled||h._hasPointLabels)&&(l=h.plotGroup("dataLabelsGroup","data-labels",y&&!m?"hidden":"inherit",f.zIndex||6),y&&(l.attr({opacity:+m}),m||setTimeout(function(){var t=h.dataLabelsGroup;t&&(h.visible&&l.show(!0),t[d.animation?"animate":"attr"]({opacity:1},{duration:x}))},v-x)),g.forEach(function(o){a=u(s(f,o.dlOptions||o.options&&o.options.dataLabels)),a.forEach(function(s,a){var p,u,f,g,m=s.enabled&&(!o.isNull||o.dataLabelOnNull)&&e(o,s),v=o.dataLabels?o.dataLabels[a]:o.dataLabel,x=o.connectors?o.connectors[a]:o.connector,y=!v;m&&(p=o.getLabelConfig(),u=r(s[o.formatPrefix+"Format"],s.format),p=i(u)?n(u,p,c.time):(s[o.formatPrefix+"Formatter"]||s.formatter).call(p,s),u=s.style,f=s.rotation,c.styledMode||(u.color=r(s.color,u.color,h.color,"#000000"),"contrast"===u.color&&(o.contrastColor=b.getContrast(o.color||h.color),u.color=s.inside||0>r(s.distance,o.labelDistance)||d.stacking?o.contrastColor:"#000000"),d.cursor&&(u.cursor=d.cursor)),g={r:s.borderRadius||0,rotation:f,padding:s.padding,zIndex:1},c.styledMode||(g.fill=s.backgroundColor,g.stroke=s.borderColor,g["stroke-width"]=s.borderWidth),t.objectEach(g,function(t,e){void 0===t&&delete g[e]})),!v||m&&i(p)?m&&i(p)&&(v?g.text=p:(o.dataLabels=o.dataLabels||[],v=o.dataLabels[a]=f?b.text(p,0,-9999).addClass("highcharts-data-label"):b.label(p,0,-9999,s.shape,null,null,s.useHTML,null,"data-label"),a||(o.dataLabel=v),v.addClass(" highcharts-data-label-color-"+o.colorIndex+" "+(s.className||"")+(s.useHTML?" highcharts-tracker":""))),v.options=s,v.attr(g),c.styledMode||v.css(u).shadow(s.shadow),v.added||v.add(l),s.textPath&&v.setTextPath(o.getDataLabelPath&&o.getDataLabelPath(v)||o.graphic,s.textPath),h.alignDataLabel(o,v,s,null,y)):(o.dataLabel=o.dataLabel&&o.dataLabel.destroy(),o.dataLabels&&(1===o.dataLabels.length?delete o.dataLabels:delete o.dataLabels[a]),a||delete o.dataLabel,x&&(o.connector=o.connector.destroy(),o.connectors&&(1===o.connectors.length?delete o.connectors:delete o.connectors[a])))})})),t.fireEvent(this,"afterDrawDataLabels")},h.prototype.alignDataLabel=function(t,e,i,n,o){var a,l=this.chart,h=this.isCartesian&&l.inverted,c=r(t.dlBox&&t.dlBox.centerX,t.plotX,-9999),d=r(t.plotY,-9999),p=e.getBBox(),u=i.rotation,f=i.align,g=this.visible&&(t.series.forceDL||l.isInsidePlot(c,Math.round(d),h)||n&&l.isInsidePlot(c,h?n.x+1:n.y+n.height-1,h)),m="justify"===r(i.overflow,"justify");g&&(a=l.renderer.fontMetrics(l.styledMode?void 0:i.style.fontSize,e).b,n=s({x:h?this.yAxis.len-d:c,y:Math.round(h?this.xAxis.len-c:d),width:0,height:0},n),s(i,{width:p.width,height:p.height}),u?(m=!1,c=l.renderer.rotCorr(a,u),c={x:n.x+i.x+n.width/2+c.x,y:n.y+i.y+{top:0,middle:.5,bottom:1}[i.verticalAlign]*n.height},e[o?"attr":"animate"](c).attr({align:f}),d=(u+720)%360,d=180<d&&360>d,"left"===f?c.y-=d?p.height:0:"center"===f?(c.x-=p.width/2,c.y-=p.height/2):"right"===f&&(c.x-=p.width,c.y-=d?0:p.height),e.placed=!0,e.alignAttr=c):(e.align(i,null,n),c=e.alignAttr),m&&0<=n.height?t.isLabelJustified=this.justifyDataLabel(e,i,c,p,n,o):r(i.crop,!0)&&(g=l.isInsidePlot(c.x,c.y)&&l.isInsidePlot(c.x+p.width,c.y+p.height)),i.shape&&!u)&&e[o?"attr":"animate"]({anchorX:h?l.plotWidth-t.plotY:t.plotX,anchorY:h?l.plotHeight-t.plotX:t.plotY}),g||(e.attr({y:-9999}),e.placed=!1)},h.prototype.justifyDataLabel=function(t,e,i,s,n,o){var a,r,l=this.chart,h=e.align,c=e.verticalAlign,d=t.box?0:t.padding||0;return a=i.x+d,0>a&&("right"===h?e.align="left":e.x=-a,r=!0),a=i.x+s.width-d,a>l.plotWidth&&("left"===h?e.align="right":e.x=l.plotWidth-a,r=!0),a=i.y+d,0>a&&("bottom"===c?e.verticalAlign="top":e.y=-a,r=!0),a=i.y+s.height-d,a>l.plotHeight&&("top"===c?e.verticalAlign="bottom":e.y=l.plotHeight-a,r=!0),r&&(t.placed=!o,t.align(e,null,n)),r},c.pie&&(c.pie.prototype.dataLabelPositioners={radialDistributionY:function(t){return t.top+t.distributeBox.pos},radialDistributionX:function(t,e,i,s){return t.getX(i<e.top+2||i>e.bottom-2?s:i,e.half,e)},justify:function(t,e,i){return i[0]+(t.half?-1:1)*(e+t.labelDistance)},alignToPlotEdges:function(t,e,i,s){return t=t.getBBox().width,e?t+s:i-t-s},alignToConnectors:function(t,e,i,s){var n,o=0;return t.forEach(function(t){(n=t.dataLabel.getBBox().width)>o&&(o=n)}),e?o+s:i-o-s}},c.pie.prototype.drawDataLabels=function(){var s,n,a,l,c,d,p,u,f,g,m,v,x=this,y=x.data,b=x.chart,w=x.options.dataLabels,k=w.connectorPadding,M=b.plotWidth,S=b.plotHeight,T=b.plotLeft,C=Math.round(b.chartWidth/3),A=x.center,E=A[2]/2,P=A[1],O=[[],[]],L=[0,0,0,0],D=x.dataLabelPositioners;x.visible&&(w.enabled||x._hasPointLabels)&&(y.forEach(function(t){t.dataLabel&&t.visible&&t.dataLabel.shortened&&(t.dataLabel.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),t.dataLabel.shortened=!1)}),h.prototype.drawDataLabels.apply(x),y.forEach(function(t){t.dataLabel&&(t.visible?(O[t.half].push(t),t.dataLabel._pos=null,!i(w.style.width)&&!i(t.options.dataLabels&&t.options.dataLabels.style&&t.options.dataLabels.style.width)&&t.dataLabel.getBBox().width>C&&(t.dataLabel.css({width:.7*C}),t.dataLabel.shortened=!0)):(t.dataLabel=t.dataLabel.destroy(),t.dataLabels&&1===t.dataLabels.length&&delete t.dataLabels))}),O.forEach(function(e,n){var o,a,h,v=e.length,y=[];if(v)for(x.sortByAngle(e,n-.5),0<x.maxLabelDistance&&(o=Math.max(0,P-E-x.maxLabelDistance),a=Math.min(P+E+x.maxLabelDistance,b.plotHeight),e.forEach(function(t){0<t.labelDistance&&t.dataLabel&&(t.top=Math.max(0,P-E-t.labelDistance),t.bottom=Math.min(P+E+t.labelDistance,b.plotHeight),h=t.dataLabel.getBBox().height||21,t.distributeBox={target:t.labelPosition.natural.y-t.top+h/2,size:h,rank:t.y},y.push(t.distributeBox))}),o=a+h-o,t.distribute(y,o,o/5)),m=0;m<v;m++){if(s=e[m],d=s.labelPosition,l=s.dataLabel,g=!1===s.visible?"hidden":"inherit",f=o=d.natural.y,y&&i(s.distributeBox)&&(void 0===s.distributeBox.pos?g="hidden":(p=s.distributeBox.size,f=D.radialDistributionY(s))),delete s.positionIndex,w.justify)u=D.justify(s,E,A);else switch(w.alignTo){case"connectors":u=D.alignToConnectors(e,n,M,T);break;case"plotEdges":u=D.alignToPlotEdges(l,n,M,T);break;default:u=D.radialDistributionX(x,s,f,o)}l._attr={visibility:g,align:d.alignment},l._pos={x:u+w.x+({left:k,right:-k}[d.alignment]||0),y:f+w.y-10},d.final.x=u,d.final.y=f,r(w.crop,!0)&&(c=l.getBBox().width,o=null,u-c<k&&1===n?(o=Math.round(c-u+k),L[3]=Math.max(o,L[3])):u+c>M-k&&0===n&&(o=Math.round(u+c-M+k),L[1]=Math.max(o,L[1])),0>f-p/2?L[0]=Math.max(Math.round(p/2-f),L[0]):f+p/2>S&&(L[2]=Math.max(Math.round(f+p/2-S),L[2])),l.sideOverflow=o)}}),0===e(L)||this.verifyDataLabelOverflow(L))&&(this.placeDataLabels(),this.points.forEach(function(t){if(v=o(w,t.options.dataLabels),n=r(v.connectorWidth,1)){var e;a=t.connector,(l=t.dataLabel)&&l._pos&&t.visible&&0<t.labelDistance?(g=l._attr.visibility,(e=!a)&&(t.connector=a=b.renderer.path().addClass("highcharts-data-label-connector highcharts-color-"+t.colorIndex+(t.className?" "+t.className:"")).add(x.dataLabelsGroup),b.styledMode||a.attr({"stroke-width":n,stroke:v.connectorColor||t.color||"#666666"})),a[e?"attr":"animate"]({d:t.getConnectorPath()}),a.attr("visibility",g)):a&&(t.connector=a.destroy())}}))},c.pie.prototype.placeDataLabels=function(){this.points.forEach(function(t){var e,i=t.dataLabel;i&&t.visible&&((e=i._pos)?(i.sideOverflow&&(i._attr.width=Math.max(i.getBBox().width-i.sideOverflow,0),i.css({width:i._attr.width+"px",textOverflow:(this.options.dataLabels.style||{}).textOverflow||"ellipsis"}),i.shortened=!0),i.attr(i._attr),i[i.moved?"animate":"attr"](e),i.moved=!0):i&&i.attr({y:-9999})),delete t.distributeBox},this)},c.pie.prototype.alignDataLabel=a,c.pie.prototype.verifyDataLabelOverflow=function(t){var e,i=this.center,s=this.options,n=s.center,o=s.minSize||80,a=null!==s.size;return a||(null!==n[0]?e=Math.max(i[2]-Math.max(t[1],t[3]),o):(e=Math.max(i[2]-t[1]-t[3],o),i[0]+=(t[3]-t[1])/2),null!==n[1]?e=Math.max(Math.min(e,i[2]-Math.max(t[0],t[2])),o):(e=Math.max(Math.min(e,i[2]-t[0]-t[2]),o),i[1]+=(t[0]-t[2])/2),e<i[2]?(i[2]=e,i[3]=Math.min(l(s.innerSize||0,e),e),this.translate(i),this.drawDataLabels&&this.drawDataLabels()):a=!0),a}),c.column&&(c.column.prototype.alignDataLabel=function(t,e,i,s,n){var a=this.chart.inverted,l=t.series,c=t.dlBox||t.shapeArgs,d=r(t.below,t.plotY>r(this.translatedThreshold,l.yAxis.len)),p=r(i.inside,!!this.options.stacking);c&&(s=o(c),0>s.y&&(s.height+=s.y,s.y=0),c=s.y+s.height-l.yAxis.len,0<c&&(s.height-=c),a&&(s={x:l.yAxis.len-s.y-s.height,y:l.xAxis.len-s.x-s.width,width:s.height,height:s.width}),p||(a?(s.x+=d?0:s.width,s.width=0):(s.y+=d?s.height:0,s.height=0))),i.align=r(i.align,!a||p?"center":d?"right":"left"),i.verticalAlign=r(i.verticalAlign,a||p?"middle":d?"top":"bottom"),h.prototype.alignDataLabel.call(this,t,e,i,s,n),t.isLabelJustified&&t.contrastColor&&e.css({color:t.contrastColor})})}),e(i,"modules/overlapping-datalabels.src.js",[i["parts/Globals.js"]],function(t){var e=t.Chart,i=t.isArray,s=t.objectEach,n=t.pick,o=t.addEvent,a=t.fireEvent;o(e,"render",function(){var t=[];(this.labelCollectors||[]).forEach(function(e){t=t.concat(e())}),(this.yAxis||[]).forEach(function(e){e.options.stackLabels&&!e.options.stackLabels.allowOverlap&&s(e.stacks,function(e){s(e,function(e){t.push(e.label)})})}),(this.series||[]).forEach(function(e){var s=e.options.dataLabels;e.visible&&(!1!==s.enabled||e._hasPointLabels)&&e.points.forEach(function(e){e.visible&&(i(e.dataLabels)?e.dataLabels:e.dataLabel?[e.dataLabel]:[]).forEach(function(i){var s=i.options;i.labelrank=n(s.labelrank,e.labelrank,e.shapeArgs&&e.shapeArgs.height),s.allowOverlap||t.push(i)})})}),this.hideOverlappingLabels(t)}),e.prototype.hideOverlappingLabels=function(t){var e,i,s,n,o,r,l=this,h=t.length,c=l.renderer;for(s=function(t){var e,i,s,n=t.box?0:t.padding||0;if(s=0,t&&(!t.alignAttr||t.placed))return e=t.alignAttr||{x:t.attr("x"),y:t.attr("y")},i=t.parentGroup,t.width||(s=t.getBBox(),t.width=s.width,t.height=s.height,s=c.fontMetrics(null,t.element).h),{x:e.x+(i.translateX||0)+n,y:e.y+(i.translateY||0)+n-s,width:t.width-2*n,height:t.height-2*n}},i=0;i<h;i++)(e=t[i])&&(e.oldOpacity=e.opacity,e.newOpacity=1,e.absoluteBox=s(e));for(t.sort(function(t,e){return(e.labelrank||0)-(t.labelrank||0)}),i=0;i<h;i++)for(r=(s=t[i])&&s.absoluteBox,e=i+1;e<h;++e)o=(n=t[e])&&n.absoluteBox,r&&o&&s!==n&&0!==s.newOpacity&&0!==n.newOpacity&&(o=function(t,e,i,s,n,o,a,r){return!(n>t+i||n+a<t||o>e+s||o+r<e)}(r.x,r.y,r.width,r.height,o.x,o.y,o.width,o.height))&&((s.labelrank<n.labelrank?s:n).newOpacity=0);t.forEach(function(t){var e,i;t&&(i=t.newOpacity,t.oldOpacity!==i&&(t.alignAttr&&t.placed?(i?t.show(!0):e=function(){t.hide()},t.alignAttr.opacity=i,t[t.isOld?"animate":"attr"](t.alignAttr,null,e),a(l,"afterHideOverlappingLabels")):t.attr({opacity:i})),t.isOld=!0)})}}),e(i,"parts/Interaction.js",[i["parts/Globals.js"]],function(t){var e,i=t.addEvent,s=t.Chart,n=t.createElement,o=t.css,a=t.defaultOptions,r=t.defaultPlotOptions,l=t.extend,h=t.fireEvent,c=t.hasTouch,d=t.isObject,p=t.Legend,u=t.merge,f=t.pick,g=t.Point,m=t.Series,v=t.seriesTypes,x=t.svg;e=t.TrackerMixin={drawTrackerPoint:function(){var t=this,e=t.chart,i=e.pointer,s=function(t){var e=i.getPointFromEvent(t);void 0!==e&&(i.isDirectTouch=!0,e.onMouseOver(t))};t.points.forEach(function(t){t.graphic&&(t.graphic.element.point=t),t.dataLabel&&(t.dataLabel.div?t.dataLabel.div.point=t:t.dataLabel.element.point=t)}),t._hasTracking||(t.trackerGroups.forEach(function(n){t[n]&&(t[n].addClass("highcharts-tracker").on("mouseover",s).on("mouseout",function(t){i.onTrackerMouseOut(t)}),c&&t[n].on("touchstart",s),!e.styledMode&&t.options.cursor&&t[n].css(o).css({cursor:t.options.cursor}))}),t._hasTracking=!0),h(this,"afterDrawTracker")},drawTrackerGraph:function(){var t,e=this,i=e.options,s=i.trackByArea,n=[].concat(s?e.areaPath:e.graphPath),o=n.length,a=e.chart,r=a.pointer,l=a.renderer,d=a.options.tooltip.snap,p=e.tracker,u=function(){a.hoverSeries!==e&&e.onMouseOver()},f="rgba(192,192,192,"+(x?1e-4:.002)+")";if(o&&!s)for(t=o+1;t--;)"M"===n[t]&&n.splice(t+1,0,n[t+1]-d,n[t+2],"L"),(t&&"M"===n[t]||t===o)&&n.splice(t,0,"L",n[t-2]+d,n[t-1]);p?p.attr({d:n}):e.graph&&(e.tracker=l.path(n).attr({visibility:e.visible?"visible":"hidden",zIndex:2}).addClass(s?"highcharts-tracker-area":"highcharts-tracker-line").add(e.group),a.styledMode||e.tracker.attr({"stroke-linejoin":"round",stroke:f,fill:s?f:"none","stroke-width":e.graph.strokeWidth()+(s?0:2*d)}),[e.tracker,e.markerGroup].forEach(function(t){t.addClass("highcharts-tracker").on("mouseover",u).on("mouseout",function(t){r.onTrackerMouseOut(t)}),i.cursor&&!a.styledMode&&t.css({cursor:i.cursor}),c&&t.on("touchstart",u)})),h(this,"afterDrawTracker")}},v.column&&(v.column.prototype.drawTracker=e.drawTrackerPoint),v.pie&&(v.pie.prototype.drawTracker=e.drawTrackerPoint),v.scatter&&(v.scatter.prototype.drawTracker=e.drawTrackerPoint),l(p.prototype,{setItemEvents:function(t,e,i){var s=this,n=s.chart.renderer.boxWrapper,o=t instanceof g,a="highcharts-legend-"+(o?"point":"series")+"-active",r=s.chart.styledMode;(i?e:t.legendGroup).on("mouseover",function(){s.allItems.forEach(function(e){t!==e&&e.setState("inactive",!o)}),t.setState("hover"),t.visible&&n.addClass(a),r||e.css(s.options.itemHoverStyle)}).on("mouseout",function(){s.styledMode||e.css(u(t.visible?s.itemStyle:s.itemHiddenStyle)),s.allItems.forEach(function(e){t!==e&&e.setState("",!o)}),n.removeClass(a),t.setState()}).on("click",function(e){var i=function(){t.setVisible&&t.setVisible()};n.removeClass(a),e={browserEvent:e},t.firePointEvent?t.firePointEvent("legendItemClick",e,i):h(t,"legendItemClick",e,i)})},createCheckboxForItem:function(t){t.checkbox=n("input",{type:"checkbox",className:"highcharts-legend-checkbox",checked:t.selected,defaultChecked:t.selected},this.options.itemCheckboxStyle,this.chart.container),i(t.checkbox,"click",function(e){h(t.series||t,"checkboxClick",{checked:e.target.checked,item:t},function(){t.select()})})}}),l(s.prototype,{showResetZoom:function(){function t(){e.zoomOut()}var e=this,i=a.lang,s=e.options.chart.resetZoomButton,n=s.theme,o=n.states,r="chart"===s.relativeTo||"spaceBox"===s.relativeTo?null:"plotBox";h(this,"beforeShowResetZoom",null,function(){e.resetZoomButton=e.renderer.button(i.resetZoom,null,null,t,n,o&&o.hover).attr({align:s.position.align,title:i.resetZoomTitle}).addClass("highcharts-reset-zoom").add().align(s.position,!1,r)}),h(this,"afterShowResetZoom")},zoomOut:function(){h(this,"selection",{resetSelection:!0},this.zoom)},zoom:function(e){var i,s,n=this,o=n.pointer,a=!1,r=n.inverted?o.mouseDownX:o.mouseDownY;!e||e.resetSelection?(n.axes.forEach(function(t){i=t.zoom()}),o.initiated=!1):e.xAxis.concat(e.yAxis).forEach(function(e){var s=e.axis,l=n.inverted?s.left:s.top,h=n.inverted?l+s.width:l+s.height,c=s.isXAxis,d=!1;(!c&&r>=l&&r<=h||c||!t.defined(r))&&(d=!0),o[c?"zoomX":"zoomY"]&&d&&(i=s.zoom(e.min,e.max),s.displayBtn&&(a=!0))}),s=n.resetZoomButton,a&&!s?n.showResetZoom():!a&&d(s)&&(n.resetZoomButton=s.destroy()),i&&n.redraw(f(n.options.chart.animation,e&&e.animation,100>n.pointCount))},pan:function(t,e){var i,s=this,n=s.hoverPoints;h(this,"pan",{originalEvent:t},function(){n&&n.forEach(function(t){t.setState()}),("xy"===e?[1,0]:[1]).forEach(function(e){e=s[e?"xAxis":"yAxis"][0];var n=e.horiz,o=t[n?"chartX":"chartY"],n=n?"mouseDownX":"mouseDownY",a=s[n],r=(e.pointRange||0)/2,l=e.reversed&&!s.inverted||!e.reversed&&s.inverted?-1:1,h=e.getExtremes(),c=e.toValue(a-o,!0)+r*l,l=e.toValue(a+e.len-o,!0)-r*l,d=l<c,a=d?l:c,c=d?c:l,l=Math.min(h.dataMin,r?h.min:e.toValue(e.toPixels(h.min)-e.minPixelPadding)),r=Math.max(h.dataMax,r?h.max:e.toValue(e.toPixels(h.max)+e.minPixelPadding)),d=l-a;0<d&&(c+=d,a=l),d=c-r,0<d&&(c=r,a-=d),e.series.length&&a!==h.min&&c!==h.max&&(e.setExtremes(a,c,!1,!1,{trigger:"pan"}),i=!0),s[n]=o}),i&&s.redraw(!1),o(s.container,{cursor:"move"})})}}),l(g.prototype,{select:function(t,e){var i=this,s=i.series,n=s.chart;t=f(t,!i.selected),i.firePointEvent(t?"select":"unselect",{accumulate:e},function(){i.selected=i.options.selected=t,s.options.data[s.data.indexOf(i)]=i.options,i.setState(t&&"select"),e||n.getSelectedPoints().forEach(function(t){var e=t.series;t.selected&&t!==i&&(t.selected=t.options.selected=!1,e.options.data[e.data.indexOf(t)]=t.options,t.setState(n.hoverPoints&&e.options.inactiveOtherPoints?"inactive":""),t.firePointEvent("unselect"))})})},onMouseOver:function(t){var e=this.series.chart,i=e.pointer;t=t?i.normalize(t):i.getChartCoordinatesFromPoint(this,e.inverted),i.runPointActions(t,this)},onMouseOut:function(){var t=this.series.chart;this.firePointEvent("mouseOut"),this.series.options.inactiveOtherPoints||(t.hoverPoints||[]).forEach(function(t){t.setState()}),t.hoverPoints=t.hoverPoint=null},importEvents:function(){if(!this.hasImportedEvents){var e=this,s=u(e.series.options.point,e.options).events;e.events=s,t.objectEach(s,function(t,s){i(e,s,t)}),this.hasImportedEvents=!0}},setState:function(t,e){var i,s,n,o=Math.floor(this.plotX),a=this.plotY,c=this.series,d=this.state,p=c.options.states[t||"normal"]||{},u=r[c.type].marker&&c.options.marker,g=u&&!1===u.enabled,m=u&&u.states&&u.states[t||"normal"]||{},v=!1===m.enabled,x=c.stateMarkerGraphic,y=this.marker||{},b=c.chart,w=c.halo,k=u&&c.markerAttribs;(t=t||"")===this.state&&!e||this.selected&&"select"!==t||!1===p.enabled||t&&(v||g&&!1===m.enabled)||t&&y.states&&y.states[t]&&!1===y.states[t].enabled||(this.state=t,k&&(i=c.markerAttribs(this,t)),this.graphic?(d&&this.graphic.removeClass("highcharts-point-"+d),t&&this.graphic.addClass("highcharts-point-"+t),b.styledMode||(s=c.pointAttribs(this,t),n=f(b.options.chart.animation,p.animation),c.options.inactiveOtherPoints&&((this.dataLabels||[]).forEach(function(t){t&&t.animate({opacity:s.opacity},n)}),this.connector&&this.connector.animate({opacity:s.opacity},n)),this.graphic.animate(s,n)),i&&this.graphic.animate(i,f(b.options.chart.animation,m.animation,u.animation)),x&&x.hide()):(t&&m&&(d=y.symbol||c.symbol,x&&x.currentSymbol!==d&&(x=x.destroy()),x?x[e?"animate":"attr"]({x:i.x,y:i.y}):d&&(c.stateMarkerGraphic=x=b.renderer.symbol(d,i.x,i.y,i.width,i.height).add(c.markerGroup),x.currentSymbol=d),!b.styledMode&&x&&x.attr(c.pointAttribs(this,t))),x&&(x[t&&b.isInsidePlot(o,a,b.inverted)?"show":"hide"](),x.element.point=this)),(t=p.halo)&&t.size?(w||(c.halo=w=b.renderer.path().add((this.graphic||x).parentGroup)),w.show()[e?"animate":"attr"]({d:this.haloPath(t.size)}),w.attr({class:"highcharts-halo highcharts-color-"+f(this.colorIndex,c.colorIndex)+(this.className?" "+this.className:""),zIndex:-1}),w.point=this,b.styledMode||w.attr(l({fill:this.color||c.color,"fill-opacity":t.opacity},t.attributes))):w&&w.point&&w.point.haloPath&&w.animate({d:w.point.haloPath(0)},null,w.hide),h(this,"afterSetState"))},haloPath:function(t){return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX)-t,this.plotY-t,2*t,2*t)}}),l(m.prototype,{onMouseOver:function(){var t=this.chart,e=t.hoverSeries;e&&e!==this&&e.onMouseOut(),this.options.events.mouseOver&&h(this,"mouseOver"),this.setState("hover"),t.hoverSeries=this},onMouseOut:function(){var t=this.options,e=this.chart,i=e.tooltip,s=e.hoverPoint;e.hoverSeries=null,s&&s.onMouseOut(),this&&t.events.mouseOut&&h(this,"mouseOut"),!i||this.stickyTracking||i.shared&&!this.noSharedTooltip||i.hide(),e.series.forEach(function(t){t.setState("",!0)})},setState:function(t,e){var i=this,s=i.options,n=i.graph,o=s.inactiveOtherPoints,a=s.states,r=s.lineWidth,l=s.opacity,h=f(a[t||"normal"]&&a[t||"normal"].animation,i.chart.options.chart.animation),s=0;if(t=t||"",i.state!==t&&([i.group,i.markerGroup,i.dataLabelsGroup].forEach(function(e){e&&(i.state&&e.removeClass("highcharts-series-"+i.state),t&&e.addClass("highcharts-series-"+t))}),i.state=t,!i.chart.styledMode)){if(a[t]&&!1===a[t].enabled)return;if(t&&(r=a[t].lineWidth||r+(a[t].lineWidthPlus||0),l=f(a[t].opacity,l)),n&&!n.dashstyle)for(a={"stroke-width":r},n.animate(a,h);i["zone-graph-"+s];)i["zone-graph-"+s].attr(a),s+=1;o||[i.group,i.markerGroup,i.dataLabelsGroup,i.labelBySeries].forEach(function(t){t&&t.animate({opacity:l},h)})}e&&o&&i.points&&i.points.forEach(function(e){e.setState&&e.setState(t)})},setVisible:function(t,e){var i,s=this,n=s.chart,o=s.legendItem,a=n.options.chart.ignoreHiddenSeries,r=s.visible;i=(s.visible=t=s.options.visible=s.userOptions.visible=void 0===t?!r:t)?"show":"hide",["group","dataLabelsGroup","markerGroup","tracker","tt"].forEach(function(t){s[t]&&s[t][i]()}),n.hoverSeries!==s&&(n.hoverPoint&&n.hoverPoint.series)!==s||s.onMouseOut(),o&&n.legend.colorizeItem(s,t),s.isDirty=!0,s.options.stacking&&n.series.forEach(function(t){t.options.stacking&&t.visible&&(t.isDirty=!0)}),s.linkedSeries.forEach(function(e){e.setVisible(t,!1)}),a&&(n.isDirtyBox=!0),h(s,i),!1!==e&&n.redraw()},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(t){this.selected=t=this.options.selected=void 0===t?!this.selected:t,this.checkbox&&(this.checkbox.checked=t),h(this,t?"select":"unselect")},drawTracker:e.drawTrackerGraph})}),e(i,"parts/Responsive.js",[i["parts/Globals.js"]],function(t){var e=t.Chart,i=t.isArray,s=t.isObject,n=t.pick,o=t.splat;e.prototype.setResponsive=function(e,i){var s=this.options.responsive,n=[],o=this.currentResponsive;!i&&s&&s.rules&&s.rules.forEach(function(i){void 0===i._id&&(i._id=t.uniqueKey()),this.matchResponsiveRule(i,n,e)},this),i=t.merge.apply(0,n.map(function(e){return t.find(s.rules,function(t){return t._id===e}).chartOptions})),i.isResponsiveOptions=!0,(n=n.toString()||void 0)!==(o&&o.ruleIds)&&(o&&this.update(o.undoOptions,e),n?(o=this.currentOptions(i),o.isResponsiveOptions=!0,this.currentResponsive={ruleIds:n,mergedOptions:i,undoOptions:o},this.update(i,e)):this.currentResponsive=void 0)},e.prototype.matchResponsiveRule=function(t,e){var i=t.condition;(i.callback||function(){return this.chartWidth<=n(i.maxWidth,Number.MAX_VALUE)&&this.chartHeight<=n(i.maxHeight,Number.MAX_VALUE)&&this.chartWidth>=n(i.minWidth,0)&&this.chartHeight>=n(i.minHeight,0)}).call(this)&&e.push(t._id)},e.prototype.currentOptions=function(e){function a(e,r,l,h){var c;t.objectEach(e,function(t,e){if(!h&&-1<["series","xAxis","yAxis"].indexOf(e))for(t=o(t),l[e]=[],c=0;c<t.length;c++)r[e][c]&&(l[e][c]={},a(t[c],r[e][c],l[e][c],h+1));else s(t)?(l[e]=i(t)?[]:{},a(t,r[e]||{},l[e],h+1)):l[e]=n(r[e],null)})}var r={};return a(e,this.options,r,0),r}}),e(i,"masters/highcharts.src.js",[i["parts/Globals.js"]],function(t){return t}),e(i,"parts/Scrollbar.js",[i["parts/Globals.js"]],function(t){function e(t,e,i){this.init(t,e,i)}var i,s=t.addEvent,n=t.Axis,o=t.correctFloat,a=t.defaultOptions,r=t.defined,l=t.destroyObjectProperties,h=t.fireEvent,c=t.hasTouch,d=t.merge,p=t.pick,u=t.removeEvent,f={height:t.isTouchDevice?20:14,barBorderRadius:0,buttonBorderRadius:0,liveRedraw:void 0,margin:10,minWidth:6,step:.2,zIndex:3,barBackgroundColor:"#cccccc",barBorderWidth:1,barBorderColor:"#cccccc",buttonArrowColor:"#333333",buttonBackgroundColor:"#e6e6e6",buttonBorderColor:"#cccccc",buttonBorderWidth:1,rifleColor:"#333333",trackBackgroundColor:"#f2f2f2",trackBorderColor:"#f2f2f2",trackBorderWidth:1};a.scrollbar=d(!0,f,a.scrollbar),t.swapXY=i=function(t,e){var i,s=t.length;if(e)for(e=0;e<s;e+=3)i=t[e+1],t[e+1]=t[e+2],t[e+2]=i;return t},e.prototype={init:function(t,e,i){this.scrollbarButtons=[],this.renderer=t,this.userOptions=e,this.options=d(f,e),this.chart=i,this.size=p(this.options.size,this.options.height),e.enabled&&(this.render(),this.initEvents(),this.addEvents())},render:function(){var t,e=this.renderer,s=this.options,n=this.size,o=this.chart.styledMode;this.group=t=e.g("scrollbar").attr({zIndex:s.zIndex,translateY:-99999}).add(),this.track=e.rect().addClass("highcharts-scrollbar-track").attr({x:0,r:s.trackBorderRadius||0,height:n,width:n}).add(t),o||this.track.attr({fill:s.trackBackgroundColor,stroke:s.trackBorderColor,"stroke-width":s.trackBorderWidth}),this.trackBorderWidth=this.track.strokeWidth(),this.track.attr({y:-this.trackBorderWidth%2/2}),this.scrollbarGroup=e.g().add(t),this.scrollbar=e.rect().addClass("highcharts-scrollbar-thumb").attr({height:n,width:n,r:s.barBorderRadius||0}).add(this.scrollbarGroup),this.scrollbarRifles=e.path(i(["M",-3,n/4,"L",-3,2*n/3,"M",0,n/4,"L",0,2*n/3,"M",3,n/4,"L",3,2*n/3],s.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup),o||(this.scrollbar.attr({fill:s.barBackgroundColor,stroke:s.barBorderColor,"stroke-width":s.barBorderWidth}),this.scrollbarRifles.attr({stroke:s.rifleColor,"stroke-width":1})),this.scrollbarStrokeWidth=this.scrollbar.strokeWidth(),this.scrollbarGroup.translate(-this.scrollbarStrokeWidth%2/2,-this.scrollbarStrokeWidth%2/2),this.drawScrollbarButton(0),this.drawScrollbarButton(1)},position:function(t,e,i,s){var n=this.options.vertical,o=0,a=this.rendered?"animate":"attr";this.x=t,this.y=e+this.trackBorderWidth,this.width=i,this.xOffset=this.height=s,this.yOffset=o,n?(this.width=this.yOffset=i=o=this.size,this.xOffset=e=0,this.barWidth=s-2*i,this.x=t+=this.options.margin):(this.height=this.xOffset=s=e=this.size,this.barWidth=i-2*s,this.y+=this.options.margin),this.group[a]({translateX:t,translateY:this.y}),this.track[a]({width:i,height:s}),this.scrollbarButtons[1][a]({translateX:n?0:i-e,translateY:n?s-o:0})},drawScrollbarButton:function(t){var e,s=this.renderer,n=this.scrollbarButtons,o=this.options,a=this.size;e=s.g().add(this.group),n.push(e),e=s.rect().addClass("highcharts-scrollbar-button").add(e),this.chart.styledMode||e.attr({stroke:o.buttonBorderColor,"stroke-width":o.buttonBorderWidth,fill:o.buttonBackgroundColor}),e.attr(e.crisp({x:-.5,y:-.5,width:a+1,height:a+1,r:o.buttonBorderRadius},e.strokeWidth())),e=s.path(i(["M",a/2+(t?-1:1),a/2-3,"L",a/2+(t?-1:1),a/2+3,"L",a/2+(t?2:-2),a/2],o.vertical)).addClass("highcharts-scrollbar-arrow").add(n[t]),this.chart.styledMode||e.attr({fill:o.buttonArrowColor})},setRange:function(t,e){var i,s,n=this.options,a=n.vertical,l=n.minWidth,h=this.barWidth,c=!this.rendered||this.hasDragged||this.chart.navigator&&this.chart.navigator.hasDragged?"attr":"animate";r(h)&&(t=Math.max(t,0),i=Math.ceil(h*t),this.calculatedWidth=s=o(h*Math.min(e,1)-i),s<l&&(i=(h-l+s)*t,s=l),l=Math.floor(i+this.xOffset+this.yOffset),h=s/2-.5,this.from=t,this.to=e,a?(this.scrollbarGroup[c]({translateY:l}),this.scrollbar[c]({height:s}),this.scrollbarRifles[c]({translateY:h}),this.scrollbarTop=l,this.scrollbarLeft=0):(this.scrollbarGroup[c]({translateX:l}),this.scrollbar[c]({width:s}),this.scrollbarRifles[c]({translateX:h}),this.scrollbarLeft=l,this.scrollbarTop=0),12>=s?this.scrollbarRifles.hide():this.scrollbarRifles.show(!0),!1===n.showFull&&(0>=t&&1<=e?this.group.hide():this.group.show()),this.rendered=!0)},initEvents:function(){var t=this;t.mouseMoveHandler=function(e){var i=t.chart.pointer.normalize(e),s=t.options.vertical?"chartY":"chartX",n=t.initPositions;!t.grabbedCenter||e.touches&&0===e.touches[0][s]||(i=t.cursorToScrollbarPosition(i)[s],s=t[s],s=i-s,t.hasDragged=!0,t.updatePosition(n[0]+s,n[1]+s),t.hasDragged&&h(t,"changed",{from:t.from,to:t.to,trigger:"scrollbar",DOMType:e.type,DOMEvent:e}))},t.mouseUpHandler=function(e){t.hasDragged&&h(t,"changed",{from:t.from,to:t.to,trigger:"scrollbar",DOMType:e.type,DOMEvent:e}),t.grabbedCenter=t.hasDragged=t.chartX=t.chartY=null},t.mouseDownHandler=function(e){e=t.chart.pointer.normalize(e),e=t.cursorToScrollbarPosition(e),t.chartX=e.chartX,t.chartY=e.chartY,t.initPositions=[t.from,t.to],t.grabbedCenter=!0},t.buttonToMinClick=function(e){var i=o(t.to-t.from)*t.options.step;t.updatePosition(o(t.from-i),o(t.to-i)),h(t,"changed",{from:t.from,to:t.to,trigger:"scrollbar",DOMEvent:e})},t.buttonToMaxClick=function(e){var i=(t.to-t.from)*t.options.step;t.updatePosition(t.from+i,t.to+i),h(t,"changed",{from:t.from,to:t.to,trigger:"scrollbar",DOMEvent:e})},t.trackClick=function(e){var i=t.chart.pointer.normalize(e),s=t.to-t.from,n=t.y+t.scrollbarTop,o=t.x+t.scrollbarLeft;t.options.vertical&&i.chartY>n||!t.options.vertical&&i.chartX>o?t.updatePosition(t.from+s,t.to+s):t.updatePosition(t.from-s,t.to-s),h(t,"changed",{from:t.from,to:t.to,trigger:"scrollbar",DOMEvent:e})}},cursorToScrollbarPosition:function(t){var e=this.options,e=e.minWidth>this.calculatedWidth?e.minWidth:0;return{chartX:(t.chartX-this.x-this.xOffset)/(this.barWidth-e),chartY:(t.chartY-this.y-this.yOffset)/(this.barWidth-e)}},updatePosition:function(t,e){1<e&&(t=o(1-o(e-t)),e=1),0>t&&(e=o(e-t),t=0),this.from=t,this.to=e},update:function(t){this.destroy(),this.init(this.chart.renderer,d(!0,this.options,t),this.chart)},addEvents:function(){var t=this.options.inverted?[1,0]:[0,1],e=this.scrollbarButtons,i=this.scrollbarGroup.element,n=this.mouseDownHandler,o=this.mouseMoveHandler,a=this.mouseUpHandler,t=[[e[t[0]].element,"click",this.buttonToMinClick],[e[t[1]].element,"click",this.buttonToMaxClick],[this.track.element,"click",this.trackClick],[i,"mousedown",n],[i.ownerDocument,"mousemove",o],[i.ownerDocument,"mouseup",a]];c&&t.push([i,"touchstart",n],[i.ownerDocument,"touchmove",o],[i.ownerDocument,"touchend",a]),t.forEach(function(t){s.apply(null,t)}),this._events=t},removeEvents:function(){this._events.forEach(function(t){u.apply(null,t)}),this._events.length=0},destroy:function(){var t=this.chart.scroller;this.removeEvents(),["track","scrollbarRifles","scrollbar","scrollbarGroup","group"].forEach(function(t){this[t]&&this[t].destroy&&(this[t]=this[t].destroy())},this),t&&this===t.scrollbar&&(t.scrollbar=null,l(t.scrollbarButtons))}},t.Scrollbar||(s(n,"afterInit",function(){var i=this;i.options&&i.options.scrollbar&&i.options.scrollbar.enabled&&(i.options.scrollbar.vertical=!i.horiz,i.options.startOnTick=i.options.endOnTick=!1,i.scrollbar=new e(i.chart.renderer,i.options.scrollbar,i.chart),s(i.scrollbar,"changed",function(e){var s,n=Math.min(p(i.options.min,i.min),i.min,i.dataMin),o=Math.max(p(i.options.max,i.max),i.max,i.dataMax)-n;i.horiz&&!i.reversed||!i.horiz&&i.reversed?(s=n+o*this.to,n+=o*this.from):(s=n+o*(1-this.from),n+=o*(1-this.to)),p(this.options.liveRedraw,t.svg&&!t.isTouchDevice&&!this.chart.isBoosting)||"mouseup"===e.DOMType||!r(e.DOMType)?i.setExtremes(n,s,!0,"mousemove"!==e.DOMType,e):this.setRange(this.from,this.to)}))}),s(n,"afterRender",function(){var t=Math.min(p(this.options.min,this.min),this.min,p(this.dataMin,this.min)),e=Math.max(p(this.options.max,this.max),this.max,p(this.dataMax,this.max)),i=this.scrollbar,s=this.titleOffset||0;i&&(this.horiz?(i.position(this.left,this.top+this.height+2+this.chart.scrollbarsOffsets[1]+(this.opposite?0:s+this.axisTitleMargin+this.offset),this.width,this.height),s=1):(i.position(this.left+this.width+2+this.chart.scrollbarsOffsets[0]+(this.opposite?s+this.axisTitleMargin+this.offset:0),this.top,this.width,this.height),s=0),(!this.opposite&&!this.horiz||this.opposite&&this.horiz)&&(this.chart.scrollbarsOffsets[s]+=this.scrollbar.size+this.scrollbar.options.margin),isNaN(t)||isNaN(e)||!r(this.min)||!r(this.max)?i.setRange(0,0):(s=(this.min-t)/(e-t),t=(this.max-t)/(e-t),this.horiz&&!this.reversed||!this.horiz&&this.reversed?i.setRange(s,t):i.setRange(1-t,1-s)))}),s(n,"afterGetOffset",function(){var t=this.horiz?2:1,e=this.scrollbar;e&&(this.chart.scrollbarsOffsets=[0,0],this.chart.axisOffset[t]+=e.size+e.options.margin)}),t.Scrollbar=e)}),e(i,"parts/Navigator.js",[i["parts/Globals.js"]],function(t){function e(t){this.init(t)}var i,s=t.addEvent,n=t.Axis,o=t.Chart,a=t.color,r=t.defaultOptions,l=t.defined,h=t.destroyObjectProperties,c=t.erase,d=t.extend,p=t.hasTouch,u=t.isArray,f=t.isNumber,g=t.isTouchDevice,m=t.merge,v=t.pick,x=t.removeEvent,y=t.Scrollbar,b=t.Series,w=function(t){var e=[].filter.call(arguments,f);if(e.length)return Math[t].apply(0,e)};i=void 0===t.seriesTypes.areaspline?"line":"areaspline",d(r,{navigator:{height:40,margin:25,maskInside:!0,handles:{width:7,height:15,symbols:["navigator-handle","navigator-handle"],enabled:!0,lineWidth:1,backgroundColor:"#f2f2f2",borderColor:"#999999"},maskFill:a("#6685c2").setOpacity(.3).get(),outlineColor:"#cccccc",outlineWidth:1,series:{type:i,fillOpacity:.05,lineWidth:1,compare:null,dataGrouping:{approximation:"average",enabled:!0,groupPixelWidth:2,smoothed:!0,units:[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2,3,4]],["week",[1,2,3]],["month",[1,3,6]],["year",null]]},dataLabels:{enabled:!1,zIndex:2},id:"highcharts-navigator-series",className:"highcharts-navigator-series",lineColor:null,marker:{enabled:!1},pointRange:0,threshold:null},xAxis:{overscroll:0,className:"highcharts-navigator-xaxis",tickLength:0,lineWidth:0,gridLineColor:"#e6e6e6",gridLineWidth:1,tickPixelInterval:200,labels:{align:"left",style:{color:"#999999"},x:3,y:-4},crosshair:!1},yAxis:{className:"highcharts-navigator-yaxis",gridLineWidth:0,startOnTick:!1,endOnTick:!1,minPadding:.1,maxPadding:.1,labels:{enabled:!1},crosshair:!1,title:{text:null},tickLength:0,tickWidth:0}}}),t.Renderer.prototype.symbols["navigator-handle"]=function(t,e,i,s,n){return t=n.width/2,e=Math.round(t/3)+.5,n=n.height,["M",-t-1,.5,"L",t,.5,"L",t,n+.5,"L",-t-1,n+.5,"L",-t-1,.5,"M",-e,4,"L",-e,n-3,"M",e-1,4,"L",e-1,n-3]},n.prototype.toFixedRange=function(t,e,i,s){var n=this.chart&&this.chart.fixedRange;return t=v(i,this.translate(t,!0,!this.horiz)),e=v(s,this.translate(e,!0,!this.horiz)),i=n&&(e-t)/n,.7<i&&1.3>i&&(s?t=e-n:e=t+n),f(t)&&f(e)||(t=e=void 0),{min:t,max:e}},e.prototype={drawHandle:function(t,e,i,s){var n=this.navigatorOptions.handles.height;this.handles[e][s](i?{translateX:Math.round(this.left+this.height/2),translateY:Math.round(this.top+parseInt(t,10)+.5-n)}:{translateX:Math.round(this.left+parseInt(t,10)),translateY:Math.round(this.top+this.height/2-n/2-1)})},drawOutline:function(t,e,i,s){var n=this.navigatorOptions.maskInside,o=this.outline.strokeWidth(),a=o/2,o=o%2/2,r=this.outlineHeight,l=this.scrollbarHeight,h=this.size,c=this.left-l,d=this.top;i?(c-=a,i=d+e+o,e=d+t+o,t=["M",c+r,d-l-o,"L",c+r,i,"L",c,i,"L",c,e,"L",c+r,e,"L",c+r,d+h+l].concat(n?["M",c+r,i-a,"L",c+r,e+a]:[])):(t+=c+l-o,e+=c+l-o,d+=a,t=["M",c,d,"L",t,d,"L",t,d+r,"L",e,d+r,"L",e,d,"L",c+h+2*l,d].concat(n?["M",t-a,d,"L",e+a,d]:[])),this.outline[s]({d:t})},drawMasks:function(t,e,i,s){var n,o,a,r,l=this.left,h=this.top,c=this.height;i?(a=[l,l,l],r=[h,h+t,h+e],o=[c,c,c],n=[t,e-t,this.size-e]):(a=[l,l+t,l+e],r=[h,h,h],o=[t,e-t,this.size-e],n=[c,c,c]),this.shades.forEach(function(t,e){t[s]({x:a[e],y:r[e],width:o[e],height:n[e]})})},renderElements:function(){var t,e=this,i=e.navigatorOptions,s=i.maskInside,n=e.chart,o=n.renderer,a={cursor:n.inverted?"ns-resize":"ew-resize"};e.navigatorGroup=t=o.g("navigator").attr({zIndex:8,visibility:"hidden"}).add(),[!s,s,!s].forEach(function(s,r){e.shades[r]=o.rect().addClass("highcharts-navigator-mask"+(1===r?"-inside":"-outside")).add(t),n.styledMode||e.shades[r].attr({fill:s?i.maskFill:"rgba(0,0,0,0)"}).css(1===r&&a)}),e.outline=o.path().addClass("highcharts-navigator-outline").add(t),n.styledMode||e.outline.attr({"stroke-width":i.outlineWidth,stroke:i.outlineColor}),i.handles.enabled&&[0,1].forEach(function(s){if(i.handles.inverted=n.inverted,e.handles[s]=o.symbol(i.handles.symbols[s],-i.handles.width/2-1,0,i.handles.width,i.handles.height,i.handles),e.handles[s].attr({zIndex:7-s}).addClass("highcharts-navigator-handle highcharts-navigator-handle-"+["left","right"][s]).add(t),!n.styledMode){var r=i.handles;e.handles[s].attr({fill:r.backgroundColor,stroke:r.borderColor,"stroke-width":r.lineWidth}).css(a)}})},update:function(t){(this.series||[]).forEach(function(t){t.baseSeries&&delete t.baseSeries.navigatorSeries}),this.destroy(),m(!0,this.chart.options.navigator,this.options,t),this.init(this.chart)},render:function(e,i,s,n){var o,a,r,h=this.chart,c=this.scrollbarHeight,d=this.xAxis;o=d.fake?h.xAxis[0]:d;var p,u=this.navigatorEnabled,g=this.rendered;a=h.inverted;var m,x=h.xAxis[0].minRange,y=h.xAxis[0].options.maxRange;if(!this.hasDragged||l(s)){if(!f(e)||!f(i)){if(!g)return;s=0,n=v(d.width,o.width)}this.left=v(d.left,h.plotLeft+c+(a?h.plotWidth:0)),this.size=p=r=v(d.len,(a?h.plotHeight:h.plotWidth)-2*c),h=a?c:r+2*c,s=v(s,d.toPixels(e,!0)),n=v(n,d.toPixels(i,!0)),f(s)&&1/0!==Math.abs(s)||(s=0,n=h),e=d.toValue(s,!0),i=d.toValue(n,!0),m=Math.abs(t.correctFloat(i-e)),m<x?this.grabbedLeft?s=d.toPixels(i-x,!0):this.grabbedRight&&(n=d.toPixels(e+x,!0)):l(y)&&m>y&&(this.grabbedLeft?s=d.toPixels(i-y,!0):this.grabbedRight&&(n=d.toPixels(e+y,!0))),this.zoomedMax=Math.min(Math.max(s,n,0),p),this.zoomedMin=Math.min(Math.max(this.fixedWidth?this.zoomedMax-this.fixedWidth:Math.min(s,n),0),p),this.range=this.zoomedMax-this.zoomedMin,p=Math.round(this.zoomedMax),s=Math.round(this.zoomedMin),u&&(this.navigatorGroup.attr({visibility:"visible"}),g=g&&!this.hasDragged?"animate":"attr",this.drawMasks(s,p,a,g),this.drawOutline(s,p,a,g),this.navigatorOptions.handles.enabled&&(this.drawHandle(s,0,a,g),this.drawHandle(p,1,a,g))),this.scrollbar&&(a?(a=this.top-c,o=this.left-c+(u||!o.opposite?0:(o.titleOffset||0)+o.axisTitleMargin),c=r+2*c):(a=this.top+(u?this.height:-c),o=this.left-c),this.scrollbar.position(o,a,h,c),this.scrollbar.setRange(this.zoomedMin/(r||1),this.zoomedMax/(r||1))),this.rendered=!0}},addMouseEvents:function(){var t,e,i=this,n=i.chart,o=n.container,a=[];i.mouseMoveHandler=t=function(t){i.onMouseMove(t)},i.mouseUpHandler=e=function(t){i.onMouseUp(t)},a=i.getPartsEvents("mousedown"),a.push(s(o,"mousemove",t),s(o.ownerDocument,"mouseup",e)),p&&(a.push(s(o,"touchmove",t),s(o.ownerDocument,"touchend",e)),a.concat(i.getPartsEvents("touchstart"))),i.eventsToUnbind=a,i.series&&i.series[0]&&a.push(s(i.series[0].xAxis,"foundExtremes",function(){n.navigator.modifyNavigatorAxisExtremes()}))},getPartsEvents:function(t){var e=this,i=[];return["shades","handles"].forEach(function(n){e[n].forEach(function(o,a){i.push(s(o.element,t,function(t){e[n+"Mousedown"](t,a)}))})}),i},shadesMousedown:function(t,e){t=this.chart.pointer.normalize(t);var i,s,n=this.chart,o=this.xAxis,a=this.zoomedMin,r=this.left,h=this.size,c=this.range,d=t.chartX;n.inverted&&(d=t.chartY,r=this.top),1===e?(this.grabbedCenter=d,this.fixedWidth=c,this.dragOffset=d-a):(t=d-r-c/2,0===e?t=Math.max(0,t):2===e&&t+c>=h&&(t=h-c,this.reversedExtremes?(t-=c,s=this.getUnionExtremes().dataMin):i=this.getUnionExtremes().dataMax),t!==a&&(this.fixedWidth=c,e=o.toFixedRange(t,t+c,s,i),l(e.min)&&n.xAxis[0].setExtremes(Math.min(e.min,e.max),Math.max(e.min,e.max),!0,null,{trigger:"navigator"})))},handlesMousedown:function(t,e){this.chart.pointer.normalize(t),t=this.chart;var i=t.xAxis[0],s=this.reversedExtremes;0===e?(this.grabbedLeft=!0,this.otherHandlePos=this.zoomedMax,this.fixedExtreme=s?i.min:i.max):(this.grabbedRight=!0,this.otherHandlePos=this.zoomedMin,this.fixedExtreme=s?i.max:i.min),t.fixedRange=null},onMouseMove:function(e){var i=this,s=i.chart,n=i.left,o=i.navigatorSize,a=i.range,r=i.dragOffset,l=s.inverted;e.touches&&0===e.touches[0].pageX||(e=s.pointer.normalize(e),s=e.chartX,l&&(n=i.top,s=e.chartY),i.grabbedLeft?(i.hasDragged=!0,i.render(0,0,s-n,i.otherHandlePos)):i.grabbedRight?(i.hasDragged=!0,i.render(0,0,i.otherHandlePos,s-n)):i.grabbedCenter&&(i.hasDragged=!0,s<r?s=r:s>o+r-a&&(s=o+r-a),i.render(0,0,s-r,s-r+a)),i.hasDragged&&i.scrollbar&&v(i.scrollbar.options.liveRedraw,t.svg&&!g&&!this.chart.isBoosting)&&(e.DOMType=e.type,setTimeout(function(){i.onMouseUp(e)},0)))},onMouseUp:function(t){var e,i,s=this.chart,n=this.xAxis,o=this.scrollbar,a=t.DOMEvent||t;(!this.hasDragged||o&&o.hasDragged)&&"scrollbar"!==t.trigger||(o=this.getUnionExtremes(),this.zoomedMin===this.otherHandlePos?e=this.fixedExtreme:this.zoomedMax===this.otherHandlePos&&(i=this.fixedExtreme),this.zoomedMax===this.size&&(i=this.reversedExtremes?o.dataMin:o.dataMax),0===this.zoomedMin&&(e=this.reversedExtremes?o.dataMax:o.dataMin),n=n.toFixedRange(this.zoomedMin,this.zoomedMax,e,i),l(n.min)&&s.xAxis[0].setExtremes(Math.min(n.min,n.max),Math.max(n.min,n.max),!0,!this.hasDragged&&null,{trigger:"navigator",triggerOp:"navigator-drag",DOMEvent:a})),"mousemove"!==t.DOMType&&(this.grabbedLeft=this.grabbedRight=this.grabbedCenter=this.fixedWidth=this.fixedExtreme=this.otherHandlePos=this.hasDragged=this.dragOffset=null)},removeEvents:function(){this.eventsToUnbind&&(this.eventsToUnbind.forEach(function(t){t()}),this.eventsToUnbind=void 0),this.removeBaseSeriesEvents()},removeBaseSeriesEvents:function(){var t=this.baseSeries||[];this.navigatorEnabled&&t[0]&&(!1!==this.navigatorOptions.adaptToUpdatedData&&t.forEach(function(t){x(t,"updatedData",this.updatedDataHandler)},this),t[0].xAxis&&x(t[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes))},init:function(t){var e=t.options,i=e.navigator,o=i.enabled,a=e.scrollbar,r=a.enabled,e=o?i.height:0,l=r?a.height:0;this.handles=[],this.shades=[],this.chart=t,this.setBaseSeries(),this.height=e,this.scrollbarHeight=l,this.scrollbarEnabled=r,this.navigatorEnabled=o,this.navigatorOptions=i,this.scrollbarOptions=a,this.outlineHeight=e+l,this.opposite=v(i.opposite,!o&&t.inverted);var h=this,o=h.baseSeries,a=t.xAxis.length,r=t.yAxis.length,c=o&&o[0]&&o[0].xAxis||t.xAxis[0]||{options:{}};t.isDirtyBox=!0,h.navigatorEnabled?(h.xAxis=new n(t,m({breaks:c.options.breaks,ordinal:c.options.ordinal},i.xAxis,{id:"navigator-x-axis",yAxis:"navigator-y-axis",isX:!0,type:"datetime",index:a,isInternal:!0,offset:0,keepOrdinalPadding:!0,startOnTick:!1,endOnTick:!1,minPadding:0,maxPadding:0,zoomEnabled:!1},t.inverted?{offsets:[l,0,-l,0],width:e}:{offsets:[0,-l,0,l],height:e})),h.yAxis=new n(t,m(i.yAxis,{id:"navigator-y-axis",alignTicks:!1,offset:0,index:r,isInternal:!0,zoomEnabled:!1},t.inverted?{width:e}:{height:e})),o||i.series.data?h.updateNavigatorSeries(!1):0===t.series.length&&(h.unbindRedraw=s(t,"beforeRedraw",function(){0<t.series.length&&!h.series&&(h.setBaseSeries(),h.unbindRedraw())})),h.reversedExtremes=t.inverted&&!h.xAxis.reversed||!t.inverted&&h.xAxis.reversed,h.renderElements(),h.addMouseEvents()):h.xAxis={translate:function(e,i){var s=t.xAxis[0],n=s.getExtremes(),o=s.len-2*l,a=w("min",s.options.min,n.dataMin),s=w("max",s.options.max,n.dataMax)-a;return i?e*s/o+a:o*(e-a)/s},toPixels:function(t){return this.translate(t)},toValue:function(t){return this.translate(t,!0)},toFixedRange:n.prototype.toFixedRange,fake:!0},t.options.scrollbar.enabled&&(t.scrollbar=h.scrollbar=new y(t.renderer,m(t.options.scrollbar,{margin:h.navigatorEnabled?0:10,vertical:t.inverted}),t),s(h.scrollbar,"changed",function(e){var i=h.size,s=i*this.to,i=i*this.from;h.hasDragged=h.scrollbar.hasDragged,h.render(0,0,i,s),(t.options.scrollbar.liveRedraw||"mousemove"!==e.DOMType&&"touchmove"!==e.DOMType)&&setTimeout(function(){h.onMouseUp(e)})})),h.addBaseSeriesEvents(),h.addChartEvents()},getUnionExtremes:function(t){var e,i=this.chart.xAxis[0],s=this.xAxis,n=s.options,o=i.options;return t&&null===i.dataMin||(e={dataMin:v(n&&n.min,w("min",o.min,i.dataMin,s.dataMin,s.min)),dataMax:v(n&&n.max,w("max",o.max,i.dataMax,s.dataMax,s.max))}),e},setBaseSeries:function(e,i){var s=this.chart,n=this.baseSeries=[];e=e||s.options&&s.options.navigator.baseSeries||(s.series.length?t.find(s.series,function(t){return!t.options.isInternal}).index:0),(s.series||[]).forEach(function(t,i){t.options.isInternal||!t.options.showInNavigator&&(i!==e&&t.options.id!==e||!1===t.options.showInNavigator)||n.push(t)}),this.xAxis&&!this.xAxis.fake&&this.updateNavigatorSeries(!0,i)},updateNavigatorSeries:function(e,i){var s,n,o,a=this,l=a.chart,h=a.baseSeries,c=a.navigatorOptions.series,p={enableMouseTracking:!1,index:null,linkedTo:null,group:"nav",padXAxis:!1,xAxis:"navigator-x-axis",yAxis:"navigator-y-axis",showInLegend:!1,stacking:!1,isInternal:!0,states:{inactive:{opacity:1}}},f=a.series=(a.series||[]).filter(function(t){var e=t.baseSeries;return!(0>h.indexOf(e))||(e&&(x(e,"updatedData",a.updatedDataHandler),delete e.navigatorSeries),t.chart&&t.destroy(),!1)});h&&h.length&&h.forEach(function(t){var e=t.navigatorSeries,g=d({color:t.color,visible:t.visible},u(c)?r.navigator.series:c);e&&!1===a.navigatorOptions.adaptToUpdatedData||(p.name="Navigator "+h.length,s=t.options||{},o=s.navigatorOptions||{},n=m(s,p,g,o),g=o.data||g.data,a.hasNavigatorData=a.hasNavigatorData||!!g,n.data=g||s.data&&s.data.slice(0),e&&e.options?e.update(n,i):(t.navigatorSeries=l.initSeries(n),t.navigatorSeries.baseSeries=t,f.push(t.navigatorSeries)))}),(!c.data||h&&h.length)&&!u(c)||(a.hasNavigatorData=!1,c=t.splat(c),c.forEach(function(t,e){p.name="Navigator "+(f.length+1),n=m(r.navigator.series,{color:l.series[e]&&!l.series[e].options.isInternal&&l.series[e].color||l.options.colors[e]||l.options.colors[0]},p,t),n.data=t.data,n.data&&(a.hasNavigatorData=!0,f.push(l.initSeries(n)))})),e&&this.addBaseSeriesEvents()},addBaseSeriesEvents:function(){var t=this,e=t.baseSeries||[];e[0]&&e[0].xAxis&&s(e[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes),e.forEach(function(e){s(e,"show",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!0,!1)}),s(e,"hide",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!1,!1)}),!1!==this.navigatorOptions.adaptToUpdatedData&&e.xAxis&&s(e,"updatedData",this.updatedDataHandler),s(e,"remove",function(){this.navigatorSeries&&(c(t.series,this.navigatorSeries),l(this.navigatorSeries.options)&&this.navigatorSeries.remove(!1),delete this.navigatorSeries)})},this)},getBaseSeriesMin:function(t){return this.baseSeries.reduce(function(t,e){return Math.min(t,e.xData?e.xData[0]:t)},t)},modifyNavigatorAxisExtremes:function(){var t,e=this.xAxis;e.getExtremes&&(!(t=this.getUnionExtremes(!0))||t.dataMin===e.min&&t.dataMax===e.max||(e.min=t.dataMin,e.max=t.dataMax))},modifyBaseAxisExtremes:function(){var t,e,i=this.chart.navigator,s=this.getExtremes(),n=s.dataMin,o=s.dataMax,s=s.max-s.min,a=i.stickToMin,r=i.stickToMax,l=v(this.options.overscroll,0),h=i.series&&i.series[0],c=!!this.setExtremes;this.eventArgs&&"rangeSelectorButton"===this.eventArgs.trigger||(a&&(e=n,t=e+s),r&&(t=o+l,a||(e=Math.max(t-s,i.getBaseSeriesMin(h&&h.xData?h.xData[0]:-Number.MAX_VALUE)))),c&&(a||r)&&f(e)&&(this.min=this.userMin=e,this.max=this.userMax=t)),i.stickToMin=i.stickToMax=null},updatedDataHandler:function(){var t=this.chart.navigator,e=this.navigatorSeries,i=t.getBaseSeriesMin(this.xData[0]);t.stickToMax=t.reversedExtremes?0===Math.round(t.zoomedMin):Math.round(t.zoomedMax)>=Math.round(t.size),t.stickToMin=f(this.xAxis.min)&&this.xAxis.min<=i&&(!this.chart.fixedRange||!t.stickToMax),e&&!t.hasNavigatorData&&(e.options.pointStart=this.xData[0],e.setData(this.options.data,!1,null,!1))},addChartEvents:function(){this.eventsToUnbind||(this.eventsToUnbind=[]),this.eventsToUnbind.push(s(this.chart,"redraw",function(){var t=this.navigator,e=t&&(t.baseSeries&&t.baseSeries[0]&&t.baseSeries[0].xAxis||t.scrollbar&&this.xAxis[0]);e&&t.render(e.min,e.max)}),s(this.chart,"getMargins",function(){var t=this.navigator,e=t.opposite?"plotTop":"marginBottom";this.inverted&&(e=t.opposite?"marginRight":"plotLeft"),this[e]=(this[e]||0)+(t.navigatorEnabled||!this.inverted?t.outlineHeight:0)+t.navigatorOptions.margin}))},destroy:function(){this.removeEvents(),this.xAxis&&(c(this.chart.xAxis,this.xAxis),c(this.chart.axes,this.xAxis)),this.yAxis&&(c(this.chart.yAxis,this.yAxis),c(this.chart.axes,this.yAxis)),(this.series||[]).forEach(function(t){t.destroy&&t.destroy()}),"series xAxis yAxis shades outline scrollbarTrack scrollbarRifles scrollbarGroup scrollbar navigatorGroup rendered".split(" ").forEach(function(t){this[t]&&this[t].destroy&&this[t].destroy(),this[t]=null},this),[this.handles].forEach(function(t){h(t)},this)}},t.Navigator||(t.Navigator=e,s(n,"zoom",function(t){var e=this.chart.options,i=e.chart.zoomType,s=e.chart.pinchType,n=e.navigator,e=e.rangeSelector;this.isXAxis&&(n&&n.enabled||e&&e.enabled)&&("y"===i?t.zoomed=!1:(!g&&"xy"===i||g&&"xy"===s)&&this.options.range&&(i=this.previousZoom,l(t.newMin)?this.previousZoom=[this.min,this.max]:i&&(t.newMin=i[0],t.newMax=i[1],delete this.previousZoom))),void 0!==t.zoomed&&t.preventDefault()}),s(o,"beforeShowResetZoom",function(){var t=this.options,e=t.navigator,i=t.rangeSelector;if((e&&e.enabled||i&&i.enabled)&&(!g&&"x"===t.chart.zoomType||g&&"x"===t.chart.pinchType))return!1}),s(o,"beforeRender",function(){var t=this.options;(t.navigator.enabled||t.scrollbar.enabled)&&(this.scroller=this.navigator=new e(this))}),s(o,"afterSetChartSize",function(){var t,e,i,s,n=this.legend,o=this.navigator;o&&(e=n&&n.options,i=o.xAxis,s=o.yAxis,t=o.scrollbarHeight,this.inverted?(o.left=o.opposite?this.chartWidth-t-o.height:this.spacing[3]+t,o.top=this.plotTop+t):(o.left=this.plotLeft+t,o.top=o.navigatorOptions.top||this.chartHeight-o.height-t-this.spacing[2]-(this.rangeSelector&&this.extraBottomMargin?this.rangeSelector.getHeight():0)-(e&&"bottom"===e.verticalAlign&&e.enabled&&!e.floating?n.legendHeight+v(e.margin,10):0)),i&&s&&(this.inverted?i.options.left=s.options.left=o.left:i.options.top=s.options.top=o.top,i.setAxisSize(),s.setAxisSize()))}),s(o,"update",function(t){var e=t.options.navigator||{},i=t.options.scrollbar||{};this.navigator||this.scroller||!e.enabled&&!i.enabled||(m(!0,this.options.navigator,e),m(!0,this.options.scrollbar,i),delete t.options.navigator,delete t.options.scrollbar)}),s(o,"afterUpdate",function(t){this.navigator||this.scroller||!this.options.navigator.enabled&&!this.options.scrollbar.enabled||(this.scroller=this.navigator=new e(this),v(t.redraw,!0)&&this.redraw(t.animation))}),s(o,"afterAddSeries",function(){this.navigator&&this.navigator.setBaseSeries(null,!1)}),s(b,"afterUpdate",function(){this.chart.navigator&&!this.options.isInternal&&this.chart.navigator.setBaseSeries(null,!1)}),o.prototype.callbacks.push(function(t){var e=t.navigator;e&&t.xAxis[0]&&(t=t.xAxis[0].getExtremes(),e.render(t.min,t.max))}))}),e(i,"parts/OrdinalAxis.js",[i["parts/Globals.js"]],function(t){var e=t.addEvent,i=t.Axis,s=t.Chart,n=t.css,o=t.defined,a=t.extend,r=t.noop,l=t.pick,h=t.timeUnits;e(t.Series,"updatedData",function(){var t=this.xAxis;t&&t.options.ordinal&&delete t.ordinalIndex}),i.prototype.getTimeTicks=function(t,e,i,s,n,a,r){var l,c,d,p,u,f=0,g={},m=[],v=-Number.MAX_VALUE,x=this.options.tickPixelInterval,y=this.chart.time,b=[];if(!this.options.ordinal&&!this.options.breaks||!n||3>n.length||void 0===e)return y.getTimeTicks.apply(y,arguments);for(p=n.length,l=0;l<p;l++){if(u=l&&n[l-1]>i,n[l]<e&&(f=l),l===p-1||n[l+1]-n[l]>5*a||u){if(n[l]>v){for(c=y.getTimeTicks(t,n[f],n[l],s);c.length&&c[0]<=v;)c.shift();c.length&&(v=c[c.length-1]),b.push(m.length),m=m.concat(c)}f=l+1}if(u)break}if(c=c.info,r&&c.unitRange<=h.hour){for(l=m.length-1,f=1;f<l;f++)y.dateFormat("%d",m[f])!==y.dateFormat("%d",m[f-1])&&(g[m[f]]="day",d=!0);d&&(g[m[0]]="day"),c.higherRanks=g}if(c.segmentStarts=b,m.info=c,r&&o(x)){f=b=m.length,d=[];for(var w,y=[];f--;)l=this.translate(m[f]),w&&(y[f]=w-l),d[f]=w=l;for(y.sort(),y=y[Math.floor(y.length/2)],y<.6*x&&(y=null),f=m[b-1]>i?b-1:b,w=void 0;f--;)l=d[f],b=Math.abs(w-l),w&&b<.8*x&&(null===y||b<.8*y)?(g[m[f]]&&!g[m[f+1]]?(b=f+1,w=l):b=f,m.splice(b,1)):w=l}return m},a(i.prototype,{beforeSetTickPositions:function(){var t,e,i,s,n,o=[],a=!1,r=this.getExtremes(),h=r.min,c=r.max,d=this.isXAxis&&!!this.options.breaks,r=this.options.ordinal,p=Number.MAX_VALUE,u=this.chart.options.chart.ignoreHiddenSeries;if(r||d){if(this.series.forEach(function(i,s){if(e=[],!(u&&!1===i.visible||!1===i.takeOrdinalPosition&&!d)&&(o=o.concat(i.processedXData),t=o.length,o.sort(function(t,e){return t-e}),p=Math.min(p,l(i.closestPointRange,p)),t)){for(s=0;s<t-1;)o[s]!==o[s+1]&&e.push(o[s+1]),s++;e[0]!==o[0]&&e.unshift(o[0]),o=e}i.isSeriesBoosting&&(n=!0)}),n&&(o.length=0),2<(t=o.length)){for(i=o[1]-o[0],s=t-1;s--&&!a;)o[s+1]-o[s]!==i&&(a=!0);!this.options.keepOrdinalPadding&&(o[0]-h>i||c-o[o.length-1]>i)&&(a=!0)}else this.options.overscroll&&(2===t?p=o[1]-o[0]:1===t?(p=this.options.overscroll,o=[o[0],o[0]+p]):p=this.overscrollPointsRange);a?(this.options.overscroll&&(this.overscrollPointsRange=p,o=o.concat(this.getOverscrollPositions())),this.ordinalPositions=o,i=this.ordinal2lin(Math.max(h,o[0]),!0),s=Math.max(this.ordinal2lin(Math.min(c,o[o.length-1]),!0),1),this.ordinalSlope=c=(c-h)/(s-i),this.ordinalOffset=h-i*c):(this.overscrollPointsRange=l(this.closestPointRange,this.overscrollPointsRange),this.ordinalPositions=this.ordinalSlope=this.ordinalOffset=void 0)}this.isOrdinal=r&&a,this.groupIntervalFactor=null},val2lin:function(t,e){var i=this.ordinalPositions;if(i){var s,n,o=i.length;for(s=o;s--;)if(i[s]===t){n=s;break}for(s=o-1;s--;)if(t>i[s]||0===s){t=(t-i[s])/(i[s+1]-i[s]),n=s+t;break}e=e?n:this.ordinalSlope*(n||0)+this.ordinalOffset}else e=t;return e},lin2val:function(t,e){var i=this.ordinalPositions;if(i){var s,n=this.ordinalSlope,o=this.ordinalOffset,a=i.length-1;if(e)0>t?t=i[0]:t>a?t=i[a]:(a=Math.floor(t),s=t-a);else for(;a--;)if(e=n*a+o,t>=e){n=n*(a+1)+o,s=(t-e)/(n-e);break}return void 0!==s&&void 0!==i[a]?i[a]+(s?s*(i[a+1]-i[a]):0):t}return t},getExtendedPositions:function(){var t,e,s=this,n=s.chart,o=s.series[0].currentDataGrouping,a=s.ordinalIndex,l=o?o.count+o.unitName:"raw",h=s.options.overscroll,c=s.getExtremes();return a||(a=s.ordinalIndex={}),a[l]||(t={series:[],chart:n,getExtremes:function(){return{min:c.dataMin,max:c.dataMax+h}},options:{ordinal:!0},val2lin:i.prototype.val2lin,ordinal2lin:i.prototype.ordinal2lin},s.series.forEach(function(i){e={xAxis:t,xData:i.xData.slice(),chart:n,destroyGroupedData:r},e.xData=e.xData.concat(s.getOverscrollPositions()),e.options={dataGrouping:o?{enabled:!0,forced:!0,approximation:"open",units:[[o.unitName,[o.count]]]}:{enabled:!1}},i.processData.apply(e),t.series.push(e)}),s.beforeSetTickPositions.apply(t),a[l]=t.ordinalPositions),a[l]},getOverscrollPositions:function(){var e=this.options.overscroll,i=this.overscrollPointsRange,s=[],n=this.dataMax;if(t.defined(i))for(s.push(n);n<=this.dataMax+e;)n+=i,s.push(n);return s},getGroupIntervalFactor:function(t,e,i){var s;i=i.processedXData;var n=i.length,o=[];if(!(s=this.groupIntervalFactor)){for(s=0;s<n-1;s++)o[s]=i[s+1]-i[s];o.sort(function(t,e){return t-e}),o=o[Math.floor(n/2)],t=Math.max(t,i[0]),e=Math.min(e,i[n-1]),this.groupIntervalFactor=s=n*o/(e-t)}return s},postProcessTickInterval:function(t){var e=this.ordinalSlope;return e?this.options.breaks?this.closestPointRange||t:t/(e/this.closestPointRange):t}}),i.prototype.ordinal2lin=i.prototype.val2lin,e(s,"pan",function(t){var e=this.xAxis[0],i=e.options.overscroll,s=t.originalEvent.chartX,o=!1;if(e.options.ordinal&&e.series.length){var a,r=this.mouseDownX,l=e.getExtremes(),h=l.dataMax,c=l.min,d=l.max,p=this.hoverPoints,u=e.closestPointRange||e.overscrollPointsRange,r=(r-s)/(e.translationSlope*(e.ordinalSlope||u)),f={ordinalPositions:e.getExtendedPositions()},u=e.lin2val,g=e.val2lin;f.ordinalPositions?1<Math.abs(r)&&(p&&p.forEach(function(t){t.setState()}),0>r?(p=f,a=e.ordinalPositions?e:f):(p=e.ordinalPositions?e:f,a=f),f=a.ordinalPositions,h>f[f.length-1]&&f.push(h),this.fixedRange=d-c,r=e.toFixedRange(null,null,u.apply(p,[g.apply(p,[c,!0])+r,!0]),u.apply(a,[g.apply(a,[d,!0])+r,!0])),r.min>=Math.min(l.dataMin,c)&&r.max<=Math.max(h,d)+i&&e.setExtremes(r.min,r.max,!0,!1,{trigger:"pan"}),this.mouseDownX=s,n(this.container,{cursor:"move"})):o=!0}else o=!0;o?i&&(e.max=e.dataMax+i):t.preventDefault()}),e(i,"foundExtremes",function(){this.isXAxis&&o(this.options.overscroll)&&this.max===this.dataMax&&(!this.chart.mouseIsDown||this.isInternal)&&(!this.eventArgs||this.eventArgs&&"navigator"!==this.eventArgs.trigger)&&(this.max+=this.options.overscroll,!this.isInternal&&o(this.userMin)&&(this.min+=this.options.overscroll))})}),e(i,"modules/broken-axis.src.js",[i["parts/Globals.js"]],function(t){var e=t.addEvent,i=t.pick,s=t.extend,n=t.isArray,o=t.find,a=t.fireEvent,r=t.Axis,l=t.Series,h=function(t,e){return o(e,function(e){return e.from<t&&t<e.to})};s(r.prototype,{isInBreak:function(t,e){var i=t.repeat||1/0,s=t.from,n=t.to-t.from;return e=e>=s?(e-s)%i:i-(s-e)%i,t.inclusive?e<=n:e<n&&0!==e},isInAnyBreak:function(t,e){var s,n,o,a=this.options.breaks,r=a&&a.length;if(r){for(;r--;)this.isInBreak(a[r],t)&&(s=!0,n||(n=i(a[r].showPoints,!this.isXAxis)));o=s&&e?s&&!n:s}return o}}),e(r,"afterInit",function(){"function"==typeof this.setBreaks&&this.setBreaks(this.options.breaks,!1)}),e(r,"afterSetTickPositions",function(){if(this.isBroken){var t,e=this.tickPositions,i=this.tickPositions.info,s=[];for(t=0;t<e.length;t++)this.isInAnyBreak(e[t])||s.push(e[t]);this.tickPositions=s,this.tickPositions.info=i}}),e(r,"afterSetOptions",function(){this.isBroken&&(this.options.ordinal=!1)}),r.prototype.setBreaks=function(t,e){function s(t){var e,i,s=t;for(i=0;i<l.breakArray.length;i++)if(e=l.breakArray[i],e.to<=t)s-=e.len;else{if(e.from>=t)break;if(l.isInBreak(e,t)){s-=t-e.from;break}}return s}function o(t){var e,i;for(i=0;i<l.breakArray.length&&(e=l.breakArray[i],!(e.from>=t));i++)e.to<t?t+=e.len:l.isInBreak(e,t)&&(t+=e.len);return t}var l=this,c=n(t)&&!!t.length;l.isDirty=l.isBroken!==c,l.isBroken=c,l.options.breaks=l.userOptions.breaks=t,l.forceRedraw=!0,c||l.val2lin!==s||(delete l.val2lin,delete l.lin2val),c&&(l.userOptions.ordinal=!1,l.val2lin=s,l.lin2val=o,l.setExtremes=function(t,e,i,s,n){if(this.isBroken){for(var o,a=this.options.breaks;o=h(t,a);)t=o.to;for(;o=h(e,a);)e=o.from;e<t&&(e=t)}r.prototype.setExtremes.call(this,t,e,i,s,n)},l.setAxisTranslation=function(t){if(r.prototype.setAxisTranslation.call(this,t),this.unitLength=null,this.isBroken){t=l.options.breaks;var e,s,n,o,h=[],c=[],d=0,p=l.userMin||l.min,u=l.userMax||l.max,f=i(l.pointRangePadding,0);t.forEach(function(t){s=t.repeat||1/0,l.isInBreak(t,p)&&(p+=t.to%s-p%s),l.isInBreak(t,u)&&(u-=u%s-t.from%s)}),t.forEach(function(t){for(n=t.from,s=t.repeat||1/0;n-s>p;)n-=s;for(;n<p;)n+=s;for(o=n;o<u;o+=s)h.push({value:o,move:"in"}),h.push({value:o+(t.to-t.from),move:"out",size:t.breakSize})}),h.sort(function(t,e){return t.value===e.value?("in"===t.move?0:1)-("in"===e.move?0:1):t.value-e.value}),e=0,n=p,h.forEach(function(t){e+="in"===t.move?1:-1,1===e&&"in"===t.move&&(n=t.value),0===e&&(c.push({from:n,to:t.value,len:t.value-n-(t.size||0)}),d+=t.value-n-(t.size||0))}),l.breakArray=c,l.unitLength=u-p-d+f,a(l,"afterBreaks"),l.staticScale?l.transA=l.staticScale:l.unitLength&&(l.transA*=(u-l.min+f)/l.unitLength),f&&(l.minPixelPadding=l.transA*l.minPointOffset),l.min=p,l.max=u}}),i(e,!0)&&this.chart.redraw()},e(l,"afterGeneratePoints",function(){var t,e=this.xAxis,i=this.yAxis,s=this.points,n=s.length,o=this.options.connectNulls;if(e&&i&&(e.options.breaks||i.options.breaks))for(;n--;)t=s[n],null===t.y&&!1===o||!e.isInAnyBreak(t.x,!0)&&!i.isInAnyBreak(t.y,!0)||(s.splice(n,1),this.data[n]&&this.data[n].destroyElements())}),e(l,"afterRender",function(){this.drawBreaks(this.xAxis,["x"]),this.drawBreaks(this.yAxis,i(this.pointArrayMap,["y"]))}),t.Series.prototype.drawBreaks=function(t,e){var s,n,o,r,l=this,h=l.points;t&&e.forEach(function(e){s=t.breakArray||[],n=t.isXAxis?t.min:i(l.options.threshold,t.min),h.forEach(function(l){r=i(l["stack"+e.toUpperCase()],l[e]),s.forEach(function(e){o=!1,n<e.from&&r>e.to||n>e.from&&r<e.from?o="pointBreak":(n<e.from&&r>e.from&&r<e.to||n>e.from&&r>e.to&&r<e.from)&&(o="pointInBreak"),o&&a(t,o,{point:l,brk:e})})})})},t.Series.prototype.gappedPath=function(){var e=this.currentDataGrouping,i=e&&e.gapSize,e=this.options.gapSize,s=this.points.slice(),n=s.length-1,o=this.yAxis;if(e&&0<n)for("value"!==this.options.gapUnit&&(e*=this.closestPointRange),i&&i>e&&(e=i);n--;)s[n+1].x-s[n].x>e&&(i=(s[n].x+s[n+1].x)/2,s.splice(n+1,0,{isNull:!0,x:i}),this.options.stacking&&(i=o.stacks[this.stackKey][i]=new t.StackItem(o,o.options.stackLabels,!1,i,this.stack),i.total=0));return this.getGraphPath(s)}}),e(i,"masters/modules/broken-axis.src.js",[],function(){}),e(i,"parts/DataGrouping.js",[i["parts/Globals.js"]],function(t){var e=t.addEvent,i=t.arrayMax,s=t.arrayMin,n=t.Axis,o=t.defaultPlotOptions,a=t.defined,r=t.extend,l=t.format,h=t.isNumber,c=t.merge,d=t.pick,p=t.Point,u=t.Series,f=t.Tooltip,g=t.approximations={sum:function(t){var e,i=t.length;if(!i&&t.hasNulls)e=null;else if(i)for(e=0;i--;)e+=t[i];return e},average:function(t){var e=t.length;return t=g.sum(t),h(t)&&e&&(t/=e),t},averages:function(){var t=[];return[].forEach.call(arguments,function(e){t.push(g.average(e))}),void 0===t[0]?void 0:t},open:function(t){return t.length?t[0]:t.hasNulls?null:void 0},high:function(t){return t.length?i(t):t.hasNulls?null:void 0},low:function(t){return t.length?s(t):t.hasNulls?null:void 0},close:function(t){return t.length?t[t.length-1]:t.hasNulls?null:void 0},ohlc:function(t,e,i,s){if(t=g.open(t),e=g.high(e),i=g.low(i),s=g.close(s),h(t)||h(e)||h(i)||h(s))return[t,e,i,s]},range:function(t,e){return t=g.low(t),e=g.high(e),h(t)||h(e)?[t,e]:null===t&&null===e?null:void 0}},m=function(t,e,i,s){var n,o,r,l,d=this,p=d.data,u=d.options&&d.options.data,f=[],m=[],v=[],x=t.length,y=!!e,b=[],w=d.pointArrayMap,k=w&&w.length,M=["x"].concat(w||["y"]),S=0,T=0;for(s="function"==typeof s?s:g[s]?g[s]:g[d.getDGApproximation&&d.getDGApproximation()||"average"],k?w.forEach(function(){b.push([])}):b.push([]),r=k||1,l=0;l<=x&&!(t[l]>=i[0]);l++);for(l;l<=x;l++){for(;void 0!==i[S+1]&&t[l]>=i[S+1]||l===x;){for(n=i[S],d.dataGroupInfo={start:d.cropStart+T,length:b[0].length},o=s.apply(d,b),d.pointClass&&!a(d.dataGroupInfo.options)&&(d.dataGroupInfo.options=c(d.pointClass.prototype.optionsToObject.call({series:d},d.options.data[d.cropStart+T])),M.forEach(function(t){delete d.dataGroupInfo.options[t]})),void 0!==o&&(f.push(n),m.push(o),v.push(d.dataGroupInfo)),T=l,n=0;n<r;n++)b[n].length=0,b[n].hasNulls=!1;if(S+=1,l===x)break}if(l===x)break;if(w){n=d.cropStart+l,o=p&&p[n]||d.pointClass.prototype.applyOptions.apply({series:d},[u[n]]);var C;for(n=0;n<k;n++)C=o[w[n]],h(C)?b[n].push(C):null===C&&(b[n].hasNulls=!0)}else n=y?e[l]:null,h(n)?b[0].push(n):null===n&&(b[0].hasNulls=!0)}return{groupedXData:f,groupedYData:m,groupMap:v}},v={approximations:g,groupData:m},x=u.prototype,y=x.processData,b=x.generatePoints,w={groupPixelWidth:2,dateTimeLabelFormats:{millisecond:["%A, %b %e, %H:%M:%S.%L","%A, %b %e, %H:%M:%S.%L","-%H:%M:%S.%L"],second:["%A, %b %e, %H:%M:%S","%A, %b %e, %H:%M:%S","-%H:%M:%S"],minute:["%A, %b %e, %H:%M","%A, %b %e, %H:%M","-%H:%M"],hour:["%A, %b %e, %H:%M","%A, %b %e, %H:%M","-%H:%M"],day:["%A, %b %e, %Y","%A, %b %e","-%A, %b %e, %Y"],week:["Week from %A, %b %e, %Y","%A, %b %e","-%A, %b %e, %Y"],month:["%B %Y","%B","-%B %Y"],year:["%Y","%Y","-%Y"]}},k={line:{},spline:{},area:{},areaspline:{},column:{groupPixelWidth:10},columnrange:{groupPixelWidth:10},candlestick:{groupPixelWidth:10},ohlc:{groupPixelWidth:5}},M=t.defaultDataGroupingUnits=[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1]],["week",[1]],["month",[1,3,6]],["year",null]];return x.getDGApproximation=function(){return t.seriesTypes.arearange&&this instanceof t.seriesTypes.arearange?"range":t.seriesTypes.ohlc&&this instanceof t.seriesTypes.ohlc?"ohlc":t.seriesTypes.column&&this instanceof t.seriesTypes.column?"sum":"average"},x.groupData=m,x.processData=function(){var t,e,i=this.chart,s=this.options.dataGrouping,n=!1!==this.allowDG&&s&&d(s.enabled,i.options.isStock),o=this.visible||!i.options.chart.ignoreHiddenSeries,r=this.currentDataGrouping,l=!1;if(this.forceCrop=n,this.groupPixelWidth=null,this.hasProcessed=!0,n&&!this.requireSorting&&(this.requireSorting=l=!0),n=!1===y.apply(this,arguments)||!n,l&&(this.requireSorting=!1),!n){this.destroyGroupedData();var h,n=s.groupAll?this.xData:this.processedXData,c=s.groupAll?this.yData:this.processedYData,p=i.plotSizeX,i=this.xAxis,u=i.options.ordinal,f=this.groupPixelWidth=i.getGroupPixelWidth&&i.getGroupPixelWidth();if(f){this.isDirty=t=!0,this.points=null,l=i.getExtremes(),e=l.min;var l=l.max,u=u&&i.getGroupIntervalFactor(e,l,this)||1,f=f*(l-e)/p*u,p=i.getTimeTicks(i.normalizeTimeTickInterval(f,s.units||M),Math.min(e,n[0]),Math.max(l,n[n.length-1]),i.options.startOfWeek,n,this.closestPointRange),c=x.groupData.apply(this,[n,c,p,s.approximation]),n=c.groupedXData,u=c.groupedYData,g=0;if(s.smoothed&&n.length){for(h=n.length-1,n[h]=Math.min(n[h],l);h--&&0<h;)n[h]+=f/2;n[0]=Math.max(n[0],e)}for(h=1;h<p.length;h++)p.info.segmentStarts&&-1!==p.info.segmentStarts.indexOf(h)||(g=Math.max(p[h]-p[h-1],g));e=p.info,e.gapSize=g,this.closestPointRange=p.info.totalRange,this.groupMap=c.groupMap,a(n[0])&&n[0]<i.dataMin&&o&&((!a(i.options.min)&&i.min<=i.dataMin||i.min===i.dataMin)&&(i.min=n[0]),i.dataMin=n[0]),s.groupAll&&(s=this.cropData(n,u,i.min,i.max,1),n=s.xData,u=s.yData),this.processedXData=n,this.processedYData=u}else this.groupMap=null;this.hasGroupedData=t,this.currentDataGrouping=e,this.preventGraphAnimation=(r&&r.totalRange)!==(e&&e.totalRange)}},x.destroyGroupedData=function(){var t=this.groupedData;(t||[]).forEach(function(e,i){e&&(t[i]=e.destroy?e.destroy():null)}),this.groupedData=null},x.generatePoints=function(){b.apply(this),this.destroyGroupedData(),this.groupedData=this.hasGroupedData?this.points:null},e(p,"update",function(){if(this.dataGroup)return t.error(24,!1,this.series.chart),!1}),e(f,"headerFormatter",function(t){var e,i,s=this.chart.time,n=t.labelConfig,o=n.series,a=o.tooltipOptions,c=o.options.dataGrouping,d=a.xDateFormat,p=o.xAxis,u=a[(t.isFooter?"footer":"header")+"Format"];p&&"datetime"===p.options.type&&c&&h(n.key)&&(i=o.currentDataGrouping,c=c.dateTimeLabelFormats||w.dateTimeLabelFormats,i?(a=c[i.unitName],1===i.count?d=a[0]:(d=a[1],e=a[2])):!d&&c&&(d=this.getXDateFormat(n,a,p)),d=s.dateFormat(d,n.key),e&&(d+=s.dateFormat(e,n.key+i.totalRange-1)),o.chart.styledMode&&(u=this.styledModeFormat(u)),t.text=l(u,{point:r(n.point,{key:d}),series:o},s),t.preventDefault())}),e(u,"destroy",x.destroyGroupedData),e(u,"afterSetOptions",function(t){t=t.options;var e=this.type,i=this.chart.options.plotOptions,s=o[e].dataGrouping,n=this.useCommonDataGrouping&&w;(k[e]||n)&&(s||(s=c(w,k[e])),t.dataGrouping=c(n,s,i.series&&i.series.dataGrouping,i[e].dataGrouping,this.userOptions.dataGrouping))}),e(n,"afterSetScale",function(){this.series.forEach(function(t){t.hasProcessed=!1})}),n.prototype.getGroupPixelWidth=function(){var t,e,i=this.series,s=i.length,n=0,o=!1;for(t=s;t--;)(e=i[t].options.dataGrouping)&&(n=Math.max(n,d(e.groupPixelWidth,w.groupPixelWidth)));for(t=s;t--;)(e=i[t].options.dataGrouping)&&i[t].hasProcessed&&(s=(i[t].processedXData||i[t].data).length,i[t].groupPixelWidth||s>this.chart.plotSizeX/n||s&&e.forced)&&(o=!0);return o?n:0},n.prototype.setDataGrouping=function(t,e){var i;if(e=d(e,!0),t||(t={forced:!1,units:null}),this instanceof n)for(i=this.series.length;i--;)this.series[i].update({dataGrouping:t},!1);else this.chart.options.series.forEach(function(e){e.dataGrouping=t},!1);this.ordinalSlope=null,e&&this.chart.redraw()},t.dataGrouping=v}),e(i,"parts/OHLCSeries.js",[i["parts/Globals.js"]],function(t){var e=t.Point,i=t.seriesType,s=t.seriesTypes;i("ohlc","column",{lineWidth:1,tooltip:{pointFormat:'<span style="color:{point.color}">●</span> <b> {series.name}</b><br/>Open: {point.open}<br/>High: {point.high}<br/>Low: {point.low}<br/>Close: {point.close}<br/>'},threshold:null,states:{hover:{lineWidth:3}},stickyTracking:!0},{directTouch:!1,pointArrayMap:["open","high","low","close"],toYData:function(t){return[t.open,t.high,t.low,t.close]},pointValKey:"close",pointAttrToOptions:{stroke:"color","stroke-width":"lineWidth"},init:function(){s.column.prototype.init.apply(this,arguments),this.options.stacking=!1},pointAttribs:function(t,e){e=s.column.prototype.pointAttribs.call(this,t,e);var i=this.options;return delete e.fill,!t.options.color&&i.upColor&&t.open<t.close&&(e.stroke=i.upColor),e},translate:function(){var t=this,e=t.yAxis,i=!!t.modifyValue,n=["plotOpen","plotHigh","plotLow","plotClose","yBottom"];s.column.prototype.translate.apply(t),t.points.forEach(function(s){[s.open,s.high,s.low,s.close,s.low].forEach(function(o,a){null!==o&&(i&&(o=t.modifyValue(o)),s[n[a]]=e.toPixels(o,!0))}),s.tooltipPos[1]=s.plotHigh+e.pos-t.chart.plotTop})},drawPoints:function(){var t=this,e=t.chart;t.points.forEach(function(i){var s,n,o,a,r,l=i.graphic,h=!l;void 0!==i.plotY&&(l||(i.graphic=l=e.renderer.path().add(t.group)),e.styledMode||l.attr(t.pointAttribs(i,i.selected&&"select")),n=l.strokeWidth()%2/2,r=Math.round(i.plotX)-n,o=Math.round(i.shapeArgs.width/2),a=["M",r,Math.round(i.yBottom),"L",r,Math.round(i.plotHigh)],null!==i.open&&(s=Math.round(i.plotOpen)+n,a.push("M",r,s,"L",r-o,s)),null!==i.close&&(s=Math.round(i.plotClose)+n,a.push("M",r,s,"L",r+o,s)),l[h?"attr":"animate"]({d:a}).addClass(i.getClassName(),!0))})},animate:null},{getClassName:function(){return e.prototype.getClassName.call(this)+(this.open<this.close?" highcharts-point-up":" highcharts-point-down")}})}),e(i,"parts/CandlestickSeries.js",[i["parts/Globals.js"]],function(t){var e=t.defaultPlotOptions,i=t.merge,s=t.seriesType,n=t.seriesTypes;s("candlestick","ohlc",i(e.column,{states:{hover:{lineWidth:2}},tooltip:e.ohlc.tooltip,threshold:null,lineColor:"#000000",lineWidth:1,upColor:"#ffffff",stickyTracking:!0}),{pointAttribs:function(t,e){var i=n.column.prototype.pointAttribs.call(this,t,e),s=this.options,o=t.open<t.close,a=s.lineColor||this.color;return i["stroke-width"]=s.lineWidth,i.fill=t.options.color||(o?s.upColor||this.color:this.color),i.stroke=t.lineColor||(o?s.upLineColor||a:a),e&&(t=s.states[e],i.fill=t.color||i.fill,i.stroke=t.lineColor||i.stroke,i["stroke-width"]=t.lineWidth||i["stroke-width"]),i},drawPoints:function(){var t=this,e=t.chart,i=t.yAxis.reversed;t.points.forEach(function(s){var n,o,a,r,l,h,c,d=s.graphic,p=!d;void 0!==s.plotY&&(d||(s.graphic=d=e.renderer.path().add(t.group)),t.chart.styledMode||d.attr(t.pointAttribs(s,s.selected&&"select")).shadow(t.options.shadow),l=d.strokeWidth()%2/2,h=Math.round(s.plotX)-l,n=s.plotOpen,o=s.plotClose,a=Math.min(n,o),n=Math.max(n,o),c=Math.round(s.shapeArgs.width/2),o=i?n!==s.yBottom:Math.round(a)!==Math.round(s.plotHigh),r=i?Math.round(a)!==Math.round(s.plotHigh):n!==s.yBottom,a=Math.round(a)+l,n=Math.round(n)+l,l=[],l.push("M",h-c,n,"L",h-c,a,"L",h+c,a,"L",h+c,n,"Z","M",h,a,"L",h,o?Math.round(i?s.yBottom:s.plotHigh):a,"M",h,n,"L",h,r?Math.round(i?s.plotHigh:s.yBottom):n),d[p?"attr":"animate"]({d:l}).addClass(s.getClassName(),!0))})}})}),e(i,"mixins/on-series.js",[i["parts/Globals.js"]],function(t){var e=t.defined,i=t.seriesTypes,s=t.stableSort;return{getPlotBox:function(){return t.Series.prototype.getPlotBox.call(this.options.onSeries&&this.chart.get(this.options.onSeries)||this)},translate:function(){i.column.prototype.translate.apply(this);var t,n,o,a,r,l=this,h=l.options,c=l.chart,d=l.points,p=d.length-1,u=h.onSeries,u=u&&c.get(u),h=h.onKey||"y",f=u&&u.options.step,g=u&&u.points,m=g&&g.length,v=c.inverted,x=l.xAxis,y=l.yAxis,b=0;if(u&&u.visible&&m)for(b=(u.pointXOffset||0)+(u.barW||0)/2,c=u.currentDataGrouping,o=g[m-1].x+(c?c.totalRange:0),s(d,function(t,e){return t.x-e.x}),h="plot"+h[0].toUpperCase()+h.substr(1);m--&&d[p]&&(n=g[m],c=d[p],c.y=n.y,!(n.x<=c.x&&void 0!==n[h]&&(c.x<=o&&(c.plotY=n[h],n.x<c.x&&!f&&(a=g[m+1])&&void 0!==a[h]&&(r=(c.x-n.x)/(a.x-n.x),c.plotY+=r*(a[h]-n[h]),c.y+=r*(a.y-n.y))),p--,m++,0>p))););d.forEach(function(i,s){var n;i.plotX+=b,(void 0===i.plotY||v)&&(0<=i.plotX&&i.plotX<=x.len?v?(i.plotY=x.translate(i.x,0,1,0,1),i.plotX=e(i.y)?y.translate(i.y,0,0,0,1):0):i.plotY=(x.opposite?0:l.yAxis.len)+x.offset:i.shapeArgs={}),(t=d[s-1])&&t.plotX===i.plotX&&(void 0===t.stackIndex&&(t.stackIndex=0),n=t.stackIndex+1),i.stackIndex=n}),this.onSeries=u}}}),e(i,"parts/FlagsSeries.js",[i["parts/Globals.js"],i["mixins/on-series.js"]],function(t,e){function i(t){p[t+"pin"]=function(e,i,s,n,o){var a=o&&o.anchorX;o=o&&o.anchorY;var r;return"circle"===t&&n>s&&(e-=Math.round((n-s)/2),s=n),r=p[t](e,i,s,n),a&&o&&(r.push("M","circle"===t?e+s/2:r[1]+r[4]/2,i>o?i:i+n,"L",a,o),r=r.concat(p.circle(a-1,o-1,2,2))),r}}var s=t.addEvent,n=t.merge,o=t.noop,a=t.defined,r=t.Renderer,l=t.Series,h=t.seriesType,c=t.TrackerMixin,d=t.VMLRenderer,p=t.SVGRenderer.prototype.symbols;h("flags","column",{pointRange:0,allowOverlapX:!1,shape:"flag",stackDistance:12,textAlign:"center",tooltip:{pointFormat:"{point.text}<br/>"},threshold:null,y:-30,fillColor:"#ffffff",lineWidth:1,states:{hover:{lineColor:"#000000",fillColor:"#ccd6eb"}},style:{fontSize:"11px",fontWeight:"bold"}},{sorted:!1,noSharedTooltip:!0,allowDG:!1,takeOrdinalPosition:!1,trackerGroups:["markerGroup"],forceCrop:!0,init:l.prototype.init,pointAttribs:function(t,e){var i=this.options,s=t&&t.color||this.color,n=i.lineColor,o=t&&t.lineWidth;return t=t&&t.fillColor||i.fillColor,e&&(t=i.states[e].fillColor,n=i.states[e].lineColor,o=i.states[e].lineWidth),{fill:t||s,stroke:n||s,"stroke-width":o||i.lineWidth||0}},translate:e.translate,getPlotBox:e.getPlotBox,drawPoints:function(){var e,i,s,o,r,l,h,c,d=this.points,p=this.chart,u=p.renderer,f=p.inverted,g=this.options,m=g.y,v=this.yAxis,x={},y=[];for(o=d.length;o--;)r=d[o],c=(f?r.plotY:r.plotX)>this.xAxis.len,e=r.plotX,l=r.stackIndex,s=r.options.shape||g.shape,i=r.plotY,void 0!==i&&(i=r.plotY+m-(void 0!==l&&l*g.stackDistance)),r.anchorX=l?void 0:r.plotX,h=l?void 0:r.plotY,l=r.graphic,void 0!==i&&0<=e&&!c?(l||(l=r.graphic=u.label("",null,null,s,null,null,g.useHTML),p.styledMode||l.attr(this.pointAttribs(r)).css(n(g.style,r.style)),l.attr({align:"flag"===s?"left":"center",width:g.width,height:g.height,"text-align":g.textAlign}).addClass("highcharts-point").add(this.markerGroup),r.graphic.div&&(r.graphic.div.point=r),p.styledMode||l.shadow(g.shadow),l.isNew=!0),0<e&&(e-=l.strokeWidth()%2),s={y:i,anchorY:h},g.allowOverlapX&&(s.x=e,s.anchorX=r.anchorX),l.attr({text:r.options.title||g.title||"A"})[l.isNew?"attr":"animate"](s),g.allowOverlapX||(x[r.plotX]?x[r.plotX].size=Math.max(x[r.plotX].size,l.width):x[r.plotX]={align:0,size:l.width,target:e,anchorX:e}),r.tooltipPos=[e,i+v.pos-p.plotTop]):l&&(r.graphic=l.destroy());g.allowOverlapX||(t.objectEach(x,function(t){t.plotX=t.anchorX,y.push(t)}),t.distribute(y,f?v.len:this.xAxis.len,100),d.forEach(function(t){var e=t.graphic&&x[t.plotX];e&&(t.graphic[t.graphic.isNew?"attr":"animate"]({x:e.pos,anchorX:t.anchorX}),a(e.pos)?t.graphic.isNew=!1:(t.graphic.attr({x:-9999,anchorX:-9999}),t.graphic.isNew=!0))})),g.useHTML&&t.wrap(this.markerGroup,"on",function(e){return t.SVGElement.prototype.on.apply(e.apply(this,[].slice.call(arguments,1)),[].slice.call(arguments,1))})},drawTracker:function(){var t=this.points;c.drawTrackerPoint.apply(this),t.forEach(function(e){var i=e.graphic;i&&s(i.element,"mouseover",function(){0<e.stackIndex&&!e.raised&&(e._y=i.y,i.attr({y:e._y-8}),e.raised=!0),t.forEach(function(t){t!==e&&t.raised&&t.graphic&&(t.graphic.attr({y:t._y}),t.raised=!1)})})})},animate:function(t){t?this.setClip():this.animate=null},setClip:function(){l.prototype.setClip.apply(this,arguments),!1!==this.options.clip&&this.sharedClipKey&&this.markerGroup.clip(this.chart[this.sharedClipKey])},buildKDTree:o,invertGroups:o},{isValid:function(){return t.isNumber(this.y)||void 0===this.y}}),p.flag=function(t,e,i,s,n){var o=n&&n.anchorX||t;return n=n&&n.anchorY||e,p.circle(o-1,n-1,2,2).concat(["M",o,n,"L",t,e+s,t,e,t+i,e,t+i,e+s,t,e+s,"Z"])},i("circle"),i("square"),r===d&&["flag","circlepin","squarepin"].forEach(function(t){d.prototype.symbols[t]=p[t]})}),e(i,"parts/RangeSelector.js",[i["parts/Globals.js"]],function(t){function e(t){this.init(t)}var i=t.addEvent,s=t.Axis,n=t.Chart,o=t.css,a=t.createElement,r=t.defaultOptions,l=t.defined,h=t.destroyObjectProperties,c=t.discardElement,d=t.extend,p=t.fireEvent,u=t.isNumber,f=t.merge,g=t.pick,m=t.pInt,v=t.splat;d(r,{rangeSelector:{verticalAlign:"top",buttonTheme:{width:28,height:18,padding:2,zIndex:7},floating:!1,x:0,y:0,height:void 0,inputPosition:{align:"right",x:0,y:0},buttonPosition:{align:"left",x:0,y:0},labelStyle:{color:"#666666"}}}),r.lang=f(r.lang,{rangeSelectorZoom:"Zoom",rangeSelectorFrom:"From",rangeSelectorTo:"To"}),e.prototype={clickButton:function(t,e){var n,o,a,r,l,h=this.chart,c=this.buttonOptions[t],d=h.xAxis[0],p=h.scroller&&h.scroller.getUnionExtremes()||d||{},f=p.dataMin,m=p.dataMax,x=d&&Math.round(Math.min(d.max,g(m,d.max))),y=c.type,p=c._range,b=c.dataGrouping;if(null!==f&&null!==m){if(h.fixedRange=p,b&&(this.forcedDataGrouping=!0,s.prototype.setDataGrouping.call(d||{chart:this.chart},b,!1),this.frozenStates=c.preserveDataGrouping),"month"===y||"year"===y)d?(y={range:c,max:x,chart:h,dataMin:f,dataMax:m},n=d.minFromRange.call(y),u(y.newMax)&&(x=y.newMax)):p=c;else if(p)n=Math.max(x-p,f),x=Math.min(n+p,m);else if("ytd"===y){if(!d)return void(this.deferredYTDClick=t);void 0===m&&(f=Number.MAX_VALUE,m=Number.MIN_VALUE,h.series.forEach(function(t){t=t.xData,f=Math.min(t[0],f),m=Math.max(t[t.length-1],m)}),e=!1),x=this.getYTDExtremes(m,f,h.time.useUTC),n=a=x.min,x=x.max}else"all"===y&&d&&(n=f,x=m);n+=c._offsetMin,x+=c._offsetMax,this.setSelected(t),d?d.setExtremes(n,x,g(e,1),null,{trigger:"rangeSelectorButton",rangeSelectorButton:c}):(o=v(h.options.xAxis)[0],l=o.range,o.range=p,r=o.min,o.min=a,i(h,"load",function(){o.range=l,o.min=r}))}},setSelected:function(t){this.selected=this.options.selected=t},defaultButtons:[{type:"month",count:1,text:"1m"},{type:"month",count:3,text:"3m"},{type:"month",count:6,text:"6m"},{type:"ytd",text:"YTD"},{type:"year",count:1,text:"1y"},{type:"all",text:"All"}],init:function(t){var e=this,s=t.options.rangeSelector,n=s.buttons||[].concat(e.defaultButtons),o=s.selected,a=function(){var t=e.minInput,i=e.maxInput;t&&t.blur&&p(t,"blur"),i&&i.blur&&p(i,"blur")};e.chart=t,e.options=s,e.buttons=[],e.buttonOptions=n,this.unMouseDown=i(t.container,"mousedown",a),this.unResize=i(t,"resize",a),n.forEach(e.computeButtonRange),void 0!==o&&n[o]&&this.clickButton(o,!1),i(t,"load",function(){t.xAxis&&t.xAxis[0]&&i(t.xAxis[0],"setExtremes",function(i){this.max-this.min!==t.fixedRange&&"rangeSelectorButton"!==i.trigger&&"updatedData"!==i.trigger&&e.forcedDataGrouping&&!e.frozenStates&&this.setDataGrouping(!1,!1)})})},updateButtonStates:function(){var t=this,e=this.chart,i=e.xAxis[0],s=Math.round(i.max-i.min),n=!i.hasVisibleSeries,o=e.scroller&&e.scroller.getUnionExtremes()||i,a=o.dataMin,r=o.dataMax,e=t.getYTDExtremes(r,a,e.time.useUTC),l=e.min,h=e.max,c=t.selected,d=u(c),p=t.options.allButtonsEnabled,f=t.buttons;t.buttonOptions.forEach(function(e,o){var u=e._range,g=e.type,m=e.count||1,v=f[o],x=0,y=e._offsetMax-e._offsetMin;e=o===c;var b=u>r-a,w=u<i.minRange,k=!1,M=!1,u=u===s;("month"===g||"year"===g)&&s+36e5>=864e5*{month:28,year:365}[g]*m-y&&s-36e5<=864e5*{month:31,year:366}[g]*m+y?u=!0:"ytd"===g?(u=h-l+y===s,k=!e):"all"===g&&(u=i.max-i.min>=r-a,M=!e&&d&&u),g=!p&&(b||w||M||n),m=e&&u||u&&!d&&!k||e&&t.frozenStates,g?x=3:m&&(d=!0,x=2),v.state!==x&&(v.setState(x),0===x&&c===o&&t.setSelected(null))})},computeButtonRange:function(t){var e=t.type,i=t.count||1,s={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5};s[e]?t._range=s[e]*i:"month"!==e&&"year"!==e||(t._range=864e5*{month:30,year:365}[e]*i),t._offsetMin=g(t.offsetMin,0),t._offsetMax=g(t.offsetMax,0),t._range+=t._offsetMax-t._offsetMin},setInputValue:function(t,e){var i=this.chart.options.rangeSelector,s=this.chart.time,n=this[t+"Input"];l(e)&&(n.previousValue=n.HCTime,n.HCTime=e),n.value=s.dateFormat(i.inputEditDateFormat||"%Y-%m-%d",n.HCTime),this[t+"DateBox"].attr({text:s.dateFormat(i.inputDateFormat||"%b %e, %Y",n.HCTime)})},showInput:function(t){var e=this.inputGroup,i=this[t+"DateBox"];o(this[t+"Input"],{left:e.translateX+i.x+"px",top:e.translateY+"px",width:i.width-2+"px",height:i.height-2+"px",border:"2px solid silver"})},hideInput:function(t){o(this[t+"Input"],{border:0,width:"1px",height:"1px"}),this.setInputValue(t)},drawInput:function(e){function i(){var t=s.value,e=(g.inputDateParser||Date.parse)(t),i=h.xAxis[0],n=h.scroller&&h.scroller.xAxis?h.scroller.xAxis:i,o=n.dataMin,n=n.dataMax;e!==s.previousValue&&(s.previousValue=e,u(e)||(e=t.split("-"),e=Date.UTC(m(e[0]),m(e[1])-1,m(e[2]))),u(e)&&(h.time.useUTC||(e+=6e4*(new Date).getTimezoneOffset()),x?e>l.maxInput.HCTime?e=void 0:e<o&&(e=o):e<l.minInput.HCTime?e=void 0:e>n&&(e=n),void 0!==e&&i.setExtremes(x?e:i.min,x?i.max:e,void 0,void 0,{trigger:"rangeSelectorInput"})))}var s,n,l=this,h=l.chart,c=h.renderer.style||{},p=h.renderer,g=h.options.rangeSelector,v=l.div,x="min"===e,y=this.inputGroup;this[e+"Label"]=n=p.label(r.lang[x?"rangeSelectorFrom":"rangeSelectorTo"],this.inputGroup.offset).addClass("highcharts-range-label").attr({padding:2}).add(y),y.offset+=n.width+5,this[e+"DateBox"]=p=p.label("",y.offset).addClass("highcharts-range-input").attr({padding:2,width:g.inputBoxWidth||90,height:g.inputBoxHeight||17,"text-align":"center"}).on("click",function(){l.showInput(e),l[e+"Input"].focus()}),h.styledMode||p.attr({stroke:g.inputBoxBorderColor||"#cccccc","stroke-width":1}),p.add(y),y.offset+=p.width+(x?10:0),this[e+"Input"]=s=a("input",{name:e,className:"highcharts-range-selector",type:"text"},{top:h.plotTop+"px"},v),h.styledMode||(n.css(f(c,g.labelStyle)),p.css(f({color:"#333333"},c,g.inputStyle)),o(s,d({position:"absolute",border:0,width:"1px",height:"1px",padding:0,textAlign:"center",fontSize:c.fontSize,fontFamily:c.fontFamily,top:"-9999em"},g.inputStyle))),s.onfocus=function(){l.showInput(e)},s.onblur=function(){s===t.doc.activeElement&&(i(),l.hideInput(e),s.blur())},s.onchange=i,s.onkeypress=function(t){13===t.keyCode&&i()}},getPosition:function(){var t=this.chart,e=t.options.rangeSelector,t="top"===e.verticalAlign?t.plotTop-t.axisOffset[0]:0;return{buttonTop:t+e.buttonPosition.y,inputTop:t+e.inputPosition.y-10}},getYTDExtremes:function(t,e,i){var s=this.chart.time,n=new s.Date(t),o=s.get("FullYear",n);return i=i?s.Date.UTC(o,0,1):+new s.Date(o,0,1),e=Math.max(e||0,i),n=n.getTime(),{max:Math.min(t||n,n),min:e}},render:function(t,e){var i,s,n=this,o=n.chart,l=o.renderer,h=o.container,c=o.options,d=c.exporting&&!1!==c.exporting.enabled&&c.navigation&&c.navigation.buttonOptions,p=r.lang,u=n.div,f=c.rangeSelector,m=g(c.chart.style&&c.chart.style.zIndex,0)+1,c=f.floating,v=n.buttons,u=n.inputGroup,x=f.buttonTheme,y=f.buttonPosition,b=f.inputPosition,w=f.inputEnabled,k=x&&x.states,M=o.plotLeft,S=n.buttonGroup;s=n.rendered;var T,C=n.options.verticalAlign,A=o.legend,E=A&&A.options,P=y.y,O=b.y,L=s||!1,D=L?"animate":"attr",_=0,I=0;!1!==f.enabled&&(s||(n.group=s=l.g("range-selector-group").attr({zIndex:7}).add(),n.buttonGroup=S=l.g("range-selector-buttons").add(s),n.zoomText=l.text(p.rangeSelectorZoom,0,15).add(S),o.styledMode||(n.zoomText.css(f.labelStyle),x["stroke-width"]=g(x["stroke-width"],0)),n.buttonOptions.forEach(function(t,e){v[e]=l.button(t.text,0,0,function(i){var s,o=t.events&&t.events.click;o&&(s=o.call(t,i)),!1!==s&&n.clickButton(e),n.isActive=!0},x,k&&k.hover,k&&k.select,k&&k.disabled).attr({"text-align":"center"}).add(S)}),!1!==w&&(n.div=u=a("div",null,{position:"relative",height:0,zIndex:m}),h.parentNode.insertBefore(u,h),n.inputGroup=u=l.g("input-group").add(s),u.offset=0,n.drawInput("min"),n.drawInput("max"))),n.zoomText[D]({x:g(M+y.x,M)}),i=g(M+y.x,M)+n.zoomText.getBBox().width+5,n.buttonOptions.forEach(function(t,e){v[e][D]({x:i}),i+=v[e].width+g(f.buttonSpacing,5)}),M=o.plotLeft-o.spacing[3],n.updateButtonStates(),d&&this.titleCollision(o)&&"top"===C&&"right"===y.align&&y.y+S.getBBox().height-12<(d.y||0)+d.height&&(_=-40),"left"===y.align?T=y.x-o.spacing[3]:"right"===y.align&&(T=y.x+_-o.spacing[1]),S.align({y:y.y,width:S.getBBox().width,align:y.align,x:T},!0,o.spacingBox),n.group.placed=L,n.buttonGroup.placed=L,!1!==w&&(_=d&&this.titleCollision(o)&&"top"===C&&"right"===b.align&&b.y-u.getBBox().height-12<(d.y||0)+d.height+o.spacing[0]?-40:0,"left"===b.align?T=M:"right"===b.align&&(T=-Math.max(o.axisOffset[1],-_)),u.align({y:b.y,width:u.getBBox().width,align:b.align,x:b.x+T-2},!0,o.spacingBox),h=u.alignAttr.translateX+u.alignOptions.x-_+u.getBBox().x+2,d=u.alignOptions.width,p=S.alignAttr.translateX+S.getBBox().x,T=S.getBBox().width+20,(b.align===y.align||p+T>h&&h+d>p&&P<O+u.getBBox().height)&&u.attr({translateX:u.alignAttr.translateX+(o.axisOffset[1]>=-_?0:-_),translateY:u.alignAttr.translateY+S.getBBox().height+10}),n.setInputValue("min",t),n.setInputValue("max",e),n.inputGroup.placed=L),n.group.align({verticalAlign:C},!0,o.spacingBox),t=n.group.getBBox().height+20,e=n.group.alignAttr.translateY,"bottom"===C&&(A=E&&"bottom"===E.verticalAlign&&E.enabled&&!E.floating?A.legendHeight+g(E.margin,10):0,t=t+A-20,I=e-t-(c?0:f.y)-10),"top"===C?(c&&(I=0),o.titleOffset&&(I=o.titleOffset+o.options.title.margin),I+=o.margin[0]-o.spacing[0]||0):"middle"===C&&(O===P?I=0>O?e+void 0:e:(O||P)&&(I=0>O||0>P?I-Math.min(O,P):e-t+NaN)),n.group.translate(f.x,f.y+Math.floor(I)),!1!==w&&(n.minInput.style.marginTop=n.group.translateY+"px",n.maxInput.style.marginTop=n.group.translateY+"px"),n.rendered=!0)},getHeight:function(){var t=this.options,e=this.group,i=t.y,s=t.buttonPosition.y,n=t.inputPosition.y;return t.height?t.height:(t=e?e.getBBox(!0).height+13+i:0,e=Math.min(n,s),(0>n&&0>s||0<n&&0<s)&&(t+=Math.abs(e)),t)},titleCollision:function(t){return!(t.options.title.text||t.options.subtitle.text)},update:function(t){var e=this.chart;f(!0,e.options.rangeSelector,t),this.destroy(),this.init(e),e.rangeSelector.render()},destroy:function(){var i=this,s=i.minInput,n=i.maxInput;i.unMouseDown(),i.unResize(),h(i.buttons),s&&(s.onfocus=s.onblur=s.onchange=null),n&&(n.onfocus=n.onblur=n.onchange=null),t.objectEach(i,function(t,s){t&&"chart"!==s&&(t.destroy?t.destroy():t.nodeType&&c(this[s])),t!==e.prototype[s]&&(i[s]=null)},this)}},s.prototype.minFromRange=function(){var t,e,i,s=this.range,n={month:"Month",year:"FullYear"}[s.type],o=this.max,a=this.chart.time,r=function(t,e){var i=new a.Date(t),s=a.get(n,i);return a.set(n,i,s+e),s===a.get(n,i)&&i.setDate(0),i.getTime()-t};return u(s)?(t=o-s,i=s):(t=o+r(o,-s.count),this.chart&&(this.chart.fixedRange=o-t)),e=g(this.dataMin,Number.MIN_VALUE),u(t)||(t=e),t<=e&&(t=e,void 0===i&&(i=r(t,s.count)),this.newMax=Math.min(t+i,this.dataMax)),u(o)||(t=void 0),t},t.RangeSelector||(i(n,"afterGetContainer",function(){this.options.rangeSelector.enabled&&(this.rangeSelector=new e(this))}),i(n,"beforeRender",function(){var t=this.axes,e=this.rangeSelector;e&&(u(e.deferredYTDClick)&&(e.clickButton(e.deferredYTDClick),delete e.deferredYTDClick),t.forEach(function(t){t.updateNames(),t.setScale()}),this.getAxisMargins(),e.render(),t=e.options.verticalAlign,e.options.floating||("bottom"===t?this.extraBottomMargin=!0:"middle"!==t&&(this.extraTopMargin=!0)))}),i(n,"update",function(t){var i=t.options.rangeSelector;t=this.rangeSelector;var s=this.extraBottomMargin,n=this.extraTopMargin;i&&i.enabled&&!l(t)&&(this.options.rangeSelector.enabled=!0,this.rangeSelector=new e(this)),this.extraTopMargin=this.extraBottomMargin=!1,t&&(t.render(),i=i&&i.verticalAlign||t.options&&t.options.verticalAlign,t.options.floating||("bottom"===i?this.extraBottomMargin=!0:"middle"!==i&&(this.extraTopMargin=!0)),this.extraBottomMargin!==s||this.extraTopMargin!==n)&&(this.isDirtyBox=!0)}),i(n,"render",function(){var t=this.rangeSelector;t&&!t.options.floating&&(t.render(),t=t.options.verticalAlign,"bottom"===t?this.extraBottomMargin=!0:"middle"!==t&&(this.extraTopMargin=!0))}),i(n,"getMargins",function(){var t=this.rangeSelector;t&&(t=t.getHeight(),this.extraTopMargin&&(this.plotTop+=t),this.extraBottomMargin&&(this.marginBottom+=t))}),n.prototype.callbacks.push(function(t){function e(){s=t.xAxis[0].getExtremes(),u(s.min)&&a.render(s.min,s.max)}var s,n,o,a=t.rangeSelector;a&&(o=i(t.xAxis[0],"afterSetExtremes",function(t){a.render(t.min,t.max)}),n=i(t,"redraw",e),e()),i(t,"destroy",function(){a&&(n(),o())})}),t.RangeSelector=e)}),e(i,"parts/StockChart.js",[i["parts/Globals.js"]],function(t){var e=t.addEvent,i=t.arrayMax,s=t.arrayMin,n=t.Axis,o=t.Chart,a=t.defined,r=t.extend,l=t.format,h=t.isNumber,c=t.isString,d=t.merge,p=t.pick,u=t.Point,f=t.Renderer,g=t.Series,m=t.splat,v=t.SVGRenderer,x=t.VMLRenderer,y=g.prototype,b=y.init,w=y.processData,k=u.prototype.tooltipFormatter;t.StockChart=t.stockChart=function(e,i,s){var n,a=c(e)||e.nodeName,r=arguments[a?1:0],l=r,h=r.series,u=t.getOptions(),f=p(r.navigator&&r.navigator.enabled,u.navigator.enabled,!0),g=f?{startOnTick:!1,endOnTick:!1}:null,v={marker:{enabled:!1,radius:2}},x={shadow:!1,borderWidth:0};return r.xAxis=m(r.xAxis||{}).map(function(t,e){return d({minPadding:0,maxPadding:0,overscroll:0,ordinal:!0,title:{text:null},labels:{overflow:"justify"},showLastLabel:!0},u.xAxis,u.xAxis&&u.xAxis[e],t,{type:"datetime",categories:null},g)}),r.yAxis=m(r.yAxis||{}).map(function(t,e){return n=p(t.opposite,!0),d({labels:{y:-2},opposite:n,showLastLabel:!(!t.categories&&"category"!==t.type),title:{text:null}},u.yAxis,u.yAxis&&u.yAxis[e],t)}),r.series=null,r=d({chart:{panning:!0,pinchType:"x"},navigator:{enabled:f},scrollbar:{enabled:p(u.scrollbar.enabled,!0)},rangeSelector:{enabled:p(u.rangeSelector.enabled,!0)},title:{text:null},tooltip:{split:p(u.tooltip.split,!0),crosshairs:!0},legend:{enabled:!1},plotOptions:{line:v,spline:v,area:v,areaspline:v,arearange:v,areasplinerange:v,column:x,columnrange:x,candlestick:x,ohlc:x}},r,{isStock:!0}),r.series=l.series=h,a?new o(e,r,s):new o(r,i)},e(n,"autoLabelAlign",function(t){var e=this.chart,i=this.options,e=e._labelPanes=e._labelPanes||{},s=this.options.labels;this.chart.options.isStock&&"yAxis"===this.coll&&(i=i.top+","+i.height,!e[i]&&s.enabled&&(15===s.x&&(s.x=0),void 0===s.align&&(s.align="right"),e[i]=this,t.align="right",t.preventDefault()))}),e(n,"destroy",function(){var t=this.chart,e=this.options&&this.options.top+","+this.options.height;e&&t._labelPanes&&t._labelPanes[e]===this&&delete t._labelPanes[e]}),e(n,"getPlotLinePath",function(e){var i,s,n,o,r,l,d,u=this,f=this.isLinked&&!this.series?this.linkedParent.series:this.series,g=u.chart,m=g.renderer,v=u.left,x=u.top,y=[],b=[],w=e.translatedValue,k=e.value,M=e.force;"xAxis"!==u.coll&&"yAxis"!==u.coll||(e.preventDefault(),b=function(t){var e="xAxis"===t?"yAxis":"xAxis";return t=u.options[e],h(t)?[g[e][t]]:c(t)?[g.get(t)]:f.map(function(t){return t[e]})}(u.coll),r=u.isXAxis?g.yAxis:g.xAxis,r.forEach(function(t){if(a(t.options.id)?-1===t.options.id.indexOf("navigator"):1){var e=t.isXAxis?"yAxis":"xAxis",e=a(t.options[e])?g[e][t.options[e]]:g[e][0];u===e&&b.push(t)}}),l=b.length?[]:[u.isXAxis?g.yAxis[0]:g.xAxis[0]],b.forEach(function(e){-1!==l.indexOf(e)||t.find(l,function(t){return t.pos===e.pos&&t.len===e.len})||l.push(e)}),d=p(w,u.translate(k,null,null,e.old)),h(d)&&(u.horiz?l.forEach(function(t){var e;s=t.pos,o=s+t.len,i=n=Math.round(d+u.transB),"pass"!==M&&(i<v||i>v+u.width)&&(M?i=n=Math.min(Math.max(v,i),v+u.width):e=!0),e||y.push("M",i,s,"L",n,o)}):l.forEach(function(t){var e;i=t.pos,n=i+t.len,s=o=Math.round(x+u.height-d),"pass"!==M&&(s<x||s>x+u.height)&&(M?s=o=Math.min(Math.max(x,s),u.top+u.height):e=!0),e||y.push("M",i,s,"L",n,o)})),e.path=0<y.length?m.crispPolyLine(y,e.lineWidth||1):null)}),v.prototype.crispPolyLine=function(t,e){var i;for(i=0;i<t.length;i+=6)t[i+1]===t[i+4]&&(t[i+1]=t[i+4]=Math.round(t[i+1])-e%2/2),t[i+2]===t[i+5]&&(t[i+2]=t[i+5]=Math.round(t[i+2])+e%2/2);return t},f===x&&(x.prototype.crispPolyLine=v.prototype.crispPolyLine),e(n,"afterHideCrosshair",function(){this.crossLabel&&(this.crossLabel=this.crossLabel.hide())}),e(n,"afterDrawCrosshair",function(t){var e,i;if(a(this.crosshair.label)&&this.crosshair.label.enabled&&this.cross){var s=this.chart,n=this.options.crosshair.label,o=this.horiz;e=this.opposite,i=this.left;var h=this.top,c=this.crossLabel,d=n.format,u="",f="inside"===this.options.tickPosition,g=!1!==this.crosshair.snap,m=0,v=t.e||this.cross&&this.cross.e,x=t.point;t=this.lin2log;var y,b;this.isLog?(y=t(this.min),b=t(this.max)):(y=this.min,b=this.max),t=o?"center":e?"right"===this.labelAlign?"right":"left":"left"===this.labelAlign?"left":"center",c||(c=this.crossLabel=s.renderer.label(null,null,null,n.shape||"callout").addClass("highcharts-crosshair-label"+(this.series[0]&&" highcharts-color-"+this.series[0].colorIndex)).attr({align:n.align||t,padding:p(n.padding,8),r:p(n.borderRadius,3),zIndex:2}).add(this.labelGroup),s.styledMode||c.attr({fill:n.backgroundColor||this.series[0]&&this.series[0].color||"#666666",stroke:n.borderColor||"","stroke-width":n.borderWidth||0}).css(r({color:"#ffffff",fontWeight:"normal",fontSize:"11px",textAlign:"center"},n.style))),o?(t=g?x.plotX+i:v.chartX,h+=e?0:this.height):(t=e?this.width+i:0,h=g?x.plotY+h:v.chartY),d||n.formatter||(this.isDatetimeAxis&&(u="%b %d, %Y"),d="{value"+(u?":"+u:"")+"}"),u=g?x[this.isXAxis?"x":"y"]:this.toValue(o?v.chartX:v.chartY),c.attr({text:d?l(d,{value:u},s.time):n.formatter.call(this,u),x:t,y:h,visibility:u<y||u>b?"hidden":"visible"}),n=c.getBBox(),o?(f&&!e||!f&&e)&&(h=c.y-n.height):h=c.y-n.height/2,o?(e=i-n.x,i=i+this.width-n.x):(e="left"===this.labelAlign?i:0,i="right"===this.labelAlign?i+this.width:s.chartWidth),c.translateX<e&&(m=e-c.translateX),c.translateX+n.width>=i&&(m=-(c.translateX+n.width-i)),c.attr({x:t+m,y:h,anchorX:o?t:this.opposite?0:s.chartWidth,anchorY:o?this.opposite?s.chartHeight:0:h+n.height/2})}}),y.init=function(){b.apply(this,arguments),this.setCompare(this.options.compare)},y.setCompare=function(t){this.modifyValue="value"===t||"percent"===t?function(e,i){var s=this.compareValue;if(void 0!==e&&void 0!==s)return e="value"===t?e-s:e/s*100-(100===this.options.compareBase?0:100),i&&(i.change=e),e}:null,this.userOptions.compare=t,this.chart.hasRendered&&(this.isDirty=!0)},y.processData=function(){var t,e,i,s,n,o=-1,a=!0===this.options.compareStart?0:1;if(w.apply(this,arguments),this.xAxis&&this.processedYData)for(e=this.processedXData,i=this.processedYData,s=i.length,this.pointArrayMap&&(o=this.pointArrayMap.indexOf(this.options.pointValKey||this.pointValKey||"y")),t=0;t<s-a;t++)if(n=i[t]&&-1<o?i[t][o]:i[t],h(n)&&e[t+a]>=this.xAxis.min&&0!==n){this.compareValue=n;break}},e(g,"afterGetExtremes",function(){if(this.modifyValue){var t=[this.modifyValue(this.dataMin),this.modifyValue(this.dataMax)];this.dataMin=s(t),this.dataMax=i(t)}}),n.prototype.setCompare=function(t,e){this.isXAxis||(this.series.forEach(function(e){e.setCompare(t)}),p(e,!0)&&this.chart.redraw())},u.prototype.tooltipFormatter=function(e){return e=e.replace("{point.change}",(0<this.change?"+":"")+t.numberFormat(this.change,p(this.series.tooltipOptions.changeDecimals,2))),k.apply(this,[e])},e(g,"render",function(){var t;this.chart.is3d&&this.chart.is3d()||this.chart.polar||!this.xAxis||this.xAxis.isRadial||(t=this.yAxis.len-(this.xAxis.axisLine?Math.floor(this.xAxis.axisLine.strokeWidth()/2):0),!this.clipBox&&this.animate?(this.clipBox=d(this.chart.clipBox),this.clipBox.width=this.xAxis.len,this.clipBox.height=t):this.chart[this.sharedClipKey]&&(this.chart[this.sharedClipKey].animate({width:this.xAxis.len,height:t}),this.chart[this.sharedClipKey+"m"]&&this.chart[this.sharedClipKey+"m"].animate({width:this.xAxis.len})))}),e(o,"update",function(t){"scrollbar"in(t=t.options)&&this.navigator&&(d(!0,this.options.scrollbar,t.scrollbar),this.navigator.update({},!1),delete t.scrollbar)})}),e(i,"masters/modules/stock.src.js",[],function(){}),e(i,"masters/highstock.src.js",[i["masters/highcharts.src.js"]],function(t){return t}),i["masters/highstock.src.js"]._modules=i,i["masters/highstock.src.js"]})}).call(e,i(98)(t))},98:function(t,e,i){"use strict";t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},99:function(t,e,i){"use strict";(function(t){function e(t){return t&&t.__esModule?t:{default:t}}var s=i(0),n=e(s),o=i(17),a=e(o),r=i(8),l=e(r),h=i(9),c=e(h);i(7),t(document).ready(function(){var t=!1,e=function(){var t=(0,n.default)("select.js-product-catalogs"),e=(0,n.default)("select.js-product-feeds"),i=(0,n.default)("#product_catalog_config_schedule-update_fb_product_catalog_name"),s=(0,n.default)("#product_catalog_config_schedule-update_fb_product_feed_name"),o=(0,n.default)(l.default.fragments.product_feed_schedule),r=function(){var i=e.val(),r=t.val();if(r&&!(e.length<=0)){var l=function(){if(c.default.dropdown_data.hasOwnProperty("get_product_feed_ids")&&c.default.dropdown_data.get_product_feed_ids.hasOwnProperty(r)){var t=c.default.dropdown_data.get_product_feed_ids[r];e.prop("disabled",!1),e.append(n.default.map(t,function(t,e){return(0,n.default)("<option>",{val:t.id,text:t.name+" (#"+t.id+")",selected:t.id===i,"data-name":t.name})})),e.on("change",function(){var t=(0,n.default)(this).val();s.val((0,n.default)(this).find("option:selected").attr("data-name")),o.removeClass("hide"),a.default.reloadFragment("product_feed_schedule",{product_feed_id:t})})}};c.default.dropdown_data.hasOwnProperty("get_product_feed_ids")&&c.default.dropdown_data.get_product_feed_ids.hasOwnProperty(r)?l():function(){a.default.addLoader(e),e.find("option[value]").not(".select2-add").remove(),n.default.ajax({url:aepc_admin.ajax_url,data:{product_catalog_id:r,action:aepc_admin.actions.get_product_feed_ids.name,_wpnonce:aepc_admin.actions.get_product_feed_ids.nonce},success:function(i){!1===i.success?(a.default.addMessage((0,n.default)("#fb-update-catalog"),"error",i.data),t.select2("val","")):(c.default.dropdown_data.hasOwnProperty("get_product_feed_ids")||(c.default.dropdown_data.get_product_feed_ids={}),c.default.dropdown_data.get_product_feed_ids[r]=i.data,l()),a.default.removeLoader(e)},dataType:"json"})}()}};!function(){var e=t.val();if(!(t.length<=0)){var s=function(){if(c.default.dropdown_data.hasOwnProperty("get_product_catalog_ids")){var s=n.default.merge([{id:"",name:""}],c.default.dropdown_data.get_product_catalog_ids);if(t.find("option").remove(),t.append(n.default.map(s,function(t,i){return(0,n.default)("<option>",{val:t.id,text:t.name?t.name+" (#"+t.id+")":"",selected:t.id===e,"data-name":t.name})})),t.on("change",function(){i.val((0,n.default)(this).find("option:selected").attr("data-name")),r()}),t.find("option:selected").length){var o=c.default.unsaved;t.trigger("change"),c.default.unsaved=o}}};c.default.dropdown_data.hasOwnProperty("get_product_catalog_ids")?s():function(){a.default.addLoader(t),n.default.ajax({url:aepc_admin.ajax_url,data:{action:aepc_admin.actions.get_product_catalog_ids.name,_wpnonce:aepc_admin.actions.get_product_catalog_ids.nonce},success:function(e){!1===e.success?a.default.addMessage((0,n.default)("#fb-update-catalog"),"error",e.data):(c.default.dropdown_data.get_product_catalog_ids=e.data,s()),a.default.removeLoader(t)},dataType:"json"})}()}}(),r()},i=function(){(0,n.default)(".js-google-category").each(function(){var t=(0,n.default)(this);!function t(e){e.select2({data:function(){var t=e.data("options");return{results:t?t.map(function(t){return{id:t,text:t}}):[]}}}),e.on("change",function(){var e=(0,n.default)(this),i=e.closest(".js-categories-wrapper"),s=e.clone().val("").data("options","").data("level",parseInt(e.data("level"))+1);e.nextAll("input").select2("destroy").remove(),a.default.addLoader(i),n.default.ajax({url:aepc_admin.ajax_url,method:"POST",data:{parents:i.find("input.js-google-category").map(function(){return(0,n.default)(this).val()}).get(),action:aepc_admin.actions.get_google_categories.name,_wpnonce:aepc_admin.actions.get_google_categories.nonce},complete:function(){a.default.removeLoader(i)},success:function(i){0!==i.length&&(s.data("options",i).insertAfter(e),t(s))},dataType:"json"})})}(t)}),(0,n.default)("input.multi-tags[data-tags]").each(function(){var t=(0,n.default)(this);t.select2({tags:function(){return t.data("tags")}})})},s=function s(){!t&&0!==(0,n.default)(l.default.fragments.product_feed_status).length&&(0,n.default)(l.default.fragments.product_feed_status).hasClass("updating")&&setTimeout(function(){t=!0,a.default.reloadFragment("product_feed_status",{beforeRender:function(){a.default.removeAllMainMessages()},success:function(n){t=!1,i(),e(),s()}},!1)},3e3)};(0,n.default)(document).on("fragment_html_refreshed",function(){i(),s()}),(0,n.default)(document).on("click",".js-feed-delete",function(t){t.preventDefault();var e=(0,n.default)(this),i=(0,n.default)("#modal-confirm-delete"),s=e.data("feed-id");i.modal("show",e).one("click",".btn-ok",function(){i.modal("hide"),a.default.addLoader(e.closest(".panel")),n.default.ajax({url:aepc_admin.ajax_url,method:"POST",data:{name:s,action:aepc_admin.actions.delete_product_catalog_feed.name,_wpnonce:aepc_admin.actions.delete_product_catalog_feed.nonce},success:function(t){window.location.reload(!1)},dataType:"json"})})}),(0,n.default)(document).on("click",".js-feed-edit",function(t){t.preventDefault(),(0,n.default)(".js-edit-form").collapse("show")}),(0,n.default)(document).on("click",".js-product-feed-refresh",function(t){t.preventDefault();var e=(0,n.default)(this),o=(0,n.default)("#modal-confirm-refresh-product-feed"),r=e.data("feed-id");o.modal("show",e).one("click",".btn-ok",function(){o.modal("hide"),a.default.addLoader(e.closest(".panel")),a.default.removeAllMainMessages(),n.default.ajax({url:aepc_admin.ajax_url,method:"POST",data:{name:r,action:aepc_admin.actions.refresh_product_catalog_feed.name,_wpnonce:aepc_admin.actions.refresh_product_catalog_feed.nonce},complete:function(){a.default.removeLoader(e.closest(".panel"))},success:function(t){a.default.removeAllMainMessages(),a.default.refreshFragmentHTML((0,n.default)(l.default.fragments.product_feed_status),t),i(),s()},dataType:"json"})})}),(0,n.default)(document).on("click",".js-product-feed-save-interval",function(){var t=(0,n.default)(this),e=t.closest(".js-refresh-interval-option"),i=(0,n.default)("#product_catalog_config_refresh_cycle"),s=(0,n.default)("#product_catalog_config_refresh_cycle_type"),o=t.data("feed-id");a.default.addLoader(e),n.default.ajax({url:aepc_admin.ajax_url,method:"POST",data:{product_catalog_id:o,cycle:i.val(),cycle_type:s.val(),action:aepc_admin.actions.save_product_feed_refresh_interval.name,_wpnonce:aepc_admin.actions.save_product_feed_refresh_interval.nonce},complete:function(){a.default.removeLoader(e)},success:function(t){a.default.addMessagesFromResponse(t),c.default.set_saved()},dataType:"json"})}),(0,n.default)(document).on("click",".js-catalog-option",function(t){var e=(0,n.default)(this).closest("#automatic-facebook-options"),i=e.find(".panel"),s=(0,n.default)((0,n.default)(this).data("target"));if(!s.is(".hide"))return t;i.addClass("hide"),s.removeClass("hide")}).on("click",'[data-toggle="schedule-interval"]',function(t){var e=(0,n.default)('[data-schedule-option="'+(0,n.default)(this).data("dep")+'"]');(0,n.default)("[data-schedule-option]").addClass("hide"),e.removeClass("hide")}),s(),i(),e()})}).call(e,i(0))}});
build/frontend.js CHANGED
@@ -1 +1 @@
1
- !function(t){function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var e={};n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="",n(n.s=28)}([function(t,n){t.exports=jQuery},function(t,n,e){"use strict";var r=Array.isArray;t.exports=r},function(t,n,e){"use strict";function r(t,n){return o(t)?t:c(t,n)?[t]:i(u(t))}var o=e(1),c=e(35),i=e(40),u=e(69);t.exports=r},function(t,n,e){"use strict";var r=e(12),o=r.Symbol;t.exports=o},function(t,n,e){"use strict";var r=e(14),o=r(Object,"create");t.exports=o},function(t,n,e){"use strict";function r(t,n){for(var e=t.length;e--;)if(o(t[e][0],n))return e;return-1}var o=e(18);t.exports=r},function(t,n,e){"use strict";function r(t,n){var e=t.__data__;return o(n)?e["string"==typeof n?"string":"hash"]:e.map}var o=e(65);t.exports=r},,,,function(t,n,e){"use strict";function r(t){return"symbol"==(void 0===t?"undefined":o(t))||i(t)&&c(t)==u}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c=e(11),i=e(13),u="[object Symbol]";t.exports=r},function(t,n,e){"use strict";function r(t){return null==t?void 0===t?a:u:s&&s in Object(t)?c(t):i(t)}var o=e(3),c=e(38),i=e(39),u="[object Null]",a="[object Undefined]",s=o?o.toStringTag:void 0;t.exports=r},function(t,n,e){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=e(36),c="object"==("undefined"==typeof self?"undefined":r(self))&&self&&self.Object===Object&&self,i=o||c||Function("return this")();t.exports=i},function(t,n,e){"use strict";function r(t){return null!=t&&"object"==(void 0===t?"undefined":o(t))}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=r},function(t,n,e){"use strict";function r(t,n){var e=c(t,n);return o(e)?e:void 0}var o=e(47),c=e(52);t.exports=r},function(t,n,e){"use strict";function r(t){var n=void 0===t?"undefined":o(t);return null!=t&&("object"==n||"function"==n)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=r},function(t,n,e){"use strict";function r(t){if("string"==typeof t||o(t))return t;var n=t+"";return"0"==n&&1/t==-c?"-0":n}var o=e(10),c=1/0;t.exports=r},,function(t,n,e){"use strict";function r(t,n){return t===n||t!==t&&n!==n}t.exports=r},function(t,n,e){"use strict";var r=e(14),o=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},function(t,n,e){"use strict";function r(t,n){var e=void 0===t?"undefined":o(t);return!!(n=null==n?c:n)&&("number"==e||"symbol"!=e&&i.test(t))&&t>-1&&t%1==0&&t<n}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c=9007199254740991,i=/^(?:0|[1-9]\d*)$/;t.exports=r},function(t,n,e){"use strict";var r=e(78),o=e(13),c=Object.prototype,i=c.hasOwnProperty,u=c.propertyIsEnumerable,a=r(function(){return arguments}())?r:function(t){return o(t)&&i.call(t,"callee")&&!u.call(t,"callee")};t.exports=a},,,,,,,function(t,n,e){t.exports=e(29)},function(t,n,e){"use strict";(function(t){function n(t){return t&&t.__esModule?t:{default:t}}var r=e(30),o=n(r),c=e(31),i=n(c);t(document).ready(function(t){var n=(t(document.body),function(t){return aepc_extend_args(t)}),e=function(t,n){n?setTimeout(t,1e3*n):t()};aepc_pixel_events.standard_events&&t.each(aepc_pixel_events.standard_events,function(r,c){t.each(c,function(t,c){e(function(){c.params?(0,o.default)("track",r,n(c.params)):(0,o.default)("track",r)},c.delay)})}),void 0!==aepc_pixel_events.custom_events&&t.each(aepc_pixel_events.custom_events,function(r,c){t.each(c,function(t,c){e(function(){(0,o.default)("trackCustom",r,n(c.params))},c.delay)})}),void 0!==aepc_pixel_events.css_events&&t.each(aepc_pixel_events.css_events,function(e,r){t.each(r,function(r,c){t(e).on("click",function(){(0,o.default)(c.trackType,c.trackName,n(c.trackParams))})})}),void 0!==aepc_pixel_events.link_clicks&&t.each(aepc_pixel_events.link_clicks,function(e,r){t.each(r,function(r,c){t("a").filter(function(){var n=t(this).attr("href");if(void 0===n)return!1;if("contains"===r)return n.match(new RegExp(e.replace(/\*/g,"[^/]+").replace(/([.\/?])/gm,"\\$1")));if("exact"===r){var o=e+(e.match(/\/+$/)?"":"/");return o.match(/^http(s)?:\/\//)||(o="/"+o.replace(/^\/+/,""),o=window.location.protocol+"//"+window.location.host+o),n+=n.match(/\/+$/)?"":"/",n.match(/^http(s)?:\/\//)||(n="/"+n.replace(/^\/+/,""),n=window.location.protocol+"//"+window.location.host+n),o===n}return!1}).on("click",function(e){t.each(c,function(t,e){(0,o.default)(e.trackType,e.trackName,n(e.trackParams))})})})}),void 0!==aepc_pixel_events.js_events&&t.each(aepc_pixel_events.js_events,function(e,r){t.each(r,function(r,c){t(e).on(r,function(){t.each(c,function(t,e){(0,o.default)(e.trackType,e.trackName,n(e.trackParams))})})})}),t(".product_type_simple.add_to_cart_button").on("click",function(e){if("no"===aepc_pixel.enable_addtocart)return e;var r=t(this),c=r.closest(".product"),u=r.data("product_sku")?r.data("product_sku"):r.data("product_id"),a=c.find('input[name="quantity"]').length?c.find('input[name="quantity"]').val():1;(0,o.default)("track","AddToCart",n((0,i.default)({content_ids:[u],content_type:"product",content_name:c.find("h3, .woocommerce-loop-product__title").text(),content_category:c.find("span[data-content_category]").data("content_category"),value:parseFloat(c.find("span.amount:last").clone().children().remove().end().text())*a,currency:woocommerce_params.currency},aepc_pixel.allowed_params.AddToCart)))}),t(".add_to_wishlist, .wl-add-to").on("click",function(e){if("no"===aepc_pixel.enable_wishlist)return e;var r=t(this),c=r.data("product-sku")?r.data("product-sku"):r.data("product-id");(0,o.default)("track","AddToWishlist",n(aepc_wc_add_to_cart[c]))}),t(".woocommerce div.product").on("click",".single_add_to_cart_button",function(e){if("yes"===aepc_pixel.enable_addtocart){var r=t(this).closest("form"),c=r.find('[name="add-to-cart"]'),i=r.find('[name="variation_id"]'),u=i.length?i.val():c.val(),a=aepc_wc_add_to_cart[u],s=r.find('input[name="quantity"]').length?r.find('input[name="quantity"]').val():1;a.hasOwnProperty("value")&&(a.value*=s),(0,o.default)("track","AddToCart",n(a))}}),t("body.woocommerce-page form.checkout").on("checkout_place_order",function(t){"yes"===aepc_pixel.enable_addpaymentinfo&&(0,o.default)("track","AddPaymentInfo",n(aepc_add_payment_info_params))}),t(".edd_download, .edd-download").on("click",".edd-add-to-cart",function(e){if("no"===aepc_pixel.enable_addtocart)return e;var r=t(this),c=r.closest("div.edd_download, article.type-download"),u=r.data("download-sku")?r.data("download-sku"):r.data("download-id"),a=c.find('meta[itemprop="priceCurrency"]').attr("content"),s=r.data("price");if("yes"===r.data("variable-price")){var f=t(".edd_price_options"),p=f.find('input[type="radio"]:checked'),l=p.closest("li");s=l.find('meta[itemprop="price"]').attr("content"),a=l.find('meta[itemprop="priceCurrency"]').attr("content")}(0,o.default)("track","AddToCart",n((0,i.default)({content_ids:[u],content_type:"product",content_name:c.find('[itemprop="name"]').first().text(),content_category:r.data("download-categories"),value:parseFloat(s),currency:a},aepc_pixel.allowed_params.AddToCart)))}),t(".edd-checkout").on("click",'form#edd_purchase_form input[type="submit"]',function(t){return"no"===aepc_pixel.enable_addpaymentinfo?t:((0,o.default)("track","AddPaymentInfo",n(aepc_add_payment_info_params)),!0)})})}).call(n,e(0))},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=function t(){for(var n=arguments.length,e=Array(n),r=0;r<n;r++)e[r]=arguments[r];if(window.fbq){var o;(o=window).fbq.apply(o,e)}else setTimeout(function(){return t.apply(void 0,e)},500)};n.default=r},function(t,n,e){"use strict";var r=e(32),o=e(80),c=o(function(t,n){return null==t?{}:r(t,n)});t.exports=c},function(t,n,e){"use strict";function r(t,n){return o(t,n,function(n,e){return c(t,e)})}var o=e(33),c=e(75);t.exports=r},function(t,n,e){"use strict";function r(t,n,e){for(var r=-1,u=n.length,a={};++r<u;){var s=n[r],f=o(t,s);e(f,s)&&c(a,i(s,t),f)}return a}var o=e(34),c=e(72),i=e(2);t.exports=r},function(t,n,e){"use strict";function r(t,n){n=o(n,t);for(var e=0,r=n.length;null!=t&&e<r;)t=t[c(n[e++])];return e&&e==r?t:void 0}var o=e(2),c=e(16);t.exports=r},function(t,n,e){"use strict";function r(t,n){if(c(t))return!1;var e=void 0===t?"undefined":o(t);return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=t&&!i(t))||(a.test(t)||!u.test(t)||null!=n&&t in Object(n))}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c=e(1),i=e(10),u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=r},function(t,n,e){"use strict";(function(n){var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r="object"==(void 0===n?"undefined":e(n))&&n&&n.Object===Object&&n;t.exports=r}).call(n,e(37))},function(t,n,e){"use strict";var r,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"===("undefined"==typeof window?"undefined":o(window))&&(r=window)}t.exports=r},function(t,n,e){"use strict";function r(t){var n=i.call(t,a),e=t[a];try{t[a]=void 0;var r=!0}catch(t){}var o=u.call(t);return r&&(n?t[a]=e:delete t[a]),o}var o=e(3),c=Object.prototype,i=c.hasOwnProperty,u=c.toString,a=o?o.toStringTag:void 0;t.exports=r},function(t,n,e){"use strict";function r(t){return c.call(t)}var o=Object.prototype,c=o.toString;t.exports=r},function(t,n,e){"use strict";var r=e(41),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,c=/\\(\\)?/g,i=r(function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(o,function(t,e,r,o){n.push(r?o.replace(c,"$1"):e||t)}),n});t.exports=i},function(t,n,e){"use strict";function r(t){var n=o(t,function(t){return e.size===c&&e.clear(),t}),e=n.cache;return n}var o=e(42),c=500;t.exports=r},function(t,n,e){"use strict";function r(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new TypeError(c);var e=function e(){var r=arguments,o=n?n.apply(this,r):r[0],c=e.cache;if(c.has(o))return c.get(o);var i=t.apply(this,r);return e.cache=c.set(o,i)||c,i};return e.cache=new(r.Cache||o),e}var o=e(43),c="Expected a function";r.Cache=o,t.exports=r},function(t,n,e){"use strict";function r(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}var o=e(44),c=e(64),i=e(66),u=e(67),a=e(68);r.prototype.clear=o,r.prototype.delete=c,r.prototype.get=i,r.prototype.has=u,r.prototype.set=a,t.exports=r},function(t,n,e){"use strict";function r(){this.size=0,this.__data__={hash:new o,map:new(i||c),string:new o}}var o=e(45),c=e(57),i=e(63);t.exports=r},function(t,n,e){"use strict";function r(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}var o=e(46),c=e(53),i=e(54),u=e(55),a=e(56);r.prototype.clear=o,r.prototype.delete=c,r.prototype.get=i,r.prototype.has=u,r.prototype.set=a,t.exports=r},function(t,n,e){"use strict";function r(){this.__data__=o?o(null):{},this.size=0}var o=e(4);t.exports=r},function(t,n,e){"use strict";function r(t){return!(!i(t)||c(t))&&(o(t)?y:s).test(u(t))}var o=e(48),c=e(49),i=e(15),u=e(51),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,f=Function.prototype,p=Object.prototype,l=f.toString,d=p.hasOwnProperty,y=RegExp("^"+l.call(d).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=r},function(t,n,e){"use strict";function r(t){if(!c(t))return!1;var n=o(t);return n==u||n==a||n==i||n==s}var o=e(11),c=e(15),i="[object AsyncFunction]",u="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";t.exports=r},function(t,n,e){"use strict";function r(t){return!!c&&c in t}var o=e(50),c=function(){var t=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();t.exports=r},function(t,n,e){"use strict";var r=e(12),o=r["__core-js_shared__"];t.exports=o},function(t,n,e){"use strict";function r(t){if(null!=t){try{return c.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var o=Function.prototype,c=o.toString;t.exports=r},function(t,n,e){"use strict";function r(t,n){return null==t?void 0:t[n]}t.exports=r},function(t,n,e){"use strict";function r(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}t.exports=r},function(t,n,e){"use strict";function r(t){var n=this.__data__;if(o){var e=n[t];return e===c?void 0:e}return u.call(n,t)?n[t]:void 0}var o=e(4),c="__lodash_hash_undefined__",i=Object.prototype,u=i.hasOwnProperty;t.exports=r},function(t,n,e){"use strict";function r(t){var n=this.__data__;return o?void 0!==n[t]:i.call(n,t)}var o=e(4),c=Object.prototype,i=c.hasOwnProperty;t.exports=r},function(t,n,e){"use strict";function r(t,n){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=o&&void 0===n?c:n,this}var o=e(4),c="__lodash_hash_undefined__";t.exports=r},function(t,n,e){"use strict";function r(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}var o=e(58),c=e(59),i=e(60),u=e(61),a=e(62);r.prototype.clear=o,r.prototype.delete=c,r.prototype.get=i,r.prototype.has=u,r.prototype.set=a,t.exports=r},function(t,n,e){"use strict";function r(){this.__data__=[],this.size=0}t.exports=r},function(t,n,e){"use strict";function r(t){var n=this.__data__,e=o(n,t);return!(e<0)&&(e==n.length-1?n.pop():i.call(n,e,1),--this.size,!0)}var o=e(5),c=Array.prototype,i=c.splice;t.exports=r},function(t,n,e){"use strict";function r(t){var n=this.__data__,e=o(n,t);return e<0?void 0:n[e][1]}var o=e(5);t.exports=r},function(t,n,e){"use strict";function r(t){return o(this.__data__,t)>-1}var o=e(5);t.exports=r},function(t,n,e){"use strict";function r(t,n){var e=this.__data__,r=o(e,t);return r<0?(++this.size,e.push([t,n])):e[r][1]=n,this}var o=e(5);t.exports=r},function(t,n,e){"use strict";var r=e(14),o=e(12),c=r(o,"Map");t.exports=c},function(t,n,e){"use strict";function r(t){var n=o(this,t).delete(t);return this.size-=n?1:0,n}var o=e(6);t.exports=r},function(t,n,e){"use strict";function r(t){var n=void 0===t?"undefined":o(t);return"string"==n||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=r},function(t,n,e){"use strict";function r(t){return o(this,t).get(t)}var o=e(6);t.exports=r},function(t,n,e){"use strict";function r(t){return o(this,t).has(t)}var o=e(6);t.exports=r},function(t,n,e){"use strict";function r(t,n){var e=o(this,t),r=e.size;return e.set(t,n),this.size+=e.size==r?0:1,this}var o=e(6);t.exports=r},function(t,n,e){"use strict";function r(t){return null==t?"":o(t)}var o=e(70);t.exports=r},function(t,n,e){"use strict";function r(t){if("string"==typeof t)return t;if(i(t))return c(t,r)+"";if(u(t))return f?f.call(t):"";var n=t+"";return"0"==n&&1/t==-a?"-0":n}var o=e(3),c=e(71),i=e(1),u=e(10),a=1/0,s=o?o.prototype:void 0,f=s?s.toString:void 0;t.exports=r},function(t,n,e){"use strict";function r(t,n){for(var e=-1,r=null==t?0:t.length,o=Array(r);++e<r;)o[e]=n(t[e],e,t);return o}t.exports=r},function(t,n,e){"use strict";function r(t,n,e,r){if(!u(t))return t;n=c(n,t);for(var s=-1,f=n.length,p=f-1,l=t;null!=l&&++s<f;){var d=a(n[s]),y=e;if(s!=p){var v=l[d];y=r?r(v,d,l):void 0,void 0===y&&(y=u(v)?v:i(n[s+1])?[]:{})}o(l,d,y),l=l[d]}return t}var o=e(73),c=e(2),i=e(20),u=e(15),a=e(16);t.exports=r},function(t,n,e){"use strict";function r(t,n,e){var r=t[n];u.call(t,n)&&c(r,e)&&(void 0!==e||n in t)||o(t,n,e)}var o=e(74),c=e(18),i=Object.prototype,u=i.hasOwnProperty;t.exports=r},function(t,n,e){"use strict";function r(t,n,e){"__proto__"==n&&o?o(t,n,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[n]=e}var o=e(19);t.exports=r},function(t,n,e){"use strict";function r(t,n){return null!=t&&c(t,n,o)}var o=e(76),c=e(77);t.exports=r},function(t,n,e){"use strict";function r(t,n){return null!=t&&n in Object(t)}t.exports=r},function(t,n,e){"use strict";function r(t,n,e){n=o(n,t);for(var r=-1,f=n.length,p=!1;++r<f;){var l=s(n[r]);if(!(p=null!=t&&e(t,l)))break;t=t[l]}return p||++r!=f?p:!!(f=null==t?0:t.length)&&a(f)&&u(l,f)&&(i(t)||c(t))}var o=e(2),c=e(21),i=e(1),u=e(20),a=e(79),s=e(16);t.exports=r},function(t,n,e){"use strict";function r(t){return c(t)&&o(t)==i}var o=e(11),c=e(13),i="[object Arguments]";t.exports=r},function(t,n,e){"use strict";function r(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=o}var o=9007199254740991;t.exports=r},function(t,n,e){"use strict";function r(t){return i(c(t,void 0,o),t+"")}var o=e(81),c=e(85),i=e(87);t.exports=r},function(t,n,e){"use strict";function r(t){return(null==t?0:t.length)?o(t,1):[]}var o=e(82);t.exports=r},function(t,n,e){"use strict";function r(t,n,e,i,u){var a=-1,s=t.length;for(e||(e=c),u||(u=[]);++a<s;){var f=t[a];n>0&&e(f)?n>1?r(f,n-1,e,i,u):o(u,f):i||(u[u.length]=f)}return u}var o=e(83),c=e(84);t.exports=r},function(t,n,e){"use strict";function r(t,n){for(var e=-1,r=n.length,o=t.length;++e<r;)t[o+e]=n[e];return t}t.exports=r},function(t,n,e){"use strict";function r(t){return i(t)||c(t)||!!(u&&t&&t[u])}var o=e(3),c=e(21),i=e(1),u=o?o.isConcatSpreadable:void 0;t.exports=r},function(t,n,e){"use strict";function r(t,n,e){return n=c(void 0===n?t.length-1:n,0),function(){for(var r=arguments,i=-1,u=c(r.length-n,0),a=Array(u);++i<u;)a[i]=r[n+i];i=-1;for(var s=Array(n+1);++i<n;)s[i]=r[i];return s[n]=e(a),o(t,this,s)}}var o=e(86),c=Math.max;t.exports=r},function(t,n,e){"use strict";function r(t,n,e){switch(e.length){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)}t.exports=r},function(t,n,e){"use strict";var r=e(88),o=e(91),c=o(r);t.exports=c},function(t,n,e){"use strict";var r=e(89),o=e(19),c=e(90),i=o?function(t,n){return o(t,"toString",{configurable:!0,enumerable:!1,value:r(n),writable:!0})}:c;t.exports=i},function(t,n,e){"use strict";function r(t){return function(){return t}}t.exports=r},function(t,n,e){"use strict";function r(t){return t}t.exports=r},function(t,n,e){"use strict";function r(t){var n=0,e=0;return function(){var r=i(),u=c-(r-e);if(e=r,u>0){if(++n>=o)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}var o=800,c=16,i=Date.now;t.exports=r}]);
1
+ !function(t){function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var e={};n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="",n(n.s=28)}([function(t,n){t.exports=jQuery},function(t,n,e){"use strict";var r=Array.isArray;t.exports=r},function(t,n,e){"use strict";function r(t,n){return o(t)?t:c(t,n)?[t]:i(u(t))}var o=e(1),c=e(35),i=e(40),u=e(69);t.exports=r},function(t,n,e){"use strict";var r=e(12),o=r.Symbol;t.exports=o},function(t,n,e){"use strict";var r=e(14),o=r(Object,"create");t.exports=o},function(t,n,e){"use strict";function r(t,n){for(var e=t.length;e--;)if(o(t[e][0],n))return e;return-1}var o=e(18);t.exports=r},function(t,n,e){"use strict";function r(t,n){var e=t.__data__;return o(n)?e["string"==typeof n?"string":"hash"]:e.map}var o=e(65);t.exports=r},,,,function(t,n,e){"use strict";function r(t){return"symbol"==(void 0===t?"undefined":o(t))||i(t)&&c(t)==u}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c=e(11),i=e(13),u="[object Symbol]";t.exports=r},function(t,n,e){"use strict";function r(t){return null==t?void 0===t?a:u:s&&s in Object(t)?c(t):i(t)}var o=e(3),c=e(38),i=e(39),u="[object Null]",a="[object Undefined]",s=o?o.toStringTag:void 0;t.exports=r},function(t,n,e){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=e(36),c="object"==("undefined"==typeof self?"undefined":r(self))&&self&&self.Object===Object&&self,i=o||c||Function("return this")();t.exports=i},function(t,n,e){"use strict";function r(t){return null!=t&&"object"==(void 0===t?"undefined":o(t))}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=r},function(t,n,e){"use strict";function r(t,n){var e=c(t,n);return o(e)?e:void 0}var o=e(47),c=e(52);t.exports=r},function(t,n,e){"use strict";function r(t){var n=void 0===t?"undefined":o(t);return null!=t&&("object"==n||"function"==n)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=r},function(t,n,e){"use strict";function r(t){if("string"==typeof t||o(t))return t;var n=t+"";return"0"==n&&1/t==-c?"-0":n}var o=e(10),c=1/0;t.exports=r},,function(t,n,e){"use strict";function r(t,n){return t===n||t!==t&&n!==n}t.exports=r},function(t,n,e){"use strict";var r=e(14),o=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},function(t,n,e){"use strict";function r(t,n){var e=void 0===t?"undefined":o(t);return!!(n=null==n?c:n)&&("number"==e||"symbol"!=e&&i.test(t))&&t>-1&&t%1==0&&t<n}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c=9007199254740991,i=/^(?:0|[1-9]\d*)$/;t.exports=r},function(t,n,e){"use strict";var r=e(78),o=e(13),c=Object.prototype,i=c.hasOwnProperty,u=c.propertyIsEnumerable,a=r(function(){return arguments}())?r:function(t){return o(t)&&i.call(t,"callee")&&!u.call(t,"callee")};t.exports=a},,,,,,,function(t,n,e){t.exports=e(29)},function(t,n,e){"use strict";(function(t){function n(t){return t&&t.__esModule?t:{default:t}}var r=e(30),o=n(r),c=e(31),i=n(c);t(document).ready(function(t){var n=(t(document.body),function(t){return aepc_extend_args(t)}),e=function(t,n){n?setTimeout(t,1e3*n):t()};aepc_pixel_events.standard_events&&t.each(aepc_pixel_events.standard_events,function(r,c){t.each(c,function(t,c){e(function(){c.params?(0,o.default)("track",r,n(c.params)):(0,o.default)("track",r)},c.delay)})}),void 0!==aepc_pixel_events.custom_events&&t.each(aepc_pixel_events.custom_events,function(r,c){t.each(c,function(t,c){e(function(){(0,o.default)("trackCustom",r,n(c.params))},c.delay)})}),void 0!==aepc_pixel_events.css_events&&t.each(aepc_pixel_events.css_events,function(e,r){t.each(r,function(r,c){t(e).on("click",function(){(0,o.default)(c.trackType,c.trackName,n(c.trackParams))})})}),void 0!==aepc_pixel_events.link_clicks&&t.each(aepc_pixel_events.link_clicks,function(e,r){t.each(r,function(r,c){t("a").filter(function(){var n=t(this).attr("href");if(void 0===n)return!1;if("contains"===r)return n.match(new RegExp(e.replace(/\*/g,"[^/]+").replace(/([./?])/gm,"\\$1")));if("exact"===r){var o=e+(e.match(/\/+$/)?"":"/");return o.match(/^http(s)?:\/\//)||(o="/"+o.replace(/^\/+/,""),o=window.location.protocol+"//"+window.location.host+o),n+=n.match(/\/+$/)?"":"/",n.match(/^http(s)?:\/\//)||(n="/"+n.replace(/^\/+/,""),n=window.location.protocol+"//"+window.location.host+n),o===n}return!1}).on("click",function(e){t.each(c,function(t,e){(0,o.default)(e.trackType,e.trackName,n(e.trackParams))})})})}),void 0!==aepc_pixel_events.js_events&&t.each(aepc_pixel_events.js_events,function(e,r){t.each(r,function(r,c){t(e).on(r,function(){t.each(c,function(t,e){(0,o.default)(e.trackType,e.trackName,n(e.trackParams))})})})}),t(".ajax_add_to_cart").on("click",function(e){if("no"===aepc_pixel.enable_addtocart)return e;var r=t(this),c=r.closest(".product, .wc-block-grid__product"),u=r.data("product_sku")?r.data("product_sku"):r.data("product_id"),a=c.find('input[name="quantity"]').length?c.find('input[name="quantity"]').val():1;(0,o.default)("track","AddToCart",n((0,i.default)({content_ids:[u],content_type:"product",content_name:c.find("h3, .woocommerce-loop-product__title, .wc-block-grid__product-title").text(),content_category:c.find("span[data-content_category]").data("content_category"),value:parseFloat(c.find("span.amount:last").clone().children().remove().end().text())*a,currency:woocommerce_params.currency},aepc_pixel.allowed_params.AddToCart)))}),t(".add_to_wishlist, .wl-add-to").on("click",function(e){if("no"===aepc_pixel.enable_wishlist)return e;var r=t(this),c=r.data("product-sku")?r.data("product-sku"):r.data("product-id");(0,o.default)("track","AddToWishlist",n(aepc_wc_add_to_cart[c]))}),t(".woocommerce div.product").on("click",".single_add_to_cart_button",function(e){if("yes"===aepc_pixel.enable_addtocart){var r=t(this).closest("form"),c=r.find('[name="add-to-cart"]'),i=r.find('[name="variation_id"]'),u=i.length?i.val():c.val(),a=aepc_wc_add_to_cart[u],s=r.find('input[name="quantity"]').length?r.find('input[name="quantity"]').val():1;a.hasOwnProperty("value")&&(a.value*=s),(0,o.default)("track","AddToCart",n(a))}}),t("body.woocommerce-page form.checkout").on("checkout_place_order",function(t){"yes"===aepc_pixel.enable_addpaymentinfo&&(0,o.default)("track","AddPaymentInfo",n(aepc_add_payment_info_params))}),t(".edd_download, .edd-download").on("click",".edd-add-to-cart",function(e){if("no"===aepc_pixel.enable_addtocart)return e;var r=t(this),c=r.closest("div.edd_download, article.type-download"),u=r.data("download-sku")?r.data("download-sku"):r.data("download-id"),a=c.find('meta[itemprop="priceCurrency"]').attr("content"),s=r.data("price");if("yes"===r.data("variable-price")){var f=t(".edd_price_options"),p=f.find('input[type="radio"]:checked'),l=p.closest("li");s=l.find('meta[itemprop="price"]').attr("content"),a=l.find('meta[itemprop="priceCurrency"]').attr("content")}(0,o.default)("track","AddToCart",n((0,i.default)({content_ids:[u],content_type:"product",content_name:c.find('[itemprop="name"]').first().text(),content_category:r.data("download-categories"),value:parseFloat(s),currency:a},aepc_pixel.allowed_params.AddToCart)))}),t(".edd-checkout").on("click",'form#edd_purchase_form input[type="submit"]',function(t){return"no"===aepc_pixel.enable_addpaymentinfo?t:((0,o.default)("track","AddPaymentInfo",n(aepc_add_payment_info_params)),!0)})})}).call(n,e(0))},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=function t(){for(var n=arguments.length,e=Array(n),r=0;r<n;r++)e[r]=arguments[r];if(window.fbq){var o;(o=window).fbq.apply(o,e)}else setTimeout(function(){return t.apply(void 0,e)},500)};n.default=r},function(t,n,e){"use strict";var r=e(32),o=e(80),c=o(function(t,n){return null==t?{}:r(t,n)});t.exports=c},function(t,n,e){"use strict";function r(t,n){return o(t,n,function(n,e){return c(t,e)})}var o=e(33),c=e(75);t.exports=r},function(t,n,e){"use strict";function r(t,n,e){for(var r=-1,u=n.length,a={};++r<u;){var s=n[r],f=o(t,s);e(f,s)&&c(a,i(s,t),f)}return a}var o=e(34),c=e(72),i=e(2);t.exports=r},function(t,n,e){"use strict";function r(t,n){n=o(n,t);for(var e=0,r=n.length;null!=t&&e<r;)t=t[c(n[e++])];return e&&e==r?t:void 0}var o=e(2),c=e(16);t.exports=r},function(t,n,e){"use strict";function r(t,n){if(c(t))return!1;var e=void 0===t?"undefined":o(t);return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=t&&!i(t))||(a.test(t)||!u.test(t)||null!=n&&t in Object(n))}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c=e(1),i=e(10),u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=r},function(t,n,e){"use strict";(function(n){var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r="object"==(void 0===n?"undefined":e(n))&&n&&n.Object===Object&&n;t.exports=r}).call(n,e(37))},function(t,n,e){"use strict";var r,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"===("undefined"==typeof window?"undefined":o(window))&&(r=window)}t.exports=r},function(t,n,e){"use strict";function r(t){var n=i.call(t,a),e=t[a];try{t[a]=void 0;var r=!0}catch(t){}var o=u.call(t);return r&&(n?t[a]=e:delete t[a]),o}var o=e(3),c=Object.prototype,i=c.hasOwnProperty,u=c.toString,a=o?o.toStringTag:void 0;t.exports=r},function(t,n,e){"use strict";function r(t){return c.call(t)}var o=Object.prototype,c=o.toString;t.exports=r},function(t,n,e){"use strict";var r=e(41),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,c=/\\(\\)?/g,i=r(function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(o,function(t,e,r,o){n.push(r?o.replace(c,"$1"):e||t)}),n});t.exports=i},function(t,n,e){"use strict";function r(t){var n=o(t,function(t){return e.size===c&&e.clear(),t}),e=n.cache;return n}var o=e(42),c=500;t.exports=r},function(t,n,e){"use strict";function r(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new TypeError(c);var e=function e(){var r=arguments,o=n?n.apply(this,r):r[0],c=e.cache;if(c.has(o))return c.get(o);var i=t.apply(this,r);return e.cache=c.set(o,i)||c,i};return e.cache=new(r.Cache||o),e}var o=e(43),c="Expected a function";r.Cache=o,t.exports=r},function(t,n,e){"use strict";function r(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}var o=e(44),c=e(64),i=e(66),u=e(67),a=e(68);r.prototype.clear=o,r.prototype.delete=c,r.prototype.get=i,r.prototype.has=u,r.prototype.set=a,t.exports=r},function(t,n,e){"use strict";function r(){this.size=0,this.__data__={hash:new o,map:new(i||c),string:new o}}var o=e(45),c=e(57),i=e(63);t.exports=r},function(t,n,e){"use strict";function r(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}var o=e(46),c=e(53),i=e(54),u=e(55),a=e(56);r.prototype.clear=o,r.prototype.delete=c,r.prototype.get=i,r.prototype.has=u,r.prototype.set=a,t.exports=r},function(t,n,e){"use strict";function r(){this.__data__=o?o(null):{},this.size=0}var o=e(4);t.exports=r},function(t,n,e){"use strict";function r(t){return!(!i(t)||c(t))&&(o(t)?y:s).test(u(t))}var o=e(48),c=e(49),i=e(15),u=e(51),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,f=Function.prototype,p=Object.prototype,l=f.toString,d=p.hasOwnProperty,y=RegExp("^"+l.call(d).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=r},function(t,n,e){"use strict";function r(t){if(!c(t))return!1;var n=o(t);return n==u||n==a||n==i||n==s}var o=e(11),c=e(15),i="[object AsyncFunction]",u="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";t.exports=r},function(t,n,e){"use strict";function r(t){return!!c&&c in t}var o=e(50),c=function(){var t=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();t.exports=r},function(t,n,e){"use strict";var r=e(12),o=r["__core-js_shared__"];t.exports=o},function(t,n,e){"use strict";function r(t){if(null!=t){try{return c.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var o=Function.prototype,c=o.toString;t.exports=r},function(t,n,e){"use strict";function r(t,n){return null==t?void 0:t[n]}t.exports=r},function(t,n,e){"use strict";function r(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}t.exports=r},function(t,n,e){"use strict";function r(t){var n=this.__data__;if(o){var e=n[t];return e===c?void 0:e}return u.call(n,t)?n[t]:void 0}var o=e(4),c="__lodash_hash_undefined__",i=Object.prototype,u=i.hasOwnProperty;t.exports=r},function(t,n,e){"use strict";function r(t){var n=this.__data__;return o?void 0!==n[t]:i.call(n,t)}var o=e(4),c=Object.prototype,i=c.hasOwnProperty;t.exports=r},function(t,n,e){"use strict";function r(t,n){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=o&&void 0===n?c:n,this}var o=e(4),c="__lodash_hash_undefined__";t.exports=r},function(t,n,e){"use strict";function r(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}var o=e(58),c=e(59),i=e(60),u=e(61),a=e(62);r.prototype.clear=o,r.prototype.delete=c,r.prototype.get=i,r.prototype.has=u,r.prototype.set=a,t.exports=r},function(t,n,e){"use strict";function r(){this.__data__=[],this.size=0}t.exports=r},function(t,n,e){"use strict";function r(t){var n=this.__data__,e=o(n,t);return!(e<0)&&(e==n.length-1?n.pop():i.call(n,e,1),--this.size,!0)}var o=e(5),c=Array.prototype,i=c.splice;t.exports=r},function(t,n,e){"use strict";function r(t){var n=this.__data__,e=o(n,t);return e<0?void 0:n[e][1]}var o=e(5);t.exports=r},function(t,n,e){"use strict";function r(t){return o(this.__data__,t)>-1}var o=e(5);t.exports=r},function(t,n,e){"use strict";function r(t,n){var e=this.__data__,r=o(e,t);return r<0?(++this.size,e.push([t,n])):e[r][1]=n,this}var o=e(5);t.exports=r},function(t,n,e){"use strict";var r=e(14),o=e(12),c=r(o,"Map");t.exports=c},function(t,n,e){"use strict";function r(t){var n=o(this,t).delete(t);return this.size-=n?1:0,n}var o=e(6);t.exports=r},function(t,n,e){"use strict";function r(t){var n=void 0===t?"undefined":o(t);return"string"==n||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=r},function(t,n,e){"use strict";function r(t){return o(this,t).get(t)}var o=e(6);t.exports=r},function(t,n,e){"use strict";function r(t){return o(this,t).has(t)}var o=e(6);t.exports=r},function(t,n,e){"use strict";function r(t,n){var e=o(this,t),r=e.size;return e.set(t,n),this.size+=e.size==r?0:1,this}var o=e(6);t.exports=r},function(t,n,e){"use strict";function r(t){return null==t?"":o(t)}var o=e(70);t.exports=r},function(t,n,e){"use strict";function r(t){if("string"==typeof t)return t;if(i(t))return c(t,r)+"";if(u(t))return f?f.call(t):"";var n=t+"";return"0"==n&&1/t==-a?"-0":n}var o=e(3),c=e(71),i=e(1),u=e(10),a=1/0,s=o?o.prototype:void 0,f=s?s.toString:void 0;t.exports=r},function(t,n,e){"use strict";function r(t,n){for(var e=-1,r=null==t?0:t.length,o=Array(r);++e<r;)o[e]=n(t[e],e,t);return o}t.exports=r},function(t,n,e){"use strict";function r(t,n,e,r){if(!u(t))return t;n=c(n,t);for(var s=-1,f=n.length,p=f-1,l=t;null!=l&&++s<f;){var d=a(n[s]),y=e;if(s!=p){var v=l[d];y=r?r(v,d,l):void 0,void 0===y&&(y=u(v)?v:i(n[s+1])?[]:{})}o(l,d,y),l=l[d]}return t}var o=e(73),c=e(2),i=e(20),u=e(15),a=e(16);t.exports=r},function(t,n,e){"use strict";function r(t,n,e){var r=t[n];u.call(t,n)&&c(r,e)&&(void 0!==e||n in t)||o(t,n,e)}var o=e(74),c=e(18),i=Object.prototype,u=i.hasOwnProperty;t.exports=r},function(t,n,e){"use strict";function r(t,n,e){"__proto__"==n&&o?o(t,n,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[n]=e}var o=e(19);t.exports=r},function(t,n,e){"use strict";function r(t,n){return null!=t&&c(t,n,o)}var o=e(76),c=e(77);t.exports=r},function(t,n,e){"use strict";function r(t,n){return null!=t&&n in Object(t)}t.exports=r},function(t,n,e){"use strict";function r(t,n,e){n=o(n,t);for(var r=-1,f=n.length,p=!1;++r<f;){var l=s(n[r]);if(!(p=null!=t&&e(t,l)))break;t=t[l]}return p||++r!=f?p:!!(f=null==t?0:t.length)&&a(f)&&u(l,f)&&(i(t)||c(t))}var o=e(2),c=e(21),i=e(1),u=e(20),a=e(79),s=e(16);t.exports=r},function(t,n,e){"use strict";function r(t){return c(t)&&o(t)==i}var o=e(11),c=e(13),i="[object Arguments]";t.exports=r},function(t,n,e){"use strict";function r(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=o}var o=9007199254740991;t.exports=r},function(t,n,e){"use strict";function r(t){return i(c(t,void 0,o),t+"")}var o=e(81),c=e(85),i=e(87);t.exports=r},function(t,n,e){"use strict";function r(t){return(null==t?0:t.length)?o(t,1):[]}var o=e(82);t.exports=r},function(t,n,e){"use strict";function r(t,n,e,i,u){var a=-1,s=t.length;for(e||(e=c),u||(u=[]);++a<s;){var f=t[a];n>0&&e(f)?n>1?r(f,n-1,e,i,u):o(u,f):i||(u[u.length]=f)}return u}var o=e(83),c=e(84);t.exports=r},function(t,n,e){"use strict";function r(t,n){for(var e=-1,r=n.length,o=t.length;++e<r;)t[o+e]=n[e];return t}t.exports=r},function(t,n,e){"use strict";function r(t){return i(t)||c(t)||!!(u&&t&&t[u])}var o=e(3),c=e(21),i=e(1),u=o?o.isConcatSpreadable:void 0;t.exports=r},function(t,n,e){"use strict";function r(t,n,e){return n=c(void 0===n?t.length-1:n,0),function(){for(var r=arguments,i=-1,u=c(r.length-n,0),a=Array(u);++i<u;)a[i]=r[n+i];i=-1;for(var s=Array(n+1);++i<n;)s[i]=r[i];return s[n]=e(a),o(t,this,s)}}var o=e(86),c=Math.max;t.exports=r},function(t,n,e){"use strict";function r(t,n,e){switch(e.length){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)}t.exports=r},function(t,n,e){"use strict";var r=e(88),o=e(91),c=o(r);t.exports=c},function(t,n,e){"use strict";var r=e(89),o=e(19),c=e(90),i=o?function(t,n){return o(t,"toString",{configurable:!0,enumerable:!1,value:r(n),writable:!0})}:c;t.exports=i},function(t,n,e){"use strict";function r(t){return function(){return t}}t.exports=r},function(t,n,e){"use strict";function r(t){return t}t.exports=r},function(t,n,e){"use strict";function r(t){var n=0,e=0;return function(){var r=i(),u=c-(r-e);if(e=r,u>0){if(++n>=o)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}var o=800,c=16,i=Date.now;t.exports=r}]);
includes/class-aepc-pixel-scripts.php CHANGED
@@ -129,8 +129,8 @@ class AEPC_Pixel_Scripts {
129
  document,'script','https://connect.facebook.net/en_US/fbevents.js');
130
  <?php endif; ?>
131
 
132
- var aepc_pixel = <?php echo wp_json_encode( self::pixel_init_arguments() ) ?>,
133
- aepc_pixel_args = <?php echo wp_json_encode( self::pixel_advanced_parameters() ) ?>,
134
  aepc_extend_args = function( args ) {
135
  if ( typeof args === 'undefined' ) {
136
  args = {};
@@ -144,7 +144,6 @@ class AEPC_Pixel_Scripts {
144
 
145
  // Extend args
146
  if ( 'yes' === aepc_pixel.enable_advanced_events ) {
147
- aepc_pixel_args.userAgent = navigator.userAgent;
148
  aepc_pixel_args.language = navigator.language;
149
 
150
  if ( document.referrer.indexOf( document.domain ) < 0 ) {
@@ -153,7 +152,7 @@ class AEPC_Pixel_Scripts {
153
  }
154
 
155
  <?php if ( AEPC_Track::can_init_pixel() ) : ?>
156
- fbq('init', aepc_pixel.pixel_id, aepc_pixel.user);
157
 
158
  <?php /* Trigger the event when delay is passed and where there are all fbq calls that need to wait */ ?>
159
  setTimeout( function() {
129
  document,'script','https://connect.facebook.net/en_US/fbevents.js');
130
  <?php endif; ?>
131
 
132
+ var aepc_pixel = <?php echo wp_json_encode( self::pixel_init_arguments(), JSON_FORCE_OBJECT ) ?>,
133
+ aepc_pixel_args = <?php echo wp_json_encode( self::pixel_advanced_parameters(), JSON_FORCE_OBJECT ) ?>,
134
  aepc_extend_args = function( args ) {
135
  if ( typeof args === 'undefined' ) {
136
  args = {};
144
 
145
  // Extend args
146
  if ( 'yes' === aepc_pixel.enable_advanced_events ) {
 
147
  aepc_pixel_args.language = navigator.language;
148
 
149
  if ( document.referrer.indexOf( document.domain ) < 0 ) {
152
  }
153
 
154
  <?php if ( AEPC_Track::can_init_pixel() ) : ?>
155
+ fbq('init', '<?php echo PixelCaffeine()->get_pixel_id() ?>', aepc_pixel.user);
156
 
157
  <?php /* Trigger the event when delay is passed and where there are all fbq calls that need to wait */ ?>
158
  setTimeout( function() {
includes/product-catalogs/class-feed-mapper.php CHANGED
@@ -195,7 +195,7 @@ class FeedMapper {
195
  * @return array
196
  */
197
  public function get_additional_image_urls() {
198
- return implode( ', ', array_slice( $this->item->get_additional_image_urls(), 0, 10 ) );
199
  }
200
 
201
  /**
195
  * @return array
196
  */
197
  public function get_additional_image_urls() {
198
+ return array_slice( $this->item->get_additional_image_urls(), 0, 10 );
199
  }
200
 
201
  /**
includes/product-catalogs/cron/class-refresh-feed.php CHANGED
@@ -68,6 +68,10 @@ class RefreshFeed extends Job {
68
  $service = \AEPC_Admin::$product_catalogs_service;
69
  $product_catalog = $service->get_product_catalog( $product_catalog_id );
70
 
 
 
 
 
71
  // Firstly delete
72
  try {
73
  $service->generate_feed( $product_catalog, FeedSaver::REFRESH_CONTEXT );
68
  $service = \AEPC_Admin::$product_catalogs_service;
69
  $product_catalog = $service->get_product_catalog( $product_catalog_id );
70
 
71
+ // Fix plugin compatibilities
72
+ add_filter('option_siteground_optimizer_lazyload_images', '__return_false');
73
+ add_filter('site_option_siteground_optimizer_lazyload_images', '__return_false');
74
+
75
  // Firstly delete
76
  try {
77
  $service->generate_feed( $product_catalog, FeedSaver::REFRESH_CONTEXT );
includes/product-catalogs/feed/class-xml-writer.php CHANGED
@@ -191,14 +191,20 @@ class XMLWriter implements WriterInterface {
191
  'g:short_description',
192
  ) );
193
 
194
- foreach ( $fields as $key => $value ) {
195
- $param = $entry->appendChild( $this->feedDOM->createElement( $key ) );
196
- $value = $this->sanitizeXML($value);
197
-
198
- if ( in_array( $key, $cdata_fields ) ) {
199
- $param->appendChild( $this->feedDOM->createCDATASection( $value ) );
200
- } else {
201
- $param->appendChild( $this->feedDOM->createTextNode( $value ) );
 
 
 
 
 
 
202
  }
203
  }
204
 
191
  'g:short_description',
192
  ) );
193
 
194
+ foreach ( $fields as $key => $values ) {
195
+ if (!is_array($values)) {
196
+ $values = [$values];
197
+ }
198
+
199
+ foreach ($values as $value) {
200
+ $param = $entry->appendChild( $this->feedDOM->createElement( $key ) );
201
+ $value = $this->sanitizeXML($value);
202
+
203
+ if ( in_array( $key, $cdata_fields ) ) {
204
+ $param->appendChild( $this->feedDOM->createCDATASection( $value ) );
205
+ } else {
206
+ $param->appendChild( $this->feedDOM->createTextNode( $value ) );
207
+ }
208
  }
209
  }
210
 
includes/supports/class-aepc-edd-addon-support.php CHANGED
@@ -551,10 +551,6 @@ class AEPC_Edd_Addon_Support extends AEPC_Addon_Factory implements ECommerceAddO
551
  protected function query_items( $filter, ProductCatalogManager $product_catalog, Metaboxes $metaboxes ) {
552
  $products_query = $this->query_items_args( $filter, $product_catalog );
553
 
554
- // Fix plugin compatibilities
555
- add_filter('option_siteground_optimizer_optimize_images', '__return_true');
556
- add_filter('site_option_siteground_optimizer_optimize_images', '__return_true');
557
-
558
  // Map WC objects
559
  $products = new WP_Query( $products_query );
560
  $products = array_map( array( $this, 'get_download_instance' ), $products->posts );
551
  protected function query_items( $filter, ProductCatalogManager $product_catalog, Metaboxes $metaboxes ) {
552
  $products_query = $this->query_items_args( $filter, $product_catalog );
553
 
 
 
 
 
554
  // Map WC objects
555
  $products = new WP_Query( $products_query );
556
  $products = array_map( array( $this, 'get_download_instance' ), $products->posts );
includes/supports/class-aepc-woocommerce-addon-support.php CHANGED
@@ -81,6 +81,7 @@ class AEPC_Woocommerce_Addon_Support extends AEPC_Addon_Factory implements EComm
81
  add_filter( 'woocommerce_get_script_data', array( $this, 'add_currency_param' ), 10, 2 );
82
  }
83
  add_action( 'woocommerce_after_shop_loop_item', array( $this, 'add_content_category_meta' ), 99 );
 
84
  add_action( 'woocommerce_registration_redirect', array( $this, 'save_registration_data' ), 5 );
85
  add_action( 'wp_footer', array( $this, 'register_add_to_cart_params' ), 10 );
86
  add_action( 'wp_footer', array( $this, 'register_add_payment_info_params' ), 10 );
@@ -135,7 +136,14 @@ class AEPC_Woocommerce_Addon_Support extends AEPC_Addon_Factory implements EComm
135
  }
136
 
137
  global $wp;
138
- $order_id = ! empty( $wp->query_vars['order-received'] ) ? intval( $wp->query_vars['order-received'] ) : intval( $_GET['order-received'] );
 
 
 
 
 
 
 
139
 
140
  return ( $order = wc_get_order( $order_id ) ) && ! $order->get_meta( self::ALREADY_TRACKED_POSTMETA );
141
  }
@@ -172,14 +180,20 @@ class AEPC_Woocommerce_Addon_Support extends AEPC_Addon_Factory implements EComm
172
  */
173
  public function register_user_id( $order_id, $posted_data, $order ) {
174
  $user_id = $this->get_session_user_id();
175
- $order->add_meta_data(self::SESSION_USER_ID_POSTMETA, $user_id);
176
- $order->save_meta_data();
 
 
177
  }
178
 
179
  /**
180
  * @return string
181
  */
182
  protected function get_session_user_id() {
 
 
 
 
183
  if ( ! $user_id = WC()->session->get('aepc_user_id') ) {
184
  require_once ABSPATH . 'wp-includes/class-phpass.php';
185
  $hasher = new PasswordHash( 8, false );
@@ -448,7 +462,34 @@ class AEPC_Woocommerce_Addon_Support extends AEPC_Addon_Factory implements EComm
448
  }
449
 
450
  $product_id = $this->get_product_id( $product );
451
- ?><span data-content_category="<?php echo esc_attr( wp_json_encode( AEPC_Pixel_Scripts::content_category_list( $product_id ) ) ) ?>" style="display:none;"></span><?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
452
  }
453
 
454
  /**
@@ -529,8 +570,8 @@ class AEPC_Woocommerce_Addon_Support extends AEPC_Addon_Factory implements EComm
529
  *
530
  * @return string
531
  */
532
- protected function get_queue_transient_name($user_id = null) {
533
- return sprintf(self::PURCHASE_QUEUE_TRANSIENT, $user_id ?: $this->get_session_user_id());
534
  }
535
 
536
  /**
@@ -539,6 +580,12 @@ class AEPC_Woocommerce_Addon_Support extends AEPC_Addon_Factory implements EComm
539
  * @return array
540
  */
541
  protected function get_purchase_queue($user_id = null) {
 
 
 
 
 
 
542
  $queue = get_transient($this->get_queue_transient_name($user_id)) ?: [];
543
  return array_filter($queue, function($order_id){
544
  $order = wc_get_order($order_id);
@@ -551,6 +598,12 @@ class AEPC_Woocommerce_Addon_Support extends AEPC_Addon_Factory implements EComm
551
  * @param null $user_id
552
  */
553
  protected function save_purchase_queue($queue, $user_id = null) {
 
 
 
 
 
 
554
  $key = $this->get_queue_transient_name($user_id);
555
 
556
  if (!empty($queue)) {
@@ -756,12 +809,12 @@ class AEPC_Woocommerce_Addon_Support extends AEPC_Addon_Factory implements EComm
756
  global $wpdb;
757
 
758
  $variables = $wpdb->prepare("
759
- SELECT ID
760
  FROM {$wpdb->posts} p
761
- INNER JOIN {$wpdb->term_relationships} tr ON tr.object_id = p.ID
762
- INNER JOIN {$wpdb->term_taxonomy} tt USING(term_taxonomy_id)
763
- INNER JOIN {$wpdb->terms} t USING(term_id)
764
- WHERE p.post_type = %s
765
  AND p.post_status = %s
766
  AND tt.taxonomy = %s
767
  AND t.slug = %s
@@ -869,10 +922,6 @@ AND t.slug = %s
869
  add_action( 'pre_get_posts', array( $this, 'customize_wp_query' ) );
870
  add_filter( 'posts_where_request', array( $this, 'ensure_not_orphaned_variations' ), 10, 2 );
871
 
872
- // Fix plugin compatibilities
873
- add_filter('option_siteground_optimizer_optimize_images', '__return_true');
874
- add_filter('site_option_siteground_optimizer_optimize_images', '__return_true');
875
-
876
  // Map WC objects
877
  $products = wc_get_products( $products_query );
878
 
81
  add_filter( 'woocommerce_get_script_data', array( $this, 'add_currency_param' ), 10, 2 );
82
  }
83
  add_action( 'woocommerce_after_shop_loop_item', array( $this, 'add_content_category_meta' ), 99 );
84
+ add_filter( 'woocommerce_blocks_product_grid_item_html', array( $this, 'add_content_category_meta_in_block_grid' ), 99, 3 );
85
  add_action( 'woocommerce_registration_redirect', array( $this, 'save_registration_data' ), 5 );
86
  add_action( 'wp_footer', array( $this, 'register_add_to_cart_params' ), 10 );
87
  add_action( 'wp_footer', array( $this, 'register_add_payment_info_params' ), 10 );
136
  }
137
 
138
  global $wp;
139
+
140
+ if ( ! empty( $wp->query_vars['order-received'] )) {
141
+ $order_id = intval( $wp->query_vars['order-received'] );
142
+ } elseif ( ! empty( $_GET['order-received'] )) {
143
+ $order_id = intval( $_GET['order-received'] );
144
+ } else {
145
+ return false;
146
+ }
147
 
148
  return ( $order = wc_get_order( $order_id ) ) && ! $order->get_meta( self::ALREADY_TRACKED_POSTMETA );
149
  }
180
  */
181
  public function register_user_id( $order_id, $posted_data, $order ) {
182
  $user_id = $this->get_session_user_id();
183
+ if ($user_id) {
184
+ $order->add_meta_data(self::SESSION_USER_ID_POSTMETA, $user_id);
185
+ $order->save_meta_data();
186
+ }
187
  }
188
 
189
  /**
190
  * @return string
191
  */
192
  protected function get_session_user_id() {
193
+ if (empty(WC()->session)) {
194
+ return null;
195
+ }
196
+
197
  if ( ! $user_id = WC()->session->get('aepc_user_id') ) {
198
  require_once ABSPATH . 'wp-includes/class-phpass.php';
199
  $hasher = new PasswordHash( 8, false );
462
  }
463
 
464
  $product_id = $this->get_product_id( $product );
465
+ echo $this->get_category_content($product_id);
466
+ }
467
+
468
+ /**
469
+ * @param string $li
470
+ * @param object $data
471
+ * @param WC_Product $product
472
+ *
473
+ * @return string|string[]
474
+ */
475
+ public function add_content_category_meta_in_block_grid($li, $data, $product) {
476
+ return str_replace(
477
+ $data->button,
478
+ $data->button . $this->get_category_content($product->get_id()),
479
+ $li
480
+ );
481
+ }
482
+
483
+ /**
484
+ * @param $product_id
485
+ *
486
+ * @return string
487
+ */
488
+ protected function get_category_content($product_id) {
489
+ return sprintf(
490
+ '<span data-content_category="%s" style="display:none;"></span>',
491
+ esc_attr( wp_json_encode( AEPC_Pixel_Scripts::content_category_list( $product_id ) ) )
492
+ );
493
  }
494
 
495
  /**
570
  *
571
  * @return string
572
  */
573
+ protected function get_queue_transient_name($user_id) {
574
+ return sprintf(self::PURCHASE_QUEUE_TRANSIENT, $user_id);
575
  }
576
 
577
  /**
580
  * @return array
581
  */
582
  protected function get_purchase_queue($user_id = null) {
583
+ $user_id = $user_id ?: $this->get_session_user_id();
584
+
585
+ if (empty($user_id)) {
586
+ return [];
587
+ }
588
+
589
  $queue = get_transient($this->get_queue_transient_name($user_id)) ?: [];
590
  return array_filter($queue, function($order_id){
591
  $order = wc_get_order($order_id);
598
  * @param null $user_id
599
  */
600
  protected function save_purchase_queue($queue, $user_id = null) {
601
+ $user_id = $user_id ?: $this->get_session_user_id();
602
+
603
+ if (empty($user_id)) {
604
+ return;
605
+ }
606
+
607
  $key = $this->get_queue_transient_name($user_id);
608
 
609
  if (!empty($queue)) {
809
  global $wpdb;
810
 
811
  $variables = $wpdb->prepare("
812
+ SELECT ID
813
  FROM {$wpdb->posts} p
814
+ INNER JOIN {$wpdb->term_relationships} tr ON tr.object_id = p.ID
815
+ INNER JOIN {$wpdb->term_taxonomy} tt USING(term_taxonomy_id)
816
+ INNER JOIN {$wpdb->terms} t USING(term_id)
817
+ WHERE p.post_type = %s
818
  AND p.post_status = %s
819
  AND tt.taxonomy = %s
820
  AND t.slug = %s
922
  add_action( 'pre_get_posts', array( $this, 'customize_wp_query' ) );
923
  add_filter( 'posts_where_request', array( $this, 'ensure_not_orphaned_variations' ), 10, 2 );
924
 
 
 
 
 
925
  // Map WC objects
926
  $products = wc_get_products( $products_query );
927
 
pixel-caffeine.php CHANGED
@@ -7,9 +7,9 @@
7
  * Author URI: https://adespresso.com/
8
  * Text Domain: pixel-caffeine
9
  * Domain Path: /languages
10
- * Version: 2.1.1
11
  * WC requires at least: 3.0.0
12
- * WC tested up to: 3.8
13
  *
14
  * @package PixelCaffeine
15
  */
@@ -24,12 +24,12 @@ if ( ! class_exists( 'PixelCaffeine' ) ) :
24
  * Main PixelCaffeine Class.
25
  *
26
  * @class PixelCaffeine
27
- * @version 2.1.1
28
  */
29
  final class PixelCaffeine {
30
 
31
  /** @var string PixelCaffeine version. */
32
- public $version = '2.1.1';
33
 
34
  /** @var PixelCaffeine The single instance of the class. */
35
  protected static $_instance = null;
7
  * Author URI: https://adespresso.com/
8
  * Text Domain: pixel-caffeine
9
  * Domain Path: /languages
10
+ * Version: 2.1.2
11
  * WC requires at least: 3.0.0
12
+ * WC tested up to: 4.0.1
13
  *
14
  * @package PixelCaffeine
15
  */
24
  * Main PixelCaffeine Class.
25
  *
26
  * @class PixelCaffeine
27
+ * @version 2.1.2
28
  */
29
  final class PixelCaffeine {
30
 
31
  /** @var string PixelCaffeine version. */
32
+ public $version = '2.1.2';
33
 
34
  /** @var PixelCaffeine The single instance of the class. */
35
  protected static $_instance = null;
readme.txt CHANGED
@@ -4,8 +4,8 @@ Donate link: https://adespresso.com/
4
  Tags: facebook, facebook pixel, facebook ad, facebook insertions, custom audiences, dynamic events, woocommerce
5
  Requires at least: 4.4
6
  Requires PHP: 5.6
7
- Tested up to: 5.3
8
- Stable tag: 2.1.1
9
  License: GPLv3
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
11
 
@@ -124,6 +124,15 @@ Unfortunately there isn’t any way at the moment to import custom audiences _fr
124
 
125
  == Changelog ==
126
 
 
 
 
 
 
 
 
 
 
127
  = 2.1.1 - 2019-11-18 =
128
  * Fix - Fatal error: Uncaught TypeError: Argument 1 passed to AEPC_Woocommerce_Addon_Support::get_product_id() must be an instance of WC_Product
129
  * Fix - fbq function not found when the option “Do not add the Pixel init snippet” is enabled
4
  Tags: facebook, facebook pixel, facebook ad, facebook insertions, custom audiences, dynamic events, woocommerce
5
  Requires at least: 4.4
6
  Requires PHP: 5.6
7
+ Tested up to: 5.4
8
+ Stable tag: 2.1.2
9
  License: GPLv3
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
11
 
124
 
125
  == Changelog ==
126
 
127
+ = 2.1.2 - 2020-04-15 =
128
+ * Enhancement - Change additional_image_link format when multiple URLs, from single field and separated by comma, to multiple additional_image_link fields
129
+ * Enhancement - Make ajax AddToCart working in the new WooCommerce blocks
130
+ * Fix - Notice: Undefined index: order-received in ../pixel-caffeine/includes/supports/class-aepc-woocommerce-addon-support.php on line 138
131
+ * Fix - Remove userAgent argument from pixel events, causing business privacy violation and not used anymore
132
+ * Fix - Fatal error when WooCommerce Subscription process the automatic orders
133
+ * Fix - Console error: [Facebook Pixel] - Call to "fbq('init', 'xxxxxxx', []);" with parameter "user_data" has an invalid value of "[]"
134
+ * Support - WP Rocket: give ability to host Facebook Pixels locally on your server to help satisfy the PageSpeed recommendation for Leverage browser caching
135
+
136
  = 2.1.1 - 2019-11-18 =
137
  * Fix - Fatal error: Uncaught TypeError: Argument 1 passed to AEPC_Woocommerce_Addon_Support::get_product_id() must be an instance of WC_Product
138
  * Fix - fbq function not found when the option “Do not add the Pixel init snippet” is enabled
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInitccd164d9499246b20b5adbaad3c0c804::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit3394ddee9ab5867f586acb707b9e9f0a::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInitccd164d9499246b20b5adbaad3c0c804
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInitccd164d9499246b20b5adbaad3c0c804
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInitccd164d9499246b20b5adbaad3c0c804', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInitccd164d9499246b20b5adbaad3c0c804', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInitccd164d9499246b20b5adbaad3c0c804::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
@@ -48,19 +48,19 @@ class ComposerAutoloaderInitccd164d9499246b20b5adbaad3c0c804
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
- $includeFiles = Composer\Autoload\ComposerStaticInitccd164d9499246b20b5adbaad3c0c804::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
- composerRequireccd164d9499246b20b5adbaad3c0c804($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
- function composerRequireccd164d9499246b20b5adbaad3c0c804($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit3394ddee9ab5867f586acb707b9e9f0a
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit3394ddee9ab5867f586acb707b9e9f0a', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit3394ddee9ab5867f586acb707b9e9f0a', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
+ call_user_func(\Composer\Autoload\ComposerStaticInit3394ddee9ab5867f586acb707b9e9f0a::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
+ $includeFiles = Composer\Autoload\ComposerStaticInit3394ddee9ab5867f586acb707b9e9f0a::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
+ composerRequire3394ddee9ab5867f586acb707b9e9f0a($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
+ function composerRequire3394ddee9ab5867f586acb707b9e9f0a($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInitccd164d9499246b20b5adbaad3c0c804
8
  {
9
  public static $files = array (
10
  '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
@@ -113,9 +113,9 @@ class ComposerStaticInitccd164d9499246b20b5adbaad3c0c804
113
  public static function getInitializer(ClassLoader $loader)
114
  {
115
  return \Closure::bind(function () use ($loader) {
116
- $loader->prefixLengthsPsr4 = ComposerStaticInitccd164d9499246b20b5adbaad3c0c804::$prefixLengthsPsr4;
117
- $loader->prefixDirsPsr4 = ComposerStaticInitccd164d9499246b20b5adbaad3c0c804::$prefixDirsPsr4;
118
- $loader->classMap = ComposerStaticInitccd164d9499246b20b5adbaad3c0c804::$classMap;
119
 
120
  }, null, ClassLoader::class);
121
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit3394ddee9ab5867f586acb707b9e9f0a
8
  {
9
  public static $files = array (
10
  '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
113
  public static function getInitializer(ClassLoader $loader)
114
  {
115
  return \Closure::bind(function () use ($loader) {
116
+ $loader->prefixLengthsPsr4 = ComposerStaticInit3394ddee9ab5867f586acb707b9e9f0a::$prefixLengthsPsr4;
117
+ $loader->prefixDirsPsr4 = ComposerStaticInit3394ddee9ab5867f586acb707b9e9f0a::$prefixDirsPsr4;
118
+ $loader->classMap = ComposerStaticInit3394ddee9ab5867f586acb707b9e9f0a::$classMap;
119
 
120
  }, null, ClassLoader::class);
121
  }