Pixel Caffeine - Version 2.1.4

Version Description

  • 2020-09-29 =
  • WARNING - By November 2nd, it will be mandatory to enable the Two-Factor Authentication in your Facebook account in order to connect to Facebook APIs. Please, be sure to enable the TFA in your account in order to continue to use the Pixel Caffeine features.
  • Add - Option to adjust the number of the chunk for the background saving (useful when the server can't complete the feed generation because of lower power)
  • Enhancement - Avoid to trigger undefined variables when the pixel scripts are delayed through the WP Rocket feature for performance
  • Enhancement - Delete all Pixel IDs info after the connection reset
  • Fix - Fatal error on 404 page with the error "Uncaught Error: Call to a member function get() on null" (thanks @bheadrick)
  • Fix - Security fixes
  • Fix - Missing Pixel IDs after selecting an Ad Account inside a Business Account
  • Fix - Fix value parameter in AddToCart event in the latest version of WooCoommerce
  • Fix - Missing parameters into the AddToCart event
  • Fix - Generic carousels stopped to work because of added category meta into the product element of WooCommerce
  • Fix - Fix feed checkout_url parameter for variable products whose point to the cart instead of product page
Download this release

Release Info

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

Code changes from version 2.1.3 to 2.1.4

Files changed (46) hide show
  1. build/admin.js +1 -1
  2. build/frontend.js +1 -1
  3. includes/admin/assets/js/admin.js +15 -0
  4. includes/admin/assets/js/chart.js +1 -0
  5. includes/admin/assets/js/common.js +9 -0
  6. includes/admin/class-aepc-admin-ajax.php +19 -16
  7. includes/admin/class-aepc-admin-install.php +9 -5
  8. includes/admin/class-aepc-admin-view.php +27 -11
  9. includes/admin/class-aepc-admin.php +34 -2
  10. includes/admin/class-aepc-facebook-adapter.php +24 -28
  11. includes/admin/templates/conversions.php +2 -2
  12. includes/admin/templates/custom-audiences.php +1 -1
  13. includes/admin/templates/dashboard.php +3 -3
  14. includes/admin/templates/general-settings.php +4 -4
  15. includes/admin/templates/parts/advanced-settings.php +20 -20
  16. includes/admin/templates/parts/fb-connect-logged-out.php +7 -0
  17. includes/admin/templates/parts/forms/custom-audience.php +13 -13
  18. includes/admin/templates/parts/forms/product-catalog.php +19 -0
  19. includes/admin/templates/parts/forms/sub/schedule.php +7 -7
  20. includes/admin/templates/parts/nav-tabs.php +1 -1
  21. includes/admin/templates/parts/panels/set-facebook-pixel.php +1 -1
  22. includes/admin/templates/parts/tables/ca-list.php +1 -1
  23. includes/admin/templates/parts/welcomes/2.0.php +1 -1
  24. includes/admin/templates/parts/widgets/banner.php +2 -2
  25. includes/admin/templates/parts/widgets/news.php +2 -2
  26. includes/class-aepc-pixel-scripts.php +23 -17
  27. includes/product-catalogs/class-configuration-defaults.php +1 -1
  28. includes/supports/class-aepc-woocommerce-addon-support.php +9 -3
  29. languages/pixel-caffeine.pot +161 -134
  30. pixel-caffeine.php +4 -4
  31. readme.txt +15 -2
  32. vendor/autoload.php +1 -1
  33. vendor/composer/autoload_files.php +2 -0
  34. vendor/composer/autoload_psr4.php +1 -0
  35. vendor/composer/autoload_real.php +7 -7
  36. vendor/composer/autoload_static.php +14 -4
  37. vendor/composer/installed.json +140 -0
  38. vendor/paragonie/random_compat/LICENSE +22 -0
  39. vendor/paragonie/random_compat/dist/random_compat.phar.pubkey +5 -0
  40. vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc +11 -0
  41. vendor/paragonie/random_compat/lib/byte_safe_strings.php +195 -0
  42. vendor/paragonie/random_compat/lib/cast_to_int.php +77 -0
  43. vendor/paragonie/random_compat/lib/error_polyfill.php +49 -0
  44. vendor/paragonie/random_compat/lib/random.php +225 -0
  45. vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php +91 -0
  46. vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php +83 -0
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 o=i[s]={i:s,l:!1,exports:{}};return t[s].call(o.exports,o,o.exports,e),o.l=!0,o.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},10:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=i(0),o=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 n={dropdown_data:[],unsaved:!1,set_unsaved:function(){n.unsaved=!0},set_saved:function(){n.unsaved=!1},bootstrap_components:function(t){var e=(0,o.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"}),o.default.material.init()},custom_dropdown:function(t){var e=(0,o.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,o.default)(void 0!==t?t.currentTarget:document.body);e.find("select.js-dep").on("change",function(){var t=(0,o.default)(this),e=t.closest("form"),i=t.val(),s=t.attr("id"),n=e.find('div[class*="'+s+'"]'),a=e.find("."+s+"-"+i);n.hide(),a.length&&a.show()}).trigger("change"),e.find(".control-wrap .checkbox .inline-text").on("focus",function(){(0,o.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,o.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,o.default)(this);t.closest("form").find("div.advanced-data").collapse(t.is(":checked")?"show":"hide")}).trigger("change.components"),e.find(".js-show-chunk-limit-option").on("change.components",function(){var t=(0,o.default)(this);t.closest("form").find("div.chunk-limit-option").collapse(t.is(":checked")?"show":"hide")}).trigger("change.components"),e.find("select#event_standard_events").on("change.components",function(){var t=(0,o.default)(this),e=t.closest("form"),i=t.find("option:selected").data("fields");e.find("div.event-field").hide(),o.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,o.default)(this),e=t.closest(".form-group").find(".text-status"),i=t.is(":checked")?"yes":"no",s=t.closest(".togglebutton"),n=t.data("original-value");void 0===e.data("original-status")&&e.data("original-status",e.clone()),n!==i?(e.hasClass("text-status-pending")||s.addClass("pending"),e.addClass("text-status-pending").text(aepc_admin.switch_unsaved)):((0,o.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,o.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,o.default)(this).find('input[type="text"]').each(function(){var e=(0,o.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,o.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,o.default)(this),s=(0,o.default)("#modal-confirm-delete"),n=e.closest(".js-custom-param"),a=function(){s.modal("hide"),n.remove(),i()};""===n.find('input[id^="event_custom_params_key"]').val()&&""===n.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,o.default)(this),e=t.data("selected");t.data("selected","").val(e).trigger("change")}),e.find("select[data-selected]").each(function(){var t=(0,o.default)(this),e=t.data("selected");t.val(e).trigger("change")})},analyzed_distance:function(){var t=function(t){var e=(0,o.default)(window).scrollTop();return(0,o.default)(t).offset().top-e}(".plugin-content"),e=parseFloat((0,o.default)(".wp-toolbar").css("padding-top")),i=(0,o.default)(".alert-wrap"),s=i.height(),n=(0,o.default)(".alert-wrap-ghost");t<=e?(0===n.length&&i.after('<div class="alert-wrap-ghost"></div>').next(".alert-wrap-ghost").height(s),i.addClass("alert-fixed").css({top:e}).width((0,o.default)(".plugin-content").width())):(i.removeClass("alert-fixed").width("100%"),n.remove())}};e.default=n},100:function(t,e){},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),n=s.data("bs.collapse"),a=t.extend({},o.DEFAULTS,s.data(),"object"==(void 0===i?"undefined":e(i))&&i);!n&&a.toggle&&/show|hide/.test(i)&&(a.toggle=!1),n||s.data("bs.collapse",n=new o(this,a)),"string"==typeof i&&n[i]()})}var o=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()};o.VERSION="3.4.1",o.TRANSITION_DURATION=350,o.DEFAULTS={toggle:!0},o.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},o.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 n=t.Event("show.bs.collapse");if(this.$element.trigger(n),!n.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(o.TRANSITION_DURATION)[a](this.$element[0][l])}}}},o.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(o.TRANSITION_DURATION)}}},o.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},o.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 o=t(s);this.addAriaAndCollapsedClass(i(o),o)},this)).end()},o.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)};var n=t.fn.collapse;t.fn.collapse=s,t.fn.collapse.Constructor=o,t.fn.collapse.noConflict=function(){return t.fn.collapse=n,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(e){var o=t(this);o.attr("data-target")||e.preventDefault();var n=i(o),a=n.data("bs.collapse"),r=a?"toggle":o.data();s.call(n,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 o=t(i).filter(function(t,e){return e instanceof RegExp}),n=0,r=o.length;n<r;n++)if(s.match(o[n]))return!0;return!1}function s(e,s,o){if(0===e.length)return e;if(o&&"function"==typeof o)return o(e);if(!document.implementation||!document.implementation.createHTMLDocument)return e;var n=document.implementation.createHTMLDocument("sanitization");n.body.innerHTML=e;for(var a=t.map(s,function(t,e){return e}),r=t(n.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 n.body.innerHTML}function o(i){return this.each(function(){var s=t(this),o=s.data("bs.tooltip"),n="object"==(void 0===i?"undefined":e(i))&&i;!o&&/destroy|hide/.test(i)||(o||s.data("bs.tooltip",o=new d(this,n)),"string"==typeof i&&o[i]())})}var n=["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 o=this.options.trigger.split(" "),n=o.length;n--;){var a=o[n];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 o in i)i.hasOwnProperty(o)&&-1!==t.inArray(o,n)&&delete i[o];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,o=this.tip(),n=this.getUID(this.type);this.setContent(),o.attr("id",n),this.$element.attr("aria-describedby",n),this.options.animation&&o.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,r=/\s?auto?\s?/i,l=r.test(a);l&&(a=a.replace(r,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?o.appendTo(t(document).find(this.options.container)):o.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var h=this.getPosition(),c=o[0].offsetWidth,p=o[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,o.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")?o.one("bsTransitionEnd",m).emulateTransitionEnd(d.TRANSITION_DURATION):m()}},d.prototype.applyPlacement=function(e,i){var s=this.tip(),o=s[0].offsetWidth,n=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!=n&&(e.top=e.top+n-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-o+l:2*c.top-n+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&&o.detach(),s.$element&&s.$element.removeAttr("aria-describedby").trigger("hidden.bs."+s.type),e&&e()}var s=this,o=t(this.$tip),n=t.Event("hide.bs."+this.type);if(this.$element.trigger(n),!n.isDefaultPrevented())return o.removeClass("in"),t.support.transition&&o.hasClass("fade")?o.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,o=i.getBoundingClientRect();null==o.width&&(o=t.extend({},o,{width:o.right-o.left,height:o.bottom-o.top}));var n=window.SVGElement&&i instanceof window.SVGElement,a=s?{top:0,left:0}:n?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({},o,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 o={top:0,left:0};if(!this.$viewport)return o;var n=this.options.viewport&&this.options.viewport.padding||0,a=this.getPosition(this.$viewport);if(/right|left/.test(t)){var r=e.top-n-a.scroll,l=e.top+n-a.scroll+s;r<a.top?o.top=a.top-r:l>a.top+a.height&&(o.top=a.top+a.height-l)}else{var h=e.left-n,c=e.left+n+i;h<a.left?o.left=a.left-h:c>a.right&&(o.left=a.left+a.width-c)}return o},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=o,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 o=t(this),n=o.data("bs.popover"),a="object"==(void 0===i?"undefined":e(i))&&i;!n&&/destroy|hide/.test(i)||(n||o.data("bs.popover",n=new s(this,a)),"string"==typeof i&&n[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 o=void 0===s?"undefined":e(s);this.options.sanitize&&(i=this.sanitizeHtml(i),"string"===o&&(s=this.sanitizeHtml(s))),t.find(".popover-title").html(i),t.find(".popover-content").children().detach().end()["string"===o?"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 o=t.fn.popover;t.fn.popover=i,t.fn.popover.Constructor=s,t.fn.popover.noConflict=function(){return t.fn.popover=o,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 o=function(){i||t(s).trigger(t.support.transition.end)};return setTimeout(o,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,o){return this.each(function(){var n=t(this),a=n.data("bs.modal"),r=t.extend({},s.DEFAULTS,n.data(),"object"==(void 0===i?"undefined":e(i))&&i);a||n.data("bs.modal",a=new s(this,r)),"string"==typeof i?a[i](o):r.show&&a.show(o)})}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,o=t.Event("show.bs.modal",{relatedTarget:e});this.$element.trigger(o),this.isShown||o.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 o=t.support.transition&&i.$element.hasClass("fade");i.$element.parent().length||i.$element.appendTo(i.$body),i.$element.show().scrollTop(0),i.adjustDialog(),o&&i.$element[0].offsetWidth,i.$element.addClass("in"),i.enforceFocus();var n=t.Event("shown.bs.modal",{relatedTarget:e});o?i.$dialog.one("bsTransitionEnd",function(){i.$element.trigger("focus").trigger(n)}).emulateTransitionEnd(s.TRANSITION_DURATION):i.$element.trigger("focus").trigger(n)}))},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,o=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var n=t.support.transition&&o;if(this.$backdrop=t(document.createElement("div")).addClass("modal-backdrop "+o).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)),n&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;n?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 o=s.style.paddingRight,n=t(s).css("padding-right");t(s).data("padding-right",o).css("padding-right",parseFloat(n)+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 o=t.fn.modal;t.fn.modal=i,t.fn.modal.Constructor=s,t.fn.modal.noConflict=function(){return t.fn.modal=o,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(e){var s=t(this),o=s.attr("href"),n=s.attr("data-target")||o&&o.replace(/.*(?=#[^\s]+$)/,""),a=t(document).find(n),r=a.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(o)&&o},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 o(e){var o=!1;(e.is(t.material.options.checkboxElements)||e.is(t.material.options.radioElements))&&(o=!0),e.closest("label").hover(function(){var e=t(this).find("input"),n=e.prop("disabled");o&&s(t(this),n),n||i(e)},function(){n(t(this).find("input"))})}function n(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){o(t(e||this.options.checkboxElements).filter(":notmdproc").data("mdproc",!0).after("<span class='checkbox-material'><span class='check'></span></span>"))},togglebutton:function(e){o(t(e||this.options.togglebuttonElements).filter(":notmdproc").data("mdproc",!0).after("<span class='toggle'></span>"))},radio:function(e){o(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 o=e.attr("placeholder");e.attr("placeholder",null).removeClass("floating-label");var n=e.attr("id"),a="";n&&(a="for='"+n+"'"),i.addClass("label-floating"),e.after("<label "+a+"class='control-label'>"+o+"</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"),o=void 0===e[0].checkValidity||e[0].checkValidity();""===e.val()?i.addClass("is-empty"):i.removeClass("is-empty"),s&&(o?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(){n(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,o=this.length;++s<o&&(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 o(t){function e(t){return H[t]||t}return t.replace(/[^\u0000-\u007E]/g,e)}function n(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,o,n;if(null===e||e.length<1)return[];for(s=e.split(i),o=0,n=s.length;o<n;o+=1)s[o]=t.trim(s[o]);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 o=t.data(e,s);o!==i&&e.val()!==o&&(t.removeData(e,s),e.trigger("keyup-change"))})}function d(e){e.on("mousemove",function(e){var s=N;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 o;return function(){var i=arguments;window.clearTimeout(o),o=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){n(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 o=document.selection.createRange();s=document.selection.createRange().text.length,o.moveStart("character",-e.value.length),i=o.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(!B){var i=e[0].currentStyle||window.getComputedStyle(e[0],null);B=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"}),B.attr("class","select2-sizer"),t("body").append(B)}return B.text(e.val()),B.width()}function y(e,i,s){var o,n,a=[];o=t.trim(e.attr("class")),o&&(o=""+o,t(o.split(/\s+/)).each2(function(){0===this.indexOf("select2-")&&a.push(this)})),o=t.trim(i.attr("class")),o&&(o=""+o,t(o.split(/\s+/)).each2(function(){0!==this.indexOf("select2-")&&(n=s(this))&&a.push(n)})),e.attr("class",a.join(" "))}function b(t,e,i,s){var n=o(t.toUpperCase()).indexOf(o(e.toUpperCase())),a=e.length;if(n<0)return void i.push(s(t));i.push(s(t.substring(0,n))),i.push("<span class='select2-match'>"),i.push(s(t.substring(n,n+a))),i.push("</span>"),i.push(s(t.substring(n+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,o=null,n=e.quietMillis||100,a=e.url,r=this;return function(l){window.clearTimeout(s),s=window.setTimeout(function(){var s=e.data,n=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,n="function"==typeof n?n.call(r,l.term,l.page,l.context):n,o&&"function"==typeof o.abort&&o.abort(),e.params&&(t.isFunction(e.params)?t.extend(d,e.params.call(r)):t.extend(d,e.params)),t.extend(d,{url:n,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)}}),o=h.call(r,d)},n)}}function M(e){var i,s,o=e,n=function(t){return""+t.text};t.isArray(o)&&(s=o,o={results:s}),!1===t.isFunction(o)&&(s=o,o=function(){return s});var a=o();return a.text&&(n=a.text,t.isFunction(n)||(i=a.text,n=function(t){return t[i]})),function(e){var i,s=e.term,a={results:[]};if(""===s)return void e.callback(o());i=function(o,a){var r,l;if(o=o[0],o.children){r={};for(l in o)o.hasOwnProperty(l)&&(r[l]=o[l]);r.children=[],t(o.children).each2(function(t,e){i(e,r.children)}),(r.children.length||e.matcher(s,n(r),o))&&a.push(r)}else e.matcher(s,n(o),o)&&a.push(o)},t(o().results).each2(function(t,e){i(e,a.results)}),e.callback(a)}}function S(e){var s=t.isFunction(e);return function(o){var n=o.term,a={results:[]},r=s?e(o):e;t.isArray(r)&&(t(r).each(function(){var t=this.text!==i,e=t?this.text:this;(""===n||o.matcher(n,e))&&a.results.push(t?this:{id:this,text:this})}),o.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,o){var n,a,l,h,c,d=t,p=!1;if(!o.createSearchChoice||!o.tokenSeparators||o.tokenSeparators.length<1)return i;for(;;){for(a=-1,l=0,h=o.tokenSeparators.length;l<h&&(c=o.tokenSeparators[l],!((a=t.indexOf(c))>=0));l++);if(a<0)break;if(n=t.substring(0,a),t=t.substring(a+c.length),n.length>0&&(n=o.createSearchChoice.call(this,n,e))!==i&&null!==n&&o.id(n)!==i&&null!==o.id(n)){for(p=!1,l=0,h=e.length;l<h;l++)if(r(o.id(n),o.id(e[l]))){p=!0;break}p||s(n)}}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,B,R,j,N={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","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};R=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,o;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=o=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,o){var n=s.scrollTop();o>0&&n-o<=0?(s.scrollTop(0),m(t)):o<0&&s.get(0).scrollHeight-s.scrollTop()+o<=s.height()&&(s.scrollTop(s.get(0).scrollHeight-s.height()),m(t))}),c(o),o.on("keyup-change input paste",this.bind(this.updateResults)),o.on("focus",function(){o.addClass("select2-focused")}),o.on("blur",function(){o.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 n=e.element.prop("disabled");n===i&&(n=!1),this.enable(!n);var r=e.element.prop("readonly");r===i&&(r=!1),this.readonly(r),j=j||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,o,n,a,h=this;if(s=e.element,"select"===s.get(0).tagName.toLowerCase()&&(this.select=o=e.element),o&&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,o,n){var a,r=this.opts.id,l=this.liveRegion;(a=function(s,o,c){var d,p,u,f,g,m,v,x,y,b;s=e.sortResults(s,o,n);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,n,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]);o.append(w),l.text(e.formatMatches(s.length))})(o,s,0)}},t.fn.select2.defaults,e),"function"!=typeof e.id&&(n=e.id,e.id=function(t){return t[n]}),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(o?(e.query=this.bind(function(t){var e,o,n,a={results:[],more:!1},r=t.term;n=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){n(e,s.children)}),s.children.length>0&&i.push(s))},e=s.children(),this.getPlaceholder()!==i&&e.length>0&&(o=this.getPlaceholderOption())&&(e=e.not(o)),e.each2(function(t,e){n(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 o=[];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}),o.push(i)}),s(o)}))),"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,o=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",o._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,o._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,o,n,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?(n=t(".select2-results",a)[0],a.addClass("select2-drop-auto-width"),a.css("width",""),b=a.outerWidth(!1)+(n.scrollHeight===n.clientHeight?0:j.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),o={left:v,width:h},i?(o.top=r.top-c,o.bottom="auto",this.container.addClass("select2-drop-above"),a.addClass("select2-drop-above")):(o.top=m,o.bottom="auto",this.container.removeClass("select2-drop-above"),a.removeClass("select2-drop-above")),o=t.extend(o,C(this.opts.dropdownCss,this.opts.element)),a.css(o)},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(),R.on("mousemove.select2Event",function(t){N.x=t.pageX,N.y=t.pageY}),!0)},opening:function(){var e,i=this.containerEventName,o="scroll."+i,n="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 o,n=t("#select2-drop");n.length>0&&(o=n.data("select2"),o.opts.selectOnBlur&&o.selectHighlighted({noFocus:!0}),o.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(n+" "+o+" "+a,function(t){r.opened()&&r.positionDropdown()})})},close:function(){if(this.opened()){var e=this.containerEventName,i="scroll."+e,s="resize."+e,o="orientationchange."+e;this.container.parents().add(window).each(function(){t(this).off(i).off(s).off(o)}),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(),R.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,o,n,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,o=l+s.outerHeight(!0),i===e.length-1&&(r=h.find("li.select2-more-results"),r.length>0&&(o=r.offset().top+r.outerHeight(!0))),n=h.offset().top+h.outerHeight(!0),o>n&&h.scrollTop(h.scrollTop()+(o-n)),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 o=t(i[s]);if(o.hasClass("select2-result-selectable")&&!o.hasClass("select2-disabled")&&!o.hasClass("select2-selected")){this.highlight(s);break}}},highlight:function(e){var i,s,o=this.findHighlightableChoices();if(0===arguments.length)return n(o.filter(".select2-highlighted")[0],o.get());e>=o.length&&(e=o.length-1),e<0&&(e=0),this.removeHighlight(),i=t(o[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,o=this.search.val(),n=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:o,page:i,context:n,matcher:this.opts.matcher,callback:this.bind(function(a){s.opened()&&(s.opts.populateResults.call(this,t,a.results,{term:o,page:i,context:n}),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 o(t){c.html(t),s()}var n,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&&(n=this.data(),t.isArray(n)&&n.length>=g&&T(d.formatSelectionTooBig,"formatSelectionTooBig")))return void o("<li class='select2-selection-limit'>"+C(d.formatSelectionTooBig,d.element,g)+"</li>");if(h.val().length<d.minimumInputLength)return o(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 o(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&&o("<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(n){var a;if(l==this.queryCount){if(!this.opened())return void this.search.removeClass("select2-active");if(n.hasError!==i&&T(d.formatAjaxError,"formatAjaxError"))return void o("<li class='select2-ajax-error'>"+C(d.formatAjaxError,d.element,n.jqXHR,n.textStatus,n.errorThrown)+"</li>");if(this.context=n.context===i?null:n.context,this.opts.createSearchChoice&&""!==h.val()&&(a=this.opts.createSearchChoice.call(p,h.val(),n.results))!==i&&null!==a&&p.id(a)!==i&&null!==p.id(a)&&0===t(n.results).filter(function(){return r(p.id(this),p.id(a))}).length&&this.opts.createSearchChoicePosition(n.results,a),0===n.results.length&&T(d.formatNoMatches,"formatNoMatches"))return void o("<li class='select2-no-results'>"+C(d.formatNoMatches,d.element,h.val())+"</li>");c.empty(),p.opts.populateResults.call(this,c,n.results,{term:h.val(),page:this.resultsPage,context:null}),!0===n.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(n,e),s(),this.opts.element.trigger({type:"select2-loaded",items:n})}})})}},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,o,n,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(";"),n=0,a=s.length;n<a;n+=1)if(r=s[n].replace(/\s/g,""),null!==(o=r.match(/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i))&&o.length>=1)return o[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,o;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&&(o=this.search.val().length,e.setSelectionRange(o,o))),""===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,o=this.container,n=this.dropdown,a=z();this.opts.minimumResultsForSearch<0?this.showSearch(!1):this.showSearch(!0),this.selection=e=o.find(".select2-choice"),this.focusser=o.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)})),n.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 o=this.getPlaceholderOption();this.opts.element.val(o?o.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 o=i.val(),n=null;e.query({matcher:function(t,i,s){var a=r(o,e.id(s));return a&&(n=s),a},callback:t.isFunction(s)?function(){s(n)}: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,o=this;if(this.findHighlightableChoices().each2(function(t,e){if(r(o.id(e.data("select2-data")),o.opts.element.val()))return s=t,!1}),!1!==i&&(!0===e&&s>=0?this.highlight(s):this.highlight(0)),!0===e){var n=this.opts.minimumResultsForSearch;n>=0&&this.showSearch(A(t.results)>=n)}},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,o=this.selection.find(".select2-chosen");this.selection.data("select2-data",t),o.empty(),null!==t&&(e=this.opts.formatSelection(t,o,this.opts.escapeMarkup)),e!==i&&o.append(e),s=this.opts.formatSelectionCssClass(t,o),s!==i&&o.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,o=this,n=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=o.optionToData(e),!1}),this.updateSelection(s),this.setPlaceholder(),e&&this.triggerChange({added:s,removed:n});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){o.opts.element.val(t?o.id(t):""),o.updateSelection(t),o.setPlaceholder(),e&&o.triggerChange({added:t,removed:n})})}},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 o=l(i.val(),e.separator),n=[];e.query({matcher:function(i,s,a){var l=t.grep(o,function(t){return r(t,e.id(a))}).length;return l&&n.push(a),l},callback:t.isFunction(s)?function(){for(var t=[],i=0;i<o.length;i++)for(var a=o[i],l=0;l<n.length;l++){var h=n[l];if(r(a,e.id(h))){t.push(h),n.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)"),o=i.next(".select2-search-choice:not(.select2-locked)"),n=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=o.length?o:null:t.which===L.BACKSPACE?this.unselect(i.first())&&(this.search.width(10),a=s.length?s:o):t.which==L.DELETE?this.unselect(i.first())&&(this.search.width(10),a=o.length?o: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==n.offset&&!n.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=[],o=this;t(e).each(function(){n(o.id(this),i)<0&&(i.push(o.id(this)),s.push(this))}),e=s,this.selection.find(".select2-search-choice").remove(),t(e).each(function(){o.addSelectedChoice(this)}),o.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,o,n=!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=n?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>"),o=this.opts.formatSelectionCssClass(e,l.find("div")),o!=i&&l.addClass(o),n&&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,o=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=n(this.id(i),o))>=0;)o.splice(s,1),this.setVal(o),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(),o=this.results.find(".select2-result"),a=this.results.find(".select2-result-with-children"),r=this;o.each2(function(t,e){n(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&&!o.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,o,n=h(this.search);t=x(this.search)+10,e=this.search.offset().left,i=this.selection.width(),s=this.selection.offset().left,o=i-(e-s)-n,o<t&&(o=i-n),o<40&&(o=i-n),o<=0&&(o=t),this.search.width(Math.floor(o))},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(){n(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 o,n=this;if(0===arguments.length)return this.getVal();if(o=this.data(),o.length||(o=[]),!e&&0!==e)return this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),void(s&&this.triggerChange({added:this.data(),removed:o}));if(this.setVal(e),this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),s&&this.triggerChange(this.buildChangeDetails(o,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,n.id);n.setVal(i),n.updateSelection(e),n.clearSearch(),s&&n.triggerChange(n.buildChangeDetails(o,n.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,o,n=this;if(0===arguments.length)return this.selection.children(".select2-search-choice").map(function(){return t(this).data("select2-data")}).get();o=this.data(),e||(e=[]),s=t.map(e,function(t){return n.opts.id(t)}),this.setVal(s),this.updateSelection(e),this.clearSearch(),i&&this.triggerChange(this.buildChangeDetails(o,this.data()))}}),t.fn.select2=function(){var s,o,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)),o=l?new window.Select2.class.multi:new window.Select2.class.single,o.init(s);else{if("string"!=typeof h[0])throw"Invalid arguments to select2 plugin: "+h;if(n(h[0],c)<0)throw"Unknown method: "+h[0];if(r=i,(o=t(this).data("select2"))===i)return;if(a=h[0],"container"===a?r=o.container:"dropdown"===a?r=o.dropdown:(u[a]&&(a=u[a]),r=o[a].apply(o,h.slice(1))),n(h[0],d)>=0||n(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 o=[];return b(t.text,i.term,o,s),o.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 o(""+e).toUpperCase().indexOf(o(""+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:o},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";function s(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});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},n=i(0),a=s(n);i(7);var r=i(8),l=s(r),h=i(10),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":o(i))?i:{text:i},n=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:n}).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]),o=function(){},n=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")&&(o=e.success,delete e.success),e.hasOwnProperty("beforeRender")&&(n=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&&(n(),d.refreshFragmentHTML(s,t)),o(t)},dataType:"json"})}}};e.default=d},92:function(t,e,i){i(93),i(96),i(10),i(8),i(99),i(9),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),o=e(s);i(94),i(22),i(23),i(24),i(25),i(26),i(95),i(27),i(7);var n=i(8),a=e(n),r=i(9),l=e(r),h=i(10),c=e(h);t(document).ready(function(){var t=c.default.dropdown_data,e=function(e){var i=(0,o.default)(void 0!==e?e.currentTarget:document.body),s=a.default.loaders;o.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]=[],o.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,o.default)(document).trigger("loader_data_loaded",[t])},dataType:"json"})}}),i.find("#taxonomy_key").on("change.data",function(){var e=(0,o.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,o.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,o.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=o.default.merge(s,t.get_custom_fields),i.find("#custom_field_keys option").remove(),i.find("#custom_field_keys").append(o.default.map(s,function(t,e){return"[[any]]"===t.id&&(t.text="--- "+t.text+" ---"),(0,o.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=o.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,o.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,o.default)(void 0!==t?t.currentTarget:document);e.find("select.js-collapse").on("change.bs",function(){var t=(0,o.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,o.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,o.default)(document).on("click",function(t){(0,o.default)('[data-toggle="popover"],[data-original-title]').each(function(){(0,o.default)(this).is(t.target)||0!==(0,o.default)(this).has(t.target).length||0!==(0,o.default)(".popover").has(t.target).length||((((0,o.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())},n=function(t){var e=(0,o.default)(this),i=(0,o.default)(t.relatedTarget),n=i.closest("form");e.find("#ca-filter-form").on("submit",function(t){t.preventDefault();var e=(0,o.default)(this),a=e.data("scope"),r=n.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,o.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,o.default)(this),e=t.attr("name"),i=t.val();c.append((0,o.default)("<input />",{type:"hidden",name:e.replace("[]","["+g+"]"),value:i}))});var m=h({nfilters:u.find("li").length-("edit"===a&&o.default.contains(u.get()[0],i.get()[0])?1:0),statement:t,hidden_inputs:c.html(),index:g});"edit"===a&&o.default.contains(u.get()[0],i.get()[0])?i.closest("li").html((0,o.default)(m).html()):(u.find("ul").append(m),"edit"!==a||o.default.contains(u.get()[0],i.get()[0])||i.closest("li").remove()),s(n),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),o.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,o.default)(void 0!==t?t.currentTarget:document.body).find(".list-filter").on("click",".btn-delete",function(t){t.preventDefault();var e=(0,o.default)(this).closest("form"),i=(0,o.default)("#modal-confirm-delete"),n=(0,o.default)(this).closest("li");i.modal("show",(0,o.default)(this)).one("click",".btn-ok",function(){i.modal("hide"),n.remove(),s(e)})}).on("click",".btn-edit",function(t){t.preventDefault();var e=((0,o.default)(this).closest("form"),(0,o.default)("#modal-ca-edit-filter")),i=(0,o.default)(this).closest("li"),s=i.find(".hidden-fields input");e.on("modal-template-loaded",function(t){var e=(0,o.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 n=s.filter('[name*="[event_type]"]').val(),a=(e.find('select[name*="event_type"]').val(n),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,o.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,o.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,o.default)(this))})},h=function(e){var i=void 0!==e?(0,o.default)(this):(0,o.default)(document.body),s=i.find("select#aepc_account_id"),n=i.find("select#aepc_pixel_id"),a=(0,o.default)("form#mainform").find("#aepc_account_id").val(),r=(0,o.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=o.default.merge([{id:"",text:""}],t.get_pixel_ids[e]);1===i.length?(i[0].text=aepc_admin.fb_option_no_pixel,n.prop("disabled",!0)):n.prop("disabled",!1),n.find("option").remove(),n.append(o.default.map(i,function(t,e){return(0,o.default)("<option>",{val:t.id,text:t.text,selected:t.id===r})})),2===n.find("option").length&&n.find("option:eq(1)").prop("selected",!0),n.val(n.find("option:selected").val()).trigger("change")}},d=function(){var e=s.val()?JSON.parse(s.val()).id:"";l.default.addLoader(n),o.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(n)},dataType:"json"})},p=function(e){if(void 0!==e&&e.hasOwnProperty("type")&&"change"===e.type&&(n.val("").trigger("change"),n.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=o.default.merge([{id:"",text:""}],t.get_account_ids);s.find("option").remove(),s.append(o.default.map(e,function(t,e){return(0,o.default)("<option>",{val:t.id,text:t.text,selected:t.id===a})})),s.on("change",p).trigger("change")}},f=function(){l.default.addLoader(s),o.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,o.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,o.default)("<option>",{val:a,text:g.name+" (#"+g.id+")",selected:!0})).trigger("change"),n.append((0,o.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(){o.default.fn.select2&&o.default.extend(o.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,o.default)(".modal-confirm").on("show.bs.modal",function(t){var e=(0,o.default)(this),i=t.hasOwnProperty("relatedTarget")?(0,o.default)(t.relatedTarget).attr("href"):"";o.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"},n=i.match(new RegExp("action=("+Object.keys(s).join("|")+")(&|$)"));n?(l.default.addLoader(e.find(".modal-content")),o.default.ajax({url:i+(i.indexOf("?")?"&":"?")+"ajax=1",method:"GET",success:function(t){if(t.success&&((0,o.default)(".sec-overlay").removeClass("sec-overlay"),(0,o.default)(".sub-panel-fb-connect.bumping").removeClass("bumping"),l.default.reloadFragment(s[n[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,o.default)(".js-form-modal").on("show.bs.modal",function(t){if("undefined"==typeof wp)return t;var e=(0,o.default)(this),i=(0,o.default)(t.relatedTarget),s=i.data("config"),n=wp.template(e.attr("id"));e.find(".modal-content").html(n(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",n).on("show.bs.modal",r),(0,o.default)(document).on("submit",'form[data-toggle="ajax"]',function(t){t.preventDefault();var e=(0,o.default)(this),i=e,s=e.find('[type="submit"]'),n=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),o.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,o.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,o.default)("html, body").animate({scrollTop:r},300),s.text(n),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,o.default)(this),i=e.attr("id"),s=e.closest(".form-group"),n=e.closest(".control-wrap").find(".field-helper");t.data.hasOwnProperty(i)&&(s.addClass("has-error"),n.append((0,o.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(){n.find(".help-block-error").remove()})})}},dataType:"json"})}),(0,o.default)(window).on("load",c.default.analyzed_distance).on("scroll",c.default.analyzed_distance).on("resize",c.default.analyzed_distance),(0,o.default)("#modal-fb-connect-options").on("show.bs.modal",function(t){if("undefined"==typeof wp)return t;var e=(0,o.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,o.default)(".sub-panel-fb-connect").on("change","#aepc_account_id",function(){var t=(0,o.default)(this).val(),e=(0,o.default)("#aepc_pixel_id").val();t&&e?(0,o.default)(".js-save-facebook-options").removeClass("disabled"):(0,o.default)(".js-save-facebook-options").addClass("disabled")}).on("change","#aepc_pixel_id",function(){var t=(0,o.default)("#aepc_account_id").val(),e=(0,o.default)(this).val();t&&e?(0,o.default)(".js-save-facebook-options").removeClass("disabled"):(0,o.default)(".js-save-facebook-options").addClass("disabled")}).on("click",".js-save-facebook-options:not(.disabled)",function(t){var e=(0,o.default)("#aepc_account_id").val(),i=(0,o.default)("#aepc_pixel_id").val();(0,o.default)(".sec-overlay").removeClass("sec-overlay"),(0,o.default)(".sub-panel-fb-connect.bumping").removeClass("bumping"),l.default.addLoader((0,o.default)(".panel.panel-settings-set-fb-px")),o.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,o.default)(".wrap-custom-audiences").on("click",".js-ca-size-sync",function(t){var e=(0,o.default)(this),i=e.data("ca_id");l.default.removeMessage((0,o.default)(".plugin-content .alert-wrap"),"error"),l.default.addLoader((0,o.default)(".panel.panel-ca-list")),e.addClass("loading-data"),o.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,o.default)(".plugin-content .alert-wrap"),"error",t.data.message)},dataType:"json"})}),(0,o.default)(".wrap").on("click",".pagination li a",function(t){t.preventDefault();var e=(0,o.default)(this),i=e.attr("href"),s=i.match(/paged=([0-9]+)/);(0,o.default)(this).closest(".panel-ca-list").length?l.default.reloadFragment("ca_list",{paged:s[1]}):(0,o.default)(this).closest(".panel-ce-tracking").length?l.default.reloadFragment("conversions_list",{paged:s[1]}):(0,o.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,o.default)(".plugin-sidebar.loading-sec").length&&l.default.reloadFragment("sidebar");var d=[];(0,o.default)(".modal").on("show.bs.modal",function(t){d.push(t)}).on("hidden.bs.modal",function(t){(0,o.default)(d[d.length-1].relatedTarget).closest(".modal").length&&((0,o.default)("body").addClass("modal-open"),d.splice(d.length-1,1))}),(0,o.default)("#aepc-clear-transients").on("click",function(t){t.preventDefault();var e=(0,o.default)(this);l.default.addLoader(e),o.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,o.default)(".plugin-content .alert-wrap"),"success",t.data.message)},dataType:"json"})}),(0,o.default)("#aepc-reset-fb-connection").on("click",function(t){t.preventDefault();var e=(0,o.default)(this);l.default.addLoader(e),o.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,o.default)(".plugin-content .alert-wrap"),"success",t.data.message)}})},dataType:"json"})}),(0,o.default)(".ecomm-conversions").find('input[type="checkbox"]').on("change",function(){var t=(0,o.default)("#aepc_enable_dpa");t.is(":checked")||t.prop("checked",!0).trigger("change")}),(0,o.default)(document).on("click","button[data-dismiss][data-dismiss-action]",function(){var t=(0,o.default)(this).data("dismiss-action");o.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,o.default)(document).on("click",".js-remove-logs",function(t){t.preventDefault();var e=(0,o.default)(a.default.fragments.logs_list),i=(0,o.default)("#modal-confirm-delete");i.modal("show",(0,o.default)(this)).one("click",".btn-ok",function(){i.modal("hide"),l.default.addLoader(e),o.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(),(0,o.default)(".notice.tfa-notice").on("click","button.notice-dismiss",function(t){t.preventDefault();var e=(0,o.default)(this).closest(".notice.tfa-notice").data("nonce"),i={action:"dismiss_tfa_notice",_wpnonce:e};o.default.post(ajaxurl,i,function(t){})})})}).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 o=t(this),n=o.data("bs.button"),a="object"==(void 0===i?"undefined":e(i))&&i;n||o.data("bs.button",n=new s(this,a)),"toggle"==i?n.toggle():i&&n.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,o=s.is("input")?"val":"html",n=s.data();e+="Text",null==n.resetText&&s.data("resetText",s[o]()),setTimeout(t.proxy(function(){s[o](null==n[e]?this.options[e]:n[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 o=t.fn.button;t.fn.button=i,t.fn.button.Constructor=s,t.fn.button.noConflict=function(){return t.fn.button=o,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),o=i.data("bs.alert");o||i.data("bs.alert",o=new s(this)),"string"==typeof e&&o[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 o=t(this),n=o.attr("data-target");n||(n=o.attr("href"),n=n&&n.replace(/.*(?=#[^\s]*$)/,"")),n="#"===n?[]:n;var a=t(document).find(n);e&&e.preventDefault(),a.length||(a=o.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 o=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=s,t.fn.alert.noConflict=function(){return t.fn.alert=o,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),o=e(s),n=i(97),a=e(n),r=i(9),l=e(r);t(document).ready(function(){var t=(0,o.default)("#activity-chart");t.length&&o.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 l.default.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,o.default)(this).val(),s=new Date,n=new Date;if(n.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(n.setUTCHours(0,0,0,0),n.setUTCHours(23,59,59,999)),e.xAxis[0].setDataGrouping({approximation:"sum",forced:!0,units:[["hour",[1]]]});else if("last-7-days"===i){var a=n;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=n;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,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};!function(n,a){"object"===o(t)&&t.exports?(a.default=a,t.exports=n.document?a(n):a):void 0!==(s=function(){return a(n)}.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?t:"undefined"!=typeof window?window:{},i=e.document,s=e.navigator&&e.navigator.userAgent||"",o=i&&i.createElementNS&&!!i.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,n=/(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.2.2",deg2rad:2*Math.PI/360,doc:i,hasBidiBug:l,hasTouch:!!e.TouchEvent,isMS:n,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:o,win:e,marginNames:["plotTop","marginRight","marginBottom","plotLeft"],noop:function(){},charts:[],dateFormats:{}}}),e(i,"parts/Utilities.js",[i["parts/Globals.js"]],function(t){function e(t,e){return parseInt(t,e||10)}function i(t){return"string"==typeof t}function s(t){return"[object Array]"===(t=Object.prototype.toString.call(t))||"[object Array Iterator]"===t}function n(t,e){return!(!t||"object"!==(void 0===t?"undefined":o(t))||e&&s(t))}function a(t){return n(t)&&"number"==typeof t.nodeType}function r(t){var e=t&&t.constructor;return!(!n(t,!0)||a(t)||!e||!e.name||"Object"===e.name)}function l(t){return"number"==typeof t&&!isNaN(t)&&1/0>t&&-1/0<t}function h(t){return void 0!==t&&null!==t}function c(t,e,s){var o;return i(e)?h(s)?t.setAttribute(e,s):t&&t.getAttribute&&((o=t.getAttribute(e))||"class"!==e||(o=t.getAttribute(e+"Name"))):u(e,function(e,i){t.setAttribute(i,e)}),o}function d(t,e){var i;t||(t={});for(i in e)t[i]=e[i];return t}function p(){for(var t=arguments,e=t.length,i=0;i<e;i++){var s=t[i];if(void 0!==s&&null!==s)return s}}function u(t,e,i){for(var s in t)Object.hasOwnProperty.call(t,s)&&e.call(i||t[s],t[s],s,t)}t.timers=[];var f=t.charts,g=t.doc,m=t.win;return t.error=function(e,i,s,o){var n=l(e),a=n?"Highcharts error #"+e+": www.highcharts.com/errors/"+e+"/":e.toString(),r=function(){if(i)throw Error(a);m.console&&console.log(a)};if(void 0!==o){var h="";n&&(a+="?"),t.objectEach(o,function(t,e){h+="\n"+e+": "+t,n&&(a+=encodeURI(e)+"="+encodeURI(t))}),a+=h}s?t.fireEvent(s,"displayError",{code:e,message:a,params:o},r):r()},t.Fx=function(t,e,i){this.options=e,this.elem=t,this.prop=i},t.Fx.prototype={dSetter:function(){var t=this.paths[0],e=this.paths[1],i=[],s=this.now,o=t.length;if(1===s)i=this.toD;else if(o===e.length&&1>s)for(;o--;){var n=parseFloat(t[o]);i[o]=isNaN(n)||"A"===e[o-4]||"A"===e[o-5]?e[o]:s*parseFloat(""+(e[o]-n))+n}else i=e;this.elem.attr("d",i,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,s){var o=this,n=o.options,a=function t(e){return!t.stopped&&o.step(e)},r=m.requestAnimationFrame||function(t){setTimeout(t,13)},l=function e(){for(var i=0;i<t.timers.length;i++)t.timers[i]()||t.timers.splice(i--,1);t.timers.length&&r(e)};e!==i||this.elem["forceAnimate:"+this.prop]?(this.startTime=+new Date,this.start=e,this.end=i,this.unit=s,this.now=this.start,this.pos=0,a.elem=this.elem,a.prop=this.prop,a()&&1===t.timers.push(a)&&r(l)):(delete n.curAnim[this.prop],n.complete&&0===Object.keys(n.curAnim).length&&n.complete.call(this.elem))},step:function(t){var e=+new Date,i=this.options,s=this.elem,o=i.complete,n=i.duration,a=i.curAnim;if(s.attr&&!s.element)t=!1;else if(t||e>=n+this.startTime){this.now=this.end,this.pos=1,this.update();var r=a[this.prop]=!0;u(a,function(t){!0!==t&&(r=!1)}),r&&o&&o.call(s),t=!1}else this.pos=i.easing((e-this.startTime)/n),this.now=this.start+(this.end-this.start)*this.pos,this.update(),t=!0;return t},initPath:function(t,e,i){function s(t){for(r=t.length;r--;){var e="M"===t[r]||"L"===t[r],i=/[a-zA-Z]/.test(t[r+3]);e&&i&&t.splice(r+1,0,t[r+1],t[r+2],t[r+1],t[r+2])}}function o(t,e){for(;t.length<v;){t[0]=e[v-t.length];var i=t.slice(0,p);[].splice.apply(t,[0,0].concat(i)),u&&(i=t.slice(t.length-p),[].splice.apply(t,[t.length,0].concat(i)),r--)}t[0]="M"}function n(t,e){for(var i=(v-t.length)/p;0<i&&i--;)a=t.slice().splice(t.length/f-p,p*f),a[0]=e[v-p-i*p],d&&(a[p-6]=a[p-2],a[p-5]=a[p-1]),[].splice.apply(t,[t.length/f,0].concat(a)),u&&i--}e=e||"";var a,r,h=t.startX,c=t.endX,d=-1<e.indexOf("C"),p=d?7:3;e=e.split(" "),i=i.slice();var u=t.isArea,f=u?2:1;if(d&&(s(e),s(i)),h&&c){for(r=0;r<h.length;r++){if(h[r]===c[0]){var g=r;break}if(h[0]===c[c.length-h.length+r]){g=r;var m=!0;break}if(h[h.length-1]===c[c.length-h.length+r]){g=h.length-r;break}}void 0===g&&(e=[])}if(e.length&&l(g)){var v=i.length+g*f*p;m?(o(e,i),n(i,e)):(o(i,e),n(e,i))}return[e,i]},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 t,e=arguments,i={};!0===e[0]&&(i=e[1],e=Array.prototype.slice.call(e,2));var s=e.length;for(t=0;t<s;t++)i=function t(e,i){return"object"!==(void 0===e?"undefined":o(e))&&(e={}),u(i,function(s,o){!n(s,!0)||r(s)||a(s)?e[o]=i[o]:e[o]=t(e[o]||{},s)}),e}(i,e[t]);return i},t.clearTimeout=function(t){h(t)&&clearTimeout(t)},t.css=function(e,i){t.isMS&&!t.svg&&i&&void 0!==i.opacity&&(i.filter="alpha(opacity="+100*i.opacity+")"),d(e.style,i)},t.createElement=function(e,i,s,o,n){e=g.createElement(e);var a=t.css;return i&&d(e,i),n&&a(e,{padding:"0",border:"none",margin:"0"}),s&&a(e,s),o&&o.appendChild(e),e},t.extendClass=function(t,e){var i=function(){};return i.prototype=new t,d(i.prototype,e),i},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,o=this;return o.proceed=function(){s.apply(o,arguments.length?arguments:e)},t.unshift(s),t=i.apply(this,t),o.proceed=null,t}},t.datePropsToTimestamps=function(e){u(e,function(i,o){n(i)&&"function"==typeof i.getTime?e[o]=i.getTime():(n(i)||s(i))&&t.datePropsToTimestamps(i)})},t.formatSingle=function(e,i,s){var o=/\.([0-9])/,n=t.defaultOptions.lang;return/f$/.test(e)?(s=(s=e.match(o))?s[1]:-1,null!==i&&(i=t.numberFormat(i,s,n.decimalPoint,-1<e.indexOf(",")?n.thousandsSep:""))):i=(s||t.time).dateFormat(e,i),i},t.format=function(e,i,s){for(var o,n,a,r,l,h="{",c=!1,d=[];e&&-1!==(h=e.indexOf(h));){if(o=e.slice(0,h),c){for(o=o.split(":"),n=o.shift().split("."),r=n.length,l=i,a=0;a<r;a++)l&&(l=l[n[a]]);o.length&&(l=t.formatSingle(o.join(":"),l,s)),d.push(l)}else d.push(o);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,o,n){var a=e;s=p(s,1);var r=e/s;for(i||(i=n?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],!1===o&&(1===s?i=i.filter(function(t){return 0==t%1}):.1>=s&&(i=[1/s]))),o=0;o<i.length&&(a=i[o],!(n&&a*s>=e||!n&&r<=(i[o]+(i[o+1]||i[o]))/2));o++);return a=t.correctFloat(a*s,-Math.round(Math.log(.001)/Math.LN10))},t.stableSort=function(t,e){var i,s,o=t.length;for(s=0;s<o;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<o;s++)delete t[s].safeI},t.correctFloat=function(t,e){return parseFloat(t.toPrecision(e||14))},t.animObject=function(e){return n(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(i,s,o,n){i=+i||0,s=+s;var a=t.defaultOptions.lang,r=(i.toString().split(".")[1]||"").split("e")[0].length,h=i.toString().split("e");if(-1===s)s=Math.min(r,20);else if(l(s)){if(s&&h[1]&&0>h[1]){var c=s+ +h[1];0<=c?(h[0]=(+h[0]).toExponential(c).split("e")[0],s=c):(h[0]=h[0].split(".")[0]||0,i=20>s?(h[0]*Math.pow(10,h[1])).toFixed(s):0,h[1]=0)}}else s=2;var d=(Math.abs(h[1]?h[0]:i)+Math.pow(10,-Math.max(s,r)-1)).toFixed(s);return r=String(e(d)),c=3<r.length?r.length%3:0,o=p(o,a.decimalPoint),n=p(n,a.thousandsSep),i=(0>i?"-":"")+(c?r.substr(0,c)+n:""),i+=r.substr(c).replace(/(\d{3})(?=\d)/g,"$1"+n),s&&(i+=o+d.slice(-s)),h[1]&&0!=+i&&(i+="e"+h[1]),i},Math.easeInOutSine=function(t){return-.5*(Math.cos(Math.PI*t)-1)},t.getStyle=function(i,s,o){return"width"===s?(s=Math.min(i.offsetWidth,i.scrollWidth),o=i.getBoundingClientRect&&i.getBoundingClientRect().width,o<s&&o>=s-1&&(s=Math.floor(o)),Math.max(0,s-t.getStyle(i,"padding-left")-t.getStyle(i,"padding-right"))):"height"===s?Math.max(0,Math.min(i.offsetHeight,i.scrollHeight)-t.getStyle(i,"padding-top")-t.getStyle(i,"padding-bottom")):(m.getComputedStyle||t.error(27,!0),(i=m.getComputedStyle(i,void 0))&&(i=i.getPropertyValue(s),p(o,"opacity"!==s)&&(i=e(i))),i)},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=g.documentElement;return t=t.parentElement||t.parentNode?t.getBoundingClientRect():{top:0,left:0},{top:t.top+(m.pageYOffset||e.scrollTop)-(e.clientTop||0),left:t.left+(m.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)},u({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,o){void 0===o&&(o={});var n=e.addEventListener||t.addEventListenerPolyfill,a="function"==typeof e&&e.prototype?e.prototype.protoEvents=e.prototype.protoEvents||{}:e.hcEvents=e.hcEvents||{};return t.Point&&e instanceof t.Point&&e.series&&e.series.chart&&(e.series.chart.runTrackerClick=!0),n&&n.call(e,i,s,!1),a[i]||(a[i]=[]),a[i].push({fn:s,order:"number"==typeof o.order?o.order:1/0}),a[i].sort(function(t,e){return t.order-e.order}),function(){t.removeEvent(e,i,s)}},t.removeEvent=function(e,i,s){function o(i,s){var o=e.removeEventListener||t.removeEventListenerPolyfill;o&&o.call(e,i,s,!1)}function n(t){var s;if(e.nodeName){if(i){var n={};n[i]=!0}else n=t;u(n,function(e,i){if(t[i])for(s=t[i].length;s--;)o(i,t[i][s].fn)})}}var a;["protoEvents","hcEvents"].forEach(function(t,r){var l=(r=r?e:e.prototype)&&r[t];l&&(i?(a=l[i]||[],s?(l[i]=a.filter(function(t){return s!==t.fn}),o(i,s)):(n(l),l[i]=[])):(n(l),r[t]={}))})},t.fireEvent=function(t,e,i,s){var o;if(i=i||{},g.createEvent&&(t.dispatchEvent||t.fireEvent)){var n=g.createEvent("Events");n.initEvent(e,!0,!0),d(n,i),t.dispatchEvent?t.dispatchEvent(n):t.fireEvent(e,n)}else i.target||d(i,{preventDefault:function(){i.defaultPrevented=!0},target:t,type:e}),function(e,s){void 0===e&&(e=[]),void 0===s&&(s=[]);var n=0,a=0,r=e.length+s.length;for(o=0;o<r;o++)!1===(e[n]?s[a]?e[n].order<=s[a].order?e[n++]:s[a++]:e[n++]:s[a++]).fn.call(t,i)&&i.preventDefault()}(t.protoEvents&&t.protoEvents[e],t.hcEvents&&t.hcEvents[e]);s&&!i.defaultPrevented&&s.call(t,i)},t.animate=function(e,i,s){var o,a,r,h="";if(!n(s)){var c=arguments;s={duration:c[2],easing:c[3],complete:c[4]}}l(s.duration)||(s.duration=400),s.easing="function"==typeof s.easing?s.easing:Math[s.easing]||Math.easeInOutSine,s.curAnim=t.merge(i),u(i,function(n,l){t.stop(e,l),r=new t.Fx(e,s,l),a=null,"d"===l?(r.paths=r.initPath(e,e.d,i.d),r.toD=i.d,o=0,a=1):e.attr?o=e.attr(l):(o=parseFloat(t.getStyle(e,l))||0,"opacity"!==l&&(h="px")),a||(a=n),a&&a.match&&a.match("px")&&(a=a.replace(/px/g,"")),r.run(o,a,h)})},t.seriesType=function(e,i,s,o,n){var a=t.getOptions(),r=t.seriesTypes;return a.plotOptions[e]=t.merge(a.plotOptions[i],s),r[e]=t.extendClass(r[i]||function(){},o),r[e].prototype.type=e,n&&(r[e].prototype.pointClass=t.extendClass(t.Point,n)),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},m.jQuery&&(m.jQuery.fn.highcharts=function(){var e=[].slice.call(arguments);if(this[0])return e[0]?(new(t[i(e[0])?e.shift():"Chart"])(this[0],e[0],e[1]),this):f[c(this[0],"data-highcharts-chart")]}),{arrayMax:function(t){for(var e=t.length,i=t[0];e--;)t[e]>i&&(i=t[e]);return i},arrayMin:function(t){for(var e=t.length,i=t[0];e--;)t[e]<i&&(i=t[e]);return i},attr:c,defined:h,destroyObjectProperties:function(t,e){u(t,function(i,s){i&&i!==e&&i.destroy&&i.destroy(),delete t[s]})},discardElement:function(e){var i=t.garbageBin;i||(i=t.createElement("div")),e&&i.appendChild(e),i.innerHTML=""},erase:function(t,e){for(var i=t.length;i--;)if(t[i]===e){t.splice(i,1);break}},extend:d,isArray:s,isClass:r,isDOMElement:a,isNumber:l,isObject:n,isString:i,objectEach:u,pick:p,pInt:e,setAnimation:function(t,e){e.renderer.globalAnimation=p(t,e.options.chart.animation,!0)},splat:function(t){return s(t)?t:[t]},syncTimeout:function(t,e,i){return 0<e?setTimeout(t,e,i):(t.call(0,i),-1)}}}),e(i,"parts/Color.js",[i["parts/Globals.js"],i["parts/Utilities.js"]],function(t,e){var i=e.isNumber,s=e.pInt,o=t.merge;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;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()){var o=e.length;e=parseInt(e.substr(1),16),7===o?i=[(16711680&e)>>16,(65280&e)>>8,255&e,1]:4===o&&(i=[(3840&e)>>4|(3840&e)>>8,(240&e)>>4|240&e,(15&e)<<4|15&e,1])}if(!i)for(s=this.parsers.length;s--&&!i;){var n=this.parsers[s];(o=n.regex.exec(e))&&(i=n.parse(o))}}this.rgba=i||[]},get:function(t){var e=this.input,s=this.rgba;if(this.stops){var n=o(e);n.stops=[].concat(n.stops),this.stops.forEach(function(e,i){n.stops[i]=[n.stops[i][0],e.get(t)]})}else n=s&&i(s[0])?"rgb"===t||!t&&1===s[3]?"rgb("+s[0]+","+s[1]+","+s[2]+")":"a"===t?s[3]:"rgba("+s.join(",")+")":e;return n},brighten:function(t){var e,o=this.rgba;if(this.stops)this.stops.forEach(function(e){e.brighten(t)});else if(i(t)&&0!==t)for(e=0;3>e;e++)o[e]+=s(255*t),0>o[e]&&(o[e]=0),255<o[e]&&(o[e]=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"],i["parts/Utilities.js"]],function(t,e){var i=e.attr,s=e.defined,o=e.destroyObjectProperties,n=e.erase,a=e.extend,r=e.isArray,l=e.isNumber,h=e.isObject,c=e.isString,d=e.objectEach,p=e.pick,u=e.pInt,f=e.splat,g=t.addEvent,m=t.animate,v=t.charts,x=t.color,y=t.css,b=t.createElement,w=t.deg2rad,k=t.doc,M=t.hasTouch,S=t.isFirefox,T=t.isMS,C=t.isWebKit,A=t.merge,E=t.noop,P=t.removeEvent,O=t.stop,L=t.svg,D=t.SVG_NS,_=t.symbolSizes,I=t.win,z=t.SVGElement=function(){return this};a(z.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?b(i):k.createElementNS(this.SVG_NS,i),this.renderer=e,t.fireEvent(this,"afterInit")},animate:function(e,i,s){var o=t.animObject(p(i,this.renderer.globalAnimation,!0));return p(k.hidden,k.msHidden,k.webkitHidden,!1)&&(o.duration=0),0!==o.duration?(s&&(o.complete=s),m(this,e,o)):(this.attr(e,void 0,s),d(e,function(t,e){o.step&&o.step.call(this,t,{prop:e,pos:1})},this)),this},complexColor:function(e,i,o){var n,a,l,h,c,p,u,f,g,m,v,x,y=this.renderer,b=[];t.fireEvent(this.renderer,"complexColor",{args:arguments},function(){e.radialGradient?a="radialGradient":e.linearGradient&&(a="linearGradient"),a&&(l=e[a],c=y.gradients,u=e.stops,m=o.radialReference,r(l)&&(e[a]=l={x1:l[0],y1:l[1],x2:l[2],y2:l[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===a&&m&&!s(l.gradientUnits)&&(h=l,l=A(l,y.getRadialAttr(m,h),{gradientUnits:"userSpaceOnUse"})),d(l,function(t,e){"id"!==e&&b.push(e,t)}),d(u,function(t){b.push(t)}),b=b.join(","),c[b]?v=c[b].attr("id"):(l.id=v=t.uniqueKey(),c[b]=p=y.createElement(a).attr(l).add(y.defs),p.radAttr=h,p.stops=[],u.forEach(function(e){0===e[1].indexOf("rgba")?(n=t.color(e[1]),f=n.get("rgb"),g=n.get("a")):(f=e[1],g=1),e=y.createElement("stop").attr({offset:e[0],"stop-color":f,"stop-opacity":g}).add(p),p.stops.push(e)})),x="url("+y.url+"#"+v+")",o.setAttribute(i,x),o.gradient=b,e.toString=function(){return x})})},applyTextOutline:function(e){var s,o=this.element;-1!==e.indexOf("contrast")&&(e=e.replace(/contrast/g,this.renderer.getContrast(o.style.fill))),e=e.split(" ");var n=e[e.length-1];if((s=e[0])&&"none"!==s&&t.svg){this.fakeTS=!0,e=[].slice.call(o.getElementsByTagName("tspan")),this.ySetter=this.xSetter,s=s.replace(/(^[\d\.]+)(.*?)$/g,function(t,e,i){return 2*e+i}),this.removeTextOutline(e);var a=o.firstChild;e.forEach(function(t,e){0===e&&(t.setAttribute("x",o.getAttribute("x")),e=o.getAttribute("y"),t.setAttribute("y",e||0),null===e&&o.setAttribute("y",0)),t=t.cloneNode(1),i(t,{class:"highcharts-text-outline",fill:n,stroke:n,"stroke-width":s,"stroke-linejoin":"round"}),o.insertBefore(t,a)})}},removeTextOutline:function(t){for(var e,i=t.length;i--;)e=t[i],"highcharts-text-outline"===e.getAttribute("class")&&n(t,this.element.removeChild(e))},symbolCustomAttribs:"x y width height r start end innerR anchorX anchorY rounded".split(" "),attr:function(e,i,s,o){var n,a,r,l=this.element,h=this,c=this.symbolCustomAttribs;if("string"==typeof e&&void 0!==i){var p=e;e={},e[p]=i}return"string"==typeof e?h=(this[e+"Getter"]||this._defaultGetter).call(this,e,l):(d(e,function(i,s){a=!1,o||O(this,s),this.symbolName&&-1!==t.inArray(s,c)&&(n||(this.symbolAttr(e),n=!0),a=!0),!this.rotation||"x"!==s&&"y"!==s||(this.doTransform=!0),a||(r=this[s+"Setter"]||this._defaultSetter,r.call(this,i,s,l),!this.styledMode&&this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(s)&&this.updateShadows(s,i,r))},this),this.afterSetters()),s&&s.call(this),h},afterSetters:function(){this.doTransform&&(this.updateTransform(),this.doTransform=!1)},updateShadows:function(t,e,i){for(var s=this.shadows,o=s.length;o--;)i.call(s[o],"height"===t?Math.max(e-(s[o].cutHeight||0),0):"d"===t?this.d:e,t,s[o])},addClass:function(t,e){var i=e?"":this.attr("class")||"";return 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(c(t)?new RegExp(" ?"+t+" ?"):t,""))},symbolAttr:function(t){var e=this;"x y r start end width height innerR anchorX anchorY clockwise".split(" ").forEach(function(i){e[i]=p(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){e=e||t.strokeWidth||0;var i=Math.round(e)%2/2;return 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),s(t.strokeWidth)&&(t.strokeWidth=e),t},css:function(t){var e=this.styles,s={},o=this.element,n="",r=!e,l=["textOutline","textOverflow","width"];if(t&&t.color&&(t.fill=t.color),e&&d(t,function(t,i){t!==e[i]&&(s[i]=t,r=!0)}),r){if(e&&(t=a(e,s)),t)if(null===t.width||"auto"===t.width)delete this.textWidth;else if("text"===o.nodeName.toLowerCase()&&t.width)var h=this.textWidth=u(t.width);if(this.styles=t,h&&!L&&this.renderer.forExport&&delete t.width,o.namespaceURI===this.SVG_NS){var c=function(t,e){return"-"+e.toLowerCase()};d(t,function(t,e){-1===l.indexOf(e)&&(n+=e.replace(/([A-Z])/g,c)+":"+t+";")}),n&&i(o,"style",n)}else y(o,t);this.added&&("text"===this.element.nodeName&&this.renderer.buildText(this),t&&t.textOutline&&this.applyTextOutline(t.textOutline))}return 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=this.getStyle("stroke-width");if(t.indexOf("px")===t.length-2)t=u(t);else{var e=k.createElementNS(D,"rect");i(e,{width:t,"stroke-width":0}),this.element.parentNode.appendChild(e),t=e.getBBox().width,e.parentNode.removeChild(e)}return t},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,o=this.scaleY,n=this.inverted,a=this.rotation,r=this.matrix,l=this.element;n&&(t+=this.width,e+=this.height),t=["translate("+t+","+e+")"],s(r)&&t.push("matrix("+r.join(",")+")"),n?t.push("rotate(90) scale(-1,1)"):a&&t.push("rotate("+a+" "+p(this.rotationOriginX,l.getAttribute("x"),0)+" "+p(this.rotationOriginY,l.getAttribute("y")||0)+")"),(s(i)||s(o))&&t.push("scale("+p(i,1)+" "+p(o,1)+")"),t.length&&l.setAttribute("transform",t.join(" "))},toFront:function(){var t=this.element;return t.parentNode.appendChild(t),this},align:function(t,e,i){var s,o,a,r={},l=this.renderer,h=l.alignedObjects;t?(this.alignOptions=t,this.alignByTranslate=e,(!i||c(i))&&(this.alignTo=s=i||"renderer",n(h,this),h.push(this),i=null)):(t=this.alignOptions,e=this.alignByTranslate,s=this.alignTo),i=p(i,l[s],l),s=t.align,l=t.verticalAlign,h=(i.x||0)+(t.x||0);var d=(i.y||0)+(t.y||0);return"right"===s?o=1:"center"===s&&(o=2),o&&(h+=(i.width-(t.width||0))/o),r[e?"translateX":"x"]=Math.round(h),"bottom"===l?a=1:"middle"===l&&(a=2),a&&(d+=(i.height-(t.height||0))/a),r[e?"translateY":"y"]=Math.round(d),this[this.placed?"animate":"attr"](r),this.placed=!0,this.alignAttr=r,this},getBBox:function(t,e){var i,o,n=this.renderer,r=this.element,l=this.styles,h=this.textStr,c=n.cache,d=n.cacheKeys,u=r.namespaceURI===this.SVG_NS;e=p(e,this.rotation,0);var f=n.styledMode?r&&z.prototype.getStyle.call(r,"font-size"):l&&l.fontSize;if(s(h)){var g=h.toString();-1===g.indexOf("<")&&(g=g.replace(/[0-9]/g,"0")),g+=["",e,f,this.textWidth,l&&l.textOverflow].join()}if(g&&!t&&(i=c[g]),!i){if(u||n.forExport){try{(o=this.fakeTS&&function(t){[].forEach.call(r.querySelectorAll(".highcharts-text-outline"),function(e){e.style.display=t})})&&o("none"),i=r.getBBox?a({},r.getBBox()):{width:r.offsetWidth,height:r.offsetHeight},o&&o("")}catch(t){}(!i||0>i.width)&&(i={width:0,height:0})}else i=this.htmlGetBBox();if(n.isSVG&&(t=i.width,n=i.height,u&&(i.height=n={"11px,17":14,"13px,20":16}[l&&l.fontSize+","+Math.round(n)]||n),e&&(l=e*w,i.width=Math.abs(n*Math.sin(l))+Math.abs(t*Math.cos(l)),i.height=Math.abs(n*Math.cos(l))+Math.abs(t*Math.sin(l)))),g&&0<i.height){for(;250<d.length;)delete c[d.shift()];c[g]||d.push(g),c[g]=i}}return i},show:function(t){return this.attr({visibility:t?"inherit":"visible"})},hide:function(t){return t?this.attr({y:-9999}):this.attr({visibility:"hidden"}),this},fadeOut:function(t){var e=this;e.animate({opacity:0},{duration:t||150,complete:function(){e.attr({y:-9999})}})},add:function(t){var e=this.renderer,i=this.element;if(t&&(this.parentGroup=t),this.parentInverted=t&&t.inverted,void 0!==this.textStr&&e.buildText(this),this.added=!0,!t||t.handleZ||this.zIndex)var s=this.zIndexSetter();return s||(t?t.element:e.box).appendChild(i),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,o=e.ownerSVGElement,a=t.clipPath;if(e.onclick=e.onmouseout=e.onmouseover=e.onmousemove=e.point=null,O(t),a&&o&&([].forEach.call(o.querySelectorAll("[clip-path],[CLIP-PATH]"),function(t){-1<t.getAttribute("clip-path").indexOf(a.element.id)&&t.removeAttribute("clip-path")}),t.clipPath=a.destroy()),t.stops){for(o=0;o<t.stops.length;o++)t.stops[o]=t.stops[o].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;t.alignTo&&n(i.alignedObjects,t),d(t,function(e,i){t[i]&&t[i].parentGroup===t&&t[i].destroy&&t[i].destroy(),delete t[i]})},shadow:function(t,e,s){var o,n=[],a=this.element;if(t){if(!this.shadows){var r=p(t.width,3),l=(t.opacity||.15)/r,h=this.parentInverted?"(-1,-1)":"("+p(t.offsetX,1)+", "+p(t.offsetY,1)+")";for(o=1;o<=r;o++){var c=a.cloneNode(0),d=2*r+1-2*o;i(c,{stroke:t.color||"#000000","stroke-opacity":l*o,"stroke-width":d,transform:"translate"+h,fill:"none"}),c.setAttribute("class",(c.getAttribute("class")||"")+" highcharts-shadow"),s&&(i(c,"height",Math.max(i(c,"height")-d,0)),c.cutHeight=d),e?e.element.appendChild(c):a.parentNode&&a.parentNode.insertBefore(c,a),n.push(c)}this.shadows=n}}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=p(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]=u(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=k.createElementNS(this.SVG_NS,"title"),this.element.appendChild(e)),e.firstChild&&e.removeChild(e.firstChild),e.appendChild(k.createTextNode(String(p(t,"")).replace(/<[^>]*>/g,"").replace(/&lt;/g,"<").replace(/&gt;/g,">")))},textSetter:function(t){t!==this.textStr&&(delete this.bBox,delete this.textPxLength,this.textStr=t,this.added&&this.renderer.buildText(this))},setTextPath:function(e,i){var o=this.element,n={textAnchor:"text-anchor"},a=!1,r=this.textPathWrapper,l=!r;i=A(!0,{enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}},i);var h=i.attributes;if(e&&i&&i.enabled){this.options&&this.options.padding&&(h.dx=-this.options.padding),r||(this.textPathWrapper=r=this.renderer.createElement("textPath"),a=!0);var c=r.element;if((i=e.element.getAttribute("id"))||e.element.setAttribute("id",i=t.uniqueKey()),l)for(e=o.getElementsByTagName("tspan");e.length;)e[0].setAttribute("y",0),c.appendChild(e[0]);a&&r.add({element:this.text?this.text.element:o}),c.setAttributeNS("http://www.w3.org/1999/xlink","href",this.renderer.url+"#"+i),s(h.dy)&&(c.parentNode.setAttribute("dy",h.dy),delete h.dy),s(h.dx)&&(c.parentNode.setAttribute("dx",h.dx),delete h.dx),d(h,function(t,e){c.setAttribute(n[e]||e,t)}),o.removeAttribute("transform"),this.removeTextOutline.call(r,[].slice.call(o.getElementsByTagName("tspan"))),this.text&&!this.renderer.styledMode&&this.attr({fill:"none","stroke-width":0}),this.applyTextOutline=this.updateTransform=E}else r&&(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=this.renderer,o=this.parentGroup,n=(o||i).element||i.box,a=this.element,r=!1;i=n===i.box;var l,h=this.added;if(s(t)?(a.setAttribute("data-z-index",t),t=+t,this[e]===t&&(h=!1)):s(this[e])&&a.removeAttribute("data-z-index"),this[e]=t,h){for((t=this.zIndex)&&o&&(o.handleZ=!0),e=n.childNodes,l=e.length-1;0<=l&&!r;l--){o=e[l],h=o.getAttribute("data-z-index");var c=!s(h);o!==a&&(0>t&&c&&!i&&!l?(n.insertBefore(a,e[l]),r=!0):(u(h)<=t||c&&(!s(t)||0<=t))&&(n.insertBefore(a,e[l+1]||null),r=!0))}r||(n.insertBefore(a,e[i?3:0]||null),r=!0)}return r},_defaultSetter:function(t,e,i){i.setAttribute(e,t)}}),z.prototype.yGetter=z.prototype.xGetter,z.prototype.translateXSetter=z.prototype.translateYSetter=z.prototype.rotationSetter=z.prototype.verticalAlignSetter=z.prototype.rotationOriginXSetter=z.prototype.rotationOriginYSetter=z.prototype.scaleXSetter=z.prototype.scaleYSetter=z.prototype.matrixSetter=function(t,e){this[e]=t,this.doTransform=!0},z.prototype["stroke-widthSetter"]=z.prototype.strokeSetter=function(t,e,i){this[e]=t,this.stroke&&this["stroke-width"]?(z.prototype.fillSetter.call(this,this.stroke,"stroke",i),i.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0):"stroke-width"===e&&0===t&&this.hasStroke?(i.removeAttribute("stroke"),this.hasStroke=!1):this.renderer.styledMode&&this["stroke-width"]&&(i.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0)},e=t.SVGRenderer=function(){this.init.apply(this,arguments)},a(e.prototype,{Element:z,SVG_NS:D,init:function(t,e,s,o,n,a,r){var l=this.createElement("svg").attr({version:"1.1",class:"highcharts-root"});r||l.css(this.getStyle(o)),o=l.element,t.appendChild(o),i(t,"dir","ltr"),-1===t.innerHTML.indexOf("xmlns")&&i(o,"xmlns",this.SVG_NS),this.isSVG=!0,this.box=o,this.boxWrapper=l,this.alignedObjects=[],this.url=(S||C)&&k.getElementsByTagName("base").length?I.location.href.split("#")[0].replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"",this.createElement("desc").add().element.appendChild(k.createTextNode("Created with Highcharts 7.2.2")),this.defs=this.createElement("defs").add(),this.allowHTML=a,this.forExport=n,this.styledMode=r,this.gradients={},this.cache={},this.cacheKeys=[],this.imgCount=0,this.setSize(e,s,!1);var h;S&&t.getBoundingClientRect&&(e=function(){y(t,{left:0,top:0}),h=t.getBoundingClientRect(),y(t,{left:Math.ceil(h.left)-h.left+"px",top:Math.ceil(h.top)-h.top+"px"})},e(),this.unSubPixelFix=g(I,"resize",e))},definition:function(t){function e(t,s){var o;return f(t).forEach(function(t){var n=i.createElement(t.tagName),a={};d(t,function(t,e){"tagName"!==e&&"children"!==e&&"textContent"!==e&&(a[e]=t)}),n.attr(a),n.add(s||i.defs),t.textContent&&n.element.appendChild(k.createTextNode(t.textContent)),e(t.children||[],n),o=n}),o}var i=this;return e(t)},getStyle:function(t){return this.style=a({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(),o(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:E,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,o,n,a){var r,l,h=this,c=t.rotation,d=s?1:0,p=(i||s).length,u=p,f=[],g=function(t){e.firstChild&&e.removeChild(e.firstChild),t&&e.appendChild(k.createTextNode(t))},m=function(n,r){if(r=r||n,void 0===f[r])if(e.getSubStringLength)try{f[r]=o+e.getSubStringLength(0,s?r+1:r)}catch(t){}else h.getSpanWidth&&(g(a(i||s,n)),f[r]=o+h.getSpanWidth(t,e));return f[r]};t.rotation=0;var v=m(e.textContent.length);if(l=o+v>n){for(;d<=p;)u=Math.ceil((d+p)/2),s&&(r=a(s,u)),v=m(u,r&&r.length-1),d===p?d=p+1:v>n?p=u-1:d=u;0===p?g(""):i&&p===i.length-1||g(r||a(i||s,u))}return s&&s.splice(0,u),t.actualWidth=v,t.rotation=c,l},escapes:{"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"},buildText:function(t){var e,s,o=t.element,n=this,a=n.forExport,r=p(t.textStr,"").toString(),l=-1!==r.indexOf("<"),h=o.childNodes,c=i(o,"x"),f=t.styles,g=t.textWidth,m=f&&f.lineHeight,v=f&&f.textOutline,x=f&&"ellipsis"===f.textOverflow,b=f&&"nowrap"===f.whiteSpace,w=f&&f.fontSize,M=h.length;f=g&&!t.added&&this.box;var S=function(t){var e;return n.styledMode||(e=/(px|em)$/.test(t&&t.style.fontSize)?t.style.fontSize:w||n.style.fontSize||12),m?u(m):n.fontMetrics(e,t.getAttribute("style")?t:o).h},T=function(t,e){return d(n.escapes,function(i,s){e&&-1!==e.indexOf(i)||(t=t.toString().replace(new RegExp(i,"g"),s))}),t},C=function(t,e){var i=t.indexOf("<");if(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))},A=/<br.*?>/g,E=[r,x,b,m,v,w,g].join();if(E!==t.textCache){for(t.textCache=E;M--;)o.removeChild(h[M]);l||v||x||g||-1!==r.indexOf(" ")&&(!b||A.test(r))?(f&&f.appendChild(o),l?(r=n.styledMode?r.replace(/<(b|strong)>/g,'<span class="highcharts-strong">').replace(/<(i|em)>/g,'<span class="highcharts-emphasized">'):r.replace(/<(b|strong)>/g,'<span style="font-weight:bold">').replace(/<(i|em)>/g,'<span style="font-style:italic">'),r=r.replace(/<a/g,"<span").replace(/<\/(b|strong|i|em|a)>/g,"</span>").split(A)):r=[r],r=r.filter(function(t){return""!==t}),r.forEach(function(r,l){var h=0,d=0;r=r.replace(/^\s+|\s+$/g,"").replace(/<span/g,"|||<span").replace(/<\/span>/g,"</span>|||");var p=r.split("|||");p.forEach(function(r){if(""!==r||1===p.length){var u,f,m={},v=k.createElementNS(n.SVG_NS,"tspan");if((u=C(r,"class"))&&i(v,"class",u),(u=C(r,"style"))&&(u=u.replace(/(;| |^)color([ :])/,"$1fill$2"),i(v,"style",u)),(f=C(r,"href"))&&!a&&-1===f.split(":")[0].toLowerCase().indexOf("javascript")){var M=k.createElementNS(n.SVG_NS,"a");i(M,"href",f),i(v,"class","highcharts-anchor"),M.appendChild(v),n.styledMode||y(v,{cursor:"pointer"})}if(" "!==(r=T(r.replace(/<[a-zA-Z\/](.|\n)*?>/g,"")||" "))){if(v.appendChild(k.createTextNode(r)),h?m.dx=0:l&&null!==c&&(m.x=c),i(v,m),o.appendChild(M||v),!h&&s&&(!L&&a&&y(v,{display:"block"}),i(v,"dy",S(v))),g){var A=r.replace(/([^\^])-/g,"$1- ").split(" ");if(m=!b&&(1<p.length||l||1<A.length),M=0,f=S(v),x)e=n.truncate(t,v,r,void 0,0,Math.max(0,g-parseInt(w||12,10)),function(t,e){return t.substring(0,e)+"…"});else if(m)for(;A.length;)A.length&&!b&&0<M&&(v=k.createElementNS(D,"tspan"),i(v,{dy:f,x:c}),u&&i(v,"style",u),v.appendChild(k.createTextNode(A.join(" ").replace(/- /g,"-"))),o.appendChild(v)),n.truncate(t,v,null,A,0===M?d:0,g,function(t,e){return A.slice(0,e).join(" ").replace(/- /g,"-")}),d=t.actualWidth,M++}h++}}}),s=s||o.childNodes.length}),x&&e&&t.attr("title",T(t.textStr,["&lt;","&gt;"])),f&&f.removeChild(o),v&&t.applyTextOutline&&t.applyTextOutline(v)):o.appendChild(k.createTextNode(T(r)))}},getContrast:function(t){return t=x(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,s,o,n,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(A({padding:8,r:2},o)),!u){o=A({fill:"#f7f7f7",stroke:"#cccccc","stroke-width":1,style:{color:"#333333",cursor:"pointer",fontWeight:"normal"}},o);var f=o.style;delete o.style,n=A(o,{fill:"#e6e6e6"},n);var m=n.style;delete n.style,r=A(o,{fill:"#e6ebf5",style:{color:"#000000",fontWeight:"bold"}},r);var v=r.style;delete r.style,l=A(o,{style:{color:"#cccccc"}},l);var x=l.style;delete l.style}return g(d.element,T?"mouseover":"mouseenter",function(){3!==p&&d.setState(1)}),g(d.element,T?"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,n,r,l][t||0]).css([f,m,v,x][t||0])},u||d.attr(o).css(a({cursor:"default"},f)),d.on("click",function(t){3!==p&&s.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 r(t)?e.d=t:h(t)&&a(e,t),this.createElement("path").attr(e)},circle:function(t,e,i){return t=h(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,o,n){return h(t)?(s=t,e=s.y,i=s.r,t=s.x):s={innerR:s,start:o,end:n},t=this.symbol("arc",t,e,i,i,s),t.r=i,t},rect:function(t,e,s,o,n,a){n=h(t)?t.r:n;var r=this.createElement("rect");return t=h(t)?t:void 0===t?{}:{x:t,y:e,width:Math.max(s,0),height:Math.max(o,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,s){r.r=t,i(s,{rx:t,ry:t})},r.rGetter=function(){return r.r},r.attr(t)},setSize:function(t,e,i){var s=this.alignedObjects,o=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:p(i,!0)?void 0:0});o--;)s[o].align()},g:function(t){var e=this.createElement("g");return t?e.attr({class:"highcharts-"+t}):e},image:function(t,e,i,s,o,n){var r={preserveAspectRatio:"none"},l=function(t,e){t.setAttributeNS?t.setAttributeNS("http://www.w3.org/1999/xlink","href",e):t.setAttribute("hc-svg-href",e)},h=function(e){l(c.element,t),n.call(c,e)};1<arguments.length&&a(r,{x:e,y:i,width:s,height:o});var c=this.createElement("image").attr(r);return n?(l(c.element,"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),r=new I.Image,g(r,"load",h),r.src=t,r.complete&&h({})):l(c.element,t),c},symbol:function(t,e,i,o,n,r){var l=this,h=/^url\((.*?)\)$/,c=h.test(t),d=!c&&(this.symbols[t]?t:"circle"),u=d&&this.symbols[d],f=s(e)&&u&&u.call(this.symbols,Math.round(e),Math.round(i),o,n,r);if(u){var g=this.path(f);l.styledMode||g.attr("fill","none"),a(g,{symbolName:d,x:e,y:i,width:o,height:n}),r&&a(g,r)}else if(c){var m=t.match(h)[1];g=this.image(m),g.imgwidth=p(_[m]&&_[m].width,r&&r.width),g.imgheight=p(_[m]&&_[m].height,r&&r.height);var x=function(){g.attr({width:g.width,height:g.height})};["width","height"].forEach(function(t){g[t+"Setter"]=function(t,e){var i={},o=this["img"+e],n="width"===e?"translateX":"translateY";this[e]=t,s(o)&&(r&&"within"===r.backgroundSize&&this.width&&this.height&&(o=Math.round(o*Math.min(this.width/this.imgwidth,this.height/this.imgheight))),this.element&&this.element.setAttribute(e,o),this.alignByTranslate||(i[n]=((this[e]||0)-o)/2,this.attr(i)))}}),s(e)&&g.attr({x:e,y:i}),g.isImg=!0,s(g.imgwidth)&&s(g.imgheight)?x():(g.attr({width:0,height:0}),b("img",{onload:function(){var t=v[l.chartIndex];0===this.width&&(y(this,{position:"absolute",top:"-999em"}),k.body.appendChild(this)),_[m]={width:this.width,height:this.height},g.imgwidth=this.width,g.imgheight=this.height,g.element&&x(),this.parentNode&&this.parentNode.removeChild(this),!--l.imgCount&&t&&t.onload&&t.onload()},src:m}),this.imgCount++)}return g},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,o,n){var a=n.start,r=n.r||i,l=n.r||o||i,h=n.end-.001;i=n.innerR,o=p(n.open,.001>Math.abs(n.end-n.start-2*Math.PI));var c=Math.cos(a),d=Math.sin(a),u=Math.cos(h);return h=Math.sin(h),a=.001>n.end-a-Math.PI?0:1,n=["M",t+r*c,e+l*d,"A",r,l,0,a,p(n.clockwise,1),t+r*u,e+l*h],s(i)&&n.push(o?"M":"L",t+i*u,e+i*h,"A",i,i,0,a,0,t+i*c,e+i*d),n.push(o?"":"Z"),n},callout:function(t,e,i,s,o){var n=Math.min(o&&o.r||0,i,s),a=n+6,r=o&&o.anchorX;o=o&&o.anchorY;var l=["M",t+n,e,"L",t+i-n,e,"C",t+i,e,t+i,e,t+i,e+n,"L",t+i,e+s-n,"C",t+i,e+s,t+i,e+s,t+i-n,e+s,"L",t+n,e+s,"C",t,e+s,t,e+s,t,e+s-n,"L",t,e+n,"C",t,e,t,e,t+n,e];return r&&r>i?o>e+a&&o<e+s-a?l.splice(13,3,"L",t+i,o-6,t+i+6,o,t+i,o+6,t+i,e+s-n):l.splice(13,3,"L",t+i,s/2,r,o,t+i,s/2,t+i,e+s-n):r&&0>r?o>e+a&&o<e+s-a?l.splice(33,3,"L",t,o+6,t-6,o,t,o-6,t,e+n):l.splice(33,3,"L",t,s/2,r,o,t,s/2,t,e+n):o&&o>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+n,e+s):o&&0>o&&r>t+a&&r<t+i-a&&l.splice(3,3,"L",r-6,e,r,e-6,r+6,e,i-n,e),l}},clipRect:function(e,i,s,o){var n=t.uniqueKey()+"-",a=this.createElement("clipPath").attr({id:n}).add(this.defs);return e=this.rect(e,i,s,o,0).add(a),e.id=n,e.clipPath=a,e.count=0,e},text:function(t,e,i,o){var n={};return!o||!this.allowHTML&&this.forExport?(n.x=Math.round(e||0),i&&(n.y=Math.round(i)),s(t)&&(n.text=t),t=this.createElement("text").attr(n),o||(t.xSetter=function(t,e,i){var s,o=i.getElementsByTagName("tspan"),n=i.getAttribute(e);for(s=0;s<o.length;s++){var a=o[s];a.getAttribute(e)===n&&a.setAttribute(e,t)}i.setAttribute(e,t)}),t):this.html(t,e,i)},fontMetrics:function(t,e){return t=!this.styledMode&&/px/.test(t)||!I.getComputedStyle?t||e&&e.style&&e.style.fontSize||this.style&&this.style.fontSize:e&&z.prototype.getStyle.call(e,"font-size"),t=/px/.test(t)?u(t):12,e=24>t?t+3:Math.round(1.2*t),{h:e,b:Math.round(.8*e),f:t}},rotCorr:function(t,e,i){var s=t;return e&&i&&(s=Math.max(s*Math.cos(e*w),4)),{x:-t/3*Math.sin(e*w),y:s}},label:function(t,e,i,o,n,r,h,c,d){var p,u,f,g,m,v,x,y,b,w=this,k=w.styledMode,M=w.g("button"!==d&&"label"),S=M.text=w.text("",0,0,h).attr({zIndex:1}),T=0,C=3,E=0,O={},L=/^url\((.*?)\)$/.test(o),D=k||L,_=function(){return k?p.strokeWidth()%2/2:(y?parseInt(y,10):0)%2/2};d&&M.addClass("highcharts-"+d);var I=function(){var t=S.element.style,e={};u=(void 0===f||void 0===g||x)&&s(S.textStr)&&S.getBBox(),M.width=(f||u.width||0)+2*C+E,M.height=(g||u.height||0)+2*C,b=C+Math.min(w.fontMetrics(t&&t.fontSize,S).b,u?u.height:1/0),D&&(p||(M.box=p=w.symbols[o]||L?w.symbol(o):w.rect(),p.addClass(("button"===d?"":"highcharts-label-box")+(d?" highcharts-"+d+"-box":"")),p.add(M),t=_(),e.x=t,e.y=(c?-b:0)+t),e.width=Math.round(M.width),e.height=Math.round(M.height),p.attr(a(e,O)),O={})},B=function(){var t=E+C,e=c?0:b;s(f)&&u&&("center"===x||"right"===x)&&(t+={center:.5,right:1}[x]*(f-u.width)),t===S.x&&e===S.y||(S.attr("x",t),S.hasBoxWidthChanged&&(u=S.getBBox(!0),I()),void 0!==e&&S.attr("y",e)),S.x=t,S.y=e},R=function(t,e){p?p.attr(t,e):O[t]=e};M.onAdd=function(){S.add(M),M.attr({text:t||0===t?t:"",x:e,y:i}),p&&s(n)&&M.attr({anchorX:n,anchorY:r})},M.widthSetter=function(t){f=l(t)?t:null},M.heightSetter=function(t){g=t},M["text-alignSetter"]=function(t){x=t},M.paddingSetter=function(t){s(t)&&t!==C&&(C=M.padding=t,B())},M.paddingLeftSetter=function(t){s(t)&&t!==E&&(E=t,B())},M.alignSetter=function(t){(t={left:0,center:.5,right:1}[t])!==T&&(T=t,u&&M.attr({x:m}))},M.textSetter=function(t){void 0!==t&&S.attr({text:t}),I(),B()},M["stroke-widthSetter"]=function(t,e){t&&(D=!0),y=this["stroke-width"]=t,R(e,t)},k?M.rSetter=function(t,e){R(e,t)}:M.strokeSetter=M.fillSetter=M.rSetter=function(t,e){"r"!==e&&("fill"===e&&t&&(D=!0),M[e]=t),R(e,t)},M.anchorXSetter=function(t,e){n=M.anchorX=t,R(e,Math.round(t)-_()-m)},M.anchorYSetter=function(t,e){r=M.anchorY=t,R(e,t-v)},M.xSetter=function(t){M.x=t,T&&(t-=T*((f||u.width)+2*C),M["forceAnimate:x"]=!0),m=Math.round(t),M.attr("translateX",m)},M.ySetter=function(t){v=M.y=Math.round(t),M.attr("translateY",v)};var j=M.css;return h={css:function(t){if(t){var e={};t=A(t),M.textProps.forEach(function(i){void 0!==t[i]&&(e[i]=t[i],delete t[i])}),S.css(e),"width"in e&&I(),"fontSize"in e&&(I(),B())}return j.call(M,t)},getBBox:function(){return{width:u.width+2*C,height:u.height+2*C,x:u.x-C,y:u.y-C}},destroy:function(){P(M.element,"mouseenter"),P(M.element,"mouseleave"),S&&(S=S.destroy()),p&&(p=p.destroy()),z.prototype.destroy.call(M),M=w=I=B=R=null}},k||(h.shadow=function(t){return t&&(I(),p&&p.shadow(t)),M}),a(M,h)}}),t.Renderer=e}),e(i,"parts/Html.js",[i["parts/Globals.js"],i["parts/Utilities.js"]],function(t,e){var i=e.attr,s=e.defined,o=e.extend,n=e.pick,a=e.pInt,r=t.createElement,l=t.css,h=t.isFirefox,c=t.isMS,d=t.isWebKit,p=t.SVGElement;e=t.SVGRenderer;var u=t.win;o(p.prototype,{htmlCss:function(t){var e="SPAN"===this.element.tagName&&t&&"width"in t,i=n(e&&t.width,void 0);if(e){delete t.width,this.textWidth=i;var s=!0}return t&&"ellipsis"===t.textOverflow&&(t.whiteSpace="nowrap",t.overflow="hidden"),this.styles=o(this.styles,t),l(this.element,t),s&&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,n=this.x||0,r=this.y||0,h=this.textAlign||"left",c={left:0,center:.5,right:1}[h],d=this.styles,p=d&&d.whiteSpace;if(l(e,{marginLeft:i,marginTop:o}),!t.styledMode&&this.shadows&&this.shadows.forEach(function(t){l(t,{marginLeft:i+1,marginTop:o+1})}),this.inverted&&[].forEach.call(e.childNodes,function(i){t.invertChild(i,e)}),"SPAN"===e.tagName){d=this.rotation;var u,f=this.textWidth&&a(this.textWidth),g=[d,h,e.innerHTML,this.textWidth,this.textAlign].join();(u=f!==this.oldTextWidth)&&!(u=f>this.oldTextWidth)&&((u=this.textPxLength)||(l(e,{width:"",whiteSpace:p||"nowrap"}),u=e.offsetWidth),u=u>f),u&&(/[ \-]/.test(e.textContent||e.innerText)||"ellipsis"===e.style.textOverflow)?(l(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,!s(d)||d===(this.oldRotation||0)&&h===this.oldAlign||this.setSpanRotation(d,c,p),this.getSpanCorrection(!s(d)&&this.textPxLength||e.offsetWidth,p,c,d,h)),l(e,{left:n+(this.xCorr||0)+"px",top:r+(this.yCorr||0)+"px"}),this.cTT=g,this.oldRotation=d,this.oldAlign=h}}else this.alignOnAdd=!0},setSpanRotation:function(t,e,i){var s={},o=this.renderer.getTransformKey();s[o]=s.transform="rotate("+t+"deg)",s[o+(h?"Origin":"-origin")]=s.transformOrigin=100*e+"% "+i+"px",l(this.element,s)},getSpanCorrection:function(t,e,i){this.xCorr=-t*i,this.yCorr=-e}}),o(e.prototype,{getTransformKey:function(){return c&&!/Edge/.test(u.navigator.userAgent)?"-ms-transform":d?"-webkit-transform":h?"MozTransform":u.opera?"-o-transform":""},html:function(t,e,s){var a=this.createElement("span"),l=a.element,h=a.renderer,c=h.isSVG,d=function(t,e){["opacity","visibility"].forEach(function(i){t[i+"Setter"]=function(s,o,n){var a=t.div?t.div.style:e;p.prototype[i+"Setter"].call(this,s,o,n),a&&(a[o]=s)}}),t.addedSetters=!0};return a.textSetter=function(t){t!==l.innerHTML&&(delete this.bBox,delete this.oldTextWidth),this.textStr=t,l.innerHTML=n(t,""),a.doTransform=!0},c&&d(a,a.element.style),a.xSetter=a.ySetter=a.alignSetter=a.rotationSetter=function(t,e){"align"===e&&(e="textAlign"),a[e]=t,a.doTransform=!0},a.afterSetters=function(){this.doTransform&&(this.htmlUpdateTransform(),this.doTransform=!1)},a.attr({text:t,x:Math.round(e),y:Math.round(s)}).css({position:"absolute"}),h.styledMode||a.css({fontFamily:this.style.fontFamily,fontSize:this.style.fontSize}),l.style.whiteSpace="nowrap",a.css=a.htmlCss,c&&(a.add=function(t){var e=h.box.parentNode,s=[];if(this.parentGroup=t){var n=t.div;if(!n){for(;t;)s.push(t),t=t.parentGroup;s.reverse().forEach(function(t){function l(e,i){t[i]=e,"translateX"===i?c.left=e+"px":c.top=e+"px",t.doTransform=!0}var h=i(t.element,"class");n=t.div=t.div||r("div",h?{className:h}:void 0,{position:"absolute",left:(t.translateX||0)+"px",top:(t.translateY||0)+"px",display:t.display,opacity:t.opacity,pointerEvents:t.styles&&t.styles.pointerEvents},n||e);var c=n.style;o(t,{classSetter:function(t){return function(e){this.element.setAttribute("class",e),t.className=e}}(n),on:function(){return s[0].div&&a.on.apply({element:s[0].div},arguments),t},translateXSetter:l,translateYSetter:l}),t.addedSetters||d(t)})}}else n=e;return n.appendChild(l),a.added=!0,a.alignOnAdd&&a.htmlUpdateTransform(),a}),a}})}),e(i,"parts/Time.js",[i["parts/Globals.js"],i["parts/Utilities.js"]],function(t,e){var i=e.defined,s=e.extend,o=e.isObject,n=e.objectEach,a=e.pick,r=e.splat,l=t.merge,h=t.timeUnits,c=t.win;t.Time=function(t){this.update(t,!1)},t.Time.prototype={defaultOptions:{Date:void 0,getTimezoneOffset:void 0,timezone:void 0,timezoneOffset:0,useUTC:!0},update:function(t){var e=a(t&&t.useUTC,!0),i=this;this.options=t=l(!0,this.options||{},t),this.Date=t.Date||c.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(),o=s-i.getTimezoneOffset(e);return e.setTime(o),t=e["getUTC"+t](),e.setTime(s),t},this.set=function(t,e,s){if("Milliseconds"===t||"Seconds"===t||"Minutes"===t&&0==e.getTimezoneOffset()%60)e["set"+t](s);else{var o=i.getTimezoneOffset(e);o=e.getTime()-o,e.setTime(o),e["setUTC"+t](s),t=i.getTimezoneOffset(e),o=e.getTime()+t,e.setTime(o)}}):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,n,r){if(this.useUTC){var l=this.Date.UTC.apply(0,arguments),h=this.getTimezoneOffset(l);l+=h;var c=this.getTimezoneOffset(l);h!==c?l+=c-h:h-36e5!==this.getTimezoneOffset(l-36e5)||t.isSafari||(l-=36e5)}else l=new this.Date(e,i,a(s,1),a(o,0),a(n,0),a(r,0)).getTime();return l},timezoneOffsetFunction:function(){var e=this,i=this.options,s=c.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,o,r){if(!i(o)||isNaN(o))return t.defaultOptions.lang.invalidDate||"";e=a(e,"%Y-%m-%d %H:%M:%S");var l=this,h=new this.Date(o),c=this.get("Hours",h),d=this.get("Day",h),p=this.get("Date",h),u=this.get("Month",h),f=this.get("FullYear",h),g=t.defaultOptions.lang,m=g.weekdays,v=g.shortWeekdays,x=t.pad;return h=s({a:v?v[d]:m[d].substr(0,3),A:m[d],d:x(p),e:x(p,2," "),w:d,b:g.shortMonths[u],B:g.months[u],m:x(u+1),o:u+1,y:f.toString().substr(2,2),Y:f,H:x(c),k:c,I:x(c%12||12),l:c%12||12,M:x(l.get("Minutes",h)),p:12>c?"AM":"PM",P:12>c?"am":"pm",S:x(h.getSeconds()),L:x(Math.floor(o%1e3),3)},t.dateFormats),n(h,function(t,i){for(;-1!==e.indexOf("%"+i);)e=e.replace("%"+i,"function"==typeof t?t.call(l,o):t)}),r?e.substr(0,1).toUpperCase()+e.substr(1):e},resolveDTLFormat:function(t){return o(t,!0)?t:(t=r(t),{main:t[0],from:t[1],to:t[2]})},getTimeTicks:function(t,e,o,n){var r,l=this,c=[],d={},p=new l.Date(e),u=t.unitRange,f=t.count||1;if(n=a(n,1),i(e)){if(l.set("Milliseconds",p,u>=h.second?0:f*Math.floor(l.get("Milliseconds",p)/f)),u>=h.second&&l.set("Seconds",p,u>=h.minute?0:f*Math.floor(l.get("Seconds",p)/f)),u>=h.minute&&l.set("Minutes",p,u>=h.hour?0:f*Math.floor(l.get("Minutes",p)/f)),u>=h.hour&&l.set("Hours",p,u>=h.day?0:f*Math.floor(l.get("Hours",p)/f)),u>=h.day&&l.set("Date",p,u>=h.month?1:Math.max(1,f*Math.floor(l.get("Date",p)/f))),u>=h.month){l.set("Month",p,u>=h.year?0:f*Math.floor(l.get("Month",p)/f));var g=l.get("FullYear",p)}u>=h.year&&l.set("FullYear",p,g-g%f),u===h.week&&(g=l.get("Day",p),l.set("Date",p,l.get("Date",p)-g+n+(g<n?-7:0))),g=l.get("FullYear",p),n=l.get("Month",p);var m=l.get("Date",p),v=l.get("Hours",p);for(e=p.getTime(),l.variableTimezone&&(r=o-e>4*h.month||l.getTimezoneOffset(e)!==l.getTimezoneOffset(o)),e=p.getTime(),p=1;e<o;)c.push(e),e=u===h.year?l.makeTime(g+p*f,0):u===h.month?l.makeTime(g,n+p*f):!r||u!==h.day&&u!==h.week?r&&u===h.hour&&1<f?l.makeTime(g,n,m,v+p*f):e+u*f:l.makeTime(g,n,m+p*f*(u===h.day?1:7)),p++;c.push(e),u<=h.hour&&1e4>c.length&&c.forEach(function(t){0==t%18e5&&"000000000"===l.dateFormat("%H%M%S%L",t)&&(d[t]="day")})}return c.info=s(t,{higherRanks:d,totalRange:u*f}),c}}}),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},caption:{margin:15,text:"",align:"left",verticalAlign:"bottom"},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),(e.time||e.global)&&t.time.update(i(t.defaultOptions.global,t.defaultOptions.time,e.global,e.time)),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"],i["parts/Utilities.js"]],function(t,e){var i=e.defined,s=e.destroyObjectProperties,o=e.extend,n=e.isNumber,a=e.pick,r=t.correctFloat,l=t.fireEvent,h=t.merge,c=t.deg2rad;t.Tick=function(t,e,i,s,o){this.axis=t,this.pos=e,this.type=i||"",this.isNewLabel=this.isNew=!0,this.parameters=o||{},this.tickmarkOffset=this.parameters.tickmarkOffset,this.options=this.parameters.options,i||s||this.addLabel()},t.Tick.prototype={addLabel:function(){var t=this,e=t.axis,s=e.options,n=e.chart,l=e.categories,c=e.names,d=t.pos,p=a(t.options&&t.options.labels,s.labels),u=e.tickPositions,f=d===u[0],g=d===u[u.length-1];l=this.parameters.category||(l?a(l[d],c[d],d):d);var m=t.label;u=u.info;var v,x;if(e.isDatetimeAxis&&u)var y=n.time.resolveDTLFormat(s.dateTimeLabelFormats[!s.grid&&u.higherRanks[d]||u.unitName]),b=y.main;t.isFirst=f,t.isLast=g,t.formatCtx={axis:e,chart:n,isFirst:f,isLast:g,dateTimeLabelFormat:b,tickPositionInfo:u,value:e.isLog?r(e.lin2log(l)):l,pos:d},s=e.labelFormatter.call(t.formatCtx,this.formatCtx),(x=y&&y.list)&&(t.shortenLabel=function(){for(v=0;v<x.length;v++)if(m.attr({text:e.labelFormatter.call(o(t.formatCtx,{dateTimeLabelFormat:x[v]}))}),m.getBBox().width<e.getSlotWidth(t)-2*a(p.padding,5))return;m.attr({text:""})}),i(m)?m&&m.textStr!==s&&(!m.textWidth||p.style&&p.style.width||m.styles.width||m.css({width:null}),m.attr({text:s}),m.textPxLength=m.getBBox().width):((t.label=m=i(s)&&p.enabled?n.renderer.text(s,0,0,p.useHTML).add(e.labelGroup):null)&&(n.styledMode||m.css(h(p.style)),m.textPxLength=m.getBBox().width),t.rotation=0)},getLabelSize:function(){return this.label?this.label.getBBox()[this.axis.horiz?"height":"width"]:0},handleOverflow:function(t){var e=this.axis,i=e.options.labels,s=t.x,o=e.chart.chartWidth,n=e.chart.spacing,r=a(e.labelLeft,Math.min(e.pos,n[3]));n=a(e.labelRight,Math.max(e.isRadial?0:e.pos+e.len,o-n[1]));var l,h=this.label,d=this.rotation,p={left:0,center:.5,right:1}[e.labelAlign||h.attr("align")],u=h.getBBox().width,f=e.getSlotWidth(this),g=f,m=1,v={};d||"justify"!==a(i.overflow,"justify")?0>d&&s-p*u<r?l=Math.round(s/Math.cos(d*c)-r):0<d&&s+p*u>n&&(l=Math.round((o-s)/Math.cos(d*c))):(o=s+(1-p)*u,s-p*u<r?g=t.x+g*(1-p)-r:o>n&&(g=n-t.x+g*p,m=-1),g=Math.min(f,g),g<f&&"center"===e.labelAlign&&(t.x+=m*(f-g-p*(f-Math.min(u,g)))),(u>g||e.autoRotation&&(h.styles||{}).width)&&(l=g)),l&&(this.shortenLabel?this.shortenLabel():(v.width=Math.floor(l),(i.style||{}).textOverflow||(v.textOverflow="ellipsis"),h.css(v)))},getPosition:function(e,i,s,o){var n=this.axis,a=n.chart,r=o&&a.oldChartHeight||a.chartHeight;return e={x:e?t.correctFloat(n.translate(i+s,null,null,o)+n.transB):n.left+n.offset+(n.opposite?(o&&a.oldChartWidth||a.chartWidth)-n.right-n.left:0),y:e?r-n.bottom+n.offset-(n.opposite?n.height:0):t.correctFloat(r-n.translate(i+s,null,null,o)-n.transB)},e.y=Math.max(Math.min(e.y,1e5),-1e5),l(this,"afterGetPosition",{pos:e}),e},getLabelPosition:function(t,e,s,o,n,a,r,h){var d=this.axis,p=d.transA,u=d.isLinked&&d.linkedParent?d.linkedParent.reversed:d.reversed,f=d.staggerLines,g=d.tickRotCorr||{x:0,y:0},m=n.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*c)*(g.y-s.getBBox(!1,0).height/2)),t=t+n.x+v+g.x-(a&&o?a*p*(u?-1:1):0),e=e+m-(a&&!o?a*p*(u?1:-1):0),f&&(s=r/(h||1)%f,d.opposite&&(s=f-s-1),e+=d.labelOffset/f*s),x.x=t,x.y=Math.round(e),l(this,"afterGetLabelPosition",{pos:x,tickmarkOffset:a,index:r}),x},getMarkPath:function(t,e,i,s,o,n){return n.crispLine(["M",t,e,"L",t+(o?0:-i),e+(o?i:0)],s)},renderGridLine:function(t,e,i){var s=this.axis,o=s.options,n=this.gridLine,r={},l=this.pos,h=this.type,c=a(this.tickmarkOffset,s.tickmarkOffset),d=s.chart.renderer,p=h?h+"Grid":"grid",u=o[p+"LineWidth"],f=o[p+"LineColor"];o=o[p+"LineDashStyle"],n||(s.chart.styledMode||(r.stroke=f,r["stroke-width"]=u,o&&(r.dashstyle=o)),h||(r.zIndex=1),t&&(e=0),this.gridLine=n=d.path().attr(r).addClass("highcharts-"+(h?h+"-":"")+"grid-line").add(s.gridGroup)),n&&(i=s.getPlotLinePath({value:l+c,lineWidth:n.strokeWidth()*i,force:"pass",old:t}))&&n[t||this.isNew?"attr":"animate"]({d:i,opacity:e})},renderMark:function(t,e,i){var s=this.axis,o=s.options,n=s.chart.renderer,r=this.type,l=r?r+"Tick":"tick",h=s.tickSize(l),c=this.mark,d=!c,p=t.x;t=t.y;var u=a(o[l+"Width"],!r&&s.isXAxis?1:0);o=o[l+"Color"],h&&(s.opposite&&(h[0]=-h[0]),d&&(this.mark=c=n.path().addClass("highcharts-"+(r?r+"-":"")+"tick").add(s.axisGroup),s.chart.styledMode||c.attr({stroke:o,"stroke-width":u})),c[d?"attr":"animate"]({d:this.getMarkPath(p,t,h[0],c.strokeWidth()*i,s.horiz,n),opacity:e}))},renderLabel:function(t,e,i,s){var o=this.axis,r=o.horiz,l=o.options,h=this.label,c=l.labels,d=c.step;o=a(this.tickmarkOffset,o.tickmarkOffset);var p=!0,u=t.x;t=t.y,h&&n(u)&&(h.xy=t=this.getLabelPosition(u,t,h,r,c,o,s,d),this.isFirst&&!this.isLast&&!a(l.showFirstLabel,1)||this.isLast&&!this.isFirst&&!a(l.showLastLabel,1)?p=!1:!r||c.step||c.rotation||e||0===i||this.handleOverflow(t),d&&s%d&&(p=!1),p&&n(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 o=this.axis,n=o.horiz,r=this.pos,l=a(this.tickmarkOffset,o.tickmarkOffset);r=this.getPosition(n,r,l,i),l=r.x;var h=r.y;o=n&&l===o.pos+o.len||!n&&h===o.pos?-1:1,s=a(s,1),this.isActive=!0,this.renderGridLine(i,s,o),this.renderMark(r,s,o),this.renderLabel(r,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"],i["parts/Utilities.js"]],function(t,e){var i=e.arrayMax,s=e.arrayMin,o=e.defined,n=e.destroyObjectProperties,a=e.extend,r=e.isArray,l=e.isNumber,h=e.isString,c=e.objectEach,d=e.pick,p=e.splat,u=e.syncTimeout,f=t.addEvent,g=t.animObject,m=t.color,v=t.correctFloat,x=t.defaultOptions,y=t.deg2rad,b=t.fireEvent,w=t.format,k=t.getMagnitude,M=t.merge,S=t.normalizeTickInterval,T=t.removeEvent,C=t.seriesTypes,A=t.Tick;return e=function(){this.init.apply(this,arguments)},a(e.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,crop:!0,overflow:"justify",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(e,i){var s=i.isX,n=this;n.chart=e,n.horiz=e.inverted&&!n.isZAxis?!s:s,n.isXAxis=s,n.coll=n.coll||(s?"xAxis":"yAxis"),b(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 a=this.options,r=a.type;n.labelFormatter=a.labels.formatter||n.defaultLabelFormatter,n.userOptions=i,n.minPixelPadding=0,n.reversed=a.reversed,n.visible=!1!==a.visible,n.zoomEnabled=!1!==a.zoomEnabled,n.hasNames="category"===r||!0===a.categories,n.categories=a.categories||n.hasNames,n.names||(n.names=[],n.names.keys={}),n.plotLinesAndBandsGroups={},n.isLog="logarithmic"===r,n.isDatetimeAxis="datetime"===r,n.positiveValuesOnly=n.isLog&&!n.allowNegativeLog,n.isLinked=o(a.linkedTo),n.ticks={},n.labelEdge=[],n.minorTicks={},n.plotLinesAndBands=[],n.alternateBands={},n.len=0,n.minRange=n.userMinRange=a.minRange||a.maxZoom,n.range=a.range,n.offset=a.offset||0,n.stacks={},n.oldStacks={},n.stacksTouched=0,n.max=null,n.min=null,n.crosshair=d(a.crosshair,p(e.options.tooltip.crosshairs)[s?0:1],!1),i=n.options.events,-1===e.axes.indexOf(n)&&(s?e.axes.splice(e.xAxis.length,0,n):e.axes.push(n),e[n.coll].push(n)),n.series=n.series||[],e.inverted&&!n.isZAxis&&s&&void 0===n.reversed&&(n.reversed=!0),c(i,function(e,i){t.isFunction(e)&&f(n,i,e)}),n.lin2log=a.linearToLogConverter||n.lin2log,n.isLog&&(n.val2lin=n.log2lin,n.lin2val=n.lin2log),b(this,"afterInit")},setOptions:function(t){this.options=M(this.defaultOptions,"yAxis"===this.coll&&this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],M(x[this.coll],t)),b(this,"afterSetOptions",{userOptions:t})},defaultLabelFormatter:function(){var e=this.axis,i=this.value,s=e.chart.time,o=e.categories,n=this.dateTimeLabelFormat,a=x.lang,r=a.numericSymbols;a=a.numericSymbolMagnitude||1e3;var l=r&&r.length,h=e.options.labels.format;if(e=e.isLog?Math.abs(i):e.tickInterval,h)var c=w(h,this,s);else if(o)c=i;else if(n)c=s.dateFormat(n,i);else if(l&&1e3<=e)for(;l--&&void 0===c;)s=Math.pow(a,l+1),e>=s&&0==10*i%s&&null!==r[l]&&0!==i&&(c=t.numberFormat(i/s,-1)+r[l]);return void 0===c&&(c=1e4<=Math.abs(i)?t.numberFormat(i,-1):t.numberFormat(i,-1,void 0,"")),c},getSeriesExtremes:function(){var t,e=this,i=e.chart;b(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=s.options,a=n.threshold;if(e.hasVisibleSeries=!0,e.positiveValuesOnly&&0>=a&&(a=null),e.isXAxis){if(n=s.xData,n.length){t=s.getXExtremes(n);var r=t.min,h=t.max;l(r)||r instanceof Date||(n=n.filter(l),t=s.getXExtremes(n),r=t.min,h=t.max),n.length&&(e.dataMin=Math.min(d(e.dataMin,r),r),e.dataMax=Math.max(d(e.dataMax,h),h))}}else s.getExtremes(),h=s.dataMax,r=s.dataMin,o(r)&&o(h)&&(e.dataMin=Math.min(d(e.dataMin,r),r),e.dataMax=Math.max(d(e.dataMax,h),h)),o(a)&&(e.threshold=a),(!n.softThreshold||e.positiveValuesOnly)&&(e.softThreshold=!1)}})}),b(this,"afterGetSeriesExtremes")},translate:function(t,e,i,s,o,n){var a=this.linkedParent||this,r=1,h=0,c=s?a.oldTransA:a.transA;s=s?a.oldMin:a.min;var d=a.minPixelPadding;return o=(a.isOrdinal||a.isBroken||a.isLog&&o)&&a.lin2val,c||(c=a.transA),i&&(r*=-1,h=a.len),a.reversed&&(r*=-1,h-=r*(a.sector||a.len)),e?(t=(t*r+h-d)/c+s,o&&(t=a.lin2val(t))):(o&&(t=a.val2lin(t)),t=l(s)?r*(t-s)*c+h+r*d+(l(n)?c*n: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){var e,i,s,o,n,a=this,r=a.chart,h=a.left,c=a.top,p=t.old,u=t.value,f=t.translatedValue,g=t.lineWidth,m=t.force,v=p&&r.oldChartHeight||r.chartHeight,x=p&&r.oldChartWidth||r.chartWidth,y=a.transB,w=function(t,e,i){return("pass"!==m&&t<e||t>i)&&(m?t=Math.min(Math.max(e,t),i):n=!0),t};return t={value:u,lineWidth:g,old:p,force:m,acrossPanes:t.acrossPanes,translatedValue:f},b(this,"getPlotLinePath",t,function(t){f=d(f,a.translate(u,null,null,p)),f=Math.min(Math.max(-1e5,f),1e5),e=s=Math.round(f+y),i=o=Math.round(v-f-y),l(f)?a.horiz?(i=c,o=v-a.bottom,e=s=w(e,h,h+a.width)):(e=h,s=x-a.right,i=o=w(i,c,c+a.height)):(n=!0,m=!1),t.path=n&&!m?null:r.renderer.crispLine(["M",e,i,"L",s,o],g||1)}),t.path},getLinearTickPositions:function(t,e,i){var s=v(Math.floor(e/t)*t);i=v(Math.ceil(i/t)*t);var o,n=[];if(v(s+t)===s&&(o=20),this.single)return[e];for(e=s;e<=i&&(n.push(e),(e=v(e+t,o))!==a);)var a=e;return n},getMinorTickInterval:function(){var t=this.options;return!0===t.minorTicks?d(t.minorTickInterval,"auto"):!1===t.minorTicks?null:t.minorTickInterval},getMinorTickPositions:function(){var t=this,e=t.options,i=t.tickPositions,s=t.minorTickInterval,o=[],n=t.pointRangePadding||0,a=t.min-n;n=t.max+n;var r=n-a;if(r&&r/s<t.len/3)if(t.isLog)this.paddedTicks.forEach(function(e,i,n){i&&o.push.apply(o,t.getLogTickPositions(s,n[i-1],n[i],!0))});else if(t.isDatetimeAxis&&"auto"===this.getMinorTickInterval())o=o.concat(t.getTimeTicks(t.normalizeTimeTickInterval(s),a,n,e.startOfWeek));else for(e=a+(i[0]-a)%s;e<=n&&e!==o[0];e+=s)o.push(e);return 0!==o.length&&t.trimTicks(o),o},adjustForMinRange:function(){var t,e,n,a,r,l=this.options,h=this.min,c=this.max;if(this.isXAxis&&void 0===this.minRange&&!this.isLog&&(o(l.min)||o(l.max)?this.minRange=null:(this.series.forEach(function(i){for(a=i.xData,e=r=i.xIncrement?1:a.length-1;0<e;e--)n=a[e]-a[e-1],(void 0===t||n<t)&&(t=n)}),this.minRange=Math.min(5*t,this.dataMax-this.dataMin))),c-h<this.minRange){var p=this.dataMax-this.dataMin>=this.minRange,u=this.minRange,f=(u-c+h)/2;f=[h-f,d(l.min,h-f)],p&&(f[2]=this.isLog?this.log2lin(this.dataMin):this.dataMin),h=i(f),c=[h+u,d(l.max,h+u)],p&&(c[2]=this.isLog?this.log2lin(this.dataMax):this.dataMax),c=s(c),c-h<u&&(f[0]=c-u,f[1]=d(l.min,c-u),h=i(f))}this.min=h,this.max=c},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&&o(i)&&s&&(t=o(t)?Math.min(t,i):i)}),t},nameToX:function(t){var e=r(this.categories),i=e?this.categories:this.names,s=t.options.x;if(t.series.requireSorting=!1,o(s)||(s=!1===this.options.uniqueNames?t.series.autoIncrement():e?i.indexOf(t.name):d(i.keys[t.name],-1)),-1===s){if(!e)var n=i.length}else n=s;return void 0!==n&&(this.names[n]=t.name,this.names.keys[t.name]=n),n},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){if(i&&i.options&&void 0!==i.name){var o=t.nameToX(i);void 0!==o&&o!==i.x&&(i.x=o,e.xData[s]=o)}})}))},setAxisTranslation:function(t){var e=this,i=e.max-e.min,s=e.axisPointRange||0,o=0,n=0,a=e.linkedParent,r=!!e.categories,l=e.transA,c=e.isXAxis;if(c||r||s){var p=e.getClosest();a?(o=a.minPointOffset,n=a.pointRangePadding):e.series.forEach(function(t){var i=r?1:c?d(t.options.pointRange,p,0):e.axisPointRange||0,a=t.options.pointPlacement;s=Math.max(s,i),e.single&&!r||(t=C.xrange&&t instanceof C.xrange?!c:c,o=Math.max(o,t&&h(a)?0:i/2),n=Math.max(n,t&&"on"===a?0:i))}),a=e.ordinalSlope&&p?e.ordinalSlope/p:1,e.minPointOffset=o*=a,e.pointRangePadding=n*=a,e.pointRange=Math.min(s,e.single&&r?1:i),c&&(e.closestPointRange=p)}t&&(e.oldTransA=l),e.translationSlope=e.transA=l=e.staticScale||e.len/(i+n||1),e.transB=e.horiz?e.left:e.bottom,e.minPixelPadding=l*o,b(this,"afterSetAxisTranslation")},minFromRange:function(){return this.max-this.range},setTickInterval:function(e){var i=this,s=i.chart,n=i.options,a=i.isLog,r=i.isDatetimeAxis,h=i.isXAxis,c=i.isLinked,p=n.maxPadding,u=n.minPadding,f=n.tickInterval,g=n.tickPixelInterval,m=i.categories,x=l(i.threshold)?i.threshold:null,y=i.softThreshold;r||m||c||this.getTickAmount();var w=d(i.userMin,n.min),M=d(i.userMax,n.max);if(c){i.linkedParent=s[i.coll][n.linkedTo];var T=i.linkedParent.getExtremes();i.min=d(T.min,T.dataMin),i.max=d(T.max,T.dataMax),n.type!==i.linkedParent.options.type&&t.error(11,1,s)}else{if(!y&&o(x))if(i.dataMin>=x)T=x,u=0;else if(i.dataMax<=x){var C=x;p=0}i.min=d(w,T,i.dataMin),i.max=d(M,C,i.dataMax)}a&&(i.positiveValuesOnly&&!e&&0>=Math.min(i.min,d(i.dataMin,i.min))&&t.error(10,1,s),i.min=v(i.log2lin(i.min),16),i.max=v(i.log2lin(i.max),16)),i.range&&o(i.max)&&(i.userMin=i.min=w=Math.max(i.dataMin,i.minFromRange()),i.userMax=M=i.max,i.range=null),b(i,"foundExtremes"),i.beforePadding&&i.beforePadding(),i.adjustForMinRange(),!(m||i.axisPointRange||i.usePercentage||c)&&o(i.min)&&o(i.max)&&(s=i.max-i.min)&&(!o(w)&&u&&(i.min-=s*u),!o(M)&&p&&(i.max+=s*p)),l(n.softMin)&&!l(i.userMin)&&n.softMin<i.min&&(i.min=w=n.softMin),l(n.softMax)&&!l(i.userMax)&&n.softMax>i.max&&(i.max=M=n.softMax),l(n.floor)&&(i.min=Math.min(Math.max(i.min,n.floor),Number.MAX_VALUE)),l(n.ceiling)&&(i.max=Math.max(Math.min(i.max,n.ceiling),d(i.userMax,-Number.MAX_VALUE))),y&&o(i.dataMin)&&(x=x||0,!o(w)&&i.min<x&&i.dataMin>=x?i.min=i.options.minRange?Math.min(x,i.max-i.minRange):x:!o(M)&&i.max>x&&i.dataMax<=x&&(i.max=i.options.minRange?Math.max(x,i.min+i.minRange):x)),i.tickInterval=i.min===i.max||void 0===i.min||void 0===i.max?1:c&&!f&&g===i.linkedParent.options.tickPixelInterval?f=i.linkedParent.tickInterval:d(f,this.tickAmount?(i.max-i.min)/Math.max(this.tickAmount-1,1):void 0,m?1:(i.max-i.min)*g/Math.max(i.len,g)),h&&!e&&i.series.forEach(function(t){t.processData(i.min!==i.oldMin||i.max!==i.oldMax)}),i.setAxisTranslation(!0),i.beforeSetTickPositions&&i.beforeSetTickPositions(),i.postProcessTickInterval&&(i.tickInterval=i.postProcessTickInterval(i.tickInterval)),i.pointRange&&!f&&(i.tickInterval=Math.max(i.pointRange,i.tickInterval)),e=d(n.minTickInterval,i.isDatetimeAxis&&i.closestPointRange),!f&&i.tickInterval<e&&(i.tickInterval=e),r||a||f||(i.tickInterval=S(i.tickInterval,null,k(i.tickInterval),d(n.allowDecimals,!(.5<i.tickInterval&&5>i.tickInterval&&1e3<i.max&&9999>i.max)),!!this.tickAmount)),this.tickAmount||(i.tickInterval=i.unsquish()),this.setTickPositions()},setTickPositions:function(){var e=this.options,i=e.tickPositions,s=this.getMinorTickInterval(),n=e.tickPositioner,a=e.startOnTick,r=e.endOnTick;this.tickmarkOffset=this.categories&&"between"===e.tickmarkPlacement&&1===this.tickInterval?.5:0,this.minorTickInterval="auto"===s&&this.tickInterval?this.tickInterval/5:s,this.single=this.min===this.max&&o(this.min)&&!this.tickAmount&&(parseInt(this.min,10)===this.min||!1!==e.allowDecimals),this.tickPositions=s=i&&i.slice(),!s&&(!this.ordinalPositions&&(this.max-this.min)/this.tickInterval>Math.max(2*this.len,200)?(s=[this.min,this.max],t.error(19,!1,this.chart)):s=this.isDatetimeAxis?this.getTimeTicks(this.normalizeTimeTickInterval(this.tickInterval,e.units),this.min,this.max,e.startOfWeek,this.ordinalPositions,this.closestPointRange,!0):this.isLog?this.getLogTickPositions(this.tickInterval,this.min,this.max):this.getLinearTickPositions(this.tickInterval,this.min,this.max),s.length>this.len&&(s=[s[0],s.pop()],s[0]===s[1]&&(s.length=1)),this.tickPositions=s,n&&(n=n.apply(this,[this.min,this.max])))&&(this.tickPositions=s=n),this.paddedTicks=s.slice(0),this.trimTicks(s,a,r),this.isLinked||(this.single&&2>s.length&&!this.categories&&(this.min-=.5,this.max+=.5),i||n||this.adjustTickAmount()),b(this,"afterSetTickPositions")},trimTicks:function(t,e,i){var s=t[0],n=t[t.length-1],a=this.minPointOffset||0;if(b(this,"trimTicks"),!this.isLinked){if(e&&-1/0!==s)this.min=s;else for(;this.min-a>t[0];)t.shift();if(i)this.max=n;else for(;this.max+a<t[t.length-1];)t.pop();0===t.length&&o(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;!o(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,a=this.finalTickAmt,r=s&&s.length,l=d(this.threshold,this.softThreshold?0:null);if(this.hasData()){if(r<n){for(t=this.min;s.length<n;)s.length%2||t===l?s.push(v(s[s.length-1]+i)):s.unshift(v(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(o(a)){for(i=e=s.length;i--;)(3===a&&1==i%2||2>=a&&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&&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(),b(this,"afterSetScale")},setExtremes:function(t,e,i,s,o){var n=this,r=n.chart;i=d(i,!0),n.series.forEach(function(t){delete t.kdTree}),o=a(o,{min:t,max:e}),b(n,"setExtremes",o,function(){n.userMin=t,n.userMax=e,n.eventArgs=o,i&&r.redraw(s)})},zoom:function(t,e){var i=this.dataMin,s=this.dataMax,n=this.options,a=Math.min(i,d(n.min,i)),r=Math.max(s,d(n.max,s));return t={newMin:t,newMax:e},b(this,"zoom",t,function(t){var e=t.newMin,n=t.newMax;e===this.min&&n===this.max||(this.allowZoomOutside||(o(i)&&(e<a&&(e=a),e>r&&(e=r)),o(s)&&(n<a&&(n=a),n>r&&(n=r))),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],o=this.horiz,n=this.width=Math.round(t.relativeLength(d(i.width,e.plotWidth-s[3]+s[1]),e.plotWidth)),a=this.height=Math.round(t.relativeLength(d(i.height,e.plotHeight-s[0]+s[2]),e.plotHeight)),r=this.top=Math.round(t.relativeLength(d(i.top,e.plotTop+s[0]),e.plotHeight,e.plotTop));i=this.left=Math.round(t.relativeLength(d(i.left,e.plotLeft+s[3]),e.plotWidth,e.plotLeft)),this.bottom=e.chartHeight-a-r,this.right=e.chartWidth-n-i,this.len=Math.max(o?n:a,0),this.pos=o?i:r},getExtremes:function(){var t=this.isLog;return{min:t?v(this.lin2log(this.min)):this.min,max:t?v(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;return e=e?this.lin2log(this.max):this.max,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=(d(t,0)-90*this.side+720)%360;return t={align:"center"},b(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=this.options,i=e[t+"Length"],s=d(e[t+"Width"],"tick"===t&&this.isXAxis&&!this.categories?1:0);if(s&&i){"inside"===e[t+"Position"]&&(i=-i);var o=[i,s]}return t={tickSize:o},b(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,a=this.tickInterval,r=a,l=this.len/(((this.categories?1:0)+this.max-this.min)/a),h=s.rotation,c=this.labelMetrics(),p=Number.MAX_VALUE,u=this.max-this.min,f=function(t){var e=t/(l||1);return e=1<e?Math.ceil(e):1,e*a>u&&1/0!==t&&1/0!==l&&u&&(e=Math.ceil(u/a)),v(e*a)};return n?(i=!s.staggerLines&&!s.step&&(o(h)?[h]:l<d(s.autoRotationLimit,80)&&s.autoRotation))&&i.forEach(function(i){if(i===h||i&&-90<=i&&90>=i){e=f(Math.abs(c.h/Math.sin(y*i)));var s=e+Math.abs(i/360);s<p&&(p=s,t=i,r=e)}}):s.step||(r=f(c.h)),this.autoRotation=i,this.labelRotation=d(t,h),r},getSlotWidth:function(t){var e=this.chart,i=this.horiz,s=this.options.labels,o=Math.max(this.tickPositions.length-(this.categories?0:1),1),n=e.margin[3];return t&&t.slotWidth||i&&2>(s.step||0)&&!s.rotation&&(this.staggerLines||1)*this.len/o||!i&&(s.style&&parseInt(s.style.width,10)||n&&n-e.spacing[3]||.33*e.chartWidth)},renderUnsquish:function(){var t=this.chart,e=t.renderer,i=this.tickPositions,s=this.ticks,o=this.options.labels,n=o&&o.style||{},a=this.horiz,r=this.getSlotWidth(),l=Math.max(1,Math.round(r-2*(o.padding||5))),c={},d=this.labelMetrics(),p=o.style&&o.style.textOverflow,u=0;if(h(o.rotation)||(c.rotation=o.rotation||0),i.forEach(function(t){(t=s[t])&&t.label&&t.label.textPxLength>u&&(u=t.label.textPxLength)}),this.maxLabelLength=u,this.autoRotation)u>l&&u>d.h?c.rotation=this.labelRotation:this.labelRotation=0;else if(r){var f=l;if(!p){var g="clip";for(l=i.length;!a&&l--;){var m=i[l];(m=s[m].label)&&(m.styles&&"ellipsis"===m.styles.textOverflow?m.css({textOverflow:"clip"}):m.textPxLength>r&&m.css({width:r+"px"}),m.getBBox().height>this.len/i.length-(d.h-d.f)&&(m.specificTextOverflow="ellipsis"))}}}c.rotation&&(f=u>.5*t.chartHeight?.33*t.chartHeight:u,p||(g="ellipsis")),(this.labelAlign=o.align||this.autoLabelAlign(this.labelRotation))&&(c.align=this.labelAlign),i.forEach(function(t){var e=(t=s[t])&&t.label,i=n.width,o={};e&&(e.attr(c),t.shortenLabel?t.shortenLabel():f&&!i&&"nowrap"!==n.whiteSpace&&(f<e.textPxLength||"SPAN"===e.element.tagName)?(o.width=f,p||(o.textOverflow=e.specificTextOverflow||g),e.css(o)):e.styles&&e.styles.width&&!o.width&&!i&&e.css({width:null}),delete e.specificTextOverflow,t.rotation=c.rotation)},this),this.tickRotCorr=e.rotCorr(d.b,this.labelRotation||0,0!==this.side)},hasData:function(){return this.series.some(function(t){return t.hasData()})||this.options.showEmpty&&o(this.min)&&o(this.max)},addTitle:function(t){var e,i=this.chart.renderer,s=this.horiz,o=this.opposite,n=this.options.title,a=this.chart.styledMode;this.axisTitle||((e=n.textAlign)||(e=(s?{low:"left",middle:"center",high:"right"}:{low:o?"right":"left",middle:"center",high:o?"left":"right"})[n.align]),this.axisTitle=i.text(n.text,0,0,n.useHTML).attr({zIndex:7,rotation:n.rotation||0,align:e}).addClass("highcharts-axis-title"),a||this.axisTitle.css(M(n.style)),this.axisTitle.add(this.axisGroup),this.axisTitle.isNew=!0),a||n.style.width||this.isRadial||this.axisTitle.css({width:this.len}),this.axisTitle[t?"show":"hide"](t)},generateTick:function(t){var e=this.ticks;e[t]?e[t].addLabel():e[t]=new A(this,t)},getOffset:function(){var t,e=this,i=e.chart,s=i.renderer,n=e.options,a=e.tickPositions,r=e.ticks,l=e.horiz,h=e.side,p=i.inverted&&!e.isZAxis?[1,0,3,2][h]:h,u=0,f=0,g=n.title,m=n.labels,v=0,x=i.axisOffset;i=i.clipOffset;var y=[-1,1,1,-1][h],w=n.className,k=e.axisParent,M=e.hasData();if(e.showAxis=t=M||d(n.showEmpty,!0),e.staggerLines=e.horiz&&m.staggerLines,e.axisGroup||(e.gridGroup=s.g("grid").attr({zIndex:n.gridZIndex||1}).addClass("highcharts-"+this.coll.toLowerCase()+"-grid "+(w||"")).add(k),e.axisGroup=s.g("axis").attr({zIndex:n.zIndex||2}).addClass("highcharts-"+this.coll.toLowerCase()+" "+(w||"")).add(k),e.labelGroup=s.g("axis-labels").attr({zIndex:m.zIndex||7}).addClass("highcharts-"+e.coll.toLowerCase()+"-labels "+(w||"")).add(k)),M||e.isLinked?(a.forEach(function(t,i){e.generateTick(t,i)}),e.renderUnsquish(),e.reserveSpaceDefault=0===h||2===h||{1:"left",3:"right"}[h]===e.labelAlign,d(m.reserveSpace,"center"===e.labelAlign||null,e.reserveSpaceDefault)&&a.forEach(function(t){v=Math.max(r[t].getLabelSize(),v)}),e.staggerLines&&(v*=e.staggerLines),e.labelOffset=v*(e.opposite?-1:1)):c(r,function(t,e){t.destroy(),delete r[e]}),g&&g.text&&!1!==g.enabled&&(e.addTitle(t),t&&!1!==g.reserveSpace)){e.titleOffset=u=e.axisTitle.getBBox()[l?"height":"width"];var S=g.offset;f=o(S)?0:d(g.margin,l?5:10)}e.renderLine(),e.offset=y*d(n.offset,x[h]?x[h]+(n.margin||0):0),e.tickRotCorr=e.tickRotCorr||{x:0,y:0},s=0===h?-e.labelMetrics().h:2===h?e.tickRotCorr.y:0,f=Math.abs(v)+f,v&&(f=f-s+y*(l?d(m.y,e.tickRotCorr.y+8*y):m.x)),e.axisTitleMargin=d(S,f),e.getMaxLabelDimensions&&(e.maxLabelDimensions=e.getMaxLabelDimensions(r,a)),l=this.tickSize("tick"),x[h]=Math.max(x[h],e.axisTitleMargin+u+y*e.offset,f,a&&a.length&&l?l[0]+y*e.offset:0),n=n.offset?0:2*Math.floor(e.axisLine.strokeWidth()/2),i[p]=Math.max(i[p],n),b(this,"afterGetOffset")},getLinePath:function(t){var e=this.chart,i=this.opposite,s=this.offset,o=this.horiz,n=this.left+(i?this.width:0)+s;return s=e.chartHeight-this.bottom-(i?this.height:0)+s,i&&(t*=-1),e.renderer.crispLine(["M",o?this.left:n,o?s:this.top,"L",o?e.chartWidth-this.right:n,o?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,o=this.options.title,n=t?e:i,a=this.opposite,r=this.offset,l=o.x||0,h=o.y||0,c=this.axisTitle,d=this.chart.renderer.fontMetrics(o.style&&o.style.fontSize,c);return c=Math.max(c.getBBox(null,0).height-d.h-1,0),s={low:n+(t?0:s),middle:n+s/2,high:n+(t?s:0)}[o.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},b(this,"afterGetTitlePosition",{titlePosition:t}),t},renderMinorTick:function(t){var e=this.chart.hasRendered&&l(this.oldMin),i=this.minorTicks;i[t]||(i[t]=new A(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,o=this.chart.hasRendered&&l(this.oldMin);(!i||t>=this.min&&t<=this.max)&&(s[t]||(s[t]=new A(this,t)),o&&s[t].isNew&&s[t].render(e,!0,-1),s[t].render(e))},render:function(){var e,i,s=this,o=s.chart,n=s.options,a=s.isLog,r=s.isLinked,h=s.tickPositions,d=s.axisTitle,p=s.ticks,f=s.minorTicks,m=s.alternateBands,v=n.stackLabels,x=n.alternateGridColor,y=s.tickmarkOffset,w=s.axisLine,k=s.showAxis,M=g(o.renderer.globalAnimation);s.labelEdge.length=0,s.overlap=!1,[p,f,m].forEach(function(t){c(t,function(t){t.isActive=!1})}),(s.hasData()||r)&&(s.minorTickInterval&&!s.categories&&s.getMinorTickPositions().forEach(function(t){s.renderMinorTick(t)}),h.length&&(h.forEach(function(t,e){s.renderTick(t,e)}),y&&(0===s.min||s.single)&&(p[-1]||(p[-1]=new A(s,-1,null,!0)),p[-1].render(-1))),x&&h.forEach(function(n,r){i=void 0!==h[r+1]?h[r+1]+y:s.max-y,0==r%2&&n<s.max&&i<=s.max+(o.polar?-y:y)&&(m[n]||(m[n]=new t.PlotLineOrBand(s)),e=n+y,m[n].options={from:a?s.lin2log(e):e,to:a?s.lin2log(i):i,color:x},m[n].render(),m[n].isActive=!0)}),s._addedPlotLB||((n.plotLines||[]).concat(n.plotBands||[]).forEach(function(t){s.addPlotBandOrLine(t)}),s._addedPlotLB=!0)),[p,f,m].forEach(function(t){var e,i=[],s=M.duration;c(t,function(t,e){t.isActive||(t.render(e,!1,0),t.isActive=!1,i.push(e))}),u(function(){for(e=i.length;e--;)t[i[e]]&&!t[i[e]].isActive&&(t[i[e]].destroy(),delete t[i[e]])},t!==m&&o.hasRendered&&s?s:0)}),w&&(w[w.isPlaced?"animate":"attr"]({d:this.getLinePath(w.strokeWidth())}),w.isPlaced=!0,w[k?"show":"hide"](k)),d&&k&&(n=s.getTitlePosition(),l(n.y)?(d[d.isNew?"attr":"animate"](n),d.isNew=!1):(d.attr("y",-9999),d.isNew=!0)),v&&v.enabled&&s.renderStackTotals(),s.isDirty=!1,b(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,o=i.plotLinesAndBands;if(b(this,"destroy",{keepEvents:t}),t||T(i),c(s,function(t,e){n(t),s[e]=null}),[i.ticks,i.minorTicks,i.alternateBands].forEach(function(t){n(t)}),o)for(t=o.length;t--;)o[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();c(i,function(t,e){-1===i.keepProps.indexOf(e)&&delete i[e]})},drawCrosshair:function(t,e){var i,s,n=this.crosshair,a=d(n.snap,!0),r=this.cross;if(b(this,"drawCrosshair",{e:t,point:e}),t||(t=this.cross&&this.cross.e),this.crosshair&&!1!==(o(e)||!a)){if(a?o(e)&&(s=d("colorAxis"!==this.coll?e.crosshairPos:null,this.isXAxis?e.plotX:this.len-e.plotY)):s=t&&(this.horiz?t.chartX-this.pos:this.len-t.chartY+this.pos),o(s)&&(i=this.getPlotLinePath({value:e&&(this.isXAxis?e.x:d(e.stackY,e.y)),translatedValue:s})||null),!o(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:d(n.zIndex,2)}).add(),this.chart.styledMode||(r.attr({stroke:n.color||(a?m("#ccd6eb").setOpacity(.25).get():"#cccccc"),"stroke-width":d(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();b(this,"afterDrawCrosshair",{e:t,point:e})},hideCrosshair:function(){this.cross&&this.cross.hide(),b(this,"afterHideCrosshair")}}),t.Axis=e}),e(i,"parts/DateTimeAxis.js",[i["parts/Globals.js"]],function(t){var e=t.Axis,i=t.getMagnitude,s=t.normalizeTickInterval,o=t.timeUnits;e.prototype.getTimeTicks=function(){return this.chart.time.getTimeTicks.apply(this.chart.time,arguments)},e.prototype.normalizeTimeTickInterval=function(t,e){var n=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=n[n.length-1];var a,r=o[e[0]],l=e[1];for(a=0;a<n.length&&(e=n[a],r=o[e[0]],l=e[1],!(n[a+1]&&t<=(r*l[l.length-1]+o[n[a+1][0]])/2));a++);return r===o.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"],i["parts/Utilities.js"]],function(t,e){var i=e.pick;e=t.Axis;var s=t.getMagnitude,o=t.normalizeTickInterval;e.prototype.getLogTickPositions=function(t,e,n,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,n);else if(.08<=t){l=Math.floor(e);var c,d;for(r=.3<t?[1,2,4]:.15<t?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];l<n+1&&!d;l++){var p=r.length;for(c=0;c<p&&!d;c++){var u=this.log2lin(this.lin2log(l)*r[c]);u>e&&(!a||f<=n)&&void 0!==f&&h.push(f),f>n&&(d=!0);var f=u}}}else e=this.lin2log(e),n=this.lin2log(n),t=a?this.getMinorTickInterval():r.tickInterval,t=i("auto"===t?null:t,this._minorAutoInterval,r.tickPixelInterval/(a?5:1)*(n-e)/((a?l/this.tickPositions.length:l)||1)),t=o(t,null,s(t)),h=this.getLinearTickPositions(t,e,n).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"],i["parts/Utilities.js"]],function(t,e,i){var s=i.arrayMax,o=i.arrayMin,n=i.defined,a=i.destroyObjectProperties,r=i.erase,l=i.extend,h=i.objectEach,c=i.pick,d=t.merge;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,r=e.label,l=o.to,p=o.from,u=o.value,f=n(p)&&n(l),g=n(u),m=e.svgElem,v=!m,x=[],y=o.color,b=c(o.zIndex,0),w=o.events;x={class:"highcharts-plot-"+(f?"band ":"line ")+(o.className||"")};var k={},M=i.chart.renderer,S=f?"bands":"lines";if(i.isLog&&(p=i.log2lin(p),l=i.log2lin(l),u=i.log2lin(u)),i.chart.styledMode||(g?(x.stroke=y||"#999999",x["stroke-width"]=c(o.width,1),o.dashStyle&&(x.dashstyle=o.dashStyle)):f&&(x.fill=y||"#e6ebf5",o.borderWidth&&(x.stroke=o.borderColor,x["stroke-width"]=o.borderWidth))),k.zIndex=b,S+="-"+b,(y=i.plotLinesAndBandsGroups[S])||(i.plotLinesAndBandsGroups[S]=y=M.g("plot-"+S).attr(k).add()),v&&(e.svgElem=m=M.path().attr(x).add(y)),g)x=i.getPlotLinePath({value:u,lineWidth:m.strokeWidth(),acrossPanes:o.acrossPanes});else{if(!f)return;x=i.getPlotBandPath(p,l,o)}return(v||!m.d)&&x&&x.length?(m.attr({d:x}),w&&h(w,function(t,i){m.on(i,function(t){w[i].apply(e,[t])})})):m&&(x?(m.show(!0),m.animate({d:x})):m.d&&(m.hide(),r&&(e.label=r=r.destroy()))),a&&(n(a.text)||n(a.formatter))&&x&&x.length&&0<i.width&&0<i.height&&!x.isFlat?(a=d({align:s&&f&&"center",x:s?!f&&4:10,verticalAlign:!s&&f&&"middle",y:s?f?16:10:f?6:-4,rotation:s&&!f&&90},a),this.renderLabel(a,x,f,b)):r&&r.hide(),e},renderLabel:function(t,e,i,n){var a=this.label,r=this.axis.chart.renderer;a||(a={align:t.textAlign||t.align,rotation:t.rotation,class:"highcharts-plot-"+(i?"band":"line")+"-label "+(t.className||"")},a.zIndex=n,n=this.getLabelText(t),this.label=a=r.text(n,0,0,t.useHTML).attr(a).add(),this.axis.chart.styledMode||a.css(t.style)),r=e.xBounds||[e[1],e[4],i?e[6]:e[1]],e=e.yBounds||[e[2],e[5],i?e[7]:e[2]],i=o(r),n=o(e),a.align(t,!1,{x:i,y:n,width:s(r)-i,height:s(e)-n}),a.show(!0)},getLabelText:function(t){return n(t.formatter)?t.formatter.call(this):t.text},destroy:function(){r(this.axis.plotLinesAndBands,this),delete this.axis,a(this)}},l(e.prototype,{getPlotBandPath:function(t,e){var i=this.getPlotLinePath({value:e,force:!0,acrossPanes:this.options.acrossPanes}),s=this.getPlotLinePath({value:t,force:!0,acrossPanes:this.options.acrossPanes}),o=[],n=this.horiz,a=1;if(t=t<this.min&&e<this.min||t>this.max&&e>this.max,s&&i){if(t){var r=s.toString()===i.toString();a=0}for(t=0;t<s.length;t+=6)n&&i[t+1]===s[t+1]?(i[t+1]+=a,i[t+4]+=a):n||i[t+2]!==s[t+2]||(i[t+2]+=a,i[t+5]+=a),o.push("M",s[t+1],s[t+2],"L",s[t+4],s[t+5],i[t+4],i[t+5],i[t+1],i[t+2],"z"),o.isFlat=r}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(),o=this.userOptions;if(s){if(i){var n=o[i]||[];n.push(e),o[i]=n}this.plotLinesAndBands.push(s)}return s},removePlotBandOrLine:function(t){for(var e=this.plotLinesAndBands,i=this.options,s=this.userOptions,o=e.length;o--;)e[o].id===t&&e[o].destroy();[i.plotLines||[],s.plotLines||[],i.plotBands||[],s.plotBands||[]].forEach(function(e){for(o=e.length;o--;)e[o].id===t&&r(e,e[o])})},removePlotBand:function(t){this.removePlotBandOrLine(t)},removePlotLine:function(t){this.removePlotBandOrLine(t)}})}),e(i,"parts/Tooltip.js",[i["parts/Globals.js"],i["parts/Utilities.js"]],function(t,e){var i=e.defined,s=e.discardElement,o=e.extend,n=e.isNumber,a=e.isString,r=e.pick,l=e.splat,h=e.syncTimeout,c=t.doc,d=t.format,p=t.merge,u=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=r(e.outside,!(!t.scrollablePixelsX&&!t.scrollablePixelsY))},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,s=this,o=this.chart.renderer,n=this.chart.styledMode,a=this.options,r="tooltip"+(i(a.className)?" "+a.className:"");if(!this.label){if(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,zIndex:3}),t.doc.body.appendChild(e),this.renderer=o=new t.Renderer(e,0,0,{},void 0,void 0,o.styledMode)),this.split?this.label=o.g(r):(this.label=o.label("",0,0,a.shape||"callout",null,null,a.useHTML,null,r).attr({padding:a.padding,r:a.borderRadius}),n||this.label.attr({fill:a.backgroundColor,"stroke-width":a.borderWidth}).css(a.style).shadow(a.shadow)),n&&(this.applyFilter(),this.label.addClass("highcharts-tooltip-"+this.chart.index)),s.outside&&!s.split){var l={x:this.label.xSetter,y:this.label.ySetter};this.label.xSetter=function(t,i){l[i].call(this.label,s.distance),e.style.left=t+"px"},this.label.ySetter=function(t,i){l[i].call(this.label,s.distance),e.style.top=t+"px"}}this.label.attr({zIndex:8}).add()}return this.label},update:function(t){this.destroy(),p(!0,this.chart.options.tooltip.userOptions,t),this.init(this.chart,p(!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(),s(this.container)),t.clearTimeout(this.hideTimer),t.clearTimeout(this.tooltipTimeout)},move:function(e,i,s,n){var a=this,r=a.now,l=!1!==a.options.animation&&!a.isHidden&&(1<Math.abs(e-r.x)||1<Math.abs(i-r.y)),h=a.followPointer||1<a.len;o(r,{x:l?(2*r.x+e)/3:e,y:l?(r.y+i)/2:i,anchorX:h?void 0:l?(2*r.anchorX+s)/3:s,anchorY:h?void 0:l?(r.anchorY+n)/2:n}),a.getLabel().attr(r),l&&(t.clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){a&&a.move(e,i,s,n)},32))},hide:function(e){var i=this;t.clearTimeout(this.hideTimer),e=r(e,this.options.hideDelay,500),this.isHidden||(this.hideTimer=h(function(){i.getLabel()[e?"fadeOut":"hide"](),i.isHidden=!0},e))},getAnchor:function(t,e){var i,s,o=this.chart,n=o.pointer,a=o.inverted,r=o.plotTop,h=o.plotLeft,c=0,d=0;return t=l(t),this.followPointer&&e?(void 0===e.chartX&&(e=n.normalize(e)),t=[e.chartX-o.plotLeft,e.chartY-r]):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-r:0)}),c/=t.length,d/=t.length,t=[a?o.plotWidth-d:c,this.shared&&!a&&1<t.length&&e?e.chartY-r:a?o.plotHeight-c:d]),t.map(Math.round)},getPosition:function(t,e,i){var s,o=this.chart,n=this.distance,a={},l=o.inverted&&i.h||0,h=this.outside,d=h?c.documentElement.clientWidth-2*n:o.chartWidth,p=h?Math.max(c.body.scrollHeight,c.documentElement.scrollHeight,c.body.offsetHeight,c.documentElement.offsetHeight,c.documentElement.clientHeight):o.chartHeight,u=o.pointer.getChartPosition(),f=o.containerScaling,g=function(t){return f?t*f.scaleX:t},m=function(t){return f?t*f.scaleY:t},v=function(s){var a="x"===s;return[s,a?d:p,a?t:e].concat(h?[a?g(t):m(e),a?u.left-n+g(i.plotX+o.plotLeft):u.top-n+m(i.plotY+o.plotTop),0,a?d:p]:[a?t:e,a?i.plotX+o.plotLeft:i.plotY+o.plotTop,a?o.plotLeft:o.plotTop,a?o.plotLeft+o.plotWidth:o.plotTop+o.plotHeight])},x=v("y"),y=v("x"),b=!this.followPointer&&r(i.ttBelow,!o.inverted==!!i.negative),w=function(t,e,i,s,o,r,h){var c="y"===t?m(n):g(n),d=(i-s)/2,p=s<o-n,u=o+n+s<e,f=o-c-i+d;if(o=o+c-d,b&&u)a[t]=o;else if(!b&&p)a[t]=f;else if(p)a[t]=Math.min(h-s,0>f-l?f:f-l);else{if(!u)return!1;a[t]=Math.max(r,o+l+i>e?o:o+l)}},k=function(t,e,i,s,o){var r;return o<n||o>e-n?r=!1:a[t]=o<i/2?1:o>e-s/2?e-s-2:o-i/2,r},M=function(t){var e=x;x=y,y=e,s=t};return(o.inverted||1<this.len)&&M(),function t(){!1!==w.apply(0,x)?!1!==k.apply(0,y)||s||(M(!0),t()):s?a.x=a.y=0:(M(!0),t())}(),a},defaultFormatter:function(t){var e=this.points||l(this),i=[t.tooltipFooterHeaderFormatter(e[0])];return i=i.concat(t.bodyFormatter(e)),i.push(t.tooltipFooterHeaderFormatter(e[0],!0)),i},refresh:function(e,i){var s=this.chart,o=this.options,n=e,a={},h=[],c=o.formatter||this.defaultFormatter;a=this.shared;var d=s.styledMode;if(o.enabled){t.clearTimeout(this.hideTimer),this.followPointer=l(n)[0].series.tooltipOptions.followPointer;var p=this.getAnchor(n,i);i=p[0];var u=p[1];!a||n.series&&n.series.noSharedTooltip?a=n.getLabelConfig():(s.pointer.applyInactiveState(n),n.forEach(function(t){t.setState("hover"),h.push(t.getLabelConfig())}),a={x:n[0].category,y:n[0].y},a.points=h,n=n[0]),this.len=h.length,s=c.call(a,this),c=n.series,this.distance=r(c.tooltipOptions.distance,16),!1===s?this.hide():(this.split?this.renderSplit(s,l(e)):(e=this.getLabel(),o.style.width&&!d||e.css({width:this.chart.spacingBox.width}),e.attr({text:s&&s.join?s.join(""):s}),e.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-"+r(n.colorIndex,c.colorIndex)),d||e.attr({stroke:o.borderColor||n.color||c.color||"#666666"}),this.updatePosition({plotX:i,plotY:u,negative:n.negative,ttBelow:n.ttBelow,h:p[2]||0})),this.isHidden&&this.label&&this.label.attr({opacity:1}).show(),this.isHidden=!1),t.fireEvent(this,"refresh")}},renderSplit:function(e,i){var s,o=this,n=[],l=this.chart,h=l.renderer,c=!0,d=this.options,p=0,u=this.getLabel(),f=l.plotTop;a(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:l.plotHeight};var a=e.series||o,g=a.tt,m=e.series||{},v="highcharts-color-"+r(e.colorIndex,m.colorIndex,"none");g||(g={padding:d.padding,r:d.borderRadius},l.styledMode||(g.fill=d.backgroundColor,g["stroke-width"]=d.borderWidth),a.tt=g=h.label(null,null,null,(e.isHeader?d.headerShape:d.shape)||"callout",null,null,d.useHTML).addClass(e.isHeader?"highcharts-tooltip-header ":"highcharts-tooltip-box "+v).attr(g).add(u)),g.isActive=!0,g.attr({text:t}),l.styledMode||g.css(d.style).shadow(d.shadow).attr({stroke:d.borderColor||e.color||m.color||"#333333"}),t=g.getBBox(),v=t.width+g.strokeWidth(),e.isHeader?(p=t.height,l.xAxis[0].opposite&&(s=!0,f-=p),t=Math.max(0,Math.min(e.plotX+l.plotLeft-v/2,l.chartWidth+(l.scrollablePixelsX?l.scrollablePixelsX-l.marginRight:0)-v))):t=e.plotX+l.plotLeft-r(d.distance,16)-v,0>t&&(c=!1),e.isHeader?m=s?-p:l.plotHeight+p:(m=m.yAxis,m=m.pos-f+Math.max(0,Math.min(e.plotY||0,m.len))),n.push({target:m,rank:e.isHeader?1:0,size:a.tt.getBBox().height+1,point:e,x:t,tt:g})}}),this.cleanSplit(),d.positioner&&n.forEach(function(t){var e=d.positioner.call(o,t.tt.getBBox().width,t.size,t.point);t.x=e.x,t.align=0,t.target=e.y,t.rank=r(e.rank,t.rank)}),t.distribute(n,l.plotHeight+p),n.forEach(function(t){var e=t.point,i=e.series,s=i&&i.yAxis;t.tt.attr({visibility:void 0===t.pos?"hidden":"inherit",x:c||e.isHeader||d.positioner?t.x:e.plotX+l.plotLeft+o.distance,y:t.pos+f,anchorX:e.isHeader?e.plotX+l.plotLeft:e.plotX+i.xAxis.pos,anchorY:e.isHeader?l.plotTop+l.plotHeight/2:s.pos+Math.max(0,Math.min(e.plotY,s.len))})});var g=o.container;if(e=o.renderer,o.outside&&g&&e){var m=l.pointer.getChartPosition();g.style.left=m.left+"px",g.style.top=m.top+"px",g=u.getBBox(),e.setSize(g.width+g.x,g.height+g.y,!1)}},updatePosition:function(e){var i=this.chart,s=i.pointer,o=this.getLabel(),n=e.plotX+i.plotLeft,a=e.plotY+i.plotTop;if(s=s.getChartPosition(),e=(this.options.positioner||this.getPosition).call(this,o.width,o.height,e),this.outside){var r=(this.options.borderWidth||0)+2*this.distance;this.renderer.setSize(o.width+r,o.height+r,!1),(i=i.containerScaling)&&(t.css(this.container,{transform:"scale("+i.scaleX+", "+i.scaleY+")"}),n*=i.scaleX,a*=i.scaleY),n+=s.left-e.x,a+=s.top-e.y}this.move(Math.round(e.x),Math.round(e.y||0),n,a)},getDateFormat:function(t,e,i,s){var o=this.chart.time,n=o.dateFormat("%m-%d %H:%M:%S.%L",e),a={millisecond:15,second:12,minute:9,hour:6,day:3},r="millisecond";for(l in u){if(t===u.week&&+o.dateFormat("%w",e)===i&&"00:00:00.000"===n.substr(6)){var l="week";break}if(u[l]>t){l=r;break}if(a[l]&&n.substr(a[l])!=="01-01 00:00:00.000".substr(a[l]))break;"week"!==l&&(r=l)}if(l)var h=o.resolveDTLFormat(s[l]).main;return h},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 s=i?"footer":"header",o=e.series,a=o.tooltipOptions,r=a.xDateFormat,l=o.xAxis,h=l&&"datetime"===l.options.type&&n(e.key),c=a[s+"Format"];return i={isFooter:i,labelConfig:e},t.fireEvent(this,"headerFormatter",i,function(t){h&&!r&&(r=this.getXDateFormat(e,a,l)),h&&r&&(e.point&&e.point.tooltipDateKeys||["key"]).forEach(function(t){c=c.replace("{point."+t+"}","{point."+t+":"+r+"}")}),o.chart.styledMode&&(c=this.styledModeFormat(c)),t.text=d(c,{point:e,series:o},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"],i["parts/Utilities.js"]],function(t,e){var i=e.attr,s=e.defined,o=e.extend,n=e.isNumber,a=e.isObject,r=e.objectEach,l=e.pick,h=e.splat,c=t.addEvent,d=t.charts,p=t.color,u=t.css,f=t.find,g=t.fireEvent,m=t.offset,v=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={},v&&(t.tooltip=new v(t,e.tooltip),this.followTouchMove=l(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=l(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},getChartPosition:function(){return this.chartPosition||(this.chartPosition=m(this.chart.container))},normalize:function(t,e){var i=t.touches?t.touches.length?t.touches.item(0):t.changedTouches[0]:t;e||(e=this.getChartPosition());var s=i.pageX-e.left;return e=i.pageY-e.top,(i=this.chart.containerScaling)&&(s/=i.scaleX,e/=i.scaleY),o(t,{chartX:Math.round(s),chartY:Math.round(e)})},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 o=!(t.noSharedTooltip&&e)&&0>t.options.findNearestPointBy.indexOf("y");if(t=t.searchPoint(i,o),(o=a(t,!0))&&!(o=!a(s,!0))){o=s.distX-t.distX;var n=s.dist-t.dist,r=(t.series.group&&t.series.group.zIndex)-(s.series.group&&s.series.group.zIndex);o=0<(0!==o&&e?o:0!==n?n:0!==r?r:s.series.index>t.series.index?-1:1)}o&&(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;var o=l(t.clientX,t.plotX),n=t.shapeArgs;return s&&i?e?{chartX:s.len+s.pos-o,chartY:i.len+i.pos-t.plotY}:{chartX:o+s.pos,chartY:t.plotY+i.pos}:n&&n.x&&n.y?{chartX:n.x,chartY:n.y}:void 0},getHoverData:function(t,e,i,s,o,n){var r,h=[];s=!(!s||!t);var c=e&&!e.stickyTracking?[e]:i.filter(function(t){return t.visible&&!(!o&&t.directTouch)&&l(t.options.enableMouseTracking,!0)&&t.stickyTracking});return e=(r=s||!n?t:this.findNearestKDPoint(c,o,n))&&r.series,r&&(o&&!e.noSharedTooltip?(c=i.filter(function(t){return t.visible&&!(!o&&t.directTouch)&&l(t.options.enableMouseTracking,!0)&&!t.noSharedTooltip}),c.forEach(function(t){var e=f(t.points,function(t){return t.x===r.x&&!t.isNull});a(e)&&(t.chart.isBoosting&&(e=t.getPoint(e)),h.push(e))})):h.push(r)),{hoverPoint:r,hoverSeries:e,hoverPoints:h}},runPointActions:function(e,i){var s=this.chart,o=s.tooltip&&s.tooltip.options.enabled?s.tooltip:void 0,n=!!o&&o.shared,a=i||s.hoverPoint,r=a&&a.series||s.hoverSeries;r=this.getHoverData(a,r,s.series,(!e||"touchmove"!==e.type)&&(!!i||r&&r.directTouch&&this.isDirectTouch),n,e),a=r.hoverPoint;var h=r.hoverPoints;if(i=(r=r.hoverSeries)&&r.tooltipOptions.followPointer,n=n&&r&&!r.noSharedTooltip,a&&(a!==s.hoverPoint||o&&o.isHidden)){if((s.hoverPoints||[]).forEach(function(t){-1===h.indexOf(t)&&t.setState()}),s.hoverSeries!==r&&r.onMouseOver(),this.applyInactiveState(h),(h||[]).forEach(function(t){t.setState("hover")}),s.hoverPoint&&s.hoverPoint.firePointEvent("mouseOut"),!a.series)return;a.firePointEvent("mouseOver"),s.hoverPoints=h,s.hoverPoint=a,o&&o.refresh(n?h:a,e)}else i&&o&&!o.isHidden&&(a=o.getAnchor([{}],e),o.updatePosition({plotX:a[0],plotY:a[1]}));this.unDocMouseMove||(this.unDocMouseMove=c(s.container.ownerDocument,"mousemove",function(e){var i=d[t.hoverChartIndex];i&&i.pointer.onDocumentMouseMove(e)})),s.axes.forEach(function(i){var s=l(i.crosshair.snap,!0),o=s?t.find(h,function(t){return t.series[i.coll]===i}):void 0;o||!s?i.drawCrosshair(e,o):i.hideCrosshair()})},applyInactiveState:function(t){var e,i=[];(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)}),this.chart.series.forEach(function(t){-1===i.indexOf(t)?t.setState("inactive",!0):t.options.inactiveOtherPoints&&t.setAllPointsToState("inactive")})},reset:function(t,e){var i=this.chart,s=i.hoverSeries,o=i.hoverPoint,n=i.hoverPoints,a=i.tooltip,r=a&&a.shared?n:o;t&&r&&h(r).forEach(function(e){e.series.isCartesian&&void 0===e.plotX&&(t=!1)}),t?a&&r&&h(r).length&&(a.refresh(r),a.shared&&n?n.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))}):o&&(o.setState(o.state,!0),i.axes.forEach(function(t){t.crosshair&&t.drawCrosshair(null,o)}))):(o&&o.onMouseOut(),n&&n.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(o){i=t||o.getPlotBox(),o.xAxis&&o.xAxis.zoomEnabled&&o.group&&(o.group.attr(i),o.markerGroup&&(o.markerGroup.attr(i),o.markerGroup.clip(e?s.clipRect:null)),o.dataLabelsGroup&&o.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=this.chart,i=e.options.chart,s=t.chartX,o=t.chartY,n=this.zoomHor,a=this.zoomVert,r=e.plotLeft,l=e.plotTop,h=e.plotWidth,c=e.plotHeight,d=this.selectionMarker,u=this.mouseDownX,f=this.mouseDownY,g=i.panKey&&t[i.panKey+"Key"];if((!d||!d.touch)&&(s<r?s=r:s>r+h&&(s=r+h),o<l?o=l:o>l+c&&(o=l+c),this.hasDragged=Math.sqrt(Math.pow(u-s,2)+Math.pow(f-o,2)),10<this.hasDragged)){var m=e.isInsidePlot(u-r,f-l);e.hasCartesianSeries&&(this.zoomX||this.zoomY)&&m&&!g&&!d&&(this.selectionMarker=d=e.renderer.rect(r,l,n?1:h,a?1:c,0).attr({class:"highcharts-selection-marker",zIndex:7}).add(),e.styledMode||d.attr({fill:i.selectionMarkerFill||p("#335cad").setOpacity(.25).get()})),d&&n&&(s-=u,d.attr({width:Math.abs(s),x:(0<s?0:s)+u})),d&&a&&(s=o-f,d.attr({height:Math.abs(s),y:(0<s?0:s)+f})),m&&!d&&i.panning&&e.pan(t,i.panning)}},drop:function(t){var e=this,i=this.chart,a=this.hasPinched;if(this.selectionMarker){var r,l={originalEvent:t,xAxis:[],yAxis:[]},h=this.selectionMarker,c=h.attr?h.attr("x"):h.x,d=h.attr?h.attr("y"):h.y,p=h.attr?h.attr("width"):h.width,f=h.attr?h.attr("height"):h.height;(this.hasDragged||a)&&(i.axes.forEach(function(i){if(i.zoomEnabled&&s(i.min)&&(a||e[{xAxis:"zoomX",yAxis:"zoomY"}[i.coll]])){var o=i.horiz,n="touchend"===t.type?i.minPixelPadding:0,h=i.toValue((o?c:d)+n);o=i.toValue((o?c+p:d+f)-n),l[i.coll].push({axis:i,min:Math.min(h,o),max:Math.max(h,o)}),r=!0}}),r&&g(i,"selection",l,function(t){i.zoom(o(t,a?{animation:!1}:null))})),n(i.index)&&(this.selectionMarker=this.selectionMarker.destroy()),a&&this.scaleGroups()}i&&n(i.index)&&(u(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){d[t.hoverChartIndex]&&d[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=d[t.hoverChartIndex];i&&(e.relatedTarget||e.toElement)&&(i.pointer.reset(),i.pointer.chartPosition=void 0)},onContainerMouseMove:function(e){var i=this.chart;s(t.hoverChartIndex)&&d[t.hoverChartIndex]&&d[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")?(g(i.series,"click",o(t,{point:i})),e.hoverPoint&&i.firePointEvent("click",t)):(o(t,this.getCoordinates(t)),e.isInsidePlot(t.chartX-s,t.chartY-n)&&g(e,"click",t)))},setDOMEvents:function(){var e=this,i=e.chart.container,s=i.ownerDocument;i.onmousedown=function(t){e.onContainerMouseDown(t)},i.onmousemove=function(t){e.onContainerMouseMove(t)},i.onclick=function(t){e.onContainerClick(t)},this.unbindContainerMouseLeave=c(i,"mouseleave",e.onContainerMouseLeave),t.unbindDocumentMouseUp||(t.unbindDocumentMouseUp=c(s,"mouseup",e.onDocumentMouseUp)),t.hasTouch&&(c(i,"touchstart",function(t){e.onContainerTouchStart(t)}),c(i,"touchmove",function(t){e.onContainerTouchMove(t)}),t.unbindDocumentTouchEnd||(t.unbindDocumentTouchEnd=c(s,"touchend",e.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),r(e,function(t,i){e[i]=null})}}}),e(i,"parts/TouchPointer.js",[i["parts/Globals.js"],i["parts/Utilities.js"]],function(t,e){var i=e.extend,s=e.pick,o=t.charts,n=t.noop;i(t.Pointer.prototype,{pinchTranslate:function(t,e,i,s,o,n){this.zoomHor&&this.pinchTranslateDirection(!0,t,e,i,s,o,n),this.zoomVert&&this.pinchTranslateDirection(!1,t,e,i,s,o,n)},pinchTranslateDirection:function(t,e,i,s,o,n,a,r){var l,h,c=this.chart,d=t?"x":"y",p=t?"X":"Y",u="chart"+p,f=t?"width":"height",g=c["plot"+(t?"Left":"Top")],m=r||1,v=c.inverted,x=c.bounds[t?"h":"v"],y=1===e.length,b=e[0][u],w=i[0][u],k=!y&&e[1][u],M=!y&&i[1][u];if(i=function(){!y&&20<Math.abs(b-k)&&(m=r||Math.abs(w-M)/Math.abs(b-k)),h=(g-w)/m+b,l=c["plot"+(t?"Width":"Height")]/m},i(),(e=h)<x.min){e=x.min;var S=!0}else e+l>x.max&&(e=x.max-l,S=!0);S?(w-=.8*(w-a[d][0]),y||(M-=.8*(M-a[d][1])),i()):a[d]=[w,M],v||(n[d]=h-g,n[f]=l),n=v?1/m:m,o[f]=l,o[d]=e,s[v?t?"scaleY":"scaleX":"scale"+p]=m,s["translate"+p]=n*g+(w-n*b)},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,n=t.toPixels(Math.min(s(t.options.min,t.dataMin),t.dataMin)),a=t.toPixels(Math.max(s(t.options.max,t.dataMax),t.dataMax)),r=Math.max(n,a);e.min=Math.min(t.pos,Math.min(n,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:n,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 o=this.chart;if(o.index!==t.hoverChartIndex&&this.onContainerMouseLeave({relatedTarget:!0}),t.hoverChartIndex=o.index,1===e.touches.length)if(e=this.normalize(e),o.isInsidePlot(e.chartX-o.plotLeft,e.chartY-o.plotTop)&&!o.openMenu){if(i&&this.runPointActions(e),"touchmove"===e.type){i=this.pinchDown;var n=!!i[0]&&4<=Math.sqrt(Math.pow(i[0].chartX-e.chartX,2)+Math.pow(i[0].chartY-e.chartY,2))}s(n,!0)&&this.pinch(e)}else i&&this.reset();else 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(e){o[t.hoverChartIndex]&&o[t.hoverChartIndex].pointer.drop(e)}})}),e(i,"parts/MSPointer.js",[i["parts/Globals.js"],i["parts/Utilities.js"]],function(t,e){var i=e.extend,s=e.objectEach,o=t.addEvent,n=t.charts,a=t.css,r=t.doc,l=t.noop;e=t.Pointer;var h=t.removeEvent,c=t.win,d=t.wrap;if(!t.hasTouch&&(c.PointerEvent||c.MSPointerEvent)){var p={},u=!!c.PointerEvent,f=function(){var t=[];return t.item=function(t){return this[t]},s(p,function(e){t.push({pageX:e.pageX,pageY:e.pageY,target:e.target})}),t},g=function(e,i,s,o){"touch"!==e.pointerType&&e.pointerType!==e.MSPOINTER_TYPE_TOUCH||!n[t.hoverChartIndex]||(o(e),o=n[t.hoverChartIndex].pointer,o[i]({type:s,target:e.currentTarget,preventDefault:l,touches:f()}))};i(e.prototype,{onContainerPointerDown:function(t){g(t,"onContainerTouchStart","touchstart",function(t){p[t.pointerId]={pageX:t.pageX,pageY:t.pageY,target:t.currentTarget}})},onContainerPointerMove:function(t){g(t,"onContainerTouchMove","touchmove",function(t){p[t.pointerId]={pageX:t.pageX,pageY:t.pageY},p[t.pointerId].target||(p[t.pointerId].target=t.currentTarget)})},onDocumentPointerUp:function(t){g(t,"onDocumentTouchEnd","touchend",function(t){delete p[t.pointerId]})},batchMSEvents:function(t){t(this.chart.container,u?"pointerdown":"MSPointerDown",this.onContainerPointerDown),t(this.chart.container,u?"pointermove":"MSPointerMove",this.onContainerPointerMove),t(r,u?"pointerup":"MSPointerUp",this.onDocumentPointerUp)}}),d(e.prototype,"init",function(t,e,i){t.call(this,e,i),this.hasZoom&&a(e.container,{"-ms-touch-action":"none","touch-action":"none"})}),d(e.prototype,"setDOMEvents",function(t){t.apply(this),(this.hasZoom||this.followTouchMove)&&this.batchMSEvents(o)}),d(e.prototype,"destroy",function(t){this.batchMSEvents(h),t.call(this)})}}),e(i,"parts/Legend.js",[i["parts/Globals.js"],i["parts/Utilities.js"]],function(t,e){var i=e.defined,s=e.discardElement,o=e.isNumber,n=e.pick,a=e.setAnimation,r=t.addEvent,l=t.css,h=t.fireEvent;e=t.isFirefox;var c=t.marginNames,d=t.merge,p=t.stableSort,u=t.win,f=t.wrap;t.Legend=function(t,e){this.init(t,e)},t.Legend.prototype={init:function(t,e){this.chart=t,this.setOptions(e),e.enabled&&(this.render(),r(this.chart,"endResize",function(){this.legend.positionCheckboxes()}),this.proximate?this.unchartrender=r(this.chart,"render",function(){this.legend.proximatePositions(),this.legend.positionItems()}):this.unchartrender&&this.unchartrender())},setOptions:function(t){var e=n(t.padding,8);this.options=t,this.chart.styledMode||(this.itemStyle=t.itemStyle,this.itemHiddenStyle=d(this.itemStyle,t.itemHiddenStyle)),this.itemMarginTop=t.itemMarginTop||0,this.itemMarginBottom=t.itemMarginBottom||0,this.padding=e,this.initialItemY=e-5,this.symbolWidth=n(t.symbolWidth,16),this.pages=[],this.proximate="proximate"===t.layout&&!this.chart.inverted},update:function(t,e){var i=this.chart;this.setOptions(d(!0,this.options,t)),this.destroy(),i.isDirtyLegend=i.isDirtyBox=!0,n(e,!0)&&i.redraw(),h(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,o=t.legendLine,n=t.legendSymbol,a=this.itemHiddenStyle.color;i=e?i.itemStyle.color:a;var r=e?t.color||a:a,l=t.options&&t.options.marker,c={fill:r};s&&s.css({fill:i,color:i}),o&&o.attr({stroke:r}),n&&(l&&n.isMarker&&(c=t.pointAttribs(),e||(c.stroke=c.fill=a)),n.attr(c))}h(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,s=e.symbolPadding;e=!e.rtl;var o=t._legendItemPos,n=o[0];o=o[1];var a=t.checkbox;(t=t.legendGroup)&&t.element&&t[i(t.translateY)?"animate":"attr"]({translateX:e?n:this.legendWidth-n-2*s-4,translateY:o}),a&&(a.x=n,a.y=o)},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=this.group&&this.group.alignAttr,e=this.clipHeight||this.legendHeight,i=this.titleHeight;if(t){var s=t.translateY;this.allItems.forEach(function(o){var n=o.checkbox;if(n){var a=s+i+n.y+(this.scrollOffset||0)+3;l(n,{left:t.translateX+o.checkboxOffset+n.x-20+"px",top:a+"px",display:this.proximate||a>s-6&&a<s+e-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,o=this.symbolWidth,a=s.symbolPadding,r=this.itemStyle,l=this.itemHiddenStyle,h="horizontal"===s.layout?n(s.itemDistance,20):0,c=!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,h=o+a+h+(g?20:0);var 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("",c?o+a:-a,this.baseline||0,m),e.styledMode||p.css(d(t.visible?r:l)),p.attr({align:c?"left":"right",zIndex:2}).add(t.legendGroup),this.baseline||(this.fontMetrics=i.fontMetrics(e.styledMode?12:r.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&&r.width||p.css({width:(s.itemWidth||this.widthOption||e.spacingBox.width)-h}),this.setText(t),e=p.getBBox(),t.itemWidth=t.checkboxOffset=s.itemWidth||t.legendItemWidth||e.width+h,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,o=t.itemHeight,a=this.itemMarginBottom,r=this.itemMarginTop,l=s?n(e.itemDistance,20):0,h=this.maxLegendWidth;e=e.alignColumns&&this.totalItemWidth>h?this.maxItemWidth:t.itemWidth,s&&this.itemX-i+e>h&&(this.itemX=i,this.lastLineHeight&&(this.itemY+=r+this.lastLineHeight+a),this.lastLineHeight=0),this.lastItemY=r+this.itemY+a,this.lastLineHeight=Math.max(o,this.lastLineHeight),t._legendItemPos=[this.itemX,this.itemY],s?this.itemX+=e:(this.itemY+=r+o+a,this.lastLineHeight=o),this.offsetWidth=this.widthOption||Math.max((s?this.itemX-i-(t.checkbox?0:l):e)+i,this.offsetWidth)},getAllItems:function(){var t=[];return this.chart.series.forEach(function(e){var s=e&&e.options;e&&n(s.showInLegend,!i(s.linkedTo)&&void 0,!0)&&(t=t.concat(e.legendItems||("point"===s.legendType?e.data:e)))}),h(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 s=this.chart,o=this.options,a=this.getAlignment();a&&[/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/].forEach(function(r,l){r.test(a)&&!i(t[l])&&(s[c[l]]=Math.max(s[c[l]],s.legend[(l+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][l]*o[l%2?"x":"y"]+n(o.margin,12)+e[l]+(s.titleOffset[l]||0)))})},proximatePositions:function(){var e=this.chart,i=[],s="left"===this.options.align;this.allItems.forEach(function(n){var a=s;if(n.yAxis&&n.points){n.xAxis.options.reversed&&(a=!a);var r=t.find(a?n.points:n.points.slice(0).reverse(),function(t){return o(t.plotY)});a=this.itemMarginTop+n.legendItem.getBBox().height+this.itemMarginBottom;var l=n.yAxis.top-e.plotTop;n.visible?(r=r?r.plotY:n.yAxis.height,r+=l-.3*a):r=l+n.yAxis.height,i.push({target:r,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=this.chart,s=i.renderer,o=this.group,n=this.box,a=this.options,r=this.padding;this.itemX=r,this.itemY=this.initialItemY,this.lastItemY=this.offsetWidth=0,this.widthOption=t.relativeLength(a.width,i.spacingBox.width-r);var l=i.spacingBox.width-2*r-a.x;-1<["rm","lm"].indexOf(this.getAlignment().substring(0,2))&&(l/=2),this.maxLegendWidth=this.widthOption||l,o||(this.group=o=s.g("legend").attr({zIndex:7}).add(),this.contentGroup=s.g().attr({zIndex:1}).add(o),this.scrollGroup=s.g().add(this.contentGroup)),this.renderTitle(),l=this.getAllItems(),p(l,function(t,e){return(t.options&&t.options.legendIndex||0)-(e.options&&e.options.legendIndex||0)}),a.reversed&&l.reverse(),this.allItems=l,this.display=e=!!l.length,this.itemHeight=this.totalItemWidth=this.maxItemWidth=this.lastLineHeight=0,l.forEach(this.renderItem,this),l.forEach(this.layoutItem,this),l=(this.widthOption||this.offsetWidth)+r;var c=this.lastItemY+this.lastLineHeight+this.titleHeight;c=this.handleOverflow(c),c+=r,n||(this.box=n=s.rect().addClass("highcharts-legend-box").attr({r:a.borderRadius}).add(o),n.isNew=!0),i.styledMode||n.attr({stroke:a.borderColor,"stroke-width":a.borderWidth||0,fill:a.backgroundColor||"none"}).shadow(a.shadow),0<l&&0<c&&(n[n.isNew?"attr":"animate"](n.crisp.call({},{x:0,y:0,width:l,height:c},n.strokeWidth())),n.isNew=!1),n[e?"show":"hide"](),i.styledMode&&"none"===o.getStyle("display")&&(l=c=0),this.legendWidth=l,this.legendHeight=c,e&&(s=i.spacingBox,n=s.y,/(lth|ct|rth)/.test(this.getAlignment())&&0<i.titleOffset[0]?n+=i.titleOffset[0]:/(lbh|cb|rbh)/.test(this.getAlignment())&&0<i.titleOffset[2]&&(n-=i.titleOffset[2]),n!==s.y&&(s=d(s,{y:n})),o.align(d(a,{width:l,height:c,verticalAlign:this.proximate?"top":a.verticalAlign}),!0,s)),this.proximate||this.positionItems(),h(this,"afterRender")},handleOverflow:function(t){var e=this,i=this.chart,s=i.renderer,o=this.options,a=o.y,r=this.padding;a=i.spacingBox.height+("top"===o.verticalAlign?-a:a)-r;var l,h,c=o.maxHeight,d=this.clipRect,p=o.navigation,u=n(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&&(e.clipRect=d.destroy(),e.contentGroup.clip()),e.contentGroup.div&&(e.contentGroup.div.style.clip=t?"rect("+r+"px,9999px,"+(r+t)+"px,0)":"auto")},y=function(t){return e[t]=s.circle(0,0,1.3*f).translate(f/2,f/2).add(g),i.styledMode||e[t].attr("fill","rgba(0,0,0,0.0001)"),e[t]};return"horizontal"!==o.layout||"middle"===o.verticalAlign||o.floating||(a/=2),c&&(a=Math.min(a,c)),m.length=0,t>a&&!1!==p.enabled?(this.clipHeight=l=Math.max(a-20-this.titleHeight-r,0),this.currentPage=n(this.currentPage,1),this.fullHeight=t,v.forEach(function(t,e){var i=t._legendItemPos[1],s=Math.round(t.legendItem.getBBox().height),o=m.length;(!o||i-m[o-1]>l&&(h||i)!==m[o-1])&&(m.push(h||i),o++),t.pageIx=o-1,h&&(v[e-1].pageIx=o-1),e===v.length-1&&i+s-m[o-1]>l&&i!==h&&(m.push(i),t.pageIx=o),i!==h&&(h=i)}),d||(d=e.clipRect=s.clipRect(0,r,9999,0),e.contentGroup.clip(d)),x(l),g||(this.nav=g=s.g().attr({zIndex:1}).add(this.group),this.up=s.symbol("triangle",0,0,f,f).add(g),y("upTracker").on("click",function(){e.scroll(-1,u)}),this.pager=s.text("",15,10).addClass("highcharts-legend-navigation"),i.styledMode||this.pager.css(p.style),this.pager.add(g),this.down=s.symbol("triangle-down",0,0,f,f).add(g),y("downTracker").on("click",function(){e.scroll(1,u)})),e.scroll(0),t=a):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,o=this.currentPage+t;t=this.clipHeight;var n=this.options.navigation,r=this.pager,l=this.padding;o>s&&(o=s),0<o&&(void 0!==e&&a(e,this.chart),this.nav.attr({translateX:l,translateY:t+this.padding+7+this.titleHeight,visibility:"visible"}),[this.up,this.upTracker].forEach(function(t){t.attr({class:1===o?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})}),r.attr({text:o+"/"+s}),[this.down,this.downTracker].forEach(function(t){t.attr({x:18+this.pager.getBBox().width,class:o===s?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})},this),this.chart.styledMode||(this.up.attr({fill:1===o?n.inactiveColor:n.activeColor}),this.upTracker.css({cursor:1===o?"default":"pointer"}),this.down.attr({fill:o===s?n.inactiveColor:n.activeColor}),this.downTracker.css({cursor:o===s?"default":"pointer"})),this.scrollOffset=-i[o-1]+this.initialItemY,this.scrollGroup.animate({translateY:this.scrollOffset}),this.currentPage=o,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,n(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,o=t.symbolHeight,a=o/2,r=this.chart.renderer,l=this.legendGroup;t=t.baseline-Math.round(.3*t.fontMetrics.b);var h={};this.chart.styledMode||(h={"stroke-width":e.lineWidth||0},e.dashStyle&&(h.dashstyle=e.dashStyle)),this.legendLine=r.path(["M",0,t,"L",s,t]).addClass("highcharts-graph").attr(h).add(l),i&&!1!==i.enabled&&s&&(e=Math.min(n(i.radius,a),a),0===this.symbol.indexOf("url")&&(i=d(i,{width:o,height:o}),e=0),this.legendSymbol=i=r.symbol(this.symbol,s/2-e,t-e,2*e,2*e,i).addClass("highcharts-point").add(l),i.isMarker=!0)}},(/Trident\/7\.0/.test(u.navigator&&u.navigator.userAgent)||e)&&f(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"],i["parts/Utilities.js"]],function(t,e){var i=e.attr,s=e.defined,o=e.discardElement,n=e.erase,a=e.extend,r=e.isArray,l=e.isNumber,h=e.isObject,c=e.isString,d=e.objectEach,p=e.pick,u=e.pInt,f=e.setAnimation,g=e.splat,m=e.syncTimeout,v=t.addEvent,x=t.animate,y=t.animObject,b=t.doc,w=t.Axis,k=t.createElement,M=t.defaultOptions,S=t.charts,T=t.css,C=t.find,A=t.fireEvent,E=t.Legend,P=t.marginNames,O=t.merge,L=t.Pointer,D=t.removeEvent,_=t.seriesTypes,I=t.win,z=t.Chart=function(){this.getArgs.apply(this,arguments)};t.chart=function(t,e,i){return new z(t,e,i)},a(z.prototype,{callbacks:[],getArgs:function(){var t=[].slice.call(arguments);(c(t[0])||t[0].nodeName)&&(this.renderTo=t.shift()),this.init(t[0],t[1])},init:function(e,i){var s,o=e.series,n=e.plotOptions||{};A(this,"init",{args:arguments},function(){e.series=null,s=O(M,e),d(s.plotOptions,function(t,e){h(t)&&(t.tooltip=n[e]&&O(n[e].tooltip)||void 0)}),s.tooltip.userOptions=e.chart&&e.chart.forExport&&e.tooltip.userOptions||e.tooltip,s.series=e.series=o,this.userOptions=e;var a=s.chart,r=a.events;this.margin=[],this.spacing=[],this.bounds={h:{},v:{}},this.labelCollectors=[],this.callback=i,this.isResizing=0,this.options=s,this.axes=[],this.series=[],this.time=e.time&&Object.keys(e.time).length?new t.Time(e.time):t.time,this.styledMode=a.styledMode,this.hasCartesianSeries=a.showAxes;var l=this;l.index=S.length,S.push(l),t.chartCount++,r&&d(r,function(e,i){t.isFunction(e)&&v(l,i,e)}),l.xAxis=[],l.yAxis=[],l.pointCount=l.colorCounter=l.symbolCounter=0,A(l,"afterInit"),l.firstRender()})},initSeries:function(e){var i=this.options.chart;i=e.type||i.type||i.defaultSeriesType;var s=_[i];return s||t.error(17,!0,this,{missingModuleFor:i}),i=new s,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(t){A(this,"beforeRedraw");var e=this.axes,i=this.series,s=this.pointer,o=this.legend,n=this.userOptions.legend,r=this.isDirtyLegend,l=this.hasCartesianSeries,h=this.isDirtyBox,c=this.renderer,d=c.isHidden(),p=[];for(this.setResponsive&&this.setResponsive(!1),f(t,this),d&&this.temporaryDisplay(),this.layOutTitles(),t=i.length;t--;){var u=i[t];if(u.options.stacking){var g=!0;if(u.isDirty){var m=!0;break}}}if(m)for(t=i.length;t--;)u=i[t],u.options.stacking&&(u.isDirty=!0);i.forEach(function(t){t.isDirty&&("point"===t.options.legendType?(t.updateTotals&&t.updateTotals(),r=!0):n&&(n.labelFormatter||n.labelFormat)&&(r=!0)),t.isDirtyData&&A(t,"updatedData")}),r&&o&&o.options.enabled&&(o.render(),this.isDirtyLegend=!1),g&&this.getStacks(),l&&e.forEach(function(t){t.updateNames(),t.setScale()}),this.getMargins(),l&&(e.forEach(function(t){t.isDirty&&(h=!0)}),e.forEach(function(t){var e=t.min+","+t.max;t.extKey!==e&&(t.extKey=e,p.push(function(){A(t,"afterSetExtremes",a(t.eventArgs,t.getExtremes())),delete t.eventArgs})),(h||g)&&t.redraw()})),h&&this.drawChartBox(),A(this,"predraw"),i.forEach(function(t){(h||t.isDirty)&&t.visible&&t.redraw(),t.isDirtyData=!1}),s&&s.reset(!0),c.draw(),A(this,"redraw"),A(this,"render"),d&&this.temporaryDisplay(!0),p.forEach(function(t){t.call()})},get:function(t){function e(e){return e.id===t||e.options&&e.options.id===t}var i,s=this.series,o=C(this.axes,e)||C(this.series,e);for(i=0;!o&&i<s.length;i++)o=C(s[i].points||[],e);return o},getAxes:function(){var t=this,e=this.options,i=e.xAxis=g(e.xAxis||{});e=e.yAxis=g(e.yAxis||{}),A(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 w(t,e)}),A(this,"afterGetAxes")},getSelectedPoints:function(){var t=[];return this.series.forEach(function(e){t=t.concat((e[e.hasGroupedData?"points":"data"]||[]).filter(function(t){return p(t.selectedStaging,t.selected)}))}),t},getSelectedSeries:function(){return this.series.filter(function(t){return t.selected})},setTitle:function(t,e,i){this.applyDescription("title",t),this.applyDescription("subtitle",e),this.applyDescription("caption",void 0),this.layOutTitles(i)},applyDescription:function(t,e){var i=this,s="title"===t?{color:"#333333",fontSize:this.options.isStock?"16px":"18px"}:{color:"#666666"};s=this.options[t]=O(!this.styledMode&&{style:s},this.options[t],e);var o=this[t];o&&e&&(this[t]=o=o.destroy()),s&&!o&&(o=this.renderer.text(s.text,0,0,s.useHTML).attr({align:s.align,class:"highcharts-"+t,zIndex:s.zIndex||4}).add(),o.update=function(e){i[{title:"setTitle",subtitle:"setSubtitle",caption:"setCaption"}[t]](e)},this.styledMode||o.css(s.style),this[t]=o)},layOutTitles:function(t){var e=[0,0,0],i=this.renderer,s=this.spacingBox;["title","subtitle","caption"].forEach(function(t){var o=this[t],n=this.options[t],r=n.verticalAlign||"top";if(t="title"===t?-3:"top"===r?e[0]+2:0,o){if(!this.styledMode)var l=n.style.fontSize;l=i.fontMetrics(l,o).b,o.css({width:(n.width||s.width+(n.widthAdjust||0))+"px"});var h=Math.round(o.getBBox(n.useHTML).height);o.align(a({y:"bottom"===r?l:t+l,height:h},n),!1,"spacingBox"),n.floating||("top"===r?e[0]=Math.ceil(e[0]+h):"bottom"===r&&(e[2]=Math.ceil(e[2]+h)))}},this),e[0]&&"top"===(this.options.title.verticalAlign||"top")&&(e[0]+=this.options.title.margin),e[2]&&"bottom"===this.options.caption.verticalAlign&&(e[2]+=this.options.caption.margin);var o=!this.titleOffset||this.titleOffset.join(",")!==e.join(",");this.titleOffset=e,A(this,"afterLayOutTitles"),!this.isDirtyBox&&o&&(this.isDirtyBox=this.isDirtyLegend=o,this.hasRendered&&p(t,!0)&&this.isDirtyBox&&this.redraw())},getChartSize:function(){var e=this.options.chart,i=e.width;e=e.height;var o=this.renderTo;s(i)||(this.containerWidth=t.getStyle(o,"width")),s(e)||(this.containerHeight=t.getStyle(o,"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&&(b.body.removeChild(i),i.hcOrigDetached=!1),i=i.parentNode;else for(;i&&i.style&&(b.body.contains(i)||i.parentNode||(i.hcOrigDetached=!0,b.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)!==b.body););},setClassName:function(t){this.container.className="highcharts-container "+(t||"")},getContainer:function(){var e,s,o=this.options,n=o.chart,r=this.renderTo,h=t.uniqueKey();r||(this.renderTo=r=n.renderTo),c(r)&&(this.renderTo=r=b.getElementById(r)),r||t.error(13,!0,this);var d=u(i(r,"data-highcharts-chart"));l(d)&&S[d]&&S[d].hasRendered&&S[d].destroy(),i(r,"data-highcharts-chart",this.index),r.innerHTML="",n.skipClone||r.offsetWidth||this.temporaryDisplay(),this.getChartSize(),d=this.chartWidth;var p=this.chartHeight;if(T(r,{overflow:"hidden"}),this.styledMode||(e=a({position:"relative",overflow:"hidden",width:d+"px",height:p+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)"},n.style)),this.container=r=k("div",{id:h},e,r),this._cursor=r.style.cursor,this.renderer=new(t[n.renderer]||t.Renderer)(r,d,p,null,n.forExport,o.exporting&&o.exporting.allowHTML,this.styledMode),this.setClassName(n.className),this.styledMode)for(s in o.defs)this.renderer.definition(o.defs[s]);else this.renderer.setStyle(n.style);this.renderer.chartIndex=this.index,A(this,"afterGetContainer")},getMargins:function(t){var e=this.spacing,i=this.margin,o=this.titleOffset;this.resetMargins(),o[0]&&!s(i[0])&&(this.plotTop=Math.max(this.plotTop,o[0]+e[0])),o[2]&&!s(i[2])&&(this.marginBottom=Math.max(this.marginBottom,o[2]+e[2])),this.legend&&this.legend.display&&this.legend.adjustMargins(i,e),A(this,"getMargins"),t||this.getAxisMargins()},getAxisMargins:function(){var t=this,e=t.axisOffset=[0,0,0,0],i=t.colorAxis,o=t.margin,n=function(t){t.forEach(function(t){t.visible&&t.getOffset()})};t.hasCartesianSeries?n(t.axes):i&&i.length&&n(i),P.forEach(function(i,n){s(o[n])||(t[i]+=e[n])}),t.setChartSize()},reflow:function(e){var i=this,o=i.options.chart,n=i.renderTo,a=s(o.width)&&s(o.height),r=o.width||t.getStyle(n,"width");o=o.height||t.getStyle(n,"height"),n=e?e.target:I,a||i.isPrinting||!r||!o||n!==I&&n!==b||(r===i.containerWidth&&o===i.containerHeight||(t.clearTimeout(i.reflowTimeout),i.reflowTimeout=m(function(){i.container&&i.setSize(void 0,void 0,!1)},e?100:0)),i.containerWidth=r,i.containerHeight=o)},setReflow:function(t){var e=this;!1===t||this.unbindReflow?!1===t&&this.unbindReflow&&(this.unbindReflow=this.unbindReflow()):(this.unbindReflow=v(I,"resize",function(t){e.options&&e.reflow(t)}),v(this,"destroy",this.unbindReflow))},setSize:function(t,e,i){var s=this,o=s.renderer;if(s.isResizing+=1,f(i,s),s.oldChartHeight=s.chartHeight,s.oldChartWidth=s.chartWidth,void 0!==t&&(s.options.chart.width=t),void 0!==e&&(s.options.chart.height=e),s.getChartSize(),!s.styledMode){var n=o.globalAnimation;(n?x:T)(s.container,{width:s.chartWidth+"px",height:s.chartHeight+"px"},n)}s.setChartSize(!0),o.setSize(s.chartWidth,s.chartHeight,i),s.axes.forEach(function(t){t.isDirty=!0,t.setScale()}),s.isDirtyLegend=!0,s.isDirtyBox=!0,s.layOutTitles(),s.getMargins(),s.redraw(i),s.oldChartHeight=null,A(s,"resize"),m(function(){s&&A(s,"endResize",null,function(){--s.isResizing})},y(n).duration||0)},setChartSize:function(t){var e,i,s,o,n=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=o=Math.max(0,Math.round(l-i-this.marginBottom)),this.plotSizeX=n?o:s,this.plotSizeY=n?s:o,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:o},r=2*Math.floor(this.plotBorderWidth/2),n=Math.ceil(Math.max(r,d[3])/2),a=Math.ceil(Math.max(r,d[0])/2),this.clipBox={x:n,y:a,width:Math.floor(this.plotSizeX-Math.max(r,d[1])/2-n),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()}),A(this,"afterSetChartSize",{skipAxes:t})},resetMargins:function(){A(this,"resetMargins");var t=this,e=t.options.chart;["margin","spacing"].forEach(function(i){var s=e[i],o=h(s)?s:[s,s,s,s];["Top","Right","Bottom","Left"].forEach(function(s,n){t[i][n]=p(e[i+s],o[n])})}),P.forEach(function(e,i){t[e]=p(t.margin[i],t.spacing[i])}),t.axisOffset=[0,0,0,0],t.clipOffset=[0,0,0,0]},drawChartBox:function(){var t,e=this.options.chart,i=this.renderer,s=this.chartWidth,o=this.chartHeight,n=this.chartBackground,a=this.plotBackground,r=this.plotBorder,l=this.styledMode,h=this.plotBGImage,c=e.backgroundColor,d=e.plotBackgroundColor,p=e.plotBackgroundImage,u=this.plotLeft,f=this.plotTop,g=this.plotWidth,m=this.plotHeight,v=this.plotBox,x=this.clipRect,y=this.clipBox,b="animate";if(n||(this.chartBackground=n=i.rect().addClass("highcharts-background").add(),b="attr"),l)var w=t=n.strokeWidth();else w=e.borderWidth||0,t=w+(e.shadow?8:0),c={fill:c||"none"},(w||n["stroke-width"])&&(c.stroke=e.borderColor,c["stroke-width"]=w),n.attr(c).shadow(e.shadow);n[b]({x:t/2,y:t/2,width:s-t-w%2,height:o-t-w%2,r:e.borderRadius}),b="animate",a||(b="attr",this.plotBackground=a=i.rect().addClass("highcharts-plot-background").add()),a[b](v),l||(a.attr({fill:d||"none"}).shadow(e.plotShadow),p&&(h?h.animate(v):this.plotBGImage=i.image(p,u,f,g,m).add())),x?x.animate({width:y.width,height:y.height}):this.clipRect=i.clipRect(y),b="animate",r||(b="attr",this.plotBorder=r=i.rect().addClass("highcharts-plot-border").attr({zIndex:1}).add()),l||r.attr({stroke:e.plotBorderColor,"stroke-width":e.plotBorderWidth||0,fill:"none"}),r[b](r.crisp({x:u,y:f,width:g,height:m},-r.strokeWidth())),this.isDirtyBox=!1,A(this,"afterDrawChartBox")},propFromSeries:function(){var t,e,i,s=this,o=s.options.chart,n=s.options.series;["inverted","angular","polar"].forEach(function(a){for(t=_[o.type||o.defaultSeriesType],i=o[a]||t&&t.prototype[a],e=n&&n.length;!i&&e--;)(t=_[n[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;c(i)&&(i=":previous"===i?t.series[e.index-1]:t.get(i))&&i.linkedParent!==e&&(i.linkedSeries.push(e),e.linkedParent=i,e.visible=p(e.options.visible,i.options.visible,e.visible))}),A(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=a(e.style,i.style),o=u(s.left)+t.plotLeft,n=u(s.top)+t.plotTop+12;delete s.left,delete s.top,t.renderer.text(i.html,o,n).attr({zIndex:2}).css(s).add()})},render:function(){var t=this.axes,e=this.colorAxis,i=this.renderer,s=this.options,o=0,n=function(t){t.forEach(function(t){t.visible&&t.render()})};this.setTitle(),this.legend=new E(this,s.legend),this.getStacks&&this.getStacks(),this.getMargins(!0),this.setChartSize(),s=this.plotWidth,t.some(function(t){if(t.horiz&&t.visible&&t.options.labels.enabled&&t.series.length)return o=21,!0});var a=this.plotHeight=Math.max(this.plotHeight-o,0);t.forEach(function(t){t.setScale()}),this.getAxisMargins();var r=1.1<s/this.plotWidth,l=1.05<a/this.plotHeight;(r||l)&&(t.forEach(function(t){(t.horiz&&r||!t.horiz&&l)&&t.setTickInterval(!0)}),this.getMargins()),this.drawChartBox(),this.hasCartesianSeries?n(t):e&&e.length&&n(e),this.seriesGroup||(this.seriesGroup=i.g("series-group").attr({zIndex:3}).add()),this.renderSeries(),this.renderLabels(),this.addCredits(),this.setResponsive&&this.setResponsive(),this.updateContainerScaling(),this.hasRendered=!0},addCredits:function(t){var e=this;t=O(!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&&(I.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)})},updateContainerScaling:function(){var t=this.container;if(t.offsetWidth&&t.offsetHeight&&t.getBoundingClientRect){var e=t.getBoundingClientRect(),i=e.width/t.offsetWidth;t=e.height/t.offsetHeight,1!==i||1!==t?this.containerScaling={scaleX:i,scaleY:t}:delete this.containerScaling}},destroy:function(){var e,i=this,s=i.axes,a=i.series,r=i.container,l=r&&r.parentNode;for(A(i,"destroy"),i.renderer.forExport?n(S,i):S[i.index]=void 0,t.chartCount--,i.renderTo.removeAttribute("data-highcharts-chart"),D(i),e=s.length;e--;)s[e]=s[e].destroy();for(this.scroller&&this.scroller.destroy&&this.scroller.destroy(),e=a.length;e--;)a[e]=a[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())}),r&&(r.innerHTML="",D(r),l&&o(r)),d(i,function(t,e){delete i[e]})},firstRender:function(){var t=this,e=t.options;t.isReadyToRender&&!t.isReadyToRender()||(t.getContainer(),t.resetMargins(),t.setChartSize(),t.propFromSeries(),t.getAxes(),(r(e.series)?e.series:[]).forEach(function(e){t.initSeries(e)}),t.linkSeries(),A(t,"beforeRender"),L&&(t.pointer=new L(t,e)),t.render(),!t.renderer.imgCount&&t.onload&&t.onload(),t.temporaryDisplay(!0))},onload:function(){this.callbacks.concat([this.callback]).forEach(function(t){t&&void 0!==this.index&&t.apply(this,[this])},this),A(this,"load"),A(this,"render"),s(this.index)&&this.setReflow(this.options.chart.reflow),this.onload=null}})}),e(i,"parts/ScrollablePlotArea.js",[i["parts/Globals.js"],i["parts/Utilities.js"]],function(t,e){var i=e.pick,s=t.addEvent;e=t.Chart,s(e,"afterSetChartSize",function(e){var i=this.options.chart.scrollablePlotArea,s=i&&i.minWidth;if(i=i&&i.minHeight,!this.renderer.forExport){if(s){if(this.scrollablePixelsX=s=Math.max(0,s-this.chartWidth)){this.plotWidth+=s,this.inverted?(this.clipBox.height+=s,this.plotBox.height+=s):(this.clipBox.width+=s,this.plotBox.width+=s);var o={1:{name:"right",value:s}}}}else i&&(this.scrollablePixelsY=s=Math.max(0,i-this.chartHeight))&&(this.plotHeight+=s,this.inverted?(this.clipBox.width+=s,this.plotBox.width+=s):(this.clipBox.height+=s,this.plotBox.height+=s),o={2:{name:"bottom",value:s}});o&&!e.skipAxes&&this.axes.forEach(function(e){o[e.side]?e.getPlotLinePath=function(){var i=o[e.side].name,s=this[i];this[i]=s-o[e.side].value;var n=t.Axis.prototype.getPlotLinePath.apply(this,arguments);return this[i]=s,n}:(e.setAxisSize(),e.setAxisTranslation())})}}),s(e,"render",function(){this.scrollablePixelsX||this.scrollablePixelsY?(this.setUpScrolling&&this.setUpScrolling(),this.applyFixed()):this.fixedDiv&&this.applyFixed()}),e.prototype.setUpScrolling=function(){var e={WebkitOverflowScrolling:"touch",overflowX:"hidden",overflowY:"hidden"};this.scrollablePixelsX&&(e.overflowX="auto"),this.scrollablePixelsY&&(e.overflowY="auto"),this.scrollingContainer=t.createElement("div",{className:"highcharts-scrolling"},e,this.renderTo),this.innerContainer=t.createElement("div",{className:"highcharts-inner-container"},null,this.scrollingContainer),this.innerContainer.appendChild(this.container),this.setUpScrolling=null},e.prototype.moveFixedElements=function(){var t,e=this.container,i=this.fixedRenderer,s=".highcharts-contextbutton .highcharts-credits .highcharts-legend .highcharts-legend-checkbox .highcharts-navigator-series .highcharts-navigator-xaxis .highcharts-navigator-yaxis .highcharts-navigator .highcharts-reset-zoom .highcharts-scrollbar .highcharts-subtitle .highcharts-title".split(" ");this.scrollablePixelsX&&!this.inverted?t=".highcharts-yaxis":this.scrollablePixelsX&&this.inverted?t=".highcharts-xaxis":this.scrollablePixelsY&&!this.inverted?t=".highcharts-xaxis":this.scrollablePixelsY&&this.inverted&&(t=".highcharts-yaxis"),s.push(t,t+"-labels"),s.forEach(function(t){[].forEach.call(e.querySelectorAll(t),function(t){(t.namespaceURI===i.SVG_NS?i.box:i.box.parentNode).appendChild(t),t.style.pointerEvents="auto"})})},e.prototype.applyFixed=function(){var e,o=!this.fixedDiv,n=this.options.chart.scrollablePlotArea;o?(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=e=new t.Renderer(this.fixedDiv,this.chartWidth,this.chartHeight),this.scrollableMask=e.path().attr({fill:t.color(this.options.chart.backgroundColor||"#fff").setOpacity(i(n.opacity,.85)).get(),zIndex:-1}).addClass("highcharts-scrollable-mask").add(),this.moveFixedElements(),s(this,"afterShowResetZoom",this.moveFixedElements),s(this,"afterLayOutTitles",this.moveFixedElements)):this.fixedRenderer.setSize(this.chartWidth,this.chartHeight),e=this.chartWidth+(this.scrollablePixelsX||0);var a=this.chartHeight+(this.scrollablePixelsY||0);t.stop(this.container),this.container.style.width=e+"px",this.container.style.height=a+"px",this.renderer.boxWrapper.attr({width:e,height:a,viewBox:[0,0,e,a].join(" ")}),this.chartBackground.attr({width:e,height:a}),this.scrollablePixelsY&&(this.scrollingContainer.style.height=this.chartHeight+"px"),o&&(n.scrollPositionX&&(this.scrollingContainer.scrollLeft=this.scrollablePixelsX*n.scrollPositionX),n.scrollPositionY&&(this.scrollingContainer.scrollTop=this.scrollablePixelsY*n.scrollPositionY)),a=this.axisOffset,o=this.plotTop-a[0]-1,n=this.plotLeft-a[3]-1,e=this.plotTop+this.plotHeight+a[2]+1,a=this.plotLeft+this.plotWidth+a[1]+1;var r=this.plotLeft+this.plotWidth-(this.scrollablePixelsX||0),l=this.plotTop+this.plotHeight-(this.scrollablePixelsY||0);o=this.scrollablePixelsX?["M",0,o,"L",this.plotLeft-1,o,"L",this.plotLeft-1,e,"L",0,e,"Z","M",r,o,"L",this.chartWidth,o,"L",this.chartWidth,e,"L",r,e,"Z"]:this.scrollablePixelsY?["M",n,0,"L",n,this.plotTop-1,"L",a,this.plotTop-1,"L",a,0,"Z","M",n,l,"L",n,this.chartHeight,"L",a,this.chartHeight,"L",a,l,"Z"]:["M",0,0],"adjustHeight"!==this.redrawTrigger&&this.scrollableMask.attr({d:o})}}),e(i,"parts/Point.js",[i["parts/Globals.js"],i["parts/Utilities.js"]],function(t,e){var i,s=e.defined,n=e.erase,a=e.extend,r=e.isArray,l=e.isNumber,h=e.isObject,c=e.pick,d=t.fireEvent,p=t.format,u=t.uniqueKey,f=t.removeEvent;t.Point=i=function(){},t.Point.prototype={init:function(t,e,i){return this.series=t,this.applyOptions(e,i),this.id=s(this.id)?this.id:u(),this.resolveColor(),t.chart.pointCount++,d(this,"afterInit"),this},resolveColor:function(){var t=this.series,e=t.chart.options.chart.colorCount,i=t.chart.styledMode;i||this.options.color||(this.color=t.color),t.options.colorByPoint?(i||(e=t.options.colors||t.chart.options.colors,this.color=this.color||e[t.colorCounter],e=e.length),i=t.colorCounter,++t.colorCounter===e&&(t.colorCounter=0)):i=t.colorIndex,this.colorIndex=c(this.colorIndex,i)},applyOptions:function(t,e){var s=this.series,o=s.options.pointValKey||s.pointValKey;return t=i.prototype.optionsToObject.call(this,t),a(this,t),this.options=this.options?a(this.options,t):t,t.group&&delete this.group,t.dataLabels&&delete this.dataLabels,o&&(this.y=this[o]),this.formatPrefix=(this.isNull=c(this.isValid&&!this.isValid(),null===this.x||!l(this.y)))?"null":"point",this.selected&&(this.state="select"),"name"in this&&void 0===e&&s.xAxis&&s.xAxis.hasNames&&(this.x=s.xAxis.nameToX(this)),void 0===this.x&&s&&(this.x=void 0===e?s.autoIncrement(this):e),this},setNestedProperty:function(t,e,i){return i.split(".").reduce(function(t,i,s,o){return t[i]=o.length-1===s?e:h(t[i],!0)?t[i]:{},t[i]},t),t},optionsToObject:function(e){var i={},s=this.series,n=s.options.keys,a=n||s.pointArrayMap||["y"],h=a.length,c=0,d=0;if(l(e)||null===e)i[a[0]]=e;else if(r(e))for(!n&&e.length>h&&(s=o(e[0]),"string"===s?i.name=e[0]:"number"===s&&(i.x=e[0]),c++);d<h;)n&&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":o(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=this.series,e=t.zones;t=t.zoneAxis||"y";var i,s=0;for(i=e[s];this[t]>=i.value;)i=e[++s];return this.nonZonedColor||(this.nonZonedColor=this.color),this.color=i&&i.color&&!this.options.color?i.color:this.nonZonedColor,i},hasNewShapeType:function(){return this.graphic&&this.graphic.element.nodeName!==this.shapeType},destroy:function(){var t,e=this.series.chart,i=e.hoverPoints;e.pointCount--,i&&(this.setState(),n(i,this),i.length||(e.hoverPoints=null)),this===e.hoverPoint&&this.onMouseOut(),(this.graphic||this.dataLabel||this.dataLabels)&&(f(this),this.destroyElements()),this.legendItem&&e.legend.destroyItem(this);for(t in this)this[t]=null},destroyElements:function(t){var e,i=this,s=[];for(t=t||{graphic:1,dataLabel:1},t.graphic&&s.push("graphic","shadowGroup"),t.dataLabel&&s.push("dataLabel","dataLabelUpper","connector"),e=s.length;e--;){var o=s[e];i[o]&&(i[o]=i[o].destroy())}["dataLabel","connector"].forEach(function(e){var s=e+"s";t[e]&&i[s]&&(i[s].forEach(function(t){t.element&&t.destroy()}),delete i[s])})},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=c(i.valueDecimals,""),o=i.valuePrefix||"",n=i.valueSuffix||"";return e.chart.styledMode&&(t=e.chart.tooltip.styledModeFormat(t)),(e.pointArrayMap||["y"]).forEach(function(e){e="{point."+e,(o||n)&&(t=t.replace(RegExp(e+"}","g"),o+e+"}"+n)),t=t.replace(RegExp(e+"}","g"),e+":,."+s+"f}")}),p(t,{point:this,series:this.series},e.chart.time)},firePointEvent:function(t,e,i){var s=this,o=this.series.options;(o.point.events[t]||s.options&&s.options.events&&s.options.events[t])&&this.importEvents(),"click"===t&&o.allowPointSelect&&(i=function(t){s.select&&s.select(null,t.ctrlKey||t.metaKey||t.shiftKey)}),d(this,t,e,i)},visible:!0}}),e(i,"parts/Series.js",[i["parts/Globals.js"],i["parts/Utilities.js"]],function(t,e){var i=e.arrayMax,s=e.arrayMin,o=e.defined,n=e.erase,a=e.extend,r=e.isArray,l=e.isNumber,h=e.isString,c=e.objectEach,d=e.pick,p=e.splat,u=e.syncTimeout,f=t.addEvent,g=t.animObject,m=t.correctFloat,v=t.defaultOptions,x=t.defaultPlotOptions,y=t.fireEvent,b=t.merge,w=t.removeEvent,k=t.SVGElement,M=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"},{axisTypes:["xAxis","yAxis"],coll:"series",colorCounter:0,cropShoulder:1,directTouch:!1,isCartesian:!0,parallelArrays:["x","y"],pointClass:t.Point,requireSorting:!0,sorted:!0,init:function(e,i){y(this,"init",{options:i});var s,o=this,n=e.series;this.eventOptions=this.eventOptions||{},o.chart=e,o.options=i=o.setOptions(i),o.linkedSeries=[],o.bindAxes(),a(o,{name:i.name,state:"",visible:!1!==i.visible,selected:!0===i.selected});var r=i.events;c(r,function(e,i){t.isFunction(e)&&o.eventOptions[i]!==e&&(t.isFunction(o.eventOptions[i])&&w(o,i,o.eventOptions[i]),o.eventOptions[i]=e,f(o,i,e))}),(r&&r.click||i.point&&i.point.events&&i.point.events.click||i.allowPointSelect)&&(e.runTrackerClick=!0),o.getColor(),o.getSymbol(),o.parallelArrays.forEach(function(t){o[t+"Data"]||(o[t+"Data"]=[])}),o.points||o.data||o.setData(i.data,!1),o.isCartesian&&(e.hasCartesianSeries=!0),n.length&&(s=n[n.length-1]),o._i=d(s&&s._i,-1)+1,e.orderSeries(this.insert(n)),y(this,"afterInit")},insert:function(t){var e,i=this.options.index;if(l(i)){for(e=t.length;e--;)if(i>=d(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 d(e,t.length-1)},bindAxes:function(){var e,i=this,s=i.options,o=i.chart;y(this,"bindAxes",null,function(){(i.axisTypes||[]).forEach(function(n){o[n].forEach(function(t){e=t.options,(s[n]===e.index||void 0!==s[n]&&s[n]===e.id||void 0===s[n]&&0===e.index)&&(i.insert(t.series),i[n]=t,t.isDirty=!0)}),i[n]||i.optionalAxis===n||t.error(18,!0,o)})})},updateParallelArrays:function(t,e){var i=t.series,s=arguments,o=l(e)?function(s){var o="y"===s&&i.toYData?i.toYData(t):t[s];i[s+"Data"][e]=o}:function(t){Array.prototype[e].apply(i[t+"Data"],Array.prototype.slice.call(s,2))};i.parallelArrays.forEach(o)},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,o=this.chart.time;return i=d(i,e.pointStart,0),this.pointInterval=t=d(this.pointInterval,e.pointInterval,1),s&&(e=new o.Date(i),"day"===s?o.set("Date",e,o.get("Date",e)+t):"month"===s?o.set("Month",e,o.get("Month",e)+t):"year"===s&&o.set("FullYear",e,o.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||{};t=b(t),e=e.styledMode;var a={plotOptions:s,userOptions:t};y(this,"setOptions",a);var r=a.plotOptions[this.type],l=n.plotOptions||{};return this.userOptions=a.userOptions,n=b(r,s.series,n.plotOptions&&n.plotOptions[this.type],t),this.tooltipOptions=b(v.tooltip,v.plotOptions.series&&v.plotOptions.series.tooltip,v.plotOptions[this.type].tooltip,i.tooltip.userOptions,s.series&&s.series.tooltip,s[this.type].tooltip,t.tooltip),this.stickyTracking=d(t.stickyTracking,l[this.type]&&l[this.type].stickyTracking,l.series&&l.series.stickyTracking,!(!this.tooltipOptions.shared||this.noSharedTooltip)||n.stickyTracking),null===r.marker&&delete n.marker,this.zoneAxis=n.zoneAxis,i=this.zones=(n.zones||[]).slice(),!n.negativeColor&&!n.negativeFillColor||n.zones||(s={value:n[this.zoneAxis+"Threshold"]||n.threshold||0,className:"highcharts-negative"},e||(s.color=n.negativeColor,s.fillColor=n.negativeFillColor),i.push(s)),i.length&&o(i[i.length-1].value)&&i.push(e?{}:{color:this.color,fillColor:this.fillColor}),y(this,"afterSetOptions",{options:n}),n},getName:function(){return d(this.options.name,"Series "+(this.index+1))},getCyclic:function(t,e,i){var s=this.chart,n=this.userOptions,a=t+"Index",r=t+"Counter",l=i?i.length:d(s.options.chart[t+"Count"],s[t+"Count"]);if(!e){var h=d(n[a],n["_"+a]);o(h)||(s.series.length||(s[r]=0),n["_"+a]=h=s[r]%l,s[r]+=1),i&&(e=i[h])}void 0!==h&&(this[a]=h),this[t]=e},getColor:function(){this.chart.styledMode?this.getCyclic("color"):this.options.colorByPoint?this.options.color=null:this.getCyclic("color",this.options.color||x[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,o=this.points;if(i){var n=(i=this.chart.get(i))&&i.index;void 0!==n&&(s=!0)}return void 0===n&&l(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(t){var e,i,s,n=this.options,a=this.points,r=[],h=this.requireSorting,c=t.length===a.length,d=!0;if(this.xIncrement=null,t.forEach(function(t,i){var d=o(t)&&this.pointClass.prototype.optionsToObject.call({series:this},t)||{},p=d.x;(d.id||l(p))&&(p=this.findPointIndex(d,s),-1===p||void 0===p?r.push(t):a[p]&&t!==n.data[p]?(a[p].update(t,!1,null,!1),a[p].touched=!0,h&&(s=p+1)):a[p]&&(a[p].touched=!0),(!c||i!==p||this.hasDerivedData)&&(e=!0))},this),e)for(t=a.length;t--;)(i=a[t])&&!i.touched&&i.remove(!1);else c?t.forEach(function(t,e){a[e].update&&t!==a[e].y&&a[e].update(t,!1,null,!1)}):d=!1;return a.forEach(function(t){t&&(t.touched=!1)}),!!d&&(r.forEach(function(t){this.addPoint(t,!1,null,null,!1)},this),!0)},setData:function(e,i,s,o){var n,a=this,c=a.points,p=c&&c.length||0,u=a.options,f=a.chart,g=null,m=a.xAxis;g=u.turboThreshold;var v,x=this.xData,y=this.yData,b=(n=a.pointArrayMap)&&n.length,w=u.keys,k=0,M=1;if(e=e||[],n=e.length,i=d(i,!0),!1!==o&&n&&p&&!a.cropped&&!a.hasGroupedData&&a.visible&&!a.isSeriesBoosting&&(v=this.updateData(e)),!v){if(a.xIncrement=null,a.colorCounter=0,this.parallelArrays.forEach(function(t){a[t+"Data"].length=0}),g&&n>g)if(g=a.getFirstValidPoint(e),l(g))for(s=0;s<n;s++)x[s]=this.autoIncrement(),y[s]=e[s];else if(r(g))if(b)for(s=0;s<n;s++)o=e[s],x[s]=o[0],y[s]=o.slice(1,b+1);else for(w&&(k=w.indexOf("x"),M=w.indexOf("y"),k=0<=k?k:0,M=0<=M?M:1),s=0;s<n;s++)o=e[s],x[s]=o[k],y[s]=o[M];else t.error(12,!1,f);else for(s=0;s<n;s++)void 0!==e[s]&&(o={series:a},a.pointClass.prototype.applyOptions.apply(o,[e[s]]),a.updateParallelArrays(o,s));for(y&&h(y[0])&&t.error(14,!0,f),a.data=[],a.options.data=a.userOptions.data=e,s=p;s--;)c[s]&&c[s].destroy&&c[s].destroy();m&&(m.minRange=m.userMinRange),a.isDirty=f.isDirtyBox=!0,a.isDirtyData=!!c,s=!1}"point"===u.legendType&&(this.processData(),this.generatePoints()),i&&f.redraw(s)},processData:function(e){var i=this.xData,s=this.yData,o=i.length,n=0,a=this.xAxis,r=this.options,l=r.cropThreshold,h=this.getExtremesFromAll||r.getExtremesFromAll,c=this.isCartesian;r=a&&a.val2lin;var d=a&&a.isLog,p=this.requireSorting;if(c&&!this.isDirty&&!a.isDirty&&!this.yAxis.isDirty&&!e)return!1;if(a){e=a.getExtremes();var u=e.min,f=e.max}if(c&&this.sorted&&!h&&(!l||o>l||this.forceCrop))if(i[o-1]<u||i[0]>f)i=[],s=[];else if(this.yData&&(i[0]<u||i[o-1]>f)){n=this.cropData(this.xData,this.yData,u,f),i=n.xData,s=n.yData,n=n.start;var g=!0}for(l=i.length||1;--l;)if(0<(o=d?r(i[l])-r(i[l-1]):i[l]-i[l-1])&&(void 0===m||o<m))var m=o;else 0>o&&p&&(t.error(15,!1,this.chart),p=!1);this.cropped=g,this.cropStart=n,this.processedXData=i,this.processedYData=s,this.closestPointRange=this.basePointRange=m},cropData:function(t,e,i,s,o){var n,a=t.length,r=0,l=a;for(o=d(o,this.cropShoulder),n=0;n<a;n++)if(t[n]>=i){r=Math.max(0,n-o);break}for(i=n;i<a;i++)if(t[i]>s){l=i+o;break}return{xData:t.slice(r,l),yData:e.slice(r,l),start:r,end:l}},generatePoints:function(){var t,e=this.options,i=e.data,s=this.data,o=this.processedXData,n=this.processedYData,r=this.pointClass,l=o.length,h=this.cropStart||0,c=this.hasGroupedData;e=e.keys;var d,u=[];for(s||c||(s=[],s.length=i.length,s=this.data=s),e&&c&&(this.options.keys=!1),d=0;d<l;d++){var f=h+d;if(c){var g=(new r).init(this,[o[d]].concat(p(n[d])));g.dataGroup=this.groupMap[d],g.dataGroup.options&&(g.options=g.dataGroup.options,a(g,g.dataGroup.options),delete g.dataLabels)}else(g=s[f])||void 0===i[f]||(s[f]=g=(new r).init(this,i[f],o[d]));g&&(g.index=f,u[d]=g)}if(this.options.keys=e,s&&(l!==(t=s.length)||c))for(d=0;d<t;d++)d!==h||c||(d+=l),s[d]&&(s[d].destroyElements(),s[d].plotX=void 0);this.data=s,this.points=u,y(this,"afterGeneratePoints")},getXExtremes:function(t){return{min:s(t),max:i(t)}},getExtremes:function(t){var e,o=this.xAxis,n=this.yAxis,a=this.processedXData||this.xData,h=[],c=0,d=0,p=0,u=this.requireSorting?this.cropShoulder:0,f=!!n&&n.positiveValuesOnly;for(t=t||this.stackedYData||this.processedYData||[],n=t.length,o&&(p=o.getExtremes(),d=p.min,p=p.max),e=0;e<n;e++){var g=a[e],m=t[e],v=(l(m)||r(m))&&(m.length||0<m||!f);if(g=this.getExtremesFromAll||this.options.getExtremesFromAll||this.cropped||!o||(a[e+u]||g)>=d&&(a[e-u]||g)<=p,v&&g)if(v=m.length)for(;v--;)l(m[v])&&(h[c++]=m[v]);else h[c++]=m}this.dataMin=s(h),this.dataMax=i(h),y(this,"afterGetExtremes")},getFirstValidPoint:function(t){for(var e=null,i=t.length,s=0;null===e&&s<i;)e=t[s],s++;return e},translate:function(){this.processedXData||this.processData(),this.generatePoints();var t,e,i=this.options,s=i.stacking,n=this.xAxis,a=n.categories,h=this.yAxis,c=this.points,p=c.length,u=!!this.modifyValue,f=this.pointPlacementToXValue(),g=l(f),v=i.threshold,x=i.startFromThreshold?v:0,b=this.zoneAxis||"y",w=Number.MAX_VALUE;for(t=0;t<p;t++){var k=c[t],M=k.x,S=k.y,T=k.low,C=s&&h.stacks[(this.negStacks&&S<(x?0:v)?"-":"")+this.stackKey];if(h.positiveValuesOnly&&null!==S&&0>=S&&(k.isNull=!0),k.plotX=e=m(Math.min(Math.max(-1e5,n.translate(M,0,0,0,1,f,"flags"===this.type)),1e5)),s&&this.visible&&C&&C[M]){var A=this.getStackIndicator(A,M,this.index);if(!k.isNull)var E=C[M],P=E.points[A.key]}if(r(P)&&(T=P[0],S=P[1],T===x&&A.key===C[M].base&&(T=d(l(v)&&v,h.min)),h.positiveValuesOnly&&0>=T&&(T=null),k.total=k.stackTotal=E.total,k.percentage=E.total&&k.y/E.total*100,k.stackY=S,this.irregularWidths||E.setOffset(this.pointXOffset||0,this.barW||0)),k.yBottom=o(T)?Math.min(Math.max(-1e5,h.translate(T,0,1,0,1)),1e5):null,u&&(S=this.modifyValue(S,k)),k.plotY=S="number"==typeof S&&1/0!==S?Math.min(Math.max(-1e5,h.translate(S,0,1,0,1)),1e5):void 0,k.isInside=void 0!==S&&0<=S&&S<=h.len&&0<=e&&e<=n.len,k.clientX=g?m(n.translate(M,0,0,0,1,f)):e,k.negative=k[b]<(i[b+"Threshold"]||v||0),k.category=a&&void 0!==a[k.x]?a[k.x]:k.x,!k.isNull){void 0!==O&&(w=Math.min(w,Math.abs(e-O)));var O=e}k.zone=this.zones.length&&k.getZone()}this.closestPointRangePx=w,y(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)})},getClipBox:function(t,e){var i=this.options,s=this.chart,o=s.inverted,n=this.xAxis,a=n&&this.yAxis;return t&&!1===i.clip&&a?t=o?{y:-s.chartWidth+a.len+a.pos,height:s.chartWidth,width:s.chartHeight,x:-s.chartHeight+n.len+n.pos}:{y:-a.pos,height:s.chartHeight,width:s.chartWidth,x:-n.pos}:(t=this.clipBox||s.clipBox,e&&(t.width=s.plotSizeX,t.x=0)),e?{width:t.width,x:t.x}:t},setClip:function(t){var e=this.chart,i=this.options,s=e.renderer,o=e.inverted,n=this.clipBox,a=this.getClipBox(t),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,o&&(a.x=e.plotSizeX+(!1!==i.clip?0:e.plotTop)),e[r+"m"]=h=s.clipRect(o?e.plotSizeX+99:-99,o?-e.plotLeft:-e.plotTop,99,o?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||t)&&(this.group.clip(t||n?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]&&(n||(e[r]=e[r].destroy()),e[r+"m"]&&(e[r+"m"]=e[r+"m"].destroy())))},animate:function(t){var e=this.chart,i=g(this.options.animation);if(t)this.setClip(i);else{var s=this.sharedClipKey;t=e[s];var o=this.getClipBox(i,!0);t&&t.animate(o,i),e[s+"m"]&&e[s+"m"].animate({width:o.width+99,x:o.x-(e.inverted?0:99)},i),this.animate=null}},afterAnimate:function(){this.setClip(),y(this,"afterAnimate"),this.finishedAnimating=!0},drawPoints:function(){var t,e=this.points,i=this.chart,s=this.options.marker,o=this[this.specialGroup]||this.markerGroup,n=this.xAxis,a=d(s.enabled,!(n&&!n.isRadial)||null,this.closestPointRangePx>=s.enabledThreshold*s.radius);if(!1!==s.enabled||this._hasPointMarkers)for(n=0;n<e.length;n++){var r=e[n],l=(t=r.graphic)?"animate":"attr",h=r.marker||{},c=!!r.marker,p=a&&void 0===h.enabled||h.enabled,u=!1!==r.isInside;if(p&&!r.isNull){var f=d(h.symbol,this.symbol);p=this.markerAttribs(r,r.selected&&"select"),t?t[u?"show":"hide"](u).animate(p):u&&(0<p.width||r.hasImage)&&(r.graphic=t=i.renderer.symbol(f,p.x,p.y,p.width,p.height,c?h:s).add(o)),t&&!i.styledMode&&t[l](this.pointAttribs(r,r.selected&&"select")),t&&t.addClass(r.getClassName(),!0)}else t&&(r.graphic=t.destroy())}},markerAttribs:function(t,e){var i=this.options.marker,s=t.marker||{},o=s.symbol||i.symbol,n=d(s.radius,i.radius);return e&&(i=i.states[e],e=s.states&&s.states[e],n=d(e&&e.radius,i&&i.radius,n+(i&&i.radiusPlus||0))),t.hasImage=o&&0===o.indexOf("url"),t.hasImage&&(n=0),t={x:Math.floor(t.plotX)-n,y:t.plotY-n},n&&(t.width=t.height=2*n),t},pointAttribs:function(t,e){var i=this.options.marker,s=t&&t.options,o=s&&s.marker||{},n=this.color,a=s&&s.color,r=t&&t.color;s=d(o.lineWidth,i.lineWidth);var l=t&&t.zone&&t.zone.color;return t=1,n=a||l||r||n,a=o.fillColor||i.fillColor||n,n=o.lineColor||i.lineColor||n,e=e||"normal",i=i.states[e],e=o.states&&o.states[e]||{},s=d(e.lineWidth,i.lineWidth,s+d(e.lineWidthPlus,i.lineWidthPlus,0)),a=e.fillColor||i.fillColor||a,n=e.lineColor||i.lineColor||n,t=d(e.opacity,i.opacity,t),{stroke:n,"stroke-width":s,fill:a,opacity:t}},destroy:function(e){var i,s,o,a,r=this,l=r.chart,h=/AppleWebKit\/533/.test(M.navigator.userAgent),d=r.data||[];for(y(r,"destroy"),e||w(r),(r.axisTypes||[]).forEach(function(t){(a=r[t])&&a.series&&(n(a.series,r),a.isDirty=a.forceRedraw=!0)}),r.legendItem&&r.chart.legend.destroyItem(r),s=d.length;s--;)(o=d[s])&&o.destroy&&o.destroy();r.points=null,t.clearTimeout(r.animationTimeout),c(r,function(t,e){t instanceof k&&!t.survive&&(i=h&&"group"===e?"hide":"destroy",t[i]())}),l.hoverSeries===r&&(l.hoverSeries=null),n(l.series,r),l.orderSeries(),c(r,function(t,i){e&&"hcEvents"===i||delete r[i]})},getGraphPath:function(t,e,i){var s,n,a=this,r=a.options,l=r.step,h=[],c=[];return t=t||a.points,(s=t.reversed)&&t.reverse(),(l={right:1,center:2}[l]||l&&3)&&s&&(l=4-l),!r.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&&!o(e)&&0<d?n=!r.connectNulls:s.isNull&&!e?n=!0:(0===d||n?d=["M",s.plotX,s.plotY]:a.getPointSpline?d=a.getPointSpline(t,s,d):l?(d=1===l?["L",f.plotX,u]:2===l?["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),l&&(c.push(s.x),2===l&&c.push(s.x)),h.push.apply(h,d),n=!1)}),h.xMap=c,a.graphPath=h},drawGraph:function(){var t=this,e=this.options,i=(this.gappedPath||this.getGraphPath).call(this),s=this.chart.styledMode,o=[["graph","highcharts-graph"]];s||o[0].push(e.lineColor||this.color||"#cccccc",e.dashStyle),o=t.getZonesGraphs(o),o.forEach(function(o,n){var a=o[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(o[1]).attr({zIndex:1}).add(t.group)),r&&!s&&(a={stroke:o[2],"stroke-width":e.lineWidth,fill:t.fillGraph&&t.color||"none"},o[3]?a.dashstyle=o[3]:"square"!==e.linecap&&(a["stroke-linecap"]=a["stroke-linejoin"]="round"),r[l](a).shadow(2>n&&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,o,n,a=this,r=this.chart,l=r.renderer,h=this.zones,c=this.clips||[],p=this.graph,u=this.area,f=Math.max(r.chartWidth,r.chartHeight),g=this[(this.zoneAxis||"y")+"Axis"],m=r.inverted,v=!1;if(h.length&&(p||u)&&g&&void 0!==g.min){var x=g.reversed,y=g.horiz;p&&!this.showLine&&p.hide(),u&&u.hide();var b=g.getExtremes();h.forEach(function(h,w){t=x?y?r.plotWidth:0:y?0:g.toPixels(b.min)||0,t=Math.min(Math.max(d(e,t),0),f),e=Math.min(Math.max(Math.round(g.toPixels(d(h.value,b.max),!0)||0),0),f),v&&(t=e=g.toPixels(b.max)),s=Math.abs(t-e),o=Math.min(t,e),n=Math.max(t,e),g.isXAxis?(i={x:m?n:o,y:0,width:s,height:f},y||(i.x=r.plotHeight-i.x)):(i={x:0,y:m?n:o,width:f,height:s},y&&(i.y=r.plotWidth-i.y)),m&&l.isVML&&(i=g.isXAxis?{x:0,y:x?o:n,height:i.width,width:r.chartWidth}:{x:i.y-r.plotLeft-r.spacingBox.x,y:0,width:i.height,height:r.chartHeight}),c[w]?c[w].animate(i):c[w]=l.clipRect(i),p&&a["zone-graph-"+w].clip(c[w]),u&&a["zone-area-"+w].clip(c[w]),v=h.value>b.max,a.resetZones&&0===e&&(e=void 0)}),this.clips=c}else a.visible&&(p&&p.show(!0),u&&u.show(!0))},invertGroups:function(t){function e(){["group","markerGroup"].forEach(function(e){i[e]&&(s.renderer.isVML&&i[e].attr({width:i.yAxis.len,height:i.xAxis.len}),i[e].width=i.yAxis.len,i[e].height=i.xAxis.len,i[e].invert(t))})}var i=this,s=i.chart;if(i.xAxis){var o=f(s,"resize",e);f(i,"destroy",o),e(),i.invertGroups=e}},plotGroup:function(t,e,i,s,n){var a=this[t],r=!a;return r&&(this[t]=a=this.chart.renderer.g().attr({zIndex:s||.1}).add(n)),a.addClass("highcharts-"+e+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series "+(o(this.colorIndex)?"highcharts-color-"+this.colorIndex+" ":"")+(this.options.className||"")+(a.hasClass("highcharts-tracker")?" highcharts-tracker":""),!0),a.attr({visibility:i})[r?"attr":"animate"](this.getPlotBox()),a},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=this,e=t.chart,i=t.options,s=!!t.animate&&e.renderer.isSVG&&g(i.animation).duration,o=t.visible?"inherit":"hidden",n=i.zIndex,a=t.hasRendered,r=e.seriesGroup,l=e.inverted;y(this,"render");var h=t.plotGroup("group","series",o,n,r);t.markerGroup=t.plotGroup("markerGroup","markers",o,n,r),s&&t.animate(!0),h.inverted=!(!t.isCartesian&&!t.invertable)&&l,t.drawGraph&&(t.drawGraph(),t.applyZones()),t.visible&&t.drawPoints(),t.drawDataLabels&&t.drawDataLabels(),t.redrawPoints&&t.redrawPoints(),t.drawTracker&&!1!==t.options.enableMouseTracking&&t.drawTracker(),t.invertGroups(l),!1===i.clip||t.sharedClipKey||a||h.clip(e.clipRect),s&&t.animate(),a||(t.animationTimeout=u(function(){t.afterAnimate()},s||0)),t.isDirty=!1,t.hasRendered=!0,y(t,"afterRender")},redraw:function(){var t=this.chart,e=this.isDirty||this.isDirtyData,i=this.group,s=this.xAxis,o=this.yAxis;i&&(t.inverted&&i.attr({width:t.plotWidth,height:t.plotHeight}),i.animate({translateX:d(s&&s.left,t.plotLeft),translateY:d(o&&o.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,o=this.chart.inverted;return this.searchKDTree({clientX:o?i.len-t.chartY+i.pos:t.chartX-i.pos,plotY:o?s.len-t.chartX+s.pos:t.chartY-s.pos},e,t)},buildKDTree:function(t){function e(t,s,o){var n;if(n=t&&t.length){var a=i.kdAxisArray[s%o];return t.sort(function(t,e){return t[a]-e[a]}),n=Math.floor(n/2),{point:t[n],left:e(t.slice(0,n),s+1,o),right:e(t.slice(n+1),s+1,o)}}}this.buildingKdTree=!0;var i=this,s=-1<i.options.findNearestPointBy.indexOf("y")?2:1;delete i.kdTree,u(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=e.point,d=n.kdAxisArray[i%h],p=c,u=o(t[a])&&o(c[a])?Math.pow(t[a]-c[a],2):null,f=o(t[r])&&o(c[r])?Math.pow(t[r]-c[r],2):null;return f=(u||0)+(f||0),c.dist=o(f)?Math.sqrt(f):Number.MAX_VALUE,c.distX=o(u)?Math.sqrt(u):Number.MAX_VALUE,d=t[d]-c[d],f=0>d?"left":"right",u=0>d?"right":"left",e[f]&&(f=s(t,e[f],i+1,h),p=f[l]<p[l]?f:c),e[u]&&Math.sqrt(d*d)<p[l]&&(t=s(t,e[u],i+1,h),p=t[l]<p[l]?t:p),p}var n=this,a=this.kdAxisArray[0],r=this.kdAxisArray[1],l=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.xAxis,e=this.options.pointPlacement;return"between"===e&&(e=t.reversed?-.5:.5),l(e)&&(e*=d(this.options.pointRange||t.pointRange)),e}})}),e(i,"parts/Stacking.js",[i["parts/Globals.js"],i["parts/Utilities.js"]],function(t,e){var i=e.defined,s=e.destroyObjectProperties,o=e.objectEach,n=e.pick;e=t.Axis;var a=t.Chart,r=t.correctFloat,l=t.format,h=t.Series;t.StackItem=function(t,e,i,s,o){var n=t.chart.inverted;this.axis=t,this.isNegative=i,this.options=e=e||{},this.x=s,this.total=null,this.points={},this.stack=o,this.rightCliff=this.leftCliff=0,this.alignOptions={align:e.align||(n?i?"left":"right":"center"),verticalAlign:e.verticalAlign||(n?"middle":i?"bottom":"top"),y:e.y,x:e.x},this.textAlign=e.textAlign||(n?i?"right":"left":"center")},t.StackItem.prototype={destroy:function(){s(this,this.axis)},render:function(t){var e=this.axis.chart,i=this.options,s=i.format;s=s?l(s,this,e.time):i.formatter.call(this),this.label?this.label.attr({text:s,visibility:"hidden"}):(this.label=e.renderer.label(s,null,null,i.shape,null,null,i.useHTML,!1,"stack-labels"),s={text:s,align:this.textAlign,rotation:i.rotation,padding:n(i.padding,0),visibility:"hidden"},this.label.attr(s),e.styledMode||this.label.css(i.style),this.label.added||this.label.add(t)),this.label.labelrank=e.plotHeight},setOffset:function(t,e,s,o,a){var r=this.axis,l=r.chart;if(o=r.translate(r.usePercentage?100:o||this.total,0,0,0,1),s=r.translate(s||0),s=i(o)&&Math.abs(o-s),t=n(a,l.xAxis[0].translate(this.x))+t,r=i(o)&&this.getStackBox(l,this,t,o,e,s,r),e=this.label,t=this.isNegative,a="justify"===n(this.options.overflow,"justify"),e&&r){s=e.getBBox();var c=l.inverted?t?s.width:0:s.width/2,d=l.inverted?s.height/2:t?-4:s.height+4;this.alignOptions.x=n(this.options.x,0),e.align(this.alignOptions,null,r),o=e.alignAttr,e.show(),o.y-=d,a&&(o.x-=c,h.prototype.justifyDataLabel.call(this.axis,e,this.alignOptions,o,s,r),o.x+=c),o.x=e.alignAttr.x,e.attr({x:o.x,y:o.y}),n(!a&&this.options.crop,!0)&&((l=l.isInsidePlot(e.x+(l.inverted?0:-s.width/2),e.y)&&l.isInsidePlot(e.x+(l.inverted?t?-s.width:s.width:s.width/2),e.y+s.height))||e.hide())}},getStackBox:function(t,e,i,s,o,n,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-n:i,y:l?t-i-o:e?t-s-n:t-s,width:l?n:o,height:l?o:n}}},a.prototype.getStacks=function(){var t=this,e=t.inverted;t.yAxis.forEach(function(t){t.stacks&&t.hasVisibleSeries&&(t.oldStacks=t.stacks)}),t.series.forEach(function(i){var s=i.xAxis&&i.xAxis.options||{};!i.options.stacking||!0!==i.visible&&!1!==t.options.chart.ignoreHiddenSeries||(i.stackKey=[i.type,n(i.options.stack,""),e?s.top:s.left,e?s.height:s.width].join())})},e.prototype.buildStacks=function(){var t,e=this.series,i=n(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),o(i,function(t){o(t,function(t){t.render(s)})})},e.prototype.resetStacks=function(){var t=this,e=t.stacks;t.isXAxis||o(e,function(e){o(e,function(i,s){i.touched<t.stacksTouched?(i.destroy(),delete e[s]):(i.total=null,i.cumulative=null)})})},e.prototype.cleanStacks=function(){if(!this.isXAxis){if(this.oldStacks)var t=this.stacks=this.oldStacks;o(t,function(t){o(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=this.processedXData,s=this.processedYData,o=[],a=s.length,l=this.options,h=l.threshold,c=n(l.startFromThreshold&&h,0),d=l.stack;l=l.stacking;var p,u,f=this.stackKey,g="-"+f,m=this.negStacks,v=this.yAxis,x=v.stacks,y=v.oldStacks;for(v.stacksTouched+=1,u=0;u<a;u++){var b=e[u],w=s[u],k=this.getStackIndicator(k,b,this.index),M=k.key,S=(p=m&&w<(c?0:h))?g:f;x[S]||(x[S]={}),x[S][b]||(y[S]&&y[S][b]?(x[S][b]=y[S][b],x[S][b].total=null):x[S][b]=new t.StackItem(v,v.options.stackLabels,p,b,d)),S=x[S][b],null!==w?(S.points[M]=S.points[this.index]=[n(S.cumulative,c)],i(S.cumulative)||(S.base=M),S.touched=v.stacksTouched,0<k.index&&!1===this.singleStacks&&(S.points[M][0]=S.points[this.index+","+b+",0"][0])):S.points[M]=S.points[this.index]=null,"percent"===l?(p=p?f:g,m&&x[p]&&x[p][b]?(p=x[p][b],S.total=p.total=Math.max(p.total,S.total)+Math.abs(w)||0):S.total=r(S.total+(Math.abs(w)||0))):S.total=r(S.total+(w||0)),S.cumulative=n(S.cumulative,c)+(w||0),null!==w&&(S.points[M].push(S.cumulative),o[u]=S.cumulative)}"percent"===l&&(v.usePercentage=!0),this.stackedYData=o,v.oldStacks={}}},h.prototype.modifyStacks=function(){var t,e=this,i=e.stackKey,s=e.yAxis.stacks,o=e.processedXData,n=e.options.stacking;e[n+"Stacker"]&&[i,"-"+i].forEach(function(i){for(var a,r,l=o.length;l--;)a=o[l],t=e.getStackIndicator(t,a,e.index,i),(r=(a=s[i]&&s[i][a])&&a.points[t.key])&&e[n+"Stacker"](r,a,l)})},h.prototype.percentStacker=function(t,e,i){e=e.total?100/e.total:0,t[0]=r(t[0]*e),t[1]=r(t[1]*e),this.stackedYData[i]=t[1]},h.prototype.getStackIndicator=function(t,e,s,o){return!i(t)||t.x!==e||o&&t.key!==o?t={x:e,index:0,key:o}:t.index++,t.key=[s,e,t.index].join(),t}}),e(i,"parts/Dynamics.js",[i["parts/Globals.js"],i["parts/Utilities.js"]],function(t,e){var i=e.defined,s=e.erase,o=e.extend,n=e.isArray,a=e.isNumber,r=e.isObject,l=e.isString,h=e.objectEach,c=e.pick,d=e.setAnimation,p=e.splat,u=t.addEvent,f=t.animate,g=t.Axis;e=t.Chart;var m=t.createElement,v=t.css,x=t.fireEvent,y=t.merge,b=t.Point,w=t.Series,k=t.seriesTypes;t.cleanRecursively=function(e,i){var s={};return h(e,function(o,n){r(e[n],!0)&&!e.nodeType&&i[n]?(o=t.cleanRecursively(e[n],i[n]),Object.keys(o).length&&(s[n]=o)):(r(e[n])||e[n]!==i[n])&&(s[n]=e[n])}),s},o(e.prototype,{addSeries:function(t,e,i){var s,o=this;return t&&(e=c(e,!0),x(o,"addSeries",{options:t},function(){s=o.initSeries(t),o.isDirtyLegend=!0,o.linkSeries(),x(o,"afterAddSeries",{series:s}),e&&o.redraw(i)})),s},addAxis:function(t,e,i,s){return this.createAxis(e?"xAxis":"yAxis",{axis:t,redraw:i,animation:s})},addColorAxis:function(t,e,i){return this.createAxis("colorAxis",{axis:t,redraw:e,animation:i})},createAxis:function(e,i){var s=this.options,o="colorAxis"===e,n=i.redraw,a=i.animation;i=y(i.axis,{index:this[e].length,isX:"xAxis"===e});var r=o?new t.ColorAxis(this,i):new g(this,i);return s[e]=p(s[e]||{}),s[e].push(i),o&&(this.isDirtyLegend=!0,this.axes.forEach(function(t){t.series=[]}),this.series.forEach(function(t){t.bindAxes(),t.isDirtyData=!0})),c(n,!0)&&this.redraw(a),r},showLoading:function(t){var e=this,i=e.options,s=e.loadingDiv,n=i.loading,a=function(){s&&v(s,{left:e.plotLeft+"px",top:e.plotTop+"px",width:e.plotWidth+"px",height:e.plotHeight+"px"})};s||(e.loadingDiv=s=m("div",{className:"highcharts-loading highcharts-loading-hidden"},null,e.container),e.loadingSpan=m("span",{className:"highcharts-loading-inner"},null,s),u(e,"redraw",a)),s.className="highcharts-loading",e.loadingSpan.innerHTML=c(t,i.lang.loading,""),e.styledMode||(v(s,o(n.style,{zIndex:10})),v(e.loadingSpan,n.labelStyle),e.loadingShown||(v(s,{opacity:0,display:""}),f(s,{opacity:n.style.opacity||.5},{duration:n.showDuration||0}))),e.loadingShown=!0,a()},hideLoading:function(){var t=this.options,e=this.loadingDiv;e&&(e.className="highcharts-loading highcharts-loading-hidden",this.styledMode||f(e,{opacity:0},{duration:t.loading.hideDuration||100,complete:function(){v(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 colorAxis series pane".split(" "),update:function(e,s,o,n){var r,d,u,f=this,g={credits:"addCredits",title:"setTitle",subtitle:"setSubtitle",caption:"setCaption"},m=e.isResponsiveOptions,v=[];if(x(f,"update",{options:e}),m||f.setResponsive(!1,!0),e=t.cleanRecursively(e,f.options),y(!0,f.userOptions,e),r=e.chart){if(y(!0,f.options.chart,r),"className"in r&&f.setClassName(r.className),"reflow"in r&&f.setReflow(r.reflow),"inverted"in r||"polar"in r||"type"in r){f.propFromSeries();var b=!0}"alignTicks"in r&&(b=!0),h(r,function(t,e){-1!==f.propsRequireUpdateSeries.indexOf("chart."+e)&&(d=!0),-1!==f.propsRequireDirtyBox.indexOf(e)&&(f.isDirtyBox=!0),m||-1===f.propsRequireReflow.indexOf(e)||(u=!0)}),!f.styledMode&&"style"in r&&f.renderer.setStyle(r.style)}!f.styledMode&&e.colors&&(this.options.colors=e.colors),e.plotOptions&&y(!0,this.options.plotOptions,e.plotOptions),e.time&&this.time===t.time&&(this.time=new t.Time(e.time)),h(e,function(t,e){f[e]&&"function"==typeof f[e].update?f[e].update(t,!1):"function"==typeof f[g[e]]&&f[g[e]](t),"chart"!==e&&-1!==f.propsRequireUpdateSeries.indexOf(e)&&(d=!0)}),this.collectionsWithUpdate.forEach(function(t){if(e[t]){if("series"===t){var s=[];f[t].forEach(function(t,e){t.options.isInternal||s.push(c(t.options.index,e))})}p(e[t]).forEach(function(e,n){(n=i(e.id)&&f.get(e.id)||f[t][s?s[n]:n])&&n.coll===t&&(n.update(e,!1),o&&(n.touched=!0)),!n&&o&&f.collectionsWithInit[t]&&(f.collectionsWithInit[t][0].apply(f,[e].concat(f.collectionsWithInit[t][1]||[]).concat([!1])).touched=!0)}),o&&f[t].forEach(function(t){t.touched||t.options.isInternal?delete t.touched:v.push(t)})}}),v.forEach(function(t){t.remove&&t.remove(!1)}),b&&f.axes.forEach(function(t){t.update({},!1)}),d&&f.series.forEach(function(t){t.update({},!1)}),e.loading&&y(!0,f.options.loading,e.loading),b=r&&r.width,r=r&&r.height,l(r)&&(r=t.relativeLength(r,b||f.chartWidth)),u||a(b)&&b!==f.chartWidth||a(r)&&r!==f.chartHeight?f.setSize(b,r,n):c(s,!0)&&f.redraw(n),x(f,"afterUpdate",{options:e,redraw:s,animation:n})},setSubtitle:function(t,e){this.applyDescription("subtitle",t),this.layOutTitles(e)},setCaption:function(t,e){this.applyDescription("caption",t),this.layOutTitles(e)}}),e.prototype.collectionsWithInit={xAxis:[e.prototype.addAxis,[!0]],yAxis:[e.prototype.addAxis,[!1]],colorAxis:[e.prototype.addColorAxis,[!1]],series:[e.prototype.addSeries]},o(b.prototype,{update:function(t,e,i,s){function o(){a.applyOptions(t),null===a.y&&h&&(a.graphic=h.destroy()),r(t,!0)&&(h&&h.element&&t&&t.marker&&void 0!==t.marker.symbol&&(a.graphic=h.destroy()),t&&t.dataLabels&&a.dataLabel&&(a.dataLabel=a.dataLabel.destroy()),a.connector&&(a.connector=a.connector.destroy())),n=a.index,l.updateParallelArrays(a,n),p.data[n]=r(p.data[n],!0)||r(t,!0)?a.options:c(t,p.data[n]),l.isDirty=l.isDirtyData=!0,!l.fixedBox&&l.hasCartesianSeries&&(d.isDirtyBox=!0),"point"===p.legendType&&(d.isDirtyLegend=!0),e&&d.redraw(i)}var n,a=this,l=a.series,h=a.graphic,d=l.chart,p=l.options;e=c(e,!0),!1===s?o():a.firePointEvent("update",{options:t},o)},remove:function(t,e){this.series.removePoint(this.series.data.indexOf(this),t,e)}}),o(w.prototype,{addPoint:function(t,e,i,s,o){var n=this.options,a=this.data,r=this.chart,l=this.xAxis;l=l&&l.hasNames&&l.names;var h,d=n.data,p=this.xData;e=c(e,!0);var u={series:this};this.pointClass.prototype.applyOptions.apply(u,[t]);var f=u.x,g=p.length;if(this.requireSorting&&f<p[g-1])for(h=!0;g&&p[g-1]>f;)g--;this.updateParallelArrays(u,"splice",g,0,0),this.updateParallelArrays(u,g),l&&u.name&&(l[f]=u.name),d.splice(g,0,t),h&&(this.data.splice(g,0,null),this.processData()),"point"===n.legendType&&this.generatePoints(),i&&(a[0]&&a[0].remove?a[0].remove(!1):(a.shift(),this.updateParallelArrays(u,"shift"),d.shift())),!1!==o&&x(this,"addPoint",{point:u}),this.isDirtyData=this.isDirty=!0,e&&r.redraw(s)},removePoint:function(t,e,i){var s=this,o=s.data,n=o[t],a=s.points,r=s.chart,l=function(){a&&a.length===o.length&&a.splice(t,1),o.splice(t,1),s.options.data.splice(t,1),s.updateParallelArrays(n||{series:s},"splice",t,1),n&&n.destroy(),s.isDirty=!0,s.isDirtyData=!0,e&&r.redraw()};d(i,r),e=c(e,!0),n?n.firePointEvent("remove",null,l):l()},remove:function(t,e,i,s){function o(){n.destroy(s),n.remove=null,a.isDirtyLegend=a.isDirtyBox=!0,a.linkSeries(),c(t,!0)&&a.redraw(e)}var n=this,a=n.chart;!1!==i?x(n,"remove",null,o):o()},update:function(e,i){e=t.cleanRecursively(e,this.userOptions),x(this,"update",{options:e});var s,n=this,a=n.chart,r=n.userOptions,l=n.initialType||n.type,h=e.type||r.type||a.options.chart.type,d=!(this.hasDerivedData||e.dataGrouping||h&&h!==this.type||void 0!==e.pointStart||e.pointInterval||e.pointIntervalUnit||e.keys),p=k[l].prototype,u=["group","markerGroup","dataLabelsGroup","transformGroup"],f=["eventOptions","navigatorSeries","baseSeries"],g=n.finishedAnimating&&{animation:!1},m={};d&&(f.push("data","isDirtyData","points","processedXData","processedYData","xIncrement","_hasPointMarkers","_hasPointLabels","mapMap","mapData","minY","maxY","minX","maxX"),!1!==e.visible&&f.push("area","graph"),n.parallelArrays.forEach(function(t){f.push(t+"Data")}),e.data&&this.setData(e.data,!1)),e=y(r,g,{index:void 0===r.index?n.index:r.index,pointStart:c(r.pointStart,n.xData[0])},!d&&{data:n.options.data},e),d&&e.data&&(e.data=n.options.data),f=u.concat(f),f.forEach(function(t){f[t]=n[t],delete n[t]}),n.remove(!1,null,!1,!0);for(s in p)n[s]=void 0;if(k[h||l]?o(n,k[h||l].prototype):t.error(17,!0,a,{missingModuleFor:h||l}),f.forEach(function(t){n[t]=f[t]}),n.init(a,e),d&&this.points){var v=n.options;!1===v.visible?(m.graphic=1,m.dataLabel=1):n._hasPointLabels||(h=v.marker,p=v.dataLabels,h&&(!1===h.enabled||"symbol"in h)&&(m.graphic=1),p&&!1===p.enabled&&(m.dataLabel=1)),this.points.forEach(function(t){t&&t.series&&(t.resolveColor(),Object.keys(m).length&&t.destroyElements(m),!1===v.showInLegend&&t.legendItem&&a.legend.destroyItem(t))},this)}e.zIndex!==r.zIndex&&u.forEach(function(t){n[t]&&n[t].attr({zIndex:e.zIndex})}),n.initialType=l,a.linkSeries(),x(this,"afterUpdate"),c(i,!0)&&a.redraw(!!d&&void 0)},setName:function(t){this.name=this.options.name=this.userOptions.name=t,this.chart.isDirtyLegend=!0}}),o(g.prototype,{update:function(t,e){var i=this.chart,s=t&&t.events||{};t=y(this.userOptions,t),i.options[this.coll].indexOf&&(i.options[this.coll][i.options[this.coll].indexOf(this.userOptions)]=t),h(i.options[this.coll].events,function(t,e){void 0===s[e]&&(s[e]=void 0)}),this.destroy(!0),this.init(i,o(t,{events:s})),i.isDirtyBox=!0,c(e,!0)&&i.redraw()},remove:function(t){for(var e=this.chart,i=this.coll,o=this.series,a=o.length;a--;)o[a]&&o[a].remove(!1);s(e.axes,this),s(e[i],this),n(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,c(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"],i["parts/Utilities.js"]],function(t,e){var i=e.objectEach,s=e.pick,o=t.color,n=t.Series;(e=t.seriesType)("area","line",{softThreshold:!1,threshold:0},{singleStacks:!1,getStackPoints:function(t){var e,o=[],n=[],a=this.xAxis,r=this.yAxis,l=r.stacks[this.stackKey],h={},c=this.index,d=r.series,p=d.length,u=s(r.options.reversedStacks,!0)?1:-1;if(t=t||this.points,this.options.stacking){for(e=0;e<t.length;e++)t[e].leftNull=t[e].rightNull=void 0,h[t[e].x]=t[e];i(l,function(t,e){null!==t.total&&n.push(e)}),n.sort(function(t,e){return t-e});var f=d.map(function(t){return t.visible});n.forEach(function(t,i){var s,d,g=0;if(h[t]&&!h[t].isNull)o.push(h[t]),[-1,1].forEach(function(o){var a=1===o?"rightNull":"leftNull",r=0,g=l[n[i+o]];if(g)for(e=c;0<=e&&e<p;)s=g.points[e],s||(e===c?h[t][a]=!0:f[e]&&(d=l[t].points[e])&&(r-=d[1]-d[0])),e+=u;h[t][1===o?"rightCliff":"leftCliff"]=r});else{for(e=c;0<=e&&e<p;){if(s=l[t].points[e]){g=s[1];break}e+=u}g=r.translate(g,0,1,0,1),o.push({isNull:!0,plotX:a.translate(t,0,0,0,1),x:t,plotY:g,yBottom:g})}})}return o},getGraphPath:function(t){var e,i=n.prototype.getGraphPath,o=this.options,a=o.stacking,r=this.yAxis,l=[],h=[],c=this.index,d=r.stacks[this.stackKey],p=o.threshold,u=Math.round(r.getThreshold(o.threshold));o=s(o.connectNulls,"percent"===a);var f=function(e,i,s){var o=t[e];e=a&&d[o.x].points[c];var n=o[s+"Null"]||0;if(s=o[s+"Cliff"]||0,o=!0,s||n){var f=(n?e[0]:e[1])+s,g=e[0]+s;o=!!n}else!a&&t[i]&&t[i].isNull&&(f=g=p);void 0!==f&&(h.push({plotX:m,plotY:null===f?u:r.getThreshold(f),isNull:o,isCliff:!0}),l.push({plotX:m,plotY:null===g?u:r.getThreshold(g),doCurve:!1}))};for(t=t||this.points,a&&(t=this.getStackPoints(t)),e=0;e<t.length;e++){a||(t[e].leftCliff=t[e].rightCliff=t[e].leftNull=t[e].rightNull=void 0);var g=t[e].isNull,m=s(t[e].rectPlotX,t[e].plotX),v=s(t[e].yBottom,u);g&&!o||(o||f(e,e-1,"left"),g&&!a&&o||(h.push(t[e]),l.push({x:e,plotX:m,plotY:v})),o||f(e,e+1,"right"))}return e=i.call(this,h,!0,!0),l.reversed=!0,g=i.call(this,l,!0,!0),g.length&&(g[0]="L"),g=e.concat(g),i=i.call(this,h,!1,o),g.xMap=e.xMap,this.areaPath=g,i},drawGraph:function(){this.areaPath=[],n.prototype.drawGraph.apply(this);var t=this,e=this.areaPath,i=this.options,a=[["area","highcharts-area",this.color,i.fillColor]];this.zones.forEach(function(e,s){a.push(["zone-area-"+s,"highcharts-area highcharts-zone-area-"+s+" "+e.className,e.color||t.color,e.fillColor||i.fillColor])}),a.forEach(function(n){var a=n[0],r=t[a],l=r?"animate":"attr",h={};r?(r.endX=t.preventGraphAnimation?null:e.xMap,r.animate({d:e})):(h.zIndex=0,r=t[a]=t.chart.renderer.path(e).addClass(n[1]).add(t.group),r.isArea=!0),t.chart.styledMode||(h.fill=s(n[3],o(n[2]).setOpacity(s(i.fillOpacity,.75)).get())),r[l](h),r.startX=e.xMap,r.shiftUnit=i.step?2:1})},drawLegendSymbol:t.LegendSymbolMixin.drawRectangle})}),e(i,"parts/SplineSeries.js",[i["parts/Globals.js"],i["parts/Utilities.js"]],function(t,e){var i=e.pick;(t=t.seriesType)("spline","line",{},{getPointSpline:function(t,e,s){var o=e.plotX,n=e.plotY,a=t[s-1];if(s=t[s+1],a&&!a.isNull&&!1!==a.doCurve&&!e.isCliff&&s&&!s.isNull&&!1!==s.doCurve&&!e.isCliff){t=a.plotY;var r=s.plotX;s=s.plotY;var l=0,h=(1.5*o+a.plotX)/2.5,c=(1.5*n+t)/2.5;r=(1.5*o+r)/2.5;var d=(1.5*n+s)/2.5;r!==h&&(l=(d-c)*(r-o)/(r-h)+n-d),c+=l,d+=l,c>t&&c>n?(c=Math.max(t,n),d=2*n-c):c<t&&c<n&&(c=Math.min(t,n),d=2*n-c),d>s&&d>n?(d=Math.max(s,n),c=2*n-d):d<s&&d<n&&(d=Math.min(s,n),c=2*n-d),e.rightContX=r,e.rightContY=d}return e=["C",i(a.rightContX,a.plotX),i(a.rightContY,a.plotY),i(h,o),i(c,n),o,n],a.rightContX=a.rightContY=null,e}})}),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"],i["parts/Utilities.js"]],function(t,e){var i=e.defined,s=e.extend,o=e.isNumber,n=e.pick,a=t.animObject,r=t.color,l=t.merge,h=t.Series;e=t.seriesType;var c=t.svg;e("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(){h.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=this,e=t.options,i=t.xAxis,s=t.yAxis,o=i.options.reversedStacks;o=i.reversed&&!o||!i.reversed&&o;var a,r={},l=0;!1===e.grouping?l=1:t.chart.series.forEach(function(e){var i=e.yAxis,o=e.options;if(e.type===t.type&&(e.visible||!t.chart.options.chart.ignoreHiddenSeries)&&s.len===i.len&&s.pos===i.pos){if(o.stacking){a=e.stackKey,void 0===r[a]&&(r[a]=l++);var n=r[a]}else!1!==o.grouping&&(n=l++);e.columnIndex=n}});var h=Math.min(Math.abs(i.transA)*(i.ordinalSlope||e.pointRange||i.closestPointRange||i.tickInterval||1),i.len),c=h*e.groupPadding,d=(h-2*c)/(l||1);return e=Math.min(e.maxPointWidth||i.len,n(e.pointWidth,d*(1-2*e.pointPadding))),t.columnMetrics={width:e,offset:(d-e)/2+(c+((t.columnIndex||0)+(o?1:0))*d-h/2)*(o?-1:1)},t.columnMetrics},crispCol:function(t,e,i,s){var o=this.chart,n=this.borderWidth,a=-(n%2?.5:0);return n=n%2?.5:1,o.inverted&&o.renderer.isVML&&(n+=1),this.options.crisp&&(i=Math.round(t+i)+a,t=Math.round(t)+a,i-=t),s=Math.round(e+s)+n,a=.5>=Math.abs(e)&&.5<s,e=Math.round(e)+n,s-=e,a&&s&&(--e,s+=1),{x:t,y:e,width:i,height:s}},translate:function(){var t=this,e=t.chart,s=t.options,o=t.dense=2>t.closestPointRange*t.xAxis.transA;o=t.borderWidth=n(s.borderWidth,o?0:1);var a=t.yAxis,r=s.threshold,l=t.translatedThreshold=a.getThreshold(r),c=n(s.minPointLength,5),d=t.getColumnMetrics(),p=d.width,u=t.barW=Math.max(p,1+2*o),f=t.pointXOffset=d.offset,g=t.dataMin,m=t.dataMax;e.inverted&&(l-=.5),s.pointPadding&&(u=Math.ceil(u)),h.prototype.translate.apply(t),t.points.forEach(function(s){var o=n(s.yBottom,l),h=999+Math.abs(o),d=p;h=Math.min(Math.max(-h,s.plotY),a.len+h);var v=s.plotX+f,x=u,y=Math.min(h,o),b=Math.max(h,o)-y;if(c&&Math.abs(b)<c){b=c;var w=!a.reversed&&!s.negative||a.reversed&&s.negative;s.y===r&&t.dataMax<=r&&a.min<r&&g!==m&&(w=!w),y=Math.abs(y-l)>c?o-c:l-(w?c:0)}i(s.options.pointWidth)&&(d=x=Math.ceil(s.options.pointWidth),v-=Math.round((d-p)/2)),s.barX=v,s.pointWidth=d,s.tooltipPos=e.inverted?[a.len+a.pos-e.plotLeft-h,t.xAxis.len-v-x/2,b]:[v+x/2,h+a.pos-e.plotTop,b],s.shapeType=t.pointClass.prototype.shapeType||"rect",s.shapeArgs=t.crispCol.apply(t,s.isNull?[v,l,x,0]:[v,y,x,b])})},getSymbol:t.noop,drawLegendSymbol:t.LegendSymbolMixin.drawRectangle,drawGraph:function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")},pointAttribs:function(t,e){var i=this.options,s=this.pointAttrToOptions||{},o=s.stroke||"borderColor",a=s["stroke-width"]||"borderWidth",h=t&&t.color||this.color,c=t&&t[o]||i[o]||this.color||h,d=t&&t[a]||i[a]||this[a]||0;s=t&&t.options.dashStyle||i.dashStyle;var p=n(i.opacity,1);if(t&&this.zones.length){var u=t.getZone();h=t.options.color||u&&(u.color||t.nonZonedColor)||this.color,u&&(c=u.borderColor||c,s=u.dashStyle||s,d=u.borderWidth||d)}return e&&(t=l(i.states[e],t.options.states&&t.options.states[e]||{}),e=t.brightness,h=t.color||void 0!==e&&r(h).brighten(t.brightness).get()||h,c=t[o]||c,d=t[a]||d,s=t.dashStyle||s,p=n(t.opacity,p)),o={fill:h,stroke:c,"stroke-width":d,opacity:p},s&&(o.dashstyle=s),o},drawPoints:function(){var t,e=this,i=this.chart,s=e.options,n=i.renderer,a=s.animationLimit||250;e.points.forEach(function(r){var h=r.graphic,c=h&&i.pointCount<a?"animate":"attr";o(r.plotY)&&null!==r.y?(t=r.shapeArgs,h&&r.hasNewShapeType()&&(h=h.destroy()),h?h[c](l(t)):r.graphic=h=n[r.shapeType](t).add(r.group||e.group),s.borderRadius&&h[c]({r:s.borderRadius}),i.styledMode||h[c](e.pointAttribs(r,r.selected&&"select")).shadow(!1!==r.allowShadow&&s.shadow,null,s.stacking&&!s.borderRadius),h.addClass(r.getClassName(),!0)):h&&(r.graphic=h.destroy())})},animate:function(t){var e=this,i=this.yAxis,o=e.options,n=this.chart.inverted,r={},l=n?"translateX":"translateY";if(c)if(t)r.scaleY=.001,t=Math.min(i.pos+i.len,Math.max(i.pos,i.toPixels(o.threshold))),n?r.translateX=t-i.len:r.translateY=t,e.clipBox&&e.setClip(),e.group.attr(r);else{var h=e.group.attr(l);e.group.animate({scaleY:1},s(a(e.options.animation),{step:function(t,s){r[l]=h+s.pos*(i.pos-h),e.group.attr(r)}})),e.animate=null}},remove:function(){var t=this,e=t.chart;e.hasRendered&&e.series.forEach(function(e){e.type===t.type&&(e.isDirty=!0)}),h.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,o){["x","y"].forEach(function(n,a){var r="plot"+n.toUpperCase();if(e[n]&&!s.isNull){var l=t[n+"Axis"],h=e[n]*l.transA;if(l&&!l.isLog){var c=Math.max(0,s[r]-h);l=Math.min(l.len,s[r]+h),a=1e4*Math.sin(o+a*i),s[r]=c+(l-c)*(a-Math.floor(a)),"x"===n&&(s.clientX=s.plotX)}}})})}}),t.addEvent(e,"afterTranslate",function(){this.applyJitter&&this.applyJitter()})}),e(i,"mixins/centered-series.js",[i["parts/Globals.js"],i["parts/Utilities.js"]],function(t,e){var i=e.isNumber,s=e.pick,o=t.deg2rad,n=t.relativeLength;t.CenteredSeriesMixin={getCenter:function(){var t=this.options,e=this.chart,i=2*(t.slicedOffset||0),o=e.plotWidth-2*i;e=e.plotHeight-2*i;var a=t.center;a=[s(a[0],"50%"),s(a[1],"50%"),t.size||"100%",t.innerSize||0];var r,l=Math.min(o,e);for(r=0;4>r;++r){var h=a[r];t=2>r||2===r&&/%$/.test(h),a[r]=n(h,[o,e,l,a[2]][r])+(t?i:0)}return a[3]>a[2]&&(a[3]=a[2]),a},getStartAndEndRadians:function(t,e){return t=i(t)?t:0,e=i(e)&&e>t&&360>e-t?e:t+360,{start:o*(t+-90),end:o*(e+-90)}}}}),e(i,"parts/PieSeries.js",[i["parts/Globals.js"],i["parts/Utilities.js"]],function(t,e){var i=e.defined,s=e.isNumber,o=e.pick,n=e.setAnimation,a=t.addEvent;e=t.CenteredSeriesMixin;var r=e.getStartAndEndRadians,l=t.merge,h=t.noop,c=t.Point,d=t.Series,p=t.seriesType,u=t.fireEvent;p("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%"},fillColor:void 0,ignoreHiddenPoint:!0,inactiveOtherPoints:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,stickyTracking:!1,tooltip:{followPointer:!0},borderColor:"#ffffff",borderWidth:1,lineWidth:void 0,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,o=t.shapeArgs;i&&(i.attr({r:t.startR||e.center[3]/2,start:s,end:s}),i.animate({r:o.r,start:o.start,end:o.end},e.options.animation))}),e.animate=null)},hasData:function(){return!!this.processedXData.length},updateTotals:function(){var t,e=0,i=this.points,s=i.length,o=this.options.ignoreHiddenPoint;for(t=0;t<s;t++){var n=i[t];e+=o&&!n.visible?0:n.isNull?0:n.y}for(this.total=e,t=0;t<s;t++)n=i[t],n.percentage=0<e&&(n.visible||!o)?n.y/e*100:0,n.total=e},generatePoints:function(){d.prototype.generatePoints.call(this),this.updateTotals()},getX:function(t,e,i){var s=this.center,o=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])/(o+i.labelDistance),1),-1)))*(o+i.labelDistance)+(0<i.labelDistance?(e?-1:1)*this.options.dataLabels.padding:0)},translate:function(e){this.generatePoints();var i=0,s=this.options,n=s.slicedOffset,a=n+(s.borderWidth||0),l=r(s.startAngle,s.endAngle),h=this.startAngleRad=l.start;l=(this.endAngleRad=l.end)-h;var c=this.points,d=s.dataLabels.distance;s=s.ignoreHiddenPoint;var p,f=c.length;for(e||(this.center=e=this.getCenter()),p=0;p<f;p++){var g=c[p],m=h+i*l;s&&!g.visible||(i+=g.percentage/100);var v=h+i*l;g.shapeType="arc",g.shapeArgs={x:e[0],y:e[1],r:e[2]/2,innerR:e[3]/2,start:Math.round(1e3*m)/1e3,end:Math.round(1e3*v)/1e3},g.labelDistance=o(g.options.dataLabels&&g.options.dataLabels.distance,d),g.labelDistance=t.relativeLength(g.labelDistance,g.shapeArgs.r),this.maxLabelDistance=Math.max(this.maxLabelDistance||0,g.labelDistance),v=(v+m)/2,v>1.5*Math.PI?v-=2*Math.PI:v<-Math.PI/2&&(v+=2*Math.PI),g.slicedTranslation={translateX:Math.round(Math.cos(v)*n),translateY:Math.round(Math.sin(v)*n)};var x=Math.cos(v)*e[2]/2,y=Math.sin(v)*e[2]/2;g.tooltipPos=[e[0]+.7*x,e[1]+.7*y],g.half=v<-Math.PI/2||v>Math.PI/2?1:0,g.angle=v,m=Math.min(a,g.labelDistance/5),g.labelPosition={natural:{x:e[0]+x+Math.cos(v)*g.labelDistance,y:e[1]+y+Math.sin(v)*g.labelDistance},final:{},alignment:0>g.labelDistance?"center":g.half?"right":"left",connectorPosition:{breakAt:{x:e[0]+x+Math.cos(v)*m,y:e[1]+y+Math.sin(v)*m},touchingSliceAt:{x:e[0]+x,y:e[1]+y}}}}u(this,"afterTranslate")},drawEmpty:function(){var t=this.options;if(0===this.total){var e=this.center[0],i=this.center[1];this.graph||(this.graph=this.chart.renderer.circle(e,i,0).addClass("highcharts-graph").add(this.group)),this.graph.animate({"stroke-width":t.borderWidth,cx:e,cy:i,r:this.center[2]/2,fill:t.fillColor||"none",stroke:t.color||"#cccccc"})}else this.graph&&(this.graph=this.graph.destroy())},redrawPoints:function(){var t,e,i,s,o=this,n=o.chart,a=n.renderer,r=o.options.shadow;this.drawEmpty(),!r||o.shadowGroup||n.styledMode||(o.shadowGroup=a.g("shadow").attr({zIndex:-1}).add(o.group)),o.points.forEach(function(h){var c={};if(e=h.graphic,!h.isNull&&e){if(s=h.shapeArgs,t=h.getTranslate(),!n.styledMode){var d=h.shadowGroup;r&&!d&&(d=h.shadowGroup=a.g("shadow").add(o.shadowGroup)),d&&d.attr(t),i=o.pointAttribs(h,h.selected&&"select")}h.delayedRendering?(e.setRadialReference(o.center).attr(s).attr(t),n.styledMode||e.attr(i).attr({"stroke-linejoin":"round"}).shadow(r,d),h.delayedRendering=!1):(e.setRadialReference(o.center),n.styledMode||l(!0,c,i),l(!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:h,sortByAngle:function(t,e){t.sort(function(t,i){return void 0!==t.angle&&(i.angle-t.angle)*e})},drawLegendSymbol:t.LegendSymbolMixin.drawRectangle,getCenter:e.getCenter,getSymbol:h,drawGraph:null},{init:function(){c.prototype.init.apply(this,arguments);var t=this;t.name=o(t.name,"Slice");var e=function(e){t.slice("select"===e.type)};return a(t,"select",e),a(t,"unselect",e),t},isValid:function(){return s(this.y)&&0<=this.y},setVisible:function(t,e){var i=this,s=i.series,n=s.chart,a=s.options.ignoreHiddenPoint;e=o(e,a),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(""),a&&(s.isDirty=!0),e&&n.redraw())},slice:function(t,e,s){var a=this.series;n(s,a.chart),o(e,!0),this.sliced=this.options.sliced=i(t)?t:!this.sliced,a.options.data[a.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:e.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 o=this.series,n=o.center[0],a=o.chart.plotWidth,r=o.chart.plotLeft;o=e.alignment;var l=this.shapeArgs.r;return s=t.relativeLength(s.crookDistance,1),s="left"===o?n+l+(a+r-n-l)*(1-s):r+(n-l)*s,n=["L",s,e.y],("left"===o?s>e.x||s<i.x:s<e.x||s>i.x)&&(n=[]),["M",e.x,e.y].concat(n).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"],i["parts/Utilities.js"]],function(t,e){var i=e.arrayMax,s=e.defined,o=e.extend,n=e.isArray,a=e.objectEach,r=e.pick,l=e.splat,h=t.format,c=t.merge;e=t.noop;var d=t.relativeLength,p=t.Series,u=t.seriesTypes,f=t.stableSort;t.distribute=function(e,i,s){function o(t,e){return t.target-e.target}var n,a=!0,l=e,h=[],c=0,d=l.reducedLen||i;for(n=e.length;n--;)c+=e[n].size;if(c>d){for(f(e,function(t,e){return(e.rank||0)-(t.rank||0)}),c=n=0;c<=d;)c+=e[n].size,n++;h=e.splice(n-1,e.length)}for(f(e,o),e=e.map(function(t){return{size:t.size,targets:[t.target],align:r(t.align,.5)}});a;){for(n=e.length;n--;)a=e[n],c=(Math.min.apply(0,a.targets)+Math.max.apply(0,a.targets))/2,a.pos=Math.min(Math.max(0,c-a.size*a.align),i-a.size);for(n=e.length,a=!1;n--;)0<n&&e[n-1].pos+e[n-1].size>e[n].pos&&(e[n-1].size+=e[n].size,e[n-1].targets=e[n-1].targets.concat(e[n].targets),e[n-1].align=.5,e[n-1].pos+e[n-1].size>i&&(e[n-1].pos=i-e[n-1].size),e.splice(n,1),a=!0)}l.push.apply(l,h),n=0,e.some(function(e){var o=0;if(e.targets.some(function(){if(l[n].pos=e.pos+o,Math.abs(l[n].pos-l[n].target)>s)return l.slice(0,n+1).forEach(function(t){delete t.pos}),l.reducedLen=(l.reducedLen||i)-.1*i,l.reducedLen>.1*i&&t.distribute(l,i,s),!0;o+=l[n].size,n++}))return!0}),f(l,o)},p.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 i(t,e){var i,s=[];if(n(t)&&!n(e))s=t.map(function(t){return c(t,e)});else if(n(e)&&!n(t))s=e.map(function(e){return c(t,e)});else if(n(t)||n(e))for(i=Math.max(t.length,e.length);i--;)s[i]=c(t[i],e[i]);else s=c(t,e);return s}var o,d=this,p=d.chart,u=d.options,f=u.dataLabels,g=d.points,m=d.hasRendered||0,v=t.animObject(u.animation).duration,x=Math.min(v,200),y=!p.renderer.forExport&&r(f.defer,0<x),b=p.renderer;if(f=i(i(p.options.plotOptions&&p.options.plotOptions.series&&p.options.plotOptions.series.dataLabels,p.options.plotOptions&&p.options.plotOptions[d.type]&&p.options.plotOptions[d.type].dataLabels),f),t.fireEvent(this,"drawDataLabels"),n(f)||f.enabled||d._hasPointLabels){var w=d.plotGroup("dataLabelsGroup","data-labels",y&&!m?"hidden":"inherit",f.zIndex||6);y&&(w.attr({opacity:+m}),m||setTimeout(function(){var t=d.dataLabelsGroup;t&&(d.visible&&w.show(!0),t[u.animation?"animate":"attr"]({opacity:1},{duration:x}))},v-x)),g.forEach(function(t){o=l(i(f,t.dlOptions||t.options&&t.options.dataLabels)),o.forEach(function(i,o){var n=i.enabled&&(!t.isNull||t.dataLabelOnNull)&&e(t,i),l=t.dataLabels?t.dataLabels[o]:t.dataLabel,c=t.connectors?t.connectors[o]:t.connector,f=r(i.distance,t.labelDistance),g=!l;if(n){var m=t.getLabelConfig(),v=r(i[t.formatPrefix+"Format"],i.format);m=s(v)?h(v,m,p.time):(i[t.formatPrefix+"Formatter"]||i.formatter).call(m,i),v=i.style;var x=i.rotation;p.styledMode||(v.color=r(i.color,v.color,d.color,"#000000"),"contrast"===v.color&&(t.contrastColor=b.getContrast(t.color||d.color),v.color=!s(f)&&i.inside||0>f||u.stacking?t.contrastColor:"#000000"),u.cursor&&(v.cursor=u.cursor));var y={r:i.borderRadius||0,rotation:x,padding:i.padding,zIndex:1};p.styledMode||(y.fill=i.backgroundColor,y.stroke=i.borderColor,y["stroke-width"]=i.borderWidth),a(y,function(t,e){void 0===t&&delete y[e]})}!l||n&&s(m)?n&&s(m)&&(l?y.text=m:(t.dataLabels=t.dataLabels||[],l=t.dataLabels[o]=x?b.text(m,0,-9999).addClass("highcharts-data-label"):b.label(m,0,-9999,i.shape,null,null,i.useHTML,null,"data-label"),o||(t.dataLabel=l),l.addClass(" highcharts-data-label-color-"+t.colorIndex+" "+(i.className||"")+(i.useHTML?" highcharts-tracker":""))),l.options=i,l.attr(y),p.styledMode||l.css(v).shadow(i.shadow),l.added||l.add(w),i.textPath&&!i.useHTML&&l.setTextPath(t.getDataLabelPath&&t.getDataLabelPath(l)||t.graphic,i.textPath),d.alignDataLabel(t,l,i,null,g)):(t.dataLabel=t.dataLabel&&t.dataLabel.destroy(),t.dataLabels&&(1===t.dataLabels.length?delete t.dataLabels:delete t.dataLabels[o]),o||delete t.dataLabel,c&&(t.connector=t.connector.destroy(),t.connectors&&(1===t.connectors.length?delete t.connectors:delete t.connectors[o])))})})}t.fireEvent(this,"afterDrawDataLabels")},p.prototype.alignDataLabel=function(t,e,i,s,n){var a=this.chart,l=this.isCartesian&&a.inverted,h=r(t.dlBox&&t.dlBox.centerX,t.plotX,-9999),c=r(t.plotY,-9999),d=e.getBBox(),p=i.rotation,u=i.align,f=this.visible&&(t.series.forceDL||a.isInsidePlot(h,Math.round(c),l)||s&&a.isInsidePlot(h,l?s.x+1:s.y+s.height-1,l)),g="justify"===r(i.overflow,"justify");if(f){var m=a.renderer.fontMetrics(a.styledMode?void 0:i.style.fontSize,e).b;s=o({x:l?this.yAxis.len-c:h,y:Math.round(l?this.xAxis.len-h:c),width:0,height:0},s),o(i,{width:d.width,height:d.height}),p?(g=!1,h=a.renderer.rotCorr(m,p),h={x:s.x+i.x+s.width/2+h.x,y:s.y+i.y+{top:0,middle:.5,bottom:1}[i.verticalAlign]*s.height},e[n?"attr":"animate"](h).attr({align:u}),c=(p+720)%360,c=180<c&&360>c,"left"===u?h.y-=c?d.height:0:"center"===u?(h.x-=d.width/2,h.y-=d.height/2):"right"===u&&(h.x-=d.width,h.y-=c?0:d.height),e.placed=!0,e.alignAttr=h):(e.align(i,null,s),h=e.alignAttr),g&&0<=s.height?this.justifyDataLabel(e,i,h,d,s,n):r(i.crop,!0)&&(f=a.isInsidePlot(h.x,h.y)&&a.isInsidePlot(h.x+d.width,h.y+d.height)),i.shape&&!p&&e[n?"attr":"animate"]({anchorX:l?a.plotWidth-t.plotY:t.plotX,anchorY:l?a.plotHeight-t.plotX:t.plotY})}f||(e.hide(!0),e.placed=!1)},p.prototype.justifyDataLabel=function(t,e,i,s,o,n){var a=this.chart,r=e.align,l=e.verticalAlign,h=t.box?0:t.padding||0,c=i.x+h;if(0>c){"right"===r?(e.align="left",e.inside=!0):e.x=-c;var d=!0}return c=i.x+s.width-h,c>a.plotWidth&&("left"===r?(e.align="right",e.inside=!0):e.x=a.plotWidth-c,d=!0),c=i.y+h,0>c&&("bottom"===l?(e.verticalAlign="top",e.inside=!0):e.y=-c,d=!0),c=i.y+s.height-h,c>a.plotHeight&&("top"===l?(e.verticalAlign="bottom",e.inside=!0):e.y=a.plotHeight-c,d=!0),d&&(t.placed=!n,t.align(e,null,o)),d},u.pie&&(u.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 o,n=0;return t.forEach(function(t){(o=t.dataLabel.getBBox().width)>n&&(n=o)}),e?n+s:i-n-s}},u.pie.prototype.drawDataLabels=function(){var e,o,n,a,l,h,d,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)}),p.prototype.drawDataLabels.apply(x),y.forEach(function(t){t.dataLabel&&(t.visible?(O[t.half].push(t),t.dataLabel._pos=null,!s(w.style.width)&&!s(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(i,o){var n,c=i.length,p=[];if(c){if(x.sortByAngle(i,o-.5),0<x.maxLabelDistance){var v=Math.max(0,P-E-x.maxLabelDistance),y=Math.min(P+E+x.maxLabelDistance,b.plotHeight);i.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),n=t.dataLabel.getBBox().height||21,t.distributeBox={target:t.labelPosition.natural.y-t.top+n/2,size:n,rank:t.y},p.push(t.distributeBox))}),v=y+n-v,t.distribute(p,v,v/5)}for(m=0;m<c;m++){if(e=i[m],h=e.labelPosition,a=e.dataLabel,g=!1===e.visible?"hidden":"inherit",f=v=h.natural.y,p&&s(e.distributeBox)&&(void 0===e.distributeBox.pos?g="hidden":(d=e.distributeBox.size,f=D.radialDistributionY(e))),delete e.positionIndex,w.justify)u=D.justify(e,E,A);else switch(w.alignTo){case"connectors":u=D.alignToConnectors(i,o,M,T);break;case"plotEdges":u=D.alignToPlotEdges(a,o,M,T);break;default:u=D.radialDistributionX(x,e,f,v)}a._attr={visibility:g,align:h.alignment},a._pos={x:u+w.x+({left:k,right:-k}[h.alignment]||0),y:f+w.y-10},h.final.x=u,h.final.y=f,r(w.crop,!0)&&(l=a.getBBox().width,v=null,u-l<k&&1===o?(v=Math.round(l-u+k),L[3]=Math.max(v,L[3])):u+l>M-k&&0===o&&(v=Math.round(u+l-M+k),L[1]=Math.max(v,L[1])),0>f-d/2?L[0]=Math.max(Math.round(d/2-f),L[0]):f+d/2>S&&(L[2]=Math.max(Math.round(f+d/2-S),L[2])),a.sideOverflow=v)}}}),0===i(L)||this.verifyDataLabelOverflow(L))&&(this.placeDataLabels(),this.points.forEach(function(t){if(v=c(w,t.options.dataLabels),o=r(v.connectorWidth,1)){var e;n=t.connector,(a=t.dataLabel)&&a._pos&&t.visible&&0<t.labelDistance?(g=a._attr.visibility,(e=!n)&&(t.connector=n=b.renderer.path().addClass("highcharts-data-label-connector highcharts-color-"+t.colorIndex+(t.className?" "+t.className:"")).add(x.dataLabelsGroup),b.styledMode||n.attr({"stroke-width":o,stroke:v.connectorColor||t.color||"#666666"})),n[e?"attr":"animate"]({d:t.getConnectorPath()}),n.attr("visibility",g)):n&&(t.connector=n.destroy())}}))},u.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)},u.pie.prototype.alignDataLabel=e,u.pie.prototype.verifyDataLabelOverflow=function(t){var e=this.center,i=this.options,s=i.center,o=i.minSize||80,n=null!==i.size;if(!n){if(null!==s[0])var a=Math.max(e[2]-Math.max(t[1],t[3]),o);else a=Math.max(e[2]-t[1]-t[3],o),e[0]+=(t[3]-t[1])/2;null!==s[1]?a=Math.max(Math.min(a,e[2]-Math.max(t[0],t[2])),o):(a=Math.max(Math.min(a,e[2]-t[0]-t[2]),o),e[1]+=(t[0]-t[2])/2),a<e[2]?(e[2]=a,e[3]=Math.min(d(i.innerSize||0,a),a),this.translate(e),this.drawDataLabels&&this.drawDataLabels()):n=!0}return n}),u.column&&(u.column.prototype.alignDataLabel=function(t,e,i,s,o){var n=this.chart.inverted,a=t.series,l=t.dlBox||t.shapeArgs,h=r(t.below,t.plotY>r(this.translatedThreshold,a.yAxis.len)),d=r(i.inside,!!this.options.stacking);l&&(s=c(l),0>s.y&&(s.height+=s.y,s.y=0),l=s.y+s.height-a.yAxis.len,0<l&&(s.height-=l),n&&(s={x:a.yAxis.len-s.y-s.height,y:a.xAxis.len-s.x-s.width,width:s.height,height:s.width}),d||(n?(s.x+=h?0:s.width,s.width=0):(s.y+=h?s.height:0,s.height=0))),i.align=r(i.align,!n||d?"center":h?"right":"left"),i.verticalAlign=r(i.verticalAlign,n||d?"middle":h?"top":"bottom"),p.prototype.alignDataLabel.call(this,t,e,i,s,o),i.inside&&t.contrastColor&&e.css({color:t.contrastColor})})}),e(i,"modules/overlapping-datalabels.src.js",[i["parts/Globals.js"],i["parts/Utilities.js"]],function(t,e){var i=e.isArray,s=e.objectEach,o=e.pick;e=t.Chart;var n=t.addEvent,a=t.fireEvent;n(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=o(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,o=this,n=t.length,r=o.renderer,l=function(t){var e=t.box?0:t.padding||0,i=0;if(t&&(!t.alignAttr||t.placed)){var s=t.attr("x"),o=t.attr("y");return s="number"==typeof s&&"number"==typeof o?{x:s,y:o}:t.alignAttr,o=t.parentGroup,t.width||(i=t.getBBox(),t.width=i.width,t.height=i.height,i=r.fontMetrics(null,t.element).h),{x:s.x+(o.translateX||0)+e,y:s.y+(o.translateY||0)+e-i,width:t.width-2*e,height:t.height-2*e}}};for(i=0;i<n;i++)(e=t[i])&&(e.oldOpacity=e.opacity,e.newOpacity=1,e.absoluteBox=l(e));for(t.sort(function(t,e){return(e.labelrank||0)-(t.labelrank||0)}),i=0;i<n;i++){var h=(l=t[i])&&l.absoluteBox;for(e=i+1;e<n;++e){var c=(s=t[e])&&s.absoluteBox;!h||!c||l===s||0===l.newOpacity||0===s.newOpacity||c.x>h.x+h.width||c.x+c.width<h.x||c.y>h.y+h.height||c.y+c.height<h.y||((l.labelrank<s.labelrank?l:s).newOpacity=0)}}t.forEach(function(t){var e;if(t){var i=t.newOpacity;t.oldOpacity!==i&&(t.alignAttr&&t.placed?(i?t.show(!0):e=function(){t.hide(!0),t.placed=!1},t.alignAttr.opacity=i,t[t.isOld?"animate":"attr"](t.alignAttr,null,e),a(o,"afterHideOverlappingLabels")):t.attr({opacity:i})),t.isOld=!0}})}}),e(i,"parts/Interaction.js",[i["parts/Globals.js"],i["parts/Utilities.js"]],function(t,e){var i=e.defined,s=e.extend,o=e.isArray,n=e.isObject,a=e.objectEach,r=e.pick,l=t.addEvent;e=t.Chart;var h=t.createElement,c=t.css,d=t.defaultOptions,p=t.defaultPlotOptions,u=t.fireEvent,f=t.hasTouch,g=t.Legend,m=t.merge,v=t.Point,x=t.Series,y=t.seriesTypes,b=t.svg,w=t.TrackerMixin={drawTrackerPoint:function(){var t,e=this,i=e.chart,s=i.pointer,n=function(t){var e=s.getPointFromEvent(t);void 0!==e&&(s.isDirectTouch=!0,e.onMouseOver(t))};e.points.forEach(function(e){t=o(e.dataLabels)?e.dataLabels:e.dataLabel?[e.dataLabel]:[],e.graphic&&(e.graphic.element.point=e),t.forEach(function(t){t.div?t.div.point=e:t.element.point=e})}),e._hasTracking||(e.trackerGroups.forEach(function(t){e[t]&&(e[t].addClass("highcharts-tracker").on("mouseover",n).on("mouseout",function(t){s.onTrackerMouseOut(t)}),f&&e[t].on("touchstart",n),!i.styledMode&&e.options.cursor&&e[t].css(c).css({cursor:e.options.cursor}))}),e._hasTracking=!0),u(this,"afterDrawTracker")},drawTrackerGraph:function(){var t,e=this,i=e.options,s=i.trackByArea,o=[].concat(s?e.areaPath:e.graphPath),n=o.length,a=e.chart,r=a.pointer,l=a.renderer,h=a.options.tooltip.snap,c=e.tracker,d=function(){a.hoverSeries!==e&&e.onMouseOver()},p="rgba(192,192,192,"+(b?1e-4:.002)+")";if(n&&!s)for(t=n+1;t--;)"M"===o[t]&&o.splice(t+1,0,o[t+1]-h,o[t+2],"L"),(t&&"M"===o[t]||t===n)&&o.splice(t,0,"L",o[t-2]+h,o[t-1]);c?c.attr({d:o}):e.graph&&(e.tracker=l.path(o).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:p,fill:s?p:"none","stroke-width":e.graph.strokeWidth()+(s?0:2*h)}),[e.tracker,e.markerGroup].forEach(function(t){t.addClass("highcharts-tracker").on("mouseover",d).on("mouseout",function(t){r.onTrackerMouseOut(t)}),i.cursor&&!a.styledMode&&t.css({cursor:i.cursor}),f&&t.on("touchstart",d)})),u(this,"afterDrawTracker")}};y.column&&(y.column.prototype.drawTracker=w.drawTrackerPoint),y.pie&&(y.pie.prototype.drawTracker=w.drawTrackerPoint),y.scatter&&(y.scatter.prototype.drawTracker=w.drawTrackerPoint),s(g.prototype,{setItemEvents:function(t,e,i){var s=this,o=s.chart.renderer.boxWrapper,n=t instanceof v,a="highcharts-legend-"+(n?"point":"series")+"-active",r=s.chart.styledMode;(i?e:t.legendGroup).on("mouseover",function(){t.visible&&s.allItems.forEach(function(e){t!==e&&e.setState("inactive",!n)}),t.setState("hover"),t.visible&&o.addClass(a),r||e.css(s.options.itemHoverStyle)}).on("mouseout",function(){s.chart.styledMode||e.css(m(t.visible?s.itemStyle:s.itemHiddenStyle)),s.allItems.forEach(function(e){t!==e&&e.setState("",!n)}),o.removeClass(a),t.setState()}).on("click",function(e){var i=function(){t.setVisible&&t.setVisible(),s.allItems.forEach(function(e){t!==e&&e.setState(t.visible?"inactive":"",!n)})};o.removeClass(a),e={browserEvent:e},t.firePointEvent?t.firePointEvent("legendItemClick",e,i):u(t,"legendItemClick",e,i)})},createCheckboxForItem:function(t){t.checkbox=h("input",{type:"checkbox",className:"highcharts-legend-checkbox",checked:t.selected,defaultChecked:t.selected},this.options.itemCheckboxStyle,this.chart.container),l(t.checkbox,"click",function(e){u(t.series||t,"checkboxClick",{checked:e.target.checked,item:t},function(){t.select()})})}}),s(e.prototype,{showResetZoom:function(){function t(){e.zoomOut()}var e=this,i=d.lang,s=e.options.chart.resetZoomButton,o=s.theme,n=o.states,a="chart"===s.relativeTo||"spaceBox"===s.relativeTo?null:"plotBox";u(this,"beforeShowResetZoom",null,function(){e.resetZoomButton=e.renderer.button(i.resetZoom,null,null,t,o,n&&n.hover).attr({align:s.position.align,title:i.resetZoomTitle}).addClass("highcharts-reset-zoom").add().align(s.position,!1,a)}),u(this,"afterShowResetZoom")},zoomOut:function(){u(this,"selection",{resetSelection:!0},this.zoom)},zoom:function(t){var e,s=this,o=s.pointer,a=!1,l=s.inverted?o.mouseDownX:o.mouseDownY;!t||t.resetSelection?(s.axes.forEach(function(t){e=t.zoom()}),o.initiated=!1):t.xAxis.concat(t.yAxis).forEach(function(t){var n=t.axis,r=s.inverted?n.left:n.top,h=s.inverted?r+n.width:r+n.height,c=n.isXAxis,d=!1;(!c&&l>=r&&l<=h||c||!i(l))&&(d=!0),o[c?"zoomX":"zoomY"]&&d&&(e=n.zoom(t.min,t.max),n.displayBtn&&(a=!0))});var h=s.resetZoomButton;a&&!h?s.showResetZoom():!a&&n(h)&&(s.resetZoomButton=h.destroy()),e&&s.redraw(r(s.options.chart.animation,t&&t.animation,100>s.pointCount))},pan:function(t,e){var i,s=this,o=s.hoverPoints;u(this,"pan",{originalEvent:t},function(){o&&o.forEach(function(t){t.setState()}),("xy"===e?[1,0]:[1]).forEach(function(e){e=s[e?"xAxis":"yAxis"][0];var o=e.horiz,n=t[o?"chartX":"chartY"];o=o?"mouseDownX":"mouseDownY";var a=s[o],r=(e.pointRange||0)/2,l=e.reversed&&!s.inverted||!e.reversed&&s.inverted?-1:1,h=e.getExtremes(),c=e.toValue(a-n,!0)+r*l;l=e.toValue(a+e.len-n,!0)-r*l;var 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[o]=n}),i&&s.redraw(!1),c(s.container,{cursor:"move"})})}}),s(v.prototype,{select:function(t,e){var i=this,s=i.series,o=s.chart;this.selectedStaging=t=r(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||o.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(o.hoverPoints&&e.options.inactiveOtherPoints?"inactive":""),t.firePointEvent("unselect"))})}),delete this.selectedStaging},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,i=m(e.series.options.point,e.options).events;e.events=i,a(i,function(i,s){t.isFunction(i)&&l(e,s,i)}),this.hasImportedEvents=!0}},setState:function(t,e){var i,o=this.series,n=this.state,a=o.options.states[t||"normal"]||{},l=p[o.type].marker&&o.options.marker,h=l&&!1===l.enabled,c=l&&l.states&&l.states[t||"normal"]||{},d=!1===c.enabled,f=o.stateMarkerGraphic,g=this.marker||{},m=o.chart,v=o.halo,x=l&&o.markerAttribs;if(!((t=t||"")===this.state&&!e||this.selected&&"select"!==t||!1===a.enabled||t&&(d||h&&!1===c.enabled)||t&&g.states&&g.states[t]&&!1===g.states[t].enabled)){if(this.state=t,x&&(i=o.markerAttribs(this,t)),this.graphic){if(n&&this.graphic.removeClass("highcharts-point-"+n),t&&this.graphic.addClass("highcharts-point-"+t),!m.styledMode){var y=o.pointAttribs(this,t),b=r(m.options.chart.animation,a.animation);o.options.inactiveOtherPoints&&((this.dataLabels||[]).forEach(function(t){t&&t.animate({opacity:y.opacity},b)}),this.connector&&this.connector.animate({opacity:y.opacity},b)),this.graphic.animate(y,b)}i&&this.graphic.animate(i,r(m.options.chart.animation,c.animation,l.animation)),f&&f.hide()}else t&&c&&(n=g.symbol||o.symbol,f&&f.currentSymbol!==n&&(f=f.destroy()),i&&(f?f[e?"animate":"attr"]({x:i.x,y:i.y}):n&&(o.stateMarkerGraphic=f=m.renderer.symbol(n,i.x,i.y,i.width,i.height).add(o.markerGroup),f.currentSymbol=n)),!m.styledMode&&f&&f.attr(o.pointAttribs(this,t))),f&&(f[t&&this.isInside?"show":"hide"](),f.element.point=this);t=a.halo,a=(f=this.graphic||f)&&f.visibility||"inherit",t&&t.size&&f&&"hidden"!==a?(v||(o.halo=v=m.renderer.path().add(f.parentGroup)),v.show()[e?"animate":"attr"]({d:this.haloPath(t.size)}),v.attr({class:"highcharts-halo highcharts-color-"+r(this.colorIndex,o.colorIndex)+(this.className?" "+this.className:""),visibility:a,zIndex:-1}),v.point=this,m.styledMode||v.attr(s({fill:this.color||o.color,"fill-opacity":t.opacity},t.attributes))):v&&v.point&&v.point.haloPath&&v.animate({d:v.point.haloPath(0)},null,v.hide),u(this,"afterSetState")}},haloPath:function(t){return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX)-t,this.plotY-t,2*t,2*t)}}),s(x.prototype,{onMouseOver:function(){var t=this.chart,e=t.hoverSeries;e&&e!==this&&e.onMouseOut(),this.options.events.mouseOver&&u(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&&u(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,o=i.graph,n=s.inactiveOtherPoints,a=s.states,l=s.lineWidth,h=s.opacity,c=r(a[t||"normal"]&&a[t||"normal"].animation,i.chart.options.chart.animation);if(s=0,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&&(l=a[t].lineWidth||l+(a[t].lineWidthPlus||0),h=r(a[t].opacity,h)),o&&!o.dashstyle)for(a={"stroke-width":l},o.animate(a,c);i["zone-graph-"+s];)i["zone-graph-"+s].attr(a),s+=1;n||[i.group,i.markerGroup,i.dataLabelsGroup,i.labelBySeries].forEach(function(t){t&&t.animate({opacity:h},c)})}e&&n&&i.points&&i.setAllPointsToState(t)},setAllPointsToState:function(t){this.points.forEach(function(e){e.setState&&e.setState(t)})},setVisible:function(t,e){var i=this,s=i.chart,o=i.legendItem,n=s.options.chart.ignoreHiddenSeries,a=i.visible,r=(i.visible=t=i.options.visible=i.userOptions.visible=void 0===t?!a:t)?"show":"hide";["group","dataLabelsGroup","markerGroup","tracker","tt"].forEach(function(t){i[t]&&i[t][r]()}),s.hoverSeries!==i&&(s.hoverPoint&&s.hoverPoint.series)!==i||i.onMouseOut(),o&&s.legend.colorizeItem(i,t),i.isDirty=!0,i.options.stacking&&s.series.forEach(function(t){t.options.stacking&&t.visible&&(t.isDirty=!0)}),i.linkedSeries.forEach(function(e){e.setVisible(t,!1)}),n&&(s.isDirtyBox=!0),u(i,r),!1!==e&&s.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),u(this,t?"select":"unselect")},drawTracker:w.drawTrackerGraph})}),e(i,"parts/Responsive.js",[i["parts/Globals.js"],i["parts/Utilities.js"]],function(t,e){var i=e.isArray,s=e.isObject,o=e.objectEach,n=e.pick,a=e.splat;e=t.Chart,e.prototype.setResponsive=function(e,i){var s=this.options.responsive,o=[],n=this.currentResponsive;!i&&s&&s.rules&&s.rules.forEach(function(e){void 0===e._id&&(e._id=t.uniqueKey()),this.matchResponsiveRule(e,o)},this),i=t.merge.apply(0,o.map(function(e){return t.find(s.rules,function(t){return t._id===e}).chartOptions})),i.isResponsiveOptions=!0,(o=o.toString()||void 0)!==(n&&n.ruleIds)&&(n&&this.update(n.undoOptions,e,!0),o?(n=this.currentOptions(i),n.isResponsiveOptions=!0,this.currentResponsive={ruleIds:o,mergedOptions:i,undoOptions:n},this.update(i,e,!0)):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(t){function e(t,r,l,h){var c;o(t,function(t,o){if(!h&&-1<n.collectionsWithUpdate.indexOf(o))for(t=a(t),l[o]=[],c=0;c<t.length;c++)r[o][c]&&(l[o][c]={},e(t[c],r[o][c],l[o][c],h+1));else s(t)?(l[o]=i(t)?[]:{},e(t,r[o]||{},l[o],h+1)):l[o]=void 0===r[o]?null:r[o]})}var n=this,r={};return e(t,this.options,r,0),r}}),e(i,"masters/highcharts.src.js",[i["parts/Globals.js"],i["parts/Utilities.js"]],function(t,e){return(0,e.extend)(t,{arrayMax:e.arrayMax,arrayMin:e.arrayMin,attr:e.attr,defined:e.defined,erase:e.erase,extend:e.extend,isArray:e.isArray,isClass:e.isClass,isDOMElement:e.isDOMElement,isNumber:e.isNumber,isObject:e.isObject,isString:e.isString,objectEach:e.objectEach,pick:e.pick,pInt:e.pInt,setAnimation:e.setAnimation,splat:e.splat,syncTimeout:e.syncTimeout}),t}),e(i,"parts/Scrollbar.js",[i["parts/Globals.js"],i["parts/Utilities.js"]],function(t,e){function i(t,e,i){this.init(t,e,i)}var s=e.defined,o=e.destroyObjectProperties,n=e.pick,a=t.addEvent;e=t.Axis;var r,l=t.correctFloat,h=t.defaultOptions,c=t.fireEvent,d=t.hasTouch,p=t.merge,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};h.scrollbar=p(!0,f,h.scrollbar),t.swapXY=r=function(t,e){var i=t.length;if(e)for(e=0;e<i;e+=3){var s=t[e+1];t[e+1]=t[e+2],t[e+2]=s}return t},i.prototype={init:function(t,e,i){this.scrollbarButtons=[],this.renderer=t,this.userOptions=e,this.options=p(f,e),this.chart=i,this.size=n(this.options.size,this.options.height),e.enabled&&(this.render(),this.initEvents(),this.addEvents())},render:function(){var t,e=this.renderer,i=this.options,s=this.size,o=this.chart.styledMode;this.group=t=e.g("scrollbar").attr({zIndex:i.zIndex,translateY:-99999}).add(),this.track=e.rect().addClass("highcharts-scrollbar-track").attr({x:0,r:i.trackBorderRadius||0,height:s,width:s}).add(t),o||this.track.attr({fill:i.trackBackgroundColor,stroke:i.trackBorderColor,"stroke-width":i.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:s,width:s,r:i.barBorderRadius||0}).add(this.scrollbarGroup),this.scrollbarRifles=e.path(r(["M",-3,s/4,"L",-3,2*s/3,"M",0,s/4,"L",0,2*s/3,"M",3,s/4,"L",3,2*s/3],i.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup),o||(this.scrollbar.attr({fill:i.barBackgroundColor,stroke:i.barBorderColor,"stroke-width":i.barBorderWidth}),this.scrollbarRifles.attr({stroke:i.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 o=this.options.vertical,n=0,a=this.rendered?"animate":"attr";this.x=t,this.y=e+this.trackBorderWidth,this.width=i,this.xOffset=this.height=s,this.yOffset=n,o?(this.width=this.yOffset=i=n=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:o?0:i-e,translateY:o?s-n:0})},drawScrollbarButton:function(t){var e=this.renderer,i=this.scrollbarButtons,s=this.options,o=this.size,n=e.g().add(this.group);i.push(n),n=e.rect().addClass("highcharts-scrollbar-button").add(n),this.chart.styledMode||n.attr({stroke:s.buttonBorderColor,"stroke-width":s.buttonBorderWidth,fill:s.buttonBackgroundColor}),n.attr(n.crisp({x:-.5,y:-.5,width:o+1,height:o+1,r:s.buttonBorderRadius},n.strokeWidth())),n=e.path(r(["M",o/2+(t?-1:1),o/2-3,"L",o/2+(t?-1:1),o/2+3,"L",o/2+(t?2:-2),o/2],s.vertical)).addClass("highcharts-scrollbar-arrow").add(i[t]),this.chart.styledMode||n.attr({fill:s.buttonArrowColor})},setRange:function(t,e){var i,o=this.options,n=o.vertical,a=o.minWidth,r=this.barWidth,h=!this.rendered||this.hasDragged||this.chart.navigator&&this.chart.navigator.hasDragged?"attr":"animate";if(s(r)){t=Math.max(t,0);var c=Math.ceil(r*t);this.calculatedWidth=i=l(r*Math.min(e,1)-c),i<a&&(c=(r-a+i)*t,i=a),a=Math.floor(c+this.xOffset+this.yOffset),r=i/2-.5,this.from=t,this.to=e,n?(this.scrollbarGroup[h]({translateY:a}),this.scrollbar[h]({height:i}),this.scrollbarRifles[h]({translateY:r}),this.scrollbarTop=a,this.scrollbarLeft=0):(this.scrollbarGroup[h]({translateX:a}),this.scrollbar[h]({width:i}),this.scrollbarRifles[h]({translateX:r}),this.scrollbarLeft=a,this.scrollbarTop=0),12>=i?this.scrollbarRifles.hide():this.scrollbarRifles.show(!0),!1===o.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",o=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(o[0]+s,o[1]+s),t.hasDragged&&c(t,"changed",{from:t.from,to:t.to,trigger:"scrollbar",DOMType:e.type,DOMEvent:e}))},t.mouseUpHandler=function(e){t.hasDragged&&c(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=l(t.to-t.from)*t.options.step;t.updatePosition(l(t.from-i),l(t.to-i)),c(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),c(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,o=t.y+t.scrollbarTop,n=t.x+t.scrollbarLeft;t.options.vertical&&i.chartY>o||!t.options.vertical&&i.chartX>n?t.updatePosition(t.from+s,t.to+s):t.updatePosition(t.from-s,t.to-s),c(t,"changed",{from:t.from,to:t.to,trigger:"scrollbar",DOMEvent:e})}},cursorToScrollbarPosition:function(t){var e=this.options;return e=e.minWidth>this.calculatedWidth?e.minWidth:0,{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=l(1-l(e-t)),e=1),0>t&&(e=l(e-t),t=0),this.from=t,this.to=e},update:function(t){this.destroy(),this.init(this.chart.renderer,p(!0,this.options,t),this.chart)},addEvents:function(){var t=this.options.inverted?[1,0]:[0,1],e=this.scrollbarButtons,i=this.scrollbarGroup.element,s=this.mouseDownHandler,o=this.mouseMoveHandler,n=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",s],[i.ownerDocument,"mousemove",o],[i.ownerDocument,"mouseup",n]],d&&t.push([i,"touchstart",s],[i.ownerDocument,"touchmove",o],[i.ownerDocument,"touchend",n]),t.forEach(function(t){a.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,o(t.scrollbarButtons))}},t.Scrollbar||(a(e,"afterInit",function(){var e=this;e.options&&e.options.scrollbar&&e.options.scrollbar.enabled&&(e.options.scrollbar.vertical=!e.horiz,e.options.startOnTick=e.options.endOnTick=!1,e.scrollbar=new i(e.chart.renderer,e.options.scrollbar,e.chart),a(e.scrollbar,"changed",function(i){var o=Math.min(n(e.options.min,e.min),e.min,e.dataMin),a=Math.max(n(e.options.max,e.max),e.max,e.dataMax)-o;if(e.horiz&&!e.reversed||!e.horiz&&e.reversed){var r=o+a*this.to;o+=a*this.from}else r=o+a*(1-this.from),o+=a*(1-this.to);n(this.options.liveRedraw,t.svg&&!t.isTouchDevice&&!this.chart.isBoosting)||"mouseup"===i.DOMType||!s(i.DOMType)?e.setExtremes(o,r,!0,"mousemove"!==i.DOMType,i):this.setRange(this.from,this.to)}))}),a(e,"afterRender",function(){var t=Math.min(n(this.options.min,this.min),this.min,n(this.dataMin,this.min)),e=Math.max(n(this.options.max,this.max),this.max,n(this.dataMax,this.max)),i=this.scrollbar,o=this.axisTitleMargin+(this.titleOffset||0),a=this.chart.scrollbarsOffsets,r=this.options.margin||0;i&&(this.horiz?(this.opposite||(a[1]+=o),i.position(this.left,this.top+this.height+2+a[1]-(this.opposite?r:0),this.width,this.height),this.opposite||(a[1]+=r),o=1):(this.opposite&&(a[0]+=o),i.position(this.left+this.width+2+a[0]-(this.opposite?0:r),this.top,this.width,this.height),this.opposite&&(a[0]+=r),o=0),a[o]+=i.size+i.options.margin,isNaN(t)||isNaN(e)||!s(this.min)||!s(this.max)||this.min===this.max?i.setRange(0,1):(a=(this.min-t)/(e-t),t=(this.max-t)/(e-t),this.horiz&&!this.reversed||!this.horiz&&this.reversed?i.setRange(a,t):i.setRange(1-t,1-a)))}),a(e,"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=i)}),e(i,"parts/Navigator.js",[i["parts/Globals.js"],i["parts/Utilities.js"]],function(t,e){function i(t){this.init(t)}var s=e.defined,o=e.destroyObjectProperties,n=e.erase,a=e.extend,r=e.isArray,l=e.isNumber,h=e.pick,c=e.splat,d=t.addEvent,p=t.Axis;e=t.Chart;var u=t.color,f=t.defaultOptions,g=t.hasTouch,m=t.isTouchDevice,v=t.merge,x=t.removeEvent,y=t.Scrollbar,b=t.Series,w=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(e=[].filter.call(e,l),e.length)return Math[t].apply(0,e)},k=void 0===t.seriesTypes.areaspline?"line":"areaspline";a(f,{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:u("#6685c2").setOpacity(.3).get(),outlineColor:"#cccccc",outlineWidth:1,series:{type:k,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},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,o){return t=o.width/2,e=Math.round(t/3)+.5,o=o.height,["M",-t-1,.5,"L",t,.5,"L",t,o+.5,"L",-t-1,o+.5,"L",-t-1,.5,"M",-e,4,"L",-e,o-3,"M",e-1,4,"L",e-1,o-3]},p.prototype.toFixedRange=function(e,i,o,n){var a=this.chart&&this.chart.fixedRange,r=(this.pointRange||0)/2;e=h(o,this.translate(e,!0,!this.horiz)),i=h(n,this.translate(i,!0,!this.horiz));var c=a&&(i-e)/a;return s(o)||(e=t.correctFloat(e+r)),s(n)||(i=t.correctFloat(i-r)),.7<c&&1.3>c&&(n?e=i-a:i=e+a),l(e)&&l(i)||(e=i=void 0),{min:e,max:i}},i.prototype={drawHandle:function(t,e,i,s){var o=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-o)}:{translateX:Math.round(this.left+parseInt(t,10)),translateY:Math.round(this.top+this.height/2-o/2-1)})},drawOutline:function(t,e,i,s){var o=this.navigatorOptions.maskInside,n=this.outline.strokeWidth(),a=n/2;n=n%2/2;var r=this.outlineHeight,l=this.scrollbarHeight,h=this.size,c=this.left-l,d=this.top;i?(c-=a,i=d+e+n,e=d+t+n,t=["M",c+r,d-l-n,"L",c+r,i,"L",c,i,"L",c,e,"L",c+r,e,"L",c+r,d+h+l].concat(o?["M",c+r,i-a,"L",c+r,e+a]:[])):(t+=c+l-n,e+=c+l-n,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(o?["M",t-a,d,"L",e+a,d]:[])),this.outline[s]({d:t})},drawMasks:function(t,e,i,s){var o=this.left,n=this.top,a=this.height;if(i)var r=[o,o,o],l=[n,n+t,n+e],h=[a,a,a],c=[t,e-t,this.size-e];else r=[o,o+t,o+e],l=[n,n,n],h=[t,e-t,this.size-e],c=[a,a,a];this.shades.forEach(function(t,e){t[s]({x:r[e],y:l[e],width:h[e],height:c[e]})})},renderElements:function(){var t,e=this,i=e.navigatorOptions,s=i.maskInside,o=e.chart,n=o.renderer,a={cursor:o.inverted?"ns-resize":"ew-resize"};e.navigatorGroup=t=n.g("navigator").attr({zIndex:8,visibility:"hidden"}).add(),[!s,s,!s].forEach(function(s,r){e.shades[r]=n.rect().addClass("highcharts-navigator-mask"+(1===r?"-inside":"-outside")).add(t),o.styledMode||e.shades[r].attr({fill:s?i.maskFill:"rgba(0,0,0,0)"}).css(1===r&&a)}),e.outline=n.path().addClass("highcharts-navigator-outline").add(t),o.styledMode||e.outline.attr({"stroke-width":i.outlineWidth,stroke:i.outlineColor}),i.handles.enabled&&[0,1].forEach(function(s){if(i.handles.inverted=o.inverted,e.handles[s]=n.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),!o.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(),v(!0,this.chart.options.navigator,this.options,t),this.init(this.chart)},render:function(e,i,o,n){var a,r,c=this.chart,d=this.scrollbarHeight,p=this.xAxis,u=p.pointRange||0,f=p.fake?c.xAxis[0]:p,g=this.navigatorEnabled,m=this.rendered,v=c.inverted,x=c.xAxis[0].minRange,y=c.xAxis[0].options.maxRange;if(!this.hasDragged||s(o)){if(e=t.correctFloat(e-u/2),i=t.correctFloat(i+u/2),!l(e)||!l(i)){if(!m)return;o=0,n=h(p.width,f.width)}this.left=h(p.left,c.plotLeft+d+(v?c.plotWidth:0)),this.size=r=a=h(p.len,(v?c.plotHeight:c.plotWidth)-2*d),c=v?d:a+2*d,o=h(o,p.toPixels(e,!0)),n=h(n,p.toPixels(i,!0)),l(o)&&1/0!==Math.abs(o)||(o=0,n=c),e=p.toValue(o,!0),i=p.toValue(n,!0);var b=Math.abs(t.correctFloat(i-e));t.correctFloat(b-u)<x?this.grabbedLeft?o=p.toPixels(i-x-u,!0):this.grabbedRight&&(n=p.toPixels(e+x+u,!0)):s(y)&&t.correctFloat(b-u)>y&&(this.grabbedLeft?o=p.toPixels(i-y-u,!0):this.grabbedRight&&(n=p.toPixels(e+y+u,!0))),this.zoomedMax=Math.min(Math.max(o,n,0),r),this.zoomedMin=Math.min(Math.max(this.fixedWidth?this.zoomedMax-this.fixedWidth:Math.min(o,n),0),r),this.range=this.zoomedMax-this.zoomedMin,r=Math.round(this.zoomedMax),o=Math.round(this.zoomedMin),g&&(this.navigatorGroup.attr({visibility:"visible"}),m=m&&!this.hasDragged?"animate":"attr",this.drawMasks(o,r,v,m),this.drawOutline(o,r,v,m),this.navigatorOptions.handles.enabled&&(this.drawHandle(o,0,v,m),this.drawHandle(r,1,v,m))),this.scrollbar&&(v?(v=this.top-d,f=this.left-d+(g||!f.opposite?0:(f.titleOffset||0)+f.axisTitleMargin),d=a+2*d):(v=this.top+(g?this.height:-d),f=this.left-d),this.scrollbar.position(f,v,c,d),this.scrollbar.setRange(this.zoomedMin/(a||1),this.zoomedMax/(a||1))),this.rendered=!0}},addMouseEvents:function(){var t,e,i=this,s=i.chart,o=s.container,n=[];i.mouseMoveHandler=t=function(t){i.onMouseMove(t)},i.mouseUpHandler=e=function(t){i.onMouseUp(t)},n=i.getPartsEvents("mousedown"),n.push(d(s.renderTo,"mousemove",t),d(o.ownerDocument,"mouseup",e)),g&&(n.push(d(s.renderTo,"touchmove",t),d(o.ownerDocument,"touchend",e)),n.concat(i.getPartsEvents("touchstart"))),i.eventsToUnbind=n,i.series&&i.series[0]&&n.push(d(i.series[0].xAxis,"foundExtremes",function(){s.navigator.modifyNavigatorAxisExtremes()}))},getPartsEvents:function(t){var e=this,i=[];return["shades","handles"].forEach(function(s){e[s].forEach(function(o,n){i.push(d(o.element,t,function(t){e[s+"Mousedown"](t,n)}))})}),i},shadesMousedown:function(t,e){t=this.chart.pointer.normalize(t);var i=this.chart,o=this.xAxis,n=this.zoomedMin,a=this.left,r=this.size,l=this.range,h=t.chartX;if(i.inverted&&(h=t.chartY,a=this.top),1===e)this.grabbedCenter=h,this.fixedWidth=l,this.dragOffset=h-n;else{if(t=h-a-l/2,0===e)t=Math.max(0,t);else if(2===e&&t+l>=r)if(t=r-l,this.reversedExtremes){t-=l;var c=this.getUnionExtremes().dataMin}else var d=this.getUnionExtremes().dataMax;t!==n&&(this.fixedWidth=l,e=o.toFixedRange(t,t+l,c,d),s(e.min)&&i.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,o=i.left,n=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&&(o=i.top,s=e.chartY),i.grabbedLeft?(i.hasDragged=!0,i.render(0,0,s-o,i.otherHandlePos)):i.grabbedRight?(i.hasDragged=!0,i.render(0,0,i.otherHandlePos,s-o)):i.grabbedCenter&&(i.hasDragged=!0,s<r?s=r:s>n+r-a&&(s=n+r-a),i.render(0,0,s-r,s-r+a)),i.hasDragged&&i.scrollbar&&h(i.scrollbar.options.liveRedraw,t.svg&&!m&&!this.chart.isBoosting)&&(e.DOMType=e.type,setTimeout(function(){i.onMouseUp(e)},0)))},onMouseUp:function(t){var e=this.chart,i=this.xAxis,o=this.scrollbar,n=t.DOMEvent||t;if(this.hasDragged&&(!o||!o.hasDragged)||"scrollbar"===t.trigger){if(o=this.getUnionExtremes(),this.zoomedMin===this.otherHandlePos)var a=this.fixedExtreme;else if(this.zoomedMax===this.otherHandlePos)var r=this.fixedExtreme;this.zoomedMax===this.size&&(r=this.reversedExtremes?o.dataMin:o.dataMax),0===this.zoomedMin&&(a=this.reversedExtremes?o.dataMax:o.dataMin),i=i.toFixedRange(this.zoomedMin,this.zoomedMax,a,r),s(i.min)&&e.xAxis[0].setExtremes(Math.min(i.min,i.max),Math.max(i.min,i.max),!0,!this.hasDragged&&null,{trigger:"navigator",triggerOp:"navigator-drag",DOMEvent:n})}"mousemove"!==t.DOMType&&"touchmove"!==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,s=i.enabled,o=e.scrollbar,n=o.enabled;e=s?i.height:0;var a=n?o.height:0;this.handles=[],this.shades=[],this.chart=t,this.setBaseSeries(),this.height=e,this.scrollbarHeight=a,this.scrollbarEnabled=n,this.navigatorEnabled=s,this.navigatorOptions=i,this.scrollbarOptions=o,this.outlineHeight=e+a,this.opposite=h(i.opposite,!(s||!t.inverted));var r=this;s=r.baseSeries,o=t.xAxis.length,n=t.yAxis.length;var l=s&&s[0]&&s[0].xAxis||t.xAxis[0]||{options:{}};t.isDirtyBox=!0,r.navigatorEnabled?(r.xAxis=new p(t,v({breaks:l.options.breaks,ordinal:l.options.ordinal},i.xAxis,{id:"navigator-x-axis",yAxis:"navigator-y-axis",isX:!0,type:"datetime",index:o,isInternal:!0,offset:0,keepOrdinalPadding:!0,startOnTick:!1,endOnTick:!1,minPadding:0,maxPadding:0,zoomEnabled:!1},t.inverted?{offsets:[a,0,-a,0],width:e}:{offsets:[0,-a,0,a],height:e})),r.yAxis=new p(t,v(i.yAxis,{id:"navigator-y-axis",alignTicks:!1,offset:0,index:n,isInternal:!0,zoomEnabled:!1},t.inverted?{width:e}:{height:e})),s||i.series.data?r.updateNavigatorSeries(!1):0===t.series.length&&(r.unbindRedraw=d(t,"beforeRedraw",function(){0<t.series.length&&!r.series&&(r.setBaseSeries(),r.unbindRedraw())})),r.reversedExtremes=t.inverted&&!r.xAxis.reversed||!t.inverted&&r.xAxis.reversed,r.renderElements(),r.addMouseEvents()):r.xAxis={translate:function(e,i){var s=t.xAxis[0],o=s.getExtremes(),n=s.len-2*a,r=w("min",s.options.min,o.dataMin);return s=w("max",s.options.max,o.dataMax)-r,i?e*s/n+r:n*(e-r)/s},toPixels:function(t){return this.translate(t)},toValue:function(t){return this.translate(t,!0)},toFixedRange:p.prototype.toFixedRange,fake:!0},t.options.scrollbar.enabled&&(t.scrollbar=r.scrollbar=new y(t.renderer,v(t.options.scrollbar,{margin:r.navigatorEnabled?0:10,vertical:t.inverted}),t),d(r.scrollbar,"changed",function(e){var i=r.size,s=i*this.to;i*=this.from,r.hasDragged=r.scrollbar.hasDragged,r.render(0,0,i,s),(t.options.scrollbar.liveRedraw||"mousemove"!==e.DOMType&&"touchmove"!==e.DOMType)&&setTimeout(function(){r.onMouseUp(e)})})),r.addBaseSeriesEvents(),r.addChartEvents()},getUnionExtremes:function(t){var e,i=this.chart.xAxis[0],s=this.xAxis,o=s.options,n=i.options;return t&&null===i.dataMin||(e={dataMin:h(o&&o.min,w("min",n.min,i.dataMin,s.dataMin,s.min)),dataMax:h(o&&o.max,w("max",n.max,i.dataMax,s.dataMax,s.max))}),e},setBaseSeries:function(e,i){var s=this.chart,o=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)||o.push(t)}),this.xAxis&&!this.xAxis.fake&&this.updateNavigatorSeries(!0,i)},updateNavigatorSeries:function(t,e){var i,s,o,n=this,l=n.chart,d=n.baseSeries,p=n.navigatorOptions.series,u={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}}},g=n.series=(n.series||[]).filter(function(t){var e=t.baseSeries;return!(0>d.indexOf(e))||(e&&(x(e,"updatedData",n.updatedDataHandler),delete e.navigatorSeries),t.chart&&t.destroy(),!1)});d&&d.length&&d.forEach(function(t){var c=t.navigatorSeries,m=a({color:t.color,visible:t.visible},r(p)?f.navigator.series:p);c&&!1===n.navigatorOptions.adaptToUpdatedData||(u.name="Navigator "+d.length,i=t.options||{},o=i.navigatorOptions||{},s=v(i,u,m,o),s.pointRange=h(m.pointRange,o.pointRange,f.plotOptions[s.type||"line"].pointRange),m=o.data||m.data,n.hasNavigatorData=n.hasNavigatorData||!!m,s.data=m||i.data&&i.data.slice(0),c&&c.options?c.update(s,e):(t.navigatorSeries=l.initSeries(s),t.navigatorSeries.baseSeries=t,g.push(t.navigatorSeries)))}),(!p.data||d&&d.length)&&!r(p)||(n.hasNavigatorData=!1,p=c(p),p.forEach(function(t,e){u.name="Navigator "+(g.length+1),s=v(f.navigator.series,{color:l.series[e]&&!l.series[e].options.isInternal&&l.series[e].color||l.options.colors[e]||l.options.colors[0]},u,t),s.data=t.data,s.data&&(n.hasNavigatorData=!0,g.push(l.initSeries(s)))})),t&&this.addBaseSeriesEvents()},addBaseSeriesEvents:function(){var t=this,e=t.baseSeries||[];e[0]&&e[0].xAxis&&d(e[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes),e.forEach(function(e){d(e,"show",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!0,!1)}),d(e,"hide",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!1,!1)}),!1!==this.navigatorOptions.adaptToUpdatedData&&e.xAxis&&d(e,"updatedData",this.updatedDataHandler),d(e,"remove",function(){this.navigatorSeries&&(n(t.series,this.navigatorSeries),s(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;void 0!==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=this.chart.navigator,e=this.getExtremes(),i=e.dataMin,s=e.dataMax;e=e.max-e.min;var o=t.stickToMin,n=t.stickToMax,a=h(this.options.overscroll,0),r=t.series&&t.series[0],c=!!this.setExtremes;if(!this.eventArgs||"rangeSelectorButton"!==this.eventArgs.trigger){if(o)var d=i,p=d+e;n&&(p=s+a,o||(d=Math.max(p-e,t.getBaseSeriesMin(r&&r.xData?r.xData[0]:-Number.MAX_VALUE)))),c&&(o||n)&&l(d)&&(this.min=this.userMin=d,this.max=this.userMax=p)}t.stickToMin=t.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=l(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(d(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)}),d(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&&(n(this.chart.xAxis,this.xAxis),n(this.chart.axes,this.xAxis)),this.yAxis&&(n(this.chart.yAxis,this.yAxis),n(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){o(t)},this)}},t.Navigator||(t.Navigator=i,d(p,"zoom",function(t){var e=this.chart.options,i=e.chart.zoomType,o=e.chart.pinchType,n=e.navigator;e=e.rangeSelector,this.isXAxis&&(n&&n.enabled||e&&e.enabled)&&("y"===i?t.zoomed=!1:(!m&&"xy"===i||m&&"xy"===o)&&this.options.range&&(i=this.previousZoom,s(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()}),d(e,"beforeShowResetZoom",function(){var t=this.options,e=t.navigator,i=t.rangeSelector;if((e&&e.enabled||i&&i.enabled)&&(!m&&"x"===t.chart.zoomType||m&&"x"===t.chart.pinchType))return!1}),d(e,"beforeRender",function(){var t=this.options;(t.navigator.enabled||t.scrollbar.enabled)&&(this.scroller=this.navigator=new i(this))}),d(e,"afterSetChartSize",function(){var t=this.legend,e=this.navigator;if(e){var i=t&&t.options,s=e.xAxis,o=e.yAxis,n=e.scrollbarHeight;this.inverted?(e.left=e.opposite?this.chartWidth-n-e.height:this.spacing[3]+n,e.top=this.plotTop+n):(e.left=this.plotLeft+n,e.top=e.navigatorOptions.top||this.chartHeight-e.height-n-this.spacing[2]-(this.rangeSelector&&this.extraBottomMargin?this.rangeSelector.getHeight():0)-(i&&"bottom"===i.verticalAlign&&i.enabled&&!i.floating?t.legendHeight+h(i.margin,10):0)-(this.titleOffset?this.titleOffset[2]:0)),s&&o&&(this.inverted?s.options.left=o.options.left=e.left:s.options.top=o.options.top=e.top,s.setAxisSize(),o.setAxisSize())}}),d(e,"update",function(t){var e=t.options.navigator||{},i=t.options.scrollbar||{};this.navigator||this.scroller||!e.enabled&&!i.enabled||(v(!0,this.options.navigator,e),v(!0,this.options.scrollbar,i),delete t.options.navigator,delete t.options.scrollbar)}),d(e,"afterUpdate",function(t){this.navigator||this.scroller||!this.options.navigator.enabled&&!this.options.scrollbar.enabled||(this.scroller=this.navigator=new i(this),h(t.redraw,!0)&&this.redraw(t.animation))}),d(e,"afterAddSeries",function(){this.navigator&&this.navigator.setBaseSeries(null,!1)}),d(b,"afterUpdate",function(){this.chart.navigator&&!this.options.isInternal&&this.chart.navigator.setBaseSeries(null,!1)}),e.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"],i["parts/Utilities.js"]],function(t,e){var i=e.defined,s=e.extend,o=e.pick;e=t.addEvent;var n=t.Axis,a=t.Chart,r=t.css,l=t.noop,h=t.timeUnits;e(t.Series,"updatedData",function(){var t=this.xAxis;t&&t.options.ordinal&&delete t.ordinalIndex}),n.prototype.getTimeTicks=function(t,e,s,o,n,a,r){var l,c,d=0,p={},u=[],f=-Number.MAX_VALUE,g=this.options.tickPixelInterval,m=this.chart.time,v=[];if(!this.options.ordinal&&!this.options.breaks||!n||3>n.length||void 0===e)return m.getTimeTicks.apply(m,arguments);var x=n.length;for(l=0;l<x;l++){var y=l&&n[l-1]>s;if(n[l]<e&&(d=l),l===x-1||n[l+1]-n[l]>5*a||y){if(n[l]>f){for(c=m.getTimeTicks(t,n[d],n[l],o);c.length&&c[0]<=f;)c.shift();c.length&&(f=c[c.length-1]),v.push(u.length),u=u.concat(c)}d=l+1}if(y)break}if(c=c.info,r&&c.unitRange<=h.hour){for(l=u.length-1,d=1;d<l;d++)if(m.dateFormat("%d",u[d])!==m.dateFormat("%d",u[d-1])){p[u[d]]="day";var b=!0}b&&(p[u[0]]="day"),c.higherRanks=p}if(c.segmentStarts=v,u.info=c,r&&i(g)){d=v=u.length,b=[];var w;for(m=[];d--;)l=this.translate(u[d]),w&&(m[d]=w-l),b[d]=w=l;for(m.sort(),m=m[Math.floor(m.length/2)],m<.6*g&&(m=null),d=u[v-1]>s?v-1:v,w=void 0;d--;)l=b[d],v=Math.abs(w-l),w&&v<.8*g&&(null===m||v<.8*m)?(p[u[d]]&&!p[u[d+1]]?(v=d+1,w=l):v=d,u.splice(v,1)):w=l}return u},s(n.prototype,{beforeSetTickPositions:function(){var t,e,i=[],s=!1,n=this.getExtremes(),a=n.min,r=n.max,l=this.isXAxis&&!!this.options.breaks;n=this.options.ordinal;var h,c=Number.MAX_VALUE,d=this.chart.options.chart.ignoreHiddenSeries;if(n||l){this.series.forEach(function(e,s){if(t=[],!(d&&!1===e.visible||!1===e.takeOrdinalPosition&&!l)&&(i=i.concat(e.processedXData),p=i.length,i.sort(function(t,e){return t-e}),c=Math.min(c,o(e.closestPointRange,c)),p)){for(s=0;s<p-1;)i[s]!==i[s+1]&&t.push(i[s+1]),s++;t[0]!==i[0]&&t.unshift(i[0]),i=t}e.isSeriesBoosting&&(h=!0)}),h&&(i.length=0);var p=i.length;if(2<p){var u=i[1]-i[0];for(e=p-1;e--&&!s;)i[e+1]-i[e]!==u&&(s=!0);!this.options.keepOrdinalPadding&&(i[0]-a>u||r-i[i.length-1]>u)&&(s=!0)}else this.options.overscroll&&(2===p?c=i[1]-i[0]:1===p?(c=this.options.overscroll,i=[i[0],i[0]+c]):c=this.overscrollPointsRange);s?(this.options.overscroll&&(this.overscrollPointsRange=c,i=i.concat(this.getOverscrollPositions())),this.ordinalPositions=i,u=this.ordinal2lin(Math.max(a,i[0]),!0),e=Math.max(this.ordinal2lin(Math.min(r,i[i.length-1]),!0),1),this.ordinalSlope=r=(r-a)/(e-u),this.ordinalOffset=a-u*r):(this.overscrollPointsRange=o(this.closestPointRange,this.overscrollPointsRange),this.ordinalPositions=this.ordinalSlope=this.ordinalOffset=void 0)}this.isOrdinal=n&&s,this.groupIntervalFactor=null},val2lin:function(t,e){var i=this.ordinalPositions;if(i){var s,o=i.length;for(s=o;s--;)if(i[s]===t){var 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=this.ordinalSlope,o=this.ordinalOffset,n=i.length-1;if(e)if(0>t)t=i[0];else if(t>n)t=i[n];else{n=Math.floor(t);var a=t-n}else for(;n--;)if(e=s*n+o,t>=e){s=s*(n+1)+o,a=(t-e)/(s-e);break}return void 0!==a&&void 0!==i[n]?i[n]+(a?a*(i[n+1]-i[n]):0):t}return t},getExtendedPositions:function(){var t,e=this,i=e.chart,s=e.series[0].currentDataGrouping,o=e.ordinalIndex,a=s?s.count+s.unitName:"raw",r=e.options.overscroll,h=e.getExtremes();if(o||(o=e.ordinalIndex={}),!o[a]){var c={series:[],chart:i,getExtremes:function(){return{min:h.dataMin,max:h.dataMax+r}},options:{ordinal:!0},val2lin:n.prototype.val2lin,ordinal2lin:n.prototype.ordinal2lin};e.series.forEach(function(o){t={xAxis:c,xData:o.xData.slice(),chart:i,destroyGroupedData:l},t.xData=t.xData.concat(e.getOverscrollPositions()),t.options={dataGrouping:s?{enabled:!0,forced:!0,approximation:"open",units:[[s.unitName,[s.count]]]}:{enabled:!1}},o.processData.apply(t),c.series.push(t)}),e.beforeSetTickPositions.apply(c),o[a]=c.ordinalPositions}return o[a]},getOverscrollPositions:function(){var t=this.options.overscroll,e=this.overscrollPointsRange,s=[],o=this.dataMax;if(i(e))for(s.push(o);o<=this.dataMax+t;)o+=e,s.push(o);return s},getGroupIntervalFactor:function(t,e,i){i=i.processedXData;var s=i.length,o=[],n=this.groupIntervalFactor;if(!n){for(n=0;n<s-1;n++)o[n]=i[n+1]-i[n];o.sort(function(t,e){return t-e}),o=o[Math.floor(s/2)],t=Math.max(t,i[0]),e=Math.min(e,i[s-1]),this.groupIntervalFactor=n=s*o/(e-t)}return n},postProcessTickInterval:function(t){var e=this.ordinalSlope;return e?this.options.breaks?this.closestPointRange||t:t/(e/this.closestPointRange):t}}),n.prototype.ordinal2lin=n.prototype.val2lin,e(a,"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 n=this.mouseDownX,a=e.getExtremes(),l=a.dataMax,h=a.min,c=a.max,d=this.hoverPoints,p=e.closestPointRange||e.overscrollPointsRange;n=(n-s)/(e.translationSlope*(e.ordinalSlope||p));var u={ordinalPositions:e.getExtendedPositions()};p=e.lin2val;var f=e.val2lin;if(u.ordinalPositions){if(1<Math.abs(n)){if(d&&d.forEach(function(t){t.setState()}),0>n){d=u;var g=e.ordinalPositions?e:u}else d=e.ordinalPositions?e:u,g=u;u=g.ordinalPositions,l>u[u.length-1]&&u.push(l),this.fixedRange=c-h,n=e.toFixedRange(null,null,p.apply(d,[f.apply(d,[h,!0])+n,!0]),p.apply(g,[f.apply(g,[c,!0])+n,!0])),n.min>=Math.min(a.dataMin,h)&&n.max<=Math.max(l,c)+i&&e.setExtremes(n.min,n.max,!0,!1,{trigger:"pan"}),this.mouseDownX=s,r(this.container,{cursor:"move"})}}else o=!0}else o=!0;o?i&&(e.max=e.dataMax+i):t.preventDefault()}),e(n,"foundExtremes",function(){this.isXAxis&&i(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&&i(this.userMin)&&(this.min+=this.options.overscroll))}),e(n,"afterSetScale",function(){this.horiz&&!this.isDirty&&(this.isDirty=this.isOrdinal&&this.chart.navigator&&!this.chart.navigator.adaptToUpdatedData)})}),e(i,"modules/broken-axis.src.js",[i["parts/Globals.js"],i["parts/Utilities.js"]],function(t,e){var i=e.extend,s=e.isArray,o=e.pick;e=t.addEvent;var n=t.find,a=t.fireEvent,r=t.Axis,l=t.Series,h=function(t,e){return n(e,function(e){return e.from<t&&t<e.to})};i(r.prototype,{isInBreak:function(t,e){var i=t.repeat||1/0,s=t.from,o=t.to-t.from;return e=e>=s?(e-s)%i:i-(s-e)%i,t.inclusive?e<=o:e<o&&0!==e},isInAnyBreak:function(t,e){var i,s=this.options.breaks,n=s&&s.length;if(n){for(;n--;)if(this.isInBreak(s[n],t)){var a=!0;i||(i=o(s[n].showPoints,!this.isXAxis))}var r=a&&e?a&&!i:a}return r}}),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 i(t){var e,i=t;for(e=0;e<l.breakArray.length;e++){var s=l.breakArray[e];if(s.to<=t)i-=s.len;else{if(s.from>=t)break;if(l.isInBreak(s,t)){i-=t-s.from;break}}}return i}function n(t){var e;for(e=0;e<l.breakArray.length;e++){var i=l.breakArray[e];if(i.from>=t)break;i.to<t?t+=i.len:l.isInBreak(i,t)&&(t+=i.len)}return t}var l=this,c=s(t)&&!!t.length;l.isDirty=l.isBroken!==c,l.isBroken=c,l.options.breaks=l.userOptions.breaks=t,l.forceRedraw=!0,c||l.val2lin!==i||(delete l.val2lin,delete l.lin2val),c&&(l.userOptions.ordinal=!1,l.val2lin=i,l.lin2val=n,l.setExtremes=function(t,e,i,s,o){if(this.isBroken){for(var n,a=this.options.breaks;n=h(t,a);)t=n.to;for(;n=h(e,a);)e=n.from;e<t&&(e=t)}r.prototype.setExtremes.call(this,t,e,i,s,o)},l.setAxisTranslation=function(t){if(r.prototype.setAxisTranslation.call(this,t),this.unitLength=null,this.isBroken){t=l.options.breaks;var e,i,s=[],n=[],h=0,c=l.userMin||l.min,d=l.userMax||l.max,p=o(l.pointRangePadding,0);t.forEach(function(t){e=t.repeat||1/0,l.isInBreak(t,c)&&(c+=t.to%e-c%e),l.isInBreak(t,d)&&(d-=d%e-t.from%e)}),t.forEach(function(t){for(f=t.from,e=t.repeat||1/0;f-e>c;)f-=e;for(;f<c;)f+=e;for(i=f;i<d;i+=e)s.push({value:i,move:"in"}),s.push({value:i+(t.to-t.from),move:"out",size:t.breakSize})}),s.sort(function(t,e){return t.value===e.value?("in"===t.move?0:1)-("in"===e.move?0:1):t.value-e.value});var u=0,f=c;s.forEach(function(t){u+="in"===t.move?1:-1,1===u&&"in"===t.move&&(f=t.value),0===u&&(n.push({from:f,to:t.value,len:t.value-f-(t.size||0)}),h+=t.value-f-(t.size||0))}),l.breakArray=n,l.unitLength=d-c-h+p,a(l,"afterBreaks"),l.staticScale?l.transA=l.staticScale:l.unitLength&&(l.transA*=(d-l.min+p)/l.unitLength),p&&(l.minPixelPadding=l.transA*l.minPointOffset),l.min=c,l.max=d}}),o(e,!0)&&this.chart.redraw()},e(l,"afterGeneratePoints",function(){var t=this.xAxis,e=this.yAxis,i=this.points,s=i.length,o=this.options.connectNulls;if(t&&e&&(t.options.breaks||e.options.breaks))for(;s--;){var n=i[s],a=null===n.y&&!1===o;a||!t.isInAnyBreak(n.x,!0)&&!e.isInAnyBreak(n.y,!0)||(i.splice(s,1),this.data[s]&&this.data[s].destroyElements())}}),e(l,"afterRender",function(){this.drawBreaks(this.xAxis,["x"]),this.drawBreaks(this.yAxis,o(this.pointArrayMap,["y"]))}),t.Series.prototype.drawBreaks=function(t,e){var i,s,n,r,l=this,h=l.points;t&&e.forEach(function(e){i=t.breakArray||[],s=t.isXAxis?t.min:o(l.options.threshold,t.min),h.forEach(function(l){r=o(l["stack"+e.toUpperCase()],l[e]),i.forEach(function(e){n=!1,s<e.from&&r>e.to||s>e.from&&r<e.from?n="pointBreak":(s<e.from&&r>e.from&&r<e.to||s>e.from&&r>e.to&&r<e.from)&&(n="pointInBreak"),n&&a(t,n,{point:l,brk:e})})})})},t.Series.prototype.gappedPath=function(){var e=this.currentDataGrouping,i=e&&e.gapSize;e=this.options.gapSize;var s=this.points.slice(),o=s.length-1,n=this.yAxis;if(e&&0<o)for("value"!==this.options.gapUnit&&(e*=this.basePointRange),i&&i>e&&i>=this.basePointRange&&(e=i);o--;)s[o+1].x-s[o].x>e&&(i=(s[o].x+s[o+1].x)/2,s.splice(o+1,0,{isNull:!0,x:i}),this.options.stacking&&(i=n.stacks[this.stackKey][i]=new t.StackItem(n,n.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"],i["parts/Utilities.js"]],function(t,e){var i=e.arrayMax,s=e.arrayMin,o=e.defined,n=e.extend,a=e.isNumber,r=e.pick;e=t.addEvent;var l=t.Axis,h=t.correctFloat,c=t.defaultPlotOptions,d=t.format,p=t.merge,u=t.Point,f=t.Series,g=t.Tooltip,m=t.approximations={sum:function(t){var e=t.length;if(!e&&t.hasNulls)var i=null;else if(e)for(i=0;e--;)i+=t[e];return i},average:function(t){var e=t.length;return t=m.sum(t),a(t)&&e&&(t=h(t/e)),t},averages:function(){var t=[];return[].forEach.call(arguments,function(e){t.push(m.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=m.open(t),e=m.high(e),i=m.low(i),s=m.close(s),a(t)||a(e)||a(i)||a(s))return[t,e,i,s]},range:function(t,e){return t=m.low(t),e=m.high(e),a(t)||a(e)?[t,e]:null===t&&null===e?null:void 0}},v=function(t,e,i,s){var n,r=this,l=r.data,h=r.options&&r.options.data,c=[],d=[],u=[],f=t.length,g=!!e,v=[],x=r.pointArrayMap,y=x&&x.length,b=["x"].concat(x||["y"]),w=0,k=0;s="function"==typeof s?s:m[s]?m[s]:m[r.getDGApproximation&&r.getDGApproximation()||"average"],y?x.forEach(function(){v.push([])}):v.push([]);var M=y||1;for(n=0;n<=f&&!(t[n]>=i[0]);n++);for(n;n<=f;n++){for(;void 0!==i[w+1]&&t[n]>=i[w+1]||n===f;){var S=i[w];r.dataGroupInfo={start:r.cropStart+k,length:v[0].length};var T=s.apply(r,v);for(r.pointClass&&!o(r.dataGroupInfo.options)&&(r.dataGroupInfo.options=p(r.pointClass.prototype.optionsToObject.call({series:r},r.options.data[r.cropStart+k])),b.forEach(function(t){delete r.dataGroupInfo.options[t]})),void 0!==T&&(c.push(S),d.push(T),u.push(r.dataGroupInfo)),k=n,S=0;S<M;S++)v[S].length=0,v[S].hasNulls=!1;if(w+=1,n===f)break}if(n===f)break;if(x)for(S=r.cropStart+n,T=l&&l[S]||r.pointClass.prototype.applyOptions.apply({series:r},[h[S]]),S=0;S<y;S++){var C=T[x[S]];a(C)?v[S].push(C):null===C&&(v[S].hasNulls=!0)}else S=g?e[n]:null,a(S)?v[0].push(S):null===S&&(v[0].hasNulls=!0)}return{groupedXData:c,groupedYData:d,groupMap:u}},x={approximations:m,groupData:v},y=f.prototype,b=y.processData,w=y.generatePoints,k={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"]}},M={line:{},spline:{},area:{},areaspline:{},arearange:{},column:{groupPixelWidth:10},columnrange:{groupPixelWidth:10},candlestick:{groupPixelWidth:10},ohlc:{groupPixelWidth:5}},S=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 y.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"},y.groupData=v,y.processData=function(){var t,e=this.chart,i=this.options.dataGrouping,s=!1!==this.allowDG&&i&&r(i.enabled,e.options.isStock),n=this.visible||!e.options.chart.ignoreHiddenSeries,a=this.currentDataGrouping,l=!1;if(this.forceCrop=s,this.groupPixelWidth=null,this.hasProcessed=!0,s&&!this.requireSorting&&(this.requireSorting=l=!0),s=!1===b.apply(this,arguments)||!s,l&&(this.requireSorting=!1),!s){this.destroyGroupedData(),s=i.groupAll?this.xData:this.processedXData;var h=i.groupAll?this.yData:this.processedYData,c=e.plotSizeX;e=this.xAxis;var d=e.options.ordinal,p=this.groupPixelWidth=e.getGroupPixelWidth&&e.getGroupPixelWidth();if(p){this.isDirty=t=!0,this.points=null,l=e.getExtremes();var u=l.min;l=l.max,d=d&&e.getGroupIntervalFactor(u,l,this)||1,p=p*(l-u)/c*d,c=e.getTimeTicks(e.normalizeTimeTickInterval(p,i.units||S),Math.min(u,s[0]),Math.max(l,s[s.length-1]),e.options.startOfWeek,s,this.closestPointRange),h=y.groupData.apply(this,[s,h,c,i.approximation]),s=h.groupedXData,d=h.groupedYData;var f=0;if(i.smoothed&&s.length){var g=s.length-1;for(s[g]=Math.min(s[g],l);g--&&0<g;)s[g]+=p/2;s[0]=Math.max(s[0],u)}for(g=1;g<c.length;g++)c.info.segmentStarts&&-1!==c.info.segmentStarts.indexOf(g)||(f=Math.max(c[g]-c[g-1],f));u=c.info,u.gapSize=f,this.closestPointRange=c.info.totalRange,this.groupMap=h.groupMap,o(s[0])&&s[0]<e.min&&n&&((!o(e.options.min)&&e.min<=e.dataMin||e.min===e.dataMin)&&(e.min=Math.min(s[0],e.min)),e.dataMin=s[0]),i.groupAll&&(i=this.cropData(s,d,e.min,e.max,1),s=i.xData,d=i.yData),this.processedXData=s,this.processedYData=d}else this.groupMap=null;this.hasGroupedData=t,this.currentDataGrouping=u,this.preventGraphAnimation=(a&&a.totalRange)!==(u&&u.totalRange)}},y.destroyGroupedData=function(){this.groupedData&&(this.groupedData.forEach(function(t,e){t&&(this.groupedData[e]=t.destroy?t.destroy():null)},this),this.groupedData.length=0)},y.generatePoints=function(){w.apply(this),this.destroyGroupedData(),this.groupedData=this.hasGroupedData?this.points:null},e(u,"update",function(){if(this.dataGroup)return t.error(24,!1,this.series.chart),!1}),e(g,"headerFormatter",function(t){var e=this.chart.time,i=t.labelConfig,s=i.series,o=s.tooltipOptions,r=s.options.dataGrouping,l=o.xDateFormat,h=s.xAxis,c=o[(t.isFooter?"footer":"header")+"Format"];if(h&&"datetime"===h.options.type&&r&&a(i.key)){var p=s.currentDataGrouping;if(r=r.dateTimeLabelFormats||k.dateTimeLabelFormats,p)if(o=r[p.unitName],1===p.count)l=o[0];else{l=o[1];var u=o[2]}else!l&&r&&(l=this.getXDateFormat(i,o,h));l=e.dateFormat(l,i.key),u&&(l+=e.dateFormat(u,i.key+p.totalRange-1)),s.chart.styledMode&&(c=this.styledModeFormat(c)),t.text=d(c,{point:n(i.point,{key:l}),series:s},e),t.preventDefault()}}),e(f,"destroy",y.destroyGroupedData),e(f,"afterSetOptions",function(t){t=t.options;var e=this.type,i=this.chart.options.plotOptions,s=c[e].dataGrouping,o=this.useCommonDataGrouping&&k;(M[e]||o)&&(s||(s=p(k,M[e])),t.dataGrouping=p(o,s,i.series&&i.series.dataGrouping,i[e].dataGrouping,this.userOptions.dataGrouping))}),e(l,"afterSetScale",function(){this.series.forEach(function(t){t.hasProcessed=!1})}),l.prototype.getGroupPixelWidth=function(){var t,e,i=this.series,s=i.length,o=0,n=!1;for(t=s;t--;)(e=i[t].options.dataGrouping)&&(o=Math.max(o,r(e.groupPixelWidth,k.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/o||s&&e.forced)&&(n=!0);return n?o:0},l.prototype.setDataGrouping=function(t,e){var i;if(e=r(e,!0),t||(t={forced:!1,units:null}),this instanceof l)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=x,x}),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,o=["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(n,a){null!==n&&(i&&(n=t.modifyValue(n)),s[o[a]]=e.toPixels(n,!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=i.graphic,o=!s;if(void 0!==i.plotY){s||(i.graphic=s=e.renderer.path().add(t.group)),e.styledMode||s.attr(t.pointAttribs(i,i.selected&&"select"));var n=s.strokeWidth()%2/2,a=Math.round(i.plotX)-n,r=Math.round(i.shapeArgs.width/2),l=["M",a,Math.round(i.yBottom),"L",a,Math.round(i.plotHigh)];if(null!==i.open){var h=Math.round(i.plotOpen)+n;l.push("M",a,h,"L",a-r,h)}null!==i.close&&(h=Math.round(i.plotClose)+n,l.push("M",a,h,"L",a+r,h)),s[o?"attr":"animate"]({d:l}).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,o=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=o.column.prototype.pointAttribs.call(this,t,e),s=this.options,n=t.open<t.close,a=s.lineColor||this.color;return i["stroke-width"]=s.lineWidth,i.fill=t.options.color||(n?s.upColor||this.color:this.color),i.stroke=t.options.lineColor||(n?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 o=s.graphic,n=!o;if(void 0!==s.plotY){o||(s.graphic=o=e.renderer.path().add(t.group)),t.chart.styledMode||o.attr(t.pointAttribs(s,s.selected&&"select")).shadow(t.options.shadow);var a=o.strokeWidth()%2/2,r=Math.round(s.plotX)-a,l=s.plotOpen,h=s.plotClose,c=Math.min(l,h);l=Math.max(l,h);var d=Math.round(s.shapeArgs.width/2);h=i?l!==s.yBottom:Math.round(c)!==Math.round(s.plotHigh);var p=i?Math.round(c)!==Math.round(s.plotHigh):l!==s.yBottom;c=Math.round(c)+a,l=Math.round(l)+a,a=[],a.push("M",r-d,l,"L",r-d,c,"L",r+d,c,"L",r+d,l,"Z","M",r,c,"L",r,h?Math.round(i?s.yBottom:s.plotHigh):c,"M",r,l,"L",r,p?Math.round(i?s.plotHigh:s.yBottom):l),o[n?"attr":"animate"]({d:a}).addClass(s.getClassName(),!0)}})}})}),e(i,"mixins/on-series.js",[i["parts/Globals.js"],i["parts/Utilities.js"]],function(t,e){var i=e.defined,s=t.seriesTypes,o=t.stableSort;return{getPlotBox:function(){return t.Series.prototype.getPlotBox.call(this.options.onSeries&&this.chart.get(this.options.onSeries)||this)},translate:function(){s.column.prototype.translate.apply(this);var t,e=this,n=e.options,a=e.chart,r=e.points,l=r.length-1,h=n.onSeries;h=h&&a.get(h),n=n.onKey||"y";var c,d=h&&h.options.step,p=h&&h.points,u=p&&p.length,f=a.inverted,g=e.xAxis,m=e.yAxis,v=0;if(h&&h.visible&&u){v=(h.pointXOffset||0)+(h.barW||0)/2,a=h.currentDataGrouping;var x=p[u-1].x+(a?a.totalRange:0);for(o(r,function(t,e){return t.x-e.x}),n="plot"+n[0].toUpperCase()+n.substr(1);u--&&r[l];){var y=p[u];if(a=r[l],a.y=y.y,y.x<=a.x&&void 0!==y[n]){if(a.x<=x&&(a.plotY=y[n],y.x<a.x&&!d&&(c=p[u+1])&&void 0!==c[n])){var b=(a.x-y.x)/(c.x-y.x);a.plotY+=b*(c[n]-y[n]),a.y+=b*(c.y-y.y)}if(l--,u++,0>l)break}}}r.forEach(function(s,o){if(s.plotX+=v,(void 0===s.plotY||f)&&(0<=s.plotX&&s.plotX<=g.len?f?(s.plotY=g.translate(s.x,0,1,0,1),s.plotX=i(s.y)?m.translate(s.y,0,0,0,1):0):s.plotY=(g.opposite?0:e.yAxis.len)+g.offset:s.shapeArgs={}),(t=r[o-1])&&t.plotX===s.plotX){void 0===t.stackIndex&&(t.stackIndex=0);var n=t.stackIndex+1}s.stackIndex=n}),this.onSeries=h}}}),e(i,"parts/FlagsSeries.js",[i["parts/Globals.js"],i["parts/Utilities.js"],i["mixins/on-series.js"]],function(t,e,i){function s(t){f[t+"pin"]=function(e,i,s,o,n){var a=n&&n.anchorX;n=n&&n.anchorY,"circle"===t&&o>s&&(e-=Math.round((o-s)/2),s=o);var r=f[t](e,i,s,o);return a&&n&&(r.push("M","circle"===t?e+s/2:r[1]+r[4]/2,i>n?i:i+o,"L",a,n),r=r.concat(f.circle(a-1,n-1,2,2))),r}}var o=e.defined,n=e.isNumber,a=e.objectEach,r=t.addEvent,l=t.merge;e=t.noop;var h=t.Renderer,c=t.Series,d=t.seriesType,p=t.TrackerMixin,u=t.VMLRenderer,f=t.SVGRenderer.prototype.symbols;d("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:c.prototype.init,pointAttribs:function(t,e){var i=this.options,s=t&&t.color||this.color,o=i.lineColor,n=t&&t.lineWidth;return t=t&&t.fillColor||i.fillColor,e&&(t=i.states[e].fillColor,o=i.states[e].lineColor,n=i.states[e].lineWidth),{fill:t||s,stroke:o||s,"stroke-width":n||i.lineWidth||0}},translate:i.translate,getPlotBox:i.getPlotBox,drawPoints:function(){var e,i=this.points,s=this.chart,n=s.renderer,r=s.inverted,h=this.options,c=h.y,d=this.yAxis,p={},u=[];for(e=i.length;e--;){var f=i[e],g=(r?f.plotY:f.plotX)>this.xAxis.len,m=f.plotX,v=f.stackIndex,x=f.options.shape||h.shape,y=f.plotY;void 0!==y&&(y=f.plotY+c-(void 0!==v&&v*h.stackDistance)),f.anchorX=v?void 0:f.plotX;var b=v?void 0:f.plotY,w="flag"!==x;v=f.graphic,void 0!==y&&0<=m&&!g?(v||(v=f.graphic=n.label("",null,null,x,null,null,h.useHTML),s.styledMode||v.attr(this.pointAttribs(f)).css(l(h.style,f.style)),v.attr({align:w?"center":"left",width:h.width,height:h.height,"text-align":h.textAlign}).addClass("highcharts-point").add(this.markerGroup),f.graphic.div&&(f.graphic.div.point=f),s.styledMode||v.shadow(h.shadow),v.isNew=!0),0<m&&(m-=v.strokeWidth()%2),x={y:y,anchorY:b},h.allowOverlapX&&(x.x=m,x.anchorX=f.anchorX),v.attr({text:f.options.title||h.title||"A"})[v.isNew?"attr":"animate"](x),h.allowOverlapX||(p[f.plotX]?p[f.plotX].size=Math.max(p[f.plotX].size,v.width):p[f.plotX]={align:w?.5:0,size:v.width,target:m,anchorX:m}),f.tooltipPos=[m,y+d.pos-s.plotTop]):v&&(f.graphic=v.destroy())}h.allowOverlapX||(a(p,function(t){t.plotX=t.anchorX,u.push(t)}),t.distribute(u,r?d.len:this.xAxis.len,100),i.forEach(function(t){var e=t.graphic&&p[t.plotX];e&&(t.graphic[t.graphic.isNew?"attr":"animate"]({x:e.pos+e.align*e.size,anchorX:t.anchorX}),o(e.pos)?t.graphic.isNew=!1:(t.graphic.attr({x:-9999,anchorX:-9999}),t.graphic.isNew=!0))})),h.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;p.drawTrackerPoint.apply(this),t.forEach(function(e){var i=e.graphic;i&&r(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(){c.prototype.setClip.apply(this,arguments),!1!==this.options.clip&&this.sharedClipKey&&this.markerGroup.clip(this.chart[this.sharedClipKey])},buildKDTree:e,invertGroups:e},{isValid:function(){return n(this.y)||void 0===this.y}}),f.flag=function(t,e,i,s,o){var n=o&&o.anchorX||t;return o=o&&o.anchorY||e,f.circle(n-1,o-1,2,2).concat(["M",n,o,"L",t,e+s,t,e,t+i,e,t+i,e+s,t,e+s,"Z"])},s("circle"),s("square"),h===u&&["circlepin","flag","squarepin"].forEach(function(t){u.prototype.symbols[t]=f[t]})}),e(i,"parts/RangeSelector.js",[i["parts/Globals.js"],i["parts/Utilities.js"]],function(t,e){function i(t){this.init(t)}var s=e.defined,o=e.destroyObjectProperties,n=e.discardElement,a=e.extend,r=e.isNumber,l=e.objectEach,h=e.pick,c=e.pInt,d=e.splat,p=t.addEvent,u=t.Axis;e=t.Chart;var f=t.css,g=t.createElement,m=t.defaultOptions,v=t.fireEvent,x=t.merge;a(m,{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"}}}),m.lang=x(m.lang,{rangeSelectorZoom:"Zoom",rangeSelectorFrom:"From",rangeSelectorTo:"To"}),i.prototype={clickButton:function(t,e){var i=this.chart,s=this.buttonOptions[t],o=i.xAxis[0],n=i.scroller&&i.scroller.getUnionExtremes()||o||{},a=n.dataMin,l=n.dataMax,c=o&&Math.round(Math.min(o.max,h(l,o.max))),f=s.type;n=s._range;var g,m=s.dataGrouping;if(null!==a&&null!==l){if(i.fixedRange=n,m&&(this.forcedDataGrouping=!0,u.prototype.setDataGrouping.call(o||{chart:this.chart},m,!1),this.frozenStates=s.preserveDataGrouping),"month"===f||"year"===f)if(o){f={range:s,max:c,chart:i,dataMin:a,dataMax:l};var v=o.minFromRange.call(f);r(f.newMax)&&(c=f.newMax)}else n=s;else if(n)v=Math.max(c-n,a),c=Math.min(v+n,l);else if("ytd"===f){if(!o)return void(this.deferredYTDClick=t);void 0===l&&(a=Number.MAX_VALUE,l=Number.MIN_VALUE,i.series.forEach(function(t){t=t.xData,a=Math.min(t[0],a),l=Math.max(t[t.length-1],l)}),e=!1),c=this.getYTDExtremes(l,a,i.time.useUTC),v=g=c.min,c=c.max}else"all"===f&&o&&(v=a,c=l);if(v+=s._offsetMin,c+=s._offsetMax,this.setSelected(t),o)o.setExtremes(v,c,h(e,1),null,{trigger:"rangeSelectorButton",rangeSelectorButton:s});else{var x=d(i.options.xAxis)[0],y=x.range;x.range=n;var b=x.min;x.min=g,p(i,"load",function(){x.range=y,x.min=b})}}},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,i=t.options.rangeSelector,s=i.buttons||[].concat(e.defaultButtons),o=i.selected,n=function(){var t=e.minInput,i=e.maxInput;t&&t.blur&&v(t,"blur"),i&&i.blur&&v(i,"blur")};e.chart=t,e.options=i,e.buttons=[],e.buttonOptions=s,this.unMouseDown=p(t.container,"mousedown",n),this.unResize=p(t,"resize",n),s.forEach(e.computeButtonRange),void 0!==o&&s[o]&&this.clickButton(o,!1),p(t,"load",function(){t.xAxis&&t.xAxis[0]&&p(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),o=!i.hasVisibleSeries,n=e.scroller&&e.scroller.getUnionExtremes()||i,a=n.dataMin,l=n.dataMax;e=t.getYTDExtremes(l,a,e.time.useUTC);var h=e.min,c=e.max,d=t.selected,p=r(d),u=t.options.allButtonsEnabled,f=t.buttons;t.buttonOptions.forEach(function(e,n){var r=e._range,g=e.type,m=e.count||1,v=f[n],x=0,y=e._offsetMax-e._offsetMin;e=n===d;var b=r>l-a,w=r<i.minRange,k=!1,M=!1;r=r===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?r=!0:"ytd"===g?(r=c-h+y===s,k=!e):"all"===g&&(r=i.max-i.min>=l-a,M=!e&&p&&r),g=!u&&(b||w||M||o),m=e&&r||r&&!p&&!k||e&&t.frozenStates,g?x=3:m&&(p=!0,x=2),v.state!==x&&(v.setState(x),0===x&&d===n&&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=h(t.offsetMin,0),t._offsetMax=h(t.offsetMax,0),t._range+=t._offsetMax-t._offsetMin},setInputValue:function(t,e){var i=this.chart.options.rangeSelector,o=this.chart.time,n=this[t+"Input"];s(e)&&(n.previousValue=n.HCTime,n.HCTime=e),n.value=o.dateFormat(i.inputEditDateFormat||"%Y-%m-%d",n.HCTime),this[t+"DateBox"].attr({text:o.dateFormat(i.inputDateFormat||"%b %e, %Y",n.HCTime)})},showInput:function(t){var e=this.inputGroup,i=this[t+"DateBox"];f(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){f(this[t+"Input"],{border:0,width:"1px",height:"1px"}),this.setInputValue(t)},drawInput:function(e){function i(){var t=s.value,e=(p.inputDateParser||Date.parse)(t),i=l.xAxis[0],o=l.scroller&&l.scroller.xAxis?l.scroller.xAxis:i,a=o.dataMin;o=o.dataMax,e!==s.previousValue&&(s.previousValue=e,r(e)||(e=t.split("-"),e=Date.UTC(c(e[0]),c(e[1])-1,c(e[2]))),r(e)&&(l.time.useUTC||(e+=6e4*(new Date).getTimezoneOffset()),v?e>n.maxInput.HCTime?e=void 0:e<a&&(e=a):e<n.minInput.HCTime?e=void 0:e>o&&(e=o),void 0!==e&&i.setExtremes(v?e:i.min,v?i.max:e,void 0,void 0,{trigger:"rangeSelectorInput"})))}var s,o,n=this,l=n.chart,h=l.renderer.style||{},d=l.renderer,p=l.options.rangeSelector,u=n.div,v="min"===e,y=this.inputGroup;this[e+"Label"]=o=d.label(m.lang[v?"rangeSelectorFrom":"rangeSelectorTo"],this.inputGroup.offset).addClass("highcharts-range-label").attr({padding:2}).add(y),y.offset+=o.width+5,this[e+"DateBox"]=d=d.label("",y.offset).addClass("highcharts-range-input").attr({padding:2,width:p.inputBoxWidth||90,height:p.inputBoxHeight||17,"text-align":"center"}).on("click",function(){n.showInput(e),n[e+"Input"].focus()}),l.styledMode||d.attr({stroke:p.inputBoxBorderColor||"#cccccc","stroke-width":1}),d.add(y),y.offset+=d.width+(v?10:0),this[e+"Input"]=s=g("input",{name:e,className:"highcharts-range-selector",type:"text"},{top:l.plotTop+"px"},u),l.styledMode||(o.css(x(h,p.labelStyle)),d.css(x({color:"#333333"},h,p.inputStyle)),f(s,a({position:"absolute",border:0,width:"1px",height:"1px",padding:0,textAlign:"center",fontSize:h.fontSize,fontFamily:h.fontFamily,top:"-9999em"},p.inputStyle))),s.onfocus=function(){n.showInput(e)},s.onblur=function(){s===t.doc.activeElement&&i(),n.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;return t="top"===e.verticalAlign?t.plotTop-t.axisOffset[0]:0,{buttonTop:t+e.buttonPosition.y,inputTop:t+e.inputPosition.y-10}},getYTDExtremes:function(t,e,i){var s=this.chart.time,o=new s.Date(t),n=s.get("FullYear",o);return i=i?s.Date.UTC(n,0,1):+new s.Date(n,0,1),e=Math.max(e||0,i),o=o.getTime(),{max:Math.min(t||o,o),min:e}},render:function(t,e){var i=this,s=i.chart,o=s.renderer,n=s.container,a=s.options,r=a.exporting&&!1!==a.exporting.enabled&&a.navigation&&a.navigation.buttonOptions,l=m.lang,c=i.div,d=a.rangeSelector,p=h(a.chart.style&&a.chart.style.zIndex,0)+1;a=d.floating;var u=i.buttons;c=i.inputGroup;var f,v=d.buttonTheme,x=d.buttonPosition,y=d.inputPosition,b=d.inputEnabled,w=v&&v.states,k=s.plotLeft,M=i.buttonGroup,S=i.rendered,T=i.options.verticalAlign,C=s.legend,A=C&&C.options,E=x.y,P=y.y,O=S||!1,L=O?"animate":"attr",D=0,_=0;if(!1!==d.enabled){S||(i.group=S=o.g("range-selector-group").attr({zIndex:7}).add(),i.buttonGroup=M=o.g("range-selector-buttons").add(S),i.zoomText=o.text(l.rangeSelectorZoom,0,15).add(M),s.styledMode||(i.zoomText.css(d.labelStyle),v["stroke-width"]=h(v["stroke-width"],0)),i.buttonOptions.forEach(function(t,e){u[e]=o.button(t.text,0,0,function(s){var o,n=t.events&&t.events.click;n&&(o=n.call(t,s)),!1!==o&&i.clickButton(e),i.isActive=!0},v,w&&w.hover,w&&w.select,w&&w.disabled).attr({"text-align":"center"}).add(M)}),!1!==b&&(i.div=c=g("div",null,{position:"relative",height:0,zIndex:p}),n.parentNode.insertBefore(c,n),i.inputGroup=c=o.g("input-group").add(S),c.offset=0,i.drawInput("min"),i.drawInput("max"))),i.zoomText[L]({x:h(k+x.x,k)});var I=h(k+x.x,k)+i.zoomText.getBBox().width+5;i.buttonOptions.forEach(function(t,e){u[e][L]({x:I}),I+=u[e].width+h(d.buttonSpacing,5)}),k=s.plotLeft-s.spacing[3],i.updateButtonStates(),r&&this.titleCollision(s)&&"top"===T&&"right"===x.align&&x.y+M.getBBox().height-12<(r.y||0)+r.height&&(D=-40),"left"===x.align?f=x.x-s.spacing[3]:"right"===x.align&&(f=x.x+D-s.spacing[1]),M.align({y:x.y,width:M.getBBox().width,align:x.align,x:f},!0,s.spacingBox),i.group.placed=O,i.buttonGroup.placed=O,!1!==b&&(D=r&&this.titleCollision(s)&&"top"===T&&"right"===y.align&&y.y-c.getBBox().height-12<(r.y||0)+r.height+s.spacing[0]?-40:0,"left"===y.align?f=k:"right"===y.align&&(f=-Math.max(s.axisOffset[1],-D)),c.align({y:y.y,width:c.getBBox().width,align:y.align,x:y.x+f-2},!0,s.spacingBox),n=c.alignAttr.translateX+c.alignOptions.x-D+c.getBBox().x+2,r=c.alignOptions.width,l=M.alignAttr.translateX+M.getBBox().x,f=M.getBBox().width+20,(y.align===x.align||l+f>n&&n+r>l&&E<P+c.getBBox().height)&&c.attr({translateX:c.alignAttr.translateX+(s.axisOffset[1]>=-D?0:-D),translateY:c.alignAttr.translateY+M.getBBox().height+10}),i.setInputValue("min",t),i.setInputValue("max",e),i.inputGroup.placed=O),i.group.align({verticalAlign:T},!0,s.spacingBox),t=i.group.getBBox().height+20,e=i.group.alignAttr.translateY,"bottom"===T&&(C=A&&"bottom"===A.verticalAlign&&A.enabled&&!A.floating?C.legendHeight+h(A.margin,10):0,t=t+C-20,_=e-t-(a?0:d.y)-(s.titleOffset?s.titleOffset[2]:0)-10),"top"===T?(a&&(_=0),s.titleOffset&&s.titleOffset[0]&&(_=s.titleOffset[0]),_+=s.margin[0]-s.spacing[0]||0):"middle"===T&&(P===E?_=0>P?e+void 0:e:(P||E)&&(_=0>P||0>E?_-Math.min(P,E):e-t+NaN)),i.group.translate(d.x,d.y+Math.floor(_)),!1!==b&&(i.minInput.style.marginTop=i.group.translateY+"px",i.maxInput.style.marginTop=i.group.translateY+"px"),i.rendered=!0}},getHeight:function(){var t=this.options,e=this.group,i=t.y,s=t.buttonPosition.y,o=t.inputPosition.y;return t.height?t.height:(t=e?e.getBBox(!0).height+13+i:0,e=Math.min(o,s),(0>o&&0>s||0<o&&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;x(!0,e.options.rangeSelector,t),this.destroy(),this.init(e),e.rangeSelector.render()},destroy:function(){var t=this,e=t.minInput,s=t.maxInput;t.unMouseDown(),t.unResize(),o(t.buttons),e&&(e.onfocus=e.onblur=e.onchange=null),s&&(s.onfocus=s.onblur=s.onchange=null),l(t,function(e,s){e&&"chart"!==s&&(e.destroy?e.destroy():e.nodeType&&n(this[s])),e!==i.prototype[s]&&(t[s]=null)},this)}},u.prototype.minFromRange=function(){var t=this.range,e={month:"Month",year:"FullYear"}[t.type],i=this.max,s=this.chart.time,o=function(t,i){var o=new s.Date(t),n=s.get(e,o);return s.set(e,o,n+i),n===s.get(e,o)&&s.set("Date",o,0),o.getTime()-t};if(r(t))var n=i-t,a=t;else n=i+o(i,-t.count),this.chart&&(this.chart.fixedRange=i-n);var l=h(this.dataMin,Number.MIN_VALUE);return r(n)||(n=l),n<=l&&(n=l,void 0===a&&(a=o(n,t.count)),this.newMax=Math.min(n+a,this.dataMax)),r(i)||(n=void 0),n},t.RangeSelector||(p(e,"afterGetContainer",function(){this.options.rangeSelector.enabled&&(this.rangeSelector=new i(this))}),p(e,"beforeRender",function(){var t=this.axes,e=this.rangeSelector;e&&(r(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)))}),p(e,"update",function(t){var e=t.options.rangeSelector;t=this.rangeSelector;var o=this.extraBottomMargin,n=this.extraTopMargin;e&&e.enabled&&!s(t)&&(this.options.rangeSelector.enabled=!0,this.rangeSelector=new i(this)),this.extraTopMargin=this.extraBottomMargin=!1,t&&(t.render(),e=e&&e.verticalAlign||t.options&&t.options.verticalAlign,t.options.floating||("bottom"===e?this.extraBottomMargin=!0:"middle"!==e&&(this.extraTopMargin=!0)),this.extraBottomMargin!==o||this.extraTopMargin!==n)&&(this.isDirtyBox=!0)}),p(e,"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))}),p(e,"getMargins",function(){var t=this.rangeSelector;t&&(t=t.getHeight(),this.extraTopMargin&&(this.plotTop+=t),this.extraBottomMargin&&(this.marginBottom+=t))}),e.prototype.callbacks.push(function(t){function e(){i=t.xAxis[0].getExtremes(),r(i.min)&&s.render(i.min,i.max)}var i,s=t.rangeSelector;if(s){var o=p(t.xAxis[0],"afterSetExtremes",function(t){s.render(t.min,t.max)}),n=p(t,"redraw",e);e()}p(t,"destroy",function(){s&&(n(),o())})}),t.RangeSelector=i)}),e(i,"parts/StockChart.js",[i["parts/Globals.js"],i["parts/Utilities.js"]],function(t,e){var i=e.arrayMax,s=e.arrayMin,o=e.defined,n=e.extend,a=e.isNumber,r=e.isString,l=e.pick,h=e.splat;e=t.addEvent;var c=t.Axis,d=t.Chart,p=t.format,u=t.merge,f=t.Point,g=t.Renderer,m=t.Series,v=t.SVGRenderer,x=t.VMLRenderer,y=m.prototype,b=y.init,w=y.processData,k=f.prototype.tooltipFormatter;t.StockChart=t.stockChart=function(e,i,s){var o,n=r(e)||e.nodeName,a=arguments[n?1:0],c=a,p=a.series,f=t.getOptions(),g=l(a.navigator&&a.navigator.enabled,f.navigator.enabled,!0),m=g?{startOnTick:!1,endOnTick:!1}:null;return a.xAxis=h(a.xAxis||{}).map(function(t,e){return u({minPadding:0,maxPadding:0,overscroll:0,ordinal:!0,title:{text:null},labels:{overflow:"justify"},showLastLabel:!0},f.xAxis,f.xAxis&&f.xAxis[e],t,{type:"datetime",categories:null},m)}),a.yAxis=h(a.yAxis||{}).map(function(t,e){return o=l(t.opposite,!0),u({labels:{y:-2},opposite:o,showLastLabel:!(!t.categories&&"category"!==t.type),title:{text:null}},f.yAxis,f.yAxis&&f.yAxis[e],t)}),a.series=null,a=u({chart:{panning:!0,pinchType:"x"},navigator:{enabled:g},scrollbar:{enabled:l(f.scrollbar.enabled,!0)},rangeSelector:{enabled:l(f.rangeSelector.enabled,!0)},title:{text:null},tooltip:{split:l(f.tooltip.split,!0),crosshairs:!0},legend:{enabled:!1}},a,{isStock:!0}),a.series=c.series=p,n?new d(e,a,s):new d(a,i)},e(m,"setOptions",function(e){function i(e){return t.seriesTypes[e]&&o instanceof t.seriesTypes[e]}var s,o=this;this.chart.options.isStock&&(i("column")||i("columnrange")?s={borderWidth:0,shadow:!1}:!i("line")||i("scatter")||i("sma")||(s={marker:{enabled:!1,radius:2}}),s&&(e.plotOptions[this.type]=u(e.plotOptions[this.type],s)))}),e(c,"autoLabelAlign",function(t){var e=this.chart,i=this.options;e=e._labelPanes=e._labelPanes||{};var 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(c,"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(c,"getPlotLinePath",function(e){var i,s,n,h,c=this,d=this.isLinked&&!this.series?this.linkedParent.series:this.series,p=c.chart,u=p.renderer,f=c.left,g=c.top,m=[],v=[],x=e.translatedValue,y=e.value,b=e.force;if(p.options.isStock&&!1!==e.acrossPanes&&"xAxis"===c.coll||"yAxis"===c.coll){e.preventDefault(),v=function(t){var e="xAxis"===t?"yAxis":"xAxis";return t=c.options[e],a(t)?[p[e][t]]:r(t)?[p.get(t)]:d.map(function(t){return t[e]})}(c.coll);(c.isXAxis?p.yAxis:p.xAxis).forEach(function(t){if(o(t.options.id)?-1===t.options.id.indexOf("navigator"):1){var e=t.isXAxis?"yAxis":"xAxis";e=o(t.options[e])?p[e][t.options[e]]:p[e][0],c===e&&v.push(t)}});var w=v.length?[]:[c.isXAxis?p.yAxis[0]:p.xAxis[0]];v.forEach(function(e){-1!==w.indexOf(e)||t.find(w,function(t){return t.pos===e.pos&&t.len===e.len})||w.push(e)});var k=l(x,c.translate(y,null,null,e.old));a(k)&&(c.horiz?w.forEach(function(t){var e;s=t.pos,h=s+t.len,i=n=Math.round(k+c.transB),"pass"!==b&&(i<f||i>f+c.width)&&(b?i=n=Math.min(Math.max(f,i),f+c.width):e=!0),e||m.push("M",i,s,"L",n,h)}):w.forEach(function(t){var e;i=t.pos,n=i+t.len,s=h=Math.round(g+c.height-k),"pass"!==b&&(s<g||s>g+c.height)&&(b?s=h=Math.min(Math.max(g,s),c.top+c.height):e=!0),e||m.push("M",i,s,"L",n,h)})),e.path=0<m.length?u.crispPolyLine(m,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},g===x&&(x.prototype.crispPolyLine=v.prototype.crispPolyLine),e(c,"afterHideCrosshair",function(){this.crossLabel&&(this.crossLabel=this.crossLabel.hide())}),e(c,"afterDrawCrosshair",function(t){var e,i;if(o(this.crosshair.label)&&this.crosshair.label.enabled&&this.cross){var s=this.chart,a=this.options.crosshair.label,r=this.horiz,h=this.opposite,c=this.left,d=this.top,u=this.crossLabel,f=a.format,g="",m="inside"===this.options.tickPosition,v=!1!==this.crosshair.snap,x=0,y=t.e||this.cross&&this.cross.e,b=t.point,w=this.lin2log;if(this.isLog){t=w(this.min);var k=w(this.max)}else t=this.min,k=this.max;w=r?"center":h?"right"===this.labelAlign?"right":"left":"left"===this.labelAlign?"left":"center",u||(u=this.crossLabel=s.renderer.label(null,null,null,a.shape||"callout").addClass("highcharts-crosshair-label"+(this.series[0]&&" highcharts-color-"+this.series[0].colorIndex)).attr({align:a.align||w,padding:l(a.padding,8),r:l(a.borderRadius,3),zIndex:2}).add(this.labelGroup),s.styledMode||u.attr({fill:a.backgroundColor||this.series[0]&&this.series[0].color||"#666666",stroke:a.borderColor||"","stroke-width":a.borderWidth||0}).css(n({color:"#ffffff",fontWeight:"normal",fontSize:"11px",textAlign:"center"},a.style))),r?(w=v?b.plotX+c:y.chartX,d+=h?0:this.height):(w=h?this.width+c:0,d=v?b.plotY+d:y.chartY),f||a.formatter||(this.isDatetimeAxis&&(g="%b %d, %Y"),f="{value"+(g?":"+g:"")+"}"),g=v?b[this.isXAxis?"x":"y"]:this.toValue(r?y.chartX:y.chartY),u.attr({text:f?p(f,{value:g},s.time):a.formatter.call(this,g),x:w,y:d,visibility:g<t||g>k?"hidden":"visible"}),a=u.getBBox(),r?(m&&!h||!m&&h)&&(d=u.y-a.height):d=u.y-a.height/2,r?(e=c-a.x,i=c+this.width-a.x):(e="left"===this.labelAlign?c:0,i="right"===this.labelAlign?c+this.width:s.chartWidth),u.translateX<e&&(x=e-u.translateX),u.translateX+a.width>=i&&(x=-(u.translateX+a.width-i)),u.attr({x:w+x,y:d,anchorX:r?w:this.opposite?0:s.chartWidth,anchorY:r?this.opposite?s.chartHeight:0:d+a.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;return void 0!==e&&void 0!==s?(e="value"===t?e-s:e/s*100-(100===this.options.compareBase?0:100),i&&(i.change=e),e):0}:null,this.userOptions.compare=t,this.chart.hasRendered&&(this.isDirty=!0)},y.processData=function(t){var e,i=-1,s=!0===this.options.compareStart?0:1;if(w.apply(this,arguments),this.xAxis&&this.processedYData){var o=this.processedXData,n=this.processedYData,r=n.length;for(this.pointArrayMap&&(i=this.pointArrayMap.indexOf(this.options.pointValKey||this.pointValKey||"y")),e=0;e<r-s;e++){var l=n[e]&&-1<i?n[e][i]:n[e];if(a(l)&&o[e+s]>=this.xAxis.min&&0!==l){this.compareValue=l;break}}}},e(m,"afterGetExtremes",function(){if(this.modifyValue){var t=[this.modifyValue(this.dataMin),this.modifyValue(this.dataMax)];this.dataMin=s(t),this.dataMax=i(t)}}),c.prototype.setCompare=function(t,e){this.isXAxis||(this.series.forEach(function(e){e.setCompare(t)}),l(e,!0)&&this.chart.redraw())},f.prototype.tooltipFormatter=function(e){return e=e.replace("{point.change}",(0<this.change?"+":"")+t.numberFormat(this.change,l(this.series.tooltipOptions.changeDecimals,2))),k.apply(this,[e])},e(m,"render",function(){var t=this.chart;if(!(t.is3d&&t.is3d()||t.polar)&&this.xAxis&&!this.xAxis.isRadial){var e=this.yAxis.len;if(this.xAxis.axisLine){var i=t.plotTop+t.plotHeight-this.yAxis.pos-this.yAxis.len,s=Math.floor(this.xAxis.axisLine.strokeWidth()/2);0<=i&&(e-=Math.max(s-i,0))}!this.clipBox&&this.animate?(this.clipBox=u(t.clipBox),this.clipBox.width=this.xAxis.len,this.clipBox.height=e):t[this.sharedClipKey]&&(t[this.sharedClipKey].animate({width:this.xAxis.len,height:e}),t[this.sharedClipKey+"m"]&&t[this.sharedClipKey+"m"].animate({width:this.xAxis.len}))}}),e(d,"update",function(t){"scrollbar"in(t=t.options)&&this.navigator&&(u(!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.product="Highstock",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),o=e(s),n=i(9),a=e(n),r=i(8),l=e(r),h=i(10),c=e(h);i(7),t(document).ready(function(){var t=!1,e=function(){var t=(0,o.default)("select.js-product-catalogs"),e=(0,o.default)("select.js-product-feeds"),i=(0,o.default)("#product_catalog_config_schedule-update_fb_product_catalog_name"),s=(0,o.default)("#product_catalog_config_schedule-update_fb_product_feed_name"),n=(0,o.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(o.default.map(t,function(t,e){return(0,o.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,o.default)(this).val();s.val((0,o.default)(this).find("option:selected").attr("data-name")),n.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(),o.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,o.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=o.default.merge([{id:"",name:""}],c.default.dropdown_data.get_product_catalog_ids);if(t.find("option").remove(),t.append(o.default.map(s,function(t,i){return(0,o.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,o.default)(this).find("option:selected").attr("data-name")),r()}),t.find("option:selected").length){var n=c.default.unsaved;t.trigger("change"),c.default.unsaved=n}}};c.default.dropdown_data.hasOwnProperty("get_product_catalog_ids")?s():function(){a.default.addLoader(t),o.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,o.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,o.default)(".js-google-category").each(function(){var t=(0,o.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,o.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),o.default.ajax({url:aepc_admin.ajax_url,method:"POST",data:{parents:i.find("input.js-google-category").map(function(){return(0,o.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,o.default)("input.multi-tags[data-tags]").each(function(){var t=(0,o.default)(this);t.select2({tags:function(){return t.data("tags")}})})},s=function s(){!t&&0!==(0,o.default)(l.default.fragments.product_feed_status).length&&(0,o.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(o){t=!1,i(),e(),s()}},!1)},3e3)};(0,o.default)(document).on("fragment_html_refreshed",function(){i(),s()}),(0,o.default)(document).on("click",".js-feed-delete",function(t){t.preventDefault();var e=(0,o.default)(this),i=(0,o.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")),o.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,o.default)(document).on("click",".js-feed-edit",function(t){t.preventDefault(),(0,o.default)(".js-edit-form").collapse("show")}),(0,o.default)(document).on("click",".js-product-feed-refresh",function(t){t.preventDefault();var e=(0,o.default)(this),n=(0,o.default)("#modal-confirm-refresh-product-feed"),r=e.data("feed-id");n.modal("show",e).one("click",".btn-ok",function(){n.modal("hide"),a.default.addLoader(e.closest(".panel")),a.default.removeAllMainMessages(),o.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,o.default)(l.default.fragments.product_feed_status),t),i(),s()},dataType:"json"})})}),(0,o.default)(document).on("click",".js-product-feed-save-interval",function(){var t=(0,o.default)(this),e=t.closest(".js-refresh-interval-option"),i=(0,o.default)("#product_catalog_config_refresh_cycle"),s=(0,o.default)("#product_catalog_config_refresh_cycle_type"),n=t.data("feed-id");a.default.addLoader(e),o.default.ajax({url:aepc_admin.ajax_url,method:"POST",data:{product_catalog_id:n,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,o.default)(document).on("click",".js-catalog-option",function(t){var e=(0,o.default)(this).closest("#automatic-facebook-options"),i=e.find(".panel"),s=(0,o.default)((0,o.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,o.default)('[data-schedule-option="'+(0,o.default)(this).data("dep")+'"]');(0,o.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(".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}]);
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(13),o=r.Symbol;t.exports=o},function(t,n,e){"use strict";var r=e(15),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(12),i=e(14),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(11),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(15),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(14),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, span.amount:last bdi").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(17);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(11),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(16),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(12),c=e(16),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(13),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(15),o=e(13),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(11),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(16),a=e(17);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(17);t.exports=r},function(t,n,e){"use strict";function r(t){return c(t)&&o(t)==i}var o=e(12),c=e(14),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/admin/assets/js/admin.js CHANGED
@@ -1180,4 +1180,19 @@ jQuery(document).ready(function(){
1180
  // Triggers change in all input fields including text type, must be run after all components init
1181
  Utils.alert_unsaved();
1182
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1183
  });
1180
  // Triggers change in all input fields including text type, must be run after all components init
1181
  Utils.alert_unsaved();
1182
 
1183
+ // Dismiss Two-Factor notice
1184
+ $( '.notice.tfa-notice' ).on( 'click', 'button.notice-dismiss', function(e) {
1185
+ e.preventDefault();
1186
+
1187
+ var _wpnonce = $(this).closest('.notice.tfa-notice').data('nonce');
1188
+
1189
+ var data = {
1190
+ 'action': 'dismiss_tfa_notice',
1191
+ _wpnonce
1192
+ };
1193
+ $.post(ajaxurl, data, function (response) {
1194
+ //callback
1195
+ });
1196
+ });
1197
+
1198
  });
includes/admin/assets/js/chart.js CHANGED
@@ -4,6 +4,7 @@
4
 
5
  import $ from 'jquery';
6
  import Highcharts from 'highcharts/highstock';
 
7
 
8
  jQuery(document).ready(function(){
9
  'use strict';
4
 
5
  import $ from 'jquery';
6
  import Highcharts from 'highcharts/highstock';
7
+ import Utils from './utils'
8
 
9
  jQuery(document).ready(function(){
10
  'use strict';
includes/admin/assets/js/common.js CHANGED
@@ -102,6 +102,15 @@ const Common = {
102
  form.find('div.advanced-data').collapse( checkbox.is(':checked') ? 'show' : 'hide' );
103
  }).trigger('change.components');
104
 
 
 
 
 
 
 
 
 
 
105
  // Toggle event parameters, depending by event select
106
  context.find('select#event_standard_events').on( 'change.components', function(){
107
  let select = $(this),
102
  form.find('div.advanced-data').collapse( checkbox.is(':checked') ? 'show' : 'hide' );
103
  }).trigger('change.components');
104
 
105
+ // Toggle advanced data box
106
+ context.find('.js-show-chunk-limit-option').on( 'change.components', function(){
107
+ let checkbox = $(this),
108
+ form = checkbox.closest('form');
109
+
110
+ // Show box
111
+ form.find('div.chunk-limit-option').collapse( checkbox.is(':checked') ? 'show' : 'hide' );
112
+ }).trigger('change.components');
113
+
114
  // Toggle event parameters, depending by event select
115
  context.find('select#event_standard_events').on( 'change.components', function(){
116
  let select = $(this),
includes/admin/class-aepc-admin-ajax.php CHANGED
@@ -389,26 +389,29 @@ class AEPC_Admin_Ajax {
389
 
390
  global $wpdb;
391
 
392
- $post_type_excluded = "'" . implode( "', '", apply_filters( 'aepc_list_custom_fields_post_type_excluded', array(
393
- 'attachment',
394
- 'nav_menu_item',
395
- 'revision'
396
- ) ) ) . "'";
397
-
398
- $meta_key_excluded = "'" . implode( "', '", apply_filters( 'aepc_list_meta_key_post_type_excluded', array(
399
- '_edit_last',
400
- '_edit_lock',
401
- '_featured',
402
- ) ) ) . "'";
403
-
404
- $keys = $wpdb->get_col( "
 
 
 
405
  SELECT meta_key
406
  FROM $wpdb->postmeta pm
407
  LEFT JOIN $wpdb->posts p ON p.ID = pm.post_id
408
- WHERE p.post_type NOT IN ( {$post_type_excluded} )
409
- AND pm.meta_key NOT IN ( {$meta_key_excluded} )
410
  GROUP BY meta_key
411
- ORDER BY meta_key" );
412
 
413
  // Format array with key and value as select2 wants
414
  foreach ( $keys as &$key ) {
389
 
390
  global $wpdb;
391
 
392
+ $post_type_excluded = apply_filters( 'aepc_list_custom_fields_post_type_excluded', [
393
+ 'attachment',
394
+ 'nav_menu_item',
395
+ 'revision'
396
+ ]);
397
+
398
+ $meta_key_excluded = apply_filters( 'aepc_list_meta_key_post_type_excluded', [
399
+ '_edit_last',
400
+ '_edit_lock',
401
+ '_featured'
402
+ ]);
403
+
404
+ $post_type_placeholders = implode( ', ', array_fill(0, count($post_type_excluded), '%s') );
405
+ $meta_key_placeholders = implode( ', ', array_fill(0, count($meta_key_excluded), '%s') );
406
+
407
+ $keys = $wpdb->get_col( $wpdb->prepare( "
408
  SELECT meta_key
409
  FROM $wpdb->postmeta pm
410
  LEFT JOIN $wpdb->posts p ON p.ID = pm.post_id
411
+ WHERE p.post_type NOT IN ( {$post_type_placeholders} )
412
+ AND pm.meta_key NOT IN ( {$meta_key_placeholders} )
413
  GROUP BY meta_key
414
+ ORDER BY meta_key", array_merge($post_type_excluded, $meta_key_excluded) ) );
415
 
416
  // Format array with key and value as select2 wants
417
  foreach ( $keys as &$key ) {
includes/admin/class-aepc-admin-install.php CHANGED
@@ -8,7 +8,7 @@ if ( ! defined( 'ABSPATH' ) ) {
8
  */
9
  class AEPC_Admin_Install {
10
 
11
- const AEPC_DB_VERSION = 201712271223;
12
 
13
  /**
14
  * AEPC_Admin_Install Constructor.
@@ -16,7 +16,7 @@ class AEPC_Admin_Install {
16
  public static function init() {
17
  if ( get_option( 'aepc_db_version' ) < self::AEPC_DB_VERSION ) {
18
  self::install();
19
- self::update();
20
 
21
  // Save version on database
22
  update_option( 'aepc_db_version', self::AEPC_DB_VERSION );
@@ -68,9 +68,6 @@ CREATE TABLE {$wpdb->prefix}aepc_logs (
68
 
69
  // Add capability
70
  self::add_role_capability();
71
-
72
- // Show warning for custom audiences created before a bug
73
- add_option( 'aepc_show_warning_ca_bug', (bool) $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->prefix}aepc_custom_audiences" ) );
74
  }
75
 
76
  public static function update() {
@@ -83,6 +80,7 @@ CREATE TABLE {$wpdb->prefix}aepc_logs (
83
  // Updates
84
  switch ( true ) {
85
  case $db_version <= 201707141506: self::update_2_0();
 
86
  }
87
  }
88
 
@@ -94,4 +92,10 @@ CREATE TABLE {$wpdb->prefix}aepc_logs (
94
  update_option( 'aepc_updated', '2.0' );
95
  }
96
 
 
 
 
 
 
 
97
  }
8
  */
9
  class AEPC_Admin_Install {
10
 
11
+ const AEPC_DB_VERSION = 202009141224;
12
 
13
  /**
14
  * AEPC_Admin_Install Constructor.
16
  public static function init() {
17
  if ( get_option( 'aepc_db_version' ) < self::AEPC_DB_VERSION ) {
18
  self::install();
19
+ add_action('admin_init', [__CLASS__, 'update']);
20
 
21
  // Save version on database
22
  update_option( 'aepc_db_version', self::AEPC_DB_VERSION );
68
 
69
  // Add capability
70
  self::add_role_capability();
 
 
 
71
  }
72
 
73
  public static function update() {
80
  // Updates
81
  switch ( true ) {
82
  case $db_version <= 201707141506: self::update_2_0();
83
+ case $db_version <= 202009161224: self::update_2_1_4();
84
  }
85
  }
86
 
92
  update_option( 'aepc_updated', '2.0' );
93
  }
94
 
95
+ public static function update_2_1_4() {
96
+ if (AEPC_Admin::$api->is_logged_in()) {
97
+ add_option( 'aepc_show_warning_two_factory_mandatory', 1 );
98
+ }
99
+ }
100
+
101
  }
includes/admin/class-aepc-admin-view.php CHANGED
@@ -267,7 +267,7 @@ class AEPC_Admin_View {
267
  }
268
 
269
  if ( isset( $_POST[ self::get_field_name( $option_id ) ] ) && $this->has_error( $option_id ) ) {
270
- $value = $_POST[ self::get_field_name( $option_id ) ];
271
 
272
  } else {
273
  $value = get_option( $option_id, $this->settings[ $option_id ]['default'] );
@@ -294,26 +294,36 @@ class AEPC_Admin_View {
294
  }
295
 
296
  if ( isset( $_POST[ $field ] ) ) {
297
- $value = $_POST[ $field ];
298
  } else {
299
  $value = 'no';
300
  }
301
 
302
  // If ca_rule, return a specific structure
303
  if ( 'ca_rule' == $field ) {
 
 
304
 
305
- if ( ! is_array( $value ) || empty( $value ) ) {
306
- $value = array();
307
- }
308
 
309
- foreach ( $value as $k => $v ) {
310
- if ( ! isset( $value[ $v['main_condition'] ] ) ) {
311
- $value[ $v['main_condition'] ] = array();
312
- }
 
 
 
 
 
313
 
314
- $value[ $v['main_condition'] ][] = $v;
315
- unset( $value[ $k ] );
 
316
  }
 
 
 
317
  }
318
 
319
  return $value;
@@ -1056,6 +1066,9 @@ class AEPC_Admin_View {
1056
  $value = isset( $value[ $subkey ] ) ? $value[ $subkey ] : null;
1057
  }
1058
  break;
 
 
 
1059
  }
1060
 
1061
  }
@@ -1076,6 +1089,9 @@ class AEPC_Admin_View {
1076
  $value = isset( $value[ $subkey ] ) ? $value[ $subkey ] : '';
1077
  }
1078
  break;
 
 
 
1079
  }
1080
 
1081
  }
267
  }
268
 
269
  if ( isset( $_POST[ self::get_field_name( $option_id ) ] ) && $this->has_error( $option_id ) ) {
270
+ $value = filter_input(INPUT_POST, $option_id);
271
 
272
  } else {
273
  $value = get_option( $option_id, $this->settings[ $option_id ]['default'] );
294
  }
295
 
296
  if ( isset( $_POST[ $field ] ) ) {
297
+ $value = filter_input( INPUT_POST, $field );
298
  } else {
299
  $value = 'no';
300
  }
301
 
302
  // If ca_rule, return a specific structure
303
  if ( 'ca_rule' == $field ) {
304
+ $value = $this->get_field_value_for_ca_rule( $value );
305
+ }
306
 
307
+ return $value;
308
+ }
 
309
 
310
+ /**
311
+ * @param $value
312
+ *
313
+ * @return array
314
+ */
315
+ public function get_field_value_for_ca_rule( $value ) {
316
+ if ( ! is_array( $value ) || empty( $value ) ) {
317
+ $value = array();
318
+ }
319
 
320
+ foreach ( $value as $k => $v ) {
321
+ if ( ! isset( $value[ $v['main_condition'] ] ) ) {
322
+ $value[ $v['main_condition'] ] = array();
323
  }
324
+
325
+ $value[ $v['main_condition'] ][] = $v;
326
+ unset( $value[ $k ] );
327
  }
328
 
329
  return $value;
1066
  $value = isset( $value[ $subkey ] ) ? $value[ $subkey ] : null;
1067
  }
1068
  break;
1069
+ default :
1070
+ $value = null;
1071
+ break;
1072
  }
1073
 
1074
  }
1089
  $value = isset( $value[ $subkey ] ) ? $value[ $subkey ] : '';
1090
  }
1091
  break;
1092
+ default :
1093
+ $value = null;
1094
+ break;
1095
  }
1096
 
1097
  }
includes/admin/class-aepc-admin.php CHANGED
@@ -60,6 +60,10 @@ class AEPC_Admin {
60
  add_filter( 'admin_body_class', array( __CLASS__, 'add_body_class' ), 99 );
61
  add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_assets' ) );
62
 
 
 
 
 
63
  // Define some hooks of background processing class
64
  self::$product_catalogs_service->setup();
65
  self::$logger->setup();
@@ -794,12 +798,40 @@ WHERE option_name LIKE %s
794
  * Clear the transients saved on db
795
  */
796
  public static function reset_fb_connection() {
797
- delete_option( 'aepc_fb_access_token' );
 
798
  delete_option( 'aepc_fb_access_expired' );
799
  delete_option( 'aepc_fb_uuid' );
800
- delete_transient( 'aepc_fb_user' );
801
 
802
  do_action( 'aepc_reset_fb_connection' );
803
  }
804
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
805
  }
60
  add_filter( 'admin_body_class', array( __CLASS__, 'add_body_class' ), 99 );
61
  add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_assets' ) );
62
 
63
+ // Add Two-Factor notice
64
+ add_action( 'admin_notices', array( __CLASS__, 'add_two_factory_notice' ) );
65
+ add_action( 'wp_ajax_dismiss_tfa_notice', array( __CLASS__, 'dismiss_tfa_notice' ) );
66
+
67
  // Define some hooks of background processing class
68
  self::$product_catalogs_service->setup();
69
  self::$logger->setup();
798
  * Clear the transients saved on db
799
  */
800
  public static function reset_fb_connection() {
801
+ self::$api->set_disconnected();
802
+
803
  delete_option( 'aepc_fb_access_expired' );
804
  delete_option( 'aepc_fb_uuid' );
 
805
 
806
  do_action( 'aepc_reset_fb_connection' );
807
  }
808
 
809
+ /**
810
+ * Add Two-Factor notice
811
+ */
812
+ public static function add_two_factory_notice() {
813
+ if ( ! get_option( 'aepc_show_warning_two_factory_mandatory' ) ) {
814
+ return;
815
+ }
816
+
817
+ $class = 'notice notice-error is-dismissible tfa-notice';
818
+ $message = sprintf(
819
+ __( '<strong>PIXEL CAFFEINE WARNING</strong>: By November 2nd, it will be mandatory to enable the Two-Factor Authentication in your Facebook account in order to connect to Facebook APIs. Please, be sure to %senable the TFA in your account%s in order to continue to use the Pixel Caffeine features.', 'pixel-caffeine' ),
820
+ '<a href="https://www.facebook.com/help/148233965247823" target="_blank">',
821
+ '</a>'
822
+ );
823
+
824
+ printf(
825
+ '<div class="%1$s" data-nonce="%3$s"><p>%2$s</p></div>',
826
+ esc_attr( $class ),
827
+ make_clickable( $message ),
828
+ wp_create_nonce('dismiss_tfa_notice' )
829
+ );
830
+ }
831
+
832
+ public static function dismiss_tfa_notice() {
833
+ check_ajax_referer('dismiss_tfa_notice');
834
+ delete_option('aepc_show_warning_two_factory_mandatory');
835
+ }
836
+
837
  }
includes/admin/class-aepc-facebook-adapter.php CHANGED
@@ -6,6 +6,7 @@ if ( ! defined( 'ABSPATH' ) ) {
6
  use Firebase\JWT\JWT;
7
  use PixelCaffeine\Admin\Exception\FBAPIException;
8
  use PixelCaffeine\Admin\Exception\FBAPILoginException;
 
9
  use Symfony\Component\Yaml\Yaml;
10
 
11
  /**
@@ -238,6 +239,12 @@ class AEPC_Facebook_Adapter {
238
  delete_option( 'aepc_fb_access_token' );
239
  update_option( 'aepc_fb_access_expired', 'expired' === $why );
240
  delete_transient( 'aepc_fb_user' );
 
 
 
 
 
 
241
  }
242
 
243
  /**
@@ -256,9 +263,6 @@ class AEPC_Facebook_Adapter {
256
 
257
  try {
258
  $this->set_disconnected();
259
- delete_option( 'aepc_account_id' );
260
- delete_option( 'aepc_pixel_id' );
261
- delete_option( 'aepc_business_id' );
262
 
263
  } catch( Exception $e ) {
264
  AEPC_Admin_Notices::add_notice( 'error', 'main', $e->getMessage() );
@@ -495,7 +499,16 @@ class AEPC_Facebook_Adapter {
495
  return;
496
  }
497
 
498
- $message = isset( $fb_errors[ $body->error->code ] ) ? $fb_errors[ $body->error->code ] : $general_error;
 
 
 
 
 
 
 
 
 
499
 
500
  // Debug information
501
  if ( PixelCaffeine()->is_debug_mode() ) {
@@ -658,12 +671,14 @@ class AEPC_Facebook_Adapter {
658
  /**
659
  * Get the business ID from User ID and Ad Account ID
660
  *
 
 
661
  * @return int
662
  */
663
- public function get_business_id_from_account_id() {
664
  $business_id = '';
665
 
666
- if ( ! ( $account_id = $this->get_account_id() ) || ! ( $user = $this->get_user() ) ) {
667
  return $business_id;
668
  }
669
 
@@ -700,7 +715,7 @@ class AEPC_Facebook_Adapter {
700
 
701
  $pixels = json_decode( wp_remote_retrieve_body( $response ) )->data;
702
 
703
- if ( $business_id = $this->get_business_id_from_account_id() ) {
704
  try {
705
  $response = $this->request('GET', '/' . $business_id . '/adspixels', [
706
  'fields' => 'id,name',
@@ -1303,27 +1318,8 @@ class AEPC_Facebook_Adapter {
1303
  * Generate the SITEID useful for fb request in UUIDv4
1304
  */
1305
  protected function generate_uuid() {
1306
- mt_srand( crc32( serialize( array( microtime( true ), $_SERVER['REMOTE_ADDR'] ) ) ) );
1307
-
1308
- return sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
1309
- // 32 bits for "time_low"
1310
- mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),
1311
-
1312
- // 16 bits for "time_mid"
1313
- mt_rand( 0, 0xffff ),
1314
-
1315
- // 16 bits for "time_hi_and_version",
1316
- // four most significant bits holds version number 4
1317
- mt_rand( 0, 0x0fff ) | 0x4000,
1318
-
1319
- // 16 bits, 8 bits for "clk_seq_hi_res",
1320
- // 8 bits for "clk_seq_low",
1321
- // two most significant bits holds zero and one for variant DCE1.1
1322
- mt_rand( 0, 0x3fff ) | 0x8000,
1323
-
1324
- // 48 bits for "node"
1325
- mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff )
1326
- );
1327
  }
1328
 
1329
  /**
6
  use Firebase\JWT\JWT;
7
  use PixelCaffeine\Admin\Exception\FBAPIException;
8
  use PixelCaffeine\Admin\Exception\FBAPILoginException;
9
+ use Ramsey\Uuid\Uuid;
10
  use Symfony\Component\Yaml\Yaml;
11
 
12
  /**
239
  delete_option( 'aepc_fb_access_token' );
240
  update_option( 'aepc_fb_access_expired', 'expired' === $why );
241
  delete_transient( 'aepc_fb_user' );
242
+
243
+ if ('logout' === $why) {
244
+ delete_option( 'aepc_account_id' );
245
+ delete_option( 'aepc_pixel_id' );
246
+ delete_option( 'aepc_business_id' );
247
+ }
248
  }
249
 
250
  /**
263
 
264
  try {
265
  $this->set_disconnected();
 
 
 
266
 
267
  } catch( Exception $e ) {
268
  AEPC_Admin_Notices::add_notice( 'error', 'main', $e->getMessage() );
499
  return;
500
  }
501
 
502
+ if ( ! empty( $body->error->error_user_msg ) ) {
503
+ $message = $body->error->error_user_msg;
504
+ if ( ! empty( $body->error->error_user_title ) ) {
505
+ $message = sprintf('<strong>%s</strong><br> %s', $body->error->error_user_title, $body->error->error_user_msg);
506
+ }
507
+ } elseif ( ! empty( $fb_errors[ $body->error->code ] ) ) {
508
+ $message = $fb_errors[ $body->error->code ];
509
+ } else {
510
+ $message = $general_error;
511
+ }
512
 
513
  // Debug information
514
  if ( PixelCaffeine()->is_debug_mode() ) {
671
  /**
672
  * Get the business ID from User ID and Ad Account ID
673
  *
674
+ * @param string $account_id
675
+ *
676
  * @return int
677
  */
678
+ public function get_business_id_from_account_id( $account_id = '' ) {
679
  $business_id = '';
680
 
681
+ if ( empty( $account_id ) && ( ! ( $account_id = $this->get_account_id() ) || ! ( $user = $this->get_user() ) ) ) {
682
  return $business_id;
683
  }
684
 
715
 
716
  $pixels = json_decode( wp_remote_retrieve_body( $response ) )->data;
717
 
718
+ if ( $business_id = $this->get_business_id_from_account_id( $account_id ) ) {
719
  try {
720
  $response = $this->request('GET', '/' . $business_id . '/adspixels', [
721
  'fields' => 'id,name',
1318
  * Generate the SITEID useful for fb request in UUIDv4
1319
  */
1320
  protected function generate_uuid() {
1321
+ $uuid = Uuid::uuid4();
1322
+ return $uuid->toString();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1323
  }
1324
 
1325
  /**
includes/admin/templates/conversions.php CHANGED
@@ -29,7 +29,7 @@ if ( ! defined( 'ABSPATH' ) ) {
29
  <?php $page->print_notices() ?>
30
  </div>
31
 
32
- <form method="post" id="mainform" data-toggle="ajax" action="<?php echo remove_query_arg( 'paged' ) ?>">
33
 
34
  <?php $page->get_template_part( 'tables/ce-tracking' ) ?>
35
 
@@ -41,7 +41,7 @@ if ( ! defined( 'ABSPATH' ) ) {
41
  </div>
42
  <div class="panel-footer">
43
  <button type="submit" href="#_" class="btn btn-raised btn-success btn-save btn-plugin"><?php _e( 'Create Tracking', 'pixel-caffeine' ) ?></button>
44
- <input type="hidden" name="tab" value="<?php echo $_GET['tab'] ?>" />
45
  <input type="hidden" name="action" value="aepc_save_tracking_conversion" />
46
  <?php wp_nonce_field( 'save_tracking_conversion' ) ?>
47
  </div>
29
  <?php $page->print_notices() ?>
30
  </div>
31
 
32
+ <form method="post" id="mainform" data-toggle="ajax" action="<?php echo esc_attr( remove_query_arg( 'paged' ) ) ?>">
33
 
34
  <?php $page->get_template_part( 'tables/ce-tracking' ) ?>
35
 
41
  </div>
42
  <div class="panel-footer">
43
  <button type="submit" href="#_" class="btn btn-raised btn-success btn-save btn-plugin"><?php _e( 'Create Tracking', 'pixel-caffeine' ) ?></button>
44
+ <input type="hidden" name="tab" value="<?php echo esc_attr( $_GET['tab'] ) ?>" />
45
  <input type="hidden" name="action" value="aepc_save_tracking_conversion" />
46
  <?php wp_nonce_field( 'save_tracking_conversion' ) ?>
47
  </div>
includes/admin/templates/custom-audiences.php CHANGED
@@ -36,7 +36,7 @@ $fb_disabled = ! $fb->is_debug() && ( ! $fb->is_logged_in() || $fb->is_expired()
36
 
37
  <?php $page->get_template_part( 'tables/ca-list', array( 'disabled' => $fb_disabled ) ) ?>
38
 
39
- <form method="post" id="mainform" data-toggle="ajax" action="<?php echo remove_query_arg( 'paged' ) ?>">
40
  <div class="panel panel-ca-new form-horizontal<?php echo $fb_disabled ? ' disabled-box' : '' ?>">
41
 
42
  <div class="panel-heading">
36
 
37
  <?php $page->get_template_part( 'tables/ca-list', array( 'disabled' => $fb_disabled ) ) ?>
38
 
39
+ <form method="post" id="mainform" data-toggle="ajax" action="<?php echo esc_attr( remove_query_arg( 'paged' ) ) ?>">
40
  <div class="panel panel-ca-new form-horizontal<?php echo $fb_disabled ? ' disabled-box' : '' ?>">
41
 
42
  <div class="panel-heading">
includes/admin/templates/dashboard.php CHANGED
@@ -44,7 +44,7 @@ if ( ! defined( 'ABSPATH' ) ) {
44
  <iframe width="560" height="315" src="https://www.youtube.com/embed/zFAszDll_1w?rel=0&amp;showinfo=0&amp;VQ=HD1080" frameborder="0" allowfullscreen></iframe>
45
  </div>
46
 
47
- <a href="<?php echo $page->get_view_url( 'tab=general-settings' ) ?>" class="btn btn-raised btn-success btn-config btn-block"><?php _e( 'Set up now!', 'pixel-caffeine' ) ?></a>
48
  </div>
49
  </div>
50
 
@@ -83,7 +83,7 @@ if ( ! defined( 'ABSPATH' ) ) {
83
  <div class="data-group">
84
  <span class="data"><?php _e( 'Conversion tracked', 'pixel-caffeine' ) ?></span>
85
  <div class="value">
86
- <a href="<?php echo $page->get_view_url( 'tab=conversions' ) ?>">
87
  <?php $page->conversions_count( __( '%d active tracking', 'pixel-caffeine' ), __( '%d active trackings', 'pixel-caffeine' ) ) ?>
88
  </a>
89
  </div>
@@ -96,7 +96,7 @@ if ( ! defined( 'ABSPATH' ) ) {
96
  </div>
97
  </div>
98
 
99
- <a class="btn btn-settings" href="<?php echo $page->get_view_url( 'tab=general-settings' ) ?>"><?php _e( 'Change settings', 'pixel-caffeine' ) ?></a>
100
  </div>
101
  </div><!-- ./panel-dashboard-main -->
102
 
44
  <iframe width="560" height="315" src="https://www.youtube.com/embed/zFAszDll_1w?rel=0&amp;showinfo=0&amp;VQ=HD1080" frameborder="0" allowfullscreen></iframe>
45
  </div>
46
 
47
+ <a href="<?php echo esc_attr( $page->get_view_url( 'tab=general-settings' ) ) ?>" class="btn btn-raised btn-success btn-config btn-block"><?php _e( 'Set up now!', 'pixel-caffeine' ) ?></a>
48
  </div>
49
  </div>
50
 
83
  <div class="data-group">
84
  <span class="data"><?php _e( 'Conversion tracked', 'pixel-caffeine' ) ?></span>
85
  <div class="value">
86
+ <a href="<?php echo esc_attr( $page->get_view_url( 'tab=conversions' ) ) ?>">
87
  <?php $page->conversions_count( __( '%d active tracking', 'pixel-caffeine' ), __( '%d active trackings', 'pixel-caffeine' ) ) ?>
88
  </a>
89
  </div>
96
  </div>
97
  </div>
98
 
99
+ <a class="btn btn-settings" href="<?php echo esc_attr( $page->get_view_url( 'tab=general-settings' ) ) ?>"><?php _e( 'Change settings', 'pixel-caffeine' ) ?></a>
100
  </div>
101
  </div><!-- ./panel-dashboard-main -->
102
 
includes/admin/templates/general-settings.php CHANGED
@@ -49,7 +49,7 @@ $highlight_fbpixel = isset( $_GET['ref'] ) && 'fblogin' == $_GET['ref'] && $fb->
49
  name="<?php $page->field_name( 'aepc_enable_ca_events' ) ?>"
50
  id="<?php $page->field_id( 'aepc_enable_ca_events' ) ?>"
51
  class="js-switch-labeled-tosave"
52
- data-original-value="<?php echo $page->get_value( 'aepc_enable_ca_events' ) ?>"
53
  <?php checked( $page->get_value( 'aepc_enable_ca_events' ), 'yes' ) ?>>
54
  </label>
55
  </div>
@@ -73,7 +73,7 @@ $highlight_fbpixel = isset( $_GET['ref'] ) && 'fblogin' == $_GET['ref'] && $fb->
73
  <input
74
  type="text"
75
  class="form-control multi-tags custom-fields"
76
- value="<?php echo $page->get_value( 'aepc_custom_fields_event' ) ?>"
77
  name="<?php $page->field_name( 'aepc_custom_fields_event' ) ?>"
78
  id="<?php $page->field_id( 'aepc_custom_fields_event' ) ?>" />
79
  </div>
@@ -180,7 +180,7 @@ $highlight_fbpixel = isset( $_GET['ref'] ) && 'fblogin' == $_GET['ref'] && $fb->
180
  name="<?php $page->field_name( 'aepc_enable_dpa' ) ?>"
181
  id="<?php $page->field_id( 'aepc_enable_dpa' ) ?>"
182
  class="js-switch-labeled-tosave"
183
- data-original-value="<?php echo $page->get_value( 'aepc_enable_dpa' ) ?>"
184
  <?php checked( $page->get_value( 'aepc_enable_dpa' ), 'yes' ) ?>>
185
  </label>
186
  </div>
@@ -337,7 +337,7 @@ $highlight_fbpixel = isset( $_GET['ref'] ) && 'fblogin' == $_GET['ref'] && $fb->
337
 
338
  <footer class="sec-footer">
339
  <button name="save" class="btn btn-raised btn-success btn-save btn-plugin" type="submit"><?php esc_html_e( 'Save', 'pixel-caffeine' ); ?></button>
340
- <input type="hidden" name="tab" value="<?php echo $_GET['tab'] ?>" />
341
  <?php wp_nonce_field( 'save_general_settings' ) ?>
342
  </footer>
343
  </form>
49
  name="<?php $page->field_name( 'aepc_enable_ca_events' ) ?>"
50
  id="<?php $page->field_id( 'aepc_enable_ca_events' ) ?>"
51
  class="js-switch-labeled-tosave"
52
+ data-original-value="<?php echo esc_attr( $page->get_value( 'aepc_enable_ca_events' ) ) ?>"
53
  <?php checked( $page->get_value( 'aepc_enable_ca_events' ), 'yes' ) ?>>
54
  </label>
55
  </div>
73
  <input
74
  type="text"
75
  class="form-control multi-tags custom-fields"
76
+ value="<?php echo esc_attr( $page->get_value( 'aepc_custom_fields_event' ) ) ?>"
77
  name="<?php $page->field_name( 'aepc_custom_fields_event' ) ?>"
78
  id="<?php $page->field_id( 'aepc_custom_fields_event' ) ?>" />
79
  </div>
180
  name="<?php $page->field_name( 'aepc_enable_dpa' ) ?>"
181
  id="<?php $page->field_id( 'aepc_enable_dpa' ) ?>"
182
  class="js-switch-labeled-tosave"
183
+ data-original-value="<?php echo esc_attr( $page->get_value( 'aepc_enable_dpa' ) ) ?>"
184
  <?php checked( $page->get_value( 'aepc_enable_dpa' ), 'yes' ) ?>>
185
  </label>
186
  </div>
337
 
338
  <footer class="sec-footer">
339
  <button name="save" class="btn btn-raised btn-success btn-save btn-plugin" type="submit"><?php esc_html_e( 'Save', 'pixel-caffeine' ); ?></button>
340
+ <input type="hidden" name="tab" value="<?php echo esc_attr( $_GET['tab'] ) ?>" />
341
  <?php wp_nonce_field( 'save_general_settings' ) ?>
342
  </footer>
343
  </form>
includes/admin/templates/parts/advanced-settings.php CHANGED
@@ -69,13 +69,13 @@ if ( ! defined( 'ABSPATH' ) ) {
69
  <div class="checkbox with-form-control">
70
  <label for="<?php $page->field_id( 'aepc_enable_pixel_delay' ) ?>">
71
  <?php printf( esc_html_x( 'Delay %2$sPageView%3$s pixel firing of %1$s seconds', '%1$s is an input text, the other strong tags', 'pixel-caffeine' ),
72
- '<input
73
  type="text"
74
  class="form-control inline-text"
75
  placeholder="' . esc_attr__( 'num', 'pixel-caffeine' ) . '"
76
- id="' . $page->get_field_id( 'aepc_general_delay_firing' ) . '"
77
- name="' . $page->get_field_name( 'aepc_general_delay_firing' ) . '"
78
- value="' . $page->get_value( 'aepc_general_delay_firing' ) . '">',
79
  '<strong>',
80
  '</strong>'
81
  ) ?>
@@ -95,13 +95,13 @@ if ( ! defined( 'ABSPATH' ) ) {
95
  <div class="checkbox with-form-control">
96
  <label for="<?php $page->field_id( 'aepc_enable_advanced_pixel_delay' ) ?>">
97
  <?php printf( esc_html_x( 'Delay %2$sAdvancedEvents%3$s and %2$sCustom Conversions%3$s pixels firing of %1$s seconds', '%1$s is an input text, the other strong tags', 'pixel-caffeine' ),
98
- '<input
99
  type="text"
100
  class="form-control inline-text"
101
  placeholder="' . esc_attr__( 'num', 'pixel-caffeine' ) . '"
102
- id="' . $page->get_field_id( 'aepc_advanced_pixel_delay_firing' ) . '"
103
- name="' . $page->get_field_name( 'aepc_advanced_pixel_delay_firing' ) . '"
104
- value="' . $page->get_value( 'aepc_advanced_pixel_delay_firing' ) . '">',
105
  '<strong>',
106
  '</strong>'
107
  ) ?>
@@ -175,13 +175,13 @@ if ( ! defined( 'ABSPATH' ) ) {
175
  <div class="checkbox with-form-control">
176
  <label for="<?php $page->field_id( 'aepc_no_pixel_when_logged_in' ) ?>">
177
  <?php printf( esc_html_x( 'Don\'t fire the pixels if the user is logged in as %1$s', '%1$s is an input text, the other strong tags', 'pixel-caffeine' ),
178
- '<input
179
  type="text"
180
  class="form-control inline-text multi-tags user-roles"
181
  placeholder="' . esc_attr__( 'role', 'pixel-caffeine' ) . '"
182
- id="' . $page->get_field_id( 'aepc_no_pixel_if_user_is' ) . '"
183
- name="' . $page->get_field_name( 'aepc_no_pixel_if_user_is' ) . '"
184
- value="' . $page->get_value( 'aepc_no_pixel_if_user_is' ) . '">',
185
  '<strong>',
186
  '</strong>'
187
  ) ?>
@@ -201,13 +201,13 @@ if ( ! defined( 'ABSPATH' ) ) {
201
  <div class="checkbox with-form-control">
202
  <label for="<?php $page->field_id( 'aepc_enable_no_value_parameter' ) ?>">
203
  <?php printf( esc_html_x( 'Don\'t track "value" when following events are fired: %1$s', '%1$s is an input text, the other strong tags', 'pixel-caffeine' ),
204
- '<input
205
  type="text"
206
  class="form-control inline-text multi-tags standard-events"
207
  placeholder="' . esc_attr__( 'event', 'pixel-caffeine' ) . '"
208
- id="' . $page->get_field_id( 'aepc_no_value_parameter' ) . '"
209
- name="' . $page->get_field_name( 'aepc_no_value_parameter' ) . '"
210
- value="' . $page->get_value( 'aepc_no_value_parameter' ) . '">',
211
  '<strong>',
212
  '</strong>'
213
  ) ?>
@@ -227,13 +227,13 @@ if ( ! defined( 'ABSPATH' ) ) {
227
  <div class="checkbox with-form-control">
228
  <label for="<?php $page->field_id( 'aepc_enable_no_content_parameters' ) ?>">
229
  <?php printf( esc_html_x( 'Don\'t track "content_ids", "content_type" and "content_name" when following events are fired: %1$s', '%1$s is an input text, the other strong tags', 'pixel-caffeine' ),
230
- '<input
231
  type="text"
232
  class="form-control inline-text multi-tags standard-events"
233
  placeholder="' . esc_attr__( 'event', 'pixel-caffeine' ) . '"
234
- id="' . $page->get_field_id( 'aepc_no_content_parameters' ) . '"
235
- name="' . $page->get_field_name( 'aepc_no_content_parameters' ) . '"
236
- value="' . $page->get_value( 'aepc_no_content_parameters' ) . '">',
237
  '<strong>',
238
  '</strong>'
239
  ) ?>
69
  <div class="checkbox with-form-control">
70
  <label for="<?php $page->field_id( 'aepc_enable_pixel_delay' ) ?>">
71
  <?php printf( esc_html_x( 'Delay %2$sPageView%3$s pixel firing of %1$s seconds', '%1$s is an input text, the other strong tags', 'pixel-caffeine' ),
72
+ '<input
73
  type="text"
74
  class="form-control inline-text"
75
  placeholder="' . esc_attr__( 'num', 'pixel-caffeine' ) . '"
76
+ id="' . esc_attr( $page->get_field_id( 'aepc_general_delay_firing' ) ) . '"
77
+ name="' . esc_attr( $page->get_field_name( 'aepc_general_delay_firing' ) ) . '"
78
+ value="' . esc_attr( $page->get_value( 'aepc_general_delay_firing' ) ) . '">',
79
  '<strong>',
80
  '</strong>'
81
  ) ?>
95
  <div class="checkbox with-form-control">
96
  <label for="<?php $page->field_id( 'aepc_enable_advanced_pixel_delay' ) ?>">
97
  <?php printf( esc_html_x( 'Delay %2$sAdvancedEvents%3$s and %2$sCustom Conversions%3$s pixels firing of %1$s seconds', '%1$s is an input text, the other strong tags', 'pixel-caffeine' ),
98
+ '<input
99
  type="text"
100
  class="form-control inline-text"
101
  placeholder="' . esc_attr__( 'num', 'pixel-caffeine' ) . '"
102
+ id="' . esc_attr( $page->get_field_id( 'aepc_advanced_pixel_delay_firing' ) ) . '"
103
+ name="' . esc_attr( $page->get_field_name( 'aepc_advanced_pixel_delay_firing' ) ) . '"
104
+ value="' . esc_attr( $page->get_value( 'aepc_advanced_pixel_delay_firing' ) ) . '">',
105
  '<strong>',
106
  '</strong>'
107
  ) ?>
175
  <div class="checkbox with-form-control">
176
  <label for="<?php $page->field_id( 'aepc_no_pixel_when_logged_in' ) ?>">
177
  <?php printf( esc_html_x( 'Don\'t fire the pixels if the user is logged in as %1$s', '%1$s is an input text, the other strong tags', 'pixel-caffeine' ),
178
+ '<input
179
  type="text"
180
  class="form-control inline-text multi-tags user-roles"
181
  placeholder="' . esc_attr__( 'role', 'pixel-caffeine' ) . '"
182
+ id="' . esc_attr( $page->get_field_id( 'aepc_no_pixel_if_user_is' ) ) . '"
183
+ name="' . esc_attr( $page->get_field_name( 'aepc_no_pixel_if_user_is' ) ) . '"
184
+ value="' . esc_attr( $page->get_value( 'aepc_no_pixel_if_user_is' ) ) . '">',
185
  '<strong>',
186
  '</strong>'
187
  ) ?>
201
  <div class="checkbox with-form-control">
202
  <label for="<?php $page->field_id( 'aepc_enable_no_value_parameter' ) ?>">
203
  <?php printf( esc_html_x( 'Don\'t track "value" when following events are fired: %1$s', '%1$s is an input text, the other strong tags', 'pixel-caffeine' ),
204
+ '<input
205
  type="text"
206
  class="form-control inline-text multi-tags standard-events"
207
  placeholder="' . esc_attr__( 'event', 'pixel-caffeine' ) . '"
208
+ id="' . esc_attr( $page->get_field_id( 'aepc_no_value_parameter' ) ) . '"
209
+ name="' . esc_attr( $page->get_field_name( 'aepc_no_value_parameter' ) ) . '"
210
+ value="' . esc_attr( $page->get_value( 'aepc_no_value_parameter' ) ) . '">',
211
  '<strong>',
212
  '</strong>'
213
  ) ?>
227
  <div class="checkbox with-form-control">
228
  <label for="<?php $page->field_id( 'aepc_enable_no_content_parameters' ) ?>">
229
  <?php printf( esc_html_x( 'Don\'t track "content_ids", "content_type" and "content_name" when following events are fired: %1$s', '%1$s is an input text, the other strong tags', 'pixel-caffeine' ),
230
+ '<input
231
  type="text"
232
  class="form-control inline-text multi-tags standard-events"
233
  placeholder="' . esc_attr__( 'event', 'pixel-caffeine' ) . '"
234
+ id="' . esc_attr( $page->get_field_id( 'aepc_no_content_parameters' ) ) . '"
235
+ name="' . esc_attr( $page->get_field_name( 'aepc_no_content_parameters' ) ) . '"
236
+ value="' . esc_attr( $page->get_value( 'aepc_no_content_parameters' ) ) . '">',
237
  '<strong>',
238
  '</strong>'
239
  ) ?>
includes/admin/templates/parts/fb-connect-logged-out.php CHANGED
@@ -22,6 +22,13 @@ if ( ! defined( 'ABSPATH' ) ) {
22
  </h3>
23
  </div>
24
  <p class="text"><?php _e( 'The easiest whay to get up and running with all the advanced features. Connect your Facebook account and you\'re good to go!', 'pixel-caffeine' ) ?></p>
 
 
 
 
 
 
 
25
 
26
  <a href="<?php echo esc_url( $fb->get_login_url() ) ?>" class="btn btn-primary btn-raised btn-fb-connect btn-block">
27
  <?php _e( 'Facebook Connect', 'pixel-caffeine' ) ?>
22
  </h3>
23
  </div>
24
  <p class="text"><?php _e( 'The easiest whay to get up and running with all the advanced features. Connect your Facebook account and you\'re good to go!', 'pixel-caffeine' ) ?></p>
25
+ <div class="alert alert-lite alert-warning">
26
+ <?php printf(
27
+ __( '<strong>Warning: </strong> You must have the Two-factor Authentication %senabled in your Facebook Account%s!', 'pixel-caffeine' ),
28
+ '<a href="https://www.facebook.com/help/148233965247823" target="_blank">',
29
+ '</a>'
30
+ ) ?>
31
+ </div>
32
 
33
  <a href="<?php echo esc_url( $fb->get_login_url() ) ?>" class="btn btn-primary btn-raised btn-fb-connect btn-block">
34
  <?php _e( 'Facebook Connect', 'pixel-caffeine' ) ?>
includes/admin/templates/parts/forms/custom-audience.php CHANGED
@@ -23,7 +23,7 @@ if ( ! defined( 'ABSPATH' ) ) {
23
  name="ca_name"
24
  id="ca_name"
25
  placeholder="<?php _e( 'Name of your new custom audience', 'pixel-caffeine' ) ?>"
26
- value="<?php echo 'edit' == $action ? '{{{ data.name }}}' : $page->get_field_value( 'ca_name', '' ) ?>">
27
 
28
  <div class="field-helper">
29
  <?php $page->print_field_error( 'ca_name', '<span class="help-block help-block-error">', '</span>' ) ?>
@@ -39,7 +39,7 @@ if ( ! defined( 'ABSPATH' ) ) {
39
  name="ca_description"
40
  id="ca_description"
41
  placeholder="<?php _e( 'Description of your new custom audience', 'pixel-caffeine' ) ?>"
42
- value="<?php echo 'edit' == $action ? '{{{ data.description }}}' : $page->get_field_value( 'ca_description', '' ) ?>">
43
 
44
  <div class="field-helper">
45
  <?php $page->print_field_error( 'ca_description', '<span class="help-block help-block-error">', '</span>' ) ?>
@@ -58,7 +58,7 @@ if ( ! defined( 'ABSPATH' ) ) {
58
  name="ca_prefill"
59
  id="ca_prefill"
60
  class="js-switch-labeled-tosave"
61
- data-original-value="<?php echo $page->get_field_value( 'ca_prefill', 'yes' ) ?>"
62
  value="yes"
63
  <?php checked( $page->get_field_value( 'ca_prefill', 'yes' ), 'yes' ); ?>>
64
  </label>
@@ -86,7 +86,7 @@ if ( ! defined( 'ABSPATH' ) ) {
86
  name="ca_retention"
87
  id="ca_retention"
88
  placeholder="<?php _e( 'Num', 'pixel-caffeine' ) ?>"
89
- value="<?php echo 'edit' == $action ? '{{{ data.retention }}}' : $page->get_field_value( 'ca_retention', '' ) ?>">
90
  <span class="text"><?php _e( 'days', 'pixel-caffeine' ) ?></span>
91
  <div class="field-helper">
92
  <?php $page->print_field_error( 'ca_retention', '<span class="help-block help-block-error">', '</span>' ) ?>
@@ -109,7 +109,7 @@ if ( ! defined( 'ABSPATH' ) ) {
109
  class="form-control multi-tags"
110
  name="ca_include_url"
111
  id="ca_include_url"
112
- value="<?php echo 'edit' == $action ? '{{{ data.include_url }}}' : $page->get_field_value( 'ca_include_url', '' ) ?>" />
113
  </div>
114
  <div class="field-helper">
115
  <?php $page->print_field_error( 'ca_include_url', '<span class="help-block help-block-error">', '</span>' ) ?>
@@ -132,7 +132,7 @@ if ( ! defined( 'ABSPATH' ) ) {
132
  class="form-control multi-tags"
133
  name="ca_exclude_url"
134
  id="ca_exclude_url"
135
- value="<?php echo 'edit' == $action ? '{{{ data.exclude_url }}}' : $page->get_field_value( 'ca_exclude_url', '' ) ?>" />
136
  </div>
137
  <div class="field-helper">
138
  <?php $page->print_field_error( 'ca_exclude_url', '<span class="help-block help-block-error">', '</span>' ) ?>
@@ -167,21 +167,21 @@ if ( ! defined( 'ABSPATH' ) ) {
167
 
168
  $tmp_ca = new AEPC_Admin_CA();
169
  ?>
170
- <li data-filter-id="<?php echo $index ?>">
171
  <?php if ( $index > 0 ) : ?>
172
  <strong class="filter-and"><?php esc_html_e( 'and', 'pixel-caffeine' ) ?></strong>
173
  <?php endif; ?>
174
  <div class="label"><?php echo $tmp_ca->get_human_filter( $filter, '<em>', '</em>' ); ?></div>
175
  <div class="hide hidden-fields">
176
- <input type="hidden" name="ca_rule[<?php echo $index ?>][main_condition]" value="<?php echo esc_attr( $filter['main_condition'] ) ?>">
177
- <input type="hidden" name="ca_rule[<?php echo $index ?>][event_type]" value="<?php echo esc_attr( $filter['event_type'] ) ?>">
178
- <input type="hidden" name="ca_rule[<?php echo $index ?>][event]" value="<?php echo esc_attr( $filter['event'] ) ?>">
179
  <?php foreach ( $filter['conditions'] as $c_index => $condition ) : ?>
180
  <?php if ( ! empty( $condition['key'] ) ) : ?>
181
- <input type="hidden" name="ca_rule[<?php echo $index ?>][conditions][<?php echo esc_attr( $c_index ) ?>][key]" value="<?php echo esc_attr( $condition['key'] ) ?>">
182
  <?php endif; ?>
183
- <input type="hidden" name="ca_rule[<?php echo $index ?>][conditions][<?php echo esc_attr( $c_index ) ?>][operator]" value="<?php echo esc_attr( $condition['operator'] ) ?>">
184
- <input type="hidden" name="ca_rule[<?php echo $index ?>][conditions][<?php echo esc_attr( $c_index ) ?>][value]" value="<?php echo esc_attr( $condition['value'] ) ?>">
185
  <?php endforeach; ?>
186
  </div>
187
  <div class="actions">
23
  name="ca_name"
24
  id="ca_name"
25
  placeholder="<?php _e( 'Name of your new custom audience', 'pixel-caffeine' ) ?>"
26
+ value="<?php echo esc_attr( 'edit' == $action ? '{{{ data.name }}}' : $page->get_field_value( 'ca_name', '' ) ) ?>">
27
 
28
  <div class="field-helper">
29
  <?php $page->print_field_error( 'ca_name', '<span class="help-block help-block-error">', '</span>' ) ?>
39
  name="ca_description"
40
  id="ca_description"
41
  placeholder="<?php _e( 'Description of your new custom audience', 'pixel-caffeine' ) ?>"
42
+ value="<?php echo esc_attr( 'edit' == $action ? '{{{ data.description }}}' : $page->get_field_value( 'ca_description', '' ) ) ?>">
43
 
44
  <div class="field-helper">
45
  <?php $page->print_field_error( 'ca_description', '<span class="help-block help-block-error">', '</span>' ) ?>
58
  name="ca_prefill"
59
  id="ca_prefill"
60
  class="js-switch-labeled-tosave"
61
+ data-original-value="<?php echo esc_attr( $page->get_field_value( 'ca_prefill', 'yes' ) ) ?>"
62
  value="yes"
63
  <?php checked( $page->get_field_value( 'ca_prefill', 'yes' ), 'yes' ); ?>>
64
  </label>
86
  name="ca_retention"
87
  id="ca_retention"
88
  placeholder="<?php _e( 'Num', 'pixel-caffeine' ) ?>"
89
+ value="<?php echo esc_attr( 'edit' == $action ? '{{{ data.retention }}}' : $page->get_field_value( 'ca_retention', '' ) ) ?>">
90
  <span class="text"><?php _e( 'days', 'pixel-caffeine' ) ?></span>
91
  <div class="field-helper">
92
  <?php $page->print_field_error( 'ca_retention', '<span class="help-block help-block-error">', '</span>' ) ?>
109
  class="form-control multi-tags"
110
  name="ca_include_url"
111
  id="ca_include_url"
112
+ value="<?php echo esc_attr( 'edit' == $action ? '{{{ data.include_url }}}' : $page->get_field_value( 'ca_include_url', '' ) ) ?>" />
113
  </div>
114
  <div class="field-helper">
115
  <?php $page->print_field_error( 'ca_include_url', '<span class="help-block help-block-error">', '</span>' ) ?>
132
  class="form-control multi-tags"
133
  name="ca_exclude_url"
134
  id="ca_exclude_url"
135
+ value="<?php echo esc_attr( 'edit' == $action ? '{{{ data.exclude_url }}}' : $page->get_field_value( 'ca_exclude_url', '' ) ) ?>" />
136
  </div>
137
  <div class="field-helper">
138
  <?php $page->print_field_error( 'ca_exclude_url', '<span class="help-block help-block-error">', '</span>' ) ?>
167
 
168
  $tmp_ca = new AEPC_Admin_CA();
169
  ?>
170
+ <li data-filter-id="<?php echo esc_attr($index) ?>">
171
  <?php if ( $index > 0 ) : ?>
172
  <strong class="filter-and"><?php esc_html_e( 'and', 'pixel-caffeine' ) ?></strong>
173
  <?php endif; ?>
174
  <div class="label"><?php echo $tmp_ca->get_human_filter( $filter, '<em>', '</em>' ); ?></div>
175
  <div class="hide hidden-fields">
176
+ <input type="hidden" name="ca_rule[<?php echo esc_attr($index) ?>][main_condition]" value="<?php echo esc_attr( $filter['main_condition'] ) ?>">
177
+ <input type="hidden" name="ca_rule[<?php echo esc_attr($index) ?>][event_type]" value="<?php echo esc_attr( $filter['event_type'] ) ?>">
178
+ <input type="hidden" name="ca_rule[<?php echo esc_attr($index) ?>][event]" value="<?php echo esc_attr( $filter['event'] ) ?>">
179
  <?php foreach ( $filter['conditions'] as $c_index => $condition ) : ?>
180
  <?php if ( ! empty( $condition['key'] ) ) : ?>
181
+ <input type="hidden" name="ca_rule[<?php echo esc_attr($index) ?>][conditions][<?php echo esc_attr( $c_index ) ?>][key]" value="<?php echo esc_attr( $condition['key'] ) ?>">
182
  <?php endif; ?>
183
+ <input type="hidden" name="ca_rule[<?php echo esc_attr($index) ?>][conditions][<?php echo esc_attr( $c_index ) ?>][operator]" value="<?php echo esc_attr( $condition['operator'] ) ?>">
184
+ <input type="hidden" name="ca_rule[<?php echo esc_attr($index) ?>][conditions][<?php echo esc_attr( $c_index ) ?>][value]" value="<?php echo esc_attr( $condition['value'] ) ?>">
185
  <?php endforeach; ?>
186
  </div>
187
  <div class="actions">
includes/admin/templates/parts/forms/product-catalog.php CHANGED
@@ -353,6 +353,7 @@ foreach ( $selected_addons as $k => $sa ) {
353
  <label>
354
  <input
355
  type="checkbox"
 
356
  name="<?php $page->feed_field_name( Configuration::OPTION_FEED_CONFIG, Configuration::OPTION_ENABLE_BACKGROUND_SAVE ) ?>"
357
  id="<?php $page->feed_field_id( Configuration::OPTION_FEED_CONFIG, Configuration::OPTION_ENABLE_BACKGROUND_SAVE ) ?>"
358
  value="yes"
@@ -369,6 +370,24 @@ foreach ( $selected_addons as $k => $sa ) {
369
  </div>
370
  </div>
371
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
372
  <div id="<?php $page->feed_field_id( Configuration::OPTION_FEED_CONFIG, Configuration::OPTION_SKU_FOR_ID ) ?>" class="form-group is-empty">
373
  <label for="<?php $page->feed_field_name( Configuration::OPTION_FEED_CONFIG, Configuration::OPTION_SKU_FOR_ID ) ?>" class="control-label">
374
  <?php _e( 'Use SKU', 'pixel-caffeine' ) ?>
353
  <label>
354
  <input
355
  type="checkbox"
356
+ class="js-show-chunk-limit-option"
357
  name="<?php $page->feed_field_name( Configuration::OPTION_FEED_CONFIG, Configuration::OPTION_ENABLE_BACKGROUND_SAVE ) ?>"
358
  id="<?php $page->feed_field_id( Configuration::OPTION_FEED_CONFIG, Configuration::OPTION_ENABLE_BACKGROUND_SAVE ) ?>"
359
  value="yes"
370
  </div>
371
  </div>
372
 
373
+ <div id="<?php $page->feed_field_id( Configuration::OPTION_FEED_CONFIG, Configuration::OPTION_CHUNK_LIMIT ) ?>" class="form-group chunk-limit-option is-empty collapse">
374
+ <label for="<?php $page->feed_field_name( Configuration::OPTION_FEED_CONFIG, Configuration::OPTION_CHUNK_LIMIT ) ?>" class="control-label">
375
+ <?php _e( 'Chunk limit', 'pixel-caffeine' ) ?>
376
+ </label>
377
+ <div class="control-wrap">
378
+ <input
379
+ type="number"
380
+ class="form-control"
381
+ name="<?php $page->feed_field_name( Configuration::OPTION_FEED_CONFIG, Configuration::OPTION_CHUNK_LIMIT ) ?>"
382
+ id="<?php $page->feed_field_id( Configuration::OPTION_FEED_CONFIG, Configuration::OPTION_CHUNK_LIMIT ) ?>"
383
+ value="<?php $page->feed_field_value( $product_catalog, Configuration::OPTION_FEED_CONFIG, Configuration::OPTION_CHUNK_LIMIT ) ?>"
384
+ />
385
+ <div class="field-helper">
386
+ <small class="text"><?php _e('When using the background saving, the list of products to save are divided in more chunks in multiple processes, in order to perform the saving progressively with less items for each process, depending on the power of your server. Decrease this number if the feed saving can\'t be completed properly.') ?></small>
387
+ </div>
388
+ </div>
389
+ </div>
390
+
391
  <div id="<?php $page->feed_field_id( Configuration::OPTION_FEED_CONFIG, Configuration::OPTION_SKU_FOR_ID ) ?>" class="form-group is-empty">
392
  <label for="<?php $page->feed_field_name( Configuration::OPTION_FEED_CONFIG, Configuration::OPTION_SKU_FOR_ID ) ?>" class="control-label">
393
  <?php _e( 'Use SKU', 'pixel-caffeine' ) ?>
includes/admin/templates/parts/forms/sub/schedule.php CHANGED
@@ -61,7 +61,7 @@ if ( ! empty( $product_feed_id ) && 'new' !== $product_feed_id && defined('DOING
61
  type="radio"
62
  name="<?php $page->feed_field_name( Configuration::OPTION_FEED_CONFIG, $group, Configuration::OPTION_FB_PRODUCT_FEED_SCHEDULE_INTERVAL ) ?>"
63
  id="<?php $page->feed_field_id( Configuration::OPTION_FEED_CONFIG, $group, Configuration::OPTION_FB_PRODUCT_FEED_SCHEDULE_INTERVAL ) ?>"
64
- value="<?php echo \AEPC_Facebook_Adapter::FEED_SCHEDULE_INTERVAL_DAILY ?>"
65
  data-toggle="schedule-interval"
66
  <?php checked( \AEPC_Facebook_Adapter::FEED_SCHEDULE_INTERVAL_DAILY, $interval ) ?>
67
  ><?php _e( 'Daily', 'pixel-caffeine' ) ?>
@@ -74,7 +74,7 @@ if ( ! empty( $product_feed_id ) && 'new' !== $product_feed_id && defined('DOING
74
  type="radio"
75
  name="<?php $page->feed_field_name( Configuration::OPTION_FEED_CONFIG, $group, Configuration::OPTION_FB_PRODUCT_FEED_SCHEDULE_INTERVAL ) ?>"
76
  id="<?php $page->feed_field_id( Configuration::OPTION_FEED_CONFIG, $group, Configuration::OPTION_FB_PRODUCT_FEED_SCHEDULE_INTERVAL ) ?>"
77
- value="<?php echo \AEPC_Facebook_Adapter::FEED_SCHEDULE_INTERVAL_HOURLY ?>"
78
  data-toggle="schedule-interval"
79
  data-dep="hourly"
80
  <?php checked( \AEPC_Facebook_Adapter::FEED_SCHEDULE_INTERVAL_HOURLY, $interval ) ?>
@@ -88,7 +88,7 @@ if ( ! empty( $product_feed_id ) && 'new' !== $product_feed_id && defined('DOING
88
  type="radio"
89
  name="<?php $page->feed_field_name( Configuration::OPTION_FEED_CONFIG, $group, Configuration::OPTION_FB_PRODUCT_FEED_SCHEDULE_INTERVAL ) ?>"
90
  id="<?php $page->feed_field_id( Configuration::OPTION_FEED_CONFIG, $group, Configuration::OPTION_FB_PRODUCT_FEED_SCHEDULE_INTERVAL ) ?>"
91
- value="<?php echo \AEPC_Facebook_Adapter::FEED_SCHEDULE_INTERVAL_WEEKLY ?>"
92
  data-toggle="schedule-interval"
93
  data-dep="weekly"
94
  <?php checked( \AEPC_Facebook_Adapter::FEED_SCHEDULE_INTERVAL_WEEKLY, $interval ) ?>
@@ -111,7 +111,7 @@ if ( ! empty( $product_feed_id ) && 'new' !== $product_feed_id && defined('DOING
111
  name="<?php $page->feed_field_name( Configuration::OPTION_FEED_CONFIG, $group, Configuration::OPTION_FB_PRODUCT_FEED_SCHEDULE_INTERVAL_COUNT ) ?>"
112
  >
113
  <?php foreach ( array( 1, 2, 3, 4, 6, 8, 12 ) as $count ) : ?>
114
- <option value="<?php echo $count ?>"<?php selected( $count, $interval_count ) ?>>
115
  <?php printf( _n( 'Every %s hour', 'Every %s hours', $count, 'pixel-caffeine' ), $count > 1 ? $count : '' ) ?>
116
  </option>
117
  <?php endforeach; ?>
@@ -128,7 +128,7 @@ if ( ! empty( $product_feed_id ) && 'new' !== $product_feed_id && defined('DOING
128
  name="<?php $page->feed_field_name( Configuration::OPTION_FEED_CONFIG, $group, Configuration::OPTION_FB_PRODUCT_FEED_SCHEDULE_DAY_OF_WEEK ) ?>"
129
  >
130
  <?php foreach ( $page->get_feed_weekly_options() as $k => $display ) : ?>
131
- <option value="<?php echo $k ?>"<?php selected( $interval_day_of_week, $k ) ?>>
132
  <?php echo $display ?>
133
  </option>
134
  <?php endforeach; ?>
@@ -146,7 +146,7 @@ if ( ! empty( $product_feed_id ) && 'new' !== $product_feed_id && defined('DOING
146
  name="<?php $page->feed_field_name( Configuration::OPTION_FEED_CONFIG, $group, Configuration::OPTION_FB_PRODUCT_FEED_SCHEDULE_HOUR ) ?>"
147
  >
148
  <?php for ( $hh = 0; $hh < 24; $hh++ ) : ?>
149
- <option value="<?php echo $hh ?>"<?php selected( $hh, $schedule_hour ) ?>>
150
  <?php echo str_pad( $hh, 2, '0', STR_PAD_LEFT ); ?>
151
  </option>
152
  <?php endfor; ?>
@@ -157,7 +157,7 @@ if ( ! empty( $product_feed_id ) && 'new' !== $product_feed_id && defined('DOING
157
  name="<?php $page->feed_field_name( Configuration::OPTION_FEED_CONFIG, $group, Configuration::OPTION_FB_PRODUCT_FEED_SCHEDULE_MINUTE ) ?>"
158
  >
159
  <?php for ( $mm = 0; $mm < 60; $mm++ ) : ?>
160
- <option value="<?php echo $mm ?>"<?php selected( $mm, $schedule_minute ) ?>>
161
  <?php echo str_pad( $mm, 2, '0', STR_PAD_LEFT ); ?>
162
  </option>
163
  <?php endfor; ?>
61
  type="radio"
62
  name="<?php $page->feed_field_name( Configuration::OPTION_FEED_CONFIG, $group, Configuration::OPTION_FB_PRODUCT_FEED_SCHEDULE_INTERVAL ) ?>"
63
  id="<?php $page->feed_field_id( Configuration::OPTION_FEED_CONFIG, $group, Configuration::OPTION_FB_PRODUCT_FEED_SCHEDULE_INTERVAL ) ?>"
64
+ value="<?php echo esc_attr( \AEPC_Facebook_Adapter::FEED_SCHEDULE_INTERVAL_DAILY ) ?>"
65
  data-toggle="schedule-interval"
66
  <?php checked( \AEPC_Facebook_Adapter::FEED_SCHEDULE_INTERVAL_DAILY, $interval ) ?>
67
  ><?php _e( 'Daily', 'pixel-caffeine' ) ?>
74
  type="radio"
75
  name="<?php $page->feed_field_name( Configuration::OPTION_FEED_CONFIG, $group, Configuration::OPTION_FB_PRODUCT_FEED_SCHEDULE_INTERVAL ) ?>"
76
  id="<?php $page->feed_field_id( Configuration::OPTION_FEED_CONFIG, $group, Configuration::OPTION_FB_PRODUCT_FEED_SCHEDULE_INTERVAL ) ?>"
77
+ value="<?php echo esc_attr( \AEPC_Facebook_Adapter::FEED_SCHEDULE_INTERVAL_HOURLY ) ?>"
78
  data-toggle="schedule-interval"
79
  data-dep="hourly"
80
  <?php checked( \AEPC_Facebook_Adapter::FEED_SCHEDULE_INTERVAL_HOURLY, $interval ) ?>
88
  type="radio"
89
  name="<?php $page->feed_field_name( Configuration::OPTION_FEED_CONFIG, $group, Configuration::OPTION_FB_PRODUCT_FEED_SCHEDULE_INTERVAL ) ?>"
90
  id="<?php $page->feed_field_id( Configuration::OPTION_FEED_CONFIG, $group, Configuration::OPTION_FB_PRODUCT_FEED_SCHEDULE_INTERVAL ) ?>"
91
+ value="<?php echo esc_attr( \AEPC_Facebook_Adapter::FEED_SCHEDULE_INTERVAL_WEEKLY ) ?>"
92
  data-toggle="schedule-interval"
93
  data-dep="weekly"
94
  <?php checked( \AEPC_Facebook_Adapter::FEED_SCHEDULE_INTERVAL_WEEKLY, $interval ) ?>
111
  name="<?php $page->feed_field_name( Configuration::OPTION_FEED_CONFIG, $group, Configuration::OPTION_FB_PRODUCT_FEED_SCHEDULE_INTERVAL_COUNT ) ?>"
112
  >
113
  <?php foreach ( array( 1, 2, 3, 4, 6, 8, 12 ) as $count ) : ?>
114
+ <option value="<?php echo esc_attr( $count ) ?>"<?php selected( $count, $interval_count ) ?>>
115
  <?php printf( _n( 'Every %s hour', 'Every %s hours', $count, 'pixel-caffeine' ), $count > 1 ? $count : '' ) ?>
116
  </option>
117
  <?php endforeach; ?>
128
  name="<?php $page->feed_field_name( Configuration::OPTION_FEED_CONFIG, $group, Configuration::OPTION_FB_PRODUCT_FEED_SCHEDULE_DAY_OF_WEEK ) ?>"
129
  >
130
  <?php foreach ( $page->get_feed_weekly_options() as $k => $display ) : ?>
131
+ <option value="<?php echo esc_attr( $k ) ?>"<?php selected( $interval_day_of_week, $k ) ?>>
132
  <?php echo $display ?>
133
  </option>
134
  <?php endforeach; ?>
146
  name="<?php $page->feed_field_name( Configuration::OPTION_FEED_CONFIG, $group, Configuration::OPTION_FB_PRODUCT_FEED_SCHEDULE_HOUR ) ?>"
147
  >
148
  <?php for ( $hh = 0; $hh < 24; $hh++ ) : ?>
149
+ <option value="<?php echo esc_attr( $hh ) ?>"<?php selected( $hh, $schedule_hour ) ?>>
150
  <?php echo str_pad( $hh, 2, '0', STR_PAD_LEFT ); ?>
151
  </option>
152
  <?php endfor; ?>
157
  name="<?php $page->feed_field_name( Configuration::OPTION_FEED_CONFIG, $group, Configuration::OPTION_FB_PRODUCT_FEED_SCHEDULE_MINUTE ) ?>"
158
  >
159
  <?php for ( $mm = 0; $mm < 60; $mm++ ) : ?>
160
+ <option value="<?php echo esc_attr( $mm ) ?>"<?php selected( $mm, $schedule_minute ) ?>>
161
  <?php echo str_pad( $mm, 2, '0', STR_PAD_LEFT ); ?>
162
  </option>
163
  <?php endfor; ?>
includes/admin/templates/parts/nav-tabs.php CHANGED
@@ -27,7 +27,7 @@ $skip_tabs = array(
27
  continue;
28
  }
29
 
30
- ?><a href="<?php echo $page->get_view_url( 'tab=' . $tab ) ?>" class="nav-tab<?php echo $tab === $page->get_current_tab() ? ' nav-tab-active' : '' ?>"><?php echo esc_html( $label ) ?></a><?php
31
  }
32
  ?>
33
  </nav>
27
  continue;
28
  }
29
 
30
+ ?><a href="<?php echo esc_attr( $page->get_view_url( 'tab=' . $tab ) ) ?>" class="nav-tab<?php echo $tab === $page->get_current_tab() ? ' nav-tab-active' : '' ?>"><?php echo esc_html( $label ) ?></a><?php
31
  }
32
  ?>
33
  </nav>
includes/admin/templates/parts/panels/set-facebook-pixel.php CHANGED
@@ -28,7 +28,7 @@ if ( ! defined( 'ABSPATH' ) ) {
28
  name="<?php $page->field_name( 'aepc_enable_pixel' ) ?>"
29
  id="<?php $page->field_id( 'aepc_enable_pixel' ) ?>"
30
  class="js-switch-labeled-tosave"
31
- data-original-value="<?php echo $page->get_value( 'aepc_enable_pixel' ) ?>"
32
  <?php checked( $page->get_value( 'aepc_enable_pixel' ), 'yes' ) ?>>
33
  </label>
34
  </div>
28
  name="<?php $page->field_name( 'aepc_enable_pixel' ) ?>"
29
  id="<?php $page->field_id( 'aepc_enable_pixel' ) ?>"
30
  class="js-switch-labeled-tosave"
31
+ data-original-value="<?php echo esc_attr( $page->get_value( 'aepc_enable_pixel' ) ) ?>"
32
  <?php checked( $page->get_value( 'aepc_enable_pixel' ), 'yes' ) ?>>
33
  </label>
34
  </div>
includes/admin/templates/parts/tables/ca-list.php CHANGED
@@ -58,7 +58,7 @@ if ( ( ! isset( $_GET['paged'] ) || $_GET['paged'] <= 1 ) && empty( $audiences )
58
  printf('<a href="#_" class="btn btn-fab btn-help btn-fab-mini" data-toggle="popover" data-placement="top" data-html="true" data-content="%s"></a>', __( 'Your audience\'s size will available about 2-3 days after its creation.', 'pixel-caffeine' ));
59
  }
60
  ?>
61
- <a href="#_" class="btn btn-fab btn-fab-mini btn-sync js-ca-size-sync btn-naked" data-ca_id="<?php echo $audience->get_id() ?>"></a>
62
  </td>
63
  <td class="actions">
64
  <div class="btn-group-sm">
58
  printf('<a href="#_" class="btn btn-fab btn-help btn-fab-mini" data-toggle="popover" data-placement="top" data-html="true" data-content="%s"></a>', __( 'Your audience\'s size will available about 2-3 days after its creation.', 'pixel-caffeine' ));
59
  }
60
  ?>
61
+ <a href="#_" class="btn btn-fab btn-fab-mini btn-sync js-ca-size-sync btn-naked" data-ca_id="<?php echo esc_attr( $audience->get_id() ) ?>"></a>
62
  </td>
63
  <td class="actions">
64
  <div class="btn-group-sm">
includes/admin/templates/parts/welcomes/2.0.php CHANGED
@@ -20,7 +20,7 @@ if ( ! defined( 'ABSPATH' ) ) {
20
  <p class="text"><?php _e( 'If you\'re in eCommerce, it\'s now super easy to upload your product catalog to Facebook and have it stay always up to date.', 'pixel-caffeine' ) ?></p>
21
 
22
  <div class="calltoact">
23
- <a href="<?php echo $page->get_view_url( 'tab=product-catalog' ) ?>" class="btn btn-raised btn-success btn-config"><?php _e( 'Learn more', 'pixel-caffeine' ) ?></a>
24
  </div>
25
 
26
  <?php if ( $back_to ) : ?>
20
  <p class="text"><?php _e( 'If you\'re in eCommerce, it\'s now super easy to upload your product catalog to Facebook and have it stay always up to date.', 'pixel-caffeine' ) ?></p>
21
 
22
  <div class="calltoact">
23
+ <a href="<?php echo esc_attr( $page->get_view_url( 'tab=product-catalog' ) ) ?>" class="btn btn-raised btn-success btn-config"><?php _e( 'Learn more', 'pixel-caffeine' ) ?></a>
24
  </div>
25
 
26
  <?php if ( $back_to ) : ?>
includes/admin/templates/parts/widgets/banner.php CHANGED
@@ -17,7 +17,7 @@ if ( ! defined( 'ABSPATH' ) ) {
17
  ?>
18
 
19
  <div class="plugin-sidebar-item banner-wrap">
20
- <a href="<?php echo $widget->link ?>" target="_blank">
21
- <img src="<?php echo $widget->img ?>">
22
  </a>
23
  </div>
17
  ?>
18
 
19
  <div class="plugin-sidebar-item banner-wrap">
20
+ <a href="<?php echo esc_attr( $widget->link ) ?>" target="_blank">
21
+ <img src="<?php echo esc_attr( $widget->img ) ?>">
22
  </a>
23
  </div>
includes/admin/templates/parts/widgets/news.php CHANGED
@@ -34,10 +34,10 @@ if ( ! isset( $posts['error'] ) && empty( $posts ) ) {
34
  <?php foreach ( $posts as $post ) : ?>
35
  <div class="list-group-item">
36
  <div class="row-content">
37
- <a href="<?php echo $post['link'] ?>" class="list-group-item-heading" target="_blank"><?php echo $post['title'] ?></a>
38
  <span class="list-group-item-date"><?php printf( __( '%s ago', 'pixel-caffeine' ), human_time_diff( strtotime( $post['date'] ) ) ) ?></span>
39
 
40
- <p class="list-group-item-text"><?php echo wp_trim_words( $post['description'], 10 ) ?></p>
41
  </div>
42
  </div>
43
  <div class="list-group-separator"></div>
34
  <?php foreach ( $posts as $post ) : ?>
35
  <div class="list-group-item">
36
  <div class="row-content">
37
+ <a href="<?php echo esc_attr( $post['link'] ) ?>" class="list-group-item-heading" target="_blank"><?php echo $post['title'] ?></a>
38
  <span class="list-group-item-date"><?php printf( __( '%s ago', 'pixel-caffeine' ), human_time_diff( strtotime( $post['date'] ) ) ) ?></span>
39
 
40
+ <p class="list-group-item-text"><?php echo esc_attr( wp_trim_words( $post['description'], 10 ) ) ?></p>
41
  </div>
42
  </div>
43
  <div class="list-group-separator"></div>
includes/class-aepc-pixel-scripts.php CHANGED
@@ -86,6 +86,9 @@ class AEPC_Pixel_Scripts {
86
  $args[$key] = html_entity_decode( (string) $value, ENT_QUOTES, 'UTF-8');
87
  }
88
 
 
 
 
89
  return $args;
90
  }
91
 
@@ -112,25 +115,12 @@ class AEPC_Pixel_Scripts {
112
  * Add the Facebook Pixel snippet
113
  */
114
  public static function pixel_init() {
 
115
  ?>
116
  <!-- Facebook Pixel Code -->
117
  <script>
118
- <?php if ( PixelCaffeine()->is_debug_mode() ) : ?>
119
- var fbq_calls = [],
120
- fbq = function() {
121
- console.log( 'fbq: ', arguments[0], arguments[1], arguments[2] );
122
- fbq_calls.push( arguments );
123
- };
124
- <?php elseif ( AEPC_Track::can_init_pixel() ) : ?>
125
- !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
126
- n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
127
- n.push=n;n.loaded=!0;n.version='2.0';n.agent='dvpixelcaffeinewordpress';n.queue=[];t=b.createElement(e);t.async=!0;
128
- t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
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,15 +134,31 @@ class AEPC_Pixel_Scripts {
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 ) {
150
  aepc_pixel_args.referrer = document.referrer;
151
  }
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() {
86
  $args[$key] = html_entity_decode( (string) $value, ENT_QUOTES, 'UTF-8');
87
  }
88
 
89
+ // Force user to be object in order to avoid the JS error "parameter 'user_data' with invalid value of '[]'"
90
+ $args['user'] = (object) $args['user'];
91
+
92
  return $args;
93
  }
94
 
115
  * Add the Facebook Pixel snippet
116
  */
117
  public static function pixel_init() {
118
+ // Split in order to make fbq delayable through WP Rocket, if used
119
  ?>
120
  <!-- Facebook Pixel Code -->
121
  <script>
122
+ var aepc_pixel = <?php echo wp_json_encode( self::pixel_init_arguments() ) ?>,
123
+ aepc_pixel_args = <?php echo wp_json_encode( self::pixel_advanced_parameters() ) ?>,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
124
  aepc_extend_args = function( args ) {
125
  if ( typeof args === 'undefined' ) {
126
  args = {};
134
 
135
  // Extend args
136
  if ( 'yes' === aepc_pixel.enable_advanced_events ) {
137
+ aepc_pixel_args.userAgent = navigator.userAgent;
138
  aepc_pixel_args.language = navigator.language;
139
 
140
  if ( document.referrer.indexOf( document.domain ) < 0 ) {
141
  aepc_pixel_args.referrer = document.referrer;
142
  }
143
  }
144
+ </script>
145
+ <script>
146
+ <?php if ( PixelCaffeine()->is_debug_mode() ) : ?>
147
+ var fbq_calls = [],
148
+ fbq = function() {
149
+ console.log( 'fbq: ', arguments[0], arguments[1], arguments[2] );
150
+ fbq_calls.push( arguments );
151
+ };
152
+ <?php elseif ( AEPC_Track::can_init_pixel() ) : ?>
153
+ !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
154
+ n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
155
+ n.push=n;n.loaded=!0;n.version='2.0';n.agent='dvpixelcaffeinewordpress';n.queue=[];t=b.createElement(e);t.async=!0;
156
+ t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
157
+ document,'script','https://connect.facebook.net/en_US/fbevents.js');
158
+ <?php endif; ?>
159
 
160
  <?php if ( AEPC_Track::can_init_pixel() ) : ?>
161
+ fbq('init', aepc_pixel.pixel_id, aepc_pixel.user);
162
 
163
  <?php /* Trigger the event when delay is passed and where there are all fbq calls that need to wait */ ?>
164
  setTimeout( function() {
includes/product-catalogs/class-configuration-defaults.php CHANGED
@@ -32,7 +32,7 @@ class ConfigurationDefaults {
32
  Configuration::OPTION_FILE_NAME => '',
33
  Configuration::OPTION_DIRECTORY_PATH => '',
34
  Configuration::OPTION_DIRECTORY_URL => '',
35
- Configuration::OPTION_CHUNK_LIMIT => 1000,
36
  Configuration::OPTION_SKU_FOR_ID => true,
37
  Configuration::OPTION_IMAGE_SIZE => 'full',
38
  Configuration::OPTION_SELECTED_ADDON => $addons,
32
  Configuration::OPTION_FILE_NAME => '',
33
  Configuration::OPTION_DIRECTORY_PATH => '',
34
  Configuration::OPTION_DIRECTORY_URL => '',
35
+ Configuration::OPTION_CHUNK_LIMIT => 500,
36
  Configuration::OPTION_SKU_FOR_ID => true,
37
  Configuration::OPTION_IMAGE_SIZE => 'full',
38
  Configuration::OPTION_SELECTED_ADDON => $addons,
includes/supports/class-aepc-woocommerce-addon-support.php CHANGED
@@ -80,7 +80,7 @@ class AEPC_Woocommerce_Addon_Support extends AEPC_Addon_Factory implements EComm
80
  } else {
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 );
@@ -154,7 +154,7 @@ class AEPC_Woocommerce_Addon_Support extends AEPC_Addon_Factory implements EComm
154
  * @return bool
155
  */
156
  protected function can_fire_complete_registration() {
157
- return get_option( 'woocommerce_enable_myaccount_registration' ) === 'yes' && false !== WC()->session->get( 'aepc_complete_registration_data', false );
158
  }
159
 
160
  /**
@@ -692,6 +692,12 @@ class AEPC_Woocommerce_Addon_Support extends AEPC_Addon_Factory implements EComm
692
  $product_date_on_sale_to = ( $date_sale_to = get_post_meta( $product_id, '_sale_price_dates_to', true ) ) ? $product_date_on_sale_to->setTimestamp( $date_sale_to ) : null;
693
  }
694
 
 
 
 
 
 
 
695
  $product_item
696
  ->set_id( $product_id )
697
  ->set_sku( $product->get_sku() )
@@ -710,7 +716,7 @@ class AEPC_Woocommerce_Addon_Support extends AEPC_Addon_Factory implements EComm
710
  ->set_price_tax( $this->format_price( $product_price_tax ) )
711
  ->set_sale_price( $product_sale_price < $product_price ? $this->format_price( $product_sale_price ) : 0 )
712
  ->set_sale_price_tax( $product_sale_price < $product_price ? $this->format_price( $product_sale_price_tax ) : 0 )
713
- ->set_checkout_url( $product_is_variation ? add_query_arg( [ 'variation_id' => $product_id, 'add-to-cart' => $product_parent_id ], $product->get_permalink() ) : add_query_arg( 'add-to-cart', $product_id, $product->get_permalink() ) )
714
  ->set_if_needs_shipping( $product->needs_shipping() )
715
  ->set_shipping_weight( $product->get_weight() )
716
  ->set_shipping_weight_unit( get_option( 'woocommerce_weight_unit' ) )
80
  } else {
81
  add_filter( 'woocommerce_get_script_data', array( $this, 'add_currency_param' ), 10, 2 );
82
  }
83
+ add_action( 'woocommerce_after_shop_loop_item_title', 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 );
154
  * @return bool
155
  */
156
  protected function can_fire_complete_registration() {
157
+ return get_option( 'woocommerce_enable_myaccount_registration' ) === 'yes' && WC()->session && false !== WC()->session->get( 'aepc_complete_registration_data', false );
158
  }
159
 
160
  /**
692
  $product_date_on_sale_to = ( $date_sale_to = get_post_meta( $product_id, '_sale_price_dates_to', true ) ) ? $product_date_on_sale_to->setTimestamp( $date_sale_to ) : null;
693
  }
694
 
695
+ $add_to_cart_url = $product->add_to_cart_url();
696
+ if (strpos($add_to_cart_url, $product->get_permalink()) === false && $add_to_cart_url[0] === '?') {
697
+ parse_str(str_replace('?', '', $add_to_cart_url), $add_to_cart_qs);
698
+ $add_to_cart_url = add_query_arg($add_to_cart_qs, $product->get_permalink());
699
+ }
700
+
701
  $product_item
702
  ->set_id( $product_id )
703
  ->set_sku( $product->get_sku() )
716
  ->set_price_tax( $this->format_price( $product_price_tax ) )
717
  ->set_sale_price( $product_sale_price < $product_price ? $this->format_price( $product_sale_price ) : 0 )
718
  ->set_sale_price_tax( $product_sale_price < $product_price ? $this->format_price( $product_sale_price_tax ) : 0 )
719
+ ->set_checkout_url( $add_to_cart_url )
720
  ->set_if_needs_shipping( $product->needs_shipping() )
721
  ->set_shipping_weight( $product->get_weight() )
722
  ->set_shipping_weight_unit( get_option( 'woocommerce_weight_unit' ) )
languages/pixel-caffeine.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the Pixel Caffeine package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Pixel Caffeine 2.1.3\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/pixel-caffeine\n"
7
- "POT-Creation-Date: 2020-06-04 15:56:47+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -24,59 +24,59 @@ msgstr ""
24
  "X-Textdomain-Support: yes\n"
25
  "X-Generator: grunt-wp-i18n1.0.2\n"
26
 
27
- #: includes/admin/class-aepc-admin-ajax.php:449
28
  #: includes/admin/class-aepc-admin-ca.php:837
29
  msgid "English (American)"
30
  msgstr ""
31
 
32
- #: includes/admin/class-aepc-admin-ajax.php:467
33
  msgid "Desktop"
34
  msgstr ""
35
 
36
- #: includes/admin/class-aepc-admin-ajax.php:468
37
  msgid "iPhone"
38
  msgstr ""
39
 
40
- #: includes/admin/class-aepc-admin-ajax.php:469
41
  msgid "Android Phone"
42
  msgstr ""
43
 
44
- #: includes/admin/class-aepc-admin-ajax.php:470
45
  msgid "iPad"
46
  msgstr ""
47
 
48
- #: includes/admin/class-aepc-admin-ajax.php:471
49
  msgid "Android Tablet"
50
  msgstr ""
51
 
52
- #: includes/admin/class-aepc-admin-ajax.php:472
53
  msgid "Windows Phone"
54
  msgstr ""
55
 
56
- #: includes/admin/class-aepc-admin-ajax.php:473
57
  msgid "iPod"
58
  msgstr ""
59
 
60
- #: includes/admin/class-aepc-admin-ajax.php:543
61
- #: includes/admin/class-aepc-admin-ajax.php:585
62
- #: includes/admin/class-aepc-admin-ajax.php:618
63
  msgid "anything"
64
  msgstr ""
65
 
66
- #: includes/admin/class-aepc-admin-ajax.php:1026
67
  msgid "Transients cleared correctly!"
68
  msgstr ""
69
 
70
- #: includes/admin/class-aepc-admin-ajax.php:1039
71
  msgid "Facebook connection reset correctly!"
72
  msgstr ""
73
 
74
- #: includes/admin/class-aepc-admin-ajax.php:1052
75
  #: includes/admin/templates/parts/modals/confirm-refresh-product-feed.php:36
76
  msgid "OK"
77
  msgstr ""
78
 
79
- #: includes/admin/class-aepc-admin-ajax.php:1075
80
  msgid "All logs are removed."
81
  msgstr ""
82
 
@@ -136,12 +136,12 @@ msgid ""
136
  msgstr ""
137
 
138
  #: includes/admin/class-aepc-admin-ca.php:392
139
- #: includes/admin/class-aepc-admin-view.php:1289
140
  msgid "Now"
141
  msgstr ""
142
 
143
  #: includes/admin/class-aepc-admin-ca.php:394
144
- #: includes/admin/class-aepc-admin-view.php:1291
145
  #: includes/admin/templates/parts/widgets/news.php:38
146
  msgid "%s ago"
147
  msgstr ""
@@ -199,7 +199,7 @@ msgstr[1] ""
199
  #: includes/admin/class-aepc-admin-ca.php:910
200
  #: includes/admin/class-aepc-admin-ca.php:923
201
  #: includes/admin/class-aepc-admin-ca.php:944
202
- #: includes/admin/class-aepc-admin.php:532
203
  msgid "any"
204
  msgstr ""
205
 
@@ -345,296 +345,304 @@ msgstr ""
345
  msgid "<strong>Feed deleted correctly!</strong>"
346
  msgstr ""
347
 
348
- #: includes/admin/class-aepc-admin-view.php:424
349
  msgid "No pixel set"
350
  msgstr ""
351
 
352
- #: includes/admin/class-aepc-admin-view.php:430
353
  msgid "Automatic facebook connection"
354
  msgstr ""
355
 
356
- #: includes/admin/class-aepc-admin-view.php:432
357
  msgid "Manual facebook connection"
358
  msgstr ""
359
 
360
- #: includes/admin/class-aepc-admin-view.php:800
361
  #: includes/admin/templates/parts/forms/conversion.php:48
362
  msgid "Contains"
363
  msgstr ""
364
 
365
- #: includes/admin/class-aepc-admin-view.php:801
366
  msgid "Not Contains"
367
  msgstr ""
368
 
369
- #: includes/admin/class-aepc-admin-view.php:802
370
  msgid "Is"
371
  msgstr ""
372
 
373
- #: includes/admin/class-aepc-admin-view.php:803
374
  msgid "Not equal"
375
  msgstr ""
376
 
377
- #: includes/admin/class-aepc-admin-view.php:804
378
  msgid "Less than"
379
  msgstr ""
380
 
381
- #: includes/admin/class-aepc-admin-view.php:805
382
  msgid "Less than or equal to"
383
  msgstr ""
384
 
385
- #: includes/admin/class-aepc-admin-view.php:806
386
- #: includes/admin/class-aepc-admin-view.php:807
387
  msgid "Greater than or equal to"
388
  msgstr ""
389
 
390
- #: includes/admin/class-aepc-admin-view.php:849
391
  msgid "Product Category"
392
  msgstr ""
393
 
394
- #: includes/admin/class-aepc-admin-view.php:880
395
  msgid "Product Tag"
396
  msgstr ""
397
 
398
- #: includes/admin/class-aepc-admin-view.php:1190
399
  msgid "Full Description"
400
  msgstr ""
401
 
402
- #: includes/admin/class-aepc-admin-view.php:1191
403
  msgid "Short Description"
404
  msgstr ""
405
 
406
- #: includes/admin/class-aepc-admin-view.php:1202
407
  msgid "Price excluding tax"
408
  msgstr ""
409
 
410
- #: includes/admin/class-aepc-admin-view.php:1203
411
  msgid "Price including tax"
412
  msgstr ""
413
 
414
- #: includes/admin/class-aepc-admin-view.php:1214
415
  msgid "New"
416
  msgstr ""
417
 
418
- #: includes/admin/class-aepc-admin-view.php:1215
419
  msgid "Refurbished"
420
  msgstr ""
421
 
422
- #: includes/admin/class-aepc-admin-view.php:1216
423
  msgid "Used"
424
  msgstr ""
425
 
426
- #: includes/admin/class-aepc-admin-view.php:1227
427
  msgid "Thumbnail"
428
  msgstr ""
429
 
430
- #: includes/admin/class-aepc-admin-view.php:1228
431
  msgid "Medium"
432
  msgstr ""
433
 
434
- #: includes/admin/class-aepc-admin-view.php:1229
435
  msgid "Large"
436
  msgstr ""
437
 
438
- #: includes/admin/class-aepc-admin-view.php:1230
439
  msgid "Full Size"
440
  msgstr ""
441
 
442
- #: includes/admin/class-aepc-admin-view.php:1242
443
  msgid "Every Sunday"
444
  msgstr ""
445
 
446
- #: includes/admin/class-aepc-admin-view.php:1243
447
  msgid "Every Monday"
448
  msgstr ""
449
 
450
- #: includes/admin/class-aepc-admin-view.php:1244
451
  msgid "Every Tuesday"
452
  msgstr ""
453
 
454
- #: includes/admin/class-aepc-admin-view.php:1245
455
  msgid "Every Wednesday"
456
  msgstr ""
457
 
458
- #: includes/admin/class-aepc-admin-view.php:1246
459
  msgid "Every Thursday"
460
  msgstr ""
461
 
462
- #: includes/admin/class-aepc-admin-view.php:1247
463
  msgid "Every Friday"
464
  msgstr ""
465
 
466
- #: includes/admin/class-aepc-admin-view.php:1248
467
  msgid "Every Saturday"
468
  msgstr ""
469
 
470
- #: includes/admin/class-aepc-admin.php:122
471
  msgid "Dashboard"
472
  msgstr ""
473
 
474
- #: includes/admin/class-aepc-admin.php:123
475
  msgid "Settings"
476
  msgstr ""
477
 
478
- #: includes/admin/class-aepc-admin.php:267
479
  msgid "The Pixel ID value must contains only numbers and must be 15 digits length."
480
  msgstr ""
481
 
482
- #: includes/admin/class-aepc-admin.php:276
483
  msgid "<strong>Some option cannot be saved</strong> Please, check errors below."
484
  msgstr ""
485
 
486
- #: includes/admin/class-aepc-admin.php:370
487
  msgid "Please, check fields errors below."
488
  msgstr ""
489
 
490
- #: includes/admin/class-aepc-admin.php:520
491
  msgid ""
492
  "You have unsaved changes on this page. Do you want to leave this page and "
493
  "discard your changes or stay on this page?"
494
  msgstr ""
495
 
496
- #: includes/admin/class-aepc-admin.php:521
497
  msgid "You need to save!"
498
  msgstr ""
499
 
500
- #: includes/admin/class-aepc-admin.php:523
501
- #: includes/admin/class-aepc-admin.php:534
502
  msgid "Saving..."
503
  msgstr ""
504
 
505
- #: includes/admin/class-aepc-admin.php:525
506
  msgid "Copied!"
507
  msgstr ""
508
 
509
- #: includes/admin/class-aepc-admin.php:526
510
  msgid "No support :("
511
  msgstr ""
512
 
513
- #: includes/admin/class-aepc-admin.php:527
514
  msgid "Press ⌘-{{{ key }}} to copy"
515
  msgstr ""
516
 
517
- #: includes/admin/class-aepc-admin.php:528
518
  msgid "Press Ctrl-{{{ key }}} to copy"
519
  msgstr ""
520
 
521
- #: includes/admin/class-aepc-admin.php:529
522
  msgid "Press ⌘-{{{ key }}} to cut"
523
  msgstr ""
524
 
525
- #: includes/admin/class-aepc-admin.php:530
526
  msgid "Press Ctrl-{{{ key }}} to cut"
527
  msgstr ""
528
 
529
- #: includes/admin/class-aepc-admin.php:533
530
  msgid "Write the key or select from below"
531
  msgstr ""
532
 
533
- #: includes/admin/class-aepc-admin.php:535
534
  msgid "<strong>Can't add filter</strong> You have to select an event type"
535
  msgstr ""
536
 
537
- #: includes/admin/class-aepc-admin.php:536
538
  msgid "<strong>Can't add filter</strong> You have to define at least one condition"
539
  msgstr ""
540
 
541
- #: includes/admin/class-aepc-admin.php:538
542
  msgid "Select an account ID"
543
  msgstr ""
544
 
545
- #: includes/admin/class-aepc-admin.php:539
546
  msgid "No Ad account found"
547
  msgstr ""
548
 
549
- #: includes/admin/class-aepc-admin.php:540
550
  msgid "No pixel found"
551
  msgstr ""
552
 
553
- #: includes/admin/class-aepc-admin.php:541
554
  msgid "No products feeds found"
555
  msgstr ""
556
 
557
- #: includes/admin/class-aepc-admin.php:543
558
  #: includes/admin/templates/parts/activity-box.php:29
559
  msgid "Today"
560
  msgstr ""
561
 
562
- #: includes/admin/class-aepc-admin.php:544
563
  #: includes/admin/templates/parts/activity-box.php:30
564
  msgid "Yesterday"
565
  msgstr ""
566
 
567
- #: includes/admin/class-aepc-admin.php:545
568
  msgid "2 Days"
569
  msgstr ""
570
 
571
- #: includes/admin/class-aepc-admin.php:546
572
  msgid "7 Days"
573
  msgstr ""
574
 
575
- #: includes/admin/class-aepc-admin.php:547
576
  msgid "14 Days"
577
  msgstr ""
578
 
579
- #: includes/admin/class-aepc-admin.php:713
580
  msgid "<strong>RSS Error</strong>: %s"
581
  msgstr ""
582
 
583
- #: includes/admin/class-aepc-admin.php:725
584
  msgid ""
585
  "An error has occurred, which probably means the feed is down. Try again "
586
  "later."
587
  msgstr ""
588
 
589
- #: includes/admin/class-aepc-facebook-adapter.php:150
 
 
 
 
 
 
 
 
590
  msgid "Empty Token"
591
  msgstr ""
592
 
593
- #: includes/admin/class-aepc-facebook-adapter.php:160
594
  msgid "Expired Token"
595
  msgstr ""
596
 
597
- #: includes/admin/class-aepc-facebook-adapter.php:168
598
  msgid "Invalid login, please try again."
599
  msgstr ""
600
 
601
- #: includes/admin/class-aepc-facebook-adapter.php:201
602
  msgid "Please, grant the permissions requested"
603
  msgstr ""
604
 
605
- #: includes/admin/class-aepc-facebook-adapter.php:203
606
  msgid "Please, grant the permissions: %s"
607
  msgstr ""
608
 
609
- #: includes/admin/class-aepc-facebook-adapter.php:206
610
  msgid "Facebook authentication error"
611
  msgstr ""
612
 
613
- #: includes/admin/class-aepc-facebook-adapter.php:220
614
  msgid ""
615
  "<strong>Facebook connected</strong> Your facebook account is properly "
616
  "connected now."
617
  msgstr ""
618
 
619
- #: includes/admin/class-aepc-facebook-adapter.php:372
620
  msgid ""
621
  "Please, connect your facebook account to make operations to the custom "
622
  "audiences of your Ad account."
623
  msgstr ""
624
 
625
- #: includes/admin/class-aepc-facebook-adapter.php:417
626
  msgid ""
627
  "Something went wrong during the connection with Facebook API. Please, try "
628
  "to %1$srefresh the page%2$s."
629
  msgstr ""
630
 
631
- #: includes/admin/class-aepc-facebook-adapter.php:430
632
  msgid ""
633
  "Cannot save on facebook account because of something gone wrong during "
634
  "facebook connection."
635
  msgstr ""
636
 
637
- #: includes/admin/class-aepc-facebook-adapter.php:436
638
  msgid ""
639
  "The request goes in error from your server due by some oldest version of "
640
  "\"cUrl\" package. Please, ask to your hosting to upgrade it in order to fix "
@@ -643,86 +651,86 @@ msgid ""
643
  "service, to give their more details about the issue."
644
  msgstr ""
645
 
646
- #: includes/admin/class-aepc-facebook-adapter.php:452
647
  msgid "Facebook connection timed out. Please, login again from %shere%s"
648
  msgstr ""
649
 
650
- #: includes/admin/class-aepc-facebook-adapter.php:475
651
  msgid ""
652
  "Facebook connection timed out or you need to authorize again. Please, login "
653
  "again from %shere%s"
654
  msgstr ""
655
 
656
- #: includes/admin/class-aepc-facebook-adapter.php:476
657
  msgid "Permission error: %s"
658
  msgstr ""
659
 
660
- #: includes/admin/class-aepc-facebook-adapter.php:477
661
  msgid "This Ads action requires the user to be admin of the application."
662
  msgstr ""
663
 
664
- #: includes/admin/class-aepc-facebook-adapter.php:478
665
  msgid "This Ads action requires the user to be admin of the ad account."
666
  msgstr ""
667
 
668
- #: includes/admin/class-aepc-facebook-adapter.php:479
669
  msgid ""
670
  "The ad account is not enabled for usage in Ads API. Please add it in "
671
  "developers.facebook.com/apps -> select your app -> settings -> advanced -> "
672
  "advertising accounts -> Ads API."
673
  msgstr ""
674
 
675
- #: includes/admin/class-aepc-facebook-adapter.php:480
676
  msgid "The facebook object you are trying to use does not exist."
677
  msgstr ""
678
 
679
- #: includes/admin/class-aepc-facebook-adapter.php:481
680
  msgid "You have to extend permission for ads_read to complete the action."
681
  msgstr ""
682
 
683
- #: includes/admin/class-aepc-facebook-adapter.php:482
684
  msgid "You have to extend permission for ads_management to complete the action."
685
  msgstr ""
686
 
687
- #: includes/admin/class-aepc-facebook-adapter.php:483
688
  msgid "Failed to update the custom audience."
689
  msgstr ""
690
 
691
- #: includes/admin/class-aepc-facebook-adapter.php:484
692
  msgid "Failed to create lookalike custom audience."
693
  msgstr ""
694
 
695
- #: includes/admin/class-aepc-facebook-adapter.php:485
696
  msgid "Failed to create custom audience on your facebook account."
697
  msgstr ""
698
 
699
- #: includes/admin/class-aepc-facebook-adapter.php:486
700
  msgid ""
701
  "Terms of service has not been accepted. To accept, go to "
702
  "https://www.facebook.com/ads/manage/customaudiences/tos.php"
703
  msgstr ""
704
 
705
- #: includes/admin/class-aepc-facebook-adapter.php:487
706
  msgid "Failed to delete custom audience because associated lookalikes exist."
707
  msgstr ""
708
 
709
- #: includes/admin/class-aepc-facebook-adapter.php:488
710
  msgid ""
711
  "Terms of service has not been accepted. To accept, go to "
712
  "https://www.facebook.com/customaudiences/app/tos"
713
  msgstr ""
714
 
715
- #: includes/admin/class-aepc-facebook-adapter.php:489
716
  msgid ""
717
  "The corporate terms of service has not been accepted. To accept, go to "
718
  "https://business.facebook.com/ads/manage/customaudiences/tos.php"
719
  msgstr ""
720
 
721
- #: includes/admin/class-aepc-facebook-adapter.php:490
722
  msgid "Specified audience is too small."
723
  msgstr ""
724
 
725
- #: includes/admin/class-aepc-facebook-adapter.php:1012
726
  msgid ""
727
  "Unable to create a product catalog because there isn't any business ID "
728
  "associated to your Ad account."
@@ -1137,7 +1145,7 @@ msgstr ""
1137
 
1138
  #: includes/admin/templates/parts/fb-connect-logged-in.php:19
1139
  #: includes/admin/templates/parts/fb-connect-logged-out.php:20
1140
- #: includes/admin/templates/parts/fb-connect-logged-out.php:27
1141
  #: includes/admin/templates/parts/fb-connect-to-setup.php:21
1142
  msgid "Facebook Connect"
1143
  msgstr ""
@@ -1178,6 +1186,12 @@ msgid ""
1178
  "Connect your Facebook account and you're good to go!"
1179
  msgstr ""
1180
 
 
 
 
 
 
 
1181
  #: includes/admin/templates/parts/fb-connect-to-setup.php:22
1182
  msgid "One Click Setup Through Facebook. Recommended option!"
1183
  msgstr ""
@@ -1655,109 +1669,122 @@ msgid ""
1655
  "be working successfully according to your server configuration."
1656
  msgstr ""
1657
 
1658
- #: includes/admin/templates/parts/forms/product-catalog.php:366
1659
  msgid "Save the feed file in a background process."
1660
  msgstr ""
1661
 
1662
- #: includes/admin/templates/parts/forms/product-catalog.php:374
 
 
 
 
 
 
 
 
 
 
 
 
 
1663
  msgid "Use SKU"
1664
  msgstr ""
1665
 
1666
- #: includes/admin/templates/parts/forms/product-catalog.php:389
1667
  msgid "Use SKU as ID in the product feed. If no sku, it gets the ID for default."
1668
  msgstr ""
1669
 
1670
- #: includes/admin/templates/parts/forms/product-catalog.php:403
1671
  msgid "Filter by plugin"
1672
  msgstr ""
1673
 
1674
- #: includes/admin/templates/parts/forms/product-catalog.php:428
1675
  msgid "Filter by product type"
1676
  msgstr ""
1677
 
1678
- #: includes/admin/templates/parts/forms/product-catalog.php:440
1679
  msgid ""
1680
  "Select if you want only product with certain type to include in the feed. "
1681
  "Leave empty to not use this filter"
1682
  msgstr ""
1683
 
1684
- #: includes/admin/templates/parts/forms/product-catalog.php:447
1685
  msgid "Filter by product category"
1686
  msgstr ""
1687
 
1688
- #: includes/admin/templates/parts/forms/product-catalog.php:459
1689
  msgid ""
1690
  "Select the categories of products to include in the feed. Leave empty to "
1691
  "not use this filter"
1692
  msgstr ""
1693
 
1694
- #: includes/admin/templates/parts/forms/product-catalog.php:466
1695
  msgid "Filter by product tag"
1696
  msgstr ""
1697
 
1698
- #: includes/admin/templates/parts/forms/product-catalog.php:478
1699
  msgid ""
1700
  "Select the tags of products to include in the feed. Leave empty to not use "
1701
  "this filter"
1702
  msgstr ""
1703
 
1704
- #: includes/admin/templates/parts/forms/product-catalog.php:485
1705
  msgid "Filter by product stock"
1706
  msgstr ""
1707
 
1708
- #: includes/admin/templates/parts/forms/product-catalog.php:495
1709
  msgid "In Stock"
1710
  msgstr ""
1711
 
1712
- #: includes/admin/templates/parts/forms/product-catalog.php:496
1713
  msgid "Out of Stock"
1714
  msgstr ""
1715
 
1716
- #: includes/admin/templates/parts/forms/product-catalog.php:497
1717
  msgid "Pre-Order"
1718
  msgstr ""
1719
 
1720
- #: includes/admin/templates/parts/forms/product-catalog.php:498
1721
  msgid "Discountinued"
1722
  msgstr ""
1723
 
1724
- #: includes/admin/templates/parts/forms/product-catalog.php:499
1725
  msgid "Available for order"
1726
  msgstr ""
1727
 
1728
- #: includes/admin/templates/parts/forms/product-catalog.php:503
1729
  msgid ""
1730
  "Include what products to include in base of stock status. Leave empty to "
1731
  "include all products of all stock status."
1732
  msgstr ""
1733
 
1734
- #: includes/admin/templates/parts/forms/product-catalog.php:510
1735
  msgid "Filter products on sale"
1736
  msgstr ""
1737
 
1738
- #: includes/admin/templates/parts/forms/product-catalog.php:525
1739
  msgid "Check this option if you want <strong>only</strong> products on sale."
1740
  msgstr ""
1741
 
1742
- #: includes/admin/templates/parts/forms/product-catalog.php:532
1743
  msgid "No Variations"
1744
  msgstr ""
1745
 
1746
- #: includes/admin/templates/parts/forms/product-catalog.php:547
1747
  msgid "Remove the variations from the feed."
1748
  msgstr ""
1749
 
1750
- #: includes/admin/templates/parts/forms/product-catalog.php:556
1751
  msgid "Special mapping"
1752
  msgstr ""
1753
 
1754
- #: includes/admin/templates/parts/forms/product-catalog.php:558
1755
  msgid ""
1756
  "Here you can map some of the fields you can define inside the feed. Here a "
1757
  "reference of a full field list: %s"
1758
  msgstr ""
1759
 
1760
- #: includes/admin/templates/parts/forms/product-catalog.php:730
1761
  msgid "Generate Feed File"
1762
  msgstr ""
1763
 
2
  # This file is distributed under the same license as the Pixel Caffeine package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Pixel Caffeine 2.1.4\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/pixel-caffeine\n"
7
+ "POT-Creation-Date: 2020-09-28 16:09:55+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
24
  "X-Textdomain-Support: yes\n"
25
  "X-Generator: grunt-wp-i18n1.0.2\n"
26
 
27
+ #: includes/admin/class-aepc-admin-ajax.php:452
28
  #: includes/admin/class-aepc-admin-ca.php:837
29
  msgid "English (American)"
30
  msgstr ""
31
 
32
+ #: includes/admin/class-aepc-admin-ajax.php:470
33
  msgid "Desktop"
34
  msgstr ""
35
 
36
+ #: includes/admin/class-aepc-admin-ajax.php:471
37
  msgid "iPhone"
38
  msgstr ""
39
 
40
+ #: includes/admin/class-aepc-admin-ajax.php:472
41
  msgid "Android Phone"
42
  msgstr ""
43
 
44
+ #: includes/admin/class-aepc-admin-ajax.php:473
45
  msgid "iPad"
46
  msgstr ""
47
 
48
+ #: includes/admin/class-aepc-admin-ajax.php:474
49
  msgid "Android Tablet"
50
  msgstr ""
51
 
52
+ #: includes/admin/class-aepc-admin-ajax.php:475
53
  msgid "Windows Phone"
54
  msgstr ""
55
 
56
+ #: includes/admin/class-aepc-admin-ajax.php:476
57
  msgid "iPod"
58
  msgstr ""
59
 
60
+ #: includes/admin/class-aepc-admin-ajax.php:546
61
+ #: includes/admin/class-aepc-admin-ajax.php:588
62
+ #: includes/admin/class-aepc-admin-ajax.php:621
63
  msgid "anything"
64
  msgstr ""
65
 
66
+ #: includes/admin/class-aepc-admin-ajax.php:1029
67
  msgid "Transients cleared correctly!"
68
  msgstr ""
69
 
70
+ #: includes/admin/class-aepc-admin-ajax.php:1042
71
  msgid "Facebook connection reset correctly!"
72
  msgstr ""
73
 
74
+ #: includes/admin/class-aepc-admin-ajax.php:1055
75
  #: includes/admin/templates/parts/modals/confirm-refresh-product-feed.php:36
76
  msgid "OK"
77
  msgstr ""
78
 
79
+ #: includes/admin/class-aepc-admin-ajax.php:1078
80
  msgid "All logs are removed."
81
  msgstr ""
82
 
136
  msgstr ""
137
 
138
  #: includes/admin/class-aepc-admin-ca.php:392
139
+ #: includes/admin/class-aepc-admin-view.php:1305
140
  msgid "Now"
141
  msgstr ""
142
 
143
  #: includes/admin/class-aepc-admin-ca.php:394
144
+ #: includes/admin/class-aepc-admin-view.php:1307
145
  #: includes/admin/templates/parts/widgets/news.php:38
146
  msgid "%s ago"
147
  msgstr ""
199
  #: includes/admin/class-aepc-admin-ca.php:910
200
  #: includes/admin/class-aepc-admin-ca.php:923
201
  #: includes/admin/class-aepc-admin-ca.php:944
202
+ #: includes/admin/class-aepc-admin.php:536
203
  msgid "any"
204
  msgstr ""
205
 
345
  msgid "<strong>Feed deleted correctly!</strong>"
346
  msgstr ""
347
 
348
+ #: includes/admin/class-aepc-admin-view.php:434
349
  msgid "No pixel set"
350
  msgstr ""
351
 
352
+ #: includes/admin/class-aepc-admin-view.php:440
353
  msgid "Automatic facebook connection"
354
  msgstr ""
355
 
356
+ #: includes/admin/class-aepc-admin-view.php:442
357
  msgid "Manual facebook connection"
358
  msgstr ""
359
 
360
+ #: includes/admin/class-aepc-admin-view.php:810
361
  #: includes/admin/templates/parts/forms/conversion.php:48
362
  msgid "Contains"
363
  msgstr ""
364
 
365
+ #: includes/admin/class-aepc-admin-view.php:811
366
  msgid "Not Contains"
367
  msgstr ""
368
 
369
+ #: includes/admin/class-aepc-admin-view.php:812
370
  msgid "Is"
371
  msgstr ""
372
 
373
+ #: includes/admin/class-aepc-admin-view.php:813
374
  msgid "Not equal"
375
  msgstr ""
376
 
377
+ #: includes/admin/class-aepc-admin-view.php:814
378
  msgid "Less than"
379
  msgstr ""
380
 
381
+ #: includes/admin/class-aepc-admin-view.php:815
382
  msgid "Less than or equal to"
383
  msgstr ""
384
 
385
+ #: includes/admin/class-aepc-admin-view.php:816
386
+ #: includes/admin/class-aepc-admin-view.php:817
387
  msgid "Greater than or equal to"
388
  msgstr ""
389
 
390
+ #: includes/admin/class-aepc-admin-view.php:859
391
  msgid "Product Category"
392
  msgstr ""
393
 
394
+ #: includes/admin/class-aepc-admin-view.php:890
395
  msgid "Product Tag"
396
  msgstr ""
397
 
398
+ #: includes/admin/class-aepc-admin-view.php:1206
399
  msgid "Full Description"
400
  msgstr ""
401
 
402
+ #: includes/admin/class-aepc-admin-view.php:1207
403
  msgid "Short Description"
404
  msgstr ""
405
 
406
+ #: includes/admin/class-aepc-admin-view.php:1218
407
  msgid "Price excluding tax"
408
  msgstr ""
409
 
410
+ #: includes/admin/class-aepc-admin-view.php:1219
411
  msgid "Price including tax"
412
  msgstr ""
413
 
414
+ #: includes/admin/class-aepc-admin-view.php:1230
415
  msgid "New"
416
  msgstr ""
417
 
418
+ #: includes/admin/class-aepc-admin-view.php:1231
419
  msgid "Refurbished"
420
  msgstr ""
421
 
422
+ #: includes/admin/class-aepc-admin-view.php:1232
423
  msgid "Used"
424
  msgstr ""
425
 
426
+ #: includes/admin/class-aepc-admin-view.php:1243
427
  msgid "Thumbnail"
428
  msgstr ""
429
 
430
+ #: includes/admin/class-aepc-admin-view.php:1244
431
  msgid "Medium"
432
  msgstr ""
433
 
434
+ #: includes/admin/class-aepc-admin-view.php:1245
435
  msgid "Large"
436
  msgstr ""
437
 
438
+ #: includes/admin/class-aepc-admin-view.php:1246
439
  msgid "Full Size"
440
  msgstr ""
441
 
442
+ #: includes/admin/class-aepc-admin-view.php:1258
443
  msgid "Every Sunday"
444
  msgstr ""
445
 
446
+ #: includes/admin/class-aepc-admin-view.php:1259
447
  msgid "Every Monday"
448
  msgstr ""
449
 
450
+ #: includes/admin/class-aepc-admin-view.php:1260
451
  msgid "Every Tuesday"
452
  msgstr ""
453
 
454
+ #: includes/admin/class-aepc-admin-view.php:1261
455
  msgid "Every Wednesday"
456
  msgstr ""
457
 
458
+ #: includes/admin/class-aepc-admin-view.php:1262
459
  msgid "Every Thursday"
460
  msgstr ""
461
 
462
+ #: includes/admin/class-aepc-admin-view.php:1263
463
  msgid "Every Friday"
464
  msgstr ""
465
 
466
+ #: includes/admin/class-aepc-admin-view.php:1264
467
  msgid "Every Saturday"
468
  msgstr ""
469
 
470
+ #: includes/admin/class-aepc-admin.php:126
471
  msgid "Dashboard"
472
  msgstr ""
473
 
474
+ #: includes/admin/class-aepc-admin.php:127
475
  msgid "Settings"
476
  msgstr ""
477
 
478
+ #: includes/admin/class-aepc-admin.php:271
479
  msgid "The Pixel ID value must contains only numbers and must be 15 digits length."
480
  msgstr ""
481
 
482
+ #: includes/admin/class-aepc-admin.php:280
483
  msgid "<strong>Some option cannot be saved</strong> Please, check errors below."
484
  msgstr ""
485
 
486
+ #: includes/admin/class-aepc-admin.php:374
487
  msgid "Please, check fields errors below."
488
  msgstr ""
489
 
490
+ #: includes/admin/class-aepc-admin.php:524
491
  msgid ""
492
  "You have unsaved changes on this page. Do you want to leave this page and "
493
  "discard your changes or stay on this page?"
494
  msgstr ""
495
 
496
+ #: includes/admin/class-aepc-admin.php:525
497
  msgid "You need to save!"
498
  msgstr ""
499
 
500
+ #: includes/admin/class-aepc-admin.php:527
501
+ #: includes/admin/class-aepc-admin.php:538
502
  msgid "Saving..."
503
  msgstr ""
504
 
505
+ #: includes/admin/class-aepc-admin.php:529
506
  msgid "Copied!"
507
  msgstr ""
508
 
509
+ #: includes/admin/class-aepc-admin.php:530
510
  msgid "No support :("
511
  msgstr ""
512
 
513
+ #: includes/admin/class-aepc-admin.php:531
514
  msgid "Press ⌘-{{{ key }}} to copy"
515
  msgstr ""
516
 
517
+ #: includes/admin/class-aepc-admin.php:532
518
  msgid "Press Ctrl-{{{ key }}} to copy"
519
  msgstr ""
520
 
521
+ #: includes/admin/class-aepc-admin.php:533
522
  msgid "Press ⌘-{{{ key }}} to cut"
523
  msgstr ""
524
 
525
+ #: includes/admin/class-aepc-admin.php:534
526
  msgid "Press Ctrl-{{{ key }}} to cut"
527
  msgstr ""
528
 
529
+ #: includes/admin/class-aepc-admin.php:537
530
  msgid "Write the key or select from below"
531
  msgstr ""
532
 
533
+ #: includes/admin/class-aepc-admin.php:539
534
  msgid "<strong>Can't add filter</strong> You have to select an event type"
535
  msgstr ""
536
 
537
+ #: includes/admin/class-aepc-admin.php:540
538
  msgid "<strong>Can't add filter</strong> You have to define at least one condition"
539
  msgstr ""
540
 
541
+ #: includes/admin/class-aepc-admin.php:542
542
  msgid "Select an account ID"
543
  msgstr ""
544
 
545
+ #: includes/admin/class-aepc-admin.php:543
546
  msgid "No Ad account found"
547
  msgstr ""
548
 
549
+ #: includes/admin/class-aepc-admin.php:544
550
  msgid "No pixel found"
551
  msgstr ""
552
 
553
+ #: includes/admin/class-aepc-admin.php:545
554
  msgid "No products feeds found"
555
  msgstr ""
556
 
557
+ #: includes/admin/class-aepc-admin.php:547
558
  #: includes/admin/templates/parts/activity-box.php:29
559
  msgid "Today"
560
  msgstr ""
561
 
562
+ #: includes/admin/class-aepc-admin.php:548
563
  #: includes/admin/templates/parts/activity-box.php:30
564
  msgid "Yesterday"
565
  msgstr ""
566
 
567
+ #: includes/admin/class-aepc-admin.php:549
568
  msgid "2 Days"
569
  msgstr ""
570
 
571
+ #: includes/admin/class-aepc-admin.php:550
572
  msgid "7 Days"
573
  msgstr ""
574
 
575
+ #: includes/admin/class-aepc-admin.php:551
576
  msgid "14 Days"
577
  msgstr ""
578
 
579
+ #: includes/admin/class-aepc-admin.php:717
580
  msgid "<strong>RSS Error</strong>: %s"
581
  msgstr ""
582
 
583
+ #: includes/admin/class-aepc-admin.php:729
584
  msgid ""
585
  "An error has occurred, which probably means the feed is down. Try again "
586
  "later."
587
  msgstr ""
588
 
589
+ #: includes/admin/class-aepc-admin.php:819
590
+ msgid ""
591
+ "<strong>PIXEL CAFFEINE WARNING</strong>: By November 2nd, it will be "
592
+ "mandatory to enable the Two-Factor Authentication in your Facebook account "
593
+ "in order to connect to Facebook APIs. Please, be sure to %senable the TFA "
594
+ "in your account%s in order to continue to use the Pixel Caffeine features."
595
+ msgstr ""
596
+
597
+ #: includes/admin/class-aepc-facebook-adapter.php:151
598
  msgid "Empty Token"
599
  msgstr ""
600
 
601
+ #: includes/admin/class-aepc-facebook-adapter.php:161
602
  msgid "Expired Token"
603
  msgstr ""
604
 
605
+ #: includes/admin/class-aepc-facebook-adapter.php:169
606
  msgid "Invalid login, please try again."
607
  msgstr ""
608
 
609
+ #: includes/admin/class-aepc-facebook-adapter.php:202
610
  msgid "Please, grant the permissions requested"
611
  msgstr ""
612
 
613
+ #: includes/admin/class-aepc-facebook-adapter.php:204
614
  msgid "Please, grant the permissions: %s"
615
  msgstr ""
616
 
617
+ #: includes/admin/class-aepc-facebook-adapter.php:207
618
  msgid "Facebook authentication error"
619
  msgstr ""
620
 
621
+ #: includes/admin/class-aepc-facebook-adapter.php:221
622
  msgid ""
623
  "<strong>Facebook connected</strong> Your facebook account is properly "
624
  "connected now."
625
  msgstr ""
626
 
627
+ #: includes/admin/class-aepc-facebook-adapter.php:376
628
  msgid ""
629
  "Please, connect your facebook account to make operations to the custom "
630
  "audiences of your Ad account."
631
  msgstr ""
632
 
633
+ #: includes/admin/class-aepc-facebook-adapter.php:421
634
  msgid ""
635
  "Something went wrong during the connection with Facebook API. Please, try "
636
  "to %1$srefresh the page%2$s."
637
  msgstr ""
638
 
639
+ #: includes/admin/class-aepc-facebook-adapter.php:434
640
  msgid ""
641
  "Cannot save on facebook account because of something gone wrong during "
642
  "facebook connection."
643
  msgstr ""
644
 
645
+ #: includes/admin/class-aepc-facebook-adapter.php:440
646
  msgid ""
647
  "The request goes in error from your server due by some oldest version of "
648
  "\"cUrl\" package. Please, ask to your hosting to upgrade it in order to fix "
651
  "service, to give their more details about the issue."
652
  msgstr ""
653
 
654
+ #: includes/admin/class-aepc-facebook-adapter.php:456
655
  msgid "Facebook connection timed out. Please, login again from %shere%s"
656
  msgstr ""
657
 
658
+ #: includes/admin/class-aepc-facebook-adapter.php:479
659
  msgid ""
660
  "Facebook connection timed out or you need to authorize again. Please, login "
661
  "again from %shere%s"
662
  msgstr ""
663
 
664
+ #: includes/admin/class-aepc-facebook-adapter.php:480
665
  msgid "Permission error: %s"
666
  msgstr ""
667
 
668
+ #: includes/admin/class-aepc-facebook-adapter.php:481
669
  msgid "This Ads action requires the user to be admin of the application."
670
  msgstr ""
671
 
672
+ #: includes/admin/class-aepc-facebook-adapter.php:482
673
  msgid "This Ads action requires the user to be admin of the ad account."
674
  msgstr ""
675
 
676
+ #: includes/admin/class-aepc-facebook-adapter.php:483
677
  msgid ""
678
  "The ad account is not enabled for usage in Ads API. Please add it in "
679
  "developers.facebook.com/apps -> select your app -> settings -> advanced -> "
680
  "advertising accounts -> Ads API."
681
  msgstr ""
682
 
683
+ #: includes/admin/class-aepc-facebook-adapter.php:484
684
  msgid "The facebook object you are trying to use does not exist."
685
  msgstr ""
686
 
687
+ #: includes/admin/class-aepc-facebook-adapter.php:485
688
  msgid "You have to extend permission for ads_read to complete the action."
689
  msgstr ""
690
 
691
+ #: includes/admin/class-aepc-facebook-adapter.php:486
692
  msgid "You have to extend permission for ads_management to complete the action."
693
  msgstr ""
694
 
695
+ #: includes/admin/class-aepc-facebook-adapter.php:487
696
  msgid "Failed to update the custom audience."
697
  msgstr ""
698
 
699
+ #: includes/admin/class-aepc-facebook-adapter.php:488
700
  msgid "Failed to create lookalike custom audience."
701
  msgstr ""
702
 
703
+ #: includes/admin/class-aepc-facebook-adapter.php:489
704
  msgid "Failed to create custom audience on your facebook account."
705
  msgstr ""
706
 
707
+ #: includes/admin/class-aepc-facebook-adapter.php:490
708
  msgid ""
709
  "Terms of service has not been accepted. To accept, go to "
710
  "https://www.facebook.com/ads/manage/customaudiences/tos.php"
711
  msgstr ""
712
 
713
+ #: includes/admin/class-aepc-facebook-adapter.php:491
714
  msgid "Failed to delete custom audience because associated lookalikes exist."
715
  msgstr ""
716
 
717
+ #: includes/admin/class-aepc-facebook-adapter.php:492
718
  msgid ""
719
  "Terms of service has not been accepted. To accept, go to "
720
  "https://www.facebook.com/customaudiences/app/tos"
721
  msgstr ""
722
 
723
+ #: includes/admin/class-aepc-facebook-adapter.php:493
724
  msgid ""
725
  "The corporate terms of service has not been accepted. To accept, go to "
726
  "https://business.facebook.com/ads/manage/customaudiences/tos.php"
727
  msgstr ""
728
 
729
+ #: includes/admin/class-aepc-facebook-adapter.php:494
730
  msgid "Specified audience is too small."
731
  msgstr ""
732
 
733
+ #: includes/admin/class-aepc-facebook-adapter.php:1027
734
  msgid ""
735
  "Unable to create a product catalog because there isn't any business ID "
736
  "associated to your Ad account."
1145
 
1146
  #: includes/admin/templates/parts/fb-connect-logged-in.php:19
1147
  #: includes/admin/templates/parts/fb-connect-logged-out.php:20
1148
+ #: includes/admin/templates/parts/fb-connect-logged-out.php:34
1149
  #: includes/admin/templates/parts/fb-connect-to-setup.php:21
1150
  msgid "Facebook Connect"
1151
  msgstr ""
1186
  "Connect your Facebook account and you're good to go!"
1187
  msgstr ""
1188
 
1189
+ #: includes/admin/templates/parts/fb-connect-logged-out.php:27
1190
+ msgid ""
1191
+ "<strong>Warning: </strong> You must have the Two-factor Authentication "
1192
+ "%senabled in your Facebook Account%s!"
1193
+ msgstr ""
1194
+
1195
  #: includes/admin/templates/parts/fb-connect-to-setup.php:22
1196
  msgid "One Click Setup Through Facebook. Recommended option!"
1197
  msgstr ""
1669
  "be working successfully according to your server configuration."
1670
  msgstr ""
1671
 
1672
+ #: includes/admin/templates/parts/forms/product-catalog.php:367
1673
  msgid "Save the feed file in a background process."
1674
  msgstr ""
1675
 
1676
+ #: includes/admin/templates/parts/forms/product-catalog.php:375
1677
+ msgid "Chunk limit"
1678
+ msgstr ""
1679
+
1680
+ #: includes/admin/templates/parts/forms/product-catalog.php:386
1681
+ msgid ""
1682
+ "When using the background saving, the list of products to save are divided "
1683
+ "in more chunks in multiple processes, in order to perform the saving "
1684
+ "progressively with less items for each process, depending on the power of "
1685
+ "your server. Decrease this number if the feed saving can't be completed "
1686
+ "properly."
1687
+ msgstr ""
1688
+
1689
+ #: includes/admin/templates/parts/forms/product-catalog.php:393
1690
  msgid "Use SKU"
1691
  msgstr ""
1692
 
1693
+ #: includes/admin/templates/parts/forms/product-catalog.php:408
1694
  msgid "Use SKU as ID in the product feed. If no sku, it gets the ID for default."
1695
  msgstr ""
1696
 
1697
+ #: includes/admin/templates/parts/forms/product-catalog.php:422
1698
  msgid "Filter by plugin"
1699
  msgstr ""
1700
 
1701
+ #: includes/admin/templates/parts/forms/product-catalog.php:447
1702
  msgid "Filter by product type"
1703
  msgstr ""
1704
 
1705
+ #: includes/admin/templates/parts/forms/product-catalog.php:459
1706
  msgid ""
1707
  "Select if you want only product with certain type to include in the feed. "
1708
  "Leave empty to not use this filter"
1709
  msgstr ""
1710
 
1711
+ #: includes/admin/templates/parts/forms/product-catalog.php:466
1712
  msgid "Filter by product category"
1713
  msgstr ""
1714
 
1715
+ #: includes/admin/templates/parts/forms/product-catalog.php:478
1716
  msgid ""
1717
  "Select the categories of products to include in the feed. Leave empty to "
1718
  "not use this filter"
1719
  msgstr ""
1720
 
1721
+ #: includes/admin/templates/parts/forms/product-catalog.php:485
1722
  msgid "Filter by product tag"
1723
  msgstr ""
1724
 
1725
+ #: includes/admin/templates/parts/forms/product-catalog.php:497
1726
  msgid ""
1727
  "Select the tags of products to include in the feed. Leave empty to not use "
1728
  "this filter"
1729
  msgstr ""
1730
 
1731
+ #: includes/admin/templates/parts/forms/product-catalog.php:504
1732
  msgid "Filter by product stock"
1733
  msgstr ""
1734
 
1735
+ #: includes/admin/templates/parts/forms/product-catalog.php:514
1736
  msgid "In Stock"
1737
  msgstr ""
1738
 
1739
+ #: includes/admin/templates/parts/forms/product-catalog.php:515
1740
  msgid "Out of Stock"
1741
  msgstr ""
1742
 
1743
+ #: includes/admin/templates/parts/forms/product-catalog.php:516
1744
  msgid "Pre-Order"
1745
  msgstr ""
1746
 
1747
+ #: includes/admin/templates/parts/forms/product-catalog.php:517
1748
  msgid "Discountinued"
1749
  msgstr ""
1750
 
1751
+ #: includes/admin/templates/parts/forms/product-catalog.php:518
1752
  msgid "Available for order"
1753
  msgstr ""
1754
 
1755
+ #: includes/admin/templates/parts/forms/product-catalog.php:522
1756
  msgid ""
1757
  "Include what products to include in base of stock status. Leave empty to "
1758
  "include all products of all stock status."
1759
  msgstr ""
1760
 
1761
+ #: includes/admin/templates/parts/forms/product-catalog.php:529
1762
  msgid "Filter products on sale"
1763
  msgstr ""
1764
 
1765
+ #: includes/admin/templates/parts/forms/product-catalog.php:544
1766
  msgid "Check this option if you want <strong>only</strong> products on sale."
1767
  msgstr ""
1768
 
1769
+ #: includes/admin/templates/parts/forms/product-catalog.php:551
1770
  msgid "No Variations"
1771
  msgstr ""
1772
 
1773
+ #: includes/admin/templates/parts/forms/product-catalog.php:566
1774
  msgid "Remove the variations from the feed."
1775
  msgstr ""
1776
 
1777
+ #: includes/admin/templates/parts/forms/product-catalog.php:575
1778
  msgid "Special mapping"
1779
  msgstr ""
1780
 
1781
+ #: includes/admin/templates/parts/forms/product-catalog.php:577
1782
  msgid ""
1783
  "Here you can map some of the fields you can define inside the feed. Here a "
1784
  "reference of a full field list: %s"
1785
  msgstr ""
1786
 
1787
+ #: includes/admin/templates/parts/forms/product-catalog.php:749
1788
  msgid "Generate Feed File"
1789
  msgstr ""
1790
 
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.3
11
  * WC requires at least: 3.0.0
12
- * WC tested up to: 4.0.1
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.3
28
  */
29
  final class PixelCaffeine {
30
 
31
  /** @var string PixelCaffeine version. */
32
- public $version = '2.1.3';
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.4
11
  * WC requires at least: 3.0.0
12
+ * WC tested up to: 4.5.2
13
  *
14
  * @package PixelCaffeine
15
  */
24
  * Main PixelCaffeine Class.
25
  *
26
  * @class PixelCaffeine
27
+ * @version 2.1.4
28
  */
29
  final class PixelCaffeine {
30
 
31
  /** @var string PixelCaffeine version. */
32
+ public $version = '2.1.4';
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.4.1
8
- Stable tag: 2.1.3
9
  License: GPLv3
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
11
 
@@ -124,6 +124,19 @@ Unfortunately there isn’t any way at the moment to import custom audiences _fr
124
 
125
  == Changelog ==
126
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
  = 2.1.3 - 2020-06-04 =
128
  * Add - PHP 7.4 support
129
  * Fix - Fatal error: Replace Monolog library with custom logging because conflicts with other versions used by other plugins that causing website crashing
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.5.1
8
+ Stable tag: 2.1.4
9
  License: GPLv3
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
11
 
124
 
125
  == Changelog ==
126
 
127
+ = 2.1.4 - 2020-09-29 =
128
+ * **WARNING** - By November 2nd, it will be mandatory to enable the Two-Factor Authentication in your Facebook account in order to connect to Facebook APIs. Please, be sure to enable the TFA in your account in order to continue to use the Pixel Caffeine features.
129
+ * Add - Option to adjust the number of the chunk for the background saving (useful when the server can't complete the feed generation because of lower power)
130
+ * Enhancement - Avoid to trigger undefined variables when the pixel scripts are delayed through the WP Rocket feature for performance
131
+ * Enhancement - Delete all Pixel IDs info after the connection reset
132
+ * Fix - Fatal error on 404 page with the error "Uncaught Error: Call to a member function get() on null" (thanks @bheadrick)
133
+ * Fix - Security fixes
134
+ * Fix - Missing Pixel IDs after selecting an Ad Account inside a Business Account
135
+ * Fix - Fix value parameter in AddToCart event in the latest version of WooCoommerce
136
+ * Fix - Missing parameters into the AddToCart event
137
+ * Fix - Generic carousels stopped to work because of added category meta into the product element of WooCommerce
138
+ * Fix - Fix feed checkout_url parameter for variable products whose point to the cart instead of product page
139
+
140
  = 2.1.3 - 2020-06-04 =
141
  * Add - PHP 7.4 support
142
  * Fix - Fatal error: Replace Monolog library with custom logging because conflicts with other versions used by other plugins that causing website crashing
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit8643d6565db133891a66b89539172820::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitbf90535f3b00188228dcb8aef4dd9b90::getLoader();
vendor/composer/autoload_files.php CHANGED
@@ -7,4 +7,6 @@ $baseDir = dirname($vendorDir);
7
 
8
  return array(
9
  '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
 
 
10
  );
7
 
8
  return array(
9
  '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
10
+ '5255c38a0faeba867671b61dfda6d864' => $vendorDir . '/paragonie/random_compat/lib/random.php',
11
+ 'e39a8b23c42d4e1452234d762b03835a' => $vendorDir . '/ramsey/uuid/src/functions.php',
12
  );
vendor/composer/autoload_psr4.php CHANGED
@@ -8,5 +8,6 @@ $baseDir = dirname($vendorDir);
8
  return array(
9
  'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'),
10
  'Symfony\\Component\\Filesystem\\' => array($vendorDir . '/symfony/filesystem'),
 
11
  'Firebase\\JWT\\' => array($vendorDir . '/firebase/php-jwt/src'),
12
  );
8
  return array(
9
  'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'),
10
  'Symfony\\Component\\Filesystem\\' => array($vendorDir . '/symfony/filesystem'),
11
+ 'Ramsey\\Uuid\\' => array($vendorDir . '/ramsey/uuid/src'),
12
  'Firebase\\JWT\\' => array($vendorDir . '/firebase/php-jwt/src'),
13
  );
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit8643d6565db133891a66b89539172820
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit8643d6565db133891a66b89539172820
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit8643d6565db133891a66b89539172820', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit8643d6565db133891a66b89539172820', '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\ComposerStaticInit8643d6565db133891a66b89539172820::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
@@ -48,19 +48,19 @@ class ComposerAutoloaderInit8643d6565db133891a66b89539172820
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
- $includeFiles = Composer\Autoload\ComposerStaticInit8643d6565db133891a66b89539172820::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
- composerRequire8643d6565db133891a66b89539172820($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
- function composerRequire8643d6565db133891a66b89539172820($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 ComposerAutoloaderInitbf90535f3b00188228dcb8aef4dd9b90
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInitbf90535f3b00188228dcb8aef4dd9b90', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInitbf90535f3b00188228dcb8aef4dd9b90', '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\ComposerStaticInitbf90535f3b00188228dcb8aef4dd9b90::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\ComposerStaticInitbf90535f3b00188228dcb8aef4dd9b90::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
+ composerRequirebf90535f3b00188228dcb8aef4dd9b90($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
+ function composerRequirebf90535f3b00188228dcb8aef4dd9b90($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,10 +4,12 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit8643d6565db133891a66b89539172820
8
  {
9
  public static $files = array (
10
  '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
 
 
11
  );
12
 
13
  public static $prefixLengthsPsr4 = array (
@@ -16,6 +18,10 @@ class ComposerStaticInit8643d6565db133891a66b89539172820
16
  'Symfony\\Polyfill\\Ctype\\' => 23,
17
  'Symfony\\Component\\Filesystem\\' => 29,
18
  ),
 
 
 
 
19
  'F' =>
20
  array (
21
  'Firebase\\JWT\\' => 13,
@@ -31,6 +37,10 @@ class ComposerStaticInit8643d6565db133891a66b89539172820
31
  array (
32
  0 => __DIR__ . '/..' . '/symfony/filesystem',
33
  ),
 
 
 
 
34
  'Firebase\\JWT\\' =>
35
  array (
36
  0 => __DIR__ . '/..' . '/firebase/php-jwt/src',
@@ -96,9 +106,9 @@ class ComposerStaticInit8643d6565db133891a66b89539172820
96
  public static function getInitializer(ClassLoader $loader)
97
  {
98
  return \Closure::bind(function () use ($loader) {
99
- $loader->prefixLengthsPsr4 = ComposerStaticInit8643d6565db133891a66b89539172820::$prefixLengthsPsr4;
100
- $loader->prefixDirsPsr4 = ComposerStaticInit8643d6565db133891a66b89539172820::$prefixDirsPsr4;
101
- $loader->classMap = ComposerStaticInit8643d6565db133891a66b89539172820::$classMap;
102
 
103
  }, null, ClassLoader::class);
104
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInitbf90535f3b00188228dcb8aef4dd9b90
8
  {
9
  public static $files = array (
10
  '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
11
+ '5255c38a0faeba867671b61dfda6d864' => __DIR__ . '/..' . '/paragonie/random_compat/lib/random.php',
12
+ 'e39a8b23c42d4e1452234d762b03835a' => __DIR__ . '/..' . '/ramsey/uuid/src/functions.php',
13
  );
14
 
15
  public static $prefixLengthsPsr4 = array (
18
  'Symfony\\Polyfill\\Ctype\\' => 23,
19
  'Symfony\\Component\\Filesystem\\' => 29,
20
  ),
21
+ 'R' =>
22
+ array (
23
+ 'Ramsey\\Uuid\\' => 12,
24
+ ),
25
  'F' =>
26
  array (
27
  'Firebase\\JWT\\' => 13,
37
  array (
38
  0 => __DIR__ . '/..' . '/symfony/filesystem',
39
  ),
40
+ 'Ramsey\\Uuid\\' =>
41
+ array (
42
+ 0 => __DIR__ . '/..' . '/ramsey/uuid/src',
43
+ ),
44
  'Firebase\\JWT\\' =>
45
  array (
46
  0 => __DIR__ . '/..' . '/firebase/php-jwt/src',
106
  public static function getInitializer(ClassLoader $loader)
107
  {
108
  return \Closure::bind(function () use ($loader) {
109
+ $loader->prefixLengthsPsr4 = ComposerStaticInitbf90535f3b00188228dcb8aef4dd9b90::$prefixLengthsPsr4;
110
+ $loader->prefixDirsPsr4 = ComposerStaticInitbf90535f3b00188228dcb8aef4dd9b90::$prefixDirsPsr4;
111
+ $loader->classMap = ComposerStaticInitbf90535f3b00188228dcb8aef4dd9b90::$classMap;
112
 
113
  }, null, ClassLoader::class);
114
  }
vendor/composer/installed.json CHANGED
@@ -82,6 +82,146 @@
82
  "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.",
83
  "homepage": "https://github.com/firebase/php-jwt"
84
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  {
86
  "name": "symfony/filesystem",
87
  "version": "v2.8.50",
82
  "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.",
83
  "homepage": "https://github.com/firebase/php-jwt"
84
  },
85
+ {
86
+ "name": "paragonie/random_compat",
87
+ "version": "v2.0.18",
88
+ "version_normalized": "2.0.18.0",
89
+ "source": {
90
+ "type": "git",
91
+ "url": "https://github.com/paragonie/random_compat.git",
92
+ "reference": "0a58ef6e3146256cc3dc7cc393927bcc7d1b72db"
93
+ },
94
+ "dist": {
95
+ "type": "zip",
96
+ "url": "https://api.github.com/repos/paragonie/random_compat/zipball/0a58ef6e3146256cc3dc7cc393927bcc7d1b72db",
97
+ "reference": "0a58ef6e3146256cc3dc7cc393927bcc7d1b72db",
98
+ "shasum": ""
99
+ },
100
+ "require": {
101
+ "php": ">=5.2.0"
102
+ },
103
+ "require-dev": {
104
+ "phpunit/phpunit": "4.*|5.*"
105
+ },
106
+ "suggest": {
107
+ "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes."
108
+ },
109
+ "time": "2019-01-03T20:59:08+00:00",
110
+ "type": "library",
111
+ "installation-source": "dist",
112
+ "autoload": {
113
+ "files": [
114
+ "lib/random.php"
115
+ ]
116
+ },
117
+ "notification-url": "https://packagist.org/downloads/",
118
+ "license": [
119
+ "MIT"
120
+ ],
121
+ "authors": [
122
+ {
123
+ "name": "Paragon Initiative Enterprises",
124
+ "email": "security@paragonie.com",
125
+ "homepage": "https://paragonie.com"
126
+ }
127
+ ],
128
+ "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7",
129
+ "keywords": [
130
+ "csprng",
131
+ "polyfill",
132
+ "pseudorandom",
133
+ "random"
134
+ ]
135
+ },
136
+ {
137
+ "name": "ramsey/uuid",
138
+ "version": "3.9.3",
139
+ "version_normalized": "3.9.3.0",
140
+ "source": {
141
+ "type": "git",
142
+ "url": "https://github.com/ramsey/uuid.git",
143
+ "reference": "7e1633a6964b48589b142d60542f9ed31bd37a92"
144
+ },
145
+ "dist": {
146
+ "type": "zip",
147
+ "url": "https://api.github.com/repos/ramsey/uuid/zipball/7e1633a6964b48589b142d60542f9ed31bd37a92",
148
+ "reference": "7e1633a6964b48589b142d60542f9ed31bd37a92",
149
+ "shasum": ""
150
+ },
151
+ "require": {
152
+ "ext-json": "*",
153
+ "paragonie/random_compat": "^1 | ^2 | 9.99.99",
154
+ "php": "^5.4 | ^7 | ^8",
155
+ "symfony/polyfill-ctype": "^1.8"
156
+ },
157
+ "replace": {
158
+ "rhumsaa/uuid": "self.version"
159
+ },
160
+ "require-dev": {
161
+ "codeception/aspect-mock": "^1 | ^2",
162
+ "doctrine/annotations": "^1.2",
163
+ "goaop/framework": "1.0.0-alpha.2 | ^1 | ^2.1",
164
+ "jakub-onderka/php-parallel-lint": "^1",
165
+ "mockery/mockery": "^0.9.11 | ^1",
166
+ "moontoast/math": "^1.1",
167
+ "paragonie/random-lib": "^2",
168
+ "php-mock/php-mock-phpunit": "^0.3 | ^1.1",
169
+ "phpunit/phpunit": "^4.8 | ^5.4 | ^6.5",
170
+ "squizlabs/php_codesniffer": "^3.5"
171
+ },
172
+ "suggest": {
173
+ "ext-ctype": "Provides support for PHP Ctype functions",
174
+ "ext-libsodium": "Provides the PECL libsodium extension for use with the SodiumRandomGenerator",
175
+ "ext-openssl": "Provides the OpenSSL extension for use with the OpenSslGenerator",
176
+ "ext-uuid": "Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator",
177
+ "moontoast/math": "Provides support for converting UUID to 128-bit integer (in string form).",
178
+ "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter",
179
+ "ramsey/uuid-console": "A console application for generating UUIDs with ramsey/uuid",
180
+ "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type."
181
+ },
182
+ "time": "2020-02-21T04:36:14+00:00",
183
+ "type": "library",
184
+ "extra": {
185
+ "branch-alias": {
186
+ "dev-master": "3.x-dev"
187
+ }
188
+ },
189
+ "installation-source": "dist",
190
+ "autoload": {
191
+ "psr-4": {
192
+ "Ramsey\\Uuid\\": "src/"
193
+ },
194
+ "files": [
195
+ "src/functions.php"
196
+ ]
197
+ },
198
+ "notification-url": "https://packagist.org/downloads/",
199
+ "license": [
200
+ "MIT"
201
+ ],
202
+ "authors": [
203
+ {
204
+ "name": "Ben Ramsey",
205
+ "email": "ben@benramsey.com",
206
+ "homepage": "https://benramsey.com"
207
+ },
208
+ {
209
+ "name": "Marijn Huizendveld",
210
+ "email": "marijn.huizendveld@gmail.com"
211
+ },
212
+ {
213
+ "name": "Thibaud Fabre",
214
+ "email": "thibaud@aztech.io"
215
+ }
216
+ ],
217
+ "description": "Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).",
218
+ "homepage": "https://github.com/ramsey/uuid",
219
+ "keywords": [
220
+ "guid",
221
+ "identifier",
222
+ "uuid"
223
+ ]
224
+ },
225
  {
226
  "name": "symfony/filesystem",
227
  "version": "v2.8.50",
vendor/paragonie/random_compat/LICENSE ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Paragon Initiative Enterprises
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
vendor/paragonie/random_compat/dist/random_compat.phar.pubkey ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ -----BEGIN PUBLIC KEY-----
2
+ MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEEd+wCqJDrx5B4OldM0dQE0ZMX+lx1ZWm
3
+ pui0SUqD4G29L3NGsz9UhJ/0HjBdbnkhIK5xviT0X5vtjacF6ajgcCArbTB+ds+p
4
+ +h7Q084NuSuIpNb6YPfoUFgC/CL9kAoc
5
+ -----END PUBLIC KEY-----
vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ -----BEGIN PGP SIGNATURE-----
2
+ Version: GnuPG v2.0.22 (MingW32)
3
+
4
+ iQEcBAABAgAGBQJWtW1hAAoJEGuXocKCZATaJf0H+wbZGgskK1dcRTsuVJl9IWip
5
+ QwGw/qIKI280SD6/ckoUMxKDCJiFuPR14zmqnS36k7N5UNPnpdTJTS8T11jttSpg
6
+ 1LCmgpbEIpgaTah+cELDqFCav99fS+bEiAL5lWDAHBTE/XPjGVCqeehyPYref4IW
7
+ NDBIEsvnHPHPLsn6X5jq4+Yj5oUixgxaMPiR+bcO4Sh+RzOVB6i2D0upWfRXBFXA
8
+ NNnsg9/zjvoC7ZW73y9uSH+dPJTt/Vgfeiv52/v41XliyzbUyLalf02GNPY+9goV
9
+ JHG1ulEEBJOCiUD9cE1PUIJwHA/HqyhHIvV350YoEFiHl8iSwm7SiZu5kPjaq74=
10
+ =B6+8
11
+ -----END PGP SIGNATURE-----
vendor/paragonie/random_compat/lib/byte_safe_strings.php ADDED
@@ -0,0 +1,195 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Random_* Compatibility Library
4
+ * for using the new PHP 7 random_* API in PHP 5 projects
5
+ *
6
+ * The MIT License (MIT)
7
+ *
8
+ * Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
9
+ *
10
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ * of this software and associated documentation files (the "Software"), to deal
12
+ * in the Software without restriction, including without limitation the rights
13
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ * copies of the Software, and to permit persons to whom the Software is
15
+ * furnished to do so, subject to the following conditions:
16
+ *
17
+ * The above copyright notice and this permission notice shall be included in
18
+ * all copies or substantial portions of the Software.
19
+ *
20
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ * SOFTWARE.
27
+ */
28
+
29
+ if (!is_callable('RandomCompat_strlen')) {
30
+ if (
31
+ defined('MB_OVERLOAD_STRING')
32
+ &&
33
+ ((int) ini_get('mbstring.func_overload')) & MB_OVERLOAD_STRING
34
+ ) {
35
+ /**
36
+ * strlen() implementation that isn't brittle to mbstring.func_overload
37
+ *
38
+ * This version uses mb_strlen() in '8bit' mode to treat strings as raw
39
+ * binary rather than UTF-8, ISO-8859-1, etc
40
+ *
41
+ * @param string $binary_string
42
+ *
43
+ * @throws TypeError
44
+ *
45
+ * @return int
46
+ */
47
+ function RandomCompat_strlen($binary_string)
48
+ {
49
+ if (!is_string($binary_string)) {
50
+ throw new TypeError(
51
+ 'RandomCompat_strlen() expects a string'
52
+ );
53
+ }
54
+
55
+ return (int) mb_strlen($binary_string, '8bit');
56
+ }
57
+
58
+ } else {
59
+ /**
60
+ * strlen() implementation that isn't brittle to mbstring.func_overload
61
+ *
62
+ * This version just used the default strlen()
63
+ *
64
+ * @param string $binary_string
65
+ *
66
+ * @throws TypeError
67
+ *
68
+ * @return int
69
+ */
70
+ function RandomCompat_strlen($binary_string)
71
+ {
72
+ if (!is_string($binary_string)) {
73
+ throw new TypeError(
74
+ 'RandomCompat_strlen() expects a string'
75
+ );
76
+ }
77
+ return (int) strlen($binary_string);
78
+ }
79
+ }
80
+ }
81
+
82
+ if (!is_callable('RandomCompat_substr')) {
83
+
84
+ if (
85
+ defined('MB_OVERLOAD_STRING')
86
+ &&
87
+ ((int) ini_get('mbstring.func_overload')) & MB_OVERLOAD_STRING
88
+ ) {
89
+ /**
90
+ * substr() implementation that isn't brittle to mbstring.func_overload
91
+ *
92
+ * This version uses mb_substr() in '8bit' mode to treat strings as raw
93
+ * binary rather than UTF-8, ISO-8859-1, etc
94
+ *
95
+ * @param string $binary_string
96
+ * @param int $start
97
+ * @param int|null $length (optional)
98
+ *
99
+ * @throws TypeError
100
+ *
101
+ * @return string
102
+ */
103
+ function RandomCompat_substr($binary_string, $start, $length = null)
104
+ {
105
+ if (!is_string($binary_string)) {
106
+ throw new TypeError(
107
+ 'RandomCompat_substr(): First argument should be a string'
108
+ );
109
+ }
110
+
111
+ if (!is_int($start)) {
112
+ throw new TypeError(
113
+ 'RandomCompat_substr(): Second argument should be an integer'
114
+ );
115
+ }
116
+
117
+ if ($length === null) {
118
+ /**
119
+ * mb_substr($str, 0, NULL, '8bit') returns an empty string on
120
+ * PHP 5.3, so we have to find the length ourselves.
121
+ */
122
+ /** @var int $length */
123
+ $length = RandomCompat_strlen($binary_string) - $start;
124
+ } elseif (!is_int($length)) {
125
+ throw new TypeError(
126
+ 'RandomCompat_substr(): Third argument should be an integer, or omitted'
127
+ );
128
+ }
129
+
130
+ // Consistency with PHP's behavior
131
+ if ($start === RandomCompat_strlen($binary_string) && $length === 0) {
132
+ return '';
133
+ }
134
+ if ($start > RandomCompat_strlen($binary_string)) {
135
+ return '';
136
+ }
137
+
138
+ return (string) mb_substr(
139
+ (string) $binary_string,
140
+ (int) $start,
141
+ (int) $length,
142
+ '8bit'
143
+ );
144
+ }
145
+
146
+ } else {
147
+
148
+ /**
149
+ * substr() implementation that isn't brittle to mbstring.func_overload
150
+ *
151
+ * This version just uses the default substr()
152
+ *
153
+ * @param string $binary_string
154
+ * @param int $start
155
+ * @param int|null $length (optional)
156
+ *
157
+ * @throws TypeError
158
+ *
159
+ * @return string
160
+ */
161
+ function RandomCompat_substr($binary_string, $start, $length = null)
162
+ {
163
+ if (!is_string($binary_string)) {
164
+ throw new TypeError(
165
+ 'RandomCompat_substr(): First argument should be a string'
166
+ );
167
+ }
168
+
169
+ if (!is_int($start)) {
170
+ throw new TypeError(
171
+ 'RandomCompat_substr(): Second argument should be an integer'
172
+ );
173
+ }
174
+
175
+ if ($length !== null) {
176
+ if (!is_int($length)) {
177
+ throw new TypeError(
178
+ 'RandomCompat_substr(): Third argument should be an integer, or omitted'
179
+ );
180
+ }
181
+
182
+ return (string) substr(
183
+ (string )$binary_string,
184
+ (int) $start,
185
+ (int) $length
186
+ );
187
+ }
188
+
189
+ return (string) substr(
190
+ (string) $binary_string,
191
+ (int) $start
192
+ );
193
+ }
194
+ }
195
+ }
vendor/paragonie/random_compat/lib/cast_to_int.php ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Random_* Compatibility Library
4
+ * for using the new PHP 7 random_* API in PHP 5 projects
5
+ *
6
+ * The MIT License (MIT)
7
+ *
8
+ * Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
9
+ *
10
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ * of this software and associated documentation files (the "Software"), to deal
12
+ * in the Software without restriction, including without limitation the rights
13
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ * copies of the Software, and to permit persons to whom the Software is
15
+ * furnished to do so, subject to the following conditions:
16
+ *
17
+ * The above copyright notice and this permission notice shall be included in
18
+ * all copies or substantial portions of the Software.
19
+ *
20
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ * SOFTWARE.
27
+ */
28
+
29
+ if (!is_callable('RandomCompat_intval')) {
30
+
31
+ /**
32
+ * Cast to an integer if we can, safely.
33
+ *
34
+ * If you pass it a float in the range (~PHP_INT_MAX, PHP_INT_MAX)
35
+ * (non-inclusive), it will sanely cast it to an int. If you it's equal to
36
+ * ~PHP_INT_MAX or PHP_INT_MAX, we let it fail as not an integer. Floats
37
+ * lose precision, so the <= and => operators might accidentally let a float
38
+ * through.
39
+ *
40
+ * @param int|float $number The number we want to convert to an int
41
+ * @param bool $fail_open Set to true to not throw an exception
42
+ *
43
+ * @return float|int
44
+ * @psalm-suppress InvalidReturnType
45
+ *
46
+ * @throws TypeError
47
+ */
48
+ function RandomCompat_intval($number, $fail_open = false)
49
+ {
50
+ if (is_int($number) || is_float($number)) {
51
+ $number += 0;
52
+ } elseif (is_numeric($number)) {
53
+ /** @psalm-suppress InvalidOperand */
54
+ $number += 0;
55
+ }
56
+ /** @var int|float $number */
57
+
58
+ if (
59
+ is_float($number)
60
+ &&
61
+ $number > ~PHP_INT_MAX
62
+ &&
63
+ $number < PHP_INT_MAX
64
+ ) {
65
+ $number = (int) $number;
66
+ }
67
+
68
+ if (is_int($number)) {
69
+ return (int) $number;
70
+ } elseif (!$fail_open) {
71
+ throw new TypeError(
72
+ 'Expected an integer.'
73
+ );
74
+ }
75
+ return $number;
76
+ }
77
+ }
vendor/paragonie/random_compat/lib/error_polyfill.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Random_* Compatibility Library
4
+ * for using the new PHP 7 random_* API in PHP 5 projects
5
+ *
6
+ * The MIT License (MIT)
7
+ *
8
+ * Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
9
+ *
10
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ * of this software and associated documentation files (the "Software"), to deal
12
+ * in the Software without restriction, including without limitation the rights
13
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ * copies of the Software, and to permit persons to whom the Software is
15
+ * furnished to do so, subject to the following conditions:
16
+ *
17
+ * The above copyright notice and this permission notice shall be included in
18
+ * all copies or substantial portions of the Software.
19
+ *
20
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ * SOFTWARE.
27
+ */
28
+
29
+ if (!class_exists('Error', false)) {
30
+ // We can't really avoid making this extend Exception in PHP 5.
31
+ class Error extends Exception
32
+ {
33
+
34
+ }
35
+ }
36
+
37
+ if (!class_exists('TypeError', false)) {
38
+ if (is_subclass_of('Error', 'Exception')) {
39
+ class TypeError extends Error
40
+ {
41
+
42
+ }
43
+ } else {
44
+ class TypeError extends Exception
45
+ {
46
+
47
+ }
48
+ }
49
+ }
vendor/paragonie/random_compat/lib/random.php ADDED
@@ -0,0 +1,225 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Random_* Compatibility Library
4
+ * for using the new PHP 7 random_* API in PHP 5 projects
5
+ *
6
+ * @version 2.0.17
7
+ * @released 2018-07-04
8
+ *
9
+ * The MIT License (MIT)
10
+ *
11
+ * Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
12
+ *
13
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ * of this software and associated documentation files (the "Software"), to deal
15
+ * in the Software without restriction, including without limitation the rights
16
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
+ * copies of the Software, and to permit persons to whom the Software is
18
+ * furnished to do so, subject to the following conditions:
19
+ *
20
+ * The above copyright notice and this permission notice shall be included in
21
+ * all copies or substantial portions of the Software.
22
+ *
23
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
+ * SOFTWARE.
30
+ */
31
+
32
+ if (!defined('PHP_VERSION_ID')) {
33
+ // This constant was introduced in PHP 5.2.7
34
+ $RandomCompatversion = array_map('intval', explode('.', PHP_VERSION));
35
+ define(
36
+ 'PHP_VERSION_ID',
37
+ $RandomCompatversion[0] * 10000
38
+ + $RandomCompatversion[1] * 100
39
+ + $RandomCompatversion[2]
40
+ );
41
+ $RandomCompatversion = null;
42
+ }
43
+
44
+ /**
45
+ * PHP 7.0.0 and newer have these functions natively.
46
+ */
47
+ if (PHP_VERSION_ID >= 70000) {
48
+ return;
49
+ }
50
+
51
+ if (!defined('RANDOM_COMPAT_READ_BUFFER')) {
52
+ define('RANDOM_COMPAT_READ_BUFFER', 8);
53
+ }
54
+
55
+ $RandomCompatDIR = dirname(__FILE__);
56
+
57
+ require_once $RandomCompatDIR . DIRECTORY_SEPARATOR . 'byte_safe_strings.php';
58
+ require_once $RandomCompatDIR . DIRECTORY_SEPARATOR . 'cast_to_int.php';
59
+ require_once $RandomCompatDIR . DIRECTORY_SEPARATOR . 'error_polyfill.php';
60
+
61
+ if (!is_callable('random_bytes')) {
62
+ /**
63
+ * PHP 5.2.0 - 5.6.x way to implement random_bytes()
64
+ *
65
+ * We use conditional statements here to define the function in accordance
66
+ * to the operating environment. It's a micro-optimization.
67
+ *
68
+ * In order of preference:
69
+ * 1. Use libsodium if available.
70
+ * 2. fread() /dev/urandom if available (never on Windows)
71
+ * 3. mcrypt_create_iv($bytes, MCRYPT_DEV_URANDOM)
72
+ * 4. COM('CAPICOM.Utilities.1')->GetRandom()
73
+ *
74
+ * See RATIONALE.md for our reasoning behind this particular order
75
+ */
76
+ if (extension_loaded('libsodium')) {
77
+ // See random_bytes_libsodium.php
78
+ if (PHP_VERSION_ID >= 50300 && is_callable('\\Sodium\\randombytes_buf')) {
79
+ require_once $RandomCompatDIR . DIRECTORY_SEPARATOR . 'random_bytes_libsodium.php';
80
+ } elseif (method_exists('Sodium', 'randombytes_buf')) {
81
+ require_once $RandomCompatDIR . DIRECTORY_SEPARATOR . 'random_bytes_libsodium_legacy.php';
82
+ }
83
+ }
84
+
85
+ /**
86
+ * Reading directly from /dev/urandom:
87
+ */
88
+ if (DIRECTORY_SEPARATOR === '/') {
89
+ // DIRECTORY_SEPARATOR === '/' on Unix-like OSes -- this is a fast
90
+ // way to exclude Windows.
91
+ $RandomCompatUrandom = true;
92
+ $RandomCompat_basedir = ini_get('open_basedir');
93
+
94
+ if (!empty($RandomCompat_basedir)) {
95
+ $RandomCompat_open_basedir = explode(
96
+ PATH_SEPARATOR,
97
+ strtolower($RandomCompat_basedir)
98
+ );
99
+ $RandomCompatUrandom = (array() !== array_intersect(
100
+ array('/dev', '/dev/', '/dev/urandom'),
101
+ $RandomCompat_open_basedir
102
+ ));
103
+ $RandomCompat_open_basedir = null;
104
+ }
105
+
106
+ if (
107
+ !is_callable('random_bytes')
108
+ &&
109
+ $RandomCompatUrandom
110
+ &&
111
+ @is_readable('/dev/urandom')
112
+ ) {
113
+ // Error suppression on is_readable() in case of an open_basedir
114
+ // or safe_mode failure. All we care about is whether or not we
115
+ // can read it at this point. If the PHP environment is going to
116
+ // panic over trying to see if the file can be read in the first
117
+ // place, that is not helpful to us here.
118
+
119
+ // See random_bytes_dev_urandom.php
120
+ require_once $RandomCompatDIR . DIRECTORY_SEPARATOR . 'random_bytes_dev_urandom.php';
121
+ }
122
+ // Unset variables after use
123
+ $RandomCompat_basedir = null;
124
+ } else {
125
+ $RandomCompatUrandom = false;
126
+ }
127
+
128
+ /**
129
+ * mcrypt_create_iv()
130
+ *
131
+ * We only want to use mcypt_create_iv() if:
132
+ *
133
+ * - random_bytes() hasn't already been defined
134
+ * - the mcrypt extensions is loaded
135
+ * - One of these two conditions is true:
136
+ * - We're on Windows (DIRECTORY_SEPARATOR !== '/')
137
+ * - We're not on Windows and /dev/urandom is readabale
138
+ * (i.e. we're not in a chroot jail)
139
+ * - Special case:
140
+ * - If we're not on Windows, but the PHP version is between
141
+ * 5.6.10 and 5.6.12, we don't want to use mcrypt. It will
142
+ * hang indefinitely. This is bad.
143
+ * - If we're on Windows, we want to use PHP >= 5.3.7 or else
144
+ * we get insufficient entropy errors.
145
+ */
146
+ if (
147
+ !is_callable('random_bytes')
148
+ &&
149
+ // Windows on PHP < 5.3.7 is broken, but non-Windows is not known to be.
150
+ (DIRECTORY_SEPARATOR === '/' || PHP_VERSION_ID >= 50307)
151
+ &&
152
+ // Prevent this code from hanging indefinitely on non-Windows;
153
+ // see https://bugs.php.net/bug.php?id=69833
154
+ (
155
+ DIRECTORY_SEPARATOR !== '/' ||
156
+ (PHP_VERSION_ID <= 50609 || PHP_VERSION_ID >= 50613)
157
+ )
158
+ &&
159
+ extension_loaded('mcrypt')
160
+ ) {
161
+ // See random_bytes_mcrypt.php
162
+ require_once $RandomCompatDIR . DIRECTORY_SEPARATOR . 'random_bytes_mcrypt.php';
163
+ }
164
+ $RandomCompatUrandom = null;
165
+
166
+ /**
167
+ * This is a Windows-specific fallback, for when the mcrypt extension
168
+ * isn't loaded.
169
+ */
170
+ if (
171
+ !is_callable('random_bytes')
172
+ &&
173
+ extension_loaded('com_dotnet')
174
+ &&
175
+ class_exists('COM')
176
+ ) {
177
+ $RandomCompat_disabled_classes = preg_split(
178
+ '#\s*,\s*#',
179
+ strtolower(ini_get('disable_classes'))
180
+ );
181
+
182
+ if (!in_array('com', $RandomCompat_disabled_classes)) {
183
+ try {
184
+ $RandomCompatCOMtest = new COM('CAPICOM.Utilities.1');
185
+ if (method_exists($RandomCompatCOMtest, 'GetRandom')) {
186
+ // See random_bytes_com_dotnet.php
187
+ require_once $RandomCompatDIR . DIRECTORY_SEPARATOR . 'random_bytes_com_dotnet.php';
188
+ }
189
+ } catch (com_exception $e) {
190
+ // Don't try to use it.
191
+ }
192
+ }
193
+ $RandomCompat_disabled_classes = null;
194
+ $RandomCompatCOMtest = null;
195
+ }
196
+
197
+ /**
198
+ * throw new Exception
199
+ */
200
+ if (!is_callable('random_bytes')) {
201
+ /**
202
+ * We don't have any more options, so let's throw an exception right now
203
+ * and hope the developer won't let it fail silently.
204
+ *
205
+ * @param mixed $length
206
+ * @psalm-suppress InvalidReturnType
207
+ * @throws Exception
208
+ * @return string
209
+ */
210
+ function random_bytes($length)
211
+ {
212
+ unset($length); // Suppress "variable not used" warnings.
213
+ throw new Exception(
214
+ 'There is no suitable CSPRNG installed on your system'
215
+ );
216
+ return '';
217
+ }
218
+ }
219
+ }
220
+
221
+ if (!is_callable('random_int')) {
222
+ require_once $RandomCompatDIR . DIRECTORY_SEPARATOR . 'random_int.php';
223
+ }
224
+
225
+ $RandomCompatDIR = null;
vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Random_* Compatibility Library
4
+ * for using the new PHP 7 random_* API in PHP 5 projects
5
+ *
6
+ * The MIT License (MIT)
7
+ *
8
+ * Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
9
+ *
10
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ * of this software and associated documentation files (the "Software"), to deal
12
+ * in the Software without restriction, including without limitation the rights
13
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ * copies of the Software, and to permit persons to whom the Software is
15
+ * furnished to do so, subject to the following conditions:
16
+ *
17
+ * The above copyright notice and this permission notice shall be included in
18
+ * all copies or substantial portions of the Software.
19
+ *
20
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ * SOFTWARE.
27
+ */
28
+
29
+ if (!is_callable('random_bytes')) {
30
+ /**
31
+ * Windows with PHP < 5.3.0 will not have the function
32
+ * openssl_random_pseudo_bytes() available, so let's use
33
+ * CAPICOM to work around this deficiency.
34
+ *
35
+ * @param int $bytes
36
+ *
37
+ * @throws Exception
38
+ *
39
+ * @return string
40
+ */
41
+ function random_bytes($bytes)
42
+ {
43
+ try {
44
+ /** @var int $bytes */
45
+ $bytes = RandomCompat_intval($bytes);
46
+ } catch (TypeError $ex) {
47
+ throw new TypeError(
48
+ 'random_bytes(): $bytes must be an integer'
49
+ );
50
+ }
51
+
52
+ if ($bytes < 1) {
53
+ throw new Error(
54
+ 'Length must be greater than 0'
55
+ );
56
+ }
57
+
58
+ /** @var string $buf */
59
+ $buf = '';
60
+ if (!class_exists('COM')) {
61
+ throw new Error(
62
+ 'COM does not exist'
63
+ );
64
+ }
65
+ /** @var COM $util */
66
+ $util = new COM('CAPICOM.Utilities.1');
67
+ $execCount = 0;
68
+
69
+ /**
70
+ * Let's not let it loop forever. If we run N times and fail to
71
+ * get N bytes of random data, then CAPICOM has failed us.
72
+ */
73
+ do {
74
+ $buf .= base64_decode((string) $util->GetRandom($bytes, 0));
75
+ if (RandomCompat_strlen($buf) >= $bytes) {
76
+ /**
77
+ * Return our random entropy buffer here:
78
+ */
79
+ return (string) RandomCompat_substr($buf, 0, $bytes);
80
+ }
81
+ ++$execCount;
82
+ } while ($execCount < $bytes);
83
+
84
+ /**
85
+ * If we reach here, PHP has failed us.
86
+ */
87
+ throw new Exception(
88
+ 'Could not gather sufficient random data'
89
+ );
90
+ }
91
+ }
vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php ADDED
@@ -0,0 +1,190 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Random_* Compatibility Library
4
+ * for using the new PHP 7 random_* API in PHP 5 projects
5
+ *
6
+ * The MIT License (MIT)
7
+ *
8
+ * Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
9
+ *
10
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ * of this software and associated documentation files (the "Software"), to deal
12
+ * in the Software without restriction, including without limitation the rights
13
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ * copies of the Software, and to permit persons to whom the Software is
15
+ * furnished to do so, subject to the following conditions:
16
+ *
17
+ * The above copyright notice and this permission notice shall be included in
18
+ * all copies or substantial portions of the Software.
19
+ *
20
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ * SOFTWARE.
27
+ */
28
+
29
+ if (!defined('RANDOM_COMPAT_READ_BUFFER')) {
30
+ define('RANDOM_COMPAT_READ_BUFFER', 8);
31
+ }
32
+
33
+ if (!is_callable('random_bytes')) {
34
+ /**
35
+ * Unless open_basedir is enabled, use /dev/urandom for
36
+ * random numbers in accordance with best practices
37
+ *
38
+ * Why we use /dev/urandom and not /dev/random
39
+ * @ref https://www.2uo.de/myths-about-urandom
40
+ * @ref http://sockpuppet.org/blog/2014/02/25/safely-generate-random-numbers
41
+ *
42
+ * @param int $bytes
43
+ *
44
+ * @throws Exception
45
+ *
46
+ * @return string
47
+ */
48
+ function random_bytes($bytes)
49
+ {
50
+ /** @var resource $fp */
51
+ static $fp = null;
52
+
53
+ /**
54
+ * This block should only be run once
55
+ */
56
+ if (empty($fp)) {
57
+ /**
58
+ * We don't want to ever read C:\dev\random, only /dev/urandom on
59
+ * Unix-like operating systems. While we guard against this
60
+ * condition in random.php, it doesn't hurt to be defensive in depth
61
+ * here.
62
+ *
63
+ * To that end, we only try to open /dev/urandom if we're on a Unix-
64
+ * like operating system (which means the directory separator is set
65
+ * to "/" not "\".
66
+ */
67
+ if (DIRECTORY_SEPARATOR === '/') {
68
+ if (!is_readable('/dev/urandom')) {
69
+ throw new Exception(
70
+ 'Environment misconfiguration: ' .
71
+ '/dev/urandom cannot be read.'
72
+ );
73
+ }
74
+ /**
75
+ * We use /dev/urandom if it is a char device.
76
+ * We never fall back to /dev/random
77
+ */
78
+ /** @var resource|bool $fp */
79
+ $fp = fopen('/dev/urandom', 'rb');
80
+ if (is_resource($fp)) {
81
+ /** @var array<string, int> $st */
82
+ $st = fstat($fp);
83
+ if (($st['mode'] & 0170000) !=